mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Globalization in TreeDropdownField JS
This commit is contained in:
parent
9288bdc5ea
commit
93558a6d62
@ -325,11 +325,11 @@ class LeftAndMain extends Controller implements PermissionProvider {
|
||||
FRAMEWORK_ADMIN_DIR . '/thirdparty/chosen/chosen/chosen.jquery.js',
|
||||
FRAMEWORK_ADMIN_DIR . '/thirdparty/jquery-hoverIntent/jquery.hoverIntent.js',
|
||||
FRAMEWORK_ADMIN_DIR . '/javascript/jquery-changetracker/lib/jquery.changetracker.js',
|
||||
FRAMEWORK_DIR . '/javascript/i18n.js',
|
||||
FRAMEWORK_DIR . '/javascript/TreeDropdownField.js',
|
||||
FRAMEWORK_DIR . '/javascript/DateField.js',
|
||||
FRAMEWORK_DIR . '/javascript/HtmlEditorField.js',
|
||||
FRAMEWORK_DIR . '/javascript/TabSet.js',
|
||||
FRAMEWORK_DIR . '/javascript/i18n.js',
|
||||
FRAMEWORK_ADMIN_DIR . '/javascript/ssui.core.js',
|
||||
FRAMEWORK_DIR . '/javascript/GridField.js',
|
||||
)
|
||||
|
@ -23,9 +23,9 @@
|
||||
});
|
||||
|
||||
var strings = {
|
||||
'openlink': 'Open',
|
||||
'fieldTitle': '(Choose)',
|
||||
'searchFieldTitle': '(Choose or Search)'
|
||||
'openlink': ss.i18n._t('TreeDropdownField.OpenLink'),
|
||||
'fieldTitle': '(' + ss.i18n._t('TreeDropdownField.FieldTitle') + ')',
|
||||
'searchFieldTitle': '(' + ss.i18n._t('TreeDropdownField.SearchFieldTitle') + ')'
|
||||
};
|
||||
|
||||
var _clickTestFn = function(e) {
|
||||
@ -298,11 +298,7 @@
|
||||
$('.TreeDropdownField.searchable').entwine({
|
||||
onadd: function() {
|
||||
this._super();
|
||||
var title = ss.i18n._t(
|
||||
'DropdownField.ENTERTOSEARCH',
|
||||
'Press enter to search'
|
||||
);
|
||||
|
||||
var title = ss.i18n._t('TreeDropdownField.ENTERTOSEARCH');
|
||||
this.find('.treedropdownfield-panel').prepend(
|
||||
$('<input type="text" class="search treedropdownfield-search" data-skip-autofocus="true" placeholder="' + title + '" value="" />')
|
||||
);
|
||||
|
@ -36,6 +36,10 @@ if(typeof(ss) == 'undefined' || typeof(ss.i18n) == 'undefined') {
|
||||
'UploadField.LOADING': 'Loading ...',
|
||||
'UploadField.Editing': 'Editing ...',
|
||||
'UploadField.Uploaded': 'Uploaded',
|
||||
'UploadField.OVERWRITEWARNING': 'File with the same name already exists'
|
||||
'UploadField.OVERWRITEWARNING': 'File with the same name already exists',
|
||||
'TreeDropdownField.ENTERTOSEARCH': 'Press enter to search',
|
||||
'TreeDropdownField.OpenLink': 'Open',
|
||||
'TreeDropdownField.FieldTitle': 'Choose',
|
||||
'TreeDropdownField.SearchFieldTitle': 'Choose or Search'
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user