BUGFIX: add missing _super calls to all matchers and unmatchers

Otherwise some matchers might not be triggered as expected.
This commit is contained in:
Mateusz Uzdowski 2012-05-11 16:07:07 +12:00
parent 3d0876c8f5
commit 37399f88db
8 changed files with 26 additions and 8 deletions

View File

@ -234,8 +234,10 @@
$('.cms-content.loading,.cms-edit-form.loading,.cms-content-fields.loading,.cms-content-view.loading').entwine({
onmatch: function() {
this.append('<div class="cms-content-loading-overlay ui-widget-overlay-light"></div><div class="cms-content-loading-spinner"></div>');
this._super();
},
onunmatch: function() {
this._super();
this.find('.cms-content-loading-overlay,.cms-content-loading-spinner').remove();
}
});

View File

@ -150,6 +150,7 @@
if(this.find('ul').length) {
this.find('a:first').append('<span class="toggle-children"><span class="toggle-children-icon"></span></span>');
}
this._super();
},
toggle: function() {
this[this.hasClass('opened') ? 'close' : 'open']();
@ -238,4 +239,4 @@
});
});
}(jQuery));
}(jQuery));

View File

@ -193,21 +193,25 @@
$('.cms-preview.collapsed').entwine({
onmatch: function() {
this.find('a').text('<');
this._super();
}
});
$('.cms-preview.blocked').entwine({
onmatch: function() {
this.find('.cms-preview-overlay').show();
this._super();
},
onunmatch: function() {
this.find('.cms-preview-overlay').hide();
this._super();
}
});
$('.cms-preview.expanded').entwine({
onmatch: function() {
this.find('a').text('>');
this._super();
}
});
@ -244,6 +248,7 @@
this.find('.active a').removeClass('disabled');
this.find('.cms-preview-watermark').show();
this.find('.active .cms-preview-watermark').hide();
this._super();
}
});
@ -273,4 +278,4 @@
}
});
});
}(jQuery));
}(jQuery));

View File

@ -265,10 +265,8 @@
}
}
},
onunmatch: function() {
}
});
$('.cms-tree.multiple').entwine({

View File

@ -87,6 +87,8 @@ jQuery.noConflict();
'</span></p>'
).css('z-index', $('.ss-loading-screen').css('z-index')+1);
$('.loading-animation').remove();
this._super();
return;
}
@ -459,7 +461,10 @@ jQuery.noConflict();
$('.cms .field.date input.text').entwine({
onmatch: function() {
var holder = $(this).parents('.field.date:first'), config = holder.data();
if(!config.showcalendar) return;
if(!config.showcalendar) {
this._super();
return;
}
config.showOn = 'button';
if(config.locale && $.datepicker.regional[config.locale]) {
@ -485,7 +490,10 @@ jQuery.noConflict();
$('.cms .field.dropdown select, .cms .field select[multiple]').entwine({
onmatch: function() {
if(this.is('.no-chzn')) return;
if(this.is('.no-chzn')) {
this._super();
return;
}
// Explicitly disable default placeholder if no custom one is defined
if(!this.data('placeholder')) this.data('placeholder', ' ');

View File

@ -255,6 +255,7 @@
filterbtn.addClass('filtered');
resetbtn.addClass('filtered');
}
this._super();
},
onkeydown: function(e) {
// Skip reset button events, they should trigger default submission

View File

@ -355,6 +355,7 @@ ss.editorWrappers['default'] = ss.editorWrappers.tinyMCE;
this.getDialog().attr('title', titleEl.text());
this.setEditor(ss.editorWrappers['default']());
this._super();
},
redraw: function() {
},

View File

@ -222,11 +222,12 @@
});
$('div.ss-upload .ss-uploadfield-files .ss-uploadfield-item').entwine({
onmatch: function() {
this._super();
this.closest('.ss-upload').find('.ss-uploadfield-addfile').addClass('borderTop');
},
onunmatch: function() {
$('.ss-uploadfield-files:not(:has(.ss-uploadfield-item))').closest('.ss-upload').find('.ss-uploadfield-addfile').removeClass('borderTop');
this._super();
}
});
$('div.ss-upload .ss-uploadfield-startall').entwine({
@ -387,6 +388,7 @@
this.load(function() {
$(this).parent().removeClass('loading');
});
this._super();
}
});
$('div.ss-upload .ss-uploadfield-fromfiles').entwine({