From 3c6130f7e664a465a6870c191b856d2beafded8c Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 21 Jul 2014 12:57:32 +0000 Subject: [PATCH] setting an (unlikely) custom delimiter, to allow to use "," in value, eg. folder-name, IF values are specified as array --- etemplate/js/et2_widget_tree.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/etemplate/js/et2_widget_tree.js b/etemplate/js/et2_widget_tree.js index ff039356c9..75b4616fb5 100644 --- a/etemplate/js/et2_widget_tree.js +++ b/etemplate/js/et2_widget_tree.js @@ -188,12 +188,15 @@ var et2_tree = et2_inputWidget.extend( image_path: widget.options.image_path, checkbox: widget.options.multiple }); + // to allow "," in value, eg. folder-names, IF value is specified as array + widget.input.dlmtr = ':}-*('; + if (widget.options.std_images) { widget.setImages.apply(widget, widget.options.std_images.split(',')); } // Add in the callback so we can keep the two in sync - widget.input.AJAX_callback = function(dxmlObject) { + widget.input.AJAX_callback = function(dxmlObject) { widget._dhtmlxtree_json_callback(JSON.parse(dxmlObject.xmlDoc.responseText), widget.input.lastLoadedXMLId); };