Merge pull request #68 from ONLYOFFICE/release/v5.1.0

Release/v5.1.0
This commit is contained in:
Alexander Vnuchkov 2018-03-23 17:21:54 +03:00 committed by GitHub
commit 9aea4f18c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 30 additions and 26 deletions

View file

@ -552,7 +552,7 @@ define([
window._event = e; // for FireFox only window._event = e; // for FireFox only
this.selectRecord(record); if (this.showLast) this.selectRecord(record);
this.lastSelectedRec = null; this.lastSelectedRec = null;
if (!this.isSuspendEvents) { if (!this.isSuspendEvents) {

View file

@ -60,8 +60,8 @@ define([
storeMessages: undefined, storeMessages: undefined,
tplUser: ['<li id="<%= user.get("iid") %>"<% if (!user.get("online")) { %> class="offline"<% } %>>', tplUser: ['<li id="<%= user.get("iid") %>"<% if (!user.get("online")) { %> class="offline"<% } %>>',
'<div class="color" style="background-color: <%= user.get("color") %>;" >', '<div class="name"><%= scope.getUserName(user.get("username")) %>',
'<label class="name"><%= scope.getUserName(user.get("username")) %></label>', '<div class="color" style="background-color: <%= user.get("color") %>;" ></div>',
'</div>', '</div>',
'</li>'].join(''), '</li>'].join(''),

View file

@ -1370,7 +1370,7 @@ define([
return Common.Utils.String.ellipsis(Common.Utils.String.htmlEncode(quote), 120, true); return Common.Utils.String.ellipsis(Common.Utils.String.htmlEncode(quote), 120, true);
}, },
getUserName: function (username) { getUserName: function (username) {
return Common.Utils.String.ellipsis(Common.Utils.String.htmlEncode(username), 22, true); return Common.Utils.String.htmlEncode(username);
}, },
pickLink: function (message) { pickLink: function (message) {

View file

@ -208,8 +208,6 @@ define([
appConfig = mode; appConfig = mode;
var me = this; var me = this;
if ( !(me.branding && me.branding.goback && me.branding.goback.text) )
me.btnGoBack.updateHint(me.textBack);
me.btnGoBack.on('click', function (e) { me.btnGoBack.on('click', function (e) {
Common.NotificationCenter.trigger('goback'); Common.NotificationCenter.trigger('goback');
}); });
@ -482,10 +480,6 @@ define([
element.css({'background-image': 'none', width: 'auto'}); element.css({'background-image': 'none', width: 'auto'});
} }
} }
if ( !!value.goback && value.goback.text) {
this.btnGoBack.updateHint(value.goback.text);
}
} }
}, },
@ -527,10 +521,12 @@ define([
this.labelDocName.text(_name); this.labelDocName.text(_name);
}, },
setCanBack: function (value) { setCanBack: function (value, text) {
this.canBack = value; this.canBack = value;
this.btnGoBack[value ? 'show' : 'hide'](); this.btnGoBack[value ? 'show' : 'hide']();
if (value)
this.btnGoBack.updateHint((text && typeof text == 'string') ? text : this.textBack);
}, },
getCanBack: function () { getCanBack: function () {

View file

@ -52,22 +52,24 @@
} }
.color { .color {
position: absolute;
top: 0;
left: 0;
margin-top: 1px;
width: 12px; width: 12px;
height: 12px; height: 12px;
display: inline-block;
vertical-align: middle;
border: 1px solid @gray-dark; border: 1px solid @gray-dark;
} }
.name { .name {
display: block; display: block;
padding-left: 16px; position: relative;
padding: 0 10px 0 16px;
margin-top: -2px; margin-top: -2px;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden;
font-weight: bold; font-weight: bold;
vertical-align: middle;
} }
} }
@ -94,6 +96,8 @@
.user { .user {
font-weight: bold; font-weight: bold;
white-space: nowrap; white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
} }
.message { .message {

View file

@ -113,10 +113,9 @@
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
padding: 10px 0px 0 0px; padding: 10px 65px 0 0px;
height: 26px; height: 26px;
cursor: default; cursor: default;
max-width: 155px;
} }
.user-name-colored { .user-name-colored {

View file

@ -121,8 +121,8 @@
font-size: 12px; font-size: 12px;
cursor: pointer; cursor: pointer;
color: @gray-darker; color: @gray-darker;
max-width: 210px;
text-overflow: ellipsis; text-overflow: ellipsis;
padding-right: 35px;
} }
.color { .color {

View file

@ -313,7 +313,7 @@ define([
this.plugins = this.editorConfig.plugins; this.plugins = this.editorConfig.plugins;
appHeader = this.getApplication().getController('Viewport').getView('Common.Views.Header'); appHeader = this.getApplication().getController('Viewport').getView('Common.Views.Header');
appHeader.setCanBack(this.appOptions.canBackToFolder === true); appHeader.setCanBack(this.appOptions.canBackToFolder === true, (this.appOptions.canBackToFolder) ? this.editorConfig.customization.goback.text : '');
if (this.editorConfig.lang) if (this.editorConfig.lang)
this.api.asc_setLocale(this.editorConfig.lang); this.api.asc_setLocale(this.editorConfig.lang);

View file

@ -617,6 +617,7 @@ define([
if (pasteContainer.length < 1) { if (pasteContainer.length < 1) {
me._arrSpecialPaste = []; me._arrSpecialPaste = [];
me._arrSpecialPaste[Asc.c_oSpecialPasteProps.paste] = me.textPaste; me._arrSpecialPaste[Asc.c_oSpecialPasteProps.paste] = me.textPaste;
me._arrSpecialPaste[Asc.c_oSpecialPasteProps.sourceformatting] = me.txtPasteSourceFormat;
me._arrSpecialPaste[Asc.c_oSpecialPasteProps.keepTextOnly] = me.txtKeepTextOnly; me._arrSpecialPaste[Asc.c_oSpecialPasteProps.keepTextOnly] = me.txtKeepTextOnly;
me._arrSpecialPaste[Asc.c_oSpecialPasteProps.insertAsNestedTable] = me.textNest; me._arrSpecialPaste[Asc.c_oSpecialPasteProps.insertAsNestedTable] = me.textNest;
me._arrSpecialPaste[Asc.c_oSpecialPasteProps.overwriteCells] = me.txtOverwriteCells; me._arrSpecialPaste[Asc.c_oSpecialPasteProps.overwriteCells] = me.txtOverwriteCells;
@ -3726,7 +3727,8 @@ define([
textUpdatePages: 'Refresh page numbers only', textUpdatePages: 'Refresh page numbers only',
textTOCSettings: 'Table of contents settings', textTOCSettings: 'Table of contents settings',
textTOC: 'Table of contents', textTOC: 'Table of contents',
textRefreshField: 'Refresh field' textRefreshField: 'Refresh field',
txtPasteSourceFormat: 'Keep source formatting'
}, DE.Views.DocumentHolder || {})); }, DE.Views.DocumentHolder || {}));
}); });

View file

@ -316,7 +316,7 @@ define([
'<div id="<%= id %>" class="list-item">', '<div id="<%= id %>" class="list-item">',
'<div class="<% if (checked) { %>checked<% } %>"><%= name %></div>', '<div class="<% if (checked) { %>checked<% } %>"><%= name %></div>',
'<div>', '<div>',
'<div class="input-field" style="width:40px;"><input type="text" class="form-control" value="<%= value %>" style="text-align: right;">', '<div class="input-field" style="width:40px;"><input type="text" class="form-control" value="<%= value %>" style="text-align: right;" maxLength="1">',
'</div>', '</div>',
'</div>', '</div>',
'</div>' '</div>'
@ -593,7 +593,7 @@ define([
if(!/[1-9]/.test(charCode) && !e.ctrlKey && e.keyCode !== Common.UI.Keys.DELETE && e.keyCode !== Common.UI.Keys.BACKSPACE && if(!/[1-9]/.test(charCode) && !e.ctrlKey && e.keyCode !== Common.UI.Keys.DELETE && e.keyCode !== Common.UI.Keys.BACKSPACE &&
e.keyCode !== Common.UI.Keys.LEFT && e.keyCode !== Common.UI.Keys.RIGHT && e.keyCode !== Common.UI.Keys.HOME && e.keyCode !== Common.UI.Keys.LEFT && e.keyCode !== Common.UI.Keys.RIGHT && e.keyCode !== Common.UI.Keys.HOME &&
e.keyCode !== Common.UI.Keys.END && e.keyCode !== Common.UI.Keys.ESC && e.keyCode !== Common.UI.Keys.INSERT && e.keyCode !== Common.UI.Keys.END && e.keyCode !== Common.UI.Keys.ESC && e.keyCode !== Common.UI.Keys.INSERT &&
e.keyCode !== Common.UI.Keys.TAB || input.val().length>1){ e.keyCode !== Common.UI.Keys.TAB){
e.preventDefault(); e.preventDefault();
e.stopPropagation(); e.stopPropagation();
} }
@ -628,8 +628,10 @@ define([
onItemChange: function(listView, itemView, record) { onItemChange: function(listView, itemView, record) {
this.addEvents(listView, itemView, record); this.addEvents(listView, itemView, record);
var inp = itemView.$el.find('input');
setTimeout(function(){ setTimeout(function(){
itemView.$el.find('input').focus(); inp.focus();
inp[0].selectionStart = inp[0].selectionEnd = inp[0].value.length;
}, 10); }, 10);
}, },

View file

@ -978,6 +978,7 @@
"DE.Views.DocumentHolder.txtMatrixAlign": "Matrix alignment", "DE.Views.DocumentHolder.txtMatrixAlign": "Matrix alignment",
"DE.Views.DocumentHolder.txtOverbar": "Bar over text", "DE.Views.DocumentHolder.txtOverbar": "Bar over text",
"DE.Views.DocumentHolder.txtOverwriteCells": "Overwrite cells", "DE.Views.DocumentHolder.txtOverwriteCells": "Overwrite cells",
"DE.Views.DocumentHolder.txtPasteSourceFormat": "Keep source formatting",
"DE.Views.DocumentHolder.txtPressLink": "Press CTRL and click link", "DE.Views.DocumentHolder.txtPressLink": "Press CTRL and click link",
"DE.Views.DocumentHolder.txtRemFractionBar": "Remove fraction bar", "DE.Views.DocumentHolder.txtRemFractionBar": "Remove fraction bar",
"DE.Views.DocumentHolder.txtRemLimit": "Remove limit", "DE.Views.DocumentHolder.txtRemLimit": "Remove limit",

View file

@ -292,7 +292,7 @@ define([
this.plugins = this.editorConfig.plugins; this.plugins = this.editorConfig.plugins;
appHeader = this.getApplication().getController('Viewport').getView('Common.Views.Header'); appHeader = this.getApplication().getController('Viewport').getView('Common.Views.Header');
appHeader.setCanBack(this.appOptions.canBackToFolder === true); appHeader.setCanBack(this.appOptions.canBackToFolder === true, (this.appOptions.canBackToFolder) ? this.editorConfig.customization.goback.text : '');
if (this.editorConfig.lang) if (this.editorConfig.lang)
this.api.asc_setLocale(this.editorConfig.lang); this.api.asc_setLocale(this.editorConfig.lang);

View file

@ -307,7 +307,7 @@ define([
this.plugins = this.editorConfig.plugins; this.plugins = this.editorConfig.plugins;
this.headerView = this.getApplication().getController('Viewport').getView('Common.Views.Header'); this.headerView = this.getApplication().getController('Viewport').getView('Common.Views.Header');
this.headerView.setCanBack(this.appOptions.canBackToFolder === true); this.headerView.setCanBack(this.appOptions.canBackToFolder === true, (this.appOptions.canBackToFolder) ? this.editorConfig.customization.goback.text : '');
var value = Common.localStorage.getItem("sse-settings-reg-settings"); var value = Common.localStorage.getItem("sse-settings-reg-settings");
if (value!==null) if (value!==null)