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
9f20d9d4
Commit
9f20d9d4
authored
Aug 10, 2016
by
Julia Radzhabova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[DE][SSE] Open protected files.
parent
be7c3de4
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
73 additions
and
16 deletions
+73
-16
apps/common/main/lib/view/OpenDialog.js
apps/common/main/lib/view/OpenDialog.js
+36
-5
apps/documenteditor/main/app/controller/Main.js
apps/documenteditor/main/app/controller/Main.js
+17
-6
apps/documenteditor/main/locale/en.json
apps/documenteditor/main/locale/en.json
+2
-0
apps/spreadsheeteditor/main/app/controller/Main.js
apps/spreadsheeteditor/main/app/controller/Main.js
+16
-5
apps/spreadsheeteditor/main/locale/en.json
apps/spreadsheeteditor/main/locale/en.json
+2
-0
No files found.
apps/common/main/lib/view/OpenDialog.js
View file @
9f20d9d4
...
...
@@ -61,18 +61,24 @@ define([
header
:
true
,
cls
:
'
open-dlg
'
,
contentTemplate
:
''
,
title
:
t
.
txtTitle
.
replace
(
'
%1
'
,
(
options
.
type
==
Asc
.
c_oAscAdvancedOptionsID
.
CSV
)
?
'
CSV
'
:
'
TXT
'
)
title
:
(
options
.
type
==
Asc
.
c_oAscAdvancedOptionsID
.
DRM
)
?
t
.
txtTitleProtected
:
t
.
txtTitle
.
replace
(
'
%1
'
,
(
options
.
type
==
Asc
.
c_oAscAdvancedOptionsID
.
CSV
)
?
'
CSV
'
:
'
TXT
'
)
},
options
);
this
.
template
=
options
.
template
||
[
'
<div class="box" style="height:
'
+
(
_options
.
height
-
85
)
+
'
px;">
'
,
'
<div class="content-panel" >
'
,
'
<% if (type == Asc.c_oAscAdvancedOptionsID.DRM) { %>
'
,
'
<label class="header">
'
+
t
.
txtPassword
+
'
</label>
'
,
'
<div id="id-password-txt" style="margin-bottom:15px;"></div>
'
,
'
<% } else { %>
'
,
'
<label class="header">
'
+
t
.
txtEncoding
+
'
</label>
'
,
'
<div id="id-codepages-combo" class="input-group-nr" style="margin-bottom:15px;"></div>
'
,
'
<% if (type == Asc.c_oAscAdvancedOptionsID.CSV) { %>
'
,
'
<label class="header">
'
+
t
.
txtDelimiter
+
'
</label>
'
,
'
<div id="id-delimiters-combo" class="input-group-nr" style="max-width: 110px;"></div>
'
,
'
<% } %>
'
,
'
<% } %>
'
,
'
</div>
'
,
'
</div>
'
,
...
...
@@ -97,13 +103,36 @@ define([
if
(
this
.
$window
)
{
this
.
$window
.
find
(
'
.tool
'
).
hide
();
this
.
$window
.
find
(
'
.dlg-btn
'
).
on
(
'
click
'
,
_
.
bind
(
this
.
onBtnClick
,
this
));
this
.
initCodePages
();
if
(
this
.
type
==
Asc
.
c_oAscAdvancedOptionsID
.
DRM
)
{
var
me
=
this
;
me
.
inputPwd
=
new
Common
.
UI
.
InputField
({
el
:
$
(
'
#id-password-txt
'
),
type
:
'
password
'
,
allowBlank
:
false
,
validateOnBlur
:
false
});
}
else
this
.
initCodePages
();
}
},
show
:
function
()
{
Common
.
UI
.
Window
.
prototype
.
show
.
apply
(
this
,
arguments
);
if
(
this
.
type
==
Asc
.
c_oAscAdvancedOptionsID
.
DRM
)
{
var
me
=
this
;
setTimeout
(
function
(){
me
.
inputPwd
.
cmpEl
.
find
(
'
input
'
).
focus
();
},
500
);
}
},
onBtnClick
:
function
(
event
)
{
if
(
this
.
handler
&&
this
.
cmbEncoding
)
{
this
.
handler
.
call
(
this
,
this
.
cmbEncoding
.
getValue
(),
this
.
cmbDelimiter
?
this
.
cmbDelimiter
.
getValue
()
:
null
);
if
(
this
.
handler
)
{
if
(
this
.
cmbEncoding
)
this
.
handler
.
call
(
this
,
this
.
cmbEncoding
.
getValue
(),
this
.
cmbDelimiter
?
this
.
cmbDelimiter
.
getValue
()
:
null
);
else
this
.
handler
.
call
(
this
,
this
.
inputPwd
.
getValue
());
}
this
.
close
();
...
...
@@ -311,7 +340,9 @@ define([
txtEncoding
:
"
Encoding
"
,
txtSpace
:
"
Space
"
,
txtTab
:
"
Tab
"
,
txtTitle
:
"
Choose %1 options
"
txtTitle
:
"
Choose %1 options
"
,
txtPassword
:
"
Password
"
,
txtTitleProtected
:
"
Protected File
"
},
Common
.
Views
.
OpenDialog
||
{}));
});
\ No newline at end of file
apps/documenteditor/main/app/controller/Main.js
View file @
9f20d9d4
...
...
@@ -1592,14 +1592,14 @@ define([
},
onAdvancedOptions
:
function
(
advOptions
)
{
var
type
=
advOptions
.
asc_getOptionId
();
var
type
=
advOptions
.
asc_getOptionId
(),
me
=
this
,
dlg
;
if
(
type
==
Asc
.
c_oAscAdvancedOptionsID
.
TXT
)
{
var
me
=
this
;
var
dlg
=
new
Common
.
Views
.
OpenDialog
({
dlg
=
new
Common
.
Views
.
OpenDialog
({
type
:
type
,
codepages
:
advOptions
.
asc_getOptions
().
asc_getCodePages
(),
settings
:
advOptions
.
asc_getOptions
().
asc_getRecommendedSettings
(),
handler
:
function
(
encoding
,
delimiter
)
{
handler
:
function
(
encoding
)
{
me
.
isShowOpenDialog
=
false
;
if
(
me
&&
me
.
api
)
{
me
.
api
.
asc_setAdvancedOptions
(
type
,
new
Asc
.
asc_CTXTAdvancedOptions
(
encoding
));
...
...
@@ -1607,11 +1607,22 @@ define([
}
}
});
}
else
if
(
type
==
Asc
.
c_oAscAdvancedOptionsID
.
DRM
)
{
dlg
=
new
Common
.
Views
.
OpenDialog
({
type
:
type
,
handler
:
function
(
value
)
{
me
.
isShowOpenDialog
=
false
;
if
(
me
&&
me
.
api
)
{
me
.
api
.
asc_setAdvancedOptions
(
type
,
new
Asc
.
asc_CDRMAdvancedOptions
(
value
));
me
.
loadMask
&&
me
.
loadMask
.
show
();
}
}
});
}
if
(
dlg
)
{
this
.
isShowOpenDialog
=
true
;
this
.
loadMask
&&
this
.
loadMask
.
hide
();
this
.
onLongActionEnd
(
Asc
.
c_oAscAsyncActionType
.
BlockInteraction
,
LoadingDocument
);
dlg
.
show
();
}
},
...
...
apps/documenteditor/main/locale/en.json
View file @
9f20d9d4
...
...
@@ -159,6 +159,8 @@
"Common.Views.OpenDialog.okButtonText"
:
"OK"
,
"Common.Views.OpenDialog.txtEncoding"
:
"Encoding "
,
"Common.Views.OpenDialog.txtTitle"
:
"Choose %1 options"
,
"Common.Views.OpenDialog.txtPassword"
:
"Password"
,
"Common.Views.OpenDialog.txtTitleProtected"
:
"Protected File"
,
"Common.Views.Plugins.strPlugins"
:
"Add-ons"
,
"Common.Views.Plugins.textLoading"
:
"Loading"
,
"Common.Views.Plugins.textStart"
:
"Start"
,
...
...
apps/spreadsheeteditor/main/app/controller/Main.js
View file @
9f20d9d4
...
...
@@ -1304,10 +1304,10 @@ define([
},
onAdvancedOptions
:
function
(
advOptions
)
{
var
type
=
advOptions
.
asc_getOptionId
();
var
type
=
advOptions
.
asc_getOptionId
(),
me
=
this
,
dlg
;
if
(
type
==
Asc
.
c_oAscAdvancedOptionsID
.
CSV
)
{
var
me
=
this
;
var
dlg
=
new
Common
.
Views
.
OpenDialog
({
dlg
=
new
Common
.
Views
.
OpenDialog
({
type
:
type
,
codepages
:
advOptions
.
asc_getOptions
().
asc_getCodePages
(),
settings
:
advOptions
.
asc_getOptions
().
asc_getRecommendedSettings
(),
...
...
@@ -1319,11 +1319,22 @@ define([
}
}
});
}
else
if
(
type
==
Asc
.
c_oAscAdvancedOptionsID
.
DRM
)
{
dlg
=
new
Common
.
Views
.
OpenDialog
({
type
:
type
,
handler
:
function
(
value
)
{
me
.
isShowOpenDialog
=
false
;
if
(
me
&&
me
.
api
)
{
me
.
api
.
asc_setAdvancedOptions
(
type
,
new
Asc
.
asc_CDRMAdvancedOptions
(
value
));
me
.
loadMask
&&
me
.
loadMask
.
show
();
}
}
});
}
if
(
dlg
)
{
this
.
isShowOpenDialog
=
true
;
this
.
loadMask
&&
this
.
loadMask
.
hide
();
this
.
onLongActionEnd
(
Asc
.
c_oAscAsyncActionType
.
BlockInteraction
,
LoadingDocument
);
dlg
.
show
();
}
},
...
...
apps/spreadsheeteditor/main/locale/en.json
View file @
9f20d9d4
...
...
@@ -86,6 +86,8 @@
"Common.Views.OpenDialog.txtSpace"
:
"Space"
,
"Common.Views.OpenDialog.txtTab"
:
"Tab"
,
"Common.Views.OpenDialog.txtTitle"
:
"Choose %1 options"
,
"Common.Views.OpenDialog.txtPassword"
:
"Password"
,
"Common.Views.OpenDialog.txtTitleProtected"
:
"Protected File"
,
"Common.Views.Plugins.strPlugins"
:
"Add-ons"
,
"Common.Views.Plugins.textLoading"
:
"Loading"
,
"Common.Views.Plugins.textStart"
:
"Start"
,
...
...
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