Commit 860bc320 authored by Martin Keereman's avatar Martin Keereman
Browse files

Issue #3011893 by Etroid, jannakha, VladimirAus: Fails to load datepicker on Drupal 7/3.6

parent f4781ba5
......@@ -92,7 +92,12 @@
var opt = [];
$.each(befSettings.datepicker_options, function(key, val) {
if (key && val) {
opt[key] = JSON.parse(val);
try {
opt[key] = JSON.parse(val);
}
catch (err) {
opt[key] = val;
}
}
});
$('.bef-datepicker').datepicker(opt);
......
......@@ -40,16 +40,9 @@ class BEF_TestOptions extends BEF_TestBase {
'!id' => $id,
'!label' => $label,
);
$this->assertRaw(
htmlentities(t('Display "!id" (Filter label: "!label") exposed filter as', $translation)),
t('BEF options exist for exposed "!id" filter', $translation)
);
$this->assertRaw(
htmlentities(t('More options for "!id" (Filter label: "!label")', $translation)),
t('BEF "More options" fieldset exists for exposed "!id" filter', $translation)
);
$html_id = str_replace('_', '-', $id);
$this->assertField(
'edit-exposed-form-options-bef-' . str_replace('_', '-', $id) . '-bef-format',
'edit-exposed-form-options-bef-' . $html_id . '-bef-format',
t('BEF options dropdown exists for "!id"', $translation)
);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment