Skip to content

Commit

Permalink
Reformat client files
Browse files Browse the repository at this point in the history
  • Loading branch information
beeman committed Sep 10, 2015
1 parent 7e1afec commit 8161a46
Show file tree
Hide file tree
Showing 79 changed files with 1,049 additions and 1,049 deletions.
54 changes: 27 additions & 27 deletions client/app/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,40 +54,40 @@
.run(function ($rootScope, $cookies, gettextCatalog) {

$rootScope.locales = {
'de' : {
lang : 'de',
'de': {
lang: 'de',
country: 'DE',
name : gettextCatalog.getString('German')
name: gettextCatalog.getString('German')
},
'en' : {
lang : 'en',
'en': {
lang: 'en',
country: 'US',
name : gettextCatalog.getString('English')
name: gettextCatalog.getString('English')
},
'es_MX': {
lang : 'es_MX',
lang: 'es_MX',
country: 'MX',
name : gettextCatalog.getString('Spanish')
name: gettextCatalog.getString('Spanish')
},
'fr' : {
lang : 'fr',
'fr': {
lang: 'fr',
country: 'FR',
name : gettextCatalog.getString('Français')
name: gettextCatalog.getString('Français')
},
'nl' : {
lang : 'nl',
'nl': {
lang: 'nl',
country: 'NL',
name : gettextCatalog.getString('Dutch')
name: gettextCatalog.getString('Dutch')
},
'pt-BR': {
lang : 'pt_BR',
lang: 'pt_BR',
country: 'BR',
name : gettextCatalog.getString('Portuguese Brazil')
name: gettextCatalog.getString('Portuguese Brazil')
},
'ru_RU': {
lang : 'ru_RU',
lang: 'ru_RU',
country: 'RU',
name : gettextCatalog.getString('Russian')
name: gettextCatalog.getString('Russian')
}
};

Expand All @@ -111,7 +111,7 @@
*/
var ngModelAttrs = {};

function camelize(string) {
function camelize (string) {
string = string.replace(/[\-_\s]+(.)?/g, function (match, chr) {
return chr ? chr.toUpperCase() : '';
});
Expand Down Expand Up @@ -146,29 +146,29 @@
});

formlyConfig.setType({
name : 'timepicker',
template : '<timepicker ng-model="model[options.key]"></timepicker>',
wrapper : [
name: 'timepicker',
template: '<timepicker ng-model="model[options.key]"></timepicker>',
wrapper: [
'bootstrapLabel',
'bootstrapHasError'
],
defaultOptions: {
ngModelAttrs : ngModelAttrs,
ngModelAttrs: ngModelAttrs,
templateOptions: {
timepickerOptions: {}
}
}
});

formlyConfig.setType({
name : 'datepicker',
template : '<datepicker ng-model="model[options.key]" ></datepicker>',
wrapper : [
name: 'datepicker',
template: '<datepicker ng-model="model[options.key]" ></datepicker>',
wrapper: [
'bootstrapLabel',
'bootstrapHasError'
],
defaultOptions: {
ngModelAttrs : ngModelAttrs,
ngModelAttrs: ngModelAttrs,
templateOptions: {
datepickerOptions: {}
}
Expand Down
9 changes: 4 additions & 5 deletions client/app/modules/about/controllers/about.routes.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
(function () {
'use strict';

angular
.module('com.module.about')
.config(function ($stateProvider) {
$stateProvider
.state('app.about', {
abstract : true,
url : '/about',
abstract: true,
url: '/about',
templateUrl: 'modules/about/views/main.html'
})
.state('app.about.index', {
url : '',
url: '',
templateUrl: 'modules/about/views/about.html',
controller : 'AboutCtrl'
controller: 'AboutCtrl'
});
});

Expand Down
4 changes: 3 additions & 1 deletion client/app/modules/about/views/main.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
<section admin-header class="content-header" title="{{ 'About' | translate }}" sub-title="{{ 'All about this application!' | translate }}"></section>
<section admin-header class="content-header"
title="{{ 'About' | translate }}"
sub-title="{{ 'All about this application!' | translate }}"></section>
<section ui-view class="content"></section>
2 changes: 1 addition & 1 deletion client/app/modules/browser/app.browser.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(function(){
(function () {
'use strict';
angular.module('com.module.browser', []);
})();
75 changes: 38 additions & 37 deletions client/app/modules/browser/config/browser.routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,21 @@
.config(function ($stateProvider) {
$stateProvider
.state('app.browser', {
abstract : true,
url : '/browser',
abstract: true,
url: '/browser',
templateUrl: 'modules/browser/views/main.html'
}).state('app.browser.models', {
url : '',
templateUrl : 'modules/browser/views/models.html',
})
.state('app.browser.models', {
url: '',
templateUrl: 'modules/browser/views/models.html',
controllerAs: 'ctrl',
controller : [
controller: [
'models',
function (models) {
this.models = models;
}
],
resolve : {
resolve: {
models: [
'MetaService',
function (MetaService) {
Expand All @@ -28,16 +29,16 @@
}
})
.state('app.browser.models.info', {
url : '/:modelName/info',
templateUrl : 'modules/browser/views/models.info.html',
url: '/:modelName/info',
templateUrl: 'modules/browser/views/models.info.html',
controllerAs: 'info',
controller : [
controller: [
'model',
function (model) {
this.model = model;
}
],
resolve : {
resolve: {
model: [
'$stateParams',
'MetaService',
Expand All @@ -48,22 +49,22 @@
}
})
.state('app.browser.models.items', {
url : '/:modelName',
templateUrl : 'modules/browser/views/models.items.html',
url: '/:modelName',
templateUrl: 'modules/browser/views/models.items.html',
controllerAs: 'items',
controller : [
controller: [
'model',
'items',
function (model, items) {
this.model = model;
this.items = items;
this.model = model;
this.items = items;
this.itemKeys = [];
if (this.items[0] !== undefined) {
this.itemKeys = Object.keys(this.items[0]);
}
}
],
resolve : {
resolve: {
model: [
'$stateParams',
'MetaService',
Expand All @@ -81,17 +82,17 @@
}
})
.state('app.browser.models.items.view', {
url : '/:modelId/view',
templateUrl : 'modules/browser/views/models.items.view.html',
url: '/:modelId/view',
templateUrl: 'modules/browser/views/models.items.view.html',
controllerAs: 'view',
controller : [
controller: [
'item',
function (item) {
this.item = item;
this.item = item;
this.itemKeys = Object.keys(this.item);
}
],
resolve : {
resolve: {
item: [
'$stateParams',
'MetaService',
Expand All @@ -102,27 +103,27 @@
}
})
.state('app.browser.models.items.edit', {
url : '/:modelId/edit',
templateUrl : 'modules/browser/views/models.items.edit.html',
url: '/:modelId/edit',
templateUrl: 'modules/browser/views/models.items.edit.html',
controllerAs: 'edit',
controller : [
controller: [
'$state',
'MetaService',
'model',
'item',
'itemFields',
function ($state, MetaService, model, item, itemFields) {
this.item = item;
this.item = item;
this.itemFields = itemFields;
this.submit = function () {
this.submit = function () {
MetaService.upsert(model.name, this.item).then(function () {
$state.go('app.browser.models.items', {modelName: model.name}, {reload: true});
});
};
}
],
resolve : {
item : [
resolve: {
item: [
'$stateParams',
'MetaService',
function ($stateParams, MetaService) {
Expand All @@ -140,25 +141,25 @@
}
})
.state('app.browser.models.items.add', {
url : '/add',
templateUrl : 'modules/browser/views/models.items.add.html',
url: '/add',
templateUrl: 'modules/browser/views/models.items.add.html',
controllerAs: 'add',
controller : [
controller: [
'$state',
'MetaService',
'model',
'itemFields',
function ($state, MetaService, model, itemFields) {
this.item = {};
this.item = {};
this.itemFields = itemFields;
this.submit = function () {
this.submit = function () {
MetaService.upsert(model.name, this.item).then(function () {
$state.go('app.browser.models.items', {modelName: model.name}, {reload: true});
});
};
}
],
resolve : {
resolve: {
itemFields: [
'$stateParams',
'MetaService',
Expand All @@ -170,8 +171,8 @@
}
})
.state('app.browser.models.items.delete', {
url : '/:modelId/delete',
template : '',
url: '/:modelId/delete',
template: '',
controller: [
'$state',
'$stateParams',
Expand Down
2 changes: 1 addition & 1 deletion client/app/modules/core/app.core.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(function(){
(function () {
'use strict';
/**
* @ngdoc overview
Expand Down
10 changes: 5 additions & 5 deletions client/app/modules/core/config/core.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@
// Add Dashboard Box
$rootScope.addDashboardBox = function (name, color, icon, quantity, href) {
$rootScope.dashboardBox.push({
name : name,
color : color,
icon : icon,
name: name,
color: color,
icon: icon,
quantity: quantity,
href : href
href: href
});
};

Expand All @@ -56,7 +56,7 @@
data[0].$save();
} else {
Setting.create({
key : key,
key: key,
value: value
}, function (data) {
console.log(data);
Expand Down
16 changes: 8 additions & 8 deletions client/app/modules/core/config/core.routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,24 @@
.config(function ($stateProvider, $urlRouterProvider) {
$stateProvider
.state('router', {
url : '/router',
template : '<div class="lockscreen" style="height: 100%"></div>',
url: '/router',
template: '<div class="lockscreen" style="height: 100%"></div>',
controller: 'RouteCtrl'
})
.state('error', {
url : '/error',
url: '/error',
template: '<div class="text-center alert alert-danger" style="margin: 100px">An error occurred.</div>'
})
.state('app', {
abstract : true,
url : '/app',
abstract: true,
url: '/app',
templateUrl: 'modules/core/views/app.html',
controller : 'MainCtrl'
controller: 'MainCtrl'
})
.state('app.home', {
url : '',
url: '',
templateUrl: 'modules/core/views/home.html',
controller : 'HomeCtrl'
controller: 'HomeCtrl'
});
$urlRouterProvider.otherwise('/router');
});
Expand Down
Loading

0 comments on commit 8161a46

Please sign in to comment.