Skip to content
Browse files

Merge pull request #482 from halkyon/mateusz-entwines6

BUGFIX: add missing onunmatches
  • Loading branch information...
2 parents fa6c39b + 8d469b6 commit 4267c0312a9141c26b38dd8b839c7bad33007ccf @halkyon halkyon committed
View
1 admin/javascript/LeftAndMain.AddForm.js
@@ -59,7 +59,6 @@
onunmatch: function() {
this._super();
},
-
/**
* Function: onsubmit
*
View
8 admin/javascript/LeftAndMain.BatchActions.js
@@ -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
3 admin/javascript/LeftAndMain.EditForm.js
@@ -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
7 admin/javascript/LeftAndMain.Menu.js
@@ -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
6 admin/javascript/LeftAndMain.Panel.js
@@ -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.
@@ -138,4 +140,4 @@
}
});
});
-}(jQuery));
+}(jQuery));
View
7 admin/javascript/LeftAndMain.Ping.js
@@ -16,7 +16,10 @@
//
// this._setupPinging();
// },
-
+ // onunmatch: function() {
+ // this._super();
+ // }
+
/**
* Function: _setupPinging
*
@@ -47,4 +50,4 @@
}
});
});
-}(jQuery));
+}(jQuery));
View
15 admin/javascript/LeftAndMain.Preview.js
@@ -89,8 +89,10 @@
this._super();
},
-
- loadUrl: function(url) {
+ 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
3 admin/javascript/LeftAndMain.Tree.js
@@ -332,6 +332,9 @@
this.redraw();
this._super();
},
+ onunmatch: function() {
+ this._super();
+ },
onclick: function(e) {
this.redraw();
},
View
26 admin/javascript/LeftAndMain.js
@@ -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.
@@ -314,6 +317,9 @@ jQuery.noConflict();
if(!this.hasClass('ss-ui-button')) this.addClass('ss-ui-button');
this._super();
+ },
+ onunmatch: function() {
+ this._super();
}
});
@@ -322,6 +328,9 @@ jQuery.noConflict();
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() {
@@ -476,6 +491,9 @@ jQuery.noConflict();
// this.next('button').button('option', 'icons', {primary : 'ui-icon-calendar'});
this._super();
+ },
+ onunmatch: function() {
+ this._super();
}
});
@@ -506,8 +524,11 @@ jQuery.noConflict();
applyChosen(this);
this._super();
+ },
+ onunmatch: function() {
+ this._super();
}
- });
+ });
$(".cms-panel-layout").entwine({
redraw: function() {
@@ -573,6 +594,9 @@ jQuery.noConflict();
$(this.attr('href')).hide();
},
+ onunmatch: function() {
+ this._super();
+ },
onclick: function(e) {
$(this.attr('href')).toggle();
e.preventDefault();
View
5 admin/javascript/MemberImportForm.js
@@ -11,6 +11,9 @@
this._super();
this.hide();
+ },
+ onunmatch: function() {
+ this._super();
}
});
@@ -29,4 +32,4 @@
});
});
-}(jQuery));
+}(jQuery));
View
5 admin/javascript/ModelAdmin.js
@@ -26,7 +26,10 @@
});
this._super();
+ },
+ onunmatch: function() {
+ this._super();
}
});
});
-})(jQuery);
+})(jQuery);
View
8 admin/javascript/SecurityAdmin.js
@@ -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
*/
@@ -75,4 +81,4 @@
});
});
-}(jQuery));
+}(jQuery));
View
1 admin/javascript/ssui.core.js
@@ -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
6 javascript/AssetUploadField.js
@@ -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));
+}(jQuery));
View
14 javascript/GridField.js
@@ -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
30 javascript/HtmlEditorField.js
@@ -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();
@@ -274,11 +279,11 @@ ss.editorWrappers['default'] = ss.editorWrappers.tinyMCE;
this.openDialog('link');
},
openMediaDialog: function() {
- this.openDialog('media');
+ this.openDialog('media');
},
openDialog: function(type) {
var capitalize = function(text) {
- return text.charAt(0).toUpperCase() + text.slice(1).toLowerCase();
+ return text.charAt(0).toUpperCase() + text.slice(1).toLowerCase();
};
var url = $('#cms-editor-dialogs').data('url' + capitalize(type) + 'form'),
@@ -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
8 javascript/PermissionCheckboxSetField.js
@@ -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')) {
@@ -79,4 +85,4 @@
});
});
-}(jQuery));
+}(jQuery));
View
1 javascript/TabSet.js
@@ -12,7 +12,6 @@
onunmatch: function() {
this._super();
},
-
redrawTabs: function() {
this.rewriteHashlinks();
this.tabs();
View
8 javascript/TreeDropdownField.js
@@ -29,7 +29,7 @@
* @todo Expand title height to fit all elements
*/
$('.TreeDropdownField').entwine({
- onmatch: function() {
+ onmatch: function() {
this.append(
'<span class="treedropdownfield-title"></span>' +
'<div class="treedropdownfield-toggle-panel-link"><a href="#" class="ui-icon ui-icon-triangle-1-s"></a></div>' +
@@ -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
7 javascript/UploadField.js
@@ -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
3 javascript/UploadField_select.js
@@ -12,6 +12,9 @@
fileList.setState('ParentID', self.getValue());
fileList.reload();
});
+ },
+ onunmatch: function() {
+ this._super();
}
});
});

0 comments on commit 4267c03

Please sign in to comment.
Something went wrong with that request. Please try again.