Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- angular.module('grimoldiApollo', ['ui.router', 'LocalStorageModule', 'ui.bootstrap', 'blockUI', 'ngFileUpload', 'ngSanitize', 'amChartsDirective', 'date-picker-simple', 'number-input', 'angularBootstrapNavTree', 'file-upload'])
- .run(['$rootScope', '$location', '$state', '$stateParams', '$timeout', 'authServiceFactory',
- function ($rootScope, $location, $state, $stateParams, $timeout, authServiceFactory) {
- authServiceFactory.fillAuthData();
- $rootScope.$on("$stateChangeStart",
- function (event, toState, toParams, fromState, fromParams) {
- if (toState.name !== 'appan.login' &&
- toState.name !== 'appan.resetpassExitoso' &&
- toState.name !== 'appan.resetpassError' &&
- toState.name !== 'appan.cambiarPasswordAnonimo' &&
- !authServiceFactory.authentication.isAuth) {
- event.preventDefault();
- $state.go('appan.login');
- }
- });
- }])
- .config(['$httpProvider', function ($httpProvider) {
- $httpProvider.interceptors.push('authInterceptorFactory');
- $httpProvider.interceptors.push('jsonInterceptorFactory');
- }])
- .config(['blockUIConfig', function (blockUIConfig) {
- blockUIConfig.autoBlock = false;
- blockUIConfig.message = 'Cargando...';
- }])
- .config(['uibDatepickerPopupConfig', function (uibDatepickerPopupConfig) {
- uibDatepickerPopupConfig.datepickerPopup = 'dd/MM/yyyy';
- uibDatepickerPopupConfig.clearText = "Borrar";
- uibDatepickerPopupConfig.currentText = "Hoy";
- uibDatepickerPopupConfig.closeText = "Cerrar";
- }])
- .config(['uibPaginationConfig', function (uibPaginationConfig) {
- uibPaginationConfig.maxSize = 9;
- uibPaginationConfig.firstText = 'Primera';
- uibPaginationConfig.previousText = "Anterior";
- uibPaginationConfig.nextText = 'Siguiente';
- uibPaginationConfig.lastText = "Ultima";
- uibPaginationConfig.rotate = false;
- uibPaginationConfig.boundaryLinks = true;
- }])
- .constant('constants', {
- apiServiceBaseUri: document.location.protocol + '//' + document.location.host + '/',
- clientId: 'GrimoldiApollo',
- applicationName: 'Grimoldi Apollo',
- clientName: 'Grimoldi Apollo',
- reportesTipo: { excel: 1, pdf: 2 },
- apiMediaManagerWeb: 'http://md.grimem.com.ar/',
- regexIso8601: /^(\d{4})-(\d{2})-(\d{2})(?:T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{3}))?)?(?:(Z)|([+\-])(\d{2})(?::(\d{2}))?)?)?$/
- })
- .provider('version', function () {
- this.versionGuid = '1111111';
- this.$get = function () {
- var versionGuid = this.versionGuid;
- return {
- getVersionGuid: function () {
- return versionGuid
- }
- }
- };
- this.setVersionGuid = function (versionGuid) {
- this.versionGuid = versionGuid;
- };
- })
- .config(function (versionProvider) {
- versionProvider.setVersionGuid((new Date()).getTime().toString());
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement