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
74eb399f
Commit
74eb399f
authored
Jul 04, 2016
by
Julia Radzhabova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[DE] Change page orientation using pop-up menu.
parent
d7e63930
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
8 deletions
+22
-8
apps/documenteditor/main/app/controller/Toolbar.js
apps/documenteditor/main/app/controller/Toolbar.js
+6
-5
apps/documenteditor/main/app/view/Toolbar.js
apps/documenteditor/main/app/view/Toolbar.js
+11
-3
apps/documenteditor/main/locale/en.json
apps/documenteditor/main/locale/en.json
+2
-0
apps/documenteditor/main/resources/less/toolbar.less
apps/documenteditor/main/resources/less/toolbar.less
+3
-0
No files found.
apps/documenteditor/main/app/controller/Toolbar.js
View file @
74eb399f
...
...
@@ -240,7 +240,7 @@ define([
toolbar
.
btnDropCap
.
menu
.
on
(
'
item:click
'
,
_
.
bind
(
this
.
onDropCapSelect
,
this
));
toolbar
.
mnuDropCapAdvanced
.
on
(
'
click
'
,
_
.
bind
(
this
.
onDropCapAdvancedClick
,
this
));
toolbar
.
btnColumns
.
menu
.
on
(
'
item:click
'
,
_
.
bind
(
this
.
onColumnsSelect
,
this
));
toolbar
.
btnPageOrient
.
on
(
'
toggle
'
,
_
.
bind
(
this
.
onPageOrientToggle
,
this
));
toolbar
.
btnPageOrient
.
menu
.
on
(
'
item:click
'
,
_
.
bind
(
this
.
onPageOrientSelect
,
this
));
toolbar
.
btnPageMargins
.
menu
.
on
(
'
item:click
'
,
_
.
bind
(
this
.
onPageMarginsSelect
,
this
));
toolbar
.
btnClearStyle
.
on
(
'
click
'
,
_
.
bind
(
this
.
onClearStyleClick
,
this
));
toolbar
.
btnCopyStyle
.
on
(
'
toggle
'
,
_
.
bind
(
this
.
onCopyStyleToggle
,
this
));
...
...
@@ -723,7 +723,7 @@ define([
onApiPageOrient
:
function
(
isportrait
)
{
if
(
this
.
_state
.
pgorient
!==
isportrait
)
{
this
.
toolbar
.
btnPageOrient
.
toggle
(
!
isportrait
,
true
);
this
.
toolbar
.
btnPageOrient
.
menu
.
items
[
isportrait
?
0
:
1
].
setChecked
(
true
);
this
.
_state
.
pgorient
=
isportrait
;
}
},
...
...
@@ -1387,10 +1387,11 @@ define([
Common
.
NotificationCenter
.
trigger
(
'
edit:complete
'
,
this
.
toolbar
,
this
.
toolbar
.
btnInsertShape
);
},
onPageOrient
Toggle
:
function
(
btn
,
state
,
e
)
{
onPageOrient
Select
:
function
(
menu
,
item
)
{
this
.
_state
.
pgorient
=
undefined
;
if
(
this
.
api
)
this
.
api
.
change_PageOrient
(
!
state
);
if
(
this
.
api
&&
item
.
checked
)
{
this
.
api
.
change_PageOrient
(
item
.
value
);
}
Common
.
NotificationCenter
.
trigger
(
'
edit:complete
'
,
this
.
toolbar
);
Common
.
component
.
Analytics
.
trackEvent
(
'
ToolBar
'
,
'
Page Orientation
'
);
...
...
apps/documenteditor/main/app/view/Toolbar.js
View file @
74eb399f
...
...
@@ -679,7 +679,13 @@ define([
cls
:
'
btn-toolbar
'
,
iconCls
:
'
btn-pageorient
'
,
hint
:
this
.
tipPageOrient
,
enableToggle
:
true
menu
:
new
Common
.
UI
.
Menu
({
cls
:
'
ppm-toolbar
'
,
items
:
[
{
caption
:
this
.
textPortrait
,
iconCls
:
'
mnu-orient-portrait
'
,
checkable
:
true
,
toggleGroup
:
'
menuOrient
'
,
value
:
true
},
{
caption
:
this
.
textLandscape
,
iconCls
:
'
mnu-orient-landscape
'
,
checkable
:
true
,
toggleGroup
:
'
menuOrient
'
,
value
:
false
}
]
})
});
this
.
toolbarControls
.
push
(
this
.
btnPageOrient
);
...
...
@@ -1853,7 +1859,9 @@ define([
textLeft
:
'
Left:
'
,
textBottom
:
'
Bottom:
'
,
textRight
:
'
Right:
'
,
textPageSizeCustom
:
'
Custom Page Size
'
textPageSizeCustom
:
'
Custom Page Size
'
,
textPortrait
:
'
Portrait
'
,
textLandscape
:
'
Landscape
'
},
DE
.
Views
.
Toolbar
||
{}));
});
apps/documenteditor/main/locale/en.json
View file @
74eb399f
...
...
@@ -1440,6 +1440,7 @@
"DE.Views.Toolbar.textInsTextArt"
:
"Insert Text Art"
,
"DE.Views.Toolbar.textInText"
:
"In Text"
,
"DE.Views.Toolbar.textItalic"
:
"Italic"
,
"DE.Views.Toolbar.textLandscape"
:
"Landscape"
,
"DE.Views.Toolbar.textLeft"
:
"Left: "
,
"DE.Views.Toolbar.textLine"
:
"Line Chart"
,
"DE.Views.Toolbar.textMarginsLast"
:
"Last Custom"
,
...
...
@@ -1456,6 +1457,7 @@
"DE.Views.Toolbar.textPageSizeCustom"
:
"Custom Page Size"
,
"DE.Views.Toolbar.textPie"
:
"Pie Chart"
,
"DE.Views.Toolbar.textPoint"
:
"Point Chart"
,
"DE.Views.Toolbar.textPortrait"
:
"Portrait"
,
"DE.Views.Toolbar.textRight"
:
"Right: "
,
"DE.Views.Toolbar.textStandartColors"
:
"Standard Colors"
,
"DE.Views.Toolbar.textStock"
:
"Stock Chart"
,
...
...
apps/documenteditor/main/resources/less/toolbar.less
View file @
74eb399f
...
...
@@ -387,6 +387,9 @@
.menu-icon-normal(mnu-direct-horiz, 33, @menu-icon-size);
.menu-icon-normal(mnu-direct-rup, 34, @menu-icon-size);
.menu-icon-normal(mnu-direct-rdown, 35, @menu-icon-size);
.menu-icon-normal(mnu-orient-portrait, 36, @menu-icon-size);
.menu-icon-normal(mnu-orient-landscape, 37, @menu-icon-size);
.menu-otherstates-icon(ppm-toolbar, @menu-icon-size);
...
...
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