forked from extern/egroupware
Give widget color dialog unique class in order to identify it later for binding click handler to picker span.
-Fix the bug, color picker opens other colorpickers dialog which are in the same template.
This commit is contained in:
parent
e1b2df5609
commit
b0e4655eff
@ -138,13 +138,21 @@ var et2_color = et2_inputWidget.extend(
|
||||
resizable: false,
|
||||
width: "auto"
|
||||
});
|
||||
|
||||
jQuery('table.jPicker').each(function(){
|
||||
if (!this.getAttribute('class').match(/jPickerColorIden/))
|
||||
{
|
||||
//Add an identifier to dialog for later on to bind a click handler to it
|
||||
//as jquery dialog has already an unique id, we make a unique class identifier with help of the widget id
|
||||
jQuery(this).addClass('jPickerColorIden-'+self.id);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
// 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("table.jPickerColorIden-"+self.id).dialog("open");
|
||||
});
|
||||
},500);
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user