mno-enterprise-frontend 2.0.9 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/mno_enterprise/angular/app.js.coffee.erb +0 -120
- data/app/assets/javascripts/mno_enterprise/angular/directives/maestrano-components/maestrano-components.js.coffee +0 -11
- data/app/assets/javascripts/mno_enterprise/application.js +0 -2
- data/app/assets/javascripts/mno_enterprise/lib/xeditable.js +0 -0
- data/app/assets/stylesheets/mno_enterprise/main.less +0 -28
- data/app/views/layouts/mno_enterprise/_application_js.html.haml +0 -4
- data/app/views/layouts/mno_enterprise/_common_cdn_lib_js.html.haml +0 -5
- data/app/views/layouts/mno_enterprise/_header_files.html.haml +0 -3
- data/app/views/layouts/mno_enterprise/application.html.haml +1 -1
- data/app/views/mno_enterprise/provision/_provision_apps.html.haml +7 -8
- data/config/routes.rb +1 -10
- data/lib/mno_enterprise/frontend/engine.rb +12 -0
- data/lib/mno_enterprise/frontend/locales_generator.rb +57 -0
- data/lib/tasks/mnoe_admin_tasks.rake +67 -0
- data/lib/tasks/mnoe_frontend_tasks.rake +138 -0
- data/lib/tasks/mnoe_locales.rake +14 -0
- data/lib/tasks/templates/bower.json +10 -0
- data/spec/controllers/mno_enterprise/auth/confirmations_controller_spec.rb +2 -2
- data/spec/controllers/mno_enterprise/webhook/o_auth_controller_spec.rb +1 -1
- data/spec/lib/mno_enterprise/locales_generator_spec.rb +14 -0
- data/spec/lib/tasks/mnoe_locales_rake_spec.rb +25 -0
- metadata +35 -145
- data/app/assets/images/mno_enterprise/impac/close-widget-pink.png +0 -0
- data/app/assets/images/mno_enterprise/impac/close-widget.png +0 -0
- data/app/assets/javascripts/mno_enterprise/angular/controllers/maestrano-controllers.js.coffee +0 -4
- data/app/assets/javascripts/mno_enterprise/angular/controllers/modals/modals-ctrl.js.coffee +0 -62
- data/app/assets/javascripts/mno_enterprise/angular/directives/dashboard/dashboard-account.js.coffee +0 -157
- data/app/assets/javascripts/mno_enterprise/angular/directives/dashboard/dashboard-app-deletion-request.js.coffee +0 -62
- data/app/assets/javascripts/mno_enterprise/angular/directives/dashboard/dashboard-apps-list.js.coffee +0 -127
- data/app/assets/javascripts/mno_enterprise/angular/directives/dashboard/dashboard-components.js.coffee +0 -25
- data/app/assets/javascripts/mno_enterprise/angular/directives/dashboard/dashboard-marketplace-app.js.coffee +0 -77
- data/app/assets/javascripts/mno_enterprise/angular/directives/dashboard/dashboard-marketplace.js.coffee +0 -51
- data/app/assets/javascripts/mno_enterprise/angular/directives/dashboard/dashboard-menu.js.coffee +0 -174
- data/app/assets/javascripts/mno_enterprise/angular/directives/dashboard/organization/arrears.js.coffee +0 -70
- data/app/assets/javascripts/mno_enterprise/angular/directives/dashboard/organization/billing.js.coffee +0 -48
- data/app/assets/javascripts/mno_enterprise/angular/directives/dashboard/organization/credit-card.js.coffee +0 -142
- data/app/assets/javascripts/mno_enterprise/angular/directives/dashboard/organization/index.js.coffee +0 -61
- data/app/assets/javascripts/mno_enterprise/angular/directives/dashboard/organization/invoices.js.coffee +0 -42
- data/app/assets/javascripts/mno_enterprise/angular/directives/dashboard/organization/members.js.coffee +0 -280
- data/app/assets/javascripts/mno_enterprise/angular/directives/dashboard/organization/settings.js.coffee +0 -91
- data/app/assets/javascripts/mno_enterprise/angular/directives/dashboard/organization/team-list.js.coffee +0 -179
- data/app/assets/javascripts/mno_enterprise/angular/directives/dashboard/organization/teams.js.coffee +0 -268
- data/app/assets/javascripts/mno_enterprise/angular/directives/maestrano-components/file-model.js.coffee +0 -33
- data/app/assets/javascripts/mno_enterprise/angular/directives/maestrano-components/mno-autostop-app.js.coffee +0 -123
- data/app/assets/javascripts/mno_enterprise/angular/directives/maestrano-components/mno-currency-widget.js.coffee +0 -43
- data/app/assets/javascripts/mno_enterprise/angular/directives/maestrano-components/mno-current-currency.js.coffee +0 -22
- data/app/assets/javascripts/mno_enterprise/angular/directives/maestrano-components/mno-editable.js.coffee +0 -68
- data/app/assets/javascripts/mno_enterprise/angular/directives/maestrano-components/mno-helptext.js.coffee +0 -38
- data/app/assets/javascripts/mno_enterprise/angular/directives/maestrano-components/mno-match.js.coffee +0 -14
- data/app/assets/javascripts/mno_enterprise/angular/directives/maestrano-components/mno-message-modal.js.coffee +0 -56
- data/app/assets/javascripts/mno_enterprise/angular/directives/maestrano-components/mno-partner-code-popup.js.coffee +0 -74
- data/app/assets/javascripts/mno_enterprise/angular/directives/maestrano-components/mno-partner-contact.js.coffee +0 -59
- data/app/assets/javascripts/mno_enterprise/angular/directives/maestrano-components/mno-price-converter.js.coffee +0 -49
- data/app/assets/javascripts/mno_enterprise/angular/directives/maestrano-components/mno-scroll-to.js.coffee +0 -14
- data/app/assets/javascripts/mno_enterprise/angular/directives/maestrano-components/mno-typeahead.js.coffee +0 -89
- data/app/assets/javascripts/mno_enterprise/angular/directives/user-setup/components.js.coffee +0 -7
- data/app/assets/javascripts/mno_enterprise/angular/directives/user-setup/index.js.coffee +0 -256
- data/app/assets/javascripts/mno_enterprise/angular/filters/maestrano-app-by-category.js.coffee +0 -5
- data/app/assets/javascripts/mno_enterprise/angular/filters/maestrano-currency.js.coffee +0 -30
- data/app/assets/javascripts/mno_enterprise/angular/filters/maestrano-filters.js.coffee +0 -7
- data/app/assets/javascripts/mno_enterprise/angular/filters/maestrano-replace-underscore-with-space.js.coffee +0 -4
- data/app/assets/javascripts/mno_enterprise/angular/filters/maestrano-titleize.js.coffee +0 -7
- data/app/assets/javascripts/mno_enterprise/angular/filters/maestrano-truncate.js.coffee +0 -24
- data/app/assets/javascripts/mno_enterprise/angular/services/dashboard/maestrano-app-instance.js.coffee +0 -15
- data/app/assets/javascripts/mno_enterprise/angular/services/dashboard/maestrano-apps-document.js.coffee +0 -83
- data/app/assets/javascripts/mno_enterprise/angular/services/dashboard/maestrano-user.js.coffee +0 -27
- data/app/assets/javascripts/mno_enterprise/angular/services/dashboard/organization-svc.js.coffee +0 -318
- data/app/assets/javascripts/mno_enterprise/angular/services/dashboard/team-svc.js.coffee +0 -180
- data/app/assets/javascripts/mno_enterprise/angular/services/dashboard/tickets-svc.js.coffee +0 -109
- data/app/assets/javascripts/mno_enterprise/angular/services/impac-config.svc.js.coffee +0 -35
- data/app/assets/javascripts/mno_enterprise/angular/services/maestrano-apps-list-helper.js.coffee +0 -337
- data/app/assets/javascripts/mno_enterprise/angular/services/maestrano-current-currency.js.coffee +0 -7
- data/app/assets/javascripts/mno_enterprise/angular/services/maestrano-current-user-svc.js.coffee +0 -99
- data/app/assets/javascripts/mno_enterprise/angular/services/maestrano-exchange-rates.js.coffee +0 -102
- data/app/assets/javascripts/mno_enterprise/angular/services/maestrano-miscellaneous.js.coffee.erb +0 -46
- data/app/assets/javascripts/mno_enterprise/angular/services/maestrano-modal.js.coffee +0 -67
- data/app/assets/javascripts/mno_enterprise/angular/services/maestrano-services.js.coffee +0 -21
- data/app/assets/javascripts/mno_enterprise/angular/services/maestrano-shopping-cart.js.coffee +0 -361
- data/app/assets/javascripts/mno_enterprise/angular/services/marketplace-svc.js.coffee +0 -59
- data/app/assets/javascripts/mno_enterprise/lib/angular-really-click.js +0 -17
- data/app/assets/javascripts/ng-performance/ngPerformance.html +0 -109
- data/app/assets/javascripts/ng-performance/ngPerformance.js +0 -211
- data/app/assets/stylesheets/mno_enterprise/custom/impac-variables-override.less +0 -65
- data/app/assets/stylesheets/mno_enterprise/custom/utility/app-presentation.less +0 -77
- data/app/assets/stylesheets/mno_enterprise/custom/utility/banners.less +0 -145
- data/app/assets/stylesheets/mno_enterprise/custom/utility/carousel.less +0 -68
- data/app/assets/stylesheets/mno_enterprise/custom/utility/helptext.less +0 -40
- data/app/assets/stylesheets/mno_enterprise/custom/utility/miscellaneous.less +0 -134
- data/app/assets/stylesheets/mno_enterprise/custom/utility/testimonial.less +0 -118
- data/app/assets/stylesheets/mno_enterprise/custom/views/apps.less +0 -243
- data/app/assets/stylesheets/mno_enterprise/custom/views/myspace.less +0 -477
- data/app/assets/stylesheets/mno_enterprise/custom/views/pages/home.less +0 -57
- data/app/assets/stylesheets/mno_enterprise/custom/views/star.less +0 -18
- data/app/assets/stylesheets/mno_enterprise/custom/views/templates/dashboard/bootstrap-wizard.less +0 -63
- data/app/assets/stylesheets/mno_enterprise/custom/views/templates/dashboard/dashboard-marketplace.less +0 -187
- data/app/assets/stylesheets/mno_enterprise/custom/views/templates/dashboard/dashboard-organization.less +0 -149
- data/app/assets/stylesheets/mno_enterprise/custom/views/templates/dashboard/dashboard-teams.less +0 -119
- data/app/assets/stylesheets/mno_enterprise/custom/views/templates/dashboard/support.less +0 -42
- data/app/assets/stylesheets/mno_enterprise/custom/views/templates/dashboard/tickets.less +0 -80
- data/app/assets/stylesheets/mno_enterprise/custom/views/templates/mno-editable.less +0 -60
- data/app/assets/stylesheets/mno_enterprise/custom/views/templates/shopping-cart.less +0 -333
- data/app/assets/stylesheets/mno_enterprise/custom/views/templates/star-wizard.less +0 -49
- data/app/assets/stylesheets/mno_enterprise/custom/views/user-setup.less +0 -10
- data/app/assets/templates/mno_enterprise/dashboard/account.html +0 -131
- data/app/assets/templates/mno_enterprise/dashboard/app_deletion.html +0 -36
- data/app/assets/templates/mno_enterprise/dashboard/apps_list.html +0 -103
- data/app/assets/templates/mno_enterprise/dashboard/horizontal_menu.html +0 -85
- data/app/assets/templates/mno_enterprise/dashboard/marketplace/index.html +0 -60
- data/app/assets/templates/mno_enterprise/dashboard/marketplace/show.html +0 -133
- data/app/assets/templates/mno_enterprise/dashboard/menu.html +0 -161
- data/app/assets/templates/mno_enterprise/dashboard/organization/arrears.html +0 -37
- data/app/assets/templates/mno_enterprise/dashboard/organization/billing.html +0 -37
- data/app/assets/templates/mno_enterprise/dashboard/organization/credit-card.html +0 -156
- data/app/assets/templates/mno_enterprise/dashboard/organization/index.full.html +0 -181
- data/app/assets/templates/mno_enterprise/dashboard/organization/index.html +0 -173
- data/app/assets/templates/mno_enterprise/dashboard/organization/invoices.html +0 -27
- data/app/assets/templates/mno_enterprise/dashboard/organization/members.html +0 -288
- data/app/assets/templates/mno_enterprise/dashboard/organization/settings.html +0 -55
- data/app/assets/templates/mno_enterprise/dashboard/teams/index.html +0 -175
- data/app/assets/templates/mno_enterprise/dashboard/teams/member-add-modal.html +0 -60
- data/app/assets/templates/mno_enterprise/dashboard/teams/member-removal-modal.html +0 -35
- data/app/assets/templates/mno_enterprise/dashboard/teams/team-add-modal.html +0 -35
- data/app/assets/templates/mno_enterprise/dashboard/teams/team-delete-modal.html +0 -35
- data/app/assets/templates/mno_enterprise/dashboard/teams/team-list.html +0 -107
- data/app/assets/templates/mno_enterprise/default_template.html +0 -20
- data/app/assets/templates/mno_enterprise/maestrano-components/autostop_app.html +0 -42
- data/app/assets/templates/mno_enterprise/maestrano-components/currency_widget.html +0 -1
- data/app/assets/templates/mno_enterprise/maestrano-components/editable.html +0 -28
- data/app/assets/templates/mno_enterprise/maestrano-components/modal-messages/congratulations.html +0 -8
- data/app/assets/templates/mno_enterprise/maestrano-components/modal-messages/default.html +0 -1
- data/app/assets/templates/mno_enterprise/maestrano-components/modal-messages/information.html +0 -8
- data/app/assets/templates/mno_enterprise/maestrano-components/star_wizard.html +0 -254
- data/app/assets/templates/mno_enterprise/maestrano-components/upload_spreadsheet.html +0 -191
- data/app/assets/templates/mno_enterprise/modals/new-organization-reseller-req.html +0 -35
- data/app/assets/templates/mno_enterprise/modals/new-organization.html +0 -35
- data/app/assets/templates/mno_enterprise/user-setup/index.html +0 -312
- data/app/controllers/mno_enterprise/pages_controller.rb +0 -9
- data/app/controllers/mno_enterprise/user_setup_controller.rb +0 -11
- data/app/views/layouts/mno_enterprise/_impersonate_header.html.haml +0 -7
- data/app/views/layouts/mno_enterprise/application_dashboard.html.haml +0 -22
- data/app/views/mno_enterprise/pages/myspace.html.haml +0 -6
- data/app/views/mno_enterprise/user_setup/index.html.haml +0 -2
- data/config/initializers/ng-performance.rb +0 -3
- data/lib/assets/javascripts/impac-angular.js +0 -8719
- data/lib/assets/stylesheets/impac-angular.less +0 -2352
- data/lib/mno_enterprise/frontend/concerns/README.md +0 -6
- data/lib/mno_enterprise/frontend/concerns/controllers/pages_controller.rb +0 -25
- data/spec/controllers/mno_enterprise/pages_controller_spec.rb +0 -42
- data/spec/controllers/mno_enterprise/user_setup_controller_spec.rb +0 -33
- data/spec/routing/mno_enterprise/pages_controller_routing_spec.rb +0 -18
- data/spec/routing/mno_enterprise/user_setup_controller_routing_spec.rb +0 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7ca853b16581c4ebb4317dff4d89e3cb13bde619
|
4
|
+
data.tar.gz: f8cd05060ac5af0084597bd4ecee0f1a100c1e45
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: efb2018562bc4b8df2b2829ea1e5de01f60c761791e57aba89ce0369d30bf33e8ae96040fce5a2bf43a5bf9e88211429e7adafcb09c460e8dff98e5e84b85da0
|
7
|
+
data.tar.gz: fc21eea6233475436b9f8c1351fbc8b0b66c9c922e4bb0be82e66323b5bb1d141a9ddb3c6ea80cac04617e7231e9dfdc7e71e0e2cd37f792a05d25e44aee63f7
|
@@ -5,34 +5,15 @@ mnoAppModules = [
|
|
5
5
|
'ngRoute',
|
6
6
|
'ngSanitize',
|
7
7
|
'xeditable',
|
8
|
-
'ngReallyClick',
|
9
8
|
'ui.bootstrap',
|
10
9
|
|
11
10
|
# Internal libraries
|
12
11
|
'maestrano.assets',
|
13
12
|
'maestrano.utilities',
|
14
13
|
'maestrano.components',
|
15
|
-
'maestrano.controllers',
|
16
14
|
'maestrano.message-bus',
|
17
|
-
'maestrano.exchange-rates',
|
18
|
-
'maestrano.services',
|
19
|
-
'maestrano.filters',
|
20
|
-
|
21
|
-
# Frontend modules
|
22
|
-
'maestrano.dashboard',
|
23
|
-
'maestrano.impac',
|
24
|
-
'maestrano.user-setup'
|
25
15
|
]
|
26
16
|
|
27
|
-
# Add Angular Material if requested
|
28
|
-
<% if MnoEnterprise.style.design.material %>
|
29
|
-
mnoAppModules.push('ngMaterial')
|
30
|
-
<% end %>
|
31
|
-
|
32
|
-
<% if Rails.env.development? %>
|
33
|
-
mnoAppModules.push('blndspt.ngPerformance')
|
34
|
-
<% end %>
|
35
|
-
|
36
17
|
# Declare the application
|
37
18
|
@maestranoApp = angular.module('maestrano',mnoAppModules)
|
38
19
|
|
@@ -64,110 +45,9 @@ mnoAppModules.push('blndspt.ngPerformance')
|
|
64
45
|
return $httpProvider
|
65
46
|
])
|
66
47
|
|
67
|
-
# Configure routes
|
68
|
-
@maestranoApp.config(['$routeProvider', ($routeProvider) ->
|
69
|
-
if window.location.pathname == '/mnoe/myspace'
|
70
|
-
$routeProvider.
|
71
|
-
when('/', {
|
72
|
-
template: "<div dashboard-apps-list></div>"
|
73
|
-
}).
|
74
|
-
when('/account', {
|
75
|
-
template: "<div dashboard-account></div>"
|
76
|
-
}).
|
77
|
-
when('/company', {
|
78
|
-
template: "<div dashboard-organization-index></div>"
|
79
|
-
}).
|
80
|
-
when('/support', {
|
81
|
-
template: "<div dashboard-support></div>"
|
82
|
-
}).
|
83
|
-
when('/billing', {
|
84
|
-
redirectTo: '/company'
|
85
|
-
}).
|
86
|
-
when('/marketplace', {
|
87
|
-
template: "<div dashboard-marketplace></div>"
|
88
|
-
}).
|
89
|
-
when('/marketplace/:appId', {
|
90
|
-
template: "<div dashboard-marketplace-app></div>"
|
91
|
-
}).
|
92
|
-
when('/impac', {
|
93
|
-
template: "<div impac-dashboard ></div>"
|
94
|
-
}).
|
95
|
-
otherwise({
|
96
|
-
redirectTo: '/'
|
97
|
-
})
|
98
|
-
])
|
99
|
-
|
100
|
-
# Configure Angular Material Theme
|
101
|
-
<% if MnoEnterprise.style.design.material %>
|
102
|
-
@maestranoApp.config(['$mdThemingProvider', ($mdThemingProvider) ->
|
103
|
-
$mdThemingProvider.theme('default')
|
104
|
-
.primaryPalette('<%= MnoEnterprise.style.palette.primary %>')
|
105
|
-
.accentPalette('<%= MnoEnterprise.style.palette.accent %>')
|
106
|
-
.warnPalette('<%= MnoEnterprise.style.palette.warn %>')
|
107
|
-
.backgroundPalette('<%= MnoEnterprise.style.palette.background %>')
|
108
|
-
])
|
109
|
-
<% end %>
|
110
|
-
|
111
|
-
|
112
48
|
# Configure asset in rootScope
|
113
49
|
@maestranoApp.run(['$rootScope', 'AssetPath', 'TemplatePath','editableOptions', ($rootScope, AssetPath, TemplatePath, editableOptions) ->
|
114
50
|
$rootScope.assetPath = AssetPath
|
115
51
|
$rootScope.templatePath = TemplatePath
|
116
52
|
editableOptions.theme = 'bs3'
|
117
53
|
])
|
118
|
-
|
119
|
-
|
120
|
-
# ----- IMPAC ANGULAR PROVIDER CONFIGURATIONS
|
121
|
-
#======================================================================================
|
122
|
-
# IMPAC-LINKING: Require core data
|
123
|
-
#======================================================================================
|
124
|
-
@maestranoApp.run (ImpacLinking, ImpacConfigSvc) ->
|
125
|
-
|
126
|
-
data =
|
127
|
-
user: ImpacConfigSvc.getUserData
|
128
|
-
organizations: ImpacConfigSvc.getOrganizations
|
129
|
-
|
130
|
-
ImpacLinking.linkData(data)
|
131
|
-
|
132
|
-
#======================================================================================
|
133
|
-
# IMPAC-ROUTES: Configuring API routes
|
134
|
-
#======================================================================================
|
135
|
-
@maestranoApp.run (ImpacRoutes) ->
|
136
|
-
|
137
|
-
data =
|
138
|
-
dhbBasePath: '/mnoe/jpi/v1/impac/dashboards'
|
139
|
-
widgetBasePath: '/mnoe/jpi/v1/impac/widgets'
|
140
|
-
showWidgetPath: '<%= "#{MnoEnterprise.impac_api_host}#{MnoEnterprise.impac_api_root_path}/v1/get_widget" %>'
|
141
|
-
# Disables widgets suggestions
|
142
|
-
# sendWidgetSuggestionPath: 'mnoe/jpi/v1/mailers'
|
143
|
-
impacKpisBasePath: '<%= "#{MnoEnterprise.impac_api_host}#{MnoEnterprise.impac_api_root_path}/v2/kpis" %>'
|
144
|
-
kpiBasePath: '/mnoe/jpi/v1/impac/kpis'
|
145
|
-
|
146
|
-
ImpacRoutes.configureRoutes(data)
|
147
|
-
|
148
|
-
#======================================================================================
|
149
|
-
# IMPAC-ASSETS: Configuring static assets
|
150
|
-
#======================================================================================
|
151
|
-
@maestranoApp.run (ImpacAssets, AssetPath) ->
|
152
|
-
|
153
|
-
paths =
|
154
|
-
dataNotFound: '<%= image_path("impac/data_not_found") %>'
|
155
|
-
# impacTitleLogo: '<%= image_path("impac/transparent-logo.png") %>'
|
156
|
-
# impacDashboardBackground: '<%= image_path("impac/impac_background.png") %>'
|
157
|
-
|
158
|
-
ImpacAssets.configure(paths)
|
159
|
-
|
160
|
-
#======================================================================================
|
161
|
-
# IMPAC-THEMES: Configuring colour themes, and enabling/disabling UI functionality.
|
162
|
-
#======================================================================================
|
163
|
-
@maestranoApp.run (ImpacTheming) ->
|
164
|
-
|
165
|
-
data =
|
166
|
-
dhbConfig:
|
167
|
-
showDhbHeading: true
|
168
|
-
dhbHeadingText: ''
|
169
|
-
# kpis options
|
170
|
-
dhbKpisConfig:
|
171
|
-
enableKpis: false
|
172
|
-
|
173
|
-
ImpacTheming.configure(data)
|
@@ -1,21 +1,10 @@
|
|
1
1
|
# This main module requires all the sub-modules that should compose it
|
2
2
|
# This pattern allows us to split a fat module in several files
|
3
3
|
maestranoComponents = angular.module('maestrano.components', [
|
4
|
-
'maestrano.components.mno-match',
|
5
4
|
'maestrano.components.mno-flash-msg',
|
6
|
-
'maestrano.components.mno-helptext',
|
7
|
-
'maestrano.components.mno-autostop-app',
|
8
5
|
'maestrano.components.mno-notification-widget',
|
9
6
|
'maestrano.components.mno-loading-lounge',
|
10
|
-
'maestrano.components.mno-scroll-to',
|
11
|
-
'maestrano.components.mno-currency-widget',
|
12
|
-
'maestrano.components.file-model',
|
13
|
-
'maestrano.components.mno-price-converter',
|
14
|
-
'maestrano.components.mno-current-currency',
|
15
7
|
'maestrano.components.mno-password-strength',
|
16
|
-
'maestrano.components.mno-editable',
|
17
|
-
'maestrano.components.mno-typeahead',
|
18
|
-
'maestrano.components.mno-message-modal',
|
19
8
|
'maestrano.components.mno-compile',
|
20
9
|
'maestrano.components.mno-password',
|
21
10
|
]
|
File without changes
|
@@ -78,26 +78,15 @@
|
|
78
78
|
/*-----------------------------------------------------------------------*/
|
79
79
|
/* Include the utilities spreadsheets */
|
80
80
|
/*-----------------------------------------------------------------------*/
|
81
|
-
@import "custom/utility/helptext";
|
82
|
-
@import "custom/utility/banners";
|
83
|
-
@import "custom/utility/testimonial";
|
84
81
|
@import "custom/utility/text";
|
85
|
-
@import "custom/utility/miscellaneous";
|
86
|
-
@import "custom/utility/app-presentation";
|
87
82
|
@import "custom/utility/step";
|
88
83
|
@import "custom/utility/progress-bar";
|
89
|
-
@import "custom/utility/carousel";
|
90
84
|
@import "custom/utility/tabset";
|
91
85
|
|
92
86
|
/*-----------------------------------------------------------------------*/
|
93
87
|
/* Include the stylsheets specific to the views */
|
94
88
|
/*-----------------------------------------------------------------------*/
|
95
|
-
@import "custom/views/myspace";
|
96
|
-
@import "custom/views/pages/home";
|
97
|
-
@import "custom/views/apps";
|
98
89
|
@import "custom/views/registration";
|
99
|
-
@import "custom/views/star";
|
100
|
-
@import "custom/views/user-setup";
|
101
90
|
|
102
91
|
@import "custom/views/pages/confirmation_lounge";
|
103
92
|
@import "custom/views/pages/oauth-config-page";
|
@@ -105,28 +94,11 @@
|
|
105
94
|
/*-----------------------------------------------------------------------*/
|
106
95
|
/* Include the stylsheets specific to angular templates */
|
107
96
|
/*-----------------------------------------------------------------------*/
|
108
|
-
@import "custom/views/templates/mno-editable";
|
109
97
|
@import "custom/views/templates/notification-widget";
|
110
98
|
@import "custom/views/templates/password-strength";
|
111
|
-
@import "custom/views/templates/shopping-cart";
|
112
|
-
@import "custom/views/templates/star-wizard";
|
113
|
-
|
114
|
-
@import "custom/views/templates/dashboard/dashboard-organization";
|
115
|
-
@import "custom/views/templates/dashboard/dashboard-marketplace";
|
116
|
-
@import "custom/views/templates/dashboard/tickets";
|
117
|
-
@import "custom/views/templates/dashboard/support";
|
118
|
-
@import "custom/views/templates/dashboard/bootstrap-wizard";
|
119
|
-
@import "custom/views/templates/dashboard/dashboard-teams";
|
120
99
|
|
121
100
|
/*-----------------------------------------------------------------------*/
|
122
101
|
/* Include the stylsheets specific to Angular */
|
123
102
|
/*-----------------------------------------------------------------------*/
|
124
103
|
@import "custom/angular-material";
|
125
104
|
@import "custom/angular-animate";
|
126
|
-
|
127
|
-
|
128
|
-
/*-----------------------------------------------------------------------*/
|
129
|
-
/* Impac! */
|
130
|
-
/*-----------------------------------------------------------------------*/
|
131
|
-
@import "impac-angular";
|
132
|
-
@import "custom/impac-variables-override";
|
@@ -11,7 +11,3 @@
|
|
11
11
|
-# Only loaded if the file has been included in the list of files to compile
|
12
12
|
- if Rails.application.config.assets.precompile.include?("mno_enterprise_extensions.js")
|
13
13
|
= javascript_include_tag "mno_enterprise_extensions"
|
14
|
-
|
15
|
-
-# Development extension
|
16
|
-
- if Rails.env.development?
|
17
|
-
= javascript_include_tag "ng-performance/ngPerformance"
|
@@ -12,8 +12,3 @@
|
|
12
12
|
%script{ src: "//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js" }
|
13
13
|
%script{ src: "//ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/jquery-ui.min.js" }
|
14
14
|
%script{ src: "//cdn.jsdelivr.net/g/json2@0.1,jquery.cookie@1.3.1,jquery.placeholder@2.0.7,lodash@3.10.1,momentjs@1.7.2,load-image@1.11.1,accounting.js@0.3.2"}
|
15
|
-
|
16
|
-
- if MnoEnterprise.style.design.material
|
17
|
-
%script{ src: "//ajax.googleapis.com/ajax/libs/angularjs/1.4.5/angular-animate.min.js" }
|
18
|
-
%script{ src: "//ajax.googleapis.com/ajax/libs/angularjs/1.4.5/angular-aria.min.js" }
|
19
|
-
%script{ src: "//ajax.googleapis.com/ajax/libs/angular_material/0.9.0/angular-material.min.js" }
|
@@ -23,9 +23,6 @@
|
|
23
23
|
- # Country code of current visitor
|
24
24
|
//= render 'layouts/current_visitor_country_code'
|
25
25
|
|
26
|
-
- if MnoEnterprise.style.design.material
|
27
|
-
%link{ href: "//ajax.googleapis.com/ajax/libs/angular_material/0.9.0/angular-material.min.css", rel: "stylesheet", type: "text/css" }
|
28
|
-
|
29
26
|
/[if lt IE 9]
|
30
27
|
%script(src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js")
|
31
28
|
%script(src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js")
|
@@ -3,10 +3,10 @@
|
|
3
3
|
.container
|
4
4
|
.row
|
5
5
|
.col-md-6.text-center.col-md-offset-3
|
6
|
-
%h3
|
6
|
+
%h3 Your order is being prepared
|
7
7
|
.spacer1
|
8
8
|
= image_tag('mno_enterprise/loader-32x32-bg-inverse.gif')
|
9
|
-
|
9
|
+
|
10
10
|
- # Provision applications in the background and remove params
|
11
11
|
- # Used to avoid double-provisioning on page reload and keep
|
12
12
|
- # actual provisioning (create action) as POST
|
@@ -18,13 +18,13 @@
|
|
18
18
|
else
|
19
19
|
setTimeout(function() { defer(method) }, 50);
|
20
20
|
}
|
21
|
-
|
21
|
+
|
22
22
|
function provisionApps() {
|
23
23
|
$(document).ready( function() {
|
24
|
-
|
24
|
+
|
25
25
|
//window.location.href.replace(window.location.search,'');
|
26
26
|
window.history.replaceState({}, 'Preparing Order', window.location.pathname + "?status=preparing");
|
27
|
-
|
27
|
+
|
28
28
|
$.ajax({
|
29
29
|
url: "#{provision_index_path}",
|
30
30
|
method: "POST",
|
@@ -35,9 +35,8 @@
|
|
35
35
|
}).always(function() {
|
36
36
|
window.location.href = "#{after_provision_path}#/?dhbRefId=#{@organization.id}"
|
37
37
|
});
|
38
|
-
|
38
|
+
|
39
39
|
});
|
40
40
|
}
|
41
|
-
|
41
|
+
|
42
42
|
defer(provisionApps);
|
43
|
-
|
data/config/routes.rb
CHANGED
@@ -3,17 +3,8 @@ MnoEnterprise::Engine.routes.draw do
|
|
3
3
|
#============================================================
|
4
4
|
# Static Pages
|
5
5
|
#============================================================
|
6
|
-
root to: redirect { MnoEnterprise
|
7
|
-
|
8
|
-
# MySpace routes
|
9
|
-
get '/myspace', to: 'pages#myspace'
|
10
|
-
get '/myspace#/apps/dashboard', to: 'pages#myspace', as: 'myspace_home'
|
11
|
-
get '/myspace#/billing', to: 'pages#myspace', as: 'myspace_billing'
|
6
|
+
root to: redirect { MnoEnterprise.router.dashboard_path }
|
12
7
|
|
13
8
|
# Invoices
|
14
9
|
resources :invoices, only: [:show], constraints: { id: /[\w\-]+/ }
|
15
|
-
|
16
|
-
# User Setup process
|
17
|
-
# ==> Currently NOT prod ready
|
18
|
-
resources :user_setup, only: [:index]
|
19
10
|
end
|
@@ -8,6 +8,18 @@ module MnoEnterprise
|
|
8
8
|
|
9
9
|
# To be able to load lib/mno_enterprise/concerns/...
|
10
10
|
config.autoload_paths += Dir["#{config.root}/lib/**/"]
|
11
|
+
|
12
|
+
# I18n management
|
13
|
+
# Internally rewrite /en/dashboard/#/apps to /dashboard/#/apps
|
14
|
+
initializer "mnoe.middleware" do |app|
|
15
|
+
if MnoEnterprise.i18n_enabled && (Rails.env.development? || Rails.env.test?)
|
16
|
+
require 'rack-rewrite'
|
17
|
+
|
18
|
+
app.middleware.insert_before(0, Rack::Rewrite) do
|
19
|
+
rewrite %r{/[a-z]{2}/dashboard/(.*)}, '/dashboard/$1'
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
11
23
|
end
|
12
24
|
end
|
13
25
|
end
|
@@ -0,0 +1,57 @@
|
|
1
|
+
# TODO:
|
2
|
+
# - Filter frontend keys
|
3
|
+
# - minify?
|
4
|
+
module MnoEnterprise
|
5
|
+
module Frontend
|
6
|
+
class LocalesGenerator
|
7
|
+
|
8
|
+
def initialize(path)
|
9
|
+
@path = path
|
10
|
+
end
|
11
|
+
|
12
|
+
# Generate JSON locales
|
13
|
+
def generate_json
|
14
|
+
translations_hash = get_translations
|
15
|
+
|
16
|
+
translations_hash.each do |locale, translations|
|
17
|
+
generate_locale(locale, translations)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
private
|
22
|
+
|
23
|
+
# Return the I18n translation hash
|
24
|
+
def get_translations
|
25
|
+
I18n.translate(:foo) # Need to do this to force I18n init
|
26
|
+
I18n.backend.send(:translations)
|
27
|
+
end
|
28
|
+
|
29
|
+
# Write the json file
|
30
|
+
def generate_locale(locale_code, translation_hash)
|
31
|
+
locale = {}
|
32
|
+
flatten_translations('', translation_hash, locale)
|
33
|
+
|
34
|
+
output_file = File.join(@path, "#{locale_code}.locale.json")
|
35
|
+
|
36
|
+
File.open(output_file, 'w') {|f| f.write(JSON.pretty_generate(locale)) }
|
37
|
+
puts "--> Generated #{output_file}"
|
38
|
+
end
|
39
|
+
|
40
|
+
# Flatten key
|
41
|
+
# print_translations("", {foo: {bar: 'baz'}}, locale)
|
42
|
+
# => locale = {'foo.bar' => 'baz'}
|
43
|
+
def flatten_translations(prefix, x, locale)
|
44
|
+
if x.is_a? Hash
|
45
|
+
if (not prefix.empty?)
|
46
|
+
prefix += "."
|
47
|
+
end
|
48
|
+
x.each {|key, value|
|
49
|
+
flatten_translations(prefix + key.to_s, value, locale)
|
50
|
+
}
|
51
|
+
else
|
52
|
+
locale.merge!({prefix => x})
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
@@ -0,0 +1,67 @@
|
|
1
|
+
require 'fileutils'
|
2
|
+
|
3
|
+
#=============================================
|
4
|
+
# Enterprise Express Tasks
|
5
|
+
#=============================================
|
6
|
+
# Enterprise Express related tasks
|
7
|
+
namespace :mnoe do
|
8
|
+
namespace :admin do
|
9
|
+
admin_dist_folder = "public/admin"
|
10
|
+
frontend_tmp_folder = 'tmp/build/admin'
|
11
|
+
frontend_orig_folder = 'frontend-admin'
|
12
|
+
|
13
|
+
desc "Setup the Enterprise Express Admin Dashboard"
|
14
|
+
task :install do
|
15
|
+
# Install required tools
|
16
|
+
sh("which bower || npm install -g bower")
|
17
|
+
sh("which gulp || npm install -g gulp")
|
18
|
+
sh("npm install -g gulp-util gulp-load-plugins del gulp-git")
|
19
|
+
|
20
|
+
# Build the admin
|
21
|
+
Rake::Task['mnoe:admin:dist'].invoke
|
22
|
+
end
|
23
|
+
|
24
|
+
desc "Rebuild the Enterprise Express Admin Dashboard"
|
25
|
+
task :dist do
|
26
|
+
# Prepare the build folder
|
27
|
+
Rake::Task['mnoe:admin:prepare_build_folder'].execute
|
28
|
+
|
29
|
+
# Build frontend using Gulp
|
30
|
+
Dir.chdir(frontend_tmp_folder) do
|
31
|
+
sh "npm install"
|
32
|
+
sh "bower install"
|
33
|
+
sh "gulp"
|
34
|
+
end
|
35
|
+
|
36
|
+
# Ensure distribution folder exists
|
37
|
+
mkdir_p admin_dist_folder
|
38
|
+
|
39
|
+
# Cleanup previously compiled files
|
40
|
+
Dir.glob("#{admin_dist_folder}/{styles,scripts}/app-*.{css,js}").each do |f|
|
41
|
+
rm_f f
|
42
|
+
end
|
43
|
+
|
44
|
+
# Copy assets to public
|
45
|
+
cp_r("#{frontend_tmp_folder}/dist/.", "#{admin_dist_folder}/")
|
46
|
+
|
47
|
+
# Copy bower_components to public (used by live previewer)
|
48
|
+
cp_r("#{frontend_tmp_folder}/bower_components","#{admin_dist_folder}/")
|
49
|
+
|
50
|
+
# Clear tmp cache in development - recompile assets otherwise
|
51
|
+
if Rails.env.development? || Rails.env.test?
|
52
|
+
Rake::Task['tmp:cache:clear'].execute
|
53
|
+
else
|
54
|
+
Rake::Task['assets:precompile'].execute
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
desc "Reset the admin build folder"
|
59
|
+
task :prepare_build_folder do
|
60
|
+
# Reset tmp folder from mno-enterprise/frontend-admin source
|
61
|
+
rm_rf "#{frontend_tmp_folder}/src"
|
62
|
+
rm_rf "#{frontend_tmp_folder}/e2e"
|
63
|
+
mkdir_p frontend_tmp_folder
|
64
|
+
cp_r(File.join(Gem.loaded_specs["mno-enterprise"].full_gem_path, "#{frontend_orig_folder}/."), "#{frontend_tmp_folder}/")
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|