mno-enterprise-frontend 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE +1 -0
- data/Rakefile +12 -0
- data/app/assets/images/favicon.ico +0 -0
- 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/images/mno_enterprise/loader-32x32-bg-inverse.gif +0 -0
- data/app/assets/images/mno_enterprise/loader-32x32-bg-main.gif +0 -0
- data/app/assets/images/mno_enterprise/maestrano/logo-whitebg.png +0 -0
- data/app/assets/javascripts/mno_enterprise/angular/app.js.coffee.erb +173 -0
- data/app/assets/javascripts/mno_enterprise/angular/controllers/maestrano-controllers.js.coffee +4 -0
- data/app/assets/javascripts/mno_enterprise/angular/controllers/modals/modals-ctrl.js.coffee +62 -0
- data/app/assets/javascripts/mno_enterprise/angular/directives/dashboard/dashboard-account.js.coffee +157 -0
- data/app/assets/javascripts/mno_enterprise/angular/directives/dashboard/dashboard-app-deletion-request.js.coffee +62 -0
- data/app/assets/javascripts/mno_enterprise/angular/directives/dashboard/dashboard-apps-list.js.coffee +127 -0
- data/app/assets/javascripts/mno_enterprise/angular/directives/dashboard/dashboard-components.js.coffee +25 -0
- data/app/assets/javascripts/mno_enterprise/angular/directives/dashboard/dashboard-marketplace-app.js.coffee +77 -0
- data/app/assets/javascripts/mno_enterprise/angular/directives/dashboard/dashboard-marketplace.js.coffee +51 -0
- data/app/assets/javascripts/mno_enterprise/angular/directives/dashboard/dashboard-menu.js.coffee +174 -0
- data/app/assets/javascripts/mno_enterprise/angular/directives/dashboard/organization/arrears.js.coffee +70 -0
- data/app/assets/javascripts/mno_enterprise/angular/directives/dashboard/organization/billing.js.coffee +48 -0
- data/app/assets/javascripts/mno_enterprise/angular/directives/dashboard/organization/credit-card.js.coffee +142 -0
- data/app/assets/javascripts/mno_enterprise/angular/directives/dashboard/organization/index.js.coffee +61 -0
- data/app/assets/javascripts/mno_enterprise/angular/directives/dashboard/organization/invoices.js.coffee +42 -0
- data/app/assets/javascripts/mno_enterprise/angular/directives/dashboard/organization/members.js.coffee +280 -0
- data/app/assets/javascripts/mno_enterprise/angular/directives/dashboard/organization/settings.js.coffee +91 -0
- data/app/assets/javascripts/mno_enterprise/angular/directives/dashboard/organization/team-list.js.coffee +179 -0
- data/app/assets/javascripts/mno_enterprise/angular/directives/dashboard/organization/teams.js.coffee +268 -0
- data/app/assets/javascripts/mno_enterprise/angular/directives/maestrano-components/file-model.js.coffee +33 -0
- data/app/assets/javascripts/mno_enterprise/angular/directives/maestrano-components/maestrano-components.js.coffee +22 -0
- data/app/assets/javascripts/mno_enterprise/angular/directives/maestrano-components/mno-autostop-app.js.coffee +123 -0
- data/app/assets/javascripts/mno_enterprise/angular/directives/maestrano-components/mno-compile.js.coffee +18 -0
- data/app/assets/javascripts/mno_enterprise/angular/directives/maestrano-components/mno-currency-widget.js.coffee +43 -0
- data/app/assets/javascripts/mno_enterprise/angular/directives/maestrano-components/mno-current-currency.js.coffee +22 -0
- data/app/assets/javascripts/mno_enterprise/angular/directives/maestrano-components/mno-editable.js.coffee +68 -0
- data/app/assets/javascripts/mno_enterprise/angular/directives/maestrano-components/mno-flash-msg.js.coffee +40 -0
- data/app/assets/javascripts/mno_enterprise/angular/directives/maestrano-components/mno-helptext.js.coffee +38 -0
- data/app/assets/javascripts/mno_enterprise/angular/directives/maestrano-components/mno-loading-lounge.js.coffee +184 -0
- data/app/assets/javascripts/mno_enterprise/angular/directives/maestrano-components/mno-match.js.coffee +14 -0
- data/app/assets/javascripts/mno_enterprise/angular/directives/maestrano-components/mno-message-modal.js.coffee +56 -0
- data/app/assets/javascripts/mno_enterprise/angular/directives/maestrano-components/mno-notification-widget.js.coffee +192 -0
- data/app/assets/javascripts/mno_enterprise/angular/directives/maestrano-components/mno-partner-code-popup.js.coffee +74 -0
- data/app/assets/javascripts/mno_enterprise/angular/directives/maestrano-components/mno-partner-contact.js.coffee +59 -0
- data/app/assets/javascripts/mno_enterprise/angular/directives/maestrano-components/mno-password-strength.js.coffee +154 -0
- data/app/assets/javascripts/mno_enterprise/angular/directives/maestrano-components/mno-password.js.coffee +40 -0
- data/app/assets/javascripts/mno_enterprise/angular/directives/maestrano-components/mno-price-converter.js.coffee +49 -0
- data/app/assets/javascripts/mno_enterprise/angular/directives/maestrano-components/mno-scroll-to.js.coffee +14 -0
- data/app/assets/javascripts/mno_enterprise/angular/directives/maestrano-components/mno-typeahead.js.coffee +89 -0
- data/app/assets/javascripts/mno_enterprise/angular/directives/user-setup/components.js.coffee +7 -0
- data/app/assets/javascripts/mno_enterprise/angular/directives/user-setup/index.js.coffee +256 -0
- data/app/assets/javascripts/mno_enterprise/angular/filters/maestrano-app-by-category.js.coffee +5 -0
- data/app/assets/javascripts/mno_enterprise/angular/filters/maestrano-currency.js.coffee +30 -0
- data/app/assets/javascripts/mno_enterprise/angular/filters/maestrano-filters.js.coffee +7 -0
- data/app/assets/javascripts/mno_enterprise/angular/filters/maestrano-replace-underscore-with-space.js.coffee +4 -0
- data/app/assets/javascripts/mno_enterprise/angular/filters/maestrano-titleize.js.coffee +7 -0
- data/app/assets/javascripts/mno_enterprise/angular/filters/maestrano-truncate.js.coffee +24 -0
- data/app/assets/javascripts/mno_enterprise/angular/services/dashboard/maestrano-app-instance.js.coffee +15 -0
- data/app/assets/javascripts/mno_enterprise/angular/services/dashboard/maestrano-apps-document.js.coffee +83 -0
- data/app/assets/javascripts/mno_enterprise/angular/services/dashboard/maestrano-user.js.coffee +27 -0
- data/app/assets/javascripts/mno_enterprise/angular/services/dashboard/organization-svc.js.coffee +318 -0
- data/app/assets/javascripts/mno_enterprise/angular/services/dashboard/team-svc.js.coffee +180 -0
- data/app/assets/javascripts/mno_enterprise/angular/services/dashboard/tickets-svc.js.coffee +109 -0
- data/app/assets/javascripts/mno_enterprise/angular/services/impac-config.svc.js.coffee +35 -0
- data/app/assets/javascripts/mno_enterprise/angular/services/maestrano-apps-list-helper.js.coffee +337 -0
- data/app/assets/javascripts/mno_enterprise/angular/services/maestrano-assets.js.coffee.erb +21 -0
- data/app/assets/javascripts/mno_enterprise/angular/services/maestrano-current-currency.js.coffee +7 -0
- data/app/assets/javascripts/mno_enterprise/angular/services/maestrano-current-user-svc.js.coffee +99 -0
- data/app/assets/javascripts/mno_enterprise/angular/services/maestrano-exchange-rates.js.coffee +102 -0
- data/app/assets/javascripts/mno_enterprise/angular/services/maestrano-message-svc.js.coffee +71 -0
- data/app/assets/javascripts/mno_enterprise/angular/services/maestrano-miscellaneous.js.coffee.erb +46 -0
- data/app/assets/javascripts/mno_enterprise/angular/services/maestrano-modal.js.coffee +67 -0
- data/app/assets/javascripts/mno_enterprise/angular/services/maestrano-msg-bus.js.coffee +50 -0
- data/app/assets/javascripts/mno_enterprise/angular/services/maestrano-services.js.coffee +21 -0
- data/app/assets/javascripts/mno_enterprise/angular/services/maestrano-shopping-cart.js.coffee +361 -0
- data/app/assets/javascripts/mno_enterprise/angular/services/maestrano-utilities.js.coffee +61 -0
- data/app/assets/javascripts/mno_enterprise/angular/services/marketplace-svc.js.coffee +59 -0
- data/app/assets/javascripts/mno_enterprise/application.js +17 -0
- data/app/assets/javascripts/mno_enterprise/application_lib.js +14 -0
- data/app/assets/javascripts/mno_enterprise/lib/angular-really-click.js +17 -0
- data/app/assets/javascripts/mno_enterprise/lib/sortable.js +315 -0
- data/app/assets/javascripts/mno_enterprise/lib/ui-bootstrap-tpls-0.13.4.js +5836 -0
- data/app/assets/javascripts/mno_enterprise/lib/xeditable.js +1588 -0
- data/app/assets/javascripts/mno_enterprise/twitter/bootstrap.js +12 -0
- data/app/assets/javascripts/mno_enterprise/twitter/bootstrap/affix.js +162 -0
- data/app/assets/javascripts/mno_enterprise/twitter/bootstrap/alert.js +94 -0
- data/app/assets/javascripts/mno_enterprise/twitter/bootstrap/button.js +116 -0
- data/app/assets/javascripts/mno_enterprise/twitter/bootstrap/carousel.js +237 -0
- data/app/assets/javascripts/mno_enterprise/twitter/bootstrap/collapse.js +211 -0
- data/app/assets/javascripts/mno_enterprise/twitter/bootstrap/dropdown.js +161 -0
- data/app/assets/javascripts/mno_enterprise/twitter/bootstrap/modal.js +324 -0
- data/app/assets/javascripts/mno_enterprise/twitter/bootstrap/popover.js +113 -0
- data/app/assets/javascripts/mno_enterprise/twitter/bootstrap/scrollspy.js +175 -0
- data/app/assets/javascripts/mno_enterprise/twitter/bootstrap/tab.js +153 -0
- data/app/assets/javascripts/mno_enterprise/twitter/bootstrap/tooltip.js +472 -0
- data/app/assets/javascripts/mno_enterprise/twitter/bootstrap/transition.js +59 -0
- data/app/assets/javascripts/ng-performance/ngPerformance.html +109 -0
- data/app/assets/javascripts/ng-performance/ngPerformance.js +211 -0
- data/app/assets/stylesheets/mno_enterprise/application.css +13 -0
- data/app/assets/stylesheets/mno_enterprise/custom/accordion.less +90 -0
- data/app/assets/stylesheets/mno_enterprise/custom/alert.less +30 -0
- data/app/assets/stylesheets/mno_enterprise/custom/angular-animate.less +42 -0
- data/app/assets/stylesheets/mno_enterprise/custom/angular-material.less +56 -0
- data/app/assets/stylesheets/mno_enterprise/custom/bootstrap-on-juice.less +22 -0
- data/app/assets/stylesheets/mno_enterprise/custom/button.less +84 -0
- data/app/assets/stylesheets/mno_enterprise/custom/footer.less +44 -0
- data/app/assets/stylesheets/mno_enterprise/custom/form.less +191 -0
- data/app/assets/stylesheets/mno_enterprise/custom/header.less +281 -0
- data/app/assets/stylesheets/mno_enterprise/custom/impac-variables-override.less +65 -0
- data/app/assets/stylesheets/mno_enterprise/custom/modal.less +183 -0
- data/app/assets/stylesheets/mno_enterprise/custom/utilities.less +729 -0
- data/app/assets/stylesheets/mno_enterprise/custom/utility/app-presentation.less +77 -0
- data/app/assets/stylesheets/mno_enterprise/custom/utility/banners.less +145 -0
- data/app/assets/stylesheets/mno_enterprise/custom/utility/carousel.less +68 -0
- data/app/assets/stylesheets/mno_enterprise/custom/utility/helptext.less +40 -0
- data/app/assets/stylesheets/mno_enterprise/custom/utility/miscellaneous.less +134 -0
- data/app/assets/stylesheets/mno_enterprise/custom/utility/progress-bar.less +55 -0
- data/app/assets/stylesheets/mno_enterprise/custom/utility/step.less +101 -0
- data/app/assets/stylesheets/mno_enterprise/custom/utility/tabset.less +87 -0
- data/app/assets/stylesheets/mno_enterprise/custom/utility/testimonial.less +118 -0
- data/app/assets/stylesheets/mno_enterprise/custom/utility/text.less +23 -0
- data/app/assets/stylesheets/mno_enterprise/custom/views/apps.less +243 -0
- data/app/assets/stylesheets/mno_enterprise/custom/views/myspace.less +477 -0
- data/app/assets/stylesheets/mno_enterprise/custom/views/pages/confirmation_lounge.less +31 -0
- data/app/assets/stylesheets/mno_enterprise/custom/views/pages/home.less +57 -0
- data/app/assets/stylesheets/mno_enterprise/custom/views/pages/oauth-config-page.less +6 -0
- data/app/assets/stylesheets/mno_enterprise/custom/views/registration.less +84 -0
- data/app/assets/stylesheets/mno_enterprise/custom/views/star.less +18 -0
- data/app/assets/stylesheets/mno_enterprise/custom/views/templates/dashboard/bootstrap-wizard.less +63 -0
- data/app/assets/stylesheets/mno_enterprise/custom/views/templates/dashboard/dashboard-marketplace.less +187 -0
- data/app/assets/stylesheets/mno_enterprise/custom/views/templates/dashboard/dashboard-organization.less +149 -0
- data/app/assets/stylesheets/mno_enterprise/custom/views/templates/dashboard/dashboard-teams.less +119 -0
- data/app/assets/stylesheets/mno_enterprise/custom/views/templates/dashboard/support.less +42 -0
- data/app/assets/stylesheets/mno_enterprise/custom/views/templates/dashboard/tickets.less +80 -0
- data/app/assets/stylesheets/mno_enterprise/custom/views/templates/mno-editable.less +60 -0
- data/app/assets/stylesheets/mno_enterprise/custom/views/templates/notification-widget.less +49 -0
- data/app/assets/stylesheets/mno_enterprise/custom/views/templates/password-strength.less +28 -0
- data/app/assets/stylesheets/mno_enterprise/custom/views/templates/shopping-cart.less +333 -0
- data/app/assets/stylesheets/mno_enterprise/custom/views/templates/star-wizard.less +49 -0
- data/app/assets/stylesheets/mno_enterprise/custom/views/user-setup.less +10 -0
- data/app/assets/stylesheets/mno_enterprise/custom/xeditable.less +40 -0
- data/app/assets/stylesheets/mno_enterprise/font-awesome/font-awesome-regular.less +13 -0
- data/app/assets/stylesheets/mno_enterprise/font-awesome/font-awesome-sprockets.less +13 -0
- data/app/assets/stylesheets/mno_enterprise/font-awesome/font-awesome.less +16 -0
- data/app/assets/stylesheets/mno_enterprise/font-awesome/fonts/FontAwesome.otf +0 -0
- data/app/assets/stylesheets/mno_enterprise/font-awesome/fonts/fontawesome-webfont.eot +0 -0
- data/app/assets/stylesheets/mno_enterprise/font-awesome/fonts/fontawesome-webfont.svg +640 -0
- data/app/assets/stylesheets/mno_enterprise/font-awesome/fonts/fontawesome-webfont.ttf +0 -0
- data/app/assets/stylesheets/mno_enterprise/font-awesome/fonts/fontawesome-webfont.woff +0 -0
- data/app/assets/stylesheets/mno_enterprise/font-awesome/fonts/fontawesome-webfont.woff2 +0 -0
- data/app/assets/stylesheets/mno_enterprise/font-awesome/framework/animated.less +34 -0
- data/app/assets/stylesheets/mno_enterprise/font-awesome/framework/bordered-pulled.less +25 -0
- data/app/assets/stylesheets/mno_enterprise/font-awesome/framework/core.less +12 -0
- data/app/assets/stylesheets/mno_enterprise/font-awesome/framework/extras.less +2 -0
- data/app/assets/stylesheets/mno_enterprise/font-awesome/framework/fixed-width.less +6 -0
- data/app/assets/stylesheets/mno_enterprise/font-awesome/framework/icons.less +677 -0
- data/app/assets/stylesheets/mno_enterprise/font-awesome/framework/larger.less +13 -0
- data/app/assets/stylesheets/mno_enterprise/font-awesome/framework/list.less +19 -0
- data/app/assets/stylesheets/mno_enterprise/font-awesome/framework/mixins.less +26 -0
- data/app/assets/stylesheets/mno_enterprise/font-awesome/framework/rotated-flipped.less +20 -0
- data/app/assets/stylesheets/mno_enterprise/font-awesome/framework/stacked.less +20 -0
- data/app/assets/stylesheets/mno_enterprise/font-awesome/framework/variables.less +687 -0
- data/app/assets/stylesheets/mno_enterprise/main.less +132 -0
- data/app/assets/stylesheets/mno_enterprise/mixins.less +75 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/alerts.less +73 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/badges.less +65 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/bootstrap.less +50 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/breadcrumbs.less +26 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/button-groups.less +243 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/buttons.less +160 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/carousel.less +269 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/close.less +34 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/code.less +69 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/component-animations.less +34 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/dropdowns.less +214 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/forms.less +566 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/glyphicons.less +301 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/grid.less +84 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/input-groups.less +166 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/jumbotron.less +50 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/labels.less +64 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/list-group.less +124 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/media.less +61 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/mixins.less +39 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/mixins/alerts.less +14 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/mixins/background-variant.less +8 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/mixins/border-radius.less +18 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/mixins/buttons.less +52 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/mixins/center-block.less +7 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/mixins/clearfix.less +22 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/mixins/forms.less +85 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/mixins/gradients.less +59 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/mixins/grid-framework.less +91 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/mixins/grid.less +122 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/mixins/hide-text.less +21 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/mixins/image.less +33 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/mixins/labels.less +12 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/mixins/list-group.less +29 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/mixins/nav-divider.less +10 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/mixins/nav-vertical-align.less +9 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/mixins/opacity.less +8 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/mixins/pagination.less +23 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/mixins/panels.less +24 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/mixins/progress-bar.less +10 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/mixins/reset-filter.less +8 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/mixins/resize.less +6 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/mixins/responsive-visibility.less +15 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/mixins/size.less +10 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/mixins/tab-focus.less +9 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/mixins/table-row.less +28 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/mixins/text-emphasis.less +8 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/mixins/text-overflow.less +8 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/mixins/vendor-prefixes.less +227 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/modals.less +148 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/navbar.less +661 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/navs.less +244 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/normalize.less +427 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/pager.less +54 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/pagination.less +88 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/panels.less +265 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/popovers.less +135 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/print.less +107 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/progress-bars.less +87 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/responsive-embed.less +35 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/responsive-utilities.less +194 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/scaffolding.less +150 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/tables.less +234 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/theme.less +273 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/thumbnails.less +36 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/tooltip.less +103 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/type.less +302 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/utilities.less +56 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/variables.less +857 -0
- data/app/assets/stylesheets/mno_enterprise/twitter-bootstrap/wells.less +29 -0
- data/app/assets/stylesheets/mno_enterprise/variables.less +226 -0
- data/app/assets/templates/mno_enterprise/dashboard/account.html +131 -0
- data/app/assets/templates/mno_enterprise/dashboard/app_deletion.html +36 -0
- data/app/assets/templates/mno_enterprise/dashboard/apps_list.html +103 -0
- data/app/assets/templates/mno_enterprise/dashboard/horizontal_menu.html +85 -0
- data/app/assets/templates/mno_enterprise/dashboard/marketplace/index.html +60 -0
- data/app/assets/templates/mno_enterprise/dashboard/marketplace/show.html +133 -0
- data/app/assets/templates/mno_enterprise/dashboard/menu.html +161 -0
- data/app/assets/templates/mno_enterprise/dashboard/organization/arrears.html +37 -0
- data/app/assets/templates/mno_enterprise/dashboard/organization/billing.html +37 -0
- data/app/assets/templates/mno_enterprise/dashboard/organization/credit-card.html +156 -0
- data/app/assets/templates/mno_enterprise/dashboard/organization/index.full.html +181 -0
- data/app/assets/templates/mno_enterprise/dashboard/organization/index.html +173 -0
- data/app/assets/templates/mno_enterprise/dashboard/organization/invoices.html +27 -0
- data/app/assets/templates/mno_enterprise/dashboard/organization/members.html +288 -0
- data/app/assets/templates/mno_enterprise/dashboard/organization/settings.html +55 -0
- data/app/assets/templates/mno_enterprise/dashboard/teams/index.html +175 -0
- data/app/assets/templates/mno_enterprise/dashboard/teams/member-add-modal.html +60 -0
- data/app/assets/templates/mno_enterprise/dashboard/teams/member-removal-modal.html +35 -0
- data/app/assets/templates/mno_enterprise/dashboard/teams/team-add-modal.html +35 -0
- data/app/assets/templates/mno_enterprise/dashboard/teams/team-delete-modal.html +35 -0
- data/app/assets/templates/mno_enterprise/dashboard/teams/team-list.html +107 -0
- data/app/assets/templates/mno_enterprise/default_template.html +20 -0
- data/app/assets/templates/mno_enterprise/maestrano-components/autostop_app.html +42 -0
- data/app/assets/templates/mno_enterprise/maestrano-components/currency_widget.html +1 -0
- data/app/assets/templates/mno_enterprise/maestrano-components/editable.html +28 -0
- data/app/assets/templates/mno_enterprise/maestrano-components/loading_lounge.html +63 -0
- data/app/assets/templates/mno_enterprise/maestrano-components/modal-messages/congratulations.html +8 -0
- data/app/assets/templates/mno_enterprise/maestrano-components/modal-messages/default.html +1 -0
- data/app/assets/templates/mno_enterprise/maestrano-components/modal-messages/information.html +8 -0
- data/app/assets/templates/mno_enterprise/maestrano-components/notification-widget.html +31 -0
- data/app/assets/templates/mno_enterprise/maestrano-components/password.html +55 -0
- data/app/assets/templates/mno_enterprise/maestrano-components/star_wizard.html +254 -0
- data/app/assets/templates/mno_enterprise/maestrano-components/upload_spreadsheet.html +191 -0
- data/app/assets/templates/mno_enterprise/modals/new-organization-reseller-req.html +35 -0
- data/app/assets/templates/mno_enterprise/modals/new-organization.html +35 -0
- data/app/assets/templates/mno_enterprise/user-setup/index.html +312 -0
- data/app/controllers/mno_enterprise/invoices_controller.rb +22 -0
- data/app/controllers/mno_enterprise/pages_controller.rb +9 -0
- data/app/controllers/mno_enterprise/user_setup_controller.rb +11 -0
- data/app/views/layouts/mno_enterprise/_application_js.html.haml +17 -0
- data/app/views/layouts/mno_enterprise/_common_cdn_lib_js.html.haml +19 -0
- data/app/views/layouts/mno_enterprise/_footer_files.html.haml +5 -0
- data/app/views/layouts/mno_enterprise/_header_files.html.haml +31 -0
- data/app/views/layouts/mno_enterprise/_impersonate_header.html.haml +7 -0
- data/app/views/layouts/mno_enterprise/_public_page_header.html.haml +2 -0
- data/app/views/layouts/mno_enterprise/application.html.haml +18 -0
- data/app/views/layouts/mno_enterprise/application_dashboard.html.haml +22 -0
- data/app/views/layouts/mno_enterprise/third_party/_google_tag_container.html.haml +10 -0
- data/app/views/mno_enterprise/pages/app_access_unauthorized.html.haml +19 -0
- data/app/views/mno_enterprise/pages/app_logout.html.haml +18 -0
- data/app/views/mno_enterprise/pages/billing_details_required.html.haml +19 -0
- data/app/views/mno_enterprise/pages/loading.html.haml +3 -0
- data/app/views/mno_enterprise/pages/myspace.html.haml +6 -0
- data/app/views/mno_enterprise/provision/_provision_apps.html.haml +43 -0
- data/app/views/mno_enterprise/provision/_select_organization.html.haml +17 -0
- data/app/views/mno_enterprise/provision/new.html.haml +4 -0
- data/app/views/mno_enterprise/user_setup/index.html.haml +2 -0
- data/config/initializers/ng-annotate.rb +3 -0
- data/config/initializers/ng-performance.rb +3 -0
- data/config/routes.rb +19 -0
- data/lib/assets/javascripts/impac-angular.js +8719 -0
- data/lib/assets/stylesheets/impac-angular.less +2352 -0
- data/lib/mno-enterprise-frontend.rb +1 -0
- data/lib/mno_enterprise/frontend.rb +13 -0
- data/lib/mno_enterprise/frontend/assets_util.rb +47 -0
- data/lib/mno_enterprise/frontend/concerns/README.md +6 -0
- data/lib/mno_enterprise/frontend/concerns/controllers/pages_controller.rb +25 -0
- data/lib/mno_enterprise/frontend/engine.rb +13 -0
- data/spec/controllers/mno_enterprise/auth/confirmations_controller_spec.rb +84 -0
- data/spec/controllers/mno_enterprise/invoices_controller_spec.rb +34 -0
- data/spec/controllers/mno_enterprise/pages_controller_spec.rb +42 -0
- data/spec/controllers/mno_enterprise/user_setup_controller_spec.rb +33 -0
- data/spec/controllers/mno_enterprise/webhook/o_auth_controller_spec.rb +76 -0
- data/spec/rails_helper.rb +92 -0
- data/spec/routing/mno_enterprise/invoices_controller_routing_spec.rb +11 -0
- data/spec/routing/mno_enterprise/pages_controller_routing_spec.rb +18 -0
- data/spec/routing/mno_enterprise/user_setup_controller_routing_spec.rb +11 -0
- data/spec/spec_helper.rb +78 -0
- metadata +464 -0
@@ -0,0 +1,40 @@
|
|
1
|
+
module = angular.module('maestrano.components.mno-password',['maestrano.assets'])
|
2
|
+
|
3
|
+
module.directive('mnoPassword', ['TemplatePath', (TemplatePath) ->
|
4
|
+
return {
|
5
|
+
restrict: 'AE',
|
6
|
+
scope: {
|
7
|
+
baseObject: '=mnoPassword',
|
8
|
+
form: '='
|
9
|
+
},
|
10
|
+
templateUrl: TemplatePath['mno_enterprise/maestrano-components/password.html'],
|
11
|
+
link: (scope, element, attrs) ->
|
12
|
+
scope.isShown = false
|
13
|
+
scope.hasEightChars = false
|
14
|
+
scope.hasOneNumber = false
|
15
|
+
scope.hasOneUpper = false
|
16
|
+
scope.hasOneLower = false
|
17
|
+
|
18
|
+
scope.fieldName = "#{attrs.mnoPassword}[password]"
|
19
|
+
|
20
|
+
scope.check = ->
|
21
|
+
scope.hasEightChars = scope.baseObject.password? && (scope.baseObject.password.length >= 8)
|
22
|
+
scope.hasOneNumber = false
|
23
|
+
scope.hasOneUpper = false
|
24
|
+
scope.hasOneLower = false
|
25
|
+
|
26
|
+
if angular.isString(scope.baseObject.password)
|
27
|
+
angular.forEach(scope.baseObject.password.split(""), (letter) ->
|
28
|
+
scope.hasOneNumber = true if parseInt(letter)
|
29
|
+
scope.hasOneUpper = true if (letter == letter.toUpperCase() && letter != letter.toLowerCase() && !parseInt(letter))
|
30
|
+
scope.hasOneLower = true if (letter == letter.toLowerCase() && letter != letter.toUpperCase() && !parseInt(letter))
|
31
|
+
)
|
32
|
+
|
33
|
+
# Will raise an error is form is not defined when the directive is used (in this case, we can't modify the validity of the form)
|
34
|
+
if scope.hasEightChars && scope.hasOneNumber && scope.hasOneUpper && scope.hasOneLower
|
35
|
+
scope.form[scope.fieldName].$setValidity("password", true)
|
36
|
+
else
|
37
|
+
scope.form[scope.fieldName].$setValidity("password", false)
|
38
|
+
|
39
|
+
}
|
40
|
+
])
|
@@ -0,0 +1,49 @@
|
|
1
|
+
module = angular.module('maestrano.components.mno-price-converter',['maestrano.assets'])
|
2
|
+
|
3
|
+
#============================================
|
4
|
+
# Component 'Price Converter'
|
5
|
+
#============================================
|
6
|
+
|
7
|
+
|
8
|
+
module.controller('MnoPriceConverterCtrl',['$scope', 'ExchangeRates', 'CurrentCurrency', ($scope, ExchangeRates, CurrentCurrency) ->
|
9
|
+
|
10
|
+
ExchangeRates.then ->
|
11
|
+
|
12
|
+
$scope.currencies = ["AUD","CAD","CNY","EUR","GBP","HKD","INR","JPY","NZD","SGD","USD",]
|
13
|
+
$scope.currentCurrency = ExchangeRates.defaultCurrency()
|
14
|
+
|
15
|
+
# Set currency and outject currency in scope
|
16
|
+
$scope.setCurrency = (currency) ->
|
17
|
+
ExchangeRates.defaultCurrency(currency)
|
18
|
+
$scope.currency = currency
|
19
|
+
|
20
|
+
$scope.convertedPrice = ->
|
21
|
+
if $scope.noConversion
|
22
|
+
return ExchangeRates.newMoneyObject($scope.price,$scope.currency)
|
23
|
+
else
|
24
|
+
return ExchangeRates.exchange($scope.price, ($scope.currency || 'AUD')).to(CurrentCurrency.val)
|
25
|
+
|
26
|
+
$scope.style = ->
|
27
|
+
if $scope.currencyResponsive
|
28
|
+
switch CurrentCurrency.val
|
29
|
+
when 'CNY' then 'font-size:28px;'
|
30
|
+
when 'HKD' then 'font-size:29px;'
|
31
|
+
when 'INR' then 'font-size:25px;'
|
32
|
+
when 'JPY' then 'font-size:26px;'
|
33
|
+
when 'PHP' then 'font-size:28px;'
|
34
|
+
else 'font-size:38px;'
|
35
|
+
|
36
|
+
])
|
37
|
+
|
38
|
+
module.directive('mnoPriceConverter', ['TemplatePath', (TemplatePath) ->
|
39
|
+
return {
|
40
|
+
restrict: 'A',
|
41
|
+
scope:
|
42
|
+
price:'='
|
43
|
+
currencyResponsive:'@'
|
44
|
+
currency: '@'
|
45
|
+
noConversion: '@'
|
46
|
+
template: "<span style='{{style()}}'>{{convertedPrice().format()}}</span>",
|
47
|
+
controller: 'MnoPriceConverterCtrl',
|
48
|
+
}
|
49
|
+
])
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module = angular.module('maestrano.components.mno-scroll-to',['maestrano.assets'])
|
2
|
+
|
3
|
+
module.directive('mnoScrollTo', ['$location', '$anchorScroll', ($location, $anchorScroll) ->
|
4
|
+
return {
|
5
|
+
restrict: 'A'
|
6
|
+
scope:
|
7
|
+
mnoScrollTo: '@'
|
8
|
+
link: (scope, element, attrs) ->
|
9
|
+
element.on "click", (event) ->
|
10
|
+
event.preventDefault()
|
11
|
+
$location.hash(scope.mnoScrollTo)
|
12
|
+
$anchorScroll()
|
13
|
+
}
|
14
|
+
])
|
@@ -0,0 +1,89 @@
|
|
1
|
+
module = angular.module('maestrano.components.mno-typeahead',[])
|
2
|
+
|
3
|
+
# Remote typeahead.
|
4
|
+
# E.g:
|
5
|
+
#
|
6
|
+
# <input type="text" mno-typeahead='tpaResult' remote = '/path/to/typeahead', 'min-length' => '6'>
|
7
|
+
# <div ng-show="tpaResult.isReady() && tpaResult.isEmpty()" }>
|
8
|
+
# No results!
|
9
|
+
# </div>
|
10
|
+
#
|
11
|
+
#
|
12
|
+
# In this case the scope variable 'tpaResult' can be used to:
|
13
|
+
# tpaResult.list: get the list of results
|
14
|
+
# tpaResult.isEmpty(): check if the list of results is empty
|
15
|
+
# tpaResult.hasAny(): check if the list has any result
|
16
|
+
# tpaResult.isReady(): check the input has a value that's greater than the 'min-length'
|
17
|
+
# tpaResult.isLoading(): check whether the widget is loading
|
18
|
+
#
|
19
|
+
module.directive('mnoTypeahead', ['$http', '$window', ($http, $window) ->
|
20
|
+
return {
|
21
|
+
restrict: 'A'
|
22
|
+
scope: {
|
23
|
+
mnoTypeahead: '='
|
24
|
+
minLength: '@'
|
25
|
+
remote: '@'
|
26
|
+
}
|
27
|
+
link: (scope, element, attrs) ->
|
28
|
+
scope.minLength ||= 3
|
29
|
+
scope.mnoTypeahead = { list:[] }
|
30
|
+
return false unless angular.isString(scope.remote)
|
31
|
+
scope.qList = []
|
32
|
+
|
33
|
+
scope.mnoTypeahead.isLoading = ->
|
34
|
+
scope.loading
|
35
|
+
|
36
|
+
scope.mnoTypeahead.hasAny = ->
|
37
|
+
scope.mnoTypeahead.list.length > 0
|
38
|
+
|
39
|
+
scope.mnoTypeahead.isEmpty = ->
|
40
|
+
scope.mnoTypeahead.list.length == 0
|
41
|
+
|
42
|
+
scope.mnoTypeahead.isReady = ->
|
43
|
+
!scope.loading && scope.currVal? && scope.currVal.length > 0 && scope.currVal.length > scope.minLength
|
44
|
+
|
45
|
+
# Fetch data remotely. The typeahead widget is kept 'loading'
|
46
|
+
# if there is a need to refetch or if there are still queries
|
47
|
+
# being performed (qList)
|
48
|
+
scope.fetchData = ->
|
49
|
+
scope.needFetch = false
|
50
|
+
q = $http.get(scope.remote + "?q=#{scope.currVal}")
|
51
|
+
scope.qList.push(q)
|
52
|
+
|
53
|
+
q.success (data) ->
|
54
|
+
scope.qList.shift()
|
55
|
+
unless scope.needFetch || scope.qList.length > 0
|
56
|
+
scope.loading = false
|
57
|
+
angular.copy(data,scope.mnoTypeahead.list)
|
58
|
+
|
59
|
+
# Trigger a fetch if there is a need for it
|
60
|
+
# Used by the scheduler at the bottom
|
61
|
+
scope.pollData = ->
|
62
|
+
if scope.needFetch
|
63
|
+
scope.fetchData()
|
64
|
+
|
65
|
+
# Flag the widget as 'loading' and set needFetch to
|
66
|
+
# true to trigger a fetch at next interval
|
67
|
+
scope.triggerFetch = ->
|
68
|
+
scope.loading = true
|
69
|
+
scope.needFetch = true
|
70
|
+
|
71
|
+
# Binding method to be used on keyup/keydown event
|
72
|
+
scope.refresh = ->
|
73
|
+
scope.minLength ||= 3
|
74
|
+
scope.currVal = element.val()
|
75
|
+
|
76
|
+
if scope.currVal.length > 0 && scope.currVal.length >= scope.minLength
|
77
|
+
scope.triggerFetch()
|
78
|
+
else
|
79
|
+
scope.mnoTypeahead.list.length = 0
|
80
|
+
|
81
|
+
# Bind refresh on keystrokes
|
82
|
+
element.keyup(scope.refresh)
|
83
|
+
element.keydown(scope.refresh)
|
84
|
+
|
85
|
+
# Schedule periodic data polling (rate limit of one query per second)
|
86
|
+
$window.setInterval((-> scope.pollData()), 1000)
|
87
|
+
|
88
|
+
}
|
89
|
+
])
|
@@ -0,0 +1,256 @@
|
|
1
|
+
module = angular.module('maestrano.user-setup.index',['maestrano.assets'])
|
2
|
+
|
3
|
+
module.controller('UserSetupIndexCtrl',[
|
4
|
+
'$scope','$http','$q','$filter','$modal','$mdToast','$timeout','$log','AssetPath','Utilities','Miscellaneous','DhbOrganizationSvc','CurrentUserSvc','MarketplaceSvc','TemplatePath',
|
5
|
+
($scope, $http, $q, $filter, $modal, $mdToast, $timeout, $log, AssetPath, Utilities, Miscellaneous, DhbOrganizationSvc, CurrentUserSvc, MarketplaceSvc, TemplatePath) ->
|
6
|
+
|
7
|
+
REAL_PROVISIONING_ENABLED = false
|
8
|
+
|
9
|
+
#====================================
|
10
|
+
# Construction
|
11
|
+
#====================================
|
12
|
+
$scope.isLoading = true
|
13
|
+
$scope.myApps = []
|
14
|
+
$scope.selectedCategories = {}
|
15
|
+
|
16
|
+
$scope.lists = {
|
17
|
+
industries: [
|
18
|
+
"Agriculture",
|
19
|
+
"Arts",
|
20
|
+
"Construction",
|
21
|
+
"Consumer Goods",
|
22
|
+
"Corporate",
|
23
|
+
"Educational",
|
24
|
+
"Finance",
|
25
|
+
"Government",
|
26
|
+
"High Tech",
|
27
|
+
"Legal",
|
28
|
+
"Manufacturing",
|
29
|
+
"Media",
|
30
|
+
"Medical",
|
31
|
+
"Non-Profit",
|
32
|
+
"Recreational",
|
33
|
+
"Service Transportation",
|
34
|
+
"Other",
|
35
|
+
],
|
36
|
+
sizes: [
|
37
|
+
{label: "1 to 5 employees", value: "1 - 5"},
|
38
|
+
{label: "6 to 10 employees", value: "6 - 10"},
|
39
|
+
{label: "11 to 50 employees", value: "11 - 50"},
|
40
|
+
{label: "51 to 200 employees", value: "51 - 200"},
|
41
|
+
{label: "+200 employees", value: "+200"},
|
42
|
+
],
|
43
|
+
popularApps: [
|
44
|
+
'xero','quickbooks','myob','vtiger6','sugarcrm','wordpress','timetrex','simpleinvoices','orangehrm', 'prestashop'
|
45
|
+
],
|
46
|
+
bundleCategories: {
|
47
|
+
"Accounting": [
|
48
|
+
"Manage your books",
|
49
|
+
"Manage multiple currency invoices",
|
50
|
+
"Track your finances",
|
51
|
+
"Reconcile your bank statements",
|
52
|
+
"Manage your inventory",
|
53
|
+
"Automate general ledger generation"
|
54
|
+
],
|
55
|
+
"Sales and Marketing": [
|
56
|
+
"Manage my contacts, customers and suppliers",
|
57
|
+
"Automate sales management",
|
58
|
+
"Forecast sales",
|
59
|
+
"Manage my purchase orders",
|
60
|
+
"Create and manage accounts payable & receivable",
|
61
|
+
"Manage support tickets"
|
62
|
+
],
|
63
|
+
"Content Management": [
|
64
|
+
"Create my website",
|
65
|
+
"Create a private portal",
|
66
|
+
"Organize my files",
|
67
|
+
"Create a vault for my files"
|
68
|
+
],
|
69
|
+
"Business Operations": [
|
70
|
+
"Have an overview on tasks to perform",
|
71
|
+
"Schedule an agenda and create milestones",
|
72
|
+
"Keep track of my production"
|
73
|
+
"Map processes"
|
74
|
+
"Design and test my company's processes"
|
75
|
+
],
|
76
|
+
"Project Managment": [
|
77
|
+
"Automate reminders on projects",
|
78
|
+
"Communicate instantly with my collaborators",
|
79
|
+
"Manage to do lists",
|
80
|
+
"create Gantt charts"
|
81
|
+
],
|
82
|
+
"HR": [
|
83
|
+
"Manage and automate payroll",
|
84
|
+
"Manage recruitment process",
|
85
|
+
"Automate absence management",
|
86
|
+
"Manage training and development"
|
87
|
+
],
|
88
|
+
"Learning Management System": [
|
89
|
+
"Create online classes and lessons",
|
90
|
+
"Create and manage discussion forum",
|
91
|
+
"Grade assignments",
|
92
|
+
"Create surveys"
|
93
|
+
],
|
94
|
+
"Online Surveying": [
|
95
|
+
"Follow up on online survey reports",
|
96
|
+
"Collect data through online surveys",
|
97
|
+
"Create graphs with your data"
|
98
|
+
]
|
99
|
+
},
|
100
|
+
recommendations: {
|
101
|
+
"Accounting": 'xero',
|
102
|
+
"Sales and Marketing": 'vtiger6',
|
103
|
+
"Content Management": 'wordpress',
|
104
|
+
"Business Operations": 'dolibarr',
|
105
|
+
"Project Managment": 'collabtive',
|
106
|
+
"HR": 'orangehrm',
|
107
|
+
"Learning Management System": 'moodle',
|
108
|
+
"Online Surveying": 'limesurvey'
|
109
|
+
}
|
110
|
+
}
|
111
|
+
|
112
|
+
$scope.workflows = {
|
113
|
+
step1: -> DhbOrganizationSvc.organization.update($scope.company)
|
114
|
+
}
|
115
|
+
|
116
|
+
# Scope initialization
|
117
|
+
$scope.initialize = ->
|
118
|
+
$scope.step = 1
|
119
|
+
$scope.locals = {}
|
120
|
+
$scope.user = CurrentUserSvc.document.current_user
|
121
|
+
$scope.company = DhbOrganizationSvc.data.organization
|
122
|
+
$scope.apps = MarketplaceSvc.data.apps
|
123
|
+
$scope.isLoading = false
|
124
|
+
|
125
|
+
#====================================
|
126
|
+
# Functions
|
127
|
+
#====================================
|
128
|
+
# Go to the next step - potentially perform an action
|
129
|
+
$scope.next = ->
|
130
|
+
$scope.isLoading = true
|
131
|
+
|
132
|
+
# Fetch "next" action or default to resolved promise
|
133
|
+
nextAction = $scope.workflows["step#{$scope.step}"]
|
134
|
+
unless nextAction
|
135
|
+
q = $q.defer()
|
136
|
+
q.resolve()
|
137
|
+
nextAction = -> q.promise
|
138
|
+
|
139
|
+
nextAction().then ->
|
140
|
+
$scope.skip()
|
141
|
+
|
142
|
+
# Skip the current step - no action performed
|
143
|
+
$scope.skip = ->
|
144
|
+
$scope.step += 1
|
145
|
+
$scope.isLoading = false
|
146
|
+
|
147
|
+
$scope.back = ->
|
148
|
+
$scope.step -= 1
|
149
|
+
$scope.isLoading = false
|
150
|
+
|
151
|
+
$scope.finishSetup = ->
|
152
|
+
if REAL_PROVISIONING_ENABLED && $scope.myApps.length > 0
|
153
|
+
$scope.provisionBasket()
|
154
|
+
else
|
155
|
+
$scope.redirectToMyspace()
|
156
|
+
|
157
|
+
$scope.redirectToMyspace = ->
|
158
|
+
window.location.href = "/mnoe/myspace"
|
159
|
+
|
160
|
+
$scope.provisionBasket = ->
|
161
|
+
q = _.reduce($scope.myApps, ((memo, e) -> "#{memo}&apps[]=#{e.nid}"),"")
|
162
|
+
window.location.href = "/mnoe/provision/new?#{q}"
|
163
|
+
|
164
|
+
# Return the list of popular apps in the order specified by the configuration array
|
165
|
+
$scope.popularApps = ->
|
166
|
+
_.map $scope.lists.popularApps, (e) -> _.findWhere($scope.apps, nid: e)
|
167
|
+
|
168
|
+
|
169
|
+
# Show a notification message at the top right of the screen
|
170
|
+
$scope.showMessageToast = (msg)->
|
171
|
+
$mdToast.show(
|
172
|
+
$mdToast.simple()
|
173
|
+
.content(msg)
|
174
|
+
.position("top right")
|
175
|
+
.hideDelay(4000)
|
176
|
+
.parent(angular.element('.user-setup'))
|
177
|
+
)
|
178
|
+
|
179
|
+
# Recommend applications based on selected categories
|
180
|
+
$scope.recommendedApps = ->
|
181
|
+
bla = _.reduce $scope.selectedCategories, (memo, v,k) ->
|
182
|
+
memo.push(_.findWhere($scope.apps, nid: $scope.lists.recommendations[k])) if v
|
183
|
+
memo
|
184
|
+
,[]
|
185
|
+
|
186
|
+
# Add an application to the user basket
|
187
|
+
$scope.addAppToBasket = (app) ->
|
188
|
+
$scope.showMessageToast("#{app.name} has been successfully added to your free trial!")
|
189
|
+
$scope.myApps.push(app) unless $scope.isAppInBasket(app)
|
190
|
+
|
191
|
+
# Remove an application from the user basket
|
192
|
+
$scope.removeAppFromBasket = (app) ->
|
193
|
+
$scope.showMessageToast("#{app.name} has been removed from your free trial")
|
194
|
+
if $scope.isAppInBasket
|
195
|
+
index = $scope.myApps.indexOf(app)
|
196
|
+
$scope.myApps.splice(index, 1)
|
197
|
+
|
198
|
+
# Add/remove an application from the user basket
|
199
|
+
$scope.toggleAppInBasket = (app) ->
|
200
|
+
if $scope.isAppInBasket(app) then $scope.removeAppFromBasket(app) else $scope.addAppToBasket(app)
|
201
|
+
|
202
|
+
# Return true if the provided app is in the user basket - false otherwise
|
203
|
+
$scope.isAppInBasket = (app) ->
|
204
|
+
_.contains($scope.myApps,app)
|
205
|
+
|
206
|
+
|
207
|
+
$scope.toggleOrConnect = (app) ->
|
208
|
+
if $scope.isAppInBasket(app) then $scope.removeAppFromBasket(app) else $scope.connectApp(app)
|
209
|
+
|
210
|
+
# Switch to the connect screen
|
211
|
+
$scope.connectApp = (app) ->
|
212
|
+
$scope.connectPane.currentApp = app
|
213
|
+
$timeout(
|
214
|
+
->
|
215
|
+
$scope.connectPane.shown = true
|
216
|
+
,300)
|
217
|
+
|
218
|
+
#====================================
|
219
|
+
# Connect Pane
|
220
|
+
#====================================
|
221
|
+
$scope.connectPane = {}
|
222
|
+
|
223
|
+
$scope.connectPane.connect = ->
|
224
|
+
self = $scope.connectPane
|
225
|
+
self.loading = true
|
226
|
+
$timeout(
|
227
|
+
->
|
228
|
+
$scope.addAppToBasket(self.currentApp)
|
229
|
+
self.cancel()
|
230
|
+
, 2000)
|
231
|
+
|
232
|
+
|
233
|
+
$scope.connectPane.cancel = ->
|
234
|
+
self = $scope.connectPane
|
235
|
+
self.loading = false
|
236
|
+
self.shown = false
|
237
|
+
self.currentApp = undefined
|
238
|
+
|
239
|
+
#====================================
|
240
|
+
# Initialization
|
241
|
+
#====================================
|
242
|
+
CurrentUserSvc.loadDocument().then ->
|
243
|
+
DhbOrganizationSvc.configure(id: CurrentUserSvc.document.current_user.organizations[0].id)
|
244
|
+
$q.all([DhbOrganizationSvc.load(),MarketplaceSvc.load()]).then ->
|
245
|
+
$scope.initialize()
|
246
|
+
])
|
247
|
+
|
248
|
+
module.directive('userSetupIndex', ['TemplatePath', (TemplatePath) ->
|
249
|
+
return {
|
250
|
+
restrict: 'AE',
|
251
|
+
scope: {
|
252
|
+
},
|
253
|
+
templateUrl: TemplatePath['mno_enterprise/user-setup/index.html'],
|
254
|
+
controller: 'UserSetupIndexCtrl'
|
255
|
+
}
|
256
|
+
])
|