mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-18 11:21:23 +01:00
fixed creating or deleting favorites in calendar does not work: was caused by sidebox not initialised as not yet loaded, now calling _init_sidebox from framework, also need to add a click handler for favorites as initialising sidebox removes one installed from template
This commit is contained in:
parent
7386333c10
commit
3a5ece79a7
@ -298,6 +298,15 @@ var AppJS = Class.extend(
|
|||||||
.on("mouseenter","div.ui-icon-trash", function() {$j(this).wrap("<span class='ui-state-active'/>");})
|
.on("mouseenter","div.ui-icon-trash", function() {$j(this).wrap("<span class='ui-state-active'/>");})
|
||||||
.on("mouseleave","div.ui-icon-trash", function() {$j(this).unwrap();})
|
.on("mouseleave","div.ui-icon-trash", function() {$j(this).unwrap();})
|
||||||
.on("click","div.ui-icon-trash", this, this.delete_favorite)
|
.on("click","div.ui-icon-trash", this, this.delete_favorite)
|
||||||
|
// need to install a favorite handler, as we switch original one off with .off()
|
||||||
|
.on('click','li[data-id]', this, function(){
|
||||||
|
var href = jQuery('a[href^="javascript:"]', this).prop('href');
|
||||||
|
var matches = href.match(/^javascript:([^\(]+)\((.*)?\);?$/);
|
||||||
|
if (matches.length > 1 && matches[2] !== undefined)
|
||||||
|
{
|
||||||
|
return self.setState.call(self, JSON.parse(matches[2]));
|
||||||
|
}
|
||||||
|
})
|
||||||
.addClass("ui-helper-clearfix");
|
.addClass("ui-helper-clearfix");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user