unsakini 0.0.3.1 → 0.0.4.pre.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (290) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +37 -6
  3. data/angular/angular-cli.json +5 -3
  4. data/angular/npm-debug.log +54 -0
  5. data/angular/package.json +4 -1
  6. data/angular/src/app/app.component.html +1 -4
  7. data/angular/src/app/app.module.ts +8 -7
  8. data/angular/src/app/app.routes.module.ts +12 -2
  9. data/angular/src/app/confirm-account/confirm-account.component.ts +27 -0
  10. data/angular/src/app/confirm-account/confirm-account.html +41 -0
  11. data/angular/src/app/confirm-account/confirm-account.module.ts +24 -0
  12. data/angular/src/app/confirm-account/confirm-account.scss +3 -0
  13. data/angular/src/app/confirm-account/confirm-account.service.ts +27 -0
  14. data/angular/src/app/confirm-account/index.ts +3 -0
  15. data/angular/src/app/index.ts +2 -0
  16. data/angular/src/app/login/index.ts +3 -0
  17. data/angular/src/app/login/login.component.ts +40 -0
  18. data/angular/src/app/login/login.html +43 -0
  19. data/angular/src/app/login/login.module.ts +27 -0
  20. data/angular/src/app/login/login.service.ts +48 -0
  21. data/angular/src/app/registration/index.ts +3 -0
  22. data/angular/src/app/registration/registration.component.html +70 -12
  23. data/angular/src/app/registration/registration.component.spec.ts +8 -11
  24. data/angular/src/app/registration/registration.component.ts +10 -8
  25. data/angular/src/app/registration/registration.module.ts +23 -0
  26. data/angular/src/app/registration/registration.service.ts +46 -0
  27. data/angular/src/app/registration/registration.services.spec.ts +71 -0
  28. data/angular/src/app/services/auth-http/auth.http.service.ts +35 -0
  29. data/angular/src/app/services/auth-http/index.ts +1 -0
  30. data/angular/src/app/services/http/http.service.spec.ts +205 -0
  31. data/angular/src/app/services/http/http.service.ts +40 -0
  32. data/angular/src/app/services/http/index.ts +1 -0
  33. data/angular/src/app/services/index.ts +3 -0
  34. data/angular/src/app/services/services.module.ts +33 -0
  35. data/angular/src/assets/global.scss +3 -0
  36. data/angular/src/environments/custom.ts +4 -0
  37. data/angular/src/environments/environment.prod.ts +2 -1
  38. data/angular/src/environments/environment.ts +2 -1
  39. data/angular/src/index.html +1 -1
  40. data/app/controllers/application_controller.rb +2 -2
  41. data/app/controllers/concerns/unsakini/board_owner_controller_concern.rb +42 -0
  42. data/app/controllers/concerns/unsakini/comment_owner_controller_concern.rb +36 -0
  43. data/app/controllers/concerns/unsakini/logged_in_controller_concern.rb +23 -0
  44. data/app/controllers/concerns/unsakini/post_owner_controller_concern.rb +38 -0
  45. data/app/controllers/concerns/unsakini/serializer_controller_concern.rb +13 -0
  46. data/app/controllers/unsakini/base_controller.rb +6 -0
  47. data/app/controllers/unsakini/boards_controller.rb +76 -0
  48. data/app/controllers/unsakini/comments_controller.rb +54 -0
  49. data/app/controllers/unsakini/posts_controller.rb +61 -0
  50. data/app/controllers/unsakini/share_board_controller.rb +122 -0
  51. data/app/controllers/unsakini/user_token_controller.rb +17 -0
  52. data/app/controllers/unsakini/users_controller.rb +69 -0
  53. data/app/controllers/unsakini/web_controller.rb +27 -0
  54. data/app/mailers/unsakini/user_mailer.rb +13 -0
  55. data/app/models/concerns/unsakini/encryptable_model_concern.rb +97 -0
  56. data/app/models/unsakini/application_record.rb +7 -0
  57. data/app/models/unsakini/board.rb +16 -0
  58. data/app/models/unsakini/comment.rb +12 -0
  59. data/app/models/unsakini/post.rb +15 -0
  60. data/app/models/unsakini/user.rb +43 -0
  61. data/app/models/unsakini/user_board.rb +84 -0
  62. data/app/models/unsakini.rb +5 -0
  63. data/app/serializers/unsakini/board_serializer.rb +7 -0
  64. data/app/serializers/{comment_serializer.rb → unsakini/comment_serializer.rb} +6 -3
  65. data/app/serializers/unsakini/post_serializer.rb +26 -0
  66. data/app/serializers/unsakini/user_board_serializer.rb +14 -0
  67. data/app/serializers/{user_serializer.rb → unsakini/user_serializer.rb} +5 -2
  68. data/app/views/unsakini/user_mailer/confirm_account.html.erb +3 -0
  69. data/app/views/unsakini/web/index.html.erb +343 -0
  70. data/config/routes.rb +10 -10
  71. data/db/migrate/20161116114222_create_unsakini_boards.rb +10 -0
  72. data/db/migrate/{20161116200034_create_user_boards.rb → 20161116200034_create_unsakini_user_boards.rb} +3 -2
  73. data/db/migrate/{20161118031023_create_posts.rb → 20161118031023_create_unsakini_posts.rb} +2 -2
  74. data/db/migrate/{20161118100454_create_comments.rb → 20161118100454_create_unsakini_comments.rb} +2 -2
  75. data/db/migrate/20161126145352_create_unsakini_users.rb +15 -0
  76. data/lib/generators/unsakini/config/config_generator.rb +3 -1
  77. data/lib/generators/unsakini/dependencies/USAGE +5 -0
  78. data/lib/generators/unsakini/dependencies/dependencies_generator.rb +19 -0
  79. data/lib/tasks/unsakini_tasks.rake +6 -37
  80. data/lib/unsakini/engine.rb +6 -0
  81. data/lib/unsakini/version.rb +1 -1
  82. data/public/css/all.css +1204 -0
  83. data/public/css/all.css.map +7 -0
  84. data/public/css/bootstrap.css +5622 -0
  85. data/public/css/bootstrap.css.map +7 -0
  86. data/public/css/custom.css +15 -0
  87. data/public/favicons/android-chrome-144x144.png +0 -0
  88. data/public/favicons/android-chrome-192x192.png +0 -0
  89. data/public/favicons/android-chrome-36x36.png +0 -0
  90. data/public/favicons/android-chrome-48x48.png +0 -0
  91. data/public/favicons/android-chrome-72x72.png +0 -0
  92. data/public/favicons/android-chrome-96x96.png +0 -0
  93. data/public/favicons/apple-touch-icon-114x114.png +0 -0
  94. data/public/favicons/apple-touch-icon-120x120.png +0 -0
  95. data/public/favicons/apple-touch-icon-144x144.png +0 -0
  96. data/public/favicons/apple-touch-icon-152x152.png +0 -0
  97. data/public/favicons/apple-touch-icon-180x180.png +0 -0
  98. data/public/favicons/apple-touch-icon-57x57.png +0 -0
  99. data/public/favicons/apple-touch-icon-60x60.png +0 -0
  100. data/public/favicons/apple-touch-icon-72x72.png +0 -0
  101. data/public/favicons/apple-touch-icon-76x76.png +0 -0
  102. data/public/favicons/apple-touch-icon-precomposed.png +0 -0
  103. data/public/favicons/apple-touch-icon.png +0 -0
  104. data/public/favicons/favicon-16x16.png +0 -0
  105. data/public/favicons/favicon-194x194.png +0 -0
  106. data/public/favicons/favicon-32x32.png +0 -0
  107. data/public/favicons/favicon-96x96.png +0 -0
  108. data/public/favicons/favicon.ico +0 -0
  109. data/public/favicons/mstile-144x144.png +0 -0
  110. data/public/favicons/mstile-150x150.png +0 -0
  111. data/public/favicons/mstile-310x150.png +0 -0
  112. data/public/favicons/mstile-310x310.png +0 -0
  113. data/public/favicons/mstile-70x70.png +0 -0
  114. data/public/fonts/bootstrap/glyphicons-halflings-regular.eot +0 -0
  115. data/public/fonts/bootstrap/glyphicons-halflings-regular.svg +288 -0
  116. data/public/fonts/bootstrap/glyphicons-halflings-regular.ttf +0 -0
  117. data/public/fonts/bootstrap/glyphicons-halflings-regular.woff +0 -0
  118. data/public/fonts/bootstrap/glyphicons-halflings-regular.woff2 +0 -0
  119. data/public/fonts/font-awesome-4.3.0/css/font-awesome.css +1801 -0
  120. data/public/fonts/font-awesome-4.3.0/css/font-awesome.min.css +4 -0
  121. data/public/fonts/font-awesome-4.3.0/fonts/FontAwesome.otf +0 -0
  122. data/public/fonts/font-awesome-4.3.0/fonts/fontawesome-webfont.eot +0 -0
  123. data/public/fonts/font-awesome-4.3.0/fonts/fontawesome-webfont.svg +565 -0
  124. data/public/fonts/font-awesome-4.3.0/fonts/fontawesome-webfont.ttf +0 -0
  125. data/public/fonts/font-awesome-4.3.0/fonts/fontawesome-webfont.woff +0 -0
  126. data/public/fonts/font-awesome-4.3.0/fonts/fontawesome-webfont.woff2 +0 -0
  127. data/public/images/graph-01.svg +425 -0
  128. data/public/images/graph-02.svg +435 -0
  129. data/public/images/graph-03.svg +576 -0
  130. data/public/images/graph-04.svg +70 -0
  131. data/public/images/img-01.png +0 -0
  132. data/public/images/img-decor-01.jpg +0 -0
  133. data/public/images/img-decor-02.jpg +0 -0
  134. data/public/images/img-decor-03.jpg +0 -0
  135. data/public/images/img-social-placeholder-01.png +0 -0
  136. data/public/images/logo-cb.png +0 -0
  137. data/public/images/logo-codrops.png +0 -0
  138. data/public/images/logo-pixel.png +0 -0
  139. data/public/images/logo-smashing.png +0 -0
  140. data/public/images/logo-tnw.png +0 -0
  141. data/public/images/logo-w.png +0 -0
  142. data/public/images/unsakini.svg +56 -0
  143. data/public/images/user-01.jpg +0 -0
  144. data/public/images/user-02.jpg +0 -0
  145. data/public/images/user-03.jpg +0 -0
  146. data/public/js/bootstrap.js +2306 -0
  147. data/public/js/jquery-1.11.2.min.js +4 -0
  148. data/public/js/jquery.main.js +603 -0
  149. data/public/manifest.json +41 -0
  150. data/public/unsakini/app/448c34a56d699c29117adc64c43affeb.woff2 +0 -0
  151. data/public/unsakini/app/89889688147bd7575d6327160d64e760.svg +288 -0
  152. data/public/unsakini/app/assets/global.scss +3 -0
  153. data/public/unsakini/app/e18bbf611f2a2e43afc071aa2f4e1512.ttf +0 -0
  154. data/public/unsakini/app/f4769f9bdb7466be65088239c12046d1.eot +0 -0
  155. data/public/unsakini/app/fa2772327f55d8198301fdb8bcfc8158.woff +0 -0
  156. data/{angular/dist → public/unsakini/app}/favicon.ico +0 -0
  157. data/public/unsakini/app/index.html +14 -0
  158. data/public/unsakini/app/inline.d41d8cd98f00b204e980.bundle.js +2 -0
  159. data/public/unsakini/app/inline.d41d8cd98f00b204e980.bundle.map +1 -0
  160. data/public/unsakini/app/main.54f49c65d3d20650a5d5.bundle.js +2152 -0
  161. data/public/unsakini/app/main.54f49c65d3d20650a5d5.bundle.js.gz +0 -0
  162. data/public/unsakini/app/main.54f49c65d3d20650a5d5.bundle.map +1 -0
  163. data/public/unsakini/app/styles.58e065928ed8ebd0b582.bundle.js +2 -0
  164. data/public/unsakini/app/styles.58e065928ed8ebd0b582.bundle.map +1 -0
  165. data/public/unsakini/app/styles.5dac0e986fce6f8738b300cb558b56a0.bundle.css +8 -0
  166. data/spec/concerns/models/encryptable_concern.rb +3 -2
  167. data/spec/controllers/{web_base_controller_spec.rb → web_controller_spec.rb} +5 -4
  168. data/spec/dummy/config/application.rb +3 -1
  169. data/spec/dummy/config/environments/development.rb +2 -0
  170. data/spec/dummy/config/initializers/knock.rb +59 -0
  171. data/spec/dummy/db/schema.rb +16 -14
  172. data/spec/dummy/db/test.sqlite3 +0 -0
  173. data/spec/factories/boards.rb +1 -1
  174. data/spec/factories/comments.rb +1 -1
  175. data/spec/factories/posts.rb +1 -1
  176. data/spec/factories/user_boards.rb +1 -1
  177. data/spec/factories/users.rb +1 -1
  178. data/spec/models/board_spec.rb +2 -2
  179. data/spec/models/comment_spec.rb +2 -2
  180. data/spec/models/post_spec.rb +2 -2
  181. data/spec/models/user_board_spec.rb +19 -19
  182. data/spec/models/user_spec.rb +1 -1
  183. data/spec/requests/{api/boards/api_boards_crud_spec.rb → boards/boards_crud_spec.rb} +26 -26
  184. data/spec/requests/{api/boards/api_boards_pagination_spec.rb → boards/boards_pagination_spec.rb} +7 -7
  185. data/spec/requests/{api/boards/api_private_board_spec.rb → boards/private_board_spec.rb} +26 -26
  186. data/spec/requests/{api/boards/api_shared_board_spec.rb → boards/shared_board_spec.rb} +9 -9
  187. data/spec/requests/{api/boards/api_sharing_board_spec.rb → boards/sharing_board_spec.rb} +13 -13
  188. data/spec/requests/{api/comments/api_comments_pagination_spec.rb → comments/comments_pagination_spec.rb} +3 -3
  189. data/spec/requests/{api/comments/api_comments_private_board_spec.rb → comments/comments_private_board_spec.rb} +20 -20
  190. data/spec/requests/{api/comments/api_comments_shared_board_spec.rb → comments/comments_shared_board_spec.rb} +17 -17
  191. data/spec/requests/{api/posts/api_posts_pagination_spec.rb → posts/posts_pagination_spec.rb} +3 -3
  192. data/spec/requests/{api/posts/api_posts_private_board_spec.rb → posts/posts_private_board_spec.rb} +22 -22
  193. data/spec/requests/{api/posts/api_posts_shared_board_spec.rb → posts/posts_shared_board_spec.rb} +24 -24
  194. data/spec/requests/user/user_create_spec.rb +104 -0
  195. data/spec/requests/{api/api_users_spec.rb → user/user_search_spec.rb} +9 -9
  196. data/spec/schema/jwt.json +9 -0
  197. data/spec/schema/validation_message.json +4 -0
  198. data/spec/spec_helper.rb +2 -0
  199. data/spec/support/auth_helper.rb +0 -2
  200. metadata +204 -199
  201. data/angular/dist/index.html +0 -14
  202. data/angular/dist/inline.bundle.js +0 -139
  203. data/angular/dist/inline.map +0 -1
  204. data/angular/dist/main.bundle.js +0 -64689
  205. data/angular/dist/main.map +0 -1
  206. data/angular/dist/styles.bundle.js +0 -364
  207. data/angular/dist/styles.map +0 -1
  208. data/angular/src/styles.css +0 -1
  209. data/app/controllers/api/boards_controller.rb +0 -73
  210. data/app/controllers/api/comments_controller.rb +0 -51
  211. data/app/controllers/api/posts_controller.rb +0 -58
  212. data/app/controllers/api/share_board_controller.rb +0 -118
  213. data/app/controllers/api/users_controller.rb +0 -27
  214. data/app/controllers/concerns/board_owner_controller_concern.rb +0 -38
  215. data/app/controllers/concerns/comment_owner_controller_concern.rb +0 -33
  216. data/app/controllers/concerns/logged_in_controller_concern.rb +0 -21
  217. data/app/controllers/concerns/post_owner_controller_concern.rb +0 -36
  218. data/app/controllers/concerns/serializer_controller_concern.rb +0 -11
  219. data/app/controllers/user_token_controller.rb +0 -2
  220. data/app/controllers/web_base_controller.rb +0 -15
  221. data/app/models/application_record.rb +0 -5
  222. data/app/models/board.rb +0 -14
  223. data/app/models/comment.rb +0 -9
  224. data/app/models/concerns/encryptable_model_concern.rb +0 -96
  225. data/app/models/post.rb +0 -12
  226. data/app/models/user.rb +0 -6
  227. data/app/models/user_board.rb +0 -82
  228. data/app/serializers/board_serializer.rb +0 -5
  229. data/app/serializers/post_serializer.rb +0 -23
  230. data/app/serializers/user_board_serializer.rb +0 -11
  231. data/app/views/web_base/index.html +0 -16
  232. data/db/migrate/20161116114222_create_boards.rb +0 -9
  233. data/db/migrate/20161118221508_add_encrypted_password_to_user_board.rb +0 -5
  234. data/db/migrate/20161122211105_create_users.rb +0 -12
  235. data/db/migrate/20161124102633_add_is_shared_to_boards.rb +0 -5
  236. data/lib/generators/unsakini/angular/USAGE +0 -8
  237. data/lib/generators/unsakini/angular/angular_generator.rb +0 -7
  238. data/spec/dummy/config/initializers/assets.rb +0 -11
  239. data/spec/dummy/config/initializers/cookies_serializer.rb +0 -5
  240. data/spec/dummy/config/initializers/session_store.rb +0 -3
  241. data/spec/dummy/db/development.sqlite3 +0 -0
  242. data/spec/dummy/db/migrate/20161124210219_create_boards.unsakini_engine.rb +0 -10
  243. data/spec/dummy/db/migrate/20161124210220_create_user_boards.unsakini_engine.rb +0 -12
  244. data/spec/dummy/db/migrate/20161124210221_create_posts.unsakini_engine.rb +0 -13
  245. data/spec/dummy/db/migrate/20161124210222_create_comments.unsakini_engine.rb +0 -12
  246. data/spec/dummy/db/migrate/20161124210223_add_encrypted_password_to_user_board.unsakini_engine.rb +0 -6
  247. data/spec/dummy/db/migrate/20161124210224_create_users.unsakini_engine.rb +0 -13
  248. data/spec/dummy/db/migrate/20161124210225_add_is_shared_to_boards.unsakini_engine.rb +0 -6
  249. data/spec/dummy/public/app/favicon.ico +0 -0
  250. data/spec/dummy/public/app/index.html +0 -14
  251. data/spec/dummy/public/app/inline.bundle.js +0 -139
  252. data/spec/dummy/public/app/inline.map +0 -1
  253. data/spec/dummy/public/app/main.bundle.js +0 -64689
  254. data/spec/dummy/public/app/main.map +0 -1
  255. data/spec/dummy/public/app/styles.bundle.js +0 -364
  256. data/spec/dummy/public/app/styles.map +0 -1
  257. data/spec/dummy/tmp/unsakini-ng2/LICENSE +0 -21
  258. data/spec/dummy/tmp/unsakini-ng2/README.md +0 -1
  259. data/spec/dummy/tmp/unsakini-ng2/angular-cli.json +0 -59
  260. data/spec/dummy/tmp/unsakini-ng2/e2e/app.e2e-spec.ts +0 -14
  261. data/spec/dummy/tmp/unsakini-ng2/e2e/app.po.ts +0 -11
  262. data/spec/dummy/tmp/unsakini-ng2/e2e/signup.e2e-spec.ts +0 -28
  263. data/spec/dummy/tmp/unsakini-ng2/e2e/signup.po.ts +0 -31
  264. data/spec/dummy/tmp/unsakini-ng2/e2e/tsconfig.json +0 -16
  265. data/spec/dummy/tmp/unsakini-ng2/karma.conf.js +0 -45
  266. data/spec/dummy/tmp/unsakini-ng2/package.json +0 -49
  267. data/spec/dummy/tmp/unsakini-ng2/protractor.conf.js +0 -32
  268. data/spec/dummy/tmp/unsakini-ng2/src/app/app.component.css +0 -0
  269. data/spec/dummy/tmp/unsakini-ng2/src/app/app.component.html +0 -4
  270. data/spec/dummy/tmp/unsakini-ng2/src/app/app.component.spec.ts +0 -47
  271. data/spec/dummy/tmp/unsakini-ng2/src/app/app.component.ts +0 -10
  272. data/spec/dummy/tmp/unsakini-ng2/src/app/app.module.ts +0 -29
  273. data/spec/dummy/tmp/unsakini-ng2/src/app/app.routes.module.ts +0 -29
  274. data/spec/dummy/tmp/unsakini-ng2/src/app/index.ts +0 -2
  275. data/spec/dummy/tmp/unsakini-ng2/src/app/registration/registration.component.css +0 -0
  276. data/spec/dummy/tmp/unsakini-ng2/src/app/registration/registration.component.html +0 -14
  277. data/spec/dummy/tmp/unsakini-ng2/src/app/registration/registration.component.spec.ts +0 -157
  278. data/spec/dummy/tmp/unsakini-ng2/src/app/registration/registration.component.ts +0 -42
  279. data/spec/dummy/tmp/unsakini-ng2/src/environments/environment.prod.ts +0 -3
  280. data/spec/dummy/tmp/unsakini-ng2/src/environments/environment.ts +0 -8
  281. data/spec/dummy/tmp/unsakini-ng2/src/favicon.ico +0 -0
  282. data/spec/dummy/tmp/unsakini-ng2/src/index.html +0 -14
  283. data/spec/dummy/tmp/unsakini-ng2/src/main.ts +0 -12
  284. data/spec/dummy/tmp/unsakini-ng2/src/polyfills.ts +0 -19
  285. data/spec/dummy/tmp/unsakini-ng2/src/styles.css +0 -1
  286. data/spec/dummy/tmp/unsakini-ng2/src/test.ts +0 -31
  287. data/spec/dummy/tmp/unsakini-ng2/src/tsconfig.json +0 -18
  288. data/spec/dummy/tmp/unsakini-ng2/src/typings.d.ts +0 -2
  289. data/spec/dummy/tmp/unsakini-ng2/tslint.json +0 -114
  290. data/spec/dummy/tmp/unsakini-ng2/typings.json +0 -4
@@ -1,364 +0,0 @@
1
- webpackJsonp([1,2],{
2
-
3
- /***/ 379:
4
- /***/ function(module, exports, __webpack_require__) {
5
-
6
- // style-loader: Adds some css to the DOM by adding a <style> tag
7
-
8
- // load the styles
9
- var content = __webpack_require__(652);
10
- if(typeof content === 'string') content = [[module.i, content, '']];
11
- // add the styles to the DOM
12
- var update = __webpack_require__(695)(content, {});
13
- if(content.locals) module.exports = content.locals;
14
- // Hot Module Replacement
15
- if(false) {
16
- // When the styles change, update the <style> tags
17
- if(!content.locals) {
18
- module.hot.accept("!!./../node_modules/css-loader/index.js?sourcemap!./../node_modules/postcss-loader/index.js!./styles.css", function() {
19
- var newContent = require("!!./../node_modules/css-loader/index.js?sourcemap!./../node_modules/postcss-loader/index.js!./styles.css");
20
- if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
21
- update(newContent);
22
- });
23
- }
24
- // When the module is disposed, remove the <style> tags
25
- module.hot.dispose(function() { update(); });
26
- }
27
-
28
- /***/ },
29
-
30
- /***/ 652:
31
- /***/ function(module, exports, __webpack_require__) {
32
-
33
- exports = module.exports = __webpack_require__(653)();
34
- // imports
35
-
36
-
37
- // module
38
- exports.push([module.i, "/* You can add global styles to this file, and also import other style files */\n", ""]);
39
-
40
- // exports
41
-
42
-
43
- /***/ },
44
-
45
- /***/ 653:
46
- /***/ function(module, exports) {
47
-
48
- /*
49
- MIT License http://www.opensource.org/licenses/mit-license.php
50
- Author Tobias Koppers @sokra
51
- */
52
- // css base code, injected by the css-loader
53
- module.exports = function() {
54
- var list = [];
55
-
56
- // return the list of modules as css string
57
- list.toString = function toString() {
58
- var result = [];
59
- for(var i = 0; i < this.length; i++) {
60
- var item = this[i];
61
- if(item[2]) {
62
- result.push("@media " + item[2] + "{" + item[1] + "}");
63
- } else {
64
- result.push(item[1]);
65
- }
66
- }
67
- return result.join("");
68
- };
69
-
70
- // import a list of modules into the list
71
- list.i = function(modules, mediaQuery) {
72
- if(typeof modules === "string")
73
- modules = [[null, modules, ""]];
74
- var alreadyImportedModules = {};
75
- for(var i = 0; i < this.length; i++) {
76
- var id = this[i][0];
77
- if(typeof id === "number")
78
- alreadyImportedModules[id] = true;
79
- }
80
- for(i = 0; i < modules.length; i++) {
81
- var item = modules[i];
82
- // skip already imported module
83
- // this implementation is not 100% perfect for weird media query combinations
84
- // when a module is imported multiple times with different media queries.
85
- // I hope this will never occur (Hey this way we have smaller bundles)
86
- if(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) {
87
- if(mediaQuery && !item[2]) {
88
- item[2] = mediaQuery;
89
- } else if(mediaQuery) {
90
- item[2] = "(" + item[2] + ") and (" + mediaQuery + ")";
91
- }
92
- list.push(item);
93
- }
94
- }
95
- };
96
- return list;
97
- };
98
-
99
-
100
- /***/ },
101
-
102
- /***/ 695:
103
- /***/ function(module, exports) {
104
-
105
- /*
106
- MIT License http://www.opensource.org/licenses/mit-license.php
107
- Author Tobias Koppers @sokra
108
- */
109
- var stylesInDom = {},
110
- memoize = function(fn) {
111
- var memo;
112
- return function () {
113
- if (typeof memo === "undefined") memo = fn.apply(this, arguments);
114
- return memo;
115
- };
116
- },
117
- isOldIE = memoize(function() {
118
- return /msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase());
119
- }),
120
- getHeadElement = memoize(function () {
121
- return document.head || document.getElementsByTagName("head")[0];
122
- }),
123
- singletonElement = null,
124
- singletonCounter = 0,
125
- styleElementsInsertedAtTop = [];
126
-
127
- module.exports = function(list, options) {
128
- if(typeof DEBUG !== "undefined" && DEBUG) {
129
- if(typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment");
130
- }
131
-
132
- options = options || {};
133
- // Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
134
- // tags it will allow on a page
135
- if (typeof options.singleton === "undefined") options.singleton = isOldIE();
136
-
137
- // By default, add <style> tags to the bottom of <head>.
138
- if (typeof options.insertAt === "undefined") options.insertAt = "bottom";
139
-
140
- var styles = listToStyles(list);
141
- addStylesToDom(styles, options);
142
-
143
- return function update(newList) {
144
- var mayRemove = [];
145
- for(var i = 0; i < styles.length; i++) {
146
- var item = styles[i];
147
- var domStyle = stylesInDom[item.id];
148
- domStyle.refs--;
149
- mayRemove.push(domStyle);
150
- }
151
- if(newList) {
152
- var newStyles = listToStyles(newList);
153
- addStylesToDom(newStyles, options);
154
- }
155
- for(var i = 0; i < mayRemove.length; i++) {
156
- var domStyle = mayRemove[i];
157
- if(domStyle.refs === 0) {
158
- for(var j = 0; j < domStyle.parts.length; j++)
159
- domStyle.parts[j]();
160
- delete stylesInDom[domStyle.id];
161
- }
162
- }
163
- };
164
- }
165
-
166
- function addStylesToDom(styles, options) {
167
- for(var i = 0; i < styles.length; i++) {
168
- var item = styles[i];
169
- var domStyle = stylesInDom[item.id];
170
- if(domStyle) {
171
- domStyle.refs++;
172
- for(var j = 0; j < domStyle.parts.length; j++) {
173
- domStyle.parts[j](item.parts[j]);
174
- }
175
- for(; j < item.parts.length; j++) {
176
- domStyle.parts.push(addStyle(item.parts[j], options));
177
- }
178
- } else {
179
- var parts = [];
180
- for(var j = 0; j < item.parts.length; j++) {
181
- parts.push(addStyle(item.parts[j], options));
182
- }
183
- stylesInDom[item.id] = {id: item.id, refs: 1, parts: parts};
184
- }
185
- }
186
- }
187
-
188
- function listToStyles(list) {
189
- var styles = [];
190
- var newStyles = {};
191
- for(var i = 0; i < list.length; i++) {
192
- var item = list[i];
193
- var id = item[0];
194
- var css = item[1];
195
- var media = item[2];
196
- var sourceMap = item[3];
197
- var part = {css: css, media: media, sourceMap: sourceMap};
198
- if(!newStyles[id])
199
- styles.push(newStyles[id] = {id: id, parts: [part]});
200
- else
201
- newStyles[id].parts.push(part);
202
- }
203
- return styles;
204
- }
205
-
206
- function insertStyleElement(options, styleElement) {
207
- var head = getHeadElement();
208
- var lastStyleElementInsertedAtTop = styleElementsInsertedAtTop[styleElementsInsertedAtTop.length - 1];
209
- if (options.insertAt === "top") {
210
- if(!lastStyleElementInsertedAtTop) {
211
- head.insertBefore(styleElement, head.firstChild);
212
- } else if(lastStyleElementInsertedAtTop.nextSibling) {
213
- head.insertBefore(styleElement, lastStyleElementInsertedAtTop.nextSibling);
214
- } else {
215
- head.appendChild(styleElement);
216
- }
217
- styleElementsInsertedAtTop.push(styleElement);
218
- } else if (options.insertAt === "bottom") {
219
- head.appendChild(styleElement);
220
- } else {
221
- throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");
222
- }
223
- }
224
-
225
- function removeStyleElement(styleElement) {
226
- styleElement.parentNode.removeChild(styleElement);
227
- var idx = styleElementsInsertedAtTop.indexOf(styleElement);
228
- if(idx >= 0) {
229
- styleElementsInsertedAtTop.splice(idx, 1);
230
- }
231
- }
232
-
233
- function createStyleElement(options) {
234
- var styleElement = document.createElement("style");
235
- styleElement.type = "text/css";
236
- insertStyleElement(options, styleElement);
237
- return styleElement;
238
- }
239
-
240
- function createLinkElement(options) {
241
- var linkElement = document.createElement("link");
242
- linkElement.rel = "stylesheet";
243
- insertStyleElement(options, linkElement);
244
- return linkElement;
245
- }
246
-
247
- function addStyle(obj, options) {
248
- var styleElement, update, remove;
249
-
250
- if (options.singleton) {
251
- var styleIndex = singletonCounter++;
252
- styleElement = singletonElement || (singletonElement = createStyleElement(options));
253
- update = applyToSingletonTag.bind(null, styleElement, styleIndex, false);
254
- remove = applyToSingletonTag.bind(null, styleElement, styleIndex, true);
255
- } else if(obj.sourceMap &&
256
- typeof URL === "function" &&
257
- typeof URL.createObjectURL === "function" &&
258
- typeof URL.revokeObjectURL === "function" &&
259
- typeof Blob === "function" &&
260
- typeof btoa === "function") {
261
- styleElement = createLinkElement(options);
262
- update = updateLink.bind(null, styleElement);
263
- remove = function() {
264
- removeStyleElement(styleElement);
265
- if(styleElement.href)
266
- URL.revokeObjectURL(styleElement.href);
267
- };
268
- } else {
269
- styleElement = createStyleElement(options);
270
- update = applyToTag.bind(null, styleElement);
271
- remove = function() {
272
- removeStyleElement(styleElement);
273
- };
274
- }
275
-
276
- update(obj);
277
-
278
- return function updateStyle(newObj) {
279
- if(newObj) {
280
- if(newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap)
281
- return;
282
- update(obj = newObj);
283
- } else {
284
- remove();
285
- }
286
- };
287
- }
288
-
289
- var replaceText = (function () {
290
- var textStore = [];
291
-
292
- return function (index, replacement) {
293
- textStore[index] = replacement;
294
- return textStore.filter(Boolean).join('\n');
295
- };
296
- })();
297
-
298
- function applyToSingletonTag(styleElement, index, remove, obj) {
299
- var css = remove ? "" : obj.css;
300
-
301
- if (styleElement.styleSheet) {
302
- styleElement.styleSheet.cssText = replaceText(index, css);
303
- } else {
304
- var cssNode = document.createTextNode(css);
305
- var childNodes = styleElement.childNodes;
306
- if (childNodes[index]) styleElement.removeChild(childNodes[index]);
307
- if (childNodes.length) {
308
- styleElement.insertBefore(cssNode, childNodes[index]);
309
- } else {
310
- styleElement.appendChild(cssNode);
311
- }
312
- }
313
- }
314
-
315
- function applyToTag(styleElement, obj) {
316
- var css = obj.css;
317
- var media = obj.media;
318
-
319
- if(media) {
320
- styleElement.setAttribute("media", media)
321
- }
322
-
323
- if(styleElement.styleSheet) {
324
- styleElement.styleSheet.cssText = css;
325
- } else {
326
- while(styleElement.firstChild) {
327
- styleElement.removeChild(styleElement.firstChild);
328
- }
329
- styleElement.appendChild(document.createTextNode(css));
330
- }
331
- }
332
-
333
- function updateLink(linkElement, obj) {
334
- var css = obj.css;
335
- var sourceMap = obj.sourceMap;
336
-
337
- if(sourceMap) {
338
- // http://stackoverflow.com/a/26603875
339
- css += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + " */";
340
- }
341
-
342
- var blob = new Blob([css], { type: "text/css" });
343
-
344
- var oldSrc = linkElement.href;
345
-
346
- linkElement.href = URL.createObjectURL(blob);
347
-
348
- if(oldSrc)
349
- URL.revokeObjectURL(oldSrc);
350
- }
351
-
352
-
353
- /***/ },
354
-
355
- /***/ 698:
356
- /***/ function(module, exports, __webpack_require__) {
357
-
358
- module.exports = __webpack_require__(379);
359
-
360
-
361
- /***/ }
362
-
363
- },[698]);
364
- //# sourceMappingURL=styles.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["webpack:////home/adones/Projects/UNSAKINI/unsakini/angular/src/styles.css?95a1","webpack:////home/adones/Projects/UNSAKINI/unsakini/angular/src/styles.css","webpack:////home/adones/Projects/UNSAKINI/unsakini/angular/~/css-loader/lib/css-base.js","webpack:////home/adones/Projects/UNSAKINI/unsakini/angular/~/style-loader/addStyles.js"],"names":[],"mappings":";;;;;AAAA;;AAEA;AACA;AACA;AACA;AACA,iDAAgF;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,gCAAgC,UAAU,EAAE;AAC5C,C;;;;;;;ACpBA;AACA;;;AAGA;AACA;;AAEA;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA,wCAAwC,gBAAgB;AACxD,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjDA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,sBAAsB;AACtC;AACA;AACA,kBAAkB,2BAA2B;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,mBAAmB;AAClC;AACA;AACA;AACA;AACA,iBAAiB,2BAA2B;AAC5C;AACA;AACA,QAAQ,uBAAuB;AAC/B;AACA;AACA,GAAG;AACH;AACA,iBAAiB,uBAAuB;AACxC;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA,gCAAgC,sBAAsB;AACtD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA,EAAE;AACF;AACA,EAAE;AACF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;;AAEA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uDAAuD;AACvD;;AAEA,6BAA6B,mBAAmB;;AAEhD;;AAEA;;AAEA;AACA;AACA","file":"styles.bundle.js","sourcesContent":["// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = require(\"!!./../node_modules/css-loader/index.js?sourcemap!./../node_modules/postcss-loader/index.js!./styles.css\");\nif(typeof content === 'string') content = [[module.id, content, '']];\n// add the styles to the DOM\nvar update = require(\"!./../node_modules/style-loader/addStyles.js\")(content, {});\nif(content.locals) module.exports = content.locals;\n// Hot Module Replacement\nif(module.hot) {\n\t// When the styles change, update the <style> tags\n\tif(!content.locals) {\n\t\tmodule.hot.accept(\"!!./../node_modules/css-loader/index.js?sourcemap!./../node_modules/postcss-loader/index.js!./styles.css\", function() {\n\t\t\tvar newContent = require(\"!!./../node_modules/css-loader/index.js?sourcemap!./../node_modules/postcss-loader/index.js!./styles.css\");\n\t\t\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\n\t\t\tupdate(newContent);\n\t\t});\n\t}\n\t// When the module is disposed, remove the <style> tags\n\tmodule.hot.dispose(function() { update(); });\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/adones/Projects/UNSAKINI/unsakini/angular/src/styles.css\n// module id = 379\n// module chunks = 1","exports = module.exports = require(\"./../node_modules/css-loader/lib/css-base.js\")();\n// imports\n\n\n// module\nexports.push([module.id, \"/* You can add global styles to this file, and also import other style files */\\n\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/adones/Projects/UNSAKINI/unsakini/angular/~/css-loader?sourcemap!/home/adones/Projects/UNSAKINI/unsakini/angular/~/postcss-loader!/home/adones/Projects/UNSAKINI/unsakini/angular/src/styles.css\n// module id = 652\n// module chunks = 1","/*\r\n\tMIT License http://www.opensource.org/licenses/mit-license.php\r\n\tAuthor Tobias Koppers @sokra\r\n*/\r\n// css base code, injected by the css-loader\r\nmodule.exports = function() {\r\n\tvar list = [];\r\n\r\n\t// return the list of modules as css string\r\n\tlist.toString = function toString() {\r\n\t\tvar result = [];\r\n\t\tfor(var i = 0; i < this.length; i++) {\r\n\t\t\tvar item = this[i];\r\n\t\t\tif(item[2]) {\r\n\t\t\t\tresult.push(\"@media \" + item[2] + \"{\" + item[1] + \"}\");\r\n\t\t\t} else {\r\n\t\t\t\tresult.push(item[1]);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result.join(\"\");\r\n\t};\r\n\r\n\t// import a list of modules into the list\r\n\tlist.i = function(modules, mediaQuery) {\r\n\t\tif(typeof modules === \"string\")\r\n\t\t\tmodules = [[null, modules, \"\"]];\r\n\t\tvar alreadyImportedModules = {};\r\n\t\tfor(var i = 0; i < this.length; i++) {\r\n\t\t\tvar id = this[i][0];\r\n\t\t\tif(typeof id === \"number\")\r\n\t\t\t\talreadyImportedModules[id] = true;\r\n\t\t}\r\n\t\tfor(i = 0; i < modules.length; i++) {\r\n\t\t\tvar item = modules[i];\r\n\t\t\t// skip already imported module\r\n\t\t\t// this implementation is not 100% perfect for weird media query combinations\r\n\t\t\t// when a module is imported multiple times with different media queries.\r\n\t\t\t// I hope this will never occur (Hey this way we have smaller bundles)\r\n\t\t\tif(typeof item[0] !== \"number\" || !alreadyImportedModules[item[0]]) {\r\n\t\t\t\tif(mediaQuery && !item[2]) {\r\n\t\t\t\t\titem[2] = mediaQuery;\r\n\t\t\t\t} else if(mediaQuery) {\r\n\t\t\t\t\titem[2] = \"(\" + item[2] + \") and (\" + mediaQuery + \")\";\r\n\t\t\t\t}\r\n\t\t\t\tlist.push(item);\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\treturn list;\r\n};\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/adones/Projects/UNSAKINI/unsakini/angular/~/css-loader/lib/css-base.js\n// module id = 653\n// module chunks = 1","/*\r\n\tMIT License http://www.opensource.org/licenses/mit-license.php\r\n\tAuthor Tobias Koppers @sokra\r\n*/\r\nvar stylesInDom = {},\r\n\tmemoize = function(fn) {\r\n\t\tvar memo;\r\n\t\treturn function () {\r\n\t\t\tif (typeof memo === \"undefined\") memo = fn.apply(this, arguments);\r\n\t\t\treturn memo;\r\n\t\t};\r\n\t},\r\n\tisOldIE = memoize(function() {\r\n\t\treturn /msie [6-9]\\b/.test(window.navigator.userAgent.toLowerCase());\r\n\t}),\r\n\tgetHeadElement = memoize(function () {\r\n\t\treturn document.head || document.getElementsByTagName(\"head\")[0];\r\n\t}),\r\n\tsingletonElement = null,\r\n\tsingletonCounter = 0,\r\n\tstyleElementsInsertedAtTop = [];\r\n\r\nmodule.exports = function(list, options) {\r\n\tif(typeof DEBUG !== \"undefined\" && DEBUG) {\r\n\t\tif(typeof document !== \"object\") throw new Error(\"The style-loader cannot be used in a non-browser environment\");\r\n\t}\r\n\r\n\toptions = options || {};\r\n\t// Force single-tag solution on IE6-9, which has a hard limit on the # of <style>\r\n\t// tags it will allow on a page\r\n\tif (typeof options.singleton === \"undefined\") options.singleton = isOldIE();\r\n\r\n\t// By default, add <style> tags to the bottom of <head>.\r\n\tif (typeof options.insertAt === \"undefined\") options.insertAt = \"bottom\";\r\n\r\n\tvar styles = listToStyles(list);\r\n\taddStylesToDom(styles, options);\r\n\r\n\treturn function update(newList) {\r\n\t\tvar mayRemove = [];\r\n\t\tfor(var i = 0; i < styles.length; i++) {\r\n\t\t\tvar item = styles[i];\r\n\t\t\tvar domStyle = stylesInDom[item.id];\r\n\t\t\tdomStyle.refs--;\r\n\t\t\tmayRemove.push(domStyle);\r\n\t\t}\r\n\t\tif(newList) {\r\n\t\t\tvar newStyles = listToStyles(newList);\r\n\t\t\taddStylesToDom(newStyles, options);\r\n\t\t}\r\n\t\tfor(var i = 0; i < mayRemove.length; i++) {\r\n\t\t\tvar domStyle = mayRemove[i];\r\n\t\t\tif(domStyle.refs === 0) {\r\n\t\t\t\tfor(var j = 0; j < domStyle.parts.length; j++)\r\n\t\t\t\t\tdomStyle.parts[j]();\r\n\t\t\t\tdelete stylesInDom[domStyle.id];\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n}\r\n\r\nfunction addStylesToDom(styles, options) {\r\n\tfor(var i = 0; i < styles.length; i++) {\r\n\t\tvar item = styles[i];\r\n\t\tvar domStyle = stylesInDom[item.id];\r\n\t\tif(domStyle) {\r\n\t\t\tdomStyle.refs++;\r\n\t\t\tfor(var j = 0; j < domStyle.parts.length; j++) {\r\n\t\t\t\tdomStyle.parts[j](item.parts[j]);\r\n\t\t\t}\r\n\t\t\tfor(; j < item.parts.length; j++) {\r\n\t\t\t\tdomStyle.parts.push(addStyle(item.parts[j], options));\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tvar parts = [];\r\n\t\t\tfor(var j = 0; j < item.parts.length; j++) {\r\n\t\t\t\tparts.push(addStyle(item.parts[j], options));\r\n\t\t\t}\r\n\t\t\tstylesInDom[item.id] = {id: item.id, refs: 1, parts: parts};\r\n\t\t}\r\n\t}\r\n}\r\n\r\nfunction listToStyles(list) {\r\n\tvar styles = [];\r\n\tvar newStyles = {};\r\n\tfor(var i = 0; i < list.length; i++) {\r\n\t\tvar item = list[i];\r\n\t\tvar id = item[0];\r\n\t\tvar css = item[1];\r\n\t\tvar media = item[2];\r\n\t\tvar sourceMap = item[3];\r\n\t\tvar part = {css: css, media: media, sourceMap: sourceMap};\r\n\t\tif(!newStyles[id])\r\n\t\t\tstyles.push(newStyles[id] = {id: id, parts: [part]});\r\n\t\telse\r\n\t\t\tnewStyles[id].parts.push(part);\r\n\t}\r\n\treturn styles;\r\n}\r\n\r\nfunction insertStyleElement(options, styleElement) {\r\n\tvar head = getHeadElement();\r\n\tvar lastStyleElementInsertedAtTop = styleElementsInsertedAtTop[styleElementsInsertedAtTop.length - 1];\r\n\tif (options.insertAt === \"top\") {\r\n\t\tif(!lastStyleElementInsertedAtTop) {\r\n\t\t\thead.insertBefore(styleElement, head.firstChild);\r\n\t\t} else if(lastStyleElementInsertedAtTop.nextSibling) {\r\n\t\t\thead.insertBefore(styleElement, lastStyleElementInsertedAtTop.nextSibling);\r\n\t\t} else {\r\n\t\t\thead.appendChild(styleElement);\r\n\t\t}\r\n\t\tstyleElementsInsertedAtTop.push(styleElement);\r\n\t} else if (options.insertAt === \"bottom\") {\r\n\t\thead.appendChild(styleElement);\r\n\t} else {\r\n\t\tthrow new Error(\"Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.\");\r\n\t}\r\n}\r\n\r\nfunction removeStyleElement(styleElement) {\r\n\tstyleElement.parentNode.removeChild(styleElement);\r\n\tvar idx = styleElementsInsertedAtTop.indexOf(styleElement);\r\n\tif(idx >= 0) {\r\n\t\tstyleElementsInsertedAtTop.splice(idx, 1);\r\n\t}\r\n}\r\n\r\nfunction createStyleElement(options) {\r\n\tvar styleElement = document.createElement(\"style\");\r\n\tstyleElement.type = \"text/css\";\r\n\tinsertStyleElement(options, styleElement);\r\n\treturn styleElement;\r\n}\r\n\r\nfunction createLinkElement(options) {\r\n\tvar linkElement = document.createElement(\"link\");\r\n\tlinkElement.rel = \"stylesheet\";\r\n\tinsertStyleElement(options, linkElement);\r\n\treturn linkElement;\r\n}\r\n\r\nfunction addStyle(obj, options) {\r\n\tvar styleElement, update, remove;\r\n\r\n\tif (options.singleton) {\r\n\t\tvar styleIndex = singletonCounter++;\r\n\t\tstyleElement = singletonElement || (singletonElement = createStyleElement(options));\r\n\t\tupdate = applyToSingletonTag.bind(null, styleElement, styleIndex, false);\r\n\t\tremove = applyToSingletonTag.bind(null, styleElement, styleIndex, true);\r\n\t} else if(obj.sourceMap &&\r\n\t\ttypeof URL === \"function\" &&\r\n\t\ttypeof URL.createObjectURL === \"function\" &&\r\n\t\ttypeof URL.revokeObjectURL === \"function\" &&\r\n\t\ttypeof Blob === \"function\" &&\r\n\t\ttypeof btoa === \"function\") {\r\n\t\tstyleElement = createLinkElement(options);\r\n\t\tupdate = updateLink.bind(null, styleElement);\r\n\t\tremove = function() {\r\n\t\t\tremoveStyleElement(styleElement);\r\n\t\t\tif(styleElement.href)\r\n\t\t\t\tURL.revokeObjectURL(styleElement.href);\r\n\t\t};\r\n\t} else {\r\n\t\tstyleElement = createStyleElement(options);\r\n\t\tupdate = applyToTag.bind(null, styleElement);\r\n\t\tremove = function() {\r\n\t\t\tremoveStyleElement(styleElement);\r\n\t\t};\r\n\t}\r\n\r\n\tupdate(obj);\r\n\r\n\treturn function updateStyle(newObj) {\r\n\t\tif(newObj) {\r\n\t\t\tif(newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap)\r\n\t\t\t\treturn;\r\n\t\t\tupdate(obj = newObj);\r\n\t\t} else {\r\n\t\t\tremove();\r\n\t\t}\r\n\t};\r\n}\r\n\r\nvar replaceText = (function () {\r\n\tvar textStore = [];\r\n\r\n\treturn function (index, replacement) {\r\n\t\ttextStore[index] = replacement;\r\n\t\treturn textStore.filter(Boolean).join('\\n');\r\n\t};\r\n})();\r\n\r\nfunction applyToSingletonTag(styleElement, index, remove, obj) {\r\n\tvar css = remove ? \"\" : obj.css;\r\n\r\n\tif (styleElement.styleSheet) {\r\n\t\tstyleElement.styleSheet.cssText = replaceText(index, css);\r\n\t} else {\r\n\t\tvar cssNode = document.createTextNode(css);\r\n\t\tvar childNodes = styleElement.childNodes;\r\n\t\tif (childNodes[index]) styleElement.removeChild(childNodes[index]);\r\n\t\tif (childNodes.length) {\r\n\t\t\tstyleElement.insertBefore(cssNode, childNodes[index]);\r\n\t\t} else {\r\n\t\t\tstyleElement.appendChild(cssNode);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nfunction applyToTag(styleElement, obj) {\r\n\tvar css = obj.css;\r\n\tvar media = obj.media;\r\n\r\n\tif(media) {\r\n\t\tstyleElement.setAttribute(\"media\", media)\r\n\t}\r\n\r\n\tif(styleElement.styleSheet) {\r\n\t\tstyleElement.styleSheet.cssText = css;\r\n\t} else {\r\n\t\twhile(styleElement.firstChild) {\r\n\t\t\tstyleElement.removeChild(styleElement.firstChild);\r\n\t\t}\r\n\t\tstyleElement.appendChild(document.createTextNode(css));\r\n\t}\r\n}\r\n\r\nfunction updateLink(linkElement, obj) {\r\n\tvar css = obj.css;\r\n\tvar sourceMap = obj.sourceMap;\r\n\r\n\tif(sourceMap) {\r\n\t\t// http://stackoverflow.com/a/26603875\r\n\t\tcss += \"\\n/*# sourceMappingURL=data:application/json;base64,\" + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + \" */\";\r\n\t}\r\n\r\n\tvar blob = new Blob([css], { type: \"text/css\" });\r\n\r\n\tvar oldSrc = linkElement.href;\r\n\r\n\tlinkElement.href = URL.createObjectURL(blob);\r\n\r\n\tif(oldSrc)\r\n\t\tURL.revokeObjectURL(oldSrc);\r\n}\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/adones/Projects/UNSAKINI/unsakini/angular/~/style-loader/addStyles.js\n// module id = 695\n// module chunks = 1"],"sourceRoot":""}
@@ -1 +0,0 @@
1
- /* You can add global styles to this file, and also import other style files */
@@ -1,73 +0,0 @@
1
- class Api::BoardsController < ApplicationController
2
-
3
-
4
- include LoggedInControllerConcern
5
- include SerializerControllerConcern
6
- include BoardOwnerControllerConcern
7
- include ::ActionController::Serialization
8
-
9
- before_action :ensure_board, :only => [:show, :update, :destroy]
10
- before_action :ensure_board_owner, :only => [:update, :destroy]
11
-
12
- # Returns boards belonging to current user
13
- #
14
- # `GET /api/boards`
15
- #
16
- def index
17
- admin = true
18
- shared = false
19
- admin = params[:is_admin] == 'true' if params[:admin]
20
- shared = params[:shared] == 'true' if params[:shared]
21
- result = @user.user_boards.shared(shared)
22
- result = result.admin if admin
23
- paginate json: result, per_page: 10
24
- end
25
-
26
- # Creates board belonging to current user.
27
- #
28
- # `POST /api/boards`
29
- #
30
- def create
31
- @user_board = UserBoard.new(
32
- name: params[:board][:name],
33
- user_id: @user.id,
34
- encrypted_password: params[:encrypted_password],
35
- is_admin: true
36
- )
37
- if @user_board.save
38
- render json: @user_board, status: :created
39
- else
40
- render json: @user_board.errors.full_messages, status: 422
41
- end
42
-
43
- end
44
-
45
- # Render a single board.
46
- #
47
- # `GET /api/boards/:id`
48
- #
49
- def show
50
- render json: @user_board
51
- end
52
-
53
- # Updates a single board.
54
- #
55
- # `PUT /api/boards/:id`
56
- def update
57
- if @user_board.update(name: params[:board][:name], encrypted_password: params[:encrypted_password])
58
- render json: @user_board
59
- else
60
- errors = @board.errors.full_messages.concat @user_board.errors.full_messages
61
- render json: errors, status: 422
62
- end
63
- end
64
-
65
- # Deletes a board resource.
66
- #
67
- # `DELETE /api/boards/:id`
68
- def destroy
69
- @board.destroy
70
- render json: {}, status: :ok
71
- end
72
-
73
- end
@@ -1,51 +0,0 @@
1
- class Api::CommentsController < ApplicationController
2
-
3
- include LoggedInControllerConcern
4
- include PostOwnerControllerConcern
5
- include CommentOwnerControllerConcern
6
- include ::ActionController::Serialization
7
-
8
- before_action :ensure_post, only: [:index, :create]
9
- before_action :ensure_comment, only: [:show, :update, :destroy]
10
- before_action :ensure_comment_owner, only: [:update, :destroy]
11
-
12
- # Renders the comments belonging to the post
13
- #
14
- # `GET /api/boards/:board_id/posts/:post_id/`
15
- def index
16
- paginate json: @post.comments.page(params[:page]), per_page: 20
17
- end
18
-
19
- # Creates new comment belonging to the post
20
- #
21
- # `POST /api/boards/:board_id/posts/:post_id/`
22
- def create
23
- @comment = Comment.new(params.permit(:content))
24
- @comment.user = @user
25
- @comment.post = @post
26
- if @comment.save
27
- render json: @comment
28
- else
29
- render json: @comment.errors, status: 422
30
- end
31
- end
32
-
33
- # Updates a comment
34
- #
35
- # `PUT /api/boards/:board_id/posts/:post_id/comments/:id`
36
- def update
37
- if @comment.update(params.permit(:content))
38
- render json: @comment
39
- else
40
- render json: @comment.errors, status: 422
41
- end
42
- end
43
-
44
- # Deletes a comment
45
- #
46
- # `DELETE /api/boards/:board_id/posts/:post_id/comments/:id`
47
- def destroy
48
- @comment.destroy
49
- render json: {}, status: :ok
50
- end
51
- end
@@ -1,58 +0,0 @@
1
- class Api::PostsController < ApplicationController
2
-
3
- include LoggedInControllerConcern
4
- include BoardOwnerControllerConcern
5
- include PostOwnerControllerConcern
6
- include ::ActionController::Serialization
7
-
8
- before_action :ensure_board, only: [:index, :create]
9
- before_action :ensure_post, only: [:show, :update, :destroy]
10
- before_action :ensure_post_owner, only: [:update, :destroy]
11
-
12
- # Renders the post belonging to the board
13
- #
14
- # `GET /api/boards/:board_id/posts`
15
- def index
16
- paginate json: @board.posts.page(params[:page]), per_page: 20
17
- end
18
-
19
- # Renders a single post belonging to the board
20
- #
21
- # `GET /api/boards/:board_id/posts/:id`
22
- def show
23
- render json: @post
24
- end
25
-
26
- # Creates a single post belonging to the board
27
- #
28
- # `POST /api/boards/:board_id/posts/`
29
- def create
30
- @post = Post.new(params.permit(:title, :content, :board_id))
31
- @post.user = @user
32
- if (@post.save)
33
- render json: @post, status: :created
34
- else
35
- render json: @post.errors, status: 422
36
- end
37
- end
38
-
39
- # Updates a single post belonging to the board
40
- #
41
- # `PUT /api/boards/:board_id/posts/:id`
42
- def update
43
- if (@post.update(params.permit(:title, :content)))
44
- render json: @post, status: :ok
45
- else
46
- render json: @post.errors, status: 422
47
- end
48
- end
49
-
50
- # Deletes a single post belonging to the board
51
- #
52
- # `DELETE /api/boards/:board_id/posts/:id`
53
- def destroy
54
- @post.destroy
55
- render json: {}, status: :ok
56
- end
57
-
58
- end
@@ -1,118 +0,0 @@
1
- class Api::ShareBoardController < ApplicationController
2
-
3
- include LoggedInControllerConcern
4
- include BoardOwnerControllerConcern
5
- include PostOwnerControllerConcern
6
- include CommentOwnerControllerConcern
7
-
8
- before_action :validate_params
9
-
10
- # Shares a board to other users. Example payload param:
11
- #
12
- # `POST /api/share/board`
13
- #
14
- # ```
15
- # {
16
- # board: {
17
- # id: 1,
18
- # name: 'some encrypted text',
19
- # },
20
- # posts: [
21
- # {
22
- # board_id: 1,
23
- # title: 'some encrypted text',
24
- # content: 'some encrypted text',
25
- # comments: [
26
- # {
27
- # id: 1,
28
- # content: 'some encrypted text',
29
- # user_id: 1,
30
- # post_id: 1,
31
- # }
32
- # ]
33
- # }
34
- # ],
35
- # shared_user_ids: [1, 2, 3, 4],
36
- # encrypted_password: 'some encrypted password'
37
- # }
38
- # ```
39
- # The `encrypted_password` param will be used to decrypt contents of this board. The encryption happens in the client so
40
- # the server don't really know what is the original password. The board creator will have to share it privately to other users whom he/she shared it with so they can access the board.
41
- #
42
- # `posts` and `comments` fields can be empty.
43
- def index
44
- ActiveRecord::Base.transaction do
45
- if params[:posts]
46
- params[:posts].each do |post|
47
- p = Post.find(post[:id])
48
- p.title = post[:title]
49
- p.content = post[:content]
50
- p.save!
51
-
52
- if post[:comments] and p.valid?
53
- post[:comments].each do |comment|
54
- c = Comment.find(comment[:id])
55
- c.content = comment[:content]
56
- c.save!
57
- end
58
- end
59
- end
60
- end
61
- if @user_board.share(params[:shared_user_ids], params[:encrypted_password])
62
- render json: {}, status: :ok
63
- else
64
- raise "An error occured"
65
- end
66
- end
67
- rescue
68
- # clean up the created {UserBoard}s
69
- render json: ["Some of the data can't be saved."], status: 422
70
- end
71
-
72
- # Validates the contents of params against the database records.
73
- def validate_params
74
-
75
- if params[:encrypted_password].nil? or params[:shared_user_ids].nil? or params[:board].nil?
76
- render json: {}, status: 422
77
- return
78
- end
79
-
80
- result = has_board_access(params[:board][:id])
81
- if result[:status] != :ok
82
- render json: {}, status: result[:status]
83
- return
84
- else
85
- if !result[:user_board].is_admin
86
- render json: {}, status: :forbidden
87
- return
88
- end
89
- @board = result[:board]
90
- @user_board = result[:user_board]
91
- end
92
-
93
- if params[:posts]
94
-
95
- params[:posts].each do |post|
96
- s = has_post_access(params[:board][:id], post[:id])[:status]
97
- if s != :ok
98
- render json: {}, status: s
99
- return
100
- end
101
-
102
- if post[:comments]
103
- post[:comments].each do |comment|
104
- s = has_comment_access(post[:id], comment[:id])[:status]
105
- if s != :ok
106
- render json: {}, status: s
107
- return
108
- end
109
- end
110
- end
111
-
112
- end
113
-
114
- end
115
-
116
- end
117
-
118
- end