style(legacy): format files
This commit is contained in:
parent
4d393fa14e
commit
5e8f7d430f
|
@ -855,9 +855,9 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm
|
||||||
if (in_array($d['sp_criteria_modifier'], ['before', 'after', 'between'])) {
|
if (in_array($d['sp_criteria_modifier'], ['before', 'after', 'between'])) {
|
||||||
if (!preg_match('/^[1-9][0-9]*$|0/', $d['sp_criteria_value'])) {
|
if (!preg_match('/^[1-9][0-9]*$|0/', $d['sp_criteria_value'])) {
|
||||||
$element->addError(_('Only non-negative integer numbers are allowed (e.g 1 or 5) for the text value'));
|
$element->addError(_('Only non-negative integer numbers are allowed (e.g 1 or 5) for the text value'));
|
||||||
$isValid = false;
|
|
||||||
// TODO validate this on numeric input with whatever parsing also do for extra
|
// TODO validate this on numeric input with whatever parsing also do for extra
|
||||||
// if the modifier is before ago or between we skip validation until we confirm format
|
// if the modifier is before ago or between we skip validation until we confirm format
|
||||||
|
$isValid = false;
|
||||||
} elseif (isset($d['sp_criteria_datetime_select']) && $d['sp_criteria_datetime_select'] == '0') {
|
} elseif (isset($d['sp_criteria_datetime_select']) && $d['sp_criteria_datetime_select'] == '0') {
|
||||||
$element->addError(_('You must select a time unit for a relative datetime.'));
|
$element->addError(_('You must select a time unit for a relative datetime.'));
|
||||||
$isValid = false;
|
$isValid = false;
|
||||||
|
|
|
@ -1688,13 +1688,13 @@ SQL;
|
||||||
// need to pull in the current time and subtract the value or figure out how to make it relative
|
// need to pull in the current time and subtract the value or figure out how to make it relative
|
||||||
$relativedate = new DateTime($spCriteriaValue);
|
$relativedate = new DateTime($spCriteriaValue);
|
||||||
$dt = $relativedate->format(DateTime::ISO8601);
|
$dt = $relativedate->format(DateTime::ISO8601);
|
||||||
$spCriteriaValue = "{$spCriteria} <= '{$dt}'";
|
|
||||||
// Logging::info($spCriteriaValue);
|
// Logging::info($spCriteriaValue);
|
||||||
|
$spCriteriaValue = "{$spCriteria} <= '{$dt}'";
|
||||||
} elseif ($spCriteriaModifier == 'after') {
|
} elseif ($spCriteriaModifier == 'after') {
|
||||||
$relativedate = new DateTime($spCriteriaValue);
|
$relativedate = new DateTime($spCriteriaValue);
|
||||||
$dt = $relativedate->format(DateTime::ISO8601);
|
$dt = $relativedate->format(DateTime::ISO8601);
|
||||||
$spCriteriaValue = "{$spCriteria} >= '{$dt}'";
|
|
||||||
// Logging::info($spCriteriaValue);
|
// Logging::info($spCriteriaValue);
|
||||||
|
$spCriteriaValue = "{$spCriteria} >= '{$dt}'";
|
||||||
} elseif ($spCriteriaModifier == 'between') {
|
} elseif ($spCriteriaModifier == 'between') {
|
||||||
$fromrelativedate = new DateTime($spCriteriaValue);
|
$fromrelativedate = new DateTime($spCriteriaValue);
|
||||||
$fdt = $fromrelativedate->format(DateTime::ISO8601);
|
$fdt = $fromrelativedate->format(DateTime::ISO8601);
|
||||||
|
|
|
@ -1416,8 +1416,7 @@ var AIRTIME = (function(AIRTIME) {
|
||||||
*
|
*
|
||||||
* XXX: should this be moved to podcast.js
|
* XXX: should this be moved to podcast.js
|
||||||
*/
|
*/
|
||||||
mod.initPodcastDatatable = function()
|
mod.initPodcastDatatable = function () {
|
||||||
{
|
|
||||||
var aoColumns = [
|
var aoColumns = [
|
||||||
/* Title */ { "sTitle": $.i18n._("Title"), "mDataProp": "title", "sClass": "library_title", "sWidth": "170px" },
|
/* Title */ { "sTitle": $.i18n._("Title"), "mDataProp": "title", "sClass": "library_title", "sWidth": "170px" },
|
||||||
/* Creator */ { "sTitle": $.i18n._("Creator"), "mDataProp": "creator", "sClass": "library_creator", "sWidth": "160px" },
|
/* Creator */ { "sTitle": $.i18n._("Creator"), "mDataProp": "creator", "sClass": "library_creator", "sWidth": "160px" },
|
||||||
|
|
|
@ -485,7 +485,8 @@ function buttonClickAction(clickType, url){
|
||||||
obj_id = $('.active-tab .obj_id').val();
|
obj_id = $('.active-tab .obj_id').val();
|
||||||
|
|
||||||
enableLoadingIcon();
|
enableLoadingIcon();
|
||||||
$.post(url, {format: "json", data: data, obj_id: obj_id, obj_type: "block",
|
$.post(url, {
|
||||||
|
format: "json", data: data, obj_id: obj_id, obj_type: "block",
|
||||||
modified: AIRTIME.playlist.getModified()
|
modified: AIRTIME.playlist.getModified()
|
||||||
}, function (data) {
|
}, function (data) {
|
||||||
callback(data, clickType);
|
callback(data, clickType);
|
||||||
|
|
Loading…
Reference in New Issue