Skip to content

Commit ca659d5

Browse files
author
David Luecke
committed
Minor bugfixes and started support for optgroups
1 parent 9c657bc commit ca659d5

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

src/dform.extensions.js

+11-6
Original file line numberDiff line numberDiff line change
@@ -592,12 +592,17 @@
592592
*/
593593
function _getTranslate(options)
594594
{
595-
var elements = options.split('.');
596-
if (elements.length > 1) {
597-
var area = elements.shift();
598-
var translations = jQuery.global.localize(area);
599-
if (translations) {
600-
return $.getValueAt(translations, elements);
595+
if ($.isFunction(options.split))
596+
{
597+
var elements = options.split('.');
598+
if (elements.length > 1)
599+
{
600+
var area = elements.shift();
601+
var translations = jQuery.global.localize(area);
602+
if (translations)
603+
{
604+
return $.getValueAt(translations, elements);
605+
}
601606
}
602607
}
603608
return false;

src/dform.subscribers.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,7 @@
668668
options : function(options, type)
669669
{
670670
var scoper = $(this);
671-
if (type == "select") // Options for select elements
671+
if (type == "select" || type == "optgroup") // Options for select elements
672672
{
673673
// TODO optgroup
674674
$.each(options, function(value, content)

0 commit comments

Comments
 (0)