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