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
7d1e47a4
Commit
7d1e47a4
authored
May 25, 2017
by
Julia Radzhabova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Mobile] Using app mode options for hiding items in the Settings menu (download, edit).
parent
d8a334a3
Changes
23
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
54 additions
and
43 deletions
+54
-43
apps/documenteditor/mobile/app/controller/DocumentHolder.js
apps/documenteditor/mobile/app/controller/DocumentHolder.js
+1
-1
apps/documenteditor/mobile/app/controller/Main.js
apps/documenteditor/mobile/app/controller/Main.js
+4
-4
apps/documenteditor/mobile/app/view/Search.js
apps/documenteditor/mobile/app/view/Search.js
+1
-1
apps/documenteditor/mobile/app/view/Settings.js
apps/documenteditor/mobile/app/view/Settings.js
+8
-2
apps/documenteditor/mobile/app/view/Toolbar.js
apps/documenteditor/mobile/app/view/Toolbar.js
+1
-3
apps/presentationeditor/mobile/app/controller/DocumentHolder.js
...resentationeditor/mobile/app/controller/DocumentHolder.js
+1
-1
apps/presentationeditor/mobile/app/controller/Main.js
apps/presentationeditor/mobile/app/controller/Main.js
+4
-4
apps/presentationeditor/mobile/app/view/Search.js
apps/presentationeditor/mobile/app/view/Search.js
+1
-1
apps/presentationeditor/mobile/app/view/Settings.js
apps/presentationeditor/mobile/app/view/Settings.js
+8
-2
apps/presentationeditor/mobile/app/view/Toolbar.js
apps/presentationeditor/mobile/app/view/Toolbar.js
+1
-3
apps/spreadsheeteditor/mobile/app/controller/CellEditor.js
apps/spreadsheeteditor/mobile/app/controller/CellEditor.js
+1
-1
apps/spreadsheeteditor/mobile/app/controller/DocumentHolder.js
...spreadsheeteditor/mobile/app/controller/DocumentHolder.js
+1
-1
apps/spreadsheeteditor/mobile/app/controller/Main.js
apps/spreadsheeteditor/mobile/app/controller/Main.js
+4
-4
apps/spreadsheeteditor/mobile/app/controller/Statusbar.js
apps/spreadsheeteditor/mobile/app/controller/Statusbar.js
+1
-1
apps/spreadsheeteditor/mobile/app/controller/edit/EditCell.js
.../spreadsheeteditor/mobile/app/controller/edit/EditCell.js
+1
-1
apps/spreadsheeteditor/mobile/app/controller/edit/EditChart.js
...spreadsheeteditor/mobile/app/controller/edit/EditChart.js
+1
-1
apps/spreadsheeteditor/mobile/app/controller/edit/EditImage.js
...spreadsheeteditor/mobile/app/controller/edit/EditImage.js
+1
-1
apps/spreadsheeteditor/mobile/app/controller/edit/EditShape.js
...spreadsheeteditor/mobile/app/controller/edit/EditShape.js
+1
-1
apps/spreadsheeteditor/mobile/app/controller/edit/EditText.js
.../spreadsheeteditor/mobile/app/controller/edit/EditText.js
+1
-1
apps/spreadsheeteditor/mobile/app/view/Search.js
apps/spreadsheeteditor/mobile/app/view/Search.js
+1
-1
apps/spreadsheeteditor/mobile/app/view/Settings.js
apps/spreadsheeteditor/mobile/app/view/Settings.js
+8
-2
apps/spreadsheeteditor/mobile/app/view/Statusbar.js
apps/spreadsheeteditor/mobile/app/view/Statusbar.js
+2
-3
apps/spreadsheeteditor/mobile/app/view/Toolbar.js
apps/spreadsheeteditor/mobile/app/view/Toolbar.js
+1
-3
No files found.
apps/documenteditor/mobile/app/controller/DocumentHolder.js
View file @
7d1e47a4
...
...
@@ -92,7 +92,7 @@ define([
},
setMode
:
function
(
mode
)
{
_isEdit
=
(
'
edit
'
===
mode
)
;
_isEdit
=
mode
.
isEdit
;
},
// When our application is ready, lets get started
...
...
apps/documenteditor/mobile/app/controller/Main.js
View file @
7d1e47a4
...
...
@@ -230,11 +230,11 @@ define([
setMode
:
function
(
mode
){
var
me
=
this
;
Common
.
SharedSettings
.
set
(
'
mode
'
,
mode
);
Common
.
SharedSettings
.
set
(
'
mode
'
,
mode
.
isEdit
?
'
edit
'
:
'
view
'
);
if
(
me
.
api
)
{
me
.
api
.
asc_enableKeyEvents
(
mode
==
'
edit
'
);
me
.
api
.
asc_setViewMode
(
mode
!=
'
edit
'
);
me
.
api
.
asc_enableKeyEvents
(
mode
.
isEdit
);
me
.
api
.
asc_setViewMode
(
!
mode
.
isEdit
);
}
},
...
...
@@ -639,7 +639,7 @@ define([
_
.
each
(
me
.
getApplication
().
controllers
,
function
(
controller
)
{
if
(
controller
&&
_
.
isFunction
(
controller
.
setMode
))
{
controller
.
setMode
(
me
.
editorConfig
.
mode
);
controller
.
setMode
(
me
.
appOptions
);
}
});
...
...
apps/documenteditor/mobile/app/view/Search.js
View file @
7d1e47a4
...
...
@@ -84,7 +84,7 @@ define([
},
setMode
:
function
(
mode
)
{
_isEdit
=
(
mode
===
'
edit
'
)
;
_isEdit
=
mode
.
isEdit
;
this
.
render
();
},
...
...
apps/documenteditor/mobile/app/view/Settings.js
View file @
7d1e47a4
...
...
@@ -50,7 +50,9 @@ define([
DE
.
Views
.
Settings
=
Backbone
.
View
.
extend
(
_
.
extend
((
function
()
{
// private
var
_isEdit
=
false
;
var
_isEdit
=
false
,
_canEdit
=
false
,
_canDownload
=
false
;
return
{
// el: '.view-main',
...
...
@@ -86,7 +88,9 @@ define([
},
setMode
:
function
(
mode
)
{
_isEdit
=
(
mode
===
'
edit
'
)
_isEdit
=
mode
.
isEdit
;
_canEdit
=
!
mode
.
isEdit
&&
mode
.
canEdit
&&
mode
.
canRequestEditRights
;
_canDownload
=
mode
.
canDownload
||
mode
.
canDownloadOrigin
;
},
rootLayout
:
function
()
{
...
...
@@ -99,10 +103,12 @@ define([
$layour
.
find
(
'
#settings-readermode
'
).
hide
();
$layour
.
find
(
'
#settings-search .item-title
'
).
text
(
this
.
textFindAndReplace
)
}
else
{
if
(
!
_canEdit
)
$layour
.
find
(
'
#settings-edit-document
'
).
hide
();
$layour
.
find
(
'
#settings-document
'
).
hide
();
$layour
.
find
(
'
#settings-readermode input:checkbox
'
)
.
prop
(
'
checked
'
,
Common
.
SharedSettings
.
get
(
'
readerMode
'
));
}
if
(
!
_canDownload
)
$layour
.
find
(
'
#settings-download
'
).
hide
();
return
$layour
.
html
();
}
...
...
apps/documenteditor/mobile/app/view/Toolbar.js
View file @
7d1e47a4
...
...
@@ -97,9 +97,7 @@ define([
},
setMode
:
function
(
mode
)
{
var
isEdit
=
(
mode
===
'
edit
'
);
if
(
isEdit
)
{
if
(
mode
.
isEdit
)
{
$
(
'
#toolbar-edit, #toolbar-add, #toolbar-undo, #toolbar-redo
'
).
show
();
}
},
...
...
apps/presentationeditor/mobile/app/controller/DocumentHolder.js
View file @
7d1e47a4
...
...
@@ -84,7 +84,7 @@ define([
},
setMode
:
function
(
mode
)
{
_isEdit
=
(
'
edit
'
===
mode
)
;
_isEdit
=
mode
.
isEdit
;
},
// When our application is ready, lets get started
...
...
apps/presentationeditor/mobile/app/controller/Main.js
View file @
7d1e47a4
...
...
@@ -226,11 +226,11 @@ define([
setMode
:
function
(
mode
){
var
me
=
this
;
Common
.
SharedSettings
.
set
(
'
mode
'
,
mode
);
Common
.
SharedSettings
.
set
(
'
mode
'
,
mode
.
isEdit
?
'
edit
'
:
'
view
'
);
if
(
me
.
api
)
{
me
.
api
.
asc_enableKeyEvents
(
mode
==
'
edit
'
);
me
.
api
.
asc_setViewMode
(
mode
!=
'
edit
'
);
me
.
api
.
asc_enableKeyEvents
(
mode
.
isEdit
);
me
.
api
.
asc_setViewMode
(
!
mode
.
isEdit
);
}
},
...
...
@@ -594,7 +594,7 @@ define([
_
.
each
(
me
.
getApplication
().
controllers
,
function
(
controller
)
{
if
(
controller
&&
_
.
isFunction
(
controller
.
setMode
))
{
controller
.
setMode
(
me
.
editorConfig
.
mode
);
controller
.
setMode
(
me
.
appOptions
);
}
});
...
...
apps/presentationeditor/mobile/app/view/Search.js
View file @
7d1e47a4
...
...
@@ -84,7 +84,7 @@ define([
},
setMode
:
function
(
mode
)
{
_isEdit
=
(
mode
===
'
edit
'
)
;
_isEdit
=
mode
.
isEdit
;
this
.
render
();
},
...
...
apps/presentationeditor/mobile/app/view/Settings.js
View file @
7d1e47a4
...
...
@@ -50,7 +50,9 @@ define([
PE
.
Views
.
Settings
=
Backbone
.
View
.
extend
(
_
.
extend
((
function
()
{
// private
var
isEdit
;
var
isEdit
,
canEdit
=
false
,
canDownload
=
false
;
return
{
// el: '.view-main',
...
...
@@ -91,7 +93,9 @@ define([
},
setMode
:
function
(
mode
)
{
isEdit
=
(
mode
===
'
edit
'
)
isEdit
=
mode
.
isEdit
;
canEdit
=
!
mode
.
isEdit
&&
mode
.
canEdit
&&
mode
.
canRequestEditRights
;
canDownload
=
mode
.
canDownload
||
mode
.
canDownloadOrigin
;
},
rootLayout
:
function
()
{
...
...
@@ -104,11 +108,13 @@ define([
$layour
.
find
(
'
#settings-readermode
'
).
hide
();
$layour
.
find
(
'
#settings-search .item-title
'
).
text
(
this
.
textFindAndReplace
)
}
else
{
if
(
!
canEdit
)
$layour
.
find
(
'
#settings-edit-presentation
'
).
hide
();
$layour
.
find
(
'
#settings-presentation-setup
'
).
hide
();
$layour
.
find
(
'
#settings-readermode input:checkbox
'
)
.
attr
(
'
checked
'
,
Common
.
SharedSettings
.
get
(
'
readerMode
'
))
.
prop
(
'
checked
'
,
Common
.
SharedSettings
.
get
(
'
readerMode
'
));
}
if
(
!
canDownload
)
$layour
.
find
(
'
#settings-download
'
).
hide
();
return
$layour
.
html
();
}
...
...
apps/presentationeditor/mobile/app/view/Toolbar.js
View file @
7d1e47a4
...
...
@@ -98,9 +98,7 @@ define([
},
setMode
:
function
(
mode
)
{
var
isEdit
=
(
mode
===
'
edit
'
);
if
(
isEdit
)
{
if
(
mode
.
isEdit
)
{
$
(
'
#toolbar-edit, #toolbar-add, #toolbar-undo, #toolbar-redo
'
).
show
();
}
},
...
...
apps/spreadsheeteditor/mobile/app/controller/CellEditor.js
View file @
7d1e47a4
...
...
@@ -177,7 +177,7 @@ define([
},
onInsertFunction
:
function
()
{
if
(
this
.
mode
==
'
edit
'
)
{
if
(
this
.
mode
.
isEdit
)
{
SSE
.
getController
(
'
AddContainer
'
).
showModal
({
panel
:
'
function
'
,
button
:
'
#ce-function
'
...
...
apps/spreadsheeteditor/mobile/app/controller/DocumentHolder.js
View file @
7d1e47a4
...
...
@@ -85,7 +85,7 @@ define([
},
setMode
:
function
(
mode
)
{
_isEdit
=
(
'
edit
'
===
mode
)
;
_isEdit
=
mode
.
isEdit
;
},
// When our application is ready, lets get started
...
...
apps/spreadsheeteditor/mobile/app/controller/Main.js
View file @
7d1e47a4
...
...
@@ -228,11 +228,11 @@ define([
setMode
:
function
(
mode
){
var
me
=
this
;
Common
.
SharedSettings
.
set
(
'
mode
'
,
mode
);
Common
.
SharedSettings
.
set
(
'
mode
'
,
mode
.
isEdit
?
'
edit
'
:
'
view
'
);
if
(
me
.
api
)
{
me
.
api
.
asc_enableKeyEvents
(
mode
==
'
edit
'
);
me
.
api
.
asc_setViewMode
(
mode
!=
'
edit
'
);
me
.
api
.
asc_enableKeyEvents
(
mode
.
isEdit
);
me
.
api
.
asc_setViewMode
(
!
mode
.
isEdit
);
}
},
...
...
@@ -614,7 +614,7 @@ define([
_
.
each
(
me
.
getApplication
().
controllers
,
function
(
controller
)
{
if
(
controller
&&
_
.
isFunction
(
controller
.
setMode
))
{
controller
.
setMode
(
me
.
editorConfig
.
mode
);
controller
.
setMode
(
me
.
appOptions
);
}
});
...
...
apps/spreadsheeteditor/mobile/app/controller/Statusbar.js
View file @
7d1e47a4
...
...
@@ -112,7 +112,7 @@ define([
setMode
:
function
(
mode
)
{
this
.
statusbar
.
setMode
(
mode
);
this
.
isEdit
=
mode
==
'
edit
'
;
this
.
isEdit
=
mode
.
isEdit
;
},
/*
...
...
apps/spreadsheeteditor/mobile/app/controller/edit/EditCell.js
View file @
7d1e47a4
...
...
@@ -107,7 +107,7 @@ define([
},
setMode
:
function
(
mode
)
{
_isEdit
=
(
'
edit
'
===
mode
)
;
_isEdit
=
mode
.
isEdit
;
},
onLaunch
:
function
()
{
...
...
apps/spreadsheeteditor/mobile/app/controller/edit/EditChart.js
View file @
7d1e47a4
...
...
@@ -117,7 +117,7 @@ define([
},
setMode
:
function
(
mode
)
{
_isEdit
=
(
'
edit
'
===
mode
)
;
_isEdit
=
mode
.
isEdit
;
},
onLaunch
:
function
()
{
...
...
apps/spreadsheeteditor/mobile/app/controller/edit/EditImage.js
View file @
7d1e47a4
...
...
@@ -81,7 +81,7 @@ define([
},
setMode
:
function
(
mode
)
{
_isEdit
=
(
'
edit
'
===
mode
)
;
_isEdit
=
mode
.
isEdit
;
},
onPageShow
:
function
(
view
,
pageId
)
{
...
...
apps/spreadsheeteditor/mobile/app/controller/edit/EditShape.js
View file @
7d1e47a4
...
...
@@ -110,7 +110,7 @@ define([
},
setMode
:
function
(
mode
)
{
_isEdit
=
(
'
edit
'
===
mode
)
;
_isEdit
=
mode
.
isEdit
;
},
onPageShow
:
function
(
view
,
pageId
)
{
...
...
apps/spreadsheeteditor/mobile/app/controller/edit/EditText.js
View file @
7d1e47a4
...
...
@@ -85,7 +85,7 @@ define([
},
setMode
:
function
(
mode
)
{
_isEdit
=
(
'
edit
'
===
mode
)
;
_isEdit
=
mode
.
isEdit
;
},
onPageShow
:
function
(
view
,
pageId
)
{
...
...
apps/spreadsheeteditor/mobile/app/view/Search.js
View file @
7d1e47a4
...
...
@@ -84,7 +84,7 @@ define([
},
setMode
:
function
(
mode
)
{
_isEdit
=
(
mode
===
'
edit
'
)
;
_isEdit
=
mode
.
isEdit
;
this
.
render
();
},
...
...
apps/spreadsheeteditor/mobile/app/view/Settings.js
View file @
7d1e47a4
...
...
@@ -49,7 +49,9 @@ define([
SSE
.
Views
.
Settings
=
Backbone
.
View
.
extend
(
_
.
extend
((
function
()
{
// private
var
isEdit
;
var
isEdit
,
canEdit
=
false
,
canDownload
=
false
;
return
{
// el: '.view-main',
...
...
@@ -96,7 +98,9 @@ define([
},
setMode
:
function
(
mode
)
{
isEdit
=
(
mode
===
'
edit
'
)
isEdit
=
mode
.
isEdit
;
canEdit
=
!
mode
.
isEdit
&&
mode
.
canEdit
&&
mode
.
canRequestEditRights
;
canDownload
=
mode
.
canDownload
||
mode
.
canDownloadOrigin
;
},
rootLayout
:
function
()
{
...
...
@@ -108,7 +112,9 @@ define([
$layout
.
find
(
'
#settings-edit-document
'
).
hide
();
$layout
.
find
(
'
#settings-search .item-title
'
).
text
(
this
.
textFindAndReplace
)
}
else
{
if
(
!
canEdit
)
$layout
.
find
(
'
#settings-edit-document
'
).
hide
();
}
if
(
!
canDownload
)
$layout
.
find
(
'
#settings-download
'
).
hide
();
return
$layout
.
html
();
}
...
...
apps/spreadsheeteditor/mobile/app/view/Statusbar.js
View file @
7d1e47a4
...
...
@@ -205,11 +205,10 @@ define([
},
setMode
:
function
(
mode
)
{
if
(
'
edit
'
==
mode
)
{
this
.
$btnAddTab
.
show
();
}
else
if
(
'
disconnect
'
==
mode
)
{
this
.
$btnAddTab
.
toggleClass
(
'
disabled
'
,
true
);
}
else
if
(
mode
.
isEdit
)
{
this
.
$btnAddTab
.
show
();
}
},
...
...
apps/spreadsheeteditor/mobile/app/view/Toolbar.js
View file @
7d1e47a4
...
...
@@ -90,9 +90,7 @@ define([
},
setMode
:
function
(
mode
)
{
var
isEdit
=
(
mode
===
'
edit
'
);
if
(
isEdit
)
{
if
(
mode
.
isEdit
)
{
$
(
'
#toolbar-edit, #toolbar-add, #toolbar-undo, #toolbar-redo
'
).
show
();
}
},
...
...
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