From 2404ebda6e992202af9b7f77ec56be00f7d5714a Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Tue, 13 Jan 2015 22:00:12 +0000 Subject: [PATCH] Ignore some new attributes, preserve settings when value is not an object --- etemplate/js/et2_widget_portlet.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/etemplate/js/et2_widget_portlet.js b/etemplate/js/et2_widget_portlet.js index 038a957e96..ff6ab34dc4 100644 --- a/etemplate/js/et2_widget_portlet.js +++ b/etemplate/js/et2_widget_portlet.js @@ -60,8 +60,9 @@ var et2_portlet = et2_valueWidget.extend( }, "width": { "default": 2, "ignore": true}, "height": { "default": 1, "type": "integer"}, - "rows": {"ignore": true}, - "cols": {"ignore": true}, + "rows": {"ignore": true, default: et2_no_init}, + "cols": {"ignore": true, default: et2_no_init}, + "resize_ratio": {"ignore": true, default: et2_no_init}, // Portlets are explicitly sized "row": { "name": "Row", "description": "Home page location (row) - handled by home app", @@ -306,7 +307,10 @@ var et2_portlet = et2_valueWidget.extend( ); // Extend, not replace, because settings has types while value has just value - jQuery.extend(this.options.settings, value); + if(typeof value == 'object') + { + jQuery.extend(this.options.settings, value); + } }, /**