kms 1.0.1 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/kms/application.js +1 -0
- data/app/assets/javascripts/kms/application/controllers/assets_controller.coffee.erb +14 -4
- data/app/assets/javascripts/kms/application/controllers/pages_controller.coffee.erb +12 -2
- data/app/assets/javascripts/kms/application/controllers/snippets_controller.coffee.erb +13 -3
- data/app/assets/javascripts/kms/application/controllers/templates_controller.coffee.erb +13 -3
- data/app/assets/javascripts/kms/application/controllers/users_controller.coffee +5 -5
- data/app/assets/javascripts/kms/application/module.coffee +6 -2
- data/app/assets/javascripts/kms/application/routes.coffee.erb +10 -0
- data/app/assets/javascripts/templates/assets/edit.html.slim +2 -1
- data/app/assets/javascripts/templates/assets/form.html.slim +1 -1
- data/app/assets/javascripts/templates/pages/edit.html.slim +1 -0
- data/app/assets/javascripts/templates/shared/hotkey_notification.html.slim +6 -0
- data/app/assets/javascripts/templates/snippets/edit.html.slim +1 -0
- data/app/assets/javascripts/templates/templates/edit.html.slim +1 -0
- data/app/assets/javascripts/templates/users/edit.html.slim +5 -0
- data/app/assets/javascripts/templates/users/form.html.slim +3 -2
- data/app/assets/javascripts/templates/users/index.html.slim +2 -1
- data/app/assets/stylesheets/kms/custom.css.scss +10 -0
- data/app/controllers/kms/assets_controller.rb +6 -3
- data/app/controllers/kms/users_controller.rb +14 -0
- data/app/services/kms/resource_service.rb +3 -1
- data/app/views/layouts/kms/kms.html.erb +1 -1
- data/config/initializers/devise.rb +9 -0
- data/config/locales/en.yml +12 -0
- data/config/locales/ru.yml +12 -0
- data/config/routes.rb +1 -1
- data/lib/kms/engine.rb +1 -1
- data/lib/kms/version.rb +1 -1
- data/spec/controllers/kms/assets_controller_spec.rb +28 -10
- data/spec/controllers/kms/users_controller_spec.rb +23 -0
- data/spec/internal/config/routes.rb +1 -1
- data/spec/internal/log/test.log +0 -105823
- data/vendor/assets/bower.json +5 -4
- data/vendor/assets/bower_components/angular-cookies/angular-cookies.js +22 -18
- data/vendor/assets/bower_components/angular-cookies/angular-cookies.min.js +4 -4
- data/vendor/assets/bower_components/angular-cookies/angular-cookies.min.js.map +2 -2
- data/vendor/assets/bower_components/angular-cookies/bower.json +2 -2
- data/vendor/assets/bower_components/angular-cookies/package.json +1 -1
- data/vendor/assets/bower_components/angular-hotkeys/Gruntfile.js +118 -0
- data/vendor/assets/bower_components/angular-hotkeys/LICENSE +20 -0
- data/vendor/assets/bower_components/angular-hotkeys/README.md +248 -0
- data/vendor/assets/bower_components/angular-hotkeys/bower.json +19 -0
- data/vendor/assets/bower_components/angular-hotkeys/build/hotkeys.css +110 -0
- data/vendor/assets/bower_components/angular-hotkeys/build/hotkeys.js +1661 -0
- data/vendor/assets/bower_components/angular-hotkeys/build/hotkeys.min.css +1 -0
- data/vendor/assets/bower_components/angular-hotkeys/build/hotkeys.min.js +7 -0
- data/vendor/assets/bower_components/angular-hotkeys/package.json +45 -0
- data/vendor/assets/bower_components/angular-hotkeys/src/hotkeys.css +104 -0
- data/vendor/assets/bower_components/angular-hotkeys/src/hotkeys.js +633 -0
- data/vendor/assets/bower_components/angular-loading-bar/CHANGELOG.md +33 -0
- data/vendor/assets/bower_components/angular-loading-bar/CONTRIBUTING.md +17 -0
- data/vendor/assets/bower_components/angular-loading-bar/Gruntfile.js +9 -1
- data/vendor/assets/bower_components/angular-loading-bar/ISSUE_TEMPLATE.md +14 -0
- data/vendor/assets/bower_components/angular-loading-bar/PULL_REQUEST_TEMPLATE.md +13 -0
- data/vendor/assets/bower_components/angular-loading-bar/README.md +30 -3
- data/vendor/assets/bower_components/angular-loading-bar/bower.json +11 -6
- data/vendor/assets/bower_components/angular-loading-bar/build/loading-bar.css +5 -5
- data/vendor/assets/bower_components/angular-loading-bar/build/loading-bar.js +39 -12
- data/vendor/assets/bower_components/angular-loading-bar/build/loading-bar.min.css +1 -8
- data/vendor/assets/bower_components/angular-loading-bar/build/loading-bar.min.js +3 -3
- data/vendor/assets/bower_components/angular-loading-bar/index.js +2 -0
- data/vendor/assets/bower_components/angular-loading-bar/package.json +12 -15
- data/vendor/assets/bower_components/angular-loading-bar/src/loading-bar.css +3 -3
- data/vendor/assets/bower_components/angular-loading-bar/src/loading-bar.js +37 -10
- data/vendor/assets/bower_components/angular-sanitize/angular-sanitize.js +504 -386
- data/vendor/assets/bower_components/angular-sanitize/angular-sanitize.min.js +13 -12
- data/vendor/assets/bower_components/angular-sanitize/angular-sanitize.min.js.map +3 -3
- data/vendor/assets/bower_components/angular-sanitize/bower.json +2 -2
- data/vendor/assets/bower_components/angular-sanitize/package.json +1 -1
- data/vendor/assets/bower_components/angular-ui-router/CHANGELOG.md +1410 -0
- data/vendor/assets/bower_components/angular-ui-router/CONTRIBUTING.md +64 -16
- data/vendor/assets/bower_components/angular-ui-router/DOCS.md +48 -0
- data/vendor/assets/bower_components/angular-ui-router/ISSUE_TEMPLATE.md +53 -0
- data/vendor/assets/bower_components/angular-ui-router/LICENSE +1 -1
- data/vendor/assets/bower_components/angular-ui-router/README.md +24 -211
- data/vendor/assets/bower_components/angular-ui-router/artifacts.json +8 -0
- data/vendor/assets/bower_components/angular-ui-router/bower.json +1 -23
- data/vendor/assets/bower_components/angular-ui-router/karma.conf.js +105 -0
- data/vendor/assets/bower_components/angular-ui-router/release/angular-ui-router.js +9744 -3901
- data/vendor/assets/bower_components/angular-ui-router/release/angular-ui-router.js.map +192 -0
- data/vendor/assets/bower_components/angular-ui-router/release/angular-ui-router.min.js +9 -4
- data/vendor/assets/bower_components/angular-ui-router/release/angular-ui-router.min.js.map +1679 -0
- data/vendor/assets/bower_components/angular-ui-router/release/resolveService.js +83 -0
- data/vendor/assets/bower_components/angular-ui-router/release/resolveService.js.map +19 -0
- data/vendor/assets/bower_components/angular-ui-router/release/resolveService.min.js +8 -0
- data/vendor/assets/bower_components/angular-ui-router/release/resolveService.min.js.map +47 -0
- data/vendor/assets/bower_components/angular-ui-router/release/stateEvents.js +294 -0
- data/vendor/assets/bower_components/angular-ui-router/release/stateEvents.js.map +17 -0
- data/vendor/assets/bower_components/angular-ui-router/release/stateEvents.min.js +8 -0
- data/vendor/assets/bower_components/angular-ui-router/release/stateEvents.min.js.map +102 -0
- data/vendor/assets/bower_components/angular-ui-router/release/ui-router-angularjs.js +2014 -0
- data/vendor/assets/bower_components/angular-ui-router/release/ui-router-angularjs.js.map +70 -0
- data/vendor/assets/bower_components/angular-ui-router/release/ui-router-angularjs.min.js +9 -0
- data/vendor/assets/bower_components/angular-ui-router/release/ui-router-angularjs.min.js.map +541 -0
- data/vendor/assets/bower_components/angular-ui-router/rollup.config.js +116 -0
- data/vendor/assets/bower_components/angular-ui-router/tslint.json +60 -0
- data/vendor/assets/bower_components/angular-ui-router/yarn.lock +4146 -0
- data/vendor/assets/bower_components/angular-ui-tree/yarn.lock +4945 -0
- data/vendor/assets/bower_components/angular/angular.js +4019 -2449
- data/vendor/assets/bower_components/angular/angular.min.js +331 -319
- data/vendor/assets/bower_components/angular/angular.min.js.gzip +0 -0
- data/vendor/assets/bower_components/angular/angular.min.js.map +3 -3
- data/vendor/assets/bower_components/angular/bower.json +1 -1
- data/vendor/assets/bower_components/angular/package.json +1 -1
- data/vendor/assets/bower_components/angularjs-dropdown-multiselect/LICENSE +21 -0
- data/vendor/assets/bower_components/angularjs-dropdown-multiselect/README.md +14 -14
- data/vendor/assets/bower_components/angularjs-dropdown-multiselect/bower.json +25 -12
- data/vendor/assets/bower_components/angularjs-dropdown-multiselect/development_index.html +59 -52
- data/vendor/assets/bower_components/angularjs-dropdown-multiselect/dist/angularjs-dropdown-multiselect.min.js +1 -1
- data/vendor/assets/bower_components/angularjs-dropdown-multiselect/index.html +73 -0
- data/vendor/assets/bower_components/angularjs-dropdown-multiselect/package.json +19 -7
- data/vendor/assets/bower_components/angularjs-dropdown-multiselect/pages/javascripts/pages/home/ExampleCtrl.js +126 -3
- data/vendor/assets/bower_components/angularjs-dropdown-multiselect/pages/javascripts/pages/home/home.html +1262 -852
- data/vendor/assets/bower_components/angularjs-dropdown-multiselect/pages/stylesheets/stylesheet.css +10 -5
- data/vendor/assets/bower_components/angularjs-dropdown-multiselect/src/angularjs-dropdown-multiselect.js +612 -287
- metadata +66 -169
- data/spec/internal/config/database.yml +0 -7
- data/spec/internal/public/uploads/kms/asset/file/1/avatar.jpg +0 -0
- data/spec/internal/public/uploads/kms/asset/file/2/avatar.jpg +0 -0
- data/spec/internal/public/uploads/kms/asset/file/2/style.css +0 -1
- data/spec/internal/public/uploads/kms/asset/file/3/style.css +0 -1
- data/spec/internal/public/uploads/kms/asset/file/4/style.css +0 -1
- data/spec/internal/public/uploads/tmp/1500976987-41025-0002-0883/style.css +0 -1
- data/spec/internal/public/uploads/tmp/1500977082-41195-0002-6495/style.css +0 -1
- data/spec/internal/public/uploads/tmp/1500977109-41364-0002-4518/style.css +0 -1
- data/spec/internal/public/uploads/tmp/1500977152-41405-0002-2345/style.css +0 -1
- data/spec/internal/public/uploads/tmp/1500977327-41694-0002-5448/style.css +0 -1
- data/spec/internal/public/uploads/tmp/1500977376-41732-0002-7916/style.css +0 -1
- data/spec/internal/public/uploads/tmp/1500977392-41759-0002-7593/style.css +0 -1
- data/spec/internal/public/uploads/tmp/1500977410-42259-0002-7527/style.css +0 -1
- data/spec/internal/public/uploads/tmp/1500977429-42306-0002-5937/style.css +0 -1
- data/spec/internal/public/uploads/tmp/1500977437-42324-0002-5880/style.css +0 -1
- data/spec/internal/public/uploads/tmp/1500983228-53594-0002-4559/style.css +0 -1
- data/spec/internal/public/uploads/tmp/1500983284-53632-0002-6590/style.css +0 -1
- data/spec/internal/public/uploads/tmp/1500983360-53784-0002-7289/style.css +0 -1
- data/spec/internal/public/uploads/tmp/1500983469-54321-0002-0386/avatar.jpg +0 -0
- data/spec/internal/public/uploads/tmp/1500983469-54321-0004-5691/style.css +0 -1
- data/spec/internal/public/uploads/tmp/1500983511-54352-0002-5720/avatar.jpg +0 -0
- data/spec/internal/public/uploads/tmp/1500983511-54352-0004-1399/style.css +0 -1
- data/spec/internal/public/uploads/tmp/1500983610-54507-0002-4280/avatar.jpg +0 -0
- data/spec/internal/public/uploads/tmp/1500983610-54507-0004-9758/style.css +0 -1
- data/spec/internal/public/uploads/tmp/1500984466-57012-0002-4146/avatar.jpg +0 -0
- data/spec/internal/public/uploads/tmp/1500984466-57012-0004-5895/style.css +0 -1
- data/spec/internal/public/uploads/tmp/1500984509-57158-0002-9657/avatar.jpg +0 -0
- data/spec/internal/public/uploads/tmp/1500984509-57158-0004-5003/style.css +0 -1
- data/spec/internal/public/uploads/tmp/1500984616-57697-0002-7201/avatar.jpg +0 -0
- data/spec/internal/public/uploads/tmp/1500984616-57697-0004-6255/style.css +0 -1
- data/spec/internal/public/uploads/tmp/1500985257-58947-0002-3629/avatar.jpg +0 -0
- data/spec/internal/public/uploads/tmp/1500985257-58947-0004-5338/style.css +0 -1
- data/spec/internal/public/uploads/tmp/1500985407-58947-0006-5929/style.css +0 -1
- data/spec/internal/public/uploads/tmp/1500985473-59264-0002-0397/avatar.jpg +0 -0
- data/spec/internal/public/uploads/tmp/1500985473-59264-0004-6493/style.css +0 -1
- data/spec/internal/public/uploads/tmp/1500985475-59264-0007-8674/style.css +0 -1
- data/spec/internal/public/uploads/tmp/1500985538-59468-0002-9206/avatar.jpg +0 -0
- data/spec/internal/public/uploads/tmp/1500985538-59468-0004-2586/style.css +0 -1
- data/spec/internal/public/uploads/tmp/1500985538-59468-0007-6200/style.css +0 -1
- data/spec/internal/public/uploads/tmp/1500988358-65877-0002-4528/avatar.jpg +0 -0
- data/spec/internal/public/uploads/tmp/1500988358-65877-0004-5904/style.css +0 -1
- data/spec/internal/public/uploads/tmp/1500988358-65877-0007-7320/style.css +0 -1
- data/spec/internal/public/uploads/tmp/1500988407-65916-0002-3138/avatar.jpg +0 -0
- data/spec/internal/public/uploads/tmp/1500988407-65916-0004-5400/style.css +0 -1
- data/spec/internal/public/uploads/tmp/1500988407-65916-0007-1655/style.css +0 -1
- data/spec/internal/public/uploads/tmp/1500988421-65950-0002-9415/avatar.jpg +0 -0
- data/spec/internal/public/uploads/tmp/1500988421-65950-0004-7130/style.css +0 -1
- data/spec/internal/public/uploads/tmp/1500988421-65950-0007-9886/style.css +0 -1
- data/spec/internal/public/uploads/tmp/1500988435-65981-0002-3228/avatar.jpg +0 -0
- data/spec/internal/public/uploads/tmp/1500988435-65981-0004-3682/style.css +0 -1
- data/spec/internal/public/uploads/tmp/1500988435-65981-0007-1582/style.css +0 -1
- data/spec/internal/public/uploads/tmp/1500988475-66122-0002-9516/avatar.jpg +0 -0
- data/spec/internal/public/uploads/tmp/1500988475-66122-0004-5634/style.css +0 -1
- data/spec/internal/public/uploads/tmp/1500988530-66122-0007-2272/style.css +0 -1
- data/spec/internal/public/uploads/tmp/1500988554-66315-0002-6262/avatar.jpg +0 -0
- data/spec/internal/public/uploads/tmp/1500988554-66315-0004-6099/style.css +0 -1
- data/spec/internal/public/uploads/tmp/1500988554-66315-0007-1632/style.css +0 -1
- data/spec/internal/public/uploads/tmp/1500991751-73722-0002-9937/avatar.jpg +0 -0
- data/spec/internal/public/uploads/tmp/1500991751-73722-0004-8034/style.css +0 -1
- data/spec/internal/public/uploads/tmp/1500991751-73722-0007-7763/style.css +0 -1
- data/spec/internal/public/uploads/tmp/1501233238-34385-0002-3210/avatar.jpg +0 -0
- data/spec/internal/public/uploads/tmp/1501233238-34385-0004-5881/style.css +0 -1
- data/spec/internal/public/uploads/tmp/1501233238-34385-0007-6280/style.css +0 -1
- data/spec/internal/tmp/cache/assets/test/sprockets/v3.0/1XyAFYlYI0pK7WAgjR4PgXV6BgU6huJSviWmHetdCRs.cache +0 -1
- data/vendor/assets/bower_components/angular-ui-router/api/angular-ui-router.d.ts +0 -126
- data/vendor/assets/bower_components/angular-ui-router/src/common.js +0 -292
- data/vendor/assets/bower_components/angular-ui-router/src/resolve.js +0 -252
- data/vendor/assets/bower_components/angular-ui-router/src/state.js +0 -1373
- data/vendor/assets/bower_components/angular-ui-router/src/stateDirectives.js +0 -268
- data/vendor/assets/bower_components/angular-ui-router/src/stateFilters.js +0 -39
- data/vendor/assets/bower_components/angular-ui-router/src/templateFactory.js +0 -110
- data/vendor/assets/bower_components/angular-ui-router/src/urlMatcherFactory.js +0 -1036
- data/vendor/assets/bower_components/angular-ui-router/src/urlRouter.js +0 -413
- data/vendor/assets/bower_components/angular-ui-router/src/view.js +0 -71
- data/vendor/assets/bower_components/angular-ui-router/src/viewDirective.js +0 -302
- data/vendor/assets/bower_components/angular-ui-router/src/viewScroll.js +0 -52
- data/vendor/assets/bower_components/angularjs-dropdown-multiselect/pages/index.html +0 -67
- data/vendor/assets/bower_components/bootstrap/Gemfile.lock +0 -43
@@ -1,302 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* @ngdoc directive
|
3
|
-
* @name ui.router.state.directive:ui-view
|
4
|
-
*
|
5
|
-
* @requires ui.router.state.$state
|
6
|
-
* @requires $compile
|
7
|
-
* @requires $controller
|
8
|
-
* @requires $injector
|
9
|
-
* @requires ui.router.state.$uiViewScroll
|
10
|
-
* @requires $document
|
11
|
-
*
|
12
|
-
* @restrict ECA
|
13
|
-
*
|
14
|
-
* @description
|
15
|
-
* The ui-view directive tells $state where to place your templates.
|
16
|
-
*
|
17
|
-
* @param {string=} name A view name. The name should be unique amongst the other views in the
|
18
|
-
* same state. You can have views of the same name that live in different states.
|
19
|
-
*
|
20
|
-
* @param {string=} autoscroll It allows you to set the scroll behavior of the browser window
|
21
|
-
* when a view is populated. By default, $anchorScroll is overridden by ui-router's custom scroll
|
22
|
-
* service, {@link ui.router.state.$uiViewScroll}. This custom service let's you
|
23
|
-
* scroll ui-view elements into view when they are populated during a state activation.
|
24
|
-
*
|
25
|
-
* *Note: To revert back to old [`$anchorScroll`](http://docs.angularjs.org/api/ng.$anchorScroll)
|
26
|
-
* functionality, call `$uiViewScrollProvider.useAnchorScroll()`.*
|
27
|
-
*
|
28
|
-
* @param {string=} onload Expression to evaluate whenever the view updates.
|
29
|
-
*
|
30
|
-
* @example
|
31
|
-
* A view can be unnamed or named.
|
32
|
-
* <pre>
|
33
|
-
* <!-- Unnamed -->
|
34
|
-
* <div ui-view></div>
|
35
|
-
*
|
36
|
-
* <!-- Named -->
|
37
|
-
* <div ui-view="viewName"></div>
|
38
|
-
* </pre>
|
39
|
-
*
|
40
|
-
* You can only have one unnamed view within any template (or root html). If you are only using a
|
41
|
-
* single view and it is unnamed then you can populate it like so:
|
42
|
-
* <pre>
|
43
|
-
* <div ui-view></div>
|
44
|
-
* $stateProvider.state("home", {
|
45
|
-
* template: "<h1>HELLO!</h1>"
|
46
|
-
* })
|
47
|
-
* </pre>
|
48
|
-
*
|
49
|
-
* The above is a convenient shortcut equivalent to specifying your view explicitly with the {@link ui.router.state.$stateProvider#views `views`}
|
50
|
-
* config property, by name, in this case an empty name:
|
51
|
-
* <pre>
|
52
|
-
* $stateProvider.state("home", {
|
53
|
-
* views: {
|
54
|
-
* "": {
|
55
|
-
* template: "<h1>HELLO!</h1>"
|
56
|
-
* }
|
57
|
-
* }
|
58
|
-
* })
|
59
|
-
* </pre>
|
60
|
-
*
|
61
|
-
* But typically you'll only use the views property if you name your view or have more than one view
|
62
|
-
* in the same template. There's not really a compelling reason to name a view if its the only one,
|
63
|
-
* but you could if you wanted, like so:
|
64
|
-
* <pre>
|
65
|
-
* <div ui-view="main"></div>
|
66
|
-
* </pre>
|
67
|
-
* <pre>
|
68
|
-
* $stateProvider.state("home", {
|
69
|
-
* views: {
|
70
|
-
* "main": {
|
71
|
-
* template: "<h1>HELLO!</h1>"
|
72
|
-
* }
|
73
|
-
* }
|
74
|
-
* })
|
75
|
-
* </pre>
|
76
|
-
*
|
77
|
-
* Really though, you'll use views to set up multiple views:
|
78
|
-
* <pre>
|
79
|
-
* <div ui-view></div>
|
80
|
-
* <div ui-view="chart"></div>
|
81
|
-
* <div ui-view="data"></div>
|
82
|
-
* </pre>
|
83
|
-
*
|
84
|
-
* <pre>
|
85
|
-
* $stateProvider.state("home", {
|
86
|
-
* views: {
|
87
|
-
* "": {
|
88
|
-
* template: "<h1>HELLO!</h1>"
|
89
|
-
* },
|
90
|
-
* "chart": {
|
91
|
-
* template: "<chart_thing/>"
|
92
|
-
* },
|
93
|
-
* "data": {
|
94
|
-
* template: "<data_thing/>"
|
95
|
-
* }
|
96
|
-
* }
|
97
|
-
* })
|
98
|
-
* </pre>
|
99
|
-
*
|
100
|
-
* Examples for `autoscroll`:
|
101
|
-
*
|
102
|
-
* <pre>
|
103
|
-
* <!-- If autoscroll present with no expression,
|
104
|
-
* then scroll ui-view into view -->
|
105
|
-
* <ui-view autoscroll/>
|
106
|
-
*
|
107
|
-
* <!-- If autoscroll present with valid expression,
|
108
|
-
* then scroll ui-view into view if expression evaluates to true -->
|
109
|
-
* <ui-view autoscroll='true'/>
|
110
|
-
* <ui-view autoscroll='false'/>
|
111
|
-
* <ui-view autoscroll='scopeVariable'/>
|
112
|
-
* </pre>
|
113
|
-
*/
|
114
|
-
$ViewDirective.$inject = ['$state', '$injector', '$uiViewScroll', '$interpolate'];
|
115
|
-
function $ViewDirective( $state, $injector, $uiViewScroll, $interpolate) {
|
116
|
-
|
117
|
-
function getService() {
|
118
|
-
return ($injector.has) ? function(service) {
|
119
|
-
return $injector.has(service) ? $injector.get(service) : null;
|
120
|
-
} : function(service) {
|
121
|
-
try {
|
122
|
-
return $injector.get(service);
|
123
|
-
} catch (e) {
|
124
|
-
return null;
|
125
|
-
}
|
126
|
-
};
|
127
|
-
}
|
128
|
-
|
129
|
-
var service = getService(),
|
130
|
-
$animator = service('$animator'),
|
131
|
-
$animate = service('$animate');
|
132
|
-
|
133
|
-
// Returns a set of DOM manipulation functions based on which Angular version
|
134
|
-
// it should use
|
135
|
-
function getRenderer(attrs, scope) {
|
136
|
-
var statics = function() {
|
137
|
-
return {
|
138
|
-
enter: function (element, target, cb) { target.after(element); cb(); },
|
139
|
-
leave: function (element, cb) { element.remove(); cb(); }
|
140
|
-
};
|
141
|
-
};
|
142
|
-
|
143
|
-
if ($animate) {
|
144
|
-
return {
|
145
|
-
enter: function(element, target, cb) {
|
146
|
-
var promise = $animate.enter(element, null, target, cb);
|
147
|
-
if (promise && promise.then) promise.then(cb);
|
148
|
-
},
|
149
|
-
leave: function(element, cb) {
|
150
|
-
var promise = $animate.leave(element, cb);
|
151
|
-
if (promise && promise.then) promise.then(cb);
|
152
|
-
}
|
153
|
-
};
|
154
|
-
}
|
155
|
-
|
156
|
-
if ($animator) {
|
157
|
-
var animate = $animator && $animator(scope, attrs);
|
158
|
-
|
159
|
-
return {
|
160
|
-
enter: function(element, target, cb) {animate.enter(element, null, target); cb(); },
|
161
|
-
leave: function(element, cb) { animate.leave(element); cb(); }
|
162
|
-
};
|
163
|
-
}
|
164
|
-
|
165
|
-
return statics();
|
166
|
-
}
|
167
|
-
|
168
|
-
var directive = {
|
169
|
-
restrict: 'ECA',
|
170
|
-
terminal: true,
|
171
|
-
priority: 400,
|
172
|
-
transclude: 'element',
|
173
|
-
compile: function (tElement, tAttrs, $transclude) {
|
174
|
-
return function (scope, $element, attrs) {
|
175
|
-
var previousEl, currentEl, currentScope, latestLocals,
|
176
|
-
onloadExp = attrs.onload || '',
|
177
|
-
autoScrollExp = attrs.autoscroll,
|
178
|
-
renderer = getRenderer(attrs, scope);
|
179
|
-
|
180
|
-
scope.$on('$stateChangeSuccess', function() {
|
181
|
-
updateView(false);
|
182
|
-
});
|
183
|
-
scope.$on('$viewContentLoading', function() {
|
184
|
-
updateView(false);
|
185
|
-
});
|
186
|
-
|
187
|
-
updateView(true);
|
188
|
-
|
189
|
-
function cleanupLastView() {
|
190
|
-
if (previousEl) {
|
191
|
-
previousEl.remove();
|
192
|
-
previousEl = null;
|
193
|
-
}
|
194
|
-
|
195
|
-
if (currentScope) {
|
196
|
-
currentScope.$destroy();
|
197
|
-
currentScope = null;
|
198
|
-
}
|
199
|
-
|
200
|
-
if (currentEl) {
|
201
|
-
renderer.leave(currentEl, function() {
|
202
|
-
previousEl = null;
|
203
|
-
});
|
204
|
-
|
205
|
-
previousEl = currentEl;
|
206
|
-
currentEl = null;
|
207
|
-
}
|
208
|
-
}
|
209
|
-
|
210
|
-
function updateView(firstTime) {
|
211
|
-
var newScope,
|
212
|
-
name = getUiViewName(scope, attrs, $element, $interpolate),
|
213
|
-
previousLocals = name && $state.$current && $state.$current.locals[name];
|
214
|
-
|
215
|
-
if (!firstTime && previousLocals === latestLocals) return; // nothing to do
|
216
|
-
newScope = scope.$new();
|
217
|
-
latestLocals = $state.$current.locals[name];
|
218
|
-
|
219
|
-
var clone = $transclude(newScope, function(clone) {
|
220
|
-
renderer.enter(clone, $element, function onUiViewEnter() {
|
221
|
-
if(currentScope) {
|
222
|
-
currentScope.$emit('$viewContentAnimationEnded');
|
223
|
-
}
|
224
|
-
|
225
|
-
if (angular.isDefined(autoScrollExp) && !autoScrollExp || scope.$eval(autoScrollExp)) {
|
226
|
-
$uiViewScroll(clone);
|
227
|
-
}
|
228
|
-
});
|
229
|
-
cleanupLastView();
|
230
|
-
});
|
231
|
-
|
232
|
-
currentEl = clone;
|
233
|
-
currentScope = newScope;
|
234
|
-
/**
|
235
|
-
* @ngdoc event
|
236
|
-
* @name ui.router.state.directive:ui-view#$viewContentLoaded
|
237
|
-
* @eventOf ui.router.state.directive:ui-view
|
238
|
-
* @eventType emits on ui-view directive scope
|
239
|
-
* @description *
|
240
|
-
* Fired once the view is **loaded**, *after* the DOM is rendered.
|
241
|
-
*
|
242
|
-
* @param {Object} event Event object.
|
243
|
-
*/
|
244
|
-
currentScope.$emit('$viewContentLoaded');
|
245
|
-
currentScope.$eval(onloadExp);
|
246
|
-
}
|
247
|
-
};
|
248
|
-
}
|
249
|
-
};
|
250
|
-
|
251
|
-
return directive;
|
252
|
-
}
|
253
|
-
|
254
|
-
$ViewDirectiveFill.$inject = ['$compile', '$controller', '$state', '$interpolate'];
|
255
|
-
function $ViewDirectiveFill ( $compile, $controller, $state, $interpolate) {
|
256
|
-
return {
|
257
|
-
restrict: 'ECA',
|
258
|
-
priority: -400,
|
259
|
-
compile: function (tElement) {
|
260
|
-
var initial = tElement.html();
|
261
|
-
return function (scope, $element, attrs) {
|
262
|
-
var current = $state.$current,
|
263
|
-
name = getUiViewName(scope, attrs, $element, $interpolate),
|
264
|
-
locals = current && current.locals[name];
|
265
|
-
|
266
|
-
if (! locals) {
|
267
|
-
return;
|
268
|
-
}
|
269
|
-
|
270
|
-
$element.data('$uiView', { name: name, state: locals.$$state });
|
271
|
-
$element.html(locals.$template ? locals.$template : initial);
|
272
|
-
|
273
|
-
var link = $compile($element.contents());
|
274
|
-
|
275
|
-
if (locals.$$controller) {
|
276
|
-
locals.$scope = scope;
|
277
|
-
var controller = $controller(locals.$$controller, locals);
|
278
|
-
if (locals.$$controllerAs) {
|
279
|
-
scope[locals.$$controllerAs] = controller;
|
280
|
-
}
|
281
|
-
$element.data('$ngControllerController', controller);
|
282
|
-
$element.children().data('$ngControllerController', controller);
|
283
|
-
}
|
284
|
-
|
285
|
-
link(scope);
|
286
|
-
};
|
287
|
-
}
|
288
|
-
};
|
289
|
-
}
|
290
|
-
|
291
|
-
/**
|
292
|
-
* Shared ui-view code for both directives:
|
293
|
-
* Given scope, element, and its attributes, return the view's name
|
294
|
-
*/
|
295
|
-
function getUiViewName(scope, attrs, element, $interpolate) {
|
296
|
-
var name = $interpolate(attrs.uiView || attrs.name || '')(scope);
|
297
|
-
var inherited = element.inheritedData('$uiView');
|
298
|
-
return name.indexOf('@') >= 0 ? name : (name + '@' + (inherited ? inherited.state.name : ''));
|
299
|
-
}
|
300
|
-
|
301
|
-
angular.module('ui.router.state').directive('uiView', $ViewDirective);
|
302
|
-
angular.module('ui.router.state').directive('uiView', $ViewDirectiveFill);
|
@@ -1,52 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* @ngdoc object
|
3
|
-
* @name ui.router.state.$uiViewScrollProvider
|
4
|
-
*
|
5
|
-
* @description
|
6
|
-
* Provider that returns the {@link ui.router.state.$uiViewScroll} service function.
|
7
|
-
*/
|
8
|
-
function $ViewScrollProvider() {
|
9
|
-
|
10
|
-
var useAnchorScroll = false;
|
11
|
-
|
12
|
-
/**
|
13
|
-
* @ngdoc function
|
14
|
-
* @name ui.router.state.$uiViewScrollProvider#useAnchorScroll
|
15
|
-
* @methodOf ui.router.state.$uiViewScrollProvider
|
16
|
-
*
|
17
|
-
* @description
|
18
|
-
* Reverts back to using the core [`$anchorScroll`](http://docs.angularjs.org/api/ng.$anchorScroll) service for
|
19
|
-
* scrolling based on the url anchor.
|
20
|
-
*/
|
21
|
-
this.useAnchorScroll = function () {
|
22
|
-
useAnchorScroll = true;
|
23
|
-
};
|
24
|
-
|
25
|
-
/**
|
26
|
-
* @ngdoc object
|
27
|
-
* @name ui.router.state.$uiViewScroll
|
28
|
-
*
|
29
|
-
* @requires $anchorScroll
|
30
|
-
* @requires $timeout
|
31
|
-
*
|
32
|
-
* @description
|
33
|
-
* When called with a jqLite element, it scrolls the element into view (after a
|
34
|
-
* `$timeout` so the DOM has time to refresh).
|
35
|
-
*
|
36
|
-
* If you prefer to rely on `$anchorScroll` to scroll the view to the anchor,
|
37
|
-
* this can be enabled by calling {@link ui.router.state.$uiViewScrollProvider#methods_useAnchorScroll `$uiViewScrollProvider.useAnchorScroll()`}.
|
38
|
-
*/
|
39
|
-
this.$get = ['$anchorScroll', '$timeout', function ($anchorScroll, $timeout) {
|
40
|
-
if (useAnchorScroll) {
|
41
|
-
return $anchorScroll;
|
42
|
-
}
|
43
|
-
|
44
|
-
return function ($element) {
|
45
|
-
$timeout(function () {
|
46
|
-
$element[0].scrollIntoView();
|
47
|
-
}, 0, false);
|
48
|
-
};
|
49
|
-
}];
|
50
|
-
}
|
51
|
-
|
52
|
-
angular.module('ui.router.state').provider('$uiViewScroll', $ViewScrollProvider);
|
@@ -1,67 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html ng-app="exampleApp">
|
3
|
-
|
4
|
-
<head>
|
5
|
-
<meta charset='utf-8'>
|
6
|
-
<meta http-equiv="X-UA-Compatible" content="chrome=1">
|
7
|
-
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
8
|
-
<link rel="stylesheet" type="text/css" href="stylesheets/stylesheet.css" media="screen" />
|
9
|
-
<link rel="stylesheet" type="text/css" href="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" />
|
10
|
-
<link href='https://fonts.googleapis.com/css?family=Architects+Daughter' rel='stylesheet' type='text/css'>
|
11
|
-
|
12
|
-
<script>
|
13
|
-
var staticPath = '/angularjs-dropdown-multiselect/';
|
14
|
-
</script>
|
15
|
-
<style>
|
16
|
-
.nav, .pagination, .carousel, .panel-title a { cursor: pointer; }
|
17
|
-
</style>
|
18
|
-
|
19
|
-
|
20
|
-
<!--[if lt IE 9]>
|
21
|
-
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
22
|
-
<![endif]-->
|
23
|
-
|
24
|
-
<title>AngularJS Dropdown Multiselect by dotansimha</title>
|
25
|
-
</head>
|
26
|
-
|
27
|
-
<body>
|
28
|
-
<header>
|
29
|
-
<div class="inner">
|
30
|
-
<a href="https://github.com/dotansimha/angularjs-dropdown-multiselect" class="btn btn-info pull-right gh-button-link">
|
31
|
-
<strong>View project on
|
32
|
-
<br />GitHub</strong>
|
33
|
-
</a>
|
34
|
-
<h1>AngularJS Dropdown Multiselect</h1>
|
35
|
-
<h2>based on Bootstrap's dropdown</h2>
|
36
|
-
</div>
|
37
|
-
</header>
|
38
|
-
<div class="container">
|
39
|
-
<div class="row">
|
40
|
-
<div class="col-md-12">
|
41
|
-
<div ng-view></div>
|
42
|
-
</div>
|
43
|
-
</div>
|
44
|
-
</div>
|
45
|
-
<p>This page was generated by <a href="https://pages.github.com">GitHub Pages</a> using the Architect theme by <a href="https://twitter.com/jasonlong">Jason Long</a>.
|
46
|
-
|
47
|
-
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/angular.js/1.2.16/angular.js"></script>
|
48
|
-
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/angular.js/1.2.16/angular-route.js"></script>
|
49
|
-
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/angular.js/1.2.16/angular-sanitize.js"></script>
|
50
|
-
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/angular.js/1.2.16/angular-touch.min.js"></script>
|
51
|
-
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/angular.js/1.2.16/angular-animate.js"></script>
|
52
|
-
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/lodash.js/2.4.1/lodash.min.js"></script>
|
53
|
-
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.0/highlight.min.js"></script>
|
54
|
-
<script type="text/javascript" src="https://rawgit.com/pc035860/angular-highlightjs/master/angular-highlightjs.js"></script>
|
55
|
-
<script type="text/javascript"
|
56
|
-
src="http://cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/0.10.0/ui-bootstrap-tpls.js"></script>
|
57
|
-
|
58
|
-
<script type="text/javascript"
|
59
|
-
src="https://rawgit.com/dotansimha/angularjs-dropdown-multiselect/master/src/angularjs-dropdown-multiselect.js"></script>
|
60
|
-
<!--<script type="text/javascript" src="angularjs-dropdown-multiselect.min.js"></script>-->
|
61
|
-
|
62
|
-
<script type="text/javascript" src="javascripts/app.js"></script>
|
63
|
-
<script type="text/javascript" src="javascripts/pages/home/ExampleCtrl.js"></script>
|
64
|
-
|
65
|
-
</body>
|
66
|
-
|
67
|
-
</html>
|
@@ -1,43 +0,0 @@
|
|
1
|
-
GEM
|
2
|
-
remote: https://rubygems.org/
|
3
|
-
specs:
|
4
|
-
addressable (2.4.0)
|
5
|
-
colorator (0.1)
|
6
|
-
ffi (1.9.14-x64-mingw32)
|
7
|
-
jekyll (3.1.6)
|
8
|
-
colorator (~> 0.1)
|
9
|
-
jekyll-sass-converter (~> 1.0)
|
10
|
-
jekyll-watch (~> 1.1)
|
11
|
-
kramdown (~> 1.3)
|
12
|
-
liquid (~> 3.0)
|
13
|
-
mercenary (~> 0.3.3)
|
14
|
-
rouge (~> 1.7)
|
15
|
-
safe_yaml (~> 1.0)
|
16
|
-
jekyll-sass-converter (1.4.0)
|
17
|
-
sass (~> 3.4)
|
18
|
-
jekyll-sitemap (0.11.0)
|
19
|
-
addressable (~> 2.4.0)
|
20
|
-
jekyll-watch (1.4.0)
|
21
|
-
listen (~> 3.0, < 3.1)
|
22
|
-
kramdown (1.11.1)
|
23
|
-
liquid (3.0.6)
|
24
|
-
listen (3.0.8)
|
25
|
-
rb-fsevent (~> 0.9, >= 0.9.4)
|
26
|
-
rb-inotify (~> 0.9, >= 0.9.7)
|
27
|
-
mercenary (0.3.6)
|
28
|
-
rb-fsevent (0.9.7)
|
29
|
-
rb-inotify (0.9.7)
|
30
|
-
ffi (>= 0.5.0)
|
31
|
-
rouge (1.11.1)
|
32
|
-
safe_yaml (1.0.4)
|
33
|
-
sass (3.4.22)
|
34
|
-
|
35
|
-
PLATFORMS
|
36
|
-
x64-mingw32
|
37
|
-
|
38
|
-
DEPENDENCIES
|
39
|
-
jekyll (~> 3.1.2)
|
40
|
-
jekyll-sitemap (~> 0.11.0)
|
41
|
-
|
42
|
-
BUNDLED WITH
|
43
|
-
1.12.5
|