Merge remote-tracking branch 'remotes/origin/develop' into feature/word-formulas
This commit is contained in:
commit
9d4f6905aa
|
@ -8,6 +8,8 @@
|
||||||
* Add customization parameter 'hideRightMenu' for hiding right panel on first loading (bug #39096)
|
* Add customization parameter 'hideRightMenu' for hiding right panel on first loading (bug #39096)
|
||||||
|
|
||||||
### Document Editor
|
### Document Editor
|
||||||
|
* Search selected text
|
||||||
|
* Add blank page
|
||||||
|
|
||||||
### Spreadsheet Editor
|
### Spreadsheet Editor
|
||||||
* Set print area
|
* Set print area
|
||||||
|
|
|
@ -52,6 +52,7 @@ define([
|
||||||
|
|
||||||
Common.Collections.Comments = Backbone.Collection.extend({
|
Common.Collections.Comments = Backbone.Collection.extend({
|
||||||
model: Common.Models.Comment,
|
model: Common.Models.Comment,
|
||||||
|
groups: null,
|
||||||
|
|
||||||
clearEditing: function () {
|
clearEditing: function () {
|
||||||
this.each(function(comment) {
|
this.each(function(comment) {
|
||||||
|
|
|
@ -132,7 +132,8 @@ define([
|
||||||
};
|
};
|
||||||
|
|
||||||
ButtonsArray.prototype.setDisabled = function(disable) {
|
ButtonsArray.prototype.setDisabled = function(disable) {
|
||||||
if ( _disabled != disable ) {
|
// if ( _disabled != disable ) //bug when disable buttons outside the group
|
||||||
|
{
|
||||||
_disabled = disable;
|
_disabled = disable;
|
||||||
|
|
||||||
this.forEach( function(button) {
|
this.forEach( function(button) {
|
||||||
|
|
|
@ -88,7 +88,7 @@ define([
|
||||||
|
|
||||||
var _template_tabs =
|
var _template_tabs =
|
||||||
'<section class="tabs">' +
|
'<section class="tabs">' +
|
||||||
'<a class="scroll left"><i class="icon"><</i></a>' +
|
'<a class="scroll left"></a>' +
|
||||||
'<ul>' +
|
'<ul>' +
|
||||||
'<% for(var i in items) { %>' +
|
'<% for(var i in items) { %>' +
|
||||||
'<li class="ribtab' +
|
'<li class="ribtab' +
|
||||||
|
@ -98,7 +98,7 @@ define([
|
||||||
'</li>' +
|
'</li>' +
|
||||||
'<% } %>' +
|
'<% } %>' +
|
||||||
'</ul>' +
|
'</ul>' +
|
||||||
'<a class="scroll right"><i class="icon">></i></a>' +
|
'<a class="scroll right"></a>' +
|
||||||
'</section>';
|
'</section>';
|
||||||
|
|
||||||
this.$layout = $(options.template({
|
this.$layout = $(options.template({
|
||||||
|
|
|
@ -150,6 +150,8 @@ define([
|
||||||
this.popoverComments.comparator = function (collection) { return collection.get('time'); };
|
this.popoverComments.comparator = function (collection) { return collection.get('time'); };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.groupCollection = [];
|
||||||
|
|
||||||
this.view = this.createView('Common.Views.Comments', { store: this.collection });
|
this.view = this.createView('Common.Views.Comments', { store: this.collection });
|
||||||
this.view.render();
|
this.view.render();
|
||||||
|
|
||||||
|
@ -229,12 +231,12 @@ define([
|
||||||
this.api.asc_removeComment(id);
|
this.api.asc_removeComment(id);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onResolveComment: function (uid, id) {
|
onResolveComment: function (uid) {
|
||||||
var t = this,
|
var t = this,
|
||||||
reply = null,
|
reply = null,
|
||||||
addReply = null,
|
addReply = null,
|
||||||
ascComment = buildCommentData(), // new asc_CCommentData(null),
|
ascComment = buildCommentData(), // new asc_CCommentData(null),
|
||||||
comment = t.findComment(uid, id);
|
comment = t.findComment(uid);
|
||||||
|
|
||||||
if (_.isUndefined(uid)) {
|
if (_.isUndefined(uid)) {
|
||||||
uid = comment.get('uid');
|
uid = comment.get('uid');
|
||||||
|
@ -279,7 +281,7 @@ define([
|
||||||
onShowComment: function (id, selected) {
|
onShowComment: function (id, selected) {
|
||||||
if (this.previewmode) return;
|
if (this.previewmode) return;
|
||||||
|
|
||||||
var comment = this.findComment(id, undefined);
|
var comment = this.findComment(id);
|
||||||
if (comment) {
|
if (comment) {
|
||||||
if (null !== comment.get('quote')) {
|
if (null !== comment.get('quote')) {
|
||||||
if (this.api) {
|
if (this.api) {
|
||||||
|
@ -596,59 +598,63 @@ define([
|
||||||
if (filter) {
|
if (filter) {
|
||||||
if (!this.view.isVisible()) {
|
if (!this.view.isVisible()) {
|
||||||
this.view.needUpdateFilter = filter;
|
this.view.needUpdateFilter = filter;
|
||||||
this.filter = {
|
applyOnly = true;
|
||||||
property : filter.property,
|
|
||||||
value : filter.value
|
|
||||||
};
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
this.view.needUpdateFilter = false;
|
this.filter = filter;
|
||||||
|
|
||||||
this.filter = {
|
var me = this,
|
||||||
property : filter.property,
|
comments = [];
|
||||||
value : filter.value
|
this.filter.forEach(function(item){
|
||||||
};
|
if (!me.groupCollection[item])
|
||||||
|
me.groupCollection[item] = new Backbone.Collection([], { model: Common.Models.Comment});
|
||||||
|
comments = comments.concat(me.groupCollection[item].models);
|
||||||
|
});
|
||||||
|
this.collection.reset(comments);
|
||||||
|
this.collection.groups = this.filter;
|
||||||
|
|
||||||
if (!applyOnly) {
|
if (!applyOnly) {
|
||||||
if (this.getPopover()) {
|
if (this.getPopover()) {
|
||||||
this.getPopover().hide();
|
this.getPopover().hide();
|
||||||
}
|
}
|
||||||
}
|
this.view.needUpdateFilter = false;
|
||||||
|
|
||||||
var t = this, endComment = null;
|
var end = true;
|
||||||
|
for (var i = this.collection.length - 1; i >= 0; --i) {
|
||||||
this.collection.each(function (model) {
|
if (end) {
|
||||||
var prop = model.get(t.filter.property);
|
this.collection.at(i).set('last', true, {silent: true});
|
||||||
if (prop) {
|
} else {
|
||||||
model.set('hide', (null === prop.match(t.filter.value)), {silent: !!applyOnly});
|
if (this.collection.at(i).get('last')) {
|
||||||
|
this.collection.at(i).set('last', false, {silent: true});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (model.get('last')) {
|
|
||||||
model.set('last', false, {silent:!!applyOnly});
|
|
||||||
}
|
}
|
||||||
|
end = false;
|
||||||
if (!model.get('hide')) {
|
|
||||||
endComment = model;
|
|
||||||
}
|
}
|
||||||
});
|
this.view.render();
|
||||||
|
|
||||||
if (endComment) {
|
|
||||||
endComment.set('last', true, {silent: !!applyOnly});
|
|
||||||
}
|
|
||||||
if (!applyOnly)
|
|
||||||
this.view.update();
|
this.view.update();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
onAppAddComment: function (sender, to_doc) {
|
onAppAddComment: function (sender, to_doc) {
|
||||||
if ( !!this.api.can_AddQuotedComment && this.api.can_AddQuotedComment() === false || to_doc) return;
|
if ( !!this.api.can_AddQuotedComment && this.api.can_AddQuotedComment() === false || to_doc) return;
|
||||||
this.addDummyComment();
|
this.addDummyComment();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
addCommentToGroupCollection: function(comment) {
|
||||||
|
var groupname = comment.get('groupName');
|
||||||
|
if (!this.groupCollection[groupname])
|
||||||
|
this.groupCollection[groupname] = new Backbone.Collection([], { model: Common.Models.Comment});
|
||||||
|
this.groupCollection[groupname].push(comment);
|
||||||
|
},
|
||||||
|
|
||||||
// SDK
|
// SDK
|
||||||
|
|
||||||
onApiAddComment: function (id, data) {
|
onApiAddComment: function (id, data) {
|
||||||
var comment = this.readSDKComment(id, data);
|
var comment = this.readSDKComment(id, data);
|
||||||
if (comment) {
|
if (comment) {
|
||||||
|
if (comment.get('groupName')) {
|
||||||
|
this.addCommentToGroupCollection(comment);
|
||||||
|
(_.indexOf(this.collection.groups, comment.get('groupName'))>-1) && this.collection.push(comment);
|
||||||
|
} else
|
||||||
this.collection.push(comment);
|
this.collection.push(comment);
|
||||||
|
|
||||||
this.updateComments(true);
|
this.updateComments(true);
|
||||||
|
@ -668,12 +674,20 @@ define([
|
||||||
onApiAddComments: function (data) {
|
onApiAddComments: function (data) {
|
||||||
for (var i = 0; i < data.length; ++i) {
|
for (var i = 0; i < data.length; ++i) {
|
||||||
var comment = this.readSDKComment(data[i].asc_getId(), data[i]);
|
var comment = this.readSDKComment(data[i].asc_getId(), data[i]);
|
||||||
this.collection.push(comment);
|
comment.get('groupName') ? this.addCommentToGroupCollection(comment) : this.collection.push(comment);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.updateComments(true);
|
this.updateComments(true);
|
||||||
},
|
},
|
||||||
onApiRemoveComment: function (id, silentUpdate) {
|
onApiRemoveComment: function (id, silentUpdate) {
|
||||||
|
for (var name in this.groupCollection) {
|
||||||
|
var store = this.groupCollection[name],
|
||||||
|
model = store.findWhere({uid: id});
|
||||||
|
if (model) {
|
||||||
|
store.remove(model);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (this.collection.length) {
|
if (this.collection.length) {
|
||||||
var model = this.collection.findWhere({uid: id});
|
var model = this.collection.findWhere({uid: id});
|
||||||
if (model) {
|
if (model) {
|
||||||
|
@ -717,7 +731,7 @@ define([
|
||||||
replies = null,
|
replies = null,
|
||||||
repliesCount = 0,
|
repliesCount = 0,
|
||||||
dateReply = null,
|
dateReply = null,
|
||||||
comment = this.findComment(id);
|
comment = this.findComment(id) || this.findCommentInGroup(id);
|
||||||
|
|
||||||
if (comment) {
|
if (comment) {
|
||||||
t = this;
|
t = this;
|
||||||
|
@ -776,7 +790,7 @@ define([
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onApiLockComment: function (id,userId) {
|
onApiLockComment: function (id,userId) {
|
||||||
var cur = this.findComment(id),
|
var cur = this.findComment(id) || this.findCommentInGroup(id),
|
||||||
user = null;
|
user = null;
|
||||||
|
|
||||||
if (cur) {
|
if (cur) {
|
||||||
|
@ -792,7 +806,7 @@ define([
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onApiUnLockComment: function (id) {
|
onApiUnLockComment: function (id) {
|
||||||
var cur = this.findComment(id);
|
var cur = this.findComment(id) || this.findCommentInGroup(id);
|
||||||
if (cur) {
|
if (cur) {
|
||||||
cur.set('lock', false);
|
cur.set('lock', false);
|
||||||
this.getPopover() && this.getPopover().loadText();
|
this.getPopover() && this.getPopover().loadText();
|
||||||
|
@ -999,11 +1013,6 @@ define([
|
||||||
// internal
|
// internal
|
||||||
|
|
||||||
updateComments: function (needRender, disableSort) {
|
updateComments: function (needRender, disableSort) {
|
||||||
if (needRender && !this.view.isVisible()) {
|
|
||||||
this.view.needRender = needRender;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var me = this;
|
var me = this;
|
||||||
me.updateCommentsTime = new Date();
|
me.updateCommentsTime = new Date();
|
||||||
if (me.timerUpdateComments===undefined)
|
if (me.timerUpdateComments===undefined)
|
||||||
|
@ -1017,6 +1026,12 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
updateCommentsView: function (needRender, disableSort) {
|
updateCommentsView: function (needRender, disableSort) {
|
||||||
|
if (needRender && !this.view.isVisible()) {
|
||||||
|
this.view.needRender = needRender;
|
||||||
|
this.onUpdateFilter(this.filter, true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var i, end = true;
|
var i, end = true;
|
||||||
|
|
||||||
if (_.isUndefined(disableSort)) {
|
if (_.isUndefined(disableSort)) {
|
||||||
|
@ -1024,6 +1039,8 @@ define([
|
||||||
}
|
}
|
||||||
|
|
||||||
if (needRender) {
|
if (needRender) {
|
||||||
|
this.onUpdateFilter(this.filter, true);
|
||||||
|
|
||||||
for (i = this.collection.length - 1; i >= 0; --i) {
|
for (i = this.collection.length - 1; i >= 0; --i) {
|
||||||
if (end) {
|
if (end) {
|
||||||
this.collection.at(i).set('last', true, {silent: true});
|
this.collection.at(i).set('last', true, {silent: true});
|
||||||
|
@ -1035,24 +1052,25 @@ define([
|
||||||
end = false;
|
end = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.onUpdateFilter(this.filter, true);
|
|
||||||
|
|
||||||
this.view.render();
|
this.view.render();
|
||||||
this.view.needRender = false;
|
this.view.needRender = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.view.update();
|
this.view.update();
|
||||||
},
|
},
|
||||||
findComment: function (uid, id) {
|
findComment: function (uid) {
|
||||||
if (_.isUndefined(uid)) {
|
|
||||||
return this.collection.findWhere({id: id});
|
|
||||||
}
|
|
||||||
|
|
||||||
return this.collection.findWhere({uid: uid});
|
return this.collection.findWhere({uid: uid});
|
||||||
},
|
},
|
||||||
findPopupComment: function (id) {
|
findPopupComment: function (id) {
|
||||||
return this.popoverComments.findWhere({id: id});
|
return this.popoverComments.findWhere({id: id});
|
||||||
},
|
},
|
||||||
|
findCommentInGroup: function (id) {
|
||||||
|
for (var name in this.groupCollection) {
|
||||||
|
var store = this.groupCollection[name],
|
||||||
|
model = store.findWhere({uid: id});
|
||||||
|
if (model) return model;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
closeEditing: function (id) {
|
closeEditing: function (id) {
|
||||||
var t = this;
|
var t = this;
|
||||||
|
@ -1117,8 +1135,21 @@ define([
|
||||||
// helpers
|
// helpers
|
||||||
|
|
||||||
onUpdateUsers: function() {
|
onUpdateUsers: function() {
|
||||||
var users = this.userCollection;
|
var users = this.userCollection,
|
||||||
this.collection.each(function (model) {
|
hasGroup = false;
|
||||||
|
for (var name in this.groupCollection) {
|
||||||
|
hasGroup = true;
|
||||||
|
this.groupCollection[name].each(function (model) {
|
||||||
|
var user = users.findOriginalUser(model.get('userid'));
|
||||||
|
model.set('usercolor', (user) ? user.get('color') : null, {silent: true});
|
||||||
|
|
||||||
|
model.get('replys').forEach(function (reply) {
|
||||||
|
user = users.findOriginalUser(reply.get('userid'));
|
||||||
|
reply.set('usercolor', (user) ? user.get('color') : null, {silent: true});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
!hasGroup && this.collection.each(function (model) {
|
||||||
var user = users.findOriginalUser(model.get('userid'));
|
var user = users.findOriginalUser(model.get('userid'));
|
||||||
model.set('usercolor', (user) ? user.get('color') : null, {silent: true});
|
model.set('usercolor', (user) ? user.get('color') : null, {silent: true});
|
||||||
|
|
||||||
|
@ -1135,7 +1166,8 @@ define([
|
||||||
readSDKComment: function (id, data) {
|
readSDKComment: function (id, data) {
|
||||||
var date = (data.asc_getOnlyOfficeTime()) ? new Date(this.stringOOToLocalDate(data.asc_getOnlyOfficeTime())) :
|
var date = (data.asc_getOnlyOfficeTime()) ? new Date(this.stringOOToLocalDate(data.asc_getOnlyOfficeTime())) :
|
||||||
((data.asc_getTime() == '') ? new Date() : new Date(this.stringUtcToLocalDate(data.asc_getTime())));
|
((data.asc_getTime() == '') ? new Date() : new Date(this.stringUtcToLocalDate(data.asc_getTime())));
|
||||||
var user = this.userCollection.findOriginalUser(data.asc_getUserId());
|
var user = this.userCollection.findOriginalUser(data.asc_getUserId()),
|
||||||
|
groupname = id.match(/^(doc|sheet[0-9]+)_/);
|
||||||
var comment = new Common.Models.Comment({
|
var comment = new Common.Models.Comment({
|
||||||
uid : id,
|
uid : id,
|
||||||
userid : data.asc_getUserId(),
|
userid : data.asc_getUserId(),
|
||||||
|
@ -1155,7 +1187,8 @@ define([
|
||||||
showReplyInPopover : false,
|
showReplyInPopover : false,
|
||||||
hideAddReply : !_.isUndefined(this.hidereply) ? this.hidereply : (this.showPopover ? true : false),
|
hideAddReply : !_.isUndefined(this.hidereply) ? this.hidereply : (this.showPopover ? true : false),
|
||||||
scope : this.view,
|
scope : this.view,
|
||||||
editable : this.mode.canEditComments || (data.asc_getUserId() == this.currentUserId)
|
editable : this.mode.canEditComments || (data.asc_getUserId() == this.currentUserId),
|
||||||
|
groupName : (groupname && groupname.length>1) ? groupname[1] : null
|
||||||
});
|
});
|
||||||
if (comment) {
|
if (comment) {
|
||||||
var replies = this.readSDKReplies(data);
|
var replies = this.readSDKReplies(data);
|
||||||
|
|
|
@ -87,10 +87,10 @@
|
||||||
'<div class="box">',
|
'<div class="box">',
|
||||||
'<div class="input-row">',
|
'<div class="input-row">',
|
||||||
'<span class="btn-placeholder" id="search-placeholder-btn-options"></span>',
|
'<span class="btn-placeholder" id="search-placeholder-btn-options"></span>',
|
||||||
'<input type="text" id="sd-text-search" class="form-control" maxlength="100" placeholder="'+this.textSearchStart+'">',
|
'<input type="text" id="sd-text-search" class="form-control" maxlength="255" placeholder="'+this.textSearchStart+'">',
|
||||||
'</div>',
|
'</div>',
|
||||||
'<div class="input-row">',
|
'<div class="input-row">',
|
||||||
'<input type="text" id="sd-text-replace" class="form-control" maxlength="100" placeholder="'+this.textReplaceDef+'">',
|
'<input type="text" id="sd-text-replace" class="form-control" maxlength="255" placeholder="'+this.textReplaceDef+'">',
|
||||||
'</div>',
|
'</div>',
|
||||||
'<div class="input-row">',
|
'<div class="input-row">',
|
||||||
'<label class="link" id="search-label-replace" result="replaceshow">'+this.txtBtnReplace+'</label>',
|
'<label class="link" id="search-label-replace" result="replaceshow">'+this.txtBtnReplace+'</label>',
|
||||||
|
@ -176,12 +176,14 @@
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
|
||||||
show: function(mode) {
|
show: function(mode, text) {
|
||||||
Common.UI.Window.prototype.show.call(this);
|
Common.UI.Window.prototype.show.call(this);
|
||||||
|
|
||||||
!this.mode && !mode && (mode = 'search');
|
!this.mode && !mode && (mode = 'search');
|
||||||
if (mode && this.mode != mode) this.setMode(mode);
|
if (mode && this.mode != mode) this.setMode(mode);
|
||||||
|
|
||||||
|
text && this.setSearchText(text);
|
||||||
|
|
||||||
if (this.options.markresult && this.miHighlight.checked) {
|
if (this.options.markresult && this.miHighlight.checked) {
|
||||||
this.fireEvent('search:highlight', [this, true]);
|
this.fireEvent('search:highlight', [this, true]);
|
||||||
}
|
}
|
||||||
|
@ -271,6 +273,10 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
setSearchText: function(value) {
|
||||||
|
this.txtSearch && this.txtSearch.val(value);
|
||||||
|
},
|
||||||
|
|
||||||
onShowReplace: function(e) {
|
onShowReplace: function(e) {
|
||||||
this.setMode((this.mode=='replace') ? 'search' : 'replace');
|
this.setMode((this.mode=='replace') ? 'search' : 'replace');
|
||||||
|
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 17 KiB |
Binary file not shown.
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 37 KiB |
|
@ -108,20 +108,46 @@
|
||||||
.scroll {
|
.scroll {
|
||||||
line-height: @height-tabs;
|
line-height: @height-tabs;
|
||||||
min-width: 20px;
|
min-width: 20px;
|
||||||
text-align: center;
|
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
color: #fff;
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&:not(:hover) {
|
||||||
|
&:after {
|
||||||
|
opacity: .8;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
&.left{
|
&.left{
|
||||||
box-shadow: 5px 0 20px 5px @tabs-bg-color
|
box-shadow: 5px 0 20px 5px @tabs-bg-color;
|
||||||
|
|
||||||
|
&:after {
|
||||||
|
transform: rotate(135deg);
|
||||||
|
margin-left: 8px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
&.right{
|
&.right{
|
||||||
box-shadow: -5px 0 20px 5px @tabs-bg-color
|
box-shadow: -5px 0 20px 5px @tabs-bg-color;
|
||||||
|
|
||||||
|
&:after {
|
||||||
|
transform: rotate(-45deg);
|
||||||
|
margin-left: 4px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@arrow-length: 8px;
|
||||||
|
&:after {
|
||||||
|
content: ' ';
|
||||||
|
width: @arrow-length;
|
||||||
|
height: @arrow-length;
|
||||||
|
border: solid white;
|
||||||
|
border-width: 0 2px 2px 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -323,4 +349,5 @@
|
||||||
.button-normal-icon(btn-controls, 54, @toolbar-big-icon-size);
|
.button-normal-icon(btn-controls, 54, @toolbar-big-icon-size);
|
||||||
.button-normal-icon(~'x-huge .btn-select-pivot', 55, @toolbar-big-icon-size);
|
.button-normal-icon(~'x-huge .btn-select-pivot', 55, @toolbar-big-icon-size);
|
||||||
.button-normal-icon(~'x-huge .btn-bookmarks', 56, @toolbar-big-icon-size);
|
.button-normal-icon(~'x-huge .btn-bookmarks', 56, @toolbar-big-icon-size);
|
||||||
.button-normal-icon(btn-print-area, 56, @toolbar-big-icon-size);
|
.button-normal-icon(btn-blankpage, 57, @toolbar-big-icon-size);
|
||||||
|
.button-normal-icon(btn-print-area, 58, @toolbar-big-icon-size);
|
|
@ -535,9 +535,10 @@ define([
|
||||||
var mode = this.mode.isEdit ? (action || undefined) : 'no-replace';
|
var mode = this.mode.isEdit ? (action || undefined) : 'no-replace';
|
||||||
if (this.dlgSearch.isVisible()) {
|
if (this.dlgSearch.isVisible()) {
|
||||||
this.dlgSearch.setMode(mode);
|
this.dlgSearch.setMode(mode);
|
||||||
|
this.dlgSearch.setSearchText(this.api.asc_GetSelectedText());
|
||||||
this.dlgSearch.focus();
|
this.dlgSearch.focus();
|
||||||
} else {
|
} else {
|
||||||
this.dlgSearch.show(mode);
|
this.dlgSearch.show(mode, this.api.asc_GetSelectedText());
|
||||||
}
|
}
|
||||||
} else this.dlgSearch['hide']();
|
} else this.dlgSearch['hide']();
|
||||||
},
|
},
|
||||||
|
|
|
@ -312,6 +312,7 @@ define([
|
||||||
toolbar.btnEditHeader.menu.on('item:click', _.bind(this.onEditHeaderFooterClick, this));
|
toolbar.btnEditHeader.menu.on('item:click', _.bind(this.onEditHeaderFooterClick, this));
|
||||||
toolbar.mnuPageNumCurrentPos.on('click', _.bind(this.onPageNumCurrentPosClick, this));
|
toolbar.mnuPageNumCurrentPos.on('click', _.bind(this.onPageNumCurrentPosClick, this));
|
||||||
toolbar.mnuInsertPageCount.on('click', _.bind(this.onInsertPageCountClick, this));
|
toolbar.mnuInsertPageCount.on('click', _.bind(this.onInsertPageCountClick, this));
|
||||||
|
toolbar.btnBlankPage.on('click', _.bind(this.onBtnBlankPageClick, this));
|
||||||
toolbar.listStyles.on('click', _.bind(this.onListStyleSelect, this));
|
toolbar.listStyles.on('click', _.bind(this.onListStyleSelect, this));
|
||||||
toolbar.listStyles.on('contextmenu', _.bind(this.onListStyleContextMenu, this));
|
toolbar.listStyles.on('contextmenu', _.bind(this.onListStyleContextMenu, this));
|
||||||
toolbar.styleMenu.on('hide:before', _.bind(this.onListStyleBeforeHide, this));
|
toolbar.styleMenu.on('hide:before', _.bind(this.onListStyleBeforeHide, this));
|
||||||
|
@ -746,6 +747,7 @@ define([
|
||||||
var in_footnote = this.api.asc_IsCursorInFootnote();
|
var in_footnote = this.api.asc_IsCursorInFootnote();
|
||||||
need_disable = paragraph_locked || header_locked || in_header || in_image || in_equation && !btn_eq_state || in_footnote || in_control;
|
need_disable = paragraph_locked || header_locked || in_header || in_image || in_equation && !btn_eq_state || in_footnote || in_control;
|
||||||
toolbar.btnsPageBreak.setDisabled(need_disable);
|
toolbar.btnsPageBreak.setDisabled(need_disable);
|
||||||
|
toolbar.btnBlankPage.setDisabled(need_disable);
|
||||||
|
|
||||||
need_disable = paragraph_locked || header_locked || in_equation || control_plain;
|
need_disable = paragraph_locked || header_locked || in_equation || control_plain;
|
||||||
toolbar.btnInsertShape.setDisabled(need_disable);
|
toolbar.btnInsertShape.setDisabled(need_disable);
|
||||||
|
@ -1856,6 +1858,14 @@ define([
|
||||||
Common.component.Analytics.trackEvent('ToolBar', 'Page Number');
|
Common.component.Analytics.trackEvent('ToolBar', 'Page Number');
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onBtnBlankPageClick: function(btn) {
|
||||||
|
if (this.api)
|
||||||
|
this.api.asc_AddBlankPage();
|
||||||
|
|
||||||
|
Common.NotificationCenter.trigger('edit:complete', this.toolbar);
|
||||||
|
Common.component.Analytics.trackEvent('ToolBar', 'Blank Page');
|
||||||
|
},
|
||||||
|
|
||||||
onListStyleSelect: function(combo, record) {
|
onListStyleSelect: function(combo, record) {
|
||||||
this._state.prstyle = undefined;
|
this._state.prstyle = undefined;
|
||||||
if (this.api)
|
if (this.api)
|
||||||
|
|
|
@ -81,6 +81,7 @@
|
||||||
</section>
|
</section>
|
||||||
<section class="panel" data-tab="ins">
|
<section class="panel" data-tab="ins">
|
||||||
<div class="group">
|
<div class="group">
|
||||||
|
<span class="btn-slot text x-huge" id="slot-btn-blankpage"></span>
|
||||||
<span class="btn-slot text x-huge btn-pagebreak"></span>
|
<span class="btn-slot text x-huge btn-pagebreak"></span>
|
||||||
<span class="btn-slot text x-huge" id="slot-btn-editheader"></span>
|
<span class="btn-slot text x-huge" id="slot-btn-editheader"></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -560,6 +560,14 @@ define([
|
||||||
this.paragraphControls.push(this.mnuInsertPageCount);
|
this.paragraphControls.push(this.mnuInsertPageCount);
|
||||||
this.toolbarControls.push(this.btnEditHeader);
|
this.toolbarControls.push(this.btnEditHeader);
|
||||||
|
|
||||||
|
this.btnBlankPage = new Common.UI.Button({
|
||||||
|
id: 'id-toolbar-btn-blankpage',
|
||||||
|
cls: 'btn-toolbar x-huge icon-top',
|
||||||
|
iconCls: 'btn-blankpage',
|
||||||
|
caption: me.capBtnBlankPage
|
||||||
|
});
|
||||||
|
this.paragraphControls.push(this.btnBlankPage);
|
||||||
|
|
||||||
this.btnInsertShape = new Common.UI.Button({
|
this.btnInsertShape = new Common.UI.Button({
|
||||||
id: 'tlbtn-insertshape',
|
id: 'tlbtn-insertshape',
|
||||||
cls: 'btn-toolbar x-huge icon-top',
|
cls: 'btn-toolbar x-huge icon-top',
|
||||||
|
@ -1295,6 +1303,7 @@ define([
|
||||||
_injectComponent('#slot-btn-controls', this.btnContentControls);
|
_injectComponent('#slot-btn-controls', this.btnContentControls);
|
||||||
_injectComponent('#slot-btn-columns', this.btnColumns);
|
_injectComponent('#slot-btn-columns', this.btnColumns);
|
||||||
_injectComponent('#slot-btn-editheader', this.btnEditHeader);
|
_injectComponent('#slot-btn-editheader', this.btnEditHeader);
|
||||||
|
_injectComponent('#slot-btn-blankpage', this.btnBlankPage);
|
||||||
_injectComponent('#slot-btn-insshape', this.btnInsertShape);
|
_injectComponent('#slot-btn-insshape', this.btnInsertShape);
|
||||||
_injectComponent('#slot-btn-insequation', this.btnInsertEquation);
|
_injectComponent('#slot-btn-insequation', this.btnInsertEquation);
|
||||||
_injectComponent('#slot-btn-pageorient', this.btnPageOrient);
|
_injectComponent('#slot-btn-pageorient', this.btnPageOrient);
|
||||||
|
@ -1538,6 +1547,7 @@ define([
|
||||||
this.btnInsertText.updateHint(this.tipInsertText);
|
this.btnInsertText.updateHint(this.tipInsertText);
|
||||||
this.btnInsertTextArt.updateHint(this.tipInsertTextArt);
|
this.btnInsertTextArt.updateHint(this.tipInsertTextArt);
|
||||||
this.btnEditHeader.updateHint(this.tipEditHeader);
|
this.btnEditHeader.updateHint(this.tipEditHeader);
|
||||||
|
this.btnBlankPage.updateHint(this.tipBlankPage);
|
||||||
this.btnInsertShape.updateHint(this.tipInsertShape);
|
this.btnInsertShape.updateHint(this.tipInsertShape);
|
||||||
this.btnInsertEquation.updateHint(this.tipInsertEquation);
|
this.btnInsertEquation.updateHint(this.tipInsertEquation);
|
||||||
this.btnDropCap.updateHint(this.tipDropCap);
|
this.btnDropCap.updateHint(this.tipDropCap);
|
||||||
|
@ -2372,7 +2382,9 @@ define([
|
||||||
tipControls: 'Insert content control',
|
tipControls: 'Insert content control',
|
||||||
mniHighlightControls: 'Highlight settings',
|
mniHighlightControls: 'Highlight settings',
|
||||||
textNoHighlight: 'No highlighting',
|
textNoHighlight: 'No highlighting',
|
||||||
mniImageFromStorage: 'Image from Storage'
|
mniImageFromStorage: 'Image from Storage',
|
||||||
|
capBtnBlankPage: 'Blank Page',
|
||||||
|
tipBlankPage: 'Insert blank page'
|
||||||
}
|
}
|
||||||
})(), DE.Views.Toolbar || {}));
|
})(), DE.Views.Toolbar || {}));
|
||||||
});
|
});
|
||||||
|
|
|
@ -1976,5 +1976,7 @@
|
||||||
"DE.Views.Toolbar.txtScheme7": "Equity",
|
"DE.Views.Toolbar.txtScheme7": "Equity",
|
||||||
"DE.Views.Toolbar.txtScheme8": "Flow",
|
"DE.Views.Toolbar.txtScheme8": "Flow",
|
||||||
"DE.Views.Toolbar.txtScheme9": "Foundry",
|
"DE.Views.Toolbar.txtScheme9": "Foundry",
|
||||||
|
"DE.Views.Toolbar.capBtnBlankPage": "Blank Page",
|
||||||
|
"DE.Views.Toolbar.tipBlankPage": "Insert blank page",
|
||||||
"DE.Views.Toolbar.mniImageFromStorage": "Image from Storage"
|
"DE.Views.Toolbar.mniImageFromStorage": "Image from Storage"
|
||||||
}
|
}
|
|
@ -108,6 +108,7 @@ require([
|
||||||
docInfo.put_Options(data.options);
|
docInfo.put_Options(data.options);
|
||||||
docInfo.put_Token(data.token);
|
docInfo.put_Token(data.token);
|
||||||
docInfo.put_Permissions( data.permissions);
|
docInfo.put_Permissions( data.permissions);
|
||||||
|
window.document.title = 'Presenter View' + (data.title ? (' - ' + data.title) : '');
|
||||||
}
|
}
|
||||||
|
|
||||||
api.preloadReporter(data);
|
api.preloadReporter(data);
|
||||||
|
|
|
@ -109,6 +109,7 @@ require([
|
||||||
docInfo.put_Options(data.options);
|
docInfo.put_Options(data.options);
|
||||||
docInfo.put_Token(data.token);
|
docInfo.put_Token(data.token);
|
||||||
docInfo.put_Permissions( data.permissions);
|
docInfo.put_Permissions( data.permissions);
|
||||||
|
window.document.title = 'Presenter View' + (data.title ? (' - ' + data.title) : '');
|
||||||
}
|
}
|
||||||
|
|
||||||
api.preloadReporter(data);
|
api.preloadReporter(data);
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html style="width:100%; height:100%;overflow: hidden;">
|
<html style="width:100%; height:100%;overflow: hidden;">
|
||||||
<head>
|
<head>
|
||||||
<title>ONLYOFFICE Presentation Editor</title>
|
<title>Presenter View</title>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=IE8"/>
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=IE8"/>
|
||||||
<meta name="description" content="" />
|
<meta name="description" content="" />
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html style="width:100%; height:100%;overflow: hidden;">
|
<html style="width:100%; height:100%;overflow: hidden;">
|
||||||
<head>
|
<head>
|
||||||
<title>ONLYOFFICE Presentation Editor</title>
|
<title>Presenter View</title>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=IE8"/>
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=IE8"/>
|
||||||
<meta name="description" content="" />
|
<meta name="description" content="" />
|
||||||
|
|
|
@ -151,7 +151,9 @@ define([
|
||||||
if (this.mode.canComments) {
|
if (this.mode.canComments) {
|
||||||
this.api.asc_registerCallback('asc_onAddComment', _.bind(this.onApiAddComment, this));
|
this.api.asc_registerCallback('asc_onAddComment', _.bind(this.onApiAddComment, this));
|
||||||
this.api.asc_registerCallback('asc_onAddComments', _.bind(this.onApiAddComments, this));
|
this.api.asc_registerCallback('asc_onAddComments', _.bind(this.onApiAddComments, this));
|
||||||
var collection = this.getApplication().getCollection('Common.Collections.Comments');
|
var comments = this.getApplication().getController('Common.Controllers.Comments').groupCollection;
|
||||||
|
for (var name in comments) {
|
||||||
|
var collection = comments[name];
|
||||||
for (var i = 0; i < collection.length; ++i) {
|
for (var i = 0; i < collection.length; ++i) {
|
||||||
if (collection.at(i).get('userid') !== this.mode.user.id) {
|
if (collection.at(i).get('userid') !== this.mode.user.id) {
|
||||||
this.leftMenu.markCoauthOptions('comments', true);
|
this.leftMenu.markCoauthOptions('comments', true);
|
||||||
|
@ -160,6 +162,7 @@ define([
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
/** coauthoring end **/
|
/** coauthoring end **/
|
||||||
if (!this.mode.isEditMailMerge && !this.mode.isEditDiagram)
|
if (!this.mode.isEditMailMerge && !this.mode.isEditDiagram)
|
||||||
this.api.asc_registerCallback('asc_onEditCell', _.bind(this.onApiEditCell, this));
|
this.api.asc_registerCallback('asc_onEditCell', _.bind(this.onApiEditCell, this));
|
||||||
|
|
|
@ -718,9 +718,7 @@ define([
|
||||||
if (window.styles_loaded || me.appOptions.isEditDiagram || me.appOptions.isEditMailMerge) {
|
if (window.styles_loaded || me.appOptions.isEditDiagram || me.appOptions.isEditMailMerge) {
|
||||||
clearInterval(timer_sl);
|
clearInterval(timer_sl);
|
||||||
|
|
||||||
Common.NotificationCenter.trigger('comments:updatefilter',
|
Common.NotificationCenter.trigger('comments:updatefilter', ['doc', 'sheet' + me.api.asc_getActiveWorksheetId()]);
|
||||||
{property: 'uid',
|
|
||||||
value: new RegExp('^(doc_|sheet' + me.api.asc_getActiveWorksheetId() + '_)')});
|
|
||||||
|
|
||||||
documentHolderView.createDelayedElements();
|
documentHolderView.createDelayedElements();
|
||||||
toolbarController.createDelayedElements();
|
toolbarController.createDelayedElements();
|
||||||
|
@ -1619,14 +1617,8 @@ define([
|
||||||
if (!this.appOptions.isEditMailMerge && !this.appOptions.isEditDiagram && window.editor_elements_prepared) {
|
if (!this.appOptions.isEditMailMerge && !this.appOptions.isEditDiagram && window.editor_elements_prepared) {
|
||||||
this.application.getController('Statusbar').selectTab(index);
|
this.application.getController('Statusbar').selectTab(index);
|
||||||
|
|
||||||
if (this.appOptions.isEdit && !this.dontCloseDummyComment) {
|
if (this.appOptions.canComments && !this.dontCloseDummyComment) {
|
||||||
Common.NotificationCenter.trigger('comments:updatefilter',
|
Common.NotificationCenter.trigger('comments:updatefilter', ['doc', 'sheet' + this.api.asc_getWorksheetId(index)], false ); // hide popover
|
||||||
{
|
|
||||||
property: 'uid',
|
|
||||||
value: new RegExp('^(doc_|sheet' + this.api.asc_getWorksheetId(index) + '_)')
|
|
||||||
},
|
|
||||||
false // hide popover
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -384,9 +384,7 @@ define([
|
||||||
if (!_.isUndefined(silent)) {
|
if (!_.isUndefined(silent)) {
|
||||||
me.api.asc_showWorksheet(items[index].inindex);
|
me.api.asc_showWorksheet(items[index].inindex);
|
||||||
|
|
||||||
Common.NotificationCenter.trigger('comments:updatefilter',
|
Common.NotificationCenter.trigger('comments:updatefilter', ['doc', 'sheet' + this.api.asc_getActiveWorksheetId()]);
|
||||||
{property: 'uid',
|
|
||||||
value: new RegExp('^(doc_|sheet' + this.api.asc_getActiveWorksheetId() + '_)')});
|
|
||||||
|
|
||||||
if (!_.isUndefined(destPos)) {
|
if (!_.isUndefined(destPos)) {
|
||||||
me.api.asc_moveWorksheet(items.length === destPos ? wc : items[destPos].inindex);
|
me.api.asc_moveWorksheet(items.length === destPos ? wc : items[destPos].inindex);
|
||||||
|
@ -418,12 +416,7 @@ define([
|
||||||
this.api.asc_closeCellEditor();
|
this.api.asc_closeCellEditor();
|
||||||
this.api.asc_addWorksheet(this.createSheetName());
|
this.api.asc_addWorksheet(this.createSheetName());
|
||||||
|
|
||||||
Common.NotificationCenter.trigger('comments:updatefilter',
|
Common.NotificationCenter.trigger('comments:updatefilter', ['doc', 'sheet' + this.api.asc_getActiveWorksheetId()], false); // hide popover
|
||||||
{property: 'uid',
|
|
||||||
value: new RegExp('^(doc_|sheet' + this.api.asc_getActiveWorksheetId() + '_)')
|
|
||||||
},
|
|
||||||
false // hide popover
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
Common.NotificationCenter.trigger('edit:complete', this.statusbar);
|
Common.NotificationCenter.trigger('edit:complete', this.statusbar);
|
||||||
},
|
},
|
||||||
|
|
|
@ -2825,17 +2825,6 @@ define([
|
||||||
// });
|
// });
|
||||||
},
|
},
|
||||||
|
|
||||||
onSheetChanged: function() {
|
|
||||||
if (this.api) {
|
|
||||||
var params = this.api.asc_getSheetViewSettings();
|
|
||||||
var menu = this.getMenuHideOptions();
|
|
||||||
if (menu) {
|
|
||||||
menu.items.getAt(3).setChecked(!params.asc_getShowRowColHeaders());
|
|
||||||
menu.items.getAt(4).setChecked(!params.asc_getShowGridLines());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
_disableEditOptions: function(seltype, coauth_disable) {
|
_disableEditOptions: function(seltype, coauth_disable) {
|
||||||
if (this.api.isCellEdited) return true;
|
if (this.api.isCellEdited) return true;
|
||||||
if (this.api.isRangeSelection) return true;
|
if (this.api.isRangeSelection) return true;
|
||||||
|
|
|
@ -358,7 +358,7 @@ define([
|
||||||
|
|
||||||
me.fireEvent('sheet:changed', [me, sindex]);
|
me.fireEvent('sheet:changed', [me, sindex]);
|
||||||
me.fireEvent('sheet:updateColors', [true]);
|
me.fireEvent('sheet:updateColors', [true]);
|
||||||
Common.NotificationCenter.trigger('comments:updatefilter', {property: 'uid', value: new RegExp('^(doc_|sheet' + me.api.asc_getActiveWorksheetId() + '_)')}, false);
|
Common.NotificationCenter.trigger('comments:updatefilter', ['doc', 'sheet' + me.api.asc_getActiveWorksheetId()], false);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -409,13 +409,7 @@ define([
|
||||||
this.fireEvent('sheet:changed', [this, tab.sheetindex]);
|
this.fireEvent('sheet:changed', [this, tab.sheetindex]);
|
||||||
this.fireEvent('sheet:updateColors', [true]);
|
this.fireEvent('sheet:updateColors', [true]);
|
||||||
|
|
||||||
Common.NotificationCenter.trigger('comments:updatefilter',
|
// Common.NotificationCenter.trigger('comments:updatefilter', ['doc', 'sheet' + this.api.asc_getActiveWorksheetId()], false); // hide popover
|
||||||
{
|
|
||||||
property: 'uid',
|
|
||||||
value: new RegExp('^(doc_|sheet' + this.api.asc_getActiveWorksheetId() + '_)')
|
|
||||||
},
|
|
||||||
false // hide popover
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
onTabMenu: function (o, index, tab) {
|
onTabMenu: function (o, index, tab) {
|
||||||
|
|
Loading…
Reference in a new issue