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.
- checksums.yaml +4 -4
- data/default_configuration/base_app/API_DOC/README +23 -0
- data/default_configuration/base_app/API_DOC/admin-menus +167 -0
- data/default_configuration/base_app/API_DOC/admin-pages +173 -0
- data/default_configuration/base_app/API_DOC/content-block +10 -0
- data/default_configuration/base_app/API_DOC/navigation +54 -0
- data/default_configuration/base_app/API_DOC/page +38 -0
- data/default_configuration/base_app/CHANGELOG.md +122 -0
- data/default_configuration/base_app/Capfile +26 -0
- data/default_configuration/base_app/Gemfile +7 -0
- data/default_configuration/base_app/Gemfile.lock +155 -0
- data/default_configuration/base_app/README.md +24 -0
- data/default_configuration/base_app/Rakefile +25 -0
- data/default_configuration/base_app/backend/Gemfile +45 -0
- data/default_configuration/base_app/backend/Gemfile.lock +292 -0
- data/default_configuration/base_app/backend/README +12 -0
- data/default_configuration/base_app/backend/Rakefile +10 -0
- data/default_configuration/base_app/backend/app/controllers/application_controller.rb +3 -0
- data/default_configuration/base_app/backend/app/controllers/confirmations_controller.rb +3 -0
- data/default_configuration/base_app/backend/app/controllers/passwords_controller.rb +3 -0
- data/default_configuration/base_app/backend/app/controllers/registrations_controller.rb +15 -0
- data/default_configuration/base_app/backend/app/models/ability.rb +13 -0
- data/default_configuration/base_app/backend/app/models/role/admin.rb +8 -0
- data/default_configuration/base_app/backend/app/models/user.rb +43 -0
- data/default_configuration/base_app/backend/autotest/discover.rb +2 -0
- data/default_configuration/base_app/backend/bin/bundle +3 -0
- data/default_configuration/base_app/backend/bin/rails +4 -0
- data/default_configuration/base_app/backend/bin/rake +4 -0
- data/default_configuration/base_app/backend/config.ru +6 -0
- data/default_configuration/base_app/backend/config/application.rb +71 -0
- data/default_configuration/base_app/backend/config/boot.rb +4 -0
- data/default_configuration/base_app/backend/config/database.yml.ci +9 -0
- data/default_configuration/base_app/backend/config/database.yml.example +22 -0
- data/default_configuration/base_app/backend/config/environment.rb +5 -0
- data/default_configuration/base_app/backend/config/environments/development.rb +45 -0
- data/default_configuration/base_app/backend/config/environments/production.rb +78 -0
- data/default_configuration/base_app/backend/config/environments/staging.rb +48 -0
- data/default_configuration/base_app/backend/config/environments/test.rb +47 -0
- data/default_configuration/base_app/backend/config/initializers/assets.rb +8 -0
- data/default_configuration/base_app/backend/config/initializers/backtrace_silencers.rb +7 -0
- data/default_configuration/base_app/backend/config/initializers/constants.rb +1 -0
- data/default_configuration/base_app/backend/config/initializers/cookies_serializer.rb +3 -0
- data/default_configuration/base_app/backend/config/initializers/devise.rb +241 -0
- data/default_configuration/base_app/backend/config/initializers/devise_token_auth.rb +22 -0
- data/default_configuration/base_app/backend/config/initializers/filter_parameter_logging.rb +4 -0
- data/default_configuration/base_app/backend/config/initializers/inflections.rb +16 -0
- data/default_configuration/base_app/backend/config/initializers/mime_types.rb +4 -0
- data/default_configuration/base_app/backend/config/initializers/session_store.rb +3 -0
- data/default_configuration/base_app/backend/config/initializers/smtp.rb +25 -0
- data/default_configuration/base_app/backend/config/initializers/time_formats.rb +12 -0
- data/default_configuration/base_app/backend/config/initializers/wrap_parameters.rb +14 -0
- data/default_configuration/base_app/backend/config/locales/en.yml +23 -0
- data/default_configuration/base_app/backend/config/locales/json.yml +29 -0
- data/default_configuration/base_app/backend/config/routes.rb +33 -0
- data/default_configuration/base_app/backend/config/secrets.yml.ci +22 -0
- data/default_configuration/base_app/backend/config/secrets.yml.example +57 -0
- data/default_configuration/base_app/backend/config/sidekiq.yml +4 -0
- data/default_configuration/base_app/backend/db/sample_data/users.rake +10 -0
- data/default_configuration/base_app/backend/db/seeds.rb +14 -0
- data/default_configuration/base_app/backend/lib/static-app.rb +15 -0
- data/default_configuration/base_app/backend/public/404.html +26 -0
- data/default_configuration/base_app/backend/public/422.html +26 -0
- data/default_configuration/base_app/backend/public/500.html +26 -0
- data/default_configuration/base_app/backend/public/favicon.ico +0 -0
- data/default_configuration/base_app/backend/public/index.html +0 -0
- data/default_configuration/base_app/backend/public/robots.txt +5 -0
- data/default_configuration/base_app/backend/script/rails +6 -0
- data/default_configuration/base_app/backend/spec/factories/user_sessions_factory.rb +6 -0
- data/default_configuration/base_app/backend/spec/factories/users_factory.rb +35 -0
- data/default_configuration/base_app/backend/spec/features/user_sends_reset_password_email_spec.rb +30 -0
- data/default_configuration/base_app/backend/spec/features/user_signs_up_spec.rb +32 -0
- data/default_configuration/base_app/backend/spec/models/role/admin_spec.rb +12 -0
- data/default_configuration/base_app/backend/spec/models/role_spec.rb +48 -0
- data/default_configuration/base_app/backend/spec/models/user_spec.rb +59 -0
- data/default_configuration/base_app/backend/spec/requests/resources_index_spec.rb +22 -0
- data/default_configuration/base_app/backend/spec/spec_helper.rb +65 -0
- data/default_configuration/base_app/backend/spec/support/devise_helper.rb +78 -0
- data/default_configuration/base_app/backend/spec/support/log_tests.rb +5 -0
- data/default_configuration/base_app/backend/spec/support/session_helpers.rb +67 -0
- data/default_configuration/base_app/backend/spec/tasks/sample_data_rake_spec.rb +17 -0
- data/default_configuration/base_app/backend/static-app.ru +3 -0
- data/default_configuration/base_app/codeclimate.yml +7 -0
- data/default_configuration/base_app/config/compass.rb +21 -0
- data/default_configuration/base_app/config/deploy.rb +157 -0
- data/default_configuration/base_app/config/deploy/bundle-config +4 -0
- data/default_configuration/base_app/config/deploy/production.rb +7 -0
- data/default_configuration/base_app/config/deploy/staging.rb +6 -0
- data/default_configuration/base_app/doc/01_fail_resources.txt +173 -0
- data/default_configuration/base_app/doc/02_fail_auth.txt +165 -0
- data/default_configuration/base_app/doc/03_fail_menus.txt +174 -0
- data/default_configuration/base_app/dummy-api/admin/menu_items/10.json +15 -0
- data/default_configuration/base_app/dummy-api/admin/menu_items/11.json +15 -0
- data/default_configuration/base_app/dummy-api/admin/menu_items/12.json +15 -0
- data/default_configuration/base_app/dummy-api/admin/menu_items/13.json +15 -0
- data/default_configuration/base_app/dummy-api/admin/menu_items/14.json +15 -0
- data/default_configuration/base_app/dummy-api/admin/menu_items/15.json +15 -0
- data/default_configuration/base_app/dummy-api/admin/menu_items/16.json +15 -0
- data/default_configuration/base_app/dummy-api/admin/menus.json +23 -0
- data/default_configuration/base_app/dummy-api/admin/menus/1.json +118 -0
- data/default_configuration/base_app/dummy-api/admin/menus/2.json +8 -0
- data/default_configuration/base_app/dummy-api/admin/pages.json +105 -0
- data/default_configuration/base_app/dummy-api/admin/pages/about_us.json +45 -0
- data/default_configuration/base_app/dummy-api/admin/pages/contact_us.json +36 -0
- data/default_configuration/base_app/dummy-api/admin/pages/gallery.json +36 -0
- data/default_configuration/base_app/dummy-api/admin/pages/home.json +36 -0
- data/default_configuration/base_app/dummy-api/admin/pages/homepage.json +18 -0
- data/default_configuration/base_app/dummy-api/admin/pages/links.json +36 -0
- data/default_configuration/base_app/dummy-api/admin/pages/newsletter.json +54 -0
- data/default_configuration/base_app/dummy-api/homepage.json +14 -0
- data/default_configuration/base_app/dummy-api/navigation/main.json +119 -0
- data/default_configuration/base_app/dummy-api/pages/about_us.json +41 -0
- data/default_configuration/base_app/dummy-api/pages/contact_us.json +32 -0
- data/default_configuration/base_app/dummy-api/pages/gallery.json +32 -0
- data/default_configuration/base_app/dummy-api/pages/home.json +32 -0
- data/default_configuration/base_app/dummy-api/pages/homepage.json +14 -0
- data/default_configuration/base_app/dummy-api/pages/links.json +32 -0
- data/default_configuration/base_app/dummy-api/pages/newsletter.json +50 -0
- data/default_configuration/base_app/dump.rdb +0 -0
- data/default_configuration/base_app/example-lrd-dev-tmux.conf +17 -0
- data/default_configuration/base_app/frontend/CHANGELOG.md +125 -0
- data/default_configuration/base_app/frontend/Gemfile +5 -0
- data/default_configuration/base_app/frontend/Gemfile.lock +34 -0
- data/default_configuration/base_app/frontend/Gruntfile.js +3 -0
- data/default_configuration/base_app/frontend/LICENSE +19 -0
- data/default_configuration/base_app/frontend/README.md +5 -0
- data/default_configuration/base_app/frontend/bin/index.html +0 -0
- data/default_configuration/base_app/frontend/build.config.js +110 -0
- data/default_configuration/base_app/frontend/changelog.tpl +23 -0
- data/default_configuration/base_app/frontend/config/compass.rb +33 -0
- data/default_configuration/base_app/frontend/config/environments/development.js +4 -0
- data/default_configuration/base_app/frontend/config/environments/integration.js +4 -0
- data/default_configuration/base_app/frontend/config/environments/production.js +3 -0
- data/default_configuration/base_app/frontend/config/environments/test.js +4 -0
- data/default_configuration/base_app/frontend/create +0 -0
- data/default_configuration/base_app/frontend/karma/karma-unit.tpl.js +80 -0
- data/default_configuration/base_app/frontend/module.prefix +1 -0
- data/default_configuration/base_app/frontend/module.suffix +1 -0
- data/default_configuration/base_app/frontend/npm-shrinkwrap.json +4334 -0
- data/default_configuration/base_app/frontend/package.json +75 -0
- data/default_configuration/base_app/frontend/sprockets/index.tpl.js +2 -0
- data/default_configuration/base_app/frontend/src/README.md +48 -0
- data/default_configuration/base_app/frontend/src/app/README.md +68 -0
- data/default_configuration/base_app/frontend/src/app/app.js +47 -0
- data/default_configuration/base_app/frontend/src/app/appConfig.js +19 -0
- data/default_configuration/base_app/frontend/src/app/auth/auth.js +66 -0
- data/default_configuration/base_app/frontend/src/app/auth/config.js +22 -0
- data/default_configuration/base_app/frontend/src/app/auth/confirmations/confirmations-success.tpl.html +1 -0
- data/default_configuration/base_app/frontend/src/app/auth/confirmations/confirmations.js +8 -0
- data/default_configuration/base_app/frontend/src/app/auth/confirmations/confirmationsStates.js +12 -0
- data/default_configuration/base_app/frontend/src/app/auth/passwords/passwords-request-success.tpl.html +3 -0
- data/default_configuration/base_app/frontend/src/app/auth/passwords/passwords-request.tpl.html +16 -0
- data/default_configuration/base_app/frontend/src/app/auth/passwords/passwords-update-success.tpl.html +3 -0
- data/default_configuration/base_app/frontend/src/app/auth/passwords/passwords-update.tpl.html +21 -0
- data/default_configuration/base_app/frontend/src/app/auth/passwords/passwords.js +11 -0
- data/default_configuration/base_app/frontend/src/app/auth/passwords/passwordsControllers.js +47 -0
- data/default_configuration/base_app/frontend/src/app/auth/passwords/passwordsStates.js +38 -0
- data/default_configuration/base_app/frontend/src/app/auth/registrations/registrations-success.tpl.html +1 -0
- data/default_configuration/base_app/frontend/src/app/auth/registrations/registrations.js +14 -0
- data/default_configuration/base_app/frontend/src/app/auth/registrations/registrations.tpl.html +37 -0
- data/default_configuration/base_app/frontend/src/app/auth/registrations/registrationsControllers.js +25 -0
- data/default_configuration/base_app/frontend/src/app/auth/registrations/registrationsStates.js +18 -0
- data/default_configuration/base_app/frontend/src/app/auth/sessions/sessions-success.tpl.html +1 -0
- data/default_configuration/base_app/frontend/src/app/auth/sessions/sessions.js +18 -0
- data/default_configuration/base_app/frontend/src/app/auth/sessions/sessions.tpl.html +25 -0
- data/default_configuration/base_app/frontend/src/app/auth/sessions/sessionsControllers.js +26 -0
- data/default_configuration/base_app/frontend/src/app/auth/sessions/sessionsStates.js +20 -0
- data/default_configuration/base_app/frontend/src/app/homepage/homepage-show.tpl.html +2 -0
- data/default_configuration/base_app/frontend/src/app/homepage/homepage.js +10 -0
- data/default_configuration/base_app/frontend/src/app/homepage/homepage.tpl.html +13 -0
- data/default_configuration/base_app/frontend/src/app/homepage/homepageControllers.js +9 -0
- data/default_configuration/base_app/frontend/src/app/homepage/homepageStates.js +22 -0
- data/default_configuration/base_app/frontend/src/app/inner.tpl.html +16 -0
- data/default_configuration/base_app/frontend/src/app/root.tpl.html +2 -0
- data/default_configuration/base_app/frontend/src/app/rootController.js +8 -0
- data/default_configuration/base_app/frontend/src/app/rootStates.js +20 -0
- data/default_configuration/base_app/frontend/src/assets/README.md +4 -0
- data/default_configuration/base_app/frontend/src/assets/icons/alert.svg +1 -0
- data/default_configuration/base_app/frontend/src/common/README.md +19 -0
- data/default_configuration/base_app/frontend/src/common/components/OnLoginDirective/OnLoginDirective.js +17 -0
- data/default_configuration/base_app/frontend/src/common/components/adminOnly/admin-only.tpl.html +4 -0
- data/default_configuration/base_app/frontend/src/common/components/adminOnly/adminOnly.js +23 -0
- data/default_configuration/base_app/frontend/src/common/components/sessionLinks/session-links.tpl.html +5 -0
- data/default_configuration/base_app/frontend/src/common/components/sessionLinks/sessionLinks.js +25 -0
- data/default_configuration/base_app/frontend/src/common/components/signOut/signOut.js +19 -0
- data/default_configuration/base_app/frontend/src/common/config.js +27 -0
- data/default_configuration/base_app/frontend/src/index.html +86 -0
- data/default_configuration/base_app/frontend/src/styles/_constants.sass +14 -0
- data/default_configuration/base_app/frontend/src/styles/main.sass +52 -0
- data/default_configuration/base_app/frontend/src/styles/partials/_footer.sass +18 -0
- data/default_configuration/base_app/frontend/src/styles/partials/_forms.sass +9 -0
- data/default_configuration/base_app/frontend/src/styles/partials/_layout.sass +17 -0
- data/default_configuration/base_app/frontend/src/styles/partials/_navbar.sass +10 -0
- data/default_configuration/base_app/frontend/src/styles/partials/_typography.sass +18 -0
- data/default_configuration/base_app/frontend/src/styles/states/_errorFallback.sass +7 -0
- data/default_configuration/base_app/frontend/src/styles/states/_root_homepage.sass +8 -0
- data/default_configuration/base_app/frontend/test-help/xpath.js +9 -0
- data/default_configuration/base_app/frontend/test/app.js +24 -0
- data/default_configuration/base_app/frontend/test/auth/confirmations/confirmationsStates.js +46 -0
- data/default_configuration/base_app/frontend/test/auth/passwords/passwordsControllers.js +193 -0
- data/default_configuration/base_app/frontend/test/auth/passwords/passwordsStates.js +108 -0
- data/default_configuration/base_app/frontend/test/auth/registrations/registrationsControllers.js +117 -0
- data/default_configuration/base_app/frontend/test/auth/registrations/registrationsStates.js +64 -0
- data/default_configuration/base_app/frontend/test/auth/sessions/sessionsControllers.js +95 -0
- data/default_configuration/base_app/frontend/test/auth/sessions/sessionsStates.js +67 -0
- data/default_configuration/base_app/frontend/test/specHelper.js +33 -0
- data/default_configuration/base_app/frontend/test/support/mockDirective.js +13 -0
- data/default_configuration/base_app/frontend/test/support/stateResolveFn.js +3 -0
- data/default_configuration/base_app/frontend/test/support/testStates.js +20 -0
- data/default_configuration/base_app/frontend/tools.md +223 -0
- data/default_configuration/base_app/lib/capistrano/tasks/sidekiq.rake +218 -0
- data/default_configuration/base_app/static-app.ru +3 -0
- data/default_configuration/base_app/tmux-windows +68 -0
- data/default_configuration/base_app/tmux-windows.txt +53 -0
- data/lib/xing/cli.rb +8 -3
- data/lib/xing/cli/generators/new_project.rb +48 -13
- 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,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>
|
data/default_configuration/base_app/frontend/src/common/components/sessionLinks/sessionLinks.js
ADDED
@@ -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,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
|
+
});
|