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
3eb619db
Commit
3eb619db
authored
Sep 27, 2016
by
Julia Radzhabova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added "Rename" to the File menu.
parent
954f36ae
Changes
15
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
104 additions
and
25 deletions
+104
-25
apps/documenteditor/main/app/controller/LeftMenu.js
apps/documenteditor/main/app/controller/LeftMenu.js
+13
-0
apps/documenteditor/main/app/controller/Main.js
apps/documenteditor/main/app/controller/Main.js
+3
-1
apps/documenteditor/main/app/template/FileMenu.template
apps/documenteditor/main/app/template/FileMenu.template
+1
-0
apps/documenteditor/main/app/view/FileMenu.js
apps/documenteditor/main/app/view/FileMenu.js
+18
-8
apps/documenteditor/main/locale/en.json
apps/documenteditor/main/locale/en.json
+1
-0
apps/presentationeditor/main/app/controller/LeftMenu.js
apps/presentationeditor/main/app/controller/LeftMenu.js
+13
-0
apps/presentationeditor/main/app/controller/Main.js
apps/presentationeditor/main/app/controller/Main.js
+3
-1
apps/presentationeditor/main/app/template/FileMenu.template
apps/presentationeditor/main/app/template/FileMenu.template
+1
-0
apps/presentationeditor/main/app/view/FileMenu.js
apps/presentationeditor/main/app/view/FileMenu.js
+15
-6
apps/presentationeditor/main/locale/en.json
apps/presentationeditor/main/locale/en.json
+1
-0
apps/spreadsheeteditor/main/app/controller/LeftMenu.js
apps/spreadsheeteditor/main/app/controller/LeftMenu.js
+13
-0
apps/spreadsheeteditor/main/app/controller/Main.js
apps/spreadsheeteditor/main/app/controller/Main.js
+3
-1
apps/spreadsheeteditor/main/app/template/FileMenu.template
apps/spreadsheeteditor/main/app/template/FileMenu.template
+1
-0
apps/spreadsheeteditor/main/app/view/FileMenu.js
apps/spreadsheeteditor/main/app/view/FileMenu.js
+17
-8
apps/spreadsheeteditor/main/locale/en.json
apps/spreadsheeteditor/main/locale/en.json
+1
-0
No files found.
apps/documenteditor/main/app/controller/LeftMenu.js
View file @
3eb619db
...
...
@@ -235,6 +235,19 @@ define([
this
.
showHistory
();
}
break
;
case
'
rename
'
:
var
me
=
this
,
documentCaption
=
me
.
api
.
asc_getDocumentName
();
(
new
Common
.
Views
.
RenameDialog
({
filename
:
documentCaption
,
handler
:
function
(
result
,
value
)
{
if
(
result
==
'
ok
'
&&
!
_
.
isEmpty
(
value
.
trim
())
&&
documentCaption
!==
value
.
trim
())
{
Common
.
Gateway
.
requestRename
(
value
);
}
Common
.
NotificationCenter
.
trigger
(
'
edit:complete
'
,
me
);
}
})).
show
();
break
;
default
:
close_menu
=
false
;
}
...
...
apps/documenteditor/main/app/controller/Main.js
View file @
3eb619db
...
...
@@ -971,6 +971,7 @@ define([
this
.
appOptions
.
canChat
=
this
.
appOptions
.
canLicense
&&
!
this
.
appOptions
.
isOffline
&&
!
((
typeof
(
this
.
editorConfig
.
customization
)
==
'
object
'
)
&&
this
.
editorConfig
.
customization
.
chat
===
false
);
this
.
appOptions
.
canEditStyles
=
this
.
appOptions
.
canLicense
&&
this
.
appOptions
.
canEdit
;
this
.
appOptions
.
canPrint
=
(
this
.
permissions
.
print
!==
false
);
this
.
appOptions
.
canRename
=
!!
this
.
permissions
.
rename
;
var
type
=
/^
(?:(
pdf|djvu|xps
))
$/
.
exec
(
this
.
document
.
fileType
);
this
.
appOptions
.
canDownloadOrigin
=
!
this
.
appOptions
.
nativeApp
&&
this
.
permissions
.
download
!==
false
&&
(
type
&&
typeof
type
[
1
]
===
'
string
'
);
...
...
@@ -984,7 +985,7 @@ define([
headerView
.
setBranding
(
this
.
editorConfig
.
customization
);
params
.
asc_getTrial
()
&&
headerView
.
setDeveloperMode
(
true
);
this
.
permissions
.
r
ename
&&
headerView
.
setCanRename
(
true
);
this
.
appOptions
.
canR
ename
&&
headerView
.
setCanRename
(
true
);
this
.
applyModeCommonElements
();
this
.
applyModeEditorElements
();
...
...
@@ -1281,6 +1282,7 @@ define([
onCoAuthoringDisconnect
:
function
()
{
this
.
getApplication
().
getController
(
'
Viewport
'
).
getView
(
'
Viewport
'
).
setMode
({
isDisconnected
:
true
});
this
.
getApplication
().
getController
(
'
Viewport
'
).
getView
(
'
Common.Views.Header
'
).
setCanRename
(
false
);
this
.
appOptions
.
canRename
=
false
;
this
.
_state
.
isDisconnected
=
true
;
},
...
...
apps/documenteditor/main/app/template/FileMenu.template
View file @
3eb619db
...
...
@@ -7,6 +7,7 @@
<li id="fm-btn-download" class="fm-btn" />
<li id="fm-btn-save-desktop" class="fm-btn" />
<li id="fm-btn-print" class="fm-btn" />
<li id="fm-btn-rename" class="fm-btn" />
<li class="devider" />
<li id="fm-btn-recent" class="fm-btn" />
<li id="fm-btn-create" class="fm-btn" />
...
...
apps/documenteditor/main/app/view/FileMenu.js
View file @
3eb619db
...
...
@@ -121,6 +121,12 @@ define([
caption
:
this
.
btnPrintCaption
,
canFocused
:
false
}),
new
Common
.
UI
.
MenuItem
({
el
:
$
(
'
#fm-btn-rename
'
,
this
.
el
),
action
:
'
rename
'
,
caption
:
this
.
btnRenameCaption
,
canFocused
:
false
}),
new
Common
.
UI
.
MenuItem
({
el
:
$
(
'
#fm-btn-recent
'
,
this
.
el
),
action
:
'
recent
'
,
...
...
@@ -208,9 +214,10 @@ define([
applyMode
:
function
()
{
this
.
items
[
5
][
this
.
mode
.
canPrint
?
'
show
'
:
'
hide
'
]();
this
.
items
[
6
][
this
.
mode
.
canOpenRecent
?
'
show
'
:
'
hide
'
]();
this
.
items
[
7
][
this
.
mode
.
canCreateNew
?
'
show
'
:
'
hide
'
]();
this
.
items
[
7
].
$el
.
find
(
'
+.devider
'
)[
this
.
mode
.
canCreateNew
?
'
show
'
:
'
hide
'
]();
this
.
items
[
6
][(
this
.
mode
.
canRename
&&
!
this
.
mode
.
isDesktopApp
)
?
'
show
'
:
'
hide
'
]();
this
.
items
[
7
][
this
.
mode
.
canOpenRecent
?
'
show
'
:
'
hide
'
]();
this
.
items
[
8
][
this
.
mode
.
canCreateNew
?
'
show
'
:
'
hide
'
]();
this
.
items
[
8
].
$el
.
find
(
'
+.devider
'
)[
this
.
mode
.
canCreateNew
?
'
show
'
:
'
hide
'
]();
this
.
items
[
3
][((
this
.
mode
.
canDownload
||
this
.
mode
.
canDownloadOrigin
)
&&
(
!
this
.
mode
.
isDesktopApp
||
!
this
.
mode
.
isOffline
))?
'
show
'
:
'
hide
'
]();
this
.
items
[
4
][((
this
.
mode
.
canDownload
||
this
.
mode
.
canDownloadOrigin
)
&&
this
.
mode
.
isDesktopApp
&&
this
.
mode
.
isOffline
)?
'
show
'
:
'
hide
'
]();
...
...
@@ -219,7 +226,7 @@ define([
this
.
items
[
1
][
this
.
mode
.
isEdit
?
'
show
'
:
'
hide
'
]();
this
.
items
[
2
][
!
this
.
mode
.
isEdit
&&
this
.
mode
.
canEdit
&&
this
.
mode
.
canRequestEditRights
?
'
show
'
:
'
hide
'
]();
this
.
items
[
9
][(
!
this
.
mode
.
isOffline
&&
!
this
.
mode
.
isReviewOnly
&&
this
.
document
&&
this
.
document
.
info
&&
this
.
items
[
10
][(
!
this
.
mode
.
isOffline
&&
!
this
.
mode
.
isReviewOnly
&&
this
.
document
&&
this
.
document
.
info
&&
(
this
.
document
.
info
.
sharingSettings
&&
this
.
document
.
info
.
sharingSettings
.
length
>
0
||
this
.
mode
.
sharingSettingsUrl
&&
this
.
mode
.
sharingSettingsUrl
.
length
))?
'
show
'
:
'
hide
'
]();
...
...
@@ -232,7 +239,7 @@ define([
if
(
this
.
mode
.
canCreateNew
)
{
if
(
this
.
mode
.
templates
&&
this
.
mode
.
templates
.
length
)
{
$
(
'
a
'
,
this
.
items
[
7
].
$el
).
text
(
this
.
btnCreateNewCaption
+
'
...
'
);
$
(
'
a
'
,
this
.
items
[
8
].
$el
).
text
(
this
.
btnCreateNewCaption
+
'
...
'
);
this
.
panels
[
'
new
'
]
=
((
new
DE
.
Views
.
FileMenuPanels
.
CreateNew
({
menu
:
this
,
docs
:
this
.
mode
.
templates
})).
render
());
}
}
...
...
@@ -254,8 +261,8 @@ define([
this
.
panels
[
'
help
'
].
setLangConfig
(
this
.
mode
.
lang
);
this
.
items
[
1
0
][
this
.
mode
.
canUseHistory
?
'
show
'
:
'
hide
'
]();
this
.
items
[
1
0
].
setDisabled
(
this
.
mode
.
isDisconnected
);
this
.
items
[
1
1
][
this
.
mode
.
canUseHistory
?
'
show
'
:
'
hide
'
]();
this
.
items
[
1
1
].
setDisabled
(
this
.
mode
.
isDisconnected
);
},
setMode
:
function
(
mode
,
delay
)
{
...
...
@@ -263,6 +270,7 @@ define([
this
.
mode
.
canEdit
=
this
.
mode
.
isEdit
=
false
;
this
.
mode
.
canOpenRecent
=
this
.
mode
.
canCreateNew
=
false
;
this
.
mode
.
isDisconnected
=
mode
.
isDisconnected
;
this
.
mode
.
canRename
=
false
;
}
else
{
this
.
mode
=
mode
;
}
...
...
@@ -303,6 +311,7 @@ define([
SetDisabled
:
function
(
disable
)
{
this
.
items
[
1
][(
disable
||
!
this
.
mode
.
isEdit
)?
'
hide
'
:
'
show
'
]();
this
.
items
[
6
][(
disable
||
!
this
.
mode
.
canRename
||
this
.
mode
.
isDesktopApp
)
?
'
hide
'
:
'
show
'
]();
},
btnSaveCaption
:
'
Save
'
,
...
...
@@ -319,6 +328,7 @@ define([
btnSettingsCaption
:
'
Advanced Settings...
'
,
btnHistoryCaption
:
'
Versions History
'
,
btnSaveAsCaption
:
'
Save as
'
,
textDownload
:
'
Download
'
textDownload
:
'
Download
'
,
btnRenameCaption
:
'
Rename...
'
},
DE
.
Views
.
FileMenu
||
{}));
});
apps/documenteditor/main/locale/en.json
View file @
3eb619db
...
...
@@ -875,6 +875,7 @@
"DE.Views.FileMenu.btnInfoCaption"
:
"Document Info..."
,
"DE.Views.FileMenu.btnPrintCaption"
:
"Print"
,
"DE.Views.FileMenu.btnRecentFilesCaption"
:
"Open Recent..."
,
"DE.Views.FileMenu.btnRenameCaption"
:
"Rename..."
,
"DE.Views.FileMenu.btnReturnCaption"
:
"Back to Document"
,
"DE.Views.FileMenu.btnRightsCaption"
:
"Access Rights..."
,
"DE.Views.FileMenu.btnSaveAsCaption"
:
"Save as"
,
...
...
apps/presentationeditor/main/app/controller/LeftMenu.js
View file @
3eb619db
...
...
@@ -196,6 +196,19 @@ define([
if
(
isopts
)
close_menu
=
false
;
else
this
.
onCreateNew
(
undefined
,
'
blank
'
);
break
;
case
'
rename
'
:
var
me
=
this
,
documentCaption
=
me
.
api
.
asc_getDocumentName
();
(
new
Common
.
Views
.
RenameDialog
({
filename
:
documentCaption
,
handler
:
function
(
result
,
value
)
{
if
(
result
==
'
ok
'
&&
!
_
.
isEmpty
(
value
.
trim
())
&&
documentCaption
!==
value
.
trim
())
{
Common
.
Gateway
.
requestRename
(
value
);
}
Common
.
NotificationCenter
.
trigger
(
'
edit:complete
'
,
me
);
}
})).
show
();
break
;
default
:
close_menu
=
false
;
}
...
...
apps/presentationeditor/main/app/controller/Main.js
View file @
3eb619db
...
...
@@ -739,6 +739,7 @@ define([
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
);
this
.
appOptions
.
canPrint
=
(
this
.
permissions
.
print
!==
false
);
this
.
appOptions
.
canRename
=
!!
this
.
permissions
.
rename
;
this
.
_state
.
licenseWarning
=
(
licType
===
Asc
.
c_oLicenseResult
.
Connections
)
&&
this
.
appOptions
.
canEdit
&&
this
.
editorConfig
.
mode
!==
'
view
'
;
...
...
@@ -748,7 +749,7 @@ define([
headerView
.
setBranding
(
this
.
editorConfig
.
customization
);
params
.
asc_getTrial
()
&&
headerView
.
setDeveloperMode
(
true
);
this
.
permissions
.
r
ename
&&
headerView
.
setCanRename
(
true
);
this
.
appOptions
.
canR
ename
&&
headerView
.
setCanRename
(
true
);
this
.
applyModeCommonElements
();
this
.
applyModeEditorElements
();
...
...
@@ -1034,6 +1035,7 @@ define([
// TODO: Disable all except 'Download As' and 'Print'
this
.
getApplication
().
getController
(
'
Viewport
'
).
getView
(
'
Viewport
'
).
setMode
({
isDisconnected
:
true
});
this
.
getApplication
().
getController
(
'
Viewport
'
).
getView
(
'
Common.Views.Header
'
).
setCanRename
(
false
);
this
.
appOptions
.
canRename
=
false
;
this
.
_state
.
isDisconnected
=
true
;
// this.getFileMenu().setMode({isDisconnected:true});
},
...
...
apps/presentationeditor/main/app/template/FileMenu.template
View file @
3eb619db
...
...
@@ -7,6 +7,7 @@
<li id="fm-btn-download" class="fm-btn" />
<li id="fm-btn-save-desktop" class="fm-btn" />
<li id="fm-btn-print" class="fm-btn" />
<li id="fm-btn-rename" class="fm-btn" />
<li class="devider" />
<li id="fm-btn-recent" class="fm-btn" />
<li id="fm-btn-create" class="fm-btn" />
...
...
apps/presentationeditor/main/app/view/FileMenu.js
View file @
3eb619db
...
...
@@ -124,6 +124,12 @@ define([
caption
:
this
.
btnPrintCaption
,
canFocused
:
false
}),
new
Common
.
UI
.
MenuItem
({
el
:
$
(
'
#fm-btn-rename
'
,
this
.
el
),
action
:
'
rename
'
,
caption
:
this
.
btnRenameCaption
,
canFocused
:
false
}),
new
Common
.
UI
.
MenuItem
({
el
:
$
(
'
#fm-btn-recent
'
,
this
.
el
),
action
:
'
recent
'
,
...
...
@@ -205,9 +211,10 @@ define([
applyMode
:
function
()
{
this
.
items
[
5
][
this
.
mode
.
canPrint
?
'
show
'
:
'
hide
'
]();
this
.
items
[
6
][
this
.
mode
.
canOpenRecent
?
'
show
'
:
'
hide
'
]();
this
.
items
[
7
][
this
.
mode
.
canCreateNew
?
'
show
'
:
'
hide
'
]();
this
.
items
[
7
].
$el
.
find
(
'
+.devider
'
)[
this
.
mode
.
canCreateNew
?
'
show
'
:
'
hide
'
]();
this
.
items
[
6
][(
this
.
mode
.
canRename
&&
!
this
.
mode
.
isDesktopApp
)
?
'
show
'
:
'
hide
'
]();
this
.
items
[
7
][
this
.
mode
.
canOpenRecent
?
'
show
'
:
'
hide
'
]();
this
.
items
[
8
][
this
.
mode
.
canCreateNew
?
'
show
'
:
'
hide
'
]();
this
.
items
[
8
].
$el
.
find
(
'
+.devider
'
)[
this
.
mode
.
canCreateNew
?
'
show
'
:
'
hide
'
]();
this
.
items
[
3
][(
this
.
mode
.
canDownload
&&
(
!
this
.
mode
.
isDesktopApp
||
!
this
.
mode
.
isOffline
))?
'
show
'
:
'
hide
'
]();
this
.
items
[
4
][(
this
.
mode
.
canDownload
&&
this
.
mode
.
isDesktopApp
&&
this
.
mode
.
isOffline
)?
'
show
'
:
'
hide
'
]();
...
...
@@ -217,7 +224,7 @@ define([
this
.
items
[
1
][
this
.
mode
.
isEdit
?
'
show
'
:
'
hide
'
]();
this
.
items
[
2
][
!
this
.
mode
.
isEdit
&&
this
.
mode
.
canEdit
&&
this
.
mode
.
canRequestEditRights
?
'
show
'
:
'
hide
'
]();
this
.
items
[
9
][(
!
this
.
mode
.
isOffline
&&
this
.
document
&&
this
.
document
.
info
&&
(
this
.
document
.
info
.
sharingSettings
&&
this
.
document
.
info
.
sharingSettings
.
length
>
0
||
this
.
items
[
10
][(
!
this
.
mode
.
isOffline
&&
this
.
document
&&
this
.
document
.
info
&&
(
this
.
document
.
info
.
sharingSettings
&&
this
.
document
.
info
.
sharingSettings
.
length
>
0
||
this
.
mode
.
sharingSettingsUrl
&&
this
.
mode
.
sharingSettingsUrl
.
length
))?
'
show
'
:
'
hide
'
]();
this
.
mode
.
canBack
?
this
.
$el
.
find
(
'
#fm-btn-back
'
).
show
().
prev
().
show
()
:
...
...
@@ -229,7 +236,7 @@ define([
if
(
this
.
mode
.
canCreateNew
)
{
if
(
this
.
mode
.
templates
&&
this
.
mode
.
templates
.
length
)
{
$
(
'
a
'
,
this
.
items
[
7
].
$el
).
text
(
this
.
btnCreateNewCaption
+
'
...
'
);
$
(
'
a
'
,
this
.
items
[
8
].
$el
).
text
(
this
.
btnCreateNewCaption
+
'
...
'
);
this
.
panels
[
'
new
'
]
=
((
new
PE
.
Views
.
FileMenuPanels
.
CreateNew
({
menu
:
this
,
docs
:
this
.
mode
.
templates
})).
render
());
}
}
...
...
@@ -251,6 +258,7 @@ define([
if
(
mode
.
isDisconnected
)
{
this
.
mode
.
canEdit
=
this
.
mode
.
isEdit
=
false
;
this
.
mode
.
canOpenRecent
=
this
.
mode
.
canCreateNew
=
false
;
this
.
mode
.
canRename
=
false
;
}
else
{
this
.
mode
=
mode
;
}
...
...
@@ -315,6 +323,7 @@ define([
btnToEditCaption
:
'
Edit Document
'
,
btnBackCaption
:
'
Go to Documents
'
,
btnSettingsCaption
:
'
Advanced Settings...
'
,
btnSaveAsCaption
:
'
Save as
'
btnSaveAsCaption
:
'
Save as
'
,
btnRenameCaption
:
'
Rename...
'
},
PE
.
Views
.
FileMenu
||
{}));
});
apps/presentationeditor/main/locale/en.json
View file @
3eb619db
...
...
@@ -344,6 +344,7 @@
"PE.Views.FileMenu.btnInfoCaption"
:
"Presentation Info..."
,
"PE.Views.FileMenu.btnPrintCaption"
:
"Print"
,
"PE.Views.FileMenu.btnRecentFilesCaption"
:
"Open Recent..."
,
"PE.Views.FileMenu.btnRenameCaption"
:
"Rename..."
,
"PE.Views.FileMenu.btnReturnCaption"
:
"Back to Presentation"
,
"PE.Views.FileMenu.btnRightsCaption"
:
"Access Rights..."
,
"PE.Views.FileMenu.btnSaveAsCaption"
:
"Save as"
,
...
...
apps/spreadsheeteditor/main/app/controller/LeftMenu.js
View file @
3eb619db
...
...
@@ -205,6 +205,19 @@ define([
if
(
isopts
)
close_menu
=
false
;
else
this
.
onCreateNew
(
undefined
,
'
blank
'
);
break
;
case
'
rename
'
:
var
me
=
this
,
documentCaption
=
me
.
api
.
asc_getDocumentName
();
(
new
Common
.
Views
.
RenameDialog
({
filename
:
documentCaption
,
handler
:
function
(
result
,
value
)
{
if
(
result
==
'
ok
'
&&
!
_
.
isEmpty
(
value
.
trim
())
&&
documentCaption
!==
value
.
trim
())
{
Common
.
Gateway
.
requestRename
(
value
);
}
Common
.
NotificationCenter
.
trigger
(
'
edit:complete
'
,
me
);
}
})).
show
();
break
;
default
:
close_menu
=
false
;
}
...
...
apps/spreadsheeteditor/main/app/controller/Main.js
View file @
3eb619db
...
...
@@ -759,13 +759,14 @@ define([
/** coauthoring end **/
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
);
this
.
appOptions
.
canRename
=
!!
this
.
permissions
.
rename
;
this
.
appOptions
.
canBranding
=
params
.
asc_getCanBranding
()
&&
(
typeof
this
.
editorConfig
.
customization
==
'
object
'
);
if
(
this
.
appOptions
.
canBranding
)
this
.
headerView
.
setBranding
(
this
.
editorConfig
.
customization
);
params
.
asc_getTrial
()
&&
this
.
headerView
.
setDeveloperMode
(
true
);
this
.
permissions
.
r
ename
&&
this
.
headerView
.
setCanRename
(
true
);
this
.
appOptions
.
canR
ename
&&
this
.
headerView
.
setCanRename
(
true
);
}
this
.
appOptions
.
canRequestEditRights
=
this
.
editorConfig
.
canRequestEditRights
;
...
...
@@ -1186,6 +1187,7 @@ define([
onCoAuthoringDisconnect
:
function
()
{
this
.
getApplication
().
getController
(
'
Viewport
'
).
getView
(
'
Viewport
'
).
setMode
({
isDisconnected
:
true
});
this
.
getApplication
().
getController
(
'
Viewport
'
).
getView
(
'
Common.Views.Header
'
).
setCanRename
(
false
);
this
.
appOptions
.
canRename
=
false
;
this
.
_state
.
isDisconnected
=
true
;
},
...
...
apps/spreadsheeteditor/main/app/template/FileMenu.template
View file @
3eb619db
...
...
@@ -7,6 +7,7 @@
<li id="fm-btn-download" class="fm-btn" />
<li id="fm-btn-save-desktop" class="fm-btn" />
<li id="fm-btn-print" class="fm-btn" />
<li id="fm-btn-rename" class="fm-btn" />
<li class="devider" />
<li id="fm-btn-recent" class="fm-btn" />
<li id="fm-btn-create" class="fm-btn" />
...
...
apps/spreadsheeteditor/main/app/view/FileMenu.js
View file @
3eb619db
...
...
@@ -111,6 +111,12 @@ define([
caption
:
this
.
btnPrintCaption
,
canFocused
:
false
}),
new
Common
.
UI
.
MenuItem
({
el
:
$
(
'
#fm-btn-rename
'
,
this
.
el
),
action
:
'
rename
'
,
caption
:
this
.
btnRenameCaption
,
canFocused
:
false
}),
new
Common
.
UI
.
MenuItem
({
el
:
$
(
'
#fm-btn-recent
'
,
this
.
el
),
action
:
'
recent
'
,
...
...
@@ -191,9 +197,10 @@ define([
applyMode
:
function
()
{
this
.
items
[
5
][
this
.
mode
.
canPrint
?
'
show
'
:
'
hide
'
]();
this
.
items
[
6
][
this
.
mode
.
canOpenRecent
?
'
show
'
:
'
hide
'
]();
this
.
items
[
7
][
this
.
mode
.
canCreateNew
?
'
show
'
:
'
hide
'
]();
this
.
items
[
7
].
$el
.
find
(
'
+.devider
'
)[
this
.
mode
.
canCreateNew
?
'
show
'
:
'
hide
'
]();
this
.
items
[
6
][(
this
.
mode
.
canRename
&&
!
this
.
mode
.
isDesktopApp
)
?
'
show
'
:
'
hide
'
]();
this
.
items
[
7
][
this
.
mode
.
canOpenRecent
?
'
show
'
:
'
hide
'
]();
this
.
items
[
8
][
this
.
mode
.
canCreateNew
?
'
show
'
:
'
hide
'
]();
this
.
items
[
8
].
$el
.
find
(
'
+.devider
'
)[
this
.
mode
.
canCreateNew
?
'
show
'
:
'
hide
'
]();
this
.
items
[
3
][(
this
.
mode
.
canDownload
&&
(
!
this
.
mode
.
isDesktopApp
||
!
this
.
mode
.
isOffline
))?
'
show
'
:
'
hide
'
]();
this
.
items
[
4
][(
this
.
mode
.
canDownload
&&
this
.
mode
.
isDesktopApp
&&
this
.
mode
.
isOffline
)?
'
show
'
:
'
hide
'
]();
...
...
@@ -202,11 +209,11 @@ define([
this
.
items
[
1
][
this
.
mode
.
isEdit
?
'
show
'
:
'
hide
'
]();
this
.
items
[
2
][
!
this
.
mode
.
isEdit
&&
this
.
mode
.
canEdit
&&
this
.
mode
.
canRequestEditRights
?
'
show
'
:
'
hide
'
]();
this
.
items
[
9
][(
!
this
.
mode
.
isOffline
&&
this
.
document
&&
this
.
document
.
info
&&
(
this
.
document
.
info
.
sharingSettings
&&
this
.
document
.
info
.
sharingSettings
.
length
>
0
||
this
.
items
[
10
][(
!
this
.
mode
.
isOffline
&&
this
.
document
&&
this
.
document
.
info
&&
(
this
.
document
.
info
.
sharingSettings
&&
this
.
document
.
info
.
sharingSettings
.
length
>
0
||
this
.
mode
.
sharingSettingsUrl
&&
this
.
mode
.
sharingSettingsUrl
.
length
))?
'
show
'
:
'
hide
'
]();
this
.
items
[
1
0
][
this
.
mode
.
isEdit
?
'
show
'
:
'
hide
'
]();
this
.
items
[
1
0
].
$el
.
find
(
'
+.devider
'
)[
this
.
mode
.
isEdit
?
'
show
'
:
'
hide
'
]();
this
.
items
[
1
1
][
this
.
mode
.
isEdit
?
'
show
'
:
'
hide
'
]();
this
.
items
[
1
1
].
$el
.
find
(
'
+.devider
'
)[
this
.
mode
.
isEdit
?
'
show
'
:
'
hide
'
]();
this
.
mode
.
canBack
?
this
.
$el
.
find
(
'
#fm-btn-back
'
).
show
().
prev
().
show
()
:
this
.
$el
.
find
(
'
#fm-btn-back
'
).
hide
().
prev
().
hide
();
...
...
@@ -217,7 +224,7 @@ define([
if
(
this
.
mode
.
canCreateNew
)
{
if
(
this
.
mode
.
templates
&&
this
.
mode
.
templates
.
length
)
{
$
(
'
a
'
,
this
.
items
[
7
].
$el
).
text
(
this
.
btnCreateNewCaption
+
'
...
'
);
$
(
'
a
'
,
this
.
items
[
8
].
$el
).
text
(
this
.
btnCreateNewCaption
+
'
...
'
);
this
.
panels
[
'
new
'
]
=
((
new
SSE
.
Views
.
FileMenuPanels
.
CreateNew
({
menu
:
this
,
docs
:
this
.
mode
.
templates
})).
render
());
}
}
...
...
@@ -235,6 +242,7 @@ define([
if
(
mode
.
isDisconnected
)
{
this
.
mode
.
canEdit
=
this
.
mode
.
isEdit
=
false
;
this
.
mode
.
canOpenRecent
=
this
.
mode
.
canCreateNew
=
false
;
this
.
mode
.
canRename
=
false
;
}
else
{
this
.
mode
=
mode
;
}
...
...
@@ -291,6 +299,7 @@ define([
btnToEditCaption
:
'
Edit Document
'
,
btnBackCaption
:
'
Go to Documents
'
,
btnSettingsCaption
:
'
Advanced Settings...
'
,
btnSaveAsCaption
:
'
Save as
'
btnSaveAsCaption
:
'
Save as
'
,
btnRenameCaption
:
'
Rename...
'
},
SSE
.
Views
.
FileMenu
||
{}));
});
apps/spreadsheeteditor/main/locale/en.json
View file @
3eb619db
...
...
@@ -532,6 +532,7 @@
"SSE.Views.FileMenu.btnInfoCaption"
:
"Spreadsheet Info..."
,
"SSE.Views.FileMenu.btnPrintCaption"
:
"Print"
,
"SSE.Views.FileMenu.btnRecentFilesCaption"
:
"Open Recent..."
,
"SSE.Views.FileMenu.btnRenameCaption"
:
"Rename..."
,
"SSE.Views.FileMenu.btnReturnCaption"
:
"Back to Spreadsheet"
,
"SSE.Views.FileMenu.btnRightsCaption"
:
"Access Rights..."
,
"SSE.Views.FileMenu.btnSaveAsCaption"
:
"Save as"
,
...
...
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