locomotivecms 3.0.0.rc4 → 3.0.0.rc5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (185) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +2 -2
  3. data/app/api/locomotive/api/resources/content_type_resource.rb +16 -1
  4. data/app/api/locomotive/api/resources/page_resource.rb +9 -4
  5. data/app/api/locomotive/api/resources/snippet_resource.rb +17 -2
  6. data/app/api/locomotive/api/resources/theme_asset_resource.rb +11 -0
  7. data/app/api/locomotive/api/resources/translation_resource.rb +16 -1
  8. data/app/assets/javascripts/locomotive.js +1 -0
  9. data/app/assets/javascripts/locomotive/{not_logged_in.js.coffee → account.js.coffee} +1 -0
  10. data/app/assets/javascripts/locomotive/views/shared/form_view.js.coffee +2 -2
  11. data/app/assets/stylesheets/locomotive/{unauthorized.scss → account.scss} +7 -8
  12. data/app/assets/stylesheets/locomotive/{unauthorized → account}/_forms.scss +19 -0
  13. data/app/assets/stylesheets/locomotive/{unauthorized → account}/_keyframes.scss +0 -0
  14. data/app/assets/stylesheets/locomotive/{unauthorized → account}/_notify.scss +3 -1
  15. data/app/assets/stylesheets/locomotive/{unauthorized → account}/_public.scss +98 -10
  16. data/app/assets/stylesheets/locomotive/{unauthorized → account}/_type.scss +0 -0
  17. data/app/assets/stylesheets/locomotive/{unauthorized → account}/_variables.scss +1 -1
  18. data/app/assets/stylesheets/locomotive/application.scss +1 -1
  19. data/app/assets/stylesheets/locomotive/base/_form.scss +1 -0
  20. data/app/assets/stylesheets/locomotive/base/form/_tags.scss +17 -0
  21. data/app/assets/stylesheets/locomotive/error.scss +1 -1
  22. data/app/assets/stylesheets/locomotive/layouts/_error.scss +33 -0
  23. data/app/controllers/locomotive/concerns/site_dispatcher_controller.rb +1 -2
  24. data/app/controllers/locomotive/passwords_controller.rb +1 -1
  25. data/app/controllers/locomotive/registrations_controller.rb +1 -1
  26. data/app/controllers/locomotive/sessions_controller.rb +1 -1
  27. data/app/controllers/locomotive/sites_controller.rb +1 -1
  28. data/app/helpers/locomotive/custom_fields_helper.rb +8 -2
  29. data/app/models/locomotive/editable_element.rb +2 -2
  30. data/app/policies/locomotive/application_policy.rb +4 -0
  31. data/app/policies/locomotive/content_type_policy.rb +4 -0
  32. data/app/policies/locomotive/site_policy.rb +1 -1
  33. data/app/policies/locomotive/snippet_policy.rb +4 -0
  34. data/app/policies/locomotive/theme_asset_policy.rb +4 -0
  35. data/app/policies/locomotive/translation_policy.rb +4 -0
  36. data/app/views/locomotive/current_site/_membership.html.slim +20 -19
  37. data/app/views/locomotive/layouts/{not_logged_in.html.slim → account.html.slim} +8 -3
  38. data/app/views/locomotive/passwords/edit.html.slim +2 -2
  39. data/app/views/locomotive/passwords/new.html.slim +2 -4
  40. data/app/views/locomotive/registrations/new.html.slim +2 -2
  41. data/app/views/locomotive/sessions/new.html.slim +2 -2
  42. data/app/views/locomotive/shared/header/_site.html.slim +1 -1
  43. data/app/views/locomotive/sites/_navigation.slim +5 -0
  44. data/app/views/locomotive/sites/_site.html.slim +6 -16
  45. data/app/views/locomotive/sites/index.html.slim +12 -19
  46. data/app/views/locomotive/sites/new.html.slim +13 -8
  47. data/config/locales/en.yml +8 -4
  48. data/lib/locomotive/engine.rb +2 -2
  49. data/lib/locomotive/version.rb +1 -1
  50. data/spec/lib/locomotive/steam/services/liquid_parser_with_cache_service_spec.rb +1 -1
  51. data/spec/models/locomotive/content_entry_spec.rb +1 -1
  52. data/spec/models/locomotive/editable_element_spec.rb +26 -0
  53. data/spec/requests/locomotive/steam/cache_spec.rb +1 -1
  54. data/spec/support/capybara.rb +3 -3
  55. data/spec/support/features/session_helpers.rb +2 -3
  56. data/vendor/assets/{stylesheets/locomotive → components/locomotive/bootstrap-tagsinput}/bootstrap-tagsinput.css +16 -7
  57. data/vendor/assets/components/locomotive/bootstrap-tagsinput/bootstrap-tagsinput.js +663 -0
  58. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/Gruntfile.js +82 -0
  59. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/LICENSE +20 -0
  60. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/README.md +92 -0
  61. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/bootstrap-tagsinput.jquery.json +27 -0
  62. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/bower.json +42 -0
  63. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/dist/bootstrap-tagsinput-angular.js +87 -0
  64. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/dist/bootstrap-tagsinput-angular.min.js +7 -0
  65. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/dist/bootstrap-tagsinput-angular.min.js.map +1 -0
  66. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/dist/bootstrap-tagsinput-typeahead.css +49 -0
  67. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/dist/bootstrap-tagsinput.css +55 -0
  68. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/dist/bootstrap-tagsinput.js +663 -0
  69. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/dist/bootstrap-tagsinput.less +50 -0
  70. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/dist/bootstrap-tagsinput.min.js +7 -0
  71. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/dist/bootstrap-tagsinput.min.js.map +1 -0
  72. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/dist/bootstrap-tagsinput.zip +0 -0
  73. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/examples/assets/app.css +67 -0
  74. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/examples/assets/app.js +15 -0
  75. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/examples/assets/app_bs2.js +74 -0
  76. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/examples/assets/app_bs3.js +95 -0
  77. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/examples/assets/cities.json +16 -0
  78. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/examples/assets/citynames.json +16 -0
  79. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/examples/bootstrap-2.3.2.html +666 -0
  80. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/examples/index.html +742 -0
  81. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/karma.conf.js +20 -0
  82. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/package.json +47 -0
  83. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/src/bootstrap-tagsinput-angular.js +87 -0
  84. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/src/bootstrap-tagsinput-typeahead.css +49 -0
  85. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/src/bootstrap-tagsinput.css +55 -0
  86. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/src/bootstrap-tagsinput.js +663 -0
  87. data/vendor/assets/components/locomotive_sources/jquery/MIT-LICENSE.txt +21 -0
  88. data/vendor/assets/components/locomotive_sources/jquery/bower.json +28 -0
  89. data/vendor/assets/components/locomotive_sources/jquery/dist/jquery.js +9210 -0
  90. data/vendor/assets/components/locomotive_sources/jquery/dist/jquery.min.js +5 -0
  91. data/vendor/assets/components/locomotive_sources/jquery/dist/jquery.min.map +1 -0
  92. data/vendor/assets/components/locomotive_sources/jquery/src/ajax.js +786 -0
  93. data/vendor/assets/components/locomotive_sources/jquery/src/ajax/jsonp.js +89 -0
  94. data/vendor/assets/components/locomotive_sources/jquery/src/ajax/load.js +75 -0
  95. data/vendor/assets/components/locomotive_sources/jquery/src/ajax/parseJSON.js +13 -0
  96. data/vendor/assets/components/locomotive_sources/jquery/src/ajax/parseXML.js +28 -0
  97. data/vendor/assets/components/locomotive_sources/jquery/src/ajax/script.js +64 -0
  98. data/vendor/assets/components/locomotive_sources/jquery/src/ajax/var/nonce.js +5 -0
  99. data/vendor/assets/components/locomotive_sources/jquery/src/ajax/var/rquery.js +3 -0
  100. data/vendor/assets/components/locomotive_sources/jquery/src/ajax/xhr.js +136 -0
  101. data/vendor/assets/components/locomotive_sources/jquery/src/attributes.js +11 -0
  102. data/vendor/assets/components/locomotive_sources/jquery/src/attributes/attr.js +141 -0
  103. data/vendor/assets/components/locomotive_sources/jquery/src/attributes/classes.js +158 -0
  104. data/vendor/assets/components/locomotive_sources/jquery/src/attributes/prop.js +94 -0
  105. data/vendor/assets/components/locomotive_sources/jquery/src/attributes/support.js +35 -0
  106. data/vendor/assets/components/locomotive_sources/jquery/src/attributes/val.js +161 -0
  107. data/vendor/assets/components/locomotive_sources/jquery/src/callbacks.js +205 -0
  108. data/vendor/assets/components/locomotive_sources/jquery/src/core.js +502 -0
  109. data/vendor/assets/components/locomotive_sources/jquery/src/core/access.js +60 -0
  110. data/vendor/assets/components/locomotive_sources/jquery/src/core/init.js +123 -0
  111. data/vendor/assets/components/locomotive_sources/jquery/src/core/parseHTML.js +39 -0
  112. data/vendor/assets/components/locomotive_sources/jquery/src/core/ready.js +97 -0
  113. data/vendor/assets/components/locomotive_sources/jquery/src/core/var/rsingleTag.js +4 -0
  114. data/vendor/assets/components/locomotive_sources/jquery/src/css.js +450 -0
  115. data/vendor/assets/components/locomotive_sources/jquery/src/css/addGetHookIf.js +22 -0
  116. data/vendor/assets/components/locomotive_sources/jquery/src/css/curCSS.js +57 -0
  117. data/vendor/assets/components/locomotive_sources/jquery/src/css/defaultDisplay.js +70 -0
  118. data/vendor/assets/components/locomotive_sources/jquery/src/css/hiddenVisibleSelectors.js +15 -0
  119. data/vendor/assets/components/locomotive_sources/jquery/src/css/support.js +96 -0
  120. data/vendor/assets/components/locomotive_sources/jquery/src/css/swap.js +28 -0
  121. data/vendor/assets/components/locomotive_sources/jquery/src/css/var/cssExpand.js +3 -0
  122. data/vendor/assets/components/locomotive_sources/jquery/src/css/var/getStyles.js +12 -0
  123. data/vendor/assets/components/locomotive_sources/jquery/src/css/var/isHidden.js +13 -0
  124. data/vendor/assets/components/locomotive_sources/jquery/src/css/var/rmargin.js +3 -0
  125. data/vendor/assets/components/locomotive_sources/jquery/src/css/var/rnumnonpx.js +5 -0
  126. data/vendor/assets/components/locomotive_sources/jquery/src/data.js +178 -0
  127. data/vendor/assets/components/locomotive_sources/jquery/src/data/Data.js +181 -0
  128. data/vendor/assets/components/locomotive_sources/jquery/src/data/accepts.js +20 -0
  129. data/vendor/assets/components/locomotive_sources/jquery/src/data/var/data_priv.js +5 -0
  130. data/vendor/assets/components/locomotive_sources/jquery/src/data/var/data_user.js +5 -0
  131. data/vendor/assets/components/locomotive_sources/jquery/src/deferred.js +149 -0
  132. data/vendor/assets/components/locomotive_sources/jquery/src/deprecated.js +13 -0
  133. data/vendor/assets/components/locomotive_sources/jquery/src/dimensions.js +50 -0
  134. data/vendor/assets/components/locomotive_sources/jquery/src/effects.js +648 -0
  135. data/vendor/assets/components/locomotive_sources/jquery/src/effects/Tween.js +114 -0
  136. data/vendor/assets/components/locomotive_sources/jquery/src/effects/animatedSelector.js +13 -0
  137. data/vendor/assets/components/locomotive_sources/jquery/src/event.js +868 -0
  138. data/vendor/assets/components/locomotive_sources/jquery/src/event/ajax.js +13 -0
  139. data/vendor/assets/components/locomotive_sources/jquery/src/event/alias.js +39 -0
  140. data/vendor/assets/components/locomotive_sources/jquery/src/event/support.js +9 -0
  141. data/vendor/assets/components/locomotive_sources/jquery/src/exports/amd.js +24 -0
  142. data/vendor/assets/components/locomotive_sources/jquery/src/exports/global.js +32 -0
  143. data/vendor/assets/components/locomotive_sources/jquery/src/intro.js +44 -0
  144. data/vendor/assets/components/locomotive_sources/jquery/src/jquery.js +37 -0
  145. data/vendor/assets/components/locomotive_sources/jquery/src/manipulation.js +580 -0
  146. data/vendor/assets/components/locomotive_sources/jquery/src/manipulation/_evalUrl.js +18 -0
  147. data/vendor/assets/components/locomotive_sources/jquery/src/manipulation/support.js +32 -0
  148. data/vendor/assets/components/locomotive_sources/jquery/src/manipulation/var/rcheckableType.js +3 -0
  149. data/vendor/assets/components/locomotive_sources/jquery/src/offset.js +207 -0
  150. data/vendor/assets/components/locomotive_sources/jquery/src/outro.js +1 -0
  151. data/vendor/assets/components/locomotive_sources/jquery/src/queue.js +142 -0
  152. data/vendor/assets/components/locomotive_sources/jquery/src/queue/delay.js +22 -0
  153. data/vendor/assets/components/locomotive_sources/jquery/src/selector-native.js +172 -0
  154. data/vendor/assets/components/locomotive_sources/jquery/src/selector-sizzle.js +14 -0
  155. data/vendor/assets/components/locomotive_sources/jquery/src/selector.js +1 -0
  156. data/vendor/assets/components/locomotive_sources/jquery/src/serialize.js +111 -0
  157. data/vendor/assets/components/locomotive_sources/jquery/src/sizzle/dist/sizzle.js +2067 -0
  158. data/vendor/assets/components/locomotive_sources/jquery/src/sizzle/dist/sizzle.min.js +3 -0
  159. data/vendor/assets/components/locomotive_sources/jquery/src/sizzle/dist/sizzle.min.map +1 -0
  160. data/vendor/assets/components/locomotive_sources/jquery/src/traversing.js +199 -0
  161. data/vendor/assets/components/locomotive_sources/jquery/src/traversing/findFilter.js +100 -0
  162. data/vendor/assets/components/locomotive_sources/jquery/src/traversing/var/rneedsContext.js +6 -0
  163. data/vendor/assets/components/locomotive_sources/jquery/src/var/arr.js +3 -0
  164. data/vendor/assets/components/locomotive_sources/jquery/src/var/class2type.js +4 -0
  165. data/vendor/assets/components/locomotive_sources/jquery/src/var/concat.js +5 -0
  166. data/vendor/assets/components/locomotive_sources/jquery/src/var/hasOwn.js +5 -0
  167. data/vendor/assets/components/locomotive_sources/jquery/src/var/indexOf.js +5 -0
  168. data/vendor/assets/components/locomotive_sources/jquery/src/var/pnum.js +3 -0
  169. data/vendor/assets/components/locomotive_sources/jquery/src/var/push.js +5 -0
  170. data/vendor/assets/components/locomotive_sources/jquery/src/var/rnotwhite.js +3 -0
  171. data/vendor/assets/components/locomotive_sources/jquery/src/var/slice.js +5 -0
  172. data/vendor/assets/components/locomotive_sources/jquery/src/var/strundefined.js +3 -0
  173. data/vendor/assets/components/locomotive_sources/jquery/src/var/support.js +4 -0
  174. data/vendor/assets/components/locomotive_sources/jquery/src/var/toString.js +5 -0
  175. data/vendor/assets/components/locomotive_sources/jquery/src/wrap.js +79 -0
  176. metadata +138 -23
  177. data/app/assets/stylesheets/locomotive/base/not_logged_in/_all.scss +0 -4
  178. data/app/assets/stylesheets/locomotive/base/not_logged_in/_buttons.scss +0 -10
  179. data/app/assets/stylesheets/locomotive/base/not_logged_in/_form.scss +0 -72
  180. data/app/assets/stylesheets/locomotive/base/not_logged_in/_messages.scss +0 -4
  181. data/app/assets/stylesheets/locomotive/base/not_logged_in/_typography.scss +0 -12
  182. data/app/assets/stylesheets/locomotive/components/not_logged_in/_passwords.scss +0 -9
  183. data/app/assets/stylesheets/locomotive/components/not_logged_in/_sign_in_and_up.scss +0 -34
  184. data/app/models/locomotive/concerns/page/render.rb +0 -99
  185. data/vendor/assets/javascripts/locomotive/bootstrap-tagsinput.min.js +0 -6
@@ -0,0 +1,50 @@
1
+ .bootstrap-tagsinput {
2
+ background-color: #fff;
3
+ border: 1px solid #ccc;
4
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
5
+ display: inline-block;
6
+ padding: 4px 6px;
7
+ margin-bottom: 10px;
8
+ color: #555;
9
+ vertical-align: middle;
10
+ border-radius: 4px;
11
+ max-width: 100%;
12
+ line-height: 22px;
13
+ cursor: text;
14
+
15
+ input {
16
+ border: none;
17
+ box-shadow: none;
18
+ outline: none;
19
+ background-color: transparent;
20
+ padding: 0;
21
+ margin: 0;
22
+ width: auto !important;
23
+ max-width: inherit;
24
+
25
+ &:focus {
26
+ border: none;
27
+ box-shadow: none;
28
+ }
29
+ }
30
+
31
+ .tag {
32
+ margin-right: 2px;
33
+ color: white;
34
+
35
+ [data-role="remove"] {
36
+ margin-left:8px;
37
+ cursor:pointer;
38
+ &:after{
39
+ content: "x";
40
+ padding:0px 2px;
41
+ }
42
+ &:hover {
43
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
44
+ &:active {
45
+ box-shadow: inset 0 3px 5px rgba(0,0,0,0.125);
46
+ }
47
+ }
48
+ }
49
+ }
50
+ }
@@ -0,0 +1,7 @@
1
+ /*
2
+ * bootstrap-tagsinput v0.7.1 by Tim Schlechter
3
+ *
4
+ */
5
+
6
+ !function(a){"use strict";function b(b,c){this.isInit=!0,this.itemsArray=[],this.$element=a(b),this.$element.hide(),this.isSelect="SELECT"===b.tagName,this.multiple=this.isSelect&&b.hasAttribute("multiple"),this.objectItems=c&&c.itemValue,this.placeholderText=b.hasAttribute("placeholder")?this.$element.attr("placeholder"):"",this.inputSize=Math.max(1,this.placeholderText.length),this.$container=a('<div class="bootstrap-tagsinput"></div>'),this.$input=a('<input type="text" placeholder="'+this.placeholderText+'"/>').appendTo(this.$container),this.$element.before(this.$container),this.build(c),this.isInit=!1}function c(a,b){if("function"!=typeof a[b]){var c=a[b];a[b]=function(a){return a[c]}}}function d(a,b){if("function"!=typeof a[b]){var c=a[b];a[b]=function(){return c}}}function e(a){return a?i.text(a).html():""}function f(a){var b=0;if(document.selection){a.focus();var c=document.selection.createRange();c.moveStart("character",-a.value.length),b=c.text.length}else(a.selectionStart||"0"==a.selectionStart)&&(b=a.selectionStart);return b}function g(b,c){var d=!1;return a.each(c,function(a,c){if("number"==typeof c&&b.which===c)return d=!0,!1;if(b.which===c.which){var e=!c.hasOwnProperty("altKey")||b.altKey===c.altKey,f=!c.hasOwnProperty("shiftKey")||b.shiftKey===c.shiftKey,g=!c.hasOwnProperty("ctrlKey")||b.ctrlKey===c.ctrlKey;if(e&&f&&g)return d=!0,!1}}),d}var h={tagClass:function(a){return"label label-info"},itemValue:function(a){return a?a.toString():a},itemText:function(a){return this.itemValue(a)},itemTitle:function(a){return null},freeInput:!0,addOnBlur:!0,maxTags:void 0,maxChars:void 0,confirmKeys:[13,44],delimiter:",",delimiterRegex:null,cancelConfirmKeysOnEmpty:!1,onTagExists:function(a,b){b.hide().fadeIn()},trimValue:!1,allowDuplicates:!1};b.prototype={constructor:b,add:function(b,c,d){var f=this;if(!(f.options.maxTags&&f.itemsArray.length>=f.options.maxTags)&&(b===!1||b)){if("string"==typeof b&&f.options.trimValue&&(b=a.trim(b)),"object"==typeof b&&!f.objectItems)throw"Can't add objects when itemValue option is not set";if(!b.toString().match(/^\s*$/)){if(f.isSelect&&!f.multiple&&f.itemsArray.length>0&&f.remove(f.itemsArray[0]),"string"==typeof b&&"INPUT"===this.$element[0].tagName){var g=f.options.delimiterRegex?f.options.delimiterRegex:f.options.delimiter,h=b.split(g);if(h.length>1){for(var i=0;i<h.length;i++)this.add(h[i],!0);return void(c||f.pushVal())}}var j=f.options.itemValue(b),k=f.options.itemText(b),l=f.options.tagClass(b),m=f.options.itemTitle(b),n=a.grep(f.itemsArray,function(a){return f.options.itemValue(a)===j})[0];if(!n||f.options.allowDuplicates){if(!(f.items().toString().length+b.length+1>f.options.maxInputLength)){var o=a.Event("beforeItemAdd",{item:b,cancel:!1,options:d});if(f.$element.trigger(o),!o.cancel){f.itemsArray.push(b);var p=a('<span class="tag '+e(l)+(null!==m?'" title="'+m:"")+'">'+e(k)+'<span data-role="remove"></span></span>');p.data("item",b),f.findInputWrapper().before(p),p.after(" ");var q=a('option[value="'+encodeURIComponent(j)+'"]',f.$element).length||a('option[value="'+e(j)+'"]',f.$element).length;if(f.isSelect&&!q){var r=a("<option selected>"+e(k)+"</option>");r.data("item",b),r.attr("value",j),f.$element.append(r)}c||f.pushVal(),(f.options.maxTags===f.itemsArray.length||f.items().toString().length===f.options.maxInputLength)&&f.$container.addClass("bootstrap-tagsinput-max"),a(".typeahead, .twitter-typeahead",f.$container).length&&f.$input.typeahead("val",""),this.isInit?f.$element.trigger(a.Event("itemAddedOnInit",{item:b,options:d})):f.$element.trigger(a.Event("itemAdded",{item:b,options:d}))}}}else if(f.options.onTagExists){var s=a(".tag",f.$container).filter(function(){return a(this).data("item")===n});f.options.onTagExists(b,s)}}}},remove:function(b,c,d){var e=this;if(e.objectItems&&(b="object"==typeof b?a.grep(e.itemsArray,function(a){return e.options.itemValue(a)==e.options.itemValue(b)}):a.grep(e.itemsArray,function(a){return e.options.itemValue(a)==b}),b=b[b.length-1]),b){var f=a.Event("beforeItemRemove",{item:b,cancel:!1,options:d});if(e.$element.trigger(f),f.cancel)return;a(".tag",e.$container).filter(function(){return a(this).data("item")===b}).remove(),a("option",e.$element).filter(function(){return a(this).data("item")===b}).remove(),-1!==a.inArray(b,e.itemsArray)&&e.itemsArray.splice(a.inArray(b,e.itemsArray),1)}c||e.pushVal(),e.options.maxTags>e.itemsArray.length&&e.$container.removeClass("bootstrap-tagsinput-max"),e.$element.trigger(a.Event("itemRemoved",{item:b,options:d}))},removeAll:function(){var b=this;for(a(".tag",b.$container).remove(),a("option",b.$element).remove();b.itemsArray.length>0;)b.itemsArray.pop();b.pushVal()},refresh:function(){var b=this;a(".tag",b.$container).each(function(){var c=a(this),d=c.data("item"),f=b.options.itemValue(d),g=b.options.itemText(d),h=b.options.tagClass(d);if(c.attr("class",null),c.addClass("tag "+e(h)),c.contents().filter(function(){return 3==this.nodeType})[0].nodeValue=e(g),b.isSelect){var i=a("option",b.$element).filter(function(){return a(this).data("item")===d});i.attr("value",f)}})},items:function(){return this.itemsArray},pushVal:function(){var b=this,c=a.map(b.items(),function(a){return b.options.itemValue(a).toString()});b.$element.val(c,!0).trigger("change")},build:function(b){var e=this;if(e.options=a.extend({},h,b),e.objectItems&&(e.options.freeInput=!1),c(e.options,"itemValue"),c(e.options,"itemText"),d(e.options,"tagClass"),e.options.typeahead){var i=e.options.typeahead||{};d(i,"source"),e.$input.typeahead(a.extend({},i,{source:function(b,c){function d(a){for(var b=[],d=0;d<a.length;d++){var g=e.options.itemText(a[d]);f[g]=a[d],b.push(g)}c(b)}this.map={};var f=this.map,g=i.source(b);a.isFunction(g.success)?g.success(d):a.isFunction(g.then)?g.then(d):a.when(g).then(d)},updater:function(a){return e.add(this.map[a]),this.map[a]},matcher:function(a){return-1!==a.toLowerCase().indexOf(this.query.trim().toLowerCase())},sorter:function(a){return a.sort()},highlighter:function(a){var b=new RegExp("("+this.query+")","gi");return a.replace(b,"<strong>$1</strong>")}}))}if(e.options.typeaheadjs){var j=null,k={},l=e.options.typeaheadjs;a.isArray(l)?(j=l[0],k=l[1]):k=l,e.$input.typeahead(j,k).on("typeahead:selected",a.proxy(function(a,b){k.valueKey?e.add(b[k.valueKey]):e.add(b),e.$input.typeahead("val","")},e))}e.$container.on("click",a.proxy(function(a){e.$element.attr("disabled")||e.$input.removeAttr("disabled"),e.$input.focus()},e)),e.options.addOnBlur&&e.options.freeInput&&e.$input.on("focusout",a.proxy(function(b){0===a(".typeahead, .twitter-typeahead",e.$container).length&&(e.add(e.$input.val()),e.$input.val(""))},e)),e.$container.on("keydown","input",a.proxy(function(b){var c=a(b.target),d=e.findInputWrapper();if(e.$element.attr("disabled"))return void e.$input.attr("disabled","disabled");switch(b.which){case 8:if(0===f(c[0])){var g=d.prev();g.length&&e.remove(g.data("item"))}break;case 46:if(0===f(c[0])){var h=d.next();h.length&&e.remove(h.data("item"))}break;case 37:var i=d.prev();0===c.val().length&&i[0]&&(i.before(d),c.focus());break;case 39:var j=d.next();0===c.val().length&&j[0]&&(j.after(d),c.focus())}var k=c.val().length;Math.ceil(k/5);c.attr("size",Math.max(this.inputSize,c.val().length))},e)),e.$container.on("keypress","input",a.proxy(function(b){var c=a(b.target);if(e.$element.attr("disabled"))return void e.$input.attr("disabled","disabled");var d=c.val(),f=e.options.maxChars&&d.length>=e.options.maxChars;e.options.freeInput&&(g(b,e.options.confirmKeys)||f)&&(0!==d.length&&(e.add(f?d.substr(0,e.options.maxChars):d),c.val("")),e.options.cancelConfirmKeysOnEmpty===!1&&b.preventDefault());var h=c.val().length;Math.ceil(h/5);c.attr("size",Math.max(this.inputSize,c.val().length))},e)),e.$container.on("click","[data-role=remove]",a.proxy(function(b){e.$element.attr("disabled")||e.remove(a(b.target).closest(".tag").data("item"))},e)),e.options.itemValue===h.itemValue&&("INPUT"===e.$element[0].tagName?e.add(e.$element.val()):a("option",e.$element).each(function(){e.add(a(this).attr("value"),!0)}))},destroy:function(){var a=this;a.$container.off("keypress","input"),a.$container.off("click","[role=remove]"),a.$container.remove(),a.$element.removeData("tagsinput"),a.$element.show()},focus:function(){this.$input.focus()},input:function(){return this.$input},findInputWrapper:function(){for(var b=this.$input[0],c=this.$container[0];b&&b.parentNode!==c;)b=b.parentNode;return a(b)}},a.fn.tagsinput=function(c,d,e){var f=[];return this.each(function(){var g=a(this).data("tagsinput");if(g)if(c||d){if(void 0!==g[c]){if(3===g[c].length&&void 0!==e)var h=g[c](d,null,e);else var h=g[c](d);void 0!==h&&f.push(h)}}else f.push(g);else g=new b(this,c),a(this).data("tagsinput",g),f.push(g),"SELECT"===this.tagName&&a("option",a(this)).attr("selected","selected"),a(this).val(a(this).val())}),"string"==typeof c?f.length>1?f:f[0]:f},a.fn.tagsinput.Constructor=b;var i=a("<div />");a(function(){a("input[data-role=tagsinput], select[multiple][data-role=tagsinput]").tagsinput()})}(window.jQuery);
7
+ //# sourceMappingURL=bootstrap-tagsinput.min.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/bootstrap-tagsinput.js"],"names":["$","TagsInput","element","options","this","isInit","itemsArray","$element","hide","isSelect","tagName","multiple","hasAttribute","objectItems","itemValue","placeholderText","attr","inputSize","Math","max","length","$container","$input","appendTo","before","build","makeOptionItemFunction","key","propertyName","item","makeOptionFunction","value","htmlEncode","htmlEncodeContainer","text","html","doGetCaretPosition","oField","iCaretPos","document","selection","focus","oSel","createRange","moveStart","selectionStart","keyCombinationInList","keyPressEvent","lookupList","found","each","index","keyCombination","which","alt","hasOwnProperty","altKey","shift","shiftKey","ctrl","ctrlKey","defaultOptions","tagClass","toString","itemText","itemTitle","freeInput","addOnBlur","maxTags","undefined","maxChars","confirmKeys","delimiter","delimiterRegex","cancelConfirmKeysOnEmpty","onTagExists","$tag","fadeIn","trimValue","allowDuplicates","prototype","constructor","add","dontPushVal","self","trim","match","remove","items","split","i","pushVal","existing","grep","maxInputLength","beforeItemAddEvent","Event","cancel","trigger","push","data","findInputWrapper","after","optionExists","encodeURIComponent","$option","append","addClass","typeahead","$existingTag","filter","other","beforeItemRemoveEvent","inArray","splice","removeClass","removeAll","pop","refresh","contents","nodeType","nodeValue","option","val","map","extend","source","query","process","processItems","texts","isFunction","success","then","when","updater","matcher","toLowerCase","indexOf","sorter","sort","highlighter","regex","RegExp","replace","typeaheadjs","typeaheadConfig","typeaheadDatasets","isArray","on","proxy","obj","datum","valueKey","event","removeAttr","target","$inputWrapper","prev","next","$prevTag","$nextTag","textLength","ceil","maxLengthReached","substr","preventDefault","closest","destroy","off","removeData","show","input","elt","container","parentNode","fn","tagsinput","arg1","arg2","arg3","results","retVal","Constructor","window","jQuery"],"mappings":";;;;;CAAA,SAAWA,GACT,YAiCA,SAASC,GAAUC,EAASC,GAC1BC,KAAKC,QAAS,EACdD,KAAKE,cAELF,KAAKG,SAAWP,EAAEE,GAClBE,KAAKG,SAASC,OAEdJ,KAAKK,SAAgC,WAApBP,EAAQQ,QACzBN,KAAKO,SAAYP,KAAKK,UAAYP,EAAQU,aAAa,YACvDR,KAAKS,YAAcV,GAAWA,EAAQW,UACtCV,KAAKW,gBAAkBb,EAAQU,aAAa,eAAiBR,KAAKG,SAASS,KAAK,eAAiB,GACjGZ,KAAKa,UAAYC,KAAKC,IAAI,EAAGf,KAAKW,gBAAgBK,QAElDhB,KAAKiB,WAAarB,EAAE,2CACpBI,KAAKkB,OAAStB,EAAE,mCAAqCI,KAAKW,gBAAkB,OAAOQ,SAASnB,KAAKiB,YAEjGjB,KAAKG,SAASiB,OAAOpB,KAAKiB,YAE1BjB,KAAKqB,MAAMtB,GACXC,KAAKC,QAAS,EAohBhB,QAASqB,GAAuBvB,EAASwB,GACvC,GAA4B,kBAAjBxB,GAAQwB,GAAqB,CACtC,GAAIC,GAAezB,EAAQwB,EAC3BxB,GAAQwB,GAAO,SAASE,GAAQ,MAAOA,GAAKD,KAGhD,QAASE,GAAmB3B,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B7B,IAAIgC,GAAsBjC,EAAE,UA2D5BA,GAAE,WACAA,EAAE,qEAAqEiL,eAExEO,OAAOC","file":"bootstrap-tagsinput.min.js"}
@@ -0,0 +1,67 @@
1
+ .icon-github {
2
+ background: no-repeat url('../img/github-16px.png');
3
+ width: 16px;
4
+ height: 16px;
5
+ }
6
+
7
+ .bootstrap-tagsinput {
8
+ width: 100%;
9
+ }
10
+
11
+ .accordion {
12
+ margin-bottom:-3px;
13
+ }
14
+
15
+ .accordion-group {
16
+ border: none;
17
+ }
18
+
19
+ .twitter-typeahead .tt-query,
20
+ .twitter-typeahead .tt-hint {
21
+ margin-bottom: 0;
22
+ }
23
+
24
+ .twitter-typeahead .tt-hint
25
+ {
26
+ display: none;
27
+ }
28
+
29
+ .tt-menu {
30
+ position: absolute;
31
+ top: 100%;
32
+ left: 0;
33
+ z-index: 1000;
34
+ display: none;
35
+ float: left;
36
+ min-width: 160px;
37
+ padding: 5px 0;
38
+ margin: 2px 0 0;
39
+ list-style: none;
40
+ font-size: 14px;
41
+ background-color: #ffffff;
42
+ border: 1px solid #cccccc;
43
+ border: 1px solid rgba(0, 0, 0, 0.15);
44
+ border-radius: 4px;
45
+ -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
46
+ box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
47
+ background-clip: padding-box;
48
+ cursor: pointer;
49
+ }
50
+
51
+ .tt-suggestion {
52
+ display: block;
53
+ padding: 3px 20px;
54
+ clear: both;
55
+ font-weight: normal;
56
+ line-height: 1.428571429;
57
+ color: #333333;
58
+ white-space: nowrap;
59
+ }
60
+
61
+ .tt-suggestion:hover,
62
+ .tt-suggestion:focus {
63
+ color: #ffffff;
64
+ text-decoration: none;
65
+ outline: 0;
66
+ background-color: #428bca;
67
+ }
@@ -0,0 +1,15 @@
1
+ $(function() {
2
+ $('input, select').on('change', function(event) {
3
+ var $element = $(event.target),
4
+ $container = $element.closest('.example');
5
+
6
+ if (!$element.data('tagsinput'))
7
+ return;
8
+
9
+ var val = $element.val();
10
+ if (val === null)
11
+ val = "null";
12
+ $('code', $('pre.val', $container)).html( ($.isArray(val) ? JSON.stringify(val) : "\"" + val.replace('"', '\\"') + "\"") );
13
+ $('code', $('pre.items', $container)).html(JSON.stringify($element.tagsinput('items')));
14
+ }).trigger('change');
15
+ });
@@ -0,0 +1,74 @@
1
+ $('.example_typeahead > > input').tagsinput({
2
+ typeahead: {
3
+ source: function(query) {
4
+ return $.getJSON('assets/citynames.json');
5
+ }
6
+ }
7
+ });
8
+
9
+ $('.example_objects_as_tags > > input').tagsinput({
10
+ itemValue: 'value',
11
+ itemText: 'text',
12
+ typeahead: {
13
+ source: function(query) {
14
+ return $.getJSON('assets/cities.json');
15
+ }
16
+ }
17
+ });
18
+ $('.example_objects_as_tags > > input').tagsinput('add', { "value": 1 , "text": "Amsterdam" , "continent": "Europe" });
19
+ $('.example_objects_as_tags > > input').tagsinput('add', { "value": 4 , "text": "Washington" , "continent": "America" });
20
+ $('.example_objects_as_tags > > input').tagsinput('add', { "value": 7 , "text": "Sydney" , "continent": "Australia" });
21
+ $('.example_objects_as_tags > > input').tagsinput('add', { "value": 10, "text": "Beijing" , "continent": "Asia" });
22
+ $('.example_objects_as_tags > > input').tagsinput('add', { "value": 13, "text": "Cairo" , "continent": "Africa" });
23
+
24
+ $('.example_tagclass > > input').tagsinput({
25
+ tagClass: function(item) {
26
+ switch (item.continent) {
27
+ case 'Europe' : return 'label label-info';
28
+ case 'America' : return 'label label-danger label-important';
29
+ case 'Australia': return 'label label-success';
30
+ case 'Africa' : return 'label';
31
+ case 'Asia' : return 'label label-warning';
32
+ }
33
+ },
34
+ itemValue: 'value',
35
+ itemText: 'text',
36
+ typeahead: {
37
+ source: function(query) {
38
+ return $.getJSON('assets/cities.json');
39
+ }
40
+ }
41
+ });
42
+ $('.example_tagclass > > input').tagsinput('add', { "value": 1 , "text": "Amsterdam" , "continent": "Europe" });
43
+ $('.example_tagclass > > input').tagsinput('add', { "value": 4 , "text": "Washington" , "continent": "America" });
44
+ $('.example_tagclass > > input').tagsinput('add', { "value": 7 , "text": "Sydney" , "continent": "Australia" });
45
+ $('.example_tagclass > > input').tagsinput('add', { "value": 10, "text": "Beijing" , "continent": "Asia" });
46
+ $('.example_tagclass > > input').tagsinput('add', { "value": 13, "text": "Cairo" , "continent": "Africa" });
47
+
48
+ angular.module('AngularExample', ['bootstrap-tagsinput'])
49
+ .controller('CityTagsInputController',
50
+ function CityTagsInputController($scope, $http) {
51
+ // Init with some cities
52
+ $scope.cities = [
53
+ { "value": 1 , "text": "Amsterdam" , "continent": "Europe" },
54
+ { "value": 4 , "text": "Washington" , "continent": "America" },
55
+ { "value": 7 , "text": "Sydney" , "continent": "Australia" },
56
+ { "value": 10, "text": "Beijing" , "continent": "Asia" },
57
+ { "value": 13, "text": "Cairo" , "continent": "Africa" }
58
+ ];
59
+
60
+ $scope.queryCities = function(query) {
61
+ return $http.get('assets/cities.json');
62
+ };
63
+
64
+ $scope.getTagClass = function(city) {
65
+ switch (city.continent) {
66
+ case 'Europe' : return 'label label-info';
67
+ case 'America' : return 'label label-danger label-important';
68
+ case 'Australia': return 'label label-success';
69
+ case 'Africa' : return 'label';
70
+ case 'Asia' : return 'label label-warning';
71
+ }
72
+ };
73
+ }
74
+ );
@@ -0,0 +1,95 @@
1
+ var citynames = new Bloodhound({
2
+ datumTokenizer: Bloodhound.tokenizers.obj.whitespace('name'),
3
+ queryTokenizer: Bloodhound.tokenizers.whitespace,
4
+ prefetch: {
5
+ url: 'assets/citynames.json',
6
+ filter: function(list) {
7
+ return $.map(list, function(cityname) {
8
+ return { name: cityname }; });
9
+ }
10
+ }
11
+ });
12
+ citynames.initialize();
13
+
14
+ var cities = new Bloodhound({
15
+ datumTokenizer: Bloodhound.tokenizers.obj.whitespace('text'),
16
+ queryTokenizer: Bloodhound.tokenizers.whitespace,
17
+ prefetch: 'assets/cities.json'
18
+ });
19
+ cities.initialize();
20
+
21
+ /**
22
+ * Typeahead
23
+ */
24
+ var elt = $('.example_typeahead > > input');
25
+ elt.tagsinput({
26
+ typeaheadjs: {
27
+ name: 'citynames',
28
+ displayKey: 'name',
29
+ valueKey: 'name',
30
+ source: citynames.ttAdapter()
31
+ }
32
+ });
33
+
34
+ /**
35
+ * Objects as tags
36
+ */
37
+ elt = $('.example_objects_as_tags > > input');
38
+ elt.tagsinput({
39
+ itemValue: 'value',
40
+ itemText: 'text',
41
+ typeaheadjs: {
42
+ name: 'cities',
43
+ displayKey: 'text',
44
+ source: cities.ttAdapter()
45
+ }
46
+ });
47
+
48
+ elt.tagsinput('add', { "value": 1 , "text": "Amsterdam" , "continent": "Europe" });
49
+ elt.tagsinput('add', { "value": 4 , "text": "Washington" , "continent": "America" });
50
+ elt.tagsinput('add', { "value": 7 , "text": "Sydney" , "continent": "Australia" });
51
+ elt.tagsinput('add', { "value": 10, "text": "Beijing" , "continent": "Asia" });
52
+ elt.tagsinput('add', { "value": 13, "text": "Cairo" , "continent": "Africa" });
53
+
54
+ /**
55
+ * Categorizing tags
56
+ */
57
+ elt = $('.example_tagclass > > input');
58
+ elt.tagsinput({
59
+ tagClass: function(item) {
60
+ switch (item.continent) {
61
+ case 'Europe' : return 'label label-primary';
62
+ case 'America' : return 'label label-danger label-important';
63
+ case 'Australia': return 'label label-success';
64
+ case 'Africa' : return 'label label-default';
65
+ case 'Asia' : return 'label label-warning';
66
+ }
67
+ },
68
+ itemValue: 'value',
69
+ itemText: 'text',
70
+ // typeaheadjs: {
71
+ // name: 'cities',
72
+ // displayKey: 'text',
73
+ // source: cities.ttAdapter()
74
+ // }
75
+ typeaheadjs: [
76
+ {
77
+ hint: true,
78
+ highlight: true,
79
+ minLength: 2
80
+ },
81
+ {
82
+ name: 'cities',
83
+ displayKey: 'text',
84
+ source: cities.ttAdapter()
85
+ }
86
+ ]
87
+ });
88
+ elt.tagsinput('add', { "value": 1 , "text": "Amsterdam" , "continent": "Europe" });
89
+ elt.tagsinput('add', { "value": 4 , "text": "Washington" , "continent": "America" });
90
+ elt.tagsinput('add', { "value": 7 , "text": "Sydney" , "continent": "Australia" });
91
+ elt.tagsinput('add', { "value": 10, "text": "Beijing" , "continent": "Asia" });
92
+ elt.tagsinput('add', { "value": 13, "text": "Cairo" , "continent": "Africa" });
93
+
94
+ // HACK: overrule hardcoded display inline-block of typeahead.js
95
+ $(".twitter-typeahead").css('display', 'inline');
@@ -0,0 +1,16 @@
1
+ [ { "value": 1 , "text": "Amsterdam" , "continent": "Europe" },
2
+ { "value": 2 , "text": "London" , "continent": "Europe" },
3
+ { "value": 3 , "text": "Paris" , "continent": "Europe" },
4
+ { "value": 4 , "text": "Washington" , "continent": "America" },
5
+ { "value": 5 , "text": "Mexico City" , "continent": "America" },
6
+ { "value": 6 , "text": "Buenos Aires", "continent": "America" },
7
+ { "value": 7 , "text": "Sydney" , "continent": "Australia" },
8
+ { "value": 8 , "text": "Wellington" , "continent": "Australia" },
9
+ { "value": 9 , "text": "Canberra" , "continent": "Australia" },
10
+ { "value": 10, "text": "Beijing" , "continent": "Asia" },
11
+ { "value": 11, "text": "New Delhi" , "continent": "Asia" },
12
+ { "value": 12, "text": "Kathmandu" , "continent": "Asia" },
13
+ { "value": 13, "text": "Cairo" , "continent": "Africa" },
14
+ { "value": 14, "text": "Cape Town" , "continent": "Africa" },
15
+ { "value": 15, "text": "Kinshasa" , "continent": "Africa" }
16
+ ]
@@ -0,0 +1,16 @@
1
+ [ "Amsterdam",
2
+ "London",
3
+ "Paris",
4
+ "Washington",
5
+ "New York",
6
+ "Los Angeles",
7
+ "Sydney",
8
+ "Melbourne",
9
+ "Canberra",
10
+ "Beijing",
11
+ "New Delhi",
12
+ "Kathmandu",
13
+ "Cairo",
14
+ "Cape Town",
15
+ "Kinshasa"
16
+ ]
@@ -0,0 +1,666 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Bootstrap Tags Input</title>
5
+ <meta name="robots" content="index, follow" />
6
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
7
+
8
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.3.2/css/bootstrap.min.css">
9
+ <link rel="stylesheet" href="../dist/bootstrap-tagsinput.css">
10
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/rainbow/1.2.0/themes/github.css">
11
+ <link rel="stylesheet" href="http://getbootstrap.com/2.3.2/assets/css/docs.css">
12
+ <link rel="stylesheet" href="assets/app.css">
13
+ <style>
14
+ .accordion { margin-top:-19px; }
15
+ </style>
16
+ <script>
17
+ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
18
+ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
19
+ m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
20
+ })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
21
+ ga('create', 'UA-42755476-1', 'timschlechter.github.io');
22
+ ga('send', 'pageview');
23
+ </script>
24
+ </head>
25
+ <body>
26
+ <div id="fb-root"></div>
27
+ <div class="navbar navbar-inverse navbar-fixed-top bs-docs-nav">
28
+ <div class="navbar-inner">
29
+ <div class="container">
30
+ <div class="nav-collapse collapse bs-navbar-collapse">
31
+ <ul class="nav navbar-nav">
32
+ <li>
33
+ <a href="https://github.com/timschlechter/bootstrap-tagsinput">Code on Github</a>
34
+ </li>
35
+ <li>
36
+ <a href=".">Bootstrap 3</a>
37
+ </li>
38
+ <li>
39
+ <a href="http://timschlechter.github.io/bootstrap-tagsinput/dist/bootstrap-tagsinput.zip">Download <small>(latest)</small></a>
40
+ </li>
41
+ </ul>
42
+ <p class="navbar-text pull-right">
43
+ <a href="https://twitter.com/share" class="navbar-link twitter-share-button"
44
+ data-hashtags="bootstraptagsinput">Tweet</a>
45
+ <script>!function (d, s, id) {
46
+ var js, fjs = d.getElementsByTagName(s)[0];
47
+ if (!d.getElementById(id)) {
48
+ js = d.createElement(s);
49
+ js.id = id;
50
+ js.src = "//platform.twitter.com/widgets.js";
51
+ fjs.parentNode.insertBefore(js, fjs);
52
+ }
53
+ }(document, "script", "twitter-wjs");</script>
54
+
55
+ <!-- Place this tag where you want the +1 button to render. -->
56
+ <a class="navbar-link g-plusone" data-size="medium"></a>
57
+
58
+ <!-- Place this tag after the last +1 button tag. -->
59
+ <script type="text/javascript">
60
+ (function () {
61
+ var po = document.createElement('script');
62
+ po.type = 'text/javascript';
63
+ po.async = true;
64
+ po.src = 'https://apis.google.com/js/plusone.js';
65
+ var s = document.getElementsByTagName('script')[0];
66
+ s.parentNode.insertBefore(po, s);
67
+ })();
68
+ </script>
69
+ <script>(function(d, s, id) {
70
+ var js, fjs = d.getElementsByTagName(s)[0];
71
+ if (d.getElementById(id)) return;
72
+ js = d.createElement(s); js.id = id;
73
+ js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=122064240555";
74
+ fjs.parentNode.insertBefore(js, fjs);
75
+ }(document, 'script', 'facebook-jssdk'));</script>
76
+ <a class="navbar-link fb-like" data-href="http://timschlechter.github.io/bootstrap-tagsinput/examples/" data-width="110" data-layout="button_count" data-show-faces="true" data-send="false"></a>
77
+ </p>
78
+ </div>
79
+ </div>
80
+ </div>
81
+ </div>
82
+ <header class="jumbotron subhead">
83
+ <div class="container">
84
+ <h1>Bootstrap Tags Input</h1>
85
+ <p>jQuery plugin providing a Twitter Bootstrap user interface for managing tags</p>
86
+ </header>
87
+ <div class="container">
88
+ <section id="examples">
89
+ <div class="page-header">
90
+ <h2>Examples</h2>
91
+ </div>
92
+
93
+ <div class="example example_markup">
94
+ <h3>Markup</h3>
95
+ <p>
96
+ Just add <code>data-role="tagsinput"</code> to your input field to automatically change it to a tags input field.
97
+ </p>
98
+ <div class="bs-docs-example">
99
+ <input type="text" value="Amsterdam,Washington,Sydney,Beijing,Cairo" data-role="tagsinput" placeholder="Add tags" />
100
+ </div>
101
+ <div class="accordion">
102
+ <div class="accordion-group">
103
+ <div class="accordion-heading">
104
+ <a class="accordion-toggle" data-toggle="collapse" href="#accordion_example_markup">
105
+ Show code
106
+ </a>
107
+ </div>
108
+ <div id="accordion_example_markup" class="accordion-body collapse">
109
+ <div class="accordion-inner">
110
+ <pre><code data-language="html">&lt;input type=&quot;text&quot; value=&quot;Amsterdam,Washington,Sydney,Beijing,Cairo&quot; data-role=&quot;tagsinput&quot; placeholder=&quot;Add tags&quot; /&gt;</code></pre>
111
+ </div>
112
+ </div>
113
+ </div>
114
+ </div>
115
+ <table class="table table-bordered table-condensed"><thead><tr><th>statement</th><th>returns</th></tr></thead><tbody><tr><td><code>$("input").val()</code></td><td><pre class="val"><code data-language="javascript"></code></pre></td></tr><tr><td><code>$("input").tagsinput('items')</code></td><td><pre class="items"><code data-language="javascript"></code></pre></td></tr></tbody></table>
116
+ </div>
117
+
118
+ <div class="example example_multivalue">
119
+ <h3>True multi value</h3>
120
+ <p>
121
+ Use a <code>&lt;select multiple /&gt;</code> as your input element for a tags input, to gain true multivalue support. Instead of a comma separated string, the values will be set in an array. Existing <code>&lt;option /&gt;</code> elements will automatically be set as tags. This makes it also possible to create tags containing a comma.
122
+ </p>
123
+ <div class="bs-docs-example">
124
+ <select multiple data-role="tagsinput">
125
+ <option value="Amsterdam">Amsterdam</option>
126
+ <option value="Washington">Washington</option>
127
+ <option value="Sydney">Sydney</option>
128
+ <option value="Beijing">Beijing</option>
129
+ <option value="Cairo">Cairo</option>
130
+ </select>
131
+ </div>
132
+ <div class="accordion ">
133
+ <div class="accordion-group">
134
+ <div class="accordion-heading">
135
+ <a class="accordion-toggle" data-toggle="collapse" href="#example_multivalue">
136
+ Show code
137
+ </a>
138
+ </div>
139
+ <div id="example_multivalue" class="accordion-body collapse">
140
+ <div class="accordion-inner">
141
+ <pre><code data-language="html">&lt;select multiple data-role="tagsinput"&gt;
142
+ &lt;option value="Amsterdam"&gt;Amsterdam&lt;/option&gt;
143
+ &lt;option value="Washington"&gt;Washington&lt;/option&gt;
144
+ &lt;option value="Sydney"&gt;Sydney&lt;/option&gt;
145
+ &lt;option value="Beijing"&gt;Beijing&lt;/option&gt;
146
+ &lt;option value="Cairo"&gt;Cairo&lt;/option&gt;
147
+ &lt;/select&gt;</code></pre>
148
+ </div>
149
+ </div>
150
+ </div>
151
+ </div>
152
+ <table class="table table-bordered table-condensed"><thead><tr><th>statement</th><th>returns</th></tr></thead><tbody><tr><td><code>$("select").val()</code></td><td><pre class="val"><code data-language="javascript"></code></pre></td></tr><tr><td><code>$("select").tagsinput('items')</code></td><td><pre class="items"><code data-language="javascript"></code></pre></td></tr></tbody></table>
153
+ </div>
154
+
155
+ <div class="example example_typeahead">
156
+ <h3>Typeahead</h3>
157
+ <div class="bs-docs-example">
158
+ <input type="text" value="Amsterdam,Washington" />
159
+ </div>
160
+ <div class="accordion ">
161
+ <div class="accordion-group">
162
+ <div class="accordion-heading">
163
+ <a class="accordion-toggle" data-toggle="collapse"href="#example_typeahead">
164
+ Show code
165
+ </a>
166
+ </div>
167
+ <div id="example_typeahead" class="accordion-body collapse">
168
+ <div class="accordion-inner">
169
+ <pre><code data-language="html">&lt;input type=&quot;text&quot; value=&quot;Amsterdam,Washington&quot; data-role=&quot;tagsinput&quot; /&gt;
170
+ &lt;script&gt;
171
+ $('input').tagsinput({
172
+ typeahead: {
173
+ source: function(query) {
174
+ return $.getJSON('citynames.json');
175
+ }
176
+ }
177
+ });
178
+ &lt;/script&gt;</code></pre>
179
+ </div>
180
+ </div>
181
+ </div>
182
+ </div>
183
+ <table class="table table-bordered table-condensed"><thead><tr><th>statement</th><th>returns</th></tr></thead><tbody><tr><td><code>$("input").val()</code></td><td><pre class="val"><code data-language="javascript"></code></pre></td></tr><tr><td><code>$("input").tagsinput('items')</code></td><td><pre class="items"><code data-language="javascript"></code></pre></td></tr></tbody></table>
184
+ </div>
185
+
186
+ <div class="example example_objects_as_tags">
187
+ <h3>Objects as tags</h3>
188
+ <p>
189
+ Instead of just adding strings as tags, bind objects to your tags. This makes it possible to set id values in your input field's value, instead of just the tag's text.
190
+ </p>
191
+ <div class="bs-docs-example">
192
+ <input type="text" />
193
+ </div>
194
+ <div class="accordion">
195
+ <div class="accordion-group">
196
+ <div class="accordion-heading">
197
+ <a class="accordion-toggle" data-toggle="collapse" href="#accordion_example_objects_as_tags">
198
+ Show code
199
+ </a>
200
+ </div>
201
+ <div id="accordion_example_objects_as_tags" class="accordion-body collapse">
202
+ <div class="accordion-inner">
203
+ <pre><code data-language="html">&lt;input type=&quot;text&quot; /&gt;
204
+ &lt;script&gt;
205
+ $('input').tagsinput({
206
+ itemValue: 'value',
207
+ itemText: 'text',
208
+ typeahead: {
209
+ source: function(query) {
210
+ return $.getJSON('cities.json');
211
+ }
212
+ }
213
+ });
214
+
215
+ $('input').tagsinput('add', { "value": 1 , "text": "Amsterdam" });
216
+ $('input').tagsinput('add', { "value": 4 , "text": "Washington" });
217
+ $('input').tagsinput('add', { "value": 7 , "text": "Sydney" });
218
+ $('input').tagsinput('add', { "value": 10, "text": "Beijing" });
219
+ $('input').tagsinput('add', { "value": 13, "text": "Cairo" });
220
+ &lt;/script&gt;</code></pre>
221
+ </div>
222
+ </div>
223
+ </div>
224
+ </div>
225
+ <table class="table table-bordered table-condensed"><thead><tr><th>statement</th><th>returns</th></tr></thead><tbody><tr><td><code>$("input").val()</code></td><td><pre class="val"><code data-language="javascript"></code></pre></td></tr><tr><td><code>$("input").tagsinput('items')</code></td><td><pre class="items"><code data-language="javascript"></code></pre></td></tr></tbody></table>
226
+ </div>
227
+
228
+ <div class="example example_tagclass">
229
+ <h3>Categorizing tags</h3>
230
+ <p>
231
+ You can set a fixed css class for your tags, or determine dynamically by providing a custom function.
232
+ </p>
233
+ <div class="bs-docs-example">
234
+ <input type="text" />
235
+ </div>
236
+ <div class="accordion">
237
+ <div class="accordion-group">
238
+ <div class="accordion-heading">
239
+ <a class="accordion-toggle" data-toggle="collapse" href="#accordion_example_tagclass">
240
+ Show code
241
+ </a>
242
+ </div>
243
+ <div id="accordion_example_tagclass" class="accordion-body collapse">
244
+ <div class="accordion-inner">
245
+ <pre><code data-language="html">&lt;input type=&quot;text&quot; /&gt;
246
+ &lt;script&gt;
247
+ $('input').tagsinput({
248
+ tagClass: function(item) {
249
+ switch (item.continent) {
250
+ case 'Europe' : return 'label label-info';
251
+ case 'America' : return 'label label-important';
252
+ case 'Australia': return 'label label-success';
253
+ case 'Africa' : return 'badge badge-inverse';
254
+ case 'Asia' : return 'badge badge-warning';
255
+ }
256
+ },
257
+ itemValue: 'value',
258
+ itemText: 'text',
259
+ typeahead: {
260
+ source: function(query) {
261
+ return $.getJSON('cities.json');
262
+ }
263
+ }
264
+ });
265
+
266
+ $('input').tagsinput('add', { "value": 1 , "text": "Amsterdam" , "continent": "Europe" });
267
+ $('input').tagsinput('add', { "value": 4 , "text": "Washington" , "continent": "America" });
268
+ $('input').tagsinput('add', { "value": 7 , "text": "Sydney" , "continent": "Australia" });
269
+ $('input').tagsinput('add', { "value": 10, "text": "Beijing" , "continent": "Asia" });
270
+ $('input').tagsinput('add', { "value": 13, "text": "Cairo" , "continent": "Africa" });
271
+ &lt;/script&gt;</code></pre>
272
+ </div>
273
+ </div>
274
+ </div>
275
+ </div>
276
+ <table class="table table-bordered table-condensed"><thead><tr><th>statement</th><th>returns</th></tr></thead><tbody><tr><td><code>$("input").val()</code></td><td><pre class="val"><code data-language="javascript"></code></pre></td></tr><tr><td><code>$("input").tagsinput('items')</code></td><td><pre class="items"><code data-language="javascript"></code></pre></td></tr></tbody></table>
277
+ </div>
278
+
279
+ <div id="angular" class="example example_angular" ng-app="AngularExample" ng-controller="CityTagsInputController">
280
+ <h3>AngularJS support</h3>
281
+ <p>
282
+ Include <code>bootstrap-tagsinput-angular.js</code> and register the 'bootstrap-tagsinput' in your Angular JS application to use the bootstrap-tagsinput directive.
283
+ </p>
284
+ <div class="bs-docs-example">
285
+ <bootstrap-tagsinput
286
+ ng-model="cities"
287
+ typeahead-source="queryCities"
288
+ tagclass="getTagClass"
289
+ itemvalue="value"
290
+ itemtext="text">
291
+ </bootstrap-tagsinput>
292
+ </div>
293
+ <div class="accordion">
294
+ <div class="accordion-group">
295
+ <div class="accordion-heading">
296
+ <a class="accordion-toggle" data-toggle="collapse" href="#example_angular">
297
+ Show code
298
+ </a>
299
+ </div>
300
+ <div id="example_angular" class="accordion-body collapse">
301
+ <div class="accordion-inner">
302
+ <pre><code data-language="html">&lt;bootstrap-tagsinput
303
+ ng-model="cities"
304
+ typeahead-source="queryCities"
305
+ tagclass="getTagClass"
306
+ itemvalue="value"
307
+ itemtext="text"&gt;
308
+ &lt;/bootstrap-tagsinput&gt;
309
+
310
+ &lt;script&gt;
311
+ angular.module('AngularExample', ['bootstrap-tagsinput'])
312
+ .controller('CityTagsInputController',
313
+ function CityTagsInputController($scope) {
314
+ // Init with some cities
315
+ $scope.cities = [
316
+ { "value": 1 , "text": "Amsterdam" , "continent": "Europe" },
317
+ { "value": 4 , "text": "Washington" , "continent": "America" },
318
+ { "value": 7 , "text": "Sydney" , "continent": "Australia" },
319
+ { "value": 10, "text": "Beijing" , "continent": "Asia" },
320
+ { "value": 13, "text": "Cairo" , "continent": "Africa" }
321
+ ];
322
+
323
+ $scope.queryCities = function(query) {
324
+ return $http.get('cities.json');
325
+ };
326
+
327
+ $scope.getTagClass = function(city) {
328
+ switch (city.continent) {
329
+ case 'Europe' : return 'badge badge-info';
330
+ case 'America' : return 'label label-important';
331
+ case 'Australia': return 'badge badge-success';
332
+ case 'Africa' : return 'label label-inverse';
333
+ case 'Asia' : return 'badge badge-warning';
334
+ }
335
+ };
336
+ }
337
+ );
338
+ &lt;/script&gt;</code></pre>
339
+ </div>
340
+ </div>
341
+ </div>
342
+ </div>
343
+ <table class="table table-bordered table-condensed">
344
+ <thead>
345
+ <tr><th>statement</th><th>returns</th></tr>
346
+ </thead>
347
+ <tbody>
348
+ <tr><td><code>$scope.cities</code></td><td><pre><code data-language="javascript">{{cities}}</code></pre></td></tr>
349
+ <tr><td><code>$("select").val()</code></td><td><pre class="val"><code data-language="javascript"></code></pre></td></tr>
350
+ <tr><td><code>$("select").tagsinput('items')</code></td><td><pre class="items"><code data-language="javascript"></code></pre></td></tr>
351
+ </tbody>
352
+ </table>
353
+ </div>
354
+ </section>
355
+
356
+ <section id="options">
357
+ <div class="page-header">
358
+ <h2>Options</h2>
359
+ </div>
360
+ <table class="table table-bordered table-condensed">
361
+ <thead>
362
+ <tr>
363
+ <th colspan="2">option</th>
364
+ <th>description</th>
365
+ </tr>
366
+ </thead>
367
+ <tbody>
368
+ <tr>
369
+ <td colspan="2"><code>tagClass</code></td>
370
+ <td>
371
+ <p>Classname for the tags, or a function returning a classname</p>
372
+ <pre><code data-language="javascript">$('input').tagsinput({
373
+ tagClass: 'big'
374
+ });</code></pre>
375
+ <pre><code data-language="javascript">$('input').tagsinput({
376
+ tagClass: function(item) {
377
+ return (item.length > 10 ? 'big' : 'small');
378
+ }
379
+ });</code></pre>
380
+ </td>
381
+ </tr>
382
+ <tr>
383
+ <td colspan="2"><code>itemValue</code></td>
384
+ <td>
385
+ <p>When adding objects as tags, itemValue <em>must</em> be set to the name of the property containing the item's value, or a function returning an item's value.</p>
386
+ <pre><code data-language="javascript">$('input').tagsinput({
387
+ itemValue: 'id'
388
+ });</code></pre>
389
+ <pre><code data-language="javascript">$('input').tagsinput({
390
+ itemValue: function(item) {
391
+ return item.id;
392
+ }
393
+ });</code></pre>
394
+ </td>
395
+ </tr>
396
+ <tr>
397
+ <td colspan="2"><code>itemText</code></td>
398
+ <td>
399
+ <p>When adding objects as tags, you can set itemText to the name of the property of item to use for a its tag's text. You may also provide a function which returns an item's value. When this options is not set, the value of <code>itemValue</code> will be used.
400
+
401
+
402
+ <pre><code data-language="javascript">$('input').tagsinput({
403
+ itemText: 'label'
404
+ });</code></pre>
405
+ <pre><code data-language="javascript">$('input').tagsinput({
406
+ itemText: function(item) {
407
+ return item.label;
408
+ }
409
+ });</code></pre>
410
+ </td>
411
+ </tr>
412
+ <tr>
413
+ <td colspan="2"><code>confirmKeys</code></td>
414
+ <td>
415
+ <p>Array of keycodes which will add a tag when typing in the input. (default: [13, 188], which are ENTER and comma)</p>
416
+ <pre><code data-language="javascript">$('input').tagsinput({
417
+ confirmKeys: [13, 44]
418
+ });</code></pre>
419
+ </td>
420
+ </tr>
421
+ <tr>
422
+ <td colspan="2"><code>maxTags</code></td>
423
+ <td>
424
+ <p>When set, no more than the given number of tags are allowed to add (default: undefined). When maxTags is reached, a class 'bootstrap-tagsinput-max' is placed on the tagsinput element. (default: undefined)</p>
425
+ <pre><code data-language="javascript">$('input').tagsinput({
426
+ maxTags: 3
427
+ });</code></pre>
428
+ </td>
429
+ </tr>
430
+ <tr>
431
+ <td colspan="2"><code>maxChars</code></td>
432
+ <td>
433
+ <p>Defines the maximum length of a single tag. (default: undefined)</p>
434
+ <pre><code data-language="javascript">$('input').tagsinput({
435
+ maxChars: 8
436
+ });</code></pre>
437
+ </td>
438
+ </tr>
439
+ <tr>
440
+ <td colspan="2"><code>trimValue</code></td>
441
+ <td>
442
+ <p>When true, automatically removes all whitespace around tags. (default: false)</p>
443
+ <pre><code data-language="javascript">$('input').tagsinput({
444
+ trimValue: true
445
+ });</code></pre>
446
+ </td>
447
+ </tr>
448
+ <tr>
449
+ <td colspan="2"><code>allowDuplicates</code></td>
450
+ <td>
451
+ <p>When true, the same tag can be added multiple times. (default: false)</p>
452
+ <pre><code data-language="javascript">$('input').tagsinput({
453
+ allowDuplicates: true
454
+ });</code></pre>
455
+ </td>
456
+ </tr>
457
+ <tr>
458
+ <td colspan="2"><code>maxChars</code></td>
459
+ <td>
460
+ <p>Defines the maximum length of a single tag.</p>
461
+ <pre><code data-language="javascript">$('input').tagsinput({
462
+ maxChars: 8
463
+ });</code></pre>
464
+ </td>
465
+ </tr>
466
+ <tr>
467
+ <td colspan="2"><code>freeInput</code></td>
468
+ <td>
469
+ <p>Allow creating tags which are not returned by typeahead's source (default: true)</p>
470
+ <div class="alert alert-block">
471
+ This is only possible when using string as tags. When itemValue option is set, this option will be ignored.
472
+ </div>
473
+ <pre><code data-language="javascript">$('input').tagsinput({
474
+ typeahead: {
475
+ source: ['Amsterdam', 'Washington', 'Sydney', 'Beijing', 'Cairo'],
476
+ freeInput: true
477
+ }
478
+ });</code></pre>
479
+ </td>
480
+ </tr>
481
+ <tr>
482
+ <td colspan="2"><code>typeahead</code></td>
483
+ <td><p>Object containing typeahead specific options</td>
484
+ </tr>
485
+ </tr>
486
+ <tr>
487
+ <td></td>
488
+ <td><code>source</code></td>
489
+ <td>
490
+ <p>An array (or function returning a promise or array), which will be used as source for a typeahead.
491
+ <pre><code data-language="javascript">$('input').tagsinput({
492
+ typeahead: {
493
+ source: ['Amsterdam', 'Washington', 'Sydney', 'Beijing', 'Cairo']
494
+ }
495
+ });</code></pre>
496
+ <pre><code data-language="javascript">$('input').tagsinput({
497
+ typeahead: {
498
+ source: function(query) {
499
+ return $.get('http://someservice.com');
500
+ }
501
+ }
502
+ });</code></pre>
503
+ </td>
504
+ </tr>
505
+ <tr>
506
+ <td colspan="2"><code>onTagExists</code></td>
507
+ <td><p>Function invoked when trying to add an item which allready exists. By default, the existing tag hides and fades in.
508
+ <pre><code data-language="javascript">$('input').tagsinput({
509
+ onTagExists: function(item, $tag) {
510
+ $tag.hide.fadeIn();
511
+ }
512
+ });</code></pre>
513
+ </td>
514
+ </tr>
515
+ </tbody>
516
+ </table>
517
+ </section>
518
+
519
+ <section id="methods">
520
+ <div class="page-header">
521
+ <h2>Methods</h2>
522
+ </div>
523
+ <table class="table table-bordered table-condensed">
524
+ <thead>
525
+ <tr>
526
+ <th>method</th>
527
+ <th>description</th>
528
+ </tr>
529
+ </thead>
530
+ <tbody>
531
+ <tr>
532
+ <td><code>add</code></td>
533
+ <td>
534
+ <p>Adds a tag</p>
535
+
536
+ <pre><code data-language="javascript">$('input').tagsinput('add', 'some tag');</code></pre>
537
+
538
+ <pre><code data-language="javascript">$('input').tagsinput('add', { id: 1, text: 'some tag' });</code></pre>
539
+ </td>
540
+ </tr>
541
+ <tr>
542
+ <td><code>remove</code></td>
543
+ <td>
544
+ <p>Removes a tag</p>
545
+
546
+ <pre><code data-language="javascript">$('input').tagsinput('remove', 'some tag');</code></pre>
547
+
548
+ <pre><code data-language="javascript">$('input').tagsinput('remove', { id: 1, text: 'some tag' });</code></pre>
549
+ </td>
550
+ </tr>
551
+ <tr>
552
+ <td><code>removeAll</code></td>
553
+ <td>
554
+ <p>Removes all tags</p>
555
+
556
+ <pre><code data-language="javascript">$('input').tagsinput('removeAll');</code></pre>
557
+ </td>
558
+ </tr>
559
+ <tr>
560
+ <td><code>focus</code></td>
561
+ <td>
562
+ <p>Sets focus in the tagsinput</p>
563
+
564
+ <pre><code data-language="javascript">$('input').tagsinput('focus');</code></pre>
565
+ </td>
566
+ </tr>
567
+ <tr>
568
+ <td><code>input</code></td>
569
+ <td>
570
+ <p>Returns the tagsinput's internal &lt;input /&gt;, which is used for adding tags. You could use this to add your own typeahead behaviour for example.</p>
571
+
572
+
573
+ <pre><code data-language="html">var $elt = $('input').tagsinput('input');</code></pre>
574
+ </td>
575
+ </tr>
576
+ <tr>
577
+ <td><code>refresh</code></td>
578
+ <td>
579
+ <p>Refreshes the tags input UI. This might be usefull when you're adding objects as tags. When an object's text changes, you'll have to refresh to update the matching tag's text.</p>
580
+
581
+ <pre><code data-language="javascript">$('input').tagsinput('refresh');</code></pre>
582
+ </td>
583
+ </tr>
584
+ <tr>
585
+ <td><code>destroy</code></td>
586
+ <td>
587
+ <p>Removes tagsinput behaviour</p>
588
+
589
+ <pre><code data-language="javascript">$('input').tagsinput('destroy');</code></pre>
590
+ </td>
591
+ </tr>
592
+ </tbody>
593
+ </table>
594
+ </section>
595
+
596
+ <section id="methods">
597
+ <div class="page-header">
598
+ <h2>Events</h2>
599
+ </div>
600
+ <table class="table table-bordered table-condensed">
601
+ <thead>
602
+ <tr>
603
+ <th>event</th>
604
+ <th>description</th>
605
+ </tr>
606
+ </thead>
607
+ <tbody>
608
+ <tr>
609
+ <td><code>beforeItemAdd</code></td>
610
+ <td>
611
+ Triggered just before an item gets added. Example:
612
+ <pre><code data-language="javascript">$('input').on('beforeItemAdd', function(event) {
613
+ // event.item: contains the item
614
+ // event.cancel: set to true to prevent the item getting added
615
+ });</code></pre>
616
+ </td>
617
+ </tr>
618
+ <tr>
619
+ <td><code>itemAdded</code></td>
620
+ <td>
621
+ Triggered just after an item got added. Example:
622
+ <pre><code data-language="javascript">$('input').on('itemAdded', function(event) {
623
+ // event.item: contains the item
624
+ });</code></pre>
625
+ </td>
626
+ </tr>
627
+ <tr>
628
+ <td><code>beforeItemRemove</code></td>
629
+ <td>
630
+ Triggered just before an item gets removed. Example:
631
+ <pre><code data-language="javascript">$('input').on('beforeItemRemove', function(event) {
632
+ // event.item: contains the item
633
+ // event.cancel: set to true to prevent the item getting removed
634
+ });</code></pre>
635
+ </td>
636
+ </tr>
637
+ <tr>
638
+ <td><code>itemRemoved</code></td>
639
+ <td>
640
+ Triggered just after an item got removed. Example:
641
+ <pre><code data-language="javascript">$('input').on('itemRemoved', function(event) {
642
+ // event.item: contains the item
643
+ });</code></pre>
644
+ </td>
645
+ </tr>
646
+ </tbody>
647
+ </table>
648
+ </section>
649
+ </div>
650
+ <footer class="footer">
651
+ <p>Code licensed under <a href="https://raw.github.com/TimSchlechter/bootstrap-tagsinput/master/LICENSE" target="_blank">MIT License</a></p>
652
+ </footer>
653
+
654
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
655
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
656
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.2.20/angular.min.js"></script>
657
+ <script src="../dist/bootstrap-tagsinput.min.js"></script>
658
+ <script src="../dist/bootstrap-tagsinput/bootstrap-tagsinput-angular.min.js"></script>
659
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/rainbow/1.2.0/js/rainbow.min.js"></script>
660
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/rainbow/1.2.0/js/language/generic.js"></script>
661
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/rainbow/1.2.0/js/language/html.js"></script>
662
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/rainbow/1.2.0/js/language/javascript.js"></script>
663
+ <script src="assets/app_bs2.js"></script>
664
+ <script src="assets/app.js"></script>
665
+ </body>
666
+ </html>