mirror of
https://github.com/silverstripe/silverstripe-translatable
synced 2024-10-22 11:05:59 +02:00
parent
b0ffbfa3a1
commit
7b11ced8e7
@ -6,7 +6,7 @@
|
|||||||
// show language field for internal links
|
// show language field for internal links
|
||||||
var linkType = this.find(':input[name=LinkType]:checked').val(), list = ['internal', 'external', 'file', 'email'];
|
var linkType = this.find(':input[name=LinkType]:checked').val(), list = ['internal', 'external', 'file', 'email'];
|
||||||
if(linkType == 'internal') {
|
if(linkType == 'internal') {
|
||||||
this.find('.field#Language').show();
|
this.find('.field.languagedropdown').show();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
updateFromEditor: function() {
|
updateFromEditor: function() {
|
||||||
@ -30,10 +30,10 @@
|
|||||||
$('form.htmleditorfield-linkform #Form_EditorToolbarLinkForm_Language').entwine({
|
$('form.htmleditorfield-linkform #Form_EditorToolbarLinkForm_Language').entwine({
|
||||||
onchange: function(e) {
|
onchange: function(e) {
|
||||||
// reload tree with selected locale
|
// reload tree with selected locale
|
||||||
var treeDropdown = $(this).parents('form').find('#internal .treedropdown');
|
var treeDropdown = $(this).parents('form').find('#Form_EditorToolbarLinkForm_internal_Holder .TreeDropdownField');
|
||||||
treeDropdown.data('urlTree', $.path.addSearchParams(treeDropdown.data('urlTree').replace(/Locale=[^&]*/, ''), 'Locale='+$(this).val()));
|
treeDropdown.data('urlTree', $.path.addSearchParams(treeDropdown.data('urlTree').replace(/Locale=[^&]*/, ''), 'Locale='+$(this).val()));
|
||||||
treeDropdown.loadTree();
|
treeDropdown.loadTree();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}(jQuery));
|
}(jQuery));
|
||||||
|
Loading…
Reference in New Issue
Block a user