mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-07-24 06:51:23 +08:00
[DE] Change icons/labels for rtl direction
This commit is contained in:
@ -148,6 +148,10 @@ define([
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
setCaption: function(text) {
|
||||
this.$label.find('.caption').text(text);
|
||||
}
|
||||
});
|
||||
});
|
||||
@ -1765,12 +1765,29 @@ define([
|
||||
},
|
||||
|
||||
onApiTextDirection: function (isRtl){
|
||||
if (this.toolbar.btnTextDir.options.dirRtl !== !!isRtl) {
|
||||
this.toolbar.btnTextDir.changeIcon({
|
||||
next: isRtl ? 'btn-dir-rtl' : 'btn-dir-ltr',
|
||||
curr: this.toolbar.btnTextDir.options.dirRtl ? 'btn-dir-rtl' : 'btn-dir-ltr'
|
||||
var toolbar = this.toolbar,
|
||||
oldRtl = toolbar.btnTextDir.options.dirRtl,
|
||||
newRtl = !!isRtl;
|
||||
if (oldRtl !== newRtl) {
|
||||
toolbar.btnTextDir.changeIcon({
|
||||
next: newRtl ? 'btn-dir-rtl' : 'btn-dir-ltr',
|
||||
curr: oldRtl ? 'btn-dir-rtl' : 'btn-dir-ltr'
|
||||
});
|
||||
this.toolbar.btnTextDir.options.dirRtl = !!isRtl;
|
||||
toolbar.btnMarkers.changeIcon({
|
||||
next: newRtl ? 'btn-setmarkers-rtl' : 'btn-setmarkers',
|
||||
curr: oldRtl ? 'btn-setmarkers-rtl' : 'btn-setmarkers'
|
||||
});
|
||||
toolbar.btnNumbers.changeIcon({
|
||||
next: newRtl ? 'btn-numbering-rtl' : 'btn-numbering',
|
||||
curr: oldRtl ? 'btn-numbering-rtl' : 'btn-numbering'
|
||||
});
|
||||
toolbar.btnMultilevels.changeIcon({
|
||||
next: newRtl ? 'btn-multilevels-rtl' : 'btn-multilevels',
|
||||
curr: oldRtl ? 'btn-multilevels-rtl' : 'btn-multilevels'
|
||||
});
|
||||
toolbar.lblIndentsLeft.setCaption(newRtl ? toolbar.textIndBefore : toolbar.textIndLeft);
|
||||
toolbar.lblIndentsRight.setCaption(newRtl ? toolbar.textIndAfter : toolbar.textIndRight);
|
||||
toolbar.btnTextDir.options.dirRtl = !!isRtl;
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@ -3654,6 +3654,8 @@
|
||||
"DE.Views.Toolbar.textDirLtr": "Left-to-right",
|
||||
"DE.Views.Toolbar.textDirRtl": "Right-to-left",
|
||||
"DE.Views.Toolbar.tipTextDir": "Text direction",
|
||||
"DE.Views.Toolbar.textIndBefore": "Indent before",
|
||||
"DE.Views.Toolbar.textIndAfter": "Indent after",
|
||||
"DE.Views.ViewTab.textAlwaysShowToolbar": "Always Show Toolbar",
|
||||
"DE.Views.ViewTab.textDarkDocument": "Dark Document",
|
||||
"DE.Views.ViewTab.textFill": "Fill",
|
||||
|
||||
Reference in New Issue
Block a user