mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-01 02:49:28 +01:00
fixed color-picker shown twice if used in a tab-widget after apply, backport of
r48992: disabling immediate direct call to loadingFinished() for selected tab seems to have no recognisable impact and some widgets, eg. color-picker have problems with calling doLoadingFinished twice r49047: change tab loading again to initialise visible tab immediatly and gard et2_color / jPicker against being initialised twice
This commit is contained in:
parent
8ef066f283
commit
b1f48200e6
@ -99,7 +99,11 @@ var et2_color = et2_inputWidget.extend(
|
|||||||
this._super.call(this, arguments);
|
this._super.call(this, arguments);
|
||||||
},
|
},
|
||||||
|
|
||||||
doLoadingFinished: function() {
|
doLoadingFinished: function()
|
||||||
|
{
|
||||||
|
// as tabs can cause a double loading, we check here if jPicker is already initialised
|
||||||
|
if (this.get_jPicker()) return;
|
||||||
|
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
|
|
||||||
var self = this;
|
var self = this;
|
||||||
@ -163,14 +167,17 @@ var et2_color = et2_inputWidget.extend(
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the jPicker object for this widget, so further things can be done to it
|
* Get the jPicker object for this widget, so further things can be done to it
|
||||||
|
*
|
||||||
|
* Id of jPicker node is either our id+'_jPicker' or our dom_id (no idea why).
|
||||||
*/
|
*/
|
||||||
get_jPicker: function() {
|
get_jPicker: function() {
|
||||||
if(jQuery.jPicker.List.length)
|
for(var i=0; i < jQuery.jPicker.List.length; ++i)
|
||||||
{
|
{
|
||||||
var self = this;
|
var node = jQuery.jPicker.List[i];
|
||||||
return jQuery(jQuery.jPicker.List.filter(function(elem,index) {
|
if (node && (node.id == this.id+'_jPicker' || node.id == this.dom_id))
|
||||||
return (elem && elem.id == self.id + "_jPicker");
|
{
|
||||||
}))[0];
|
return node;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
},
|
},
|
||||||
|
@ -242,6 +242,7 @@ var et2_tabbox = et2_valueWidget.extend([et2_IInput],
|
|||||||
window.setTimeout(function() {
|
window.setTimeout(function() {
|
||||||
for (var i = 0; i < tabs.tabData.length; i++)
|
for (var i = 0; i < tabs.tabData.length; i++)
|
||||||
{
|
{
|
||||||
|
if (i == tabs.selected_index) continue;
|
||||||
tabs._loadTab(i,promises);
|
tabs._loadTab(i,promises);
|
||||||
}
|
}
|
||||||
jQuery.when.apply(jQuery,promises).then(function() {
|
jQuery.when.apply(jQuery,promises).then(function() {
|
||||||
|
Loading…
Reference in New Issue
Block a user