ns-styleguide 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (205) hide show
  1. checksums.yaml +7 -0
  2. data/style-guide/_style-guide.scss +4 -0
  3. data/style-guide/global/_base.scss +33 -0
  4. data/style-guide/global/_colors.scss +24 -0
  5. data/style-guide/global/_extendables.scss +16 -0
  6. data/style-guide/global/_functions.scss +5 -0
  7. data/style-guide/global/_mixins.scss +5 -0
  8. data/style-guide/global/_variables.scss +15 -0
  9. data/templates/project/assets/6.jpg +0 -0
  10. data/templates/project/assets/_nsfont/_comment.svg +8 -0
  11. data/templates/project/assets/_nsfont/_default-user.svg +12 -0
  12. data/templates/project/assets/_nsfont/_home.svg +12 -0
  13. data/templates/project/assets/_nsfont/_notify.svg +13 -0
  14. data/templates/project/assets/_nsfont/_pillbox.svg +27 -0
  15. data/templates/project/assets/_nsfont/_search.svg +12 -0
  16. data/templates/project/assets/_nsfont/bs-circulatory.svg +26 -0
  17. data/templates/project/assets/_nsfont/bs-digestive.svg +28 -0
  18. data/templates/project/assets/_nsfont/bs-endocrine.svg +33 -0
  19. data/templates/project/assets/_nsfont/bs-immune.svg +31 -0
  20. data/templates/project/assets/_nsfont/bs-muscular-skeletal.svg +119 -0
  21. data/templates/project/assets/_nsfont/bs-nervous.svg +31 -0
  22. data/templates/project/assets/_nsfont/bs-reprodutive.svg +29 -0
  23. data/templates/project/assets/_nsfont/bs-respiratory.svg +17 -0
  24. data/templates/project/assets/_nsfont/ls-athletic.svg +17 -0
  25. data/templates/project/assets/_nsfont/ls-diet.svg +21 -0
  26. data/templates/project/assets/_nsfont/ls-energyvitality.svg +14 -0
  27. data/templates/project/assets/_nsfont/ls-mentalacuity.svg +34 -0
  28. data/templates/project/assets/_nsfont/ls-sexual.svg +42 -0
  29. data/templates/project/assets/_nsfont/ls-weightcontrol.svg +17 -0
  30. data/templates/project/assets/_nsfont/nsa-check.svg +7 -0
  31. data/templates/project/assets/_nsfont/nsa-questionmark.svg +15 -0
  32. data/templates/project/assets/_nsfont/nsa-xmark.svg +10 -0
  33. data/templates/project/assets/_nsfont/st-botanical.svg +18 -0
  34. data/templates/project/assets/_nsfont/st-food.svg +24 -0
  35. data/templates/project/assets/_nsfont/st-mineral.svg +15 -0
  36. data/templates/project/assets/_nsfont/st-other.svg +9 -0
  37. data/templates/project/assets/_nsfont/st-vitamin.svg +25 -0
  38. data/templates/project/assets/_nsfont/vote-down.svg +10 -0
  39. data/templates/project/assets/_nsfont/vote-up.svg +10 -0
  40. data/templates/project/assets/_nsfont/yp-age.svg +22 -0
  41. data/templates/project/assets/_nsfont/yp-gender.svg +16 -0
  42. data/templates/project/assets/_nsfont/yp-preventiontherapy.svg +109 -0
  43. data/templates/project/assets/aloe-vera.jpg +0 -0
  44. data/templates/project/assets/alzheimers-brainpuzzle-512.jpg +0 -0
  45. data/templates/project/assets/blurred1.jpg +0 -0
  46. data/templates/project/assets/blurred5.jpg +0 -0
  47. data/templates/project/assets/blurred6.jpg +0 -0
  48. data/templates/project/assets/botanical.svg +18 -0
  49. data/templates/project/assets/capsule.jpg +0 -0
  50. data/templates/project/assets/clouds.jpg +0 -0
  51. data/templates/project/assets/clouds.png +0 -0
  52. data/templates/project/assets/factorfiction-s3d0b80354a.png +0 -0
  53. data/templates/project/assets/factorfiction/factorfiction.png +0 -0
  54. data/templates/project/assets/factorfiction/factorfiction.svg +420 -0
  55. data/templates/project/assets/fff.png +0 -0
  56. data/templates/project/assets/food.svg +24 -0
  57. data/templates/project/assets/foundation/orbit/bullets.jpg +0 -0
  58. data/templates/project/assets/foundation/orbit/left-arrow-small.png +0 -0
  59. data/templates/project/assets/foundation/orbit/left-arrow.png +0 -0
  60. data/templates/project/assets/foundation/orbit/loading.gif +0 -0
  61. data/templates/project/assets/foundation/orbit/mask-black.png +0 -0
  62. data/templates/project/assets/foundation/orbit/pause-black.png +0 -0
  63. data/templates/project/assets/foundation/orbit/right-arrow-small.png +0 -0
  64. data/templates/project/assets/foundation/orbit/right-arrow.png +0 -0
  65. data/templates/project/assets/foundation/orbit/rotator-black.png +0 -0
  66. data/templates/project/assets/foundation/orbit/timer-black.png +0 -0
  67. data/templates/project/assets/glyphicons-halflings-white.png +0 -0
  68. data/templates/project/assets/glyphicons-halflings.png +0 -0
  69. data/templates/project/assets/hero.jpg +0 -0
  70. data/templates/project/assets/hero2.jpg +0 -0
  71. data/templates/project/assets/hero3.jpg +0 -0
  72. data/templates/project/assets/ice.jpg +0 -0
  73. data/templates/project/assets/iceberg.jpg +0 -0
  74. data/templates/project/assets/landing.jpg +0 -0
  75. data/templates/project/assets/mineral.svg +15 -0
  76. data/templates/project/assets/moon.jpg +0 -0
  77. data/templates/project/assets/ns-logo.svg +177 -0
  78. data/templates/project/assets/nslogo-s56b550b473.png +0 -0
  79. data/templates/project/assets/nslogo/nslogo.png +0 -0
  80. data/templates/project/assets/nslogo/nslogo.svg +177 -0
  81. data/templates/project/assets/other.svg +9 -0
  82. data/templates/project/assets/pillbox-hover.svg +33 -0
  83. data/templates/project/assets/pillbox-image.png +0 -0
  84. data/templates/project/assets/pillbox-image.svg +7880 -0
  85. data/templates/project/assets/pillbox.svg +27 -0
  86. data/templates/project/assets/rocket.jpg +0 -0
  87. data/templates/project/assets/shuttle.jpeg +0 -0
  88. data/templates/project/assets/svg/community-clear.svg +82 -0
  89. data/templates/project/assets/svg/community.svg +64 -0
  90. data/templates/project/assets/svg/conditions.svg +18 -0
  91. data/templates/project/assets/svg/experts.svg +32 -0
  92. data/templates/project/assets/svg/fact-or-fiction.svg +420 -0
  93. data/templates/project/assets/svg/lifestyle.svg +22 -0
  94. data/templates/project/assets/svg/perspective.svg +22 -0
  95. data/templates/project/assets/svg/supplements.svg +19 -0
  96. data/templates/project/assets/svgicons-s95620826ea.png +0 -0
  97. data/templates/project/assets/svgicons/community.png +0 -0
  98. data/templates/project/assets/svgicons/community.svg +55 -0
  99. data/templates/project/assets/svgicons/conditions.png +0 -0
  100. data/templates/project/assets/svgicons/conditions.svg +16 -0
  101. data/templates/project/assets/svgicons/experts.png +0 -0
  102. data/templates/project/assets/svgicons/experts.svg +30 -0
  103. data/templates/project/assets/svgicons/lifestyle.png +0 -0
  104. data/templates/project/assets/svgicons/lifestyle.svg +20 -0
  105. data/templates/project/assets/svgicons/supplements.png +0 -0
  106. data/templates/project/assets/svgicons/supplements.svg +17 -0
  107. data/templates/project/assets/svgicons/your-perspective.png +0 -0
  108. data/templates/project/assets/svgicons/your-perspective.svg +20 -0
  109. data/templates/project/assets/users/kp.jpg +0 -0
  110. data/templates/project/assets/video_placeholder.jpg +0 -0
  111. data/templates/project/assets/vitamin.svg +25 -0
  112. data/templates/project/component.json +9 -0
  113. data/templates/project/libs/bootstrap-modal.js +374 -0
  114. data/templates/project/libs/bootstrap/README.md +106 -0
  115. data/templates/project/libs/bootstrap/application.js +156 -0
  116. data/templates/project/libs/bootstrap/bootstrap-affix.js +117 -0
  117. data/templates/project/libs/bootstrap/bootstrap-alert.js +99 -0
  118. data/templates/project/libs/bootstrap/bootstrap-button.js +105 -0
  119. data/templates/project/libs/bootstrap/bootstrap-carousel.js +207 -0
  120. data/templates/project/libs/bootstrap/bootstrap-collapse.js +167 -0
  121. data/templates/project/libs/bootstrap/bootstrap-dropdown.js +165 -0
  122. data/templates/project/libs/bootstrap/bootstrap-modal.js +251 -0
  123. data/templates/project/libs/bootstrap/bootstrap-popover.js +114 -0
  124. data/templates/project/libs/bootstrap/bootstrap-scrollspy.js +162 -0
  125. data/templates/project/libs/bootstrap/bootstrap-tab.js +144 -0
  126. data/templates/project/libs/bootstrap/bootstrap-tooltip.js +361 -0
  127. data/templates/project/libs/bootstrap/bootstrap-transition.js +60 -0
  128. data/templates/project/libs/bootstrap/bootstrap-typeahead.js +335 -0
  129. data/templates/project/libs/bootstrap/bootstrap.js +2280 -0
  130. data/templates/project/libs/bootstrap/bootstrap.min.js +6 -0
  131. data/templates/project/libs/bootstrap/holder/holder.js +401 -0
  132. data/templates/project/libs/bootstrap/html5shiv.js +8 -0
  133. data/templates/project/libs/bootstrap/jquery.js +5 -0
  134. data/templates/project/libs/bootstrap/respond/respond.min.js +6 -0
  135. data/templates/project/libs/equalheights.js +46 -0
  136. data/templates/project/libs/foundation/foundation.alerts.js +50 -0
  137. data/templates/project/libs/foundation/foundation.clearing.js +516 -0
  138. data/templates/project/libs/foundation/foundation.cookie.js +74 -0
  139. data/templates/project/libs/foundation/foundation.dropdown.js +175 -0
  140. data/templates/project/libs/foundation/foundation.forms.js +513 -0
  141. data/templates/project/libs/foundation/foundation.joyride.js +831 -0
  142. data/templates/project/libs/foundation/foundation.js +401 -0
  143. data/templates/project/libs/foundation/foundation.magellan.js +130 -0
  144. data/templates/project/libs/foundation/foundation.orbit.js +373 -0
  145. data/templates/project/libs/foundation/foundation.placeholder.js +159 -0
  146. data/templates/project/libs/foundation/foundation.reveal.js +277 -0
  147. data/templates/project/libs/foundation/foundation.section.js +407 -0
  148. data/templates/project/libs/foundation/foundation.tooltips.js +200 -0
  149. data/templates/project/libs/foundation/foundation.topbar.js +245 -0
  150. data/templates/project/libs/hello.coffee +1 -0
  151. data/templates/project/libs/helper.js +385 -0
  152. data/templates/project/libs/jquery.magnific-popup.js +1783 -0
  153. data/templates/project/libs/jquery.magnific-popup.min.js +4 -0
  154. data/templates/project/libs/jquery.mixitup.min.js +43 -0
  155. data/templates/project/libs/main.js +1 -0
  156. data/templates/project/libs/ns.js +128 -0
  157. data/templates/project/libs/select2-3.4.0/README.md +83 -0
  158. data/templates/project/libs/select2-3.4.0/component.json +8 -0
  159. data/templates/project/libs/select2-3.4.0/release.sh +69 -0
  160. data/templates/project/libs/select2-3.4.0/select2-spinner.gif +0 -0
  161. data/templates/project/libs/select2-3.4.0/select2.css +652 -0
  162. data/templates/project/libs/select2-3.4.0/select2.jquery.json +36 -0
  163. data/templates/project/libs/select2-3.4.0/select2.js +3054 -0
  164. data/templates/project/libs/select2-3.4.0/select2.min.js +22 -0
  165. data/templates/project/libs/select2-3.4.0/select2.png +0 -0
  166. data/templates/project/libs/select2-3.4.0/select2_locale_ca.js +17 -0
  167. data/templates/project/libs/select2-3.4.0/select2_locale_cs.js +49 -0
  168. data/templates/project/libs/select2-3.4.0/select2_locale_da.js +17 -0
  169. data/templates/project/libs/select2-3.4.0/select2_locale_de.js +15 -0
  170. data/templates/project/libs/select2-3.4.0/select2_locale_en.js.template +17 -0
  171. data/templates/project/libs/select2-3.4.0/select2_locale_es.js +15 -0
  172. data/templates/project/libs/select2-3.4.0/select2_locale_et.js +17 -0
  173. data/templates/project/libs/select2-3.4.0/select2_locale_eu.js +43 -0
  174. data/templates/project/libs/select2-3.4.0/select2_locale_fr.js +15 -0
  175. data/templates/project/libs/select2-3.4.0/select2_locale_gl.js +43 -0
  176. data/templates/project/libs/select2-3.4.0/select2_locale_he.js +17 -0
  177. data/templates/project/libs/select2-3.4.0/select2_locale_hr.js +42 -0
  178. data/templates/project/libs/select2-3.4.0/select2_locale_hu.js +15 -0
  179. data/templates/project/libs/select2-3.4.0/select2_locale_is.js +16 -0
  180. data/templates/project/libs/select2-3.4.0/select2_locale_it.js +15 -0
  181. data/templates/project/libs/select2-3.4.0/select2_locale_ja.js +15 -0
  182. data/templates/project/libs/select2-3.4.0/select2_locale_lt.js +29 -0
  183. data/templates/project/libs/select2-3.4.0/select2_locale_lv.js +16 -0
  184. data/templates/project/libs/select2-3.4.0/select2_locale_mk.js +17 -0
  185. data/templates/project/libs/select2-3.4.0/select2_locale_nl.js +15 -0
  186. data/templates/project/libs/select2-3.4.0/select2_locale_no.js +18 -0
  187. data/templates/project/libs/select2-3.4.0/select2_locale_pl.js +37 -0
  188. data/templates/project/libs/select2-3.4.0/select2_locale_pt-BR.js +15 -0
  189. data/templates/project/libs/select2-3.4.0/select2_locale_pt-PT.js +15 -0
  190. data/templates/project/libs/select2-3.4.0/select2_locale_ro.js +15 -0
  191. data/templates/project/libs/select2-3.4.0/select2_locale_ru.js +15 -0
  192. data/templates/project/libs/select2-3.4.0/select2_locale_sk.js +48 -0
  193. data/templates/project/libs/select2-3.4.0/select2_locale_sv.js +17 -0
  194. data/templates/project/libs/select2-3.4.0/select2_locale_tr.js +17 -0
  195. data/templates/project/libs/select2-3.4.0/select2_locale_ua.js +17 -0
  196. data/templates/project/libs/select2-3.4.0/select2_locale_vi.js +18 -0
  197. data/templates/project/libs/select2-3.4.0/select2_locale_zh-CN.js +14 -0
  198. data/templates/project/libs/select2-3.4.0/select2_locale_zh-TW.js +14 -0
  199. data/templates/project/libs/select2-3.4.0/select2x2.png +0 -0
  200. data/templates/project/libs/vendor/modernizr-2.6.2.min.js +4 -0
  201. data/templates/project/libs/vendor/zepto.js +1884 -0
  202. data/templates/project/libs/vendor/zepto.min.js +2 -0
  203. data/templates/project/manifest.rb +9 -0
  204. data/templates/project/style.scss.erb +2 -0
  205. metadata +288 -0
@@ -0,0 +1,22 @@
1
+ /*
2
+ Copyright 2012 Igor Vaynberg
3
+
4
+ Version: 3.4.0 Timestamp: Tue May 14 08:27:33 PDT 2013
5
+
6
+ This software is licensed under the Apache License, Version 2.0 (the "Apache License") or the GNU
7
+ General Public License version 2 (the "GPL License"). You may choose either license to govern your
8
+ use of this software only upon the condition that you accept all of the terms of either the Apache
9
+ License or the GPL License.
10
+
11
+ You may obtain a copy of the Apache License and the GPL License at:
12
+
13
+ http://www.apache.org/licenses/LICENSE-2.0
14
+ http://www.gnu.org/licenses/gpl-2.0.html
15
+
16
+ Unless required by applicable law or agreed to in writing, software distributed under the Apache License
17
+ or the GPL Licesnse is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
18
+ either express or implied. See the Apache License and the GPL License for the specific language governing
19
+ permissions and limitations under the Apache License and the GPL License.
20
+ */
21
+ (function(a){a.fn.each2===void 0&&a.fn.extend({each2:function(b){for(var c=a([0]),d=-1,e=this.length;e>++d&&(c.context=c[0]=this[d])&&b.call(c[0],d,c)!==!1;);return this}})})(jQuery),function(a,b){"use strict";function m(a,b){for(var c=0,d=b.length;d>c;c+=1)if(o(a,b[c]))return c;return-1}function n(){var b=a(l);b.appendTo("body");var c={width:b.width()-b[0].clientWidth,height:b.height()-b[0].clientHeight};return b.remove(),c}function o(a,c){return a===c?!0:a===b||c===b?!1:null===a||null===c?!1:a.constructor===String?a+""==c+"":c.constructor===String?c+""==a+"":!1}function p(b,c){var d,e,f;if(null===b||1>b.length)return[];for(d=b.split(c),e=0,f=d.length;f>e;e+=1)d[e]=a.trim(d[e]);return d}function q(a){return a.outerWidth(!1)-a.width()}function r(c){var d="keyup-change-value";c.on("keydown",function(){a.data(c,d)===b&&a.data(c,d,c.val())}),c.on("keyup",function(){var e=a.data(c,d);e!==b&&c.val()!==e&&(a.removeData(c,d),c.trigger("keyup-change"))})}function s(c){c.on("mousemove",function(c){var d=i;(d===b||d.x!==c.pageX||d.y!==c.pageY)&&a(c.target).trigger("mousemove-filtered",c)})}function t(a,c,d){d=d||b;var e;return function(){var b=arguments;window.clearTimeout(e),e=window.setTimeout(function(){c.apply(d,b)},a)}}function u(a){var c,b=!1;return function(){return b===!1&&(c=a(),b=!0),c}}function v(a,b){var c=t(a,function(a){b.trigger("scroll-debounced",a)});b.on("scroll",function(a){m(a.target,b.get())>=0&&c(a)})}function w(a){a[0]!==document.activeElement&&window.setTimeout(function(){var d,b=a[0],c=a.val().length;a.focus(),a.is(":visible")&&b===document.activeElement&&(b.setSelectionRange?b.setSelectionRange(c,c):b.createTextRange&&(d=b.createTextRange(),d.collapse(!1),d.select()))},0)}function x(b){b=a(b)[0];var c=0,d=0;if("selectionStart"in b)c=b.selectionStart,d=b.selectionEnd-c;else if("selection"in document){b.focus();var e=document.selection.createRange();d=document.selection.createRange().text.length,e.moveStart("character",-b.value.length),c=e.text.length-d}return{offset:c,length:d}}function y(a){a.preventDefault(),a.stopPropagation()}function z(a){a.preventDefault(),a.stopImmediatePropagation()}function A(b){if(!h){var c=b[0].currentStyle||window.getComputedStyle(b[0],null);h=a(document.createElement("div")).css({position:"absolute",left:"-10000px",top:"-10000px",display:"none",fontSize:c.fontSize,fontFamily:c.fontFamily,fontStyle:c.fontStyle,fontWeight:c.fontWeight,letterSpacing:c.letterSpacing,textTransform:c.textTransform,whiteSpace:"nowrap"}),h.attr("class","select2-sizer"),a("body").append(h)}return h.text(b.val()),h.width()}function B(b,c,d){var e,g,f=[];e=b.attr("class"),e&&(e=""+e,a(e.split(" ")).each2(function(){0===this.indexOf("select2-")&&f.push(this)})),e=c.attr("class"),e&&(e=""+e,a(e.split(" ")).each2(function(){0!==this.indexOf("select2-")&&(g=d(this),g&&f.push(this))})),b.attr("class",f.join(" "))}function C(a,c,d,e){var f=a.toUpperCase().indexOf(c.toUpperCase()),g=c.length;return 0>f?(d.push(e(a)),b):(d.push(e(a.substring(0,f))),d.push("<span class='select2-match'>"),d.push(e(a.substring(f,f+g))),d.push("</span>"),d.push(e(a.substring(f+g,a.length))),b)}function D(c){var d,e=0,f=null,g=c.quietMillis||100,h=c.url,i=this;return function(j){window.clearTimeout(d),d=window.setTimeout(function(){e+=1;var d=e,g=c.data,k=h,l=c.transport||a.fn.select2.ajaxDefaults.transport,m={type:c.type||"GET",cache:c.cache||!1,jsonpCallback:c.jsonpCallback||b,dataType:c.dataType||"json"},n=a.extend({},a.fn.select2.ajaxDefaults.params,m);g=g?g.call(i,j.term,j.page,j.context):null,k="function"==typeof k?k.call(i,j.term,j.page,j.context):k,null!==f&&f.abort(),c.params&&(a.isFunction(c.params)?a.extend(n,c.params.call(i)):a.extend(n,c.params)),a.extend(n,{url:k,dataType:c.dataType,data:g,success:function(a){if(!(e>d)){var b=c.results(a,j.page);j.callback(b)}}}),f=l.call(i,n)},g)}}function E(c){var e,f,d=c,g=function(a){return""+a.text};a.isArray(d)&&(f=d,d={results:f}),a.isFunction(d)===!1&&(f=d,d=function(){return f});var h=d();return h.text&&(g=h.text,a.isFunction(g)||(e=h.text,g=function(a){return a[e]})),function(c){var h,e=c.term,f={results:[]};return""===e?(c.callback(d()),b):(h=function(b,d){var f,i;if(b=b[0],b.children){f={};for(i in b)b.hasOwnProperty(i)&&(f[i]=b[i]);f.children=[],a(b.children).each2(function(a,b){h(b,f.children)}),(f.children.length||c.matcher(e,g(f),b))&&d.push(f)}else c.matcher(e,g(b),b)&&d.push(b)},a(d().results).each2(function(a,b){h(b,f.results)}),c.callback(f),b)}}function F(c){var d=a.isFunction(c);return function(e){var f=e.term,g={results:[]};a(d?c():c).each(function(){var a=this.text!==b,c=a?this.text:this;(""===f||e.matcher(f,c))&&g.results.push(a?this:{id:this,text:this})}),e.callback(g)}}function G(b){if(a.isFunction(b))return!0;if(!b)return!1;throw Error("formatterName must be a function or a falsy value")}function H(b){return a.isFunction(b)?b():b}function I(b){var c=0;return a.each(b,function(a,b){b.children?c+=I(b.children):c++}),c}function J(a,c,d,e){var h,i,j,k,l,f=a,g=!1;if(!e.createSearchChoice||!e.tokenSeparators||1>e.tokenSeparators.length)return b;for(;;){for(i=-1,j=0,k=e.tokenSeparators.length;k>j&&(l=e.tokenSeparators[j],i=a.indexOf(l),!(i>=0));j++);if(0>i)break;if(h=a.substring(0,i),a=a.substring(i+l.length),h.length>0&&(h=e.createSearchChoice(h,c),h!==b&&null!==h&&e.id(h)!==b&&null!==e.id(h))){for(g=!1,j=0,k=c.length;k>j;j++)if(o(e.id(h),e.id(c[j]))){g=!0;break}g||d(h)}}return f!==a?a:b}function K(b,c){var d=function(){};return d.prototype=new b,d.prototype.constructor=d,d.prototype.parent=b.prototype,d.prototype=a.extend(d.prototype,c),d}if(window.Select2===b){var c,d,e,f,g,h,i,j,k,c={TAB:9,ENTER:13,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,SHIFT:16,CTRL:17,ALT:18,PAGE_UP:33,PAGE_DOWN:34,HOME:36,END:35,BACKSPACE:8,DELETE:46,isArrow:function(a){switch(a=a.which?a.which:a){case c.LEFT:case c.RIGHT:case c.UP:case c.DOWN:return!0}return!1},isControl:function(a){var b=a.which;switch(b){case c.SHIFT:case c.CTRL:case c.ALT:return!0}return a.metaKey?!0:!1},isFunctionKey:function(a){return a=a.which?a.which:a,a>=112&&123>=a}},l="<div class='select2-measure-scrollbar'></div>";j=a(document),g=function(){var a=1;return function(){return a++}}(),j.on("mousemove",function(a){i={x:a.pageX,y:a.pageY}}),d=K(Object,{bind:function(a){var b=this;return function(){a.apply(b,arguments)}},init:function(c){var d,e,h,i,f=".select2-results";this.opts=c=this.prepareOpts(c),this.id=c.id,c.element.data("select2")!==b&&null!==c.element.data("select2")&&this.destroy(),this.container=this.createContainer(),this.containerId="s2id_"+(c.element.attr("id")||"autogen"+g()),this.containerSelector="#"+this.containerId.replace(/([;&,\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g,"\\$1"),this.container.attr("id",this.containerId),this.body=u(function(){return c.element.closest("body")}),B(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.css(H(c.containerCss)),this.container.addClass(H(c.containerCssClass)),this.elementTabIndex=this.opts.element.attr("tabindex"),this.opts.element.data("select2",this).attr("tabindex","-1").before(this.container),this.container.data("select2",this),this.dropdown=this.container.find(".select2-drop"),this.dropdown.addClass(H(c.dropdownCssClass)),this.dropdown.data("select2",this),this.results=d=this.container.find(f),this.search=e=this.container.find("input.select2-input"),this.resultsPage=0,this.context=null,this.initContainer(),s(this.results),this.dropdown.on("mousemove-filtered touchstart touchmove touchend",f,this.bind(this.highlightUnderEvent)),v(80,this.results),this.dropdown.on("scroll-debounced",f,this.bind(this.loadMoreIfNeeded)),a(this.container).on("change",".select2-input",function(a){a.stopPropagation()}),a(this.dropdown).on("change",".select2-input",function(a){a.stopPropagation()}),a.fn.mousewheel&&d.mousewheel(function(a,b,c,e){var f=d.scrollTop();e>0&&0>=f-e?(d.scrollTop(0),y(a)):0>e&&d.get(0).scrollHeight-d.scrollTop()+e<=d.height()&&(d.scrollTop(d.get(0).scrollHeight-d.height()),y(a))}),r(e),e.on("keyup-change input paste",this.bind(this.updateResults)),e.on("focus",function(){e.addClass("select2-focused")}),e.on("blur",function(){e.removeClass("select2-focused")}),this.dropdown.on("mouseup",f,this.bind(function(b){a(b.target).closest(".select2-result-selectable").length>0&&(this.highlightUnderEvent(b),this.selectHighlighted(b))})),this.dropdown.on("click mouseup mousedown",function(a){a.stopPropagation()}),a.isFunction(this.opts.initSelection)&&(this.initSelection(),this.monitorSource()),null!==c.maximumInputLength&&this.search.attr("maxlength",c.maximumInputLength);var h=c.element.prop("disabled");h===b&&(h=!1),this.enable(!h);var i=c.element.prop("readonly");i===b&&(i=!1),this.readonly(i),k=k||n(),this.autofocus=c.element.prop("autofocus"),c.element.prop("autofocus",!1),this.autofocus&&this.focus()},destroy:function(){var a=this.opts.element.data("select2");this.propertyObserver&&(delete this.propertyObserver,this.propertyObserver=null),a!==b&&(a.container.remove(),a.dropdown.remove(),a.opts.element.removeClass("select2-offscreen").removeData("select2").off(".select2").attr({tabindex:this.elementTabIndex}).prop("autofocus",this.autofocus||!1).show())},optionToData:function(a){return a.is("option")?{id:a.prop("value"),text:a.text(),element:a.get(),css:a.attr("class"),disabled:a.prop("disabled"),locked:o(a.attr("locked"),"locked")}:a.is("optgroup")?{text:a.attr("label"),children:[],element:a.get(),css:a.attr("class")}:b},prepareOpts:function(c){var d,e,f,g,h=this;if(d=c.element,"select"===d.get(0).tagName.toLowerCase()&&(this.select=e=c.element),e&&a.each(["id","multiple","ajax","query","createSearchChoice","initSelection","data","tags"],function(){if(this in c)throw Error("Option '"+this+"' is not allowed for Select2 when attached to a <select> element.")}),c=a.extend({},{populateResults:function(d,e,f){var g,l=this.opts.id;g=function(d,e,i){var j,k,m,n,o,p,q,r,s,t;for(d=c.sortResults(d,e,f),j=0,k=d.length;k>j;j+=1)m=d[j],o=m.disabled===!0,n=!o&&l(m)!==b,p=m.children&&m.children.length>0,q=a("<li></li>"),q.addClass("select2-results-dept-"+i),q.addClass("select2-result"),q.addClass(n?"select2-result-selectable":"select2-result-unselectable"),o&&q.addClass("select2-disabled"),p&&q.addClass("select2-result-with-children"),q.addClass(h.opts.formatResultCssClass(m)),r=a(document.createElement("div")),r.addClass("select2-result-label"),t=c.formatResult(m,r,f,h.opts.escapeMarkup),t!==b&&r.html(t),q.append(r),p&&(s=a("<ul></ul>"),s.addClass("select2-result-sub"),g(m.children,s,i+1),q.append(s)),q.data("select2-data",m),e.append(q)},g(e,d,0)}},a.fn.select2.defaults,c),"function"!=typeof c.id&&(f=c.id,c.id=function(a){return a[f]}),a.isArray(c.element.data("select2Tags"))){if("tags"in c)throw"tags specified as both an attribute 'data-select2-tags' and in options of Select2 "+c.element.attr("id");c.tags=c.element.data("select2Tags")}if(e?(c.query=this.bind(function(c){var g,i,j,e={results:[],more:!1},f=c.term;j=function(a,b){var d;a.is("option")?c.matcher(f,a.text(),a)&&b.push(h.optionToData(a)):a.is("optgroup")&&(d=h.optionToData(a),a.children().each2(function(a,b){j(b,d.children)}),d.children.length>0&&b.push(d))},g=d.children(),this.getPlaceholder()!==b&&g.length>0&&(i=g[0],""===a(i).text()&&(g=g.not(i))),g.each2(function(a,b){j(b,e.results)}),c.callback(e)}),c.id=function(a){return a.id},c.formatResultCssClass=function(a){return a.css}):"query"in c||("ajax"in c?(g=c.element.data("ajax-url"),g&&g.length>0&&(c.ajax.url=g),c.query=D.call(c.element,c.ajax)):"data"in c?c.query=E(c.data):"tags"in c&&(c.query=F(c.tags),c.createSearchChoice===b&&(c.createSearchChoice=function(a){return{id:a,text:a}}),c.initSelection===b&&(c.initSelection=function(d,e){var f=[];a(p(d.val(),c.separator)).each(function(){var d=this,e=this,g=c.tags;a.isFunction(g)&&(g=g()),a(g).each(function(){return o(this.id,d)?(e=this.text,!1):b}),f.push({id:d,text:e})}),e(f)}))),"function"!=typeof c.query)throw"query function not defined for Select2 "+c.element.attr("id");return c},monitorSource:function(){var c,a=this.opts.element;a.on("change.select2",this.bind(function(){this.opts.element.data("select2-change-triggered")!==!0&&this.initSelection()})),c=this.bind(function(){var d,f=a.prop("disabled");f===b&&(f=!1),this.enable(!f);var d=a.prop("readonly");d===b&&(d=!1),this.readonly(d),B(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.addClass(H(this.opts.containerCssClass)),B(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass),this.dropdown.addClass(H(this.opts.dropdownCssClass))}),a.on("propertychange.select2 DOMAttrModified.select2",c),this.mutationCallback===b&&(this.mutationCallback=function(a){a.forEach(c)}),"undefined"!=typeof WebKitMutationObserver&&(this.propertyObserver&&(delete this.propertyObserver,this.propertyObserver=null),this.propertyObserver=new WebKitMutationObserver(this.mutationCallback),this.propertyObserver.observe(a.get(0),{attributes:!0,subtree:!1}))},triggerSelect:function(b){var c=a.Event("select2-selecting",{val:this.id(b),object:b});return this.opts.element.trigger(c),!c.isDefaultPrevented()},triggerChange:function(b){b=b||{},b=a.extend({},b,{type:"change",val:this.val()}),this.opts.element.data("select2-change-triggered",!0),this.opts.element.trigger(b),this.opts.element.data("select2-change-triggered",!1),this.opts.element.click(),this.opts.blurOnChange&&this.opts.element.blur()},isInterfaceEnabled:function(){return this.enabledInterface===!0},enableInterface:function(){var a=this._enabled&&!this._readonly,b=!a;return a===this.enabledInterface?!1:(this.container.toggleClass("select2-container-disabled",b),this.close(),this.enabledInterface=a,!0)},enable:function(a){return a===b&&(a=!0),this._enabled===a?!1:(this._enabled=a,this.opts.element.prop("disabled",!a),this.enableInterface(),!0)},readonly:function(a){return a===b&&(a=!1),this._readonly===a?!1:(this._readonly=a,this.opts.element.prop("readonly",a),this.enableInterface(),!0)},opened:function(){return this.container.hasClass("select2-dropdown-open")},positionDropdown:function(){var q,r,s,t,b=this.dropdown,c=this.container.offset(),d=this.container.outerHeight(!1),e=this.container.outerWidth(!1),f=b.outerHeight(!1),g=a(window).scrollLeft()+a(window).width(),h=a(window).scrollTop()+a(window).height(),i=c.top+d,j=c.left,l=h>=i+f,m=c.top-f>=this.body().scrollTop(),n=b.outerWidth(!1),o=g>=j+n,p=b.hasClass("select2-drop-above");this.opts.dropdownAutoWidth?(t=a(".select2-results",b)[0],b.addClass("select2-drop-auto-width"),b.css("width",""),n=b.outerWidth(!1)+(t.scrollHeight===t.clientHeight?0:k.width),n>e?e=n:n=e,o=g>=j+n):this.container.removeClass("select2-drop-auto-width"),"static"!==this.body().css("position")&&(q=this.body().offset(),i-=q.top,j-=q.left),p?(r=!0,!m&&l&&(r=!1)):(r=!1,!l&&m&&(r=!0)),o||(j=c.left+e-n),r?(i=c.top-f,this.container.addClass("select2-drop-above"),b.addClass("select2-drop-above")):(this.container.removeClass("select2-drop-above"),b.removeClass("select2-drop-above")),s=a.extend({top:i,left:j,width:e},H(this.opts.dropdownCss)),b.css(s)},shouldOpen:function(){var b;return this.opened()?!1:this._enabled===!1||this._readonly===!0?!1:(b=a.Event("select2-opening"),this.opts.element.trigger(b),!b.isDefaultPrevented())},clearDropdownAlignmentPreference:function(){this.container.removeClass("select2-drop-above"),this.dropdown.removeClass("select2-drop-above")},open:function(){return this.shouldOpen()?(this.opening(),!0):!1},opening:function(){function h(){return{width:Math.max(document.documentElement.scrollWidth,a(window).width()),height:Math.max(document.documentElement.scrollHeight,a(window).height())}}var f,b=this.containerId,c="scroll."+b,d="resize."+b,e="orientationchange."+b;this.container.addClass("select2-dropdown-open").addClass("select2-container-active"),this.clearDropdownAlignmentPreference(),this.dropdown[0]!==this.body().children().last()[0]&&this.dropdown.detach().appendTo(this.body()),f=a("#select2-drop-mask"),0==f.length&&(f=a(document.createElement("div")),f.attr("id","select2-drop-mask").attr("class","select2-drop-mask"),f.hide(),f.appendTo(this.body()),f.on("mousedown touchstart",function(b){var d,c=a("#select2-drop");c.length>0&&(d=c.data("select2"),d.opts.selectOnBlur&&d.selectHighlighted({noFocus:!0}),d.close(),b.preventDefault(),b.stopPropagation())})),this.dropdown.prev()[0]!==f[0]&&this.dropdown.before(f),a("#select2-drop").removeAttr("id"),this.dropdown.attr("id","select2-drop"),f.css(h()),f.show(),this.dropdown.show(),this.positionDropdown(),this.dropdown.addClass("select2-drop-active"),this.ensureHighlightVisible();var g=this;this.container.parents().add(window).each(function(){a(this).on(d+" "+c+" "+e,function(){a("#select2-drop-mask").css(h()),g.positionDropdown()})})},close:function(){if(this.opened()){var b=this.containerId,c="scroll."+b,d="resize."+b,e="orientationchange."+b;this.container.parents().add(window).each(function(){a(this).off(c).off(d).off(e)}),this.clearDropdownAlignmentPreference(),a("#select2-drop-mask").hide(),this.dropdown.removeAttr("id"),this.dropdown.hide(),this.container.removeClass("select2-dropdown-open"),this.results.empty(),this.clearSearch(),this.search.removeClass("select2-active"),this.opts.element.trigger(a.Event("select2-close"))}},clearSearch:function(){},getMaximumSelectionSize:function(){return H(this.opts.maximumSelectionSize)},ensureHighlightVisible:function(){var d,e,f,g,h,i,j,c=this.results;if(e=this.highlight(),!(0>e)){if(0==e)return c.scrollTop(0),b;d=this.findHighlightableChoices().find(".select2-result-label"),f=a(d[e]),g=f.offset().top+f.outerHeight(!0),e===d.length-1&&(j=c.find("li.select2-more-results"),j.length>0&&(g=j.offset().top+j.outerHeight(!0))),h=c.offset().top+c.outerHeight(!0),g>h&&c.scrollTop(c.scrollTop()+(g-h)),i=f.offset().top-c.offset().top,0>i&&"none"!=f.css("display")&&c.scrollTop(c.scrollTop()+i)}},findHighlightableChoices:function(){return this.results.find(".select2-result-selectable:not(.select2-selected):not(.select2-disabled)")},moveHighlight:function(b){for(var c=this.findHighlightableChoices(),d=this.highlight();d>-1&&c.length>d;){d+=b;var e=a(c[d]);if(e.hasClass("select2-result-selectable")&&!e.hasClass("select2-disabled")&&!e.hasClass("select2-selected")){this.highlight(d);break}}},highlight:function(c){var e,f,d=this.findHighlightableChoices();return 0===arguments.length?m(d.filter(".select2-highlighted")[0],d.get()):(c>=d.length&&(c=d.length-1),0>c&&(c=0),this.results.find(".select2-highlighted").removeClass("select2-highlighted"),e=a(d[c]),e.addClass("select2-highlighted"),this.ensureHighlightVisible(),f=e.data("select2-data"),f&&this.opts.element.trigger({type:"select2-highlight",val:this.id(f),choice:f}),b)},countSelectableResults:function(){return this.findHighlightableChoices().length},highlightUnderEvent:function(b){var c=a(b.target).closest(".select2-result-selectable");if(c.length>0&&!c.is(".select2-highlighted")){var d=this.findHighlightableChoices();this.highlight(d.index(c))}else 0==c.length&&this.results.find(".select2-highlighted").removeClass("select2-highlighted")},loadMoreIfNeeded:function(){var c,a=this.results,b=a.find("li.select2-more-results"),e=this.resultsPage+1,f=this,g=this.search.val(),h=this.context;0!==b.length&&(c=b.offset().top-a.offset().top-a.height(),this.opts.loadMorePadding>=c&&(b.addClass("select2-active"),this.opts.query({element:this.opts.element,term:g,page:e,context:h,matcher:this.opts.matcher,callback:this.bind(function(c){f.opened()&&(f.opts.populateResults.call(this,a,c.results,{term:g,page:e,context:h}),f.postprocessResults(c,!1,!1),c.more===!0?(b.detach().appendTo(a).text(f.opts.formatLoadMore(e+1)),window.setTimeout(function(){f.loadMoreIfNeeded()},10)):b.remove(),f.positionDropdown(),f.resultsPage=e,f.context=c.context)})})))},tokenize:function(){},updateResults:function(c){function l(){e.scrollTop(0),d.removeClass("select2-active"),h.positionDropdown()}function m(a){e.html(a),l()}var g,i,d=this.search,e=this.results,f=this.opts,h=this,j=d.val(),k=a.data(this.container,"select2-last-term");if((c===!0||!k||!o(j,k))&&(a.data(this.container,"select2-last-term",j),c===!0||this.showSearchInput!==!1&&this.opened())){var n=this.getMaximumSelectionSize();if(n>=1&&(g=this.data(),a.isArray(g)&&g.length>=n&&G(f.formatSelectionTooBig,"formatSelectionTooBig")))return m("<li class='select2-selection-limit'>"+f.formatSelectionTooBig(n)+"</li>"),b;if(d.val().length<f.minimumInputLength)return G(f.formatInputTooShort,"formatInputTooShort")?m("<li class='select2-no-results'>"+f.formatInputTooShort(d.val(),f.minimumInputLength)+"</li>"):m(""),c&&this.showSearch(!0),b;if(f.maximumInputLength&&d.val().length>f.maximumInputLength)return G(f.formatInputTooLong,"formatInputTooLong")?m("<li class='select2-no-results'>"+f.formatInputTooLong(d.val(),f.maximumInputLength)+"</li>"):m(""),b;f.formatSearching&&0===this.findHighlightableChoices().length&&m("<li class='select2-searching'>"+f.formatSearching()+"</li>"),d.addClass("select2-active"),i=this.tokenize(),i!=b&&null!=i&&d.val(i),this.resultsPage=1,f.query({element:f.element,term:d.val(),page:this.resultsPage,context:null,matcher:f.matcher,callback:this.bind(function(g){var i;return this.opened()?(this.context=g.context===b?null:g.context,this.opts.createSearchChoice&&""!==d.val()&&(i=this.opts.createSearchChoice.call(null,d.val(),g.results),i!==b&&null!==i&&h.id(i)!==b&&null!==h.id(i)&&0===a(g.results).filter(function(){return o(h.id(this),h.id(i))}).length&&g.results.unshift(i)),0===g.results.length&&G(f.formatNoMatches,"formatNoMatches")?(m("<li class='select2-no-results'>"+f.formatNoMatches(d.val())+"</li>"),b):(e.empty(),h.opts.populateResults.call(this,e,g.results,{term:d.val(),page:this.resultsPage,context:null}),g.more===!0&&G(f.formatLoadMore,"formatLoadMore")&&(e.append("<li class='select2-more-results'>"+h.opts.escapeMarkup(f.formatLoadMore(this.resultsPage))+"</li>"),window.setTimeout(function(){h.loadMoreIfNeeded()},10)),this.postprocessResults(g,c),l(),this.opts.element.trigger({type:"select2-loaded",data:g}),b)):(this.search.removeClass("select2-active"),b)})})}},cancel:function(){this.close()},blur:function(){this.opts.selectOnBlur&&this.selectHighlighted({noFocus:!0}),this.close(),this.container.removeClass("select2-container-active"),this.search[0]===document.activeElement&&this.search.blur(),this.clearSearch(),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus")},focusSearch:function(){w(this.search)},selectHighlighted:function(a){var b=this.highlight(),c=this.results.find(".select2-highlighted"),d=c.closest(".select2-result").data("select2-data");d&&(this.highlight(b),this.onSelect(d,a))},getPlaceholder:function(){return this.opts.element.attr("placeholder")||this.opts.element.attr("data-placeholder")||this.opts.element.data("placeholder")||this.opts.placeholder},initContainerWidth:function(){function c(){var c,d,e,f,g;if("off"===this.opts.width)return null;if("element"===this.opts.width)return 0===this.opts.element.outerWidth(!1)?"auto":this.opts.element.outerWidth(!1)+"px";if("copy"===this.opts.width||"resolve"===this.opts.width){if(c=this.opts.element.attr("style"),c!==b)for(d=c.split(";"),f=0,g=d.length;g>f;f+=1)if(e=d[f].replace(/\s/g,"").match(/width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i),null!==e&&e.length>=1)return e[1];return c=this.opts.element.css("width"),c&&c.length>0?c:"resolve"===this.opts.width?0===this.opts.element.outerWidth(!1)?"auto":this.opts.element.outerWidth(!1)+"px":null}return a.isFunction(this.opts.width)?this.opts.width():this.opts.width}var d=c.call(this);null!==d&&this.container.css("width",d)}}),e=K(d,{createContainer:function(){var b=a(document.createElement("div")).attr({"class":"select2-container"}).html(["<a href='javascript:void(0)' onclick='return false;' class='select2-choice' tabindex='-1'>"," <span>&nbsp;</span><abbr class='select2-search-choice-close'></abbr>"," <div><b></b></div>","</a>","<input class='select2-focusser select2-offscreen' type='text'/>","<div class='select2-drop select2-display-none'>"," <div class='select2-search'>"," <input type='text' autocomplete='off' autocorrect='off' autocapitilize='off' spellcheck='false' class='select2-input'/>"," </div>"," <ul class='select2-results'>"," </ul>","</div>"].join(""));return b},enableInterface:function(){this.parent.enableInterface.apply(this,arguments)&&this.focusser.prop("disabled",!this.isInterfaceEnabled())},opening:function(){var b,c;this.parent.opening.apply(this,arguments),this.showSearchInput!==!1&&this.search.val(this.focusser.val()),this.search.focus(),b=this.search.get(0),b.createTextRange&&(c=b.createTextRange(),c.collapse(!1),c.select()),this.focusser.prop("disabled",!0).val(""),this.updateResults(!0),this.opts.element.trigger(a.Event("select2-open"))},close:function(){this.opened()&&(this.parent.close.apply(this,arguments),this.focusser.removeAttr("disabled"),this.focusser.focus())},focus:function(){this.opened()?this.close():(this.focusser.removeAttr("disabled"),this.focusser.focus())},isFocused:function(){return this.container.hasClass("select2-container-active")},cancel:function(){this.parent.cancel.apply(this,arguments),this.focusser.removeAttr("disabled"),this.focusser.focus()},initContainer:function(){var d,e=this.container,f=this.dropdown;this.showSearch(!1),this.selection=d=e.find(".select2-choice"),this.focusser=e.find(".select2-focusser"),this.focusser.attr("id","s2id_autogen"+g()),a("label[for='"+this.opts.element.attr("id")+"']").attr("for",this.focusser.attr("id")),this.focusser.attr("tabindex",this.elementTabIndex),this.search.on("keydown",this.bind(function(a){if(this.isInterfaceEnabled()){if(a.which===c.PAGE_UP||a.which===c.PAGE_DOWN)return y(a),b;switch(a.which){case c.UP:case c.DOWN:return this.moveHighlight(a.which===c.UP?-1:1),y(a),b;case c.ENTER:return this.selectHighlighted(),y(a),b;case c.TAB:return this.selectHighlighted({noFocus:!0}),b;case c.ESC:return this.cancel(a),y(a),b}}})),this.search.on("blur",this.bind(function(){document.activeElement===this.body().get(0)&&window.setTimeout(this.bind(function(){this.search.focus()}),0)})),this.focusser.on("keydown",this.bind(function(a){return!this.isInterfaceEnabled()||a.which===c.TAB||c.isControl(a)||c.isFunctionKey(a)||a.which===c.ESC?b:this.opts.openOnEnter===!1&&a.which===c.ENTER?(y(a),b):a.which==c.DOWN||a.which==c.UP||a.which==c.ENTER&&this.opts.openOnEnter?(this.open(),y(a),b):a.which==c.DELETE||a.which==c.BACKSPACE?(this.opts.allowClear&&this.clear(),y(a),b):b})),r(this.focusser),this.focusser.on("keyup-change input",this.bind(function(a){a.stopPropagation(),this.opened()||this.open()})),d.on("mousedown","abbr",this.bind(function(a){this.isInterfaceEnabled()&&(this.clear(),z(a),this.close(),this.selection.focus())})),d.on("mousedown",this.bind(function(b){this.container.hasClass("select2-container-active")||this.opts.element.trigger(a.Event("select2-focus")),this.opened()?this.close():this.isInterfaceEnabled()&&this.open(),y(b)})),f.on("mousedown",this.bind(function(){this.search.focus()})),d.on("focus",this.bind(function(a){y(a)})),this.focusser.on("focus",this.bind(function(){this.container.hasClass("select2-container-active")||this.opts.element.trigger(a.Event("select2-focus")),this.container.addClass("select2-container-active")})).on("blur",this.bind(function(){this.opened()||(this.container.removeClass("select2-container-active"),this.opts.element.trigger(a.Event("select2-blur")))})),this.search.on("focus",this.bind(function(){this.container.hasClass("select2-container-active")||this.opts.element.trigger(a.Event("select2-focus")),this.container.addClass("select2-container-active")})),this.initContainerWidth(),this.opts.element.addClass("select2-offscreen"),this.setPlaceholder()},clear:function(a){var b=this.selection.data("select2-data");b&&(this.opts.element.val(""),this.selection.find("span").empty(),this.selection.removeData("select2-data"),this.setPlaceholder(),a!==!1&&(this.opts.element.trigger({type:"select2-removed",val:this.id(b),choice:b}),this.triggerChange({removed:b})))},initSelection:function(){if(""===this.opts.element.val()&&""===this.opts.element.text())this.updateSelection([]),this.close(),this.setPlaceholder();else{var c=this;this.opts.initSelection.call(null,this.opts.element,function(a){a!==b&&null!==a&&(c.updateSelection(a),c.close(),c.setPlaceholder())})}},prepareOpts:function(){var b=this.parent.prepareOpts.apply(this,arguments),c=this;return"select"===b.element.get(0).tagName.toLowerCase()?b.initSelection=function(a,b){var d=a.find(":selected");b(c.optionToData(d))}:"data"in b&&(b.initSelection=b.initSelection||function(c,d){var e=c.val(),f=null;b.query({matcher:function(a,c,d){var g=o(e,b.id(d));return g&&(f=d),g},callback:a.isFunction(d)?function(){d(f)}:a.noop})}),b},getPlaceholder:function(){return this.select&&""!==this.select.find("option").first().text()?b:this.parent.getPlaceholder.apply(this,arguments)},setPlaceholder:function(){var a=this.getPlaceholder();if(""===this.opts.element.val()&&a!==b){if(this.select&&""!==this.select.find("option:first").text())return;this.selection.find("span").html(this.opts.escapeMarkup(a)),this.selection.addClass("select2-default"),this.container.removeClass("select2-allowclear")}},postprocessResults:function(a,c,d){var e=0,f=this;if(this.findHighlightableChoices().each2(function(a,c){return o(f.id(c.data("select2-data")),f.opts.element.val())?(e=a,!1):b}),d!==!1&&this.highlight(e),c===!0&&this.showSearchInput===!1){var h=this.opts.minimumResultsForSearch;h>=0&&this.showSearch(I(a.results)>=h)}},showSearch:function(b){this.showSearchInput=b,this.dropdown.find(".select2-search").toggleClass("select2-search-hidden",!b),this.dropdown.find(".select2-search").toggleClass("select2-offscreen",!b),a(this.dropdown,this.container).toggleClass("select2-with-searchbox",b)},onSelect:function(a,b){if(this.triggerSelect(a)){var c=this.opts.element.val(),d=this.data();this.opts.element.val(this.id(a)),this.updateSelection(a),this.opts.element.trigger({type:"select2-selected",val:this.id(a),choice:a}),this.close(),b&&b.noFocus||this.selection.focus(),o(c,this.id(a))||this.triggerChange({added:a,removed:d})}},updateSelection:function(a){var d,c=this.selection.find("span");this.selection.data("select2-data",a),c.empty(),d=this.opts.formatSelection(a,c),d!==b&&c.append(this.opts.escapeMarkup(d)),this.selection.removeClass("select2-default"),this.opts.allowClear&&this.getPlaceholder()!==b&&this.container.addClass("select2-allowclear")},val:function(){var a,c=!1,d=null,e=this,f=this.data();if(0===arguments.length)return this.opts.element.val();if(a=arguments[0],arguments.length>1&&(c=arguments[1]),this.select)this.select.val(a).find(":selected").each2(function(a,b){return d=e.optionToData(b),!1}),this.updateSelection(d),this.setPlaceholder(),c&&this.triggerChange({added:d,removed:f});else{if(this.opts.initSelection===b)throw Error("cannot call val() if initSelection() is not defined");if(!a&&0!==a)return this.clear(c),b;this.opts.element.val(a),this.opts.initSelection(this.opts.element,function(a){e.opts.element.val(a?e.id(a):""),e.updateSelection(a),e.setPlaceholder(),c&&e.triggerChange({added:a,removed:f})})}},clearSearch:function(){this.search.val(""),this.focusser.val("")},data:function(a,c){var d;return 0===arguments.length?(d=this.selection.data("select2-data"),d==b&&(d=null),d):(a&&""!==a?(d=this.data(),this.opts.element.val(a?this.id(a):""),this.updateSelection(a),c&&this.triggerChange({added:a,removed:d})):this.clear(c),b)}}),f=K(d,{createContainer:function(){var b=a(document.createElement("div")).attr({"class":"select2-container select2-container-multi"}).html([" <ul class='select2-choices'>"," <li class='select2-search-field'>"," <input type='text' autocomplete='off' autocorrect='off' autocapitilize='off' spellcheck='false' class='select2-input'>"," </li>","</ul>","<div class='select2-drop select2-drop-multi select2-display-none'>"," <ul class='select2-results'>"," </ul>","</div>"].join(""));
22
+ return b},prepareOpts:function(){var b=this.parent.prepareOpts.apply(this,arguments),c=this;return"select"===b.element.get(0).tagName.toLowerCase()?b.initSelection=function(a,b){var d=[];a.find(":selected").each2(function(a,b){d.push(c.optionToData(b))}),b(d)}:"data"in b&&(b.initSelection=b.initSelection||function(c,d){var e=p(c.val(),b.separator),f=[];b.query({matcher:function(c,d,g){var h=a.grep(e,function(a){return o(a,b.id(g))}).length;return h&&f.push(g),h},callback:a.isFunction(d)?function(){for(var a=[],c=0;e.length>c;c++)for(var g=e[c],h=0;f.length>h;h++){var i=f[h];if(o(g,b.id(i))){a.push(i),f.splice(h,1);break}}d(a)}:a.noop})}),b},selectChoice:function(a){var b=this.container.find(".select2-search-choice-focus");b.length&&a&&a[0]==b[0]||(b.length&&this.opts.element.trigger("choice-deselected",b),b.removeClass("select2-search-choice-focus"),a&&a.length&&(this.close(),a.addClass("select2-search-choice-focus"),this.opts.element.trigger("choice-selected",a)))},initContainer:function(){var e,d=".select2-choices";this.searchContainer=this.container.find(".select2-search-field"),this.selection=e=this.container.find(d);var f=this;this.selection.on("mousedown",".select2-search-choice",function(){f.search[0].focus(),f.selectChoice(a(this))}),this.search.attr("id","s2id_autogen"+g()),a("label[for='"+this.opts.element.attr("id")+"']").attr("for",this.search.attr("id")),this.search.on("input paste",this.bind(function(){this.isInterfaceEnabled()&&(this.opened()||this.open())})),this.search.attr("tabindex",this.elementTabIndex),this.keydowns=0,this.search.on("keydown",this.bind(function(a){if(this.isInterfaceEnabled()){++this.keydowns;var d=e.find(".select2-search-choice-focus"),f=d.prev(".select2-search-choice:not(.select2-locked)"),g=d.next(".select2-search-choice:not(.select2-locked)"),h=x(this.search);if(d.length&&(a.which==c.LEFT||a.which==c.RIGHT||a.which==c.BACKSPACE||a.which==c.DELETE||a.which==c.ENTER)){var i=d;return a.which==c.LEFT&&f.length?i=f:a.which==c.RIGHT?i=g.length?g:null:a.which===c.BACKSPACE?(this.unselect(d.first()),this.search.width(10),i=f.length?f:g):a.which==c.DELETE?(this.unselect(d.first()),this.search.width(10),i=g.length?g:null):a.which==c.ENTER&&(i=null),this.selectChoice(i),y(a),i&&i.length||this.open(),b}if((a.which===c.BACKSPACE&&1==this.keydowns||a.which==c.LEFT)&&0==h.offset&&!h.length)return this.selectChoice(e.find(".select2-search-choice:not(.select2-locked)").last()),y(a),b;if(this.selectChoice(null),this.opened())switch(a.which){case c.UP:case c.DOWN:return this.moveHighlight(a.which===c.UP?-1:1),y(a),b;case c.ENTER:return this.selectHighlighted(),y(a),b;case c.TAB:return this.selectHighlighted({noFocus:!0}),b;case c.ESC:return this.cancel(a),y(a),b}if(a.which!==c.TAB&&!c.isControl(a)&&!c.isFunctionKey(a)&&a.which!==c.BACKSPACE&&a.which!==c.ESC){if(a.which===c.ENTER){if(this.opts.openOnEnter===!1)return;if(a.altKey||a.ctrlKey||a.shiftKey||a.metaKey)return}this.open(),(a.which===c.PAGE_UP||a.which===c.PAGE_DOWN)&&y(a),a.which===c.ENTER&&y(a)}}})),this.search.on("keyup",this.bind(function(){this.keydowns=0,this.resizeSearch()})),this.search.on("blur",this.bind(function(b){this.container.removeClass("select2-container-active"),this.search.removeClass("select2-focused"),this.selectChoice(null),this.opened()||this.clearSearch(),b.stopImmediatePropagation(),this.opts.element.trigger(a.Event("select2-blur"))})),this.container.on("mousedown",d,this.bind(function(b){this.isInterfaceEnabled()&&(a(b.target).closest(".select2-search-choice").length>0||(this.selectChoice(null),this.clearPlaceholder(),this.container.hasClass("select2-container-active")||this.opts.element.trigger(a.Event("select2-focus")),this.open(),this.focusSearch(),b.preventDefault()))})),this.container.on("focus",d,this.bind(function(){this.isInterfaceEnabled()&&(this.container.hasClass("select2-container-active")||this.opts.element.trigger(a.Event("select2-focus")),this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"),this.clearPlaceholder())})),this.initContainerWidth(),this.opts.element.addClass("select2-offscreen"),this.clearSearch()},enableInterface:function(){this.parent.enableInterface.apply(this,arguments)&&this.search.prop("disabled",!this.isInterfaceEnabled())},initSelection:function(){if(""===this.opts.element.val()&&""===this.opts.element.text()&&(this.updateSelection([]),this.close(),this.clearSearch()),this.select||""!==this.opts.element.val()){var c=this;this.opts.initSelection.call(null,this.opts.element,function(a){a!==b&&null!==a&&(c.updateSelection(a),c.close(),c.clearSearch())})}},clearSearch:function(){var a=this.getPlaceholder(),c=this.getMaxSearchWidth();a!==b&&0===this.getVal().length&&this.search.hasClass("select2-focused")===!1?(this.search.val(a).addClass("select2-default"),this.search.width(c>0?c:this.container.css("width"))):this.search.val("").width(10)},clearPlaceholder:function(){this.search.hasClass("select2-default")&&this.search.val("").removeClass("select2-default")},opening:function(){this.clearPlaceholder(),this.resizeSearch(),this.parent.opening.apply(this,arguments),this.focusSearch(),this.updateResults(!0),this.search.focus(),this.opts.element.trigger(a.Event("select2-open"))},close:function(){this.opened()&&this.parent.close.apply(this,arguments)},focus:function(){this.close(),this.search.focus()},isFocused:function(){return this.search.hasClass("select2-focused")},updateSelection:function(b){var c=[],d=[],e=this;a(b).each(function(){0>m(e.id(this),c)&&(c.push(e.id(this)),d.push(this))}),b=d,this.selection.find(".select2-search-choice").remove(),a(b).each(function(){e.addSelectedChoice(this)}),e.postprocessResults()},tokenize:function(){var a=this.search.val();a=this.opts.tokenizer(a,this.data(),this.bind(this.onSelect),this.opts),null!=a&&a!=b&&(this.search.val(a),a.length>0&&this.open())},onSelect:function(a,b){this.triggerSelect(a)&&(this.addSelectedChoice(a),this.opts.element.trigger({type:"selected",val:this.id(a),choice:a}),(this.select||!this.opts.closeOnSelect)&&this.postprocessResults(),this.opts.closeOnSelect?(this.close(),this.search.width(10)):this.countSelectableResults()>0?(this.search.width(10),this.resizeSearch(),this.getMaximumSelectionSize()>0&&this.val().length>=this.getMaximumSelectionSize()&&this.updateResults(!0),this.positionDropdown()):(this.close(),this.search.width(10)),this.triggerChange({added:a}),b&&b.noFocus||this.focusSearch())},cancel:function(){this.close(),this.focusSearch()},addSelectedChoice:function(c){var j,d=!c.locked,e=a("<li class='select2-search-choice'> <div></div> <a href='#' onclick='return false;' class='select2-search-choice-close' tabindex='-1'></a></li>"),f=a("<li class='select2-search-choice select2-locked'><div></div></li>"),g=d?e:f,h=this.id(c),i=this.getVal();j=this.opts.formatSelection(c,g.find("div")),j!=b&&g.find("div").replaceWith("<div title='"+this.opts.escapeMarkup(j)+"'>"+this.opts.escapeMarkup(j)+"</div>"),d&&g.find(".select2-search-choice-close").on("mousedown",y).on("click dblclick",this.bind(function(b){this.isInterfaceEnabled()&&(a(b.target).closest(".select2-search-choice").fadeOut("fast",this.bind(function(){this.unselect(a(b.target)),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus"),this.close(),this.focusSearch()})).dequeue(),y(b))})).on("focus",this.bind(function(){this.isInterfaceEnabled()&&(this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"))})),g.data("select2-data",c),g.insertBefore(this.searchContainer),i.push(h),this.setVal(i)},unselect:function(a){var c,d,b=this.getVal();if(a=a.closest(".select2-search-choice"),0===a.length)throw"Invalid argument: "+a+". Must be .select2-search-choice";c=a.data("select2-data"),c&&(d=m(this.id(c),b),d>=0&&(b.splice(d,1),this.setVal(b),this.select&&this.postprocessResults()),a.remove(),this.opts.element.trigger({type:"removed",val:this.id(c),choice:c}),this.triggerChange({removed:c}))},postprocessResults:function(a,b,c){var d=this.getVal(),e=this.results.find(".select2-result"),f=this.results.find(".select2-result-with-children"),g=this;e.each2(function(a,b){var c=g.id(b.data("select2-data"));m(c,d)>=0&&(b.addClass("select2-selected"),b.find(".select2-result-selectable").addClass("select2-selected"))}),f.each2(function(a,b){b.is(".select2-result-selectable")||0!==b.find(".select2-result-selectable:not(.select2-selected)").length||b.addClass("select2-selected")}),-1==this.highlight()&&c!==!1&&g.highlight(0),!this.opts.createSearchChoice&&!e.filter(".select2-result:not(.select2-selected)").length>0&&this.results.append("<li class='select2-no-results'>"+g.opts.formatNoMatches(g.search.val())+"</li>")},getMaxSearchWidth:function(){return this.selection.width()-q(this.search)},resizeSearch:function(){var a,b,c,d,e,f=q(this.search);a=A(this.search)+10,b=this.search.offset().left,c=this.selection.width(),d=this.selection.offset().left,e=c-(b-d)-f,a>e&&(e=c-f),40>e&&(e=c-f),0>=e&&(e=a),this.search.width(e)},getVal:function(){var a;return this.select?(a=this.select.val(),null===a?[]:a):(a=this.opts.element.val(),p(a,this.opts.separator))},setVal:function(b){var c;this.select?this.select.val(b):(c=[],a(b).each(function(){0>m(this,c)&&c.push(this)}),this.opts.element.val(0===c.length?"":c.join(this.opts.separator)))},buildChangeDetails:function(a,b){for(var b=b.slice(0),a=a.slice(0),c=0;b.length>c;c++)for(var d=0;a.length>d;d++)o(this.opts.id(b[c]),this.opts.id(a[d]))&&(b.splice(c,1),c--,a.splice(d,1),d--);return{added:b,removed:a}},val:function(c,d){var e,f=this;if(0===arguments.length)return this.getVal();if(e=this.data(),e.length||(e=[]),!c&&0!==c)return this.opts.element.val(""),this.updateSelection([]),this.clearSearch(),d&&this.triggerChange({added:this.data(),removed:e}),b;if(this.setVal(c),this.select)this.opts.initSelection(this.select,this.bind(this.updateSelection)),d&&this.triggerChange(this.buildChangeDetails(e,this.data()));else{if(this.opts.initSelection===b)throw Error("val() cannot be called if initSelection() is not defined");this.opts.initSelection(this.opts.element,function(b){var c=a(b).map(f.id);f.setVal(c),f.updateSelection(b),f.clearSearch(),d&&f.triggerChange(this.buildChangeDetails(e,this.data()))})}this.clearSearch()},onSortStart:function(){if(this.select)throw Error("Sorting of elements is not supported when attached to <select>. Attach to <input type='hidden'/> instead.");this.search.width(0),this.searchContainer.hide()},onSortEnd:function(){var b=[],c=this;this.searchContainer.show(),this.searchContainer.appendTo(this.searchContainer.parent()),this.resizeSearch(),this.selection.find(".select2-search-choice").each(function(){b.push(c.opts.id(a(this).data("select2-data")))}),this.setVal(b),this.triggerChange()},data:function(c,d){var f,g,e=this;return 0===arguments.length?this.selection.find(".select2-search-choice").map(function(){return a(this).data("select2-data")}).get():(g=this.data(),c||(c=[]),f=a.map(c,function(a){return e.opts.id(a)}),this.setVal(f),this.updateSelection(c),this.clearSearch(),d&&this.triggerChange(this.buildChangeDetails(g,this.data())),b)}}),a.fn.select2=function(){var d,g,h,i,c=Array.prototype.slice.call(arguments,0),j=["val","destroy","opened","open","close","focus","isFocused","container","onSortStart","onSortEnd","enable","readonly","positionDropdown","data"],k=["val","opened","isFocused","container","data"];return this.each(function(){if(0===c.length||"object"==typeof c[0])d=0===c.length?{}:a.extend({},c[0]),d.element=a(this),"select"===d.element.get(0).tagName.toLowerCase()?i=d.element.prop("multiple"):(i=d.multiple||!1,"tags"in d&&(d.multiple=i=!0)),g=i?new f:new e,g.init(d);else{if("string"!=typeof c[0])throw"Invalid arguments to select2 plugin: "+c;if(0>m(c[0],j))throw"Unknown method: "+c[0];if(h=b,g=a(this).data("select2"),g===b)return;if(h="container"===c[0]?g.container:g[c[0]].apply(g,c.slice(1)),m(c[0],k)>=0)return!1}}),h===b?this:h},a.fn.select2.defaults={width:"copy",loadMorePadding:0,closeOnSelect:!0,openOnEnter:!0,containerCss:{},dropdownCss:{},containerCssClass:"",dropdownCssClass:"",formatResult:function(a,b,c,d){var e=[];return C(a.text,c.term,e,d),e.join("")},formatSelection:function(a){return a?a.text:b},sortResults:function(a){return a},formatResultCssClass:function(){return b},formatNoMatches:function(){return"No matches found"},formatInputTooShort:function(a,b){var c=b-a.length;return"Please enter "+c+" more character"+(1==c?"":"s")},formatInputTooLong:function(a,b){var c=a.length-b;return"Please delete "+c+" character"+(1==c?"":"s")},formatSelectionTooBig:function(a){return"You can only select "+a+" item"+(1==a?"":"s")},formatLoadMore:function(){return"Loading more results..."},formatSearching:function(){return"Searching..."},minimumResultsForSearch:0,minimumInputLength:0,maximumInputLength:null,maximumSelectionSize:0,id:function(a){return a.id},matcher:function(a,b){return(""+b).toUpperCase().indexOf((""+a).toUpperCase())>=0},separator:",",tokenSeparators:[],tokenizer:J,escapeMarkup:function(a){var b={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return(a+"").replace(/[&<>"'\/\\]/g,function(a){return b[a]})},blurOnChange:!1,selectOnBlur:!1,adaptContainerCssClass:function(a){return a},adaptDropdownCssClass:function(){return null}},a.fn.select2.ajaxDefaults={transport:a.ajax,params:{type:"GET",cache:!1,dataType:"json"}},window.Select2={query:{ajax:D,local:E,tags:F},util:{debounce:t,markMatch:C},"class":{"abstract":d,single:e,multi:f}}}}(jQuery);
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Select2 Catalan translation.
3
+ *
4
+ * Author: David Planella <david.planella@gmail.com>
5
+ */
6
+ (function ($) {
7
+ "use strict";
8
+
9
+ $.extend($.fn.select2.defaults, {
10
+ formatNoMatches: function () { return "No s'ha trobat cap coincidència"; },
11
+ formatInputTooShort: function (input, min) { var n = min - input.length; return "Introduïu " + n + " caràcter" + (n == 1 ? "" : "s") + " més"; },
12
+ formatInputTooLong: function (input, max) { var n = input.length - max; return "Introduïu " + n + " caràcter" + (n == 1? "" : "s") + "menys"; },
13
+ formatSelectionTooBig: function (limit) { return "Només podeu seleccionar " + limit + " element" + (limit == 1 ? "" : "s"); },
14
+ formatLoadMore: function (pageNumber) { return "S'estan carregant més resultats..."; },
15
+ formatSearching: function () { return "S'està cercant..."; }
16
+ });
17
+ })(jQuery);
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Select2 Czech translation.
3
+ *
4
+ * Author: Michal Marek <ahoj@michal-marek.cz>
5
+ * Author - sklonovani: David Vallner <david@vallner.net>
6
+ */
7
+ (function ($) {
8
+ "use strict";
9
+ // use text for the numbers 2 through 4
10
+ var smallNumbers = {
11
+ 2: function(masc) { return (masc ? "dva" : "dvě"); },
12
+ 3: function() { return "tři"; },
13
+ 4: function() { return "čtyři"; }
14
+ }
15
+ $.extend($.fn.select2.defaults, {
16
+ formatNoMatches: function () { return "Nenalezeny žádné položky"; },
17
+ formatInputTooShort: function (input, min) {
18
+ var n = min - input.length;
19
+ if (n == 1) {
20
+ return "Prosím zadejte ještě jeden znak";
21
+ } else if (n <= 4) {
22
+ return "Prosím zadejte ještě další "+smallNumbers[n](true)+" znaky";
23
+ } else {
24
+ return "Prosím zadejte ještě dalších "+n+" znaků";
25
+ }
26
+ },
27
+ formatInputTooLong: function (input, max) {
28
+ var n = input.length - max;
29
+ if (n == 1) {
30
+ return "Prosím zadejte o jeden znak méně";
31
+ } else if (n <= 4) {
32
+ return "Prosím zadejte o "+smallNumbers[n](true)+" znaky méně";
33
+ } else {
34
+ return "Prosím zadejte o "+n+" znaků méně";
35
+ }
36
+ },
37
+ formatSelectionTooBig: function (limit) {
38
+ if (limit == 1) {
39
+ return "Můžete zvolit jen jednu položku";
40
+ } else if (limit <= 4) {
41
+ return "Můžete zvolit maximálně "+smallNumbers[limit](false)+" položky";
42
+ } else {
43
+ return "Můžete zvolit maximálně "+limit+" položek";
44
+ }
45
+ },
46
+ formatLoadMore: function (pageNumber) { return "Načítavají se další výsledky..."; },
47
+ formatSearching: function () { return "Vyhledávání..."; }
48
+ });
49
+ })(jQuery);
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Select2 Danish translation.
3
+ *
4
+ * Author: Anders Jenbo <anders@jenbo.dk>
5
+ */
6
+ (function ($) {
7
+ "use strict";
8
+
9
+ $.extend($.fn.select2.defaults, {
10
+ formatNoMatches: function () { return "Ingen resultater fundet"; },
11
+ formatInputTooShort: function (input, min) { var n = min - input.length; return "Angiv venligst " + n + " tegn mere"; },
12
+ formatInputTooLong: function (input, max) { var n = input.length - max; return "Angiv venligst " + n + " tegn mindre"; },
13
+ formatSelectionTooBig: function (limit) { return "Du kan kun vælge " + limit + " emne" + (limit === 1 ? "" : "r"); },
14
+ formatLoadMore: function (pageNumber) { return "Indlæser flere resultater…"; },
15
+ formatSearching: function () { return "Søger…"; }
16
+ });
17
+ })(jQuery);
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Select2 German translation
3
+ */
4
+ (function ($) {
5
+ "use strict";
6
+
7
+ $.extend($.fn.select2.defaults, {
8
+ formatNoMatches: function () { return "Keine Übereinstimmungen gefunden"; },
9
+ formatInputTooShort: function (input, min) { var n = min - input.length; return "Bitte " + n + " Zeichen mehr eingeben"; },
10
+ formatInputTooLong: function (input, max) { var n = input.length - max; return "Bitte " + n + " Zeichen weniger eingeben"; },
11
+ formatSelectionTooBig: function (limit) { return "Sie können nur " + limit + " Eintr" + (limit === 1 ? "ag" : "äge") + " auswählen"; },
12
+ formatLoadMore: function (pageNumber) { return "Lade mehr Ergebnisse..."; },
13
+ formatSearching: function () { return "Suche..."; }
14
+ });
15
+ })(jQuery);
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Select2 <Language> translation.
3
+ *
4
+ * Author: Your Name <your@email>
5
+ */
6
+ (function ($) {
7
+ "use strict";
8
+
9
+ $.extend($.fn.select2.defaults, {
10
+ formatNoMatches: function () { return "No matches found"; },
11
+ formatInputTooShort: function (input, min) { var n = min - input.length; return "Please enter " + n + " more character" + (n == 1 ? "" : "s"); },
12
+ formatInputTooLong: function (input, max) { var n = input.length - max; return "Please enter " + n + " less character" + (n == 1? "" : "s"); },
13
+ formatSelectionTooBig: function (limit) { return "You can only select " + limit + " item" + (limit == 1 ? "" : "s"); },
14
+ formatLoadMore: function (pageNumber) { return "Loading more results..."; },
15
+ formatSearching: function () { return "Searching..."; }
16
+ });
17
+ })(jQuery);
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Select2 Spanish translation
3
+ */
4
+ (function ($) {
5
+ "use strict";
6
+
7
+ $.extend($.fn.select2.defaults, {
8
+ formatNoMatches: function () { return "No se encontraron resultados"; },
9
+ formatInputTooShort: function (input, min) { var n = min - input.length; return "Por favor adicione " + n + " caracter" + (n == 1? "" : "es"); },
10
+ formatInputTooLong: function (input, max) { var n = input.length - max; return "Por favor elimine " + n + " caracter" + (n == 1? "" : "es"); },
11
+ formatSelectionTooBig: function (limit) { return "Solo puede seleccionar " + limit + " elemento" + (limit == 1 ? "" : "s"); },
12
+ formatLoadMore: function (pageNumber) { return "Cargando más resultados..."; },
13
+ formatSearching: function () { return "Buscando..."; }
14
+ });
15
+ })(jQuery);
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Select2 Estonian translation.
3
+ *
4
+ * Author: Kuldar Kalvik <kuldar@kalvik.ee>
5
+ */
6
+ (function ($) {
7
+ "use strict";
8
+
9
+ $.extend($.fn.select2.defaults, {
10
+ formatNoMatches: function () { return "Tulemused puuduvad"; },
11
+ formatInputTooShort: function (input, min) { var n = min - input.length; return "Sisesta " + n + " täht" + (n == 1 ? "" : "e") + " rohkem"; },
12
+ formatInputTooLong: function (input, max) { var n = input.length - max; return "Sisesta " + n + " täht" + (n == 1? "" : "e") + " vähem"; },
13
+ formatSelectionTooBig: function (limit) { return "Saad vaid " + limit + " tulemus" + (limit == 1 ? "e" : "t") + " valida"; },
14
+ formatLoadMore: function (pageNumber) { return "Laen tulemusi.."; },
15
+ formatSearching: function () { return "Otsin.."; }
16
+ });
17
+ })(jQuery);
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Select2 Basque translation.
3
+ *
4
+ * Author: Julen Ruiz Aizpuru <julenx at gmail dot com>
5
+ */
6
+ (function ($) {
7
+ "use strict";
8
+
9
+ $.extend($.fn.select2.defaults, {
10
+ formatNoMatches: function () {
11
+ return "Ez da bat datorrenik aurkitu";
12
+ },
13
+ formatInputTooShort: function (input, min) {
14
+ var n = min - input.length;
15
+ if (n === 1) {
16
+ return "Idatzi karaktere bat gehiago";
17
+ } else {
18
+ return "Idatzi " + n + " karaktere gehiago";
19
+ }
20
+ },
21
+ formatInputTooLong: function (input, max) {
22
+ var n = input.length - max;
23
+ if (n === 1) {
24
+ return "Idatzi karaktere bat gutxiago";
25
+ } else {
26
+ return "Idatzi " + n + " karaktere gutxiago";
27
+ }
28
+ },
29
+ formatSelectionTooBig: function (limit) {
30
+ if (limit === 1 ) {
31
+ return "Elementu bakarra hauta dezakezu";
32
+ } else {
33
+ return limit + " elementu hauta ditzakezu soilik";
34
+ }
35
+ },
36
+ formatLoadMore: function (pageNumber) {
37
+ return "Emaitza gehiago kargatzen...";
38
+ },
39
+ formatSearching: function () {
40
+ return "Bilatzen...";
41
+ }
42
+ });
43
+ })(jQuery);
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Select2 French translation
3
+ */
4
+ (function ($) {
5
+ "use strict";
6
+
7
+ $.extend($.fn.select2.defaults, {
8
+ formatNoMatches: function () { return "Aucun r&eacute;sultat trouv&eacute;"; },
9
+ formatInputTooShort: function (input, min) { var n = min - input.length; return "Merci de saisir " + n + " caract&egrave;re" + (n == 1? "" : "s") + " de plus"; },
10
+ formatInputTooLong: function (input, max) { var n = input.length - max; return "Merci de saisir " + n + " caract&egrave;re" + (n == 1? "" : "s") + " de moins"; },
11
+ formatSelectionTooBig: function (limit) { return "Vous pouvez seulement s&eacute;lectionner " + limit + " &eacute;l&eacute;ment" + (limit == 1 ? "" : "s"); },
12
+ formatLoadMore: function (pageNumber) { return "Chargement de r&eacute;sultats suppl&eacute;mentaires..."; },
13
+ formatSearching: function () { return "Recherche en cours..."; }
14
+ });
15
+ })(jQuery);
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Select2 Galician translation
3
+ *
4
+ * Author: Leandro Regueiro <leandro.regueiro@gmail.com>
5
+ */
6
+ (function ($) {
7
+ "use strict";
8
+
9
+ $.extend($.fn.select2.defaults, {
10
+ formatNoMatches: function () {
11
+ return "Non se atoparon resultados";
12
+ },
13
+ formatInputTooShort: function (input, min) {
14
+ var n = min - input.length;
15
+ if (n === 1) {
16
+ return "Engada un carácter";
17
+ } else {
18
+ return "Engada " + n + " caracteres";
19
+ }
20
+ },
21
+ formatInputTooLong: function (input, max) {
22
+ var n = input.length - max;
23
+ if (n === 1) {
24
+ return "Elimine un carácter";
25
+ } else {
26
+ return "Elimine " + n + " caracteres";
27
+ }
28
+ },
29
+ formatSelectionTooBig: function (limit) {
30
+ if (limit === 1 ) {
31
+ return "Só pode seleccionar un elemento";
32
+ } else {
33
+ return "Só pode seleccionar " + limit + " elementos";
34
+ }
35
+ },
36
+ formatLoadMore: function (pageNumber) {
37
+ return "Cargando máis resultados...";
38
+ },
39
+ formatSearching: function () {
40
+ return "Buscando...";
41
+ }
42
+ });
43
+ })(jQuery);
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Select2 Hebrew translation.
3
+ *
4
+ * Author: Yakir Sitbon <http://www.yakirs.net/>
5
+ */
6
+ (function ($) {
7
+ "use strict";
8
+
9
+ $.extend($.fn.select2.defaults, {
10
+ formatNoMatches: function () { return "לא נמצאו התאמות"; },
11
+ formatInputTooShort: function (input, min) { var n = min - input.length; return "נא להזין עוד " + n + " תווים נוספים"; },
12
+ formatInputTooLong: function (input, max) { var n = input.length - max; return "נא להזין פחות " + n + " תווים"; },
13
+ formatSelectionTooBig: function (limit) { return "ניתן לבחור " + limit + " פריטים"; },
14
+ formatLoadMore: function (pageNumber) { return "טוען תוצאות נוספות..."; },
15
+ formatSearching: function () { return "מחפש..."; }
16
+ });
17
+ })(jQuery);
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Select2 Croatian translation.
3
+ *
4
+ * Author: Edi Modrić <edi.modric@gmail.com>
5
+ */
6
+ (function ($) {
7
+ "use strict";
8
+
9
+ var specialNumbers = {
10
+ 1: function(n) { return (n % 100 != 11 ? "znak" : "znakova"); },
11
+ 2: function(n) { return (n % 100 != 12 ? "znaka" : "znakova"); },
12
+ 3: function(n) { return (n % 100 != 13 ? "znaka" : "znakova"); },
13
+ 4: function(n) { return (n % 100 != 14 ? "znaka" : "znakova"); }
14
+ };
15
+
16
+ $.extend($.fn.select2.defaults, {
17
+ formatNoMatches: function () { return "Nema rezultata"; },
18
+ formatInputTooShort: function (input, min) {
19
+ var n = min - input.length;
20
+ var nMod10 = n % 10;
21
+
22
+ if (nMod10 > 0 && nMod10 < 5) {
23
+ return "Unesite još " + n + " " + specialNumbers[nMod10](n);
24
+ }
25
+
26
+ return "Unesite još " + n + " znakova";
27
+ },
28
+ formatInputTooLong: function (input, max) {
29
+ var n = input.length - max;
30
+ var nMod10 = n % 10;
31
+
32
+ if (nMod10 > 0 && nMod10 < 5) {
33
+ return "Unesite " + n + " " + specialNumbers[nMod10](n) + " manje";
34
+ }
35
+
36
+ return "Unesite " + n + " znakova manje";
37
+ },
38
+ formatSelectionTooBig: function (limit) { return "Maksimalan broj odabranih stavki je " + limit; },
39
+ formatLoadMore: function (pageNumber) { return "Učitavanje rezultata..."; },
40
+ formatSearching: function () { return "Pretraga..."; }
41
+ });
42
+ })(jQuery);
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Select2 Hungarian translation
3
+ */
4
+ (function ($) {
5
+ "use strict";
6
+
7
+ $.extend($.fn.select2.defaults, {
8
+ formatNoMatches: function () { return "Nincs találat."; },
9
+ formatInputTooShort: function (input, min) { var n = min - input.length; return "Túl rövid. Még " + n + " karakter hiányzik."; },
10
+ formatInputTooLong: function (input, max) { var n = input.length - max; return "Túl hosszú. " + n + " kerekterrel több mint kellene."; },
11
+ formatSelectionTooBig: function (limit) { return "Csak " + limit + " elemet lehet kiválasztani."; },
12
+ formatLoadMore: function (pageNumber) { return "Töltés..."; },
13
+ formatSearching: function () { return "Keresés..."; }
14
+ });
15
+ })(jQuery);
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Select2 Icelandic translation.
3
+ *
4
+ */
5
+ (function ($) {
6
+ "use strict";
7
+
8
+ $.extend($.fn.select2.defaults, {
9
+ formatNoMatches: function () { return "Ekkert fannst"; },
10
+ formatInputTooShort: function (input, min) { var n = min - input.length; return "Vinsamlegast skrifið " + n + " staf" + (n == 1 ? "" : "i") + " í viðbót"; },
11
+ formatInputTooLong: function (input, max) { var n = input.length - max; return "Vinsamlegast styttið texta um " + n + " staf" + (n == 1 ? "" : "i"); },
12
+ formatSelectionTooBig: function (limit) { return "Þú getur aðeins valið " + limit + " atriði"; },
13
+ formatLoadMore: function (pageNumber) { return "Sæki fleiri niðurstöður..."; },
14
+ formatSearching: function () { return "Leita..."; }
15
+ });
16
+ })(jQuery);
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Select2 Italian translation
3
+ */
4
+ (function ($) {
5
+ "use strict";
6
+
7
+ $.extend($.fn.select2.defaults, {
8
+ formatNoMatches: function () { return "Nessuna corrispondenza trovata"; },
9
+ formatInputTooShort: function (input, min) { var n = min - input.length; return "Inserisci ancora " + n + " caratter" + (n == 1? "e" : "i"); },
10
+ formatInputTooLong: function (input, max) { var n = input.length - max; return "Inserisci " + n + " caratter" + (n == 1? "e" : "i") + " in meno"; },
11
+ formatSelectionTooBig: function (limit) { return "Puoi selezionare solo " + limit + " element" + (limit == 1 ? "o" : "i"); },
12
+ formatLoadMore: function (pageNumber) { return "Caricamento in corso..."; },
13
+ formatSearching: function () { return "Ricerca..."; }
14
+ });
15
+ })(jQuery);
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Select2 Japanese translation.
3
+ */
4
+ (function ($) {
5
+ "use strict";
6
+
7
+ $.extend($.fn.select2.defaults, {
8
+ formatNoMatches: function () { return "該当項目なし"; },
9
+ formatInputTooShort: function (input, min) { var n = min - input.length; return "後" + n + "文字入れてください"; },
10
+ formatInputTooLong: function (input, max) { var n = input.length - max; return "検索文字列が" + n + "文字長すぎます"; },
11
+ formatSelectionTooBig: function (limit) { return "最多で" + limit + "項目までしか選択できません"; },
12
+ formatLoadMore: function (pageNumber) { return "読込中・・・"; },
13
+ formatSearching: function () { return "検索中・・・"; }
14
+ });
15
+ })(jQuery);
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Select2 lithuanian translation.
3
+ *
4
+ * Author: CRONUS Karmalakas <cronus dot karmalakas at gmail dot com>
5
+ */
6
+ (function ($) {
7
+ "use strict";
8
+
9
+ $.extend($.fn.select2.defaults, {
10
+ formatNoMatches: function () { return "Atitikmenų nerasta"; },
11
+ formatInputTooShort: function (input, min) {
12
+ var n = min - input.length,
13
+ suffix = (n % 10 == 1) && (n % 100 != 11) ? 'į' : (((n % 10 >= 2) && ((n % 100 < 10) || (n % 100 >= 20))) ? 'ius' : 'ių');
14
+ return "Įrašykite dar " + n + " simbol" + suffix;
15
+ },
16
+ formatInputTooLong: function (input, max) {
17
+ var n = input.length - max,
18
+ suffix = (n % 10 == 1) && (n % 100 != 11) ? 'į' : (((n % 10 >= 2) && ((n % 100 < 10) || (n % 100 >= 20))) ? 'ius' : 'ių');
19
+ return "Pašalinkite " + n + " simbol" + suffix;
20
+ },
21
+ formatSelectionTooBig: function (limit) {
22
+ var n = limit,
23
+ suffix = (n % 10 == 1) && (n % 100 != 11) ? 'ą' : (((n % 10 >= 2) && ((n % 100 < 10) || (n % 100 >= 20))) ? 'us' : 'ų');
24
+ return "Jūs galite pasirinkti tik " + limit + " element" + suffix;
25
+ },
26
+ formatLoadMore: function (pageNumber) { return "Kraunama daugiau rezultatų..."; },
27
+ formatSearching: function () { return "Ieškoma..."; }
28
+ });
29
+ })(jQuery);