Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
web-apps
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
web-apps
Commits
9e9e738d
Commit
9e9e738d
authored
Nov 21, 2016
by
Alexander Yuzhin
Committed by
Maxim Kadushkin
Nov 21, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[DE mobile] Localization EditText, ThemeColorPalette.
parent
932d5b3d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
99 additions
and
45 deletions
+99
-45
apps/common/mobile/lib/component/ThemeColorPalette.js
apps/common/mobile/lib/component/ThemeColorPalette.js
+1
-1
apps/documenteditor/mobile/app/controller/edit/EditText.js
apps/documenteditor/mobile/app/controller/edit/EditText.js
+10
-6
apps/documenteditor/mobile/app/template/EditText.template
apps/documenteditor/mobile/app/template/EditText.template
+33
-33
apps/documenteditor/mobile/app/view/edit/EditText.js
apps/documenteditor/mobile/app/view/edit/EditText.js
+26
-4
apps/documenteditor/mobile/locale/en.json
apps/documenteditor/mobile/locale/en.json
+29
-1
No files found.
apps/common/mobile/lib/component/ThemeColorPalette.js
View file @
9e9e738d
...
...
@@ -204,6 +204,6 @@ define([
},
textThemeColors
:
'
Theme Colors
'
,
textStandartColors
:
'
Standar
t
Colors
'
textStandartColors
:
'
Standar
d
Colors
'
},
Common
.
UI
.
ThemeColorPalette
||
{}));
});
\ No newline at end of file
apps/documenteditor/mobile/app/controller/edit/EditText.js
View file @
9e9e738d
...
...
@@ -46,7 +46,7 @@ define([
],
function
(
core
)
{
'
use strict
'
;
DE
.
Controllers
.
EditText
=
Backbone
.
Controller
.
extend
((
function
()
{
DE
.
Controllers
.
EditText
=
Backbone
.
Controller
.
extend
(
_
.
extend
(
(
function
()
{
var
_fontsArray
=
[],
_stack
=
[],
_paragraphObject
=
undefined
,
...
...
@@ -491,7 +491,7 @@ define([
},
onApiChangeFont
:
function
(
font
)
{
var
name
=
(
_
.
isFunction
(
font
.
get_Name
)
?
font
.
get_Name
()
:
font
.
asc_getName
())
||
'
Fonts
'
;
var
name
=
(
_
.
isFunction
(
font
.
get_Name
)
?
font
.
get_Name
()
:
font
.
asc_getName
())
||
this
.
textFonts
;
_fontInfo
.
name
=
name
;
$
(
'
#font-fonts .item-title
'
).
html
(
name
);
...
...
@@ -501,7 +501,7 @@ define([
_fontInfo
.
size
=
size
;
var
displaySize
=
_fontInfo
.
size
;
_
.
isUndefined
(
displaySize
)
?
displaySize
=
'
Auto
'
:
displaySize
=
displaySize
+
'
'
+
'
pt
'
;
_
.
isUndefined
(
displaySize
)
?
displaySize
=
this
.
textAuto
:
displaySize
=
displaySize
+
'
'
+
this
.
textPt
;
$
(
'
#font-fonts .item-after span:first-child
'
).
html
(
displaySize
);
$
(
'
#font-size .item-after label
'
).
html
(
displaySize
);
...
...
@@ -592,7 +592,11 @@ define([
// Helpers
_toggleButton
:
function
(
e
)
{
return
$
(
e
.
currentTarget
).
toggleClass
(
'
active
'
).
hasClass
(
'
active
'
);
}
},
textFonts
:
'
Fonts
'
,
textAuto
:
'
Auto
'
,
textPt
:
'
pt
'
}
})()
);
});
})()
,
DE
.
Controllers
.
EditText
||
{}))
});
\ No newline at end of file
apps/documenteditor/mobile/app/template/EditText.template
View file @
9e9e738d
...
...
@@ -5,7 +5,7 @@
<li><a id="font-fonts" class="item-link">
<div class="item-content">
<div class="item-inner">
<div class="item-title">
Fonts
</div>
<div class="item-title">
<%= scope.textFonts %>
</div>
<div class="item-after" style="color: #000;"><span></span><span style="margin-left: 5px;"></span></div>
</div>
</div></a></li>
...
...
@@ -24,7 +24,7 @@
<div class="item-content">
<% if (!android) { %><div class="item-media"><i class="icon icon-text-color"><span class="color-preview"></span></i></div><% } %>
<div class="item-inner">
<div class="item-title">
Font color
</div>
<div class="item-title">
<%= scope.textFontColor %>
</div>
<% if (android) { %><div class="item-after"><div class="color-preview"></div></div><% } %>
</div>
</div>
...
...
@@ -34,7 +34,7 @@
<div class="item-content">
<% if (!android) { %><div class="item-media"><i class="icon icon-text-selection"><span class="color-preview"></span></i></div><% } %>
<div class="item-inner">
<div class="item-title">
Highlight color
</div>
<div class="item-title">
<%= scope.textHighlightColor %>
</div>
<% if (android) { %><div class="item-after"><div class="color-preview"></div></div><% } %>
</div>
</div>
...
...
@@ -45,7 +45,7 @@
<div class="item-content">
<% if (!android) { %><div class="item-media"><i class="icon icon-text-additional"></i></div><% } %>
<div class="item-inner">
<div class="item-title">
Additional formatting
</div>
<div class="item-title">
<%= scope.textAdditionalFormat %>
</div>
</div>
</div>
</a>
...
...
@@ -76,21 +76,21 @@
<div class="item-content">
<% if (!android) { %><div class="item-media"><i class="icon icon-bullets"></i></div><% } %>
<div class="item-inner">
<div class="item-title">
Bullets
</div>
<div class="item-title">
<%= scope.textBullets %>
</div>
</div>
</div></a></li>
<li><a id="font-numbers" class="item-link">
<div class="item-content">
<% if (!android) { %><div class="item-media"><i class="icon icon-numbers"></i></div><% } %>
<div class="item-inner">
<div class="item-title">
Numbers
</div>
<div class="item-title">
<%= scope.textNumbers %>
</div>
</div>
</div></a></li>
<li><a id="font-line-spacing" class="item-link">
<div class="item-content">
<% if (!android) { %><div class="item-media"><i class="icon icon-linespacing"></i></div><% } %>
<div class="item-inner">
<div class="item-title">
Line Spacing
</div>
<div class="item-title">
<%= scope.textLineSpacing %>
</div>
</div>
</div></a></li>
</ul>
...
...
@@ -101,8 +101,8 @@
<div id="edit-text-fonts">
<div class="navbar">
<div class="navbar-inner">
<div class="left sliding"><a href="#" class="back link"><i class="icon icon-back"></i><% if (!android) { %><span>
Back
</span><% } %></a></div>
<div class="center sliding">
Fonts
</div>
<div class="left sliding"><a href="#" class="back link"><i class="icon icon-back"></i><% if (!android) { %><span>
<%= scope.textBack %>
</span><% } %></a></div>
<div class="center sliding">
<%= scope.textFonts %>
</div>
<div class="right"><% if (phone) { %><a href="#" class="link icon-only close-picker"><i class="icon icon-expand-down"></i></a><% } %></div>
</div>
</div>
...
...
@@ -113,7 +113,7 @@
<li id="font-size">
<div class="item-content">
<div class="item-inner">
<div class="item-title">
Size
</div>
<div class="item-title">
<%= scope.textSize %>
</div>
<div class="item-after splitter">
<% if (!android) { %><label></label><% } %>
<p class="buttons-row">
...
...
@@ -127,7 +127,7 @@
</li>
</ul>
</div>
<div class="content-block-title">
Fonts
</div>
<div class="content-block-title">
<%= scope.textFonts %>
</div>
<div id="font-list" class="list-block virtual-list">
<!-- Fonts List -->
</div>
...
...
@@ -139,8 +139,8 @@
<div id="edit-text-color">
<div class="navbar">
<div class="navbar-inner">
<div class="left sliding"><a href="#" class="back link"> <i class="icon icon-back"></i><% if (!android) { %><span>
Back
</span><% } %></a></a></div>
<div class="center sliding">
Font Colors
</div>
<div class="left sliding"><a href="#" class="back link"> <i class="icon icon-back"></i><% if (!android) { %><span>
<%= scope.textBack %>
</span><% } %></a></a></div>
<div class="center sliding">
<%= scope.textFontColors %>
</div>
<div class="right"><% if (phone) { %><a href="#" class="link icon-only close-picker"><i class="icon icon-expand-down"></i></a><% } %></div>
</div>
</div>
...
...
@@ -155,7 +155,7 @@
<div style="width:22px; height: 22px; background-color: #000;"></div>
</div>
<div class="item-inner">
<div class="item-title">
Automatic
</div>
<div class="item-title">
<%= scope.textAutomatic %>
</div>
</div>
</div>
</a>
...
...
@@ -170,8 +170,8 @@
<div id="edit-text-background">
<div class="navbar">
<div class="navbar-inner">
<div class="left sliding"><a href="#" class="back link"> <i class="icon icon-back"></i><% if (!android) { %><span>
Back
</span><% } %></a></a></div>
<div class="center sliding">
Highlight Colors
</div>
<div class="left sliding"><a href="#" class="back link"> <i class="icon icon-back"></i><% if (!android) { %><span>
<%= scope.textBack %>
</span><% } %></a></a></div>
<div class="center sliding">
<%= scope.textHighlightColors %>
</div>
<div class="right"><% if (phone) { %><a href="#" class="link icon-only close-picker"><i class="icon icon-expand-down"></i></a><% } %></div>
</div>
</div>
...
...
@@ -186,8 +186,8 @@
<div id="edit-text-additional">
<div class="navbar">
<div class="navbar-inner">
<div class="left sliding"><a href="#" class="back link"> <i class="icon icon-back"></i><% if (!android) { %><span>
Back
</span><% } %></a></a></div>
<div class="center sliding">
Additional
</div>
<div class="left sliding"><a href="#" class="back link"> <i class="icon icon-back"></i><% if (!android) { %><span>
<%= scope.textBack %>
</span><% } %></a></a></div>
<div class="center sliding">
<%= scope.textAdditional %>
</div>
<div class="right"><% if (phone) { %><a href="#" class="link icon-only close-picker"><i class="icon icon-expand-down"></i></a><% } %></div>
</div>
</div>
...
...
@@ -200,7 +200,7 @@
<input type="radio" name="text-strikethrough" value="strikethrough">
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
<div class="item-inner">
<div class="item-title">
Strikethrough
</div>
<div class="item-title">
<%= scope.textStrikethrough %>
</div>
</div>
</label>
</li>
...
...
@@ -209,7 +209,7 @@
<input type="radio" name="text-strikethrough" value="double-strikethrough">
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
<div class="item-inner">
<div class="item-title">
Double Strikethrough
</div>
<div class="item-title">
<%= scope.textDblStrikethrough %>
</div>
</div>
</label>
</li>
...
...
@@ -218,7 +218,7 @@
<input type="radio" name="text-script" value="superscript">
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
<div class="item-inner">
<div class="item-title">
Superscript
</div>
<div class="item-title">
<%= scope.textDblSuperscript %>
</div>
</div>
</label>
</li>
...
...
@@ -227,7 +227,7 @@
<input type="radio" name="text-script" value="subscript">
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
<div class="item-inner">
<div class="item-title">
Subscript
</div>
<div class="item-title">
<%= scope.textSubscript %>
</div>
</div>
</label>
</li>
...
...
@@ -236,7 +236,7 @@
<input type="radio" name="text-caps" value="small">
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
<div class="item-inner">
<div class="item-title">
Small Caps
</div>
<div class="item-title">
<%= scope.textSmallCaps %>
</div>
</div>
</label>
</li>
...
...
@@ -245,7 +245,7 @@
<input type="radio" name="text-caps" value="all">
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
<div class="item-inner">
<div class="item-title">
All Caps
</div>
<div class="item-title">
<%= scope.textAllCaps %>
</div>
</div>
</label>
</li>
...
...
@@ -256,7 +256,7 @@
<li id="letter-spacing" id="letter-spacing">
<div class="item-content">
<div class="item-inner">
<div class="item-title">
Letter Spacing
</div>
<div class="item-title">
<%= scope.textLetterSpacing %>
</div>
<div class="item-after splitter">
<% if (!android) { %><label></label><% } %>
<p class="buttons-row">
...
...
@@ -278,8 +278,8 @@
<div id="edit-text-linespacing">
<div class="navbar">
<div class="navbar-inner">
<div class="left sliding"><a href="#" class="back link"> <i class="icon icon-back"></i><% if (!android) { %><span>
Back
</span><% } %></a></a></div>
<div class="center sliding">
Line Spacing
</div>
<div class="left sliding"><a href="#" class="back link"> <i class="icon icon-back"></i><% if (!android) { %><span>
<%= scope.textBack %>
</span><% } %></a></a></div>
<div class="center sliding">
<%= scope.textLineSpacing %>
</div>
<div class="right"><% if (phone) { %><a href="#" class="link icon-only close-picker"><i class="icon icon-expand-down"></i></a><% } %></div>
</div>
</div>
...
...
@@ -351,8 +351,8 @@
<div id="edit-text-bullets">
<div class="navbar">
<div class="navbar-inner">
<div class="left sliding"><a href="#" class="back link"> <i class="icon icon-back"></i><% if (!android) { %><span>
Back
</span><% } %></a></a></div>
<div class="center sliding">
Bullets
</div>
<div class="left sliding"><a href="#" class="back link"> <i class="icon icon-back"></i><% if (!android) { %><span>
<%= scope.textBack %>
</span><% } %></a></a></div>
<div class="center sliding">
<%= scope.textBullets %>
</div>
<div class="right"><% if (phone) { %><a href="#" class="link icon-only close-picker"><i class="icon icon-expand-down"></i></a><% } %></div>
</div>
</div>
...
...
@@ -363,7 +363,7 @@
<% _.each(row, function(bullet) { %>
<li data-type="<%= bullet.type %>">
<% if (bullet.thumb.length < 1) { %>
<div class="thumb" style="position: relative;"><label>
None
</label></div>
<div class="thumb" style="position: relative;"><label>
<%= scope.textNone %>
</label></div>
<% } else { %>
<div class="thumb" style="background-image:url('../mobile/resources/img/bullets/<%= bullet.thumb %>')"></div>
<% } %>
...
...
@@ -379,8 +379,8 @@
<div id="edit-text-numbers">
<div class="navbar">
<div class="navbar-inner">
<div class="left sliding"><a href="#" class="back link"> <i class="icon icon-back"></i><% if (!android) { %><span>
Back
</span><% } %></a></a></div>
<div class="center sliding">
Numbers
</div>
<div class="left sliding"><a href="#" class="back link"> <i class="icon icon-back"></i><% if (!android) { %><span>
<%= scope.textBack %>
</span><% } %></a></a></div>
<div class="center sliding">
<%= scope.textNumbers %>
</div>
<div class="right"><% if (phone) { %><a href="#" class="link icon-only close-picker"><i class="icon icon-expand-down"></i></a><% } %></div>
</div>
</div>
...
...
@@ -391,7 +391,7 @@
<% _.each(row, function(number) { %>
<li data-type="<%= number.type %>">
<% if (number.thumb.length < 1) { %>
<div class="thumb" style="position: relative;"><label>
None
</label></div>
<div class="thumb" style="position: relative;"><label>
<%= scope.textNone %>
</label></div>
<% } else { %>
<div class="thumb" style="background-image:url('../mobile/resources/img/numbers/<%= number.thumb %>')"></div>
<% } %>
...
...
apps/documenteditor/mobile/app/view/edit/EditText.js
View file @
9e9e738d
...
...
@@ -49,7 +49,7 @@ define([
],
function
(
editTemplate
,
$
,
_
,
Backbone
)
{
'
use strict
'
;
DE
.
Views
.
EditText
=
Backbone
.
View
.
extend
((
function
()
{
DE
.
Views
.
EditText
=
Backbone
.
View
.
extend
(
_
.
extend
(
(
function
()
{
// private
var
_fontsList
,
_editTextController
;
...
...
@@ -116,6 +116,7 @@ define([
this
.
layout
=
$
(
'
<div/>
'
).
append
(
this
.
template
({
android
:
Common
.
SharedSettings
.
get
(
'
android
'
),
phone
:
Common
.
SharedSettings
.
get
(
'
phone
'
),
scope
:
this
,
bullets
:
_bullets
,
numbers
:
_numbers
}));
...
...
@@ -225,8 +226,29 @@ define([
showNumbers
:
function
()
{
this
.
showPage
(
'
#edit-text-numbers
'
);
}
}
,
textFonts
:
'
Fonts
'
,
textFontColor
:
'
Font Color
'
,
textHighlightColor
:
'
Highlight Color
'
,
textAdditionalFormat
:
'
Additional Formatting
'
,
textBack
:
'
Back
'
,
textSize
:
'
Size
'
,
textFontColors
:
'
Font Colors
'
,
textAutomatic
:
'
Automatic
'
,
textHighlightColors
:
'
Highlight Colors
'
,
textAdditional
:
'
Additional
'
,
textStrikethrough
:
'
Strikethrough
'
,
textDblStrikethrough
:
'
Double Strikethrough
'
,
textDblSuperscript
:
'
Superscript
'
,
textSubscript
:
'
Subscript
'
,
textSmallCaps
:
'
Small Caps
'
,
textAllCaps
:
'
All Caps
'
,
textLetterSpacing
:
'
Letter Spacing
'
,
textLineSpacing
:
'
Line Spacing
'
,
textBullets
:
'
Bullets
'
,
textNone
:
'
None
'
,
textNumbers
:
'
Numbers
'
}
})()
);
});
})()
,
DE
.
Views
.
EditText
||
{}))
});
\ No newline at end of file
apps/documenteditor/mobile/locale/en.json
View file @
9e9e738d
{
"Common.UI.ThemeColorPalette.textThemeColors"
:
"Theme Colors"
,
"Common.UI.ThemeColorPalette.textStandartColors"
:
"Standard Colors"
,
"DE.Controllers.Main.leavePageText"
:
"You have unsaved changes in this document. Click 'Stay on this Page' to await the autosave of the document. Click 'Leave this Page' to discard all the unsaved changes."
,
"DE.Controllers.Main.defaultTitleText"
:
"ONLYOFFICE Document Editor"
,
"DE.Controllers.Main.criticalErrorTitle"
:
"Error"
,
...
...
@@ -319,5 +322,30 @@
"DE.Views.EditTabletextBandedRow"
:
"Banded Row"
,
"DE.Views.EditTabletextFirstColumn"
:
"First Column"
,
"DE.Views.EditTabletextLastColumn"
:
"Last Column"
,
"DE.Views.EditTabletextBandedColumn"
:
"Banded Column"
"DE.Views.EditTabletextBandedColumn"
:
"Banded Column"
,
"DE.Controllers.EditText.textFonts"
:
"Fonts"
,
"DE.Controllers.EditText.textAuto"
:
"Auto"
,
"DE.Controllers.EditText.textPt"
:
"pt"
,
"DE.Views.EditText.textFonts"
:
"Fonts"
,
"DE.Views.EditText.textFontColor"
:
"Font Color"
,
"DE.Views.EditText.textHighlightColor"
:
"Highlight Color"
,
"DE.Views.EditText.textAdditionalFormat"
:
"Additional Formatting"
,
"DE.Views.EditText.textBack"
:
"Back"
,
"DE.Views.EditText.textSize"
:
"Size"
,
"DE.Views.EditText.textFontColors"
:
"Font Colors"
,
"DE.Views.EditText.textAutomatic"
:
"Automatic"
,
"DE.Views.EditText.textHighlightColors"
:
"Highlight Colors"
,
"DE.Views.EditText.textAdditional"
:
"Additional"
,
"DE.Views.EditText.textStrikethrough"
:
"Strikethrough"
,
"DE.Views.EditText.textDblStrikethrough"
:
"Double Strikethrough"
,
"DE.Views.EditText.textDblSuperscript"
:
"Superscript"
,
"DE.Views.EditText.textSubscript"
:
"Subscript"
,
"DE.Views.EditText.textSmallCaps"
:
"Small Caps"
,
"DE.Views.EditText.textAllCaps"
:
"All Caps"
,
"DE.Views.EditText.textLetterSpacing"
:
"Letter Spacing"
,
"DE.Views.EditText.textLineSpacing"
:
"Line Spacing"
,
"DE.Views.EditText.textBullets"
:
"Bullets"
,
"DE.Views.EditText.textNone"
:
"None"
,
"DE.Views.EditText.textNumbers"
:
"Numbers"
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment