mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-23 07:09:20 +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
|
||||
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)
|
||||
{
|
||||
jQuery.fn.jPicker.defaults.localization.tooltips[key].ok = this.egw().lang(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);
|
||||
if(jQuery.fn.jPicker.defaults.localization.tooltips[key].ok)
|
||||
{
|
||||
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);
|
||||
|
||||
@ -120,14 +129,16 @@ var et2_color = et2_inputWidget.extend({
|
||||
title: self.options.statustext ? self.options.statustext : self.egw().lang('Select color'),
|
||||
autoOpen: false,
|
||||
resizable: false,
|
||||
width: self.get_jPicker() ? self.get_jPicker().width : "auto"
|
||||
width: "auto"
|
||||
});
|
||||
|
||||
// Hide original move bar
|
||||
jQuery('table.jPicker .Move').hide();
|
||||
|
||||
// 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);
|
||||
return true;
|
||||
},
|
||||
|
@ -1852,7 +1852,7 @@
|
||||
commitCallback = null;
|
||||
cancelCallback = null;
|
||||
liveCallback = null;
|
||||
container.html('');
|
||||
container.remove();
|
||||
for (i = 0; i < List.length; i++) if (List[i] == $this) List.splice(i, 1);
|
||||
},
|
||||
images = settings.images, // local copies for YUI compressor
|
||||
@ -2083,4 +2083,4 @@
|
||||
}
|
||||
}
|
||||
};
|
||||
})(jQuery, '1.1.6');
|
||||
})(jQuery, '1.1.6');
|
||||
|
Loading…
Reference in New Issue
Block a user