[DE mobile] [SSE mobile] Add Commenting Display settings
This commit is contained in:
parent
fca1640820
commit
d27c3b0ca3
|
@ -516,7 +516,8 @@ define([
|
|||
|
||||
/** coauthoring begin **/
|
||||
this.isLiveCommenting = Common.localStorage.getBool("de-settings-livecomment", true);
|
||||
this.isLiveCommenting ? this.api.asc_showComments(true) : this.api.asc_hideComments();
|
||||
var resolved = Common.localStorage.getBool("de-settings-resolvedcomment", true);
|
||||
this.isLiveCommenting ? this.api.asc_showComments(resolved) : this.api.asc_hideComments();
|
||||
/** coauthoring end **/
|
||||
|
||||
value = Common.localStorage.getItem("de-settings-zoom");
|
||||
|
|
|
@ -234,6 +234,16 @@ define([
|
|||
$('#settings-hidden-borders input:checkbox').attr('checked', (Common.localStorage.getItem("de-mobile-hidden-borders") == 'true') ? true : false);
|
||||
$('#settings-hidden-borders input:checkbox').single('change', _.bind(me.onShowTableEmptyLine, me));
|
||||
$('#settings-orthography').single('click', _.bind(me.onOrthographyCheck, me));
|
||||
var displayComments = Common.localStorage.getBool("de-settings-livecomment", true);
|
||||
$('#settings-display-comments input:checkbox').attr('checked', displayComments);
|
||||
$('#settings-display-comments input:checkbox').single('change', _.bind(me.onChangeDisplayComments, me));
|
||||
var displayResolved = Common.localStorage.getBool("de-settings-resolvedcomment", true);
|
||||
if (!displayComments) {
|
||||
$("#settings-display-resolved").addClass("disabled");
|
||||
displayResolved = false;
|
||||
}
|
||||
$('#settings-display-resolved input:checkbox').attr('checked', displayResolved);
|
||||
$('#settings-display-resolved input:checkbox').single('change', _.bind(me.onChangeDisplayResolved, me));
|
||||
Common.Utils.addScrollIfNeed('.page[data-page=settings-advanced-view]', '.page[data-page=settings-advanced-view] .page-content');
|
||||
} else if ('#color-schemes-view' == pageId) {
|
||||
me.initPageColorSchemes();
|
||||
|
@ -260,6 +270,32 @@ define([
|
|||
}
|
||||
},
|
||||
|
||||
onChangeDisplayComments: function(e) {
|
||||
var displayComments = $(e.currentTarget).is(':checked');
|
||||
if (!displayComments) {
|
||||
this.api.asc_hideComments();
|
||||
$("#settings-display-resolved input").prop( "checked", false );
|
||||
Common.localStorage.setBool("de-settings-resolvedcomment", false);
|
||||
$("#settings-display-resolved").addClass("disabled");
|
||||
} else {
|
||||
var resolved = Common.localStorage.getBool("de-settings-resolvedcomment");
|
||||
this.api.asc_showComments(resolved);
|
||||
$("#settings-display-resolved").removeClass("disabled");
|
||||
}
|
||||
Common.localStorage.setBool("de-settings-livecomment", displayComments);
|
||||
},
|
||||
|
||||
onChangeDisplayResolved: function(e) {
|
||||
var displayComments = Common.localStorage.getBool("de-settings-livecomment");
|
||||
if (displayComments) {
|
||||
var resolved = $(e.currentTarget).is(':checked');
|
||||
if (this.api) {
|
||||
this.api.asc_showComments(resolved);
|
||||
}
|
||||
Common.localStorage.setBool("de-settings-resolvedcomment", resolved);
|
||||
}
|
||||
},
|
||||
|
||||
clickCollaboration: function() {
|
||||
DE.getController('Common.Controllers.Collaboration').showModal();
|
||||
},
|
||||
|
|
|
@ -639,6 +639,34 @@
|
|||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="content-block-title"><%= scope.textCommentingDisplay %></div>
|
||||
<div class="list-block">
|
||||
<ul>
|
||||
<div id="settings-display-comments" class="item-content">
|
||||
<div class="item-inner">
|
||||
<div class="item-title"><%= scope.textDisplayComments %></div>
|
||||
<div class="item-after">
|
||||
<label class="label-switch">
|
||||
<input type="checkbox">
|
||||
<div class="checkbox"></div>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="settings-display-resolved" class="item-content">
|
||||
<div class="item-inner">
|
||||
<div class="item-title"><%= scope.textDisplayResolvedComments %></div>
|
||||
<div class="item-after">
|
||||
<label class="label-switch">
|
||||
<input type="checkbox">
|
||||
<div class="checkbox"></div>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -287,7 +287,10 @@ define([
|
|||
textColorSchemes: 'Color Schemes',
|
||||
textNoCharacters: 'Nonprinting Characters',
|
||||
textHiddenTableBorders: 'Hidden Table Borders',
|
||||
textCollaboration: 'Collaboration'
|
||||
textCollaboration: 'Collaboration',
|
||||
textCommentingDisplay: 'Commenting Display',
|
||||
textDisplayComments: 'Display Comments',
|
||||
textDisplayResolvedComments: 'Display Resolved Comments'
|
||||
|
||||
}
|
||||
})(), DE.Views.Settings || {}))
|
||||
|
|
|
@ -507,9 +507,9 @@ define([
|
|||
this.api.asc_setZoom(zf>0 ? zf : 1);
|
||||
|
||||
/** coauthoring begin **/
|
||||
value = Common.localStorage.getItem("sse-settings-livecomment");
|
||||
this.isLiveCommenting = !(value!==null && parseInt(value) == 0);
|
||||
this.isLiveCommenting?this.api.asc_showComments(true):this.api.asc_hideComments();
|
||||
this.isLiveCommenting = Common.localStorage.getBool("sse-settings-livecomment", true);
|
||||
var resolved = Common.localStorage.getBool("sse-settings-resolvedcomment", true);
|
||||
this.isLiveCommenting ? this.api.asc_showComments(resolved) : this.api.asc_hideComments();
|
||||
|
||||
if (this.appOptions.isEdit && this.appOptions.canLicense && !this.appOptions.isOffline && this.appOptions.canCoAuthoring) {
|
||||
// Force ON fast co-authoring mode
|
||||
|
|
|
@ -549,6 +549,44 @@ define([
|
|||
var $r1c1Style = $('.page[data-page=settings-application-view] #r1-c1-style input');
|
||||
$r1c1Style.prop('checked',value);
|
||||
$r1c1Style.single('change', _.bind(me.clickR1C1Style, me));
|
||||
|
||||
//init Commenting Display
|
||||
var displayComments = Common.localStorage.getBool("sse-settings-livecomment", true);
|
||||
$('#settings-display-comments input:checkbox').attr('checked', displayComments);
|
||||
$('#settings-display-comments input:checkbox').single('change', _.bind(me.onChangeDisplayComments, me));
|
||||
var displayResolved = Common.localStorage.getBool("sse-settings-resolvedcomment", true);
|
||||
if (!displayComments) {
|
||||
$("#settings-display-resolved").addClass("disabled");
|
||||
displayResolved = false;
|
||||
}
|
||||
$('#settings-display-resolved input:checkbox').attr('checked', displayResolved);
|
||||
$('#settings-display-resolved input:checkbox').single('change', _.bind(me.onChangeDisplayResolved, me));
|
||||
},
|
||||
|
||||
onChangeDisplayComments: function(e) {
|
||||
var displayComments = $(e.currentTarget).is(':checked');
|
||||
if (!displayComments) {
|
||||
this.api.asc_hideComments();
|
||||
$("#settings-display-resolved input").prop( "checked", false );
|
||||
Common.localStorage.setBool("sse-settings-resolvedcomment", false);
|
||||
$("#settings-display-resolved").addClass("disabled");
|
||||
} else {
|
||||
var resolved = Common.localStorage.getBool("sse-settings-resolvedcomment");
|
||||
this.api.asc_showComments(resolved);
|
||||
$("#settings-display-resolved").removeClass("disabled");
|
||||
}
|
||||
Common.localStorage.setBool("sse-settings-livecomment", displayComments);
|
||||
},
|
||||
|
||||
onChangeDisplayResolved: function(e) {
|
||||
var displayComments = Common.localStorage.getBool("sse-settings-livecomment");
|
||||
if (displayComments) {
|
||||
var resolved = $(e.currentTarget).is(':checked');
|
||||
if (this.api) {
|
||||
this.api.asc_showComments(resolved);
|
||||
}
|
||||
Common.localStorage.setBool("sse-settings-resolvedcomment", resolved);
|
||||
}
|
||||
},
|
||||
|
||||
clickR1C1Style: function(e) {
|
||||
|
|
|
@ -462,6 +462,33 @@
|
|||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="content-block-title"><%= scope.textCommentingDisplay %></div>
|
||||
<div class="list-block">
|
||||
<ul>
|
||||
<div id="settings-display-comments" class="item-content">
|
||||
<div class="item-inner">
|
||||
<div class="item-title"><%= scope.textDisplayComments %></div>
|
||||
<div class="item-after">
|
||||
<label class="label-switch">
|
||||
<input type="checkbox">
|
||||
<div class="checkbox"></div>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="settings-display-resolved" class="item-content">
|
||||
<div class="item-inner">
|
||||
<div class="item-title"><%= scope.textDisplayResolvedComments %></div>
|
||||
<div class="item-after">
|
||||
<label class="label-switch">
|
||||
<input type="checkbox">
|
||||
<div class="checkbox"></div>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -381,7 +381,10 @@ define([
|
|||
textFormulaLanguage: 'Formula Language',
|
||||
textExample: 'Example',
|
||||
textR1C1Style: 'R1C1 Reference Style',
|
||||
textRegionalSettings: 'Regional Settings'
|
||||
textRegionalSettings: 'Regional Settings',
|
||||
textCommentingDisplay: 'Commenting Display',
|
||||
textDisplayComments: 'Display Comments',
|
||||
textDisplayResolvedComments: 'Display Resolved Comments'
|
||||
}
|
||||
})(), SSE.Views.Settings || {}))
|
||||
});
|
Loading…
Reference in a new issue