xing-framework 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (216) hide show
  1. checksums.yaml +4 -4
  2. data/default_configuration/base_app/API_DOC/README +23 -0
  3. data/default_configuration/base_app/API_DOC/admin-menus +167 -0
  4. data/default_configuration/base_app/API_DOC/admin-pages +173 -0
  5. data/default_configuration/base_app/API_DOC/content-block +10 -0
  6. data/default_configuration/base_app/API_DOC/navigation +54 -0
  7. data/default_configuration/base_app/API_DOC/page +38 -0
  8. data/default_configuration/base_app/CHANGELOG.md +122 -0
  9. data/default_configuration/base_app/Capfile +26 -0
  10. data/default_configuration/base_app/Gemfile +7 -0
  11. data/default_configuration/base_app/Gemfile.lock +155 -0
  12. data/default_configuration/base_app/README.md +24 -0
  13. data/default_configuration/base_app/Rakefile +25 -0
  14. data/default_configuration/base_app/backend/Gemfile +45 -0
  15. data/default_configuration/base_app/backend/Gemfile.lock +292 -0
  16. data/default_configuration/base_app/backend/README +12 -0
  17. data/default_configuration/base_app/backend/Rakefile +10 -0
  18. data/default_configuration/base_app/backend/app/controllers/application_controller.rb +3 -0
  19. data/default_configuration/base_app/backend/app/controllers/confirmations_controller.rb +3 -0
  20. data/default_configuration/base_app/backend/app/controllers/passwords_controller.rb +3 -0
  21. data/default_configuration/base_app/backend/app/controllers/registrations_controller.rb +15 -0
  22. data/default_configuration/base_app/backend/app/models/ability.rb +13 -0
  23. data/default_configuration/base_app/backend/app/models/role/admin.rb +8 -0
  24. data/default_configuration/base_app/backend/app/models/user.rb +43 -0
  25. data/default_configuration/base_app/backend/autotest/discover.rb +2 -0
  26. data/default_configuration/base_app/backend/bin/bundle +3 -0
  27. data/default_configuration/base_app/backend/bin/rails +4 -0
  28. data/default_configuration/base_app/backend/bin/rake +4 -0
  29. data/default_configuration/base_app/backend/config.ru +6 -0
  30. data/default_configuration/base_app/backend/config/application.rb +71 -0
  31. data/default_configuration/base_app/backend/config/boot.rb +4 -0
  32. data/default_configuration/base_app/backend/config/database.yml.ci +9 -0
  33. data/default_configuration/base_app/backend/config/database.yml.example +22 -0
  34. data/default_configuration/base_app/backend/config/environment.rb +5 -0
  35. data/default_configuration/base_app/backend/config/environments/development.rb +45 -0
  36. data/default_configuration/base_app/backend/config/environments/production.rb +78 -0
  37. data/default_configuration/base_app/backend/config/environments/staging.rb +48 -0
  38. data/default_configuration/base_app/backend/config/environments/test.rb +47 -0
  39. data/default_configuration/base_app/backend/config/initializers/assets.rb +8 -0
  40. data/default_configuration/base_app/backend/config/initializers/backtrace_silencers.rb +7 -0
  41. data/default_configuration/base_app/backend/config/initializers/constants.rb +1 -0
  42. data/default_configuration/base_app/backend/config/initializers/cookies_serializer.rb +3 -0
  43. data/default_configuration/base_app/backend/config/initializers/devise.rb +241 -0
  44. data/default_configuration/base_app/backend/config/initializers/devise_token_auth.rb +22 -0
  45. data/default_configuration/base_app/backend/config/initializers/filter_parameter_logging.rb +4 -0
  46. data/default_configuration/base_app/backend/config/initializers/inflections.rb +16 -0
  47. data/default_configuration/base_app/backend/config/initializers/mime_types.rb +4 -0
  48. data/default_configuration/base_app/backend/config/initializers/session_store.rb +3 -0
  49. data/default_configuration/base_app/backend/config/initializers/smtp.rb +25 -0
  50. data/default_configuration/base_app/backend/config/initializers/time_formats.rb +12 -0
  51. data/default_configuration/base_app/backend/config/initializers/wrap_parameters.rb +14 -0
  52. data/default_configuration/base_app/backend/config/locales/en.yml +23 -0
  53. data/default_configuration/base_app/backend/config/locales/json.yml +29 -0
  54. data/default_configuration/base_app/backend/config/routes.rb +33 -0
  55. data/default_configuration/base_app/backend/config/secrets.yml.ci +22 -0
  56. data/default_configuration/base_app/backend/config/secrets.yml.example +57 -0
  57. data/default_configuration/base_app/backend/config/sidekiq.yml +4 -0
  58. data/default_configuration/base_app/backend/db/sample_data/users.rake +10 -0
  59. data/default_configuration/base_app/backend/db/seeds.rb +14 -0
  60. data/default_configuration/base_app/backend/lib/static-app.rb +15 -0
  61. data/default_configuration/base_app/backend/public/404.html +26 -0
  62. data/default_configuration/base_app/backend/public/422.html +26 -0
  63. data/default_configuration/base_app/backend/public/500.html +26 -0
  64. data/default_configuration/base_app/backend/public/favicon.ico +0 -0
  65. data/default_configuration/base_app/backend/public/index.html +0 -0
  66. data/default_configuration/base_app/backend/public/robots.txt +5 -0
  67. data/default_configuration/base_app/backend/script/rails +6 -0
  68. data/default_configuration/base_app/backend/spec/factories/user_sessions_factory.rb +6 -0
  69. data/default_configuration/base_app/backend/spec/factories/users_factory.rb +35 -0
  70. data/default_configuration/base_app/backend/spec/features/user_sends_reset_password_email_spec.rb +30 -0
  71. data/default_configuration/base_app/backend/spec/features/user_signs_up_spec.rb +32 -0
  72. data/default_configuration/base_app/backend/spec/models/role/admin_spec.rb +12 -0
  73. data/default_configuration/base_app/backend/spec/models/role_spec.rb +48 -0
  74. data/default_configuration/base_app/backend/spec/models/user_spec.rb +59 -0
  75. data/default_configuration/base_app/backend/spec/requests/resources_index_spec.rb +22 -0
  76. data/default_configuration/base_app/backend/spec/spec_helper.rb +65 -0
  77. data/default_configuration/base_app/backend/spec/support/devise_helper.rb +78 -0
  78. data/default_configuration/base_app/backend/spec/support/log_tests.rb +5 -0
  79. data/default_configuration/base_app/backend/spec/support/session_helpers.rb +67 -0
  80. data/default_configuration/base_app/backend/spec/tasks/sample_data_rake_spec.rb +17 -0
  81. data/default_configuration/base_app/backend/static-app.ru +3 -0
  82. data/default_configuration/base_app/codeclimate.yml +7 -0
  83. data/default_configuration/base_app/config/compass.rb +21 -0
  84. data/default_configuration/base_app/config/deploy.rb +157 -0
  85. data/default_configuration/base_app/config/deploy/bundle-config +4 -0
  86. data/default_configuration/base_app/config/deploy/production.rb +7 -0
  87. data/default_configuration/base_app/config/deploy/staging.rb +6 -0
  88. data/default_configuration/base_app/doc/01_fail_resources.txt +173 -0
  89. data/default_configuration/base_app/doc/02_fail_auth.txt +165 -0
  90. data/default_configuration/base_app/doc/03_fail_menus.txt +174 -0
  91. data/default_configuration/base_app/dummy-api/admin/menu_items/10.json +15 -0
  92. data/default_configuration/base_app/dummy-api/admin/menu_items/11.json +15 -0
  93. data/default_configuration/base_app/dummy-api/admin/menu_items/12.json +15 -0
  94. data/default_configuration/base_app/dummy-api/admin/menu_items/13.json +15 -0
  95. data/default_configuration/base_app/dummy-api/admin/menu_items/14.json +15 -0
  96. data/default_configuration/base_app/dummy-api/admin/menu_items/15.json +15 -0
  97. data/default_configuration/base_app/dummy-api/admin/menu_items/16.json +15 -0
  98. data/default_configuration/base_app/dummy-api/admin/menus.json +23 -0
  99. data/default_configuration/base_app/dummy-api/admin/menus/1.json +118 -0
  100. data/default_configuration/base_app/dummy-api/admin/menus/2.json +8 -0
  101. data/default_configuration/base_app/dummy-api/admin/pages.json +105 -0
  102. data/default_configuration/base_app/dummy-api/admin/pages/about_us.json +45 -0
  103. data/default_configuration/base_app/dummy-api/admin/pages/contact_us.json +36 -0
  104. data/default_configuration/base_app/dummy-api/admin/pages/gallery.json +36 -0
  105. data/default_configuration/base_app/dummy-api/admin/pages/home.json +36 -0
  106. data/default_configuration/base_app/dummy-api/admin/pages/homepage.json +18 -0
  107. data/default_configuration/base_app/dummy-api/admin/pages/links.json +36 -0
  108. data/default_configuration/base_app/dummy-api/admin/pages/newsletter.json +54 -0
  109. data/default_configuration/base_app/dummy-api/homepage.json +14 -0
  110. data/default_configuration/base_app/dummy-api/navigation/main.json +119 -0
  111. data/default_configuration/base_app/dummy-api/pages/about_us.json +41 -0
  112. data/default_configuration/base_app/dummy-api/pages/contact_us.json +32 -0
  113. data/default_configuration/base_app/dummy-api/pages/gallery.json +32 -0
  114. data/default_configuration/base_app/dummy-api/pages/home.json +32 -0
  115. data/default_configuration/base_app/dummy-api/pages/homepage.json +14 -0
  116. data/default_configuration/base_app/dummy-api/pages/links.json +32 -0
  117. data/default_configuration/base_app/dummy-api/pages/newsletter.json +50 -0
  118. data/default_configuration/base_app/dump.rdb +0 -0
  119. data/default_configuration/base_app/example-lrd-dev-tmux.conf +17 -0
  120. data/default_configuration/base_app/frontend/CHANGELOG.md +125 -0
  121. data/default_configuration/base_app/frontend/Gemfile +5 -0
  122. data/default_configuration/base_app/frontend/Gemfile.lock +34 -0
  123. data/default_configuration/base_app/frontend/Gruntfile.js +3 -0
  124. data/default_configuration/base_app/frontend/LICENSE +19 -0
  125. data/default_configuration/base_app/frontend/README.md +5 -0
  126. data/default_configuration/base_app/frontend/bin/index.html +0 -0
  127. data/default_configuration/base_app/frontend/build.config.js +110 -0
  128. data/default_configuration/base_app/frontend/changelog.tpl +23 -0
  129. data/default_configuration/base_app/frontend/config/compass.rb +33 -0
  130. data/default_configuration/base_app/frontend/config/environments/development.js +4 -0
  131. data/default_configuration/base_app/frontend/config/environments/integration.js +4 -0
  132. data/default_configuration/base_app/frontend/config/environments/production.js +3 -0
  133. data/default_configuration/base_app/frontend/config/environments/test.js +4 -0
  134. data/default_configuration/base_app/frontend/create +0 -0
  135. data/default_configuration/base_app/frontend/karma/karma-unit.tpl.js +80 -0
  136. data/default_configuration/base_app/frontend/module.prefix +1 -0
  137. data/default_configuration/base_app/frontend/module.suffix +1 -0
  138. data/default_configuration/base_app/frontend/npm-shrinkwrap.json +4334 -0
  139. data/default_configuration/base_app/frontend/package.json +75 -0
  140. data/default_configuration/base_app/frontend/sprockets/index.tpl.js +2 -0
  141. data/default_configuration/base_app/frontend/src/README.md +48 -0
  142. data/default_configuration/base_app/frontend/src/app/README.md +68 -0
  143. data/default_configuration/base_app/frontend/src/app/app.js +47 -0
  144. data/default_configuration/base_app/frontend/src/app/appConfig.js +19 -0
  145. data/default_configuration/base_app/frontend/src/app/auth/auth.js +66 -0
  146. data/default_configuration/base_app/frontend/src/app/auth/config.js +22 -0
  147. data/default_configuration/base_app/frontend/src/app/auth/confirmations/confirmations-success.tpl.html +1 -0
  148. data/default_configuration/base_app/frontend/src/app/auth/confirmations/confirmations.js +8 -0
  149. data/default_configuration/base_app/frontend/src/app/auth/confirmations/confirmationsStates.js +12 -0
  150. data/default_configuration/base_app/frontend/src/app/auth/passwords/passwords-request-success.tpl.html +3 -0
  151. data/default_configuration/base_app/frontend/src/app/auth/passwords/passwords-request.tpl.html +16 -0
  152. data/default_configuration/base_app/frontend/src/app/auth/passwords/passwords-update-success.tpl.html +3 -0
  153. data/default_configuration/base_app/frontend/src/app/auth/passwords/passwords-update.tpl.html +21 -0
  154. data/default_configuration/base_app/frontend/src/app/auth/passwords/passwords.js +11 -0
  155. data/default_configuration/base_app/frontend/src/app/auth/passwords/passwordsControllers.js +47 -0
  156. data/default_configuration/base_app/frontend/src/app/auth/passwords/passwordsStates.js +38 -0
  157. data/default_configuration/base_app/frontend/src/app/auth/registrations/registrations-success.tpl.html +1 -0
  158. data/default_configuration/base_app/frontend/src/app/auth/registrations/registrations.js +14 -0
  159. data/default_configuration/base_app/frontend/src/app/auth/registrations/registrations.tpl.html +37 -0
  160. data/default_configuration/base_app/frontend/src/app/auth/registrations/registrationsControllers.js +25 -0
  161. data/default_configuration/base_app/frontend/src/app/auth/registrations/registrationsStates.js +18 -0
  162. data/default_configuration/base_app/frontend/src/app/auth/sessions/sessions-success.tpl.html +1 -0
  163. data/default_configuration/base_app/frontend/src/app/auth/sessions/sessions.js +18 -0
  164. data/default_configuration/base_app/frontend/src/app/auth/sessions/sessions.tpl.html +25 -0
  165. data/default_configuration/base_app/frontend/src/app/auth/sessions/sessionsControllers.js +26 -0
  166. data/default_configuration/base_app/frontend/src/app/auth/sessions/sessionsStates.js +20 -0
  167. data/default_configuration/base_app/frontend/src/app/homepage/homepage-show.tpl.html +2 -0
  168. data/default_configuration/base_app/frontend/src/app/homepage/homepage.js +10 -0
  169. data/default_configuration/base_app/frontend/src/app/homepage/homepage.tpl.html +13 -0
  170. data/default_configuration/base_app/frontend/src/app/homepage/homepageControllers.js +9 -0
  171. data/default_configuration/base_app/frontend/src/app/homepage/homepageStates.js +22 -0
  172. data/default_configuration/base_app/frontend/src/app/inner.tpl.html +16 -0
  173. data/default_configuration/base_app/frontend/src/app/root.tpl.html +2 -0
  174. data/default_configuration/base_app/frontend/src/app/rootController.js +8 -0
  175. data/default_configuration/base_app/frontend/src/app/rootStates.js +20 -0
  176. data/default_configuration/base_app/frontend/src/assets/README.md +4 -0
  177. data/default_configuration/base_app/frontend/src/assets/icons/alert.svg +1 -0
  178. data/default_configuration/base_app/frontend/src/common/README.md +19 -0
  179. data/default_configuration/base_app/frontend/src/common/components/OnLoginDirective/OnLoginDirective.js +17 -0
  180. data/default_configuration/base_app/frontend/src/common/components/adminOnly/admin-only.tpl.html +4 -0
  181. data/default_configuration/base_app/frontend/src/common/components/adminOnly/adminOnly.js +23 -0
  182. data/default_configuration/base_app/frontend/src/common/components/sessionLinks/session-links.tpl.html +5 -0
  183. data/default_configuration/base_app/frontend/src/common/components/sessionLinks/sessionLinks.js +25 -0
  184. data/default_configuration/base_app/frontend/src/common/components/signOut/signOut.js +19 -0
  185. data/default_configuration/base_app/frontend/src/common/config.js +27 -0
  186. data/default_configuration/base_app/frontend/src/index.html +86 -0
  187. data/default_configuration/base_app/frontend/src/styles/_constants.sass +14 -0
  188. data/default_configuration/base_app/frontend/src/styles/main.sass +52 -0
  189. data/default_configuration/base_app/frontend/src/styles/partials/_footer.sass +18 -0
  190. data/default_configuration/base_app/frontend/src/styles/partials/_forms.sass +9 -0
  191. data/default_configuration/base_app/frontend/src/styles/partials/_layout.sass +17 -0
  192. data/default_configuration/base_app/frontend/src/styles/partials/_navbar.sass +10 -0
  193. data/default_configuration/base_app/frontend/src/styles/partials/_typography.sass +18 -0
  194. data/default_configuration/base_app/frontend/src/styles/states/_errorFallback.sass +7 -0
  195. data/default_configuration/base_app/frontend/src/styles/states/_root_homepage.sass +8 -0
  196. data/default_configuration/base_app/frontend/test-help/xpath.js +9 -0
  197. data/default_configuration/base_app/frontend/test/app.js +24 -0
  198. data/default_configuration/base_app/frontend/test/auth/confirmations/confirmationsStates.js +46 -0
  199. data/default_configuration/base_app/frontend/test/auth/passwords/passwordsControllers.js +193 -0
  200. data/default_configuration/base_app/frontend/test/auth/passwords/passwordsStates.js +108 -0
  201. data/default_configuration/base_app/frontend/test/auth/registrations/registrationsControllers.js +117 -0
  202. data/default_configuration/base_app/frontend/test/auth/registrations/registrationsStates.js +64 -0
  203. data/default_configuration/base_app/frontend/test/auth/sessions/sessionsControllers.js +95 -0
  204. data/default_configuration/base_app/frontend/test/auth/sessions/sessionsStates.js +67 -0
  205. data/default_configuration/base_app/frontend/test/specHelper.js +33 -0
  206. data/default_configuration/base_app/frontend/test/support/mockDirective.js +13 -0
  207. data/default_configuration/base_app/frontend/test/support/stateResolveFn.js +3 -0
  208. data/default_configuration/base_app/frontend/test/support/testStates.js +20 -0
  209. data/default_configuration/base_app/frontend/tools.md +223 -0
  210. data/default_configuration/base_app/lib/capistrano/tasks/sidekiq.rake +218 -0
  211. data/default_configuration/base_app/static-app.ru +3 -0
  212. data/default_configuration/base_app/tmux-windows +68 -0
  213. data/default_configuration/base_app/tmux-windows.txt +53 -0
  214. data/lib/xing/cli.rb +8 -3
  215. data/lib/xing/cli/generators/new_project.rb +48 -13
  216. metadata +219 -7
@@ -0,0 +1,17 @@
1
+ export default class OnLoginDirective {
2
+
3
+ constructor($rootScope, $auth) {
4
+ this.$rootScope = $rootScope;
5
+ this.$auth = $auth;
6
+ this.onLogout();
7
+ this.$auth.validateUser().then((user) => {
8
+ this.onLogin(user);
9
+ });
10
+ this.$rootScope.$on('auth:login-success', (ev, user) => {
11
+ this.onLogin(user);
12
+ });
13
+ this.$rootScope.$on('auth:logout-success', (ev, user) => {
14
+ this.onLogout();
15
+ });
16
+ }
17
+ }
@@ -0,0 +1,4 @@
1
+ <div ng-if="adminOnly.showAdmin">
2
+ <div ng-transclude>
3
+ </div>
4
+ </div>
@@ -0,0 +1,23 @@
1
+ import { Module, Component, Template } from 'a1atscript';
2
+ import OnLoginDirective from 'components/OnLoginDirective/OnLoginDirective.js';
3
+
4
+ @Module('adminOnly', ['ng-token-auth'])
5
+ @Component({
6
+ selector: 'adminOnly',
7
+ services: ['$rootScope', '$auth'],
8
+ transclude: true
9
+ })
10
+ @Template({
11
+ url: 'components/adminOnly/admin-only.tpl.html'
12
+ })
13
+ export default class AdminOnly extends OnLoginDirective {
14
+
15
+ onLogout() {
16
+ this.showAdmin = false;
17
+ }
18
+
19
+ onLogin(user) {
20
+ this.showAdmin = true;
21
+ }
22
+
23
+ }
@@ -0,0 +1,5 @@
1
+ <ul class="session-links">
2
+ <li ng-hide="lrdSessionLinks.isLoggedIn"><a ui-sref='root.inner.registrations'>Sign Up</a></li>
3
+ <li ng-hide="lrdSessionLinks.isLoggedIn"><a ui-sref='root.inner.sessions'>Sign In</a></li>
4
+ <li ng-show="lrdSessionLinks.isLoggedIn"><a lrd-sign-out>Sign Out</a></li>
5
+ </ul>
@@ -0,0 +1,25 @@
1
+ import SignOut from 'components/signOut/signOut.js';
2
+ import {Module, Component, Template} from 'a1atscript';
3
+ import OnLoginDirective from 'components/OnLoginDirective/OnLoginDirective.js';
4
+
5
+ @Module( 'sessionLinks', [
6
+ 'ng-token-auth',
7
+ SignOut])
8
+ @Component({
9
+ selector: 'lrdSessionLinks',
10
+ services: ['$rootScope', '$auth']
11
+ })
12
+ @Template({
13
+ url: 'components/sessionLinks/session-links.tpl.html'
14
+ })
15
+ export default class SessionLinks extends OnLoginDirective {
16
+
17
+ onLogin(user) {
18
+ this.isLoggedIn = true;
19
+ }
20
+
21
+ onLogout() {
22
+ this.isLoggedIn = false;
23
+ }
24
+
25
+ }
@@ -0,0 +1,19 @@
1
+ import {Module, DirectiveObject} from 'a1atscript';
2
+
3
+ @Module('signOutDirective', ['ng-token-auth', 'ui.router.state'])
4
+ @DirectiveObject('lrdSignOut', ['$state', '$auth'])
5
+ export default class SignOut {
6
+ constructor($state, $auth) {
7
+ this.$state = $state;
8
+ this.$auth = $auth;
9
+ this.restrict = 'A';
10
+ }
11
+
12
+ link(scope, element, attrs) {
13
+ element.on('click',() => {
14
+ this.$auth.signOut().then((response) => {
15
+ this.$state.go('root.homepage.show');
16
+ });
17
+ });
18
+ }
19
+ }
@@ -0,0 +1,27 @@
1
+ import { environment } from "./environment.js";
2
+
3
+
4
+ export var backendUrl = (function(){
5
+ var cookies = [];
6
+ if(document.cookie) {
7
+ cookies = document.cookie.split(';');
8
+ }
9
+
10
+ var matches = cookies.filter((cookie) => {
11
+ return /^lrdBackendUrl=/.test(cookie);
12
+ });
13
+
14
+ if(matches.length > 0) {
15
+ return matches[0].split('=')[1];
16
+ } else {
17
+ return environment.backendUrl;
18
+ }
19
+ }());
20
+ export var appName = "LRD-CMS2";
21
+ export var configuration = { backendUrl, appName };
22
+
23
+ if(environment.name){
24
+ configuration.appTitle = `${configuration.appName} - ${environment.name}`;
25
+ } else {
26
+ configuration.appTitle = configuration.appName;
27
+ }
@@ -0,0 +1,86 @@
1
+ <!DOCTYPE html>
2
+ <html ng-app="<%= appName %>" ng-strict-di>
3
+ <head>
4
+ <!-- page information -->
5
+ <title>Xing Framework Based Website</title>
6
+
7
+ <!-- angular html5mode base url -->
8
+ <base href="/">
9
+
10
+ <!-- let google know there is ajax content -->
11
+ <meta name="fragment" content="!">
12
+
13
+ <!-- a value for snapshoting services to check to for page javascript complete -->
14
+ <meta name="ready-var" content="window.frontendContentLoaded">
15
+
16
+ <!-- enable mobile responsiveness -->
17
+ <meta name="viewport" content="width=device-width, initial-scale=1.0;">
18
+
19
+ <!-- compiled CSS --><% styles.forEach( function ( file ) { %>
20
+ <link rel="stylesheet" type="text/css" href="<%= file %>" /><% }); %>
21
+
22
+ <!-- compiled JavaScript --><% scripts.forEach( function ( file ) { %>
23
+ <script type="text/javascript" src="<%= file %>"></script><% }); %>
24
+
25
+ <style>
26
+
27
+ .intro-loading-circle-outer {
28
+ position: fixed;
29
+ top: 0;
30
+ left: 0;
31
+ right: 0;
32
+ bottom: 0;
33
+ }
34
+
35
+ .intro-loading-circle-inner {
36
+ position: absolute;
37
+ top: 50%;
38
+ left: 50%;
39
+ margin-left: -100px;
40
+ margin-top: -100px;
41
+ }
42
+
43
+ .intro-loading-circle {
44
+ margin-top: 40px;
45
+ margin-left: 60px;
46
+ margin-right: 60px;
47
+ width: 80px;
48
+ height: 80px;
49
+ border-radius: 40px;
50
+ -webkit-box-sizing: border-box;
51
+ border: solid 10px rgba(255, 255, 255, 0.2);
52
+ border-top-color: #FFF;
53
+ -webkit-animation: spin 1s infinite linear;
54
+ }
55
+
56
+ @-webkit-keyframes spin {
57
+ 100% {
58
+ -webkit-transform: rotate(360deg);
59
+ }
60
+ }
61
+
62
+ .intro-loading-text {
63
+ color: white;
64
+ text-align: center;
65
+ }
66
+ </style>
67
+
68
+ </head>
69
+
70
+
71
+ <body>
72
+ <div id='wrap'>
73
+ <ui-view lrd-state-attrs>
74
+ <div class="intro-loading-circle-outer">
75
+ <div class="intro-loading-circle-inner">
76
+ <div class="intro-loading-circle">
77
+ </div>
78
+ <h3 class="intro-loading-text">
79
+ Loading Content...
80
+ </h3>
81
+ </div>
82
+ </div>
83
+ </ui-view>
84
+ </div>
85
+ </body>
86
+ </html>
@@ -0,0 +1,14 @@
1
+ $navbar_link_h_padding: 10px
2
+ $navbar_link_v_padding: 10px
3
+
4
+ $call_to_action_color: #8E5
5
+
6
+ $error_bg_color: #e9b2b2
7
+
8
+ @mixin error_notice_colors
9
+ border-width: 2px
10
+ border-style: solid
11
+ border-color: #ff4444
12
+ background: $error_bg_color
13
+
14
+ $link_color: #00e
@@ -0,0 +1,52 @@
1
+ $include-clearfix: true
2
+ /**
3
+ * This is the main application stylesheet. It should include or import all
4
+ * stylesheets used throughout the application as this is the only stylesheet in
5
+ * the Grunt configuration that is automatically processed.
6
+ */
7
+
8
+
9
+ /**
10
+ * First, we include vendor files Only the ones used in the
11
+ * project should be imported as the rest are just wasting space.
12
+ */
13
+
14
+ @import "compass"
15
+ @import "compass/reset"
16
+ @import "breakpoint-sass/stylesheets/breakpoint"
17
+ @import "xing-framework-sass/sassybuttons"
18
+ @import "singularitygs/stylesheets/singularitygs"
19
+
20
+ // fontawesome. the constant is required to override the default
21
+ // path so that the FA styles will find the fonts in the place our
22
+ // assets build puts them
23
+ $fa-font-path: '../assets'
24
+ @import "font-awesome/scss/font-awesome"
25
+
26
+
27
+ // Load reusable constants. First the framework defaults,
28
+ // then any app overides.
29
+ @import "xing-framework-sass/_default_constants"
30
+ @import "_constants"
31
+
32
+ // Framework default styling for common DOM structures
33
+ // Don't edit these files in an individual project. In the base framework,
34
+ // try only to make edits that will not break projects.
35
+ @import "xing-framework-sass/_base"
36
+ @import "xing-framework-sass/_forms"
37
+ @import "xing-framework-sass/_navbar"
38
+ @import "xing-framework-sass/_flexbox"
39
+ @import "xing-framework-sass/_errorFallback"
40
+
41
+ // Application-specific style files. Add new files below this line.
42
+ // Default-override group. These files all have equivalents in xing-framework-sass/
43
+ @import "partials/_forms"
44
+ @import "partials/_navbar"
45
+ @import "partials/_footer"
46
+
47
+ // Project-specific group. Put files new to a project under here.
48
+ @import "partials/_layout"
49
+ @import "partials/_typography"
50
+
51
+ @import "states/root_homepage"
52
+ @import "states/errorFallback"
@@ -0,0 +1,18 @@
1
+ footer
2
+ position: relative
3
+ font-size: 80%
4
+ margin-top: 2em
5
+ padding: 2em
6
+ text-align: center
7
+ background: #333
8
+ color: white
9
+ @include background-image(radial-gradient(100px 50px, #505050 100px, #222 400px))
10
+
11
+ span
12
+ display: inline-block
13
+ margin: 0 1em
14
+
15
+ #sign-in-link
16
+ position: absolute
17
+ bottom: 5px
18
+ right: 5px
@@ -0,0 +1,9 @@
1
+ // Application-specific forms styling should go in this file
2
+ // As a combination of new styles, and override of defaults
3
+
4
+ // This mixin is itself a combination of mixins defined in framework/_forms.sass.
5
+ // You can customize by:
6
+ // * Overriding rules
7
+ // * Including only the sub-mixins you care about
8
+ // * Removing this include entirely and writing new rules
9
+ @include lrd-form-defaults
@@ -0,0 +1,17 @@
1
+ body
2
+ background-color: $main_background_color
3
+ font-family: sans-serif
4
+
5
+ #wrap
6
+ background-color: white
7
+ max-width: 1024px
8
+ margin: 0 auto
9
+ box-sizing: border-box
10
+ margin-top: 1em
11
+
12
+ #root_inner, #root_homepage
13
+ > ui-view
14
+ @include add-grid(12)
15
+ @include add-gutter(1/3)
16
+ @include sgs-change('output', 'isolation')
17
+ padding: 1em gutter-span()
@@ -0,0 +1,10 @@
1
+ // Application-specific navigation bar styling should go in this file
2
+ // As a combination of new styles, and override of defaults
3
+
4
+
5
+ // This mixin is itself a combination of mixins defined in framework/_navbar.sass.
6
+ // You can customize by:
7
+ // * Overriding rules
8
+ // * Including only the sub-mixins you care about
9
+ // * Removing this include entirely and writing new rules
10
+ @include lrd-navbar-defaults
@@ -0,0 +1,18 @@
1
+ body
2
+ font-family: sans-serif
3
+
4
+ h1, h2, h3, h4
5
+ font-weight: bold
6
+ margin: .5em 0
7
+
8
+ h1
9
+ font-size: 200%
10
+
11
+ h2
12
+ font-size: 160%
13
+
14
+ h3
15
+ font-size: 120%
16
+
17
+ h4
18
+ font-size: 100%
@@ -0,0 +1,7 @@
1
+ /* Default page when a critical error occurs. */
2
+
3
+ #errorFallback
4
+ @include flexbox-absolute-center
5
+
6
+ .error
7
+ @include xing-fallback-error-defaults
@@ -0,0 +1,8 @@
1
+
2
+ #root_homepage
3
+ h1
4
+ border-bottom: 1px black solid
5
+
6
+ // Sub-state styles can be put in the same file, if they aren't long enough
7
+ // to deserve a separate file.
8
+ #root_homepage_show
@@ -0,0 +1,9 @@
1
+ export function xpath(context, expr, resType){
2
+ if(!resType) { resType = XPathResult.ORDERED_NODE_SNAPSHOT_TYPE; }
3
+ var result = document.evaluate(expr, context[0], null, resType, null);
4
+ return result;
5
+ }
6
+
7
+ export function stringAtXpath(context, expr){
8
+ return xpath(context, expr, XPathResult.STRING_TYPE).stringValue;
9
+ }
@@ -0,0 +1,24 @@
1
+ import '../src/app/app.js';
2
+ import {appName} from 'config';
3
+
4
+ describe( 'RootCtrl', function() {
5
+ describe( 'isCurrentUrl', function() {
6
+ var RootCtrl, $location, $scope, mockMain;
7
+
8
+ beforeEach( module( appName ) );
9
+
10
+ beforeEach( inject( function( $controller, _$location_, $rootScope ) {
11
+ $location = _$location_;
12
+ $scope = $rootScope.$new();
13
+ mockMain = {
14
+ children: {}
15
+ };
16
+
17
+ RootCtrl = $controller( 'RootCtrl', { $location: $location, $scope: $scope });
18
+ }));
19
+
20
+ it( 'should pass a dummy test', inject( function() {
21
+ expect( RootCtrl ).toBeTruthy();
22
+ }));
23
+ });
24
+ });
@@ -0,0 +1,46 @@
1
+ import {appName} from 'config';
2
+ import {} from '../../../src/app/auth/auth.js';
3
+ import {} from '../../support/testStates.js';
4
+ import {LoggedInOnlyState} from "stateClasses";
5
+
6
+ describe('confirmations states', function() {
7
+
8
+ var $rootScope, $state, $injector, state, $auth, $q;
9
+
10
+ beforeEach(function() {
11
+
12
+ module(`${appName}.testStates`);
13
+
14
+ module(`${appName}.auth.confirmations`);
15
+
16
+ inject(function(_$rootScope_, _$state_, _$injector_, $templateCache, _$q_, _$auth_) {
17
+ $rootScope = _$rootScope_;
18
+ $state = _$state_;
19
+ $injector = _$injector_;
20
+ $q = _$q_;
21
+
22
+ $auth = _$auth_;
23
+
24
+ $templateCache.put('auth/confirmations/confirmations-success.tpl.html', '');
25
+ });
26
+ });
27
+
28
+ describe("confirmationsSuccess", function() {
29
+
30
+ beforeEach(function() {
31
+ state = $state.get('root.inner.confirmationsSuccess');
32
+ });
33
+
34
+ it('should extend LoggedInOnlyState', function() {
35
+ expect(state instanceof LoggedInOnlyState).toBe(true);
36
+ });
37
+
38
+ it('should respond to URL', function() {
39
+ expect($state.href(state)).toEqual('#/confirmed');
40
+ });
41
+
42
+ it('should render the sessions template', function() {
43
+ expect(state.templateUrl).toEqual('auth/confirmations/confirmations-success.tpl.html');
44
+ });
45
+ });
46
+ });