kms 1.0.1 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (196) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/kms/application.js +1 -0
  3. data/app/assets/javascripts/kms/application/controllers/assets_controller.coffee.erb +14 -4
  4. data/app/assets/javascripts/kms/application/controllers/pages_controller.coffee.erb +12 -2
  5. data/app/assets/javascripts/kms/application/controllers/snippets_controller.coffee.erb +13 -3
  6. data/app/assets/javascripts/kms/application/controllers/templates_controller.coffee.erb +13 -3
  7. data/app/assets/javascripts/kms/application/controllers/users_controller.coffee +5 -5
  8. data/app/assets/javascripts/kms/application/module.coffee +6 -2
  9. data/app/assets/javascripts/kms/application/routes.coffee.erb +10 -0
  10. data/app/assets/javascripts/templates/assets/edit.html.slim +2 -1
  11. data/app/assets/javascripts/templates/assets/form.html.slim +1 -1
  12. data/app/assets/javascripts/templates/pages/edit.html.slim +1 -0
  13. data/app/assets/javascripts/templates/shared/hotkey_notification.html.slim +6 -0
  14. data/app/assets/javascripts/templates/snippets/edit.html.slim +1 -0
  15. data/app/assets/javascripts/templates/templates/edit.html.slim +1 -0
  16. data/app/assets/javascripts/templates/users/edit.html.slim +5 -0
  17. data/app/assets/javascripts/templates/users/form.html.slim +3 -2
  18. data/app/assets/javascripts/templates/users/index.html.slim +2 -1
  19. data/app/assets/stylesheets/kms/custom.css.scss +10 -0
  20. data/app/controllers/kms/assets_controller.rb +6 -3
  21. data/app/controllers/kms/users_controller.rb +14 -0
  22. data/app/services/kms/resource_service.rb +3 -1
  23. data/app/views/layouts/kms/kms.html.erb +1 -1
  24. data/config/initializers/devise.rb +9 -0
  25. data/config/locales/en.yml +12 -0
  26. data/config/locales/ru.yml +12 -0
  27. data/config/routes.rb +1 -1
  28. data/lib/kms/engine.rb +1 -1
  29. data/lib/kms/version.rb +1 -1
  30. data/spec/controllers/kms/assets_controller_spec.rb +28 -10
  31. data/spec/controllers/kms/users_controller_spec.rb +23 -0
  32. data/spec/internal/config/routes.rb +1 -1
  33. data/spec/internal/log/test.log +0 -105823
  34. data/vendor/assets/bower.json +5 -4
  35. data/vendor/assets/bower_components/angular-cookies/angular-cookies.js +22 -18
  36. data/vendor/assets/bower_components/angular-cookies/angular-cookies.min.js +4 -4
  37. data/vendor/assets/bower_components/angular-cookies/angular-cookies.min.js.map +2 -2
  38. data/vendor/assets/bower_components/angular-cookies/bower.json +2 -2
  39. data/vendor/assets/bower_components/angular-cookies/package.json +1 -1
  40. data/vendor/assets/bower_components/angular-hotkeys/Gruntfile.js +118 -0
  41. data/vendor/assets/bower_components/angular-hotkeys/LICENSE +20 -0
  42. data/vendor/assets/bower_components/angular-hotkeys/README.md +248 -0
  43. data/vendor/assets/bower_components/angular-hotkeys/bower.json +19 -0
  44. data/vendor/assets/bower_components/angular-hotkeys/build/hotkeys.css +110 -0
  45. data/vendor/assets/bower_components/angular-hotkeys/build/hotkeys.js +1661 -0
  46. data/vendor/assets/bower_components/angular-hotkeys/build/hotkeys.min.css +1 -0
  47. data/vendor/assets/bower_components/angular-hotkeys/build/hotkeys.min.js +7 -0
  48. data/vendor/assets/bower_components/angular-hotkeys/package.json +45 -0
  49. data/vendor/assets/bower_components/angular-hotkeys/src/hotkeys.css +104 -0
  50. data/vendor/assets/bower_components/angular-hotkeys/src/hotkeys.js +633 -0
  51. data/vendor/assets/bower_components/angular-loading-bar/CHANGELOG.md +33 -0
  52. data/vendor/assets/bower_components/angular-loading-bar/CONTRIBUTING.md +17 -0
  53. data/vendor/assets/bower_components/angular-loading-bar/Gruntfile.js +9 -1
  54. data/vendor/assets/bower_components/angular-loading-bar/ISSUE_TEMPLATE.md +14 -0
  55. data/vendor/assets/bower_components/angular-loading-bar/PULL_REQUEST_TEMPLATE.md +13 -0
  56. data/vendor/assets/bower_components/angular-loading-bar/README.md +30 -3
  57. data/vendor/assets/bower_components/angular-loading-bar/bower.json +11 -6
  58. data/vendor/assets/bower_components/angular-loading-bar/build/loading-bar.css +5 -5
  59. data/vendor/assets/bower_components/angular-loading-bar/build/loading-bar.js +39 -12
  60. data/vendor/assets/bower_components/angular-loading-bar/build/loading-bar.min.css +1 -8
  61. data/vendor/assets/bower_components/angular-loading-bar/build/loading-bar.min.js +3 -3
  62. data/vendor/assets/bower_components/angular-loading-bar/index.js +2 -0
  63. data/vendor/assets/bower_components/angular-loading-bar/package.json +12 -15
  64. data/vendor/assets/bower_components/angular-loading-bar/src/loading-bar.css +3 -3
  65. data/vendor/assets/bower_components/angular-loading-bar/src/loading-bar.js +37 -10
  66. data/vendor/assets/bower_components/angular-sanitize/angular-sanitize.js +504 -386
  67. data/vendor/assets/bower_components/angular-sanitize/angular-sanitize.min.js +13 -12
  68. data/vendor/assets/bower_components/angular-sanitize/angular-sanitize.min.js.map +3 -3
  69. data/vendor/assets/bower_components/angular-sanitize/bower.json +2 -2
  70. data/vendor/assets/bower_components/angular-sanitize/package.json +1 -1
  71. data/vendor/assets/bower_components/angular-ui-router/CHANGELOG.md +1410 -0
  72. data/vendor/assets/bower_components/angular-ui-router/CONTRIBUTING.md +64 -16
  73. data/vendor/assets/bower_components/angular-ui-router/DOCS.md +48 -0
  74. data/vendor/assets/bower_components/angular-ui-router/ISSUE_TEMPLATE.md +53 -0
  75. data/vendor/assets/bower_components/angular-ui-router/LICENSE +1 -1
  76. data/vendor/assets/bower_components/angular-ui-router/README.md +24 -211
  77. data/vendor/assets/bower_components/angular-ui-router/artifacts.json +8 -0
  78. data/vendor/assets/bower_components/angular-ui-router/bower.json +1 -23
  79. data/vendor/assets/bower_components/angular-ui-router/karma.conf.js +105 -0
  80. data/vendor/assets/bower_components/angular-ui-router/release/angular-ui-router.js +9744 -3901
  81. data/vendor/assets/bower_components/angular-ui-router/release/angular-ui-router.js.map +192 -0
  82. data/vendor/assets/bower_components/angular-ui-router/release/angular-ui-router.min.js +9 -4
  83. data/vendor/assets/bower_components/angular-ui-router/release/angular-ui-router.min.js.map +1679 -0
  84. data/vendor/assets/bower_components/angular-ui-router/release/resolveService.js +83 -0
  85. data/vendor/assets/bower_components/angular-ui-router/release/resolveService.js.map +19 -0
  86. data/vendor/assets/bower_components/angular-ui-router/release/resolveService.min.js +8 -0
  87. data/vendor/assets/bower_components/angular-ui-router/release/resolveService.min.js.map +47 -0
  88. data/vendor/assets/bower_components/angular-ui-router/release/stateEvents.js +294 -0
  89. data/vendor/assets/bower_components/angular-ui-router/release/stateEvents.js.map +17 -0
  90. data/vendor/assets/bower_components/angular-ui-router/release/stateEvents.min.js +8 -0
  91. data/vendor/assets/bower_components/angular-ui-router/release/stateEvents.min.js.map +102 -0
  92. data/vendor/assets/bower_components/angular-ui-router/release/ui-router-angularjs.js +2014 -0
  93. data/vendor/assets/bower_components/angular-ui-router/release/ui-router-angularjs.js.map +70 -0
  94. data/vendor/assets/bower_components/angular-ui-router/release/ui-router-angularjs.min.js +9 -0
  95. data/vendor/assets/bower_components/angular-ui-router/release/ui-router-angularjs.min.js.map +541 -0
  96. data/vendor/assets/bower_components/angular-ui-router/rollup.config.js +116 -0
  97. data/vendor/assets/bower_components/angular-ui-router/tslint.json +60 -0
  98. data/vendor/assets/bower_components/angular-ui-router/yarn.lock +4146 -0
  99. data/vendor/assets/bower_components/angular-ui-tree/yarn.lock +4945 -0
  100. data/vendor/assets/bower_components/angular/angular.js +4019 -2449
  101. data/vendor/assets/bower_components/angular/angular.min.js +331 -319
  102. data/vendor/assets/bower_components/angular/angular.min.js.gzip +0 -0
  103. data/vendor/assets/bower_components/angular/angular.min.js.map +3 -3
  104. data/vendor/assets/bower_components/angular/bower.json +1 -1
  105. data/vendor/assets/bower_components/angular/package.json +1 -1
  106. data/vendor/assets/bower_components/angularjs-dropdown-multiselect/LICENSE +21 -0
  107. data/vendor/assets/bower_components/angularjs-dropdown-multiselect/README.md +14 -14
  108. data/vendor/assets/bower_components/angularjs-dropdown-multiselect/bower.json +25 -12
  109. data/vendor/assets/bower_components/angularjs-dropdown-multiselect/development_index.html +59 -52
  110. data/vendor/assets/bower_components/angularjs-dropdown-multiselect/dist/angularjs-dropdown-multiselect.min.js +1 -1
  111. data/vendor/assets/bower_components/angularjs-dropdown-multiselect/index.html +73 -0
  112. data/vendor/assets/bower_components/angularjs-dropdown-multiselect/package.json +19 -7
  113. data/vendor/assets/bower_components/angularjs-dropdown-multiselect/pages/javascripts/pages/home/ExampleCtrl.js +126 -3
  114. data/vendor/assets/bower_components/angularjs-dropdown-multiselect/pages/javascripts/pages/home/home.html +1262 -852
  115. data/vendor/assets/bower_components/angularjs-dropdown-multiselect/pages/stylesheets/stylesheet.css +10 -5
  116. data/vendor/assets/bower_components/angularjs-dropdown-multiselect/src/angularjs-dropdown-multiselect.js +612 -287
  117. metadata +66 -169
  118. data/spec/internal/config/database.yml +0 -7
  119. data/spec/internal/public/uploads/kms/asset/file/1/avatar.jpg +0 -0
  120. data/spec/internal/public/uploads/kms/asset/file/2/avatar.jpg +0 -0
  121. data/spec/internal/public/uploads/kms/asset/file/2/style.css +0 -1
  122. data/spec/internal/public/uploads/kms/asset/file/3/style.css +0 -1
  123. data/spec/internal/public/uploads/kms/asset/file/4/style.css +0 -1
  124. data/spec/internal/public/uploads/tmp/1500976987-41025-0002-0883/style.css +0 -1
  125. data/spec/internal/public/uploads/tmp/1500977082-41195-0002-6495/style.css +0 -1
  126. data/spec/internal/public/uploads/tmp/1500977109-41364-0002-4518/style.css +0 -1
  127. data/spec/internal/public/uploads/tmp/1500977152-41405-0002-2345/style.css +0 -1
  128. data/spec/internal/public/uploads/tmp/1500977327-41694-0002-5448/style.css +0 -1
  129. data/spec/internal/public/uploads/tmp/1500977376-41732-0002-7916/style.css +0 -1
  130. data/spec/internal/public/uploads/tmp/1500977392-41759-0002-7593/style.css +0 -1
  131. data/spec/internal/public/uploads/tmp/1500977410-42259-0002-7527/style.css +0 -1
  132. data/spec/internal/public/uploads/tmp/1500977429-42306-0002-5937/style.css +0 -1
  133. data/spec/internal/public/uploads/tmp/1500977437-42324-0002-5880/style.css +0 -1
  134. data/spec/internal/public/uploads/tmp/1500983228-53594-0002-4559/style.css +0 -1
  135. data/spec/internal/public/uploads/tmp/1500983284-53632-0002-6590/style.css +0 -1
  136. data/spec/internal/public/uploads/tmp/1500983360-53784-0002-7289/style.css +0 -1
  137. data/spec/internal/public/uploads/tmp/1500983469-54321-0002-0386/avatar.jpg +0 -0
  138. data/spec/internal/public/uploads/tmp/1500983469-54321-0004-5691/style.css +0 -1
  139. data/spec/internal/public/uploads/tmp/1500983511-54352-0002-5720/avatar.jpg +0 -0
  140. data/spec/internal/public/uploads/tmp/1500983511-54352-0004-1399/style.css +0 -1
  141. data/spec/internal/public/uploads/tmp/1500983610-54507-0002-4280/avatar.jpg +0 -0
  142. data/spec/internal/public/uploads/tmp/1500983610-54507-0004-9758/style.css +0 -1
  143. data/spec/internal/public/uploads/tmp/1500984466-57012-0002-4146/avatar.jpg +0 -0
  144. data/spec/internal/public/uploads/tmp/1500984466-57012-0004-5895/style.css +0 -1
  145. data/spec/internal/public/uploads/tmp/1500984509-57158-0002-9657/avatar.jpg +0 -0
  146. data/spec/internal/public/uploads/tmp/1500984509-57158-0004-5003/style.css +0 -1
  147. data/spec/internal/public/uploads/tmp/1500984616-57697-0002-7201/avatar.jpg +0 -0
  148. data/spec/internal/public/uploads/tmp/1500984616-57697-0004-6255/style.css +0 -1
  149. data/spec/internal/public/uploads/tmp/1500985257-58947-0002-3629/avatar.jpg +0 -0
  150. data/spec/internal/public/uploads/tmp/1500985257-58947-0004-5338/style.css +0 -1
  151. data/spec/internal/public/uploads/tmp/1500985407-58947-0006-5929/style.css +0 -1
  152. data/spec/internal/public/uploads/tmp/1500985473-59264-0002-0397/avatar.jpg +0 -0
  153. data/spec/internal/public/uploads/tmp/1500985473-59264-0004-6493/style.css +0 -1
  154. data/spec/internal/public/uploads/tmp/1500985475-59264-0007-8674/style.css +0 -1
  155. data/spec/internal/public/uploads/tmp/1500985538-59468-0002-9206/avatar.jpg +0 -0
  156. data/spec/internal/public/uploads/tmp/1500985538-59468-0004-2586/style.css +0 -1
  157. data/spec/internal/public/uploads/tmp/1500985538-59468-0007-6200/style.css +0 -1
  158. data/spec/internal/public/uploads/tmp/1500988358-65877-0002-4528/avatar.jpg +0 -0
  159. data/spec/internal/public/uploads/tmp/1500988358-65877-0004-5904/style.css +0 -1
  160. data/spec/internal/public/uploads/tmp/1500988358-65877-0007-7320/style.css +0 -1
  161. data/spec/internal/public/uploads/tmp/1500988407-65916-0002-3138/avatar.jpg +0 -0
  162. data/spec/internal/public/uploads/tmp/1500988407-65916-0004-5400/style.css +0 -1
  163. data/spec/internal/public/uploads/tmp/1500988407-65916-0007-1655/style.css +0 -1
  164. data/spec/internal/public/uploads/tmp/1500988421-65950-0002-9415/avatar.jpg +0 -0
  165. data/spec/internal/public/uploads/tmp/1500988421-65950-0004-7130/style.css +0 -1
  166. data/spec/internal/public/uploads/tmp/1500988421-65950-0007-9886/style.css +0 -1
  167. data/spec/internal/public/uploads/tmp/1500988435-65981-0002-3228/avatar.jpg +0 -0
  168. data/spec/internal/public/uploads/tmp/1500988435-65981-0004-3682/style.css +0 -1
  169. data/spec/internal/public/uploads/tmp/1500988435-65981-0007-1582/style.css +0 -1
  170. data/spec/internal/public/uploads/tmp/1500988475-66122-0002-9516/avatar.jpg +0 -0
  171. data/spec/internal/public/uploads/tmp/1500988475-66122-0004-5634/style.css +0 -1
  172. data/spec/internal/public/uploads/tmp/1500988530-66122-0007-2272/style.css +0 -1
  173. data/spec/internal/public/uploads/tmp/1500988554-66315-0002-6262/avatar.jpg +0 -0
  174. data/spec/internal/public/uploads/tmp/1500988554-66315-0004-6099/style.css +0 -1
  175. data/spec/internal/public/uploads/tmp/1500988554-66315-0007-1632/style.css +0 -1
  176. data/spec/internal/public/uploads/tmp/1500991751-73722-0002-9937/avatar.jpg +0 -0
  177. data/spec/internal/public/uploads/tmp/1500991751-73722-0004-8034/style.css +0 -1
  178. data/spec/internal/public/uploads/tmp/1500991751-73722-0007-7763/style.css +0 -1
  179. data/spec/internal/public/uploads/tmp/1501233238-34385-0002-3210/avatar.jpg +0 -0
  180. data/spec/internal/public/uploads/tmp/1501233238-34385-0004-5881/style.css +0 -1
  181. data/spec/internal/public/uploads/tmp/1501233238-34385-0007-6280/style.css +0 -1
  182. data/spec/internal/tmp/cache/assets/test/sprockets/v3.0/1XyAFYlYI0pK7WAgjR4PgXV6BgU6huJSviWmHetdCRs.cache +0 -1
  183. data/vendor/assets/bower_components/angular-ui-router/api/angular-ui-router.d.ts +0 -126
  184. data/vendor/assets/bower_components/angular-ui-router/src/common.js +0 -292
  185. data/vendor/assets/bower_components/angular-ui-router/src/resolve.js +0 -252
  186. data/vendor/assets/bower_components/angular-ui-router/src/state.js +0 -1373
  187. data/vendor/assets/bower_components/angular-ui-router/src/stateDirectives.js +0 -268
  188. data/vendor/assets/bower_components/angular-ui-router/src/stateFilters.js +0 -39
  189. data/vendor/assets/bower_components/angular-ui-router/src/templateFactory.js +0 -110
  190. data/vendor/assets/bower_components/angular-ui-router/src/urlMatcherFactory.js +0 -1036
  191. data/vendor/assets/bower_components/angular-ui-router/src/urlRouter.js +0 -413
  192. data/vendor/assets/bower_components/angular-ui-router/src/view.js +0 -71
  193. data/vendor/assets/bower_components/angular-ui-router/src/viewDirective.js +0 -302
  194. data/vendor/assets/bower_components/angular-ui-router/src/viewScroll.js +0 -52
  195. data/vendor/assets/bower_components/angularjs-dropdown-multiselect/pages/index.html +0 -67
  196. data/vendor/assets/bower_components/bootstrap/Gemfile.lock +0 -43
@@ -22,12 +22,12 @@ Issues only! |
22
22
  -------------|
23
23
  Please keep in mind that the issue tracker is for *issues*. Please do *not* post an issue if you need help or support. Instead, see one of the above-mentioned forums or [IRC](irc://irc.freenode.net/#angularjs). |
24
24
 
25
- ####Purple Labels
26
- A purple label means that **you** need to take some further action.
27
- - ![Not Actionable - Need Info](http://angular-ui.github.io/ui-router/images/notactionable.png): Your issue is not specific enough, or there is no clear action that we can take. Please clarify and refine your issue.
28
- - ![Plunkr Please](http://angular-ui.github.io/ui-router/images/plunkrplease.png): Please [create a plunkr](http://bit.ly/UIR-Plunk)
29
- - ![StackOverflow](http://angular-ui.github.io/ui-router/images/stackoverflow.png): We suspect your issue is really a help request, or could be answered by the community. Please ask your question on [StackOverflow](http://stackoverflow.com/questions/ask?tags=angularjs,angular-ui-router). If you determine that is an actual issue, please explain why.
30
-
25
+ #### Purple Labels
26
+ A purple label means that **you** need to take some further action.
27
+ - ![Not Actionable - Need Info](https://angular-ui.github.io/ui-router/ngdoc_assets/incomplete.png): Your issue is not specific enough, or there is no clear action that we can take. Please clarify and refine your issue.
28
+ - ![Plunkr Please](https://angular-ui.github.io/ui-router/ngdoc_assets/example.png): Please [create a plunkr](http://bit.ly/UIR-Plunk)
29
+ - ![StackOverflow](https://angular-ui.github.io/ui-router/ngdoc_assets/so.png): We suspect your issue is really a help request, or could be answered by the community. Please ask your question on [StackOverflow](http://stackoverflow.com/questions/ask?tags=angularjs,angular-ui-router). If you determine that is an actual issue, please explain why.
30
+
31
31
  If your issue gets labeled with purple label, no further action will be taken until you respond to the label appropriately.
32
32
 
33
33
  # Contribute
@@ -49,17 +49,65 @@ If your issue gets labeled with purple label, no further action will be taken un
49
49
 
50
50
  # Developing
51
51
 
52
- UI-Router uses <code>grunt >= 0.4.x</code>. Make sure to upgrade your environment and read the
53
- [Migration Guide](http://gruntjs.com/upgrading-from-0.3-to-0.4).
52
+ UI-Router uses <code>npm</code> and <code>Rollup</code>.
53
+
54
+ ## Fetch the source code
55
+
56
+ The code for Angular UI-Router is split into two source repositories:
57
+
58
+ * [UI-Router Core](https://github.com/ui-router/core) (`@uirouter/core` on npm)
59
+ * [UI-Router for Angular 1](https://github.com/angular-ui/ui-router) (`@ui-router/angularjs` on npm)
60
+
61
+ Clone both repositories into directories next to each other.
62
+
63
+ ```
64
+ mkdir uirouter
65
+ cd uirouter
66
+ git clone https://github.com/angular-ui/ui-router.git angularjs
67
+ git clone https://github.com/ui-router/core.git core
68
+ ```
69
+
70
+ ## Install dependencies
71
+
72
+ Use `npm` to install the development dependencies for each repository.
73
+
74
+ ```
75
+ cd core
76
+ npm install
77
+ cd ../angularjs
78
+ npm install
79
+ cd ..
80
+ ```
81
+
82
+ ## Link the directories
83
+
84
+ This step is necessary if you need to modify any code in `@uirouter/core`.
85
+ Using `npm`, link `@uirouter/core` into `@uirouter/angularjs`
86
+
87
+ ```
88
+ cd core
89
+ npm link
90
+ cd ../angularjs
91
+ npm link '@uirouter/core'
92
+ ```
93
+
94
+ After executing these steps, `@uirouter/angularjs` will be depend on your local copy of `@uirouter/core` instead of the version listed in `package.json`.
95
+
96
+ ## Develop
97
+
98
+ These scripts may be run in the `angularjs` directory:
54
99
 
55
- Dependencies for building from source and running tests:
100
+ * `npm run build`: Compiles TypeScript source
101
+ * `npm run package`: Compiles TypeScript source and creates the Rollup bundles.
102
+ * `npm test`: Runs the test suite (against Angular 1.2 through 1.5).
103
+ * `npm run watch`: Continuously compiles the source and runs the test suite (when either source or tests change).
56
104
 
57
- * [grunt-cli](https://github.com/gruntjs/grunt-cli) - run: `$ npm install -g grunt-cli`
58
- * Then, install the development dependencies by running `$ npm install` from the project directory
105
+ Scripts of the same name (in the `core` directory) can be used.
59
106
 
60
- There are a number of targets in the gruntfile that are used to generating different builds:
107
+ * `npm run build`: Compiles `@uirouter/core` TypeScript source
108
+ * `npm test`: Runs the `@uirouter/core` test suite
109
+ * `npm run watch`: Continuously compiles the source and runs the `@uirouter/core` test suite (when core source or tests change).
61
110
 
62
- * `grunt`: Perform a normal build, runs jshint and karma tests
63
- * `grunt build`: Perform a normal build
64
- * `grunt dist`: Perform a clean build and generate documentation
65
- * `grunt dev`: Run dev server (sample app) and watch for changes, builds and runs karma tests on changes.
111
+ If you've followed the [linking instructions](#link-the-directories), it's useful to run both
112
+ `npm run watch` tasks (each task from `@uirouter/core` *and* `@uirouter/angularjs`).
113
+ This ensures that changes to either `@uirouter/core` and `@uirouter/angularjs` compile successfully and are run against their test suites.
@@ -0,0 +1,48 @@
1
+ # [UI Router for Angular 1](https://ui-router.github.io/ng1/docs/latest)
2
+
3
+ #### The de-facto solution to flexible routing in angular 1
4
+
5
+ <div style="display: flex;">
6
+
7
+ <iframe style="display: inline-block;" src="https://ghbtns.com/github-btn.html?user=angular-ui&repo=ui-router&type=fork&count=true&size=medium" frameborder="0" scrolling="0" width="110px" height="20px"></iframe>
8
+ <iframe style="display: inline-block;" src="https://ghbtns.com/github-btn.html?user=angular-ui&repo=ui-router&type=star&count=true&size=medium" frameborder="0" scrolling="0" width="110px" height="20px"></iframe>
9
+ [![Build Status](https://travis-ci.org/angular-ui/ui-router.svg?branch=master)](https://travis-ci.org/angular-ui/ui-router)
10
+
11
+ </div>
12
+
13
+
14
+ Angular UI-Router is a client-side [Single Page Application](https://en.wikipedia.org/wiki/Single-page_application)
15
+ routing framework for [AngularJS](http://angularjs.org).
16
+
17
+ **[View on Github](http://github.com/angular-ui/ui-router) |**
18
+ **[Tutorials](https://ui-router.github.io/ng1/tutorials/)** |
19
+ **[Guides](https://ui-router.github.io/guide) |**
20
+ **[Sample App](http://ui-router.github.io/resources/sampleapp/) |**
21
+ **[Wiki](https://github.com/angular-ui/ui-router/wiki) |**
22
+ **[FAQ](https://github.com/angular-ui/ui-router/wiki/Frequently-Asked-Questions)**
23
+
24
+ #### API Documentation Organization
25
+
26
+ The documentation is arranged according to API concern, such as `url`, `resolve`, and `core`.
27
+ For a list of services and objects that can be injectable, see the [`injectables` section](./injectables.html).
28
+
29
+ By default, only the public UI-Router API is shown.
30
+ To view both public API and the internal APIs, check the "Internal UI-Router API" checkbox.
31
+
32
+ #### Typescript
33
+
34
+ UI-Router is written in Typescript.
35
+ The API documentation is generated using [TypeDoc](https://github.com/TypeStrong/typedoc).
36
+ The documentation reflects the Typescript classes, interfaces, and parameter types information embedded in the source code.
37
+
38
+ #### Contributing
39
+
40
+ Angular UI-Router depends on the framework agnostic `@uirouter/core`.
41
+ To contribute to the documentation, please submit a PR to either
42
+ [@uirouter/angularjs](http://github.com/angular-ui/ui-router)
43
+ or
44
+ [@uirouter/core](http://github.com/ui-router/core).
45
+ To find where a specific piece of documentation is written, follow the links that say:
46
+ > _Defined in ui-router/somedir/somefile.ts_
47
+
48
+
@@ -0,0 +1,53 @@
1
+ This issue tracker is for Bug Reports and Feature Requests only.
2
+ Please direct requests for help to StackOverflow. See http://bit.ly/UIR-SOF for details.
3
+
4
+ This is a:
5
+
6
+ - [ ] Bug Report
7
+ - [ ] Feature Request
8
+ - [ ] General Query
9
+
10
+ My version of UI-Router is: (version)
11
+
12
+
13
+
14
+ # Bug Report
15
+
16
+ #### Current Behavior:
17
+
18
+ (current behavior here)
19
+
20
+ #### Expected Behavior:
21
+
22
+ (expected behavior here)
23
+
24
+ #### Link to Plunker that reproduces the issue:
25
+
26
+ http://bit.ly/UIR-Plunk
27
+
28
+
29
+
30
+
31
+ # Feature Request
32
+
33
+ (feature request here)
34
+
35
+
36
+
37
+
38
+ # General Query
39
+
40
+ Please direct general implementation questions to StackOverflow:
41
+ http://stackoverflow.com/questions/ask?tags=angularjs,angular-ui-router
42
+
43
+ Please review the Sample Application which highlights common approaches:
44
+ https://github.com/ui-router/sample-app-ng1
45
+
46
+ - [ ] I have already asked my question on StackOverflow and nobody could answer the question
47
+
48
+ - [ ] I have already reviewed the sample application for examples of common approaches
49
+
50
+ - [ ] I believe my question can only be answered by the UI-Router maintainers
51
+
52
+
53
+ (general query here)
@@ -1,6 +1,6 @@
1
1
  The MIT License
2
2
 
3
- Copyright (c) 2014 The AngularUI Team, Karsten Sperling
3
+ Copyright (c) 2013-2015 The AngularUI Team, Karsten Sperling
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -1,233 +1,48 @@
1
1
  # AngularUI Router &nbsp;[![Build Status](https://travis-ci.org/angular-ui/ui-router.svg?branch=master)](https://travis-ci.org/angular-ui/ui-router)
2
2
 
3
- #### The de-facto solution to flexible routing with nested views
3
+ **Note: this is the Angular 1.x source for UI-Router version 1.0. If you are looking for the source for UI-Router
4
+ version 0.2.x, it can be found [here](https://github.com/angular-ui/ui-router/tree/legacy)**
5
+
4
6
  ---
5
- **[Download 0.2.11](http://angular-ui.github.io/ui-router/release/angular-ui-router.js)** (or **[Minified](http://angular-ui.github.io/ui-router/release/angular-ui-router.min.js)**) **|**
7
+
8
+
9
+ #### The de-facto solution to flexible routing in angular
10
+ ---
11
+ **[Tutorials](https://ui-router.github.io/tutorials/)** |
12
+ **[API Docs](https://ui-router.github.io/docs/latest/)** |
13
+ **[Download stable](http://unpkg.com/@uirouter/angularjs@latest/release/angular-ui-router.js)** (or **[Minified](http://unpkg.com/@uirouter/angularjs@latest/release/angular-ui-router.min.js)**) **|**
6
14
  **[Guide](https://github.com/angular-ui/ui-router/wiki) |**
7
- **[API](http://angular-ui.github.io/ui-router/site) |**
8
- **[Sample](http://angular-ui.github.com/ui-router/sample/) ([Src](https://github.com/angular-ui/ui-router/tree/gh-pages/sample)) |**
15
+ **[Sample App](http://ui-router.github.io/resources/sampleapp/) |**
9
16
  **[FAQ](https://github.com/angular-ui/ui-router/wiki/Frequently-Asked-Questions) |**
10
- **[Resources](#resources) |**
11
17
  **[Report an Issue](https://github.com/angular-ui/ui-router/blob/master/CONTRIBUTING.md#report-an-issue) |**
12
18
  **[Contribute](https://github.com/angular-ui/ui-router/blob/master/CONTRIBUTING.md#contribute) |**
13
19
  **[Help!](http://stackoverflow.com/questions/ask?tags=angularjs,angular-ui-router) |**
14
- **[Discuss](https://groups.google.com/forum/#!categories/angular-ui/router)**
15
20
 
16
21
  ---
17
22
 
18
- AngularUI Router is a routing framework for [AngularJS](http://angularjs.org), which allows you to organize the
19
- parts of your interface into a [*state machine*](https://en.wikipedia.org/wiki/Finite-state_machine). Unlike the
20
- [`$route` service](http://docs.angularjs.org/api/ngRoute.$route) in the Angular ngRoute module, which is organized around URL
21
- routes, UI-Router is organized around [*states*](https://github.com/angular-ui/ui-router/wiki),
22
- which may optionally have routes, as well as other behavior, attached.
23
-
24
- States are bound to *named*, *nested* and *parallel views*, allowing you to powerfully manage your application's interface.
25
-
26
- Check out the sample app: http://angular-ui.github.io/ui-router/sample/
27
-
28
- -
29
- **Note:** *UI-Router is under active development. As such, while this library is well-tested, the API may change. Consider using it in production applications only if you're comfortable following a changelog and updating your usage accordingly.*
23
+ Angular UI-Router is a client-side [Single Page Application](https://en.wikipedia.org/wiki/Single-page_application)
24
+ routing framework for [AngularJS](http://angularjs.org).
25
+
26
+ Routing frameworks for SPAs update the browser's URL as the user navigates through the app. Conversely, this allows
27
+ changes to the browser's URL to drive navigation through the app, thus allowing the user to create a bookmark to a
28
+ location deep within the SPA.
30
29
 
30
+ UI-Router applications are modeled as a hierarchical tree of states. UI-Router provides a
31
+ [*state machine*](https://en.wikipedia.org/wiki/Finite-state_machine) to manage the transitions between those
32
+ application states in a transaction-like manner.
31
33
 
32
34
  ## Get Started
33
35
 
34
- **(1)** Get UI-Router in one of the following ways:
35
- - clone & [build](CONTRIBUTING.md#developing) this repository
36
- - [download the release](http://angular-ui.github.io/ui-router/release/angular-ui-router.js) (or [minified](http://angular-ui.github.io/ui-router/release/angular-ui-router.min.js))
37
- - via **[Bower](http://bower.io/)**: by running `$ bower install angular-ui-router` from your console
38
- - or via **[npm](https://www.npmjs.org/)**: by running `$ npm install angular-ui-router` from your console
39
- - or via **[Component](https://github.com/component/component)**: by running `$ component install angular-ui/ui-router` from your console
40
-
41
- **(2)** Include `angular-ui-router.js` (or `angular-ui-router.min.js`) in your `index.html`, after including Angular itself (For Component users: ignore this step)
42
-
43
- **(3)** Add `'ui.router'` to your main module's list of dependencies (For Component users: replace `'ui.router'` with `require('angular-ui-router')`)
44
-
45
- When you're done, your setup should look similar to the following:
46
-
47
- >
48
- ```html
49
- <!doctype html>
50
- <html ng-app="myApp">
51
- <head>
52
- <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.1.5/angular.min.js"></script>
53
- <script src="js/angular-ui-router.min.js"></script>
54
- <script>
55
- var myApp = angular.module('myApp', ['ui.router']);
56
- // For Component users, it should look like this:
57
- // var myApp = angular.module('myApp', [require('angular-ui-router')]);
58
- </script>
59
- ...
60
- </head>
61
- <body>
62
- ...
63
- </body>
64
- </html>
65
- ```
66
-
67
- ### [Nested States & Views](http://plnkr.co/edit/u18KQc?p=preview)
68
-
69
- The majority of UI-Router's power is in its ability to nest states & views.
70
-
71
- **(1)** First, follow the [setup](#get-started) instructions detailed above.
72
-
73
- **(2)** Then, add a [`ui-view` directive](https://github.com/angular-ui/ui-router/wiki/Quick-Reference#ui-view) to the `<body />` of your app.
74
-
75
- >
76
- ```html
77
- <!-- index.html -->
78
- <body>
79
- <div ui-view></div>
80
- <!-- We'll also add some navigation: -->
81
- <a ui-sref="state1">State 1</a>
82
- <a ui-sref="state2">State 2</a>
83
- </body>
84
- ```
85
-
86
- **(3)** You'll notice we also added some links with [`ui-sref` directives](https://github.com/angular-ui/ui-router/wiki/Quick-Reference#ui-sref). In addition to managing state transitions, this directive auto-generates the `href` attribute of the `<a />` element it's attached to, if the corresponding state has a URL. Next we'll add some templates. These will plug into the `ui-view` within `index.html`. Notice that they have their own `ui-view` as well! That is the key to nesting states and views.
87
-
88
- >
89
- ```html
90
- <!-- partials/state1.html -->
91
- <h1>State 1</h1>
92
- <hr/>
93
- <a ui-sref="state1.list">Show List</a>
94
- <div ui-view></div>
95
- ```
96
- ```html
97
- <!-- partials/state2.html -->
98
- <h1>State 2</h1>
99
- <hr/>
100
- <a ui-sref="state2.list">Show List</a>
101
- <div ui-view></div>
102
- ```
103
-
104
- **(4)** Next, we'll add some child templates. *These* will get plugged into the `ui-view` of their parent state templates.
105
-
106
- >
107
- ```html
108
- <!-- partials/state1.list.html -->
109
- <h3>List of State 1 Items</h3>
110
- <ul>
111
- <li ng-repeat="item in items">{{ item }}</li>
112
- </ul>
113
- ```
114
-
115
- >
116
- ```html
117
- <!-- partials/state2.list.html -->
118
- <h3>List of State 2 Things</h3>
119
- <ul>
120
- <li ng-repeat="thing in things">{{ thing }}</li>
121
- </ul>
122
- ```
123
-
124
- **(5)** Finally, we'll wire it all up with `$stateProvider`. Set up your states in the module config, as in the following:
125
-
126
-
127
- >
128
- ```javascript
129
- myApp.config(function($stateProvider, $urlRouterProvider) {
130
- //
131
- // For any unmatched url, redirect to /state1
132
- $urlRouterProvider.otherwise("/state1");
133
- //
134
- // Now set up the states
135
- $stateProvider
136
- .state('state1', {
137
- url: "/state1",
138
- templateUrl: "partials/state1.html"
139
- })
140
- .state('state1.list', {
141
- url: "/list",
142
- templateUrl: "partials/state1.list.html",
143
- controller: function($scope) {
144
- $scope.items = ["A", "List", "Of", "Items"];
145
- }
146
- })
147
- .state('state2', {
148
- url: "/state2",
149
- templateUrl: "partials/state2.html"
150
- })
151
- .state('state2.list', {
152
- url: "/list",
153
- templateUrl: "partials/state2.list.html",
154
- controller: function($scope) {
155
- $scope.things = ["A", "Set", "Of", "Things"];
156
- }
157
- });
158
- });
159
- ```
160
-
161
- **(6)** See this quick start example in action.
162
- >**[Go to Quick Start Plunker for Nested States & Views](http://plnkr.co/edit/u18KQc?p=preview)**
163
-
164
- **(7)** This only scratches the surface
165
- >**[Dive Deeper!](https://github.com/angular-ui/ui-router/wiki)**
166
-
167
-
168
- ### [Multiple & Named Views](http://plnkr.co/edit/SDOcGS?p=preview)
169
-
170
- Another great feature is the ability to have multiple `ui-view`s view per template.
171
-
172
- **Pro Tip:** *While multiple parallel views are a powerful feature, you'll often be able to manage your
173
- interfaces more effectively by nesting your views, and pairing those views with nested states.*
174
-
175
- **(1)** Follow the [setup](#get-started) instructions detailed above.
176
-
177
- **(2)** Add one or more `ui-view` to your app, give them names.
178
- >
179
- ```html
180
- <!-- index.html -->
181
- <body>
182
- <div ui-view="viewA"></div>
183
- <div ui-view="viewB"></div>
184
- <!-- Also a way to navigate -->
185
- <a ui-sref="route1">Route 1</a>
186
- <a ui-sref="route2">Route 2</a>
187
- </body>
188
- ```
189
-
190
- **(3)** Set up your states in the module config:
191
- >
192
- ```javascript
193
- myApp.config(function($stateProvider) {
194
- $stateProvider
195
- .state('index', {
196
- url: "",
197
- views: {
198
- "viewA": { template: "index.viewA" },
199
- "viewB": { template: "index.viewB" }
200
- }
201
- })
202
- .state('route1', {
203
- url: "/route1",
204
- views: {
205
- "viewA": { template: "route1.viewA" },
206
- "viewB": { template: "route1.viewB" }
207
- }
208
- })
209
- .state('route2', {
210
- url: "/route2",
211
- views: {
212
- "viewA": { template: "route2.viewA" },
213
- "viewB": { template: "route2.viewB" }
214
- }
215
- })
216
- });
217
- ```
218
-
219
- **(4)** See this quick start example in action.
220
- >**[Go to Quick Start Plunker for Multiple & Named Views](http://plnkr.co/edit/SDOcGS?p=preview)**
221
36
 
37
+ - [UI-Router for Angular 1](https://ui-router.github.io/ng1)
38
+ - [UI-Router for Angular 2](https://ui-router.github.io/ng2)
39
+ - [UI-Router for React](https://ui-router.github.io/react)
222
40
 
223
41
  ## Resources
224
42
 
225
43
  * [In-Depth Guide](https://github.com/angular-ui/ui-router/wiki)
226
- * [API Reference](http://angular-ui.github.io/ui-router/site)
227
- * [Sample App](http://angular-ui.github.com/ui-router/sample/) ([Source](https://github.com/angular-ui/ui-router/tree/gh-pages/sample))
228
- * [FAQ](https://github.com/angular-ui/ui-router/wiki/Frequently-Asked-Questions)
229
44
  * [Slides comparing ngRoute to ui-router](http://slid.es/timkindberg/ui-router#/)
230
- * [UI-Router Extras / Addons](http://christopherthielen.github.io/ui-router-extras/#/home) (@christopherthielen)
45
+ * [UI-Router Extras / Addons for legacy (0.x)](http://christopherthielen.github.io/ui-router-extras/#/home) (@christopherthielen)
231
46
 
232
47
  ### Videos
233
48
 
@@ -236,8 +51,6 @@ myApp.config(function($stateProvider) {
236
51
  * [Activating States](https://egghead.io/lessons/angularjs-ui-router-activating-states) (egghead.io)
237
52
  * [Learn Angular.js using UI-Router](http://youtu.be/QETUuZ27N0w) (LearnCode.academy)
238
53
 
239
-
240
-
241
54
  ## Reporting issues and Contributing
242
55
 
243
56
  Please read our [Contributor guidelines](CONTRIBUTING.md) before reporting an issue or creating a pull request.