This repository was archived by the owner on Dec 16, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 452
/
Copy pathhome.html
903 lines (882 loc) · 38.7 KB
/
home.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
<div class="container" ng-controller="ExampleCtrl">
<div class="row">
<div class="col-xs-12">
<h2 style="margin-bottom: 0">What is AngularJS Dropdown Multiselect?</h2>
This directive uses Bootstrap's Dropdown with the power of AngularJS directives and binding.
<br />
<br />In this page you can see basic and advanced usage examples.
</div>
</div>
<div class="row">
<div class="col-xs-12">
<h2 style="margin-bottom: 0">Download</h2>
There are several options to do that:
<ol>
<li>Using bower: `bower install angularjs-dropdown-multiselect`</li>
<li>Download the .zip file from <a href="https://github.com/dotansimha/angularjs-dropdown-multiselect/zipball/master">here</a>
</li>
<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>
</li>
</ol>
</div>
</div>
<accordion close-others="true">
<accordion-group heading="Basic Usage Example" is-open="true">
<div class="row">
<div class="col-xs-12 col-sm-6">
<h3>Demo</h3>
<div class="well">
<div>
<div ng-dropdown-multiselect="" options="example1data" selected-model="example1model"></div>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-6">
<h3>The model:</h3>
<pre>{{example1model|json}}</pre>
</div>
</div>
<div class="row">
<div class="col-md-12">
<h3>Code</h3>
<div class="well">
<div>
<div hljs>
// HTML
<div ng-dropdown-multiselect="" options="example1data" selected-model="example1model"></div>
// JavaScript $scope.example1model = []; $scope.example1data = [ {id: 1, label: "David"}, {id: 2, label: "Jhon"}, {id: 3, label: "Danny"}];</div>
</div>
</div>
</div>
</div>
</accordion-group>
<accordion-group heading="Basic Settings Example">
<div class="row">
<div class="col-xs-12">
This example shows the ability to select the property to display as text label.
<br />In this case, the property the used as label is "id".
</div>
</div>
<div class="row">
<div class="col-xs-12 col-sm-6">
<h3>Demo</h3>
<div class="well">
<div>
<div ng-dropdown-multiselect options="example2data" selected-model="example2model" extra-settings="example2settings"></div>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-6">
<h3>The model:</h3>
<pre>{{example2model|json}}</pre>
</div>
</div>
<div class="row">
<div class="col-md-12">
<h3>Code</h3>
<div class="well">
<div>
<div hljs>
// HTML
<div ng-dropdown-multiselect options="example2data" selected-model="example2model" extra-settings="example2settings"></div>
// JavaScript $scope.example2model = []; $scope.example2data = [ {id: 1, label: "David"}, {id: 2, label: "Jhon"}, {id: 3, label: "Danny"}]; $scope.example2settings = {displayProp: 'id'};
</div>
</div>
</div>
</div>
</div>
</accordion-group>
<accordion-group heading="Smart Button Text">
<div class="row">
<div class="col-xs-12">
You can use the feature in order to show which items are selected instead the items count.<br />
In order to use this feature, set the "smartButtonMaxItems" settings parameter to a number bigger than 0.<br />
You can also provide "smartButtonTextConverter" parameter in order to add smart logic and convert the text.
</div>
</div>
<div class="row">
<div class="col-xs-12 col-sm-6">
<h3>Demo</h3>
<div class="well">
<div>
<div ng-dropdown-multiselect options="example13data" selected-model="example13model" extra-settings="example13settings"></div>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-6">
<h3>The model:</h3>
<pre>{{example13model|json}}</pre>
</div>
</div>
<div class="row">
<div class="col-md-12">
<h3>Code</h3>
<div class="well">
<div>
<div hljs>
//HTML
<div ng-dropdown-multiselect options="example13data" selected-model="example13model" extra-settings="example13settings"></div>
//JS
$scope.example13model = [];
$scope.example13data = [
{id: 1, label: "David"},
{id: 2, label: "Jhon"},
{id: 3, label: "Lisa"},
{id: 4, label: "Nicole"},
{id: 5, label: "Danny"}];
$scope.example13settings = {
smartButtonMaxItems: 3,
smartButtonTextConverter: function(itemText, originalItem) {
if (itemText === 'Jhon') {
return 'Jhonny!';
}
return itemText;
}
};
</div>
</div>
</div>
</div>
</div>
</accordion-group>
<accordion-group heading="Scrollable List">
<div class="row">
<div class="col-xs-12">
You can use the feature in order to make the list of items scrollable. Useful when you deal with a lot of items.
</div>
</div>
<div class="row">
<div class="col-xs-12 col-sm-6">
<h3>Demo</h3>
<div class="well">
<div>
<div ng-dropdown-multiselect options="example14data" selected-model="example14model" extra-settings="example14settings"></div>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-6">
<h3>The model:</h3>
<pre>{{example14model|json}}</pre>
</div>
</div>
<div class="row">
<div class="col-md-12">
<h3>Code</h3>
<div class="well">
<div>
<div hljs>
//HTML
<div ng-dropdown-multiselect options="example14data" selected-model="example14model" extra-settings="example14settings"></div>
//JS
$scope.example14model = [];
$scope.example14data = [
{id: 1, label: "David"},
{id: 2, label: "Jhon"},
{id: 3, label: "Lisa"},
{id: 4, label: "Nicole"},
{id: 5, label: "Danny"},
{id: 6, label: "Dan"},
{id: 7, label: "Dean"},
{id: 8, label: "Adam"},
{id: 9, label: "Uri"},
{id: 10, label: "Phil"}
];
$scope.example14settings = {
scrollableHeight: '100px',
scrollable: true
};
</div>
</div>
</div>
</div>
</div>
</accordion-group>
<accordion-group heading="Enabling Search">
<div class="row">
<div class="col-xs-12 col-sm-6">
<h3>Demo</h3>
<div class="well">
<div>
<div ng-dropdown-multiselect="" options="example9data" selected-model="example9model" extra-settings="example9settings"></div>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-6">
<h3>The model:</h3>
<pre>{{example9model|json}}</pre>
</div>
</div>
<div class="row">
<div class="col-md-12">
<h3>Code</h3>
<div class="well">
<div>
<div hljs language="javascript">
// HTML
<div ng-dropdown-multiselect="" options="example9data" selected-model="example9model" extra-settings="example9settings"></div>
// JavaScript $scope.example9model = []; $scope.example9data = [ {id: 1, label: "David"}, {id: 2, label: "Jhon"}, {id: 3, label: "Danny"}]; $scope.example9settings = {enableSearch: true};
</div>
</div>
</div>
</div>
</div>
</accordion-group>
<accordion-group heading="Selection Limit">
<div class="row">
<div class="col-xs-12">
By default, there is no limit on the maximum selected items.
<br />You can limit the selection by providing selectionLimit using the settings attribute.
<br />
<strong>Note 1: limit the selection to 0 is the default and won't limit the selection!</strong>
<br />
<strong>Note 2: When using this limit, the "Select All" button will not appear!</strong>
<br />
<strong>Note 3: When using the limit and setting it to "1", the model will contain a
single object instead of array.</strong>
<br />
<strong>Note 4: When using single selection (limit to 1) the selection will change
automaticlly if another item is clicked!</strong>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-sm-6">
<h3>Demo</h3>
<div class="well">
<div>
<div ng-dropdown-multiselect options="example10data" selected-model="example10model" extra-settings="example10settings"></div>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-6">
<h3>The model:</h3>
<pre>{{example10model|json}}</pre>
</div>
</div>
<div class="row">
<div class="col-md-12">
<h3>Code</h3>
<div class="well">
<div>
<div hljs>
// HTML
<div ng-dropdown-multiselect options="example10data" selected-model="example10model" extra-settings="example10settings"></div>
// JavaScript $scope.example10model = []; $scope.example10data = [ {id: 1, label: "David"}, {id: 2, label: "Jhon"}, {id: 3, label: "Danny"}]; $scope.example10settings = {selectionLimit: 2};</div>
</div>
</div>
</div>
</div>
</accordion-group>
<accordion-group heading="Single Selection Limit">
<div class="row">
<div class="col-xs-12">
Please read the notes in the "Selection Limit" example.
<br />This example shows an example of using selection limit and single selection.
</div>
</div>
<div class="row">
<div class="col-xs-12 col-sm-6">
<h3>Demo</h3>
<div class="well">
<div>
<div ng-dropdown-multiselect options="example12data" selected-model="example12model" extra-settings="example12settings"></div>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-6">
<h3>The model:</h3>
<pre>{{example12model|json}}</pre>
</div>
</div>
<div class="row">
<div class="col-md-12">
<h3>Code</h3>
<div class="well">
<div>
<div hljs>
// HTML
<div ng-dropdown-multiselect options="example10data" selected-model="example10model" extra-settings="example10settings"></div>
// JavaScript $scope.example12model = {}; // ! IMPORTANT ! $scope.example12data = [ {id: 1, label: "David"}, {id: 2, label: "Jhon"}, {id: 3, label: "Danny"}]; $scope.example12settings = {selectionLimit: 1};</div>
</div>
</div>
</div>
</div>
</accordion-group>
<accordion-group heading="Group Items By Property">
<div class="row">
<div class="col-xs-12">
You can also group the items by propery that you want, in order to to that, provide the "group-by" attribute.
<br />Also, you need to provide "groupByTextProvider" callback in the extra-settings attribute, in order to provide the header text for each group.
<br />
<strong>Note: If you won't specify the "groupByTextProvider" callback in order to get the
header for each group, the value of the group will be displayed!</strong>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-sm-6">
<h3>Demo</h3>
<div class="well">
<div>
<div ng-dropdown-multiselect options="example11data" selected-model="example11model" extra-settings="example11settings" group-by="gender"></div>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-6">
<h3>The model:</h3>
<pre>{{example11model|json}}</pre>
</div>
</div>
<div class="row">
<div class="col-md-12">
<h3>Code</h3>
<div class="well">
<div>
<div hljs>
// HTML
<div ng-dropdown-multiselect options="example11data" selected-model="example11model" extra-settings="example11settings" group-by="gender"></div>
// 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'; } } };
</div>
</div>
</div>
</div>
</div>
</accordion-group>
<accordion-group heading="Custom ID property">
<div class="row">
<div class="col-xs-12">
By default, the directive tries to find "id" property for each object to identify it as unique.
<br />You can change this behavior and select your own ID property.
<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).
<br />
<br />This feature is also useful if your objects comes from MongoDB and have a "_id" property instead of "id".
</div>
</div>
<div class="row">
<div class="col-xs-12 col-sm-6">
<h3>Demo</h3>
<div class="well">
<div>
<div ng-dropdown-multiselect options="example3data" selected-model="example3model" extra-settings="example3settings"></div>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-6">
<h3>The model:</h3>
<pre>{{example3model|json}}</pre>
</div>
</div>
<div class="row">
<div class="col-md-12">
<h3>Code</h3>
<div class="well">
<div>
<div hljs>
// HTML
<div ng-dropdown-multiselect options="example3data" selected-model="example3model" extra-settings="example3settings"></div>
// 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>
</div>
</div>
</div>
</div>
</accordion-group>
<accordion-group heading="Model Custom Property">
<div class="row">
<div class="col-xs-12">
By default, the model of the selected items will contain the objects with "id" property with the value of the idProp settings.
<br />You can modify this by using the externalIdProp in settings!
</div>
</div>
<div class="row">
<div class="col-xs-12 col-sm-6">
<h3>Demo</h3>
<div class="well">
<div>
<div ng-dropdown-multiselect options="example4data" selected-model="example4model" extra-settings="example4settings"></div>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-6">
<h3>The model:</h3>
<pre>{{example4model|json}}</pre>
</div>
</div>
<div class="row">
<div class="col-md-12">
<h3>Code</h3>
<div class="well">
<div>
<div hljs>
// HTML
<div ng-dropdown-multiselect options="example4data" selected-model="example4model" extra-settings="example4settings"></div>
// 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>
</div>
</div>
</div>
</div>
</accordion-group>
<accordion-group heading="Custom Button Text">
<div class="row">
<div class="col-xs-12">
You can select your own text of the button using the "defaultText" in settings.
</div>
</div>
<div class="row">
<div class="col-xs-12 col-sm-6">
<h3>Demo</h3>
<div class="well">
<div>
<div ng-dropdown-multiselect options="example5data" selected-model="example5model" extra-settings="example5settings" translation-texts="example5customTexts"></div>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-6">
<h3>The model:</h3>
<pre>{{example5model|json}}</pre>
</div>
</div>
<div class="row">
<div class="col-md-12">
<h3>Code</h3>
<div class="well">
<div>
<div hljs>
// HTML
<div ng-dropdown-multiselect options="example5data" selected-model="example5model" extra-settings="example5settings" translation-texts="example5customTexts"></div>
// 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>
</div>
</div>
</div>
</div>
</accordion-group>
<accordion-group heading="Pre-selected Values">
<div class="row">
<div class="col-xs-12">
This example shows a demostration of using a pre-setted model.
<br />
<strong>Note:</strong>The model must be structured as array of objects with "id" property (or whatever you use as custom id).
</div>
</div>
<div class="row">
<div class="col-xs-12 col-sm-6">
<h3>Demo</h3>
<div class="well">
<div>
<div ng-dropdown-multiselect options="example6data" selected-model="example6model" extra-settings="example6settings"></div>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-6">
<h3>The model:</h3>
<pre>{{example6model|json}}</pre>
</div>
</div>
<div class="row">
<div class="col-md-12">
<h3>Code</h3>
<div class="well">
<div>
<div hljs>
// HTML
<div ng-dropdown-multiselect options="example6data" selected-model="example6model" extra-settings="example6settings"></div>
// JavaScript $scope.example6model = [{id: 1}, {id: 3}]; $scope.example6data = [ {id: 1, label: "David"}, {id: 2, label: "Jhon"}, {id: 3, label: "Danny"}]; $scope.example6settings = {};</div>
</div>
</div>
</div>
</div>
</accordion-group>
<accordion-group heading="Full Object as model">
<div class="row">
<div class="col-xs-12">
This example shows a demostration of using full object as a model.
<br />This can be done by settings the "externalIdProp" to empty string.
<br />
<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>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-sm-6">
<h3>Demo</h3>
<div class="well">
<div>
<div ng-dropdown-multiselect options="example7data" selected-model="example7model" extra-settings="example7settings"></div>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-6">
<h3>The model:</h3>
<pre>{{example7model|json}}</pre>
</div>
</div>
<div class="row">
<div class="col-md-12">
<h3>Code</h3>
<div class="well">
<div>
<div hljs>
// HTML
<div ng-dropdown-multiselect options="example7data" selected-model="example7model" extra-settings="example7settings"></div>
// JavaScript $scope.example7model = []; $scope.example7data = [ {id: 1, label: "David"}, {id: 2, label: "Jhon"}, {id: 3, label: "Danny"}]; $scope.example7settings = {externalIdProp: ''};</div>
</div>
</div>
</div>
</div>
</accordion-group>
<accordion-group heading="External Search Filter">
<div class="row">
<div class="col-xs-12">
This example shows a demostration of access and set the search filter from outside the directive.
<br />This can be done by settings the "search-filter" attribute.
<br />
</div>
</div>
<div class="row">
<div class="col-xs-12 col-sm-6">
<h3>Demo</h3>
<div class="well">
<div>
<div ng-dropdown-multiselect search-filter="customFilter" options="example15data" selected-model="example15model" extra-settings="example15settings"></div>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-6">
<h3>The model:</h3>
<pre>{{example7model|json}}</pre>
<h3>Search Filter:</h3>
<pre>{{customFilter|json}}</pre>
</div>
</div>
<div class="row">
<div class="col-md-12">
<h3>Code</h3>
<div class="well">
<div>
<div hljs>
// HTML
<div ng-dropdown-multiselect search-filter="customFilter" options="example15data" selected-model="example15model" extra-settings="example15settings"></div>
// JavaScript
$scope.example15model = [];
$scope.example15data = [
{id: 1, label: "David"},
{id: 2, label: "Jhon"},
{id: 3, label: "Lisa"},
{id: 4, label: "Nicole"},
{id: 5, label: "Danny"}];
$scope.example15settings = {enableSearch: true};
$scope.customFilter = 'a';
</div>
</div>
</div>
</div>
</div>
</accordion-group>
<accordion-group heading="Checkboxes List">
<div class="row">
<div class="col-xs-12">
You can also use a checkboxes list by adding "checkboxes" attribute to your element!
</div>
</div>
<div class="row">
<div class="col-xs-12 col-sm-6">
<h3>Demo</h3>
<div class="well">
<div>
<div ng-dropdown-multiselect options="example8data" selected-model="example8model" checkboxes="true"></div>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-6">
<h3>The model:</h3>
<pre>{{example8model|json}}</pre>
</div>
</div>
<div class="row">
<div class="col-md-12">
<h3>Code</h3>
<div class="well">
<div>
<div hljs>
// HTML
<div ng-dropdown-multiselect options="example8data" selected-model="example8model" checkboxes="true"></div>
// JavaScript $scope.example8model = []; $scope.example8data = [ {id: 1, label: "David"}, {id: 2, label: "Jhon"}, {id: 3, label: "Danny"}];</div>
</div>
</div>
</div>
</div>
</accordion-group>
</accordion>
<h1>Full API Documentation</h1>
<h2>Attributes</h2>
<p>List of allowed attributes, you can find more information about them in the usage examples above.</p>
<table class="table table-condensed">
<thead>
<tr>
<th>Attribute Name</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>selected-model</strong>
</td>
<td>Object / Array</td>
<td>The object the will contain the model for the selected items in the dropdown.</td>
</tr>
<tr>
<td><strong>options</strong>
</td>
<td>Object / Array</td>
<td>The options for the dropdown.</td>
</tr>
<tr>
<td><strong>extra-settings</strong>
</td>
<td>Object</td>
<td>The settings for the directive, more information about these settings are available below.</td>
</tr>
<tr>
<td><strong>events</strong>
</td>
<td>Object</td>
<td>Events callbacks, more information below.</td>
</tr>
<tr>
<td><strong>translation-texts</strong>
</td>
<td>Object</td>
<td>Gives the ability to modify the default texts in the directive. More information below.</td>
</tr>
<tr>
<td><strong>group-by</strong>
</td>
<td>String</td>
<td>The name of the property which you like to group by your options. See grouping example.</td>
</tr>
<tr>
<td><strong>checkboxes</strong>
</td>
<td>Boolean</td>
<td>Indicated if to show a normal dropdown with glyphicons or HTML checkboxes.</td>
</tr>
<tr>
<td><strong>search-filter</strong>
</td>
<td>String</td>
<td>Uses for settings the search filter from outside the direcrtive.</td>
</tr>
</tbody>
</table>
<h2>Settings</h2>
<p>Available settings that effects the display or behavior of the directive.
<br />These setting are set with the "extra-settings" attribute.</p>
<table class="table table-condensed">
<thead>
<tr>
<th>Property Name</th>
<th>Type</th>
<th>Default Value</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>dynamicTitle</td>
<td>Boolean</td>
<td>true</td>
<td>Indicates if the text of the button should change when selecting items from the list.</td>
</tr>
<tr>
<td>closeOnBlur</td>
<td>Boolean</td>
<td>true</td>
<td>Indicates if the dropdown should close when clicking outside of it's scope.</td>
</tr>
<tr>
<td>displayProp</td>
<td>String</td>
<td>label</td>
<td>The name of the property that contains the text for the item.</td>
</tr>
<tr>
<td>idProp</td>
<td>String</td>
<td>id</td>
<td>The name of the property that contains the id for the elements.</td>
</tr>
<tr>
<td>externalIdProp</td>
<td>String</td>
<td>id</td>
<td>The name of the property that will use for the selected items model.</td>
</tr>
<tr>
<td>enableSearch</td>
<td>Boolean</td>
<td>false</td>
<td>Indicated if to show the search input or not.</td>
</tr>
<tr>
<td>selectionLimit</td>
<td>Number</td>
<td>0</td>
<td>The max allowed selected items for the list. For more information see the examples above.</td>
</tr>
<tr>
<td>showCheckAll</td>
<td>Boolean</td>
<td>true</td>
<td>Indicates if to show the "Check All" item.</td>
</tr>
<tr>
<td>showUncheckAll</td>
<td>Boolean</td>
<td>true</td>
<td>Indicates if to show the "Uncheck All" item.</td>
</tr>
<tr>
<td>closeOnSelect</td>
<td>Boolean</td>
<td>false</td>
<td>Indicates if to close the dropdown after checking an item on the list.</td>
</tr>
<tr>
<td>closeOnDeselect</td>
<td>Boolean</td>
<td>false</td>
<td>Indicates if to close the dropdown after unchecking an item on the list.</td>
</tr>
<tr>
<td>buttonClasses</td>
<td>String</td>
<td>btn btn-default</td>
<td>The CSS classes that used for setting the style of the button.</td>
</tr>
<tr>
<td>groupByTextProvider</td>
<td>Function</td>
<td>angular.noop</td>
<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>
</tr>
<tr>
<td>scrollable</td>
<td>Boolean</td>
<td>false</td>
<td>Indicates if the dropdown is scrollable, useful if you have a lot of items.</td>
</tr>
<tr>
<td>scrollableHeight</td>
<td>Number</td>
<td>300px</td>
<td>Indicates the height of the drop down if the dropdown is scrollable.</td>
</tr>
<tr>
<td>smartButtonMaxItems</td>
<td>Number</td>
<td>0</td>
<td>Manages the "Smart Button Text" feature, defines the maximum amount of items to on the button.</td>
</tr>
<tr>
<td>smartButtonTextConverter</td>
<td>Function</td>
<td>angular.noop</td>
<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>
</tr>
<tr>
<td>allowSelectionProp</td>
<td>String</td>
<td>undefined</td>
<td>Name of the property that should be used to determine it should allow user to select the option or not</td>
</tr>
</tbody>
</table>
<h2>Events</h2>
<p>Available event callbacks what the directive fires. These callbacks are set with "events" attribute.</p>
<table class="table table-condensed">
<thead>
<tr>
<th>Event Name</th>
<th>Parameters</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>onItemSelect</td>
<td>item</td>
<td>Fired when selecting an item.</td>
</tr>
<tr>
<td>onItemDeselect</td>
<td>item</td>
<td>Fired when unselecting an item.</td>
</tr>
<tr>
<td>onSelectAll</td>
<td></td>
<td>Fired when clicking select all.</td>
</tr>
<tr>
<td>onUnselectAll</td>
<td></td>
<td>Fired when clicking unselect all.</td>
</tr>
<tr>
<td>onInitDone</td>
<td></td>
<td>Fired when the directive done with the "link" phase.</td>
</tr>
<tr>
<td>onMaxSelectionReached</td>
<td></td>
<td>Fired when the user reaches the max allowed selected items.</td>
</tr>
</tbody>
</table>
<h2>Translation Texts</h2>
<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>
<table class="table table-condensed">
<thead>
<tr>
<th>Property Name</th>
<th>Default Value</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>checkAll</td>
<td>Check All</td>
<td>"Check All" item's text.</td>
</tr>
<tr>
<td>uncheckAll</td>
<td>Uncheck All</td>
<td>"Uncheck All" item's text.</td>
</tr>
<tr>
<td>selectionCount</td>
<td>checked</td>
<td>The suffix for "X/Y" that showed when using selection limit.</td>
</tr>
<tr>
<td>selectionOf</td>
<td>/</td>
<td>The value between the selected values and the max values when using selection limit.</td>
</tr>
<tr>
<td>searchPlaceholder</td>
<td>Search...</td>
<td>The placeholder for the search input.</td>
</tr>
<tr>
<td>buttonDefaultText</td>
<td>Select</td>
<td>The default text that used for the button when no items selected.</td>
</tr>
<tr>
<td>dynamicButtonTextSuffix</td>
<td>checked</td>
<td>The suffix for the button that used when using "dynamicText".</td>
</tr>
</tbody>
</table>
</div>