Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /** location js **/
- var f2gLocation = angular.module('f2g.app');
- f2gLocation.config(function($stateProvider, $urlRouterProvider, f2gStatesProvider) {
- var entity = 'location';
- var crudFilename = 'locationService';
- var listState = f2gStatesProvider.getList(entity, crudFilename);
- var detailAbstractState = f2gStatesProvider.getDetailAbstract(entity, crudFilename);
- var detailTabGeneralState = f2gStatesProvider.getDetailFormTab(entity, 'locationGeneralService', 'general');
- $stateProvider
- .state(listState.name, listState.definition)
- .state(detailAbstractState.name, detailAbstractState.definition)
- .state(detailTabGeneralState.name, detailTabGeneralState.definition);
- });
- /********* auth menu added *************/
- {id:'locations', title:'Locations', sort:8, parent:null, icon:'fa fa-fw fa-map-marker', link:'logged.location-list', linkDetail: 'logged.location'},
- /********** locationService.js ************/
- 'use strict';
- var akServices = angular.module('akServices');
- akServices.service('locationService', function () {
- // this.title = 'Tecnico';
- // this.entityName = 'location';
- // this.headerView = 'location';
- // this.listPagMeta = {};
- // this.listPagMeta.start = 0;
- // this.listPagMeta.count = 12;
- // this.listOrder = {};
- // this.listOrder.field = 'id';
- // this.listOrder.orientation = 'asc';
- // this.listColumns = [
- // { title:'Id', name: 'id', type: 'text'},
- // { title:'Descripcion', name: 'descripcion', type: 'text'},
- // { title:'Usuario', name: 'usuario', type: 'text'},
- // { title:'Actualizado', name: 'cambiado', type: 'timestamp'},
- // ];
- // this.listFilters = [];
- // var subtitleText = [
- // { field: 'id' },
- // { field: 'descripcion' },
- // ];
- // this.subtitle = {text: subtitleText, cssClass: ''};
- // // Tabs functions
- // this.tabs = [
- // { name:'general', title:'General', template: 'location.general', validation: true, isValid: false},
- // ];
- });
- akServices.service('locationGeneralService', function (auditoriaFilter) {
- this.fields = [
- {title:'Id', name:'id', type:'text', readOnly: true, cols:2},
- {title:'Descripcion', name:'descripcion', type:'text', readOnly:true, cols: 4},
- {title:'Usuario', name:'usuario', type:'autocomplete', placeholder:'Buscar usuario', entitySearch:'usuario',
- showFields:['usuario'], showFieldOnFocus: 'usuario', mappingDestiny: ['usuario', 'usuarioDesc'], cols: 4},
- ];
- auditoriaFilter(this.fields);
- });
- //end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement