mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #7345 from schellmax/patch-2
TreeDropdownField: replace onadd by onmatch
This commit is contained in:
commit
2e76936878
@ -47,7 +47,7 @@
|
|||||||
// XMLHttpRequest
|
// XMLHttpRequest
|
||||||
CurrentXhr: null,
|
CurrentXhr: null,
|
||||||
|
|
||||||
onadd: function() {
|
onmatch: function() {
|
||||||
this.append(
|
this.append(
|
||||||
'<span class="treedropdownfield-title"></span>' +
|
'<span class="treedropdownfield-title"></span>' +
|
||||||
'<div class="treedropdownfield-toggle-panel-link"><a href="#" class="ui-icon ui-icon-triangle-1-s"></a></div>' +
|
'<div class="treedropdownfield-toggle-panel-link"><a href="#" class="ui-icon ui-icon-triangle-1-s"></a></div>' +
|
||||||
@ -334,7 +334,7 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
$('.TreeDropdownField.searchable').entwine({
|
$('.TreeDropdownField.searchable').entwine({
|
||||||
onadd: function() {
|
onmatch: function() {
|
||||||
this._super();
|
this._super();
|
||||||
var title = ss.i18n._t('TreeDropdownField.ENTERTOSEARCH');
|
var title = ss.i18n._t('TreeDropdownField.ENTERTOSEARCH');
|
||||||
this.find('.treedropdownfield-panel').prepend(
|
this.find('.treedropdownfield-panel').prepend(
|
||||||
@ -431,13 +431,13 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
$('.TreeDropdownField input[type=hidden]').entwine({
|
$('.TreeDropdownField input[type=hidden]').entwine({
|
||||||
onadd: function() {
|
onmatch: function() {
|
||||||
this._super();
|
this._super();
|
||||||
this.bind('change.TreeDropdownField', function() {
|
this.bind('change.TreeDropdownField', function() {
|
||||||
$(this).getField().updateTitle();
|
$(this).getField().updateTitle();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
onremove: function() {
|
onunmatch: function() {
|
||||||
this._super();
|
this._super();
|
||||||
this.unbind('.TreeDropdownField');
|
this.unbind('.TreeDropdownField');
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user