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
beb3aa20
Commit
beb3aa20
authored
Jun 01, 2017
by
Julia Radzhabova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[DE mobile] Download pdf/djvu/xps files only in the original format.
parent
7a043df3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
3 deletions
+28
-3
apps/documenteditor/mobile/app/controller/Settings.js
apps/documenteditor/mobile/app/controller/Settings.js
+10
-0
apps/documenteditor/mobile/app/template/Settings.template
apps/documenteditor/mobile/app/template/Settings.template
+13
-1
apps/documenteditor/mobile/app/view/Settings.js
apps/documenteditor/mobile/app/view/Settings.js
+5
-2
No files found.
apps/documenteditor/mobile/app/controller/Settings.js
View file @
beb3aa20
...
...
@@ -191,6 +191,7 @@ define([
$
(
'
#settings-readermode input:checkbox
'
).
single
(
'
change
'
,
_
.
bind
(
me
.
onReaderMode
,
me
));
$
(
'
#settings-edit-document
'
).
single
(
'
click
'
,
_
.
bind
(
me
.
onEditDocumet
,
me
));
$
(
'
#settings-help
'
).
single
(
'
click
'
,
_
.
bind
(
me
.
onShowHelp
,
me
));
$
(
'
#settings-download
'
).
single
(
'
click
'
,
_
.
bind
(
me
.
onDownloadOrigin
,
me
));
}
},
...
...
@@ -285,6 +286,15 @@ define([
}
},
onDownloadOrigin
:
function
(
e
)
{
var
me
=
this
;
_
.
defer
(
function
()
{
me
.
api
.
asc_DownloadOrigin
();
});
me
.
hideModal
();
},
onFormatChange
:
function
(
e
)
{
var
me
=
this
,
rawValue
=
$
(
e
.
currentTarget
).
val
(),
...
...
apps/documenteditor/mobile/app/template/Settings.template
View file @
beb3aa20
...
...
@@ -66,7 +66,19 @@
</a>
</li>
<li>
<a id="settings-download" class="item-link" data-page="#settings-download-view">
<a id="settings-download-as" class="item-link" data-page="#settings-download-view">
<div class="item-content">
<div class="item-media">
<i class="icon icon-download"></i>
</div>
<div class="item-inner">
<div class="item-title"><%= scope.textDownload %></div>
</div>
</div>
</a>
</li>
<li>
<a id="settings-download" class="item-link no-indicator">
<div class="item-content">
<div class="item-media">
<i class="icon icon-download"></i>
...
...
apps/documenteditor/mobile/app/view/Settings.js
View file @
beb3aa20
...
...
@@ -53,6 +53,7 @@ define([
var
_isEdit
=
false
,
_canEdit
=
false
,
_canDownload
=
false
,
_canDownloadOrigin
=
false
,
_canReader
=
false
;
return
{
...
...
@@ -91,7 +92,8 @@ define([
setMode
:
function
(
mode
)
{
_isEdit
=
mode
.
isEdit
;
_canEdit
=
!
mode
.
isEdit
&&
mode
.
canEdit
&&
mode
.
canRequestEditRights
;
_canDownload
=
mode
.
canDownload
||
mode
.
canDownloadOrigin
;
_canDownload
=
mode
.
canDownload
;
_canDownloadOrigin
=
mode
.
canDownloadOrigin
;
_canReader
=
!
mode
.
isEdit
&&
mode
.
canReader
;
},
...
...
@@ -113,7 +115,8 @@ define([
$layour
.
find
(
'
#settings-readermode input:checkbox
'
)
.
prop
(
'
checked
'
,
Common
.
SharedSettings
.
get
(
'
readerMode
'
));
}
if
(
!
_canDownload
)
$layour
.
find
(
'
#settings-download
'
).
hide
();
if
(
!
_canDownload
)
$layour
.
find
(
'
#settings-download-as
'
).
hide
();
if
(
!
_canDownloadOrigin
)
$layour
.
find
(
'
#settings-download
'
).
hide
();
return
$layour
.
html
();
}
...
...
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