isite 2022.8.5 → 2022.8.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/README.md +7 -7
  2. package/apps/client-side/app.js +251 -185
  3. package/apps/client-side/site_files/css/bootstrap5-addon.css +32 -5
  4. package/apps/client-side/site_files/css/bootstrap5.css +1 -1
  5. package/apps/client-side/site_files/css/bootstrap5.css.map +1 -0
  6. package/apps/client-side/site_files/css/effect.css +136 -77
  7. package/apps/client-side/site_files/css/layout.css +37 -44
  8. package/apps/client-side/site_files/css/modal.css +1 -1
  9. package/apps/client-side/site_files/css/normalize.css +146 -0
  10. package/apps/client-side/site_files/css/scrollbar.css +9 -5
  11. package/apps/client-side/site_files/html/directive/i-button.html +5 -0
  12. package/apps/client-side/site_files/html/directive/i-checkbox.html +4 -0
  13. package/apps/client-side/site_files/html/directive/i-checklist.html +6 -0
  14. package/apps/client-side/site_files/html/directive/i-control.html +5 -0
  15. package/apps/client-side/site_files/html/directive/i-date.html +21 -16
  16. package/apps/client-side/site_files/html/directive/i-datetime.html +31 -0
  17. package/apps/client-side/site_files/html/directive/i-file.html +3 -5
  18. package/apps/client-side/site_files/html/directive/i-list.html +2 -2
  19. package/apps/client-side/site_files/html/directive/i-radio.html +4 -0
  20. package/apps/client-side/site_files/html/directive/i-textarea.html +4 -0
  21. package/apps/client-side/site_files/html/directive/i-treenode.html +20 -0
  22. package/apps/client-side/site_files/html/directive/i-treeview.html +13 -0
  23. package/apps/client-side/site_files/html/directive/i-upload.html +5 -0
  24. package/apps/client-side/site_files/html/directive-core/i-date.html +64 -0
  25. package/apps/client-side/site_files/html/directive-core/i-list.html +22 -0
  26. package/apps/client-side/site_files/js/bootstrap-5-directive.js +226 -234
  27. package/apps/client-side/site_files/js/bootstrap.js.map +1 -0
  28. package/apps/client-side/site_files/js/directive.js +1865 -2044
  29. package/apps/client-side/site_files/js/directive.min.js +2 -2
  30. package/apps/client-side/site_files/js/site.js +1 -1
  31. package/apps/security/site_files/html/login_modal.html +18 -26
  32. package/index.js +2 -5
  33. package/lib/parser.js +519 -509
  34. package/lib/routing.js +21 -15
  35. package/lib/sessions.js +182 -247
  36. package/object-options/index.js +6 -4
  37. package/package.json +3 -2
  38. package/pull.bat +3 -0
  39. package/push.bat +2 -5
@@ -29,15 +29,7 @@ app.directive('iControl', function () {
29
29
  $('.i-list .dropdown-content').css('display', 'none');
30
30
  });
31
31
  },
32
- template: `
33
- <div class="mb-3 {{class2}}">
34
- <label for="{{id2}}" class="form-label">{{label}}</label>
35
- <input id="{{id2}}" ng-disabled="disabled" autofocus v="{{v}}" type="{{type}}" ng-model="ngModel" ng-change="ngChange()" ngKeydown="ngKeydown()" class="form-control" placeholder="{{placeholder}}" aria-label="{{label}}" />
36
- <div class="invalid-feedback">
37
-
38
- </div>
39
- </div>
40
- `,
32
+ template: `/*##client-side/directive/i-control.html*/`,
41
33
  };
42
34
  });
43
35
 
@@ -68,12 +60,7 @@ app.directive('iTextarea', function () {
68
60
  $('.popup').hide();
69
61
  });
70
62
  },
71
- template: `
72
- <div class="mb-3">
73
- <label for="{{id2}}" class="form-label">{{label}}</label>
74
- <textarea ng-disabled="disabled" class="form-control" id="{{id2}}" ng-model="ngModel" ng-change="ngChange()" v="{{v}}" rows="{{rows}}"></textarea>
75
- </div>
76
- `,
63
+ template: `/*##client-side/directive/i-textarea.html*/`,
77
64
  };
78
65
  });
79
66
 
@@ -102,14 +89,7 @@ app.directive('iCheckbox', function ($timeout) {
102
89
  }, 100);
103
90
  };
104
91
  },
105
- template: `
106
- <div class="form-check">
107
- <input ng-change="changed()" ng-disabled="disabled" class="form-check-input" type="checkbox" ng-model="ngModel" id="{{id2}}">
108
- <label class="form-check-label" for="{{id2}}">
109
- {{label}}
110
- </label>
111
- </div>
112
- `,
92
+ template: `/*##client-side/directive/i-checkbox.html*/`,
113
93
  };
114
94
  });
115
95
 
@@ -121,6 +101,7 @@ app.directive('iRadio', function () {
121
101
  label: '@',
122
102
  group: '@',
123
103
  id2: '@',
104
+ ngValue: '@',
124
105
  ngModel: '=',
125
106
  ngChange: '&',
126
107
  },
@@ -131,18 +112,10 @@ app.directive('iRadio', function () {
131
112
  attrs.disabled = '';
132
113
  }
133
114
 
134
- $scope.group = $scope.group || attrs.group || attrs.ngModel.replaceAll('.', '_');
115
+ $scope.group = $scope.group || attrs.ngModel.replaceAll('.', '_');
135
116
  $scope.id2 = $scope.id2 || 'input_' + Math.random().toString().replace('0.', '');
136
117
  },
137
- template: `
138
- <div class="form-check">
139
- <input class="form-check-input" type="radio" ng-change="ngChange()" ng-disabled="disabled" ng-model="ngModel" id="{{id2}}" name="{{group}}" >
140
- <label class="form-check-label" for="exampleRadios1">
141
- {{label}}
142
- </label>
143
- </div>
144
-
145
- `,
118
+ template: `/*##client-side/directive/i-radio.html*/`,
146
119
  };
147
120
  });
148
121
 
@@ -182,11 +155,21 @@ app.directive('iButton', function () {
182
155
  } else if ($scope.type.like('*print*')) {
183
156
  $scope.fa = 'fas fa-print';
184
157
  $scope.class = 'btn-secondary';
185
- } else if ($scope.type.like('*search*')) {
186
- $scope.fa = 'search';
187
158
  } else if ($scope.type.like('*export*') || $scope.type.like('*excel*')) {
188
159
  $scope.fa = 'fas fa-file-export';
189
160
  $scope.class = 'btn-secondary';
161
+ } else if ($scope.type.like('*search*') || $scope.type.like('*find*')) {
162
+ $scope.fa = 'fas fa-search';
163
+ $scope.class = 'btn-light';
164
+ } else if ($scope.type.like('*login*') || $scope.type.like('*signin*')) {
165
+ $scope.fa = 'fas fa-sign-in-alt';
166
+ $scope.class = 'btn-light';
167
+ } else if ($scope.type.like('*logout*') || $scope.type.like('*signout*')) {
168
+ $scope.fa = 'fas fa-sign-out-alt';
169
+ $scope.class = 'btn-light';
170
+ }
171
+ if ($scope.type.like('*default*')) {
172
+ $scope.class = '';
190
173
  }
191
174
  $scope.$watch('loading', (loading) => {
192
175
  if (loading === 'true') {
@@ -196,13 +179,7 @@ app.directive('iButton', function () {
196
179
  }
197
180
  });
198
181
  },
199
- template: `
200
- <button class="btn {{class}}" type="button" ng-click="click()" ng-disabled="busy">
201
- <span ng-show="busy" class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>
202
- {{label}}
203
- <i class="{{fa}}"></i>
204
- </button>
205
- `,
182
+ template: `/*##client-side/directive/i-button.html*/`,
206
183
  };
207
184
  });
208
185
  app.directive('iList', [
@@ -400,7 +377,9 @@ app.directive('iChecklist', [
400
377
  $scope.$watch('ngModel', (ngModel) => {
401
378
  $scope.reload();
402
379
  });
403
-
380
+ $scope.$watch('items', (ngModel) => {
381
+ $scope.reload();
382
+ });
404
383
  $scope.reload = function () {
405
384
  $scope.selectedItems = [];
406
385
 
@@ -465,14 +444,7 @@ app.directive('iChecklist', [
465
444
  }, 100);
466
445
  };
467
446
  },
468
- template: `
469
- <div class="check-list">
470
- <label class="title margin"> {{label}} </label>
471
- <div class="row">
472
- <i-checkbox class="{{class2}}" label="{{item[display]}}" ng-repeat="item in items" ng-model="item.$selected" ng-change="change(item);"></i-checkbox>
473
- </div>
474
- </div>
475
- `,
447
+ template: `/*##client-side/directive/i-checklist.html*/`,
476
448
  };
477
449
  },
478
450
  ]);
@@ -483,6 +455,7 @@ app.directive('iDate', function () {
483
455
  required: 'ngModel',
484
456
  scope: {
485
457
  label: '@',
458
+ V: '@',
486
459
  year: '@',
487
460
  ngModel: '=',
488
461
  ngChange: '&',
@@ -565,6 +538,7 @@ app.directive('iDate', function () {
565
538
  $scope.updateDate = function (date) {
566
539
  if ($scope.model.selectedDay && $scope.model.selectedMonth && $scope.model.selectedYear) {
567
540
  $scope.ngModel = new Date($scope.model.selectedYear.id, $scope.model.selectedMonth.id, $scope.model.selectedDay.id, 0, 0, 0);
541
+ $scope.editOnly = false;
568
542
  if ($scope.ngChange) {
569
543
  $scope.ngChange();
570
544
  }
@@ -583,154 +557,146 @@ app.directive('iDate', function () {
583
557
  };
584
558
  });
585
559
 
586
- app.directive('iChecklist2', [
587
- '$interval',
588
- function ($interval) {
589
- return {
590
- restrict: 'E',
591
- required: 'ngModel',
592
- scope: {
593
- label: '@',
594
- primary: '@',
595
- display: '@',
596
- ngModel: '=',
597
- items: '=',
598
- like: '&',
599
- },
600
- link: function ($scope, element, attrs, ctrl) {
601
- attrs.primary = attrs.primary || 'id';
560
+ app.directive('iDatetime', function () {
561
+ return {
562
+ restrict: 'E',
563
+ required: 'ngModel',
564
+ scope: {
565
+ label: '@',
566
+ V: '@',
567
+ ngYear: '@',
568
+ ngModel: '=',
569
+ ngChange: '&',
570
+ },
571
+ link: function ($scope, element, attrs) {
572
+ if (typeof attrs.disabled !== 'undefined') {
573
+ attrs.disabled = 'disabled';
574
+ } else {
575
+ attrs.disabled = '';
576
+ }
577
+ $scope.year = $scope.ngYear ? parseInt($scope.ngYear) : 1960;
602
578
 
603
- $scope.selectedItems = [];
579
+ $scope.model = {};
604
580
 
605
- $scope.$watch('ngModel', (ngModel) => {
606
- $scope.reload();
581
+ $scope.hours = [];
582
+ for (let i = 0; i < 24; i++) {
583
+ $scope.hours.push({
584
+ id: i,
585
+ name: i < 10 ? '0' + i : i,
607
586
  });
587
+ }
588
+ $scope.minutes = [];
589
+ for (let i = 0; i < 60; i++) {
590
+ $scope.minutes.push({
591
+ id: i,
592
+ name: i < 10 ? '0' + i : i,
593
+ });
594
+ }
608
595
 
609
- $scope.reload = function () {
610
- $scope.selectedItems = [];
611
-
612
- if ($scope.ngModel) {
613
- $scope.ngModel.forEach((mitem) => {
614
- $scope.selectedItems.push(mitem);
615
- });
616
-
617
- if ($scope.items) {
618
- $scope.items.forEach((mitem) => {
619
- let exist = !1;
620
- $scope.selectedItems.forEach((sitem) => {
621
- if (mitem[$scope.primary] === sitem[$scope.primary]) {
622
- exist = !0;
623
- }
624
- });
625
- if (exist) {
626
- mitem.$selected = !0;
627
- } else {
628
- mitem.$selected = !1;
629
- }
630
- });
631
- }
632
- }
633
- if (!$scope.ngModel) {
634
- $scope.selectedItems = [];
635
- if ($scope.items) {
636
- $scope.items.forEach((mitem) => {
637
- mitem.$selected = !1;
638
- });
639
- }
640
- }
641
- };
642
-
643
- $scope.change = function (item) {
644
- if (item.$selected) {
645
- let exsits = !1;
646
- $scope.selectedItems.forEach((sitem) => {
647
- if (sitem[$scope.primary] === item[$scope.primary]) {
648
- exsits = !0;
649
- }
650
- });
651
- if (!exsits) {
652
- $scope.selectedItems.push(item);
653
- }
654
- } else {
655
- $scope.selectedItems.forEach((sitem, index) => {
656
- if (sitem[$scope.primary] === item[$scope.primary]) {
657
- $scope.selectedItems.splice(index, 1);
658
- }
659
- });
660
- }
661
-
662
- $scope.ngModel = $scope.selectedItems;
663
- };
664
- },
665
- template: `
666
- <div class="row padding check-list">
667
- <label class="title"> {{label}} </label>
668
- <div class="control" ng-repeat="item in items">
669
- <label class="checkbox" >
670
- <span > {{item[display]}} </span>
671
- <input type="checkbox" ng-model="item.$selected" ng-change="change(item)" >
672
- <span class="checkmark"></span>
673
- </label>
674
- </div>
675
- </div>
676
- `,
677
- };
678
- },
679
- ]);
596
+ $scope.days = [];
597
+ for (let i = 1; i < 32; i++) {
598
+ $scope.days.push({
599
+ id: i,
600
+ name: i,
601
+ });
602
+ }
680
603
 
681
- app.directive('iRadiolist', [
682
- '$interval',
683
- function ($interval) {
684
- return {
685
- restrict: 'E',
686
- required: 'ngModel',
687
- scope: {
688
- label: '@',
689
- display: '@',
690
- ngModel: '=',
691
- items: '=',
692
- },
693
- link: function (scope, element, attrs) {
694
- scope.model = scope.ngModel;
604
+ $scope.years = [];
605
+ for (let i = $scope.year; i < 2100; i++) {
606
+ $scope.years.push({
607
+ id: i,
608
+ name: i,
609
+ });
610
+ }
611
+ $scope.lang = site.session ? site.session.lang : 'en';
612
+ if ($scope.lang === 'ar') {
613
+ $scope.monthes = [
614
+ { id: 0, name: 'يناير' },
615
+ { id: 1, name: 'فبراير' },
616
+ { id: 2, name: 'مارس' },
617
+ { id: 3, name: 'ابريل' },
618
+ { id: 4, name: 'مايو' },
619
+ { id: 5, name: 'يونيو' },
620
+ { id: 6, name: 'يوليو' },
621
+ { id: 7, name: 'اغسطس' },
622
+ { id: 8, name: 'سبتمبر' },
623
+ { id: 9, name: 'اكتوبر' },
624
+ { id: 10, name: 'نوفمبر' },
625
+ { id: 11, name: 'ديسمبر' },
626
+ ];
627
+ } else {
628
+ $scope.monthes = [
629
+ { id: 0, name: 'Jan' },
630
+ { id: 1, name: 'Feb' },
631
+ { id: 2, name: 'Mar' },
632
+ { id: 3, name: 'Aper' },
633
+ { id: 4, name: 'May' },
634
+ { id: 5, name: 'June' },
635
+ { id: 6, name: 'Jule' },
636
+ { id: 7, name: 'Aug' },
637
+ { id: 8, name: 'Sep' },
638
+ { id: 9, name: 'Oct' },
639
+ { id: 10, name: 'Nov' },
640
+ { id: 11, name: 'Des' },
641
+ ];
642
+ }
695
643
 
696
- scope.code = 'radio_' + Math.random();
644
+ $scope.$watch('ngModel', function (ngModel) {
645
+ if (ngModel) {
646
+ ngModel = new Date(ngModel);
647
+ $scope.model = $scope.model || {};
648
+ $scope.model.selectedDay = $scope.days.find((d) => d.id == ngModel.getDate());
649
+ $scope.model.selectedMonth = $scope.monthes.find((m) => m.id == ngModel.getMonth());
650
+ $scope.model.selectedYear = $scope.years.find((y) => y.id == ngModel.getFullYear());
651
+ $scope.model.selectedHour = $scope.hours.find((y) => y.id == ngModel.getHours());
652
+ $scope.model.selectedMinute = $scope.minutes.find((y) => y.id == ngModel.getMinutes());
653
+ } else {
654
+ $scope.model = $scope.model || {};
655
+ $scope.model.selectedDay = null;
656
+ $scope.model.selectedMonth = null;
657
+ $scope.model.selectedYear = null;
658
+ $scope.model.selectedHour = null;
659
+ $scope.model.selectedMinute = null;
660
+ }
661
+ });
697
662
 
698
- scope.change = function (item) {
699
- scope.ngModel = item;
700
- };
663
+ $scope.setDay = function () {
664
+ $scope.ngModel = new Date();
665
+ };
701
666
 
702
- scope.isChecked = function (item) {
703
- if (item && scope.ngModel && scope.ngModel.id === item.id) {
704
- return !0;
667
+ $scope.updateDate = function (date) {
668
+ if ($scope.model.selectedDay && $scope.model.selectedMonth && $scope.model.selectedYear && $scope.model.selectedHour && $scope.model.selectedMinute) {
669
+ $scope.ngModel = new Date($scope.model.selectedYear.id, $scope.model.selectedMonth.id, $scope.model.selectedDay.id, $scope.model.selectedHour.id, $scope.model.selectedMinute.id, 0);
670
+ $scope.editOnly = false;
671
+ if ($scope.ngChange) {
672
+ $scope.ngChange();
705
673
  }
706
- return !1;
707
- };
708
- },
709
- template: `
710
- <div class="row padding radio-list">
711
- <label class="title"> {{label}} </label>
712
- <div class="control" ng-repeat="item in items">
713
- <label class="radio" >
714
- <span > {{item[display]}} </span>
715
- <input name="{{code}}" type="radio" ng-model="model" ng-checked="isChecked(item)" ng-click="change(item)" ng-change="change(item)" >
716
- <span class="checkmark"></span>
717
- </label>
718
- </div>
719
- </div>
720
- `,
721
- };
722
- },
723
- ]);
674
+ }
675
+ };
676
+ },
677
+ restrict: 'E',
678
+ require: 'ngModel',
679
+ scope: {
680
+ v: '@',
681
+ disabled: '@',
682
+ label: '@',
683
+ ngModel: '=',
684
+ },
685
+ template: `/*##client-side/directive/i-datetime.html*/`,
686
+ };
687
+ });
724
688
 
725
689
  app.directive('iFile', [
726
690
  '$interval',
727
691
  'isite',
728
- function ($interval, isite) {
692
+ '$timeout',
693
+ function ($interval, isite, $timeout) {
729
694
  return {
730
695
  restrict: 'E',
731
696
  required: 'ngModel',
732
697
  scope: {
733
698
  label: '@',
699
+ view: '@',
734
700
  accept: '@',
735
701
  folder: '@',
736
702
  ngModel: '=',
@@ -739,19 +705,20 @@ app.directive('iFile', [
739
705
  ngChange: '&',
740
706
  },
741
707
  link: function ($scope, element, attrs, ctrl) {
742
- $scope.label = $scope.label || 'Select File to Upload';
708
+ $scope.label = $scope.label || '';
743
709
  $scope.folder = $scope.folder || 'default';
744
710
  $scope.accept = $scope.accept ? $scope.accept : '';
711
+ $scope.viewOnly = $scope.view === undefined ? false : true;
712
+
745
713
  let input = $(element).find('input')[0];
746
714
  let button = $(element).find('button')[0];
747
- if (attrs.view === '') {
748
- $scope.viewOnly = !0;
749
- }
715
+
750
716
  let progress = $(element).find('.progress')[0];
751
717
  $(progress).hide();
752
718
 
753
719
  $scope.id = Math.random().toString().replace('.', '_');
754
- if (attrs.view !== '') {
720
+
721
+ if (!$scope.viewOnly) {
755
722
  button.addEventListener('click', function () {
756
723
  input.click();
757
724
  });
@@ -775,9 +742,7 @@ app.directive('iFile', [
775
742
 
776
743
  if (file) {
777
744
  $scope.ngModel = file;
778
- if ($scope.ngChange) {
779
- $scope.ngChange();
780
- }
745
+ $scope.changed();
781
746
  }
782
747
  }
783
748
  );
@@ -788,9 +753,17 @@ app.directive('iFile', [
788
753
 
789
754
  $scope.$watch('ngModel', (ngModel) => {
790
755
  if (ngModel) {
791
- a.setAttribute('url', ngModel);
756
+ button.setAttribute('url', ngModel);
792
757
  }
793
758
  });
759
+
760
+ $scope.changed = function () {
761
+ $timeout(() => {
762
+ if ($scope.ngChange) {
763
+ $scope.ngChange();
764
+ }
765
+ }, 200);
766
+ };
794
767
  },
795
768
  template: `/*##client-side/directive/i-file.html*/`,
796
769
  };
@@ -800,12 +773,14 @@ app.directive('iFile', [
800
773
  app.directive('iImage', [
801
774
  '$interval',
802
775
  'isite',
803
- function ($interval, isite) {
776
+ '$timeout',
777
+ function ($interval, isite, $timeout) {
804
778
  return {
805
779
  restrict: 'E',
806
780
  required: 'ngModel',
807
781
  scope: {
808
782
  folder: '@',
783
+ view: '@',
809
784
  accept: '@',
810
785
  ngModel: '=',
811
786
  ngClick: '&',
@@ -814,12 +789,14 @@ app.directive('iImage', [
814
789
  link: function ($scope, element, attrs, ctrl) {
815
790
  $scope.folder = $scope.folder || 'default';
816
791
  $scope.accept = $scope.accept ? $scope.accept : 'image/*';
792
+ $scope.viewOnly = $scope.view === undefined ? false : true;
793
+
817
794
  let input = $(element).find('input')[0];
818
795
  let img = $(element).find('img')[0];
819
796
  let progress = $(element).find('.progress')[0];
820
797
  $(progress).hide();
821
798
 
822
- if (attrs.view !== '') {
799
+ if (!$scope.viewOnly) {
823
800
  img.addEventListener('click', function () {
824
801
  input.click();
825
802
  });
@@ -844,7 +821,9 @@ app.directive('iImage', [
844
821
  if (image) {
845
822
  $scope.ngModel = image;
846
823
  if ($scope.ngChange) {
847
- $scope.ngChange();
824
+ $timeout(() => {
825
+ $scope.ngChange();
826
+ }, 200);
848
827
  }
849
828
  }
850
829
  }
@@ -861,6 +840,58 @@ app.directive('iImage', [
861
840
  };
862
841
  },
863
842
  ]);
843
+ app.directive('iUpload', [
844
+ '$interval',
845
+ 'isite',
846
+ function ($interval, isite) {
847
+ return {
848
+ restrict: 'E',
849
+ scope: {
850
+ label: '@',
851
+ api: '@',
852
+ type: '@',
853
+ view: '@',
854
+ ngClick: '&',
855
+ onUploaded: '&',
856
+ },
857
+ link: function ($scope, element, attrs, ctrl) {
858
+ let input = $(element).find('input')[0];
859
+ let a = $(element).find('button')[0];
860
+ let progress = $(element).find('progress')[0];
861
+ $(progress).hide();
862
+
863
+ if (attrs.view !== '') {
864
+ a.addEventListener('click', function () {
865
+ input.click();
866
+ });
867
+ }
868
+
869
+ input.addEventListener('change', function () {
870
+ if ($scope.api) {
871
+ isite.upload(
872
+ this.files,
873
+ {
874
+ api: $scope.api,
875
+ },
876
+ (err, file, e) => {
877
+ if (e) {
878
+ $(progress).show();
879
+ progress.value = e.loaded;
880
+ progress.max = e.total;
881
+ }
882
+
883
+ if (file) {
884
+ $scope.onUploaded(file);
885
+ }
886
+ }
887
+ );
888
+ }
889
+ });
890
+ },
891
+ template: `/*##client-side/directive/i-upload.html*/`,
892
+ };
893
+ },
894
+ ]);
864
895
 
865
896
  app.directive('iTreeview', [
866
897
  '$interval',
@@ -975,23 +1006,7 @@ app.directive('iTreeview', [
975
1006
  }
976
1007
  });
977
1008
  },
978
- template: `
979
- <div class="treeview">
980
- <ul >
981
- <li ng-dblclick="$event.preventDefault();$event.stopPropagation();source.$actions = !0" ng-mouseleave="source.$actions = !1">
982
-
983
- <i ng-hide="openTree" class="fa fa-folder"></i> <i ng-show="openTree" class="fa fa-folder"></i>
984
-
985
-
986
- <span ng-click="openTree = !openTree" class="title"> {{label}} <small class="display"> [ {{ngModel.v_display}} ] </small> </span>
987
- <div class="actions" ng-show="source.$actions === !0">
988
- <i-button type="add default" ng-click="ngClick($event , ngModel);ngNode($event , ngModel)"></i-button>
989
- </div>
990
- <i-treenode display="{{display}}" ng-click="ngClick($event)" ng-add="ngAdd()" ng-edit="ngEdit()" ng-delete="ngDelete()" ng-show="openTree" ng-model="ngModel" nodes="v_nodes" ></i-treenode>
991
- </li>
992
- </ul>
993
- </div>
994
- `,
1009
+ template: `/*##client-side/directive/i-treeview.html*/`,
995
1010
  };
996
1011
  },
997
1012
  ]);
@@ -1096,30 +1111,7 @@ app.directive('iTreenode', [
1096
1111
  node.$selected = !0;
1097
1112
  };
1098
1113
  },
1099
- template: `
1100
- <div class="treenode">
1101
- <ul >
1102
- <li ng-repeat="node in nodes" >
1103
- <div class="row" ng-dblclick="$event.preventDefault();$event.stopPropagation();node.$actions = !0;source.$actions = !1" ng-mouseleave="node.$actions = !1">
1104
- <span ng-show="node.nodes.length > 0" ng-click="node.$expand = !node.$expand;">
1105
- <i ng-hide="node.$expand" class="fa fa-caret-left"></i> <i ng-show="node.$expand" class="fa fa-caret-down"></i>
1106
- </span>
1107
- <span ng-hide="node.nodes.length > 0" >
1108
- <i class="fa fa-file"></i>
1109
- </span>
1110
-
1111
- <span class="text" ng-class="{'selected' : node.$selected == !0}" ng-click="ngClick($event , node);node.$expand = !node.$expand;selected(node);updateModal(node)" > {{node[display]}} </span>
1112
- <div class="actions" ng-show="node.$actions === !0">
1113
- <i-button type="add default" ng-click="ngAdd(node)"></i-button>
1114
- <i-button type="edit default" ng-click="ngEdit(node)"></i-button>
1115
- <i-button type="delete default" ng-click="ngDelete(node)"></i-button>
1116
- </div>
1117
- </div>
1118
- <i-treenode display="{{display}}" ng-click="ngClick($event)" ng-add="ngAdd()" ng-edit="ngEdit()" ng-delete="ngDelete()" ng-show="node.$expand" ng-model="ngModel" nodes="node.nodes" nodes="node.nodes"></i-treenode>
1119
- </li>
1120
- </ul>
1121
- </div>
1122
- `,
1114
+ template: `/*##client-side/directive/i-treenode.html*/`,
1123
1115
  };
1124
1116
  },
1125
1117
  ]);