Commit 72712b21 authored by Maxim Kadushkin's avatar Maxim Kadushkin

Merge branch 'develop'

parents e5902b97 2acc2649
......@@ -37,10 +37,12 @@
},
permissions: {
edit: <can edit>, // default = true
download: <can download>,
reader: <can view in readable mode>
review: <can review> // default = edit,
print: <can print> // default = true
download: <can download>, // default = true
reader: <can view in readable mode>,
review: <can review>, // default = edit
print: <can print>, // default = true
rename: <can rename>, // default = false
changeHistory: <can change history>, // default = false
}
},
editorConfig: {
......@@ -60,8 +62,7 @@
user: {
id: 'user id',
firstname: 'user first name',
lastname: 'user last name'
name: 'user name'
},
recent: [
{
......
......@@ -99,8 +99,6 @@ define([
this.setApi(api);
if (data) {
this.currentUserId = data.config.user.id;
this.currentUserName = data.config.user.name;
this.sdkViewName = data['sdkviewname'] || this.sdkViewName;
}
},
......
......@@ -605,14 +605,16 @@ Common.Utils.applyCustomization = function(config, elmap) {
Common.Utils.fillUserInfo = function(info, lang, defname) {
var _user = info || {};
!_user.id && (_user.id = ('uid-' + Date.now()));
_.isEmpty(_user.firstname) && _.isEmpty(_user.lastname) && (_user.firstname = defname);
if (_.isEmpty(_user.firstname))
_user.fullname = _user.lastname;
else if (_.isEmpty(_user.lastname))
_user.fullname = _user.firstname;
else
_user.fullname = /^ru/.test(lang) ? _user.lastname + ' ' + _user.firstname : _user.firstname + ' ' + _user.lastname;
if (_.isEmpty(_user.name)) {
_.isEmpty(_user.firstname) && _.isEmpty(_user.lastname) && (_user.firstname = defname);
if (_.isEmpty(_user.firstname))
_user.fullname = _user.lastname;
else if (_.isEmpty(_user.lastname))
_user.fullname = _user.firstname;
else
_user.fullname = /^ru/.test(lang) ? _user.lastname + ' ' + _user.firstname : _user.firstname + ' ' + _user.lastname;
} else
_user.fullname = _user.name;
return _user;
};
......
......@@ -274,8 +274,6 @@ define([
var _user = new Asc.asc_CUserInfo();
_user.put_Id(this.appOptions.user.id);
_user.put_FirstName(this.appOptions.user.firstname);
_user.put_LastName(this.appOptions.user.lastname);
_user.put_FullName(this.appOptions.user.fullname);
docInfo = new Asc.asc_CDocInfo();
......
......@@ -111,8 +111,6 @@ Ext.define('DE.controller.Main', {
var _user = new Asc.asc_CUserInfo();
_user.put_Id(this.editorConfig.user.id);
_user.put_FirstName(this.editorConfig.user.firstname);
_user.put_LastName(this.editorConfig.user.lastname);
_user.put_FullName(this.editorConfig.user.fullname);
var docInfo = new Asc.asc_CDocInfo();
......@@ -375,11 +373,16 @@ Ext.define('DE.controller.Main', {
_fillUserInfo: function(info, lang, defname) {
var _user = info || {};
!_user.id && (_user.id = ('uid-' + Date.now()));
_.isEmpty(_user.firstname) && _.isEmpty(_user.lastname)
&& (_user.firstname = defname);
_user.fullname = /^ru/.test(lang) ?
_user.lastname + ' ' + _user.firstname : _user.firstname + ' ' + _user.lastname;
if (_.isEmpty(_user.name)) {
_.isEmpty(_user.firstname) && _.isEmpty(_user.lastname) && (_user.firstname = defname);
if (_.isEmpty(_user.firstname))
_user.fullname = _user.lastname;
else if (_.isEmpty(_user.lastname))
_user.fullname = _user.firstname;
else
_user.fullname = /^ru/.test(lang) ? _user.lastname + ' ' + _user.firstname : _user.firstname + ' ' + _user.lastname;
} else
_user.fullname = _user.name;
return _user;
},
......
......@@ -262,8 +262,6 @@ define([
var _user = new Asc.asc_CUserInfo();
_user.put_Id(this.appOptions.user.id);
_user.put_FirstName(this.appOptions.user.firstname);
_user.put_LastName(this.appOptions.user.lastname);
_user.put_FullName(this.appOptions.user.fullname);
docInfo = new Asc.asc_CDocInfo();
......
......@@ -110,8 +110,6 @@ Ext.define('PE.controller.Main', {
var _user = new Asc.asc_CUserInfo();
_user.put_Id(this.editorConfig.user.id);
_user.put_FirstName(this.editorConfig.user.firstname);
_user.put_LastName(this.editorConfig.user.lastname);
_user.put_FullName(this.editorConfig.user.fullname);
var docInfo = new Asc.asc_CDocInfo();
......@@ -327,11 +325,16 @@ Ext.define('PE.controller.Main', {
_fillUserInfo: function(info, lang, defname) {
var _user = info || {};
!_user.id && (_user.id = ('uid-' + Date.now()));
_.isEmpty(_user.firstname) && _.isEmpty(_user.lastname)
&& (_user.firstname = defname);
_user.fullname = /^ru/.test(lang) ?
_user.lastname + ' ' + _user.firstname : _user.firstname + ' ' + _user.lastname;
if (_.isEmpty(_user.name)) {
_.isEmpty(_user.firstname) && _.isEmpty(_user.lastname) && (_user.firstname = defname);
if (_.isEmpty(_user.firstname))
_user.fullname = _user.lastname;
else if (_.isEmpty(_user.lastname))
_user.fullname = _user.firstname;
else
_user.fullname = /^ru/.test(lang) ? _user.lastname + ' ' + _user.firstname : _user.firstname + ' ' + _user.lastname;
} else
_user.fullname = _user.name;
return _user;
},
......
......@@ -1554,12 +1554,10 @@ define([
_.delay(function() {
menu.cmpEl.find('li:first a').addClass('focus');
}, 10);
// } else {
// _.delay(function() {
// menu.cmpEl.focus();
// menu.cmpEl.find('li:first a').focus();
// }, 10);
// }
if (!infocus)
_.delay(function() {
menu.cmpEl.focus();
}, 10);
}, 1);
} else {
this.documentHolder.funcMenu.hide();
......
......@@ -296,8 +296,6 @@ define([
var _user = new Asc.asc_CUserInfo();
_user.put_Id(this.appOptions.user.id);
_user.put_FirstName(this.appOptions.user.firstname);
_user.put_LastName(this.appOptions.user.lastname);
_user.put_FullName(this.appOptions.user.fullname);
docInfo = new Asc.asc_CDocInfo();
......
......@@ -1137,6 +1137,7 @@ define([
case 'formula': params.formula = item.checked; option = 'sse-hidden-formula'; break;
case 'headings': params.headings = item.checked; break;
case 'gridlines': params.gridlines = item.checked; break;
case 'freezepanes': params.freezepanes = item.checked; break;
}
this.hideElements(params);
......@@ -1473,6 +1474,7 @@ define([
var params = this.api.asc_getSheetViewSettings();
this.toolbar.mnuitemHideHeadings.setChecked(!params.asc_getShowRowColHeaders());
this.toolbar.mnuitemHideGridlines.setChecked(!params.asc_getShowGridLines());
this.toolbar.mnuitemFreezePanes.setChecked(params.asc_getIsFreezePane());
}
},
......@@ -1967,6 +1969,12 @@ define([
}
}
if (!_.isUndefined(opts.freezepanes)) {
if (this.api) {
this.api.asc_freezePane();
}
}
Common.NotificationCenter.trigger('edit:complete', this.toolbar);
},
......
......@@ -310,8 +310,9 @@ define([
});
});
this.tabbar.$el.append('<div class="menu-backdrop dropdown-toggle" data-toggle="dropdown" style="width:0; height:0;"/>');
this.tabbar.$el.append('<div class="dropdown-toggle" data-toggle="dropdown" style="width:0; height:0;"/>');
this.tabMenu.render(this.tabbar.$el);
this.tabMenu.cmpEl.attr({tabindex: -1});
this.tabMenu.on('show:after', _.bind(this.onTabMenuAfterShow, this));
this.tabMenu.on('hide:after', _.bind(this.onTabMenuAfterHide, this));
this.tabMenu.on('item:click', _.bind(this.onTabMenuClick, this));
......@@ -552,6 +553,9 @@ define([
if (obj.atposition) {
obj.setOffset(obj.atposition.left);
}
_.defer(function(){
obj.cmpEl.focus();
}, 100);
this.enableKeyEvents = true;
},
......
......@@ -908,6 +908,7 @@ define([
isChecked: function () { return this.conf.checked; }
};
this.mnuitemHideGridlines = clone(this.mnuitemHideHeadings);
this.mnuitemFreezePanes = clone(this.mnuitemHideHeadings);
this.mnuZoom = {
options: {value: 100}
};
......@@ -1323,6 +1324,7 @@ define([
checkable : true,
value : 'formula'
}),
{caption: '--'},
this.mnuitemHideHeadings = new Common.UI.MenuItem({
caption : this.textHideHeadings,
checkable : true,
......@@ -1336,6 +1338,13 @@ define([
value : 'gridlines'
}),
{caption: '--'},
this.mnuitemFreezePanes = new Common.UI.MenuItem({
caption : this.textFreezePanes,
checkable : true,
checked : this.mnuitemFreezePanes.isChecked(),
value : 'freezepanes'
}),
{caption: '--'},
this.mnuZoom = new Common.UI.MenuItem({
template: _.template([
'<div id="id-toolbar-menu-zoom" class="menu-zoom" style="height: 25px;" ',
......@@ -1991,6 +2000,7 @@ define([
textHideFBar: 'Hide Formula Bar',
textHideHeadings: 'Hide Headings',
textHideGridlines: 'Hide Gridlines',
textFreezePanes: 'Freeze Panes',
txtScheme1: 'Office',
txtScheme2: 'Grayscale',
txtScheme3: 'Apex',
......
......@@ -872,6 +872,7 @@
"SSE.Views.Toolbar.textDiagUpBorder": "Ohraničení diagonálně nahoru",
"SSE.Views.Toolbar.textEntireCol": "Celý sloupec",
"SSE.Views.Toolbar.textEntireRow": "Celý řádek",
"SSE.Views.Toolbar.textFreezePanes": "Ukotvit příčky",
"SSE.Views.Toolbar.textHideFBar": "Skrýt řádek vzorců",
"SSE.Views.Toolbar.textHideGridlines": "Skrýt mřížku",
"SSE.Views.Toolbar.textHideHeadings": "Skrýt nadpisy",
......
......@@ -989,6 +989,7 @@
"SSE.Views.Toolbar.textDiagUpBorder": "Rahmenlinien diagonal nach oben",
"SSE.Views.Toolbar.textEntireCol": "Ganze Spalte",
"SSE.Views.Toolbar.textEntireRow": "Ganze Zeile",
"SSE.Views.Toolbar.textFreezePanes": "Fensterausschnitten fixieren",
"SSE.Views.Toolbar.textHideFBar": "Formelleiste vergeben",
"SSE.Views.Toolbar.textHideGridlines": "Gitternetzlinien vergeben",
"SSE.Views.Toolbar.textHideHeadings": "Überschriften vergeben",
......
......@@ -1424,6 +1424,7 @@
"SSE.Views.Toolbar.textDiagUpBorder": "Diagonal Up Border",
"SSE.Views.Toolbar.textEntireCol": "Entire Column",
"SSE.Views.Toolbar.textEntireRow": "Entire Row",
"SSE.Views.Toolbar.textFreezePanes": "Freeze Panes",
"SSE.Views.Toolbar.textHideFBar": "Hide Formula Bar",
"SSE.Views.Toolbar.textHideGridlines": "Hide Gridlines",
"SSE.Views.Toolbar.textHideHeadings": "Hide Headings",
......
......@@ -999,6 +999,7 @@
"SSE.Views.Toolbar.textDiagUpBorder": "Borde diagonal ascendente",
"SSE.Views.Toolbar.textEntireCol": "Toda la columna",
"SSE.Views.Toolbar.textEntireRow": "Toda la fila",
"SSE.Views.Toolbar.textFreezePanes": "Inmovilizar paneles",
"SSE.Views.Toolbar.textHideFBar": "Ocultar barra de fórmulas",
"SSE.Views.Toolbar.textHideGridlines": "Ocultar cuadrícula",
"SSE.Views.Toolbar.textHideHeadings": "Ocultar títulos",
......
......@@ -1422,6 +1422,7 @@
"SSE.Views.Toolbar.textDiagUpBorder": "Bordure diagonale haut",
"SSE.Views.Toolbar.textEntireCol": "Colonne entière",
"SSE.Views.Toolbar.textEntireRow": "Ligne entière",
"SSE.Views.Toolbar.textFreezePanes": "Verrouiller les volets",
"SSE.Views.Toolbar.textHideFBar": "Masquer la barre de formule",
"SSE.Views.Toolbar.textHideGridlines": "Masquer le quadrillage",
"SSE.Views.Toolbar.textHideHeadings": "Masquer les en-têtes",
......
......@@ -872,6 +872,7 @@
"SSE.Views.Toolbar.textDiagUpBorder": "Bordo diagonale superiore",
"SSE.Views.Toolbar.textEntireCol": "Colonna intera",
"SSE.Views.Toolbar.textEntireRow": "Riga intera",
"SSE.Views.Toolbar.textFreezePanes": "Blocca riquadri",
"SSE.Views.Toolbar.textHideFBar": "Nascondi barra di formula",
"SSE.Views.Toolbar.textHideGridlines": "Nascondi griglia",
"SSE.Views.Toolbar.textHideHeadings": "Nascondi titoli",
......
......@@ -976,6 +976,7 @@
"SSE.Views.Toolbar.textDiagUpBorder": "斜め罫線 ​​(右上がり)",
"SSE.Views.Toolbar.textEntireCol": "列全体",
"SSE.Views.Toolbar.textEntireRow": "行全体",
"SSE.Views.Toolbar.textFreezePanes": "枠の固定",
"SSE.Views.Toolbar.textHideFBar": "数式バーの非表示",
"SSE.Views.Toolbar.textHideGridlines": "表のグリッド線を表示しない",
"SSE.Views.Toolbar.textHideHeadings": "ヘッダー情報を表示しない",
......
......@@ -872,6 +872,7 @@
"SSE.Views.Toolbar.textDiagUpBorder": "Borda superior diagonal",
"SSE.Views.Toolbar.textEntireCol": "Coluna inteira",
"SSE.Views.Toolbar.textEntireRow": "Linha inteira",
"SSE.Views.Toolbar.textFreezePanes": "Congelar painéis",
"SSE.Views.Toolbar.textHideFBar": "Ocultar barra de fórmulas",
"SSE.Views.Toolbar.textHideGridlines": "Ocultar linhas de grade",
"SSE.Views.Toolbar.textHideHeadings": "Ocultar títulos",
......
......@@ -1422,6 +1422,7 @@
"SSE.Views.Toolbar.textDiagUpBorder": "Диагональная граница снизу вверх",
"SSE.Views.Toolbar.textEntireCol": "Столбец",
"SSE.Views.Toolbar.textEntireRow": "Строку",
"SSE.Views.Toolbar.textFreezePanes": "Закрепить области",
"SSE.Views.Toolbar.textHideFBar": "Скрыть строку формул",
"SSE.Views.Toolbar.textHideGridlines": "Скрыть линии сетки",
"SSE.Views.Toolbar.textHideHeadings": "Скрыть заголовки",
......
......@@ -872,6 +872,7 @@
"SSE.Views.Toolbar.textDiagUpBorder": "Diagonalna zgornja meja",
"SSE.Views.Toolbar.textEntireCol": "Cel stolpec",
"SSE.Views.Toolbar.textEntireRow": "Cela vrstica",
"SSE.Views.Toolbar.textFreezePanes": "Zamrzni plošče",
"SSE.Views.Toolbar.textHideFBar": "Skrij vrsto formule",
"SSE.Views.Toolbar.textHideGridlines": "Skrij mrežne črte",
"SSE.Views.Toolbar.textHideHeadings": "Skrij naslove",
......
......@@ -872,6 +872,7 @@
"SSE.Views.Toolbar.textDiagUpBorder": "Diagonal Up Border",
"SSE.Views.Toolbar.textEntireCol": "Tüm sütun",
"SSE.Views.Toolbar.textEntireRow": "Tüm satır",
"SSE.Views.Toolbar.textFreezePanes": "Parçaları Dondur",
"SSE.Views.Toolbar.textHideFBar": "Formül Çubuğunu Gizle",
"SSE.Views.Toolbar.textHideGridlines": "Kılavuz Çizgileri Gizle",
"SSE.Views.Toolbar.textHideHeadings": "Başlıkları Gizle",
......
......@@ -112,8 +112,6 @@ Ext.define('SSE.controller.Main', {
var _user = new Asc.asc_CUserInfo();
_user.put_Id(this.editorConfig.user.id);
_user.put_FirstName(this.editorConfig.user.firstname);
_user.put_LastName(this.editorConfig.user.lastname);
_user.put_FullName(this.editorConfig.user.fullname);
docInfo = new Asc.asc_CDocInfo();
......@@ -348,11 +346,16 @@ Ext.define('SSE.controller.Main', {
_fillUserInfo: function(info, lang, defname) {
var _user = info || {};
!_user.id && (_user.id = ('uid-' + Date.now()));
_.isEmpty(_user.firstname) && _.isEmpty(_user.lastname)
&& (_user.firstname = defname);
_user.fullname = /^ru/.test(lang) ?
_user.lastname + ' ' + _user.firstname : _user.firstname + ' ' + _user.lastname;
if (_.isEmpty(_user.name)) {
_.isEmpty(_user.firstname) && _.isEmpty(_user.lastname) && (_user.firstname = defname);
if (_.isEmpty(_user.firstname))
_user.fullname = _user.lastname;
else if (_.isEmpty(_user.lastname))
_user.fullname = _user.firstname;
else
_user.fullname = /^ru/.test(lang) ? _user.lastname + ' ' + _user.firstname : _user.firstname + ' ' + _user.lastname;
} else
_user.fullname = _user.name;
return _user;
},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment