Fix indentation
This commit is contained in:
parent
159a914496
commit
c2dca8ea70
@ -777,7 +777,8 @@ function offerPrefsAutoimport()
|
||||
cnt.remove();
|
||||
$.post('index.php', {
|
||||
token: cnt.find('input[name=token]').val(),
|
||||
prefs_autoload: 'hide'});
|
||||
prefs_autoload: 'hide'
|
||||
});
|
||||
return;
|
||||
}
|
||||
cnt.find('input[name=json]').val(window.localStorage['config']);
|
||||
|
||||
@ -180,7 +180,7 @@ function _isInteger(val) {
|
||||
var digits = "1234567890";
|
||||
for (var i = 0; i < val.length; i++) {
|
||||
if (digits.indexOf(val.charAt(i)) == -1) { return false; }
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
function _getInt(str, i, minlength, maxlength) {
|
||||
@ -227,7 +227,7 @@ function getDateFromFormat(val, format) {
|
||||
token = "";
|
||||
while ((format.charAt(i_format) == c) && (i_format < format.length)) {
|
||||
token += format.charAt(i_format++);
|
||||
}
|
||||
}
|
||||
// Extract contents of value based on format token
|
||||
if (token == "yyyy" || token == "yy" || token == "y") {
|
||||
if (token == "yyyy") {
|
||||
|
||||
730
js/functions.js
730
js/functions.js
@ -791,7 +791,7 @@ function insertQuery(queryType)
|
||||
} else if (queryType == "select") {
|
||||
query = "SELECT " + chaineAj + " FROM `" + table + "` WHERE 1";
|
||||
} else if (queryType == "insert") {
|
||||
query = "INSERT INTO `" + table + "`(" + chaineAj + ") VALUES (" + valDis + ")";
|
||||
query = "INSERT INTO `" + table + "`(" + chaineAj + ") VALUES (" + valDis + ")";
|
||||
} else if (queryType == "update") {
|
||||
query = "UPDATE `" + table + "` SET " + editDis + " WHERE 1";
|
||||
} else if (queryType == "delete") {
|
||||
@ -964,349 +964,349 @@ $(function () {
|
||||
function pdfPaperSize(format, axis)
|
||||
{
|
||||
switch (format.toUpperCase()) {
|
||||
case '4A0':
|
||||
if (axis == 'x') {
|
||||
return 4767.87;
|
||||
} else {
|
||||
return 6740.79;
|
||||
}
|
||||
break;
|
||||
case '2A0':
|
||||
if (axis == 'x') {
|
||||
return 3370.39;
|
||||
} else {
|
||||
return 4767.87;
|
||||
}
|
||||
break;
|
||||
case 'A0':
|
||||
if (axis == 'x') {
|
||||
return 2383.94;
|
||||
} else {
|
||||
return 3370.39;
|
||||
}
|
||||
break;
|
||||
case 'A1':
|
||||
if (axis == 'x') {
|
||||
return 1683.78;
|
||||
} else {
|
||||
return 2383.94;
|
||||
}
|
||||
break;
|
||||
case 'A2':
|
||||
if (axis == 'x') {
|
||||
return 1190.55;
|
||||
} else {
|
||||
return 1683.78;
|
||||
}
|
||||
break;
|
||||
case 'A3':
|
||||
if (axis == 'x') {
|
||||
return 841.89;
|
||||
} else {
|
||||
return 1190.55;
|
||||
}
|
||||
break;
|
||||
case 'A4':
|
||||
if (axis == 'x') {
|
||||
return 595.28;
|
||||
} else {
|
||||
return 841.89;
|
||||
}
|
||||
break;
|
||||
case 'A5':
|
||||
if (axis == 'x') {
|
||||
return 419.53;
|
||||
} else {
|
||||
return 595.28;
|
||||
}
|
||||
break;
|
||||
case 'A6':
|
||||
if (axis == 'x') {
|
||||
return 297.64;
|
||||
} else {
|
||||
return 419.53;
|
||||
}
|
||||
break;
|
||||
case 'A7':
|
||||
if (axis == 'x') {
|
||||
return 209.76;
|
||||
} else {
|
||||
return 297.64;
|
||||
}
|
||||
break;
|
||||
case 'A8':
|
||||
if (axis == 'x') {
|
||||
return 147.40;
|
||||
} else {
|
||||
return 209.76;
|
||||
}
|
||||
break;
|
||||
case 'A9':
|
||||
if (axis == 'x') {
|
||||
return 104.88;
|
||||
} else {
|
||||
return 147.40;
|
||||
}
|
||||
break;
|
||||
case 'A10':
|
||||
if (axis == 'x') {
|
||||
return 73.70;
|
||||
} else {
|
||||
return 104.88;
|
||||
}
|
||||
break;
|
||||
case 'B0':
|
||||
if (axis == 'x') {
|
||||
return 2834.65;
|
||||
} else {
|
||||
return 4008.19;
|
||||
}
|
||||
break;
|
||||
case 'B1':
|
||||
if (axis == 'x') {
|
||||
return 2004.09;
|
||||
} else {
|
||||
return 2834.65;
|
||||
}
|
||||
break;
|
||||
case 'B2':
|
||||
if (axis == 'x') {
|
||||
return 1417.32;
|
||||
} else {
|
||||
return 2004.09;
|
||||
}
|
||||
break;
|
||||
case 'B3':
|
||||
if (axis == 'x') {
|
||||
return 1000.63;
|
||||
} else {
|
||||
return 1417.32;
|
||||
}
|
||||
break;
|
||||
case 'B4':
|
||||
if (axis == 'x') {
|
||||
return 708.66;
|
||||
} else {
|
||||
return 1000.63;
|
||||
}
|
||||
break;
|
||||
case 'B5':
|
||||
if (axis == 'x') {
|
||||
return 498.90;
|
||||
} else {
|
||||
return 708.66;
|
||||
}
|
||||
break;
|
||||
case 'B6':
|
||||
if (axis == 'x') {
|
||||
return 354.33;
|
||||
} else {
|
||||
return 498.90;
|
||||
}
|
||||
break;
|
||||
case 'B7':
|
||||
if (axis == 'x') {
|
||||
return 249.45;
|
||||
} else {
|
||||
return 354.33;
|
||||
}
|
||||
break;
|
||||
case 'B8':
|
||||
if (axis == 'x') {
|
||||
return 175.75;
|
||||
} else {
|
||||
return 249.45;
|
||||
}
|
||||
break;
|
||||
case 'B9':
|
||||
if (axis == 'x') {
|
||||
return 124.72;
|
||||
} else {
|
||||
return 175.75;
|
||||
}
|
||||
break;
|
||||
case 'B10':
|
||||
if (axis == 'x') {
|
||||
return 87.87;
|
||||
} else {
|
||||
return 124.72;
|
||||
}
|
||||
break;
|
||||
case 'C0':
|
||||
if (axis == 'x') {
|
||||
return 2599.37;
|
||||
} else {
|
||||
return 3676.54;
|
||||
}
|
||||
break;
|
||||
case 'C1':
|
||||
if (axis == 'x') {
|
||||
return 1836.85;
|
||||
} else {
|
||||
return 2599.37;
|
||||
}
|
||||
break;
|
||||
case 'C2':
|
||||
if (axis == 'x') {
|
||||
return 1298.27;
|
||||
} else {
|
||||
return 1836.85;
|
||||
}
|
||||
break;
|
||||
case 'C3':
|
||||
if (axis == 'x') {
|
||||
return 918.43;
|
||||
} else {
|
||||
return 1298.27;
|
||||
}
|
||||
break;
|
||||
case 'C4':
|
||||
if (axis == 'x') {
|
||||
return 649.13;
|
||||
} else {
|
||||
return 918.43;
|
||||
}
|
||||
break;
|
||||
case 'C5':
|
||||
if (axis == 'x') {
|
||||
return 459.21;
|
||||
} else {
|
||||
return 649.13;
|
||||
}
|
||||
break;
|
||||
case 'C6':
|
||||
if (axis == 'x') {
|
||||
return 323.15;
|
||||
} else {
|
||||
return 459.21;
|
||||
}
|
||||
break;
|
||||
case 'C7':
|
||||
if (axis == 'x') {
|
||||
return 229.61;
|
||||
} else {
|
||||
return 323.15;
|
||||
}
|
||||
break;
|
||||
case 'C8':
|
||||
if (axis == 'x') {
|
||||
return 161.57;
|
||||
} else {
|
||||
return 229.61;
|
||||
}
|
||||
break;
|
||||
case 'C9':
|
||||
if (axis == 'x') {
|
||||
return 113.39;
|
||||
} else {
|
||||
return 161.57;
|
||||
}
|
||||
break;
|
||||
case 'C10':
|
||||
if (axis == 'x') {
|
||||
return 79.37;
|
||||
} else {
|
||||
return 113.39;
|
||||
}
|
||||
break;
|
||||
case 'RA0':
|
||||
if (axis == 'x') {
|
||||
return 2437.80;
|
||||
} else {
|
||||
return 3458.27;
|
||||
}
|
||||
break;
|
||||
case 'RA1':
|
||||
if (axis == 'x') {
|
||||
return 1729.13;
|
||||
} else {
|
||||
return 2437.80;
|
||||
}
|
||||
break;
|
||||
case 'RA2':
|
||||
if (axis == 'x') {
|
||||
return 1218.90;
|
||||
} else {
|
||||
return 1729.13;
|
||||
}
|
||||
break;
|
||||
case 'RA3':
|
||||
if (axis == 'x') {
|
||||
return 864.57;
|
||||
} else {
|
||||
return 1218.90;
|
||||
}
|
||||
break;
|
||||
case 'RA4':
|
||||
if (axis == 'x') {
|
||||
return 609.45;
|
||||
} else {
|
||||
return 864.57;
|
||||
}
|
||||
break;
|
||||
case 'SRA0':
|
||||
if (axis == 'x') {
|
||||
return 2551.18;
|
||||
} else {
|
||||
return 3628.35;
|
||||
}
|
||||
break;
|
||||
case 'SRA1':
|
||||
if (axis == 'x') {
|
||||
return 1814.17;
|
||||
} else {
|
||||
return 2551.18;
|
||||
}
|
||||
break;
|
||||
case 'SRA2':
|
||||
if (axis == 'x') {
|
||||
return 1275.59;
|
||||
} else {
|
||||
return 1814.17;
|
||||
}
|
||||
break;
|
||||
case 'SRA3':
|
||||
if (axis == 'x') {
|
||||
return 907.09;
|
||||
} else {
|
||||
return 1275.59;
|
||||
}
|
||||
break;
|
||||
case 'SRA4':
|
||||
if (axis == 'x') {
|
||||
return 637.80;
|
||||
} else {
|
||||
return 907.09;
|
||||
}
|
||||
break;
|
||||
case 'LETTER':
|
||||
if (axis == 'x') {
|
||||
return 612.00;
|
||||
} else {
|
||||
return 792.00;
|
||||
}
|
||||
break;
|
||||
case 'LEGAL':
|
||||
if (axis == 'x') {
|
||||
return 612.00;
|
||||
} else {
|
||||
return 1008.00;
|
||||
}
|
||||
break;
|
||||
case 'EXECUTIVE':
|
||||
if (axis == 'x') {
|
||||
return 521.86;
|
||||
} else {
|
||||
return 756.00;
|
||||
}
|
||||
break;
|
||||
case 'FOLIO':
|
||||
if (axis == 'x') {
|
||||
return 612.00;
|
||||
} else {
|
||||
return 936.00;
|
||||
}
|
||||
break;
|
||||
case '4A0':
|
||||
if (axis == 'x') {
|
||||
return 4767.87;
|
||||
} else {
|
||||
return 6740.79;
|
||||
}
|
||||
break;
|
||||
case '2A0':
|
||||
if (axis == 'x') {
|
||||
return 3370.39;
|
||||
} else {
|
||||
return 4767.87;
|
||||
}
|
||||
break;
|
||||
case 'A0':
|
||||
if (axis == 'x') {
|
||||
return 2383.94;
|
||||
} else {
|
||||
return 3370.39;
|
||||
}
|
||||
break;
|
||||
case 'A1':
|
||||
if (axis == 'x') {
|
||||
return 1683.78;
|
||||
} else {
|
||||
return 2383.94;
|
||||
}
|
||||
break;
|
||||
case 'A2':
|
||||
if (axis == 'x') {
|
||||
return 1190.55;
|
||||
} else {
|
||||
return 1683.78;
|
||||
}
|
||||
break;
|
||||
case 'A3':
|
||||
if (axis == 'x') {
|
||||
return 841.89;
|
||||
} else {
|
||||
return 1190.55;
|
||||
}
|
||||
break;
|
||||
case 'A4':
|
||||
if (axis == 'x') {
|
||||
return 595.28;
|
||||
} else {
|
||||
return 841.89;
|
||||
}
|
||||
break;
|
||||
case 'A5':
|
||||
if (axis == 'x') {
|
||||
return 419.53;
|
||||
} else {
|
||||
return 595.28;
|
||||
}
|
||||
break;
|
||||
case 'A6':
|
||||
if (axis == 'x') {
|
||||
return 297.64;
|
||||
} else {
|
||||
return 419.53;
|
||||
}
|
||||
break;
|
||||
case 'A7':
|
||||
if (axis == 'x') {
|
||||
return 209.76;
|
||||
} else {
|
||||
return 297.64;
|
||||
}
|
||||
break;
|
||||
case 'A8':
|
||||
if (axis == 'x') {
|
||||
return 147.40;
|
||||
} else {
|
||||
return 209.76;
|
||||
}
|
||||
break;
|
||||
case 'A9':
|
||||
if (axis == 'x') {
|
||||
return 104.88;
|
||||
} else {
|
||||
return 147.40;
|
||||
}
|
||||
break;
|
||||
case 'A10':
|
||||
if (axis == 'x') {
|
||||
return 73.70;
|
||||
} else {
|
||||
return 104.88;
|
||||
}
|
||||
break;
|
||||
case 'B0':
|
||||
if (axis == 'x') {
|
||||
return 2834.65;
|
||||
} else {
|
||||
return 4008.19;
|
||||
}
|
||||
break;
|
||||
case 'B1':
|
||||
if (axis == 'x') {
|
||||
return 2004.09;
|
||||
} else {
|
||||
return 2834.65;
|
||||
}
|
||||
break;
|
||||
case 'B2':
|
||||
if (axis == 'x') {
|
||||
return 1417.32;
|
||||
} else {
|
||||
return 2004.09;
|
||||
}
|
||||
break;
|
||||
case 'B3':
|
||||
if (axis == 'x') {
|
||||
return 1000.63;
|
||||
} else {
|
||||
return 1417.32;
|
||||
}
|
||||
break;
|
||||
case 'B4':
|
||||
if (axis == 'x') {
|
||||
return 708.66;
|
||||
} else {
|
||||
return 1000.63;
|
||||
}
|
||||
break;
|
||||
case 'B5':
|
||||
if (axis == 'x') {
|
||||
return 498.90;
|
||||
} else {
|
||||
return 708.66;
|
||||
}
|
||||
break;
|
||||
case 'B6':
|
||||
if (axis == 'x') {
|
||||
return 354.33;
|
||||
} else {
|
||||
return 498.90;
|
||||
}
|
||||
break;
|
||||
case 'B7':
|
||||
if (axis == 'x') {
|
||||
return 249.45;
|
||||
} else {
|
||||
return 354.33;
|
||||
}
|
||||
break;
|
||||
case 'B8':
|
||||
if (axis == 'x') {
|
||||
return 175.75;
|
||||
} else {
|
||||
return 249.45;
|
||||
}
|
||||
break;
|
||||
case 'B9':
|
||||
if (axis == 'x') {
|
||||
return 124.72;
|
||||
} else {
|
||||
return 175.75;
|
||||
}
|
||||
break;
|
||||
case 'B10':
|
||||
if (axis == 'x') {
|
||||
return 87.87;
|
||||
} else {
|
||||
return 124.72;
|
||||
}
|
||||
break;
|
||||
case 'C0':
|
||||
if (axis == 'x') {
|
||||
return 2599.37;
|
||||
} else {
|
||||
return 3676.54;
|
||||
}
|
||||
break;
|
||||
case 'C1':
|
||||
if (axis == 'x') {
|
||||
return 1836.85;
|
||||
} else {
|
||||
return 2599.37;
|
||||
}
|
||||
break;
|
||||
case 'C2':
|
||||
if (axis == 'x') {
|
||||
return 1298.27;
|
||||
} else {
|
||||
return 1836.85;
|
||||
}
|
||||
break;
|
||||
case 'C3':
|
||||
if (axis == 'x') {
|
||||
return 918.43;
|
||||
} else {
|
||||
return 1298.27;
|
||||
}
|
||||
break;
|
||||
case 'C4':
|
||||
if (axis == 'x') {
|
||||
return 649.13;
|
||||
} else {
|
||||
return 918.43;
|
||||
}
|
||||
break;
|
||||
case 'C5':
|
||||
if (axis == 'x') {
|
||||
return 459.21;
|
||||
} else {
|
||||
return 649.13;
|
||||
}
|
||||
break;
|
||||
case 'C6':
|
||||
if (axis == 'x') {
|
||||
return 323.15;
|
||||
} else {
|
||||
return 459.21;
|
||||
}
|
||||
break;
|
||||
case 'C7':
|
||||
if (axis == 'x') {
|
||||
return 229.61;
|
||||
} else {
|
||||
return 323.15;
|
||||
}
|
||||
break;
|
||||
case 'C8':
|
||||
if (axis == 'x') {
|
||||
return 161.57;
|
||||
} else {
|
||||
return 229.61;
|
||||
}
|
||||
break;
|
||||
case 'C9':
|
||||
if (axis == 'x') {
|
||||
return 113.39;
|
||||
} else {
|
||||
return 161.57;
|
||||
}
|
||||
break;
|
||||
case 'C10':
|
||||
if (axis == 'x') {
|
||||
return 79.37;
|
||||
} else {
|
||||
return 113.39;
|
||||
}
|
||||
break;
|
||||
case 'RA0':
|
||||
if (axis == 'x') {
|
||||
return 2437.80;
|
||||
} else {
|
||||
return 3458.27;
|
||||
}
|
||||
break;
|
||||
case 'RA1':
|
||||
if (axis == 'x') {
|
||||
return 1729.13;
|
||||
} else {
|
||||
return 2437.80;
|
||||
}
|
||||
break;
|
||||
case 'RA2':
|
||||
if (axis == 'x') {
|
||||
return 1218.90;
|
||||
} else {
|
||||
return 1729.13;
|
||||
}
|
||||
break;
|
||||
case 'RA3':
|
||||
if (axis == 'x') {
|
||||
return 864.57;
|
||||
} else {
|
||||
return 1218.90;
|
||||
}
|
||||
break;
|
||||
case 'RA4':
|
||||
if (axis == 'x') {
|
||||
return 609.45;
|
||||
} else {
|
||||
return 864.57;
|
||||
}
|
||||
break;
|
||||
case 'SRA0':
|
||||
if (axis == 'x') {
|
||||
return 2551.18;
|
||||
} else {
|
||||
return 3628.35;
|
||||
}
|
||||
break;
|
||||
case 'SRA1':
|
||||
if (axis == 'x') {
|
||||
return 1814.17;
|
||||
} else {
|
||||
return 2551.18;
|
||||
}
|
||||
break;
|
||||
case 'SRA2':
|
||||
if (axis == 'x') {
|
||||
return 1275.59;
|
||||
} else {
|
||||
return 1814.17;
|
||||
}
|
||||
break;
|
||||
case 'SRA3':
|
||||
if (axis == 'x') {
|
||||
return 907.09;
|
||||
} else {
|
||||
return 1275.59;
|
||||
}
|
||||
break;
|
||||
case 'SRA4':
|
||||
if (axis == 'x') {
|
||||
return 637.80;
|
||||
} else {
|
||||
return 907.09;
|
||||
}
|
||||
break;
|
||||
case 'LETTER':
|
||||
if (axis == 'x') {
|
||||
return 612.00;
|
||||
} else {
|
||||
return 792.00;
|
||||
}
|
||||
break;
|
||||
case 'LEGAL':
|
||||
if (axis == 'x') {
|
||||
return 612.00;
|
||||
} else {
|
||||
return 1008.00;
|
||||
}
|
||||
break;
|
||||
case 'EXECUTIVE':
|
||||
if (axis == 'x') {
|
||||
return 521.86;
|
||||
} else {
|
||||
return 756.00;
|
||||
}
|
||||
break;
|
||||
case 'FOLIO':
|
||||
if (axis == 'x') {
|
||||
return 612.00;
|
||||
} else {
|
||||
return 936.00;
|
||||
}
|
||||
break;
|
||||
} // end switch
|
||||
|
||||
return 0;
|
||||
@ -1681,24 +1681,24 @@ function PMA_createProfilingChartJqplot(target, data)
|
||||
},
|
||||
// from http://tango.freedesktop.org/Tango_Icon_Theme_Guidelines#Color_Palette
|
||||
seriesColors: [
|
||||
'#fce94f',
|
||||
'#fcaf3e',
|
||||
'#e9b96e',
|
||||
'#8ae234',
|
||||
'#729fcf',
|
||||
'#ad7fa8',
|
||||
'#ef2929',
|
||||
'#eeeeec',
|
||||
'#888a85',
|
||||
'#c4a000',
|
||||
'#ce5c00',
|
||||
'#8f5902',
|
||||
'#4e9a06',
|
||||
'#204a87',
|
||||
'#5c3566',
|
||||
'#a40000',
|
||||
'#babdb6',
|
||||
'#2e3436'
|
||||
'#fce94f',
|
||||
'#fcaf3e',
|
||||
'#e9b96e',
|
||||
'#8ae234',
|
||||
'#729fcf',
|
||||
'#ad7fa8',
|
||||
'#ef2929',
|
||||
'#eeeeec',
|
||||
'#888a85',
|
||||
'#c4a000',
|
||||
'#ce5c00',
|
||||
'#8f5902',
|
||||
'#4e9a06',
|
||||
'#204a87',
|
||||
'#5c3566',
|
||||
'#a40000',
|
||||
'#babdb6',
|
||||
'#2e3436'
|
||||
]
|
||||
}
|
||||
);
|
||||
@ -1848,7 +1848,7 @@ function PMA_SQLPrettyPrint(string)
|
||||
if (! spaceExceptionsBefore[tokens[i][1]]
|
||||
&& ! (i > 0 && spaceExceptionsAfter[tokens[i-1][1]])
|
||||
&& output.charAt(output.length -1) != ' ' ) {
|
||||
output += " ";
|
||||
output += " ";
|
||||
}
|
||||
if (tokens[i][0] == 'keyword') {
|
||||
output += tokens[i][1].toUpperCase();
|
||||
@ -2344,7 +2344,7 @@ function PMA_checkPassword($the_form)
|
||||
$password.val('');
|
||||
$password_repeat.val('');
|
||||
$password.focus();
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@ -2576,7 +2576,7 @@ AJAX.registerOnload('functions.js', function () {
|
||||
values.push(buffer);
|
||||
buffer = '';
|
||||
} else if (in_string) {
|
||||
buffer += curr;
|
||||
buffer += curr;
|
||||
}
|
||||
}
|
||||
if (buffer.length > 0) {
|
||||
|
||||
@ -303,7 +303,7 @@ function history(ncolumn_name, nobj, ntab, nobj_no, ntype)
|
||||
};
|
||||
this.set_obj_no = function (nobj_no) {
|
||||
obj_no = nobj_no;
|
||||
};
|
||||
};
|
||||
this.get_obj_no = function () {
|
||||
return obj_no;
|
||||
};
|
||||
@ -431,17 +431,15 @@ var aggregate = function (noperator) {
|
||||
function unique(arrayName)
|
||||
{
|
||||
var newArray = [];
|
||||
label: for (var i = 0; i < arrayName.length; i++)
|
||||
{
|
||||
for (var j = 0; j < newArray.length; j++)
|
||||
{
|
||||
label: for (var i = 0; i < arrayName.length; i++) {
|
||||
for (var j = 0; j < newArray.length; j++) {
|
||||
if (newArray[j] == arrayName[i]) {
|
||||
continue label;
|
||||
}
|
||||
}
|
||||
newArray[newArray.length] = arrayName[i];
|
||||
}
|
||||
return newArray;
|
||||
return newArray;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -551,9 +549,9 @@ function query_from()
|
||||
for (i = 0; i < 2; i++) {
|
||||
for (K in contr) {
|
||||
for (key in contr[K]) {// contr name
|
||||
for (key2 in contr[K][key]) {// table name
|
||||
for (key2 in contr[K][key]) {// table name
|
||||
parts = key2.split(".");
|
||||
if (found(tab_used, parts[1]) > 0) {
|
||||
if (found(tab_used, parts[1]) > 0) {
|
||||
for (key3 in contr[K][key][key2]) {
|
||||
parts1 = contr[K][key][key2][key3][0].split(".");
|
||||
if (found(tab_left, parts1[1]) > 0) {
|
||||
@ -574,22 +572,22 @@ function query_from()
|
||||
tab_left = remove_array(t_tab_left, tab_left);
|
||||
t_tab_left = [];
|
||||
for (K in contr) {
|
||||
for (key in contr[K]) {
|
||||
for (key2 in contr[K][key]) {// table name
|
||||
parts = key2.split(".");
|
||||
if (found(tab_left, parts[1]) > 0) {
|
||||
for (key3 in contr[K][key][key2]) {
|
||||
parts1 = contr[K][key][key2][key3][0].split(".");
|
||||
if (found(tab_used, parts1[1]) > 0) {
|
||||
query += "\n" + 'LEFT JOIN ';
|
||||
query += '`' + parts[0] + '`.`' + parts[1] + '` ON ';
|
||||
query += '`' + parts1[1] + '`.`' + contr[K][key][key2][key3][1] + '` = ';
|
||||
query += '`' + parts[1] + '`.`' + key3 + '` ';
|
||||
t_tab_left.push(parts[1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
for (key in contr[K]) {
|
||||
for (key2 in contr[K][key]) {// table name
|
||||
parts = key2.split(".");
|
||||
if (found(tab_left, parts[1]) > 0) {
|
||||
for (key3 in contr[K][key][key2]) {
|
||||
parts1 = contr[K][key][key2][key3][0].split(".");
|
||||
if (found(tab_used, parts1[1]) > 0) {
|
||||
query += "\n" + 'LEFT JOIN ';
|
||||
query += '`' + parts[0] + '`.`' + parts[1] + '` ON ';
|
||||
query += '`' + parts1[1] + '`.`' + contr[K][key][key2][key3][1] + '` = ';
|
||||
query += '`' + parts[1] + '`.`' + key3 + '` ';
|
||||
t_tab_left.push(parts[1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
t_tab_left = unique(t_tab_left);
|
||||
@ -600,9 +598,9 @@ function query_from()
|
||||
for (k in tab_left) {
|
||||
quer += " , `" + tab_left[k] + "`";
|
||||
}
|
||||
query = quer + query;
|
||||
from_array = t_array;
|
||||
return query;
|
||||
query = quer + query;
|
||||
from_array = t_array;
|
||||
return query;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -7,145 +7,145 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
if (!window.all) // if IE
|
||||
{
|
||||
document.attachEvent("onreadystatechange", // document load
|
||||
function () {
|
||||
if (document.readyState == "complete") {
|
||||
var el = document.getElementById("canvas");
|
||||
var outerHTML = el.outerHTML;
|
||||
var newEl = document.createElement(outerHTML);
|
||||
el.parentNode.replaceChild(newEl, el);
|
||||
el = newEl;
|
||||
el.getContext = function () {
|
||||
if (this.cont) {
|
||||
return this.cont;
|
||||
}
|
||||
return this.cont = new PMD_2D(this);
|
||||
if (!window.all) { // if IE
|
||||
document.attachEvent(
|
||||
"onreadystatechange", // document load
|
||||
function () {
|
||||
if (document.readyState == "complete") {
|
||||
var el = document.getElementById("canvas");
|
||||
var outerHTML = el.outerHTML;
|
||||
var newEl = document.createElement(outerHTML);
|
||||
el.parentNode.replaceChild(newEl, el);
|
||||
el = newEl;
|
||||
el.getContext = function () {
|
||||
if (this.cont) {
|
||||
return this.cont;
|
||||
}
|
||||
return this.cont = new PMD_2D(this);
|
||||
};
|
||||
|
||||
el.style.width = el.attributes.width.nodeValue + "px";
|
||||
el.style.height = el.attributes.height.nodeValue + "px";
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
//*****************************************************************************************************
|
||||
|
||||
function convert_style(str) {
|
||||
var m = [];
|
||||
m = str.match(/.*\((\d*),(\d*),(\d*),(\d*)\)/);
|
||||
for (var i = 1; i<=3; i++) {
|
||||
m[i] = (m[i]*1).toString(16).length < 2 ? '0' + (m[i]*1).toString(16) : (m[i]*1).toString(16);
|
||||
}
|
||||
return ['#' + m[1] + m[2] + m[3], 1];
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
function PMD_2D(th) {
|
||||
this.element_ = th;
|
||||
this.pmd_arr = [];
|
||||
this.strokeStyle;
|
||||
this.fillStyle;
|
||||
this.lineWidth;
|
||||
|
||||
this.closePath = function () {
|
||||
this.pmd_arr.push({type: "close"});
|
||||
};
|
||||
|
||||
el.style.width = el.attributes.width.nodeValue + "px";
|
||||
el.style.height = el.attributes.height.nodeValue + "px";
|
||||
}
|
||||
}
|
||||
);
|
||||
this.clearRect = function () {
|
||||
this.element_.innerHTML = "";
|
||||
this.pmd_arr = [];
|
||||
};
|
||||
|
||||
//*****************************************************************************************************
|
||||
this.beginPath = function () {
|
||||
this.pmd_arr = [];
|
||||
};
|
||||
|
||||
function convert_style(str) {
|
||||
var m = [];
|
||||
m = str.match(/.*\((\d*),(\d*),(\d*),(\d*)\)/);
|
||||
for (var i = 1; i<=3; i++) {
|
||||
m[i] = (m[i]*1).toString(16).length < 2 ? '0' + (m[i]*1).toString(16) : (m[i]*1).toString(16);
|
||||
}
|
||||
return ['#' + m[1] + m[2] + m[3], 1];
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
function PMD_2D(th) {
|
||||
this.element_ = th;
|
||||
this.pmd_arr = [];
|
||||
this.strokeStyle;
|
||||
this.fillStyle;
|
||||
this.lineWidth;
|
||||
this.moveTo = function (aX, aY) {
|
||||
this.pmd_arr.push({type: "moveTo", x: aX, y: aY});
|
||||
};
|
||||
|
||||
this.closePath = function () {
|
||||
this.pmd_arr.push({type: "close"});
|
||||
};
|
||||
this.lineTo = function (aX, aY) {
|
||||
this.pmd_arr.push({type: "lineTo", x: aX, y: aY});
|
||||
};
|
||||
|
||||
this.clearRect = function () {
|
||||
this.element_.innerHTML = "";
|
||||
this.pmd_arr = [];
|
||||
};
|
||||
this.arc = function (aX, aY, aRadius, aStartAngle, aEndAngle, aClockwise) {
|
||||
if (!aClockwise) {
|
||||
var t = aStartAngle;
|
||||
aStartAngle = aEndAngle;
|
||||
aEndAngle = t;
|
||||
}
|
||||
|
||||
this.beginPath = function () {
|
||||
this.pmd_arr = [];
|
||||
};
|
||||
var xStart = aX + (Math.cos(aStartAngle) * aRadius);
|
||||
var yStart = aY + (Math.sin(aStartAngle) * aRadius);
|
||||
|
||||
this.moveTo = function (aX, aY) {
|
||||
this.pmd_arr.push({type: "moveTo", x: aX, y: aY});
|
||||
};
|
||||
var xEnd = aX + (Math.cos(aEndAngle) * aRadius);
|
||||
var yEnd = aY + (Math.sin(aEndAngle) * aRadius);
|
||||
|
||||
this.lineTo = function (aX, aY) {
|
||||
this.pmd_arr.push({type: "lineTo", x: aX, y: aY});
|
||||
};
|
||||
this.pmd_arr.push({type: "arc", x: aX, y: aY,
|
||||
radius: aRadius, xStart: xStart, yStart: yStart, xEnd: xEnd, yEnd: yEnd});
|
||||
};
|
||||
|
||||
this.arc = function (aX, aY, aRadius, aStartAngle, aEndAngle, aClockwise) {
|
||||
if (!aClockwise) {
|
||||
var t = aStartAngle;
|
||||
aStartAngle = aEndAngle;
|
||||
aEndAngle = t;
|
||||
}
|
||||
this.rect = function (aX, aY, aW, aH) {
|
||||
this.moveTo(aX, aY);
|
||||
this.lineTo(aX + aW, aY);
|
||||
this.lineTo(aX + aW, aY + aH);
|
||||
this.lineTo(aX, aY + aH);
|
||||
this.closePath();
|
||||
};
|
||||
|
||||
var xStart = aX + (Math.cos(aStartAngle) * aRadius);
|
||||
var yStart = aY + (Math.sin(aStartAngle) * aRadius);
|
||||
this.fillRect = function (aX, aY, aW, aH) {
|
||||
this.beginPath();
|
||||
this.moveTo(aX, aY);
|
||||
this.lineTo(aX + aW, aY);
|
||||
this.lineTo(aX + aW, aY + aH);
|
||||
this.lineTo(aX, aY + aH);
|
||||
this.closePath();
|
||||
this.stroke(true);
|
||||
};
|
||||
|
||||
var xEnd = aX + (Math.cos(aEndAngle) * aRadius);
|
||||
var yEnd = aY + (Math.sin(aEndAngle) * aRadius);
|
||||
this.stroke = function (aFill) {
|
||||
var Str = [];
|
||||
var a = convert_style(aFill ? this.fillStyle : this.strokeStyle);
|
||||
var color = a[0];
|
||||
|
||||
this.pmd_arr.push({type: "arc", x: aX, y: aY,
|
||||
radius: aRadius, xStart: xStart, yStart: yStart, xEnd: xEnd, yEnd: yEnd});
|
||||
};
|
||||
Str.push('<v:shape',
|
||||
' fillcolor="', color, '"',
|
||||
' filled="', Boolean(aFill), '"',
|
||||
' style="position:absolute;width:10;height:10;"',
|
||||
' coordorigin="0 0" coordsize="10 10"',
|
||||
' stroked="', !aFill, '"',
|
||||
' strokeweight="', this.lineWidth, '"',
|
||||
' strokecolor="', color, '"',
|
||||
' path="');
|
||||
|
||||
this.rect = function (aX, aY, aW, aH) {
|
||||
this.moveTo(aX, aY);
|
||||
this.lineTo(aX + aW, aY);
|
||||
this.lineTo(aX + aW, aY + aH);
|
||||
this.lineTo(aX, aY + aH);
|
||||
this.closePath();
|
||||
};
|
||||
for (var i = 0; i < this.pmd_arr.length; i++) {
|
||||
var p = this.pmd_arr[i];
|
||||
|
||||
this.fillRect = function (aX, aY, aW, aH) {
|
||||
this.beginPath();
|
||||
this.moveTo(aX, aY);
|
||||
this.lineTo(aX + aW, aY);
|
||||
this.lineTo(aX + aW, aY + aH);
|
||||
this.lineTo(aX, aY + aH);
|
||||
this.closePath();
|
||||
this.stroke(true);
|
||||
};
|
||||
if (p.type == "moveTo") {
|
||||
Str.push(" m ");
|
||||
Str.push(Math.floor(p.x), ",",Math.floor(p.y));
|
||||
} else if (p.type == "lineTo") {
|
||||
Str.push(" l ");
|
||||
Str.push(Math.floor(p.x), ",",Math.floor(p.y));
|
||||
} else if (p.type == "close") {
|
||||
Str.push(" x ");
|
||||
} else if (p.type == "arc") {
|
||||
Str.push(" ar ");
|
||||
Str.push(Math.floor(p.x - p.radius), ",",
|
||||
Math.floor(p.y - p.radius), " ",
|
||||
Math.floor(p.x + p.radius), ",",
|
||||
Math.floor(p.y + p.radius), " ",
|
||||
Math.floor(p.xStart), ",", Math.floor(p.yStart), " ",
|
||||
Math.floor(p.xEnd), ",", Math.floor(p.yEnd));
|
||||
}
|
||||
}
|
||||
|
||||
this.stroke = function (aFill) {
|
||||
var Str = [];
|
||||
var a = convert_style(aFill ? this.fillStyle : this.strokeStyle);
|
||||
var color = a[0];
|
||||
Str.push(' ">');
|
||||
Str.push("</v:shape>");
|
||||
|
||||
Str.push('<v:shape',
|
||||
' fillcolor="', color, '"',
|
||||
' filled="', Boolean(aFill), '"',
|
||||
' style="position:absolute;width:10;height:10;"',
|
||||
' coordorigin="0 0" coordsize="10 10"',
|
||||
' stroked="', !aFill, '"',
|
||||
' strokeweight="', this.lineWidth, '"',
|
||||
' strokecolor="', color, '"',
|
||||
' path="');
|
||||
|
||||
for (var i = 0; i < this.pmd_arr.length; i++) {
|
||||
var p = this.pmd_arr[i];
|
||||
|
||||
if (p.type == "moveTo") {
|
||||
Str.push(" m ");
|
||||
Str.push(Math.floor(p.x), ",",Math.floor(p.y));
|
||||
} else if (p.type == "lineTo") {
|
||||
Str.push(" l ");
|
||||
Str.push(Math.floor(p.x), ",",Math.floor(p.y));
|
||||
} else if (p.type == "close") {
|
||||
Str.push(" x ");
|
||||
} else if (p.type == "arc") {
|
||||
Str.push(" ar ");
|
||||
Str.push(Math.floor(p.x - p.radius), ",",
|
||||
Math.floor(p.y - p.radius), " ",
|
||||
Math.floor(p.x + p.radius), ",",
|
||||
Math.floor(p.y + p.radius), " ",
|
||||
Math.floor(p.xStart), ",", Math.floor(p.yStart), " ",
|
||||
Math.floor(p.xEnd), ",", Math.floor(p.yEnd));
|
||||
this.element_.insertAdjacentHTML("beforeEnd", Str.join(""));
|
||||
this.pmd_arr = [];
|
||||
}
|
||||
}
|
||||
|
||||
Str.push(' ">');
|
||||
Str.push("</v:shape>");
|
||||
|
||||
this.element_.insertAdjacentHTML("beforeEnd", Str.join(""));
|
||||
this.pmd_arr = [];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -828,7 +828,8 @@ function Canvas_click(id)
|
||||
relation_name = key; //
|
||||
Key0 = contr[K][key][key2][key3][0];
|
||||
Key1 = contr[K][key][key2][key3][1];
|
||||
Key2 = key2; Key3 = key3;
|
||||
Key2 = key2;
|
||||
Key3 = key3;
|
||||
Key = K;
|
||||
} else {
|
||||
Line0(
|
||||
|
||||
@ -691,7 +691,8 @@ AJAX.registerOnload('server_status_monitor.js', function () {
|
||||
var $iframe, $form;
|
||||
$('body').append($iframe = $('<iframe id="monitorConfigUpload" style="display:none;"></iframe>'));
|
||||
var d = $iframe[0].contentWindow.document;
|
||||
d.open(); d.close();
|
||||
d.open();
|
||||
d.close();
|
||||
mew = d;
|
||||
|
||||
$iframe.load(function () {
|
||||
|
||||
@ -213,7 +213,7 @@ function verificationsAfterFieldChange(urlField, multi_edit, theType)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/* End of datetime validation*/
|
||||
|
||||
|
||||
@ -277,13 +277,13 @@ AJAX.registerOnload('tbl_change.js', function () {
|
||||
*
|
||||
*/
|
||||
$('input.checkbox_null').bind('click', function (e) {
|
||||
nullify(
|
||||
// use hidden fields populated by tbl_change.php
|
||||
$(this).siblings('.nullify_code').val(),
|
||||
$(this).closest('tr').find('input:hidden').first().val(),
|
||||
$(this).siblings('.hashed_field').val(),
|
||||
$(this).siblings('.multi_edit').val()
|
||||
);
|
||||
nullify(
|
||||
// use hidden fields populated by tbl_change.php
|
||||
$(this).siblings('.nullify_code').val(),
|
||||
$(this).closest('tr').find('input:hidden').first().val(),
|
||||
$(this).siblings('.hashed_field').val(),
|
||||
$(this).siblings('.multi_edit').val()
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
@ -409,13 +409,13 @@ AJAX.registerOnload('tbl_change.js', function () {
|
||||
.data('hashed_field', hashed_field)
|
||||
.data('new_row_index', new_row_index)
|
||||
.bind('click', function (e) {
|
||||
var $changed_element = $(this);
|
||||
nullify(
|
||||
$changed_element.siblings('.nullify_code').val(),
|
||||
$this_element.closest('tr').find('input:hidden').first().val(),
|
||||
$changed_element.data('hashed_field'),
|
||||
'[multi_edit][' + $changed_element.data('new_row_index') + ']'
|
||||
);
|
||||
var $changed_element = $(this);
|
||||
nullify(
|
||||
$changed_element.siblings('.nullify_code').val(),
|
||||
$this_element.closest('tr').find('input:hidden').first().val(),
|
||||
$changed_element.data('hashed_field'),
|
||||
'[multi_edit][' + $changed_element.data('new_row_index') + ']'
|
||||
);
|
||||
});
|
||||
}
|
||||
}) // end each
|
||||
@ -461,25 +461,25 @@ AJAX.registerOnload('tbl_change.js', function () {
|
||||
}
|
||||
curr_rows++;
|
||||
}
|
||||
// recompute tabindex for text fields and other controls at footer;
|
||||
// IMO it's not really important to handle the tabindex for
|
||||
// function and Null
|
||||
var tabindex = 0;
|
||||
$('.textfield')
|
||||
.each(function () {
|
||||
// recompute tabindex for text fields and other controls at footer;
|
||||
// IMO it's not really important to handle the tabindex for
|
||||
// function and Null
|
||||
var tabindex = 0;
|
||||
$('.textfield')
|
||||
.each(function () {
|
||||
tabindex++;
|
||||
$(this).attr('tabindex', tabindex);
|
||||
// update the IDs of textfields to ensure that they are unique
|
||||
$(this).attr('id', "field_" + tabindex + "_3");
|
||||
});
|
||||
$('select.control_at_footer')
|
||||
.each(function () {
|
||||
$('select.control_at_footer')
|
||||
.each(function () {
|
||||
tabindex++;
|
||||
$(this).attr('tabindex', tabindex);
|
||||
});
|
||||
// Add all the required datepickers back
|
||||
$('input.datefield, input.datetimefield').each(function () {
|
||||
PMA_addDatepicker($(this));
|
||||
// Add all the required datepickers back
|
||||
$('input.datefield, input.datetimefield').each(function () {
|
||||
PMA_addDatepicker($(this));
|
||||
});
|
||||
} else if (curr_rows > target_rows) {
|
||||
while (curr_rows > target_rows) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user