diff --git a/bower.json b/bower.json
index 917aaa9..3b074a1 100644
--- a/bower.json
+++ b/bower.json
@@ -54,7 +54,8 @@
"textAngular": "~1.4.6",
"angular-xeditable": "~0.5.0",
"ng-js-tree": "~0.0.7",
- "angular-ui-select": "^0.19.6"
+ "angular-ui-select": "^0.19.6",
+ "lodash": "^4.17.4"
},
"resolutions": {
"angular": "~1.5.9",
diff --git a/gulp/inject.js b/gulp/inject.js
index 05bf008..e61e738 100644
--- a/gulp/inject.js
+++ b/gulp/inject.js
@@ -11,24 +11,26 @@ var _ = require('lodash');
var browserSync = require('browser-sync');
-gulp.task('inject-reload', ['inject'], function () {
+gulp.task('inject-reload', ['inject'], function() {
browserSync.reload();
});
-gulp.task('inject', ['scripts', 'styles', 'injectAuth', 'inject404', 'copyVendorImages'], function () {
+gulp.task('inject', ['scripts', 'styles', 'injectAuth', 'inject404', 'copyVendorImages'], function() {
var injectStyles = gulp.src([
path.join(conf.paths.tmp, '/serve/app/main.css'),
+ path.join(conf.paths.tmp, '/serve/app/auth.css'),
path.join('!' + conf.paths.tmp, '/serve/app/vendor.css')
- ], {read: false});
+ ], { read: false });
var injectScripts = gulp.src([
- path.join(conf.paths.src, '/assets/js/**/*.js'),
- path.join(conf.paths.src, '/app/**/*.module.js'),
- path.join(conf.paths.src, '/app/**/*.js'),
- path.join('!' + conf.paths.src, '/app/**/*.spec.js'),
- path.join('!' + conf.paths.src, '/app/**/*.mock.js'),
- ])
- /*.pipe($.angularFilesort())*/.on('error', conf.errorHandler('AngularFilesort'));
+ path.join(conf.paths.src, '/assets/js/**/*.js'),
+ path.join(conf.paths.src, '/app/**/*.module.js'),
+ path.join(conf.paths.src, '/app/**/*.js'),
+ path.join('!' + conf.paths.src, '/app/**/*.spec.js'),
+ path.join('!' + conf.paths.src, '/app/**/*.mock.js'),
+ ])
+ /*.pipe($.angularFilesort())*/
+ .on('error', conf.errorHandler('AngularFilesort'));
var injectOptions = {
ignorePath: [conf.paths.src, path.join(conf.paths.tmp, '/serve')],
@@ -42,24 +44,23 @@ gulp.task('inject', ['scripts', 'styles', 'injectAuth', 'inject404', 'copyVendor
.pipe(gulp.dest(path.join(conf.paths.tmp, '/serve')));
});
-gulp.task('injectAuth', ['stylesAuth'], function () {
+gulp.task('injectAuth', ['stylesAuth'], function() {
return injectAlone({
css: [path.join('!' + conf.paths.tmp, '/serve/app/vendor.css'), path.join(conf.paths.tmp, '/serve/app/auth.css')],
- paths: [path.join(conf.paths.src, '/auth.html'), path.join(conf.paths.src, '/reg.html')]
+ paths: [path.join(conf.paths.src, '/auth.html'), path.join(conf.paths.src, '/reg.html'), path.join(conf.paths.src, '/app/pages/authSigIn/authSignIn.html'), path.join(conf.paths.src, '/app/pages/authSigIn/authSignUp.html')]
})
});
-gulp.task('inject404', ['styles404'], function () {
+gulp.task('inject404', ['styles404'], function() {
return injectAlone({
css: [path.join('!' + conf.paths.tmp, '/serve/app/vendor.css'), path.join(conf.paths.tmp, '/serve/app/404.css')],
paths: path.join(conf.paths.src, '/404.html')
})
});
-var injectAlone = function (options) {
+var injectAlone = function(options) {
var injectStyles = gulp.src(
- options.css
- , {read: false});
+ options.css, { read: false });
var injectOptions = {
ignorePath: [conf.paths.src, path.join(conf.paths.tmp, '/serve')],
diff --git a/src/app/pages/authSignIn/authSignIn.html b/src/app/pages/authSignIn/authSignIn.html
new file mode 100644
index 0000000..51befed
--- /dev/null
+++ b/src/app/pages/authSignIn/authSignIn.html
@@ -0,0 +1,42 @@
+
\ No newline at end of file
diff --git a/src/app/pages/authSignIn/authSignIn.module.js b/src/app/pages/authSignIn/authSignIn.module.js
new file mode 100644
index 0000000..207c7ce
--- /dev/null
+++ b/src/app/pages/authSignIn/authSignIn.module.js
@@ -0,0 +1,22 @@
+(function() {
+ 'use strict';
+
+ angular.module('BlurAdmin.pages.authSignIn', [])
+ .config(routeConfig);
+
+ /** @ngInject */
+ function routeConfig($stateProvider) {
+ $stateProvider
+ .state('authSignIn', {
+ url: '/authSignIn',
+ templateUrl: 'app/pages/authSignIn/authSignIn.html',
+ title: 'My Page',
+ controller: 'authSignInCtrl',
+ sidebarMeta: {
+ order: 800,
+ },
+ authenticate: false
+ });
+ }
+
+})();
\ No newline at end of file
diff --git a/src/app/pages/authSignIn/authSignInCtrl.js b/src/app/pages/authSignIn/authSignInCtrl.js
new file mode 100644
index 0000000..8826da6
--- /dev/null
+++ b/src/app/pages/authSignIn/authSignInCtrl.js
@@ -0,0 +1,31 @@
+(function() {
+ 'use strict';
+
+ angular.module('BlurAdmin.pages.authSignIn')
+ .controller('authSignInCtrl', authSignInCtrl);
+
+ /** @ngInject */
+ function authSignInCtrl($scope, localStorage, $state) {
+ var vm = this;
+
+ vm.logar = logar;
+
+ init();
+
+ function init() {
+ localStorage.clear();
+ }
+
+ function logar() {
+ var dadosUser = {
+ user: vm.user,
+ passWord: vm.passWord
+ };
+ localStorage.setObject('dataUser', dadosUser);
+ $state.go('main.dashboard');
+ }
+
+
+ }
+
+})();
\ No newline at end of file
diff --git a/src/app/pages/authSignUp/authSignUp.html b/src/app/pages/authSignUp/authSignUp.html
new file mode 100644
index 0000000..6bf0b00
--- /dev/null
+++ b/src/app/pages/authSignUp/authSignUp.html
@@ -0,0 +1,49 @@
+
\ No newline at end of file
diff --git a/src/app/pages/authSignUp/authSignUp.module.js b/src/app/pages/authSignUp/authSignUp.module.js
new file mode 100644
index 0000000..cfcf516
--- /dev/null
+++ b/src/app/pages/authSignUp/authSignUp.module.js
@@ -0,0 +1,22 @@
+(function() {
+ 'use strict';
+
+ angular.module('BlurAdmin.pages.authSignUp', [])
+ .config(routeConfig);
+
+ /** @ngInject */
+ function routeConfig($stateProvider) {
+ $stateProvider
+ .state('authSignUp', {
+ url: '/authSignUp',
+ templateUrl: 'app/pages/authSignUp/authSignUp.html',
+ title: 'My Page',
+ controller: 'authSignUpCtrl',
+ sidebarMeta: {
+ order: 800,
+ },
+ authenticate: false
+ });
+ }
+
+})();
\ No newline at end of file
diff --git a/src/app/pages/authSignUp/authSignUpCtrl.js b/src/app/pages/authSignUp/authSignUpCtrl.js
new file mode 100644
index 0000000..31fc5df
--- /dev/null
+++ b/src/app/pages/authSignUp/authSignUpCtrl.js
@@ -0,0 +1,13 @@
+(function() {
+ 'use strict';
+
+ angular.module('BlurAdmin.pages.authSignUp')
+ .controller('authSignUpCtrl', authSignUpCtrl);
+
+ /** @ngInject */
+ function authSignUpCtrl($scope) {
+ var vm = this;
+
+ }
+
+})();
\ No newline at end of file
diff --git a/src/app/pages/charts/amCharts/amCharts.module.js b/src/app/pages/charts/amCharts/amCharts.module.js
index 2bbebf2..e2ffa8e 100644
--- a/src/app/pages/charts/amCharts/amCharts.module.js
+++ b/src/app/pages/charts/amCharts/amCharts.module.js
@@ -2,23 +2,24 @@
* @author v.lugovsky
* created on 16.12.2015
*/
-(function () {
+(function() {
'use strict';
angular.module('BlurAdmin.pages.charts.amCharts', [])
- .config(routeConfig).config(amChartConfig);
+ .config(routeConfig).config(amChartConfig);
/** @ngInject */
function routeConfig($stateProvider) {
$stateProvider
- .state('charts.amCharts', {
- url: '/amCharts',
- templateUrl: 'app/pages/charts/amCharts/charts.html',
- title: 'amCharts',
- sidebarMeta: {
- order: 0,
- },
- });
+ .state('main.charts.amCharts', {
+ url: '/amCharts',
+ templateUrl: 'app/pages/charts/amCharts/charts.html',
+ title: 'amCharts',
+ sidebarMeta: {
+ order: 0,
+ },
+ authenticate: true
+ });
}
function amChartConfig(baConfigProvider) {
@@ -222,4 +223,4 @@
};
}
-})();
+})();
\ No newline at end of file
diff --git a/src/app/pages/charts/chartJs/chartJs.module.js b/src/app/pages/charts/chartJs/chartJs.module.js
index 3e6ce2a..bf3ab31 100644
--- a/src/app/pages/charts/chartJs/chartJs.module.js
+++ b/src/app/pages/charts/chartJs/chartJs.module.js
@@ -2,71 +2,73 @@
* @author a.demeshko
* created on 12/16/15
*/
-(function () {
- 'use strict';
+(function() {
+ 'use strict';
- angular.module('BlurAdmin.pages.charts.chartJs', [])
- .config(routeConfig).config(chartJsConfig);
+ angular.module('BlurAdmin.pages.charts.chartJs', [])
+ .config(routeConfig).config(chartJsConfig);
- /** @ngInject */
- function routeConfig($stateProvider) {
- $stateProvider
- .state('charts.chartJs', {
- url: '/chartJs',
- templateUrl: 'app/pages/charts/chartJs/chartJs.html',
- title: 'Chart.js',
- sidebarMeta: {
- order: 200
- }
- });
- }
+ /** @ngInject */
+ function routeConfig($stateProvider) {
+ $stateProvider
+ .state('main.charts.chartJs', {
+ url: '/chartJs',
+ templateUrl: 'app/pages/charts/chartJs/chartJs.html',
+ title: 'Chart.js',
+ sidebarMeta: {
+ order: 200
+ },
+ authenticate: true
+ });
+ }
- function chartJsConfig(ChartJsProvider, baConfigProvider) {
- var layoutColors = baConfigProvider.colors;
- // Configure all charts
- ChartJsProvider.setOptions({
- chartColors: [
- layoutColors.primary, layoutColors.danger, layoutColors.warning, layoutColors.success, layoutColors.info, layoutColors.default, layoutColors.primaryDark, layoutColors.successDark, layoutColors.warningLight, layoutColors.successLight, layoutColors.primaryLight],
- responsive: true,
- maintainAspectRatio: false,
- animation: {
- duration: 2500
- },
- scale: {
- gridLines: {
- color: layoutColors.border
- },
- scaleLabel: {
- fontColor: layoutColors.defaultText
- },
- ticks: {
- fontColor: layoutColors.defaultText,
- showLabelBackdrop: false
- }
- }
- });
- // Configure all line charts
- ChartJsProvider.setOptions('Line', {
- datasetFill: false
- });
- // Configure all radar charts
- ChartJsProvider.setOptions('radar', {
- scale: {
- pointLabels: {
- fontColor: layoutColors.defaultText
- },
- ticks: {
- maxTicksLimit: 5,
- display: false
- }
- }
- });
- // Configure all bar charts
- ChartJsProvider.setOptions('bar', {
- tooltips: {
- enabled: false
- }
- });
- }
+ function chartJsConfig(ChartJsProvider, baConfigProvider) {
+ var layoutColors = baConfigProvider.colors;
+ // Configure all charts
+ ChartJsProvider.setOptions({
+ chartColors: [
+ layoutColors.primary, layoutColors.danger, layoutColors.warning, layoutColors.success, layoutColors.info, layoutColors.default, layoutColors.primaryDark, layoutColors.successDark, layoutColors.warningLight, layoutColors.successLight, layoutColors.primaryLight
+ ],
+ responsive: true,
+ maintainAspectRatio: false,
+ animation: {
+ duration: 2500
+ },
+ scale: {
+ gridLines: {
+ color: layoutColors.border
+ },
+ scaleLabel: {
+ fontColor: layoutColors.defaultText
+ },
+ ticks: {
+ fontColor: layoutColors.defaultText,
+ showLabelBackdrop: false
+ }
+ }
+ });
+ // Configure all line charts
+ ChartJsProvider.setOptions('Line', {
+ datasetFill: false
+ });
+ // Configure all radar charts
+ ChartJsProvider.setOptions('radar', {
+ scale: {
+ pointLabels: {
+ fontColor: layoutColors.defaultText
+ },
+ ticks: {
+ maxTicksLimit: 5,
+ display: false
+ }
+ }
+ });
+ // Configure all bar charts
+ ChartJsProvider.setOptions('bar', {
+ tooltips: {
+ enabled: false
+ }
+ });
+ }
})();
\ No newline at end of file
diff --git a/src/app/pages/charts/chartist/chartist.module.js b/src/app/pages/charts/chartist/chartist.module.js
index 19eba7f..1ccffbb 100644
--- a/src/app/pages/charts/chartist/chartist.module.js
+++ b/src/app/pages/charts/chartist/chartist.module.js
@@ -2,7 +2,7 @@
* @author a.demeshko
* created on 12/17/15
*/
-(function () {
+(function() {
'use strict';
angular.module('BlurAdmin.pages.charts.chartist', [])
@@ -11,14 +11,15 @@
/** @ngInject */
function routeConfig($stateProvider) {
$stateProvider
- .state('charts.chartist', {
- url: '/chartist',
- templateUrl: 'app/pages/charts/chartist/chartist.html',
- title: 'Chartist',
- sidebarMeta: {
- order: 100,
- },
- });
+ .state('main.charts.chartist', {
+ url: '/chartist',
+ templateUrl: 'app/pages/charts/chartist/chartist.html',
+ title: 'Chartist',
+ sidebarMeta: {
+ order: 100,
+ },
+ authenticate: true
+ });
}
})();
\ No newline at end of file
diff --git a/src/app/pages/charts/charts.module.js b/src/app/pages/charts/charts.module.js
index fc3ec72..a59f413 100644
--- a/src/app/pages/charts/charts.module.js
+++ b/src/app/pages/charts/charts.module.js
@@ -2,7 +2,7 @@
* @author v.lugovsky
* created on 16.12.2015
*/
-(function () {
+(function() {
'use strict';
angular.module('BlurAdmin.pages.charts', [
@@ -10,22 +10,23 @@
'BlurAdmin.pages.charts.chartJs',
'BlurAdmin.pages.charts.chartist',
'BlurAdmin.pages.charts.morris'
- ])
- .config(routeConfig);
+ ])
+ .config(routeConfig);
/** @ngInject */
function routeConfig($stateProvider) {
$stateProvider
- .state('charts', {
- url: '/charts',
- abstract: true,
- template: '',
- title: 'Charts',
- sidebarMeta: {
- icon: 'ion-stats-bars',
- order: 150,
- },
- });
+ .state('main.charts', {
+ url: '/charts',
+ abstract: true,
+ template: '',
+ title: 'Charts',
+ sidebarMeta: {
+ icon: 'ion-stats-bars',
+ order: 150,
+ },
+ authenticate: true
+ });
}
-})();
+})();
\ No newline at end of file
diff --git a/src/app/pages/charts/morris/morris.module.js b/src/app/pages/charts/morris/morris.module.js
index 128e4ce..c623493 100644
--- a/src/app/pages/charts/morris/morris.module.js
+++ b/src/app/pages/charts/morris/morris.module.js
@@ -2,11 +2,11 @@
* @author a.demeshko
* created on 12/18/15
*/
-(function () {
+(function() {
'use strict';
angular.module('BlurAdmin.pages.charts.morris', [])
- .config(routeConfig).config(function(baConfigProvider){
+ .config(routeConfig).config(function(baConfigProvider) {
var layoutColors = baConfigProvider.colors;
Morris.Donut.prototype.defaults.backgroundColor = 'transparent';
Morris.Donut.prototype.defaults.labelColor = layoutColors.defaultText;
@@ -17,14 +17,15 @@
/** @ngInject */
function routeConfig($stateProvider) {
$stateProvider
- .state('charts.morris', {
- url: '/morris',
- templateUrl: 'app/pages/charts/morris/morris.html',
- title: 'Morris',
- sidebarMeta: {
- order: 300,
- }
- });
+ .state('main.charts.morris', {
+ url: '/morris',
+ templateUrl: 'app/pages/charts/morris/morris.html',
+ title: 'Morris',
+ sidebarMeta: {
+ order: 300,
+ },
+ authenticate: true
+ });
}
})();
\ No newline at end of file
diff --git a/src/app/pages/components/components.module.js b/src/app/pages/components/components.module.js
index a57e070..b9d8c9a 100644
--- a/src/app/pages/components/components.module.js
+++ b/src/app/pages/components/components.module.js
@@ -2,29 +2,30 @@
* @author k.danovsky
* created on 15.01.2016
*/
-(function () {
+(function() {
'use strict';
angular.module('BlurAdmin.pages.components', [
- 'BlurAdmin.pages.components.mail',
- 'BlurAdmin.pages.components.timeline',
- 'BlurAdmin.pages.components.tree',
- ])
- .config(routeConfig);
+ 'BlurAdmin.pages.components.mail',
+ 'BlurAdmin.pages.components.timeline',
+ 'BlurAdmin.pages.components.tree',
+ ])
+ .config(routeConfig);
/** @ngInject */
function routeConfig($stateProvider) {
$stateProvider
- .state('components', {
- url: '/components',
- template : '',
- abstract: true,
- title: 'Components',
- sidebarMeta: {
- icon: 'ion-gear-a',
- order: 100,
- },
- });
+ .state('main.components', {
+ url: '/components',
+ template: '',
+ abstract: true,
+ title: 'Components',
+ sidebarMeta: {
+ icon: 'ion-gear-a',
+ order: 100,
+ },
+ authenticate: true
+ });
}
-})();
+})();
\ No newline at end of file
diff --git a/src/app/pages/components/mail/mail.module.js b/src/app/pages/components/mail/mail.module.js
index 335ee64..fe165a9 100644
--- a/src/app/pages/components/mail/mail.module.js
+++ b/src/app/pages/components/mail/mail.module.js
@@ -2,39 +2,42 @@
* @author v.lugovsky
* created on 16.12.2015
*/
-(function () {
+(function() {
'use strict';
angular.module('BlurAdmin.pages.components.mail', [])
.config(routeConfig);
/** @ngInject */
- function routeConfig($stateProvider,$urlRouterProvider) {
+ function routeConfig($stateProvider, $urlRouterProvider) {
$stateProvider
- .state('components.mail', {
- url: '/mail',
- abstract: true,
- templateUrl: 'app/pages/components/mail/mail.html',
- controller: "MailTabCtrl",
- controllerAs: "tabCtrl",
- title: 'Mail',
- sidebarMeta: {
- order: 0,
- },
- }).state('components.mail.label', {
- url: '/:label',
- templateUrl: 'app/pages/components/mail/list/mailList.html',
- title: 'Mail',
- controller: "MailListCtrl",
- controllerAs: "listCtrl"
- }).state('components.mail.detail', {
- url: '/:label/:id',
- templateUrl: 'app/pages/components/mail/detail/mailDetail.html',
- title: 'Mail',
- controller: "MailDetailCtrl",
- controllerAs: "detailCtrl"
- });
- $urlRouterProvider.when('/components/mail','/components/mail/inbox');
+ .state('main.components.mail', {
+ url: '/mail',
+ abstract: true,
+ templateUrl: 'app/pages/components/mail/mail.html',
+ controller: "MailTabCtrl",
+ controllerAs: "tabCtrl",
+ title: 'Mail',
+ sidebarMeta: {
+ order: 0,
+ },
+ authenticate: true
+ }).state('main.components.mail.label', {
+ url: '/:label',
+ templateUrl: 'app/pages/components/mail/list/mailList.html',
+ title: 'Mail',
+ controller: "MailListCtrl",
+ controllerAs: "listCtrl",
+ authenticate: true
+ }).state('main.components.mail.detail', {
+ url: '/:label/:id',
+ templateUrl: 'app/pages/components/mail/detail/mailDetail.html',
+ title: 'Mail',
+ controller: "MailDetailCtrl",
+ controllerAs: "detailCtrl",
+ authenticate: true
+ });
+ $urlRouterProvider.when('/main/components/mail', '/main/components/mail/inbox');
}
-})();
+})();
\ No newline at end of file
diff --git a/src/app/pages/components/timeline/timeline.module.js b/src/app/pages/components/timeline/timeline.module.js
index e111797..bd8ca7a 100644
--- a/src/app/pages/components/timeline/timeline.module.js
+++ b/src/app/pages/components/timeline/timeline.module.js
@@ -2,7 +2,7 @@
* @author a.demeshko
* created on 1/12/16
*/
-(function () {
+(function() {
'use strict';
angular.module('BlurAdmin.pages.components.timeline', [])
@@ -11,14 +11,15 @@
/** @ngInject */
function routeConfig($stateProvider) {
$stateProvider
- .state('components.timeline', {
+ .state('main.components.timeline', {
url: '/timeline',
templateUrl: 'app/pages/components/timeline/timeline.html',
- title: 'Timeline',
- sidebarMeta: {
- icon: 'ion-ios-pulse',
- order: 100,
- },
+ title: 'Timeline',
+ sidebarMeta: {
+ icon: 'ion-ios-pulse',
+ order: 100,
+ },
+ authenticate: true
});
}
})();
\ No newline at end of file
diff --git a/src/app/pages/components/tree/tree.module.js b/src/app/pages/components/tree/tree.module.js
index da26197..6c3c3d7 100644
--- a/src/app/pages/components/tree/tree.module.js
+++ b/src/app/pages/components/tree/tree.module.js
@@ -2,12 +2,12 @@
* @author a.demeshko
* created on 12.21.2015
*/
-(function () {
+(function() {
'use strict';
angular.module('BlurAdmin.pages.components.tree', [])
.config(routeConfig)
- .config(function(){
+ .config(function() {
$.jstree.defaults.core.themes.url = true;
$.jstree.defaults.core.themes.dir = "assets/img/theme/vendor/jstree/dist/themes";
});
@@ -15,14 +15,15 @@
/** @ngInject */
function routeConfig($stateProvider) {
$stateProvider
- .state('components.tree', {
- url: '/tree',
- templateUrl: 'app/pages/components/tree/tree.html',
- title: 'Tree View',
- sidebarMeta: {
- order: 200,
- },
- });
+ .state('main.components.tree', {
+ url: '/tree',
+ templateUrl: 'app/pages/components/tree/tree.html',
+ title: 'Tree View',
+ sidebarMeta: {
+ order: 200,
+ },
+ authenticate: true
+ });
}
-})();
+})();
\ No newline at end of file
diff --git a/src/app/pages/config/config.module.js b/src/app/pages/config/config.module.js
new file mode 100644
index 0000000..bfb5bb9
--- /dev/null
+++ b/src/app/pages/config/config.module.js
@@ -0,0 +1,12 @@
+(function() {
+ 'use strict';
+
+ angular.module('BlurAdmin.pages.config', [])
+ .config(routeConfig);
+
+ /** @ngInject */
+ function routeConfig() {
+
+ }
+
+})();
\ No newline at end of file
diff --git a/src/app/pages/config/routeChange.js b/src/app/pages/config/routeChange.js
new file mode 100644
index 0000000..f0d2b7b
--- /dev/null
+++ b/src/app/pages/config/routeChange.js
@@ -0,0 +1,19 @@
+(function() {
+ 'use strict';
+
+ angular.module('BlurAdmin.pages.config')
+ .run(stateChangeStart);
+
+ /** @ngInject */
+ function stateChangeStart($rootScope, $state, localStorage) {
+ $rootScope.$on("$stateChangeStart", function(event, toState, toParams, fromState, fromParams) {
+ var login = localStorage.getObject('dataUser');
+ if (toState.authenticate && _.isEmpty(login)) {
+ // User isn’t authenticated
+ $state.transitionTo("authSignIn");
+ event.preventDefault();
+ }
+ });
+ }
+
+})();
\ No newline at end of file
diff --git a/src/app/pages/dashboard/dashboard.module.js b/src/app/pages/dashboard/dashboard.module.js
index 51eedb2..d59da36 100644
--- a/src/app/pages/dashboard/dashboard.module.js
+++ b/src/app/pages/dashboard/dashboard.module.js
@@ -2,24 +2,25 @@
* @author v.lugovsky
* created on 16.12.2015
*/
-(function () {
+(function() {
'use strict';
angular.module('BlurAdmin.pages.dashboard', [])
- .config(routeConfig);
+ .config(routeConfig);
/** @ngInject */
function routeConfig($stateProvider) {
$stateProvider
- .state('dashboard', {
- url: '/dashboard',
- templateUrl: 'app/pages/dashboard/dashboard.html',
- title: 'Dashboard',
- sidebarMeta: {
- icon: 'ion-android-home',
- order: 0,
- },
- });
+ .state('main.dashboard', {
+ url: '/dashboard',
+ templateUrl: 'app/pages/dashboard/dashboard.html',
+ title: 'Dashboard',
+ sidebarMeta: {
+ icon: 'ion-android-home',
+ order: 0,
+ },
+ authenticate: true
+ });
}
-})();
+})();
\ No newline at end of file
diff --git a/src/app/pages/form/form.module.js b/src/app/pages/form/form.module.js
index 31ea0e1..60da491 100644
--- a/src/app/pages/form/form.module.js
+++ b/src/app/pages/form/form.module.js
@@ -2,51 +2,54 @@
* @author v.lugovsky
* created on 16.12.2015
*/
-(function () {
+(function() {
'use strict';
angular.module('BlurAdmin.pages.form', ['ui.select', 'ngSanitize'])
- .config(routeConfig);
+ .config(routeConfig);
/** @ngInject */
function routeConfig($stateProvider) {
$stateProvider
- .state('form', {
- url: '/form',
- template : '',
- abstract: true,
- title: 'Form Elements',
- sidebarMeta: {
- icon: 'ion-compose',
- order: 250,
- },
- })
- .state('form.inputs', {
- url: '/inputs',
- templateUrl: 'app/pages/form/inputs/inputs.html',
- title: 'Form Inputs',
- sidebarMeta: {
- order: 0,
- },
- })
- .state('form.layouts', {
- url: '/layouts',
- templateUrl: 'app/pages/form/layouts/layouts.html',
- title: 'Form Layouts',
- sidebarMeta: {
- order: 100,
- },
- })
- .state('form.wizard',
- {
- url: '/wizard',
- templateUrl: 'app/pages/form/wizard/wizard.html',
- controller: 'WizardCtrl',
- controllerAs: 'vm',
- title: 'Form Wizard',
- sidebarMeta: {
- order: 200,
- },
- });
+ .state('main.form', {
+ url: '/form',
+ template: '',
+ abstract: true,
+ title: 'Form Elements',
+ sidebarMeta: {
+ icon: 'ion-compose',
+ order: 250,
+ },
+ authenticate: true
+ })
+ .state('main.form.inputs', {
+ url: '/inputs',
+ templateUrl: 'app/pages/form/inputs/inputs.html',
+ title: 'Form Inputs',
+ sidebarMeta: {
+ order: 0,
+ },
+ authenticate: true
+ })
+ .state('main.form.layouts', {
+ url: '/layouts',
+ templateUrl: 'app/pages/form/layouts/layouts.html',
+ title: 'Form Layouts',
+ sidebarMeta: {
+ order: 100,
+ },
+ authenticate: true
+ })
+ .state('main.form.wizard', {
+ url: '/wizard',
+ templateUrl: 'app/pages/form/wizard/wizard.html',
+ controller: 'WizardCtrl',
+ controllerAs: 'vm',
+ title: 'Form Wizard',
+ sidebarMeta: {
+ order: 200,
+ },
+ authenticate: true
+ });
}
-})();
+})();
\ No newline at end of file
diff --git a/src/app/pages/main/main.html b/src/app/pages/main/main.html
new file mode 100644
index 0000000..328f8fe
--- /dev/null
+++ b/src/app/pages/main/main.html
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/app/pages/main/main.module.js b/src/app/pages/main/main.module.js
new file mode 100644
index 0000000..c1c8259
--- /dev/null
+++ b/src/app/pages/main/main.module.js
@@ -0,0 +1,24 @@
+/**
+ * @author l.azevedo
+ * created on 29.07.2017
+ */
+(function() {
+ 'use strict';
+
+ angular.module('BlurAdmin.pages.main', [])
+ .config(routeConfig);
+
+ /** @ngInject */
+ function routeConfig($stateProvider) {
+ $stateProvider
+ .state('main', {
+ url: '/main',
+ templateUrl: 'app/pages/main/main.html',
+ redirectTo: 'main.dashboard',
+ authenticate: true
+
+
+ });
+ }
+
+})();
\ No newline at end of file
diff --git a/src/app/pages/maps/maps.module.js b/src/app/pages/maps/maps.module.js
index 47c3984..cf14bd4 100644
--- a/src/app/pages/maps/maps.module.js
+++ b/src/app/pages/maps/maps.module.js
@@ -2,61 +2,66 @@
* @author v.lugovsky
* created on 16.12.2015
*/
-(function () {
+(function() {
'use strict';
angular.module('BlurAdmin.pages.maps', [])
- .config(routeConfig);
+ .config(routeConfig);
/** @ngInject */
function routeConfig($stateProvider) {
$stateProvider
- .state('maps', {
- url: '/maps',
- templateUrl: 'app/pages/maps/maps.html',
- abstract: true,
- title: 'Maps',
- sidebarMeta: {
- icon: 'ion-ios-location-outline',
- order: 500,
- },
- })
- .state('maps.gmap', {
- url: '/gmap',
- templateUrl: 'app/pages/maps/google-maps/google-maps.html',
- controller: 'GmapPageCtrl',
- title: 'Google Maps',
- sidebarMeta: {
- order: 0,
- },
- })
- .state('maps.leaflet', {
- url: '/leaflet',
- templateUrl: 'app/pages/maps/leaflet/leaflet.html',
- controller: 'LeafletPageCtrl',
- title: 'Leaflet Maps',
- sidebarMeta: {
- order: 100,
- },
- })
- .state('maps.bubble', {
- url: '/bubble',
- templateUrl: 'app/pages/maps/map-bubbles/map-bubbles.html',
- controller: 'MapBubblePageCtrl',
- title: 'Bubble Maps',
- sidebarMeta: {
- order: 200,
- },
- })
- .state('maps.line', {
- url: '/line',
- templateUrl: 'app/pages/maps/map-lines/map-lines.html',
- controller: 'MapLinesPageCtrl',
- title: 'Line Maps',
- sidebarMeta: {
- order: 300,
- },
- });
+ .state('main.maps', {
+ url: '/maps',
+ templateUrl: 'app/pages/maps/maps.html',
+ abstract: true,
+ title: 'Maps',
+ sidebarMeta: {
+ icon: 'ion-ios-location-outline',
+ order: 500,
+ },
+ authenticate: true
+ })
+ .state('main.maps.gmap', {
+ url: '/gmap',
+ templateUrl: 'app/pages/maps/google-maps/google-maps.html',
+ controller: 'GmapPageCtrl',
+ title: 'Google Maps',
+ sidebarMeta: {
+ order: 0,
+ },
+ authenticate: true
+ })
+ .state('main.maps.leaflet', {
+ url: '/leaflet',
+ templateUrl: 'app/pages/maps/leaflet/leaflet.html',
+ controller: 'LeafletPageCtrl',
+ title: 'Leaflet Maps',
+ sidebarMeta: {
+ order: 100,
+ },
+ authenticate: true
+ })
+ .state('main.maps.bubble', {
+ url: '/bubble',
+ templateUrl: 'app/pages/maps/map-bubbles/map-bubbles.html',
+ controller: 'MapBubblePageCtrl',
+ title: 'Bubble Maps',
+ sidebarMeta: {
+ order: 200,
+ },
+ authenticate: true
+ })
+ .state('main.maps.line', {
+ url: '/line',
+ templateUrl: 'app/pages/maps/map-lines/map-lines.html',
+ controller: 'MapLinesPageCtrl',
+ title: 'Line Maps',
+ sidebarMeta: {
+ order: 300,
+ },
+ authenticate: true
+ });
}
-})();
+})();
\ No newline at end of file
diff --git a/src/app/pages/pages.module.js b/src/app/pages/pages.module.js
index ea11f40..66374ac 100644
--- a/src/app/pages/pages.module.js
+++ b/src/app/pages/pages.module.js
@@ -2,26 +2,30 @@
* @author v.lugovsky
* created on 16.12.2015
*/
-(function () {
+(function() {
'use strict';
angular.module('BlurAdmin.pages', [
- 'ui.router',
-
- 'BlurAdmin.pages.dashboard',
- 'BlurAdmin.pages.ui',
- 'BlurAdmin.pages.components',
- 'BlurAdmin.pages.form',
- 'BlurAdmin.pages.tables',
- 'BlurAdmin.pages.charts',
- 'BlurAdmin.pages.maps',
- 'BlurAdmin.pages.profile',
- ])
- .config(routeConfig);
+ 'ui.router',
+ 'BlurAdmin.pages.services',
+ 'BlurAdmin.pages.config',
+ 'BlurAdmin.pages.main',
+ 'BlurAdmin.pages.dashboard',
+ 'BlurAdmin.pages.ui',
+ 'BlurAdmin.pages.components',
+ 'BlurAdmin.pages.form',
+ 'BlurAdmin.pages.tables',
+ 'BlurAdmin.pages.charts',
+ 'BlurAdmin.pages.maps',
+ 'BlurAdmin.pages.profile',
+ 'BlurAdmin.pages.authSignIn',
+ 'BlurAdmin.pages.authSignUp',
+ ])
+ .config(routeConfig);
/** @ngInject */
function routeConfig($urlRouterProvider, baSidebarServiceProvider) {
- $urlRouterProvider.otherwise('/dashboard');
+ $urlRouterProvider.otherwise('/authSignIn');
baSidebarServiceProvider.addStaticItem({
title: 'Pages',
@@ -59,4 +63,4 @@
});
}
-})();
+})();
\ No newline at end of file
diff --git a/src/app/pages/profile/profile.module.js b/src/app/pages/profile/profile.module.js
index a7446fe..086e5de 100644
--- a/src/app/pages/profile/profile.module.js
+++ b/src/app/pages/profile/profile.module.js
@@ -2,21 +2,22 @@
* @author v.lugovsky
* created on 16.12.2015
*/
-(function () {
+(function() {
'use strict';
angular.module('BlurAdmin.pages.profile', [])
- .config(routeConfig);
+ .config(routeConfig);
/** @ngInject */
function routeConfig($stateProvider) {
$stateProvider
- .state('profile', {
- url: '/profile',
- title: 'Profile',
- templateUrl: 'app/pages/profile/profile.html',
- controller: 'ProfilePageCtrl',
- });
+ .state('main.profile', {
+ url: '/profile',
+ title: 'Profile',
+ templateUrl: 'app/pages/profile/profile.html',
+ controller: 'ProfilePageCtrl',
+ authenticate: true
+ });
}
-})();
+})();
\ No newline at end of file
diff --git a/src/app/pages/services/localStorage.js b/src/app/pages/services/localStorage.js
new file mode 100644
index 0000000..0678846
--- /dev/null
+++ b/src/app/pages/services/localStorage.js
@@ -0,0 +1,56 @@
+/**
+ * @author l.azevedo
+ * created on 29/06/2017
+ */
+(function() {
+ 'use strict';
+
+ angular.module('BlurAdmin.pages.services')
+ .service('localStorage', localStorage);
+
+ /** @ngInject */
+ function localStorage($window) {
+ var service = {
+ set: set,
+ get: get,
+ setObject: setObject,
+ getObject: getObject,
+ clear: clear
+ }
+
+ return service;
+
+ function set(key, value) {
+ if ($window.fakeLocalStorage) {
+ $window.fakeLocalStorage[key] = value;
+ } else {
+ $window.localStorage[key] = value;
+ }
+ }
+
+ function get(key, defaultValue) {
+ return !$window.fakeLocalStorage ? $window.localStorage[key] || defaultValue : $window.fakeLocalStorage[key] || defaultValue;
+ }
+
+ function setObject(key, value) {
+ if ($window.fakeLocalStorage) {
+ $window.fakeLocalStorage[key] = angular.toJson(value);
+ } else {
+ $window.localStorage[key] = angular.toJson(value);
+ }
+ }
+
+ function getObject(key) {
+ return !$window.fakeLocalStorage ? angular.fromJson($window.localStorage[key] || '{}') : angular.fromJson($window.fakeLocalStorage[key] || '{}');
+ }
+
+ function clear() {
+ if ($window.fakeLocalStorage) {
+ $window.fakeLocalStorage = {};
+ } else {
+ $window.localStorage.clear();
+ }
+ }
+ }
+
+})();
\ No newline at end of file
diff --git a/src/app/pages/services/services.module.js b/src/app/pages/services/services.module.js
new file mode 100644
index 0000000..86b26b3
--- /dev/null
+++ b/src/app/pages/services/services.module.js
@@ -0,0 +1,12 @@
+(function() {
+ 'use strict';
+
+ angular.module('BlurAdmin.pages.services', [])
+ .config(routeConfig);
+
+ /** @ngInject */
+ function routeConfig() {
+
+ }
+
+})();
\ No newline at end of file
diff --git a/src/app/pages/tables/tables.module.js b/src/app/pages/tables/tables.module.js
index 682f104..1973572 100644
--- a/src/app/pages/tables/tables.module.js
+++ b/src/app/pages/tables/tables.module.js
@@ -2,7 +2,7 @@
* @author v.lugovsky
* created on 16.12.2015
*/
-(function () {
+(function() {
'use strict';
angular.module('BlurAdmin.pages.tables', [])
@@ -11,32 +11,35 @@
/** @ngInject */
function routeConfig($stateProvider, $urlRouterProvider) {
$stateProvider
- .state('tables', {
- url: '/tables',
- template : '',
- abstract: true,
- controller: 'TablesPageCtrl',
- title: 'Tables',
- sidebarMeta: {
- icon: 'ion-grid',
- order: 300,
- },
- }).state('tables.basic', {
- url: '/basic',
- templateUrl: 'app/pages/tables/basic/tables.html',
- title: 'Basic Tables',
- sidebarMeta: {
- order: 0,
- },
- }).state('tables.smart', {
- url: '/smart',
- templateUrl: 'app/pages/tables/smart/tables.html',
- title: 'Smart Tables',
- sidebarMeta: {
- order: 100,
- },
- });
- $urlRouterProvider.when('/tables','/tables/basic');
+ .state('main.tables', {
+ url: '/tables',
+ template: '',
+ abstract: true,
+ controller: 'TablesPageCtrl',
+ title: 'Tables',
+ sidebarMeta: {
+ icon: 'ion-grid',
+ order: 300,
+ },
+ authenticate: true
+ }).state('main.tables.basic', {
+ url: '/basic',
+ templateUrl: 'app/pages/tables/basic/tables.html',
+ title: 'Basic Tables',
+ sidebarMeta: {
+ order: 0,
+ },
+ authenticate: true
+ }).state('main.tables.smart', {
+ url: '/smart',
+ templateUrl: 'app/pages/tables/smart/tables.html',
+ title: 'Smart Tables',
+ sidebarMeta: {
+ order: 100,
+ },
+ authenticate: true
+ });
+ $urlRouterProvider.when('/main/tables', '/main/tables/basic');
}
-})();
+})();
\ No newline at end of file
diff --git a/src/app/pages/ui/alerts/alerts.module.js b/src/app/pages/ui/alerts/alerts.module.js
index 5d2aa2b..6160a24 100644
--- a/src/app/pages/ui/alerts/alerts.module.js
+++ b/src/app/pages/ui/alerts/alerts.module.js
@@ -2,23 +2,24 @@
* @author v.lugovsky
* created on 16.12.2015
*/
-(function () {
+(function() {
'use strict';
angular.module('BlurAdmin.pages.ui.alerts', [])
- .config(routeConfig);
+ .config(routeConfig);
/** @ngInject */
function routeConfig($stateProvider) {
$stateProvider
- .state('ui.alerts', {
- url: '/alerts',
- templateUrl: 'app/pages/ui/alerts/alerts.html',
- title: 'Alerts',
- sidebarMeta: {
- order: 500,
- },
- });
+ .state('main.ui.alerts', {
+ url: '/alerts',
+ templateUrl: 'app/pages/ui/alerts/alerts.html',
+ title: 'Alerts',
+ sidebarMeta: {
+ order: 500,
+ },
+ authenticate: true
+ });
}
-})();
+})();
\ No newline at end of file
diff --git a/src/app/pages/ui/buttons/buttons.module.js b/src/app/pages/ui/buttons/buttons.module.js
index b02d827..a56ae74 100644
--- a/src/app/pages/ui/buttons/buttons.module.js
+++ b/src/app/pages/ui/buttons/buttons.module.js
@@ -2,24 +2,25 @@
* @author v.lugovsky
* created on 16.12.2015
*/
-(function () {
+(function() {
'use strict';
angular.module('BlurAdmin.pages.ui.buttons', [])
- .config(routeConfig);
+ .config(routeConfig);
/** @ngInject */
function routeConfig($stateProvider) {
$stateProvider
- .state('ui.buttons', {
- url: '/buttons',
- templateUrl: 'app/pages/ui/buttons/buttons.html',
- controller: 'ButtonPageCtrl',
- title: 'Buttons',
- sidebarMeta: {
- order: 100,
- },
- });
+ .state('main.ui.buttons', {
+ url: '/buttons',
+ templateUrl: 'app/pages/ui/buttons/buttons.html',
+ controller: 'ButtonPageCtrl',
+ title: 'Buttons',
+ sidebarMeta: {
+ order: 100,
+ },
+ authenticate: true
+ });
}
-})();
+})();
\ No newline at end of file
diff --git a/src/app/pages/ui/grid/grid.module.js b/src/app/pages/ui/grid/grid.module.js
index 280153a..66d7cfb 100644
--- a/src/app/pages/ui/grid/grid.module.js
+++ b/src/app/pages/ui/grid/grid.module.js
@@ -2,23 +2,24 @@
* @author v.lugovsky
* created on 16.12.2015
*/
-(function () {
+(function() {
'use strict';
angular.module('BlurAdmin.pages.ui.grid', [])
- .config(routeConfig);
+ .config(routeConfig);
/** @ngInject */
function routeConfig($stateProvider) {
$stateProvider
- .state('ui.grid', {
- url: '/grid',
- templateUrl: 'app/pages/ui/grid/grid.html',
- title: 'Grid',
- sidebarMeta: {
- order: 400,
- },
- });
+ .state('main.ui.grid', {
+ url: '/grid',
+ templateUrl: 'app/pages/ui/grid/grid.html',
+ title: 'Grid',
+ sidebarMeta: {
+ order: 400,
+ },
+ authenticate: true
+ });
}
-})();
+})();
\ No newline at end of file
diff --git a/src/app/pages/ui/icons/icons.module.js b/src/app/pages/ui/icons/icons.module.js
index 0a5f291..6a04bc2 100644
--- a/src/app/pages/ui/icons/icons.module.js
+++ b/src/app/pages/ui/icons/icons.module.js
@@ -2,24 +2,25 @@
* @author v.lugovsky
* created on 16.12.2015
*/
-(function () {
+(function() {
'use strict';
angular.module('BlurAdmin.pages.ui.icons', [])
- .config(routeConfig);
+ .config(routeConfig);
/** @ngInject */
function routeConfig($stateProvider) {
$stateProvider
- .state('ui.icons', {
- url: '/icons',
- templateUrl: 'app/pages/ui/icons/icons.html',
- controller: 'IconsPageCtrl',
- title: 'Icons',
- sidebarMeta: {
- order: 200,
- },
- });
+ .state('main.ui.icons', {
+ url: '/icons',
+ templateUrl: 'app/pages/ui/icons/icons.html',
+ controller: 'IconsPageCtrl',
+ title: 'Icons',
+ sidebarMeta: {
+ order: 200,
+ },
+ authenticate: true
+ });
}
-})();
+})();
\ No newline at end of file
diff --git a/src/app/pages/ui/modals/modals.module.js b/src/app/pages/ui/modals/modals.module.js
index bf92754..42aae67 100644
--- a/src/app/pages/ui/modals/modals.module.js
+++ b/src/app/pages/ui/modals/modals.module.js
@@ -2,24 +2,25 @@
* @author v.lugovsky
* created on 16.12.2015
*/
-(function () {
+(function() {
'use strict';
angular.module('BlurAdmin.pages.ui.modals', [])
- .config(routeConfig);
+ .config(routeConfig);
/** @ngInject */
function routeConfig($stateProvider) {
$stateProvider
- .state('ui.modals', {
- url: '/modals',
- templateUrl: 'app/pages/ui/modals/modals.html',
- controller: 'ModalsPageCtrl',
- title: 'Modals',
- sidebarMeta: {
- order: 300,
- },
- });
+ .state('main.ui.modals', {
+ url: '/modals',
+ templateUrl: 'app/pages/ui/modals/modals.html',
+ controller: 'ModalsPageCtrl',
+ title: 'Modals',
+ sidebarMeta: {
+ order: 300,
+ },
+ authenticate: true
+ });
}
-})();
+})();
\ No newline at end of file
diff --git a/src/app/pages/ui/notifications/notifications.module.js b/src/app/pages/ui/notifications/notifications.module.js
index 2085290..edb04c9 100644
--- a/src/app/pages/ui/notifications/notifications.module.js
+++ b/src/app/pages/ui/notifications/notifications.module.js
@@ -2,24 +2,25 @@
* @author v.lugovsky
* created on 16.12.2015
*/
-(function () {
+(function() {
'use strict';
angular.module('BlurAdmin.pages.ui.notifications', [])
- .config(routeConfig);
+ .config(routeConfig);
/** @ngInject */
function routeConfig($stateProvider) {
$stateProvider
- .state('ui.notifications', {
- url: '/notifications',
- templateUrl: 'app/pages/ui/notifications/notifications.html',
- controller: 'NotificationsPageCtrl',
- title: 'Notifications',
- sidebarMeta: {
- order: 700,
- },
- });
+ .state('main.ui.notifications', {
+ url: '/notifications',
+ templateUrl: 'app/pages/ui/notifications/notifications.html',
+ controller: 'NotificationsPageCtrl',
+ title: 'Notifications',
+ sidebarMeta: {
+ order: 700,
+ },
+ authenticate: true
+ });
}
-})();
+})();
\ No newline at end of file
diff --git a/src/app/pages/ui/panels/panels.module.js b/src/app/pages/ui/panels/panels.module.js
index 62c244c..1baca64 100644
--- a/src/app/pages/ui/panels/panels.module.js
+++ b/src/app/pages/ui/panels/panels.module.js
@@ -2,24 +2,25 @@
* @author v.lugovsky
* created on 23.12.2015
*/
-(function () {
+(function() {
'use strict';
angular.module('BlurAdmin.pages.ui.panels', [])
- .config(routeConfig);
+ .config(routeConfig);
/** @ngInject */
function routeConfig($stateProvider) {
$stateProvider
- .state('ui.panels', {
- url: '/panels',
- templateUrl: 'app/pages/ui/panels/panels.html',
- controller: 'NotificationsPageCtrl',
- title: 'Panels',
- sidebarMeta: {
- order: 1100,
- },
- });
+ .state('main.ui.panels', {
+ url: '/panels',
+ templateUrl: 'app/pages/ui/panels/panels.html',
+ controller: 'NotificationsPageCtrl',
+ title: 'Panels',
+ sidebarMeta: {
+ order: 1100,
+ },
+ authenticate: true
+ });
}
-})();
+})();
\ No newline at end of file
diff --git a/src/app/pages/ui/progressBars/progressBars.module.js b/src/app/pages/ui/progressBars/progressBars.module.js
index 27e52e4..6b0f164 100644
--- a/src/app/pages/ui/progressBars/progressBars.module.js
+++ b/src/app/pages/ui/progressBars/progressBars.module.js
@@ -2,23 +2,24 @@
* @author v.lugovsky
* created on 16.12.2015
*/
-(function () {
+(function() {
'use strict';
angular.module('BlurAdmin.pages.ui.progressBars', [])
- .config(routeConfig);
+ .config(routeConfig);
/** @ngInject */
function routeConfig($stateProvider) {
$stateProvider
- .state('ui.progressBars', {
- url: '/progressBars',
- templateUrl: 'app/pages/ui/progressBars/progressBars.html',
- title: 'Progress Bars',
- sidebarMeta: {
- order: 600,
- },
- });
+ .state('main.ui.progressBars', {
+ url: '/progressBars',
+ templateUrl: 'app/pages/ui/progressBars/progressBars.html',
+ title: 'Progress Bars',
+ sidebarMeta: {
+ order: 600,
+ },
+ authenticate: true
+ });
}
-})();
+})();
\ No newline at end of file
diff --git a/src/app/pages/ui/slider/slider.module.js b/src/app/pages/ui/slider/slider.module.js
index 0581a41..f22cc14 100644
--- a/src/app/pages/ui/slider/slider.module.js
+++ b/src/app/pages/ui/slider/slider.module.js
@@ -2,7 +2,7 @@
* @author a.demeshko
* created on 12/22/15
*/
-(function () {
+(function() {
'use strict';
angular.module('BlurAdmin.pages.ui.slider', [])
@@ -11,14 +11,15 @@
/** @ngInject */
function routeConfig($stateProvider) {
$stateProvider
- .state('ui.slider', {
- url: '/slider',
- templateUrl: 'app/pages/ui/slider/slider.html',
- title: 'Sliders',
- sidebarMeta: {
- order: 1000,
- },
- });
+ .state('main.ui.slider', {
+ url: '/slider',
+ templateUrl: 'app/pages/ui/slider/slider.html',
+ title: 'Sliders',
+ sidebarMeta: {
+ order: 1000,
+ },
+ authenticate: true
+ });
}
-})();
+})();
\ No newline at end of file
diff --git a/src/app/pages/ui/tabs/tabs.module.js b/src/app/pages/ui/tabs/tabs.module.js
index a434702..e5fcbc8 100644
--- a/src/app/pages/ui/tabs/tabs.module.js
+++ b/src/app/pages/ui/tabs/tabs.module.js
@@ -2,23 +2,24 @@
* @author v.lugovsky
* created on 21.12.2015
*/
-(function () {
+(function() {
'use strict';
angular.module('BlurAdmin.pages.ui.tabs', [])
- .config(routeConfig);
+ .config(routeConfig);
/** @ngInject */
function routeConfig($stateProvider) {
$stateProvider
- .state('ui.tabs', {
- url: '/tabs',
- templateUrl: 'app/pages/ui/tabs/tabs.html',
- title: 'Tabs & Accordions',
- sidebarMeta: {
- order: 800,
- },
- });
+ .state('main.ui.tabs', {
+ url: '/tabs',
+ templateUrl: 'app/pages/ui/tabs/tabs.html',
+ title: 'Tabs & Accordions',
+ sidebarMeta: {
+ order: 800,
+ },
+ authenticate: true
+ });
}
-})();
+})();
\ No newline at end of file
diff --git a/src/app/pages/ui/typography/typography.module.js b/src/app/pages/ui/typography/typography.module.js
index d178581..1f403fb 100644
--- a/src/app/pages/ui/typography/typography.module.js
+++ b/src/app/pages/ui/typography/typography.module.js
@@ -2,23 +2,24 @@
* @author v.lugovsky
* created on 16.12.2015
*/
-(function () {
+(function() {
'use strict';
angular.module('BlurAdmin.pages.ui.typography', [])
- .config(routeConfig);
+ .config(routeConfig);
/** @ngInject */
function routeConfig($stateProvider) {
$stateProvider
- .state('ui.typography', {
- url: '/typography',
- templateUrl: 'app/pages/ui/typography/typography.html',
- title: 'Typography',
- sidebarMeta: {
- order: 0,
- },
- });
+ .state('main.ui.typography', {
+ url: '/typography',
+ templateUrl: 'app/pages/ui/typography/typography.html',
+ title: 'Typography',
+ sidebarMeta: {
+ order: 0,
+ },
+ authenticate: true
+ });
}
-})();
+})();
\ No newline at end of file
diff --git a/src/app/pages/ui/ui.module.js b/src/app/pages/ui/ui.module.js
index 7696ad2..e5ecbbd 100644
--- a/src/app/pages/ui/ui.module.js
+++ b/src/app/pages/ui/ui.module.js
@@ -2,37 +2,38 @@
* @author k.danovsky
* created on 12.01.2016
*/
-(function () {
+(function() {
'use strict';
angular.module('BlurAdmin.pages.ui', [
- 'BlurAdmin.pages.ui.typography',
- 'BlurAdmin.pages.ui.buttons',
- 'BlurAdmin.pages.ui.icons',
- 'BlurAdmin.pages.ui.modals',
- 'BlurAdmin.pages.ui.grid',
- 'BlurAdmin.pages.ui.alerts',
- 'BlurAdmin.pages.ui.progressBars',
- 'BlurAdmin.pages.ui.notifications',
- 'BlurAdmin.pages.ui.tabs',
- 'BlurAdmin.pages.ui.slider',
- 'BlurAdmin.pages.ui.panels',
- ])
- .config(routeConfig);
+ 'BlurAdmin.pages.ui.typography',
+ 'BlurAdmin.pages.ui.buttons',
+ 'BlurAdmin.pages.ui.icons',
+ 'BlurAdmin.pages.ui.modals',
+ 'BlurAdmin.pages.ui.grid',
+ 'BlurAdmin.pages.ui.alerts',
+ 'BlurAdmin.pages.ui.progressBars',
+ 'BlurAdmin.pages.ui.notifications',
+ 'BlurAdmin.pages.ui.tabs',
+ 'BlurAdmin.pages.ui.slider',
+ 'BlurAdmin.pages.ui.panels',
+ ])
+ .config(routeConfig);
/** @ngInject */
function routeConfig($stateProvider) {
$stateProvider
- .state('ui', {
- url: '/ui',
- template : '',
- abstract: true,
- title: 'UI Features',
- sidebarMeta: {
- icon: 'ion-android-laptop',
- order: 200,
- },
- });
+ .state('main.ui', {
+ url: '/ui',
+ template: '',
+ abstract: true,
+ title: 'UI Features',
+ sidebarMeta: {
+ icon: 'ion-android-laptop',
+ order: 200,
+ },
+ authenticate: true
+ });
}
-})();
+})();
\ No newline at end of file
diff --git a/src/app/theme/components/baSidebar/baSidebar.service.js b/src/app/theme/components/baSidebar/baSidebar.service.js
index 3c19627..2635789 100644
--- a/src/app/theme/components/baSidebar/baSidebar.service.js
+++ b/src/app/theme/components/baSidebar/baSidebar.service.js
@@ -2,7 +2,7 @@
'use strict';
angular.module('BlurAdmin.theme.components')
- .provider('baSidebarService', baSidebarServiceProvider);
+ .provider('baSidebarService', baSidebarServiceProvider);
/** @ngInject */
function baSidebarServiceProvider() {
@@ -65,23 +65,23 @@
function defineMenuItemStates() {
return $state.get()
- .filter(function(s) {
- return s.sidebarMeta;
- })
- .map(function(s) {
- var meta = s.sidebarMeta;
- return {
- name: s.name,
- title: s.title,
- level: (s.name.match(/\./g) || []).length,
- order: meta.order,
- icon: meta.icon,
- stateRef: s.name,
- };
- })
- .sort(function(a, b) {
- return (a.level - b.level) * 100 + a.order - b.order;
- });
+ .filter(function(s) {
+ return s.sidebarMeta;
+ })
+ .map(function(s) {
+ var meta = s.sidebarMeta;
+ return {
+ name: s.name,
+ title: s.title,
+ level: ((s.name.match(/\./g) || []).length - 1),
+ order: meta.order,
+ icon: meta.icon,
+ stateRef: s.name,
+ };
+ })
+ .sort(function(a, b) {
+ return (a.level - b.level) * 100 + a.order - b.order;
+ });
}
function shouldMenuBeCollapsed() {
@@ -96,4 +96,4 @@
};
}
-})();
+})();
\ No newline at end of file
diff --git a/src/app/theme/components/pageTop/pageTop.html b/src/app/theme/components/pageTop/pageTop.html
index 33919c2..2e28c9d 100644
--- a/src/app/theme/components/pageTop/pageTop.html
+++ b/src/app/theme/components/pageTop/pageTop.html
@@ -12,11 +12,11 @@
-