mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-23 07:09:20 +01:00
Revert "Fix splitter widget did not restore size from preference"
This reverts commit e8635be8c1
.
This commit is contained in:
parent
812e2a4b31
commit
e7dc51ad14
@ -161,12 +161,10 @@ export class et2_split extends et2_DOMWidget implements et2_IResizeable, et2_IPr
|
||||
super.doLoadingFinished();
|
||||
|
||||
// Not done yet, but widget will let you know
|
||||
let p = new Promise((resolve) =>
|
||||
{
|
||||
return new Promise((resolve) => {
|
||||
// Use a timeout to give the children a chance to finish
|
||||
window.setTimeout(() => this._init_splitter(resolve), 1);
|
||||
window.setTimeout(() => this._init_splitter(resolve),1);
|
||||
});
|
||||
return p;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -218,17 +216,12 @@ export class et2_split extends et2_DOMWidget implements et2_IResizeable, et2_IPr
|
||||
let pref = this.egw().preference('splitter-size-' + this.id, this.egw().getAppName());
|
||||
if(pref)
|
||||
{
|
||||
// Change from percent back to numeric
|
||||
if(typeof pref.sizeLeft !== "undefined")
|
||||
if(this.orientation == "v" && pref['sizeLeft'] < this.dynheight.outerNode.width() ||
|
||||
this.orientation == "h" && pref['sizeTop'] < this.dynheight.outerNode.height())
|
||||
{
|
||||
pref.sizeLeft = ((parseFloat(pref.sizeLeft) / 100) * widget.dynheight.outerNode.width());
|
||||
}
|
||||
if(typeof pref.sizeTop !== "undefined")
|
||||
{
|
||||
pref.sizeTop = ((parseFloat(pref.sizeTop) / 100) * widget.dynheight.outerNode.height());
|
||||
}
|
||||
options = jQuery.extend(options, pref);
|
||||
this.prefSize = pref[this.orientation == "v" ? 'sizeLeft' : 'sizeTop'];
|
||||
this.prefSize = pref[this.orientation == "v" ?'sizeLeft' : 'sizeTop'];
|
||||
}
|
||||
}
|
||||
// If there is no preference yet, set it to half size
|
||||
// Otherwise the right pane gets the fullsize
|
||||
|
@ -646,10 +646,7 @@ export class etemplate2
|
||||
egw.window.console.groupEnd();
|
||||
}
|
||||
|
||||
// Wait for everything to be loaded, then finish it up. Use timeout to give anything else a chance
|
||||
// to run.
|
||||
setTimeout(() =>
|
||||
{
|
||||
// Wait for everything to be loaded, then finish it up
|
||||
Promise.all(deferred).then(() =>
|
||||
{
|
||||
egw.debug("log", "Finished loading %s, triggering load event", _name);
|
||||
@ -737,7 +734,6 @@ export class etemplate2
|
||||
gen_time_div.append('<span class="et2RenderTime">' + egw.lang('eT2 rendering took %1s', '' + ((end_time - start_time) / 1000)) + '</span>');
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user