├── .gitignore ├── LICENSE.md ├── README.md ├── demo ├── copyToClipboard │ ├── index.html │ ├── script.js │ └── style.css ├── customTable │ ├── index.html │ ├── script.js │ └── style.css ├── customselect │ ├── index.html │ ├── script.js │ └── style.css ├── dateBeforeAfter │ ├── index.html │ ├── script.js │ └── style.css ├── isState │ ├── index.html │ ├── script.js │ └── style.css ├── multiselect │ ├── index.html │ ├── script.js │ └── style.css ├── onRepeatFinish │ ├── index.html │ ├── script.js │ └── style.css └── triStateCheckbox │ ├── index.html │ ├── script.js │ └── style.css └── src ├── clipboardService.js ├── copytoClipboard.js ├── customTable.js ├── customselect.js ├── dateBeforeAfter.js ├── isState.js ├── multiselect.js ├── onRepeatFinish.js └── triStateCheckbox.js /.gitignore: -------------------------------------------------------------------------------- 1 | #ignore thumbnails created by windows 2 | Thumbs.db 3 | #Ignore files built by Visual Studio 4 | *.obj 5 | *.exe 6 | *.pdb 7 | *.user 8 | *.aps 9 | *.pch 10 | *.vspscc 11 | *_i.c 12 | *_p.c 13 | *.ncb 14 | *.suo 15 | *.tlb 16 | *.tlh 17 | *.bak 18 | *.cache 19 | *.ilk 20 | *.log 21 | [Bb]in 22 | [Dd]ebug*/ 23 | *.lib 24 | *.sbr 25 | obj/ 26 | [Rr]elease*/ 27 | _ReSharper*/ 28 | [Tt]est[Rr]esult* 29 | *.suo 30 | *.orig 31 | packages/ 32 | *[Nn]crunch* 33 | !nuget.exe -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | Copyright 2016 Stephen Long 179 | 180 | Licensed under the Apache License, Version 2.0 (the "License"); 181 | you may not use this file except in compliance with the License. 182 | You may obtain a copy of the License at 183 | 184 | http://www.apache.org/licenses/LICENSE-2.0 185 | 186 | Unless required by applicable law or agreed to in writing, software 187 | distributed under the License is distributed on an "AS IS" BASIS, 188 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 189 | See the License for the specific language governing permissions and 190 | limitations under the License. 191 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # General Angular Directives 2 | 3 | This is a general repository for Angular Directives that I've developed for my blog, [Longing to Know](https://long2know.com) 4 | 5 | ### Copyright and license 6 | Code copyright 2015-2016 Stephen Long. Code released under the [Apache license](https://github.com/long2know/angular-directives-general/blob/master/LICENSE.md) 7 | 8 | ### Date Before and After validator 9 | - [Blog](https://long2know.com/2015/07/angular-date-before-and-after-validation/) 10 | - [Demo Plunker](http://plnkr.co/edit/URH2Ie?p=preview) 11 | - [Demo Codepen](http://codepen.io/long2know/pen/ZGPvdg) 12 | 13 | ### Angular-UI Multiselect Checkbox Dropdown 14 | - [Blog](https://long2know.com/2015/07/angular-multiselect-dropdown/) 15 | - [Demo Plunker](http://plnkr.co/edit/uWZT3I?p=preview) 16 | - [Demo Codepen](http://codepen.io/long2know/pen/PqLRyZ) 17 | 18 | ### Angular-UI Tri-State Checkbox 19 | - [Blog](https://long2know.com/2015/04/angular-tri-state-checkbox/) 20 | - [Demo Plunker](http://plnkr.co/edit/4R4OJ1?p=preview) 21 | - [Demo Codepen](http://codepen.io/long2know/pen/NqJYQg) 22 | 23 | ### On Repeat Finish 24 | - [Blog](https://long2know.com/2015/03/animating-and-angular-repeater-finish/) 25 | - [Demo Plunker](http://plnkr.co/edit/tUTzOS?p=preview) 26 | - [Demo Codepen](http://codepen.io/long2know/pen/WvmJod) 27 | 28 | ### Model Property Watch and Reset Directive 29 | - [Blog](https://long2know.com/2015/08/angular-property-state-watcher-and-setter-directive/) 30 | - [Demo Plunker](http://plnkr.co/edit/w876ka?p=preview) 31 | - [Demo Codepen](http://codepen.io/long2know/pen/PqLvBX) 32 | 33 | ### Custom Table Directive w/ sort 34 | - [Blog](https://long2know.com/2015/09/angular-reusable-table-directive/) 35 | - [Demo Plunker](http://plnkr.co/edit/GSORcd?p=preview) 36 | - [Demo Codepen](http://codepen.io/long2know/pen/dYPvOW) 37 | 38 | ### Clipboard directive with clipboard service 39 | - [Blog](https://long2know.com/2017/07/angularjs-copy-to-clipboard-directive/) 40 | - [Demo Plunker](https://plnkr.co/edit/qPmxIF?p=preview) 41 | 42 | -------------------------------------------------------------------------------- /demo/copyToClipboard/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Clipboard Directive Demo 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 | 42 | 43 | 74 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /demo/copyToClipboard/script.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | angular.module('myApp.controllers', []); 3 | 4 | var myApp = angular.module('myApp', [ 5 | 'myApp.controllers', 6 | 'long2know', 7 | 'ngSanitize', 8 | 'ui.bootstrap', 9 | 'ui.router', 10 | 'ui']); 11 | 12 | var state1Ctrl = function ($filter) { 13 | var vm = this; 14 | 15 | vm.getDate = function() { 16 | return new Date(); 17 | }; 18 | }; 19 | 20 | state1Ctrl.$inject = ['$filter']; 21 | angular.module('myApp.controllers') 22 | .controller('state1Ctrl', state1Ctrl); 23 | 24 | myApp.config(['$locationProvider', '$stateProvider', '$urlRouterProvider', 25 | 26 | function ($locationProvider, $stateProvider, $urlRouterProvider) { 27 | 28 | $locationProvider.html5Mode(false); 29 | 30 | $urlRouterProvider.when('/', '/state1') 31 | .otherwise("/state1"); 32 | 33 | $stateProvider.state('app', { 34 | abstract: true, 35 | url: '/', 36 | views: { 37 | 'main': { 38 | template: '
/div>' 39 | } 40 | } 41 | }) 42 | .state('app.state1', { 43 | url: 'state1', 44 | templateUrl: 'state1.html', 45 | controller: 'state1Ctrl', 46 | controllerAs: 'vm', 47 | reloadOnSearch: false 48 | }) 49 | }]); 50 | 51 | myApp.run(['$log', function ($log) { 52 | $log.log("Start."); 53 | }]); 54 | })() -------------------------------------------------------------------------------- /demo/copyToClipboard/style.css: -------------------------------------------------------------------------------- 1 | small { 2 | font-size: 0.625em; 3 | font-style: italic; 4 | color: #a94442; 5 | display: block; 6 | float:right; 7 | } 8 | 9 | input { 10 | display:block !important; 11 | } 12 | 13 | label { 14 | display:block; 15 | } 16 | 17 | .container { 18 | width: auto !important; 19 | } 20 | 21 | .form-inline .form-group { 22 | display:inline-block; 23 | width: auto; 24 | } 25 | 26 | input { 27 | width: 250px !important; 28 | } -------------------------------------------------------------------------------- /demo/customTable/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Custom Table Demo 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 | $Watchers: 39 | 40 |
41 | 42 |
43 |

44 | Table with Repeater 45 | Row Count 46 | 47 |

48 |
49 | 50 |
51 | 52 |
53 | 54 |
55 | 56 |
57 |

58 | Table Rendered Directly to DOM 59 | Row Count 60 | 61 |

62 |
63 | 64 |
65 | 66 |
67 |
68 | 69 | -------------------------------------------------------------------------------- /demo/customTable/script.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | angular.module('myApp.controllers', []); 3 | 4 | var myApp = angular.module('myApp', [ 5 | 'long2know', 6 | 'myApp.controllers', 7 | 'ngSanitize', 8 | 'ui.bootstrap', 9 | 'ui.router', 10 | 'ui']); 11 | 12 | var myController = function ($scope, $timeout, $animate, $log, watchCountService) { 13 | var vm = this, 14 | addItems = function (count) { 15 | for (var i = 0; i < count; i++) { 16 | var suffix = vm.table1Options.records.length.toString(); 17 | var money = (Math.random() * 1000).toFixed(2); 18 | var date = new Date(); 19 | date.setDate(date.getDate() + vm.table1Options.records.length); 20 | vm.table1Options.records.push({ 21 | id: suffix, column2: "Column2_" + suffix, column3: "Column3_" + suffix, column4: "Column4_" + suffix, column5: "Column5_" + suffix, 22 | column6: money, column7: "Column7_" + suffix, column8: date 23 | }); 24 | vm.table2Options.records.push({ 25 | id: suffix, column2: "Column2_" + suffix, column3: "Column3_" + suffix, column4: "Column4_" + suffix, column5: "Column5_" + suffix, 26 | column6: money, column7: "Column7_" + suffix, column8: date 27 | }); 28 | } 29 | }, 30 | init = function () { 31 | var columns = [ 32 | { name: 'Column 1', value: 'column1', binding: "r.column3 + \" / \" + r.column4", style: {}, isWatched: true, isAnchor: false, isComputed: true, srefBinding: 'state expression here' }, 33 | { name: 'Column 2', value: 'column2', binding: 'column2', isWatched: true, style: {} }, 34 | { name: 'Column 3', value: 'column3', binding: 'column3', isWatechhed: true, style: {} }, 35 | { name: 'Column 4', value: 'column4', binding: 'column4', isWatched: true, style: {} }, 36 | { name: 'Column 5', value: 'column5', binding: 'column5', style: {} }, 37 | { name: 'Column 6', value: 'column6', binding: 'column6', filter: "currency", isWatched: true, style: {} }, 38 | { name: 'Column 7', value: 'column7', binding: 'column7', style: {} }, 39 | { name: 'Column 8', value: 'column8', binding: 'column8', filter: "date:\"MM/dd/yyyy\"", style: {} } 40 | ]; 41 | 42 | vm.watchCount = 0; 43 | vm.isTable1Visible = false; 44 | vm.isTable2Visible = false; 45 | 46 | vm.table1Options = { 47 | records: [], 48 | updatedRecords: [], 49 | columnDefns: columns, 50 | rowDefns: { 51 | computedClass: "{ 'is-error': r.isError, 'is-summary': r.isSummary }" 52 | }, 53 | config: { 54 | sortBy: "column1", 55 | sortDirection: "asc", 56 | trackBy: "id", 57 | pageSize: 50, 58 | pageNumber: 1, 59 | totalCount: 0, 60 | totalPages: 0, 61 | maxSize: 10, 62 | useRepeat: true, 63 | showSelectCheckbox: true, 64 | showSelectAll: true, 65 | showSort: true, 66 | clientSort: true, 67 | clientPaging: true, 68 | displayPager: true, 69 | displayPageSize: true, 70 | stickyHeader: true, 71 | stickyHeaderOffset: 0, 72 | stickyContainer: '.table1-container' 73 | }, 74 | callbacks: { 75 | sortHeaderClicked: function (data) { }, 76 | pageChanged: function (data) { }, 77 | pageSizeChanged: function (data) { }, 78 | checkboxClicked: function (data) { 79 | data.item.isError = data.item.isSelected; 80 | }, 81 | masterClicked: function () { 82 | var updatedRecords = []; 83 | angular.forEach(vm.table1Options.pagedData, function (item) { 84 | item.isError = item.isSelected; 85 | updatedRecords.push(item); 86 | }); 87 | $timeout(function () { 88 | vm.table1Options.updatedRecords = updatedRecords; 89 | }, 0); 90 | }, 91 | } 92 | }; 93 | 94 | vm.table2Options = { 95 | records: [], 96 | updatedRecords: [], 97 | columnDefns: columns, 98 | rowDefns: { 99 | computedClass: "{ 'is-error': r.isError, 'is-summary': r.isSummary }" 100 | }, 101 | config: { 102 | sortBy: "column1", 103 | sortDirection: "asc", 104 | trackBy: "id", 105 | pageSize: 20, 106 | pageNumber: 1, 107 | totalCount: 0, 108 | totalPages: 0, 109 | maxSize: 10, 110 | useRepeat: false, 111 | showSelectCheckbox: true, 112 | showSelectAll: true, 113 | showSort: true, 114 | clientSort: true, 115 | clientPaging: false, 116 | stickyHeader: true, 117 | stickyHeaderOffset: 0, 118 | stickyContainer: '.table2-container' 119 | }, 120 | callbacks: { 121 | sortHeaderClicked: function (data) { }, 122 | pageChanged: function (data) { }, 123 | pageSizeChanged: function (data) { }, 124 | checkboxClicked: function (data) { 125 | data.item.isSummary = data.item.isSelected; 126 | var updatedRecords = [data.item]; 127 | $timeout(function () { 128 | vm.table2Options.updatedRecords = updatedRecords; 129 | }, 0); 130 | }, 131 | masterClicked: function () { 132 | var updatedRecords = []; 133 | angular.forEach(vm.table2Options.pagedData, function (item) { 134 | item.isSummary = item.isSelected; 135 | updatedRecords.push(item); 136 | }); 137 | $timeout(function () { 138 | vm.table2Options.updatedRecords = updatedRecords; 139 | }, 0); 140 | }, 141 | } 142 | }; 143 | 144 | $scope.$watch( 145 | function watchCountExpression() { 146 | return (watchCountService.getWatchCount()); 147 | }, 148 | function handleWatchCountChange(newValue) { 149 | vm.watchCount = newValue; 150 | }); 151 | 152 | $scope.$on('tableSortHeaderClicked', function (event, data) { 153 | 154 | }); 155 | 156 | addItems(100); 157 | vm.toggleTable1(); 158 | vm.toggleTable2(); 159 | }; 160 | 161 | vm.addItems = function (numItems) { 162 | addItems(numItems); 163 | }; 164 | 165 | vm.removeItems = function (numItems) { 166 | if (vm.table1Options.records.length >= numItems) { 167 | $timeout(function () { 168 | vm.table1Options.records.splice(-1 * numItems, numItems); 169 | vm.table2Options.records.splice(-1 * numItems, numItems); 170 | $scope.$apply(); 171 | }, 0); 172 | } 173 | }; 174 | 175 | vm.toggleTable1 = function () { 176 | $timeout(function () { 177 | vm.isTable1Visible = !vm.isTable1Visible; $scope.$apply(); 178 | }, 1); 179 | }; 180 | 181 | vm.toggleTable2 = function () { 182 | $timeout(function () { 183 | vm.isTable2Visible = !vm.isTable2Visible; 184 | }, 1); 185 | }; 186 | 187 | init(); 188 | }; 189 | 190 | myController.$inject = ['$scope', '$timeout', '$animate', '$log', 'watchCountService']; 191 | angular.module('myApp.controllers') 192 | .controller('myCtrl', myController); 193 | 194 | myApp.config(['$modalProvider', '$locationProvider', 195 | function ($modalProvider, $locationProvider) { 196 | $modalProvider.options = { dialogFade: true, backdrop: 'static', keyboard: false }; 197 | $locationProvider.html5Mode(false); 198 | }]); 199 | 200 | myApp.run(['$log', function ($log) { $log.log("Start."); }]); 201 | })() -------------------------------------------------------------------------------- /demo/customTable/style.css: -------------------------------------------------------------------------------- 1 | html, body, .container-fluid { 2 | height: 100%; 3 | } 4 | 5 | body { 6 | -moz-box-flex: 2; 7 | -moz-box-flex: 2; 8 | -webkit-box-flex: 2; 9 | -ms-flex: 2; 10 | flex: 2; 11 | } 12 | 13 | .row { 14 | margin-left: 15px; 15 | margin-right:15px; 16 | } 17 | 18 | .buttons { 19 | margin-bottom:10px; 20 | margin-top:10px; 21 | } 22 | 23 | .btn-default { 24 | background-color: #F7F7F7; 25 | border: 1px solid #eaeaea; 26 | } 27 | 28 | body, .container-fluid, .flex-layout 29 | { 30 | display: -webkit-box; 31 | display: -moz-box; 32 | display: -ms-flexbox; 33 | display: -webkit-flex; 34 | display: flex; 35 | -webkit-box-orient: vertical; 36 | -moz-box-orient: vertical; 37 | -webkit-box-direction: normal; 38 | -moz-box-direction: normal; 39 | -webkit-flex-direction: column; 40 | -ms-flex-direction: column; 41 | flex-direction: column; 42 | } 43 | 44 | .flex-scroll-content { 45 | overflow-y: auto; 46 | /*for IE10*/ 47 | -ms-flex-shrink: 1; 48 | flex-shrink: 1; 49 | min-height: 85px; 50 | -moz-box-flex: 2; 51 | -moz-box-flex: 2; 52 | -webkit-box-flex: 2; 53 | -ms-flex: 2; 54 | flex: 2; 55 | margin-bottom:10px; 56 | /*border: solid 1px;*/ 57 | /*padding:5px;*/ 58 | } 59 | 60 | multiselect { 61 | display: block; 62 | } 63 | 64 | multiselect > .btn-group:not(.single), 65 | customselect > .btn-group:not(.single) { 66 | min-width: 150px; 67 | } 68 | 69 | multiselect > .btn-group.single, 70 | customselect > .btn-group.single { 71 | min-width: 75px; 72 | } 73 | 74 | multiselect > .btn-group, 75 | .modal-form customselect > .btn-group { 76 | width: 100%; 77 | } 78 | 79 | multiselect .btn, 80 | customselect .btn { 81 | width: 100%; 82 | background-color: #FFF; 83 | } 84 | 85 | multiselect .btn.has-error, 86 | customselect.btn.has-error { 87 | border: 1px solid #a94442 !important; 88 | color: #db524b; 89 | } 90 | 91 | .multi-select-popup { 92 | max-height: 400px; 93 | min-width: 200px; 94 | overflow-y: auto; 95 | } 96 | 97 | .custom-select-popup { 98 | max-height: 400px; 99 | min-width: 350px; 100 | overflow-y: auto; 101 | overflow-x: hidden; 102 | } 103 | 104 | .custom-select-popup > li > .form-group > input { 105 | max-width: none; 106 | width: 100%; 107 | } 108 | 109 | .custom-select-popup > li > .form-group > ul { 110 | max-width: 330px; 111 | } 112 | 113 | .multi-select-popup .filter, 114 | .custom-select-popup .filter { 115 | width: 100%; 116 | } 117 | 118 | .multi-select-popup .filter > input, 119 | .custom-select-popup .filter > input { 120 | width: 99%; 121 | max-width: none; 122 | } 123 | 124 | .multi-select-popup .filter .glyphicon, 125 | .custom-select-popup .filter .glyphicon { 126 | cursor: pointer; 127 | pointer-events: all; 128 | } 129 | 130 | .multi-select-popup, 131 | .custom-select-popup { 132 | box-sizing: border-box; 133 | padding: 2px; 134 | } 135 | 136 | multiselect > .btn-group > button, 137 | customselect > .btn-group > button { 138 | padding-right: 20px; 139 | } 140 | 141 | multiselect > .btn-group > button > .caret, 142 | customselect > .btn-group > button > .caret { 143 | right: 5px; 144 | top: 45%; 145 | position: absolute; 146 | } 147 | 148 | multiselect > .btn-group:not(.dropup) > button > .caret, 149 | customselect > .btn-group:not(.dropup) > button > .caret { 150 | border-left: 4px solid transparent; 151 | border-right: 4px solid transparent; 152 | border-top: 4px solid black; 153 | } 154 | 155 | .multi-select-popup > li:not(.filter-container), 156 | .custom-select-popup > li:not(.filter-container) { 157 | padding-right: 10px; 158 | } 159 | 160 | .multi-select-popup .filter-container input::-ms-clear, 161 | .date-field::-ms-clear { 162 | display: none; 163 | width: 0; 164 | height: 0; 165 | } 166 | 167 | .multi-select-popup .filter-container input::-ms-reveal, 168 | .date-field::-ms-reveal { 169 | display: none; 170 | width: 0; 171 | height: 0; 172 | } 173 | 174 | .multi-select-popup .filter-container input::-webkit-search-decoration, 175 | .multi-select-popup .filter-container input::-webkit-search-cancel-button, 176 | .multi-select-popup .filter-container input::-webkit-search-results-button, 177 | .multi-select-popup .filter-container input::-webkit-search-results-decoration, 178 | .date-field::-webkit-search-decoration, 179 | .date-field::-webkit-search-cancel-button, 180 | .date-field::-webkit-search-results-button, 181 | .date-field::-webkit-search-results-decoration { 182 | display: none; 183 | } 184 | 185 | .multi-select-popup > li > a, 186 | .custom-select-popup > li > a { 187 | padding: 3px 10px; 188 | cursor: pointer; 189 | } 190 | 191 | .multi-select-popup > li > a i, 192 | .custom-select-popup > li > a i { 193 | margin-right: 4px; 194 | } 195 | 196 | /*Add padding if pagination is preceeded by another element with pagniation class*/ 197 | .pagination ~ ul.pagination { 198 | padding-left: 10px !important; 199 | } 200 | 201 | .pagination { 202 | font-size: .8em; 203 | height: 2.8em; 204 | padding-bottom: 0; 205 | margin-bottom: 0; 206 | } 207 | 208 | .pagination multiselect > .btn-group > button { 209 | font-size: 1.0em; 210 | } 211 | 212 | .multiselect-label ~ multiselect { 213 | display: inline-block; 214 | } 215 | 216 | .pagination multiselect > .btn-group > button { 217 | font-size: 1.0em; 218 | } 219 | 220 | .multiselect-label ~ multiselect { 221 | display: inline-block; 222 | } 223 | 224 | /* TABLE STYLING */ 225 | .custom-table { 226 | margin: 0 0 25px; 227 | background-color: #f9f9f9; 228 | border: 1px solid #D7D7D7; 229 | width: 100%; 230 | } 231 | 232 | .custom-table.sticky-header { 233 | margin: 0; 234 | } 235 | 236 | .custom-table th { 237 | background-color: #F7F7F7; 238 | border-bottom: 1px solid #D7D7D7; 239 | border-left: 1px solid #D7D7D7; 240 | color: #5C5C5C; 241 | font-size: 13px; 242 | height: 40px; 243 | line-height: 40px; 244 | text-align: left; 245 | white-space: nowrap; 246 | } 247 | 248 | .custom-table .header-check { 249 | padding-left: 17px; 250 | padding-top: 4px; 251 | min-width: 50px; 252 | } 253 | 254 | .custom-table .toggle-all { 255 | width: 15px; 256 | } 257 | 258 | .custom-table .th-checkbox, .custom-table .td-checkbox { 259 | width: 20px; 260 | } 261 | 262 | .custom-table .btn-default { 263 | border: none; 264 | } 265 | 266 | .custom-table > tbody > tr:nth-child(odd) { 267 | background: none; 268 | } 269 | 270 | .custom-table > tbody > tr:nth-child(even) { 271 | background-color: #F7F7F7; 272 | } 273 | 274 | .custom-table > tbody > tr:hover { 275 | background-color: #f5f5f5; 276 | } 277 | 278 | .custom-table tbody td, table.no-border tbody td { 279 | height: 50px; 280 | font-size: 11px; 281 | } 282 | 283 | .custom-table tbody td .center, table.no-border tbody td .center { 284 | text-align: center; 285 | } 286 | 287 | .custom-table tbody .td-checkbox { 288 | padding: 0; 289 | } 290 | 291 | .custom-table tbody .td-checkbox input { 292 | margin-left: 3px; 293 | width: 15px; 294 | } 295 | 296 | .custom-table thead th span { 297 | padding-right: 20px; 298 | } 299 | 300 | .custom-table tbody td { 301 | border-right: 1px solid #d7d7d7; 302 | padding: 0 4px 0 7px; 303 | } 304 | 305 | .custom-table { 306 | background-color: white; 307 | } 308 | 309 | .custom-table thead th { 310 | padding-left: 7px; 311 | } 312 | 313 | .custom-table thead th:first-child { 314 | padding: 2px 2px 0 3px; 315 | } 316 | 317 | .footer .custom-table { 318 | margin-bottom: 5px; 319 | } 320 | 321 | table thead .sorting, 322 | table thead .sorting_asc, 323 | table thead .sorting_desc, 324 | table thead .sorting_asc_disabled, 325 | table thead .sorting_desc_disabled { 326 | background-repeat: no-repeat; 327 | background-position: center right; 328 | } 329 | 330 | table thead .sorting { 331 | background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmV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nUupNLSDOA2JWIC4AOYhcwxiBuBiIZaB8FajBjOQY5gDEgWhiiUBsTaphvEBcC8SCWMRrgJidFMNCoC74gQU7AnEQ1nChZqLFlc4igdQCIP6HwzcZwHQ2n1hvrgPi/UDMgQUfBeI1pITZTyBuAeLPaOLvgbgZizjBpAFyAbpX1gPxAXLSGShmJgHxHSj/CRD3QsXJyk6gHD8BiH9DDb5GcmyigdlArArEUwkpZBy0hSNAgAEA5Ho0sMdEmU8AAAAASUVORK5CYII=); 332 | cursor: pointer; 333 | } 334 | 335 | table thead .sorting_asc { 336 | background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2ZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDowMTgwMTE3NDA3MjA2ODExQjM4MkY2QzVGRUYwRTJDNCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo4MkFEQzYxNjIyQzExMUUxQTFGMUFEQUQ1QjJBNTM4QyIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo4MkFEQzYxNTIyQzExMUUxQTFGMUFEQUQ1QjJBNTM4QyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IE1hY2ludG9zaCI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjAyODAxMTc0MDcyMDY4MTFCMzgyRjZDNUZFRjBFMkM0IiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjAxODAxMTc0MDcyMDY4MTFCMzgyRjZDNUZFRjBFMkM0Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+z5ABTAAAAI5JREFUeNpi/P//PwO1ABMDFQELIQXVjfe4gFQbEJe11iv9otRl2UCcBcSphBQy4gszoKu0gNROIJYB4jtA7AF03V2SXQY0iBFIFUMNAgEVIM6DipPsTQcgDkQTSwRia5IMA9rOC6RqgVgQTQokXgOUZyfFZSFQF/zAgh2BOIjkCBjQRDtq2Khh9DAMIMAAT9AmNBDSXegAAAAASUVORK5CYII=); 337 | cursor: pointer; 338 | } 339 | 340 | table thead .sorting_desc { 341 | background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2ZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0Y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YaOG0cMwFmyC1Y33IoHUAiD+h8MBGa31SvOJddk6IN4PxBxY8FEgXkO0N4G2/gRSLUD8GU3qPRA3A+U/kxpmIBege2U9EB/ApYERX6kBDDtlILUDiFWA+AkQuwNddY2s2ARqvAukJgDxbyCehM8gnLGJBmYDsSoQTyWkkHHQFo4AAQYAAA0piq4hbqwAAAAASUVORK5CYII=); 342 | cursor: pointer; 343 | } 344 | 345 | table thead .sorting_asc_disabled { 346 | background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+A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Dpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAAI9JREFUeNrs0iEKAlEUheFvRBEEg932TG7BoktQ3IDBoiCCYNLqLmcfYhnLE0Remecghjlwwznh59zLLaqq0pQ6GlQ3FZZl+W4HuOGMxysMIWQ122OH7bdrTnFAD0eEXFiBE8bRTyK4yIHNsfzINpjVhQ1xxSiRX9CvA1vHBvfELLBK3uVvn7aFtbBfwJ4DADKcFwD71DDFAAAAAElFTkSuQmCC); 347 | } 348 | 349 | table thead .sorting_desc_disabled { 350 | background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0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GVuZD0iciI/Pnt2WfgAAACJSURBVHjaYvz//z8DtQATAxXBqGGjhtHDMBZsgnfv3o0EUguA+B8OB2QoKyvPJ9Zl64B4PxBzYMFHgXgNKd78CcQtQPwZTfw9EDdjEScYZiAXoHtlPRAfICcCQMXJJCC+A+U/AeJeqDhZsXkXiCcA8W+owddIjk00MBuIVYF4KiGFjIO2cAQIMAAzGSDTlIC38gAAAABJRU5ErkJggg==); 351 | } 352 | 353 | td.is-negative { 354 | color: #FFFFFF; 355 | background-color: #B1504A !important; 356 | } 357 | 358 | .is-error, 359 | .is-error-add.is-error-add-active { 360 | color: #FFFFFF; 361 | background-color: #a94442; 362 | } 363 | 364 | .is-error a, .is-error-add.is-error-add-active a { 365 | color: #FFFFFF; 366 | } 367 | 368 | .is-error-remove.is-error-remove-active { 369 | background-color: #FFFFFF !important; 370 | } 371 | 372 | .is-error-add, .is-error-remove { 373 | -webkit-transition: all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s; 374 | -moz-transition: all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s; 375 | -o-transition: all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s; 376 | transition: all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s; 377 | } 378 | 379 | .table-striped > tbody > tr.is-error:nth-of-type(odd), 380 | .table-striped > tbody > tr.is-error-add.is-error-add-active:nth-of-type(odd) { 381 | color: #FFFFFF; 382 | background-color: #a94442; 383 | } 384 | 385 | .table-striped > tbody > tr.is-error:nth-of-type(even), 386 | .table-striped > tbody > tr.is-error-add.is-error-add-active:nth-of-type(even) { 387 | color: #FFFFFF; 388 | background-color: #b15654; 389 | } 390 | 391 | .table-striped.table-bordered > tbody > tr.is-error:nth-of-type(odd) td { 392 | border-bottom: 1px solid #dc7675; 393 | } 394 | 395 | .table-striped.table-bordered > tbody > tr.is-error:nth-of-type(even) td { 396 | border-bottom: 1px solid #dc7675; 397 | } 398 | 399 | .table-hover > tbody > tr.is-error:hover { 400 | background-color: #dc7675; 401 | } 402 | 403 | .is-summary, 404 | .is-summary-add.is-summary-add-active { 405 | color: black; 406 | background-color: #bfccdd; 407 | } 408 | 409 | .is-summary a, .is-summary-add.is-summary-add-active a { 410 | color: black; 411 | } 412 | 413 | .is-summary-remove.is-summary-remove-active { 414 | background-color: #FFFFFF !important; 415 | } 416 | 417 | .is-summary-add, .is-summary-remove { 418 | -webkit-transition: all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s; 419 | -moz-transition: all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s; 420 | -o-transition: all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s; 421 | transition: all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s; 422 | } 423 | 424 | .table-striped > tbody > tr.is-summary:nth-of-type(odd), 425 | .table-striped > tbody > tr.is-summary-add.is-summary-add-active:nth-of-type(odd) { 426 | color: black; 427 | background-color: #a7b4c5; 428 | } 429 | 430 | .table-striped > tbody > tr.is-summary:nth-of-type(even), 431 | .table-striped > tbody > tr.is-summary-add.is-summary-add-active:nth-of-type(even) { 432 | color: black; 433 | background-color: #bfccdd; 434 | } 435 | 436 | .table-striped.table-bordered > tbody > tr.is-summary:nth-of-type(odd) td { 437 | border-bottom: 1px solid #99a4b2; 438 | } 439 | 440 | .table-striped.table-bordered > tbody > tr.is-summary:nth-of-type(even) td { 441 | border-bottom: 1px solid #99a4b2; 442 | } 443 | 444 | .table-hover > tbody > tr.is-summary:hover { 445 | background-color: #99a4b2; 446 | } -------------------------------------------------------------------------------- /demo/customselect/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Customselect Demo 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 |
26 | 35 | 64 | 65 | -------------------------------------------------------------------------------- /demo/customselect/script.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | angular.module('myApp.controllers', []); 3 | 4 | var myApp = angular.module('myApp', [ 5 | 'myApp.controllers', 6 | 'long2know', 7 | 'ngSanitize', 8 | 'ui.bootstrap', 9 | 'ui.router', 10 | 'ui']); 11 | 12 | var state1Ctrl = function () { 13 | var vm = this; 14 | 15 | vm.getStuff = function (val) { 16 | var list = []; 17 | for (var i = 0; i < 10; i++) { 18 | list.push({ key: i + 1, value: 'Prop' + (i + 1).toString() }); 19 | } 20 | return list; 21 | }; 22 | }; 23 | 24 | state1Ctrl.$inject = []; 25 | 26 | angular.module('myApp.controllers') 27 | .controller('state1Ctrl', state1Ctrl); 28 | 29 | myApp.config(['$locationProvider', '$stateProvider', '$urlRouterProvider', 30 | 31 | function ($locationProvider, $stateProvider, $urlRouterProvider) { 32 | 33 | $locationProvider.html5Mode(false); 34 | 35 | $urlRouterProvider.when('/', '/state1') 36 | .otherwise("/state1"); 37 | 38 | $stateProvider.state('app', { 39 | abstract: true, 40 | url: '/', 41 | views: { 42 | 'main': { 43 | template: '
/div>' 44 | } 45 | } 46 | }) 47 | .state('app.state1', { 48 | url: 'state1', 49 | templateUrl: 'state1.html', 50 | controller: 'state1Ctrl', 51 | controllerAs: 'vm', 52 | reloadOnSearch: false 53 | }) 54 | }]); 55 | 56 | myApp.run(['$log', function ($log) { 57 | $log.log("Start."); 58 | }]); 59 | })() -------------------------------------------------------------------------------- /demo/customselect/style.css: -------------------------------------------------------------------------------- 1 | customselect > .btn-group:not(.single) { 2 | min-width: 150px; 3 | } 4 | 5 | customselect > .btn-group.single { 6 | min-width: 75px; 7 | } 8 | 9 | customselect .btn { 10 | width: 100%; 11 | background-color: #FFF; 12 | } 13 | 14 | customselect.btn.has-error { 15 | border: 1px solid #a94442 !important; 16 | color: #db524b; 17 | } 18 | 19 | .custom-select-popup { 20 | max-height: 400px; 21 | min-width: 350px; 22 | overflow-y: auto; 23 | overflow-x: hidden; 24 | } 25 | 26 | .custom-select-popup > li > .form-group > input { 27 | max-width: none; 28 | width: 100%; 29 | } 30 | 31 | .custom-select-popup > li > .form-group > ul { 32 | max-width: 330px; 33 | } 34 | 35 | .custom-select-popup .filter { 36 | width: 100%; 37 | } 38 | 39 | .custom-select-popup .filter > input { 40 | width: 99%; 41 | max-width: none; 42 | } 43 | 44 | .custom-select-popup .filter .glyphicon { 45 | cursor: pointer; 46 | pointer-events: all; 47 | } 48 | 49 | .custom-select-popup { 50 | box-sizing: border-box; 51 | padding: 2px; 52 | } 53 | 54 | customselect > .btn-group > button { 55 | padding-right: 20px; 56 | } 57 | 58 | customselect > .btn-group > button > .caret { 59 | right: 5px; 60 | top: 45%; 61 | position: absolute; 62 | } 63 | 64 | customselect > .btn-group:not(.dropup) > button > .caret { 65 | border-left: 4px solid transparent; 66 | border-right: 4px solid transparent; 67 | border-top: 4px solid black; 68 | } 69 | 70 | .custom-select-popup > li:not(.filter-container) { 71 | padding-right: 10px; 72 | } 73 | 74 | .custom-select-popup > li > a { 75 | padding: 3px 10px; 76 | cursor: pointer; 77 | } 78 | .custom-select-popup > li > a i { 79 | margin-right: 4px; 80 | } 81 | 82 | 83 | .glyphicon-none:before { 84 | content: "\e013"; 85 | color: transparent !important; 86 | } -------------------------------------------------------------------------------- /demo/dateBeforeAfter/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Date Before and After Demo 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 | 37 | 38 | 144 | 145 | 146 | 147 | -------------------------------------------------------------------------------- /demo/dateBeforeAfter/script.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | angular.module('myApp.controllers', []); 3 | 4 | var myApp = angular.module('myApp', [ 5 | 'myApp.controllers', 6 | 'long2know', 7 | 'ngSanitize', 8 | 'ui.bootstrap', 9 | 'ui.router', 10 | 'ui']); 11 | 12 | var state1Ctrl = function ($filter) { 13 | var vm = this; 14 | vm.minDate = new Date(); 15 | vm.maxDate = new Date(); 16 | vm.minDate = vm.minDate.setDate(vm.minDate.getDate() - 30); 17 | vm.maxDate = vm.maxDate.setDate(vm.maxDate.getDate() + 30); 18 | vm.dateFormat = 'MM/dd/yyyy'; 19 | vm.dateOptions = { 20 | 'year-format': "'yyyy'", 21 | 'starting-day': 1 22 | }; 23 | 24 | vm.disabled = function (date, mode) { 25 | return (mode === 'day' && false); // (date.getDay() === 0 || date.getDay() === 6)); 26 | }; 27 | 28 | vm.dateChanged = function () { 29 | vm.filteredDate1 = { date: vm.date1, filtered: $filter('date')(vm.date1, "MM/dd/yyyy") }; 30 | vm.filteredDate2 = { date: vm.date2, filtered: $filter('date')(vm.date2, "shortDate") }; 31 | vm.filteredDate3 = { date: vm.date3, filtered: $filter('date')(vm.date3, "MM/dd/yyyy") }; 32 | vm.filteredDate4 = { date: vm.date4, filtered: $filter('date')(vm.date4, "shortDate") }; 33 | vm.filteredDate5 = { date: vm.date5, filtered: $filter('date')(vm.date5, "shortDate") }; 34 | vm.filteredDate6 = { date: vm.date6, filtered: $filter('date')(vm.date6, "shortDate") }; 35 | vm.filteredDate7 = { date: vm.date7, filtered: $filter('date')(vm.date7, "shortDate") }; 36 | vm.filteredDate8 = { date: vm.date8, filtered: $filter('date')(vm.date8, "shortDate") }; 37 | }; 38 | }; 39 | 40 | state1Ctrl.$inject = ['$filter']; 41 | angular.module('myApp.controllers') 42 | .controller('state1Ctrl', state1Ctrl); 43 | 44 | myApp.config(['$locationProvider', '$stateProvider', '$urlRouterProvider', 45 | 46 | function ($locationProvider, $stateProvider, $urlRouterProvider) { 47 | 48 | $locationProvider.html5Mode(false); 49 | 50 | $urlRouterProvider.when('/', '/state1') 51 | .otherwise("/state1"); 52 | 53 | $stateProvider.state('app', { 54 | abstract: true, 55 | url: '/', 56 | views: { 57 | 'main': { 58 | template: '
/div>' 59 | } 60 | } 61 | }) 62 | .state('app.state1', { 63 | url: 'state1', 64 | templateUrl: 'state1.html', 65 | controller: 'state1Ctrl', 66 | controllerAs: 'vm', 67 | reloadOnSearch: false 68 | }) 69 | }]); 70 | 71 | myApp.run(['$log', function ($log) { 72 | $log.log("Start."); 73 | }]); 74 | })() -------------------------------------------------------------------------------- /demo/dateBeforeAfter/style.css: -------------------------------------------------------------------------------- 1 | small { 2 | font-size: 0.625em; 3 | font-style: italic; 4 | color: #a94442; 5 | display: block; 6 | float:right; 7 | } 8 | 9 | input { 10 | display:block !important; 11 | } 12 | 13 | label { 14 | display:block; 15 | } 16 | 17 | .container { 18 | width: auto !important; 19 | } 20 | 21 | .form-inline .form-group { 22 | display:inline-block; 23 | width: auto; 24 | } 25 | 26 | input { 27 | width: 250px !important; 28 | } -------------------------------------------------------------------------------- /demo/isState/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Model Property Change Watch Directive 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 |

List One - Directive Driven

25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 38 | 41 | 42 |
IdName
36 | 37 | 39 | 40 |
43 | 44 |
45 |

List Two - Animate Class Driven

46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 59 | 62 | 63 |
IdName
57 | 58 | 60 | 61 |
64 |
65 | 66 | -------------------------------------------------------------------------------- /demo/isState/script.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | angular.module('myApp.controllers', []); 3 | angular.module('myApp.services', ['ngResource', 'ngAnimate']); 4 | 5 | var myApp = angular.module('myApp', [ 6 | 'myApp.controllers', 7 | 'myApp.services', 8 | 'long2know', 9 | 'ngSanitize', 10 | 'ui.bootstrap', 11 | 'ui.router', 12 | 'ui']); 13 | 14 | var myController = function ($scope, $timeout, $animate, $log) { 15 | var vm = this, 16 | initItems = function () { 17 | vm.items = []; 18 | vm.items2 = []; 19 | for (var i = 1; i < 6; i++) { 20 | vm.items.push({ id: 'list1_' + i.toString(), name: "Item1 " + i.toString() }); 21 | vm.items2.push({ id: 'list2_' + i.toString(), name: "Item2 " + i.toString() }); 22 | } 23 | }, 24 | init = function () { 25 | vm.timeout = 3000; 26 | vm.className = 'is-state'; 27 | $timeout(function () { setTimeout(initItems(), 2000) }, 0); 28 | }; 29 | 30 | vm.addItem = function () { 31 | vm.items.push({ name: "Item " + vm.items.length.toString() }); 32 | }; 33 | 34 | vm.itemListClick = function (item) { 35 | $timeout(function () { item.isSelected = false; }, vm.timeout); 36 | }; 37 | 38 | init(); 39 | }; 40 | 41 | myController.$inject = ['$scope', '$timeout', '$animate', '$log']; 42 | angular.module('myApp.controllers') 43 | .controller('myCtrl', myController); 44 | 45 | myApp.run(['$log', function ($log) { $log.log("Start."); }]); 46 | })() -------------------------------------------------------------------------------- /demo/isState/style.css: -------------------------------------------------------------------------------- 1 | .is-state, 2 | .is-state-add.is-state-add-active { 3 | color: #FFFFFF; 4 | background-color: #a94442 !important; 5 | } 6 | 7 | .is-state a, .is-state-add.is-state-add-active a { 8 | color: #FFFFFF !important; 9 | } 10 | 11 | .is-state-remove.is-state-remove-active { 12 | background-color: #FFFFFF !important; 13 | } 14 | 15 | .is-state-add, .is-state-remove { 16 | -webkit-transition: all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s; 17 | -moz-transition: all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s; 18 | -o-transition: all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s; 19 | transition: all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s; 20 | } -------------------------------------------------------------------------------- /demo/multiselect/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Multiselect Demo 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 |
26 | 35 | 125 | 126 | -------------------------------------------------------------------------------- /demo/multiselect/script.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | angular.module('myApp.controllers', []); 3 | 4 | var myApp = angular.module('myApp', [ 5 | 'myApp.controllers', 6 | 'long2know', 7 | 'ngSanitize', 8 | 'ui.bootstrap', 9 | 'ui.router', 10 | 'ui']); 11 | 12 | var state1Ctrl = function () { 13 | var vm = this, 14 | getRandomInt = function(min, max) { 15 | return Math.floor(Math.random() * (max - min + 1) + min); 16 | }; 17 | 18 | vm.options1 = []; 19 | for (var i = 0; i < 10; i++) { 20 | vm.options1.push({ key: i + 1, value: 'Prop' + (i + 1).toString() }); 21 | } 22 | 23 | vm.options2 = []; 24 | for (var i = 0; i < 100; i++) { 25 | vm.options2.push({ key: i + 1, value: 'Prop' + (i + 1).toString() }); 26 | } 27 | 28 | vm.option6 = 3; 29 | vm.option7 = [4, 11, 23]; 30 | 31 | vm.clear = function() { 32 | vm.option1 = []; 33 | vm.option2 = []; 34 | vm.option3 = []; 35 | vm.option4 = []; 36 | vm.option5 = []; 37 | vm.option6 = []; 38 | vm.option7 = []; 39 | }; 40 | 41 | vm.randomSelect = function() { 42 | vm.clear(); 43 | var arrSelected = [ vm.option1, vm.option2, vm.option3, vm.option4, vm.option5, vm.option6, vm.option7]; 44 | var arrOptions = [ vm.options1, vm.options2, vm.options2, vm.options1, vm.options1, vm.options1, vm.options2 ]; 45 | var arrIsSingle = [ false, false, false, true, false, false, false ]; 46 | var arrIsSimple = [ true, true, false, false, true, true, true ]; 47 | 48 | for (var i = 0; i < arrSelected.length; i++) { 49 | var selected = arrSelected[i]; 50 | var options = arrOptions[i]; 51 | var isSingle = arrIsSingle[i]; 52 | var isSimple = arrIsSimple[i]; 53 | var min = 0; 54 | var max = options.length - 1; 55 | if (isSingle) { 56 | var randIndex = getRandomInt(min, max); 57 | if (isSimple) { 58 | selected.push(options[randIndex].key); 59 | } else { 60 | selected.push(options[randIndex]); 61 | } 62 | } 63 | else 64 | { 65 | var toSelectIndexes = []; 66 | var numItems = getRandomInt(0, options.length) + 1; 67 | for (var j = 0; j < getRandomInt(1, numItems); j++) 68 | { 69 | var randIndex = getRandomInt(min, max); 70 | var arrIndex = toSelectIndexes.indexOf(randIndex); 71 | if (arrIndex == -1) { 72 | toSelectIndexes.push(randIndex); 73 | if (isSimple) { 74 | selected.push(options[randIndex].key); 75 | } else { 76 | selected.push(options[randIndex]); 77 | } 78 | } 79 | } 80 | } 81 | } 82 | } 83 | }; 84 | 85 | state1Ctrl.$inject = []; 86 | 87 | angular.module('myApp.controllers') 88 | .controller('state1Ctrl', state1Ctrl); 89 | 90 | myApp.config(['$locationProvider', '$stateProvider', '$urlRouterProvider', 91 | 92 | function ($locationProvider, $stateProvider, $urlRouterProvider) { 93 | 94 | $locationProvider.html5Mode(false); 95 | 96 | $urlRouterProvider.when('/', '/state1') 97 | .otherwise("/state1"); 98 | 99 | $stateProvider.state('app', { 100 | abstract: true, 101 | url: '/', 102 | views: { 103 | 'main': { 104 | template: '
/div>' 105 | } 106 | } 107 | }) 108 | .state('app.state1', { 109 | url: 'state1', 110 | templateUrl: 'state1.html', 111 | controller: 'state1Ctrl', 112 | controllerAs: 'vm', 113 | reloadOnSearch: false 114 | }) 115 | }]); 116 | 117 | myApp.run(['$log', function ($log) { 118 | $log.log("Start."); 119 | }]); 120 | })() -------------------------------------------------------------------------------- /demo/multiselect/style.css: -------------------------------------------------------------------------------- 1 | multiselect { 2 | display: block; 3 | } 4 | 5 | multiselect > .btn-group { 6 | min-width: 180px; 7 | } 8 | 9 | multiselect .btn { 10 | width: 100%; 11 | background-color: #FFF; 12 | } 13 | 14 | multiselect .btn.has-error { 15 | border: 1px solid #a94442 !important; 16 | color: #db524b; 17 | } 18 | 19 | multiselect .dropdown-menu { 20 | max-height: 300px; 21 | min-width: 200px; 22 | overflow-y: auto; 23 | } 24 | 25 | multiselect .dropdown-menu .filter > input { 26 | width: 99%; 27 | } 28 | 29 | multiselect .dropdown-menu .filter .glyphicon { 30 | cursor: pointer; 31 | pointer-events: all; 32 | } 33 | 34 | multiselect .dropdown-menu { 35 | width: 100%; 36 | box-sizing: border-box; 37 | padding: 2px; 38 | } 39 | 40 | multiselect > .btn-group > button { 41 | padding-right: 20px; 42 | } 43 | 44 | multiselect > .btn-group > button > .caret { 45 | right: 5px; 46 | top: 45%; 47 | position: absolute; 48 | } 49 | 50 | multiselect > .btn-group:not(.dropup) > button > .caret { 51 | border-left: 4px solid transparent; 52 | border-right: 4px solid transparent; 53 | border-top: 4px solid black; 54 | } 55 | 56 | multiselect .dropdown-menu > li > a { 57 | padding: 3px 10px; 58 | cursor: pointer; 59 | } 60 | 61 | multiselect .dropdown-menu > li > a i { 62 | margin-right: 4px; 63 | } 64 | 65 | .glyphicon-none:before { 66 | content: "\e013"; 67 | color: transparent !important; 68 | } -------------------------------------------------------------------------------- /demo/onRepeatFinish/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | OnNgRepeat Demo w/ Custom Animation 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 | -------------------------------------------------------------------------------- /demo/onRepeatFinish/script.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | angular.module('myApp.controllers', []); 3 | angular.module('myApp.services', ['ngResource', 'ngAnimate']); 4 | 5 | var myApp = angular.module('myApp', [ 6 | 'myApp.controllers', 7 | 'myApp.services', 8 | 'long2know', 9 | 'ngSanitize', 10 | 'ui.bootstrap', 11 | 'ui.router', 12 | 'ui']); 13 | 14 | var myController = function ($scope, $timeout, $animate, $log) { 15 | var vm = this, 16 | initItems = function () { 17 | vm.items = []; 18 | for (var i = 0; i < 10; i++) { 19 | vm.items.push({ name: "Item " + i.toString() }); 20 | } 21 | }, 22 | init = function () { 23 | $timeout(function () { setTimeout(initItems(), 2000) }, 0); 24 | }; 25 | 26 | vm.addItem = function () { 27 | vm.items.push({ name: "Item " + vm.items.length.toString() }); 28 | }; 29 | 30 | $animate.enabled(false); 31 | 32 | var listener = $scope.$on('ngRepeatFinished', function () { 33 | $log.log("Message received - turning animations on"); 34 | $animate.enabled(true); 35 | 36 | $log.log("Unregistering listener"); 37 | listener(); 38 | listener = null; 39 | }); 40 | 41 | init(); 42 | }; 43 | 44 | var newItem = function ($timeout, $log) { 45 | var animation = { 46 | enter: function (element, done) { 47 | element.addClass('new-item'); 48 | $timeout(function () { 49 | element.removeClass('new-item'); 50 | done(); 51 | }, 2000); 52 | } 53 | }; 54 | 55 | return animation; 56 | }; 57 | 58 | newItem.$inject = ['$timeout', '$log']; 59 | angular.module('myApp.services') 60 | .animation('.new-list-item', newItem); 61 | 62 | myController.$inject = ['$scope', '$timeout', '$animate', '$log']; 63 | angular.module('myApp.controllers') 64 | .controller('myCtrl', myController); 65 | 66 | myApp.run(['$log', function ($log) { $log.log("Start."); }]); 67 | })() -------------------------------------------------------------------------------- /demo/onRepeatFinish/style.css: -------------------------------------------------------------------------------- 1 | .itemlist { 2 | list-style: none; 3 | margin: 0; 4 | padding: 0; 5 | background-color: white; 6 | max-height:90%; 7 | width: 100%; 8 | } 9 | 10 | .itemlist > li { 11 | line-height: 1.4em; 12 | background-color: white; 13 | color: black; 14 | cursor: pointer; 15 | padding: 6px 0 6px 5px; 16 | } 17 | 18 | .new-item { 19 | background-color: red !important; 20 | overflow: none; 21 | } -------------------------------------------------------------------------------- /demo/triStateCheckbox/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Tri-State Checkbox Demo 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 40 | 43 | 44 |
29 | 30 | IdName
38 | 39 | 41 | 42 |
45 | 46 |
47 | 48 | -------------------------------------------------------------------------------- /demo/triStateCheckbox/script.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | angular.module('myApp.controllers', []); 3 | 4 | var myApp = angular.module('myApp', [ 5 | 'myApp.controllers', 6 | 'long2know', 7 | 'ngSanitize', 8 | 'ui.bootstrap', 9 | 'ui.router', 10 | 'ui']); 11 | 12 | var myController = function ($scope, $timeout, $animate, $log) { 13 | var vm = this, 14 | initItems = function () { 15 | vm.items = []; 16 | for (var i = 0; i < 5; i++) { 17 | vm.items.push({ id: vm.items.length, name: "Item " + i.toString() }); 18 | } 19 | }, 20 | init = function () { 21 | initItems(); 22 | }; 23 | 24 | vm.addItem = function () { 25 | vm.items.push({ id: vm.items.length, name: "Item " + vm.items.length.toString() }); 26 | vm.selectionChanged(vm.items[vm.items.length - 1]); 27 | }; 28 | 29 | vm.selectionChanged = function (item) { 30 | $scope.$broadcast("childClick", item); 31 | }; 32 | 33 | init(); 34 | }; 35 | 36 | myController.$inject = ['$scope', '$timeout', '$animate', '$log']; 37 | angular.module('myApp.controllers') 38 | .controller('myCtrl', myController); 39 | 40 | myApp.config(['$modalProvider', '$locationProvider', 41 | function ($modalProvider, $locationProvider) { 42 | $modalProvider.options = { dialogFade: true, backdrop: 'static', keyboard: false }; 43 | $locationProvider.html5Mode(false); 44 | }]); 45 | 46 | myApp.run(['$log', function ($log) { $log.log("Start."); }]); 47 | })() -------------------------------------------------------------------------------- /demo/triStateCheckbox/style.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/long2know/angular-directives-general/da310867ec6e2c098f9763e1d679f7ef503a50a3/demo/triStateCheckbox/style.css -------------------------------------------------------------------------------- /src/clipboardService.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | var long2know; 3 | try { 4 | long2know = angular.module("long2know") 5 | } catch (err) { 6 | long2know = null; 7 | } 8 | 9 | if (!long2know) { 10 | angular.module('long2know.services', ['ngResource', 'ngAnimate']); 11 | angular.module('long2know.controllers', []); 12 | angular.module('long2know.directives', []); 13 | angular.module('long2know.constants', []); 14 | angular.module('long2know', 15 | [ 16 | 'long2know.services', 17 | 'long2know.controllers', 18 | 'long2know.directives', 19 | 'long2know.constants' 20 | ]); 21 | } 22 | 23 | var clipboardService = function ($q, $sce, $window, dialogService, toastService) { 24 | var 25 | body = angular.element($window.document.body), 26 | textarea = angular.element('