1'use strict'; 2angular.module('appSite', ['ui.bootstrap', 'ngResource', 'ui.utils.masks', 'textAngular', 'chart.js', "ngFileUpload", 'idf.br-filters', 'ismobile']) 3 .config(['$provide', function ($provide) { 4 // this demonstrates how to register a new tool and add it to the default toolbar 5 $provide.decorator('taOptions', ['$delegate', function (taOptions) { 6 // $delegate is the taOptions we are decorating 7 // here we override the default toolbars and classes specified in taOptions. 8 taOptions.forceTextAngularSanitize = true; // set false to allow the textAngular-sanitize provider to be replaced 9 taOptions.keyMappings = []; // allow customizable keyMappings for specialized key boards or languages 10 taOptions.toolbar = [ 11 ['bold'] 12 ]; 13 taOptions.classes = { 14 focussed: 'focussed', 15 toolbar: 'btn-toolbar', 16 toolbarGroup: 'btn-group', 17 toolbarButton: 'btn btn-light', 18 toolbarButtonActive: 'active', 19 disabled: 'disabled', 20 textEditor: 'form-control', 21 htmlEditor: 'form-control' 22 }; 23 return taOptions; // whatever you return will be the taOptions 24 }]); 25 $provide.decorator('taTools', ['$delegate', function (taTools) { 26 taTools.bold.iconclass = 'icon-bold'; 27 taTools.italics.iconclass = 'icon-italic'; 28 taTools.underline.iconclass = 'icon-underline'; 29 taTools.ul.iconclass = 'icon-list-ul'; 30 taTools.ol.iconclass = 'icon-list-ol'; 31 taTools.undo.iconclass = 'icon-undo'; 32 taTools.redo.iconclass = 'icon-repeat'; 33 taTools.justifyLeft.iconclass = 'icon-align-left'; 34 taTools.justifyRight.iconclass = 'icon-align-right'; 35 taTools.justifyCenter.iconclass = 'icon-align-center'; 36 taTools.clear.iconclass = 'icon-ban-circle'; 37 taTools.insertLink.iconclass = 'icon-link'; 38 taTools.insertImage.iconclass = 'icon-picture'; 39 // there is no quote icon in old font-awesome so we change to text as follows 40 delete taTools.quote.iconclass; 41 taTools.quote.buttontext = 'quote'; 42 return taTools; 43 }]); 44 }]); 45angular.module('appSite') 46 .directive('ngEnter', function () { 47 return function (scope, element, attrs) { 48 element.bind("keydown keypress", function (event) { 49 if (event.which === 13) { 50 scope.$apply(function () { 51 scope.$eval(attrs.ngEnter); 52 }); 53 event.preventDefault(); 54 } 55 }); 56 }; 57 }); 58var estados = [ 59 'AC', 'AL', 'AP', 'AM', 'BA', 'CE', 'DF', 60 'ES', 'GO', 'MA', 'MT', 'MS', 'MG', 'PA', 61 'PB', 'PR', 'PE', 'PI', 'RJ', 'RN', 'RS', 62 'RO', 'RR', 'SC', 'SP', 'SE', 'TO' 63]; 64 65var estadosNomes = []; 66estadosNomes['AC'] = 'Acre'; 67estadosNomes['AL'] = 'Alagoas'; 68estadosNomes['AP'] = 'Amapá'; 69estadosNomes['AM'] = 'Amazonas'; 70estadosNomes['BA'] = 'Bahia'; 71estadosNomes['CE'] = 'Ceará'; 72estadosNomes['DF'] = 'Distrito Federal'; 73estadosNomes['ES'] = 'EspÃrito Santo'; 74estadosNomes['GO'] = 'Goiás'; 75estadosNomes['MA'] = 'Maranhão'; 76estadosNomes['MT'] = 'Mato Grosso'; 77estadosNomes['MS'] = 'Mato Grosso do Sul'; 78estadosNomes['MG'] = 'Minas Gerais'; 79estadosNomes['PA'] = 'Pará'; 80estadosNomes['PB'] = 'ParaÃba'; 81estadosNomes['PR'] = 'Paraná'; 82estadosNomes['PE'] = 'Pernambuco'; 83estadosNomes['PI'] = 'PiauÃ'; 84estadosNomes['RJ'] = 'Rio de Janeiro'; 85estadosNomes['RN'] = 'Rio Grande do Norte'; 86estadosNomes['RS'] = 'Rio Grande do Sul'; 87estadosNomes['RO'] = 'Rondônia'; 88estadosNomes['RR'] = 'Roraima'; 89estadosNomes['SC'] = 'Santa Catarina'; 90estadosNomes['SP'] = 'São Paulo'; 91estadosNomes['SE'] = 'Sergipe'; 92estadosNomes['TO'] = 'Tocantins'; 93 94 95angular.module('appSite') 96 .constant('estados', estados) 97 .constant('estadosNomes', estadosNomes) 98 .constant('path', '/'); // '/' em producao, /site/ em localhost 99 100angular.module('appSite').directive('modelo', function () { 101 return { 102 require: 'ngModel', 103 link: function (scope, elm, attrs, ctrl) { 104 ctrl.$validators.modelo = function (modelValue, viewValue) { 105 if (ctrl.$isEmpty(modelValue)) { 106 return false; 107 } 108 return true; 109 }; 110 } 111 }; 112}); 113angular.module('appSite').directive('myModal', function () { 114 return { 115 restrict: 'A', 116 link: function (scope, element, attr) { 117 scope.dismiss = function () { 118 console.log(element); 119 element.modal('hide'); 120 }; 121 } 122 }; 123}); 124 125angular.module('appSite').directive('myModal1', function () { 126 return { 127 restrict: 'A', 128 link: function (scope, element, attr) { 129 scope.dismiss1 = function () { 130 element.modal('hide'); 131 }; 132 } 133 }; 134}); 135 136angular.module('appSite').value('toastr', toastr); 137toastr.options = { 138 "closeButton": true, 139 "debug": false, 140 "progressBar": true, 141 "positionClass": "toast-bottom-left", 142 "onclick": null, 143 "showDuration": "200", 144 "hideDuration": "500", 145 "timeOut": "8000", 146 "extendedTimeOut": "1000", 147 "showEasing": "swing", 148 "hideEasing": "linear", 149 "showMethod": "fadeIn", 150 "hideMethod": "fadeOut" 151}; 152 153
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.