From d2bac9d6548a748b6996427f2857505be6900052 Mon Sep 17 00:00:00 2001 From: nathangray Date: Wed, 10 Apr 2019 10:53:36 -0600 Subject: [PATCH] Etemplate - allow trees to be readonly --- api/js/etemplate/et2_widget_tree.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/api/js/etemplate/et2_widget_tree.js b/api/js/etemplate/et2_widget_tree.js index 1d9bed81b6..b864948a05 100644 --- a/api/js/etemplate/et2_widget_tree.js +++ b/api/js/etemplate/et2_widget_tree.js @@ -257,6 +257,10 @@ var et2_tree = (function(){ "use strict"; return et2_inputWidget.extend( close = this._rel_url(close); widget.input.setImageArrays('minus', close, close, close, close, close); } + + this._install_handler('onBeforeCheck', function(id, state) { + return !this.options.readonly; + }.bind(this)); }, /**