Merge branch '1.11.x' of github.com:chamilo/chamilo-lms into 1.11.x

remotes/angel/1.11.x
Julio 9 years ago
commit d0287f41c8
  1. 10
      app/Resources/public/assets/blueimp-tmpl/.bower.json
  2. 16
      app/Resources/public/assets/blueimp-tmpl/README.md
  3. 5
      app/Resources/public/assets/blueimp-tmpl/js/compile.js
  4. 2
      app/Resources/public/assets/blueimp-tmpl/package.json
  5. 10
      app/Resources/public/assets/jquery-file-upload/.bower.json
  6. 2
      app/Resources/public/assets/jquery-file-upload/bower.json
  7. 4
      app/Resources/public/assets/jquery-file-upload/js/jquery.fileupload-process.js
  8. 12
      app/Resources/public/assets/jquery-file-upload/js/jquery.fileupload.js
  9. 10
      app/Resources/public/assets/mediaelement/.bower.json
  10. BIN
      app/Resources/public/assets/mediaelement/build/flashmediaelement-cdn.swf
  11. BIN
      app/Resources/public/assets/mediaelement/build/flashmediaelement-debug.swf
  12. BIN
      app/Resources/public/assets/mediaelement/build/flashmediaelement.swf
  13. 352
      app/Resources/public/assets/mediaelement/build/mediaelement-and-player.js
  14. 6
      app/Resources/public/assets/mediaelement/build/mediaelement-and-player.min.js
  15. 284
      app/Resources/public/assets/mediaelement/build/mediaelement.js
  16. 2
      app/Resources/public/assets/mediaelement/build/mediaelement.min.js
  17. 68
      app/Resources/public/assets/mediaelement/build/mediaelementplayer.js
  18. 4
      app/Resources/public/assets/mediaelement/build/mediaelementplayer.min.js
  19. BIN
      app/Resources/public/assets/mediaelement/build/silverlightmediaelement.xap
  20. 21
      app/Resources/public/assets/mediaelement/changelog.md
  21. 10
      app/Resources/public/assets/select2/.bower.json
  22. 2
      app/Resources/public/assets/select2/.jshintrc
  23. 2
      app/Resources/public/assets/select2/component.json
  24. 2
      app/Resources/public/assets/select2/dist/css/select2.css
  25. 2
      app/Resources/public/assets/select2/dist/css/select2.min.css
  26. 2
      app/Resources/public/assets/select2/dist/js/i18n/ar.js
  27. 2
      app/Resources/public/assets/select2/dist/js/i18n/az.js
  28. 2
      app/Resources/public/assets/select2/dist/js/i18n/bg.js
  29. 2
      app/Resources/public/assets/select2/dist/js/i18n/ca.js
  30. 2
      app/Resources/public/assets/select2/dist/js/i18n/cs.js
  31. 2
      app/Resources/public/assets/select2/dist/js/i18n/da.js
  32. 2
      app/Resources/public/assets/select2/dist/js/i18n/de.js
  33. 3
      app/Resources/public/assets/select2/dist/js/i18n/el.js
  34. 2
      app/Resources/public/assets/select2/dist/js/i18n/en.js
  35. 2
      app/Resources/public/assets/select2/dist/js/i18n/es.js
  36. 2
      app/Resources/public/assets/select2/dist/js/i18n/et.js
  37. 2
      app/Resources/public/assets/select2/dist/js/i18n/eu.js
  38. 2
      app/Resources/public/assets/select2/dist/js/i18n/fa.js
  39. 2
      app/Resources/public/assets/select2/dist/js/i18n/fi.js
  40. 4
      app/Resources/public/assets/select2/dist/js/i18n/fr.js
  41. 2
      app/Resources/public/assets/select2/dist/js/i18n/gl.js
  42. 2
      app/Resources/public/assets/select2/dist/js/i18n/he.js
  43. 2
      app/Resources/public/assets/select2/dist/js/i18n/hi.js
  44. 2
      app/Resources/public/assets/select2/dist/js/i18n/hr.js
  45. 2
      app/Resources/public/assets/select2/dist/js/i18n/hu.js
  46. 2
      app/Resources/public/assets/select2/dist/js/i18n/id.js
  47. 2
      app/Resources/public/assets/select2/dist/js/i18n/is.js
  48. 2
      app/Resources/public/assets/select2/dist/js/i18n/it.js
  49. 2
      app/Resources/public/assets/select2/dist/js/i18n/ja.js
  50. 3
      app/Resources/public/assets/select2/dist/js/i18n/km.js
  51. 2
      app/Resources/public/assets/select2/dist/js/i18n/ko.js
  52. 4
      app/Resources/public/assets/select2/dist/js/i18n/lt.js
  53. 2
      app/Resources/public/assets/select2/dist/js/i18n/lv.js
  54. 2
      app/Resources/public/assets/select2/dist/js/i18n/mk.js
  55. 2
      app/Resources/public/assets/select2/dist/js/i18n/ms.js
  56. 4
      app/Resources/public/assets/select2/dist/js/i18n/nb.js
  57. 2
      app/Resources/public/assets/select2/dist/js/i18n/nl.js
  58. 2
      app/Resources/public/assets/select2/dist/js/i18n/pl.js
  59. 2
      app/Resources/public/assets/select2/dist/js/i18n/pt-BR.js
  60. 2
      app/Resources/public/assets/select2/dist/js/i18n/pt.js
  61. 2
      app/Resources/public/assets/select2/dist/js/i18n/ro.js
  62. 2
      app/Resources/public/assets/select2/dist/js/i18n/ru.js
  63. 2
      app/Resources/public/assets/select2/dist/js/i18n/sk.js
  64. 2
      app/Resources/public/assets/select2/dist/js/i18n/sr-Cyrl.js
  65. 2
      app/Resources/public/assets/select2/dist/js/i18n/sr.js
  66. 2
      app/Resources/public/assets/select2/dist/js/i18n/sv.js
  67. 2
      app/Resources/public/assets/select2/dist/js/i18n/th.js
  68. 2
      app/Resources/public/assets/select2/dist/js/i18n/tr.js
  69. 2
      app/Resources/public/assets/select2/dist/js/i18n/uk.js
  70. 2
      app/Resources/public/assets/select2/dist/js/i18n/vi.js
  71. 2
      app/Resources/public/assets/select2/dist/js/i18n/zh-CN.js
  72. 2
      app/Resources/public/assets/select2/dist/js/i18n/zh-TW.js
  73. 201
      app/Resources/public/assets/select2/dist/js/select2.full.js
  74. 6
      app/Resources/public/assets/select2/dist/js/select2.full.min.js
  75. 201
      app/Resources/public/assets/select2/dist/js/select2.js
  76. 5
      app/Resources/public/assets/select2/dist/js/select2.min.js
  77. 37
      app/Resources/public/assets/select2/docs/_includes/examples/basics.html
  78. 2
      app/Resources/public/assets/select2/docs/_includes/footer.html
  79. 12
      app/Resources/public/assets/select2/docs/_includes/head.html
  80. 38
      app/Resources/public/assets/select2/docs/_includes/options/data/ajax.html
  81. 4
      app/Resources/public/assets/select2/docs/_includes/options/dropdown/placement.html
  82. 39
      app/Resources/public/assets/select2/docs/_includes/options/dropdown/tagging.html
  83. 12
      app/Resources/public/assets/select2/docs/_includes/options/events/jquery.html
  84. 11
      app/Resources/public/assets/select2/docs/browserconfig.xml
  85. BIN
      app/Resources/public/assets/select2/docs/images/android-chrome-36x36.png
  86. BIN
      app/Resources/public/assets/select2/docs/images/android-chrome-48x48.png
  87. BIN
      app/Resources/public/assets/select2/docs/images/android-chrome-72x72.png
  88. BIN
      app/Resources/public/assets/select2/docs/images/apple-touch-icon-57x57.png
  89. BIN
      app/Resources/public/assets/select2/docs/images/apple-touch-icon-60x60.png
  90. BIN
      app/Resources/public/assets/select2/docs/images/apple-touch-icon-72x72.png
  91. BIN
      app/Resources/public/assets/select2/docs/images/apple-touch-icon-precomposed.png
  92. BIN
      app/Resources/public/assets/select2/docs/images/apple-touch-icon.png
  93. BIN
      app/Resources/public/assets/select2/docs/images/favicon-16x16.png
  94. BIN
      app/Resources/public/assets/select2/docs/images/favicon-32x32.png
  95. BIN
      app/Resources/public/assets/select2/docs/images/favicon.ico
  96. 23
      app/Resources/public/assets/select2/docs/images/manifest.json
  97. BIN
      app/Resources/public/assets/select2/docs/images/mstile-150x150.png
  98. BIN
      app/Resources/public/assets/select2/docs/images/mstile-310x150.png
  99. BIN
      app/Resources/public/assets/select2/docs/images/mstile-70x70.png
  100. 17
      app/Resources/public/assets/select2/docs/images/safari-pinned-tab.svg
  101. Some files were not shown because too many files have changed in this diff Show More

@ -1,14 +1,14 @@
{
"name": "blueimp-tmpl",
"homepage": "https://github.com/blueimp/JavaScript-Templates",
"version": "3.3.0",
"_release": "3.3.0",
"version": "3.4.0",
"_release": "3.4.0",
"_resolution": {
"type": "version",
"tag": "v3.3.0",
"commit": "f09f47c368e0dc7871be35119ef3eab9bb25bdf2"
"tag": "v3.4.0",
"commit": "dcb7a7b44c733c5df0b6000e777bc6942646607e"
},
"_source": "git://github.com/blueimp/JavaScript-Templates.git",
"_source": "https://github.com/blueimp/JavaScript-Templates.git",
"_target": ">=2.5.4",
"_originalSource": "blueimp-tmpl"
}

@ -352,20 +352,18 @@ Use **include(str, obj)** to include content from a different template:
## Compiled templates
The JavaScript Templates project comes with a compilation script, that allows
you to compile your templates into JavaScript code and combine them with a
minimal Templates runtime into one minified JavaScript file.
minimal Templates runtime into one combined JavaScript file.
The compilation script is built for [node.js](http://nodejs.org/) and also
requires [UglifyJS](https://github.com/mishoo/UglifyJS).
To use it, first install both the JavaScript Templates project and UglifyJS via
The compilation script is built for [node.js](http://nodejs.org/).
To use it, first install the JavaScript Templates project via
[npm](https://www.npmjs.org/):
```sh
npm install uglify-js blueimp-tmpl
npm install blueimp-tmpl
```
This will put the executables **uglifyjs** and **tmpl.js** into the folder
**node_modules/.bin**. It will also make them available on your PATH if you
install the packages globally
This will put the executable **tmpl.js** into the folder **node_modules/.bin**.
It will also make it available on your PATH if you install the package globally
(by adding the **-g** flag to the install command).
The **tmpl.js** executable accepts the paths to one or multiple template files
@ -374,7 +372,7 @@ console output. The following command line shows you how to store the generated
code in a new JavaScript file that can be included in your project:
```sh
tmpl.js templates/upload.html templates/download.html > tmpl.min.js
tmpl.js index.html > tmpl.js
```
The files given as command line arguments to **tmpl.js** can either be pure

@ -17,7 +17,6 @@
var path = require('path')
var tmpl = require(path.join(__dirname, 'tmpl.js'))
var fs = require('fs')
var uglifyJS = require('uglify-js')
// Retrieve the content of the minimal runtime:
var runtime = fs.readFileSync(path.join(__dirname, 'runtime.js'), 'utf8')
// A regular expression to parse templates from script tags in a HTML page:
@ -78,6 +77,6 @@
}
// Combine the generated functions as cache of the minimal runtime:
code = runtime.replace('{}', '{' + list.join(',') + '}')
// Generate the minified code and print it to the console output:
console.log(uglifyJS.minify(code, {fromString: true}).code)
// Print the resulting code to the console output:
console.log(code)
}())

@ -1,6 +1,6 @@
{
"name": "blueimp-tmpl",
"version": "3.3.0",
"version": "3.4.0",
"title": "JavaScript Templates",
"description": "1KB lightweight, fast & powerful JavaScript templating engine with zero dependencies. Compatible with server-side environments like Node.js, module loaders like RequireJS, Browserify or webpack and all web browsers.",
"keywords": [

@ -1,6 +1,6 @@
{
"name": "blueimp-file-upload",
"version": "9.12.1",
"version": "9.12.3",
"title": "jQuery File Upload",
"description": "File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images.",
"keywords": [
@ -61,13 +61,13 @@
"server",
"test"
],
"_release": "9.12.1",
"_release": "9.12.3",
"_resolution": {
"type": "version",
"tag": "9.12.1",
"commit": "39a40c6c8dc9503c896ca2efac65b7340e439724"
"tag": "9.12.3",
"commit": "58188eea0e49512761263531352fa07f16de0f45"
},
"_source": "git://github.com/blueimp/jQuery-File-Upload.git",
"_source": "https://github.com/blueimp/jQuery-File-Upload.git",
"_target": "*",
"_originalSource": "jquery-file-upload"
}

@ -1,6 +1,6 @@
{
"name": "blueimp-file-upload",
"version": "9.12.1",
"version": "9.12.3",
"title": "jQuery File Upload",
"description": "File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images.",
"keywords": [

@ -84,7 +84,7 @@
settings
);
};
chain = chain.pipe(func, settings.always && func);
chain = chain.then(func, settings.always && func);
});
chain
.done(function () {
@ -151,7 +151,7 @@
};
opts.index = index;
that._processing += 1;
that._processingQueue = that._processingQueue.pipe(func, func)
that._processingQueue = that._processingQueue.then(func, func)
.always(function () {
that._processing -= 1;
if (that._processing === 0) {

@ -652,7 +652,7 @@
data.process = function (resolveFunc, rejectFunc) {
if (resolveFunc || rejectFunc) {
data._processQueue = this._processQueue =
(this._processQueue || getPromise([this])).pipe(
(this._processQueue || getPromise([this])).then(
function () {
if (data.errorThrown) {
return $.Deferred()
@ -660,7 +660,7 @@
}
return getPromise(arguments);
}
).pipe(resolveFunc, rejectFunc);
).then(resolveFunc, rejectFunc);
}
return this._processQueue || getPromise([this]);
};
@ -945,9 +945,9 @@
if (this.options.limitConcurrentUploads > 1) {
slot = $.Deferred();
this._slots.push(slot);
pipe = slot.pipe(send);
pipe = slot.then(send);
} else {
this._sequence = this._sequence.pipe(send, send);
this._sequence = this._sequence.then(send, send);
pipe = this._sequence;
}
// Return the piped Promise object, enhanced with an abort method,
@ -1139,7 +1139,7 @@
$.map(entries, function (entry) {
return that._handleFileTreeEntry(entry, path);
})
).pipe(function () {
).then(function () {
return Array.prototype.concat.apply(
[],
arguments
@ -1208,7 +1208,7 @@
return $.when.apply(
$,
$.map(fileInput, this._getSingleFileInputFiles)
).pipe(function () {
).then(function () {
return Array.prototype.concat.apply(
[],
arguments

@ -23,14 +23,14 @@
"./build/mediaelement-and-player.js",
"./build/mediaelementplayer.css"
],
"version": "2.20.1",
"_release": "2.20.1",
"version": "2.21.1",
"_release": "2.21.1",
"_resolution": {
"type": "version",
"tag": "2.20.1",
"commit": "8d4c5ece59d93f9526f9affecb2eda982ba2e3ad"
"tag": "2.21.1",
"commit": "701dfeac106ae8373e4d14819f8b8bbf22c52f43"
},
"_source": "git://github.com/johndyer/mediaelement.git",
"_source": "https://github.com/johndyer/mediaelement.git",
"_target": "2.*",
"_originalSource": "mediaelement"
}

@ -16,7 +16,7 @@
var mejs = mejs || {};
// version number
mejs.version = '2.20.1';
mejs.version = '2.21.1';
// player number (for missing, same id attr)
@ -294,7 +294,13 @@ mejs.Utility = {
}
obj.parentNode.removeChild(obj);
}
}
},
determineScheme: function(url) {
if (url && url.indexOf("://") != -1) {
return url.substr(0, url.indexOf("://")+3);
}
return "//"; // let user agent figure this out
}
};
@ -680,7 +686,9 @@ mejs.PluginMediaElement.prototype = {
pause: function () {
if (this.pluginApi != null) {
if (this.pluginType == 'youtube' || this.pluginType == 'vimeo') {
this.pluginApi.pauseVideo();
if( this.pluginApi.getPlayerState() == 1 ) {
this.pluginApi.pauseVideo();
}
} else {
this.pluginApi.pauseMedia();
}
@ -887,89 +895,6 @@ mejs.PluginMediaElement.prototype = {
}
};
// Handles calls from Flash/Silverlight and reports them as native <video/audio> events and properties
mejs.MediaPluginBridge = {
pluginMediaElements:{},
htmlMediaElements:{},
registerPluginElement: function (id, pluginMediaElement, htmlMediaElement) {
this.pluginMediaElements[id] = pluginMediaElement;
this.htmlMediaElements[id] = htmlMediaElement;
},
unregisterPluginElement: function (id) {
delete this.pluginMediaElements[id];
delete this.htmlMediaElements[id];
},
// when Flash/Silverlight is ready, it calls out to this method
initPlugin: function (id) {
var pluginMediaElement = this.pluginMediaElements[id],
htmlMediaElement = this.htmlMediaElements[id];
if (pluginMediaElement) {
// find the javascript bridge
switch (pluginMediaElement.pluginType) {
case "flash":
pluginMediaElement.pluginElement = pluginMediaElement.pluginApi = document.getElementById(id);
break;
case "silverlight":
pluginMediaElement.pluginElement = document.getElementById(pluginMediaElement.id);
pluginMediaElement.pluginApi = pluginMediaElement.pluginElement.Content.MediaElementJS;
break;
}
if (pluginMediaElement.pluginApi != null && pluginMediaElement.success) {
pluginMediaElement.success(pluginMediaElement, htmlMediaElement);
}
}
},
// receives events from Flash/Silverlight and sends them out as HTML5 media events
// http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html
fireEvent: function (id, eventName, values) {
var
e,
i,
bufferedTime,
pluginMediaElement = this.pluginMediaElements[id];
if(!pluginMediaElement){
return;
}
// fake event object to mimic real HTML media event.
e = {
type: eventName,
target: pluginMediaElement
};
// attach all values to element and event object
for (i in values) {
pluginMediaElement[i] = values[i];
e[i] = values[i];
}
// fake the newer W3C buffered TimeRange (loaded and total have been removed)
bufferedTime = values.bufferedTime || 0;
e.target.buffered = e.buffered = {
start: function(index) {
return 0;
},
end: function (index) {
return bufferedTime;
},
length: 1
};
pluginMediaElement.dispatchEvent(e);
}
};
/*
Default options
*/
@ -1068,6 +993,7 @@ mejs.HtmlMediaElementShim = {
// test for HTML5 and plugin capabilities
playback = this.determinePlayback(htmlMediaElement, options, mejs.MediaFeatures.supportsMediaTag, isMediaTag, src);
playback.url = (playback.url !== null) ? mejs.Utility.absolutizeUrl(playback.url) : '';
playback.scheme = mejs.Utility.determineScheme(playback.url);
if (playback.method == 'native') {
// second fix for android
@ -1101,7 +1027,7 @@ mejs.HtmlMediaElementShim = {
l,
n,
type,
result = { method: '', url: '', htmlMediaElement: htmlMediaElement, isVideo: (htmlMediaElement.tagName.toLowerCase() != 'audio')},
result = { method: '', url: '', htmlMediaElement: htmlMediaElement, isVideo: (htmlMediaElement.tagName.toLowerCase() != 'audio'), scheme: ''},
pluginName,
pluginVersions,
pluginInfo,
@ -1396,8 +1322,7 @@ mejs.HtmlMediaElementShim = {
// register plugin
pluginMediaElement.success = options.success;
mejs.MediaPluginBridge.registerPluginElement(pluginid, pluginMediaElement, htmlMediaElement);
// add container (must be added to DOM before inserting HTML for IE)
container.className = 'me-plugin';
container.id = pluginid + '_container';
@ -1407,44 +1332,100 @@ mejs.HtmlMediaElementShim = {
} else {
document.body.insertBefore(container, document.body.childNodes[0]);
}
// flash/silverlight vars
initVars = [
'id=' + pluginid,
'jsinitfunction=' + "mejs.MediaPluginBridge.initPlugin",
'jscallbackfunction=' + "mejs.MediaPluginBridge.fireEvent",
'isvideo=' + ((playback.isVideo) ? "true" : "false"),
'autoplay=' + ((autoplay) ? "true" : "false"),
'preload=' + preload,
'width=' + width,
'startvolume=' + options.startVolume,
'timerrate=' + options.timerRate,
'flashstreamer=' + options.flashStreamer,
'height=' + height,
'pseudostreamstart=' + options.pseudoStreamingStartQueryParam];
if (playback.url !== null) {
if (playback.method == 'flash') {
initVars.push('file=' + mejs.Utility.encodeUrl(playback.url));
} else {
initVars.push('file=' + playback.url);
if (playback.method === 'flash' || playback.method === 'silverlight') {
// flash/silverlight vars
initVars = [
'id=' + pluginid,
'isvideo=' + ((playback.isVideo) ? "true" : "false"),
'autoplay=' + ((autoplay) ? "true" : "false"),
'preload=' + preload,
'width=' + width,
'startvolume=' + options.startVolume,
'timerrate=' + options.timerRate,
'flashstreamer=' + options.flashStreamer,
'height=' + height,
'pseudostreamstart=' + options.pseudoStreamingStartQueryParam];
if (playback.url !== null) {
if (playback.method == 'flash') {
initVars.push('file=' + mejs.Utility.encodeUrl(playback.url));
} else {
initVars.push('file=' + playback.url);
}
}
if (options.enablePluginDebug) {
initVars.push('debug=true');
}
if (options.enablePluginSmoothing) {
initVars.push('smoothing=true');
}
if (options.enablePseudoStreaming) {
initVars.push('pseudostreaming=true');
}
if (controls) {
initVars.push('controls=true'); // shows controls in the plugin if desired
}
if (options.pluginVars) {
initVars = initVars.concat(options.pluginVars);
}
// call from plugin
window[pluginid + '_init'] = function() {
switch (pluginMediaElement.pluginType) {
case 'flash':
pluginMediaElement.pluginElement = pluginMediaElement.pluginApi = document.getElementById(pluginid);
break;
case 'silverlight':
pluginMediaElement.pluginElement = document.getElementById(pluginMediaElement.id);
pluginMediaElement.pluginApi = pluginMediaElement.pluginElement.Content.MediaElementJS;
break;
}
if (pluginMediaElement.pluginApi != null && pluginMediaElement.success) {
pluginMediaElement.success(pluginMediaElement, htmlMediaElement);
}
}
// event call from plugin
window[pluginid + '_event'] = function(eventName, values) {
var
e,
i,
bufferedTime;
// fake event object to mimic real HTML media event.
e = {
type: eventName,
target: pluginMediaElement
};
// attach all values to element and event object
for (i in values) {
pluginMediaElement[i] = values[i];
e[i] = values[i];
}
// fake the newer W3C buffered TimeRange (loaded and total have been removed)
bufferedTime = values.bufferedTime || 0;
e.target.buffered = e.buffered = {
start: function(index) {
return 0;
},
end: function (index) {
return bufferedTime;
},
length: 1
};
pluginMediaElement.dispatchEvent(e);
}
}
if (options.enablePluginDebug) {
initVars.push('debug=true');
}
if (options.enablePluginSmoothing) {
initVars.push('smoothing=true');
}
if (options.enablePseudoStreaming) {
initVars.push('pseudostreaming=true');
}
if (controls) {
initVars.push('controls=true'); // shows controls in the plugin if desired
}
if (options.pluginVars) {
initVars = initVars.concat(options.pluginVars);
}
switch (playback.method) {
case 'silverlight':
@ -1467,7 +1448,7 @@ mejs.HtmlMediaElementShim = {
specialIEContainer.outerHTML =
'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" ' +
'id="' + pluginid + '" width="' + width + '" height="' + height + '" class="mejs-shim">' +
'<param name="movie" value="' + options.pluginPath + options.flashName + '?x=' + (new Date()) + '" />' +
'<param name="movie" value="' + options.pluginPath + options.flashName + '?x=' + (new Date().getTime()) + '" />' +
'<param name="flashvars" value="' + initVars.join('&amp;') + '" />' +
'<param name="quality" value="high" />' +
'<param name="bgcolor" value="#000000" />' +
@ -1519,7 +1500,8 @@ mejs.HtmlMediaElementShim = {
pluginId: pluginid,
videoId: videoId,
height: height,
width: width
width: width,
scheme: playback.scheme
};
// favor iframe version of YouTube
@ -1536,12 +1518,13 @@ mejs.HtmlMediaElementShim = {
var player_id = pluginid + "_player";
pluginMediaElement.vimeoid = playback.url.substr(playback.url.lastIndexOf('/')+1);
container.innerHTML ='<iframe src="//player.vimeo.com/video/' + pluginMediaElement.vimeoid + '?api=1&portrait=0&byline=0&title=0&player_id=' + player_id + '" width="' + width +'" height="' + height +'" frameborder="0" class="mejs-shim" id="' + player_id + '" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>';
container.innerHTML ='<iframe src="' + playback.scheme + 'player.vimeo.com/video/' + pluginMediaElement.vimeoid + '?api=1&portrait=0&byline=0&title=0&player_id=' + player_id + '" width="' + width +'" height="' + height +'" frameborder="0" class="mejs-shim" id="' + player_id + '" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>';
if (typeof($f) == 'function') { // froogaloop available
var player = $f(container.childNodes[0]);
var player = $f(container.childNodes[0]),
playerState = -1;
player.addEvent('ready', function() {
player.playVideo = function() {
player.api( 'play' );
}
@ -1565,7 +1548,11 @@ mejs.HtmlMediaElementShim = {
player.api( 'setVolume', player.lastVolume );
delete player.lastVolume;
}
}
}
// parity with YT player
player.getPlayerState = function() {
return playerState;
}
function createEvent(player, pluginMediaElement, eventName, e) {
var event = {
@ -1580,27 +1567,39 @@ mejs.HtmlMediaElementShim = {
}
player.addEvent('play', function() {
playerState = 1;
createEvent(player, pluginMediaElement, 'play');
createEvent(player, pluginMediaElement, 'playing');
});
player.addEvent('pause', function() {
playerState = 2;
createEvent(player, pluginMediaElement, 'pause');
});
player.addEvent('finish', function() {
playerState = 0;
createEvent(player, pluginMediaElement, 'ended');
});
player.addEvent('playProgress', function(e) {
createEvent(player, pluginMediaElement, 'timeupdate', e);
});
player.addEvent('seek', function(e) {
playerState = 3;
createEvent(player, pluginMediaElement, 'seeked', e);
});
player.addEvent('loadProgress', function(e) {
playerState = 3;
createEvent(player, pluginMediaElement, 'progress', e);
});
pluginMediaElement.pluginElement = container;
pluginMediaElement.pluginApi = player;
// init mejs
mejs.MediaPluginBridge.initPlugin(pluginid);
pluginMediaElement.success(pluginMediaElement, pluginMediaElement.pluginElement);
});
}
else {
@ -1612,8 +1611,6 @@ mejs.HtmlMediaElementShim = {
htmlMediaElement.style.display = 'none';
// prevent browser from autoplaying when using a plugin
htmlMediaElement.removeAttribute('autoplay');
// FYI: options.success will be fired by the MediaPluginBridge
return pluginMediaElement;
},
@ -1674,10 +1671,10 @@ mejs.HtmlMediaElementShim = {
mejs.YouTubeApi = {
isIframeStarted: false,
isIframeLoaded: false,
loadIframeApi: function() {
loadIframeApi: function(yt) {
if (!this.isIframeStarted) {
var tag = document.createElement('script');
tag.src = "//www.youtube.com/player_api";
tag.src = yt.scheme + "www.youtube.com/player_api";
var firstScriptTag = document.getElementsByTagName('script')[0];
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
this.isIframeStarted = true;
@ -1689,7 +1686,7 @@ mejs.YouTubeApi = {
if (this.isLoaded) {
this.createIframe(yt);
} else {
this.loadIframeApi();
this.loadIframeApi(yt);
this.iframeQueue.push(yt);
}
},
@ -1715,7 +1712,7 @@ mejs.YouTubeApi = {
settings.pluginMediaElement.pluginElement = document.getElementById(settings.containerId);
// init mejs
mejs.MediaPluginBridge.initPlugin(settings.pluginId);
pluginMediaElement.success(pluginMediaElement, pluginMediaElement.pluginElement);
// create timer
setInterval(function() {
@ -1793,7 +1790,7 @@ mejs.YouTubeApi = {
/*
settings.container.innerHTML =
'<object type="application/x-shockwave-flash" id="' + settings.pluginId + '" data="//www.youtube.com/apiplayer?enablejsapi=1&amp;playerapiid=' + settings.pluginId + '&amp;version=3&amp;autoplay=0&amp;controls=0&amp;modestbranding=1&loop=0" ' +
'<object type="application/x-shockwave-flash" id="' + settings.pluginId + '" data="' + settings.scheme + 'www.youtube.com/apiplayer?enablejsapi=1&amp;playerapiid=' + settings.pluginId + '&amp;version=3&amp;autoplay=0&amp;controls=0&amp;modestbranding=1&loop=0" ' +
'width="' + settings.width + '" height="' + settings.height + '" style="visibility: visible; " class="mejs-shim">' +
'<param name="allowScriptAccess" value="sameDomain">' +
'<param name="wmode" value="transparent">' +
@ -1801,13 +1798,13 @@ mejs.YouTubeApi = {
*/
var specialIEContainer,
youtubeUrl = '//www.youtube.com/apiplayer?enablejsapi=1&amp;playerapiid=' + settings.pluginId + '&amp;version=3&amp;autoplay=0&amp;controls=0&amp;modestbranding=1&loop=0';
youtubeUrl = settings.scheme + 'www.youtube.com/apiplayer?enablejsapi=1&amp;playerapiid=' + settings.pluginId + '&amp;version=3&amp;autoplay=0&amp;controls=0&amp;modestbranding=1&loop=0';
if (mejs.MediaFeatures.isIE) {
specialIEContainer = document.createElement('div');
settings.container.appendChild(specialIEContainer);
specialIEContainer.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" ' +
specialIEContainer.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="' + settings.scheme + 'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" ' +
'id="' + settings.pluginId + '" width="' + settings.width + '" height="' + settings.height + '" class="mejs-shim">' +
'<param name="movie" value="' + youtubeUrl + '" />' +
'<param name="wmode" value="transparent" />' +
@ -1834,7 +1831,8 @@ mejs.YouTubeApi = {
// hook up and return to MediaELementPlayer.success
pluginMediaElement.pluginApi =
pluginMediaElement.pluginElement = player;
mejs.MediaPluginBridge.initPlugin(id);
settings.success(pluginMediaElement, pluginMediaElement.pluginElement);
// load the youtube video
player.cueVideoById(settings.videoId);
@ -2847,6 +2845,16 @@ if (typeof jQuery != 'undefined') {
if (duration !== this.duration) {
duration = this.duration;
mejs.Utility.calculateTimeFormat(duration, t.options, t.options.framesPerSecond || 25);
// make sure to fill in and resize the controls (e.g., 00:00 => 01:13:15
if (t.updateDuration) {
t.updateDuration();
}
if (t.updateCurrent) {
t.updateCurrent();
}
t.setControlsSize();
}
}, false);
@ -2883,6 +2891,7 @@ if (typeof jQuery != 'undefined') {
// user has to start playback directly by tapping on the iFrame.
if (t.media.pluginType == 'youtube' && ( mf.isiOS || mf.isAndroid ) ) {
t.container.find('.mejs-overlay-play').hide();
t.container.find('.mejs-poster').hide();
}
}
@ -3068,7 +3077,7 @@ if (typeof jQuery != 'undefined') {
lastControlPosition = lastControl.length ? lastControl.position() : null;
railWidth--;
}
} while (lastControlPosition !== null && lastControlPosition.top > 0 && railWidth > 0);
} while (lastControlPosition !== null && lastControlPosition.top.toFixed(2) > 0 && railWidth > 0);
t.container.trigger('controlsresize');
},
@ -3246,7 +3255,8 @@ if (typeof jQuery != 'undefined') {
// listen for key presses
t.globalBind('keydown', function(event) {
player.hasFocus = $(event.target).closest('.mejs-container').length !== 0;
player.hasFocus = $(event.target).closest('.mejs-container').length !== 0
&& $(event.target).closest('.mejs-container').attr('id') === player.$media.closest('.mejs-container').attr('id');
return t.onkeydown(player, media, event);
});
@ -3266,7 +3276,7 @@ if (typeof jQuery != 'undefined') {
for (var j = 0, jl = keyAction.keys.length; j < jl; j++) {
if (e.keyCode == keyAction.keys[j]) {
if (typeof(e.preventDefault) == "function") e.preventDefault();
keyAction.action(player, media, e.keyCode);
keyAction.action(player, media, e.keyCode, e);
return false;
}
}
@ -3673,8 +3683,8 @@ if (typeof jQuery != 'undefined') {
});
};
var restartPlayer = function () {
var restartPlayer = function () {
var now = new Date();
if (now - lastKeyPressTime >= 1000) {
media.play();
@ -3697,20 +3707,18 @@ if (typeof jQuery != 'undefined') {
var keyCode = e.keyCode,
duration = media.duration,
seekTime = media.currentTime;
seekTime = media.currentTime,
seekForward = player.options.defaultSeekForwardInterval(duration),
seekBackward = player.options.defaultSeekBackwardInterval(duration);
switch (keyCode) {
case 37: // left
seekTime -= 1;
case 40: // Down
seekTime -= seekBackward;
break;
case 39: // Right
seekTime += 1;
break;
case 38: // Up
seekTime += Math.floor(duration * 0.1);
break;
case 40: // Down
seekTime -= Math.floor(duration * 0.1);
seekTime += seekForward;
break;
case 36: // Home
seekTime = 0;
@ -3718,10 +3726,8 @@ if (typeof jQuery != 'undefined') {
case 35: // end
seekTime = duration;
break;
case 10: // enter
media.paused ? media.play() : media.pause();
return;
case 13: // space
case 32: // space
case 13: // enter
media.paused ? media.play() : media.pause();
return;
default:
@ -4130,7 +4136,7 @@ if (typeof jQuery != 'undefined') {
var volume = Math.floor(media.volume*100);
volumeSlider.attr({
'aria-label': mejs.i18n.t('volumeSlider'),
'aria-label': mejs.i18n.t('Volume Slider'),
'aria-valuemin': 0,
'aria-valuemax': 100,
'aria-valuenow': volume,
@ -4167,10 +4173,10 @@ if (typeof jQuery != 'undefined') {
var volume = media.volume;
switch (keyCode) {
case 38: // Up
volume += 0.1;
volume = Math.min(volume + 0.1, 1);
break;
case 40: // Down
volume = volume - 0.1;
volume = Math.max(0, volume - 0.1);
break;
default:
return true;
@ -4567,24 +4573,10 @@ if (typeof jQuery != 'undefined') {
setTimeout(function checkFullscreen() {
if (t.isNativeFullScreen) {
var zoomMultiplier = window["devicePixelRatio"] || 1,
// Use a percent error margin since devicePixelRatio is a float and not exact.
percentErrorMargin = 0.002, // 0.2%
windowWidth = zoomMultiplier * $(window).width(),
var percentErrorMargin = 0.002, // 0.2%
windowWidth = $(window).width(),
screenWidth = screen.width,
// ** 13twelve
// Screen width is sort of useless: http://www.quirksmode.org/blog/archives/2013/11/screenwidth_is.html
// My rMBP ignores devicePixelRatio when returning the values, so fullscreen would always fail the "suddenly not fullscreen" test
// Theory: the gap between reported values should give us an indication of browser behavior with screen.width and devicePixelRatio
zoomedWindowWidth = zoomMultiplier * windowWidth;
if (Math.abs(screenWidth-windowWidth) > Math.abs(screenWidth-zoomedWindowWidth)) {
// screen.width is likely true pixels, not CSS pixels, so we need to use the zoomed window width for comparison
windowWidth = zoomedWindowWidth;
}
// ** / 13twelve
var absDiff = Math.abs(screenWidth - windowWidth),
absDiff = Math.abs(screenWidth - windowWidth),
marginError = screenWidth * percentErrorMargin;
// check if the video is suddenly not really fullscreen

File diff suppressed because one or more lines are too long

@ -16,7 +16,7 @@
var mejs = mejs || {};
// version number
mejs.version = '2.20.1';
mejs.version = '2.21.1';
// player number (for missing, same id attr)
@ -294,7 +294,13 @@ mejs.Utility = {
}
obj.parentNode.removeChild(obj);
}
}
},
determineScheme: function(url) {
if (url && url.indexOf("://") != -1) {
return url.substr(0, url.indexOf("://")+3);
}
return "//"; // let user agent figure this out
}
};
@ -680,7 +686,9 @@ mejs.PluginMediaElement.prototype = {
pause: function () {
if (this.pluginApi != null) {
if (this.pluginType == 'youtube' || this.pluginType == 'vimeo') {
this.pluginApi.pauseVideo();
if( this.pluginApi.getPlayerState() == 1 ) {
this.pluginApi.pauseVideo();
}
} else {
this.pluginApi.pauseMedia();
}
@ -887,89 +895,6 @@ mejs.PluginMediaElement.prototype = {
}
};
// Handles calls from Flash/Silverlight and reports them as native <video/audio> events and properties
mejs.MediaPluginBridge = {
pluginMediaElements:{},
htmlMediaElements:{},
registerPluginElement: function (id, pluginMediaElement, htmlMediaElement) {
this.pluginMediaElements[id] = pluginMediaElement;
this.htmlMediaElements[id] = htmlMediaElement;
},
unregisterPluginElement: function (id) {
delete this.pluginMediaElements[id];
delete this.htmlMediaElements[id];
},
// when Flash/Silverlight is ready, it calls out to this method
initPlugin: function (id) {
var pluginMediaElement = this.pluginMediaElements[id],
htmlMediaElement = this.htmlMediaElements[id];
if (pluginMediaElement) {
// find the javascript bridge
switch (pluginMediaElement.pluginType) {
case "flash":
pluginMediaElement.pluginElement = pluginMediaElement.pluginApi = document.getElementById(id);
break;
case "silverlight":
pluginMediaElement.pluginElement = document.getElementById(pluginMediaElement.id);
pluginMediaElement.pluginApi = pluginMediaElement.pluginElement.Content.MediaElementJS;
break;
}
if (pluginMediaElement.pluginApi != null && pluginMediaElement.success) {
pluginMediaElement.success(pluginMediaElement, htmlMediaElement);
}
}
},
// receives events from Flash/Silverlight and sends them out as HTML5 media events
// http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html
fireEvent: function (id, eventName, values) {
var
e,
i,
bufferedTime,
pluginMediaElement = this.pluginMediaElements[id];
if(!pluginMediaElement){
return;
}
// fake event object to mimic real HTML media event.
e = {
type: eventName,
target: pluginMediaElement
};
// attach all values to element and event object
for (i in values) {
pluginMediaElement[i] = values[i];
e[i] = values[i];
}
// fake the newer W3C buffered TimeRange (loaded and total have been removed)
bufferedTime = values.bufferedTime || 0;
e.target.buffered = e.buffered = {
start: function(index) {
return 0;
},
end: function (index) {
return bufferedTime;
},
length: 1
};
pluginMediaElement.dispatchEvent(e);
}
};
/*
Default options
*/
@ -1068,6 +993,7 @@ mejs.HtmlMediaElementShim = {
// test for HTML5 and plugin capabilities
playback = this.determinePlayback(htmlMediaElement, options, mejs.MediaFeatures.supportsMediaTag, isMediaTag, src);
playback.url = (playback.url !== null) ? mejs.Utility.absolutizeUrl(playback.url) : '';
playback.scheme = mejs.Utility.determineScheme(playback.url);
if (playback.method == 'native') {
// second fix for android
@ -1101,7 +1027,7 @@ mejs.HtmlMediaElementShim = {
l,
n,
type,
result = { method: '', url: '', htmlMediaElement: htmlMediaElement, isVideo: (htmlMediaElement.tagName.toLowerCase() != 'audio')},
result = { method: '', url: '', htmlMediaElement: htmlMediaElement, isVideo: (htmlMediaElement.tagName.toLowerCase() != 'audio'), scheme: ''},
pluginName,
pluginVersions,
pluginInfo,
@ -1396,8 +1322,7 @@ mejs.HtmlMediaElementShim = {
// register plugin
pluginMediaElement.success = options.success;
mejs.MediaPluginBridge.registerPluginElement(pluginid, pluginMediaElement, htmlMediaElement);
// add container (must be added to DOM before inserting HTML for IE)
container.className = 'me-plugin';
container.id = pluginid + '_container';
@ -1407,44 +1332,100 @@ mejs.HtmlMediaElementShim = {
} else {
document.body.insertBefore(container, document.body.childNodes[0]);
}
// flash/silverlight vars
initVars = [
'id=' + pluginid,
'jsinitfunction=' + "mejs.MediaPluginBridge.initPlugin",
'jscallbackfunction=' + "mejs.MediaPluginBridge.fireEvent",
'isvideo=' + ((playback.isVideo) ? "true" : "false"),
'autoplay=' + ((autoplay) ? "true" : "false"),
'preload=' + preload,
'width=' + width,
'startvolume=' + options.startVolume,
'timerrate=' + options.timerRate,
'flashstreamer=' + options.flashStreamer,
'height=' + height,
'pseudostreamstart=' + options.pseudoStreamingStartQueryParam];
if (playback.url !== null) {
if (playback.method == 'flash') {
initVars.push('file=' + mejs.Utility.encodeUrl(playback.url));
} else {
initVars.push('file=' + playback.url);
if (playback.method === 'flash' || playback.method === 'silverlight') {
// flash/silverlight vars
initVars = [
'id=' + pluginid,
'isvideo=' + ((playback.isVideo) ? "true" : "false"),
'autoplay=' + ((autoplay) ? "true" : "false"),
'preload=' + preload,
'width=' + width,
'startvolume=' + options.startVolume,
'timerrate=' + options.timerRate,
'flashstreamer=' + options.flashStreamer,
'height=' + height,
'pseudostreamstart=' + options.pseudoStreamingStartQueryParam];
if (playback.url !== null) {
if (playback.method == 'flash') {
initVars.push('file=' + mejs.Utility.encodeUrl(playback.url));
} else {
initVars.push('file=' + playback.url);
}
}
if (options.enablePluginDebug) {
initVars.push('debug=true');
}
if (options.enablePluginSmoothing) {
initVars.push('smoothing=true');
}
if (options.enablePseudoStreaming) {
initVars.push('pseudostreaming=true');
}
if (controls) {
initVars.push('controls=true'); // shows controls in the plugin if desired
}
if (options.pluginVars) {
initVars = initVars.concat(options.pluginVars);
}
// call from plugin
window[pluginid + '_init'] = function() {
switch (pluginMediaElement.pluginType) {
case 'flash':
pluginMediaElement.pluginElement = pluginMediaElement.pluginApi = document.getElementById(pluginid);
break;
case 'silverlight':
pluginMediaElement.pluginElement = document.getElementById(pluginMediaElement.id);
pluginMediaElement.pluginApi = pluginMediaElement.pluginElement.Content.MediaElementJS;
break;
}
if (pluginMediaElement.pluginApi != null && pluginMediaElement.success) {
pluginMediaElement.success(pluginMediaElement, htmlMediaElement);
}
}
// event call from plugin
window[pluginid + '_event'] = function(eventName, values) {
var
e,
i,
bufferedTime;
// fake event object to mimic real HTML media event.
e = {
type: eventName,
target: pluginMediaElement
};
// attach all values to element and event object
for (i in values) {
pluginMediaElement[i] = values[i];
e[i] = values[i];
}
// fake the newer W3C buffered TimeRange (loaded and total have been removed)
bufferedTime = values.bufferedTime || 0;
e.target.buffered = e.buffered = {
start: function(index) {
return 0;
},
end: function (index) {
return bufferedTime;
},
length: 1
};
pluginMediaElement.dispatchEvent(e);
}
}
if (options.enablePluginDebug) {
initVars.push('debug=true');
}
if (options.enablePluginSmoothing) {
initVars.push('smoothing=true');
}
if (options.enablePseudoStreaming) {
initVars.push('pseudostreaming=true');
}
if (controls) {
initVars.push('controls=true'); // shows controls in the plugin if desired
}
if (options.pluginVars) {
initVars = initVars.concat(options.pluginVars);
}
switch (playback.method) {
case 'silverlight':
@ -1467,7 +1448,7 @@ mejs.HtmlMediaElementShim = {
specialIEContainer.outerHTML =
'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" ' +
'id="' + pluginid + '" width="' + width + '" height="' + height + '" class="mejs-shim">' +
'<param name="movie" value="' + options.pluginPath + options.flashName + '?x=' + (new Date()) + '" />' +
'<param name="movie" value="' + options.pluginPath + options.flashName + '?x=' + (new Date().getTime()) + '" />' +
'<param name="flashvars" value="' + initVars.join('&amp;') + '" />' +
'<param name="quality" value="high" />' +
'<param name="bgcolor" value="#000000" />' +
@ -1519,7 +1500,8 @@ mejs.HtmlMediaElementShim = {
pluginId: pluginid,
videoId: videoId,
height: height,
width: width
width: width,
scheme: playback.scheme
};
// favor iframe version of YouTube
@ -1536,12 +1518,13 @@ mejs.HtmlMediaElementShim = {
var player_id = pluginid + "_player";
pluginMediaElement.vimeoid = playback.url.substr(playback.url.lastIndexOf('/')+1);
container.innerHTML ='<iframe src="//player.vimeo.com/video/' + pluginMediaElement.vimeoid + '?api=1&portrait=0&byline=0&title=0&player_id=' + player_id + '" width="' + width +'" height="' + height +'" frameborder="0" class="mejs-shim" id="' + player_id + '" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>';
container.innerHTML ='<iframe src="' + playback.scheme + 'player.vimeo.com/video/' + pluginMediaElement.vimeoid + '?api=1&portrait=0&byline=0&title=0&player_id=' + player_id + '" width="' + width +'" height="' + height +'" frameborder="0" class="mejs-shim" id="' + player_id + '" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>';
if (typeof($f) == 'function') { // froogaloop available
var player = $f(container.childNodes[0]);
var player = $f(container.childNodes[0]),
playerState = -1;
player.addEvent('ready', function() {
player.playVideo = function() {
player.api( 'play' );
}
@ -1565,7 +1548,11 @@ mejs.HtmlMediaElementShim = {
player.api( 'setVolume', player.lastVolume );
delete player.lastVolume;
}
}
}
// parity with YT player
player.getPlayerState = function() {
return playerState;
}
function createEvent(player, pluginMediaElement, eventName, e) {
var event = {
@ -1580,27 +1567,39 @@ mejs.HtmlMediaElementShim = {
}
player.addEvent('play', function() {
playerState = 1;
createEvent(player, pluginMediaElement, 'play');
createEvent(player, pluginMediaElement, 'playing');
});
player.addEvent('pause', function() {
playerState = 2;
createEvent(player, pluginMediaElement, 'pause');
});
player.addEvent('finish', function() {
playerState = 0;
createEvent(player, pluginMediaElement, 'ended');
});
player.addEvent('playProgress', function(e) {
createEvent(player, pluginMediaElement, 'timeupdate', e);
});
player.addEvent('seek', function(e) {
playerState = 3;
createEvent(player, pluginMediaElement, 'seeked', e);
});
player.addEvent('loadProgress', function(e) {
playerState = 3;
createEvent(player, pluginMediaElement, 'progress', e);
});
pluginMediaElement.pluginElement = container;
pluginMediaElement.pluginApi = player;
// init mejs
mejs.MediaPluginBridge.initPlugin(pluginid);
pluginMediaElement.success(pluginMediaElement, pluginMediaElement.pluginElement);
});
}
else {
@ -1612,8 +1611,6 @@ mejs.HtmlMediaElementShim = {
htmlMediaElement.style.display = 'none';
// prevent browser from autoplaying when using a plugin
htmlMediaElement.removeAttribute('autoplay');
// FYI: options.success will be fired by the MediaPluginBridge
return pluginMediaElement;
},
@ -1674,10 +1671,10 @@ mejs.HtmlMediaElementShim = {
mejs.YouTubeApi = {
isIframeStarted: false,
isIframeLoaded: false,
loadIframeApi: function() {
loadIframeApi: function(yt) {
if (!this.isIframeStarted) {
var tag = document.createElement('script');
tag.src = "//www.youtube.com/player_api";
tag.src = yt.scheme + "www.youtube.com/player_api";
var firstScriptTag = document.getElementsByTagName('script')[0];
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
this.isIframeStarted = true;
@ -1689,7 +1686,7 @@ mejs.YouTubeApi = {
if (this.isLoaded) {
this.createIframe(yt);
} else {
this.loadIframeApi();
this.loadIframeApi(yt);
this.iframeQueue.push(yt);
}
},
@ -1715,7 +1712,7 @@ mejs.YouTubeApi = {
settings.pluginMediaElement.pluginElement = document.getElementById(settings.containerId);
// init mejs
mejs.MediaPluginBridge.initPlugin(settings.pluginId);
pluginMediaElement.success(pluginMediaElement, pluginMediaElement.pluginElement);
// create timer
setInterval(function() {
@ -1793,7 +1790,7 @@ mejs.YouTubeApi = {
/*
settings.container.innerHTML =
'<object type="application/x-shockwave-flash" id="' + settings.pluginId + '" data="//www.youtube.com/apiplayer?enablejsapi=1&amp;playerapiid=' + settings.pluginId + '&amp;version=3&amp;autoplay=0&amp;controls=0&amp;modestbranding=1&loop=0" ' +
'<object type="application/x-shockwave-flash" id="' + settings.pluginId + '" data="' + settings.scheme + 'www.youtube.com/apiplayer?enablejsapi=1&amp;playerapiid=' + settings.pluginId + '&amp;version=3&amp;autoplay=0&amp;controls=0&amp;modestbranding=1&loop=0" ' +
'width="' + settings.width + '" height="' + settings.height + '" style="visibility: visible; " class="mejs-shim">' +
'<param name="allowScriptAccess" value="sameDomain">' +
'<param name="wmode" value="transparent">' +
@ -1801,13 +1798,13 @@ mejs.YouTubeApi = {
*/
var specialIEContainer,
youtubeUrl = '//www.youtube.com/apiplayer?enablejsapi=1&amp;playerapiid=' + settings.pluginId + '&amp;version=3&amp;autoplay=0&amp;controls=0&amp;modestbranding=1&loop=0';
youtubeUrl = settings.scheme + 'www.youtube.com/apiplayer?enablejsapi=1&amp;playerapiid=' + settings.pluginId + '&amp;version=3&amp;autoplay=0&amp;controls=0&amp;modestbranding=1&loop=0';
if (mejs.MediaFeatures.isIE) {
specialIEContainer = document.createElement('div');
settings.container.appendChild(specialIEContainer);
specialIEContainer.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" ' +
specialIEContainer.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="' + settings.scheme + 'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" ' +
'id="' + settings.pluginId + '" width="' + settings.width + '" height="' + settings.height + '" class="mejs-shim">' +
'<param name="movie" value="' + youtubeUrl + '" />' +
'<param name="wmode" value="transparent" />' +
@ -1834,7 +1831,8 @@ mejs.YouTubeApi = {
// hook up and return to MediaELementPlayer.success
pluginMediaElement.pluginApi =
pluginMediaElement.pluginElement = player;
mejs.MediaPluginBridge.initPlugin(id);
settings.success(pluginMediaElement, pluginMediaElement.pluginElement);
// load the youtube video
player.cueVideoById(settings.videoId);

File diff suppressed because one or more lines are too long

@ -781,6 +781,16 @@ if (typeof jQuery != 'undefined') {
if (duration !== this.duration) {
duration = this.duration;
mejs.Utility.calculateTimeFormat(duration, t.options, t.options.framesPerSecond || 25);
// make sure to fill in and resize the controls (e.g., 00:00 => 01:13:15
if (t.updateDuration) {
t.updateDuration();
}
if (t.updateCurrent) {
t.updateCurrent();
}
t.setControlsSize();
}
}, false);
@ -817,6 +827,7 @@ if (typeof jQuery != 'undefined') {
// user has to start playback directly by tapping on the iFrame.
if (t.media.pluginType == 'youtube' && ( mf.isiOS || mf.isAndroid ) ) {
t.container.find('.mejs-overlay-play').hide();
t.container.find('.mejs-poster').hide();
}
}
@ -1002,7 +1013,7 @@ if (typeof jQuery != 'undefined') {
lastControlPosition = lastControl.length ? lastControl.position() : null;
railWidth--;
}
} while (lastControlPosition !== null && lastControlPosition.top > 0 && railWidth > 0);
} while (lastControlPosition !== null && lastControlPosition.top.toFixed(2) > 0 && railWidth > 0);
t.container.trigger('controlsresize');
},
@ -1180,7 +1191,8 @@ if (typeof jQuery != 'undefined') {
// listen for key presses
t.globalBind('keydown', function(event) {
player.hasFocus = $(event.target).closest('.mejs-container').length !== 0;
player.hasFocus = $(event.target).closest('.mejs-container').length !== 0
&& $(event.target).closest('.mejs-container').attr('id') === player.$media.closest('.mejs-container').attr('id');
return t.onkeydown(player, media, event);
});
@ -1200,7 +1212,7 @@ if (typeof jQuery != 'undefined') {
for (var j = 0, jl = keyAction.keys.length; j < jl; j++) {
if (e.keyCode == keyAction.keys[j]) {
if (typeof(e.preventDefault) == "function") e.preventDefault();
keyAction.action(player, media, e.keyCode);
keyAction.action(player, media, e.keyCode, e);
return false;
}
}
@ -1607,8 +1619,8 @@ if (typeof jQuery != 'undefined') {
});
};
var restartPlayer = function () {
var restartPlayer = function () {
var now = new Date();
if (now - lastKeyPressTime >= 1000) {
media.play();
@ -1631,20 +1643,18 @@ if (typeof jQuery != 'undefined') {
var keyCode = e.keyCode,
duration = media.duration,
seekTime = media.currentTime;
seekTime = media.currentTime,
seekForward = player.options.defaultSeekForwardInterval(duration),
seekBackward = player.options.defaultSeekBackwardInterval(duration);
switch (keyCode) {
case 37: // left
seekTime -= 1;
case 40: // Down
seekTime -= seekBackward;
break;
case 39: // Right
seekTime += 1;
break;
case 38: // Up
seekTime += Math.floor(duration * 0.1);
break;
case 40: // Down
seekTime -= Math.floor(duration * 0.1);
seekTime += seekForward;
break;
case 36: // Home
seekTime = 0;
@ -1652,10 +1662,8 @@ if (typeof jQuery != 'undefined') {
case 35: // end
seekTime = duration;
break;
case 10: // enter
media.paused ? media.play() : media.pause();
return;
case 13: // space
case 32: // space
case 13: // enter
media.paused ? media.play() : media.pause();
return;
default:
@ -2064,7 +2072,7 @@ if (typeof jQuery != 'undefined') {
var volume = Math.floor(media.volume*100);
volumeSlider.attr({
'aria-label': mejs.i18n.t('volumeSlider'),
'aria-label': mejs.i18n.t('Volume Slider'),
'aria-valuemin': 0,
'aria-valuemax': 100,
'aria-valuenow': volume,
@ -2101,10 +2109,10 @@ if (typeof jQuery != 'undefined') {
var volume = media.volume;
switch (keyCode) {
case 38: // Up
volume += 0.1;
volume = Math.min(volume + 0.1, 1);
break;
case 40: // Down
volume = volume - 0.1;
volume = Math.max(0, volume - 0.1);
break;
default:
return true;
@ -2501,24 +2509,10 @@ if (typeof jQuery != 'undefined') {
setTimeout(function checkFullscreen() {
if (t.isNativeFullScreen) {
var zoomMultiplier = window["devicePixelRatio"] || 1,
// Use a percent error margin since devicePixelRatio is a float and not exact.
percentErrorMargin = 0.002, // 0.2%
windowWidth = zoomMultiplier * $(window).width(),
var percentErrorMargin = 0.002, // 0.2%
windowWidth = $(window).width(),
screenWidth = screen.width,
// ** 13twelve
// Screen width is sort of useless: http://www.quirksmode.org/blog/archives/2013/11/screenwidth_is.html
// My rMBP ignores devicePixelRatio when returning the values, so fullscreen would always fail the "suddenly not fullscreen" test
// Theory: the gap between reported values should give us an indication of browser behavior with screen.width and devicePixelRatio
zoomedWindowWidth = zoomMultiplier * windowWidth;
if (Math.abs(screenWidth-windowWidth) > Math.abs(screenWidth-zoomedWindowWidth)) {
// screen.width is likely true pixels, not CSS pixels, so we need to use the zoomed window width for comparison
windowWidth = zoomedWindowWidth;
}
// ** / 13twelve
var absDiff = Math.abs(screenWidth - windowWidth),
absDiff = Math.abs(screenWidth - windowWidth),
marginError = screenWidth * percentErrorMargin;
// check if the video is suddenly not really fullscreen

File diff suppressed because one or more lines are too long

@ -1,5 +1,26 @@
### Version History
*2.21.1 (2016/05/06)*
* Fix YouTube embed functionality from 2.21.0 plugin handling updates @johndyer
* Added more Vimeo API functionality @johndyer
* Move source-chooser offscreen on load (https://github.com/johndyer/mediaelement/pull/1713) @tennety
*2.21.0 (2016/05/05)*
* Removed Chrome iframe fullscreen fix (https://github.com/johndyer/mediaelement/pull/1736) @13twelve
* Detect YouTube scheme (https://github.com/johndyer/mediaelement/pull/1730) @silkentrance
* Handle keydown events only for focused mediaelement (https://github.com/johndyer/mediaelement/pull/1732) @lucash
* Fix bad i18n string; create template for translating (https://github.com/johndyer/mediaelement/pull/1722) @cjbarth
* Fix lastControlPosition.top in browser zoom mode (https://github.com/johndyer/mediaelement/pull/1718) @DmitryKrekota
* Constrain volume to 0-1 range with arrow keys (https://github.com/johndyer/mediaelement/pull/1717) @tennety
* Pass the entire event object to the key action (https://github.com/johndyer/mediaelement/pull/1701) @tennety
* Support for VAST3 adpods (https://github.com/johndyer/mediaelement/pull/1702) @cherylquirion
* Allow progress to follow configuration (https://github.com/johndyer/mediaelement/pull/1703) @tennety
* YouTube: poster hiding and multi-pause issues (https://github.com/johndyer/mediaelement/pull/1719) @msant7
* Simplified plugin callback functions and querystring checking @johdneyr
* Fix for timerail when duration is over 1 hour #1727 @johndyer
*2.19.1 (2016/02/26)*
* Fix for closed caption button caused by previous 508 change

@ -10,14 +10,14 @@
"url": "git@github.com:select2/select2.git"
},
"homepage": "https://github.com/ivaynberg/select2",
"version": "4.0.2",
"_release": "4.0.2",
"version": "4.0.3",
"_release": "4.0.3",
"_resolution": {
"type": "version",
"tag": "4.0.2",
"commit": "622a619d25358b86a93c2335f88e1884acc9ccb8"
"tag": "4.0.3",
"commit": "566c7846fbf8c3b7674346f26d0ee872c0a77629"
},
"_source": "git://github.com/ivaynberg/select2.git",
"_source": "https://github.com/ivaynberg/select2.git",
"_target": "4.*",
"_originalSource": "select2"
}

@ -9,9 +9,9 @@
"console": false,
"define": false,
"document": false,
"expect": false,
"MockContainer": false,
"module": false,
"QUnit": false,
"require": false,
"test": false,
"window": false

@ -2,7 +2,7 @@
"name": "select2",
"repo": "select/select2",
"description": "Select2 is a jQuery based replacement for select boxes. It supports searching, remote data sets, and infinite scrolling of results.",
"version": "4.0.2",
"version": "4.0.3",
"demo": "https://select2.github.io/",
"keywords": [
"jquery"

@ -184,6 +184,8 @@
margin: 0;
padding: 0 5px;
width: 100%; }
.select2-container--default .select2-selection--multiple .select2-selection__rendered li {
list-style: none; }
.select2-container--default .select2-selection--multiple .select2-selection__placeholder {
color: #999;
margin-top: 5px;

File diff suppressed because one or more lines are too long

@ -1,3 +1,3 @@
/*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ar",[],function(){return{errorLoading:function(){return"لا يمكن تحميل النتائج"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="الرجاء حذف "+t+" عناصر";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="الرجاء إضافة "+t+" عناصر";return n},loadingMore:function(){return"جاري تحميل نتائج إضافية..."},maximumSelected:function(e){var t="تستطيع إختيار "+e.maximum+" بنود فقط";return t},noResults:function(){return"لم يتم العثور على أي نتائج"},searching:function(){return"جاري البحث…"}}}),{define:e.define,require:e.require}})();

@ -1,3 +1,3 @@
/*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/az",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum;return t+" simvol silin"},inputTooShort:function(e){var t=e.minimum-e.input.length;return t+" simvol daxil edin"},loadingMore:function(){return"Daha çox nəticə yüklənir…"},maximumSelected:function(e){return"Sadəcə "+e.maximum+" element seçə bilərsiniz"},noResults:function(){return"Nəticə tapılmadı"},searching:function(){return"Axtarılır…"}}}),{define:e.define,require:e.require}})();

@ -1,3 +1,3 @@
/*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/bg",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Моля въведете с "+t+" по-малко символ";return t>1&&(n+="a"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Моля въведете още "+t+" символ";return t>1&&(n+="a"),n},loadingMore:function(){return"Зареждат се още…"},maximumSelected:function(e){var t="Можете да направите до "+e.maximum+" ";return e.maximum>1?t+="избора":t+="избор",t},noResults:function(){return"Няма намерени съвпадения"},searching:function(){return"Търсене…"}}}),{define:e.define,require:e.require}})();

@ -1,3 +1,3 @@
/*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ca",[],function(){return{errorLoading:function(){return"La càrrega ha fallat"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Si us plau, elimina "+t+" car";return t==1?n+="àcter":n+="àcters",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Si us plau, introdueix "+t+" car";return t==1?n+="àcter":n+="àcters",n},loadingMore:function(){return"Carregant més resultats…"},maximumSelected:function(e){var t="Només es pot seleccionar "+e.maximum+" element";return e.maximum!=1&&(t+="s"),t},noResults:function(){return"No s'han trobat resultats"},searching:function(){return"Cercant…"}}}),{define:e.define,require:e.require}})();

@ -1,3 +1,3 @@
/*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/cs",[],function(){function e(e,t){switch(e){case 2:return t?"dva":"dvě";case 3:return"tři";case 4:return"čtyři"}return""}return{errorLoading:function(){return"Výsledky nemohly být načteny."},inputTooLong:function(t){var n=t.input.length-t.maximum;return n==1?"Prosím zadejte o jeden znak méně":n<=4?"Prosím zadejte o "+e(n,!0)+" znaky méně":"Prosím zadejte o "+n+" znaků méně"},inputTooShort:function(t){var n=t.minimum-t.input.length;return n==1?"Prosím zadejte ještě jeden znak":n<=4?"Prosím zadejte ještě další "+e(n,!0)+" znaky":"Prosím zadejte ještě dalších "+n+" znaků"},loadingMore:function(){return"Načítají se další výsledky…"},maximumSelected:function(t){var n=t.maximum;return n==1?"Můžete zvolit jen jednu položku":n<=4?"Můžete zvolit maximálně "+e(n,!1)+" položky":"Můžete zvolit maximálně "+n+" položek"},noResults:function(){return"Nenalezeny žádné položky"},searching:function(){return"Vyhledávání…"}}}),{define:e.define,require:e.require}})();

@ -1,3 +1,3 @@
/*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/da",[],function(){return{errorLoading:function(){return"Resultaterne kunne ikke indlæses."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Angiv venligst "+t+" tegn mindre";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Angiv venligst "+t+" tegn mere";return n},loadingMore:function(){return"Indlæser flere resultater…"},maximumSelected:function(e){var t="Du kan kun vælge "+e.maximum+" emne";return e.maximum!=1&&(t+="r"),t},noResults:function(){return"Ingen resultater fundet"},searching:function(){return"Søger…"}}}),{define:e.define,require:e.require}})();

@ -1,3 +1,3 @@
/*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/de",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum;return"Bitte "+t+" Zeichen weniger eingeben"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Bitte "+t+" Zeichen mehr eingeben"},loadingMore:function(){return"Lade mehr Ergebnisse…"},maximumSelected:function(e){var t="Sie können nur "+e.maximum+" Eintr";return e.maximum===1?t+="ag":t+="äge",t+=" auswählen",t},noResults:function(){return"Keine Übereinstimmungen gefunden"},searching:function(){return"Suche…"}}}),{define:e.define,require:e.require}})();

@ -0,0 +1,3 @@
/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/el",[],function(){return{errorLoading:function(){return"Τα αποτελέσματα δεν μπόρεσαν να φορτώσουν."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Παρακαλώ διαγράψτε "+t+" χαρακτήρ";return t==1&&(n+="α"),t!=1&&(n+="ες"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Παρακαλώ συμπληρώστε "+t+" ή περισσότερους χαρακτήρες";return n},loadingMore:function(){return"Φόρτωση περισσότερων αποτελεσμάτων…"},maximumSelected:function(e){var t="Μπορείτε να επιλέξετε μόνο "+e.maximum+" επιλογ";return e.maximum==1&&(t+="ή"),e.maximum!=1&&(t+="ές"),t},noResults:function(){return"Δεν βρέθηκαν αποτελέσματα"},searching:function(){return"Αναζήτηση…"}}}),{define:e.define,require:e.require}})();

@ -1,3 +1,3 @@
/*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Please delete "+t+" character";return t!=1&&(n+="s"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Please enter "+t+" or more characters";return n},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var t="You can only select "+e.maximum+" item";return e.maximum!=1&&(t+="s"),t},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),{define:e.define,require:e.require}})();

@ -1,3 +1,3 @@
/*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/es",[],function(){return{errorLoading:function(){return"La carga falló"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Por favor, elimine "+t+" car";return t==1?n+="ácter":n+="acteres",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Por favor, introduzca "+t+" car";return t==1?n+="ácter":n+="acteres",n},loadingMore:function(){return"Cargando más resultados…"},maximumSelected:function(e){var t="Sólo puede seleccionar "+e.maximum+" elemento";return e.maximum!=1&&(t+="s"),t},noResults:function(){return"No se encontraron resultados"},searching:function(){return"Buscando…"}}}),{define:e.define,require:e.require}})();

@ -1,3 +1,3 @@
/*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/et",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Sisesta "+t+" täht";return t!=1&&(n+="e"),n+=" vähem",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Sisesta "+t+" täht";return t!=1&&(n+="e"),n+=" rohkem",n},loadingMore:function(){return"Laen tulemusi…"},maximumSelected:function(e){var t="Saad vaid "+e.maximum+" tulemus";return e.maximum==1?t+="e":t+="t",t+=" valida",t},noResults:function(){return"Tulemused puuduvad"},searching:function(){return"Otsin…"}}}),{define:e.define,require:e.require}})();

@ -1,3 +1,3 @@
/*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/eu",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Idatzi ";return t==1?n+="karaktere bat":n+=t+" karaktere",n+=" gutxiago",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Idatzi ";return t==1?n+="karaktere bat":n+=t+" karaktere",n+=" gehiago",n},loadingMore:function(){return"Emaitza gehiago kargatzen…"},maximumSelected:function(e){return e.maximum===1?"Elementu bakarra hauta dezakezu":e.maximum+" elementu hauta ditzakezu soilik"},noResults:function(){return"Ez da bat datorrenik aurkitu"},searching:function(){return"Bilatzen…"}}}),{define:e.define,require:e.require}})();

@ -1,3 +1,3 @@
/*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/fa",[],function(){return{errorLoading:function(){return"امکان بارگذاری نتایج وجود ندارد."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="لطفاً "+t+" کاراکتر را حذف نمایید";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="لطفاً تعداد "+t+" کاراکتر یا بیشتر وارد نمایید";return n},loadingMore:function(){return"در حال بارگذاری نتایج بیشتر..."},maximumSelected:function(e){var t="شما تنها میتوانید "+e.maximum+" آیتم را انتخاب نمایید";return t},noResults:function(){return"هیچ نتیجهای یافت نشد"},searching:function(){return"در حال جستجو..."}}}),{define:e.define,require:e.require}})();

@ -1,3 +1,3 @@
/*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/fi",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum;return"Ole hyvä ja anna "+t+" merkkiä vähemmän"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Ole hyvä ja anna "+t+" merkkiä lisää"},loadingMore:function(){return"Ladataan lisää tuloksia…"},maximumSelected:function(e){return"Voit valita ainoastaan "+e.maximum+" kpl"},noResults:function(){return"Ei tuloksia"},searching:function(){}}}),{define:e.define,require:e.require}})();

@ -1,3 +1,3 @@
/*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/fr",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Supprimez "+t+" caractère";return t!==1&&(n+="s"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Saisissez "+t+" caractère";return t!==1&&(n+="s"),n},loadingMore:function(){return"Chargement de résultats supplémentaires…"},maximumSelected:function(e){var t="Vous pouvez seulement sélectionner "+e.maximum+" élément";return e.maximum!==1&&(t+="s"),t},noResults:function(){return"Aucun résultat trouvé"},searching:function(){return"Recherche en cours…"}}}),{define:e.define,require:e.require}})();
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/fr",[],function(){return{errorLoading:function(){return"Les résultats ne peuvent pas être chargés."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Supprimez "+t+" caractère";return t!==1&&(n+="s"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Saisissez "+t+" caractère";return t!==1&&(n+="s"),n},loadingMore:function(){return"Chargement de résultats supplémentaires…"},maximumSelected:function(e){var t="Vous pouvez seulement sélectionner "+e.maximum+" élément";return e.maximum!==1&&(t+="s"),t},noResults:function(){return"Aucun résultat trouvé"},searching:function(){return"Recherche en cours…"}}}),{define:e.define,require:e.require}})();

@ -1,3 +1,3 @@
/*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/gl",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Elimine ";return t===1?n+="un carácter":n+=t+" caracteres",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Engada ";return t===1?n+="un carácter":n+=t+" caracteres",n},loadingMore:function(){return"Cargando máis resultados…"},maximumSelected:function(e){var t="Só pode ";return e.maximum===1?t+="un elemento":t+=e.maximum+" elementos",t},noResults:function(){return"Non se atoparon resultados"},searching:function(){return"Buscando…"}}}),{define:e.define,require:e.require}})();

@ -1,3 +1,3 @@
/*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/he",[],function(){return{errorLoading:function(){return"שגיאה בטעינת התוצאות"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="נא למחוק ";return t===1?n+="תו אחד":n+=t+" תווים",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="נא להכניס ";return t===1?n+="תו אחד":n+=t+" תווים",n+=" או יותר",n},loadingMore:function(){return"טוען תוצאות נוספות…"},maximumSelected:function(e){var t="באפשרותך לבחור עד ";return e.maximum===1?t+="פריט אחד":t+=e.maximum+" פריטים",t},noResults:function(){return"לא נמצאו תוצאות"},searching:function(){return"מחפש…"}}}),{define:e.define,require:e.require}})();

@ -1,3 +1,3 @@
/*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/hi",[],function(){return{errorLoading:function(){return"परिड नहि सक।"},inputTooLong:function(e){var t=e.input.length-e.maximum,n=t+" अकषर क हट";return t>1&&(n=t+" अकषर हट "),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="कपय "+t+" य अधिक अकषर दरज कर";return n},loadingMore:function(){return"अधिक परिम लड ह रह..."},maximumSelected:function(e){var t="आप कवल "+e.maximum+" आइटम क चयन कर सकत";return t},noResults:function(){return"कई परिम नहि"},searching:function(){return"खज रह..."}}}),{define:e.define,require:e.require}})();

@ -1,3 +1,3 @@
/*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/hr",[],function(){function e(e){var t=" "+e+" znak";return e%10<5&&e%10>0&&(e%100<5||e%100>19)?e%10>1&&(t+="a"):t+="ova",t}return{errorLoading:function(){return"Preuzimanje nije uspjelo."},inputTooLong:function(t){var n=t.input.length-t.maximum;return"Unesite "+e(n)},inputTooShort:function(t){var n=t.minimum-t.input.length;return"Unesite još "+e(n)},loadingMore:function(){return"Učitavanje rezultata…"},maximumSelected:function(e){return"Maksimalan broj odabranih stavki je "+e.maximum},noResults:function(){return"Nema rezultata"},searching:function(){return"Pretraga…"}}}),{define:e.define,require:e.require}})();

@ -1,3 +1,3 @@
/*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/hu",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum;return"Túl hosszú. "+t+" karakterrel több, mint kellene."},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Túl rövid. Még "+t+" karakter hiányzik."},loadingMore:function(){return"Töltés…"},maximumSelected:function(e){return"Csak "+e.maximum+" elemet lehet kiválasztani."},noResults:function(){return"Nincs találat."},searching:function(){return"Keresés…"}}}),{define:e.define,require:e.require}})();

@ -1,3 +1,3 @@
/*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/id",[],function(){return{errorLoading:function(){return"Data tidak boleh diambil."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Hapuskan "+t+" huruf"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Masukkan "+t+" huruf lagi"},loadingMore:function(){return"Mengambil data…"},maximumSelected:function(e){return"Anda hanya dapat memilih "+e.maximum+" pilihan"},noResults:function(){return"Tidak ada data yang sesuai"},searching:function(){return"Mencari…"}}}),{define:e.define,require:e.require}})();

@ -1,3 +1,3 @@
/*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/is",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vinsamlegast styttið texta um "+t+" staf";return t<=1?n:n+"i"},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vinsamlegast skrifið "+t+" staf";return t>1&&(n+="i"),n+=" í viðbót",n},loadingMore:function(){return"Sæki fleiri niðurstöður…"},maximumSelected:function(e){return"Þú getur aðeins valið "+e.maximum+" atriði"},noResults:function(){return"Ekkert fannst"},searching:function(){return"Leita…"}}}),{define:e.define,require:e.require}})();

@ -1,3 +1,3 @@
/*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/it",[],function(){return{errorLoading:function(){return"I risultati non possono essere caricati."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Per favore cancella "+t+" caratter";return t!==1?n+="i":n+="e",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Per favore inserisci "+t+" o più caratteri";return n},loadingMore:function(){return"Caricando più risultati…"},maximumSelected:function(e){var t="Puoi selezionare solo "+e.maximum+" element";return e.maximum!==1?t+="i":t+="o",t},noResults:function(){return"Nessun risultato trovato"},searching:function(){return"Sto cercando…"}}}),{define:e.define,require:e.require}})();

@ -1,3 +1,3 @@
/*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ja",[],function(){return{errorLoading:function(){return"結果が読み込まれませんでした"},inputTooLong:function(e){var t=e.input.length-e.maximum,n=t+" 文字を削除してください";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="少なくとも "+t+" 文字を入力してください";return n},loadingMore:function(){return"読み込み中…"},maximumSelected:function(e){var t=e.maximum+" 件しか選択できません";return t},noResults:function(){return"対象が見つかりません"},searching:function(){return"検索しています…"}}}),{define:e.define,require:e.require}})();

@ -0,0 +1,3 @@
/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/km",[],function(){return{errorLoading:function(){return"មនអចទញយកទននយ"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="សមលបចញ "+t+" អកសរ";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="សមបញល"+t+" អកសរ រនជងន";return n},loadingMore:function(){return"កងទញយកទននយបនម..."},maximumSelected:function(e){var t="អនកអចជសរសបនត "+e.maximum+" ជមសប";return t},noResults:function(){return"មនមនលទធផល"},searching:function(){return"កងសងរក..."}}}),{define:e.define,require:e.require}})();

@ -1,3 +1,3 @@
/*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ko",[],function(){return{errorLoading:function(){return"결과를 불러올 수 없습니다."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="너무 깁니다. "+t+" 글자 지워주세요.";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="너무 짧습니다. "+t+" 글자 더 입력해주세요.";return n},loadingMore:function(){return"불러오는 중…"},maximumSelected:function(e){var t="최대 "+e.maximum+"개까지만 선택 가능합니다.";return t},noResults:function(){return"결과가 없습니다."},searching:function(){return"검색 중…"}}}),{define:e.define,require:e.require}})();

@ -1,3 +1,3 @@
/*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/lt",[],function(){function e(e,t,n,r){return e%100>9&&e%100<21||e%10===0?e%10>1?n:r:t}return{inputTooLong:function(t){var n=t.input.length-t.maximum,r="Pašalinkite "+n+" simbol";return r+=e(n,"","ius","į"),r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Įrašykite dar "+n+" simbol";return r+=e(n,"","ius","į"),r},loadingMore:function(){return"Kraunama daugiau rezultatų…"},maximumSelected:function(t){var n="Jūs galite pasirinkti tik "+t.maximum+" element";return n+=e(t.maximum,"ų","us","ą"),n},noResults:function(){return"Atitikmenų nerasta"},searching:function(){return"Ieškoma…"}}}),{define:e.define,require:e.require}})();
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/lt",[],function(){function e(e,t,n,r){return e%10===1&&(e%100<11||e%100>19)?t:e%10>=2&&e%10<=9&&(e%100<11||e%100>19)?n:r}return{inputTooLong:function(t){var n=t.input.length-t.maximum,r="Pašalinkite "+n+" simbol";return r+=e(n,"į","ius",""),r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Įrašykite dar "+n+" simbol";return r+=e(n,"į","ius",""),r},loadingMore:function(){return"Kraunama daugiau rezultatų…"},maximumSelected:function(t){var n="Jūs galite pasirinkti tik "+t.maximum+" element";return n+=e(t.maximum,"ą","us","ų"),n},noResults:function(){return"Atitikmenų nerasta"},searching:function(){return"Ieškoma…"}}}),{define:e.define,require:e.require}})();

@ -1,3 +1,3 @@
/*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/lv",[],function(){function e(e,t,n,r){return e===11?t:e%10===1?n:r}return{inputTooLong:function(t){var n=t.input.length-t.maximum,r="Lūdzu ievadiet par "+n;return r+=" simbol"+e(n,"iem","u","iem"),r+" mazāk"},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Lūdzu ievadiet vēl "+n;return r+=" simbol"+e(n,"us","u","us"),r},loadingMore:function(){return"Datu ielāde…"},maximumSelected:function(t){var n="Jūs varat izvēlēties ne vairāk kā "+t.maximum;return n+=" element"+e(t.maximum,"us","u","us"),n},noResults:function(){return"Sakritību nav"},searching:function(){return"Meklēšana…"}}}),{define:e.define,require:e.require}})();

@ -1,3 +1,3 @@
/*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/mk",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Ве молиме внесете "+e.maximum+" помалку карактер";return e.maximum!==1&&(n+="и"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Ве молиме внесете уште "+e.maximum+" карактер";return e.maximum!==1&&(n+="и"),n},loadingMore:function(){return"Вчитување резултати…"},maximumSelected:function(e){var t="Можете да изберете само "+e.maximum+" ставк";return e.maximum===1?t+="а":t+="и",t},noResults:function(){return"Нема пронајдено совпаѓања"},searching:function(){return"Пребарување…"}}}),{define:e.define,require:e.require}})();

@ -1,3 +1,3 @@
/*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ms",[],function(){return{errorLoading:function(){return"Keputusan tidak berjaya dimuatkan."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Sila hapuskan "+t+" aksara"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Sila masukkan "+t+" atau lebih aksara"},loadingMore:function(){return"Sedang memuatkan keputusan…"},maximumSelected:function(e){return"Anda hanya boleh memilih "+e.maximum+" pilihan"},noResults:function(){return"Tiada padanan yang ditemui"},searching:function(){return"Mencari…"}}}),{define:e.define,require:e.require}})();

@ -1,3 +1,3 @@
/*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/nb",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum;return"Vennligst fjern "+t+" tegn"},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vennligst skriv inn ";return t>1?n+=" flere tegn":n+=" tegn til",n},loadingMore:function(){return"Laster flere resultater…"},maximumSelected:function(e){return"Du kan velge maks "+e.maximum+" elementer"},noResults:function(){return"Ingen treff"},searching:function(){return"Søker…"}}}),{define:e.define,require:e.require}})();
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/nb",[],function(){return{errorLoading:function(){return"Kunne ikke hente resultater."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Vennligst fjern "+t+" tegn"},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vennligst skriv inn ";return t>1?n+=" flere tegn":n+=" tegn til",n},loadingMore:function(){return"Laster flere resultater…"},maximumSelected:function(e){return"Du kan velge maks "+e.maximum+" elementer"},noResults:function(){return"Ingen treff"},searching:function(){return"Søker…"}}}),{define:e.define,require:e.require}})();

@ -1,3 +1,3 @@
/*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/nl",[],function(){return{errorLoading:function(){return"De resultaten konden niet worden geladen."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Gelieve "+t+" karakters te verwijderen";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Gelieve "+t+" of meer karakters in te voeren";return n},loadingMore:function(){return"Meer resultaten laden…"},maximumSelected:function(e){var t=e.maximum==1?"kan":"kunnen",n="Er "+t+" maar "+e.maximum+" item";return e.maximum!=1&&(n+="s"),n+=" worden geselecteerd",n},noResults:function(){return"Geen resultaten gevonden…"},searching:function(){return"Zoeken…"}}}),{define:e.define,require:e.require}})();

@ -1,3 +1,3 @@
/*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/pl",[],function(){var e=["znak","znaki","znaków"],t=["element","elementy","elementów"],n=function(t,n){if(t===1)return n[0];if(t>1&&t<=4)return n[1];if(t>=5)return n[2]};return{errorLoading:function(){return"Nie można załadować wyników."},inputTooLong:function(t){var r=t.input.length-t.maximum;return"Usuń "+r+" "+n(r,e)},inputTooShort:function(t){var r=t.minimum-t.input.length;return"Podaj przynajmniej "+r+" "+n(r,e)},loadingMore:function(){return"Trwa ładowanie…"},maximumSelected:function(e){return"Możesz zaznaczyć tylko "+e.maximum+" "+n(e.maximum,t)},noResults:function(){return"Brak wyników"},searching:function(){return"Trwa wyszukiwanie…"}}}),{define:e.define,require:e.require}})();

@ -1,3 +1,3 @@
/*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/pt-BR",[],function(){return{errorLoading:function(){return"Os resultados não puderam ser carregados."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Apague "+t+" caracter";return t!=1&&(n+="es"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Digite "+t+" ou mais caracteres";return n},loadingMore:function(){return"Carregando mais resultados…"},maximumSelected:function(e){var t="Você só pode selecionar "+e.maximum+" ite";return e.maximum==1?t+="m":t+="ns",t},noResults:function(){return"Nenhum resultado encontrado"},searching:function(){return"Buscando…"}}}),{define:e.define,require:e.require}})();

@ -1,3 +1,3 @@
/*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/pt",[],function(){return{errorLoading:function(){return"Os resultados não puderam ser carregados."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Por favor apague "+t+" ";return n+=t!=1?"caracteres":"carácter",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Introduza "+t+" ou mais caracteres";return n},loadingMore:function(){return"A carregar mais resultados…"},maximumSelected:function(e){var t="Apenas pode seleccionar "+e.maximum+" ";return t+=e.maximum!=1?"itens":"item",t},noResults:function(){return"Sem resultados"},searching:function(){return"A procurar…"}}}),{define:e.define,require:e.require}})();

@ -1,3 +1,3 @@
/*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ro",[],function(){return{errorLoading:function(){return"Rezultatele nu au putut fi incărcate."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vă rugăm să ștergeți"+t+" caracter";return t!==1&&(n+="e"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vă rugăm să introduceți "+t+"sau mai multe caractere";return n},loadingMore:function(){return"Se încarcă mai multe rezultate…"},maximumSelected:function(e){var t="Aveți voie să selectați cel mult "+e.maximum;return t+=" element",e.maximum!==1&&(t+="e"),t},noResults:function(){return"Nu au fost găsite rezultate"},searching:function(){return"Căutare…"}}}),{define:e.define,require:e.require}})();

@ -1,3 +1,3 @@
/*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ru",[],function(){function e(e,t,n,r){return e%10<5&&e%10>0&&e%100<5||e%100>20?e%10>1?n:t:r}return{errorLoading:function(){return"Невозможно загрузить результаты"},inputTooLong:function(t){var n=t.input.length-t.maximum,r="Пожалуйста, введите на "+n+" символ";return r+=e(n,"","a","ов"),r+=" меньше",r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Пожалуйста, введите еще хотя бы "+n+" символ";return r+=e(n,"","a","ов"),r},loadingMore:function(){return"Загрузка данных…"},maximumSelected:function(t){var n="Вы можете выбрать не более "+t.maximum+" элемент";return n+=e(t.maximum,"","a","ов"),n},noResults:function(){return"Совпадений не найдено"},searching:function(){return"Поиск…"}}}),{define:e.define,require:e.require}})();

@ -1,3 +1,3 @@
/*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sk",[],function(){var e={2:function(e){return e?"dva":"dve"},3:function(){return"tri"},4:function(){return"štyri"}};return{inputTooLong:function(t){var n=t.input.length-t.maximum;return n==1?"Prosím, zadajte o jeden znak menej":n>=2&&n<=4?"Prosím, zadajte o "+e[n](!0)+" znaky menej":"Prosím, zadajte o "+n+" znakov menej"},inputTooShort:function(t){var n=t.minimum-t.input.length;return n==1?"Prosím, zadajte ešte jeden znak":n<=4?"Prosím, zadajte ešte ďalšie "+e[n](!0)+" znaky":"Prosím, zadajte ešte ďalších "+n+" znakov"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(t){return t.maximum==1?"Môžete zvoliť len jednu položku":t.maximum>=2&&t.maximum<=4?"Môžete zvoliť najviac "+e[t.maximum](!1)+" položky":"Môžete zvoliť najviac "+t.maximum+" položiek"},noResults:function(){return"Nenašli sa žiadne položky"},searching:function(){return"Vyhľadávanie…"}}}),{define:e.define,require:e.require}})();

@ -1,3 +1,3 @@
/*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sr-Cyrl",[],function(){function e(e,t,n,r){return e%10==1&&e%100!=11?t:e%10>=2&&e%10<=4&&(e%100<12||e%100>14)?n:r}return{errorLoading:function(){return"Преузимање није успело."},inputTooLong:function(t){var n=t.input.length-t.maximum,r="Обришите "+n+" симбол";return r+=e(n,"","а","а"),r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Укуцајте бар још "+n+" симбол";return r+=e(n,"","а","а"),r},loadingMore:function(){return"Преузимање још резултата…"},maximumSelected:function(t){var n="Можете изабрати само "+t.maximum+" ставк";return n+=e(t.maximum,"у","е","и"),n},noResults:function(){return"Ништа није пронађено"},searching:function(){return"Претрага…"}}}),{define:e.define,require:e.require}})();

@ -1,3 +1,3 @@
/*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sr",[],function(){function e(e,t,n,r){return e%10==1&&e%100!=11?t:e%10>=2&&e%10<=4&&(e%100<12||e%100>14)?n:r}return{errorLoading:function(){return"Preuzimanje nije uspelo."},inputTooLong:function(t){var n=t.input.length-t.maximum,r="Obrišite "+n+" simbol";return r+=e(n,"","a","a"),r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Ukucajte bar još "+n+" simbol";return r+=e(n,"","a","a"),r},loadingMore:function(){return"Preuzimanje još rezultata…"},maximumSelected:function(t){var n="Možete izabrati samo "+t.maximum+" stavk";return n+=e(t.maximum,"u","e","i"),n},noResults:function(){return"Ništa nije pronađeno"},searching:function(){return"Pretraga…"}}}),{define:e.define,require:e.require}})();

@ -1,3 +1,3 @@
/*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sv",[],function(){return{errorLoading:function(){return"Resultat kunde inte laddas."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vänligen sudda ut "+t+" tecken";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vänligen skriv in "+t+" eller fler tecken";return n},loadingMore:function(){return"Laddar fler resultat…"},maximumSelected:function(e){var t="Du kan max välja "+e.maximum+" element";return t},noResults:function(){return"Inga träffar"},searching:function(){return"Söker…"}}}),{define:e.define,require:e.require}})();

@ -1,3 +1,3 @@
/*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/th",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="โปรดลบออก "+t+" ตวอกษร";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="โปรดพมพเพมอก "+t+" ตวอกษร";return n},loadingMore:function(){return"กำลงคนขอมลเพม…"},maximumSelected:function(e){var t="คณสามารถเลอกไดไมเกน "+e.maximum+" รายการ";return t},noResults:function(){return"ไมพบขอมล"},searching:function(){return"กำลงคนขอมล…"}}}),{define:e.define,require:e.require}})();

@ -1,3 +1,3 @@
/*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/tr",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n=t+" karakter daha girmelisiniz";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="En az "+t+" karakter daha girmelisiniz";return n},loadingMore:function(){return"Daha fazla…"},maximumSelected:function(e){var t="Sadece "+e.maximum+" seçim yapabilirsiniz";return t},noResults:function(){return"Sonuç bulunamadı"},searching:function(){return"Aranıyor…"}}}),{define:e.define,require:e.require}})();

@ -1,3 +1,3 @@
/*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/uk",[],function(){function e(e,t,n,r){return e%100>10&&e%100<15?r:e%10===1?t:e%10>1&&e%10<5?n:r}return{errorLoading:function(){return"Неможливо завантажити результати"},inputTooLong:function(t){var n=t.input.length-t.maximum;return"Будь ласка, видаліть "+n+" "+e(t.maximum,"літеру","літери","літер")},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Будь ласка, введіть "+t+" або більше літер"},loadingMore:function(){return"Завантаження інших результатів…"},maximumSelected:function(t){return"Ви можете вибрати лише "+t.maximum+" "+e(t.maximum,"пункт","пункти","пунктів")},noResults:function(){return"Нічого не знайдено"},searching:function(){return"Пошук…"}}}),{define:e.define,require:e.require}})();

@ -1,3 +1,3 @@
/*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/vi",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vui lòng nhập ít hơn "+t+" ký tự";return t!=1&&(n+="s"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vui lòng nhập nhiều hơn "+t+' ký tự"';return n},loadingMore:function(){return"Đang lấy thêm kết quả…"},maximumSelected:function(e){var t="Chỉ có thể chọn được "+e.maximum+" lựa chọn";return t},noResults:function(){return"Không tìm thấy kết quả"},searching:function(){return"Đang tìm…"}}}),{define:e.define,require:e.require}})();

@ -1,3 +1,3 @@
/*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/zh-CN",[],function(){return{errorLoading:function(){return"无法载入结果。"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="请删除"+t+"个字符";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="请再输入至少"+t+"个字符";return n},loadingMore:function(){return"载入更多结果…"},maximumSelected:function(e){var t="最多只能选择"+e.maximum+"个项目";return t},noResults:function(){return"未找到结果"},searching:function(){return"搜索中…"}}}),{define:e.define,require:e.require}})();

@ -1,3 +1,3 @@
/*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/zh-TW",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="請刪掉"+t+"個字元";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="請再輸入"+t+"個字元";return n},loadingMore:function(){return"載入中…"},maximumSelected:function(e){var t="你只能選擇最多"+e.maximum+"項";return t},noResults:function(){return"沒有找到相符的項目"},searching:function(){return"搜尋中…"}}}),{define:e.define,require:e.require}})();

@ -1,5 +1,5 @@
/*!
* Select2 4.0.2
* Select2 4.0.3
* https://select2.github.io
*
* Released under the MIT license
@ -606,9 +606,23 @@ S2.define('select2/utils',[
Observable.prototype.trigger = function (event) {
var slice = Array.prototype.slice;
var params = slice.call(arguments, 1);
this.listeners = this.listeners || {};
// Params should always come in as an array
if (params == null) {
params = [];
}
// If there are no arguments to the event, use a temporary object
if (params.length === 0) {
params.push({});
}
// Set the `_type` of the first object to the event
params[0]._type = event;
if (event in this.listeners) {
this.invoke(this.listeners[event], slice.call(arguments, 1));
}
@ -842,6 +856,25 @@ S2.define('select2/results',[
return sorter(data);
};
Results.prototype.highlightFirstItem = function () {
var $options = this.$results
.find('.select2-results__option[aria-selected]');
var $selected = $options.filter('[aria-selected=true]');
// Check if there are any selected options
if ($selected.length > 0) {
// If there are selected options, highlight the first
$selected.first().trigger('mouseenter');
} else {
// If there are no selected options, highlight the first option
// in the dropdown
$options.first().trigger('mouseenter');
}
this.ensureHighlightVisible();
};
Results.prototype.setClasses = function () {
var self = this;
@ -869,17 +902,6 @@ S2.define('select2/results',[
}
});
var $selected = $options.filter('[aria-selected=true]');
// Check if there are any selected options
if ($selected.length > 0) {
// If there are selected options, highlight the first
$selected.first().trigger('mouseenter');
} else {
// If there are no selected options, highlight the first option
// in the dropdown
$options.first().trigger('mouseenter');
}
});
};
@ -990,6 +1012,7 @@ S2.define('select2/results',[
if (container.isOpen()) {
self.setClasses();
self.highlightFirstItem();
}
});
@ -1012,6 +1035,7 @@ S2.define('select2/results',[
}
self.setClasses();
self.highlightFirstItem();
});
container.on('unselect', function () {
@ -1020,6 +1044,7 @@ S2.define('select2/results',[
}
self.setClasses();
self.highlightFirstItem();
});
container.on('open', function () {
@ -1497,6 +1522,12 @@ S2.define('select2/selection/single',[
// User exits the container
});
container.on('focus', function (evt) {
if (!container.isOpen()) {
self.$selection.focus();
}
});
container.on('selection:update', function (params) {
self.update(params.data);
});
@ -3436,6 +3467,12 @@ S2.define('select2/data/ajax',[
callback(results);
}, function () {
// Attempt to detect if a request was aborted
// Only works if the transport exposes a status property
if ($request.status && $request.status === '0') {
return;
}
self.trigger('results:message', {
message: 'errorLoading'
});
@ -3444,7 +3481,7 @@ S2.define('select2/data/ajax',[
self._request = $request;
}
if (this.ajaxOptions.delay && params.term !== '') {
if (this.ajaxOptions.delay && params.term != null) {
if (this._queryTimeout) {
window.clearTimeout(this._queryTimeout);
}
@ -3607,6 +3644,29 @@ S2.define('select2/data/tokenizer',[
Tokenizer.prototype.query = function (decorated, params, callback) {
var self = this;
function createAndSelect (data) {
// Normalize the data object so we can use it for checks
var item = self._normalizeItem(data);
// Check if the data object already exists as a tag
// Select it if it doesn't
var $existingOptions = self.$element.find('option').filter(function () {
return $(this).val() === item.id;
});
// If an existing option wasn't found for it, create the option
if (!$existingOptions.length) {
var $option = self.option(item);
$option.attr('data-select2-tag', true);
self._removeOldTags();
self.addOptions([$option]);
}
// Select the item, now that we know there is an option for it
select(item);
}
function select (data) {
self.trigger('select', {
data: data
@ -3615,7 +3675,7 @@ S2.define('select2/data/tokenizer',[
params.term = params.term || '';
var tokenData = this.tokenizer(params, this.options, select);
var tokenData = this.tokenizer(params, this.options, createAndSelect);
if (tokenData.term !== params.term) {
// Replace the search term if we have the search box
@ -3880,6 +3940,12 @@ S2.define('select2/dropdown/search',[
self.$search.val('');
});
container.on('focus', function () {
if (container.isOpen()) {
self.$search.focus();
}
});
container.on('results:all', function (params) {
if (params.query.term == null || params.query.term === '') {
var showSearch = self.showSearch(params);
@ -4229,7 +4295,7 @@ S2.define('select2/dropdown/attachBody',[
if (newDirection == 'above' ||
(isCurrentlyAbove && newDirection !== 'below')) {
css.top = container.top - dropdown.height;
css.top = container.top - parentOffset.top - dropdown.height;
}
if (newDirection != null) {
@ -4251,6 +4317,7 @@ S2.define('select2/dropdown/attachBody',[
if (this.options.get('dropdownAutoWidth')) {
css.minWidth = css.width;
css.position = 'relative';
css.width = 'auto';
}
@ -4317,12 +4384,22 @@ S2.define('select2/dropdown/selectOnClose',[
decorated.call(this, container, $container);
container.on('close', function () {
self._handleSelectOnClose();
container.on('close', function (params) {
self._handleSelectOnClose(params);
});
};
SelectOnClose.prototype._handleSelectOnClose = function () {
SelectOnClose.prototype._handleSelectOnClose = function (_, params) {
if (params && params.originalSelect2Event != null) {
var event = params.originalSelect2Event;
// Don't select an item if the close event was triggered from a select or
// unselect event
if (event._type === 'select' || event._type === 'unselect') {
return;
}
}
var $highlightedResults = this.getHighlightedResults();
// Only select highlighted results
@ -4375,7 +4452,10 @@ S2.define('select2/dropdown/closeOnSelect',[
return;
}
this.trigger('close', {});
this.trigger('close', {
originalEvent: originalEvent,
originalSelect2Event: evt
});
};
return CloseOnSelect;
@ -5129,10 +5209,15 @@ S2.define('select2/core',[
});
});
this._sync = Utils.bind(this._syncAttributes, this);
this.$element.on('focus.select2', function (evt) {
self.trigger('focus', evt);
});
this._syncA = Utils.bind(this._syncAttributes, this);
this._syncS = Utils.bind(this._syncSubtree, this);
if (this.$element[0].attachEvent) {
this.$element[0].attachEvent('onpropertychange', this._sync);
this.$element[0].attachEvent('onpropertychange', this._syncA);
}
var observer = window.MutationObserver ||
@ -5142,14 +5227,30 @@ S2.define('select2/core',[
if (observer != null) {
this._observer = new observer(function (mutations) {
$.each(mutations, self._sync);
$.each(mutations, self._syncA);
$.each(mutations, self._syncS);
});
this._observer.observe(this.$element[0], {
attributes: true,
childList: true,
subtree: false
});
} else if (this.$element[0].addEventListener) {
this.$element[0].addEventListener('DOMAttrModified', self._sync, false);
this.$element[0].addEventListener(
'DOMAttrModified',
self._syncA,
false
);
this.$element[0].addEventListener(
'DOMNodeInserted',
self._syncS,
false
);
this.$element[0].addEventListener(
'DOMNodeRemoved',
self._syncS,
false
);
}
};
@ -5294,6 +5395,46 @@ S2.define('select2/core',[
}
};
Select2.prototype._syncSubtree = function (evt, mutations) {
var changed = false;
var self = this;
// Ignore any mutation events raised for elements that aren't options or
// optgroups. This handles the case when the select element is destroyed
if (
evt && evt.target && (
evt.target.nodeName !== 'OPTION' && evt.target.nodeName !== 'OPTGROUP'
)
) {
return;
}
if (!mutations) {
// If mutation events aren't supported, then we can only assume that the
// change affected the selections
changed = true;
} else if (mutations.addedNodes && mutations.addedNodes.length > 0) {
for (var n = 0; n < mutations.addedNodes.length; n++) {
var node = mutations.addedNodes[n];
if (node.selected) {
changed = true;
}
}
} else if (mutations.removedNodes && mutations.removedNodes.length > 0) {
changed = true;
}
// Only re-pull the data if we think there is a change
if (changed) {
this.dataAdapter.current(function (currentData) {
self.trigger('selection:update', {
data: currentData
});
});
}
};
/**
* Override the trigger method to automatically trigger pre-events when
* there are events that can be prevented.
@ -5440,7 +5581,7 @@ S2.define('select2/core',[
this.$container.remove();
if (this.$element[0].detachEvent) {
this.$element[0].detachEvent('onpropertychange', this._sync);
this.$element[0].detachEvent('onpropertychange', this._syncA);
}
if (this._observer != null) {
@ -5448,10 +5589,15 @@ S2.define('select2/core',[
this._observer = null;
} else if (this.$element[0].removeEventListener) {
this.$element[0]
.removeEventListener('DOMAttrModified', this._sync, false);
.removeEventListener('DOMAttrModified', this._syncA, false);
this.$element[0]
.removeEventListener('DOMNodeInserted', this._syncS, false);
this.$element[0]
.removeEventListener('DOMNodeRemoved', this._syncS, false);
}
this._sync = null;
this._syncA = null;
this._syncS = null;
this.$element.off('.select2');
this.$element.attr('tabindex', this.$element.data('old-tabindex'));
@ -6235,6 +6381,7 @@ S2.define('jquery.select2',[
return this;
} else if (typeof options === 'string') {
var ret;
var args = Array.prototype.slice.call(arguments, 1);
this.each(function () {
var instance = $(this).data('select2');
@ -6246,8 +6393,6 @@ S2.define('jquery.select2',[
);
}
var args = Array.prototype.slice.call(arguments, 1);
ret = instance[options].apply(instance, args);
});

File diff suppressed because one or more lines are too long

@ -1,5 +1,5 @@
/*!
* Select2 4.0.2
* Select2 4.0.3
* https://select2.github.io
*
* Released under the MIT license
@ -606,9 +606,23 @@ S2.define('select2/utils',[
Observable.prototype.trigger = function (event) {
var slice = Array.prototype.slice;
var params = slice.call(arguments, 1);
this.listeners = this.listeners || {};
// Params should always come in as an array
if (params == null) {
params = [];
}
// If there are no arguments to the event, use a temporary object
if (params.length === 0) {
params.push({});
}
// Set the `_type` of the first object to the event
params[0]._type = event;
if (event in this.listeners) {
this.invoke(this.listeners[event], slice.call(arguments, 1));
}
@ -842,6 +856,25 @@ S2.define('select2/results',[
return sorter(data);
};
Results.prototype.highlightFirstItem = function () {
var $options = this.$results
.find('.select2-results__option[aria-selected]');
var $selected = $options.filter('[aria-selected=true]');
// Check if there are any selected options
if ($selected.length > 0) {
// If there are selected options, highlight the first
$selected.first().trigger('mouseenter');
} else {
// If there are no selected options, highlight the first option
// in the dropdown
$options.first().trigger('mouseenter');
}
this.ensureHighlightVisible();
};
Results.prototype.setClasses = function () {
var self = this;
@ -869,17 +902,6 @@ S2.define('select2/results',[
}
});
var $selected = $options.filter('[aria-selected=true]');
// Check if there are any selected options
if ($selected.length > 0) {
// If there are selected options, highlight the first
$selected.first().trigger('mouseenter');
} else {
// If there are no selected options, highlight the first option
// in the dropdown
$options.first().trigger('mouseenter');
}
});
};
@ -990,6 +1012,7 @@ S2.define('select2/results',[
if (container.isOpen()) {
self.setClasses();
self.highlightFirstItem();
}
});
@ -1012,6 +1035,7 @@ S2.define('select2/results',[
}
self.setClasses();
self.highlightFirstItem();
});
container.on('unselect', function () {
@ -1020,6 +1044,7 @@ S2.define('select2/results',[
}
self.setClasses();
self.highlightFirstItem();
});
container.on('open', function () {
@ -1497,6 +1522,12 @@ S2.define('select2/selection/single',[
// User exits the container
});
container.on('focus', function (evt) {
if (!container.isOpen()) {
self.$selection.focus();
}
});
container.on('selection:update', function (params) {
self.update(params.data);
});
@ -3436,6 +3467,12 @@ S2.define('select2/data/ajax',[
callback(results);
}, function () {
// Attempt to detect if a request was aborted
// Only works if the transport exposes a status property
if ($request.status && $request.status === '0') {
return;
}
self.trigger('results:message', {
message: 'errorLoading'
});
@ -3444,7 +3481,7 @@ S2.define('select2/data/ajax',[
self._request = $request;
}
if (this.ajaxOptions.delay && params.term !== '') {
if (this.ajaxOptions.delay && params.term != null) {
if (this._queryTimeout) {
window.clearTimeout(this._queryTimeout);
}
@ -3607,6 +3644,29 @@ S2.define('select2/data/tokenizer',[
Tokenizer.prototype.query = function (decorated, params, callback) {
var self = this;
function createAndSelect (data) {
// Normalize the data object so we can use it for checks
var item = self._normalizeItem(data);
// Check if the data object already exists as a tag
// Select it if it doesn't
var $existingOptions = self.$element.find('option').filter(function () {
return $(this).val() === item.id;
});
// If an existing option wasn't found for it, create the option
if (!$existingOptions.length) {
var $option = self.option(item);
$option.attr('data-select2-tag', true);
self._removeOldTags();
self.addOptions([$option]);
}
// Select the item, now that we know there is an option for it
select(item);
}
function select (data) {
self.trigger('select', {
data: data
@ -3615,7 +3675,7 @@ S2.define('select2/data/tokenizer',[
params.term = params.term || '';
var tokenData = this.tokenizer(params, this.options, select);
var tokenData = this.tokenizer(params, this.options, createAndSelect);
if (tokenData.term !== params.term) {
// Replace the search term if we have the search box
@ -3880,6 +3940,12 @@ S2.define('select2/dropdown/search',[
self.$search.val('');
});
container.on('focus', function () {
if (container.isOpen()) {
self.$search.focus();
}
});
container.on('results:all', function (params) {
if (params.query.term == null || params.query.term === '') {
var showSearch = self.showSearch(params);
@ -4229,7 +4295,7 @@ S2.define('select2/dropdown/attachBody',[
if (newDirection == 'above' ||
(isCurrentlyAbove && newDirection !== 'below')) {
css.top = container.top - dropdown.height;
css.top = container.top - parentOffset.top - dropdown.height;
}
if (newDirection != null) {
@ -4251,6 +4317,7 @@ S2.define('select2/dropdown/attachBody',[
if (this.options.get('dropdownAutoWidth')) {
css.minWidth = css.width;
css.position = 'relative';
css.width = 'auto';
}
@ -4317,12 +4384,22 @@ S2.define('select2/dropdown/selectOnClose',[
decorated.call(this, container, $container);
container.on('close', function () {
self._handleSelectOnClose();
container.on('close', function (params) {
self._handleSelectOnClose(params);
});
};
SelectOnClose.prototype._handleSelectOnClose = function () {
SelectOnClose.prototype._handleSelectOnClose = function (_, params) {
if (params && params.originalSelect2Event != null) {
var event = params.originalSelect2Event;
// Don't select an item if the close event was triggered from a select or
// unselect event
if (event._type === 'select' || event._type === 'unselect') {
return;
}
}
var $highlightedResults = this.getHighlightedResults();
// Only select highlighted results
@ -4375,7 +4452,10 @@ S2.define('select2/dropdown/closeOnSelect',[
return;
}
this.trigger('close', {});
this.trigger('close', {
originalEvent: originalEvent,
originalSelect2Event: evt
});
};
return CloseOnSelect;
@ -5129,10 +5209,15 @@ S2.define('select2/core',[
});
});
this._sync = Utils.bind(this._syncAttributes, this);
this.$element.on('focus.select2', function (evt) {
self.trigger('focus', evt);
});
this._syncA = Utils.bind(this._syncAttributes, this);
this._syncS = Utils.bind(this._syncSubtree, this);
if (this.$element[0].attachEvent) {
this.$element[0].attachEvent('onpropertychange', this._sync);
this.$element[0].attachEvent('onpropertychange', this._syncA);
}
var observer = window.MutationObserver ||
@ -5142,14 +5227,30 @@ S2.define('select2/core',[
if (observer != null) {
this._observer = new observer(function (mutations) {
$.each(mutations, self._sync);
$.each(mutations, self._syncA);
$.each(mutations, self._syncS);
});
this._observer.observe(this.$element[0], {
attributes: true,
childList: true,
subtree: false
});
} else if (this.$element[0].addEventListener) {
this.$element[0].addEventListener('DOMAttrModified', self._sync, false);
this.$element[0].addEventListener(
'DOMAttrModified',
self._syncA,
false
);
this.$element[0].addEventListener(
'DOMNodeInserted',
self._syncS,
false
);
this.$element[0].addEventListener(
'DOMNodeRemoved',
self._syncS,
false
);
}
};
@ -5294,6 +5395,46 @@ S2.define('select2/core',[
}
};
Select2.prototype._syncSubtree = function (evt, mutations) {
var changed = false;
var self = this;
// Ignore any mutation events raised for elements that aren't options or
// optgroups. This handles the case when the select element is destroyed
if (
evt && evt.target && (
evt.target.nodeName !== 'OPTION' && evt.target.nodeName !== 'OPTGROUP'
)
) {
return;
}
if (!mutations) {
// If mutation events aren't supported, then we can only assume that the
// change affected the selections
changed = true;
} else if (mutations.addedNodes && mutations.addedNodes.length > 0) {
for (var n = 0; n < mutations.addedNodes.length; n++) {
var node = mutations.addedNodes[n];
if (node.selected) {
changed = true;
}
}
} else if (mutations.removedNodes && mutations.removedNodes.length > 0) {
changed = true;
}
// Only re-pull the data if we think there is a change
if (changed) {
this.dataAdapter.current(function (currentData) {
self.trigger('selection:update', {
data: currentData
});
});
}
};
/**
* Override the trigger method to automatically trigger pre-events when
* there are events that can be prevented.
@ -5440,7 +5581,7 @@ S2.define('select2/core',[
this.$container.remove();
if (this.$element[0].detachEvent) {
this.$element[0].detachEvent('onpropertychange', this._sync);
this.$element[0].detachEvent('onpropertychange', this._syncA);
}
if (this._observer != null) {
@ -5448,10 +5589,15 @@ S2.define('select2/core',[
this._observer = null;
} else if (this.$element[0].removeEventListener) {
this.$element[0]
.removeEventListener('DOMAttrModified', this._sync, false);
.removeEventListener('DOMAttrModified', this._syncA, false);
this.$element[0]
.removeEventListener('DOMNodeInserted', this._syncS, false);
this.$element[0]
.removeEventListener('DOMNodeRemoved', this._syncS, false);
}
this._sync = null;
this._syncA = null;
this._syncS = null;
this.$element.off('.select2');
this.$element.attr('tabindex', this.$element.data('old-tabindex'));
@ -5524,6 +5670,7 @@ S2.define('jquery.select2',[
return this;
} else if (typeof options === 'string') {
var ret;
var args = Array.prototype.slice.call(arguments, 1);
this.each(function () {
var instance = $(this).data('select2');
@ -5535,8 +5682,6 @@ S2.define('jquery.select2',[
);
}
var args = Array.prototype.slice.call(arguments, 1);
ret = instance[options].apply(instance, args);
});

File diff suppressed because one or more lines are too long

@ -59,6 +59,39 @@ $(".js-example-basic-multiple").select2();
<option value="WY">Wyoming</option>
</select>
{% endhighlight %}
</section>
</section>
<h2>Select boxes with labels</h2>
<p>
You can, and should, use a <code>&lt;label&gt;</code> with Select2, just like any other <code>&lt;select&gt</code> element.
</p>
<div class="s2-example">
<p>
<label for="id_label_single">
Click this to highlight the single select element
<select class="js-example-basic-single js-states form-control" id="id_label_single"></select>
</label>
</p>
<p>
<label for="id_label_multiple">
Click this to highlight the multiple select element
<select class="js-example-basic-multiple js-states form-control" id="id_label_multiple" multiple="multiple"></select>
</label>
</p>
</div>
{% highlight html linenos %}
<label for="id_label_single">
Click this to highlight the single select element
<select class="js-example-basic-single js-states form-control" id="id_label_single"></select>
</label>
<label for="id_label_multiple">
Click this to highlight the multiple select element
<select class="js-example-basic-multiple js-states form-control" id="id_label_multiple" multiple="multiple"></select>
</label>
{% endhighlight %}
</section>

@ -8,7 +8,7 @@
Maintained by <a href="https://github.com/kevin-brown">Kevin Brown</a> and <a href="https://github.com/ivaynberg">Igor Vaynberg</a> with the help of <a href="https://github.com/select2/select2/graphs/contributors">our contributors</a>.
</p>
<ul class="s2-docs-footer-links">
<li>Currently v4.0.2</li>
<li>Currently v4.0.3</li>
<li><a href="https://github.com/select2/select2">GitHub</a></li>
<li><a href="./examples.html">Examples</a></li>
<li><a href="./options.html">Options</a></li>

@ -2,6 +2,18 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="apple-touch-icon" sizes="57x57" href="/images/apple-touch-icon-57x57.png?v=699Nxpjr2A">
<link rel="apple-touch-icon" sizes="60x60" href="/images/apple-touch-icon-60x60.png?v=699Nxpjr2A">
<link rel="apple-touch-icon" sizes="72x72" href="/images/apple-touch-icon-72x72.png?v=699Nxpjr2A">
<link rel="icon" type="image/png" href="/images/favicon-32x32.png?v=699Nxpjr2A" sizes="32x32">
<link rel="icon" type="image/png" href="/images/favicon-16x16.png?v=699Nxpjr2A" sizes="16x16">
<link rel="manifest" href="/images/manifest.json?v=699Nxpjr2A">
<link rel="mask-icon" href="/images/safari-pinned-tab.svg?v=699Nxpjr2A" color="#F6F6F6">
<link rel="shortcut icon" href="/images/favicon.ico?v=699Nxpjr2A">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="msapplication-config" content="/browserconfig.xml?v=699Nxpjr2A">
<meta name="theme-color" content="#f6f6f6">
<title>
{{ page.title }}
</title>

@ -63,6 +63,36 @@ $('select').select2({
This will tell Select2 to wait 250 milliseconds before sending the request out to your API.
</p>
<h3>
How do I tell Select2 which URL to get the results from?
</h3>
<p>
When connecting Select2 to a remote data source, you have the option of using either a single endpoint (a single page which handles all requests) or a dynamic endpoint (one of many pages). You can point Select2 to a single endpoint during initialization by specifying a string for the <code>ajax.url</code> option.
</p>
{% highlight js linenos %}
$('select').select2({
ajax: {
url: '/path/to/search/endpoint'
}
});
{% endhighlight %}
<p>
If there isn't a single url for your search results, or you need to call a function to determine the url to use, you can specify a function for the <code>ajax.url</code> option, and this will be used instead. The query parameters will be passed in through the <code>params</code> option.
</p>
{% highlight js linenos %}
$('select').select2({
ajax: {
url: function (params) {
return '/some/url/' + params.term;
}
}
});
{% endhighlight %}
<h3>
I want to add more query parameters to the request, where can this be done?
</h3>
@ -87,6 +117,14 @@ $('select').select2({
});
{% endhighlight %}
<h3>
The results that I am seeing never change
</h3>
<p>
Select2 expects that the results that are returned from the remote endpoint are already filtered ahead of time based on the search term. If your remote endpoint just returns the list of all possible options, you may be interested in using Select2's <a href="examples.html#data-array">support for data arrays</a>.
</p>
<h3>
Can an AJAX plugin other than <code>jQuery.ajax</code> be used?
</h3>

@ -25,6 +25,10 @@ $('select').select2({
I&apos;m using a Bootstrap modal and I can&apos;t use the search box
</h3>
<p>
Use the <code>dropdownParent</code> option, setting it to the modal.
</p>
{% include options/not-written.html %}
<h3>

@ -19,18 +19,57 @@ $('select').select2({
Does tagging work with a single select?
</h3>
<p>
Yes.
</p>
{% include options/not-written.html %}
<h3>
How do I add extra properties to the tag?
</h3>
{% highlight js linenos %}
$('select').select2({
createTag: function (params) {
var term = $.trim(params.term);
if (term === '') {
return null;
}
return {
id: term,
text: term,
newTag: true // add additional parameters
}
}
});
{% endhighlight %}
{% include options/not-written.html %}
<h3>
Can I control when tags are created?
</h3>
{% highlight js linenos %}
$('select').select2({
createTag: function (params) {
// Don't offset to create a tag if there is no @ symbol
if (params.term.indexOf('@') === -1) {
// Return null to disable tag creation
return null;
}
return {
id: params.term,
text: params.term
}
}
});
{% endhighlight %}
{% include options/not-written.html %}
<h3>

@ -40,10 +40,22 @@
<dd>Triggered before a selection is removed. This event can be prevented.</dd>
</dl>
<h3>
Does Select2 include extra information in these events?
</h3>
{% include options/not-written.html %}
<h3>
How can I attach listeners for these events?
</h3>
{% highlight js linenos %}
$('select').on('select2:select', function (evt) {
// Do something
});
{% endhighlight %}
{% include options/not-written.html %}
<h3>

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<browserconfig>
<msapplication>
<tile>
<square70x70logo src="/images/mstile-70x70.png?v=699Nxpjr2A"/>
<square150x150logo src="/images/mstile-150x150.png?v=699Nxpjr2A"/>
<wide310x150logo src="/images/mstile-310x150.png?v=699Nxpjr2A"/>
<TileColor>#da532c</TileColor>
</tile>
</msapplication>
</browserconfig>

Binary file not shown.

After

Width:  |  Height:  |  Size: 916 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 655 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

@ -0,0 +1,23 @@
{
"name": "Select2",
"icons": [
{
"src": "\/images\/android-chrome-36x36.png?v=699Nxpjr2A",
"sizes": "36x36",
"type": "image\/png",
"density": 0.75
},
{
"src": "\/images\/android-chrome-48x48.png?v=699Nxpjr2A",
"sizes": "48x48",
"type": "image\/png",
"density": 1
},
{
"src": "\/images\/android-chrome-72x72.png?v=699Nxpjr2A",
"sizes": "72x72",
"type": "image\/png",
"density": 1.5
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

@ -0,0 +1,17 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
width="72.000000pt" height="72.000000pt" viewBox="0 0 72.000000 72.000000"
preserveAspectRatio="xMidYMid meet">
<metadata>
Created by potrace 1.11, written by Peter Selinger 2001-2013
</metadata>
<g transform="translate(0.000000,72.000000) scale(0.100000,-0.100000)"
fill="#000000" stroke="none">
<path d="M177 598 l-179 -120 86 -57 c47 -31 86 -59 86 -63 0 -3 -39 -32 -86
-63 l-86 -58 181 -119 181 -119 181 122 180 121 -82 54 c-46 30 -84 56 -86 58
-3 2 21 21 52 42 31 22 70 49 86 61 l30 21 -180 121 c-99 67 -181 121 -183
120 -2 0 -83 -54 -181 -121z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 771 B

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save