Merge pull request #482 from halkyon/mateusz-entwines6

BUGFIX: add missing onunmatches
This commit is contained in:
Sean Harvey 2012-05-22 21:25:31 -07:00
commit 4267c0312a
21 changed files with 138 additions and 34 deletions

View File

@ -59,7 +59,6 @@
onunmatch: function() {
this._super();
},
/**
* Function: onsubmit
*

View File

@ -60,7 +60,9 @@
this._super();
},
onunmatch: function() {
this._super();
},
/**
* Updates the select box state according to the current view mode.
*/
@ -292,7 +294,9 @@
this.trigger('change');
this._super();
},
onunmatch: function() {
this._super();
},
/**
* Function: onchange
*

View File

@ -209,6 +209,9 @@
var tabs = this.find("ul:first").children('li');
if(tabs.length == 1) this.find('ul:first').hide();
this._super();
},
onunmatch: function() {
this._super();
}
});

View File

@ -105,7 +105,9 @@
this._super();
},
onunmatch: function() {
this._super();
},
updateItems: function() {
// Hide "edit page" commands unless the section is activated
var editPageItem = this.find('#Menu-CMSMain');
@ -152,6 +154,9 @@
}
this._super();
},
onunmatch: function() {
this._super();
},
toggle: function() {
this[this.hasClass('opened') ? 'close' : 'open']();
},

View File

@ -62,7 +62,9 @@
this._super();
},
onunmatch: function() {
this._super();
},
/**
* @param {Boolean} TRUE to expand, FALSE to collapse.
* @param {Boolean} TRUE means that events won't be fired, which is useful for the component initialization phase.

View File

@ -16,6 +16,9 @@
//
// this._setupPinging();
// },
// onunmatch: function() {
// this._super();
// }
/**
* Function: _setupPinging

View File

@ -89,7 +89,9 @@
this._super();
},
onunmatch: function() {
this._super();
},
loadUrl: function(url) {
this.find('iframe').attr('src', url);
},
@ -201,6 +203,9 @@
onmatch: function() {
this.find('a').text('<');
this._super();
},
onunmatch: function() {
this._super();
}
});
@ -219,6 +224,9 @@
onmatch: function() {
this.find('a').text('>');
this._super();
},
onunmatch: function() {
this._super();
}
});
@ -256,6 +264,9 @@
this.find('.cms-preview-watermark').show();
this.find('.active .cms-preview-watermark').hide();
this._super();
},
onunmatch: function() {
this._super();
}
});

View File

@ -332,6 +332,9 @@
this.redraw();
this._super();
},
onunmatch: function() {
this._super();
},
onclick: function(e) {
this.redraw();
},

View File

@ -120,6 +120,9 @@ jQuery.noConflict();
this._super();
},
onunmatch: function() {
this._super();
},
redraw: function() {
// Move from inner to outer layouts. Some of the elements might not exist.
@ -313,6 +316,9 @@ jQuery.noConflict();
onmatch: function() {
if(!this.hasClass('ss-ui-button')) this.addClass('ss-ui-button');
this._super();
},
onunmatch: function() {
this._super();
}
});
@ -321,6 +327,9 @@ jQuery.noConflict();
onmatch: function() {
if(!this.data('button')) this.button();
this._super();
},
onunmatch: function() {
this._super();
}
});
@ -401,6 +410,9 @@ jQuery.noConflict();
this._super();
this.setUUID(new Date().getTime());
},
onunmatch: function() {
this._super();
},
onclick: function() {
this._super();
@ -437,6 +449,9 @@ jQuery.noConflict();
this.redraw();
this._super();
},
onunmatch: function() {
this._super();
},
redraw: function() {
// Remove whitespace to avoid gaps with inline elements
this.contents().filter(function() {
@ -475,6 +490,9 @@ jQuery.noConflict();
// // Unfortunately jQuery UI only allows configuration of icon images, not sprites
// this.next('button').button('option', 'icons', {primary : 'ui-icon-calendar'});
this._super();
},
onunmatch: function() {
this._super();
}
});
@ -505,6 +523,9 @@ jQuery.noConflict();
// Apply Chosen
applyChosen(this);
this._super();
},
onunmatch: function() {
this._super();
}
});
@ -573,6 +594,9 @@ jQuery.noConflict();
$(this.attr('href')).hide();
},
onunmatch: function() {
this._super();
},
onclick: function(e) {
$(this.attr('href')).toggle();
e.preventDefault();

View File

@ -11,6 +11,9 @@
this._super();
this.hide();
},
onunmatch: function() {
this._super();
}
});

View File

@ -25,6 +25,9 @@
return false;
});
this._super();
},
onunmatch: function() {
this._super();
}
});

View File

@ -28,6 +28,9 @@
// TODO entwine can't seem to bind to iframe load events
$(this).bind('load', refreshAfterImport);
},
onunmatch: function() {
this._super();
}
});
});
@ -46,6 +49,9 @@
this._super();
},
onunmatch: function() {
this._super();
},
/**
* Function: onclick
*/

View File

@ -13,7 +13,6 @@
onunmatch: function() {
this._super();
},
redraw: function() {
this.addClass('ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-panel ui-corner-bottom');
this.find('ul').addClass('ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all');

View File

@ -6,12 +6,14 @@
// Hide the "second step" part until we're actually uploading
this.find('.ss-uploadfield-editandorganize').hide();
},
onunmatch: function() {
this._super();
},
onfileuploadadd: function(e) {
this.find('.ss-uploadfield-editandorganize').show();
},
onfileuploadstart: function(e) {
this.find('.ss-uploadfield-editandorganize').show();
}
});
}(jQuery));

View File

@ -152,6 +152,9 @@
this._super();
this.setUUID(new Date().getTime());
},
onunmatch: function() {
this._super();
},
onclick: function(e){
var btn = this.closest(':button'), grid = this.getGridField(),
form = this.closest('form'), data = form.find(':input').serialize();
@ -172,12 +175,14 @@
$('.ss-gridfield-print-iframe').entwine({
onmatch: function(){
this.hide().bind('load', function()
{
this.hide().bind('load', function() {
this.focus();
var ifWin = this.contentWindow || this;
ifWin.print();
});;
},
onunmatch: function() {
this._super();
}
});
@ -247,7 +252,7 @@
* rather than the whole form.
*/
$('.ss-gridfield .filter-header :input').entwine({
onmatch: function(){
onmatch: function() {
var filterbtn = this.closest('.fieldgroup').find('.ss-gridfield-button-filter'),
resetbtn = this.closest('.fieldgroup').find('.ss-gridfield-button-reset');
@ -257,6 +262,9 @@
}
this._super();
},
onunmatch: function() {
this._super();
},
onkeydown: function(e) {
// Skip reset button events, they should trigger default submission
if(this.closest('.ss-gridfield-button-reset').length) return;

View File

@ -230,7 +230,12 @@ ss.editorWrappers['default'] = ss.editorWrappers.tinyMCE;
this._super();
},
onunmatch: function() {
// TODO Throws exceptions in Firefox, most likely due to the element being removed from the DOM at this point
// var ed = tinyMCE.get(this.attr('id'));
// if(ed) ed.remove();
this._super();
},
redraw: function() {
// Using a global config (generated through HTMLEditorConfig PHP logic)
var config = ssTinyMceConfig, self = this, ed = this.getEditor();
@ -298,13 +303,6 @@ ss.editorWrappers['default'] = ss.editorWrappers.tinyMCE;
}
});
}
},
onunmatch: function() {
// TODO Throws exceptions in Firefox, most likely due to the element being removed from the DOM at this point
// var ed = tinyMCE.get(this.attr('id'));
// if(ed) ed.remove();
this._super();
}
});
@ -315,6 +313,9 @@ ss.editorWrappers['default'] = ss.editorWrappers.tinyMCE;
this._super();
},
onunmatch: function() {
this._super();
},
getForm: function() {
return this.find('form');
},
@ -358,6 +359,9 @@ ss.editorWrappers['default'] = ss.editorWrappers.tinyMCE;
this.redraw();
},
onunmatch: function() {
this._super();
},
redraw: function() {
},
resetFields: function() {
@ -992,6 +996,9 @@ ss.editorWrappers['default'] = ss.editorWrappers.tinyMCE;
if(this.attr('name') == 'Width') this.closest('.ss-htmleditorfield-file').updateDimensions('Width', 600);
},
onunmatch: function() {
this._super();
},
onfocusout: function(e) {
this.closest('.ss-htmleditorfield-file').updateDimensions(this.attr('name'));
}
@ -1021,6 +1028,9 @@ ss.editorWrappers['default'] = ss.editorWrappers.tinyMCE;
fileList.setState('ParentID', self.getValue());
fileList.reload();
});
},
onunmatch: function() {
this._super();
}
});

View File

@ -13,6 +13,9 @@
this.toggleCheckboxes();
},
onunmatch: function() {
this._super();
},
onclick: function(e) {
this.toggleCheckboxes();
},
@ -62,6 +65,9 @@
this._super();
},
onunmatch: function() {
this._super();
},
onclick: function(e) {
var checkboxes = this.getCheckboxesExceptThisOne();
if($(this).is(':checked')) {

View File

@ -12,7 +12,6 @@
onunmatch: function() {
this._super();
},
redrawTabs: function() {
this.rewriteHashlinks();
this.tabs();

View File

@ -44,6 +44,9 @@
this.getPanel().hide();
this._super();
},
onunmatch: function() {
this._super();
},
getPanel: function() {
return this.find('.treedropdownfield-panel');
},
@ -268,6 +271,9 @@
this.setTitle(title ? title : strings.searchFieldTitle);
},
onunmatch: function() {
this._super();
},
setTitle: function(title) {
if(!title && title !== '') title = strings.fieldTitle;

View File

@ -160,7 +160,9 @@
this._super();
},
onunmatch: function() {
this._super();
},
openSelectDialog: function() {
// Create dialog and load iframe
var self = this, config = this.getConfig(), dialogId = 'ss-uploadfield-dialog-' + this.attr('id'), dialog = jQuery('#' + dialogId);
@ -387,6 +389,9 @@
$(this).parent().removeClass('loading');
});
this._super();
},
onunmatch: function() {
this._super();
}
});
$('div.ss-upload .ss-uploadfield-fromfiles').entwine({

View File

@ -12,6 +12,9 @@
fileList.setState('ParentID', self.getValue());
fileList.reload();
});
},
onunmatch: function() {
this._super();
}
});
});