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
7a043df3
Commit
7a043df3
authored
Jun 01, 2017
by
Julia Radzhabova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[DE mobile] Disable reader mode for pdf/djvu/xps files.
parent
46456fea
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
apps/documenteditor/mobile/app/controller/Main.js
apps/documenteditor/mobile/app/controller/Main.js
+1
-0
apps/documenteditor/mobile/app/view/Settings.js
apps/documenteditor/mobile/app/view/Settings.js
+7
-2
No files found.
apps/documenteditor/mobile/app/controller/Main.js
View file @
7a043df3
...
@@ -613,6 +613,7 @@ define([
...
@@ -613,6 +613,7 @@ define([
var
type
=
/^
(?:(
pdf|djvu|xps
))
$/
.
exec
(
me
.
document
.
fileType
);
var
type
=
/^
(?:(
pdf|djvu|xps
))
$/
.
exec
(
me
.
document
.
fileType
);
me
.
appOptions
.
canDownloadOrigin
=
!
me
.
appOptions
.
nativeApp
&&
me
.
permissions
.
download
!==
false
&&
(
type
&&
typeof
type
[
1
]
===
'
string
'
);
me
.
appOptions
.
canDownloadOrigin
=
!
me
.
appOptions
.
nativeApp
&&
me
.
permissions
.
download
!==
false
&&
(
type
&&
typeof
type
[
1
]
===
'
string
'
);
me
.
appOptions
.
canDownload
=
!
me
.
appOptions
.
nativeApp
&&
me
.
permissions
.
download
!==
false
&&
(
!
type
||
typeof
type
[
1
]
!==
'
string
'
);
me
.
appOptions
.
canDownload
=
!
me
.
appOptions
.
nativeApp
&&
me
.
permissions
.
download
!==
false
&&
(
!
type
||
typeof
type
[
1
]
!==
'
string
'
);
me
.
appOptions
.
canReader
=
(
!
type
||
typeof
type
[
1
]
!==
'
string
'
);
me
.
_state
.
licenseWarning
=
(
licType
===
Asc
.
c_oLicenseResult
.
Connections
)
&&
me
.
appOptions
.
canEdit
&&
me
.
editorConfig
.
mode
!==
'
view
'
;
me
.
_state
.
licenseWarning
=
(
licType
===
Asc
.
c_oLicenseResult
.
Connections
)
&&
me
.
appOptions
.
canEdit
&&
me
.
editorConfig
.
mode
!==
'
view
'
;
...
...
apps/documenteditor/mobile/app/view/Settings.js
View file @
7a043df3
...
@@ -52,7 +52,8 @@ define([
...
@@ -52,7 +52,8 @@ define([
// private
// private
var
_isEdit
=
false
,
var
_isEdit
=
false
,
_canEdit
=
false
,
_canEdit
=
false
,
_canDownload
=
false
;
_canDownload
=
false
,
_canReader
=
false
;
return
{
return
{
// el: '.view-main',
// el: '.view-main',
...
@@ -91,6 +92,7 @@ define([
...
@@ -91,6 +92,7 @@ define([
_isEdit
=
mode
.
isEdit
;
_isEdit
=
mode
.
isEdit
;
_canEdit
=
!
mode
.
isEdit
&&
mode
.
canEdit
&&
mode
.
canRequestEditRights
;
_canEdit
=
!
mode
.
isEdit
&&
mode
.
canEdit
&&
mode
.
canRequestEditRights
;
_canDownload
=
mode
.
canDownload
||
mode
.
canDownloadOrigin
;
_canDownload
=
mode
.
canDownload
||
mode
.
canDownloadOrigin
;
_canReader
=
!
mode
.
isEdit
&&
mode
.
canReader
;
},
},
rootLayout
:
function
()
{
rootLayout
:
function
()
{
...
@@ -100,11 +102,14 @@ define([
...
@@ -100,11 +102,14 @@ define([
if
(
_isEdit
)
{
if
(
_isEdit
)
{
$layour
.
find
(
'
#settings-edit-document
'
).
hide
();
$layour
.
find
(
'
#settings-edit-document
'
).
hide
();
$layour
.
find
(
'
#settings-readermode
'
).
hide
();
$layour
.
find
(
'
#settings-search .item-title
'
).
text
(
this
.
textFindAndReplace
)
$layour
.
find
(
'
#settings-search .item-title
'
).
text
(
this
.
textFindAndReplace
)
}
else
{
}
else
{
if
(
!
_canEdit
)
$layour
.
find
(
'
#settings-edit-document
'
).
hide
();
if
(
!
_canEdit
)
$layour
.
find
(
'
#settings-edit-document
'
).
hide
();
$layour
.
find
(
'
#settings-document
'
).
hide
();
$layour
.
find
(
'
#settings-document
'
).
hide
();
}
if
(
!
_canReader
)
$layour
.
find
(
'
#settings-readermode
'
).
hide
();
else
{
$layour
.
find
(
'
#settings-readermode input:checkbox
'
)
$layour
.
find
(
'
#settings-readermode input:checkbox
'
)
.
prop
(
'
checked
'
,
Common
.
SharedSettings
.
get
(
'
readerMode
'
));
.
prop
(
'
checked
'
,
Common
.
SharedSettings
.
get
(
'
readerMode
'
));
}
}
...
...
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