Etemplate - if a button has an image but no readonly image set, use the normal image when button is readonly

This commit is contained in:
nathangray 2019-02-28 09:30:47 -07:00
parent 09e90b1235
commit b19e71b28d

View File

@ -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(!this.isInTree() || !this.options.background_image && this.image == null) return;
if (typeof _image == 'undefined') 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 // Silently blank for percentages instead of warning about missing image - use a progress widget
if(_image.match(/^[0-9]+\%$/)) if(_image.match(/^[0-9]+\%$/))