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
6584fa1f
Commit
6584fa1f
authored
Nov 18, 2016
by
Alexander Yuzhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[DE mobile] Localization EditContainer, EditHyperlink.
parent
d3843067
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
67 additions
and
46 deletions
+67
-46
apps/documenteditor/mobile/app/controller/edit/EditContainer.js
...ocumenteditor/mobile/app/controller/edit/EditContainer.js
+24
-27
apps/documenteditor/mobile/app/controller/edit/EditHyperlink.js
...ocumenteditor/mobile/app/controller/edit/EditHyperlink.js
+4
-4
apps/documenteditor/mobile/app/template/EditHyperlink.template
...documenteditor/mobile/app/template/EditHyperlink.template
+10
-10
apps/documenteditor/mobile/app/view/edit/EditHyperlink.js
apps/documenteditor/mobile/app/view/edit/EditHyperlink.js
+11
-4
apps/documenteditor/mobile/locale/en.json
apps/documenteditor/mobile/locale/en.json
+18
-1
No files found.
apps/documenteditor/mobile/app/controller/edit/EditContainer.js
View file @
6584fa1f
...
...
@@ -44,7 +44,7 @@ define([
],
function
(
core
)
{
'
use strict
'
;
DE
.
Controllers
.
EditContainer
=
Backbone
.
Controller
.
extend
((
function
()
{
DE
.
Controllers
.
EditContainer
=
Backbone
.
Controller
.
extend
(
_
.
extend
(
(
function
()
{
// Private
var
_settings
=
[];
...
...
@@ -90,20 +90,6 @@ define([
}
},
_dummyEditController
:
function
()
{
var
layout
=
'
<div class="content-block inset">
'
+
'
<div class="content-block-inner">
'
+
'
<p>Implement settings!!!!</p>
'
+
'
</div>
'
+
'
</div>
'
;
return
{
caption
:
'
Dummy
'
,
layout
:
layout
}
},
_emptyEditController
:
function
()
{
var
layout
=
'
<div class="content-block inset">
'
+
...
...
@@ -113,62 +99,63 @@ define([
'
</div>
'
;
return
{
caption
:
'
Settings
'
,
caption
:
this
.
textSettings
,
layout
:
layout
}
},
_layoutEditorsByStack
:
function
()
{
var
editors
=
[];
var
me
=
this
,
editors
=
[];
if
(
_settings
.
length
<
0
)
{
editors
.
push
(
this
.
_emptyEditController
());
editors
.
push
(
me
.
_emptyEditController
());
}
else
{
if
(
_
.
contains
(
_settings
,
'
text
'
))
{
editors
.
push
({
caption
:
'
Text
'
,
caption
:
me
.
textText
,
id
:
'
edit-text
'
,
layout
:
DE
.
getController
(
'
EditText
'
).
getView
(
'
EditText
'
).
rootLayout
()
})
}
if
(
_
.
contains
(
_settings
,
'
paragraph
'
))
{
editors
.
push
({
caption
:
'
Paragraph
'
,
caption
:
me
.
textParagraph
,
id
:
'
edit-paragraph
'
,
layout
:
DE
.
getController
(
'
EditParagraph
'
).
getView
(
'
EditParagraph
'
).
rootLayout
()
})
}
if
(
_
.
contains
(
_settings
,
'
table
'
))
{
editors
.
push
({
caption
:
'
Table
'
,
caption
:
me
.
textTable
,
id
:
'
edit-table
'
,
layout
:
DE
.
getController
(
'
EditTable
'
).
getView
(
'
EditTable
'
).
rootLayout
()
})
}
if
(
_
.
contains
(
_settings
,
'
shape
'
))
{
editors
.
push
({
caption
:
'
Shape
'
,
caption
:
me
.
textShape
,
id
:
'
edit-shape
'
,
layout
:
DE
.
getController
(
'
EditShape
'
).
getView
(
'
EditShape
'
).
rootLayout
()
})
}
if
(
_
.
contains
(
_settings
,
'
image
'
))
{
editors
.
push
({
caption
:
'
Image
'
,
caption
:
me
.
textImage
,
id
:
'
edit-image
'
,
layout
:
DE
.
getController
(
'
EditImage
'
).
getView
(
'
EditImage
'
).
rootLayout
()
})
}
if
(
_
.
contains
(
_settings
,
'
chart
'
))
{
editors
.
push
({
caption
:
'
Chart
'
,
caption
:
me
.
textChart
,
id
:
'
edit-chart
'
,
layout
:
DE
.
getController
(
'
EditChart
'
).
getView
(
'
EditChart
'
).
rootLayout
()
})
}
if
(
_
.
contains
(
_settings
,
'
hyperlink
'
))
{
editors
.
push
({
caption
:
'
Hyperlink
'
,
caption
:
me
.
textHyperlink
,
id
:
'
edit-link
'
,
layout
:
DE
.
getController
(
'
EditHyperlink
'
).
getView
(
'
EditHyperlink
'
).
rootLayout
()
})
...
...
@@ -363,7 +350,17 @@ define([
}
_settings
=
_
.
uniq
(
_settings
);
}
},
textSettings
:
'
Settings
'
,
textText
:
'
Text
'
,
textParagraph
:
'
Paragraph
'
,
textTable
:
'
Table
'
,
textShape
:
'
Shape
'
,
textImage
:
'
Image
'
,
textChart
:
'
Chart
'
,
textHyperlink
:
'
Hyperlink
'
}
})()
);
})()
,
DE
.
Controllers
.
EditContainer
||
{}))
});
\ No newline at end of file
apps/documenteditor/mobile/app/controller/edit/EditHyperlink.js
View file @
6584fa1f
...
...
@@ -47,7 +47,7 @@ define([
],
function
(
core
)
{
'
use strict
'
;
DE
.
Controllers
.
EditHyperlink
=
Backbone
.
Controller
.
extend
((
function
()
{
DE
.
Controllers
.
EditHyperlink
=
Backbone
.
Controller
.
extend
(
_
.
extend
(
(
function
()
{
// Private
var
_stack
=
[],
_linkObject
=
undefined
;
...
...
@@ -169,8 +169,8 @@ define([
}
},
textEmptyImgUrl
:
'
You need to specify image URL.
'
,
txtNotUrl
:
'
This field should be a URL in the format
\
"http://www.example.com
\
"
'
textEmptyImgUrl
:
'
You need to specify image URL.
'
,
txtNotUrl
:
'
This field should be a URL in the format
\
"http://www.example.com
\
"
'
};
})()
);
})()
,
DE
.
Controllers
.
EditHyperlink
||
{}))
});
\ No newline at end of file
apps/documenteditor/mobile/app/template/EditHyperlink.template
View file @
6584fa1f
...
...
@@ -5,9 +5,9 @@
<li>
<div id="edit-link-url" class="item-content">
<div class="item-inner">
<div class="item-title label">
Link
</div>
<div class="item-title label">
<%= scope.textLink %>
</div>
<div class="item-input">
<input type="url" placeholder="
Link
">
<input type="url" placeholder="
<%= scope.textLink %>
">
</div>
</div>
</div>
...
...
@@ -15,9 +15,9 @@
<li>
<div id="edit-link-display" class="item-content">
<div class="item-inner">
<div class="item-title label">
Display
</div>
<div class="item-title label">
<%= scope.textDisplay %>
</div>
<div class="item-input">
<input type="text" placeholder="
Display
">
<input type="text" placeholder="
<%= scope.textDisplay %>
">
</div>
</div>
</div>
...
...
@@ -25,9 +25,9 @@
<li>
<div id="edit-link-tip" class="item-content">
<div class="item-inner">
<div class="item-title label">
Screen Tip
</div>
<div class="item-title label">
<%= scope.textTip %>
</div>
<div class="item-input">
<input type="text" placeholder="
Screen Tip
">
<input type="text" placeholder="
<%= scope.textTip %>
">
</div>
</div>
</div>
...
...
@@ -36,15 +36,15 @@
</div>
<div class="list-block">
<% if (android) { %>
<a href="#" id="edit-link-edit" class="button button-raised button-fill disabled" style="margin: 20px 16px;">
Edit Link
</a>
<a href="#" id="edit-link-remove" class="button button-raised button-fill" style="margin: 20px 16px; background-color: #f44336;">
Remove Link
</a>
<a href="#" id="edit-link-edit" class="button button-raised button-fill disabled" style="margin: 20px 16px;">
<%= scope.textEdit %>
</a>
<a href="#" id="edit-link-remove" class="button button-raised button-fill" style="margin: 20px 16px; background-color: #f44336;">
<%= scope.textRemove %>
</a>
<% } else { %>
<ul>
<li>
<a href="#" id="edit-link-edit" class="list-button item-link disabled" style="text-align: center;">
Edit Link
</a>
<a href="#" id="edit-link-edit" class="list-button item-link disabled" style="text-align: center;">
<%= scope.textEdit %>
</a>
</li>
<li>
<a href="#" id="edit-link-remove" class="list-button item-link" style="text-align: center; color: #f00">
Remove Link
</a>
<a href="#" id="edit-link-remove" class="list-button item-link" style="text-align: center; color: #f00">
<%= scope.textRemove %>
</a>
</li>
</ul>
<% } %>
...
...
apps/documenteditor/mobile/app/view/edit/EditHyperlink.js
View file @
6584fa1f
...
...
@@ -49,7 +49,7 @@ define([
],
function
(
editTemplate
,
$
,
_
,
Backbone
)
{
'
use strict
'
;
DE
.
Views
.
EditHyperlink
=
Backbone
.
View
.
extend
((
function
()
{
DE
.
Views
.
EditHyperlink
=
Backbone
.
View
.
extend
(
_
.
extend
(
(
function
()
{
// private
return
{
...
...
@@ -79,7 +79,8 @@ define([
render
:
function
()
{
this
.
layout
=
$
(
'
<div/>
'
).
append
(
this
.
template
({
android
:
Common
.
SharedSettings
.
get
(
'
android
'
),
phone
:
Common
.
SharedSettings
.
get
(
'
phone
'
)
phone
:
Common
.
SharedSettings
.
get
(
'
phone
'
),
scope
:
this
}));
return
this
;
...
...
@@ -93,7 +94,13 @@ define([
}
return
''
;
}
},
textLink
:
'
Link
'
,
textDisplay
:
'
Display
'
,
textTip
:
'
Screen Tip
'
,
textEdit
:
'
Edit Link
'
,
textRemove
:
'
Remove Link
'
}
})()
);
})()
,
DE
.
Views
.
EditHyperlink
||
{}))
});
\ No newline at end of file
apps/documenteditor/mobile/locale/en.json
View file @
6584fa1f
...
...
@@ -205,5 +205,22 @@
"DE.Views.EditChart.textFill"
:
"Fill"
,
"DE.Views.EditChart.textBorder"
:
"Border"
,
"DE.Views.EditChart.textSize"
:
"Size"
,
"DE.Views.EditChart.textColor"
:
"Color"
"DE.Views.EditChart.textColor"
:
"Color"
,
"DE.Controllers.EditContainer.textSettings"
:
"Settings"
,
"DE.Controllers.EditContainer.textText"
:
"Text"
,
"DE.Controllers.EditContainer.textParagraph"
:
"Paragraph"
,
"DE.Controllers.EditContainer.textTable"
:
"Table"
,
"DE.Controllers.EditContainer.textShape"
:
"Shape"
,
"DE.Controllers.EditContainer.textImage"
:
"Image"
,
"DE.Controllers.EditContainer.textChart"
:
"Chart"
,
"DE.Controllers.EditContainer.textHyperlink"
:
"Hyperlink"
,
"DE.Views.EditHyperlink.textLink"
:
"Link"
,
"DE.Views.EditHyperlink.textDisplay"
:
"Display"
,
"DE.Views.EditHyperlink.textTip"
:
"Screen Tip"
,
"DE.Views.EditHyperlink.textEdit"
:
"Edit Link"
,
"DE.Views.EditHyperlink.textRemove"
:
"Remove Link"
}
\ 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