mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-25 17:33:49 +01:00
Don't pass settings when resizing, moving, or removing a portlet, they're not needed.
This commit is contained in:
parent
733fd41a45
commit
eb0a91d3fe
@ -126,7 +126,7 @@ var et2_portlet = et2_valueWidget.extend(
|
|||||||
stop: function(event, ui) {
|
stop: function(event, ui) {
|
||||||
self.set_width(Math.round(ui.size.width / self.GRID));
|
self.set_width(Math.round(ui.size.width / self.GRID));
|
||||||
self.set_height(Math.round(ui.size.height / self.GRID));
|
self.set_height(Math.round(ui.size.height / self.GRID));
|
||||||
self.egw().jsonq("home.home_ui.ajax_set_properties",[self.id, self.options.settings,{
|
self.egw().jsonq("home.home_ui.ajax_set_properties",[self.id, {},{
|
||||||
width: self.options.width,
|
width: self.options.width,
|
||||||
height: self.options.height
|
height: self.options.height
|
||||||
}],
|
}],
|
||||||
@ -267,7 +267,10 @@ var et2_portlet = et2_valueWidget.extend(
|
|||||||
// Save settings - server might reply with new content if the portlet needs an update,
|
// Save settings - server might reply with new content if the portlet needs an update,
|
||||||
// but ideally it doesn't
|
// but ideally it doesn't
|
||||||
this.div.addClass("loading");
|
this.div.addClass("loading");
|
||||||
this.egw().jsonq("home.home_ui.ajax_set_properties",[this.id, this.options.settings || {}, value,this.settings?this.settings.group:false],
|
|
||||||
|
// Pass updated settings, unless we're removing
|
||||||
|
var settings = value == '~remove~' ? {} : this.options.settings || {}
|
||||||
|
this.egw().jsonq("home.home_ui.ajax_set_properties",[this.id, settings, value,this.settings?this.settings.group:false],
|
||||||
function(data) {
|
function(data) {
|
||||||
// This section not for us
|
// This section not for us
|
||||||
if(!data || typeof data.attributes == 'undefined') return false;
|
if(!data || typeof data.attributes == 'undefined') return false;
|
||||||
|
@ -419,7 +419,7 @@ app.classes.home = AppJS.extend(
|
|||||||
var widget = window.app.home.portlet_container.getWidgetById(changed[key].id);
|
var widget = window.app.home.portlet_container.getWidgetById(changed[key].id);
|
||||||
if(!widget || widget == window.app.home.portlet_container) continue;
|
if(!widget || widget == window.app.home.portlet_container) continue;
|
||||||
|
|
||||||
egw().jsonq("home.home_ui.ajax_set_properties",[changed[key].id, widget.options.settings,{
|
egw().jsonq("home.home_ui.ajax_set_properties",[changed[key].id, {},{
|
||||||
row: changed[key].row,
|
row: changed[key].row,
|
||||||
col: changed[key].col
|
col: changed[key].col
|
||||||
},widget.settings?widget.settings.group:false],
|
},widget.settings?widget.settings.group:false],
|
||||||
|
Loading…
Reference in New Issue
Block a user