From 67081ed4cb2cfdc54f9942bab9c84ddb9a7957dd Mon Sep 17 00:00:00 2001 From: nathangray Date: Thu, 28 Feb 2019 09:30:47 -0700 Subject: [PATCH] Etemplate - if a button has an image but no readonly image set, use the normal image when button is readonly --- api/js/etemplate/et2_widget_button.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/js/etemplate/et2_widget_button.js b/api/js/etemplate/et2_widget_button.js index a3a476dea5..c93e705264 100644 --- a/api/js/etemplate/et2_widget_button.js +++ b/api/js/etemplate/et2_widget_button.js @@ -168,7 +168,7 @@ var et2_button = (function(){ "use strict"; return et2_baseWidget.extend([et2_II if(!this.isInTree() || !this.options.background_image && this.image == null) return; if (typeof _image == 'undefined') - _image = this.options.readonly ? this.options.ro_image : this.options.image; + _image = this.options.readonly ? (this.options.ro_image || this.options.image) : this.options.image; // Silently blank for percentages instead of warning about missing image - use a progress widget if(_image.match(/^[0-9]+\%$/))