Advertisement
Guest User

Untitled

a guest
Jun 29th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.67 KB | None | 0 0
  1. /** location js **/
  2.  
  3. var f2gLocation = angular.module('f2g.app');
  4.  
  5. f2gLocation.config(function($stateProvider, $urlRouterProvider, f2gStatesProvider) {
  6. var entity = 'location';
  7. var crudFilename = 'locationService';
  8.  
  9. var listState = f2gStatesProvider.getList(entity, crudFilename);
  10. var detailAbstractState = f2gStatesProvider.getDetailAbstract(entity, crudFilename);
  11. var detailTabGeneralState = f2gStatesProvider.getDetailFormTab(entity, 'locationGeneralService', 'general');
  12.  
  13. $stateProvider
  14. .state(listState.name, listState.definition)
  15. .state(detailAbstractState.name, detailAbstractState.definition)
  16. .state(detailTabGeneralState.name, detailTabGeneralState.definition);
  17.  
  18. });
  19.  
  20. /********* auth menu added *************/
  21.  
  22. {id:'locations', title:'Locations', sort:8, parent:null, icon:'fa fa-fw fa-map-marker', link:'logged.location-list', linkDetail: 'logged.location'},
  23.  
  24. /********** locationService.js ************/
  25.  
  26. 'use strict';
  27.  
  28. var akServices = angular.module('akServices');
  29.  
  30. akServices.service('locationService', function () {
  31. // this.title = 'Tecnico';
  32. // this.entityName = 'location';
  33. // this.headerView = 'location';
  34.  
  35. // this.listPagMeta = {};
  36. // this.listPagMeta.start = 0;
  37. // this.listPagMeta.count = 12;
  38.  
  39. // this.listOrder = {};
  40. // this.listOrder.field = 'id';
  41. // this.listOrder.orientation = 'asc';
  42.  
  43. // this.listColumns = [
  44. // { title:'Id', name: 'id', type: 'text'},
  45. // { title:'Descripcion', name: 'descripcion', type: 'text'},
  46. // { title:'Usuario', name: 'usuario', type: 'text'},
  47. // { title:'Actualizado', name: 'cambiado', type: 'timestamp'},
  48. // ];
  49.  
  50. // this.listFilters = [];
  51.  
  52. // var subtitleText = [
  53. // { field: 'id' },
  54. // { field: 'descripcion' },
  55. // ];
  56.  
  57. // this.subtitle = {text: subtitleText, cssClass: ''};
  58.  
  59. // // Tabs functions
  60. // this.tabs = [
  61. // { name:'general', title:'General', template: 'location.general', validation: true, isValid: false},
  62. // ];
  63. });
  64.  
  65. akServices.service('locationGeneralService', function (auditoriaFilter) {
  66.  
  67. this.fields = [
  68. {title:'Id', name:'id', type:'text', readOnly: true, cols:2},
  69. {title:'Descripcion', name:'descripcion', type:'text', readOnly:true, cols: 4},
  70. {title:'Usuario', name:'usuario', type:'autocomplete', placeholder:'Buscar usuario', entitySearch:'usuario',
  71. showFields:['usuario'], showFieldOnFocus: 'usuario', mappingDestiny: ['usuario', 'usuarioDesc'], cols: 4},
  72. ];
  73.  
  74. auditoriaFilter(this.fields);
  75. });
  76.  
  77.  
  78. //end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement