1
0
mirror of synced 2024-11-27 15:26:02 +03:00
Commit Graph

2370 Commits

Author SHA1 Message Date
Igor Vaynberg
b4083330b3 Merge pull request #1694 from cnanney/patch-1
Fix focus on select
2013-09-06 22:36:47 -07:00
cnanney
3b54482522 Fix focus on select
Focus should go back to select2-focusser, not select2-choice.
2013-09-06 18:57:41 -05:00
Igor Vaynberg
49c8b6cf50 Merge pull request #1690 from evangun/initSelectionFix
Edit the default initSelection function to pass all tag properties
2013-09-06 08:48:29 -07:00
evangun
cfec9c6434 Edit the default initSelection function to pass all tag properties
The function will now pass all properties of the objects passed as tags to the constructor, not just the "id" and "text" properties. Because a tag is not always just an id and a text, just like when you provide the items with the "data" object instead.

This makes sure these properties are always available at the runtime of formatSelection() or formatResult(), which is not currently the case when the field is repopulated on a triggered "change" event.

My code looks like this :

$el.select2({
...,
tags: [{
  //id
  id: 1,
  //the string that will matched against the user's query
  text: 'martin smith greatmartin@provider.com'
  //the label of the item that will be shown if this tag is selected
  label: 'M. Smith',
}],
formatSelection: function(object, container){
  return object.label || object.text;
},
//right now I have to override the default function:
initSelection: function(){...}
});
2013-09-05 18:18:50 +02:00
jdecuyper
fa4ce8e382 Enable function formatResultCssClass. 2013-09-03 23:29:42 -05:00
Igor Vaynberg
fb8bf6d51d do not leak click events. fixes #1622 2013-09-03 21:16:16 -07:00
Igor Vaynberg
e09292d800 remove trailing comma. fixes #1633 2013-09-03 20:51:23 -07:00
Igor Vaynberg
7d60f619ce Merge pull request #1211 from jhinch/pixel-rounding-problems
Search width inconsistencies in different browsers due to fractional pixels
2013-09-03 20:48:35 -07:00
Igor Vaynberg
2d401b19ce Merge pull request #1684 from jdecuyper/feature-avoid-removal-of-locked-options
Avoid locked options to be selected and deleted.
2013-09-03 20:35:49 -07:00
jdecuyper
02dea18dc9 Avoid locked options to be selected and deleted. 2013-09-03 17:20:35 -05:00
Igor Vaynberg
418a659adb Merge pull request #1678 from jdecuyper/feature-remove-duplicated-option
Remove duplicated options from multi-valued select boxes.
2013-08-31 19:20:52 -07:00
jdecuyper
a380ebabd5 Remove duplicated options from multi-valued select boxes. 2013-08-30 18:16:41 -05:00
Igor Vaynberg
856af7966f Merge pull request #1675 from duncansmart/clearing-event
Added `select2-clearing` event
2013-08-30 14:01:59 -07:00
Duncan Smart
edc0d86fd2 Added select2-clearing event
that allows clearing selection to be canceled.
2013-08-30 21:35:01 +01:00
Igor Vaynberg
ca7550bf4d Revert "Fixed Tab key not respecting opts.selectOnBlur" breaks tab key. fixes #1646.
This reverts commit 6eb74930d5.
2013-08-30 08:55:16 -07:00
Igor Vaynberg
9380a0678c Merge pull request #1628 from realityking/css
Cleanup CSS
2013-08-28 23:29:45 -07:00
Igor Vaynberg
92f173c1ab Merge pull request #1667 from duckinator/master
Clicking outside of dropdown should remove select2-container-active class.
2013-08-28 23:11:37 -07:00
markwellna
3c2d7f7310 Clicking outside of dropdown removes select2-container-active class.
Closes #1661.
2013-08-28 13:05:41 -04:00
François Pluchino
9bc68f089e Fix the focus when list is closed on the mouse click event 2013-08-21 12:16:50 +02:00
Rouven Weßling
299f87440e Remove duplicate property. 2013-08-18 14:35:04 +02:00
Rouven Weßling
e7649880cb Remove -khtml-user-select. It's not supported by KHTML anyways and their marketshare is incredibly minor. 2013-08-18 14:35:04 +02:00
Rouven Weßling
488526ccf5 Remove -o-linear-gradient used by Opera 11.1 - 12.0. These versions are now very rarely used. 2013-08-18 14:35:01 +02:00
Rouven Weßling
bba1eb04c7 Remove -ms-linear-gradient that was only used by IE 10 preview releases. 2013-08-18 14:34:58 +02:00
Igor Vaynberg
c4529b8700 fix missing placeholder. closes #1614 2013-08-14 16:57:37 -07:00
Igor Vaynberg
236fb0ea23 Merge pull request #1617 from forby/master
Fix missing dropdownCssClass on init
2013-08-14 14:34:15 -07:00
Jonathan Forby
a4dc0ba522 Fix missing dropdownCssClass on init
Fixes issue #1615 where dropdownCssClass is no longer applied.
2013-08-14 16:54:10 -04:00
Igor Vaynberg
6aea56b962 modified version identifiers in descriptors for release 3.4.2 2013-08-12 15:04:12 -07:00
Igor Vaynberg
12d3c4ece2 update build script 2013-08-12 15:03:50 -07:00
Igor Vaynberg
ec740d8beb Revert "modified version identifiers in descriptors for release 3.4.2"
This reverts commit db8c7b6e1f.
2013-08-12 15:03:05 -07:00
Igor Vaynberg
db8c7b6e1f modified version identifiers in descriptors for release 3.4.2 2013-08-12 15:02:00 -07:00
Igor Vaynberg
4dce07a431 fix usecase when a placeholder is not defined but an option with an empty value exists. fixes #1573 2013-08-12 08:43:13 -07:00
Igor Vaynberg
bb85b6a1f9 Merge pull request #1608 from kris-lab/master
Removed BOM
2013-08-12 08:12:39 -07:00
Chris Stasiak
2515e19ed9 Removed BOM 2013-08-12 12:22:48 +02:00
Igor Vaynberg
2400357d59 small fix for #1604 2013-08-09 16:38:23 -07:00
Igor Vaynberg
00ba1bddfa Merge pull request #1604 from jdecuyper/feature-next-search-term
Add 'nextSearchTerm' function
2013-08-09 16:37:01 -07:00
jdecuyper
e1b50a306b Add 'nextSearchTerm' function
- Given a previous selection 'nextSearchTerm' determines what the next search term should be.
- Remove some leftover tabs.
- Fix a typo: 'install the' instead of 'install sthe'.
2013-08-09 17:26:23 -05:00
Igor Vaynberg
5ea0b956b5 Merge pull request #1601 from Streid/master
Not working adaptDropdownCssClass callback.
2013-08-09 08:54:20 -07:00
Streid
e4c1e061e4 Tab to spaces 2013-08-09 11:33:41 +03:00
Streid
1d1212c5ed Fix: Not working adaptDropdownCssClass callback. 2013-08-09 11:30:47 +03:00
Igor Vaynberg
08dc4d3768 Merge pull request #1593 from juliomrqz/patch-1
Improve ES locale
2013-08-05 00:00:46 -07:00
Julio Marquez
26987ddcfd Improve ES locale
Fixed missing diacritical marks & changed word "adicione" -> "introduzca"
2013-08-04 19:00:32 -04:30
Igor Vaynberg
0a6c56c8be Merge pull request #1591 from kepoweran/master
Added Malay translation
2013-08-03 23:09:47 -07:00
kepoweran
2a081dfc1f Added Malay translation 2013-08-02 23:43:34 +08:00
Igor Vaynberg
59df6b4c9a prevent scrolling when dropdown is opened. fixes #1540 2013-07-31 22:05:44 -07:00
Igor Vaynberg
dcee289874 Merge pull request #1578 from yuripc/colors-2
Colors to shorthand hexadecimal
2013-07-31 21:44:35 -07:00
Igor Vaynberg
e162a4802c tweak how mask is created to remove jitter. fixes #1574 2013-07-31 21:41:37 -07:00
Igor Vaynberg
d479018485 Merge pull request #1584 from UltCombo/pt
improve PT locales
2013-07-31 09:01:01 -07:00
UltCombo
881067524d improve PT locales 2013-07-31 11:23:35 -03:00
Igor Vaynberg
2ab64be416 Merge pull request #1563 from UltCombo/1562
Fixes #1562 do not trigger change on $().select2('data') unless specified with the second param
2013-07-30 09:41:56 -07:00
Yuri Pereira
7fd8a9f6e7 Colors to shorthand hexadecimal/2 2013-07-27 14:28:45 -03:00