|
@@ -4079,6 +4079,24 @@ function getValue() { |
|
|
function getJsValueGetter($id='%s') { |
|
|
return sprintf('%s.val()', $id); |
|
|
} |
|
|
|
|
|
/** |
|
|
* getJsComparator |
|
|
* |
|
|
* Used with the dependent fields to get comparison expression |
|
|
* |
|
|
*/ |
|
|
function getJsComparator($value, $id) { |
|
|
|
|
|
if (strpos($value, '|') !== false) |
|
|
return sprintf('$.inArray(%s, %s) !== -1', |
|
|
$this->getJsValueGetter($id), |
|
|
JsonDataEncoder::encode(explode('|', $value))); |
|
|
|
|
|
return sprintf('%s == %s', |
|
|
$this->getJsValueGetter($id), |
|
|
JsonDataEncoder::encode($value)); |
|
|
} |
|
|
} |
|
|
|
|
|
class TextboxWidget extends Widget { |
|
@@ -4401,17 +4419,6 @@ function getJsValueGetter($id='%s') { |
|
|
return sprintf('%s.find(":selected").val()', $id); |
|
|
} |
|
|
|
|
|
function getJsComparator($value, $id) { |
|
|
|
|
|
if (strpos($value, '|') !== false) |
|
|
return sprintf('$.inArray(%s, %s) !== -1', |
|
|
$this->getJsValueGetter($id), |
|
|
JsonDataEncoder::encode(explode('|', $value))); |
|
|
|
|
|
return sprintf('%s == %s', |
|
|
$this->getJsValueGetter($id), |
|
|
JsonDataEncoder::encode($value)); |
|
|
} |
|
|
} |
|
|
|
|
|
/** |
|
@@ -4615,11 +4622,6 @@ function getJsValueGetter($id='%s') { |
|
|
return sprintf('%s.is(":checked")', $id); |
|
|
} |
|
|
|
|
|
function getJsComparator($value, $id) { |
|
|
return sprintf('%s == %s', |
|
|
$this->getJsValueGetter($id), |
|
|
JsonDataEncoder::encode($value)); |
|
|
} |
|
|
} |
|
|
|
|
|
class DatetimePickerWidget extends Widget { |
|
|
0 comments on commit
d3f46bf