Initial Commit

This commit is contained in:
GiacomoHome
2021-09-17 12:41:45 +02:00
commit 9001e4656e
570 changed files with 31013 additions and 0 deletions
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

+1
View File
@@ -0,0 +1 @@
<svg id="Capa_1" enable-background="new 0 0 512 512" height="512" viewBox="0 0 512 512" width="512" xmlns="http://www.w3.org/2000/svg"><g><g><g><g><g><g><g><g><g><g><path d="m88.869 449.921c-54.421-46.945-88.869-116.41-88.869-193.921 0-141.385 114.615-256 256-256s256 114.615 256 256c0 77.511-34.448 146.977-88.87 193.922z" fill="#a3d4ff"/></g></g></g></g></g></g></g></g></g><path d="m343.761 99.053-186.724 116.507 55.378 55.378h-16.56l165.626 165.626 61.649 13.356c51.82-44.701 85.53-109.821 88.634-182.864z" fill="#65b1fc"/><g><circle cx="173.032" cy="202.188" fill="#e09380" r="20.851"/><circle cx="338.968" cy="202.188" fill="#d47f6c" r="20.851"/></g><g><path d="m197.343 328.89-48.746 5.125c-12.03 1.681-22.547 6.586-30.418 13.519-.014-.006-.029-.011-.043-.017-9.227 8.116-14.795 19.034-14.795 30.887v42.35c44.026 23.486 96.424 37.11 152.659 37.11s108.632-13.624 152.659-37.11v-42.35c0-11.853-5.568-22.771-14.795-30.887-.015.006-.029.011-.043.017-7.871-6.933-18.387-11.838-30.418-13.519l-48.746-5.125-58.657 20.881z" fill="#fff"/></g><g><path d="m256 349.769v108.096c56.184-.022 108.667-13.642 152.659-37.109v-42.35c0-11.853-5.568-22.771-14.795-30.887-.015.006-.029.011-.043.017-7.871-6.933-18.387-11.838-30.418-13.519l-48.746-5.125" fill="#e9edf5"/></g><g><path d="m197.343 328.89c13.97 16.848 35.06 27.579 58.657 27.579s44.687-10.731 58.657-27.579l-3.063-.516c-11.012-1.855-19.075-11.39-19.075-22.557v-50.847h-73.037v50.848c0 11.167-8.063 20.702-19.075 22.557z" fill="#e09380"/></g><g><path d="m314.657 328.89-3.063-.516c-11.012-1.855-19.075-11.39-19.075-22.557v-50.847h-36.519v101.498c23.552-.034 44.709-10.756 58.657-27.578z" fill="#d47f6c"/></g><g><path d="m256 295.768c-44.62 0-84.402-36.171-84.402-80.791v-44.922c0-44.62 39.783-80.791 84.402-80.791 44.62 0 84.402 36.171 84.402 80.791v44.922c0 44.62-39.782 80.791-84.402 80.791z" fill="#faa68e"/></g><g><path d="m256 89.265v206.504c44.62 0 84.402-36.171 84.402-80.791v-44.922c0-44.62-39.782-80.791-84.402-80.791z" fill="#e09380"/></g><path d="m88.869 449.921c44.847 38.686 103.257 62.079 167.131 62.079s122.284-23.393 167.131-62.079v-80.954h-334.262z" fill="#414952"/><path d="m256 512c63.874 0 122.284-23.393 167.131-62.079v-80.954h-167.131z" fill="#23272b"/><circle cx="256" cy="456.542" fill="#7e8596" r="29.567"/><path d="m256 426.975c16.33 0 29.567 13.238 29.567 29.567 0 16.33-13.238 29.567-29.567 29.567z" fill="#707789"/><path d="m354.963 137.157c0-38.863-31.504-70.367-70.367-70.367h-47.307c-44.321 0-80.251 35.93-80.251 80.251v40.477c0 8.103 6.568 14.671 14.671 14.671v-25.007h36.042c24.863 0 77.008 1.851 101.196-35.84 2.802 12.315 12.84 33.114 26.681 33.114h4.664v27.733c8.103 0 14.671-6.569 14.671-14.671z" fill="#414952"/><path d="m284.595 66.789h-28.595v107.114c19.967-4.024 40.345-12.925 52.947-32.562 2.802 12.315 12.84 33.114 26.681 33.114h4.664v27.732c8.103 0 14.671-6.568 14.671-14.671v-50.36c0-38.862-31.505-70.367-70.368-70.367z" fill="#333940"/></g></svg>

After

Width:  |  Height:  |  Size: 2.9 KiB

+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="11" height="22"><defs><linearGradient id="a"><stop offset="0"/><stop offset="1" stop-opacity="0"/></linearGradient><radialGradient xlink:href="#a" cx="9.739" cy="9.716" fx="9.739" fy="9.716" r="3.709" gradientUnits="userSpaceOnUse"/></defs><g stroke="#000" fill="none"><g transform="translate(-129.5 -333.862) translate(0 .188)"><rect transform="matrix(.962 0 0 .971 4.943 11.548)" ry="2" rx="2" y="332.362" x="130" height="10.337" width="10.432" opacity=".5"/><g><path d="M132 339.175h6" opacity=".5"/><path d="M135 336.175v6" opacity=".5"/></g></g><g transform="translate(-129.5 -333.862)"><rect width="10.432" height="10.337" x="130" y="332.362" rx="2" ry="2" transform="matrix(.962 0 0 .971 4.943 22.736)" opacity=".5"/><path d="M132 350.362h6" opacity=".5"/></g></g></svg>

After

Width:  |  Height:  |  Size: 867 B

+110
View File
@@ -0,0 +1,110 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">
<circle style="fill:#00F8FE;" cx="256" cy="256" r="256"/>
<path style="fill:#00B7BE;" d="M511.995,256.353L340.021,84.378C307.699,49.136,255.996,53,255.996,53s-0.498-0.036-1.41-0.07
c-0.001,0-0.003,0-0.004,0c-0.02-0.001-0.044-0.001-0.065-0.002c-4.295-0.155-17.547-0.221-33.374,3.656
c-21.062,1.401-48.241,0.088-71.477-13.583c0,0,0.628,26.323,13.085,53.446c-10.867,17.187-17.615,41.1-15.9,74.377
c-12.26,2.296-20.961,13.754-19.597,26.353l2.111,19.493c0.754,6.963,4.438,12.931,9.685,16.816l32.601,32.971
c8.449,14.951,17.736,26.529,27.211,35.471l14.739,14.762v27.318l-25.771,0.017l-0.002-0.015h-16.15
c-0.621,0-1.23,0.011-1.834,0.027h-0.172l0.001,0.002c-0.001,0-0.003,0-0.004,0c-0.67,0.01-1.33,0.04-1.98,0.09
c-0.39,0.01-0.77,0.04-1.14,0.06c-0.05,0-0.1,0.01-0.15,0.01c-0.22,0.02-0.45,0.03-0.66,0.06h-0.1c-0.67,0.06-1.36,0.12-2.03,0.21
c-0.14,0-0.27,0.02-0.41,0.05c-0.1,0-0.21,0.01-0.31,0.03c-0.03,0-0.08,0-0.12,0.01c-0.27,0.03-0.52,0.06-0.78,0.11
c-0.12,0.01-0.22,0.03-0.33,0.04c-0.09,0.02-0.19,0.03-0.27,0.04c-0.46,0.06-0.91,0.14-1.36,0.21c-0.22,0.03-0.44,0.06-0.67,0.11
c-0.06,0-0.12,0.01-0.16,0.03c-0.27,0.04-0.54,0.09-0.8,0.15c-0.13,0.01-0.25,0.04-0.37,0.07c-0.33,0.06-0.67,0.14-1,0.2
c-0.33,0.07-0.67,0.15-0.99,0.21c-32.31,7.2-56.64,36.18-56.64,70.56v42.221c0.236,0.182,0.473,0.362,0.709,0.544
c1.339,1.029,2.686,2.049,4.046,3.053C146.638,493.458,199.151,512,256,512C397.267,512,511.804,397.575,511.995,256.353z"/>
<rect x="213.6" y="311.94" style="fill:#FFC473;" width="84.79" height="106.98"/>
<rect x="256" y="311.94" style="fill:#FFAA20;" width="42.4" height="106.98"/>
<path style="fill:#FFDBA9;" d="M365.149,170.823C360.591,103.738,303.38,65.663,256,65.663s-104.591,38.075-109.149,105.16
c-12.26,2.296-20.961,13.754-19.597,26.353l2.111,19.493c1.432,13.225,13.424,22.873,26.648,21.44l2.277-0.247
c27.072,70.467,70.758,88.61,97.708,92.732c26.95-4.121,70.637-22.264,97.708-92.732l2.277,0.247
c13.224,1.433,25.216-8.216,26.648-21.44l2.111-19.493C386.11,184.577,377.409,173.119,365.149,170.823z"/>
<g>
<path style="fill:#FFC473;" d="M384.75,197.176l-2.113,19.497c-1.438,13.223-13.423,22.867-26.647,21.439l-2.285-0.248
c-27.066,70.468-70.754,88.604-97.705,92.726V65.665c46.734,0,103.036,37.043,108.939,102.436c0.086,0.943,0.152,1.847,0.209,2.723
C377.41,173.118,386.111,184.581,384.75,197.176z"/>
<rect x="179.83" y="189.64" style="fill:#FFC473;" width="58.844" height="25.497"/>
</g>
<polygon style="fill:#FFA91F;" points="255.998,189.641 255.998,270.683 281.495,270.683 281.495,215.138 337.04,215.138
337.04,189.641 "/>
<path style="fill:#E1E1E3;" d="M412.6,416.29v42.23c-26.3,20.37-56.67,35.73-89.68,44.64c-7.86,2.13-15.87,3.88-24.01,5.25
c-3.36,0.58-6.75,1.08-10.16,1.51c-1.71,0.22-3.42,0.42-5.14,0.6C274.54,511.5,265.33,512,256,512c-9.33,0-18.54-0.5-27.61-1.48
c-1.72-0.18-3.43-0.38-5.14-0.6c-3.41-0.43-6.8-0.93-10.16-1.51c-8.14-1.37-16.15-3.12-24.01-5.25
c-33.01-8.91-63.38-24.27-89.68-44.64v-42.23c0-34.38,24.33-63.36,56.64-70.56c0.32-0.06,0.66-0.14,0.99-0.21
c0.33-0.06,0.67-0.14,1-0.2c0.12-0.03,0.24-0.06,0.37-0.07c0.26-0.06,0.53-0.11,0.8-0.15c0.04-0.02,0.1-0.03,0.16-0.03
c0.23-0.05,0.45-0.08,0.67-0.11c0.45-0.07,0.9-0.15,1.36-0.21c0.08-0.01,0.18-0.02,0.27-0.04c0.11-0.01,0.21-0.03,0.33-0.04
c0.26-0.05,0.51-0.08,0.78-0.11c0.04-0.01,0.09-0.01,0.12-0.01c0.1-0.02,0.21-0.03,0.31-0.03c0.14-0.03,0.27-0.05,0.41-0.05
c0.67-0.09,1.36-0.15,2.03-0.21h0.1c0.21-0.03,0.44-0.04,0.66-0.06c0.05,0,0.1-0.01,0.15-0.01c0.37-0.02,0.75-0.05,1.14-0.06
c0.65-0.05,1.31-0.08,1.98-0.09c0.66-0.02,1.33-0.03,2.01-0.03h41.93L256,408.67c0,0,42.39-64.42,42.39-64.66h41.93
c0.57,0,1.14,0.01,1.69,0.03h0.32c0.12,0,0.25,0,0.37,0.01c0.07,0,0.15,0,0.22,0.02c0.47,0,0.93,0.03,1.39,0.06
c0.39,0.01,0.77,0.04,1.14,0.06c0.05,0,0.1,0.01,0.15,0.01c0.22,0.02,0.45,0.03,0.66,0.06h0.1c0.69,0.05,1.36,0.12,2.03,0.21
c0.14,0,0.27,0.02,0.41,0.05c0.1,0,0.21,0.01,0.31,0.03c0.03,0,0.08,0,0.12,0.01c0.27,0.03,0.52,0.06,0.78,0.11
c0.12,0.01,0.22,0.03,0.33,0.04c0.09,0.02,0.16,0.02,0.24,0.04h0.03c0.68,0.09,1.36,0.2,2.03,0.32l0.16,0.03
c0.27,0.04,0.54,0.09,0.8,0.15c0.41,0.07,0.83,0.16,1.24,0.24c0.25,0.04,0.5,0.1,0.74,0.16c0.14,0.02,0.26,0.05,0.38,0.08
C388.27,352.93,412.6,381.91,412.6,416.29z"/>
<path style="fill:#FFA91F;" d="M273.76,455.5l9.85,55.02C274.54,511.5,265.33,512,256,512c-9.33,0-18.54-0.5-27.61-1.48l9.85-55.02
l-17.09-46.83h69.7L273.76,455.5z"/>
<path style="fill:#E67500;" d="M273.76,455.5l9.85,55.02C274.54,511.5,265.33,512,256,512V408.67h34.85L273.76,455.5z"/>
<g>
<polygon style="fill:#FFFFFF;" points="213.614,344.008 169.673,344.038 201.787,459 256,408.67 "/>
<polygon style="fill:#FFFFFF;" points="298.386,344.008 342.327,344.038 310.212,459 256,408.67 "/>
</g>
<path style="fill:#005FD2;" d="M213.09,508.41c-8.14-1.37-16.15-3.12-24.01-5.25c-33.01-8.91-63.38-24.27-89.68-44.64v-42.23
c0-34.38,24.33-63.36,56.64-70.56c0.32-0.06,0.66-0.14,0.99-0.21c0.33-0.06,0.67-0.14,1-0.2c0.12-0.03,0.24-0.06,0.37-0.07
c0.26-0.06,0.53-0.11,0.8-0.15c0.04-0.02,0.1-0.03,0.16-0.03c0.23-0.05,0.45-0.08,0.67-0.11c0.45-0.07,0.9-0.15,1.36-0.21
c0.08-0.01,0.18-0.02,0.27-0.04c0.11-0.01,0.21-0.03,0.33-0.04c0.26-0.05,0.51-0.08,0.78-0.11c0.04-0.01,0.09-0.01,0.12-0.01
c0.1-0.02,0.21-0.03,0.31-0.03c0.14-0.03,0.27-0.05,0.41-0.05c0.67-0.09,1.36-0.15,2.03-0.21h0.1c0.21-0.03,0.44-0.04,0.66-0.06
c0.05,0,0.1-0.01,0.15-0.01c0.37-0.02,0.75-0.05,1.14-0.06c0.65-0.05,1.31-0.08,1.98-0.09c0.66-0.02,1.33-0.03,2.01-0.03h16.15
L213.09,508.41z"/>
<path style="fill:#003D8D;" d="M223.25,509.92c-3.41-0.43-6.8-0.93-10.16-1.51c-8.14-1.37-16.15-3.12-24.01-5.25l-22.1-32.83
l18.67-49.95l-25.33-18.88l19.5-57.49h15.89L223.25,509.92z"/>
<path style="fill:#004EB1;" d="M412.6,416.29v42.23c-26.3,20.37-56.67,35.73-89.68,44.64c-7.86,2.13-15.87,3.88-24.01,5.25
l25.26-164.4h16.15c0.57,0,1.14,0.01,1.69,0.03h0.32c0.12,0,0.25,0,0.37,0.01c0.07,0,0.15,0,0.22,0.02c0.47,0,0.93,0.03,1.39,0.06
c0.39,0.01,0.77,0.04,1.14,0.06c0.05,0,0.1,0.01,0.15,0.01c0.22,0.02,0.45,0.03,0.66,0.06h0.1c0.69,0.05,1.36,0.12,2.03,0.21
c0.14,0,0.27,0.02,0.41,0.05c0.1,0,0.21,0.01,0.31,0.03c0.03,0,0.08,0,0.12,0.01c0.27,0.03,0.52,0.06,0.78,0.11
c0.12,0.01,0.22,0.03,0.33,0.04c0.09,0.02,0.16,0.02,0.24,0.04h0.03c0.68,0.09,1.36,0.2,2.03,0.32l0.16,0.03
c0.27,0.04,0.54,0.09,0.8,0.15c0.41,0.07,0.83,0.16,1.24,0.24c0.25,0.04,0.5,0.1,0.74,0.16c0.14,0.02,0.26,0.05,0.38,0.08
C388.27,352.93,412.6,381.91,412.6,416.29z"/>
<path style="fill:#002D6B;" d="M326.35,420.38l18.67,49.95l-22.1,32.83c-7.86,2.13-15.87,3.88-24.01,5.25
c-3.36,0.58-6.75,1.08-10.16,1.51l27.54-165.91h15.89l19.5,57.49L326.35,420.38z"/>
<path style="fill:#9A4C00;" d="M255.996,53c0,0-0.498-0.036-1.41-0.07c-0.001,0-0.003,0-0.004,0
c-0.02-0.001-0.044-0.001-0.065-0.002c-4.295-0.155-17.547-0.221-33.374,3.656c-21.062,1.401-48.241,0.088-71.477-13.583
c0,0,0.628,26.323,13.085,53.446c-10.867,17.187-17.615,41.1-15.9,74.377L150,221h14.333c0,0,0-17.25,0.833-33.333
c0.929-17.931,7.049-39.516,23.787-55.429C204.424,145.591,225.967,155,256,155c36.305,0,59.716-6.56,74.681-14.204
c11.027,14.586,15.374,31.987,16.145,46.871C347.66,203.75,347.66,221,347.66,221h14.333l3.149-50.177
C371.66,44.333,255.996,53,255.996,53z"/>
<path style="fill:#703700;" d="M365.14,170.82L361.99,221h-14.33c0,0,0-17.25-0.83-33.33c-0.77-14.89-5.12-32.29-16.15-46.87
C315.72,148.44,292.3,155,256,155V53C256,53,371.66,44.33,365.14,170.82z"/>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 7.6 KiB

+67
View File
@@ -0,0 +1,67 @@
Number.prototype.toFixedDown = function (digits) {
var re = new RegExp("(\\d+\\.\\d{" + digits + "})(\\d)");
var m = this.toString().match(re);
return m ? parseFloat(m[1]) : this.valueOf();
};
Number.prototype.truncate = function (digits) {
var num = this.valueOf().toFixedDown(digits);
num = num.toString();
var intero = String(num.split('.')[0]);
var fraction = String(num.split('.')[1]);
var padding = '';
if (isNaN(intero)) return '';
if (fraction == 'undefined') {
fraction = '';
padding = new Array(Math.max(digits - fraction.length, 0) + 1).join('0');
if (digits > 0) {
num += '.' + padding;
}
} else {
padding = new Array(Math.max(digits - fraction.length, 0) + 1).join('0');
num += padding;
}
return num;
};
//funzione per l'arrotondamento delle cifre decimali in eccesso dal 5
Number.prototype.toFixedExcess = function(precision){
precision = (parseInt(precision) == 0) ? 0:(parseInt(precision) || 2);
var num = this.valueOf();
var pow = Math.pow(10,precision);
return (Math.round( num * pow ) / pow).toFixed(precision);
};
//Funzione per arrotondare correttamente i numeri in modo da correggere l'errore delle somme e differenze
function myParseFloat(number){
//console.log("MyParseFloat-Old: "+number);
var newnumber = new Number(number+'').toFixed(12);
//console.log("MyParseFloat-New: "+newnumber);
return parseFloat(newnumber);
}
//Funzione che implementa il pad left di una stringa
Number.prototype.padLeft = function (n,str) {
return (this < 0 ? '-' : '') +
Array(n-String(Math.abs(this)).length+1)
.join(str||'0') +
(Math.abs(this));
};
const checkIfAddressIsInArea = (location, area) => {
if (google.maps.geometry.poly.containsLocation(location, area)){
return true;
} else {
return false;
}
}
const checkIfAddressIsInAreaLatLon = (lat, lon) => {
const location = new google.maps.LatLng(lat, lon);
if (google.maps.geometry.poly.containsLocation(location, area)){
return true;
} else {
return false;
}
}
+1000
View File
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,82 @@
'use strict';
function DashboardController($scope, Ordini, moment, toaster, AuthService, DateRangePickerService, $timeout, $window) {
$scope.dateRangeOptions = {
...defaultDateRangePickerOptions,
ranges: DateRangePickerService.getTrimestreCustomRangeOptions(),
autoApply: true
};
const stampaRapportoAdminUri = `${BASE_URL_SITE}/admin/index/stampareportattivita`;
$scope.loading = true;
$scope.DataConsegna = {startDate: moment().subtract(29, 'days'), endDate: moment()};
$scope.Periodo = '';
$scope.series = ['Ordini ' + $scope.Periodo, ''];
$scope.colors = ['#44ABF1', '#DDDDDD'];
$scope.labels = [];
$scope.data = [];
$scope.TotOrdiniPeriodo = 0;
$scope.graphOptions = {
legend: {display: false},
scales: {
yAxes: [
{
id: 'y-axis-1',
type: 'linear',
display: true,
position: 'left'
}
]
}
};
$scope.$watch('DataConsegna', (oldVal, newVal) => {
$scope.Periodo = 'Dal ' + newVal.startDate.format('DD/MM/YYYY') + ' al ' + newVal.endDate.format('DD/MM/YYYY');
$scope.refreshGraph();
});
$scope.refreshGraph = () => {
$scope.loading = true;
const per = $scope.DataConsegna.startDate.format('YYYY-MM-DD') + '|' + $scope.DataConsegna.endDate.format('YYYY-MM-DD');
Ordini.getGraphData(per).then((res) => {
$scope.labels = res.DatiGrafico.labels;
$scope.data = [res.DatiGrafico.data, []];
$scope.TotOrdiniPeriodo = res.TotOrdini;
}).catch((err) => {
toaster.error("Attenzione", "Errore durante il recupero dei dati del grafico");
}).finally(() => {
$timeout(() => {
$scope.loading = false
}, 300);
});
};
$scope.stampaRapporto = () => {
if (!$scope.DataConsegna) {
alert("Devi selezionare un periodo per la stampa rapporto");
return;
}
let periodo = $scope.DataConsegna.startDate.format('YYYY-MM-DD') + '|' + $scope.DataConsegna.endDate.format('YYYY-MM-DD');
/*if(!confirm(`Aprire la stampa report per il periodo scelto (${periodo}) ?`)){
return;
}*/
let url = `${stampaRapportoAdminUri}/p/${periodo}`;
$window.open(url, '_blank');
};
//$scope.refreshGraph();
}
app.controller('DashboardController', DashboardController);
+271
View File
@@ -0,0 +1,271 @@
angular.module('app')
.factory('SottoAree', function ($resource) {
const resource = $resource(basePath + 'sottoaree/:id', {id: '@id'}, {
update: {method: 'PUT'},
insert: {method: 'POST'},
getList: {
method: 'GET',
url: basePath + 'sottoaree',
transformResponse: function (result,headers) {
let res = {};
res.data = angular.fromJson(result);
res.headers = headers();
return res;
}
},
getByCodice: {
method: 'GET',
url: basePath + 'sottoaree/m/get-by-codice'
}
});
return {
get: function (success, error) {
return resource.query(success, error);
},
find: function (id) {
return resource.get({id: id}).$promise;
},
insert: function (data) {
return resource.insert(data).$promise;
},
update: function (data) {
return resource.update(data).$promise;
},
delete: function (id) {
return resource.delete({id: id}).$promise;
},
getList: function (data) {
return resource.getList(data).$promise;
},
getByCodice: function (codice) {
return resource.getByCodice({Codice: codice}).$promise;
}
};
})
.factory('Users', function ($resource) {
const resource = $resource(basePath + 'users/:id', {id: '@id'}, {
update: {method: 'PUT'},
insert: {method: 'POST'},
getUserData: {
method: 'GET',
url: basePath + 'users/m/get-user-info',
transformResponse: function (result,headers) {
let res = {};
res.data = angular.fromJson(result);
res.headers = headers();
return res;
}
},
getList: {
method: 'GET',
url: basePath + 'users',
transformResponse: function (result,headers) {
let res = {};
res.data = angular.fromJson(result);
res.headers = headers();
return res;
}
},
proponiCodiceUtente: {
method: 'GET',
url: basePath + 'users/m/get-codice'
},
caricaRidersMt: {
method: 'GET',
url: basePath + 'users/m/get-riders-mt',
transformResponse: function (result,headers) {
let res = {};
res.data = angular.fromJson(result);
res.headers = headers();
return res;
}
},
});
return {
get: function (success, error) {
return resource.query(success, error);
},
find: function (id) {
return resource.get({id: id}).$promise;
},
getByToken: function (token) {
return resource.getList({token: token}).$promise;
},
getUserData: function () {
return resource.getUserData().$promise;
},
insert: function (data) {
return resource.insert(data).$promise;
},
update: function (data) {
return resource.update(data).$promise;
},
delete: function (id) {
return resource.delete({id: id}).$promise;
},
getList: function (data) {
return resource.getList(data).$promise;
},
proponiCodiceUtente: function (role) {
return resource.proponiCodiceUtente({role: role}).$promise;
},
caricaRidersMt: function () {
return resource.caricaRidersMt().$promise;
}
};
})
.factory('FasceOrarie', function ($resource) {
const resource = $resource(basePath + 'fasceorarie/:id', {id: '@id'}, {
update: {method: 'PUT'},
insert: {method: 'POST'},
getList: {
method: 'GET',
url: basePath + 'fasceorarie',
transformResponse: function (result,headers) {
let res = {};
res.data = angular.fromJson(result);
res.headers = headers();
return res;
}
}
});
return {
get: function (success, error) {
return resource.query(success, error);
},
find: function (id) {
return resource.get({id: id}).$promise;
},
insert: function (data) {
return resource.insert(data).$promise;
},
update: function (data) {
return resource.update(data).$promise;
},
delete: function (id) {
return resource.delete({id: id}).$promise;
},
getList: function (data) {
return resource.getList(data).$promise;
}
};
})
.factory('TipologieAttivita', function ($resource) {
const resource = $resource(basePath + 'tipologieattivita/:id', {id: '@id'}, {
update: {method: 'PUT'},
insert: {method: 'POST'},
getList: {
method: 'GET',
url: basePath + 'tipologieattivita',
transformResponse: function (result,headers) {
let res = {};
res.data = angular.fromJson(result);
res.headers = headers();
return res;
}
}
});
return {
get: function (success, error) {
return resource.query(success, error);
},
find: function (id) {
return resource.get({id: id}).$promise;
},
insert: function (data) {
return resource.insert(data).$promise;
},
update: function (data) {
return resource.update(data).$promise;
},
delete: function (id) {
return resource.delete({id: id}).$promise;
},
getList: function (data) {
return resource.getList(data).$promise;
}
};
})
.factory('Ordini', function ($resource) {
const resource = $resource(basePath + 'ordini/:id', {id: '@id'}, {
update: {method: 'PUT'},
insert: {method: 'POST'},
getList: {
method: 'GET',
url: basePath + 'ordini',
transformResponse: function (result,headers) {
let res = {};
res.data = angular.fromJson(result);
res.headers = headers();
return res;
}
},
getOrdiniDaGestire: {
method: 'GET',
url: basePath + 'ordiniadmin',
transformResponse: function (result,headers) {
let res = {};
res.data = angular.fromJson(result);
res.headers = headers();
return res;
}
},
checkStatoOrdiniSync: {
method: 'GET',
url: basePath + 'ordiniadmin/m/check-ordini-sync',
},
setStatoOrdiniSync: {
method: 'GET',
url: basePath + 'ordiniadmin/m/set-ordini-sync',
},
resetMtDashboard: {
method: 'GET',
url: basePath + 'ordiniadmin/m/reset-mt-dashboard',
},
getGraphData: {
method: 'GET',
url: basePath + 'ordiniadmin/m/get-graph-data',
}
});
return {
get: function (success, error) {
return resource.query(success, error);
},
find: function (id) {
return resource.get({id: id}).$promise;
},
insert: function (data) {
return resource.insert(data).$promise;
},
update: function (data) {
return resource.update(data).$promise;
},
delete: function (id) {
return resource.delete({id: id}).$promise;
},
getList: function (data) {
return resource.getList(data).$promise;
},
getOrdiniDaGestire: function (data) {
return resource.getOrdiniDaGestire(data).$promise;
},
checkStatoOrdiniSync: function () {
return resource.checkStatoOrdiniSync().$promise;
},
setStatoOrdiniSync: function (stato) {
return resource.setStatoOrdiniSync({s: stato}).$promise;
},
resetMtDashboard: function () {
return resource.resetMtDashboard().$promise;
},
getGraphData: function (periodo) {
return resource.getGraphData({p: periodo}).$promise;
}
};
});
+565
View File
@@ -0,0 +1,565 @@
'use strict';
/******************** PARAMETRI ******************************/
const BASE_URL_SITE = $('link[rel="canonical"]').attr('href');
var modal_id = '#modal';
var form_id = '#' + $(modal_id).attr('data-form');
var form = $(form_id);
var filter_modal_id = '#filterModal';
var filter_form_id = '#' + $(filter_modal_id).attr('data-form');
var filter_form = $(filter_form_id);
var modalLoader = $('#modal-loader');
/*********************************************************************************/
/**** FUNZIONI GLOBALI PERSONALIZZATE ***/
const defaultDatePickerOptions = {
language: 'it',
format: "dd/mm/yyyy",
autoclose: true
};
const defaultDateRangePickerOptions = {
autoApply: false,
autoUpdateInput: false,
linkedCalendars: false,
showCustomRangeLabel: false,
locale: {
"format": "DD/MM/YYYY",
"separator": " | ",
"applyLabel": "Ok",
"cancelLabel": "Reset",
"fromLabel": "Da",
"toLabel": "A",
"customRangeLabel": "Custom",
"weekLabel": "W",
"daysOfWeek": [
"Dom",
"Lun",
"Mar",
"Mer",
"Gio",
"Ven",
"Sab"
],
"monthNames": [
"Gennaio",
"Febbraio",
"Marzo",
"Aprile",
"Maggio",
"Giugno",
"Luglio",
"Agosto",
"Settembre",
"Ottobre",
"Novembre",
"Dicembre"
],
"firstDay": 1
},
alwaysShowCalendars: true,
ranges: {
'Oggi': [moment(), moment()],
'Ieri': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
'Ultimi 7 gg': [moment().subtract(6, 'days'), moment()],
'Ultimi 30 gg': [moment().subtract(29, 'days'), moment()],
'Questo Mese': [moment().startOf('month'), moment().endOf('month')],
'Mese Scorso': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
}
};
let $table;
String.prototype.capitalize = function () {
return this.charAt(0).toUpperCase() + this.slice(1)
}
$('a[href="#"]').click(function (event) {
event.preventDefault();
});
$('a[data-widget="pushmenu"]').click(function () {
let collapsed = ($('body').hasClass('sidebar-collapse')) ? 0 : 1;
$.cookie('ui_sidebar_collapsed', collapsed, {path: '/'});
if (collapsed) {
$table.trigger('reflow');
}
});
/****************************************
************* SEZIONE FORM *************
***************************************/
function populateForm(data, frm) {
$.each(data, function (key, value) {
var $ctrl = $('[name=' + key + ']', frm);
if ($ctrl.is('select')) {
$("option", $ctrl).each(function () {
if (this.value == value) {
this.selected = true;
}
});
} else {
switch ($ctrl.attr("type")) {
case "text":
case "hidden":
case "number":
$ctrl.val(value);
break;
case "textarea":
$ctrl.val(value);
break;
case "radio":
case "checkbox":
$ctrl.each(function () {
if ($(this).attr('id') == key && value == '1') {
$(this).iCheck('check');
}
});
break;
default:
$ctrl.val(value);
break;
}
}
});
$('input.datepicker').datepicker('update');
}
function resetForm(tipo, form_id) {
$(form_id + ' #ErrorDescription').html('').addClass('d-none');
$(form_id + ' div.form-group').removeClass('has-error');
$(form_id + ' div.multi-line-field-label-error').removeClass('has-error');
$(form_id + ' div.label-danger').addClass('d-none').html('');
if (tipo != 'errors') {
$(form_id).clearForm();
}
}
function getErrorHtml(formErrors, noBr) {
if ((typeof (formErrors) === 'undefined') || (formErrors.length < 1)) return;
noBr = (typeof (noBr) === 'undefined') ? false : noBr;
var out = '';
let brtxt = (noBr) ? '' : '<br>';
for (let errorKey in formErrors) {
out += (formErrors[errorKey] + brtxt);
}
return out;
}
function showErrors(form_id, resp) {
resetForm('errors', form_id);
//$(form_id + ' #ErrorDescription').html(resp.message).removeClass('d-none');
toastr.error(resp.message);
for (let key in resp.errors) {
let errBlock = $(form_id + ' div#' + key);
let labelBlock = $(form_id + ' div#' + key + ' .label-danger');
errBlock.addClass('has-error');
if (labelBlock.length === 0) {
labelBlock = errBlock.parent().children(' .label-danger');
labelBlock.html(labelBlock.html() + ' | ' + getErrorHtml(resp.errors[key], true));
labelBlock.removeClass('d-none');
} else {
labelBlock.html(getErrorHtml(resp.errors[key])).removeClass('d-none');
}
}
}
function initDatePicker() {
$('.datepicker').datepicker(defaultDatePickerOptions);
}
function initDateRangePicker(customRange) {
let dateRangePickerOptions = defaultDateRangePickerOptions;
if (customRange) {
dateRangePickerOptions.ranges = customRange;
}
$('input[daterangepicker]').daterangepicker(dateRangePickerOptions);
$('input[daterangepicker]').on('apply.daterangepicker', function (ev, picker) {
$(this).val(picker.startDate.format('DD/MM/YYYY') + ' | ' + picker.endDate.format('DD/MM/YYYY'));
});
$('input[daterangepicker]').on('cancel.daterangepicker', function (ev, picker) {
$(this).val('');
});
}
function initSwitchButton() {
//Abilita gli swithc button
$("input[data-bootstrap-switch]").each(function () {
$(this).bootstrapSwitch('state', $(this).prop('checked'));
});
}
function initICheck() {
var tableBody = $('#tablebody');
$('#select_all').click(function (link) {
link.preventDefault();
tableBody.find(':checkbox').iCheck('check');
});
$('#deselect_all').click(function (link) {
link.preventDefault();
tableBody.find(':checkbox').iCheck('uncheck');
});
$('#invert_all').click(function (link) {
link.preventDefault();
tableBody.find(':checkbox').iCheck('toggle');
});
}
function initTooltip() {
$('[data-toggle="tooltip"]').tooltip();
}
function initPopover() {
$('[data-toggle="popover"]').popover();
}
function initSummernote() {
$('.summernote').summernote({
dialogsInBody: true
});
}
function initSelect2(){
$('select[select2]').select2();
}
/*function initFontIconPicker(options){
$('[font-icon-picker]').fontIconPicker(options);
}*/
function refreshFormComponents() {
$("input[type='checkbox'], input[type='radio']").not(".no-icheck").iCheck({
checkboxClass: 'icheckbox_square-blue',
radioClass: 'iradio_square-blue'
});
initTooltip();
initPopover();
}
function initFormComponents() {
refreshFormComponents();
initICheck();
initSwitchButton();
initDatePicker();
initDateRangePicker();
}
$(document).ready(() => {
setOrderThValue();
fixHeghtOfTableList();
}).delegate('a[href="#"]', 'click', function (link) {
link.preventDefault();
})
.delegate('#filterData', 'click', function (link) {
link.preventDefault();
$(filter_modal_id).modal('show');
})
.delegate('#filtra', 'click', function (link) {
link.preventDefault();
filter_form.submit();
})
.delegate('#resetFiltri', 'click', function (link) {
link.preventDefault();
filter_form.clearForm();
filter_form.find('select').val('');
})
.delegate('th[data-ord]', 'click', function (link) {
link.preventDefault();
const ordVal = $(this).attr('data-ord');
const tipoOrderEl = $('#tipoOrder');
const tipoOrder = (tipoOrderEl.val() === 'ASC') ? 'DESC' : 'ASC';
$('#order').val(ordVal);
tipoOrderEl.val(tipoOrder);
$('#searchForm').submit();
})
.delegate('select[data-refresh-search-form]', 'change', function (link) {
link.preventDefault();
$('#searchForm').submit();
})
/*******************************************
************* SEZIONE TABELLA *************
******************************************/
function setOrderThValue() {
const ordVal = $('#order').val();
const tipoOrd = $('#tipoOrder').val();
$('th[data-ord]').find('i').remove();
const thOrd = $('th[data-ord="' + ordVal + '"]');
const icon = (tipoOrd === 'ASC') ? 'fa-chevron-up' : 'fa-chevron-down';
const iconText = `<i class="fas ${icon}"></i>`;
thOrd.find('i').remove();
const thText = thOrd.html() + ' ' + iconText;
thOrd.html(thText);
}
function initTableFlotHeader() {
//Abilito l'header fisso
$table = $('.table.flot-header');
$table.floatThead({
autoReflow: true,
scrollContainer: function ($table) {
return $table.closest('.table-wrapper');
},
responsiveContainer: function ($table) {
return $table.closest('.table-responsive');
}
});
//Imposta l'altezza del table-wrapper
fixHeghtOfTableList();
}
function refreshTable() {
if ($table) {
fixHeghtOfTableList();
}
}
function fixHeghtOfTableList() {
let windowHeight = $(window).height();
let navbarHeight = $(".navbar").outerHeight() || 0;
let footerHeight = $(".main-footer").outerHeight() || 0;
let contentHeaderHeight = $(".content-header").outerHeight() || 0;
let boxHeaderHeight = $(".box-header").outerHeight() || 0;
let boxFooterHeight = $(".box-footer").outerHeight() || 0;
let tableWrapperHeight = windowHeight - (navbarHeight + footerHeight + contentHeaderHeight + boxHeaderHeight + boxFooterHeight + 15);
$('.table-wrapper').css("height", tableWrapperHeight + "px");
let theadHeight = $('.table-wrapper thead').outerHeight() + 1;
const totHeight = tableWrapperHeight - theadHeight;
$('td.no-rows').css("height", (totHeight) + "px");
}
$(window).resize(function () {
fixHeghtOfTableList();
$table.trigger('reflow');
});
/**************************************************
************* FUNZIONI SPECIALIZZATE *************
*************************************************/
function password_generator(len) {
let length = (len) ? (len) : (10);
let string = "abcdefghijklmnopqrstuvwxyz"; //to upper
let numeric = '0123456789';
let punctuation = '!@#$%^&*()_+~`|}{[]\:;?><,./-=';
let password = "";
let character = "";
let crunch = true;
while (password.length < length) {
let entity1 = Math.ceil(string.length * Math.random() * Math.random());
let entity2 = Math.ceil(numeric.length * Math.random() * Math.random());
let entity3 = Math.ceil(punctuation.length * Math.random() * Math.random());
let hold = string.charAt(entity1);
hold = (entity1 % 2 == 0) ? (hold.toUpperCase()) : (hold);
character += hold;
character += numeric.charAt(entity2);
character += punctuation.charAt(entity3);
password = character;
}
return password;
}
function copyToClipboard(elem) {
// create hidden text element, if it doesn't already exist
var targetId = "_hiddenCopyText_";
var isInput = elem.tagName === "INPUT" || elem.tagName === "TEXTAREA";
var origSelectionStart, origSelectionEnd;
if (isInput) {
// can just use the original source element for the selection and copy
target = elem;
origSelectionStart = elem.selectionStart;
origSelectionEnd = elem.selectionEnd;
} else {
// must use a temporary form element for the selection and copy
target = document.getElementById(targetId);
if (!target) {
var target = document.createElement("textarea");
target.style.position = "absolute";
target.style.left = "-9999px";
target.style.top = "0";
target.id = targetId;
document.body.appendChild(target);
}
target.textContent = elem.textContent;
}
// select the content
var currentFocus = document.activeElement;
target.focus();
target.setSelectionRange(0, target.value.length);
// copy the selection
var succeed;
try {
succeed = document.execCommand("copy");
} catch (e) {
succeed = false;
}
// restore original focus
if (currentFocus && typeof currentFocus.focus === "function") {
currentFocus.focus();
}
if (isInput) {
// restore prior selection
elem.setSelectionRange(origSelectionStart, origSelectionEnd);
} else {
// clear temporary content
target.textContent = "";
}
return succeed;
}
/**
* Questa funzione passato un template html ne sostituisce i parametri
* @param template
* @param params
*/
function prepareHTMLWithParams(template, params) {
if (params instanceof Array) {
params.forEach(function (val, key) {
template = template.replace(new RegExp('%' + key + '%', 'g'), val);
});
} else if (params instanceof Object) {
Object.keys(params).forEach(function (key) {
template = template.replace(new RegExp('%' + key + '%', 'g'), params[key]);
});
}
return template;
}
/************************************************************************************
************* SEZIONE FUNZIONI GENRICHE PER LA GESTIONE DELLE IMMAGINI *************
************************************************************************************/
/**
* Questa funzione carica l'immagine nel box anteprima
* @param basePathImage
* @param nomeVaribileFile
* @param valFile
*/
function popolaImmagine(basePathImage, nomeVaribileFile, valFile, custom_class) {
if (custom_class === undefined) {
custom_class = 'img-fluid img-thumbnail';
}
if (valFile) {
$('#preview_block_' + nomeVaribileFile).addClass(custom_class).attr('src', basePathImage + valFile);
$('#image-preview-filename-' + nomeVaribileFile).val(valFile);
$("#image-preview-input-title-" + nomeVaribileFile).text("Cambia");
$("#image-preview-clear-" + nomeVaribileFile).show();
}
}
/**
* Questa funzione resetta il blocco immagine in base al parametro nome File che riceve
* @param nomeVariabileFile
* @param baseImagePath
*/
function resetImageInput(nomeVariabileFile, baseImagePath) {
// $('#preview_block_' + nomeVariabileFile).attr('src', baseImagePath + 'noimage.jpg');
$('#preview_block_' + nomeVariabileFile).attr('src', baseImagePath + 'no_img.png');
$('#image-preview-filename-' + nomeVariabileFile).val('');
$('#image-preview-clear-' + nomeVariabileFile).hide();
$('#image-preview-input-title-' + nomeVariabileFile).html('Carica ...');
var input_file = $('input#image_' + nomeVariabileFile);
input_file.replaceWith(input_file.val('').clone(true));
}
/**
* Questa funzione definisce gli event handler per il nome immagine che riceve in entrata
*
* @param nome_immagine
* @param base_image_path
* @param custom_class [default value: img-fluid img-thumbnail']
* @param custom_style [default value: '']
*
* '?' sta a indicare la Varibile NomeFile che si passa, dovrebbe corrispondere al nome del campo immagine
* image-preview-clear-? = Identificativo del pulsante "Cancella"
* image-preview-input-title-? = Identifica il testo del pusante "Scegli..." o "Cambia"
* image-preview-input-? = Identificativo del input di tipo FILE dove andra dell'immagine
* image-preview-filename-? = Identificativo dell'input che contiene il nome del file immagine caricato
* image_preview_block_? = Identificativo del blocco che contiene l'html con il tag <IMG>
* preview_block_? = Identificatico dell'elemento immagine per visualizzare l'anteprima
*/
function defineEventHandlerForImageBlock(nome_immagine, base_image_path, custom_class, custom_style) {
if (custom_class === undefined) {
custom_class = 'img-fluid img-thumbnail';
}
if (custom_style === undefined) {
custom_style = '';
}
//Evento click pulsante cancella
$('#image-preview-clear-' + nome_immagine).click(function () {
resetImageInput(nome_immagine, base_image_path);
});
//Evento che al caricamento dell'immgaine ne crea il blocco anteprima
$("#image-preview-input-" + nome_immagine + " input:file").change(function () {
let img = $('<img/>', {
id: 'preview_block_' + nome_immagine,
class: custom_class,
style: custom_style
});
let nome_file_1 = this.files[0];
let reader_file_1 = new FileReader();
// Set preview image into the popover data-content
reader_file_1.onload = function (e) {
$("#image-preview-input-title-" + nome_immagine).text("Cambia");
$("#image-preview-clear-" + nome_immagine).show();
$("#image-preview-filename-" + nome_immagine).val(nome_file_1.name);
img.attr('src', e.target.result);
$("#image_preview_block_" + nome_immagine).html($(img)[0].outerHTML);
};
reader_file_1.readAsDataURL(nome_file_1);
});
}
@@ -0,0 +1,3 @@
$('document').ready(function () {
});
@@ -0,0 +1,177 @@
'use strict';
function beforeSubmit() {
modalLoader.removeClass('d-none').addClass('d-flex');
}
function errorOnSubmit() {
modalLoader.removeClass('d-flex').addClass('d-none');
}
function afterSubmit(resp) {
if (resp.success === 'invalid') {
showErrors(form_id, resp);
} else if (resp.success === true) {
let id;
let mex = '';
if (resp.op === 'insert') {
$('#tablebody').prepend(resp.text);
$('input#id').val(resp.data.id);
mex = 'Inserimento effettuato con successo';
id = resp.data.id;
} else {
$('tr[data-id=' + resp.id + ']').replaceWith(resp.text);
mex = 'Modifca effettuata con successo';
id = resp.id;
}
refreshFormComponents();
$('#norows').remove();
$(modal_id).modal('hide');
$('#save').attr('op', 'insert');
myResetForm('', form_id);
toastr.success(mex);
} else {
toastr.error(resp.shortMessage);
console.error(resp.message);
}
modalLoader.removeClass('d-flex').addClass('d-none');
}
//Specializzo la funzione resetForm nel caso ci sia bisogno di campi TEXTAREA o immagini da resettare
function myResetForm(tipo, formid) {
resetForm(tipo, formid);
}
function edit(id) {
$('#save').attr('op', 'edit');
var dati = 'id=' + id;
var url = $(form_id).attr('data-get');
myResetForm('all', form_id);
$.getJSON(url, dati, function (resp) {
if (resp.success) {
populateForm(resp, form);
$(modal_id).modal('show');
} else {
toastr.error(resp.message);
}
});
}
$(document).ready(function () {
initFormComponents();
initTableFlotHeader();
})
.delegate('#new', 'click', function (link) {
link.preventDefault();
myResetForm('tutto', form_id);
$('#save').attr('op', 'insert');
$(modal_id).modal('show');
})
.delegate('#save', 'click', function (link) {
link.preventDefault();
var operation = $(this).attr('op');
var options = {
target: '#ErrorDescription',
beforeSubmit: beforeSubmit,
success: afterSubmit,
error: errorOnSubmit,
data: {
op: operation
},
dataType: 'json',
resetForm: false
};
$(form_id).ajaxSubmit(options);
})
.delegate('#edit,#editLink', 'click', function (link) {
link.preventDefault();
const id = $(this).parents('tr').attr('data-id');
edit(id);
})
.delegate('#delete', 'click', function (link) {
link.preventDefault();
const url = $(form_id).attr('data-delete');
let tr = $(this).parents('tr');
const cod = tr.attr('data-cod');
let id = tr.attr('data-id');
let message = 'Sei sicuro di voler eliminare definitivamente l\'elemento?';
if (confirm(message)) {
$.ajax({
type: 'POST',
url: url,
data: 'id=' + id + "&cod=" + cod,
dataType: 'json',
complete: function (resp) {
resp = jQuery.parseJSON(resp.responseText);
if (resp.success) {
tr.animate({
'opacity': 'hide'
}, 500, function () {
tr.remove();
});
toastr.success('Eliminazione effettuata con successo');
} else {
toastr.error(resp.message);
}
}
});
}
})
.delegate('#delete_select', 'click', function (link) {
link.preventDefault();
let message = 'Sei sicuro di voler eliminare definitivamente gli elementi selezionati?';
if (confirm(message)) {
let data = [];
$('#tablebody').find(':checkbox').each(function () {
if (this.checked) {
data.push($(this).val());
}
});
let url = $(this).attr('href');
$.ajax({
type: 'POST',
url: url,
data: {
data: data
},
dataType: 'json',
complete: function (resp) {
resp = jQuery.parseJSON(resp.responseText);
if (resp.success) {
var ids = resp.id;
for (var i = 0; i < ids.length; i++) {
var tr = $('#tablebody tr[data-id=' + ids[i] + ']');
tr.animate({
'opacity': 'hide'
}, 500, function () {
tr.remove();
});
}
} else {
toastr.error(resp.message);
}
$('#tablebody').find(':checkbox').iCheck('uncheck');
}
});
}
})
.delegate(modal_id,'hidden.bs.modal',function(link){
link.preventDefault();
myResetForm('tutto', form_id);
$('#save').attr('op', 'insert');
});
@@ -0,0 +1,181 @@
'use strict';
function beforeSubmit() {
modalLoader.removeClass('d-none').addClass('d-flex');
}
function errorOnSubmit() {
modalLoader.removeClass('d-flex').addClass('d-none');
}
function afterSubmit(resp) {
if (resp.success === 'invalid') {
showErrors(form_id, resp);
} else if (resp.success === true) {
let id;
let mex = '';
if (resp.op === 'insert') {
$('#tablebody').prepend(resp.text);
$('input#id').val(resp.data.id);
mex = 'Inserimento effettuato con successo';
id = resp.data.id;
} else {
$('tr[data-id=' + resp.id + ']').replaceWith(resp.text);
mex = 'Modifca effettuata con successo';
id = resp.id;
}
refreshFormComponents();
$('#norows').remove();
$(modal_id).modal('hide');
$('#save').attr('op', 'insert');
myResetForm('', form_id);
toastr.success(mex);
} else {
toastr.error(resp.shortMessage);
console.error(resp.message);
}
modalLoader.removeClass('d-flex').addClass('d-none');
}
//Specializzo la funzione resetForm nel caso ci sia bisogno di campi TEXTAREA o immagini da resettare
function myResetForm(tipo, formid) {
resetForm(tipo, formid);
$('textarea#Testo').summernote('code', '');
}
function edit(id) {
$('#save').attr('op', 'edit');
var dati = 'id=' + id;
var url = $(form_id).attr('data-get');
myResetForm('all', form_id);
$.getJSON(url, dati, function (resp) {
if (resp.success) {
populateForm(resp, form);
$('textarea#Testo').summernote('code', resp.Testo);
$(modal_id).modal('show');
} else {
toastr.error(resp.message);
}
});
}
$(document).ready(function () {
initFormComponents();
initTableFlotHeader();
initSummernote();
})
.delegate('#new', 'click', function (link) {
link.preventDefault();
myResetForm('tutto', form_id);
$('#save').attr('op', 'insert');
$(modal_id).modal('show');
})
.delegate('#save', 'click', function (link) {
link.preventDefault();
var operation = $(this).attr('op');
var options = {
target: '#ErrorDescription',
beforeSubmit: beforeSubmit,
success: afterSubmit,
error: errorOnSubmit,
data: {
op: operation
},
dataType: 'json',
resetForm: false
};
$(form_id).ajaxSubmit(options);
})
.delegate('#edit,#editLink', 'click', function (link) {
link.preventDefault();
const id = $(this).parents('tr').attr('data-id');
edit(id);
})
.delegate('#delete', 'click', function (link) {
link.preventDefault();
const url = $(form_id).attr('data-delete');
let tr = $(this).parents('tr');
const cod = tr.attr('data-cod');
let id = tr.attr('data-id');
let message = 'Sei sicuro di voler eliminare definitivamente l\'elemento?';
if (confirm(message)) {
$.ajax({
type: 'POST',
url: url,
data: 'id=' + id + "&cod=" + cod,
dataType: 'json',
complete: function (resp) {
resp = jQuery.parseJSON(resp.responseText);
if (resp.success) {
tr.animate({
'opacity': 'hide'
}, 500, function () {
tr.remove();
});
toastr.success('Eliminazione effettuata con successo');
} else {
toastr.error(resp.message);
}
}
});
}
})
.delegate('#delete_select', 'click', function (link) {
link.preventDefault();
let message = 'Sei sicuro di voler eliminare definitivamente gli elementi selezionati?';
if (confirm(message)) {
let data = [];
$('#tablebody').find(':checkbox').each(function () {
if (this.checked) {
data.push($(this).val());
}
});
let url = $(this).attr('href');
$.ajax({
type: 'POST',
url: url,
data: {
data: data
},
dataType: 'json',
complete: function (resp) {
resp = jQuery.parseJSON(resp.responseText);
if (resp.success) {
var ids = resp.id;
for (var i = 0; i < ids.length; i++) {
var tr = $('#tablebody tr[data-id=' + ids[i] + ']');
tr.animate({
'opacity': 'hide'
}, 500, function () {
tr.remove();
});
}
} else {
toastr.error(resp.message);
}
$('#tablebody').find(':checkbox').iCheck('uncheck');
}
});
}
})
.delegate(modal_id,'hidden.bs.modal',function(link){
link.preventDefault();
myResetForm('tutto', form_id);
$('#save').attr('op', 'insert');
});
@@ -0,0 +1,97 @@
'use strict';
function resetForm(tipo) {
$('#Error_Description').html('').addClass('hidden');
$('.input-group').removeClass('has-error');
$('.form-control').removeClass('no-border');
$('.error-icon').addClass('hidden');
$('.label-error').addClass('hidden').html('');
if (tipo != 'errors') {
$('.form-control').val('');
}
}
function beforeSubmit() {
}
function errorOnSubmit() {
$('#modal-loader').addClass('hidden');
}
function afterSubmit(resp) {
$('.has-error').removeClass('has-error');
$.each(resp, function (index, val) {
if (val == 'OK') $('#' + index).addClass('has-success');
else $('#' + index).addClass('has-error');
});
toastr.success('Parametri di configurazione aggiornati con successo.');
}
$(document).ready(function () {
initDatePicker();
initTooltip();
initPopover();
initSwitchButton();
var options = {
target: '#Error_Description',
beforeSubmit: beforeSubmit,
error: errorOnSubmit,
success: afterSubmit,
dataType: 'json',
resetForm: false
};
$('a.setting-tab').click(function () {
var tabname = $(this).attr('href');
tabname = tabname.replace('#', '');
$.cookie('settings_tabname', tabname);
});
$(".btn-save").click(function (link) {
link.preventDefault();
const formID = $('.tab-pane.active').attr('id').capitalize();
const form = $('form#settings' + formID);
form.ajaxSubmit(options);
return false;
});
$('#btn-new-passoword').click(function (e) {
e.preventDefault();
var form = $('#password_form');
form.ajaxSubmit({
target: '#Error_Description',
success: function (resp) {
if (!resp.status) {
toastr.warning(" " + resp.message);
if (resp.resetForm) {
$('[form="password_form"]').val('');
}
} else {
$('[form="password_form"]').val('');
toastr.warning(" La password è stata reimpostata correttamente");
}
},
dataType: 'json',
resetForm: false
});
return false;
});
$("#BtnGeneraPassword").click(function (event) {
event.preventDefault();
$("#superPwd").val(password_generator(20));
});
$("#BtnCopyToClipboard").click(function (event) {
event.preventDefault();
$('#superPwd').attr('type', 'text');
copyToClipboard($('#superPwd')[0]);
$('#superPwd').attr('type', 'password');
});
});
@@ -0,0 +1,7 @@
$(function () {
$('input').iCheck({
checkboxClass: 'icheckbox_square-blue',
radioClass: 'iradio_square-blue',
increaseArea: '20%' // optional
});
});
@@ -0,0 +1,177 @@
'use strict';
function beforeSubmit() {
modalLoader.removeClass('d-none').addClass('d-flex');
}
function errorOnSubmit() {
modalLoader.removeClass('d-flex').addClass('d-none');
}
function afterSubmit(resp) {
if (resp.success === 'invalid') {
showErrors(form_id, resp);
} else if (resp.success === true) {
let id;
let mex = '';
if (resp.op === 'insert') {
$('#tablebody').prepend(resp.text);
$('input#id').val(resp.data.id);
mex = 'Inserimento effettuato con successo';
id = resp.data.id;
} else {
$('tr[data-id=' + resp.id + ']').replaceWith(resp.text);
mex = 'Modifca effettuata con successo';
id = resp.id;
}
refreshFormComponents();
$('#norows').remove();
$(modal_id).modal('hide');
$('#save').attr('op', 'insert');
myResetForm('', form_id);
toastr.success(mex);
} else {
toastr.error(resp.shortMessage);
console.error(resp.message);
}
modalLoader.removeClass('d-flex').addClass('d-none');
}
//Specializzo la funzione resetForm nel caso ci sia bisogno di campi TEXTAREA o immagini da resettare
function myResetForm(tipo, formid) {
resetForm(tipo, formid);
}
function edit(id) {
$('#save').attr('op', 'edit');
let dati = 'id=' + id;
let url = $(form_id).attr('data-get');
myResetForm('all', form_id);
$.getJSON(url, dati, function (resp) {
if (resp.success) {
populateForm(resp, form);
$(modal_id).modal('show');
} else {
toastr.error(resp.message);
}
});
}
$(document).ready(function () {
initFormComponents();
initTableFlotHeader();
})
.delegate('#new', 'click', function (link) {
link.preventDefault();
myResetForm('tutto', form_id);
$('#save').attr('op', 'insert');
$(modal_id).modal('show');
})
.delegate('#save', 'click', function (link) {
link.preventDefault();
let operation = $(this).attr('op');
let options = {
target: '#ErrorDescription',
beforeSubmit: beforeSubmit,
success: afterSubmit,
error: errorOnSubmit,
data: {
op: operation
},
dataType: 'json',
resetForm: false
};
$(form_id).ajaxSubmit(options);
})
.delegate('#edit,#editLink', 'click', function (link) {
link.preventDefault();
const id = $(this).parents('tr').attr('data-id');
edit(id);
})
.delegate('#delete', 'click', function (link) {
link.preventDefault();
const url = $(form_id).attr('data-delete');
let tr = $(this).parents('tr');
const cod = tr.attr('data-cod');
let id = tr.attr('data-id');
let message = 'Sei sicuro di voler eliminare definitivamente l\'elemento?';
if (confirm(message)) {
$.ajax({
type: 'POST',
url: url,
data: 'id=' + id + "&cod=" + cod,
dataType: 'json',
complete: function (resp) {
resp = jQuery.parseJSON(resp.responseText);
if (resp.success) {
tr.animate({
'opacity': 'hide'
}, 500, function () {
tr.remove();
});
toastr.success('Eliminazione effettuata con successo');
} else {
toastr.error(resp.message);
}
}
});
}
})
.delegate('#delete_select', 'click', function (link) {
link.preventDefault();
let message = 'Sei sicuro di voler eliminare definitivamente gli elementi selezionati?';
if (confirm(message)) {
let data = [];
$('#tablebody').find(':checkbox').each(function () {
if (this.checked) {
data.push($(this).val());
}
});
let url = $(this).attr('href');
$.ajax({
type: 'POST',
url: url,
data: {
data: data
},
dataType: 'json',
complete: function (resp) {
resp = jQuery.parseJSON(resp.responseText);
if (resp.success) {
var ids = resp.id;
for (var i = 0; i < ids.length; i++) {
var tr = $('#tablebody tr[data-id=' + ids[i] + ']');
tr.animate({
'opacity': 'hide'
}, 500, function () {
tr.remove();
});
}
} else {
toastr.error(resp.message);
}
$('#tablebody').find(':checkbox').iCheck('uncheck');
}
});
}
})
.delegate(modal_id,'hidden.bs.modal',function(link){
link.preventDefault();
myResetForm('tutto', form_id);
$('#save').attr('op', 'insert');
});
@@ -0,0 +1,316 @@
'use strict';
function beforeSubmit() {
modalLoader.removeClass('d-none').addClass('d-flex');
}
function errorOnSubmit() {
modalLoader.removeClass('d-flex').addClass('d-none');
}
function afterSubmit(resp) {
if (resp.success === 'invalid') {
showErrors(form_id, resp);
} else if (resp.success === true) {
let id;
let mex = '';
if (resp.op === 'insert') {
$('#tablebody').prepend(resp.text);
$('input#id').val(resp.data.id);
mex = 'Inserimento effettuato con successo';
id = resp.data.id;
} else {
$('tr[data-id=' + resp.id + ']').replaceWith(resp.text);
mex = 'Modifca effettuata con successo';
id = resp.id;
}
refreshFormComponents();
$('#norows').remove();
$(modal_id).modal('hide');
$('#save').attr('op', 'insert');
myResetForm('', form_id);
toastr.success(mex);
} else {
toastr.error(resp.shortMessage);
console.error(resp.message);
}
modalLoader.removeClass('d-flex').addClass('d-none');
}
//Specializzo la funzione resetForm nel caso ci sia bisogno di campi TEXTAREA o immagini da resettare
function myResetForm(tipo, formid) {
resetForm(tipo, formid);
}
function edit(id) {
$('#save').attr('op', 'edit');
let dati = 'id=' + id;
let url = $(form_id).attr('data-get');
myResetForm('all', form_id);
$.getJSON(url, dati, function (resp) {
if (resp.success) {
$('#main_contenitor').html(resp.text);
$(modal_id).modal('show');
} else {
toastr.error(resp.message);
}
});
}
$(document).ready(function () {
initFormComponents();
initTableFlotHeader();
})
.delegate('#new', 'click', function (link) {
link.preventDefault();
myResetForm('tutto', form_id);
$('#save').attr('op', 'insert');
$(modal_id).modal('show');
})
.delegate('#save', 'click', function (link) {
link.preventDefault();
var operation = $(this).attr('op');
var options = {
target: '#ErrorDescription',
beforeSubmit: beforeSubmit,
success: afterSubmit,
error: errorOnSubmit,
data: {
op: operation
},
dataType: 'json',
resetForm: false
};
$(form_id).ajaxSubmit(options);
})
.delegate('#edit,#editLink', 'click', function (link) {
link.preventDefault();
const id = $(this).parents('tr').attr('data-id');
edit(id);
})
.delegate('#delete', 'click', function (link) {
link.preventDefault();
const url = $(form_id).attr('data-delete');
let tr = $(this).parents('tr');
const cod = tr.attr('data-cod');
let id = tr.attr('data-id');
let message = 'Sei sicuro di voler eliminare definitivamente l\'elemento?';
if (confirm(message)) {
$.ajax({
type: 'POST',
url: url,
data: 'id=' + id + "&cod=" + cod,
dataType: 'json',
complete: function (resp) {
resp = jQuery.parseJSON(resp.responseText);
if (resp.success) {
tr.animate({
'opacity': 'hide'
}, 500, function () {
tr.remove();
});
toastr.success('Eliminazione effettuata con successo');
} else {
toastr.error(resp.message);
}
}
});
}
})
.delegate('#delete_select', 'click', function (link) {
link.preventDefault();
let message = 'Sei sicuro di voler eliminare definitivamente gli elementi selezionati?';
if (confirm(message)) {
let data = [];
$('#tablebody').find(':checkbox').each(function () {
if (this.checked) {
data.push($(this).val());
}
});
let url = $(this).attr('href');
$.ajax({
type: 'POST',
url: url,
data: {
data: data
},
dataType: 'json',
complete: function (resp) {
resp = jQuery.parseJSON(resp.responseText);
if (resp.success) {
var ids = resp.id;
for (var i = 0; i < ids.length; i++) {
var tr = $('#tablebody tr[data-id=' + ids[i] + ']');
tr.animate({
'opacity': 'hide'
}, 500, function () {
tr.remove();
});
}
} else {
toastr.error(resp.message);
}
$('#tablebody').find(':checkbox').iCheck('uncheck');
}
});
}
})
.delegate('select#state', 'change', function (link) {
link.preventDefault();
$('select#state').val($(this).val());
$('#searchForm').submit();
})
.delegate('#set-state','click',function (link) {
link.preventDefault();
var url = $(this).attr('data-url');
var tr = $(this).parents('tr');
var state = $(this).attr('data-state');
var id = tr.attr('data-id');
var message = 'Sei sicuro di voler modificare lo stato dell\'elemento?';
if (confirm(message)) {
$.ajax({
type: 'POST',
url: url,
data: 'id=' + id +'&state=' + state,
dataType: 'json',
complete: function (resp) {
resp = jQuery.parseJSON(resp.responseText);
if (resp.success) {
tr.replaceWith(resp.text);
refreshFormComponents();
} else {
alert(resp.message);
}
}
});
} else {
return;
}
})
.delegate('#setstate_select', 'click', function (link) {
link.preventDefault();
var url = $(this).attr('href');
var stateNum = null;
var data = [];
$('#tablebody').find(':checkbox').each(function () {
if (this.checked) {
data.push($(this).val());
}
});
if(data.length <= 0){
alert("Nessun elemento selezioanto");
return;
}
function confirmChoice() {
var val = $('select#selectState').val();
if(!val){
alert("E' necessario scegliere uno stato");
return;
}
stateNum = val;
dialog.dialog( "close" );
if (confirm("Sei sicuro di voler modificare lo stato degli elementi selezionati?")) {
$.ajax({
type: 'POST',
url: url,
data: {
data: data,
state:stateNum
},
dataType: 'json',
complete: function (resp) {
resp = jQuery.parseJSON(resp.responseText);
if (resp.success) {
var rows = resp.rows;
for (var i = 0; i < rows.length; i++) {
var tr = $('#tablebody tr[data-id=' + rows[i].id + ']');
tr.replaceWith(rows[i].tdRow);
}
$.growl({
type: 'success',
message: "Elementi aggiornati",
icon: 'fa fa-check fa-fw'
}, grownl_my_default_options);
} else {
$.growl({
type: 'danger',
message: resp.message,
icon: 'fa fa-times fa-fw'
}, grownl_my_default_options);
}
refreshFormComponents();
$('#tablebody').find(':checkbox').iCheck('uncheck');
}
});
}
}
var dialog = $('<div></div>')
.html(choicheHtmlModal)
.dialog({
title:"Scegli lo stato da impostare:",
autoOpen: false,
height: 200,
width: 350,
modal: true,
buttons: {
"OK": confirmChoice,
Cancel: function() {
$(this).dialog( "close" );
}
},
close: function() {
$(this).dialog( "destroy" );
}
});
dialog.dialog( "open" );
})
.delegate(modal_id,'hidden.bs.modal',function(link){
link.preventDefault();
myResetForm('tutto', form_id);
$('#save').attr('op', 'insert');
});
var choicheHtmlModal = `
<form>
<fieldset>
<select class="form-control" id="selectState" name="selectState">
<option value="1">New</option>
<option value="2">Pending</option>
<option value="3">Resolved</option>
<option value="4">Viewed</option>
</select>
</fieldset>
</form>`;
@@ -0,0 +1,114 @@
'use strict';
//Specializzo la funzione resetForm nel caso ci sia bisogno di campi TEXTAREA o immagini da resettare
function myResetForm(tipo, formid) {
resetForm(tipo, formid);
}
function edit(id) {
$('#save').attr('op', 'edit');
let dati = 'id=' + id;
let url = $(form_id).attr('data-get');
myResetForm('all', form_id);
$.getJSON(url, dati, function (resp) {
if (resp.success) {
$('#main_contenitor').html(resp.text);
$(modal_id).modal('show');
} else {
toastr.error(resp.message);
}
});
}
$(document).ready(function () {
initFormComponents();
initTableFlotHeader();
})
.delegate('#edit,#editLink', 'click', function (link) {
link.preventDefault();
const id = $(this).parents('tr').attr('data-id');
edit(id);
})
.delegate('#delete', 'click', function (link) {
link.preventDefault();
const url = $(form_id).attr('data-delete');
let tr = $(this).parents('tr');
const cod = tr.attr('data-cod');
let id = tr.attr('data-id');
let message = 'Sei sicuro di voler eliminare definitivamente l\'elemento?';
if (confirm(message)) {
$.ajax({
type: 'POST',
url: url,
data: 'id=' + id + "&cod=" + cod,
dataType: 'json',
complete: function (resp) {
resp = jQuery.parseJSON(resp.responseText);
if (resp.success) {
tr.animate({
'opacity': 'hide'
}, 500, function () {
tr.remove();
});
toastr.success('Eliminazione effettuata con successo');
} else {
toastr.error(resp.message);
}
}
});
}
})
.delegate('#delete_select', 'click', function (link) {
link.preventDefault();
let message = 'Sei sicuro di voler eliminare definitivamente gli elementi selezionati?';
if (confirm(message)) {
let data = [];
$('#tablebody').find(':checkbox').each(function () {
if (this.checked) {
data.push($(this).val());
}
});
let url = $(this).attr('href');
$.ajax({
type: 'POST',
url: url,
data: {
data: data
},
dataType: 'json',
complete: function (resp) {
resp = jQuery.parseJSON(resp.responseText);
if (resp.success) {
var ids = resp.id;
for (var i = 0; i < ids.length; i++) {
var tr = $('#tablebody tr[data-id=' + ids[i] + ']');
tr.animate({
'opacity': 'hide'
}, 500, function () {
tr.remove();
});
}
} else {
toastr.error(resp.message);
}
$('#tablebody').find(':checkbox').iCheck('uncheck');
}
});
}
})
.delegate(modal_id,'hidden.bs.modal',function(link){
link.preventDefault();
myResetForm('tutto', form_id);
$('#save').attr('op', 'insert');
});
+26
View File
@@ -0,0 +1,26 @@
{
"name": "swadmin",
"version": "1.0.0",
"description": "SW Admin",
"dependencies": {
"@fonticonpicker/fonticonpicker": "^3.1.1",
"admin-lte": "~3.0.5",
"angular": "^1.8.0",
"angular-animate": "^1.8.0",
"angular-chart.js": "^1.1.1",
"angular-daterangepicker": "^0.2.3-alpha1",
"angular-moment": "^1.3.0",
"angular-resource": "^1.8.0",
"angularjs-toaster": "^3.0.0",
"bootstrap-datepicker": "^1.9.0",
"floatthead": "^2.2.1",
"icheck": "^1.0.2",
"jquery-form": "^4.3.0",
"jquery.cookie": "^1.4.1",
"ngstorage": "^0.3.11",
"select2": "^4.0.13",
"ui-bootstrap4": "^3.0.6"
},
"devDependencies": {},
"author": ""
}
+14
View File
@@ -0,0 +1,14 @@
@import "../node_modules/admin-lte/build/scss/mixins/accent";
@import "../node_modules/admin-lte/build/scss/mixins/backgrounds";
$brandName: 'brand';
@include accent-variant($brandName, $brandColor-01);
[class*="accent-"] {
a.btn-brand {
color: color-yiq($brandColor-01);
}
}
@include background-variant($brandName, $brandColor-01);
+95
View File
@@ -0,0 +1,95 @@
@import "../node_modules/admin-lte/build/scss/mixins/cards";
$brandName: 'brand';
@include cards-variant($brandName, $brandColor-01);
.card-brand {
&.card-outline-tabs, &.card-outline {
border-top: 0 !important;
}
&.card-outline {
.card-header {
.nav-link {
&.active {
color: #FFFFFF !important;
background: $brandColor-01;
}
}
}
&.card-outline-tabs {
.card-header {
.nav-link {
&.active {
color: inherit !important;
background: whitesmoke;
border-bottom-color: whitesmoke;
}
}
}
.card-body {
background-color: whitesmoke;
}
}
}
.card-header {
.nav-link {
color: $brandColor-01 !important;
}
}
}
.accordion-card {
box-shadow: none;
border: 1px solid #DDD;
border-radius: 4px;
&.no-border {
border: 0;
}
&.no-border-radius {
border-radius: 0;
}
}
.delivery-card {
.card-header {
padding: 8px 4px;
}
.prodoti-list-item {
font-size: 13px;
color: #333333;
}
.riepilogo-list-item {
font-size: 14px;
color: #333333;
}
.totale-ordine {
margin-top: 5px;
font-weight: bold;
}
.metodo-pagamento {
color: #333333;
}
}
.position-card {
margin-bottom: 0;
border-top: 1px solid #DDD;
}
+168
View File
@@ -0,0 +1,168 @@
/****** FORM *****/
.form-box-container {
border: 1px solid #ddd;
margin: 10px 0;
padding: 15px;
}
.note-editable {
min-height: 426px;
}
.datepicker {
z-index: 1151 !important;
}
/******* PREVIEW IMAGE *******/
.image-preview-input {
background-color: #fff;
border-color: #ccc;
color: #333;
margin: 0;
overflow: hidden;
position: relative;
input[type="file"] {
cursor: pointer;
font-size: 20px;
margin: 0;
opacity: 0;
padding: 0;
position: absolute;
right: 0;
top: 0;
}
}
.image-preview-input-title {
// margin-left: 2px;
}
.image_preview_block_container{
.logo{
padding: 10px;
max-height: 149px;
}
.banner{
padding: 10px;
max-height: 200px;
}
}
.image-preview-clear-btn{
margin: 0;
}
input.form-control:focus, select.form-control:focus {
border: 1px solid #3c8dbc;
}
.form-group.has-error .form-control, .form-group.has-error .input-group-addon {
border: 1px solid #dd4b39;
box-shadow: none !important;
}
.form-error > span {
color: #dd4b39 !important;
}
.form-group {
.label-danger {
background: none repeat scroll 0 0 rgba(0, 0, 0, 0) !important;
color: #dd4b39 !important;
text-align: right !important;
overflow: hidden;
font-size: 12px;
}
}
[elastic] {
min-height: 37px;
}
textarea {
&.resize-vertical {
resize: vertical;
}
&.resize-horizontal {
resize: horizontal;
}
}
#modalForm label {
font-weight: normal;
}
// ------------ COMPACT FORM ----------------------
.compact-form {
&.no-border-radius {
input, select, textarea {
border-radius: 0;
}
}
.label-danger {
text-align: right;
}
label {
font-size: 0.95rem;
margin-top: 7px;
font-weight: normal !important;
}
.form-group {
margin-bottom: 5px;
.form-control {
box-shadow: none !important;
//font-size: 0.95rem;
}
.has-error .form-control {
box-shadow: none !important;
border: 1px solid #dd4b39;
}
}
}
/**** SUMMERNNOTE EDITOR ****/
.panel.note-editor {
border-radius: 0;
border: 1px solid #DDD;
box-shadow: none;
}
/**** BTN RADIo BOX ****/
.btn-radiobox{
.btn-app{
text-transform: uppercase;
&:first-child{
margin-left: 0;
}
&.active{
border-color: $brandColor-01;
i{
color: $brandColor-01;
}
}
input{
display: none;
}
}
}
+448
View File
@@ -0,0 +1,448 @@
body {
font-size: 15px;
}
.form-control {
font-size: 0.95rem;
}
//Redefine di alcuni componenti a text-sm sul body
.text-sm {
.navbar{
font-size: 16px !important;
height: 50px;
border-bottom: 0;
}
.btn-group {
.btn {
font-size: 1rem !important;
}
}
.brand-link {
font-size: 1rem;
}
}
$theme-colors: (
"brand": $brandColor-01
);
// Generate alert modifier classes
@each $color, $value in $theme-colors {
@include bg-variant('.bg-#{$color}', $value);
.alert-#{$color} {
@include alert-variant(theme-color-level($color, -10), theme-color-level($color, -9), theme-color-level($color, 6));
}
.btn-#{$color} {
@include button-variant(theme-color($color), theme-color($color), darken(theme-color($color), 10%), lighten(theme-color($color), 5%), lighten(theme-color($color), 10%), darken(theme-color($color), 30%));
}
}
.m0, .no-margin {
margin: 0 !important;
}
.mr-0 {
margin-right: 0 !important;
}
.ml-0 {
margin-left: 0 !important;
}
.mt-0 {
margin-top: 0 !important;
}
.mb-0 {
margin-bottom: 0 !important;
}
.m-5 {
margin: 5px !important;
}
.mr-5 {
margin-right: 5px !important;
}
.ml-5 {
margin-left: 5px !important;
}
.mt-5 {
margin-top: 5px !important;
}
.mb-5 {
margin-bottom: 5px !important;
}
.m-10 {
margin: 10px !important;
}
.mr-10 {
margin-right: 10px !important;
}
.ml-10 {
margin-left: 10px !important;
}
.mt-10 {
margin-top: 10px !important;
}
.mb-10 {
margin-bottom: 10px !important;
}
.m-15 {
margin: 15px !important;
}
.mr-15 {
margin-right: 15px !important;
}
.ml-15 {
margin-left: 15px !important;
}
.mt-15 {
margin-top: 15px !important;
}
.mb-15 {
margin-bottom: 15px !important;
}
.m-20 {
margin: 20px !important;
}
.mr-20 {
margin-right: 20px !important;
}
.ml-20 {
margin-left: 20px !important;
}
.mt-20 {
margin-top: 20px !important;
}
.mb-20 {
margin-bottom: 20px !important;
}
.pd0, .no-padding {
padding: 0 !important;
}
.pd-0 {
padding: 0 !important;
}
.pdr-0 {
padding-right: 0 !important;
}
.pdl-0 {
padding-left: 0 !important;
}
.pdt-0 {
padding-top: 0 !important;
}
.pdb-0 {
padding-bottom: 0 !important;
}
.pd-5 {
padding: 5px !important;
}
.pdr-5 {
padding-right: 5px !important;
}
.pdl-5 {
padding-left: 5px !important;
}
.pdt-5 {
padding-top: 5px !important;
}
.pdb-5 {
padding-bottom: 5px !important;
}
.pd-10 {
padding: 10px !important;
}
.pdr-10 {
padding-right: 10px !important;
}
.pdl-10 {
padding-left: 10px !important;
}
.pdt-10 {
padding-top: 10px !important;
}
.pdb-10 {
padding-bottom: 10px !important;
}
.pd-15 {
padding: 15px !important;
}
.pdr-15 {
padding-right: 15px !important;
}
.pdl-15 {
padding-left: 15px !important;
}
.pdt-15 {
padding-top: 15px !important;
}
.pdb-15 {
padding-bottom: 15px !important;
}
.pd-20 {
padding: 20px !important;
}
.pdr-20 {
padding-right: 20px !important;
}
.pdl-20 {
padding-left: 20px !important;
}
.pdt-20 {
padding-top: 20px !important;
}
.pdb-20 {
padding-bottom: 20px !important;
}
/*------------------------------------------*/
.no-border-top {
border-top: 0;
}
.no-padding-right {
padding-right: 0;
}
.no-padding-left {
padding-left: 0;
}
.no-padding-left > input {
border-left: 0;
}
.center-block {
display: block;
margin-left: auto;
margin-right: auto;
}
@media (min-width: 767px) {
.no-border-right-sm {
border-right: 0;
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
.no-border-top-sm {
border-top: 0;
}
.no-border-r-l-sm {
border-radius: 0;
}
.no-padding-l-sm {
padding-left: 0;
border-top-left-radius: 0;
border-bottom-left-radius: 0;
input {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
}
.no-padding-r-sm {
padding-right: 0;
input {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
}
.no-padding-r-l-sm {
padding-right: 0;
padding-left: 0;
input {
border-radius: 0;
}
}
}
.filtratiLabel {
font-size: 13px;
padding-right: 10px;
vertical-align: bottom;
margin-top: 19px;
display: block;
}
hr {
&.white {
border-top: 1px solid #FFF;
}
&.dark {
border-top: 1px solid #333;
}
&.light {
border-top: 1px solid #DDD;
}
}
/*------------------------------------------*/
.border-top-white {
border-top: 1px solid #FFF;
border-top-right-radius: 0;
border-top-left-radius: 0;
}
.border-bottom-white {
border-bottom: 1px solid #FFF;
}
.border-right-white {
border-right: 1px solid #FFF;
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
.border-left-white {
border-left: 1px solid #FFF;
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
.sidebar-menu li.divider-md {
border-top: 3px solid #1a2226;
}
.note-editor.note-frame {
border-radius: 0 !important;
}
.logo-img {
position: absolute;
top: 0;
right: 15px;
max-height: 100px;
}
.btn > .badge {
position: absolute;
top: -6px;
right: -4px;
font-size: 10px;
font-weight: 400;
z-index: 100;
}
.main-footer {
padding: 10px 15px;
}
//################################# CONTENT LIST ###########################
section.content.list {
padding: 12px 0 0 0;
}
//Custom scroll bar
::-webkit-scrollbar {
width: 8px;
}
::-webkit-scrollbar-track {
background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
background: #888;
}
::-webkit-scrollbar-thumb:hover {
background: #555;
}
@include media-breakpoint-down(xs) {
.content-wrapper, .main-sidebar {
padding-top: 50px !important;
}
.box-footer {
padding: 8px 3px !important;
}
section.content.list {
padding: 0;
}
section.content-header {
padding: 10px 15px 8px;
}
}
.dropdown-menu {
z-index: 1100 !important;
font-size: 0.9rem;
padding: 5px 0;
}
.content-header > .breadcrumb.top0 {
top: 0;
}
+33
View File
@@ -0,0 +1,33 @@
@import "../node_modules/bootstrap/scss/functions";
@import "../node_modules/bootstrap/scss/_variables.scss";
@import "../node_modules/bootstrap/scss/mixins/hover";
@import "../node_modules/bootstrap/scss/mixins/gradients";
@import "../node_modules/bootstrap/scss/mixins/background-variant";
@import "../node_modules/bootstrap/scss/mixins/deprecate";
@import "../node_modules/bootstrap/scss/mixins/box-shadow";
@import "../node_modules/bootstrap/scss/mixins/alert";
@import "../node_modules/bootstrap/scss/mixins/buttons";
@import "../node_modules/bootstrap/scss/mixins/_breakpoints";
@import "../node_modules/admin-lte/build/scss/_variables.scss";
//************************
@import 'variables.scss';
@import 'general.scss';
@import 'sidebar.scss';
@import 'accent.scss';
@import 'navbar.scss';
@import 'cards.scss';
@import 'table.scss';
@import 'modal_e_tabs.scss';
// @import 'loaders.scss';
@import 'forms.scss';
@import 'select2.scss';
@import 'sw-icons.scss';
@import 'listPage.scss';
@import 'loginPage.scss';
@import 'settingsPage.scss';
+82
View File
@@ -0,0 +1,82 @@
.breadcrumb{
font-size: 14px;
}
.dropdown-multifunction-down {
margin-top: 5px;
}
.pagination{
margin-top: 5px;
margin-left: 5px;
margin-bottom: 0;
font-size: 14px;
font-weight: normal !important;
vertical-align: middle;
.text-counter{
margin-top:5px;
}
}
.box-footer {
background: #FFFFFF;
padding: 4px 3px !important;
}
.note-editor{
box-shadow: none;
}
.bootstrap-modal-selector {
overflow-y:scroll;
}
.pagination-counter{
font-size: 14px;
label{
margin-right:5px;
font-weight: normal !important;
}
input.form-control{
border-radius: 0.2rem;
}
}
@include media-breakpoint-up(md) {
.box-title {
&.search-left {
width: 65%;
}
&.search-right {
width: 35%;
> * {
float: right;
}
}
}
#orderSelect {
max-width: 150px;
}
.pagination-counter {
max-width: 150px;
margin-top: 5px;
label {
padding-top: 5px;
}
> .form-group {
margin-bottom: 0;
}
}
}
View File
+23
View File
@@ -0,0 +1,23 @@
.login-logo{
img{
display: block;
margin-left: auto;
margin-right:auto;
max-height: 150px;
max-width: 250px;
}
}
.login-card-body{
border-radius: 5px;
.icheck-primary{
margin-top:7px;
}
}
.footer-login{
margin-top:10px;
text-align: center;
font-size: 0.9em;
}
+81
View File
@@ -0,0 +1,81 @@
.box-border{
border:1px solid #DDD;
}
.box-footer{
//min-height: 55px;
padding: 8px 10px;
border-top:1px solid #DDD;
}
/**** MODAL **/
.modal-dialog > .overlay, .modal-dialog > .loading-img {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.modal-dialog .overlay {
z-index: 1010;
background: rgba(255, 255, 255, 0.7);
border-radius: 3px;
}
.modal-dialog .overlay > .fa {
position: absolute;
top: 50%;
left: 50%;
margin-left: -15px;
margin-top: -15px;
color: #000;
font-size: 30px;
}
.modal-dialog .overlay.dark {
background: rgba(0, 0, 0, 0.5);
}
.modal-body{
background-color: whitesmoke;
}
.modal-body .label{
text-align: right;
margin-right: 3px;
}
/**** TABELLA **/
.table-border{
border: 1px solid #ddd;
th{
font-weight: 500;
}
}
.table-border td,.table-border th{
border-bottom: 1px solid #ddd;
}
/**** TABS **/
.nav-tabs a.disabled {
color: #ddd;
}
.modal.modal-second-level {
z-index: 2070 !important;
overflow: auto;
}
body.modal-second,body.modal-third{
overflow-y: hidden !important;
}
body.modal-second .modal-backdrop {
z-index: 2069 !important;
}
+9
View File
@@ -0,0 +1,9 @@
@import "../node_modules/admin-lte/build/scss/mixins/navbar";
.navbar-dark-brand{
@include navbar-variant($brandColor-01);
}
.nav-item.dev-block{
margin-top: 6px !important;
}
+14
View File
@@ -0,0 +1,14 @@
.select2-fullwidth{
.select2-container{
min-width: 100%;
}
}
.select2-container--default .select2-selection--multiple .select2-selection__choice{
background-color: $brandColor-01;
border-color: $brandColor-01;
}
.select2-container--default .select2-results__option--highlighted[aria-selected], .select2-container--default .select2-results__option--highlighted[aria-selected]:hover{
background-color: $brandColor-01;
}
+22
View File
@@ -0,0 +1,22 @@
/** TAB SETTINGS **/
#settings-tab{
.panel-body{
border-top: 0;
border-right: 1px solid #DDD;
border-left: 1px solid #DDD;
border-bottom: 1px solid #DDD;
.well{
box-shadow: none;
}
}
}
.well{
border: 1px solid #DDD;
border-radius: 5px;
padding: 10px;
}
+9
View File
@@ -0,0 +1,9 @@
@import "../node_modules/admin-lte/build/scss/mixins/sidebar";
.sidebar-dark-brand{
@include sidebar-color($brandColor-01);
}
+14
View File
@@ -0,0 +1,14 @@
.sw-icon-font-picker{
width: 28px;
padding: 4px;
}
.fip-box .sw-icon-font-picker, .icons-selector .selected-icon .sw-icon-font-picker{
padding: 6px 4px;
}
.icons-selector.fip-bootstrap span.current-icon, .icons-selector.fip-bootstrap span.current-icon:hover{
background-color: $brandColor-01;
color: #fff;
border: 1px solid $brandColor-01;
}
+215
View File
@@ -0,0 +1,215 @@
.table-border {
border: 1px solid #ddd;
}
th[data-ord] {
cursor: pointer;
}
.floatThead-wrapper {
.box-body {
//background-color: #f5f5f5;
}
}
.content.list {
padding: 0;
}
.box-header {
margin-bottom: 8px;
margin-right: 8px;
margin-left: 8px;
}
.floatThead-container{
overflow-x: inherit !important;
}
.table-border.flot-header {
font-size: 0.95rem;
border-left: 0;
border-right: 0;
tbody {
tr {
/*&:hover{
td{
background: transparent;
}
}*/
td {
border-top: 1px solid #DDD;
vertical-align: middle;
padding: 5px;
//background-color: #FFF;
}
}
}
th {
background-color: #FFF;
border-bottom: 1px solid #DDD;
}
}
.table-wrapper {
height: 729px;
transition: height ease 0.7s;
}
.table-responsive {
padding: 0;
}
.table-border td, .table-border th {
border-bottom: 1px solid #ddd;
}
table.table-popover {
font-size: 12px;
}
table{
margin-bottom: 0 !important;
}
.table > thead > tr > th {
border-bottom: none !important;
}
.popover.popover-default-variables {
border-radius: 0;
font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial, sans-serif;
}
td.no-rows {
color: #6c757d !important;
height: 729px;
//background-color: #f5f5f5 !important;
vertical-align: middle !important;
font-size: 1.1em;
text-transform: uppercase;
text-align: center;
border: none !important;
> i {
display: block;
font-size: 3em;
color: #6c757d !important;
}
}
.ui-dialog {
z-index: 2000 !important;
}
@include media-breakpoint-up(md) {
.table-responsive {
border: none;
overflow-y: scroll;
margin: 0;
}
}
.table-wrapper-2,.table-wrapper-3{
height: 200px;
overflow-y: scroll;
background: whitesmoke;
td.no-rows{
height: 152px !important;
> i{
font-size: 2em !important;
}
}
}
.table-tickets{
border-top:1px solid #EEE !important;
border-bottom:1px solid #EEE !important;
border-left:none !important;
border-right:none !important;
td{
vertical-align: middle !important;
padding: 6px !important;
}
}
.floatThead-table{
thead > tr > th{
background: #FFF;
z-index: 1001;
padding-left: 6px !important;
padding-right: 6px !important;
}
}
.table-righe {
border-top: 1px solid #EEE !important;
border-bottom: 1px solid #EEE !important;
border-left: none !important;
border-right: none !important;
td {
vertical-align: middle !important;
padding: 6px !important;
}
}
table.sottoaree-table{
th{
border-top:none;
box-shadow: none !important;
}
td.no-rows{
height: 303px !important;
> i{
font-size: 2em !important;
}
}
}
.modal-with-tabs{
.modal-header{
border-bottom: none;
}
.modal-body{
.card{
box-shadow: none;
border-radius: 0;
}
}
}
.modal.modal-second-level {
z-index: 2070 !important;
overflow: auto;
}
body.modal-second .modal-backdrop {
z-index: 2069 !important;
}
body.modal-second,body.modal-third{
overflow-y: hidden !important;
}
+3
View File
@@ -0,0 +1,3 @@
$brandColor-01: #007BFF;
$logoColor: #F5B741;