summaryrefslogtreecommitdiff
path: root/views/js/editable.js
diff options
context:
space:
mode:
Diffstat (limited to 'views/js/editable.js')
-rw-r--r--views/js/editable.js19
1 files changed, 18 insertions, 1 deletions
diff --git a/views/js/editable.js b/views/js/editable.js
index 9717064..353c576 100644
--- a/views/js/editable.js
+++ b/views/js/editable.js
@@ -47,6 +47,23 @@
opt.value = value;
}
+ else if (options.type == "select" && typeof options.data == "object")
+ {
+
+ var value = 0;
+ var strValue = jQuery(this).html();
+
+ for (var i in options.data)
+ {
+
+ if (options.data[i] == strValue) value = i;
+
+ }
+
+ opt.source = options.data;
+ opt.value = value
+
+ }
else if (options.type == 'multiarray')
{
@@ -72,7 +89,7 @@
opt.source = ar;
opt.type = 'select';
- }
+ }
else if (options.type == 'string' && typeof options.data == "string")
{