diff --git a/apps/spreadsheeteditor/main/app/controller/WBProtection.js b/apps/spreadsheeteditor/main/app/controller/WBProtection.js
index 05585a7576..ad5a108356 100644
--- a/apps/spreadsheeteditor/main/app/controller/WBProtection.js
+++ b/apps/spreadsheeteditor/main/app/controller/WBProtection.js
@@ -183,6 +183,7 @@ define([
win = new SSE.Views.ProtectDialog({
type: 'sheet',
props: props,
+ api: me.api,
handler: function(result, value, props) {
btn = result;
if (result == 'ok') {
diff --git a/apps/spreadsheeteditor/main/app/view/ProtectDialog.js b/apps/spreadsheeteditor/main/app/view/ProtectDialog.js
index 6b6b504615..b15952ae23 100644
--- a/apps/spreadsheeteditor/main/app/view/ProtectDialog.js
+++ b/apps/spreadsheeteditor/main/app/view/ProtectDialog.js
@@ -67,6 +67,7 @@ define([
this.names = options.names;
this.isEdit = options.isEdit;
this.api = options.api;
+ this.winId = Common.UI.getId();
this.template = options.template || [
'
',
@@ -74,31 +75,38 @@ define([
'
',
'',
'
',
- '
',
+ '
',
'
',
'',
'
',
- '
',
+ '
',
+ '<% } else if (type=="sheet") { %>',
+ '
',
+ '',
+ '
',
+ '
',
+ '
',
'<% } else { %>',
'
',
- '',
+ '',
'
',
'<% } %>',
'
',
'',
'
',
- '
',
+ '
',
'
',
'',
'
',
- '
',
+ '
',
'<% if (type=="sheet") { %>',
'
',
'',
'
',
- '
',
- '<% } %>',
+ '
',
+ '<% } else { %>',
'
',
+ '<% } %>',
'
'
].join('');
@@ -113,7 +121,7 @@ define([
this.$window.find('.dlg-btn').on('click', _.bind(this.onBtnClick, this));
this.repeatPwd = new Common.UI.InputField({
- el: $('#id-repeat-txt'),
+ el: $('#' + this.winId + '-id-repeat-txt'),
type: 'password',
allowBlank : true,
style : 'width: 100%;',
@@ -125,7 +133,7 @@ define([
});
this.inputPwd = new Common.UI.InputFieldBtnPassword({
- el: $('#id-password-txt'),
+ el: $('#' + this.winId + '-id-password-txt'),
type: 'password',
allowBlank : true,
style : 'width: 100%;',
@@ -137,11 +145,11 @@ define([
if (this.type == 'sheet') {
this.optionsList = new Common.UI.ListView({
- el: $('#protect-dlg-options', this.$window),
+ el: $('#' + this.winId + '-protect-dlg-options', this.$window),
store: new Common.UI.DataViewStore(),
simpleAddMode: true,
scrollAlwaysVisible: true,
- template: _.template([''].join('')),
+ template: _.template([''].join('')),
itemTemplate: _.template([
'',
'
',
''
].join(''),
- buttons: [{
- value: 'protect-sheet',
- caption: this.textProtect
- }, 'ok','cancel'],
- primary: 'protect-sheet'
+ buttons: [
+ // {
+ // value: 'protect-sheet',
+ // caption: this.textProtect
+ // },
+ 'ok','cancel']
+ // primary: 'protect-sheet'
}, options);
this.api = options.api;
diff --git a/apps/spreadsheeteditor/main/app/view/ProtectedRangesManagerDlg.js b/apps/spreadsheeteditor/main/app/view/ProtectedRangesManagerDlg.js
index fad42f9c86..599949f425 100644
--- a/apps/spreadsheeteditor/main/app/view/ProtectedRangesManagerDlg.js
+++ b/apps/spreadsheeteditor/main/app/view/ProtectedRangesManagerDlg.js
@@ -426,7 +426,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ProtectedRangesManagerDlg.te
},
txtTitle: 'Protected Ranges',
- textRangesDesc: 'Ranges unlocked by a password when sheet is protected',
+ textRangesDesc: 'You can restrict editing ranges to selected people.',
textTitle: 'Title',
textRange: 'Range',
textNew: 'New',
diff --git a/apps/spreadsheeteditor/main/app/view/WBProtection.js b/apps/spreadsheeteditor/main/app/view/WBProtection.js
index 529e455039..f943e33186 100644
--- a/apps/spreadsheeteditor/main/app/view/WBProtection.js
+++ b/apps/spreadsheeteditor/main/app/view/WBProtection.js
@@ -50,8 +50,8 @@ define([
var template =
'' +
'' +
- '' +
- '' +
+ '' +
+ // '' +
'
' +
'' +
'' +
diff --git a/apps/spreadsheeteditor/main/resources/less/advanced-settings.less b/apps/spreadsheeteditor/main/resources/less/advanced-settings.less
index 053c25b46a..d36714601d 100644
--- a/apps/spreadsheeteditor/main/resources/less/advanced-settings.less
+++ b/apps/spreadsheeteditor/main/resources/less/advanced-settings.less
@@ -560,7 +560,7 @@
}
}
-#protect-dlg-options {
+.protect-sheet-options {
.list-item {
pointer-events:none;
margin-left: 20px;