mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-11 00:18:25 +01:00
Avoid some init / destroy errors in color picker popup
This commit is contained in:
parent
84b3edbfcb
commit
d394cca06f
@ -57,12 +57,21 @@ var et2_color = et2_inputWidget.extend({
|
|||||||
// Translations
|
// Translations
|
||||||
for(var key in jQuery.fn.jPicker.defaults.localization.text)
|
for(var key in jQuery.fn.jPicker.defaults.localization.text)
|
||||||
{
|
{
|
||||||
jQuery.fn.jPicker.defaults.localization.text[key] = this.egw().lang(jQuery.fn.jPicker.defaults.localization.text[key]);
|
if(jQuery.fn.jPicker.defaults.localization.text[key])
|
||||||
|
{
|
||||||
|
jQuery.fn.jPicker.defaults.localization.text[key] = this.egw().lang(jQuery.fn.jPicker.defaults.localization.text[key]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
for(var key in jQuery.fn.jPicker.defaults.localization.tooltips)
|
for(var key in jQuery.fn.jPicker.defaults.localization.tooltips)
|
||||||
{
|
{
|
||||||
jQuery.fn.jPicker.defaults.localization.tooltips[key].ok = this.egw().lang(jQuery.fn.jPicker.defaults.localization.tooltips[key].ok);
|
if(jQuery.fn.jPicker.defaults.localization.tooltips[key].ok)
|
||||||
jQuery.fn.jPicker.defaults.localization.tooltips[key].cancel = this.egw().lang(jQuery.fn.jPicker.defaults.localization.tooltips[key].cancel);
|
{
|
||||||
|
jQuery.fn.jPicker.defaults.localization.tooltips[key].ok = this.egw().lang(jQuery.fn.jPicker.defaults.localization.tooltips[key].ok);
|
||||||
|
}
|
||||||
|
if(jQuery.fn.jPicker.defaults.localization.tooltips[key].cancel)
|
||||||
|
{
|
||||||
|
jQuery.fn.jPicker.defaults.localization.tooltips[key].cancel = this.egw().lang(jQuery.fn.jPicker.defaults.localization.tooltips[key].cancel);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.options = jQuery.extend({}, this.defaults, this.options);
|
this.options = jQuery.extend({}, this.defaults, this.options);
|
||||||
|
|
||||||
@ -120,14 +129,16 @@ var et2_color = et2_inputWidget.extend({
|
|||||||
title: self.options.statustext ? self.options.statustext : self.egw().lang('Select color'),
|
title: self.options.statustext ? self.options.statustext : self.egw().lang('Select color'),
|
||||||
autoOpen: false,
|
autoOpen: false,
|
||||||
resizable: false,
|
resizable: false,
|
||||||
width: self.get_jPicker() ? self.get_jPicker().width : "auto"
|
width: "auto"
|
||||||
});
|
});
|
||||||
|
|
||||||
// Hide original move bar
|
// Hide original move bar
|
||||||
jQuery('table.jPicker .Move').hide();
|
jQuery('table.jPicker .Move').hide();
|
||||||
|
|
||||||
// Trigger dialog opening
|
// Trigger dialog opening
|
||||||
jQuery('.Image',self.$node.next()).click(function() {jQuery("table.jPicker").dialog("open")});
|
jQuery('.Image',self.$node.next()).click(function() {
|
||||||
|
jQuery("table.jPicker").dialog("open");
|
||||||
|
});
|
||||||
},500);
|
},500);
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
|
@ -1852,7 +1852,7 @@
|
|||||||
commitCallback = null;
|
commitCallback = null;
|
||||||
cancelCallback = null;
|
cancelCallback = null;
|
||||||
liveCallback = null;
|
liveCallback = null;
|
||||||
container.html('');
|
container.remove();
|
||||||
for (i = 0; i < List.length; i++) if (List[i] == $this) List.splice(i, 1);
|
for (i = 0; i < List.length; i++) if (List[i] == $this) List.splice(i, 1);
|
||||||
},
|
},
|
||||||
images = settings.images, // local copies for YUI compressor
|
images = settings.images, // local copies for YUI compressor
|
||||||
|
Loading…
Reference in New Issue
Block a user