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
68ba02c5
Commit
68ba02c5
authored
Jun 30, 2016
by
Julia Radzhabova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PE][SSE] Limitations for light version (compact toolbar + hide chat/comments).
parent
2d1b5ea5
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
25 additions
and
24 deletions
+25
-24
apps/presentationeditor/main/app/controller/LeftMenu.js
apps/presentationeditor/main/app/controller/LeftMenu.js
+4
-4
apps/presentationeditor/main/app/controller/Main.js
apps/presentationeditor/main/app/controller/Main.js
+1
-0
apps/presentationeditor/main/app/view/Toolbar.js
apps/presentationeditor/main/app/view/Toolbar.js
+6
-3
apps/presentationeditor/main/app/view/Viewport.js
apps/presentationeditor/main/app/view/Viewport.js
+1
-1
apps/spreadsheeteditor/main/app/controller/LeftMenu.js
apps/spreadsheeteditor/main/app/controller/LeftMenu.js
+4
-4
apps/spreadsheeteditor/main/app/controller/Main.js
apps/spreadsheeteditor/main/app/controller/Main.js
+1
-0
apps/spreadsheeteditor/main/app/view/Toolbar.js
apps/spreadsheeteditor/main/app/view/Toolbar.js
+6
-5
apps/spreadsheeteditor/main/app/view/Viewport.js
apps/spreadsheeteditor/main/app/view/Viewport.js
+2
-7
No files found.
apps/presentationeditor/main/app/controller/LeftMenu.js
View file @
68ba02c5
...
...
@@ -155,11 +155,11 @@ define([
createDelayedElements
:
function
()
{
/** coauthoring begin **/
if
(
this
.
mode
.
canCoAuthoring
)
{
this
.
leftMenu
.
btnComments
[
this
.
mode
.
isEdit
&&
this
.
mode
.
canComments
?
'
show
'
:
'
hide
'
]();
this
.
leftMenu
.
btnComments
[
(
this
.
mode
.
isEdit
&&
this
.
mode
.
canComments
&&
!
this
.
mode
.
isLightVersion
)
?
'
show
'
:
'
hide
'
]();
if
(
this
.
mode
.
canComments
)
this
.
leftMenu
.
setOptionsPanel
(
'
comment
'
,
this
.
getApplication
().
getController
(
'
Common.Controllers.Comments
'
).
getView
(
'
Common.Views.Comments
'
));
this
.
leftMenu
.
btnChat
[
this
.
mode
.
canChat
?
'
show
'
:
'
hide
'
]();
this
.
leftMenu
.
btnChat
[
(
this
.
mode
.
canChat
&&
!
this
.
mode
.
isLightVersion
)
?
'
show
'
:
'
hide
'
]();
if
(
this
.
mode
.
canChat
)
this
.
leftMenu
.
setOptionsPanel
(
'
chat
'
,
this
.
getApplication
().
getController
(
'
Common.Controllers.Chat
'
).
getView
(
'
Common.Views.Chat
'
));
}
else
{
...
...
@@ -454,13 +454,13 @@ define([
break
;
/** coauthoring begin **/
case
'
chat
'
:
if
(
this
.
mode
.
canCoAuthoring
&&
this
.
mode
.
canChat
&&
(
!
previewPanel
||
!
previewPanel
.
isVisible
())){
if
(
this
.
mode
.
canCoAuthoring
&&
this
.
mode
.
canChat
&&
!
this
.
mode
.
isLightVersion
&&
(
!
previewPanel
||
!
previewPanel
.
isVisible
())){
Common
.
UI
.
Menu
.
Manager
.
hideAll
();
this
.
leftMenu
.
showMenu
(
'
chat
'
);
}
return
false
;
case
'
comments
'
:
if
(
this
.
mode
.
canCoAuthoring
&&
this
.
mode
.
isEdit
&&
this
.
mode
.
canComments
&&
(
!
previewPanel
||
!
previewPanel
.
isVisible
())
&&
!
this
.
_state
.
no_slides
)
{
if
(
this
.
mode
.
canCoAuthoring
&&
this
.
mode
.
isEdit
&&
this
.
mode
.
canComments
&&
!
this
.
mode
.
isLightVersion
&&
(
!
previewPanel
||
!
previewPanel
.
isVisible
())
&&
!
this
.
_state
.
no_slides
)
{
Common
.
UI
.
Menu
.
Manager
.
hideAll
();
this
.
leftMenu
.
showMenu
(
'
comments
'
);
this
.
getApplication
().
getController
(
'
Common.Controllers.Comments
'
).
onAfterShow
();
...
...
apps/presentationeditor/main/app/controller/Main.js
View file @
68ba02c5
...
...
@@ -712,6 +712,7 @@ define([
/** coauthoring end **/
this
.
appOptions
.
isOffline
=
this
.
api
.
asc_isOffline
();
this
.
appOptions
.
canLicense
=
params
.
asc_getCanLicense
?
params
.
asc_getCanLicense
()
:
false
;
this
.
appOptions
.
isLightVersion
=
params
.
asc_getIsLight
();
this
.
appOptions
.
canRequestEditRights
=
this
.
editorConfig
.
canRequestEditRights
;
this
.
appOptions
.
canEdit
=
this
.
permissions
.
edit
!==
false
&&
// can edit
(
this
.
editorConfig
.
canRequestEditRights
||
this
.
editorConfig
.
mode
!==
'
view
'
);
// if mode=="view" -> canRequestEditRights must be defined
...
...
apps/presentationeditor/main/app/view/Toolbar.js
View file @
68ba02c5
...
...
@@ -213,7 +213,9 @@ define([
});
me
.
slideOnlyControls
.
push
(
me
.
btnChangeSlide
);
me
.
listenTo
(
PE
.
getCollection
(
'
SlideLayouts
'
),
'
reset
'
,
function
()
{
me
.
mnuChangeSlidePicker
.
_needRecalcSlideLayout
=
me
.
mnuAddSlidePicker
.
_needRecalcSlideLayout
=
true
;
me
.
mnuAddSlidePicker
.
_needRecalcSlideLayout
=
true
;
if
(
me
.
mnuChangeSlidePicker
)
me
.
mnuChangeSlidePicker
.
_needRecalcSlideLayout
=
true
;
});
me
.
btnPreview
=
new
Common
.
UI
.
Button
({
...
...
@@ -1145,7 +1147,7 @@ define([
});
},
render
:
function
()
{
render
:
function
(
mode
)
{
var
me
=
this
,
el
=
$
(
this
.
el
);
...
...
@@ -1156,7 +1158,7 @@ define([
this
.
trigger
(
'
render:before
'
,
this
);
var
value
=
Common
.
localStorage
.
getItem
(
'
pe-compact-toolbar
'
);
var
valueCompact
=
(
value
!==
null
&&
parseInt
(
value
)
==
1
);
var
valueCompact
=
(
mode
.
isLightVersion
||
value
!==
null
&&
parseInt
(
value
)
==
1
);
value
=
Common
.
localStorage
.
getItem
(
'
pe-hidden-title
'
);
var
valueTitle
=
(
value
!==
null
&&
parseInt
(
value
)
==
1
);
...
...
@@ -1167,6 +1169,7 @@ define([
value
=
Common
.
localStorage
.
getItem
(
"
pe-hidden-rulers
"
);
var
valueRulers
=
(
value
!==
null
&&
parseInt
(
value
)
==
1
);
me
.
mnuitemCompactToolbar
.
setVisible
(
!
mode
.
isLightVersion
);
me
.
mnuitemCompactToolbar
.
setChecked
(
valueCompact
);
me
.
mnuitemHideTitleBar
.
setChecked
(
valueTitle
);
me
.
mnuitemHideStatusBar
.
setChecked
(
valueStatus
);
...
...
apps/presentationeditor/main/app/view/Viewport.js
View file @
68ba02c5
...
...
@@ -131,7 +131,7 @@ define([
rightMenuView
=
PE
.
getController
(
'
RightMenu
'
).
getView
(
'
RightMenu
'
),
statusBarView
=
PE
.
getController
(
'
Statusbar
'
).
getView
(
'
Statusbar
'
);
me
.
_toolbar
=
toolbarView
.
render
();
me
.
_toolbar
=
toolbarView
.
render
(
this
.
mode
);
me
.
_rightMenu
=
rightMenuView
.
render
();
var
value
=
Common
.
localStorage
.
getItem
(
'
pe-hidden-status
'
);
...
...
apps/spreadsheeteditor/main/app/controller/LeftMenu.js
View file @
68ba02c5
...
...
@@ -163,11 +163,11 @@ define([
createDelayedElements
:
function
()
{
/** coauthoring begin **/
if
(
this
.
mode
.
canCoAuthoring
)
{
this
.
leftMenu
.
btnComments
[
this
.
mode
.
isEdit
&&
this
.
mode
.
canComments
?
'
show
'
:
'
hide
'
]();
this
.
leftMenu
.
btnComments
[
(
this
.
mode
.
isEdit
&&
this
.
mode
.
canComments
&&
!
this
.
mode
.
isLightVersion
)
?
'
show
'
:
'
hide
'
]();
if
(
this
.
mode
.
canComments
)
this
.
leftMenu
.
setOptionsPanel
(
'
comment
'
,
this
.
getApplication
().
getController
(
'
Common.Controllers.Comments
'
).
getView
(
'
Common.Views.Comments
'
));
this
.
leftMenu
.
btnChat
[
this
.
mode
.
canChat
?
'
show
'
:
'
hide
'
]();
this
.
leftMenu
.
btnChat
[
(
this
.
mode
.
canChat
&&
!
this
.
mode
.
isLightVersion
)
?
'
show
'
:
'
hide
'
]();
if
(
this
.
mode
.
canChat
)
this
.
leftMenu
.
setOptionsPanel
(
'
chat
'
,
this
.
getApplication
().
getController
(
'
Common.Controllers.Chat
'
).
getView
(
'
Common.Views.Chat
'
));
}
else
{
...
...
@@ -621,13 +621,13 @@ define([
break
;
/** coauthoring begin **/
case
'
chat
'
:
if
(
this
.
mode
.
canCoAuthoring
&&
this
.
mode
.
canChat
)
{
if
(
this
.
mode
.
canCoAuthoring
&&
this
.
mode
.
canChat
&&
!
this
.
mode
.
isLightVersion
)
{
Common
.
UI
.
Menu
.
Manager
.
hideAll
();
this
.
leftMenu
.
showMenu
(
'
chat
'
);
}
return
false
;
case
'
comments
'
:
if
(
this
.
mode
.
canCoAuthoring
&&
this
.
mode
.
isEdit
&&
this
.
mode
.
canComments
)
{
if
(
this
.
mode
.
canCoAuthoring
&&
this
.
mode
.
isEdit
&&
this
.
mode
.
canComments
&&
!
this
.
mode
.
isLightVersion
)
{
Common
.
UI
.
Menu
.
Manager
.
hideAll
();
this
.
leftMenu
.
showMenu
(
'
comments
'
);
this
.
getApplication
().
getController
(
'
Common.Controllers.Comments
'
).
onAfterShow
();
...
...
apps/spreadsheeteditor/main/app/controller/Main.js
View file @
68ba02c5
...
...
@@ -727,6 +727,7 @@ define([
/** coauthoring end **/
this
.
appOptions
.
isOffline
=
this
.
api
.
asc_isOffline
();
this
.
appOptions
.
canLicense
=
params
.
asc_getCanLicense
?
params
.
asc_getCanLicense
()
:
false
;
this
.
appOptions
.
isLightVersion
=
params
.
asc_getIsLight
();
this
.
appOptions
.
canComments
=
this
.
appOptions
.
canLicense
&&
!
((
typeof
(
this
.
editorConfig
.
customization
)
==
'
object
'
)
&&
this
.
editorConfig
.
customization
.
comments
===
false
);
this
.
appOptions
.
canChat
=
this
.
appOptions
.
canLicense
&&
!
this
.
appOptions
.
isOffline
&&
!
((
typeof
(
this
.
editorConfig
.
customization
)
==
'
object
'
)
&&
this
.
editorConfig
.
customization
.
chat
===
false
);
...
...
apps/spreadsheeteditor/main/app/view/Toolbar.js
View file @
68ba02c5
...
...
@@ -1567,7 +1567,7 @@ define([
});
},
render
:
function
(
isEditDiagram
,
isEditMailMerg
e
)
{
render
:
function
(
mod
e
)
{
var
me
=
this
,
el
=
$
(
this
.
el
);
...
...
@@ -1579,8 +1579,9 @@ define([
JSON
.
parse
(
Common
.
localStorage
.
getItem
(
'
sse-hidden-title
'
))
&&
(
options
.
title
=
true
);
JSON
.
parse
(
Common
.
localStorage
.
getItem
(
'
sse-hidden-formula
'
))
&&
(
options
.
formula
=
true
);
JSON
.
parse
(
Common
.
localStorage
.
getItem
(
'
sse-hidden-headings
'
))
&&
(
options
.
headings
=
true
);
var
isCompactView
=
!!
JSON
.
parse
(
Common
.
localStorage
.
getItem
(
'
sse-toolbar-compact
'
));
var
isCompactView
=
mode
.
isLightVersion
||
!!
JSON
.
parse
(
Common
.
localStorage
.
getItem
(
'
sse-toolbar-compact
'
));
me
.
mnuitemCompactToolbar
.
setVisible
(
!
mode
.
isLightVersion
);
me
.
mnuitemCompactToolbar
.
setChecked
(
isCompactView
);
me
.
mnuitemHideTitleBar
.
setChecked
(
!!
options
.
title
);
me
.
mnuitemHideFormulaBar
.
setChecked
(
!!
options
.
formula
);
...
...
@@ -1589,12 +1590,12 @@ define([
this
.
trigger
(
'
render:before
'
,
this
);
el
.
html
(
this
.
template
({
isEditDiagram
:
isEditDiagram
,
isEditMailMerge
:
isEditMailMerge
,
isEditDiagram
:
mode
.
isEditDiagram
,
isEditMailMerge
:
mode
.
isEditMailMerge
,
isCompactView
:
isCompactView
}));
me
.
rendererComponents
(
isEditDiagram
?
'
diagram
'
:
(
isEditMailMerge
?
'
merge
'
:
isCompactView
?
'
short
'
:
'
full
'
));
me
.
rendererComponents
(
mode
.
isEditDiagram
?
'
diagram
'
:
(
mode
.
isEditMailMerge
?
'
merge
'
:
isCompactView
?
'
short
'
:
'
full
'
));
this
.
trigger
(
'
render:after
'
,
this
);
...
...
apps/spreadsheeteditor/main/app/view/Viewport.js
View file @
68ba02c5
...
...
@@ -146,14 +146,9 @@ define([
var
me
=
this
,
toolbarView
=
SSE
.
getController
(
'
Toolbar
'
).
getView
(
'
Toolbar
'
),
rightMenuView
=
SSE
.
getController
(
'
RightMenu
'
).
getView
(
'
RightMenu
'
);
// statusBarView = SSE.getController('Statusbar').getView('Statusbar');
//
me
.
_toolbar
=
toolbarView
.
render
(
this
.
mode
.
isEditDiagram
,
this
.
mode
.
isEditMailMerge
);
me
.
_toolbar
=
toolbarView
.
render
(
this
.
mode
);
me
.
_rightMenu
=
rightMenuView
.
render
();
//
// var value = Common.localStorage.getItem('de-hidden-status');
// if (value !== null && parseInt(value) == 1)
// statusBarView.setVisible(false);
},
setMode
:
function
(
mode
,
delay
)
{
...
...
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