kms 1.0.1 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (196) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/kms/application.js +1 -0
  3. data/app/assets/javascripts/kms/application/controllers/assets_controller.coffee.erb +14 -4
  4. data/app/assets/javascripts/kms/application/controllers/pages_controller.coffee.erb +12 -2
  5. data/app/assets/javascripts/kms/application/controllers/snippets_controller.coffee.erb +13 -3
  6. data/app/assets/javascripts/kms/application/controllers/templates_controller.coffee.erb +13 -3
  7. data/app/assets/javascripts/kms/application/controllers/users_controller.coffee +5 -5
  8. data/app/assets/javascripts/kms/application/module.coffee +6 -2
  9. data/app/assets/javascripts/kms/application/routes.coffee.erb +10 -0
  10. data/app/assets/javascripts/templates/assets/edit.html.slim +2 -1
  11. data/app/assets/javascripts/templates/assets/form.html.slim +1 -1
  12. data/app/assets/javascripts/templates/pages/edit.html.slim +1 -0
  13. data/app/assets/javascripts/templates/shared/hotkey_notification.html.slim +6 -0
  14. data/app/assets/javascripts/templates/snippets/edit.html.slim +1 -0
  15. data/app/assets/javascripts/templates/templates/edit.html.slim +1 -0
  16. data/app/assets/javascripts/templates/users/edit.html.slim +5 -0
  17. data/app/assets/javascripts/templates/users/form.html.slim +3 -2
  18. data/app/assets/javascripts/templates/users/index.html.slim +2 -1
  19. data/app/assets/stylesheets/kms/custom.css.scss +10 -0
  20. data/app/controllers/kms/assets_controller.rb +6 -3
  21. data/app/controllers/kms/users_controller.rb +14 -0
  22. data/app/services/kms/resource_service.rb +3 -1
  23. data/app/views/layouts/kms/kms.html.erb +1 -1
  24. data/config/initializers/devise.rb +9 -0
  25. data/config/locales/en.yml +12 -0
  26. data/config/locales/ru.yml +12 -0
  27. data/config/routes.rb +1 -1
  28. data/lib/kms/engine.rb +1 -1
  29. data/lib/kms/version.rb +1 -1
  30. data/spec/controllers/kms/assets_controller_spec.rb +28 -10
  31. data/spec/controllers/kms/users_controller_spec.rb +23 -0
  32. data/spec/internal/config/routes.rb +1 -1
  33. data/spec/internal/log/test.log +0 -105823
  34. data/vendor/assets/bower.json +5 -4
  35. data/vendor/assets/bower_components/angular-cookies/angular-cookies.js +22 -18
  36. data/vendor/assets/bower_components/angular-cookies/angular-cookies.min.js +4 -4
  37. data/vendor/assets/bower_components/angular-cookies/angular-cookies.min.js.map +2 -2
  38. data/vendor/assets/bower_components/angular-cookies/bower.json +2 -2
  39. data/vendor/assets/bower_components/angular-cookies/package.json +1 -1
  40. data/vendor/assets/bower_components/angular-hotkeys/Gruntfile.js +118 -0
  41. data/vendor/assets/bower_components/angular-hotkeys/LICENSE +20 -0
  42. data/vendor/assets/bower_components/angular-hotkeys/README.md +248 -0
  43. data/vendor/assets/bower_components/angular-hotkeys/bower.json +19 -0
  44. data/vendor/assets/bower_components/angular-hotkeys/build/hotkeys.css +110 -0
  45. data/vendor/assets/bower_components/angular-hotkeys/build/hotkeys.js +1661 -0
  46. data/vendor/assets/bower_components/angular-hotkeys/build/hotkeys.min.css +1 -0
  47. data/vendor/assets/bower_components/angular-hotkeys/build/hotkeys.min.js +7 -0
  48. data/vendor/assets/bower_components/angular-hotkeys/package.json +45 -0
  49. data/vendor/assets/bower_components/angular-hotkeys/src/hotkeys.css +104 -0
  50. data/vendor/assets/bower_components/angular-hotkeys/src/hotkeys.js +633 -0
  51. data/vendor/assets/bower_components/angular-loading-bar/CHANGELOG.md +33 -0
  52. data/vendor/assets/bower_components/angular-loading-bar/CONTRIBUTING.md +17 -0
  53. data/vendor/assets/bower_components/angular-loading-bar/Gruntfile.js +9 -1
  54. data/vendor/assets/bower_components/angular-loading-bar/ISSUE_TEMPLATE.md +14 -0
  55. data/vendor/assets/bower_components/angular-loading-bar/PULL_REQUEST_TEMPLATE.md +13 -0
  56. data/vendor/assets/bower_components/angular-loading-bar/README.md +30 -3
  57. data/vendor/assets/bower_components/angular-loading-bar/bower.json +11 -6
  58. data/vendor/assets/bower_components/angular-loading-bar/build/loading-bar.css +5 -5
  59. data/vendor/assets/bower_components/angular-loading-bar/build/loading-bar.js +39 -12
  60. data/vendor/assets/bower_components/angular-loading-bar/build/loading-bar.min.css +1 -8
  61. data/vendor/assets/bower_components/angular-loading-bar/build/loading-bar.min.js +3 -3
  62. data/vendor/assets/bower_components/angular-loading-bar/index.js +2 -0
  63. data/vendor/assets/bower_components/angular-loading-bar/package.json +12 -15
  64. data/vendor/assets/bower_components/angular-loading-bar/src/loading-bar.css +3 -3
  65. data/vendor/assets/bower_components/angular-loading-bar/src/loading-bar.js +37 -10
  66. data/vendor/assets/bower_components/angular-sanitize/angular-sanitize.js +504 -386
  67. data/vendor/assets/bower_components/angular-sanitize/angular-sanitize.min.js +13 -12
  68. data/vendor/assets/bower_components/angular-sanitize/angular-sanitize.min.js.map +3 -3
  69. data/vendor/assets/bower_components/angular-sanitize/bower.json +2 -2
  70. data/vendor/assets/bower_components/angular-sanitize/package.json +1 -1
  71. data/vendor/assets/bower_components/angular-ui-router/CHANGELOG.md +1410 -0
  72. data/vendor/assets/bower_components/angular-ui-router/CONTRIBUTING.md +64 -16
  73. data/vendor/assets/bower_components/angular-ui-router/DOCS.md +48 -0
  74. data/vendor/assets/bower_components/angular-ui-router/ISSUE_TEMPLATE.md +53 -0
  75. data/vendor/assets/bower_components/angular-ui-router/LICENSE +1 -1
  76. data/vendor/assets/bower_components/angular-ui-router/README.md +24 -211
  77. data/vendor/assets/bower_components/angular-ui-router/artifacts.json +8 -0
  78. data/vendor/assets/bower_components/angular-ui-router/bower.json +1 -23
  79. data/vendor/assets/bower_components/angular-ui-router/karma.conf.js +105 -0
  80. data/vendor/assets/bower_components/angular-ui-router/release/angular-ui-router.js +9744 -3901
  81. data/vendor/assets/bower_components/angular-ui-router/release/angular-ui-router.js.map +192 -0
  82. data/vendor/assets/bower_components/angular-ui-router/release/angular-ui-router.min.js +9 -4
  83. data/vendor/assets/bower_components/angular-ui-router/release/angular-ui-router.min.js.map +1679 -0
  84. data/vendor/assets/bower_components/angular-ui-router/release/resolveService.js +83 -0
  85. data/vendor/assets/bower_components/angular-ui-router/release/resolveService.js.map +19 -0
  86. data/vendor/assets/bower_components/angular-ui-router/release/resolveService.min.js +8 -0
  87. data/vendor/assets/bower_components/angular-ui-router/release/resolveService.min.js.map +47 -0
  88. data/vendor/assets/bower_components/angular-ui-router/release/stateEvents.js +294 -0
  89. data/vendor/assets/bower_components/angular-ui-router/release/stateEvents.js.map +17 -0
  90. data/vendor/assets/bower_components/angular-ui-router/release/stateEvents.min.js +8 -0
  91. data/vendor/assets/bower_components/angular-ui-router/release/stateEvents.min.js.map +102 -0
  92. data/vendor/assets/bower_components/angular-ui-router/release/ui-router-angularjs.js +2014 -0
  93. data/vendor/assets/bower_components/angular-ui-router/release/ui-router-angularjs.js.map +70 -0
  94. data/vendor/assets/bower_components/angular-ui-router/release/ui-router-angularjs.min.js +9 -0
  95. data/vendor/assets/bower_components/angular-ui-router/release/ui-router-angularjs.min.js.map +541 -0
  96. data/vendor/assets/bower_components/angular-ui-router/rollup.config.js +116 -0
  97. data/vendor/assets/bower_components/angular-ui-router/tslint.json +60 -0
  98. data/vendor/assets/bower_components/angular-ui-router/yarn.lock +4146 -0
  99. data/vendor/assets/bower_components/angular-ui-tree/yarn.lock +4945 -0
  100. data/vendor/assets/bower_components/angular/angular.js +4019 -2449
  101. data/vendor/assets/bower_components/angular/angular.min.js +331 -319
  102. data/vendor/assets/bower_components/angular/angular.min.js.gzip +0 -0
  103. data/vendor/assets/bower_components/angular/angular.min.js.map +3 -3
  104. data/vendor/assets/bower_components/angular/bower.json +1 -1
  105. data/vendor/assets/bower_components/angular/package.json +1 -1
  106. data/vendor/assets/bower_components/angularjs-dropdown-multiselect/LICENSE +21 -0
  107. data/vendor/assets/bower_components/angularjs-dropdown-multiselect/README.md +14 -14
  108. data/vendor/assets/bower_components/angularjs-dropdown-multiselect/bower.json +25 -12
  109. data/vendor/assets/bower_components/angularjs-dropdown-multiselect/development_index.html +59 -52
  110. data/vendor/assets/bower_components/angularjs-dropdown-multiselect/dist/angularjs-dropdown-multiselect.min.js +1 -1
  111. data/vendor/assets/bower_components/angularjs-dropdown-multiselect/index.html +73 -0
  112. data/vendor/assets/bower_components/angularjs-dropdown-multiselect/package.json +19 -7
  113. data/vendor/assets/bower_components/angularjs-dropdown-multiselect/pages/javascripts/pages/home/ExampleCtrl.js +126 -3
  114. data/vendor/assets/bower_components/angularjs-dropdown-multiselect/pages/javascripts/pages/home/home.html +1262 -852
  115. data/vendor/assets/bower_components/angularjs-dropdown-multiselect/pages/stylesheets/stylesheet.css +10 -5
  116. data/vendor/assets/bower_components/angularjs-dropdown-multiselect/src/angularjs-dropdown-multiselect.js +612 -287
  117. metadata +66 -169
  118. data/spec/internal/config/database.yml +0 -7
  119. data/spec/internal/public/uploads/kms/asset/file/1/avatar.jpg +0 -0
  120. data/spec/internal/public/uploads/kms/asset/file/2/avatar.jpg +0 -0
  121. data/spec/internal/public/uploads/kms/asset/file/2/style.css +0 -1
  122. data/spec/internal/public/uploads/kms/asset/file/3/style.css +0 -1
  123. data/spec/internal/public/uploads/kms/asset/file/4/style.css +0 -1
  124. data/spec/internal/public/uploads/tmp/1500976987-41025-0002-0883/style.css +0 -1
  125. data/spec/internal/public/uploads/tmp/1500977082-41195-0002-6495/style.css +0 -1
  126. data/spec/internal/public/uploads/tmp/1500977109-41364-0002-4518/style.css +0 -1
  127. data/spec/internal/public/uploads/tmp/1500977152-41405-0002-2345/style.css +0 -1
  128. data/spec/internal/public/uploads/tmp/1500977327-41694-0002-5448/style.css +0 -1
  129. data/spec/internal/public/uploads/tmp/1500977376-41732-0002-7916/style.css +0 -1
  130. data/spec/internal/public/uploads/tmp/1500977392-41759-0002-7593/style.css +0 -1
  131. data/spec/internal/public/uploads/tmp/1500977410-42259-0002-7527/style.css +0 -1
  132. data/spec/internal/public/uploads/tmp/1500977429-42306-0002-5937/style.css +0 -1
  133. data/spec/internal/public/uploads/tmp/1500977437-42324-0002-5880/style.css +0 -1
  134. data/spec/internal/public/uploads/tmp/1500983228-53594-0002-4559/style.css +0 -1
  135. data/spec/internal/public/uploads/tmp/1500983284-53632-0002-6590/style.css +0 -1
  136. data/spec/internal/public/uploads/tmp/1500983360-53784-0002-7289/style.css +0 -1
  137. data/spec/internal/public/uploads/tmp/1500983469-54321-0002-0386/avatar.jpg +0 -0
  138. data/spec/internal/public/uploads/tmp/1500983469-54321-0004-5691/style.css +0 -1
  139. data/spec/internal/public/uploads/tmp/1500983511-54352-0002-5720/avatar.jpg +0 -0
  140. data/spec/internal/public/uploads/tmp/1500983511-54352-0004-1399/style.css +0 -1
  141. data/spec/internal/public/uploads/tmp/1500983610-54507-0002-4280/avatar.jpg +0 -0
  142. data/spec/internal/public/uploads/tmp/1500983610-54507-0004-9758/style.css +0 -1
  143. data/spec/internal/public/uploads/tmp/1500984466-57012-0002-4146/avatar.jpg +0 -0
  144. data/spec/internal/public/uploads/tmp/1500984466-57012-0004-5895/style.css +0 -1
  145. data/spec/internal/public/uploads/tmp/1500984509-57158-0002-9657/avatar.jpg +0 -0
  146. data/spec/internal/public/uploads/tmp/1500984509-57158-0004-5003/style.css +0 -1
  147. data/spec/internal/public/uploads/tmp/1500984616-57697-0002-7201/avatar.jpg +0 -0
  148. data/spec/internal/public/uploads/tmp/1500984616-57697-0004-6255/style.css +0 -1
  149. data/spec/internal/public/uploads/tmp/1500985257-58947-0002-3629/avatar.jpg +0 -0
  150. data/spec/internal/public/uploads/tmp/1500985257-58947-0004-5338/style.css +0 -1
  151. data/spec/internal/public/uploads/tmp/1500985407-58947-0006-5929/style.css +0 -1
  152. data/spec/internal/public/uploads/tmp/1500985473-59264-0002-0397/avatar.jpg +0 -0
  153. data/spec/internal/public/uploads/tmp/1500985473-59264-0004-6493/style.css +0 -1
  154. data/spec/internal/public/uploads/tmp/1500985475-59264-0007-8674/style.css +0 -1
  155. data/spec/internal/public/uploads/tmp/1500985538-59468-0002-9206/avatar.jpg +0 -0
  156. data/spec/internal/public/uploads/tmp/1500985538-59468-0004-2586/style.css +0 -1
  157. data/spec/internal/public/uploads/tmp/1500985538-59468-0007-6200/style.css +0 -1
  158. data/spec/internal/public/uploads/tmp/1500988358-65877-0002-4528/avatar.jpg +0 -0
  159. data/spec/internal/public/uploads/tmp/1500988358-65877-0004-5904/style.css +0 -1
  160. data/spec/internal/public/uploads/tmp/1500988358-65877-0007-7320/style.css +0 -1
  161. data/spec/internal/public/uploads/tmp/1500988407-65916-0002-3138/avatar.jpg +0 -0
  162. data/spec/internal/public/uploads/tmp/1500988407-65916-0004-5400/style.css +0 -1
  163. data/spec/internal/public/uploads/tmp/1500988407-65916-0007-1655/style.css +0 -1
  164. data/spec/internal/public/uploads/tmp/1500988421-65950-0002-9415/avatar.jpg +0 -0
  165. data/spec/internal/public/uploads/tmp/1500988421-65950-0004-7130/style.css +0 -1
  166. data/spec/internal/public/uploads/tmp/1500988421-65950-0007-9886/style.css +0 -1
  167. data/spec/internal/public/uploads/tmp/1500988435-65981-0002-3228/avatar.jpg +0 -0
  168. data/spec/internal/public/uploads/tmp/1500988435-65981-0004-3682/style.css +0 -1
  169. data/spec/internal/public/uploads/tmp/1500988435-65981-0007-1582/style.css +0 -1
  170. data/spec/internal/public/uploads/tmp/1500988475-66122-0002-9516/avatar.jpg +0 -0
  171. data/spec/internal/public/uploads/tmp/1500988475-66122-0004-5634/style.css +0 -1
  172. data/spec/internal/public/uploads/tmp/1500988530-66122-0007-2272/style.css +0 -1
  173. data/spec/internal/public/uploads/tmp/1500988554-66315-0002-6262/avatar.jpg +0 -0
  174. data/spec/internal/public/uploads/tmp/1500988554-66315-0004-6099/style.css +0 -1
  175. data/spec/internal/public/uploads/tmp/1500988554-66315-0007-1632/style.css +0 -1
  176. data/spec/internal/public/uploads/tmp/1500991751-73722-0002-9937/avatar.jpg +0 -0
  177. data/spec/internal/public/uploads/tmp/1500991751-73722-0004-8034/style.css +0 -1
  178. data/spec/internal/public/uploads/tmp/1500991751-73722-0007-7763/style.css +0 -1
  179. data/spec/internal/public/uploads/tmp/1501233238-34385-0002-3210/avatar.jpg +0 -0
  180. data/spec/internal/public/uploads/tmp/1501233238-34385-0004-5881/style.css +0 -1
  181. data/spec/internal/public/uploads/tmp/1501233238-34385-0007-6280/style.css +0 -1
  182. data/spec/internal/tmp/cache/assets/test/sprockets/v3.0/1XyAFYlYI0pK7WAgjR4PgXV6BgU6huJSviWmHetdCRs.cache +0 -1
  183. data/vendor/assets/bower_components/angular-ui-router/api/angular-ui-router.d.ts +0 -126
  184. data/vendor/assets/bower_components/angular-ui-router/src/common.js +0 -292
  185. data/vendor/assets/bower_components/angular-ui-router/src/resolve.js +0 -252
  186. data/vendor/assets/bower_components/angular-ui-router/src/state.js +0 -1373
  187. data/vendor/assets/bower_components/angular-ui-router/src/stateDirectives.js +0 -268
  188. data/vendor/assets/bower_components/angular-ui-router/src/stateFilters.js +0 -39
  189. data/vendor/assets/bower_components/angular-ui-router/src/templateFactory.js +0 -110
  190. data/vendor/assets/bower_components/angular-ui-router/src/urlMatcherFactory.js +0 -1036
  191. data/vendor/assets/bower_components/angular-ui-router/src/urlRouter.js +0 -413
  192. data/vendor/assets/bower_components/angular-ui-router/src/view.js +0 -71
  193. data/vendor/assets/bower_components/angular-ui-router/src/viewDirective.js +0 -302
  194. data/vendor/assets/bower_components/angular-ui-router/src/viewScroll.js +0 -52
  195. data/vendor/assets/bower_components/angularjs-dropdown-multiselect/pages/index.html +0 -67
  196. data/vendor/assets/bower_components/bootstrap/Gemfile.lock +0 -43
@@ -1,571 +1,735 @@
1
1
  <div class="container" ng-controller="ExampleCtrl">
2
- <div class="row">
3
- <div class="col-xs-12">
4
- <h2 style="margin-bottom: 0">What is AngularJS Dropdown Multiselect?</h2>
5
- This directive uses Bootstrap's Dropdown with the power of AngularJS directives and binding.
6
- <br />
7
- <br />In this page you can see basic and advanced usage examples.
8
- </div>
9
- </div>
10
- <div class="row">
11
- <div class="col-xs-12">
12
- <h2 style="margin-bottom: 0">Download</h2>
13
- There are several options to do that:
14
- <ol>
15
- <li>Using bower: `bower install angularjs-dropdown-multiselect`</li>
16
- <li>Download the .zip file from <a href="https://github.com/dotansimha/angularjs-dropdown-multiselect/zipball/master">here</a>
17
- </li>
18
- <li>Using it from GitHub raw using <a href="https://rawgit.com/dotansimha/angularjs-dropdown-multiselect/master/src/angularjs-dropdown-multiselect.js">this link</a>
19
- </li>
20
- </ol>
21
- </div>
22
- </div>
23
- <accordion close-others="true">
24
- <accordion-group heading="Basic Usage Example" is-open="true">
25
- <div class="row">
26
- <div class="col-xs-12 col-sm-6">
27
- <h3>Demo</h3>
28
- <div class="well">
29
- <div>
30
- <div ng-dropdown-multiselect="" options="example1data" selected-model="example1model"></div>
31
- </div>
32
- </div>
33
- </div>
34
- <div class="col-xs-12 col-sm-6">
35
- <h3>The model:</h3>
36
- <pre>{{example1model|json}}</pre>
37
- </div>
38
- </div>
39
- <div class="row">
40
- <div class="col-md-12">
41
- <h3>Code</h3>
42
- <div class="well">
43
- <div>
44
- <div hljs>
45
- // HTML
46
- <div ng-dropdown-multiselect="" options="example1data" selected-model="example1model"></div>
2
+ <div class="row">
3
+ <div class="col-xs-12">
4
+ <h2 style="margin-bottom: 0">What is AngularJS Dropdown Multiselect?</h2>
5
+ This directive uses Bootstrap's Dropdown with the power of AngularJS directives and binding. Bootstrap and AngularJS are the only dependencies.
6
+ <br />
7
+ <br />In this page you can see basic and advanced usage examples.
8
+ </div>
9
+ </div>
10
+ <div class="row">
11
+ <div class="col-xs-12">
12
+ <h2 style="margin-bottom: 0">Download</h2>
13
+ There are several options to do that:
14
+ <ol>
15
+ <li>Using bower: `bower install angular-dropdown-multiselect`</li>
16
+ <li>
17
+ Download the .zip file from <a href="https://github.com/dotansimha/angularjs-dropdown-multiselect/zipball/master">here</a>
18
+ </li>
19
+ <li>
20
+ Using it from GitHub raw using <a href="https://rawgit.com/dotansimha/angularjs-dropdown-multiselect/master/src/angularjs-dropdown-multiselect.js">this link</a>
21
+ </li>
22
+ </ol>
23
+ </div>
24
+ </div>
25
+ <uib-accordion close-others="true">
26
+ <!--<uib-accordion-group heading="test Settings Example" is-open="true" style="height: 500px">
27
+ <div class="row">
28
+ <div class="col-xs-12">
29
+ test
30
+ </div>
31
+ </div>
32
+ <div class="row">
33
+ <div class="col-xs-12 col-sm-6">
34
+ <h3>Demo</h3>
35
+ <div class="well">
36
+ <div>
37
+ <div ng-dropdown-multiselect options="testdata" selected-model="testmodel" extra-settings="testsettings" events="testevents"></div>
38
+ </div>
39
+ </div>
40
+ </div>
41
+ <div class="col-xs-12 col-sm-6">
42
+ <h3>The model:</h3>
43
+ <pre>{{testmodel|json}}</pre>
44
+ </div>
45
+ </div>
46
+ </uib-accordion-group>-->
47
+ <uib-accordion-group heading="Basic Usage Example" is-open="true">
48
+ <div class="row">
49
+ <div class="col-xs-12 col-sm-6">
50
+ <h3>Demo</h3>
51
+ <div class="well">
52
+ <div>
53
+ <div ng-dropdown-multiselect="" options="example1data" selected-model="example1model"></div>
54
+ </div>
55
+ </div>
56
+ </div>
57
+ <div class="col-xs-12 col-sm-6">
58
+ <h3>The model:</h3>
59
+ <pre>{{example1model|json}}</pre>
60
+ </div>
61
+ </div>
62
+ <div class="row">
63
+ <div class="col-md-12">
64
+ <h3>Code</h3>
65
+ <div hljs>
66
+ // HTML
67
+ <div ng-dropdown-multiselect="" options="example1data" selected-model="example1model"></div>
47
68
 
48
- // JavaScript $scope.example1model = []; $scope.example1data = [ {id: 1, label: "David"}, {id: 2, label: "Jhon"}, {id: 3, label: "Danny"}];</div>
49
- </div>
50
- </div>
51
- </div>
52
- </div>
53
- </accordion-group>
54
- <accordion-group heading="Basic Settings Example">
55
- <div class="row">
56
- <div class="col-xs-12">
57
- This example shows the ability to select the property to display as text label.
58
- <br />In this case, the property the used as label is "id".
59
- </div>
60
- </div>
61
- <div class="row">
62
- <div class="col-xs-12 col-sm-6">
63
- <h3>Demo</h3>
64
- <div class="well">
65
- <div>
66
- <div ng-dropdown-multiselect options="example2data" selected-model="example2model" extra-settings="example2settings"></div>
67
- </div>
68
- </div>
69
- </div>
70
- <div class="col-xs-12 col-sm-6">
71
- <h3>The model:</h3>
72
- <pre>{{example2model|json}}</pre>
73
- </div>
74
- </div>
75
- <div class="row">
76
- <div class="col-md-12">
77
- <h3>Code</h3>
78
- <div class="well">
79
- <div>
80
- <div hljs>
81
- // HTML
82
- <div ng-dropdown-multiselect options="example2data" selected-model="example2model" extra-settings="example2settings"></div>
69
+ // JavaScript $scope.example1model = []; $scope.example1data = [ {id: 1, label: "David"}, {id: 2, label: "Jhon"}, {id: 3, label: "Danny"}];
70
+ </div>
71
+ </div>
72
+ </div>
73
+ </uib-accordion-group>
74
+ <uib-accordion-group heading="Basic Settings Example">
75
+ <div class="row">
76
+ <div class="col-xs-12">
77
+ This example shows the ability to select the property to display as text label.
78
+ <br />In this case, the property the used as label is "id".
79
+ </div>
80
+ </div>
81
+ <div class="row">
82
+ <div class="col-xs-12 col-sm-6">
83
+ <h3>Demo</h3>
84
+ <div class="well">
85
+ <div>
86
+ <div ng-dropdown-multiselect options="example2data" selected-model="example2model" extra-settings="example2settings"></div>
87
+ </div>
88
+ </div>
89
+ </div>
90
+ <div class="col-xs-12 col-sm-6">
91
+ <h3>The model:</h3>
92
+ <pre>{{example2model|json}}</pre>
93
+ </div>
94
+ </div>
95
+ <div class="row">
96
+ <div class="col-md-12">
97
+ <h3>Code</h3>
98
+ <div hljs>
99
+ // HTML
100
+ <div ng-dropdown-multiselect options="example2data" selected-model="example2model" extra-settings="example2settings"></div>
83
101
 
84
- // JavaScript $scope.example2model = []; $scope.example2data = [ {id: 1, label: "David"}, {id: 2, label: "Jhon"}, {id: 3, label: "Danny"}]; $scope.example2settings = {displayProp: 'id'};
85
- </div>
86
- </div>
87
- </div>
88
- </div>
89
- </div>
90
- </accordion-group>
91
- <accordion-group heading="Smart Button Text">
92
- <div class="row">
93
- <div class="col-xs-12">
94
- You can use the feature in order to show which items are selected instead the items count.<br />
95
- In order to use this feature, set the "smartButtonMaxItems" settings parameter to a number bigger than 0.<br />
96
- You can also provide "smartButtonTextConverter" parameter in order to add smart logic and convert the text.
97
- </div>
98
- </div>
99
- <div class="row">
100
- <div class="col-xs-12 col-sm-6">
101
- <h3>Demo</h3>
102
- <div class="well">
103
- <div>
104
- <div ng-dropdown-multiselect options="example13data" selected-model="example13model" extra-settings="example13settings"></div>
105
- </div>
106
- </div>
107
- </div>
108
- <div class="col-xs-12 col-sm-6">
109
- <h3>The model:</h3>
110
- <pre>{{example13model|json}}</pre>
111
- </div>
112
- </div>
113
- <div class="row">
114
- <div class="col-md-12">
115
- <h3>Code</h3>
116
- <div class="well">
117
- <div>
118
- <div hljs>
102
+ // JavaScript $scope.example2model = []; $scope.example2data = [ {id: 1, label: "David"}, {id: 2, label: "Jhon"}, {id: 3, label: "Danny"}]; $scope.example2settings = {displayProp: 'id'};
103
+ </div>
104
+ </div>
105
+ </div>
106
+ </uib-accordion-group>
107
+ <uib-accordion-group heading="Smart Button Text">
108
+ <div class="row">
109
+ <div class="col-xs-12">
110
+ You can use the feature in order to show which items are selected instead the items count.<br />
111
+ In order to use this feature, set the "smartButtonMaxItems" settings parameter to a number bigger than 0.<br />
112
+ You can also provide "smartButtonTextConverter" parameter in order to add smart logic and convert the text.
113
+ </div>
114
+ </div>
115
+ <div class="row">
116
+ <div class="col-xs-12 col-sm-6">
117
+ <h3>Demo</h3>
118
+ <div class="well">
119
+ <div>
120
+ <div ng-dropdown-multiselect options="example13data" selected-model="example13model" extra-settings="example13settings"></div>
121
+ </div>
122
+ </div>
123
+ </div>
124
+ <div class="col-xs-12 col-sm-6">
125
+ <h3>The model:</h3>
126
+ <pre>{{example13model|json}}</pre>
127
+ </div>
128
+ </div>
129
+ <div class="row">
130
+ <div class="col-md-12">
131
+ <h3>Code</h3>
132
+ <div hljs>
119
133
  //HTML
120
134
  <div ng-dropdown-multiselect options="example13data" selected-model="example13model" extra-settings="example13settings"></div>
121
135
 
122
136
  //JS
123
137
  $scope.example13model = [];
124
138
  $scope.example13data = [
125
- {id: 1, label: "David"},
126
- {id: 2, label: "Jhon"},
127
- {id: 3, label: "Lisa"},
128
- {id: 4, label: "Nicole"},
129
- {id: 5, label: "Danny"}];
139
+ {id: 1, label: "David"},
140
+ {id: 2, label: "Jhon"},
141
+ {id: 3, label: "Lisa"},
142
+ {id: 4, label: "Nicole"},
143
+ {id: 5, label: "Danny"}
144
+ ];
130
145
 
131
146
  $scope.example13settings = {
132
- smartButtonMaxItems: 3,
133
- smartButtonTextConverter: function(itemText, originalItem) {
134
- if (itemText === 'Jhon') {
135
- return 'Jhonny!';
136
- }
147
+ smartButtonMaxItems: 3,
148
+ smartButtonTextConverter: function(itemText, originalItem) {
149
+ if (itemText === 'Jhon') {
150
+ return 'Jhonny!';
151
+ }
137
152
 
138
- return itemText;
139
- }
153
+ return itemText;
154
+ }
140
155
  };
141
- </div>
142
- </div>
143
- </div>
144
- </div>
145
- </div>
146
- </accordion-group>
147
- <accordion-group heading="Scrollable List">
148
- <div class="row">
149
- <div class="col-xs-12">
150
- You can use the feature in order to make the list of items scrollable. Useful when you deal with a lot of items.
151
- </div>
152
- </div>
153
- <div class="row">
154
- <div class="col-xs-12 col-sm-6">
155
- <h3>Demo</h3>
156
- <div class="well">
157
- <div>
158
- <div ng-dropdown-multiselect options="example14data" selected-model="example14model" extra-settings="example14settings"></div>
159
- </div>
160
- </div>
161
- </div>
162
- <div class="col-xs-12 col-sm-6">
163
- <h3>The model:</h3>
164
- <pre>{{example14model|json}}</pre>
165
- </div>
166
- </div>
167
- <div class="row">
168
- <div class="col-md-12">
169
- <h3>Code</h3>
170
- <div class="well">
171
- <div>
172
- <div hljs>
156
+ </div>
157
+ </div>
158
+ </div>
159
+ </uib-accordion-group>
160
+ <uib-accordion-group heading="Scrollable List">
161
+ <div class="row">
162
+ <div class="col-xs-12">
163
+ You can use the feature in order to make the list of items scrollable. Useful when you deal with a lot of items.
164
+ </div>
165
+ </div>
166
+ <div class="row">
167
+ <div class="col-xs-12 col-sm-6">
168
+ <h3>Demo</h3>
169
+ <div class="well">
170
+ <div>
171
+ <div ng-dropdown-multiselect options="example14data" selected-model="example14model" extra-settings="example14settings"></div>
172
+ </div>
173
+ </div>
174
+ </div>
175
+ <div class="col-xs-12 col-sm-6">
176
+ <h3>The model:</h3>
177
+ <pre>{{example14model|json}}</pre>
178
+ </div>
179
+ </div>
180
+ <div class="row">
181
+ <div class="col-md-12">
182
+ <h3>Code</h3>
183
+ <div hljs>
173
184
  //HTML
174
185
  <div ng-dropdown-multiselect options="example14data" selected-model="example14model" extra-settings="example14settings"></div>
175
186
 
176
187
  //JS
177
188
  $scope.example14model = [];
178
189
  $scope.example14data = [
179
- {id: 1, label: "David"},
180
- {id: 2, label: "Jhon"},
181
- {id: 3, label: "Lisa"},
182
- {id: 4, label: "Nicole"},
183
- {id: 5, label: "Danny"},
184
- {id: 6, label: "Dan"},
185
- {id: 7, label: "Dean"},
186
- {id: 8, label: "Adam"},
187
- {id: 9, label: "Uri"},
188
- {id: 10, label: "Phil"}
190
+ {id: 1, label: "David"},
191
+ {id: 2, label: "Jhon"},
192
+ {id: 3, label: "Lisa"},
193
+ {id: 4, label: "Nicole"},
194
+ {id: 5, label: "Danny"},
195
+ {id: 6, label: "Dan"},
196
+ {id: 7, label: "Dean"},
197
+ {id: 8, label: "Adam"},
198
+ {id: 9, label: "Uri"},
199
+ {id: 10, label: "Phil"}
189
200
  ];
190
201
 
191
202
  $scope.example14settings = {
192
- scrollableHeight: '100px',
193
- scrollable: true
203
+ scrollableHeight: '100px',
204
+ scrollable: true
194
205
  };
195
- </div>
196
- </div>
197
- </div>
198
- </div>
199
- </div>
200
- </accordion-group>
201
- <accordion-group heading="Enabling Search">
202
- <div class="row">
203
- <div class="col-xs-12 col-sm-6">
204
- <h3>Demo</h3>
205
- <div class="well">
206
- <div>
207
- <div ng-dropdown-multiselect="" options="example9data" selected-model="example9model" extra-settings="example9settings"></div>
208
- </div>
209
- </div>
210
- </div>
211
- <div class="col-xs-12 col-sm-6">
212
- <h3>The model:</h3>
213
- <pre>{{example9model|json}}</pre>
214
- </div>
215
- </div>
216
- <div class="row">
217
- <div class="col-md-12">
218
- <h3>Code</h3>
219
- <div class="well">
220
- <div>
221
- <div hljs language="javascript">
222
- // HTML
223
- <div ng-dropdown-multiselect="" options="example9data" selected-model="example9model" extra-settings="example9settings"></div>
206
+ </div>
207
+ </div>
208
+ </div>
209
+ </uib-accordion-group>
210
+ <uib-accordion-group heading="Enabling Search">
211
+ <div class="row">
212
+ <div class="col-xs-12 col-sm-6">
213
+ <h3>Demo</h3>
214
+ <div class="well">
215
+ <div>
216
+ <div ng-dropdown-multiselect="" options="example9data" selected-model="example9model" extra-settings="example9settings"></div>
217
+ </div>
218
+ </div>
219
+ </div>
220
+ <div class="col-xs-12 col-sm-6">
221
+ <h3>The model:</h3>
222
+ <pre>{{example9model|json}}</pre>
223
+ </div>
224
+ </div>
225
+ <div class="row">
226
+ <div class="col-md-12">
227
+ <h3>Code</h3>
228
+ <div hljs language="javascript">
229
+ // HTML
230
+ <div ng-dropdown-multiselect="" options="example9data" selected-model="example9model" extra-settings="example9settings"></div>
231
+
232
+ // JavaScript $scope.example9model = []; $scope.example9data = [ {id: 1, label: "David"}, {id: 2, label: "Jhon"}, {id: 3, label: "Danny"}]; $scope.example9settings = {enableSearch: true};
233
+ </div>
234
+ </div>
235
+ </div>
236
+ </uib-accordion-group>
237
+ <uib-accordion-group heading="Specifying Search field">
238
+ <div class="row">
239
+ <div class="col-xs-12">
240
+ By default, search is done on all items, by specifying the searchField in the settings object one can specify on which field of the objects the filtering should be done.
241
+ </div>
242
+ </div>
243
+ <div class="row">
244
+ <div class="col-xs-12 col-sm-6">
245
+ <h3>Demo</h3>
246
+ <div class="well">
247
+ <div>
248
+ <div ng-dropdown-multiselect="" options="example20data" selected-model="example20model" extra-settings="example20settings"></div>
249
+ </div>
250
+ </div>
251
+ </div>
252
+ <div class="col-xs-12 col-sm-6">
253
+ <h3>The model:</h3>
254
+ <pre>{{example20model|json}}</pre>
255
+ </div>
256
+ </div>
257
+ <div class="row">
258
+ <div class="col-md-12">
259
+ <h3>Code</h3>
260
+ <div hljs language="javascript">
261
+ // HTML
262
+ <div ng-dropdown-multiselect="" options="example20data" selected-model="example20model" extra-settings="example20settings"></div>
224
263
 
225
- // JavaScript $scope.example9model = []; $scope.example9data = [ {id: 1, label: "David"}, {id: 2, label: "Jhon"}, {id: 3, label: "Danny"}]; $scope.example9settings = {enableSearch: true};
226
- </div>
227
- </div>
228
- </div>
229
- </div>
230
- </div>
231
- </accordion-group>
232
- <accordion-group heading="Selection Limit">
233
- <div class="row">
234
- <div class="col-xs-12">
235
- By default, there is no limit on the maximum selected items.
236
- <br />You can limit the selection by providing selectionLimit using the settings attribute.
237
- <br />
238
- <strong>Note 1: limit the selection to 0 is the default and won't limit the selection!</strong>
239
- <br />
240
- <strong>Note 2: When using this limit, the "Select All" button will not appear!</strong>
241
- <br />
242
- <strong>Note 3: When using the limit and setting it to "1", the model will contain a
243
- single object instead of array.</strong>
244
- <br />
245
- <strong>Note 4: When using single selection (limit to 1) the selection will change
246
- automaticlly if another item is clicked!</strong>
247
- </div>
248
- </div>
249
- <div class="row">
250
- <div class="col-xs-12 col-sm-6">
251
- <h3>Demo</h3>
252
- <div class="well">
253
- <div>
254
- <div ng-dropdown-multiselect options="example10data" selected-model="example10model" extra-settings="example10settings"></div>
255
- </div>
256
- </div>
257
- </div>
258
- <div class="col-xs-12 col-sm-6">
259
- <h3>The model:</h3>
260
- <pre>{{example10model|json}}</pre>
261
- </div>
262
- </div>
263
- <div class="row">
264
- <div class="col-md-12">
265
- <h3>Code</h3>
266
- <div class="well">
267
- <div>
268
- <div hljs>
269
- // HTML
270
- <div ng-dropdown-multiselect options="example10data" selected-model="example10model" extra-settings="example10settings"></div>
264
+ // JavaScript
265
+ $scope.example20model = [];
266
+ $scope.example20data = [
267
+ { id: 1, label: "David", age: 23 },
268
+ { id: 2, label: "Jhon", age: 24 },
269
+ { id: 3, label: "Danny", age: 26 }
270
+ ];
271
+ $scope.example20settings = {
272
+ searchField: 'age',
273
+ enableSearch: true
274
+ };
275
+ </div>
276
+ </div>
277
+ </div>
278
+ </uib-accordion-group>
279
+ <uib-accordion-group heading="Enable / Disable search button">
280
+ <div class="row">
281
+ <div class="col-xs-12">
282
+ Setting showEnableSearchButton to true will add the enable/disable search button under the Select all / Deselect all buttons
283
+ </div>
284
+ </div>
285
+ <div class="row">
286
+ <div class="col-xs-12 col-sm-6">
287
+ <h3>Demo</h3>
288
+ <div class="well">
289
+ <div>
290
+ <div ng-dropdown-multiselect="" options="example21data" selected-model="example21model" extra-settings="example21settings"></div>
291
+ </div>
292
+ </div>
293
+ </div>
294
+ <div class="col-xs-12 col-sm-6">
295
+ <h3>The model:</h3>
296
+ <pre>{{example21model|json}}</pre>
297
+ </div>
298
+ </div>
299
+ <div class="row">
300
+ <div class="col-md-12">
301
+ <h3>Code</h3>
302
+ <div hljs language="javascript">
303
+ // HTML
304
+ <div ng-dropdown-multiselect="" options="example21data" selected-model="example21model" extra-settings="example21settings"></div>
271
305
 
272
- // JavaScript $scope.example10model = []; $scope.example10data = [ {id: 1, label: "David"}, {id: 2, label: "Jhon"}, {id: 3, label: "Danny"}]; $scope.example10settings = {selectionLimit: 2};</div>
273
- </div>
274
- </div>
275
- </div>
276
- </div>
277
- </accordion-group>
278
- <accordion-group heading="Single Selection Limit">
279
- <div class="row">
280
- <div class="col-xs-12">
281
- Please read the notes in the "Selection Limit" example.
282
- <br />This example shows an example of using selection limit and single selection.
283
- </div>
284
- </div>
285
- <div class="row">
286
- <div class="col-xs-12 col-sm-6">
287
- <h3>Demo</h3>
288
- <div class="well">
289
- <div>
290
- <div ng-dropdown-multiselect options="example12data" selected-model="example12model" extra-settings="example12settings"></div>
291
- </div>
292
- </div>
293
- </div>
294
- <div class="col-xs-12 col-sm-6">
295
- <h3>The model:</h3>
296
- <pre>{{example12model|json}}</pre>
297
- </div>
298
- </div>
299
- <div class="row">
300
- <div class="col-md-12">
301
- <h3>Code</h3>
302
- <div class="well">
303
- <div>
304
- <div hljs>
305
- // HTML
306
- <div ng-dropdown-multiselect options="example10data" selected-model="example10model" extra-settings="example10settings"></div>
306
+ // JavaScript
307
+ $scope.example21model = [];
308
+ $scope.example21data = [
309
+ { id: 1, label: "David"},
310
+ { id: 2, label: "Jhon"},
311
+ { id: 3, label: "Danny"}];
312
+ $scope.example21settings = {
313
+ showEnableSearchButton: true
314
+ };
315
+ </div>
316
+ </div>
317
+ </div>
318
+ </uib-accordion-group>
319
+ <uib-accordion-group heading="Search with select all and keyboard controls">
320
+ <div class="row">
321
+ <div class="col-xs-12 col-sm-6">
322
+ <h3>Demo</h3>
323
+ <div class="well">
324
+ <div>
325
+ <div ng-dropdown-multiselect="" options="searchSelectAllData" selected-model="searchSelectAllModel" extra-settings="searchSelectAllSettings"></div>
326
+ </div>
327
+ </div>
328
+ </div>
329
+ <div class="col-xs-12 col-sm-6">
330
+ <h3>The model:</h3>
331
+ <pre>{{searchSelectAllModel|json}}</pre>
332
+ </div>
333
+ </div>
334
+ <div class="row">
335
+ <div class="col-md-12">
336
+ <h3>Code</h3>
337
+ <div hljs language="javascript">
338
+ // HTML
339
+ <div ng-dropdown-multiselect="" options="searchSelectAllData" selected-model="searchSelectAllModel" extra-settings="searchSelectAllSettings"></div>
340
+ // JavaScript
341
+ $scope.searchSelectAllModel = [];
342
+ $scope.searchSelectAllData = [
343
+ {id: 1, label: "David"},
344
+ {id: 2, label: "Jhon"},
345
+ {id: 3, label: "Danny"}
346
+ ];
347
+ $scope.searchSelectAllSettings = {
348
+ enableSearch: true,
349
+ showSelectAll: true,
350
+ keyboardControls: true
351
+ };
352
+ </div>
353
+ </div>
354
+ </div>
355
+ </uib-accordion-group>
356
+ <uib-accordion-group heading="Selection Limit">
357
+ <div class="row">
358
+ <div class="col-xs-12">
359
+ By default, there is no limit on the maximum selected items.
360
+ <br />You can limit the selection by providing selectionLimit using the settings attribute.
361
+ <br />
362
+ <strong>Note 1: limit the selection to 0 is the default and won't limit the selection!</strong>
363
+ <br />
364
+ <strong>Note 2: When using this limit, the "Select All" button will not appear!</strong>
365
+ <br />
366
+ <strong>
367
+ Note 3: When using the limit and setting it to "1", the model will contain a
368
+ single object instead of array.
369
+ </strong>
370
+ <br />
371
+ <strong>
372
+ Note 4: When using single selection (limit to 1) the selection will change
373
+ automaticlly if another item is clicked!
374
+ </strong>
375
+ </div>
376
+ </div>
377
+ <div class="row">
378
+ <div class="col-xs-12 col-sm-6">
379
+ <h3>Demo</h3>
380
+ <div>
381
+ <div ng-dropdown-multiselect options="example10data" selected-model="example10model" extra-settings="example10settings"></div>
382
+ </div>
383
+ </div>
384
+ <div class="col-xs-12 col-sm-6">
385
+ <h3>The model:</h3>
386
+ <pre>{{example10model|json}}</pre>
387
+ </div>
388
+ </div>
389
+ <div class="row">
390
+ <div class="col-md-12">
391
+ <h3>Code</h3>
392
+ <div hljs>
393
+ // HTML
394
+ <div ng-dropdown-multiselect options="example10data" selected-model="example10model" extra-settings="example10settings"></div>
395
+
396
+ // JavaScript $scope.example10model = []; $scope.example10data = [ {id: 1, label: "David"}, {id: 2, label: "Jhon"}, {id: 3, label: "Danny"}]; $scope.example10settings = {selectionLimit: 2};
397
+ </div>
398
+ </div>
399
+ </div>
400
+ </uib-accordion-group>
401
+ <uib-accordion-group heading="Single Selection Limit">
402
+ <div class="row">
403
+ <div class="col-xs-12">
404
+ Please read the notes in the "Selection Limit" example.
405
+ <br />This example shows an example of using selection limit and single selection.
406
+ </div>
407
+ </div>
408
+ <div class="row">
409
+ <div class="col-xs-12 col-sm-6">
410
+ <h3>Demo</h3>
411
+ <div class="well">
412
+ <div>
413
+ <div ng-dropdown-multiselect options="example12data" selected-model="example12model" extra-settings="example12settings"></div>
414
+ </div>
415
+ </div>
416
+ </div>
417
+ <div class="col-xs-12 col-sm-6">
418
+ <h3>The model:</h3>
419
+ <pre>{{example12model|json}}</pre>
420
+ </div>
421
+ </div>
422
+ <div class="row">
423
+ <div class="col-md-12">
424
+ <h3>Code</h3>
425
+ <div hljs>
426
+ // HTML
427
+ <div ng-dropdown-multiselect options="example10data" selected-model="example10model" extra-settings="example10settings"></div>
428
+
429
+ // JavaScript
430
+ $scope.example12model = {}; // ! IMPORTANT !
431
+ $scope.example12data = [
432
+ {id: 1, label: "David"},
433
+ {id: 2, label: "Jhon"},
434
+ {id: 3, label: "Danny"}
435
+ ];
436
+ $scope.example12settings = {selectionLimit: 1};
437
+ </div>
438
+ </div>
439
+ </div>
440
+ </uib-accordion-group>
441
+ <uib-accordion-group heading="Group Items By Property">
442
+ <div class="row">
443
+ <div class="col-xs-12">
444
+ You can also group the items by propery that you want, in order to to that, provide the "group-by" attribute.
445
+ <br />Also, you need to provide "groupByTextProvider" callback in the extra-settings attribute, in order to provide the header text for each group.
446
+ <br />
447
+ <strong>
448
+ Note: If you won't specify the "groupByTextProvider" callback in order to get the
449
+ header for each group, the value of the group will be displayed!
450
+ </strong>
451
+ </div>
452
+ </div>
453
+ <div class="row">
454
+ <div class="col-xs-12 col-sm-6">
455
+ <h3>Demo</h3>
456
+ <div class="well">
457
+ <div>
458
+ <div ng-dropdown-multiselect options="example11data" selected-model="example11model" extra-settings="example11settings" group-by="gender"></div>
459
+ </div>
460
+ </div>
461
+ </div>
462
+ <div class="col-xs-12 col-sm-6">
463
+ <h3>The model:</h3>
464
+ <pre>{{example11model|json}}</pre>
465
+ </div>
466
+ </div>
467
+ <div class="row">
468
+ <div class="col-md-12">
469
+ <h3>Code</h3>
470
+ <div hljs>
471
+ // HTML
472
+ <div ng-dropdown-multiselect options="example11data" selected-model="example11model" extra-settings="example11settings" group-by="gender"></div>
473
+
474
+ // JavaScript $scope.example11model = []; $scope.example11data = [ {id: 1, label: "David", gender: 'M'}, {id: 2, label: "Jhon", gender: 'M'}, {id: 3, label: "Lisa", gender: 'F'}, {id: 4, label: "Nicole", gender: 'F'}, {id: 5, label: "Danny", gender: 'M'}]; $scope.example11settings = { groupByTextProvider: function(groupValue) { if (groupValue === 'M') { return 'Male'; } else { return 'Female'; } } };
475
+ </div>
476
+ </div>
477
+ </div>
478
+ </uib-accordion-group>
479
+ <uib-accordion-group heading="Select Items by Group">
480
+ <div class="row">
481
+ <div class="col-xs-12">
482
+ When items are grouped by property you can also specify an array of groups that you can use to select the items by.
483
+ The extra-settings property selectByGroups accepts an array of the values of the groups that you want to be selectable.
484
+ The naming will use the groupByTextProvider function to give them an actual label.
485
+ </div>
486
+ </div>
487
+ <div class="row">
488
+ <div class="col-xs-12 col-sm-6">
489
+ <h3>Demo</h3>
490
+ <div class="well">
491
+ <div>
492
+ <div ng-dropdown-multiselect options="selectByGroupData" selected-model="selectByGroupModel" extra-settings="selectByGroupSettings" group-by="gender"></div>
493
+ </div>
494
+ </div>
495
+ </div>
496
+ <div class="col-xs-12 col-sm-6">
497
+ <h3>The model:</h3>
498
+ <pre>{{selectByGroupModel|json}}</pre>
499
+ </div>
500
+ </div>
501
+ <div class="row">
502
+ <div class="col-md-12">
503
+ <h3>Code</h3>
504
+ <div hljs>
505
+ // HTML
506
+ <div ng-dropdown-multiselect options="selectByGroupData" selected-model="selectByGroupModel" extra-settings="selectByGroupSettings" group-by="gender"></div>
307
507
 
308
- // JavaScript $scope.example12model = {}; // ! IMPORTANT ! $scope.example12data = [ {id: 1, label: "David"}, {id: 2, label: "Jhon"}, {id: 3, label: "Danny"}]; $scope.example12settings = {selectionLimit: 1};</div>
309
- </div>
310
- </div>
311
- </div>
312
- </div>
313
- </accordion-group>
314
- <accordion-group heading="Group Items By Property">
315
- <div class="row">
316
- <div class="col-xs-12">
317
- You can also group the items by propery that you want, in order to to that, provide the "group-by" attribute.
318
- <br />Also, you need to provide "groupByTextProvider" callback in the extra-settings attribute, in order to provide the header text for each group.
319
- <br />
320
- <strong>Note: If you won't specify the "groupByTextProvider" callback in order to get the
321
- header for each group, the value of the group will be displayed!</strong>
322
- </div>
323
- </div>
324
- <div class="row">
325
- <div class="col-xs-12 col-sm-6">
326
- <h3>Demo</h3>
327
- <div class="well">
328
- <div>
329
- <div ng-dropdown-multiselect options="example11data" selected-model="example11model" extra-settings="example11settings" group-by="gender"></div>
330
- </div>
331
- </div>
332
- </div>
333
- <div class="col-xs-12 col-sm-6">
334
- <h3>The model:</h3>
335
- <pre>{{example11model|json}}</pre>
336
- </div>
337
- </div>
338
- <div class="row">
339
- <div class="col-md-12">
340
- <h3>Code</h3>
341
- <div class="well">
342
- <div>
343
- <div hljs>
344
- // HTML
345
- <div ng-dropdown-multiselect options="example11data" selected-model="example11model" extra-settings="example11settings" group-by="gender"></div>
508
+ // JavaScript
509
+ $scope.selectByGroupModel = [];
510
+ $scope.selectByGroupData = [
511
+ { id: 1, label: "David", gender: 'M' },
512
+ { id: 2, label: "Jhon", gender: 'M' },
513
+ { id: 3, label: "Lisa", gender: 'F' },
514
+ { id: 4, label: "Nicole", gender: 'F' },
515
+ { id: 5, label: "Danny", gender: 'M' },
516
+ { id: 6, label: "Unknown", gender: 'O' }];
346
517
 
347
- // JavaScript $scope.example11model = []; $scope.example11data = [ {id: 1, label: "David", gender: 'M'}, {id: 2, label: "Jhon", gender: 'M'}, {id: 3, label: "Lisa", gender: 'F'}, {id: 4, label: "Nicole", gender: 'F'}, {id: 5, label: "Danny", gender: 'M'}]; $scope.example11settings = { groupByTextProvider: function(groupValue) { if (groupValue === 'M') { return 'Male'; } else { return 'Female'; } } };
348
- </div>
349
- </div>
350
- </div>
351
- </div>
352
- </div>
353
- </accordion-group>
354
- <accordion-group heading="Custom ID property">
355
- <div class="row">
356
- <div class="col-xs-12">
357
- By default, the directive tries to find "id" property for each object to identify it as unique.
358
- <br />You can change this behavior and select your own ID property.
359
- <br />In this example, you can see that if the ID property is not unique - All items that match the custom ID property will be selected, but the model will contain it as a unique ID (Try to select "Danny" from the list to see it in action).
360
- <br />
361
- <br />This feature is also useful if your objects comes from MongoDB and have a "_id" property instead of "id".
362
- </div>
363
- </div>
364
- <div class="row">
365
- <div class="col-xs-12 col-sm-6">
366
- <h3>Demo</h3>
367
- <div class="well">
368
- <div>
369
- <div ng-dropdown-multiselect options="example3data" selected-model="example3model" extra-settings="example3settings"></div>
370
- </div>
371
- </div>
372
- </div>
373
- <div class="col-xs-12 col-sm-6">
374
- <h3>The model:</h3>
375
- <pre>{{example3model|json}}</pre>
376
- </div>
377
- </div>
378
- <div class="row">
379
- <div class="col-md-12">
380
- <h3>Code</h3>
381
- <div class="well">
382
- <div>
383
- <div hljs>
384
- // HTML
385
- <div ng-dropdown-multiselect options="example3data" selected-model="example3model" extra-settings="example3settings"></div>
518
+ $scope.selectByGroupSettings = {
519
+ selectByGroups: ['F', 'M'],
520
+ groupByTextProvider: function(groupValue) {
521
+ switch (groupValue) {
522
+ case 'M':
523
+ return 'Male';
524
+ case 'F':
525
+ return 'Female';
526
+ case 'O':
527
+ return 'Other';
528
+ }
529
+ }
530
+ };
531
+ </div>
532
+ </div>
533
+ </div>
534
+ </uib-accordion-group>
535
+ <uib-accordion-group heading="Custom ID property">
536
+ <div class="row">
537
+ <div class="col-xs-12">
538
+ By default, the directive tries to find "id" property for each object to identify it as unique.
539
+ <br />You can change this behavior and select your own ID property.
540
+ <br />In this example, you can see that if the ID property is not unique - All items that match the custom ID property will be selected, but the model will contain it as a unique ID (Try to select "Danny" from the list to see it in action).
541
+ <br />
542
+ <br />This feature is also useful if your objects comes from MongoDB and have a "_id" property instead of "id".
543
+ </div>
544
+ </div>
545
+ <div class="row">
546
+ <div class="col-xs-12 col-sm-6">
547
+ <h3>Demo</h3>
548
+ <div class="well">
549
+ <div>
550
+ <div ng-dropdown-multiselect options="example3data" selected-model="example3model" extra-settings="example3settings"></div>
551
+ </div>
552
+ </div>
553
+ </div>
554
+ <div class="col-xs-12 col-sm-6">
555
+ <h3>The model:</h3>
556
+ <pre>{{example3model|json}}</pre>
557
+ </div>
558
+ </div>
559
+ <div class="row">
560
+ <div class="col-md-12">
561
+ <h3>Code</h3>
562
+ <div hljs>
563
+ // HTML
564
+ <div ng-dropdown-multiselect options="example3data" selected-model="example3model" extra-settings="example3settings"></div>
386
565
 
387
- // JavaScript $scope.example3model = []; $scope.example3data = [ {id: 1, label: "David"}, {id: 2, label: "Jhon"}, {id: 3, label: "Danny"}, {id: 4, label: "Danny"}]; $scope.example3settings = {displayProp: 'label', idProp: 'label'};</div>
388
- </div>
389
- </div>
390
- </div>
391
- </div>
392
- </accordion-group>
393
- <accordion-group heading="Model Custom Property">
394
- <div class="row">
395
- <div class="col-xs-12">
396
- By default, the model of the selected items will contain the objects with "id" property with the value of the idProp settings.
397
- <br />You can modify this by using the externalIdProp in settings!
398
- </div>
399
- </div>
400
- <div class="row">
401
- <div class="col-xs-12 col-sm-6">
402
- <h3>Demo</h3>
403
- <div class="well">
404
- <div>
405
- <div ng-dropdown-multiselect options="example4data" selected-model="example4model" extra-settings="example4settings"></div>
406
- </div>
407
- </div>
408
- </div>
409
- <div class="col-xs-12 col-sm-6">
410
- <h3>The model:</h3>
411
- <pre>{{example4model|json}}</pre>
412
- </div>
413
- </div>
414
- <div class="row">
415
- <div class="col-md-12">
416
- <h3>Code</h3>
417
- <div class="well">
418
- <div>
419
- <div hljs>
420
- // HTML
421
- <div ng-dropdown-multiselect options="example4data" selected-model="example4model" extra-settings="example4settings"></div>
566
+ // JavaScript $scope.example3model = []; $scope.example3data = [ {id: 1, label: "David"}, {id: 2, label: "Jhon"}, {id: 3, label: "Danny"}, {id: 4, label: "Danny"}]; $scope.example3settings = {displayProp: 'label', idProp: 'label'};
567
+ </div>
568
+ </div>
569
+ </div>
570
+ </uib-accordion-group>
571
+ <uib-accordion-group heading="Model Custom Property">
572
+ <div class="row">
573
+ <div class="col-xs-12">
574
+ By default, the model of the selected items will contain the objects with "id" property with the value of the idProp settings.
575
+ <br />You can modify this by using the externalIdProp in settings!
576
+ </div>
577
+ </div>
578
+ <div class="row">
579
+ <div class="col-xs-12 col-sm-6">
580
+ <h3>Demo</h3>
581
+ <div class="well">
582
+ <div>
583
+ <div ng-dropdown-multiselect options="example4data" selected-model="example4model" extra-settings="example4settings"></div>
584
+ </div>
585
+ </div>
586
+ </div>
587
+ <div class="col-xs-12 col-sm-6">
588
+ <h3>The model:</h3>
589
+ <pre>{{example4model|json}}</pre>
590
+ </div>
591
+ </div>
592
+ <div class="row">
593
+ <div class="col-md-12">
594
+ <h3>Code</h3>
595
+ <div hljs>
596
+ // HTML
597
+ <div ng-dropdown-multiselect options="example4data" selected-model="example4model" extra-settings="example4settings"></div>
422
598
 
423
- // JavaScript $scope.example4model = []; $scope.example4data = [ {id: 1, label: "David"}, {id: 2, label: "Jhon"}, {id: 3, label: "Danny"}]; $scope.example4settings = {displayProp: 'label', idProp: 'id', externalIdProp: 'myCustomPropertyForTheObject'};</div>
424
- </div>
425
- </div>
426
- </div>
427
- </div>
428
- </accordion-group>
429
- <accordion-group heading="Custom Button Text">
430
- <div class="row">
431
- <div class="col-xs-12">
432
- You can select your own text of the button using the "defaultText" in settings.
433
- </div>
434
- </div>
435
- <div class="row">
436
- <div class="col-xs-12 col-sm-6">
437
- <h3>Demo</h3>
438
- <div class="well">
439
- <div>
440
- <div ng-dropdown-multiselect options="example5data" selected-model="example5model" extra-settings="example5settings" translation-texts="example5customTexts"></div>
441
- </div>
442
- </div>
443
- </div>
444
- <div class="col-xs-12 col-sm-6">
445
- <h3>The model:</h3>
446
- <pre>{{example5model|json}}</pre>
447
- </div>
448
- </div>
449
- <div class="row">
450
- <div class="col-md-12">
451
- <h3>Code</h3>
452
- <div class="well">
453
- <div>
454
- <div hljs>
455
- // HTML
456
- <div ng-dropdown-multiselect options="example5data" selected-model="example5model" extra-settings="example5settings" translation-texts="example5customTexts"></div>
599
+ // JavaScript $scope.example4model = []; $scope.example4data = [ {id: 1, label: "David"}, {id: 2, label: "Jhon"}, {id: 3, label: "Danny"}]; $scope.example4settings = {displayProp: 'label', idProp: 'id', externalIdProp: 'myCustomPropertyForTheObject'};
600
+ </div>
601
+ </div>
602
+ </div>
603
+ </uib-accordion-group>
604
+ <uib-accordion-group heading="Custom Button Text">
605
+ <div class="row">
606
+ <div class="col-xs-12">
607
+ You can select your own text of the button using the "defaultText" in settings.
608
+ </div>
609
+ </div>
610
+ <div class="row">
611
+ <div class="col-xs-12 col-sm-6">
612
+ <h3>Demo</h3>
613
+ <div class="well">
614
+ <div>
615
+ <div ng-dropdown-multiselect options="example5data" selected-model="example5model" extra-settings="example5settings" translation-texts="example5customTexts"></div>
616
+ </div>
617
+ </div>
618
+ </div>
619
+ <div class="col-xs-12 col-sm-6">
620
+ <h3>The model:</h3>
621
+ <pre>{{example5model|json}}</pre>
622
+ </div>
623
+ </div>
624
+ <div class="row">
625
+ <div class="col-md-12">
626
+ <h3>Code</h3>
627
+ <div hljs>
628
+ // HTML
629
+ <div ng-dropdown-multiselect options="example5data" selected-model="example5model" extra-settings="example5settings" translation-texts="example5customTexts"></div>
457
630
 
458
- // JavaScript $scope.example5model = []; $scope.example5data = [ {id: 1, label: "David"}, {id: 2, label: "Jhon"}, {id: 3, label: "Danny"}]; $scope.example5settings = {}; $scope.example5customTexts = {buttonDefaultText: 'Select Users'};</div>
459
- </div>
460
- </div>
461
- </div>
462
- </div>
463
- </accordion-group>
464
- <accordion-group heading="Pre-selected Values">
465
- <div class="row">
466
- <div class="col-xs-12">
467
- This example shows a demostration of using a pre-setted model.
468
- <br />
469
- <strong>Note:</strong>The model must be structured as array of objects with "id" property (or whatever you use as custom id).
470
- </div>
471
- </div>
472
- <div class="row">
473
- <div class="col-xs-12 col-sm-6">
474
- <h3>Demo</h3>
475
- <div class="well">
476
- <div>
477
- <div ng-dropdown-multiselect options="example6data" selected-model="example6model" extra-settings="example6settings"></div>
478
- </div>
479
- </div>
480
- </div>
481
- <div class="col-xs-12 col-sm-6">
482
- <h3>The model:</h3>
483
- <pre>{{example6model|json}}</pre>
484
- </div>
485
- </div>
486
- <div class="row">
487
- <div class="col-md-12">
488
- <h3>Code</h3>
489
- <div class="well">
490
- <div>
491
- <div hljs>
492
- // HTML
493
- <div ng-dropdown-multiselect options="example6data" selected-model="example6model" extra-settings="example6settings"></div>
631
+ // JavaScript $scope.example5model = []; $scope.example5data = [ {id: 1, label: "David"}, {id: 2, label: "Jhon"}, {id: 3, label: "Danny"}]; $scope.example5settings = {}; $scope.example5customTexts = {buttonDefaultText: 'Select Users'};
632
+ </div>
633
+ </div>
634
+ </div>
635
+ </uib-accordion-group>
636
+ <uib-accordion-group heading="Pre-selected Values">
637
+ <div class="row">
638
+ <div class="col-xs-12">
639
+ This example shows a demostration of using a pre-setted model.
640
+ <br />
641
+ <strong>Note:</strong>The model must be structured as array of objects with "id" property (or whatever you use as custom id).
642
+ </div>
643
+ </div>
644
+ <div class="row">
645
+ <div class="col-xs-12 col-sm-6">
646
+ <h3>Demo</h3>
647
+ <div class="well">
648
+ <div>
649
+ <div ng-dropdown-multiselect options="example6data" selected-model="example6model" extra-settings="example6settings"></div>
650
+ </div>
651
+ </div>
652
+ </div>
653
+ <div class="col-xs-12 col-sm-6">
654
+ <h3>The model:</h3>
655
+ <pre>{{example6model|json}}</pre>
656
+ </div>
657
+ </div>
658
+ <div class="row">
659
+ <div class="col-md-12">
660
+ <h3>Code</h3>
661
+ <div hljs>
662
+ // HTML
663
+ <div ng-dropdown-multiselect options="example6data" selected-model="example6model" extra-settings="example6settings"></div>
494
664
 
495
- // JavaScript $scope.example6model = [{id: 1}, {id: 3}]; $scope.example6data = [ {id: 1, label: "David"}, {id: 2, label: "Jhon"}, {id: 3, label: "Danny"}]; $scope.example6settings = {};</div>
496
- </div>
497
- </div>
498
- </div>
499
- </div>
500
- </accordion-group>
501
- <accordion-group heading="Full Object as model">
502
- <div class="row">
503
- <div class="col-xs-12">
504
- This example shows a demostration of using full object as a model.
505
- <br />This can be done by settings the "externalIdProp" to empty string.
506
- <br />
507
- <strong>Note: The object detection and the logic of deciding which object is selected is still uses only the "id" property, so you can even modify the objects in the model without worry.</strong>
508
- </div>
509
- </div>
510
- <div class="row">
511
- <div class="col-xs-12 col-sm-6">
512
- <h3>Demo</h3>
513
- <div class="well">
514
- <div>
515
- <div ng-dropdown-multiselect options="example7data" selected-model="example7model" extra-settings="example7settings"></div>
516
- </div>
517
- </div>
518
- </div>
519
- <div class="col-xs-12 col-sm-6">
520
- <h3>The model:</h3>
521
- <pre>{{example7model|json}}</pre>
522
- </div>
523
- </div>
524
- <div class="row">
525
- <div class="col-md-12">
526
- <h3>Code</h3>
527
- <div class="well">
528
- <div>
529
- <div hljs>
530
- // HTML
531
- <div ng-dropdown-multiselect options="example7data" selected-model="example7model" extra-settings="example7settings"></div>
665
+ // JavaScript $scope.example6model = [{id: 1}, {id: 3}]; $scope.example6data = [ {id: 1, label: "David"}, {id: 2, label: "Jhon"}, {id: 3, label: "Danny"}]; $scope.example6settings = {};
666
+ </div>
667
+ </div>
668
+ </div>
669
+ </uib-accordion-group>
670
+ <uib-accordion-group heading="Full Object as model">
671
+ <div class="row">
672
+ <div class="col-xs-12">
673
+ This example shows a demostration of using full object as a model.
674
+ <br />This can be done by settings the "externalIdProp" to empty string.
675
+ <br />
676
+ <strong>Note: The object detection and the logic of deciding which object is selected is still uses only the "id" property, so you can even modify the objects in the model without worry.</strong>
677
+ </div>
678
+ </div>
679
+ <div class="row">
680
+ <div class="col-xs-12 col-sm-6">
681
+ <h3>Demo</h3>
682
+ <div class="well">
683
+ <div>
684
+ <div ng-dropdown-multiselect options="example7data" selected-model="example7model" extra-settings="example7settings"></div>
685
+ </div>
686
+ </div>
687
+ </div>
688
+ <div class="col-xs-12 col-sm-6">
689
+ <h3>The model:</h3>
690
+ <pre>{{example7model|json}}</pre>
691
+ </div>
692
+ </div>
693
+ <div class="row">
694
+ <div class="col-md-12">
695
+ <h3>Code</h3>
696
+ <div hljs>
697
+ // HTML
698
+ <div ng-dropdown-multiselect options="example7data" selected-model="example7model" extra-settings="example7settings"></div>
532
699
 
533
- // JavaScript $scope.example7model = []; $scope.example7data = [ {id: 1, label: "David"}, {id: 2, label: "Jhon"}, {id: 3, label: "Danny"}]; $scope.example7settings = {externalIdProp: ''};</div>
534
- </div>
535
- </div>
536
- </div>
537
- </div>
538
- </accordion-group>
539
- <accordion-group heading="External Search Filter">
540
- <div class="row">
541
- <div class="col-xs-12">
542
- This example shows a demostration of access and set the search filter from outside the directive.
543
- <br />This can be done by settings the "search-filter" attribute.
544
- <br />
545
- </div>
546
- </div>
547
- <div class="row">
548
- <div class="col-xs-12 col-sm-6">
549
- <h3>Demo</h3>
550
- <div class="well">
551
- <div>
552
- <div ng-dropdown-multiselect search-filter="customFilter" options="example15data" selected-model="example15model" extra-settings="example15settings"></div>
553
- </div>
554
- </div>
555
- </div>
556
- <div class="col-xs-12 col-sm-6">
557
- <h3>The model:</h3>
558
- <pre>{{example7model|json}}</pre>
559
- <h3>Search Filter:</h3>
560
- <pre>{{customFilter|json}}</pre>
561
- </div>
562
- </div>
563
- <div class="row">
564
- <div class="col-md-12">
565
- <h3>Code</h3>
566
- <div class="well">
567
- <div>
568
- <div hljs>
700
+ // JavaScript $scope.example7model = []; $scope.example7data = [ {id: 1, label: "David"}, {id: 2, label: "Jhon"}, {id: 3, label: "Danny"}]; $scope.example7settings = {externalIdProp: ''};
701
+ </div>
702
+ </div>
703
+ </div>
704
+ </uib-accordion-group>
705
+ <uib-accordion-group heading="External Search Filter">
706
+ <div class="row">
707
+ <div class="col-xs-12">
708
+ This example shows a demostration of access and set the search filter from outside the directive.
709
+ <br />This can be done by settings the "search-filter" attribute.
710
+ <br />
711
+ </div>
712
+ </div>
713
+ <div class="row">
714
+ <div class="col-xs-12 col-sm-6">
715
+ <h3>Demo</h3>
716
+ <div class="well">
717
+ <div>
718
+ <div ng-dropdown-multiselect search-filter="customFilter" options="example15data" selected-model="example15model" extra-settings="example15settings"></div>
719
+ </div>
720
+ </div>
721
+ </div>
722
+ <div class="col-xs-12 col-sm-6">
723
+ <h3>The model:</h3>
724
+ <pre>{{example7model|json}}</pre>
725
+ <h3>Search Filter:</h3>
726
+ <pre>{{customFilter|json}}</pre>
727
+ </div>
728
+ </div>
729
+ <div class="row">
730
+ <div class="col-md-12">
731
+ <h3>Code</h3>
732
+ <div hljs>
569
733
  // HTML
570
734
  <div ng-dropdown-multiselect search-filter="customFilter" options="example15data" selected-model="example15model" extra-settings="example15settings"></div>
571
735
 
@@ -573,325 +737,571 @@ $scope.example14settings = {
573
737
 
574
738
  $scope.example15model = [];
575
739
  $scope.example15data = [
576
- {id: 1, label: "David"},
577
- {id: 2, label: "Jhon"},
578
- {id: 3, label: "Lisa"},
579
- {id: 4, label: "Nicole"},
580
- {id: 5, label: "Danny"}];
740
+ {id: 1, label: "David"},
741
+ {id: 2, label: "Jhon"},
742
+ {id: 3, label: "Lisa"},
743
+ {id: 4, label: "Nicole"},
744
+ {id: 5, label: "Danny"}];
581
745
 
582
746
  $scope.example15settings = {enableSearch: true};
583
747
 
584
748
  $scope.customFilter = 'a';
585
- </div>
586
- </div>
587
- </div>
588
- </div>
589
- </div>
590
- </accordion-group>
591
- <accordion-group heading="Checkboxes List">
592
- <div class="row">
593
- <div class="col-xs-12">
594
- You can also use a checkboxes list by adding "checkboxes" attribute to your element!
595
- </div>
596
- </div>
597
- <div class="row">
598
- <div class="col-xs-12 col-sm-6">
599
- <h3>Demo</h3>
600
- <div class="well">
601
- <div>
602
- <div ng-dropdown-multiselect options="example8data" selected-model="example8model" checkboxes="true"></div>
603
- </div>
604
- </div>
605
- </div>
606
- <div class="col-xs-12 col-sm-6">
607
- <h3>The model:</h3>
608
- <pre>{{example8model|json}}</pre>
609
- </div>
610
- </div>
611
- <div class="row">
612
- <div class="col-md-12">
613
- <h3>Code</h3>
614
- <div class="well">
615
- <div>
616
- <div hljs>
617
- // HTML
618
- <div ng-dropdown-multiselect options="example8data" selected-model="example8model" checkboxes="true"></div>
749
+ </div>
750
+ </div>
751
+ </div>
752
+ </uib-accordion-group>
753
+ <uib-accordion-group heading="Checkboxes List">
754
+ <div class="row">
755
+ <div class="col-xs-12">
756
+ You can also use a checkboxes list by adding "checkboxes" attribute to your element!
757
+ </div>
758
+ </div>
759
+ <div class="row">
760
+ <div class="col-xs-12 col-sm-6">
761
+ <h3>Demo</h3>
762
+ <div class="well">
763
+ <div>
764
+ <div ng-dropdown-multiselect options="example8data" selected-model="example8model" checkboxes="true"></div>
765
+ </div>
766
+ </div>
767
+ </div>
768
+ <div class="col-xs-12 col-sm-6">
769
+ <h3>The model:</h3>
770
+ <pre>{{example8model|json}}</pre>
771
+ </div>
772
+ </div>
773
+ <div class="row">
774
+ <div class="col-md-12">
775
+ <h3>Code</h3>
776
+ <div hljs>
777
+ // HTML
778
+ <div ng-dropdown-multiselect options="example8data" selected-model="example8model" checkboxes="true"></div>
619
779
 
620
- // JavaScript $scope.example8model = []; $scope.example8data = [ {id: 1, label: "David"}, {id: 2, label: "Jhon"}, {id: 3, label: "Danny"}];</div>
621
- </div>
622
- </div>
623
- </div>
624
- </div>
625
- </accordion-group>
626
- </accordion>
627
- <h1>Full API Documentation</h1>
628
- <h2>Attributes</h2>
629
- <p>List of allowed attributes, you can find more information about them in the usage examples above.</p>
630
- <table class="table table-condensed">
631
- <thead>
632
- <tr>
633
- <th>Attribute Name</th>
634
- <th>Type</th>
635
- <th>Description</th>
636
- </tr>
637
- </thead>
638
- <tbody>
639
- <tr>
640
- <td><strong>selected-model</strong>
641
- </td>
642
- <td>Object / Array</td>
643
- <td>The object the will contain the model for the selected items in the dropdown.</td>
644
- </tr>
645
- <tr>
646
- <td><strong>options</strong>
647
- </td>
648
- <td>Object / Array</td>
649
- <td>The options for the dropdown.</td>
650
- </tr>
651
- <tr>
652
- <td><strong>extra-settings</strong>
653
- </td>
654
- <td>Object</td>
655
- <td>The settings for the directive, more information about these settings are available below.</td>
656
- </tr>
657
- <tr>
658
- <td><strong>events</strong>
659
- </td>
660
- <td>Object</td>
661
- <td>Events callbacks, more information below.</td>
662
- </tr>
663
- <tr>
664
- <td><strong>translation-texts</strong>
665
- </td>
666
- <td>Object</td>
667
- <td>Gives the ability to modify the default texts in the directive. More information below.</td>
668
- </tr>
669
- <tr>
670
- <td><strong>group-by</strong>
671
- </td>
672
- <td>String</td>
673
- <td>The name of the property which you like to group by your options. See grouping example.</td>
674
- </tr>
675
- <tr>
676
- <td><strong>checkboxes</strong>
677
- </td>
678
- <td>Boolean</td>
679
- <td>Indicated if to show a normal dropdown with glyphicons or HTML checkboxes.</td>
680
- </tr>
681
- <tr>
682
- <td><strong>search-filter</strong>
683
- </td>
684
- <td>String</td>
685
- <td>Uses for settings the search filter from outside the direcrtive.</td>
686
- </tr>
687
- </tbody>
688
- </table>
689
- <h2>Settings</h2>
690
- <p>Available settings that effects the display or behavior of the directive.
691
- <br />These setting are set with the "extra-settings" attribute.</p>
692
- <table class="table table-condensed">
693
- <thead>
694
- <tr>
695
- <th>Property Name</th>
696
- <th>Type</th>
697
- <th>Default Value</th>
698
- <th>Description</th>
699
- </tr>
700
- </thead>
701
- <tbody>
702
- <tr>
703
- <td>dynamicTitle</td>
704
- <td>Boolean</td>
705
- <td>true</td>
706
- <td>Indicates if the text of the button should change when selecting items from the list.</td>
707
- </tr>
708
- <tr>
709
- <td>closeOnBlur</td>
710
- <td>Boolean</td>
711
- <td>true</td>
712
- <td>Indicates if the dropdown should close when clicking outside of it's scope.</td>
713
- </tr>
714
- <tr>
715
- <td>displayProp</td>
716
- <td>String</td>
717
- <td>label</td>
718
- <td>The name of the property that contains the text for the item.</td>
719
- </tr>
720
- <tr>
721
- <td>idProp</td>
722
- <td>String</td>
723
- <td>id</td>
724
- <td>The name of the property that contains the id for the elements.</td>
725
- </tr>
726
- <tr>
727
- <td>externalIdProp</td>
728
- <td>String</td>
729
- <td>id</td>
730
- <td>The name of the property that will use for the selected items model.</td>
731
- </tr>
732
- <tr>
733
- <td>enableSearch</td>
734
- <td>Boolean</td>
735
- <td>false</td>
736
- <td>Indicated if to show the search input or not.</td>
737
- </tr>
738
- <tr>
739
- <td>selectionLimit</td>
740
- <td>Number</td>
741
- <td>0</td>
742
- <td>The max allowed selected items for the list. For more information see the examples above.</td>
743
- </tr>
744
- <tr>
745
- <td>showCheckAll</td>
746
- <td>Boolean</td>
747
- <td>true</td>
748
- <td>Indicates if to show the "Check All" item.</td>
749
- </tr>
750
- <tr>
751
- <td>showUncheckAll</td>
752
- <td>Boolean</td>
753
- <td>true</td>
754
- <td>Indicates if to show the "Uncheck All" item.</td>
755
- </tr>
756
- <tr>
757
- <td>closeOnSelect</td>
758
- <td>Boolean</td>
759
- <td>false</td>
760
- <td>Indicates if to close the dropdown after checking an item on the list.</td>
761
- </tr>
762
- <tr>
763
- <td>closeOnDeselect</td>
764
- <td>Boolean</td>
765
- <td>false</td>
766
- <td>Indicates if to close the dropdown after unchecking an item on the list.</td>
767
- </tr>
768
- <tr>
769
- <td>buttonClasses</td>
770
- <td>String</td>
771
- <td>btn btn-default</td>
772
- <td>The CSS classes that used for setting the style of the button.</td>
773
- </tr>
774
- <tr>
775
- <td>groupByTextProvider</td>
776
- <td>Function</td>
777
- <td>angular.noop</td>
778
- <td>A callback to a function that provide that name for each group when using group-by attribute. The parameter for the function will be the value of the group-by property.</td>
779
- </tr>
780
- <tr>
781
- <td>scrollable</td>
782
- <td>Boolean</td>
783
- <td>false</td>
784
- <td>Indicates if the dropdown is scrollable, useful if you have a lot of items.</td>
785
- </tr>
786
- <tr>
787
- <td>scrollableHeight</td>
788
- <td>Number</td>
789
- <td>300px</td>
790
- <td>Indicates the height of the drop down if the dropdown is scrollable.</td>
791
- </tr>
792
- <tr>
793
- <td>smartButtonMaxItems</td>
794
- <td>Number</td>
795
- <td>0</td>
796
- <td>Manages the "Smart Button Text" feature, defines the maximum amount of items to on the button.</td>
797
- </tr>
798
- <tr>
799
- <td>smartButtonTextConverter</td>
800
- <td>Function</td>
801
- <td>angular.noop</td>
802
- <td>Related the "Smart Button Text" feature, if a function provided - it will called with two paramters: The item's text and the original item, the return value will displayed instead of the item's display property. This feature is useful when you want to convert the displayed text into something else.</td>
803
- </tr>
804
- </tbody>
805
- </table>
806
- <h2>Events</h2>
807
- <p>Available event callbacks what the directive fires. These callbacks are set with "events" attribute.</p>
808
- <table class="table table-condensed">
809
- <thead>
810
- <tr>
811
- <th>Event Name</th>
812
- <th>Parameters</th>
813
- <th>Description</th>
814
- </tr>
815
- </thead>
816
- <tbody>
817
- <tr>
818
- <td>onItemSelect</td>
819
- <td>item</td>
820
- <td>Fired when selecting an item.</td>
821
- </tr>
822
- <tr>
823
- <td>onItemDeselect</td>
824
- <td>item</td>
825
- <td>Fired when unselecting an item.</td>
826
- </tr>
827
- <tr>
828
- <td>onSelectAll</td>
829
- <td></td>
830
- <td>Fired when clicking select all.</td>
831
- </tr>
832
- <tr>
833
- <td>onUnselectAll</td>
834
- <td></td>
835
- <td>Fired when clicking unselect all.</td>
836
- </tr>
837
- <tr>
838
- <td>onInitDone</td>
839
- <td></td>
840
- <td>Fired when the directive done with the "link" phase.</td>
841
- </tr>
842
- <tr>
843
- <td>onMaxSelectionReached</td>
844
- <td></td>
845
- <td>Fired when the user reaches the max allowed selected items.</td>
846
- </tr>
847
- </tbody>
848
- </table>
849
- <h2>Translation Texts</h2>
850
- <p>Available texts that you can override if you wan't to make a translation for your website. These are set with the "translation-texts" attribute.</p>
851
- <table class="table table-condensed">
852
- <thead>
853
- <tr>
854
- <th>Property Name</th>
855
- <th>Default Value</th>
856
- <th>Description</th>
857
- </tr>
858
- </thead>
859
- <tbody>
860
- <tr>
861
- <td>checkAll</td>
862
- <td>Check All</td>
863
- <td>"Check All" item's text.</td>
864
- </tr>
865
- <tr>
866
- <td>uncheckAll</td>
867
- <td>Uncheck All</td>
868
- <td>"Uncheck All" item's text.</td>
869
- </tr>
870
- <tr>
871
- <td>selectionCount</td>
872
- <td>checked</td>
873
- <td>The suffix for "X/Y" that showed when using selection limit.</td>
874
- </tr>
875
- <tr>
876
- <td>selectionOf</td>
877
- <td>/</td>
878
- <td>The value between the selected values and the max values when using selection limit.</td>
879
- </tr>
880
- <tr>
881
- <td>searchPlaceholder</td>
882
- <td>Search...</td>
883
- <td>The placeholder for the search input.</td>
884
- </tr>
885
- <tr>
886
- <td>buttonDefaultText</td>
887
- <td>Select</td>
888
- <td>The default text that used for the button when no items selected.</td>
889
- </tr>
890
- <tr>
891
- <td>dynamicButtonTextSuffix</td>
892
- <td>checked</td>
893
- <td>The suffix for the button that used when using "dynamicText".</td>
894
- </tr>
895
- </tbody>
896
- </table>
780
+ // JavaScript $scope.example8model = []; $scope.example8data = [ {id: 1, label: "David"}, {id: 2, label: "Jhon"}, {id: 3, label: "Danny"}];
781
+ </div>
782
+ </div>
783
+ </div>
784
+ </uib-accordion-group>
785
+ <uib-accordion-group heading="Style active items">
786
+ <div class="row">
787
+ <div class="col-xs-12 col-sm-6">
788
+ <h3>Demo</h3>
789
+ You can also aplly the active class to the selected list items. This can be done by setting the styleActive setting to true
790
+ <div class="well">
791
+ <div>
792
+ <div ng-dropdown-multiselect="" options="example16data" selected-model="example16model" extra-settings="example16settings"></div>
793
+ </div>
794
+ </div>
795
+ </div>
796
+ <div class="col-xs-12 col-sm-6">
797
+ <h3>The model:</h3>
798
+ <pre>{{example16model|json}}</pre>
799
+ </div>
800
+ </div>
801
+ <div class="row">
802
+ <div class="col-md-12">
803
+ <h3>Code</h3>
804
+ <div hljs>
805
+ // HTML
806
+ <div ng-dropdown-multiselect="" options="example16data" selected-model="example16model" extra-settings="example16settings"></div>
807
+
808
+ // JavaScript
809
+ $scope.example16model = []; $scope.example16data = [ {id: 1, label: "David"}, {id: 2, label: "Jhon"}, {id: 3, label: "Danny"}]; $scope.example16settings = {styleActive: true};
810
+ </div>
811
+ </div>
812
+ </div>
813
+ </uib-accordion-group>
814
+ <uib-accordion-group heading="Keyboard controls">
815
+ <div class="row">
816
+ <div class="col-xs-12 col-sm-6">
817
+ <h3>Demo</h3>
818
+ When activated the dropdown can be used with the keyboard instead of with the mouse. Up, down arrow change focused element, escape closes the dropdown, enter and space activate focused element.
819
+ <div class="well">
820
+ <div>
821
+ <div ng-dropdown-multiselect="" options="example17data" selected-model="example17model" extra-settings="example17settings"></div>
822
+ </div>
823
+ </div>
824
+ </div>
825
+ <div class="col-xs-12 col-sm-6">
826
+ <h3>The model:</h3>
827
+ <pre>{{example17model|json}}</pre>
828
+ </div>
829
+ </div>
830
+ <div class="row">
831
+ <div class="col-md-12">
832
+ <h3>Code</h3>
833
+ <div hljs>
834
+ // HTML
835
+ <div ng-dropdown-multiselect="" options="example17data" selected-model="example17model" extra-settings="example17settings"></div>
836
+
837
+ // JavaScript
838
+ $scope.example17model = []; $scope.example17data = [ {id: 1, label: "David"}, {id: 2, label: "Jhon"}, {id: 3, label: "Danny"}]; $scope.example17settings = {keyboardControls: true};
839
+ </div>
840
+ </div>
841
+ </div>
842
+ </uib-accordion-group>
843
+ <uib-accordion-group heading="Keyboard controls with single selection and search">
844
+ <div class="row">
845
+ <div class="col-xs-12 col-sm-6">
846
+ <h3>Demo</h3>
847
+ When search is enabled and a single selection is active, wehn search returns a single match pressing enter in the search box will activate the matched option.
848
+ <div class="well">
849
+ <div>
850
+ <div ng-dropdown-multiselect="" options="example18data" selected-model="example18model" extra-settings="example18settings"></div>
851
+ </div>
852
+ </div>
853
+ </div>
854
+ <div class="col-xs-12 col-sm-6">
855
+ <h3>The model:</h3>
856
+ <pre>{{example18model|json}}</pre>
857
+ </div>
858
+ </div>
859
+ <div class="row">
860
+ <div class="col-md-12">
861
+ <h3>Code</h3>
862
+ <div hljs>
863
+ // HTML
864
+ <div ng-dropdown-multiselect="" options="example18data" selected-model="example18model" extra-settings="example18settings"></div>
865
+
866
+ // JavaScript
867
+ $scope.example18model = {};
868
+ $scope.example18data = [
869
+ { id: 1, label: "David" },
870
+ { id: 2, label: "Jhon" },
871
+ { id: 3, label: "Lisa" },
872
+ { id: 4, label: "Nicole" },
873
+ { id: 5, label: "Danny" }
874
+ ];
875
+ $scope.example18settings = {
876
+ keyboardControls: true,
877
+ enableSearch: true,
878
+ selectionLimit: 1
879
+ };
880
+ </div>
881
+ </div>
882
+ </div>
883
+ </uib-accordion-group>
884
+ <uib-accordion-group heading="Custom template per option">
885
+ <div class="row">
886
+ <div class="col-xs-12 col-sm-6">
887
+ <h3>Demo</h3>
888
+ Instead of using the default template you can use an own custom temlpate.
889
+ <div class="well">
890
+ <div>
891
+ <div ng-dropdown-multiselect="" options="example19data" selected-model="example19model" extra-settings="example19settings"></div>
892
+ </div>
893
+ </div>
894
+ </div>
895
+ <div class="col-xs-12 col-sm-6">
896
+ <h3>The model:</h3>
897
+ <pre>{{example19model|json}}</pre>
898
+ </div>
899
+ </div>
900
+ <div class="row">
901
+ <div class="col-md-12">
902
+ <h3>Code</h3>
903
+ <div hljs>
904
+ // HTML
905
+ <div ng-dropdown-multiselect="" options="example19data" selected-model="example19model" extra-settings="example19settings"></div>
906
+
907
+ // JavaScript
908
+ $scope.example19model = {};
909
+ $scope.example19data = [
910
+ { id: 1, name: "David" },
911
+ { id: 2, name: "Jhon" },
912
+ { id: 3, name: "Lisa" },
913
+ { id: 4, name: "Nicole" },
914
+ { id: 5, name: "Danny" }
915
+ ];
916
+ $scope.example19settings = {
917
+ template: '<b>{{option.name}}</b>'
918
+ };
919
+ </div>
920
+ </div>
921
+ </div>
922
+ </uib-accordion-group>
923
+ <uib-accordion-group heading="Disable Option">
924
+ <div class="row">
925
+ <div class="col-xs-12">
926
+ Setting the field disabled of an option to true will disable that option, if the option was previously
927
+ checked it will still stay checked and will not be able to be unchecked.
928
+ </div>
929
+ </div>
930
+ <div class="row">
931
+ <div class="col-xs-12 col-sm-6">
932
+ <h3>Demo</h3>
933
+ <div class="well">
934
+ <div>
935
+ <div ng-dropdown-multiselect="" options="disabledData" selected-model="disabledModel"></div>
936
+ </div>
937
+ </div>
938
+ </div>
939
+ <div class="col-xs-12 col-sm-6">
940
+ <h3>The model:</h3>
941
+ <pre>{{disabledModel|json}}</pre>
942
+ </div>
943
+ </div>
944
+ <div class="row">
945
+ <div class="col-md-12">
946
+ <h3>Code</h3>
947
+ <div hljs language="javascript">
948
+ // HTML
949
+ <div ng-dropdown-multiselect="" options="disabledData" selected-model="disabledModel"></div>
950
+
951
+ // JavaScript
952
+ $scope.disabledModel = [];
953
+ $scope.disabledData = [
954
+ { id: 1, label: "David", disabled: true},
955
+ { id: 2, label: "Jhon"},
956
+ { id: 3, label: "Danny"}
957
+ ];
958
+ </div>
959
+ </div>
960
+ </div>
961
+ </uib-accordion-group>
962
+ </uib-accordion>
963
+ <h1>Full API Documentation</h1>
964
+ <h2>Attributes</h2>
965
+ <p>List of allowed attributes, you can find more information about them in the usage examples above.</p>
966
+ <table class="table table-condensed">
967
+ <thead>
968
+ <tr>
969
+ <th>Attribute Name</th>
970
+ <th>Type</th>
971
+ <th>Description</th>
972
+ </tr>
973
+ </thead>
974
+ <tbody>
975
+ <tr>
976
+ <td>
977
+ <strong>selected-model</strong>
978
+ </td>
979
+ <td>Object / Array</td>
980
+ <td>The object the will contain the model for the selected items in the dropdown.</td>
981
+ </tr>
982
+ <tr>
983
+ <td>
984
+ <strong>options</strong>
985
+ </td>
986
+ <td>Object / Array</td>
987
+ <td>The options for the dropdown.</td>
988
+ </tr>
989
+ <tr>
990
+ <td>
991
+ <strong>extra-settings</strong>
992
+ </td>
993
+ <td>Object</td>
994
+ <td>The settings for the directive, more information about these settings are available below.</td>
995
+ </tr>
996
+ <tr>
997
+ <td>
998
+ <strong>events</strong>
999
+ </td>
1000
+ <td>Object</td>
1001
+ <td>Events callbacks, more information below.</td>
1002
+ </tr>
1003
+ <tr>
1004
+ <td>
1005
+ <strong>translation-texts</strong>
1006
+ </td>
1007
+ <td>Object</td>
1008
+ <td>Gives the ability to modify the default texts in the directive. More information below.</td>
1009
+ </tr>
1010
+ <tr>
1011
+ <td>
1012
+ <strong>group-by</strong>
1013
+ </td>
1014
+ <td>String</td>
1015
+ <td>The name of the property which you like to group by your options. See grouping example.</td>
1016
+ </tr>
1017
+ <tr>
1018
+ <td>
1019
+ <strong>checkboxes</strong>
1020
+ </td>
1021
+ <td>Boolean</td>
1022
+ <td>Indicated if to show a normal dropdown with glyphicons or HTML checkboxes.</td>
1023
+ </tr>
1024
+ <tr>
1025
+ <td>
1026
+ <strong>search-filter</strong>
1027
+ </td>
1028
+ <td>String</td>
1029
+ <td>Uses for settings the search filter from outside the direcrtive.</td>
1030
+ </tr>
1031
+ <tr>
1032
+ <td>
1033
+ <strong>disabled</strong>
1034
+ </td>
1035
+ <td>Boolean</td>
1036
+ <td>Used for disabling the dropdown.</td>
1037
+ </tr>
1038
+ </tbody>
1039
+ </table>
1040
+ <h2>Settings</h2>
1041
+ <p>
1042
+ Available settings that effects the display or behavior of the directive.
1043
+ <br />These setting are set with the "extra-settings" attribute.
1044
+ </p>
1045
+ <table class="table table-condensed">
1046
+ <thead>
1047
+ <tr>
1048
+ <th>Property Name</th>
1049
+ <th>Type</th>
1050
+ <th>Default Value</th>
1051
+ <th>Description</th>
1052
+ </tr>
1053
+ </thead>
1054
+ <tbody>
1055
+ <tr>
1056
+ <td>dynamicTitle</td>
1057
+ <td>Boolean</td>
1058
+ <td>true</td>
1059
+ <td>Indicates if the text of the button should change when selecting items from the list.</td>
1060
+ </tr>
1061
+ <tr>
1062
+ <td>closeOnBlur</td>
1063
+ <td>Boolean</td>
1064
+ <td>true</td>
1065
+ <td>Indicates if the dropdown should close when clicking outside of it's scope.</td>
1066
+ </tr>
1067
+ <tr>
1068
+ <td>displayProp</td>
1069
+ <td>String</td>
1070
+ <td>label</td>
1071
+ <td>The name of the property that contains the text for the item.</td>
1072
+ </tr>
1073
+ <tr>
1074
+ <td>idProp</td>
1075
+ <td>String</td>
1076
+ <td>id</td>
1077
+ <td>The name of the property that contains the id for the elements.</td>
1078
+ </tr>
1079
+ <tr>
1080
+ <td>externalIdProp</td>
1081
+ <td>String</td>
1082
+ <td>id</td>
1083
+ <td>The name of the property that will use for the selected items model.</td>
1084
+ </tr>
1085
+ <tr>
1086
+ <td>enableSearch</td>
1087
+ <td>Boolean</td>
1088
+ <td>false</td>
1089
+ <td>Indicated if to show the search input or not.</td>
1090
+ </tr>
1091
+ <tr>
1092
+ <td>searchField</td>
1093
+ <td>String</td>
1094
+ <td>"$"</td>
1095
+ <td>Indicates on which field the search should be done</td>
1096
+ </tr>
1097
+ <tr>
1098
+ <td>selectionLimit</td>
1099
+ <td>Number</td>
1100
+ <td>0</td>
1101
+ <td>The max allowed selected items for the list. For more information see the examples above.</td>
1102
+ </tr>
1103
+ <tr>
1104
+ <td>showCheckAll</td>
1105
+ <td>Boolean</td>
1106
+ <td>true</td>
1107
+ <td>Indicates if to show the "Check All" item.</td>
1108
+ </tr>
1109
+ <tr>
1110
+ <td>showUncheckAll</td>
1111
+ <td>Boolean</td>
1112
+ <td>true</td>
1113
+ <td>Indicates if to show the "Uncheck All" item.</td>
1114
+ </tr>
1115
+ <tr>
1116
+ <td>showEnableSearchButton</td>
1117
+ <td>Boolean</td>
1118
+ <td>false</td>
1119
+ <td>Indicates if to show the "Enable search / Disable search" item.</td>
1120
+ </tr>
1121
+ <tr>
1122
+ <td>closeOnSelect</td>
1123
+ <td>Boolean</td>
1124
+ <td>false</td>
1125
+ <td>Indicates if to close the dropdown after checking an item on the list.</td>
1126
+ </tr>
1127
+ <tr>
1128
+ <td>closeOnDeselect</td>
1129
+ <td>Boolean</td>
1130
+ <td>false</td>
1131
+ <td>Indicates if to close the dropdown after unchecking an item on the list. With selectionLimit = 1 setting this to true does the same as setting closeOnSelect to true.</td>
1132
+ </tr>
1133
+ <tr>
1134
+ <td>buttonClasses</td>
1135
+ <td>String</td>
1136
+ <td>btn btn-default</td>
1137
+ <td>The CSS classes that used for setting the style of the button.</td>
1138
+ </tr>
1139
+ <tr>
1140
+ <td>groupByTextProvider</td>
1141
+ <td>Function</td>
1142
+ <td>angular.noop</td>
1143
+ <td>A callback to a function that provide that name for each group when using group-by attribute. The parameter for the function will be the value of the group-by property.</td>
1144
+ </tr>
1145
+ <tr>
1146
+ <td>scrollable</td>
1147
+ <td>Boolean</td>
1148
+ <td>false</td>
1149
+ <td>Indicates if the dropdown is scrollable, useful if you have a lot of items.</td>
1150
+ </tr>
1151
+ <tr>
1152
+ <td>scrollableHeight</td>
1153
+ <td>Number</td>
1154
+ <td>300px</td>
1155
+ <td>Indicates the height of the drop down if the dropdown is scrollable.</td>
1156
+ </tr>
1157
+ <tr>
1158
+ <td>smartButtonMaxItems</td>
1159
+ <td>Number</td>
1160
+ <td>0</td>
1161
+ <td>Manages the "Smart Button Text" feature, defines the maximum amount of items to on the button.</td>
1162
+ </tr>
1163
+ <tr>
1164
+ <td>smartButtonTextConverter</td>
1165
+ <td>Function</td>
1166
+ <td>angular.noop</td>
1167
+ <td>Related the "Smart Button Text" feature, if a function provided - it will called with two paramters: The item's text and the original item, the return value will displayed instead of the item's display property. This feature is useful when you want to convert the displayed text into something else.</td>
1168
+ </tr>
1169
+ <tr>
1170
+ <td>styleActive</td>
1171
+ <td>Boolean</td>
1172
+ <td>false</td>
1173
+ <td>Indicates if the list items should get a class active applied when they are selected.</td>
1174
+ </tr>
1175
+ <tr>
1176
+ <td>keyboardControl</td>
1177
+ <td>Boolean</td>
1178
+ <td>false</td>
1179
+ <td>When activated the dropdown can be used with the keyboard instead of with the mouse.</td>
1180
+ </tr>
1181
+ <tr>
1182
+ <td>template</td>
1183
+ <td>String</td>
1184
+ <td> { {getPropertyForObject(option, settings.displayProp)} }</td>
1185
+ <td>Can be used to modify the appearance of an option in the list, each option is accessible as option.</td>
1186
+ </tr>
1187
+ <tr>
1188
+ <td>selectByGroups</td>
1189
+ <td>Array</td>
1190
+ <td>undefined</td>
1191
+ <td>Values of the groupby property that you want to be selectable as group</td>
1192
+ </tr>
1193
+ </tbody>
1194
+ </table>
1195
+ <h2>Events</h2>
1196
+ <p>Available event callbacks what the directive fires. These callbacks are set with "events" attribute.</p>
1197
+ <table class="table table-condensed">
1198
+ <thead>
1199
+ <tr>
1200
+ <th>Event Name</th>
1201
+ <th>Parameters</th>
1202
+ <th>Description</th>
1203
+ </tr>
1204
+ </thead>
1205
+ <tbody>
1206
+ <tr>
1207
+ <td>onItemSelect</td>
1208
+ <td>item</td>
1209
+ <td>Fired when selecting an item.</td>
1210
+ </tr>
1211
+ <tr>
1212
+ <td>onItemDeselect</td>
1213
+ <td>item</td>
1214
+ <td>Fired when unselecting an item.</td>
1215
+ </tr>
1216
+ <tr>
1217
+ <td>onSelectAll</td>
1218
+ <td></td>
1219
+ <td>Fired when clicking select all.</td>
1220
+ </tr>
1221
+ <tr>
1222
+ <td>onDeselectAll</td>
1223
+ <td></td>
1224
+ <td>Fired when clicking unselect all.</td>
1225
+ </tr>
1226
+ <tr>
1227
+ <td>onInitDone</td>
1228
+ <td></td>
1229
+ <td>Fired when the directive done with the "link" phase.</td>
1230
+ </tr>
1231
+ <tr>
1232
+ <td>onMaxSelectionReached</td>
1233
+ <td></td>
1234
+ <td>Fired when the user reaches the max allowed selected items.</td>
1235
+ </tr>
1236
+ <tr>
1237
+ <td>onSelectionChanged</td>
1238
+ <td></td>
1239
+ <td>Fired when the selection changes.</td>
1240
+ </tr>
1241
+ </tbody>
1242
+ </table>
1243
+ <h2>Translation Texts</h2>
1244
+ <p>Available texts that you can override if you wan't to make a translation for your website. These are set with the "translation-texts" attribute.</p>
1245
+ <table class="table table-condensed">
1246
+ <thead>
1247
+ <tr>
1248
+ <th>Property Name</th>
1249
+ <th>Default Value</th>
1250
+ <th>Description</th>
1251
+ </tr>
1252
+ </thead>
1253
+ <tbody>
1254
+ <tr>
1255
+ <td>checkAll</td>
1256
+ <td>Check All</td>
1257
+ <td>"Check All" item's text.</td>
1258
+ </tr>
1259
+ <tr>
1260
+ <td>uncheckAll</td>
1261
+ <td>Uncheck All</td>
1262
+ <td>"Uncheck All" item's text.</td>
1263
+ </tr>
1264
+ <tr>
1265
+ <td>enableSearch</td>
1266
+ <td>Enable search</td>
1267
+ <td>"enable search" item's text.</td>
1268
+ </tr>
1269
+ <tr>
1270
+ <td>disableSearch</td>
1271
+ <td>Disable search</td>
1272
+ <td>"disable search" item's text.</td>
1273
+ </tr>
1274
+ <tr>
1275
+ <td>selectionCount</td>
1276
+ <td>checked</td>
1277
+ <td>The suffix for "X/Y" that showed when using selection limit.</td>
1278
+ </tr>
1279
+ <tr>
1280
+ <td>selectionOf</td>
1281
+ <td>/</td>
1282
+ <td>The value between the selected values and the max values when using selection limit.</td>
1283
+ </tr>
1284
+ <tr>
1285
+ <td>searchPlaceholder</td>
1286
+ <td>Search...</td>
1287
+ <td>The placeholder for the search input.</td>
1288
+ </tr>
1289
+ <tr>
1290
+ <td>buttonDefaultText</td>
1291
+ <td>Select</td>
1292
+ <td>The default text that used for the button when no items selected.</td>
1293
+ </tr>
1294
+ <tr>
1295
+ <td>dynamicButtonTextSuffix</td>
1296
+ <td>checked</td>
1297
+ <td>The suffix for the button that used when using "dynamicText".</td>
1298
+ </tr>
1299
+ <tr>
1300
+ <td>selectGroup</td>
1301
+ <td>Select All:</td>
1302
+ <td>The prefix of the group selection.</td>
1303
+ </tr>
1304
+ </tbody>
1305
+ </table>
897
1306
  </div>
1307
+