cronapp-framework-js 2.8.20 → 2.8.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/crn-accordion.components.json +29 -1
- package/components/crn-anchor.components.json +2 -2
- package/components/crn-button.components.json +12 -2
- package/components/crn-cron-crud.components.json +21 -0
- package/components/crn-datasource.components.json +5 -0
- package/components/crn-datepicker.components.json +15 -0
- package/components/crn-datetimepicker.components.json +25 -0
- package/components/crn-dynamic-menu.components.json +21 -0
- package/components/crn-eight-four-container.components.json +43 -0
- package/components/crn-enterprise-autocomplete.components.json +38 -1
- package/components/crn-enterprise-checkbox.components.json +5 -0
- package/components/crn-enterprise-combobox-multiple.components.json +5 -0
- package/components/crn-enterprise-combobox.components.json +11 -1
- package/components/crn-enterprise-dynamic-autocomplete.components.json +39 -2
- package/components/crn-enterprise-dynamic-combobox.components.json +18 -1
- package/components/crn-four-eight-container.components.json +43 -0
- package/components/crn-horizontal-container.components.json +50 -42
- package/components/crn-icon.components.json +20 -12
- package/components/crn-image.components.json +4 -4
- package/components/crn-label.components.json +1 -0
- package/components/crn-one-container.components.json +43 -0
- package/components/crn-rating.components.json +31 -31
- package/components/crn-table.components.json +1 -2
- package/components/crn-textarea.components.json +9 -0
- package/components/crn-textinput.components.json +16 -5
- package/components/crn-three-container.components.json +43 -0
- package/components/crn-trhee-six-three-container.components.json +43 -0
- package/components/crn-two-container.components.json +43 -0
- package/components/crn-upload-file.components.json +2 -3
- package/components/crn-upload.components.json +2 -2
- package/components/crn-vertical-container.components.json +17 -9
- package/components/css/checkbox-color.css +16 -0
- package/components/css/color-default.css +2 -0
- package/components/css/font-size.css +15 -0
- package/components/css/image.css +15 -0
- package/components/templates/Component_Container/crn-eight-four-container.template.html +4 -0
- package/components/templates/Component_Container/crn-four-eight-container.template.html +4 -0
- package/components/templates/Component_Container/crn-one-container.template.html +1 -0
- package/components/templates/Component_Container/crn-three-container.template.html +5 -0
- package/components/templates/Component_Container/crn-three-six-three-container.template.html +5 -0
- package/components/templates/Component_Container/crn-two-container.template.html +4 -0
- package/components/templates/button.template.html +2 -2
- package/components/templates/cron-autocomplete.designtime.html +3 -3
- package/components/templates/cron-checkbox.template.html +1 -2
- package/components/templates/cron-combobox-multiple.template.html +1 -1
- package/components/templates/cron-crud.template.html +71 -0
- package/components/templates/cron-dynamic-combobox.template.html +2 -3
- package/components/templates/fileupload-button.template.html +1 -1
- package/components/templates/fileupload.template.html +1 -1
- package/components/templates/form.template.html +44 -21
- package/components/templates/grid-horizontal.template.html +4 -2
- package/components/templates/grid-vertical.template.html +4 -2
- package/components/templates/icon.template.html +1 -1
- package/components/templates/image.default.template.html +1 -2
- package/components/templates/rating.template.html +7 -7
- package/components/templates/social-button-bar.template.html +11 -12
- package/components/templates/sub-form.template.html +44 -11
- package/components/templates/textinputbutton.template.html +3 -1
- package/css/animate.css +433 -0
- package/css/app.css +131 -32
- package/css/modalTemplate.css +25 -0
- package/css/themes/custom/fuse/custom-fuse.min.css +1 -5
- package/css/themes/custom/material/components_css/crn-navbar.css +30 -32
- package/css/themes/custom/material/custom-material.css +16 -11
- package/css/themes/custom/navigator/custom-navigator.css +71 -76
- package/dist/components/css/checkbox-color.css +1 -1
- package/dist/components/css/color-default.css +1 -1
- package/dist/components/css/font-size.css +1 -0
- package/dist/components/css/image.css +1 -0
- package/dist/components/js/jquery.inputmask.bundle.js +1 -1
- package/dist/components/js/jquery.mask.min.js +1 -1
- package/dist/components/js/qrcode.js +1 -1
- package/dist/components/templates/Component_Container/crn-eight-four-container.template.html +1 -0
- package/dist/components/templates/Component_Container/crn-four-eight-container.template.html +1 -0
- package/dist/components/templates/Component_Container/crn-one-container.template.html +1 -0
- package/dist/components/templates/Component_Container/crn-three-container.template.html +1 -0
- package/dist/components/templates/Component_Container/crn-three-six-three-container.template.html +1 -0
- package/dist/components/templates/Component_Container/crn-two-container.template.html +1 -0
- package/dist/components/templates/button.template.html +1 -1
- package/dist/components/templates/cron-autocomplete.designtime.html +1 -1
- package/dist/components/templates/cron-checkbox.template.html +1 -1
- package/dist/components/templates/cron-combobox-multiple.template.html +1 -1
- package/dist/components/templates/cron-crud.template.html +1 -0
- package/dist/components/templates/cron-dynamic-combobox.template.html +1 -1
- package/dist/components/templates/fileupload-button.template.html +1 -1
- package/dist/components/templates/fileupload.template.html +1 -1
- package/dist/components/templates/form.template.html +1 -1
- package/dist/components/templates/grid-horizontal.template.html +1 -1
- package/dist/components/templates/grid-vertical.template.html +1 -1
- package/dist/components/templates/icon.template.html +1 -1
- package/dist/components/templates/image.default.template.html +1 -1
- package/dist/components/templates/rating.template.html +1 -1
- package/dist/components/templates/social-button-bar.template.html +1 -1
- package/dist/components/templates/sub-form.template.html +1 -1
- package/dist/components/templates/textinputbutton.template.html +1 -1
- package/dist/css/app.css +1 -1
- package/dist/i18n/locale_en_us.json +2 -1
- package/dist/i18n/locale_pt_br.json +2 -1
- package/dist/img/barcode.png +0 -0
- package/dist/img/cron-icon/crn-cron-crud.svg +1 -0
- package/dist/img/cron-icon/crn-eight-four-container.svg +1 -0
- package/dist/img/cron-icon/crn-four-eight-container.svg +1 -0
- package/dist/img/cron-icon/crn-one-container.svg +1 -0
- package/dist/img/cron-icon/crn-three-container.svg +1 -0
- package/dist/img/cron-icon/crn-three-six-three-container.svg +1 -0
- package/dist/img/cron-icon/crn-two-container.svg +1 -0
- package/dist/img/cronGrid.png +0 -0
- package/dist/img/cronRichEditor.png +0 -0
- package/dist/img/cronapp-logo-login.png +0 -0
- package/dist/img/logo.png +0 -0
- package/dist/img/placehold-100x100.png +0 -0
- package/dist/img/placehold-900x500.png +0 -0
- package/dist/img/qrcode.png +0 -0
- package/dist/img/selectFile.png +0 -0
- package/dist/img/switch.png +0 -0
- package/dist/js/app.js +1 -1
- package/dist/js/controllers.js +1 -1
- package/dist/js/directives.js +1 -1
- package/dist/js/upload.service.js +1 -1
- package/i18n/locale_en_us.json +2 -1
- package/i18n/locale_pt_br.json +2 -1
- package/img/cron-icon/crn-cron-crud.svg +28 -0
- package/img/cron-icon/crn-eight-four-container.svg +18 -0
- package/img/cron-icon/crn-four-eight-container.svg +20 -0
- package/img/cron-icon/crn-one-container.svg +17 -0
- package/img/cron-icon/crn-three-container.svg +21 -0
- package/img/cron-icon/crn-three-six-three-container.svg +19 -0
- package/img/cron-icon/crn-two-container.svg +18 -0
- package/img/placehold-900x500.png +0 -0
- package/js/app.js +48 -22
- package/js/controllers.js +18 -11
- package/js/directives.js +2081 -1900
- package/js/upload.service.js +7 -3
- package/package.json +11 -11
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(){function a(a){var b=[].slice.call(arguments,1),c=0;return a.replace(/%s/g,function(){return b[c++]})}angular.module("upload.services",[]).service("UploadService",["$http","$compile","$modal","Upload",function(a,b,c){var d=$("body"),e=angular.element(d.get(0)).scope();this.ensureProps=a=>(a.filter&&(a.filter=a.filter.replace(/\s/g,"")),a),this.upload=function(a){let b=this.ensureProps(a);c.open({templateUrl:"node_modules/cronapp-framework-js/components/upload/upload.html",controller:"UploadController",resolve:{data:function(){return b}}})}.bind(this)}]),angular.module("custom.controllers").controller("UploadController",["$scope","$http","$translate","$stateParams","$location","$http","$modalInstance","data",function(b,c,d,e,f,c,g,h){app.registerEventsCronapi(b,d),b.params=e,b.$http=c;var i=f.search();for(var j in i)i.hasOwnProperty(j)&&(b.params[j]=i[j]);b.files=[],b.uploading=!1,b.uploaded=!0,b.progress=0,b.data=h,b.message=d.instant("Upload.oneFile"),"true"==h.multiple&&(b.message=d.instant("Upload.multipleFile")),h.description&&(b.message=h.description),b.safeApply=safeApply,b.uploadFile=function(e){var f=b.data.scope,g="api/cronapi/upload/"+h.id,j=new FormData;if(0==e.length)this.Notification.error(a(d.instant("Upload.errorValidation"),h.maxSize,h.filter));else{for(var k=0;k<e.length;k++)j.append("file",e[k]),console.log(e[k].$valid);var l=JSON.parse(localStorage.getItem("_u"));this.$promise=c({method:"POST",url:(window.hostApp||"")+g,data:j,headers:{"Content-Type":void 0,"X-AUTH-TOKEN":l?l.token:""},onProgress:function(a){this.safeApply(function(){if(a.lengthComputable){var c=0|100*(a.loaded/a.total);b.progress=c}b.uploading=!0,console.log(c)})}.bind(this)}).
|
|
1
|
+
(function(){function a(a){var b=[].slice.call(arguments,1),c=0;return a.replace(/%s/g,function(){return b[c++]})}angular.module("upload.services",[]).service("UploadService",["$http","$compile","$modal","Upload",function(a,b,c){var d=$("body"),e=angular.element(d.get(0)).scope();this.ensureProps=a=>(a.filter&&(a.filter=a.filter.replace(/\s/g,"")),a),this.upload=function(a){let b=this.ensureProps(a);c.open({templateUrl:"node_modules/cronapp-framework-js/components/upload/upload.html",controller:"UploadController",resolve:{data:function(){return b}}})}.bind(this)}]),angular.module("custom.controllers").controller("UploadController",["$scope","$http","$translate","$stateParams","$location","$http","$modalInstance","data",function(b,c,d,e,f,c,g,h){app.registerEventsCronapi(b,d),b.params=e,b.$http=c;var i=f.search();for(var j in i)i.hasOwnProperty(j)&&(b.params[j]=i[j]);b.files=[],b.uploading=!1,b.uploaded=!0,b.progress=0,b.data=h,b.message=d.instant("Upload.oneFile"),"true"==h.multiple&&(b.message=d.instant("Upload.multipleFile")),h.description&&(b.message=h.description),b.safeApply=safeApply,b.uploadFile=function(e){var f=b.data.scope,g="api/cronapi/upload/"+h.id,j=new FormData;if(0==e.length)this.Notification.error(a(d.instant("Upload.errorValidation"),h.maxSize,h.filter));else{for(var k=0;k<e.length;k++)j.append("file",e[k]),console.log(e[k].$valid);var l=JSON.parse(localStorage.getItem("_u"));this.$promise=c({method:"POST",url:(window.hostApp||"")+g,data:j,headers:{"Content-Type":void 0,"X-AUTH-TOKEN":l?l.token:""},onProgress:function(a){this.safeApply(function(){if(a.lengthComputable){var c=0|100*(a.loaded/a.total);b.progress=c}b.uploading=!0,console.log(c)})}.bind(this)}).then(function(a){f.cronapi.evalInContext(JSON.stringify(a)).then(()=>{b.uploaded=!0,b.uploading=!1,b.close()})}.bind(this)).catch(function(a){let c=a.error;a&&a.data&&(c=a.data.error),this.Notification.error(c),b.uploading=!1,b.close()}.bind(this))}}.bind(b),b.close=function(){g.dismiss("cancel")}}])})(app);
|
package/i18n/locale_en_us.json
CHANGED
package/i18n/locale_pt_br.json
CHANGED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!-- Generator: Adobe Illustrator 25.3.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
3
|
+
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
4
|
+
viewBox="0 0 24 24" style="enable-background:new 0 0 24 24;" xml:space="preserve">
|
|
5
|
+
<style type="text/css">
|
|
6
|
+
.st0{fill:#C9C9C9;}
|
|
7
|
+
</style>
|
|
8
|
+
<g id="Camada_1">
|
|
9
|
+
</g>
|
|
10
|
+
<g id="Camada_3">
|
|
11
|
+
</g>
|
|
12
|
+
<g id="Camada_4">
|
|
13
|
+
</g>
|
|
14
|
+
<g id="Camada_2">
|
|
15
|
+
<g>
|
|
16
|
+
<path class="st0" d="M19.56,8.44c-0.59-0.59-1.54-0.59-2.12,0L15,10.88l-2.44-2.44c-0.59-0.59-1.54-0.59-2.12,0
|
|
17
|
+
c-0.59,0.59-0.59,1.54,0,2.12L12.88,13l-2.44,2.44c-0.59,0.59-0.59,1.54,0,2.12c0.59,0.59,1.54,0.59,2.12,0L15,15.12l2.44,2.44
|
|
18
|
+
c0.59,0.59,1.54,0.59,2.12,0c0.59-0.59,0.59-1.54,0-2.12L17.12,13l2.44-2.44C20.15,9.97,20.15,9.03,19.56,8.44z"/>
|
|
19
|
+
<path class="st0" d="M8,8.49C8,8.22,7.78,8,7.5,8H4.5C4.22,8,4,8.22,4,8.49v0.51C4,9.28,4.22,9.5,4.5,9.5H7.5
|
|
20
|
+
C7.78,9.5,8,9.28,8,9.01V8.49z"/>
|
|
21
|
+
<path class="st0" d="M20,2h-3c-0.55,0-1,0.45-1,1c0,0.55,0.45,1,1,1h3c1.1,0,2,0.9,2,2v14c0,1.1-0.9,2-2,2H4c-1.1,0-2-0.9-2-2V6
|
|
22
|
+
c0-1.1,0.9-2,2-2h6v1.4c0,0.49,0.51,0.77,0.87,0.48l2.91-2.4c0.29-0.24,0.29-0.72,0-0.96l-2.91-2.4C10.51-0.17,10,0.11,10,0.6V2H4
|
|
23
|
+
C1.8,2,0,3.8,0,6v14c0,2.2,1.8,4,4,4h16c2.2,0,4-1.8,4-4V6C24,3.8,22.2,2,20,2z"/>
|
|
24
|
+
<path class="st0" d="M7.49,10H4.51C4.23,10,4,10.23,4,10.51v4.29c0,0.39,0.12,0.78,0.34,1.11l1.24,1.86c0.2,0.3,0.65,0.3,0.85,0
|
|
25
|
+
l1.24-1.86C7.88,15.59,8,15.2,8,14.81v-4.29C8,10.23,7.77,10,7.49,10z"/>
|
|
26
|
+
</g>
|
|
27
|
+
</g>
|
|
28
|
+
</svg>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!-- Generator: Adobe Illustrator 25.3.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
3
|
+
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
4
|
+
viewBox="0 0 24 24" style="enable-background:new 0 0 24 24;" xml:space="preserve">
|
|
5
|
+
<style type="text/css">
|
|
6
|
+
.st0{fill:#C9C9C9;}
|
|
7
|
+
</style>
|
|
8
|
+
<g id="Camada_1">
|
|
9
|
+
</g>
|
|
10
|
+
<g id="Camada_3">
|
|
11
|
+
</g>
|
|
12
|
+
<g id="Camada_4">
|
|
13
|
+
</g>
|
|
14
|
+
<g id="Camada_2">
|
|
15
|
+
<path class="st0" d="M22,0l-4,0c-1.1,0-2,0.9-2,2v20c0,1.1,0.9,2,2,2h4c1.1,0,2-0.9,2-2V2C24,0.9,23.1,0,22,0z"/>
|
|
16
|
+
<path class="st0" d="M12,24H2c-1.1,0-2-0.9-2-2L0,2c0-1.1,0.9-2,2-2l10,0c1.1,0,2,0.9,2,2v20C14,23.1,13.1,24,12,24z"/>
|
|
17
|
+
</g>
|
|
18
|
+
</svg>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!-- Generator: Adobe Illustrator 25.3.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
3
|
+
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
4
|
+
viewBox="0 0 24 24" style="enable-background:new 0 0 24 24;" xml:space="preserve">
|
|
5
|
+
<style type="text/css">
|
|
6
|
+
.st0{fill:#C9C9C9;}
|
|
7
|
+
</style>
|
|
8
|
+
<g id="Camada_1">
|
|
9
|
+
</g>
|
|
10
|
+
<g id="Camada_3">
|
|
11
|
+
</g>
|
|
12
|
+
<g id="Camada_4">
|
|
13
|
+
</g>
|
|
14
|
+
<g id="Camada_2">
|
|
15
|
+
<g>
|
|
16
|
+
<path class="st0" d="M2,0h4c1.1,0,2,0.9,2,2v20c0,1.1-0.9,2-2,2H2c-1.1,0-2-0.9-2-2L0,2C0,0.9,0.9,0,2,0z"/>
|
|
17
|
+
<path class="st0" d="M12,24h10c1.1,0,2-0.9,2-2V2c0-1.1-0.9-2-2-2H12c-1.1,0-2,0.9-2,2v20C10,23.1,10.9,24,12,24z"/>
|
|
18
|
+
</g>
|
|
19
|
+
</g>
|
|
20
|
+
</svg>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!-- Generator: Adobe Illustrator 25.3.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
3
|
+
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
4
|
+
viewBox="0 0 24 24" style="enable-background:new 0 0 24 24;" xml:space="preserve">
|
|
5
|
+
<style type="text/css">
|
|
6
|
+
.st0{fill:#C9C9C9;}
|
|
7
|
+
</style>
|
|
8
|
+
<g id="Camada_1">
|
|
9
|
+
</g>
|
|
10
|
+
<g id="Camada_3">
|
|
11
|
+
</g>
|
|
12
|
+
<g id="Camada_4">
|
|
13
|
+
</g>
|
|
14
|
+
<g id="Camada_2">
|
|
15
|
+
<path class="st0" d="M22,24H2c-1.1,0-2-0.9-2-2L0,2c0-1.1,0.9-2,2-2l20,0c1.1,0,2,0.9,2,2v20C24,23.1,23.1,24,22,24z"/>
|
|
16
|
+
</g>
|
|
17
|
+
</svg>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!-- Generator: Adobe Illustrator 25.3.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
3
|
+
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
4
|
+
viewBox="0 0 24 24" style="enable-background:new 0 0 24 24;" xml:space="preserve">
|
|
5
|
+
<style type="text/css">
|
|
6
|
+
.st0{fill:#C9C9C9;}
|
|
7
|
+
</style>
|
|
8
|
+
<g id="Camada_1">
|
|
9
|
+
</g>
|
|
10
|
+
<g id="Camada_3">
|
|
11
|
+
</g>
|
|
12
|
+
<g id="Camada_4">
|
|
13
|
+
</g>
|
|
14
|
+
<g id="Camada_2">
|
|
15
|
+
<path class="st0" d="M3.67,24H3c-1.65,0-3-1.35-3-3L0,3c0-1.65,1.35-3,3-3h0.67c1.65,0,3,1.35,3,3v18C6.67,22.65,5.32,24,3.67,24z"
|
|
16
|
+
/>
|
|
17
|
+
<path class="st0" d="M12.33,24h-0.67c-1.65,0-3-1.35-3-3V3c0-1.65,1.35-3,3-3h0.67c1.65,0,3,1.35,3,3v18
|
|
18
|
+
C15.33,22.65,13.98,24,12.33,24z"/>
|
|
19
|
+
<path class="st0" d="M21,24h-0.67c-1.65,0-3-1.35-3-3V3c0-1.65,1.35-3,3-3H21c1.65,0,3,1.35,3,3v18C24,22.65,22.65,24,21,24z"/>
|
|
20
|
+
</g>
|
|
21
|
+
</svg>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!-- Generator: Adobe Illustrator 25.3.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
3
|
+
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
4
|
+
viewBox="0 0 24 24" style="enable-background:new 0 0 24 24;" xml:space="preserve">
|
|
5
|
+
<style type="text/css">
|
|
6
|
+
.st0{fill:#C9C9C9;}
|
|
7
|
+
</style>
|
|
8
|
+
<g id="Camada_1">
|
|
9
|
+
</g>
|
|
10
|
+
<g id="Camada_3">
|
|
11
|
+
</g>
|
|
12
|
+
<g id="Camada_4">
|
|
13
|
+
</g>
|
|
14
|
+
<g id="Camada_2">
|
|
15
|
+
<path class="st0" d="M2,24L2,24c-1.1,0-2-0.9-2-2L0,2c0-1.1,0.9-2,2-2h0c1.1,0,2,0.9,2,2v20C4,23.1,3.1,24,2,24z"/>
|
|
16
|
+
<path class="st0" d="M22,0L22,0c-1.1,0-2,0.9-2,2v20c0,1.1,0.9,2,2,2h0c1.1,0,2-0.9,2-2V2C24,0.9,23.1,0,22,0z"/>
|
|
17
|
+
<path class="st0" d="M16,24H8c-1.1,0-2-0.9-2-2V2c0-1.1,0.9-2,2-2h8c1.1,0,2,0.9,2,2v20C18,23.1,17.1,24,16,24z"/>
|
|
18
|
+
</g>
|
|
19
|
+
</svg>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!-- Generator: Adobe Illustrator 25.3.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
3
|
+
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
4
|
+
viewBox="0 0 24 24" style="enable-background:new 0 0 24 24;" xml:space="preserve">
|
|
5
|
+
<style type="text/css">
|
|
6
|
+
.st0{fill:#C9C9C9;}
|
|
7
|
+
</style>
|
|
8
|
+
<g id="Camada_1">
|
|
9
|
+
</g>
|
|
10
|
+
<g id="Camada_3">
|
|
11
|
+
</g>
|
|
12
|
+
<g id="Camada_4">
|
|
13
|
+
</g>
|
|
14
|
+
<g id="Camada_2">
|
|
15
|
+
<path class="st0" d="M9,24H2c-1.1,0-2-0.9-2-2L0,2c0-1.1,0.9-2,2-2h7c1.1,0,2,0.9,2,2v20C11,23.1,10.1,24,9,24z"/>
|
|
16
|
+
<path class="st0" d="M22,24h-7c-1.1,0-2-0.9-2-2V2c0-1.1,0.9-2,2-2h7c1.1,0,2,0.9,2,2v20C24,23.1,23.1,24,22,24z"/>
|
|
17
|
+
</g>
|
|
18
|
+
</svg>
|
|
Binary file
|
package/js/app.js
CHANGED
|
@@ -17,7 +17,8 @@ var cronappModules = [
|
|
|
17
17
|
'report.services',
|
|
18
18
|
'upload.services',
|
|
19
19
|
'ui.tinymce',
|
|
20
|
-
'ngCookies'
|
|
20
|
+
'ngCookies',
|
|
21
|
+
'kendo.directives'
|
|
21
22
|
];
|
|
22
23
|
|
|
23
24
|
if (window.customModules) {
|
|
@@ -29,6 +30,14 @@ var onloadCallback = function() {
|
|
|
29
30
|
window.grecaptcha.reset();
|
|
30
31
|
};
|
|
31
32
|
|
|
33
|
+
var getRequestData = data => {
|
|
34
|
+
let result = data || {};
|
|
35
|
+
if (data.data && typeof data.data === 'object') {
|
|
36
|
+
result = data.data;
|
|
37
|
+
}
|
|
38
|
+
return result;
|
|
39
|
+
};
|
|
40
|
+
|
|
32
41
|
var app = (function() {
|
|
33
42
|
|
|
34
43
|
return angular.module('MyApp', cronappModules)
|
|
@@ -40,6 +49,9 @@ var app = (function() {
|
|
|
40
49
|
'preferredLocale': 'pt_br',
|
|
41
50
|
'urlPrefix': ''
|
|
42
51
|
})
|
|
52
|
+
.config(['$locationProvider', function($locationProvider) {
|
|
53
|
+
$locationProvider.hashPrefix('');
|
|
54
|
+
}])
|
|
43
55
|
.config([
|
|
44
56
|
'$httpProvider',
|
|
45
57
|
function($httpProvider) {
|
|
@@ -126,6 +138,8 @@ var app = (function() {
|
|
|
126
138
|
|
|
127
139
|
var locale = (window.navigator.userLanguage || window.navigator.language).replace('-', '_').toLowerCase();
|
|
128
140
|
$translateProvider.use(locale);
|
|
141
|
+
$translateProvider.preferredLanguage(locale);
|
|
142
|
+
$translateProvider.fallbackLanguage('en_us');
|
|
129
143
|
|
|
130
144
|
$translateProvider.useSanitizeValueStrategy('escaped');
|
|
131
145
|
|
|
@@ -200,6 +214,13 @@ var app = (function() {
|
|
|
200
214
|
|
|
201
215
|
app.registerEventsCronapi($scope, $translate);
|
|
202
216
|
|
|
217
|
+
$("form").kendoValidator({
|
|
218
|
+
errorTemplate: '<span class="k-widget k-tooltip-validation k-x-invalid-msg-block">#=message#</span>',
|
|
219
|
+
messages:{
|
|
220
|
+
required: ''
|
|
221
|
+
}
|
|
222
|
+
});
|
|
223
|
+
|
|
203
224
|
$rootScope.getReport = function(reportName, params, config) {
|
|
204
225
|
ReportService.openReport(reportName, params, config);
|
|
205
226
|
};
|
|
@@ -238,7 +259,7 @@ var app = (function() {
|
|
|
238
259
|
|
|
239
260
|
})
|
|
240
261
|
|
|
241
|
-
.run(function($rootScope, $state, $stateParams, $timeout) {
|
|
262
|
+
.run(function($rootScope, $state, $stateParams, $timeout, $transitions) {
|
|
242
263
|
// It's very handy to add references to $state and $stateParams to the $rootScope
|
|
243
264
|
// so that you can access them from any scope within your applications.For example,
|
|
244
265
|
// <li ng-class="{ active: $state.includes('contacts.list') }"> will set the <li>
|
|
@@ -246,26 +267,27 @@ var app = (function() {
|
|
|
246
267
|
$rootScope.$state = $state;
|
|
247
268
|
$rootScope.$stateParams = $stateParams;
|
|
248
269
|
|
|
249
|
-
$
|
|
250
|
-
if (
|
|
251
|
-
|
|
252
|
-
if (
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
270
|
+
const $stateChangeError = function(error) {
|
|
271
|
+
if (error) {
|
|
272
|
+
const errorMessage = error.toString();
|
|
273
|
+
if (errorMessage.includes('=404')) {
|
|
274
|
+
$state.go('404');
|
|
275
|
+
}
|
|
276
|
+
else if (errorMessage.includes('=403')) {
|
|
277
|
+
$state.go('403');
|
|
278
|
+
}
|
|
279
|
+
else if (errorMessage.includes('=401')) {
|
|
280
|
+
localStorage.removeItem('_u');
|
|
281
|
+
$state.go('loginReturnUrl', { "returnUrl" : window.location.hash });
|
|
282
|
+
} else {
|
|
283
|
+
$state.go('404');
|
|
263
284
|
}
|
|
264
285
|
} else {
|
|
265
286
|
$state.go('404');
|
|
266
287
|
}
|
|
267
|
-
}
|
|
268
|
-
|
|
288
|
+
};
|
|
289
|
+
|
|
290
|
+
const $stateChangeSuccess = function(currentRoute) {
|
|
269
291
|
$timeout(() => {
|
|
270
292
|
let systemName = $('#projectName').length ? $('#projectName').val() : $('h1:first').length && $('h1:first').text().trim().length ? $('h1:first').text().trim() : '';
|
|
271
293
|
|
|
@@ -312,7 +334,11 @@ var app = (function() {
|
|
|
312
334
|
|
|
313
335
|
$rootScope.renderFinished = true;
|
|
314
336
|
});
|
|
315
|
-
}
|
|
337
|
+
};
|
|
338
|
+
|
|
339
|
+
$transitions.onSuccess({}, (transition) => $stateChangeSuccess(transition.to()));
|
|
340
|
+
$state.defaultErrorHandler(error => $stateChangeError(error));
|
|
341
|
+
|
|
316
342
|
});
|
|
317
343
|
|
|
318
344
|
}(window));
|
|
@@ -411,9 +437,9 @@ app.factory('customTranslateLoader', function ($http, $q) {
|
|
|
411
437
|
].join(''),
|
|
412
438
|
method: 'GET',
|
|
413
439
|
params: ''
|
|
414
|
-
}, options.$http)).
|
|
415
|
-
deferred.resolve(data);
|
|
416
|
-
}).
|
|
440
|
+
}, options.$http)).then(function (data) {
|
|
441
|
+
deferred.resolve(getRequestData(data));
|
|
442
|
+
}).catch(function () {
|
|
417
443
|
deferred.resolve({});
|
|
418
444
|
});
|
|
419
445
|
|
package/js/controllers.js
CHANGED
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
$http({
|
|
7
7
|
method: 'GET',
|
|
8
8
|
url: 'auth/refresh'
|
|
9
|
-
}).
|
|
9
|
+
}).then(function (data, status, headers, config) {
|
|
10
|
+
data = getRequestData(data);
|
|
10
11
|
//Keeping the user information, the auth/refresh only has name and username info
|
|
11
12
|
if (localStorage.getItem("_u")) {
|
|
12
13
|
let currentSession = JSON.parse(localStorage.getItem("_u"));
|
|
@@ -21,7 +22,7 @@
|
|
|
21
22
|
// refresh time
|
|
22
23
|
}, (1800 * 1000));
|
|
23
24
|
success();
|
|
24
|
-
}).
|
|
25
|
+
}).catch(function () {
|
|
25
26
|
error();
|
|
26
27
|
});
|
|
27
28
|
};
|
|
@@ -51,12 +52,12 @@
|
|
|
51
52
|
'Content-Type': 'application/x-www-form-urlencoded',
|
|
52
53
|
'X-AUTH-TOKEN': $location.search().token
|
|
53
54
|
}
|
|
54
|
-
}).
|
|
55
|
+
}).then(() => {
|
|
55
56
|
Notification.info($translate.instant('ResetPasswordSuccess'));
|
|
56
57
|
passwordNew.value = "";
|
|
57
58
|
passwordConfirmation.value = "";
|
|
58
59
|
$state.go('login');
|
|
59
|
-
}).
|
|
60
|
+
}).catch(data => Notification.error(data));
|
|
60
61
|
//
|
|
61
62
|
}
|
|
62
63
|
});
|
|
@@ -160,7 +161,7 @@
|
|
|
160
161
|
url : 'auth',
|
|
161
162
|
data : $.param(user),
|
|
162
163
|
headers : headerValues
|
|
163
|
-
}).
|
|
164
|
+
}).then(handleSuccess).catch(handleError);
|
|
164
165
|
};
|
|
165
166
|
|
|
166
167
|
$scope.forgotPassword = function () {
|
|
@@ -181,14 +182,15 @@
|
|
|
181
182
|
headers: {
|
|
182
183
|
'Content-Type': 'application/x-www-form-urlencoded'
|
|
183
184
|
}
|
|
184
|
-
}).
|
|
185
|
+
}).then(() => {
|
|
185
186
|
Notification.info($translate.instant('ForgotPasswordSent'));
|
|
186
187
|
forgotPasswordEmail.value = "";
|
|
187
188
|
$("#forgotPasswordModal").modal("hide");
|
|
188
|
-
}).
|
|
189
|
+
}).catch(data => Notification.error(data));
|
|
189
190
|
};
|
|
190
191
|
|
|
191
192
|
function handleSuccess(data, status, headers, config) {
|
|
193
|
+
data = getRequestData(data);
|
|
192
194
|
// Store data response on session storage
|
|
193
195
|
// The local storage will be cleaned when the browser window is closed
|
|
194
196
|
if(typeof (Storage) !== "undefined") {
|
|
@@ -212,6 +214,8 @@
|
|
|
212
214
|
}
|
|
213
215
|
|
|
214
216
|
function handleError(data, status, headers, config) {
|
|
217
|
+
status = status || data.status;
|
|
218
|
+
data = getRequestData(data);
|
|
215
219
|
let error;
|
|
216
220
|
if (data !== null && data.message) {
|
|
217
221
|
let message = JSON.parse(data.message);
|
|
@@ -311,9 +315,10 @@
|
|
|
311
315
|
headers : {
|
|
312
316
|
'Content-Type' : 'application/json'
|
|
313
317
|
}
|
|
314
|
-
}).
|
|
318
|
+
}).then(clean).catch(clean);
|
|
315
319
|
|
|
316
320
|
function clean(result) {
|
|
321
|
+
result = getRequestData(result);
|
|
317
322
|
$rootScope.session = {};
|
|
318
323
|
if(typeof (Storage) !== "undefined") {
|
|
319
324
|
localStorage.removeItem("_u");
|
|
@@ -343,7 +348,7 @@
|
|
|
343
348
|
headers : {
|
|
344
349
|
'Content-Type' : 'application/x-www-form-urlencoded'
|
|
345
350
|
}
|
|
346
|
-
}).
|
|
351
|
+
}).then(changeSuccess).catch(changeError);
|
|
347
352
|
}
|
|
348
353
|
|
|
349
354
|
function changeSuccess(data, status, headers, config) {
|
|
@@ -352,6 +357,8 @@
|
|
|
352
357
|
}
|
|
353
358
|
|
|
354
359
|
function changeError(data, status, headers, config) {
|
|
360
|
+
status = status || data.status;
|
|
361
|
+
data = getRequestData(data);
|
|
355
362
|
var error;
|
|
356
363
|
|
|
357
364
|
if (status === 422) {
|
|
@@ -439,7 +446,7 @@
|
|
|
439
446
|
headers : {
|
|
440
447
|
'Content-Type' : 'application/x-www-form-urlencoded'
|
|
441
448
|
}
|
|
442
|
-
}).
|
|
449
|
+
}).then(changeSuccess).catch(changeError);
|
|
443
450
|
|
|
444
451
|
function changeSuccess(data, status, headers, config) {
|
|
445
452
|
$rootScope.session.theme = theme;
|
|
@@ -448,7 +455,7 @@
|
|
|
448
455
|
}
|
|
449
456
|
|
|
450
457
|
function changeError(data, status, headers, config) {
|
|
451
|
-
var error = data;
|
|
458
|
+
var error = getRequestData(data);
|
|
452
459
|
Notification.error(error);
|
|
453
460
|
}
|
|
454
461
|
}
|