Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix: settings.php: form portion of settings page was inaccessible if plexWatch database location value was set incorrectly * Fix: global: date columns were still not sorting properly in all data tables if a date format other than m/d/y was used
- Loading branch information
Showing
8 changed files
with
109 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
plexWatch/Web - v1.5.1 | ||
plexWatch/Web - v1.5.2 | ||
======================= | ||
|
||
A web front-end for plexWatch. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,83 +1,6 @@ | ||
function trim(str) { | ||
str = str.replace(/^\s+/, ''); | ||
for (var i = str.length - 1; i >= 0; i--) { | ||
if (/\S/.test(str.charAt(i))) { | ||
str = str.substring(0, i + 1); | ||
break; | ||
} | ||
} | ||
return str; | ||
} | ||
|
||
jQuery.fn.dataTableExt.oSort['us_date-asc'] = function(a, b) { | ||
if (trim(a) != '' && a!=" ") { | ||
if (a.indexOf(' ') == -1) { | ||
var frDatea = trim(a).split(' '); | ||
var frDatea2 = frDatea[0].split('/'); | ||
var x = (frDatea2[2] + frDatea2[1] + frDatea2[0]) * 1; | ||
} | ||
else { | ||
var frDatea = trim(a).split(' '); | ||
var frTimea = frDatea[1].split(':'); | ||
var frDatea2 = frDatea[0].split('/'); | ||
var x = (frDatea2[2] + frDatea2[1] + frDatea2[0] + frTimea[0] + frTimea[1] + frTimea[2]) * 1; | ||
} | ||
} else { | ||
var x = 10000000; // = l'an 1000 ... | ||
} | ||
|
||
if (trim(b) != '' && b!=" ") { | ||
if (b.indexOf(' ') == -1) { | ||
var frDateb = trim(b).split(' '); | ||
frDateb = frDateb[0].split('/'); | ||
var y = (frDateb[2] + frDateb[1] + frDateb[0]) * 1; | ||
} | ||
else { | ||
var frDateb = trim(b).split(' '); | ||
var frTimeb = frDateb[1].split(':'); | ||
frDateb = frDateb[0].split('/'); | ||
var y = (frDateb[2] + frDateb[1] + frDateb[0] + frTimeb[0] + frTimeb[1] + frTimeb[2]) * 1; | ||
} | ||
} else { | ||
var y = 10000000; | ||
} | ||
var z = ((x < y) ? -1 : ((x > y) ? 1 : 0)); | ||
return z; | ||
}; | ||
|
||
jQuery.fn.dataTableExt.oSort['us_date-desc'] = function(a, b) { | ||
if (trim(a) != '' && a!=" ") { | ||
if (a.indexOf(' ') == -1) { | ||
var frDatea = trim(a).split(' '); | ||
var frDatea2 = frDatea[0].split('/'); | ||
var x = (frDatea2[2] + frDatea2[1] + frDatea2[0]) * 1; | ||
} | ||
else { | ||
var frDatea = trim(a).split(' '); | ||
var frTimea = frDatea[1].split(':'); | ||
var frDatea2 = frDatea[0].split('/'); | ||
var x = (frDatea2[2] + frDatea2[1] + frDatea2[0] + frTimea[0] + frTimea[1] + frTimea[2]) * 1; | ||
} | ||
} else { | ||
var x = 10000000; | ||
} | ||
|
||
if (trim(b) != '' && b!=" ") { | ||
if (b.indexOf(' ') == -1) { | ||
var frDateb = trim(b).split(' '); | ||
frDateb = frDateb[0].split('/'); | ||
var y = (frDateb[2] + frDateb[1] + frDateb[0]) * 1; | ||
} | ||
else { | ||
var frDateb = trim(b).split(' '); | ||
var frTimeb = frDateb[1].split(':'); | ||
frDateb = frDateb[0].split('/'); | ||
var y = (frDateb[2] + frDateb[1] + frDateb[0] + frTimeb[0] + frTimeb[1] + frTimeb[2]) * 1; | ||
} | ||
} else { | ||
var y = 10000000; | ||
} | ||
|
||
var z = ((x < y) ? 1 : ((x > y) ? -1 : 0)); | ||
return z; | ||
}; | ||
$.fn.dataTableExt.afnSortData['dom-data-order'] = function ( oSettings, iColumn ) | ||
{ | ||
return $.map( oSettings.oApi._fnGetTrNodes(oSettings), function (tr, i) { | ||
return $('td:eq('+iColumn+')', tr).attr('data-order'); | ||
} ); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters