Merge branch 'devel' of dev.sourcefabric.org:airtime into devel
This commit is contained in:
commit
e708f60f68
|
@ -87,9 +87,6 @@ class Application_Form_AddShowWhen extends Zend_Form_SubForm
|
||||||
{
|
{
|
||||||
$valid = true;
|
$valid = true;
|
||||||
|
|
||||||
$hours;
|
|
||||||
$minutes;
|
|
||||||
|
|
||||||
$start_time = $formData['add_show_start_date']." ".$formData['add_show_start_time'];
|
$start_time = $formData['add_show_start_date']." ".$formData['add_show_start_time'];
|
||||||
$end_time = $formData['add_show_end_date_no_repeat']." ".$formData['add_show_end_time'];
|
$end_time = $formData['add_show_end_date_no_repeat']." ".$formData['add_show_end_time'];
|
||||||
|
|
||||||
|
|
|
@ -411,8 +411,6 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm
|
||||||
// 3. validate formate according to DB column type
|
// 3. validate formate according to DB column type
|
||||||
$multiplier = 1;
|
$multiplier = 1;
|
||||||
$result = 0;
|
$result = 0;
|
||||||
$errors = array();
|
|
||||||
$error = array();
|
|
||||||
|
|
||||||
// validation start
|
// validation start
|
||||||
if ($data['etc']['sp_limit_options'] == 'hours') {
|
if ($data['etc']['sp_limit_options'] == 'hours') {
|
||||||
|
@ -444,8 +442,6 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$criteriaFieldsUsed = array();
|
|
||||||
|
|
||||||
if (isset($data['criteria'])) {
|
if (isset($data['criteria'])) {
|
||||||
foreach ($data['criteria'] as $rowKey=>$row) {
|
foreach ($data['criteria'] as $rowKey=>$row) {
|
||||||
foreach ($row as $key=>$d) {
|
foreach ($row as $key=>$d) {
|
||||||
|
|
|
@ -204,6 +204,20 @@ function setSmartBlockEvents() {
|
||||||
/********** CRITERIA CHANGE **********/
|
/********** CRITERIA CHANGE **********/
|
||||||
form.find('select[id^="sp_criteria"]:not([id^="sp_criteria_modifier"])').live("change", function(){
|
form.find('select[id^="sp_criteria"]:not([id^="sp_criteria_modifier"])').live("change", function(){
|
||||||
var index = getRowIndex($(this).parent());
|
var index = getRowIndex($(this).parent());
|
||||||
|
//need to change the criteria value for any modifier rows
|
||||||
|
var critVal = $(this).val();
|
||||||
|
var divs = $(this).parent().nextAll(':visible');
|
||||||
|
$.each(divs, function(i, div){
|
||||||
|
var critSelect = $(div).children('select[id^="sp_criteria_field"]');
|
||||||
|
if (critSelect.hasClass('sp-invisible')) {
|
||||||
|
critSelect.val(critVal);
|
||||||
|
/* If the select box is visible we know the modifier rows
|
||||||
|
* have ended
|
||||||
|
*/
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// disable extra field and hide the span
|
// disable extra field and hide the span
|
||||||
disableAndHideExtraField($(this), index);
|
disableAndHideExtraField($(this), index);
|
||||||
|
|
Loading…
Reference in New Issue