BUGFIX: #4841 Changed live event binding to concrete event binding. Live was binding the event to document object, resulting in the handler being executed on any click within the page.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@95699 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Mateusz Uzdowski 2009-12-16 22:25:05 +00:00
parent 14d88ddbb1
commit bee365095d

View File

@ -216,23 +216,6 @@
* All forms loaded via ajax from the Form_SideReports dropdown.
*/
$("#SideReportsHolder form").concrete({
onmatch: function() {
// links in results
this.find('ul a').live('click', function(e) {
var $link = $(this);
$link.addClass('loading');
jQuery('#Form_EditForm').concrete('ss').loadForm(
$(this).attr('href'),
function(e) {
$link.removeClass('loading');
}
);
return false;
});
this._super();
},
onsubmit: function() {
var self = this;
@ -257,6 +240,20 @@
});
$("#SideReportsHolder form ul a").concrete({
onclick: function() {
var $link = $(this);
$link.addClass('loading');
jQuery('#Form_EditForm').concrete('ss').loadForm(
$(this).attr('href'),
function(e) {
$link.removeClass('loading');
}
);
return false;
}
});
/**
* @class Simple form showing versions of a specific page.
* @name ss.Form_VersionsForm