Remove conflict after merge
|
@ -135,6 +135,12 @@
|
|||
request: bool (default: true), // enable set name
|
||||
label: string (default: "Guest") // postfix for user name
|
||||
},
|
||||
review: {
|
||||
hideReviewDisplay: false // hide button Review mode,
|
||||
showReviewChanges: false,
|
||||
reviewDisplay: 'original',
|
||||
trackChanges: undefined // true/false - open editor with track changes mode on/off,
|
||||
},
|
||||
chat: true,
|
||||
comments: true,
|
||||
zoom: 100,
|
||||
|
@ -147,12 +153,12 @@
|
|||
autosave: true,
|
||||
forcesave: false,
|
||||
commentAuthorOnly: false, // must be deprecated. use permissions.editCommentAuthorOnly and permissions.deleteCommentAuthorOnly instead
|
||||
showReviewChanges: false,
|
||||
showReviewChanges: false, // must be deprecated. use customization.review.showReviewChanges instead
|
||||
help: true,
|
||||
compactHeader: false,
|
||||
toolbarNoTabs: false,
|
||||
toolbarHideFileName: false,
|
||||
reviewDisplay: 'original',
|
||||
reviewDisplay: 'original', // must be deprecated. use customization.review.reviewDisplay instead
|
||||
spellcheck: true,
|
||||
compatibleFeatures: false,
|
||||
unit: 'cm' // cm, pt, inch,
|
||||
|
@ -160,7 +166,7 @@
|
|||
macros: true // can run macros in document
|
||||
plugins: true // can run plugins in document
|
||||
macrosMode: 'warn' // warn about automatic macros, 'enable', 'disable', 'warn',
|
||||
trackChanges: undefined // true/false - open editor with track changes mode on/off,
|
||||
trackChanges: undefined // true/false - open editor with track changes mode on/off, // must be deprecated. use customization.review.trackChanges instead
|
||||
hideRulers: false // hide or show rulers on first loading (presentation or document editor)
|
||||
hideNotes: false // hide or show notes panel on first loading (presentation editor)
|
||||
uiTheme: 'theme-dark' // set interface theme: id or default-dark/default-light
|
||||
|
@ -893,16 +899,16 @@
|
|||
|
||||
if (config.editorConfig && config.editorConfig.targetApp!=='desktop') {
|
||||
if ( (typeof(config.editorConfig.customization) == 'object') && config.editorConfig.customization.loaderName) {
|
||||
if (config.editorConfig.customization.loaderName !== 'none') params += "&customer=" + config.editorConfig.customization.loaderName;
|
||||
if (config.editorConfig.customization.loaderName !== 'none') params += "&customer=" + encodeURIComponent(config.editorConfig.customization.loaderName);
|
||||
} else
|
||||
params += "&customer={{APP_CUSTOMER_NAME}}";
|
||||
if ( (typeof(config.editorConfig.customization) == 'object') && config.editorConfig.customization.loaderLogo) {
|
||||
if (config.editorConfig.customization.loaderLogo !== '') params += "&logo=" + config.editorConfig.customization.loaderLogo;
|
||||
if (config.editorConfig.customization.loaderLogo !== '') params += "&logo=" + encodeURIComponent(config.editorConfig.customization.loaderLogo);
|
||||
} else if ( (typeof(config.editorConfig.customization) == 'object') && config.editorConfig.customization.logo) {
|
||||
if (config.type=='embedded' && config.editorConfig.customization.logo.imageEmbedded)
|
||||
params += "&headerlogo=" + config.editorConfig.customization.logo.imageEmbedded;
|
||||
params += "&headerlogo=" + encodeURIComponent(config.editorConfig.customization.logo.imageEmbedded);
|
||||
else if (config.type!='embedded' && config.editorConfig.customization.logo.image)
|
||||
params += "&headerlogo=" + config.editorConfig.customization.logo.image;
|
||||
params += "&headerlogo=" + encodeURIComponent(config.editorConfig.customization.logo.image);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -69,7 +69,7 @@ Common.IrregularStack = function(config) {
|
|||
}
|
||||
|
||||
var _get = function(obj) {
|
||||
var index = _indexOf(obj, _weakCompare);
|
||||
var index = (typeof obj === 'object')? _indexOf(obj, _weakCompare) : obj;
|
||||
if (index != -1)
|
||||
return _stack[index];
|
||||
return undefined;
|
||||
|
@ -79,10 +79,15 @@ Common.IrregularStack = function(config) {
|
|||
return !(_indexOf(obj, _strongCompare) < 0);
|
||||
}
|
||||
|
||||
var _length = function() {
|
||||
return _stack.length;
|
||||
}
|
||||
|
||||
return {
|
||||
push: _push,
|
||||
pop: _pop,
|
||||
get: _get,
|
||||
exist: _exist
|
||||
exist: _exist,
|
||||
length: _length
|
||||
}
|
||||
};
|
|
@ -39,7 +39,8 @@ Common.Locale = new(function() {
|
|||
var l10n = null;
|
||||
var loadcallback,
|
||||
apply = false,
|
||||
currentLang = 'en';
|
||||
defLang = '{{DEFAULT_LANG}}',
|
||||
currentLang = defLang;
|
||||
|
||||
var _applyLocalization = function(callback) {
|
||||
try {
|
||||
|
@ -83,7 +84,11 @@ Common.Locale = new(function() {
|
|||
};
|
||||
|
||||
var _getCurrentLanguage = function() {
|
||||
return (currentLang || 'en');
|
||||
return currentLang;
|
||||
};
|
||||
|
||||
var _getLoadedLanguage = function() {
|
||||
return loadedLang;
|
||||
};
|
||||
|
||||
var _getUrlParameterByName = function(name) {
|
||||
|
@ -94,23 +99,26 @@ Common.Locale = new(function() {
|
|||
};
|
||||
|
||||
var _requireLang = function () {
|
||||
var lang = (_getUrlParameterByName('lang') || 'en').split(/[\-_]/)[0];
|
||||
var lang = (_getUrlParameterByName('lang') || defLang).split(/[\-_]/)[0];
|
||||
currentLang = lang;
|
||||
fetch('locale/' + lang + '.json')
|
||||
.then(function(response) {
|
||||
if (!response.ok) {
|
||||
currentLang = 'en';
|
||||
if (lang != 'en')
|
||||
currentLang = defLang;
|
||||
if (lang != defLang)
|
||||
/* load default lang if fetch failed */
|
||||
return fetch('locale/en.json');
|
||||
return fetch('locale/' + defLang + '.json');
|
||||
|
||||
throw new Error('server error');
|
||||
}
|
||||
return response.json();
|
||||
}).then(function(response) {
|
||||
if ( response.then )
|
||||
if ( response.json ) {
|
||||
if (!response.ok)
|
||||
throw new Error('server error');
|
||||
|
||||
return response.json();
|
||||
else {
|
||||
} else {
|
||||
l10n = response;
|
||||
/* to break promises chain */
|
||||
throw new Error('loaded');
|
||||
|
@ -122,8 +130,10 @@ Common.Locale = new(function() {
|
|||
l10n = l10n || {};
|
||||
apply && _applyLocalization();
|
||||
if ( e.message == 'loaded' ) {
|
||||
} else
|
||||
} else {
|
||||
currentLang = null;
|
||||
console.log('fetch error: ' + e);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
@ -194,7 +194,7 @@ define([
|
|||
'<% } %>';
|
||||
|
||||
var templateHugeCaption =
|
||||
'<button type="button" class="btn <%= cls %>" id="<%= id %>" > ' +
|
||||
'<button type="button" class="btn <%= cls %>" id="<%= id %>" data-hint="<%= dataHint %>" data-hint-direction="<%= dataHintDirection %>" data-hint-offset="<%= dataHintOffset %>" <% if (dataHintTitle) { %> data-hint-title="<%= dataHintTitle %>" <% } %>> ' +
|
||||
'<div class="inner-box-icon">' +
|
||||
templateBtnIcon +
|
||||
'</div>' +
|
||||
|
@ -205,7 +205,7 @@ define([
|
|||
|
||||
var templateHugeMenuCaption =
|
||||
'<div class="btn-group icon-top" id="<%= id %>" style="<%= style %>">' +
|
||||
'<button type="button" class="btn dropdown-toggle <%= cls %>" data-toggle="dropdown">' +
|
||||
'<button type="button" class="btn dropdown-toggle <%= cls %>" data-toggle="dropdown" data-hint="<%= dataHint %>" data-hint-direction="<%= dataHintDirection %>" data-hint-offset="<%= dataHintOffset %>" <% if (dataHintTitle) { %> data-hint-title="<%= dataHintTitle %>" <% } %>>' +
|
||||
'<div class="inner-box-icon">' +
|
||||
templateBtnIcon +
|
||||
'</div>' +
|
||||
|
@ -223,7 +223,7 @@ define([
|
|||
templateBtnIcon +
|
||||
'</span>' +
|
||||
'</button>' +
|
||||
'<button type="button" class="btn <%= cls %> inner-box-caption dropdown-toggle" data-toggle="dropdown">' +
|
||||
'<button type="button" class="btn <%= cls %> inner-box-caption dropdown-toggle" data-toggle="dropdown" data-hint="<%= dataHint %>" data-hint-direction="<%= dataHintDirection %>" data-hint-offset="<%= dataHintOffset %>" <% if (dataHintTitle) { %> data-hint-title="<%= dataHintTitle %>" <% } %>>' +
|
||||
'<span class="btn-fixflex-vcenter">' +
|
||||
'<span class="caption"><%= caption %></span>' +
|
||||
'<i class="caret"></i>' +
|
||||
|
@ -245,7 +245,10 @@ define([
|
|||
disabled : false,
|
||||
pressed : false,
|
||||
split : false,
|
||||
visible : true
|
||||
visible : true,
|
||||
dataHint : '',
|
||||
dataHintDirection: '',
|
||||
dataHintOffset: '0, 0'
|
||||
},
|
||||
|
||||
template: _.template([
|
||||
|
@ -261,13 +264,13 @@ define([
|
|||
'}} %>',
|
||||
'<% } %>',
|
||||
'<% if ( !menu ) { %>',
|
||||
'<button type="button" class="btn <%= cls %>" id="<%= id %>" style="<%= style %>">',
|
||||
'<button type="button" class="btn <%= cls %>" id="<%= id %>" style="<%= style %>" data-hint="<%= dataHint %>" data-hint-direction="<%= dataHintDirection %>" data-hint-offset="<%= dataHintOffset %>" <% if (dataHintTitle) { %> data-hint-title="<%= dataHintTitle %>" <% } %>>',
|
||||
'<% applyicon() %>',
|
||||
'<span class="caption"><%= caption %></span>',
|
||||
'</button>',
|
||||
'<% } else if (split == false) {%>',
|
||||
'<div class="btn-group" id="<%= id %>" style="<%= style %>">',
|
||||
'<button type="button" class="btn dropdown-toggle <%= cls %>" data-toggle="dropdown">',
|
||||
'<button type="button" class="btn dropdown-toggle <%= cls %>" data-toggle="dropdown" data-hint="<%= dataHint %>" data-hint-direction="<%= dataHintDirection %>" data-hint-offset="<%= dataHintOffset %>" <% if (dataHintTitle) { %> data-hint-title="<%= dataHintTitle %>" <% } %>>',
|
||||
'<% applyicon() %>',
|
||||
'<span class="caption"><%= caption %></span>',
|
||||
'<span class="inner-box-caret">' +
|
||||
|
@ -281,7 +284,7 @@ define([
|
|||
'<% applyicon() %>',
|
||||
'<span class="caption"><%= caption %></span>',
|
||||
'</button>',
|
||||
'<button type="button" class="btn <%= cls %> dropdown-toggle" data-toggle="dropdown">',
|
||||
'<button type="button" class="btn <%= cls %> dropdown-toggle" data-toggle="dropdown" data-hint="<%= dataHint %>" data-hint-direction="<%= dataHintDirection %>" data-hint-offset="<%= dataHintOffset %>" <% if (dataHintTitle) { %> data-hint-title="<%= dataHintTitle %>" <% } %>>',
|
||||
'<i class="caret"></i>',
|
||||
'<span class="sr-only"></span>',
|
||||
'</button>',
|
||||
|
@ -350,7 +353,11 @@ define([
|
|||
disabled : me.disabled,
|
||||
pressed : me.pressed,
|
||||
caption : me.caption,
|
||||
style : me.style
|
||||
style : me.style,
|
||||
dataHint : me.options.dataHint,
|
||||
dataHintDirection: me.options.dataHintDirection,
|
||||
dataHintOffset: me.options.dataHintOffset,
|
||||
dataHintTitle: me.options.dataHintTitle
|
||||
}));
|
||||
|
||||
if (me.menu && _.isObject(me.menu) && _.isFunction(me.menu.render))
|
||||
|
|
|
@ -95,7 +95,7 @@ define([
|
|||
value : 'unchecked',
|
||||
|
||||
template : _.template('<label class="checkbox-indeterminate"><input id="<%= id %>" type="checkbox" class="checkbox__native">' +
|
||||
'<label for="<%= id %>" class="checkbox__shape"></label><span></span></label>'),
|
||||
'<label for="<%= id %>" class="checkbox__shape" data-hint="<%= dataHint %>" data-hint-direction="<%= dataHintDirection %>" data-hint-offset="<%= dataHintOffset %>"></label><span></span></label>'),
|
||||
|
||||
initialize : function(options) {
|
||||
Common.UI.BaseView.prototype.initialize.call(this, options);
|
||||
|
@ -108,7 +108,10 @@ define([
|
|||
var me = this;
|
||||
if (!me.rendered) {
|
||||
var elem = this.template({
|
||||
id: Common.UI.getId('chb-')
|
||||
id: Common.UI.getId('chb-'),
|
||||
dataHint: me.options.dataHint,
|
||||
dataHintDirection: me.options.dataHintDirection,
|
||||
dataHintOffset: me.options.dataHintOffset
|
||||
});
|
||||
if (parentEl) {
|
||||
this.setElement(parentEl, false);
|
||||
|
|
|
@ -39,7 +39,191 @@ define([
|
|||
], function () {
|
||||
'use strict';
|
||||
|
||||
Common.UI.ColorButton = Common.UI.Button.extend(_.extend({
|
||||
Common.UI.ButtonColored = Common.UI.Button.extend(_.extend({
|
||||
render: function(parentEl) {
|
||||
Common.UI.Button.prototype.render.call(this, parentEl);
|
||||
|
||||
$('button:first-child', this.cmpEl).append( $('<div class="btn-color-value-line"></div>'));
|
||||
this.colorEl = this.cmpEl.find('.btn-color-value-line');
|
||||
|
||||
if (this.options.auto)
|
||||
this.autocolor = (typeof this.options.auto == 'object') ? this.options.auto.color || '000000' : '000000';
|
||||
|
||||
if (this.options.color!==undefined)
|
||||
this.setColor(this.options.color);
|
||||
},
|
||||
|
||||
getPicker: function(color, colors) {
|
||||
if (!this.colorPicker) {
|
||||
this.colorPicker = new Common.UI.ThemeColorPalette({
|
||||
el: this.cmpEl.find('#' + this.menu.id + '-color-menu'),
|
||||
transparent: this.options.transparent,
|
||||
value: color,
|
||||
colors: colors,
|
||||
parentButton: this
|
||||
});
|
||||
this.colorPicker.on('select', _.bind(this.onColorSelect, this));
|
||||
this.cmpEl.find('#' + this.menu.id + '-color-new').on('click', _.bind(this.addNewColor, this));
|
||||
if (this.options.auto) {
|
||||
this.cmpEl.find('#' + this.menu.id + '-color-auto').on('click', _.bind(this.onAutoColorSelect, this));
|
||||
this.colorAuto = this.cmpEl.find('#' + this.menu.id + '-color-auto > a');
|
||||
(color == 'auto') && this.setAutoColor(true);
|
||||
}
|
||||
}
|
||||
return this.colorPicker;
|
||||
},
|
||||
|
||||
setPicker: function(picker) {
|
||||
this.colorPicker = picker;
|
||||
},
|
||||
|
||||
getMenu: function(options) {
|
||||
if (typeof this.menu !== 'object') {
|
||||
options = options || this.options;
|
||||
var height = options.paletteHeight || 240,
|
||||
id = Common.UI.getId(),
|
||||
auto = [];
|
||||
if (options.auto) {
|
||||
this.autocolor = (typeof options.auto == 'object') ? options.auto.color || '000000' : '000000';
|
||||
auto.push({
|
||||
id: id + '-color-auto',
|
||||
caption: (typeof options.auto == 'object') ? options.auto.caption || this.textAutoColor : this.textAutoColor,
|
||||
template: _.template('<a tabindex="-1" type="menuitem"><span class="menu-item-icon color-auto" style="background-image: none; width: 12px; height: 12px; margin: 1px 7px 0 1px; background-color: #' + this.autocolor + ';"></span><%= caption %></a>')
|
||||
});
|
||||
auto.push({caption: '--'});
|
||||
}
|
||||
|
||||
var menu = new Common.UI.Menu({
|
||||
id: id,
|
||||
cls: 'shifted-left',
|
||||
additionalAlign: options.additionalAlign,
|
||||
items: (options.additionalItems ? options.additionalItems : []).concat(auto).concat([
|
||||
{ template: _.template('<div id="' + id + '-color-menu" style="width: 169px; height:' + height + 'px; margin: 10px;"></div>') },
|
||||
{
|
||||
id: id + '-color-new',
|
||||
template: _.template('<a tabindex="-1" type="menuitem" style="">' + this.textNewColor + '</a>')
|
||||
}
|
||||
])
|
||||
});
|
||||
this.colorPicker && (this.colorPicker.parentButton = menu);
|
||||
var me = this;
|
||||
menu.on('keydown:before', _.bind(this.onBeforeKeyDown, this));
|
||||
menu.on('show:after', function(menu) {
|
||||
me.colorPicker && _.delay(function() {
|
||||
me.colorPicker.showLastSelected();
|
||||
!(options.additionalItems || options.auto) && me.colorPicker.focus();
|
||||
}, 10);
|
||||
}).on('hide:after', function() {
|
||||
if (me.options.takeFocusOnClose) {
|
||||
setTimeout(function(){me.focus();}, 1);
|
||||
}
|
||||
});
|
||||
return menu;
|
||||
}
|
||||
return this.menu;
|
||||
},
|
||||
|
||||
setMenu: function (m) {
|
||||
m = m || this.getMenu();
|
||||
Common.UI.Button.prototype.setMenu.call(this, m);
|
||||
this.getPicker(this.options.color, this.options.colors);
|
||||
},
|
||||
|
||||
onColorSelect: function(picker, color) {
|
||||
this.setColor(color);
|
||||
this.setAutoColor(false);
|
||||
this.trigger('color:select', this, color);
|
||||
},
|
||||
|
||||
setColor: function(color) {
|
||||
if (color == 'auto' && this.options.auto)
|
||||
color = this.autocolor;
|
||||
this.color = color;
|
||||
|
||||
if (this.colorEl) {
|
||||
this.colorEl.css({'background-color': (color=='transparent') ? color : ((typeof(color) == 'object') ? '#'+color.color : '#'+color)});
|
||||
this.colorEl.toggleClass('bordered', color=='transparent');
|
||||
}
|
||||
},
|
||||
|
||||
setAutoColor: function(selected) {
|
||||
if (!this.colorAuto) return;
|
||||
if (selected && !this.colorAuto.hasClass('selected'))
|
||||
this.colorAuto.addClass('selected');
|
||||
else if (!selected && this.colorAuto.hasClass('selected'))
|
||||
this.colorAuto.removeClass('selected');
|
||||
},
|
||||
|
||||
isAutoColor: function() {
|
||||
return this.colorAuto && this.colorAuto.hasClass('selected');
|
||||
},
|
||||
|
||||
onAutoColorSelect: function() {
|
||||
this.setColor('auto');
|
||||
this.setAutoColor(true);
|
||||
this.colorPicker && this.colorPicker.clearSelection();
|
||||
this.trigger('auto:select', this, this.autocolor);
|
||||
},
|
||||
|
||||
addNewColor: function() {
|
||||
this.colorPicker && this.colorPicker.addNewColor((typeof(this.color) == 'object') ? this.color.color : this.color);
|
||||
},
|
||||
|
||||
onBeforeKeyDown: function(menu, e) {
|
||||
if ((e.keyCode == Common.UI.Keys.DOWN || e.keyCode == Common.UI.Keys.SPACE) && !this.isMenuOpen()) {
|
||||
$('button', this.cmpEl).click();
|
||||
return false;
|
||||
}
|
||||
if (e.keyCode == Common.UI.Keys.RETURN) {
|
||||
var li = $(e.target).closest('li');
|
||||
if (li.length>0) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
li.click();
|
||||
}
|
||||
Common.UI.Menu.Manager.hideAll();
|
||||
} else if (e.namespace!=="after.bs.dropdown" && (e.keyCode == Common.UI.Keys.DOWN || e.keyCode == Common.UI.Keys.UP)) {
|
||||
var $items = $('> [role=menu] > li:not(.divider):not(.disabled):visible', menu.$el).find('> a');
|
||||
if (!$items.length) return;
|
||||
var index = $items.index($items.filter(':focus')),
|
||||
me = this,
|
||||
pickerIndex = $items.length-1 ;
|
||||
if (e.keyCode == Common.UI.Keys.DOWN && (index==pickerIndex-1 || pickerIndex==0) || e.keyCode == Common.UI.Keys.UP && index==pickerIndex) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
_.delay(function() {
|
||||
me.focusInner(e);
|
||||
}, 10);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
isMenuOpen: function() {
|
||||
return this.cmpEl.hasClass('open');
|
||||
},
|
||||
|
||||
focusInner: function(e) {
|
||||
if (!this.colorPicker) return;
|
||||
|
||||
this.colorPicker.focus(e.keyCode == Common.UI.Keys.DOWN ? 'first' : 'last');
|
||||
},
|
||||
|
||||
focusOuter: function(e) {
|
||||
if (!this.menu) return;
|
||||
|
||||
var $items = $('> [role=menu] > li:not(.divider):not(.disabled):visible', this.menu.$el).find('> a');
|
||||
if (!$items.length) return;
|
||||
|
||||
$items.eq(e.keyCode == Common.UI.Keys.UP ? $items.length-2 : $items.length-1).focus();
|
||||
},
|
||||
|
||||
textNewColor: 'Add New Custom Color',
|
||||
textAutoColor: 'Automatic'
|
||||
|
||||
}, Common.UI.ButtonColored || {}));
|
||||
|
||||
|
||||
Common.UI.ColorButton = Common.UI.ButtonColored.extend(_.extend({
|
||||
options : {
|
||||
id : null,
|
||||
hint : false,
|
||||
|
@ -58,7 +242,7 @@ define([
|
|||
|
||||
template: _.template([
|
||||
'<div class="btn-group" id="<%= id %>">',
|
||||
'<button type="button" class="btn btn-color dropdown-toggle <%= cls %>" data-toggle="dropdown" style="<%= style %>">',
|
||||
'<button type="button" class="btn btn-color dropdown-toggle <%= cls %>" data-toggle="dropdown" style="<%= style %>" data-hint="<%= dataHint %>" data-hint-direction="<%= dataHintDirection %>" data-hint-offset="<%= dataHintOffset %>">',
|
||||
'<span> </span>',
|
||||
'<span class="inner-box-caret">',
|
||||
'<i class="caret"></i>',
|
||||
|
@ -90,12 +274,6 @@ define([
|
|||
this.setColor(this.options.color);
|
||||
},
|
||||
|
||||
onColorSelect: function(picker, color) {
|
||||
this.setColor(color);
|
||||
this.setAutoColor(false);
|
||||
this.trigger('color:select', this, color);
|
||||
},
|
||||
|
||||
setColor: function(color) {
|
||||
if (color == 'auto' && this.options.auto)
|
||||
color = this.autocolor;
|
||||
|
@ -106,105 +284,9 @@ define([
|
|||
span.css({'background-color': (color=='transparent') ? color : ((typeof(color) == 'object') ? '#'+color.color : '#'+color)});
|
||||
},
|
||||
|
||||
getPicker: function(color, colors) {
|
||||
if (!this.colorPicker) {
|
||||
this.colorPicker = new Common.UI.ThemeColorPalette({
|
||||
el: this.cmpEl.find('#' + this.menu.id + '-color-menu'),
|
||||
transparent: this.options.transparent,
|
||||
value: color,
|
||||
colors: colors
|
||||
});
|
||||
this.colorPicker.on('select', _.bind(this.onColorSelect, this));
|
||||
this.cmpEl.find('#' + this.menu.id + '-color-new').on('click', _.bind(this.addNewColor, this));
|
||||
if (this.options.auto) {
|
||||
this.cmpEl.find('#' + this.menu.id + '-color-auto').on('click', _.bind(this.onAutoColorSelect, this));
|
||||
this.colorAuto = this.cmpEl.find('#' + this.menu.id + '-color-auto > a');
|
||||
(color == 'auto') && this.setAutoColor(true);
|
||||
focus: function() {
|
||||
$('button', this.cmpEl).focus();
|
||||
}
|
||||
}
|
||||
return this.colorPicker;
|
||||
},
|
||||
|
||||
getMenu: function(options) {
|
||||
if (typeof this.menu !== 'object') {
|
||||
options = options || this.options;
|
||||
var height = options.paletteHeight || 216,
|
||||
id = Common.UI.getId(),
|
||||
auto = [];
|
||||
if (options.auto) {
|
||||
this.autocolor = (typeof options.auto == 'object') ? options.auto.color || '000000' : '000000';
|
||||
auto.push({
|
||||
id: id + '-color-auto',
|
||||
caption: (typeof options.auto == 'object') ? options.auto.caption || this.textAutoColor : this.textAutoColor,
|
||||
template: _.template('<a tabindex="-1" type="menuitem"><span class="menu-item-icon color-auto" style="background-image: none; width: 12px; height: 12px; margin: 1px 7px 0 1px; background-color: #' + this.autocolor + ';"></span><%= caption %></a>')
|
||||
});
|
||||
auto.push({caption: '--'});
|
||||
}
|
||||
|
||||
var menu = new Common.UI.Menu({
|
||||
id: id,
|
||||
cls: 'shifted-left',
|
||||
additionalAlign: options.additionalAlign,
|
||||
items: (options.additionalItems ? options.additionalItems : []).concat(auto).concat([
|
||||
{ template: _.template('<div id="' + id + '-color-menu" style="width: 169px; height:' + height + 'px; margin: 10px;"></div>') },
|
||||
{ template: _.template('<a id="' + id + '-color-new" style="">' + this.textNewColor + '</a>') }
|
||||
])
|
||||
});
|
||||
return menu;
|
||||
}
|
||||
return this.menu;
|
||||
},
|
||||
|
||||
setMenu: function (m) {
|
||||
m = m || this.getMenu();
|
||||
Common.UI.Button.prototype.setMenu.call(this, m);
|
||||
this.getPicker(this.options.color, this.options.colors);
|
||||
},
|
||||
|
||||
addNewColor: function() {
|
||||
this.colorPicker && this.colorPicker.addNewColor((typeof(this.color) == 'object') ? this.color.color : this.color);
|
||||
},
|
||||
|
||||
onAutoColorSelect: function() {
|
||||
this.setColor('auto');
|
||||
this.setAutoColor(true);
|
||||
this.colorPicker && this.colorPicker.clearSelection();
|
||||
this.trigger('auto:select', this, this.autocolor);
|
||||
},
|
||||
|
||||
setAutoColor: function(selected) {
|
||||
if (!this.colorAuto) return;
|
||||
if (selected && !this.colorAuto.hasClass('selected'))
|
||||
this.colorAuto.addClass('selected');
|
||||
else if (!selected && this.colorAuto.hasClass('selected'))
|
||||
this.colorAuto.removeClass('selected');
|
||||
},
|
||||
|
||||
isAutoColor: function() {
|
||||
return this.colorAuto && this.colorAuto.hasClass('selected');
|
||||
},
|
||||
|
||||
textNewColor: 'Add New Custom Color',
|
||||
textAutoColor: 'Automatic'
|
||||
|
||||
}, Common.UI.ColorButton || {}));
|
||||
|
||||
|
||||
Common.UI.ButtonColored = Common.UI.Button.extend(_.extend({
|
||||
render: function(parentEl) {
|
||||
Common.UI.Button.prototype.render.call(this, parentEl);
|
||||
|
||||
$('button:first-child', this.cmpEl).append( $('<div class="btn-color-value-line"></div>'));
|
||||
this.colorEl = this.cmpEl.find('.btn-color-value-line');
|
||||
},
|
||||
|
||||
setColor: function(color) {
|
||||
if (this.colorEl) {
|
||||
this.colorEl.css({'background-color': (color=='transparent') ? color : ((typeof(color) == 'object') ? '#'+color.color : '#'+color)});
|
||||
this.colorEl.toggleClass('bordered', color=='transparent');
|
||||
}
|
||||
}
|
||||
|
||||
}, Common.UI.ButtonColored || {}));
|
||||
|
||||
});
|
|
@ -77,7 +77,7 @@ define([
|
|||
Common.UI.ComboBorderSize = Common.UI.ComboBox.extend(_.extend({
|
||||
template: _.template([
|
||||
'<div class="input-group combobox combo-border-size input-group-nr <%= cls %>" id="<%= id %>" style="<%= style %>">',
|
||||
'<div class="form-control" style="<%= style %>">',
|
||||
'<div class="form-control" style="<%= style %>" data-hint="<%= dataHint %>" data-hint-direction="<%= dataHintDirection %>" data-hint-offset="<%= dataHintOffset %>">',
|
||||
'<i class="image"></i>',
|
||||
'<span class="text"></span>',
|
||||
'</div>',
|
||||
|
@ -122,6 +122,7 @@ define([
|
|||
|
||||
render : function(parentEl) {
|
||||
Common.UI.ComboBox.prototype.render.call(this, parentEl);
|
||||
this._formControl = this.cmpEl.find('.form-control');
|
||||
return this;
|
||||
},
|
||||
|
||||
|
@ -172,13 +173,17 @@ define([
|
|||
}
|
||||
},
|
||||
|
||||
focus: function() {
|
||||
this._formControl && this._formControl.focus();
|
||||
},
|
||||
|
||||
txtNoBorders: 'No Borders'
|
||||
}, Common.UI.ComboBorderSize || {}));
|
||||
|
||||
Common.UI.ComboBorderSizeEditable = Common.UI.ComboBox.extend(_.extend({
|
||||
template: _.template([
|
||||
'<span class="input-group combobox combo-border-size input-group-nr <%= cls %>" id="<%= id %>" style="<%= style %>">',
|
||||
'<input type="text" class="form-control text">',
|
||||
'<input type="text" class="form-control text" data-hint="<%= dataHint %>" data-hint-direction="<%= dataHintDirection %>" data-hint-offset="<%= dataHintOffset %>">',
|
||||
'<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">',
|
||||
'<span class="caret"></span>',
|
||||
'</button>',
|
||||
|
@ -230,7 +235,7 @@ define([
|
|||
Common.UI.ComboBorderType = Common.UI.ComboBorderSize.extend(_.extend({
|
||||
template: _.template([
|
||||
'<div class="input-group combobox combo-border-size input-group-nr <%= cls %>" id="<%= id %>" style="<%= style %>">',
|
||||
'<div class="form-control" style="<%= style %>">',
|
||||
'<div class="form-control" style="<%= style %>" data-hint="<%= dataHint %>" data-hint-direction="<%= dataHintDirection %>" data-hint-offset="<%= dataHintOffset %>">',
|
||||
'<i class="image"></i>',
|
||||
'</div>',
|
||||
'<div style="display: table-cell;"></div>',
|
||||
|
|
|
@ -87,12 +87,15 @@ define([
|
|||
valueField : 'value',
|
||||
search : false,
|
||||
scrollAlwaysVisible: false,
|
||||
takeFocusOnClose: false
|
||||
takeFocusOnClose: false,
|
||||
dataHint: '',
|
||||
dataHintDirection: '',
|
||||
dataHintOffset: ''
|
||||
},
|
||||
|
||||
template: _.template([
|
||||
'<span class="input-group combobox <%= cls %>" id="<%= id %>" style="<%= style %>">',
|
||||
'<input type="text" class="form-control" spellcheck="false">',
|
||||
'<input type="text" class="form-control" spellcheck="false" data-hint="<%= dataHint %>" data-hint-direction="<%= dataHintDirection %>" data-hint-offset="<%= dataHintOffset %>">',
|
||||
'<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">',
|
||||
'<span class="caret"></span>',
|
||||
'</button>',
|
||||
|
@ -147,7 +150,10 @@ define([
|
|||
menuCls : this.menuCls,
|
||||
menuStyle : this.menuStyle,
|
||||
items : items,
|
||||
scope : me
|
||||
scope : me,
|
||||
dataHint : this.options.dataHint,
|
||||
dataHintDirection: this.options.dataHintDirection,
|
||||
dataHintOffset: this.options.dataHintOffset
|
||||
}));
|
||||
if (this.itemsTemplate)
|
||||
this.cmpEl.find('ul').html(
|
||||
|
|
|
@ -86,7 +86,7 @@ define([
|
|||
return {
|
||||
template: _.template([
|
||||
'<div class="input-group combobox fonts <%= cls %>" id="<%= id %>" style="<%= style %>">',
|
||||
'<input type="text" class="form-control" spellcheck="false"> ',
|
||||
'<input type="text" class="form-control" spellcheck="false" data-hint="<%= dataHint %>" data-hint-direction="<%= dataHintDirection %>"> ',
|
||||
'<div style="display: table-cell;"></div>',
|
||||
'<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button>',
|
||||
'<ul class="dropdown-menu <%= menuCls %>" style="<%= menuStyle %>" role="menu">',
|
||||
|
|
|
@ -60,7 +60,10 @@ define([
|
|||
beforeOpenHandler : null,
|
||||
additionalMenuItems : null,
|
||||
showLast: true,
|
||||
minWidth: -1
|
||||
minWidth: -1,
|
||||
dataHint: '',
|
||||
dataHintDirection: '',
|
||||
dataHintOffset: ''
|
||||
},
|
||||
|
||||
template: _.template([
|
||||
|
@ -110,7 +113,10 @@ define([
|
|||
items: [
|
||||
{template: _.template('<div class="menu-picker-container"></div>')}
|
||||
]
|
||||
})
|
||||
}),
|
||||
dataHint: this.options.dataHint,
|
||||
dataHintDirection: this.options.dataHintDirection,
|
||||
dataHintOffset: this.options.dataHintOffset
|
||||
});
|
||||
|
||||
if (this.options.additionalMenuItems != null) {
|
||||
|
|
|
@ -125,8 +125,11 @@ define([
|
|||
var me = this;
|
||||
|
||||
me.template = me.options.template || me.template;
|
||||
me.dataHint = me.options.dataHint || '';
|
||||
me.dataHintDirection = me.options.dataHintDirection || '';
|
||||
me.dataHintOffset = me.options.dataHintOffset || '';
|
||||
|
||||
me.listenTo(me.model, 'change', me.render);
|
||||
me.listenTo(me.model, 'change', this.model.get('skipRenderOnChange') ? me.onChange : me.render);
|
||||
me.listenTo(me.model, 'change:selected', me.onSelectChange);
|
||||
me.listenTo(me.model, 'remove', me.remove);
|
||||
},
|
||||
|
@ -140,6 +143,15 @@ define([
|
|||
el.html(this.template(this.model.toJSON()));
|
||||
el.addClass('item');
|
||||
el.toggleClass('selected', this.model.get('selected') && this.model.get('allowSelected'));
|
||||
|
||||
if (this.dataHint !== '') {
|
||||
el.attr('data-hint', this.dataHint);
|
||||
el.attr('data-hint-direction', this.dataHintDirection);
|
||||
el.attr('data-hint-offset', this.dataHintOffset);
|
||||
}
|
||||
if (!_.isUndefined(this.model.get('contentTarget')))
|
||||
el.attr('content-target', this.model.get('contentTarget'));
|
||||
|
||||
el.off('click dblclick contextmenu');
|
||||
el.on({ 'click': _.bind(this.onClick, this),
|
||||
'dblclick': _.bind(this.onDblClick, this),
|
||||
|
@ -185,6 +197,18 @@ define([
|
|||
|
||||
onSelectChange: function(model, selected) {
|
||||
this.trigger('select', this, model, selected);
|
||||
},
|
||||
|
||||
onChange: function () {
|
||||
if (_.isUndefined(this.model.id))
|
||||
return this;
|
||||
var el = this.$el || $(this.el);
|
||||
el.toggleClass('selected', this.model.get('selected') && this.model.get('allowSelected'));
|
||||
el.toggleClass('disabled', !!this.model.get('disabled'));
|
||||
|
||||
this.trigger('change', this, this.model);
|
||||
|
||||
return this;
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -232,6 +256,9 @@ define([
|
|||
me.store = me.options.store || new Common.UI.DataViewStore();
|
||||
me.groups = me.options.groups || null;
|
||||
me.itemTemplate = me.options.itemTemplate || null;
|
||||
me.itemDataHint = me.options.itemDataHint || '';
|
||||
me.itemDataHintDirection = me.options.itemDataHintDirection || '';
|
||||
me.itemDataHintOffset = me.options.itemDataHintOffset || '';
|
||||
me.multiSelect = me.options.multiSelect;
|
||||
me.handleSelect = me.options.handleSelect;
|
||||
me.parentMenu = me.options.parentMenu;
|
||||
|
@ -306,7 +333,8 @@ define([
|
|||
if (this.enableKeyEvents && this.parentMenu && this.handleSelect) {
|
||||
if (!me.showLast)
|
||||
this.parentMenu.on('show:before', function(menu) { me.deselectAll(); });
|
||||
this.parentMenu.on('show:after', function(menu) {
|
||||
this.parentMenu.on('show:after', function(menu, e) {
|
||||
if (e && (menu.el !== e.target)) return;
|
||||
if (me.showLast) me.showLastSelected();
|
||||
Common.NotificationCenter.trigger('dataview:focus');
|
||||
_.delay(function() {
|
||||
|
@ -400,7 +428,10 @@ define([
|
|||
onAddItem: function(record, store, opts) {
|
||||
var view = new Common.UI.DataViewItem({
|
||||
template: this.itemTemplate,
|
||||
model: record
|
||||
model: record,
|
||||
dataHint: this.itemDataHint,
|
||||
dataHintDirection: this.itemDataHintDirection,
|
||||
dataHintOffset: this.itemDataHintOffset
|
||||
});
|
||||
|
||||
if (view) {
|
||||
|
@ -476,7 +507,10 @@ define([
|
|||
}, this);
|
||||
this.dataViewItems = [];
|
||||
|
||||
this.store.each(this.onAddItem, this);
|
||||
var me = this;
|
||||
this.store.each(function(item){
|
||||
me.onAddItem(item, me.store);
|
||||
}, this);
|
||||
|
||||
if (this.allowScrollbar) {
|
||||
this.scroller = new Common.UI.Scroller({
|
||||
|
@ -790,7 +824,7 @@ define([
|
|||
'<div class="dataview inner" style="<%= style %>">',
|
||||
'<% _.each(items, function(item) { %>',
|
||||
'<% if (!item.id) item.id = Common.UI.getId(); %>',
|
||||
'<div class="item" <% if(!!item.tip) { %> data-toggle="tooltip" <% } %> ><%= itemTemplate(item) %></div>',
|
||||
'<div class="item" <% if(!!item.tip) { %> data-toggle="tooltip" <% } %> data-hint="<%= item.dataHint %>" data-hint-direction="<%= item.dataHintDirection %>" data-hint-offset="<%= item.dataHintOffset %>"><%= itemTemplate(item) %></div>',
|
||||
'<% }) %>',
|
||||
'</div>'
|
||||
].join('')),
|
||||
|
@ -952,7 +986,7 @@ define([
|
|||
var template = _.template([
|
||||
'<% _.each(items, function(item) { %>',
|
||||
'<% if (!item.id) item.id = Common.UI.getId(); %>',
|
||||
'<div class="item" <% if(!!item.tip) { %> data-toggle="tooltip" <% } %> ><%= itemTemplate(item) %></div>',
|
||||
'<div class="item" <% if(!!item.tip) { %> data-toggle="tooltip" <% } %> data-hint="<%= item.dataHint %>" data-hint-direction="<%= item.dataHintDirection %>" data-hint-offset="<%= item.dataHintOffset %>"><%= itemTemplate(item) %></div>',
|
||||
'<% }) %>'
|
||||
].join(''));
|
||||
this.cmpEl && this.cmpEl.find('.inner').html(template({
|
||||
|
|
512
apps/common/main/lib/component/HintManager.js
Normal file
|
@ -0,0 +1,512 @@
|
|||
/*
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2010-2021
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
|
||||
* street, Riga, Latvia, EU, LV-1050.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* HintManager.js
|
||||
*
|
||||
* Created by Julia Radzhabova on 21.04.2021
|
||||
* Copyright (c) 2021 Ascensio System SIA. All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Example usage with simple items:
|
||||
*
|
||||
* <button ... data-hint="1" data-hint-direction="right" data-hint-offset="big" data-hint-title="B">...</button>
|
||||
* <label ... data-hint="1" data-hint-direction="bottom" data-hint-offset="medium" data-hint-title="L">...</label>
|
||||
*
|
||||
* Example usage with components:
|
||||
*
|
||||
* new Common.UI.Button({
|
||||
* ...
|
||||
* dataHint: '1', // '0' - tabs in toolbar, left and right menu, statusbar;
|
||||
* // '1' - file menu, contents of toolbar tabs, contents of right and left panels
|
||||
* dataHintDirection: 'bottom', // top, bottom, right, left, left-top
|
||||
* dataHintOffset: 'small', // big - 6px, medium - 4px, small - 2px
|
||||
* dataHintTitle : 'S'
|
||||
* });
|
||||
*
|
||||
* new Common.UI.CheckBox({
|
||||
* ...
|
||||
* dataHint: '1',
|
||||
* dataHintDirection: 'left',
|
||||
* dataHintOffset: 'small'
|
||||
* });
|
||||
*
|
||||
* new Common.UI.ComboBox({
|
||||
* ...
|
||||
* dataHint: '1',
|
||||
* dataHintDirection: 'bottom',
|
||||
* dataHintOffset: 'big'
|
||||
* });
|
||||
*
|
||||
* new Common.UI.InputField({
|
||||
* ...
|
||||
* dataHint: '1',
|
||||
* dataHintDirection: 'left',
|
||||
* dataHintOffset: 'small'
|
||||
* });
|
||||
*
|
||||
* new Common.UI.MetricSpinner({
|
||||
* ...
|
||||
* dataHint: '1',
|
||||
* dataHintDirection: 'bottom',
|
||||
* dataHintOffset: 'big'
|
||||
* });
|
||||
*
|
||||
* new Common.UI.RadioBox({
|
||||
* ...
|
||||
* dataHint: '1',
|
||||
* dataHintDirection: 'left',
|
||||
* dataHintOffset: 'small'
|
||||
* });
|
||||
*/
|
||||
|
||||
|
||||
if (Common === undefined)
|
||||
var Common = {};
|
||||
|
||||
if (Common.UI === undefined) {
|
||||
Common.UI = {};
|
||||
}
|
||||
|
||||
Common.UI.HintManager = new(function() {
|
||||
var _lang = 'en',
|
||||
_arrAlphabet = [],
|
||||
_arrEnAlphabet = [],
|
||||
_arrQwerty = [],
|
||||
_arrEnQwerty = [],
|
||||
_isAlt = false,
|
||||
_hintVisible = false,
|
||||
_currentLevel = 0,
|
||||
_currentSection = document,
|
||||
_currentControls = [],
|
||||
_currentHints = [],
|
||||
_inputLetters = '',
|
||||
_isComplete = false,
|
||||
_isLockedKeyEvents = false,
|
||||
_inputTimer;
|
||||
|
||||
var _api;
|
||||
|
||||
var _setCurrentSection = function (btn) {
|
||||
if (btn === 'esc') {
|
||||
if (_currentLevel === 0) {
|
||||
_currentSection = document;
|
||||
}
|
||||
return;
|
||||
}
|
||||
if ($('#file-menu-panel').is(':visible')) {
|
||||
_currentSection = $('#file-menu-panel');
|
||||
} else {
|
||||
_currentSection = (btn && btn.closest('.hint-section')) || document;
|
||||
}
|
||||
};
|
||||
|
||||
var _lockedKeyEvents = function (isLocked) {
|
||||
if (_api) {
|
||||
_isLockedKeyEvents = isLocked;
|
||||
_api.asc_enableKeyEvents(!isLocked);
|
||||
}
|
||||
};
|
||||
|
||||
var _showHints = function () {
|
||||
_inputLetters = '';
|
||||
if (_currentHints.length === 0 || ($('#file-menu-panel').is(':visible') && _currentLevel === 1)) {
|
||||
_getHints();
|
||||
}
|
||||
if (_currentHints.length > 0) {
|
||||
!_isLockedKeyEvents && _lockedKeyEvents(true);
|
||||
_hintVisible = true;
|
||||
_currentHints.forEach(function(item) {
|
||||
item.show();
|
||||
});
|
||||
_inputTimer = setInterval(function () {
|
||||
if (_inputLetters.length > 0) {
|
||||
_inputLetters = '';
|
||||
}
|
||||
}, 5000);
|
||||
} else {
|
||||
_hintVisible = false;
|
||||
}
|
||||
};
|
||||
|
||||
var _hideHints = function() {
|
||||
_hintVisible = false;
|
||||
_currentHints && _currentHints.forEach(function(item) {
|
||||
item.hide()
|
||||
});
|
||||
clearInterval(_inputTimer);
|
||||
};
|
||||
|
||||
var _nextLevel = function() {
|
||||
_removeHints();
|
||||
_currentHints.length = 0;
|
||||
_currentControls.length = 0;
|
||||
_currentLevel++;
|
||||
};
|
||||
|
||||
var _prevLevel = function() {
|
||||
_removeHints();
|
||||
_currentHints.length = 0;
|
||||
_currentControls.length = 0;
|
||||
_currentLevel--;
|
||||
};
|
||||
|
||||
var _getLetters = function(countButtons) {
|
||||
var arr = _arrAlphabet.slice();
|
||||
arr[0] = _arrAlphabet[0] + _arrAlphabet[0];
|
||||
for (var i = 1; arr.length < countButtons; i++) {
|
||||
arr.push(_arrAlphabet[0] + _arrAlphabet[i]);
|
||||
}
|
||||
return arr;
|
||||
};
|
||||
|
||||
var _isItemDisabled = function (item) {
|
||||
return (item.hasClass('disabled') || item.parent().hasClass('disabled') || item.attr('disabled'));
|
||||
};
|
||||
|
||||
var _getControls = function() {
|
||||
_currentControls = [];
|
||||
var arr = $(_currentSection).find('[data-hint=' + (_currentLevel) + ']').toArray();
|
||||
var visibleItems = arr.filter(function (item) {
|
||||
return $(item).is(':visible');
|
||||
});
|
||||
var visibleItemsWithTitle = $(_currentSection).find('[data-hint-title][data-hint=' + (_currentLevel) + ']').toArray().filter(function (item) {
|
||||
return $(item).is(':visible');
|
||||
});
|
||||
if (visibleItems.length === visibleItemsWithTitle.length) { // all buttons have data-hint-title
|
||||
visibleItems.forEach(function (item) {
|
||||
var el = $(item);
|
||||
_currentControls.push(el);
|
||||
});
|
||||
return;
|
||||
}
|
||||
var _arrLetters = [];
|
||||
if (visibleItems.length > _arrAlphabet.length) {
|
||||
_arrLetters = _getLetters(visibleItems.length);
|
||||
} else {
|
||||
_arrLetters = _arrAlphabet.slice();
|
||||
}
|
||||
var usedLetters = [];
|
||||
if ($(_currentSection).find('[data-hint-title]').length > 0) {
|
||||
visibleItems.forEach(function (item) {
|
||||
var el = $(item);
|
||||
var title = el.attr('data-hint-title');
|
||||
if (title) {
|
||||
var ind = _arrEnAlphabet.indexOf(title.toLowerCase());
|
||||
if (ind === -1) { // we have already changed
|
||||
usedLetters.push(_arrAlphabet.indexOf(title.toLowerCase()));
|
||||
} else {
|
||||
usedLetters.push(ind);
|
||||
if (_lang !== 'en') {
|
||||
el.attr('data-hint-title', _arrLetters[ind].toUpperCase());
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
var index = 0;
|
||||
visibleItems.forEach(function (item) {
|
||||
var el = $(item);
|
||||
while (usedLetters.indexOf(index) !== -1) {
|
||||
index++;
|
||||
}
|
||||
var title = el.attr('data-hint-title');
|
||||
if (!title) {
|
||||
el.attr('data-hint-title', _arrLetters[index].toUpperCase());
|
||||
index++;
|
||||
}
|
||||
_currentControls.push(el);
|
||||
});
|
||||
};
|
||||
|
||||
var _getHints = function() {
|
||||
if (_currentControls.length === 0)
|
||||
_getControls();
|
||||
_currentControls.forEach(function(item, index) {
|
||||
if (!_isItemDisabled(item)) {
|
||||
if ($(_currentSection).prop('id') === 'toolbar' && ($(_currentSection).find('.toolbar-mask').length > 0 || item.closest('.group').find('.toolbar-group-mask').length > 0)) {
|
||||
return;
|
||||
}
|
||||
if (window.SSE && item.parent().prop('id') === 'statusbar_bottom') {
|
||||
var $statusbar = item.parent();
|
||||
if (item.offset().left > $statusbar.offset().left + $statusbar.width()) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
var hint = $('<div style="" class="hint-div">' + item.attr('data-hint-title') + '</div>');
|
||||
var direction = item.attr('data-hint-direction');
|
||||
// exceptions
|
||||
if (window.SSE && _currentSection.nodeType !== 9 &&
|
||||
_currentSection.prop('id') === 'toolbar' && item.closest('.panel').attr('data-tab') === 'data') {
|
||||
if (item.parent().hasClass('slot-sortdesc') || item.parent().hasClass('slot-btn-setfilter')) {
|
||||
direction = 'top';
|
||||
item.attr('data-hint-direction', 'top');
|
||||
} else if (item.parent().hasClass('slot-btn-clear-filter') || item.parent().hasClass('slot-sortasc')) {
|
||||
direction = 'bottom';
|
||||
item.attr('data-hint-direction', 'bottom');
|
||||
}
|
||||
}
|
||||
var offsets = item.attr('data-hint-offset');
|
||||
var applyOffset = offsets === 'big' ? 6 : (offsets === 'medium' ? 4 : (offsets === 'small' ? 2 : 0));
|
||||
if (applyOffset) {
|
||||
switch (direction) {
|
||||
case 'bottom':
|
||||
offsets = [-applyOffset, 0];
|
||||
break;
|
||||
case 'top':
|
||||
offsets = [applyOffset, 0];
|
||||
break;
|
||||
case 'right':
|
||||
offsets = [0, -applyOffset];
|
||||
break;
|
||||
case 'left':
|
||||
offsets = [0, applyOffset];
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
offsets = offsets ? item.attr('data-hint-offset').split(',').map(function (item) { return parseInt(item); }) : [0, 0];
|
||||
}
|
||||
var offset = item.offset();
|
||||
if (direction === 'left-top')
|
||||
hint.css({
|
||||
top: offset.top - 10 + offsets[0],
|
||||
left: offset.left - 10 + offsets[1]
|
||||
});
|
||||
else if (direction === 'top')
|
||||
hint.css({
|
||||
top: offset.top - 18 + offsets[0],
|
||||
left: offset.left + (item.outerWidth() - 18) / 2 + offsets[1]
|
||||
});
|
||||
else if (direction === 'right')
|
||||
hint.css({
|
||||
top: offset.top + (item.outerHeight() - 18) / 2 + offsets[0],
|
||||
left: offset.left + item.outerWidth() + offsets[1]
|
||||
});
|
||||
else if (direction === 'left')
|
||||
hint.css({
|
||||
top: offset.top + (item.outerHeight() - 18) / 2 + offsets[0],
|
||||
left: offset.left - 18 + offsets[1]
|
||||
});
|
||||
else
|
||||
hint.css({
|
||||
top: offset.top + item.outerHeight() + offsets[0],
|
||||
left: offset.left + (item.outerWidth() - 18) / 2 + offsets[1]
|
||||
});
|
||||
$(document.body).append(hint);
|
||||
|
||||
_currentHints.push(hint);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
var _removeHints = function() {
|
||||
_currentHints && _currentHints.forEach(function(item) {
|
||||
item.remove()
|
||||
});
|
||||
};
|
||||
|
||||
var _resetToDefault = function() {
|
||||
_currentLevel = $('#file-menu-panel').is(':visible') ? 1 : 0;
|
||||
_setCurrentSection();
|
||||
_currentHints.length = 0;
|
||||
_currentControls.length = 0;
|
||||
};
|
||||
|
||||
var _init = function(api) {
|
||||
_api = api;
|
||||
Common.NotificationCenter.on({
|
||||
'app:ready': function (mode) {
|
||||
_lang = mode.lang;
|
||||
_getAlphabetLetters();
|
||||
},
|
||||
'hints:clear': _clearHints
|
||||
});
|
||||
$('#editor_sdk').on('click', function () {
|
||||
_clearHints();
|
||||
});
|
||||
$(document).on('mousedown', function () {
|
||||
_clearHints();
|
||||
});
|
||||
$(document).on('keyup', function(e) {
|
||||
if (e.keyCode == Common.UI.Keys.ALT && _isAlt) {
|
||||
e.preventDefault();
|
||||
if (!_hintVisible) {
|
||||
$('input').blur(); // to change value in inputField
|
||||
_currentLevel = $('#file-menu-panel').is(':visible') ? 1 : 0;
|
||||
_setCurrentSection();
|
||||
_showHints();
|
||||
} else {
|
||||
_hideHints();
|
||||
_resetToDefault();
|
||||
if (_isLockedKeyEvents) {
|
||||
_isLockedKeyEvents = false;
|
||||
_api.asc_enableKeyEvents(true);
|
||||
}
|
||||
}
|
||||
} else if (_hintVisible) {
|
||||
e.preventDefault();
|
||||
}
|
||||
_isAlt = false;
|
||||
});
|
||||
$(document).on('keydown', function(e) {
|
||||
if (_hintVisible) {
|
||||
e.preventDefault();
|
||||
if (e.keyCode == Common.UI.Keys.ESC ) {
|
||||
if (_currentLevel === 0) {
|
||||
_hideHints();
|
||||
_lockedKeyEvents(false);
|
||||
} else {
|
||||
_prevLevel();
|
||||
_setCurrentSection('esc');
|
||||
_showHints();
|
||||
}
|
||||
} else {
|
||||
var curLetter = null;
|
||||
var keyCode = e.keyCode;
|
||||
if (keyCode !== 16 && keyCode !== 17 && keyCode !== 18 && keyCode !== 91) {
|
||||
curLetter = _lang === 'en' ? ((keyCode > 47 && keyCode < 58 || keyCode > 64 && keyCode < 91) ? String.fromCharCode(e.keyCode) : null) : e.key;
|
||||
}
|
||||
if (curLetter) {
|
||||
var curr;
|
||||
if (_lang !== 'en' && _arrAlphabet.indexOf(curLetter.toLowerCase()) === -1) {
|
||||
var ind = _arrEnQwerty.indexOf(curLetter.toLowerCase());
|
||||
if (ind !== -1) {
|
||||
curLetter = _arrQwerty[ind];
|
||||
}
|
||||
}
|
||||
_inputLetters = _inputLetters + curLetter.toUpperCase();
|
||||
for (var i = 0; i < _currentControls.length; i++) {
|
||||
var item = _currentControls[i];
|
||||
if (!_isItemDisabled(item) && item.attr('data-hint-title') === _inputLetters) {
|
||||
curr = item;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (curr) {
|
||||
var tag = curr.prop("tagName").toLowerCase();
|
||||
if (window.SSE && curr.parent().prop('id') === 'statusbar_bottom') {
|
||||
_hideHints();
|
||||
curr.contextmenu();
|
||||
_resetToDefault();
|
||||
} else if (tag === 'input' || tag === 'textarea') {
|
||||
_hideHints();
|
||||
curr.trigger(jQuery.Event('click', {which: 1}));
|
||||
curr.focus();
|
||||
_resetToDefault();
|
||||
} else {
|
||||
_isComplete = false;
|
||||
_hideHints();
|
||||
if ($(_currentSection).prop('id') === 'toolbar' && ($(_currentSection).find('.toolbar-mask').length > 0 || curr.closest('.group').find('.toolbar-group-mask').length > 0)) {
|
||||
_resetToDefault();
|
||||
return;
|
||||
}
|
||||
if (!curr.attr('content-target') || (curr.attr('content-target') && !$('#' + curr.attr('content-target')).is(':visible'))) { // need to open panel
|
||||
if (!($('#file-menu-panel').is(':visible') && (curr.parent().prop('id') === 'fm-btn-info' && $('#panel-info').is(':visible') ||
|
||||
curr.parent().prop('id') === 'fm-btn-settings' && $('#panel-settings').is(':visible')))) {
|
||||
if (curr.attr('for')) { // to trigger event in checkbox
|
||||
$('#' + curr.attr('for')).trigger(jQuery.Event('click', {which: 1}));
|
||||
} else {
|
||||
curr.trigger(jQuery.Event('click', {which: 1}));
|
||||
}
|
||||
}
|
||||
}
|
||||
if (curr.prop('id') === 'btn-goback' || curr.closest('.btn-slot').prop('id') === 'slot-btn-options' || curr.prop('id') === 'left-btn-thumbs') {
|
||||
_resetToDefault();
|
||||
return;
|
||||
}
|
||||
if (curr.prop('id') === 'add-comment-doc') {
|
||||
_removeHints();
|
||||
_currentHints.length = 0;
|
||||
_currentControls.length = 0;
|
||||
_showHints();
|
||||
return;
|
||||
}
|
||||
if (!_isComplete) {
|
||||
_nextLevel();
|
||||
_setCurrentSection(curr);
|
||||
_showHints();
|
||||
if (_currentHints.length < 1) {
|
||||
_resetToDefault();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_isAlt = (e.keyCode == Common.UI.Keys.ALT);
|
||||
});
|
||||
};
|
||||
|
||||
var _getAlphabetLetters = function () {
|
||||
Common.Utils.loadConfig('../../common/main/resources/alphabetletters/alphabetletters.json', function (langsJson) {
|
||||
_arrAlphabet = langsJson[_lang];
|
||||
_arrEnAlphabet = langsJson['en'];
|
||||
});
|
||||
Common.Utils.loadConfig('../../common/main/resources/alphabetletters/qwertyletters.json', function (langsJson) {
|
||||
_arrQwerty = langsJson[_lang];
|
||||
if (_lang !== 'en') {
|
||||
_arrEnQwerty = langsJson['en'];
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
var _needCloseFileMenu = function () {
|
||||
return !(_hintVisible && _currentLevel > 1);
|
||||
};
|
||||
|
||||
var _clearHints = function (isComplete) {
|
||||
_hintVisible && _hideHints();
|
||||
if (_currentHints.length > 0) {
|
||||
_resetToDefault();
|
||||
}
|
||||
_isLockedKeyEvents && _lockedKeyEvents(false);
|
||||
|
||||
if (isComplete) {
|
||||
_isComplete = true;
|
||||
}
|
||||
};
|
||||
|
||||
var _isHintVisible = function () {
|
||||
return _hintVisible;
|
||||
};
|
||||
|
||||
return {
|
||||
init: _init,
|
||||
clearHints: _clearHints,
|
||||
needCloseFileMenu: _needCloseFileMenu,
|
||||
isHintVisible: _isHintVisible
|
||||
}
|
||||
})();
|
|
@ -87,6 +87,9 @@ define([
|
|||
'class="form-control <%= cls %>" ',
|
||||
'placeholder="<%= placeHolder %>" ',
|
||||
'value="<%= value %>"',
|
||||
'data-hint="<%= dataHint %>"',
|
||||
'data-hint-direction="<%= dataHintDirection %>"',
|
||||
'data-hint-offset="<%= dataHintOffset %>"',
|
||||
'>',
|
||||
'<span class="input-error"></span>',
|
||||
'</div>'
|
||||
|
@ -135,6 +138,9 @@ define([
|
|||
name : this.name,
|
||||
placeHolder : this.placeHolder,
|
||||
spellcheck : this.spellcheck,
|
||||
dataHint : this.options.dataHint,
|
||||
dataHintDirection: this.options.dataHintDirection,
|
||||
dataHintOffset: this.options.dataHintOffset,
|
||||
scope : me
|
||||
}));
|
||||
|
||||
|
|
|
@ -102,13 +102,16 @@ define([
|
|||
toggleGroup : null,
|
||||
iconCls : '',
|
||||
menu : null,
|
||||
canFocused : true
|
||||
canFocused : true,
|
||||
dataHint : '',
|
||||
dataHintDirection: '',
|
||||
dataHintOffset: ''
|
||||
},
|
||||
|
||||
tagName : 'li',
|
||||
|
||||
template: _.template([
|
||||
'<a id="<%= id %>" style="<%= style %>" <% if(options.canFocused) { %> tabindex="-1" type="menuitem" <% }; if(!_.isUndefined(options.stopPropagation)) { %> data-stopPropagation="true" <% }; %> >',
|
||||
'<a id="<%= id %>" style="<%= style %>" <% if(options.canFocused) { %> tabindex="-1" type="menuitem" <% }; if(!_.isUndefined(options.stopPropagation)) { %> data-stopPropagation="true" <% }; if(!_.isUndefined(options.dataHint)) { %> data-hint="<%= options.dataHint %>" <% }; if(!_.isUndefined(options.dataHintDirection)) { %> data-hint-direction="<%= options.dataHintDirection %>" <% }; if(!_.isUndefined(options.dataHintOffset)) { %> data-hint-offset="<%= options.dataHintOffset %>" <% }; %> >',
|
||||
'<% if (!_.isEmpty(iconCls)) { %>',
|
||||
'<span class="menu-item-icon <%= iconCls %>"></span>',
|
||||
'<% } %>',
|
||||
|
|
|
@ -110,7 +110,10 @@ define([
|
|||
hold : true,
|
||||
speed : 'medium',
|
||||
width : 90,
|
||||
allowDecimal: true
|
||||
allowDecimal: true,
|
||||
dataHint : '',
|
||||
dataHintDirection: '',
|
||||
dataHintOffset: ''
|
||||
},
|
||||
|
||||
disabled : false,
|
||||
|
@ -118,7 +121,7 @@ define([
|
|||
rendered : false,
|
||||
|
||||
template :
|
||||
'<input type="text" class="form-control" spellcheck="false">' +
|
||||
'<input type="text" class="form-control" spellcheck="false" data-hint="<%= dataHint %>" data-hint-direction="<%= dataHintDirection %>" data-hint-offset="<%= dataHintOffset %>">' +
|
||||
'<div class="spinner-buttons">' +
|
||||
'<button type="button" class="spinner-up"><i class="arrow"></i></button>' +
|
||||
'<button type="button" class="spinner-down"><i class="arrow"></i></button>' +
|
||||
|
@ -185,7 +188,13 @@ define([
|
|||
|
||||
render: function () {
|
||||
var el = this.$el || $(this.el);
|
||||
el.html(this.template);
|
||||
|
||||
var template = _.template(this.template);
|
||||
el.html($(template({
|
||||
dataHint : this.options.dataHint,
|
||||
dataHintDirection: this.options.dataHintDirection,
|
||||
dataHintOffset : this.options.dataHintOffset
|
||||
})));
|
||||
|
||||
this.$input = el.find('.form-control');
|
||||
this.rendered = true;
|
||||
|
|
|
@ -100,7 +100,7 @@ define([
|
|||
'<li class="ribtab' +
|
||||
'<% if (items[i].haspanel===false) print(" x-lone") %>' +
|
||||
'<% if (items[i].extcls) print(\' \' + items[i].extcls) %>">' +
|
||||
'<a data-tab="<%= items[i].action %>" data-title="<%= items[i].caption %>"><%= items[i].caption %></a>' +
|
||||
'<a data-tab="<%= items[i].action %>" data-title="<%= items[i].caption %>" data-hint="0" data-hint-direction="bottom" data-hint-offset="small"><%= items[i].caption %></a>' +
|
||||
'</li>' +
|
||||
'<% } %>' +
|
||||
'<% } %>' +
|
||||
|
@ -316,7 +316,7 @@ define([
|
|||
return config.tabs[index].action;
|
||||
}
|
||||
|
||||
var _tabTemplate = _.template('<li class="ribtab" style="display: none;"><a data-tab="<%= action %>" data-title="<%= caption %>"><%= caption %></a></li>');
|
||||
var _tabTemplate = _.template('<li class="ribtab" style="display: none;"><a data-tab="<%= action %>" data-title="<%= caption %>" data-hint="0" data-hint-direction="bottom" data-hint-offset="small"><%= caption %></a></li>');
|
||||
|
||||
config.tabs[after + 1] = tab;
|
||||
var _after_action = _get_tab_action(after);
|
||||
|
|
|
@ -71,12 +71,16 @@ define([
|
|||
disabled : false,
|
||||
rendered : false,
|
||||
|
||||
template : _.template('<label class="radiobox"><input type="radio" name="<%= name %>" id="<%= id %>" class="button__radiobox">' +
|
||||
template : _.template('<label class="radiobox" data-hint="<%= dataHint %>" data-hint-direction="<%= dataHintDirection %>" data-hint-offset="<%= dataHintOffset %>"><input type="radio" name="<%= name %>" id="<%= id %>" class="button__radiobox">' +
|
||||
'<label for="<%= id %>" class="radiobox__shape"></label><span></span></label>'),
|
||||
|
||||
initialize : function(options) {
|
||||
Common.UI.BaseView.prototype.initialize.call(this, options);
|
||||
|
||||
this.dataHint = options.dataHint;
|
||||
this.dataHintDirection = options.dataHintDirection;
|
||||
this.dataHintOffset = options.dataHintOffset;
|
||||
|
||||
var me = this;
|
||||
|
||||
this.name = this.options.name || Common.UI.getId();
|
||||
|
@ -100,7 +104,10 @@ define([
|
|||
el.html(this.template({
|
||||
labelText: this.options.labelText,
|
||||
name: this.name,
|
||||
id: Common.UI.getId('rdb-')
|
||||
id: Common.UI.getId('rdb-'),
|
||||
dataHint: this.dataHint,
|
||||
dataHintDirection: this.dataHintDirection,
|
||||
dataHintOffset: this.dataHintOffset
|
||||
}));
|
||||
|
||||
this.$radio = el.find('input[type=radio]');
|
||||
|
|
|
@ -128,6 +128,9 @@ define([
|
|||
bottom = Common.Utils.innerHeight() - showxy.top - this.target.height()/2;
|
||||
} else if (pos == 'bottom') {
|
||||
top = showxy.top + this.target.height()/2;
|
||||
var height = this.cmpEl.height();
|
||||
if (top+height>Common.Utils.innerHeight())
|
||||
top = Common.Utils.innerHeight() - height - 10;
|
||||
} else if (pos == 'left') {
|
||||
right = Common.Utils.innerWidth() - showxy.left - this.target.width()/2;
|
||||
} else if (pos == 'right') {
|
||||
|
|
|
@ -671,6 +671,21 @@ define([
|
|||
}
|
||||
|
||||
return false;
|
||||
},
|
||||
|
||||
addDataHint: function (index) { //Hint Manager
|
||||
var oldHintTab = this.$bar.find('[data-hint]');
|
||||
if (oldHintTab.length > 0) {
|
||||
oldHintTab.removeAttr('data-hint');
|
||||
oldHintTab.removeAttr('data-hint-direction');
|
||||
oldHintTab.removeAttr('data-hint-offset');
|
||||
oldHintTab.removeAttr('data-hint-title');
|
||||
}
|
||||
var newHintTab = this.tabs[index].$el;
|
||||
newHintTab.attr('data-hint', '0');
|
||||
newHintTab.attr('data-hint-direction', 'top');
|
||||
newHintTab.attr('data-hint-offset', 'medium');
|
||||
newHintTab.attr('data-hint-title', 'M');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
@ -65,6 +65,15 @@ define([
|
|||
'spellcheck="<%= spellcheck %>" ',
|
||||
'class="form-control <%= cls %>" ',
|
||||
'placeholder="<%= placeHolder %>" ',
|
||||
'<% if (dataHint) {%>',
|
||||
'data-hint="<%= dataHint %>" ',
|
||||
'<% } %>',
|
||||
'<% if (dataHintDirection) {%>',
|
||||
'data-hint-direction="<%= dataHintDirection %>" ',
|
||||
'<% } %>',
|
||||
'<% if (dataHintOffset) {%>',
|
||||
'data-hint-offset="<%= dataHintOffset %>" ',
|
||||
'<% } %>',
|
||||
'></textarea>',
|
||||
'</div>'
|
||||
].join('')),
|
||||
|
@ -101,6 +110,9 @@ define([
|
|||
style : this.style,
|
||||
placeHolder : this.placeHolder,
|
||||
spellcheck : this.spellcheck,
|
||||
dataHint : this.options.dataHint,
|
||||
dataHintDirection: this.options.dataHintDirection,
|
||||
dataHintOffset: this.options.dataHintOffset,
|
||||
scope : me
|
||||
}));
|
||||
|
||||
|
|
|
@ -55,26 +55,28 @@ define([
|
|||
effects: 5,
|
||||
allowReselect: true,
|
||||
transparent: false,
|
||||
value: '000000'
|
||||
value: '000000',
|
||||
enableKeyEvents: true,
|
||||
keyMoveDirection: 'both' // 'vertical', 'horizontal'
|
||||
},
|
||||
|
||||
template :
|
||||
_.template(
|
||||
'<div style="padding: 8px 12px 12px;">' +
|
||||
'<% var me = this; %>' +
|
||||
'<% var me = this; var idx = 0; %>' +
|
||||
'<% $(colors).each(function(num, item) { %>' +
|
||||
'<% if (me.isBlankSeparator(item)) { %> <div class="palette-color-spacer" style="width:100%;height:8px;float:left;"></div>' +
|
||||
'<% } else if (me.isSeparator(item)) { %> </div><div class="divider" style="width:100%;float:left;"></div><div style="padding: 12px;">' +
|
||||
'<% } else if (me.isColor(item)) { %> ' +
|
||||
'<a class="palette-color color-<%=item%>" style="background:#<%=item%>" hidefocus="on">' +
|
||||
'<a class="palette-color color-<%=item%>" style="background:#<%=item%>" idx="<%=idx++%>">' +
|
||||
'<em><span style="background:#<%=item%>;" unselectable="on"> </span></em>' +
|
||||
'</a>' +
|
||||
'<% } else if (me.isTransparent(item)) { %>' +
|
||||
'<a class="color-<%=item%>" hidefocus="on">' +
|
||||
'<a class="color-<%=item%>" idx="<%=idx++%>">' +
|
||||
'<em><span unselectable="on"> </span></em>' +
|
||||
'</a>' +
|
||||
'<% } else if (me.isEffect(item)) { %>' +
|
||||
'<a effectid="<%=item.effectId%>" effectvalue="<%=item.effectValue%>" class="palette-color-effect color-<%=item.color%>" style="background:#<%=item.color%>" hidefocus="on">' +
|
||||
'<a effectid="<%=item.effectId%>" effectvalue="<%=item.effectValue%>" class="palette-color-effect color-<%=item.color%>" style="background:#<%=item.color%>" idx="<%=idx++%>">' +
|
||||
'<em><span style="background:#<%=item.color%>;" unselectable="on"> </span></em>' +
|
||||
'</a>' +
|
||||
'<% } else if (me.isCaption(item)) { %>' +
|
||||
|
@ -85,7 +87,7 @@ define([
|
|||
'<% if (me.options.dynamiccolors!==undefined) { %>' +
|
||||
'<div class="palette-color-spacer" style="width:100%;height:8px;float:left;"></div><div style="padding: 12px;">' +
|
||||
'<% for (var i=0; i<me.options.dynamiccolors; i++) { %>' +
|
||||
'<a class="color-dynamic-<%=i%> dynamic-empty-color" style="background:#ffffff" color="" hidefocus="on">' +
|
||||
'<a class="color-dynamic-<%=i%> dynamic-empty-color" style="background:#ffffff" color="" idx="<%=idx++%>">' +
|
||||
'<em><span unselectable="on"> </span></em></a>' +
|
||||
'<% } %>' +
|
||||
'<% } %>' +
|
||||
|
@ -101,6 +103,18 @@ define([
|
|||
el = me.$el || $(this.el);
|
||||
|
||||
this.colors = me.options.colors || this.generateColorData(me.options.themecolors, me.options.effects, me.options.standardcolors, me.options.transparent);
|
||||
this.enableKeyEvents= me.options.enableKeyEvents;
|
||||
this.tabindex = me.options.tabindex || 0;
|
||||
this.parentButton = me.options.parentButton;
|
||||
this.lastSelectedIdx = -1;
|
||||
|
||||
me.colorItems = [];
|
||||
if (me.options.keyMoveDirection=='vertical')
|
||||
me.moveKeys = [Common.UI.Keys.UP, Common.UI.Keys.DOWN];
|
||||
else if (me.options.keyMoveDirection=='horizontal')
|
||||
me.moveKeys = [Common.UI.Keys.LEFT, Common.UI.Keys.RIGHT];
|
||||
else
|
||||
me.moveKeys = [Common.UI.Keys.UP, Common.UI.Keys.DOWN, Common.UI.Keys.LEFT, Common.UI.Keys.RIGHT];
|
||||
|
||||
el.addClass('theme-colorpalette');
|
||||
this.render();
|
||||
|
@ -117,6 +131,12 @@ define([
|
|||
|
||||
render: function () {
|
||||
this.$el.html(this.template({colors: this.colors}));
|
||||
|
||||
var me = this;
|
||||
this.moveKeys && this.$el.find('a').each(function(num, item) {
|
||||
me.colorItems.push({el: item, index: num});
|
||||
});
|
||||
this.attachKeyEvents();
|
||||
return this;
|
||||
},
|
||||
|
||||
|
@ -146,7 +166,7 @@ define([
|
|||
updateCustomColors: function() {
|
||||
var el = this.$el || $(this.el);
|
||||
if (el) {
|
||||
var selected = el.find('a.' + this.selectedCls),
|
||||
var selected = (this.lastSelectedIdx>=0) ? $(this.colorItems[this.lastSelectedIdx].el) : el.find('a.' + this.selectedCls),
|
||||
color = (selected.length>0 && /color-dynamic/.test(selected[0].className)) ? selected.attr('color') : undefined;
|
||||
if (color) { // custom color was selected
|
||||
color = color.toUpperCase();
|
||||
|
@ -165,6 +185,7 @@ define([
|
|||
});
|
||||
if (colors[i] == color) {
|
||||
colorEl.addClass(this.selectedCls);
|
||||
this.lastSelectedIdx = parseInt(colorEl.attr('idx'));
|
||||
color = undefined; //select only first found color
|
||||
}
|
||||
}
|
||||
|
@ -179,19 +200,28 @@ define([
|
|||
if (target.length==0) return;
|
||||
|
||||
if (target.hasClass('color-transparent') ) {
|
||||
$(me.el).find('a.' + me.selectedCls).removeClass(me.selectedCls);
|
||||
me.clearSelection(true);
|
||||
target.addClass(me.selectedCls);
|
||||
if (!e.suppressEvent) {
|
||||
me.lastSelectedIdx = parseInt(target.attr('idx'));
|
||||
me.value = 'transparent';
|
||||
me.trigger('select', me, 'transparent');
|
||||
}
|
||||
} else if ( !(target[0].className.search('color-dynamic')<0) ) {
|
||||
if (!/dynamic-empty-color/.test(target[0].className)) {
|
||||
$(me.el).find('a.' + me.selectedCls).removeClass(me.selectedCls);
|
||||
me.clearSelection(true);
|
||||
target.addClass(me.selectedCls);
|
||||
if (!e.suppressEvent) {
|
||||
me.lastSelectedIdx = parseInt(target.attr('idx'));
|
||||
color = target.attr('color');
|
||||
if (color) me.trigger('select', me, color);
|
||||
|
||||
me.trigger('select', me, color);
|
||||
me.value = color.toUpperCase();
|
||||
}
|
||||
} else {
|
||||
if (e.suppressEvent) {
|
||||
me.clearSelection(true);
|
||||
target.addClass(me.selectedCls);
|
||||
} else
|
||||
setTimeout(function(){
|
||||
me.addNewColor();
|
||||
}, 10);
|
||||
|
@ -200,21 +230,25 @@ define([
|
|||
if (!/^[a-fA-F0-9]{6}$/.test(me.value) || _.indexOf(me.colors, me.value)<0 )
|
||||
me.value = false;
|
||||
|
||||
$(me.el).find('a.' + me.selectedCls).removeClass(me.selectedCls);
|
||||
me.clearSelection(true);
|
||||
target.addClass(me.selectedCls);
|
||||
|
||||
color = target[0].className.match(me.colorRe)[1];
|
||||
if ( target.hasClass('palette-color-effect') ) {
|
||||
var effectId = parseInt(target.attr('effectid'));
|
||||
if (color) {
|
||||
if (color && !e.suppressEvent) {
|
||||
me.value = color.toUpperCase();
|
||||
me.trigger('select', me, {color: color, effectId: effectId});
|
||||
me.lastSelectedIdx = parseInt(target.attr('idx'));
|
||||
}
|
||||
} else {
|
||||
if (/#?[a-fA-F0-9]{6}/.test(color)) {
|
||||
color = /#?([a-fA-F0-9]{6})/.exec(color)[1].toUpperCase();
|
||||
if (color && !e.suppressEvent) {
|
||||
me.value = color;
|
||||
me.trigger('select', me, color);
|
||||
me.lastSelectedIdx = parseInt(target.attr('idx'));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -225,8 +259,7 @@ define([
|
|||
color = /#?([a-fA-F0-9]{6})/.exec(color);
|
||||
if (color) {
|
||||
this.saveCustomColor(color[1]);
|
||||
|
||||
el.find('a.' + this.selectedCls).removeClass(this.selectedCls);
|
||||
this.clearSelection(true);
|
||||
|
||||
var child = el.find('.dynamic-empty-color');
|
||||
if (child.length==0) {
|
||||
|
@ -273,7 +306,7 @@ define([
|
|||
|
||||
select: function(color, suppressEvent) {
|
||||
var el = this.$el || $(this.el);
|
||||
el.find('a.' + this.selectedCls).removeClass(this.selectedCls);
|
||||
this.clearSelection();
|
||||
|
||||
if (typeof(color) == 'object' ) {
|
||||
var effectEl;
|
||||
|
@ -281,6 +314,7 @@ define([
|
|||
effectEl = el.find('a[effectid="'+color.effectId+'"]').first();
|
||||
if (effectEl.length>0) {
|
||||
effectEl.addClass(this.selectedCls);
|
||||
this.lastSelectedIdx = parseInt(effectEl.attr('idx'));
|
||||
this.value = effectEl[0].className.match(this.colorRe)[1].toUpperCase();
|
||||
} else
|
||||
this.value = false;
|
||||
|
@ -288,6 +322,7 @@ define([
|
|||
effectEl = el.find('a[effectvalue="'+color.effectValue+'"].color-' + color.color.toUpperCase()).first();
|
||||
if (effectEl.length>0) {
|
||||
effectEl.addClass(this.selectedCls);
|
||||
this.lastSelectedIdx = parseInt(effectEl.attr('idx'));
|
||||
this.value = effectEl[0].className.match(this.colorRe)[1].toUpperCase();
|
||||
} else
|
||||
this.value = false;
|
||||
|
@ -302,8 +337,9 @@ define([
|
|||
if (_.indexOf(this.colors, this.value)<0) this.value = false;
|
||||
|
||||
if (color != this.value || this.options.allowReselect) {
|
||||
(color == 'transparent') ? el.find('a.color-transparent').addClass(this.selectedCls) : el.find('a.palette-color.color-' + color).first().addClass(this.selectedCls);
|
||||
var co = (color == 'transparent') ? el.find('a.color-transparent').addClass(this.selectedCls) : el.find('a.palette-color.color-' + color).first().addClass(this.selectedCls);
|
||||
this.value = color;
|
||||
this.lastSelectedIdx = parseInt(co.attr('idx'));
|
||||
if (suppressEvent !== true) {
|
||||
this.fireEvent('select', this, color);
|
||||
}
|
||||
|
@ -314,6 +350,7 @@ define([
|
|||
co = el.find('a[color="'+color+'"]').first();
|
||||
if (co.length>0) {
|
||||
co.addClass(this.selectedCls);
|
||||
this.lastSelectedIdx = parseInt(co.attr('idx'));
|
||||
this.value = color.toUpperCase();
|
||||
}
|
||||
}
|
||||
|
@ -322,7 +359,7 @@ define([
|
|||
|
||||
selectByRGB: function(rgb, suppressEvent) {
|
||||
var el = this.$el || $(this.el);
|
||||
el.find('a.' + this.selectedCls).removeClass(this.selectedCls);
|
||||
this.clearSelection(true);
|
||||
|
||||
var color = (typeof(rgb) == 'object') ? rgb.color : rgb;
|
||||
if (/#?[a-fA-F0-9]{6}/.test(color)) {
|
||||
|
@ -338,6 +375,7 @@ define([
|
|||
co = el.find('a[color="'+color+'"]').first();
|
||||
if (co.length>0) {
|
||||
co.addClass(this.selectedCls);
|
||||
this.lastSelectedIdx = parseInt(co.attr('idx'));
|
||||
this.value = color;
|
||||
}
|
||||
if (suppressEvent !== true) {
|
||||
|
@ -417,7 +455,28 @@ define([
|
|||
|
||||
clearSelection: function(suppressEvent) {
|
||||
this.$el.find('a.' + this.selectedCls).removeClass(this.selectedCls);
|
||||
if (!suppressEvent) {
|
||||
this.value = undefined;
|
||||
this.lastSelectedIdx = -1;
|
||||
}
|
||||
},
|
||||
|
||||
showLastSelected: function() {
|
||||
this.selectByIndex(this.lastSelectedIdx, true);
|
||||
},
|
||||
|
||||
getSelectedColor: function() {
|
||||
var el = this.$el || $(this.el);
|
||||
var idx = el.find('a.' + this.selectedCls).attr('idx');
|
||||
return (idx!==undefined) ? this.colorItems[parseInt(idx)] : null;
|
||||
},
|
||||
|
||||
selectByIndex: function(index, suppressEvent) {
|
||||
this.clearSelection(true);
|
||||
|
||||
if (index>=0 && index<this.colorItems.length) {
|
||||
this.handleClick({target: this.colorItems[index].el, suppressEvent: suppressEvent});
|
||||
}
|
||||
},
|
||||
|
||||
generateColorData: function(themecolors, effects, standardcolors, transparent) {
|
||||
|
@ -449,6 +508,133 @@ define([
|
|||
return arr;
|
||||
},
|
||||
|
||||
onKeyDown: function (e, data) {
|
||||
if (data===undefined) data = e;
|
||||
if (_.indexOf(this.moveKeys, data.keyCode)>-1 || data.keyCode==Common.UI.Keys.RETURN) {
|
||||
data.preventDefault();
|
||||
data.stopPropagation();
|
||||
var rec = this.getSelectedColor();
|
||||
if (data.keyCode==Common.UI.Keys.RETURN) {
|
||||
rec && this.selectByIndex(rec.index);
|
||||
if (this.parentButton && this.parentButton.menu)
|
||||
this.parentButton.menu.hide();
|
||||
} else {
|
||||
var idx = rec ? rec.index : -1;
|
||||
if (idx<0) {
|
||||
idx = 0;
|
||||
} else if (this.options.keyMoveDirection == 'both') {
|
||||
if (this._layoutParams === undefined)
|
||||
this.fillIndexesArray();
|
||||
var topIdx = this.colorItems[idx].topIdx,
|
||||
leftIdx = this.colorItems[idx].leftIdx;
|
||||
|
||||
idx = undefined;
|
||||
if (data.keyCode==Common.UI.Keys.LEFT) {
|
||||
while (idx===undefined) {
|
||||
leftIdx--;
|
||||
if (leftIdx<0) {
|
||||
leftIdx = this._layoutParams.columns-1;
|
||||
}
|
||||
idx = this._layoutParams.itemsIndexes[topIdx][leftIdx];
|
||||
}
|
||||
} else if (data.keyCode==Common.UI.Keys.RIGHT) {
|
||||
while (idx===undefined) {
|
||||
leftIdx++;
|
||||
if (leftIdx>this._layoutParams.columns-1) leftIdx = 0;
|
||||
idx = this._layoutParams.itemsIndexes[topIdx][leftIdx];
|
||||
}
|
||||
} else if (data.keyCode==Common.UI.Keys.UP) {
|
||||
if (topIdx==0 && this.parentButton) {
|
||||
this.clearSelection(true);
|
||||
this.parentButton.focusOuter(data);
|
||||
} else
|
||||
while (idx===undefined) {
|
||||
topIdx--;
|
||||
if (topIdx<0) topIdx = this._layoutParams.rows-1;
|
||||
idx = this._layoutParams.itemsIndexes[topIdx][leftIdx];
|
||||
}
|
||||
} else {
|
||||
if (topIdx==this._layoutParams.rows-1 && this.parentButton) {
|
||||
this.clearSelection(true);
|
||||
this.parentButton.focusOuter(data);
|
||||
} else
|
||||
while (idx===undefined) {
|
||||
topIdx++;
|
||||
if (topIdx>this._layoutParams.rows-1) topIdx = 0;
|
||||
idx = this._layoutParams.itemsIndexes[topIdx][leftIdx];
|
||||
}
|
||||
}
|
||||
} else {
|
||||
idx = (data.keyCode==Common.UI.Keys.UP || data.keyCode==Common.UI.Keys.LEFT)
|
||||
? Math.max(0, idx-1)
|
||||
: Math.min(this.colorItems.length - 1, idx + 1) ;
|
||||
}
|
||||
|
||||
if (idx !== undefined && idx>=0) {
|
||||
this._fromKeyDown = true;
|
||||
this.selectByIndex(idx, true);
|
||||
this._fromKeyDown = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
fillIndexesArray: function() {
|
||||
if (this.colorItems.length<=0) return;
|
||||
|
||||
this._layoutParams = {
|
||||
itemsIndexes: [],
|
||||
columns: 0,
|
||||
rows: 0
|
||||
};
|
||||
|
||||
var el = $(this.colorItems[0].el),
|
||||
itemW = el.outerWidth() + parseInt(el.css('margin-left')) + parseInt(el.css('margin-right')),
|
||||
offsetLeft = this.$el.offset().left,
|
||||
offsetTop = el.offset().top,
|
||||
prevtop = -1, topIdx = 0, leftIdx = 0;
|
||||
|
||||
for (var i=0; i<this.colorItems.length; i++) {
|
||||
var top = $(this.colorItems[i].el).offset().top - offsetTop;
|
||||
leftIdx = Math.floor(($(this.colorItems[i].el).offset().left - offsetLeft)/itemW);
|
||||
if (top>prevtop) {
|
||||
prevtop = top;
|
||||
this._layoutParams.itemsIndexes.push([]);
|
||||
topIdx = this._layoutParams.itemsIndexes.length-1;
|
||||
}
|
||||
this._layoutParams.itemsIndexes[topIdx][leftIdx] = i;
|
||||
this.colorItems[i].topIdx = topIdx;
|
||||
this.colorItems[i].leftIdx = leftIdx;
|
||||
if (this._layoutParams.columns<leftIdx) this._layoutParams.columns = leftIdx;
|
||||
}
|
||||
this._layoutParams.rows = this._layoutParams.itemsIndexes.length;
|
||||
this._layoutParams.columns++;
|
||||
},
|
||||
|
||||
attachKeyEvents: function() {
|
||||
if (this.enableKeyEvents) {
|
||||
var el = this.$el || $(this.el);
|
||||
el.addClass('canfocused');
|
||||
el.attr('tabindex', this.tabindex.toString());
|
||||
el.on('keydown', _.bind(this.onKeyDown, this));
|
||||
}
|
||||
},
|
||||
|
||||
focus: function(index) {
|
||||
var el = this.$el || $(this.el);
|
||||
el && el.focus();
|
||||
if (typeof index == 'string') {
|
||||
if (index == 'first') {
|
||||
this.selectByIndex(0, true);
|
||||
} else if (index == 'last') {
|
||||
if (this._layoutParams === undefined)
|
||||
this.fillIndexesArray();
|
||||
this.selectByIndex(this._layoutParams.itemsIndexes[this._layoutParams.rows-1][0], true);
|
||||
}
|
||||
} else if (index !== undefined)
|
||||
this.selectByIndex(index, true);
|
||||
},
|
||||
|
||||
textThemeColors : 'Theme Colors',
|
||||
textStandartColors : 'Standart Colors'
|
||||
}, Common.UI.ThemeColorPalette || {}));
|
||||
|
|
|
@ -198,7 +198,7 @@ define([
|
|||
if (innerEl) {
|
||||
(this.dataViewItems.length<1) && innerEl.find('.empty-text').remove();
|
||||
|
||||
if (opts && opts.at!==undefined) {
|
||||
if (opts && (typeof opts.at==='number')) {
|
||||
var idx = opts.at;
|
||||
var innerDivs = innerEl.find('> div');
|
||||
if (idx > 0)
|
||||
|
|
|
@ -632,7 +632,7 @@ define([
|
|||
|
||||
this.$window = $('#' + this.initConfig.id);
|
||||
|
||||
if (Common.Locale.getCurrentLanguage() !== 'en')
|
||||
if (Common.Locale.getCurrentLanguage() && Common.Locale.getCurrentLanguage() !== 'en')
|
||||
this.$window.attr('applang', Common.Locale.getCurrentLanguage());
|
||||
|
||||
this.binding.keydown = _.bind(_keydown,this);
|
||||
|
|
|
@ -102,7 +102,8 @@ define([
|
|||
|
||||
// work handlers
|
||||
|
||||
'comment:closeEditing': _.bind(this.closeEditing, this)
|
||||
'comment:closeEditing': _.bind(this.closeEditing, this),
|
||||
'comment:sort': _.bind(this.setComparator, this)
|
||||
},
|
||||
|
||||
'Common.Views.ReviewPopover': {
|
||||
|
@ -144,10 +145,11 @@ define([
|
|||
}.bind(this));
|
||||
},
|
||||
onLaunch: function () {
|
||||
var filter = Common.localStorage.getKeysFilter();
|
||||
this.appPrefix = (filter && filter.length) ? filter.split(',')[0] : '';
|
||||
|
||||
this.collection = this.getApplication().getCollection('Common.Collections.Comments');
|
||||
if (this.collection) {
|
||||
this.collection.comparator = function (collection) { return -collection.get('time'); };
|
||||
}
|
||||
this.setComparator();
|
||||
|
||||
this.popoverComments = new Common.Collections.Comments();
|
||||
if (this.popoverComments) {
|
||||
|
@ -204,6 +206,38 @@ define([
|
|||
},
|
||||
//
|
||||
|
||||
setComparator: function(type) {
|
||||
if (this.collection) {
|
||||
var sort = (type !== undefined);
|
||||
if (type === undefined) {
|
||||
type = Common.localStorage.getItem(this.appPrefix + "comments-sort") || 'date-desc';
|
||||
}
|
||||
Common.localStorage.setItem(this.appPrefix + "comments-sort", type);
|
||||
Common.Utils.InternalSettings.set(this.appPrefix + "comments-sort", type);
|
||||
|
||||
if (type=='position') {
|
||||
} else if (type=='author-asc' || type=='author-desc') {
|
||||
var direction = (type=='author-asc') ? 1 : -1;
|
||||
this.collection.comparator = function(item1, item2) {
|
||||
var n1 = item1.get('parsedName').toLowerCase(),
|
||||
n2 = item2.get('parsedName').toLowerCase();
|
||||
if (n1==n2) return 0;
|
||||
return (n1<n2) ? -direction : direction;
|
||||
};
|
||||
} else { // date
|
||||
var direction = (type=='date-asc') ? 1 : -1;
|
||||
this.collection.comparator = function (collection) {
|
||||
return direction * collection.get('time');
|
||||
};
|
||||
}
|
||||
sort && this.updateComments(true);
|
||||
}
|
||||
},
|
||||
|
||||
getComparator: function() {
|
||||
return Common.Utils.InternalSettings.get(this.appPrefix + "comments-sort") || 'date';
|
||||
},
|
||||
|
||||
onCreateComment: function (panel, commentVal, editMode, hidereply, documentFlag) {
|
||||
if (this.api && commentVal && commentVal.length > 0) {
|
||||
var comment = buildCommentData(); // new asc_CCommentData(null);
|
||||
|
@ -776,9 +810,11 @@ define([
|
|||
((data.asc_getTime() == '') ? new Date() : new Date(this.stringUtcToLocalDate(data.asc_getTime())));
|
||||
|
||||
var user = this.userCollection.findOriginalUser(data.asc_getUserId());
|
||||
var needSort = (this.getComparator() == 'author-asc' || this.getComparator() == 'author-desc') && (data.asc_getUserName() !== comment.get('username'));
|
||||
comment.set('comment', data.asc_getText());
|
||||
comment.set('userid', data.asc_getUserId());
|
||||
comment.set('username', data.asc_getUserName());
|
||||
comment.set('parsedName', AscCommon.UserInfoParser.getParsedName(data.asc_getUserName()));
|
||||
comment.set('usercolor', (user) ? user.get('color') : null);
|
||||
comment.set('resolved', data.asc_getSolved());
|
||||
comment.set('quote', data.asc_getQuoteText());
|
||||
|
@ -804,6 +840,7 @@ define([
|
|||
id : Common.UI.getId(),
|
||||
userid : data.asc_getReply(i).asc_getUserId(),
|
||||
username : data.asc_getReply(i).asc_getUserName(),
|
||||
parsedName : AscCommon.UserInfoParser.getParsedName(data.asc_getReply(i).asc_getUserName()),
|
||||
usercolor : (user) ? user.get('color') : null,
|
||||
date : t.dateToLocaleTimeString(dateReply),
|
||||
reply : data.asc_getReply(i).asc_getText(),
|
||||
|
@ -825,7 +862,7 @@ define([
|
|||
}
|
||||
|
||||
if (!silentUpdate) {
|
||||
this.updateComments(false, true);
|
||||
this.updateComments(needSort, !needSort);
|
||||
|
||||
// if (this.getPopover() && this.getPopover().isVisible()) {
|
||||
// this._dontScrollToComment = true;
|
||||
|
@ -1089,7 +1126,7 @@ define([
|
|||
|
||||
var i, end = true;
|
||||
|
||||
if (_.isUndefined(disableSort)) {
|
||||
if (!disableSort) {
|
||||
this.collection.sort();
|
||||
}
|
||||
|
||||
|
@ -1253,6 +1290,7 @@ define([
|
|||
guid : data.asc_getGuid(),
|
||||
userid : data.asc_getUserId(),
|
||||
username : data.asc_getUserName(),
|
||||
parsedName : AscCommon.UserInfoParser.getParsedName(data.asc_getUserName()),
|
||||
usercolor : (user) ? user.get('color') : null,
|
||||
date : this.dateToLocaleTimeString(date),
|
||||
quote : data.asc_getQuoteText(),
|
||||
|
@ -1299,6 +1337,7 @@ define([
|
|||
id : Common.UI.getId(),
|
||||
userid : data.asc_getReply(i).asc_getUserId(),
|
||||
username : data.asc_getReply(i).asc_getUserName(),
|
||||
parsedName : AscCommon.UserInfoParser.getParsedName(data.asc_getReply(i).asc_getUserName()),
|
||||
usercolor : (user) ? user.get('color') : null,
|
||||
date : this.dateToLocaleTimeString(date),
|
||||
reply : data.asc_getReply(i).asc_getText(),
|
||||
|
@ -1340,6 +1379,7 @@ define([
|
|||
date: this.dateToLocaleTimeString(date),
|
||||
userid: this.currentUserId,
|
||||
username: AscCommon.UserInfoParser.getCurrentName(),
|
||||
parsedName: AscCommon.UserInfoParser.getParsedName(AscCommon.UserInfoParser.getCurrentName()),
|
||||
usercolor: (user) ? user.get('color') : null,
|
||||
editTextInPopover: true,
|
||||
showReplyInPopover: false,
|
||||
|
|
|
@ -48,7 +48,7 @@ define([
|
|||
'common/main/lib/view/ExternalDiagramEditor'
|
||||
], function () { 'use strict';
|
||||
Common.Controllers.ExternalDiagramEditor = Backbone.Controller.extend(_.extend((function() {
|
||||
var appLang = 'en',
|
||||
var appLang = '{{DEFAULT_LANG}}',
|
||||
customization = undefined,
|
||||
targetApp = '',
|
||||
externalEditor = null,
|
||||
|
|
|
@ -48,7 +48,7 @@ define([
|
|||
'common/main/lib/view/ExternalMergeEditor'
|
||||
], function () { 'use strict';
|
||||
Common.Controllers.ExternalMergeEditor = Backbone.Controller.extend(_.extend((function() {
|
||||
var appLang = 'en',
|
||||
var appLang = '{{DEFAULT_LANG}}',
|
||||
customization = undefined,
|
||||
targetApp = '',
|
||||
externalEditor = null;
|
||||
|
|
|
@ -131,6 +131,8 @@ define([
|
|||
this.api.asc_registerCallback('asc_onUpdateRevisionsChangesPosition', _.bind(this.onApiUpdateChangePosition, this));
|
||||
this.api.asc_registerCallback('asc_onAuthParticipantsChanged', _.bind(this.onAuthParticipantsChanged, this));
|
||||
this.api.asc_registerCallback('asc_onParticipantsChanged', _.bind(this.onAuthParticipantsChanged, this));
|
||||
this.api.asc_registerCallback('asc_onBeginViewModeInReview', _.bind(this.onBeginViewModeInReview, this));
|
||||
this.api.asc_registerCallback('asc_onEndViewModeInReview', _.bind(this.onEndViewModeInReview, this));
|
||||
}
|
||||
if (this.appConfig.canReview)
|
||||
this.api.asc_registerCallback('asc_onOnTrackRevisionsChange', _.bind(this.onApiTrackRevisionsChange, this));
|
||||
|
@ -694,6 +696,18 @@ define([
|
|||
this._state.previewMode = (mode == 'final' || mode == 'original');
|
||||
},
|
||||
|
||||
onBeginViewModeInReview: function(mode) {
|
||||
this.disableEditing(true);
|
||||
this.view && this.view.turnDisplayMode(mode ? 'final' : 'original');
|
||||
this._state.previewMode = true;
|
||||
},
|
||||
|
||||
onEndViewModeInReview: function() {
|
||||
this.disableEditing(false);
|
||||
this.view && this.view.turnDisplayMode('markup');
|
||||
this._state.previewMode = false;
|
||||
},
|
||||
|
||||
isPreviewChangesMode: function() {
|
||||
return this._state.previewMode;
|
||||
},
|
||||
|
@ -728,25 +742,26 @@ define([
|
|||
},
|
||||
|
||||
disableEditing: function(disable) {
|
||||
var app = this.getApplication();
|
||||
app.getController('Toolbar').DisableToolbar(disable, false, true);
|
||||
app.getController('DocumentHolder').getView().SetDisabled(disable);
|
||||
|
||||
if (this.appConfig.canReview) {
|
||||
app.getController('RightMenu').getView('RightMenu').clearSelection();
|
||||
app.getController('RightMenu').SetDisabled(disable, false);
|
||||
app.getController('Statusbar').getView('Statusbar').SetDisabled(disable);
|
||||
app.getController('Navigation') && app.getController('Navigation').SetDisabled(disable);
|
||||
app.getController('Common.Controllers.Plugins').getView('Common.Views.Plugins').disableControls(disable);
|
||||
}
|
||||
|
||||
var comments = app.getController('Common.Controllers.Comments');
|
||||
if (comments)
|
||||
comments.setPreviewMode(disable);
|
||||
|
||||
var leftMenu = app.getController('LeftMenu');
|
||||
leftMenu.leftMenu.getMenu('file').getButton('protect').setDisabled(disable);
|
||||
leftMenu.setPreviewMode(disable);
|
||||
Common.NotificationCenter.trigger('editing:disable', disable, {
|
||||
viewMode: false,
|
||||
reviewMode: true,
|
||||
fillFormwMode: false,
|
||||
allowMerge: false,
|
||||
allowSignature: false,
|
||||
allowProtect: false,
|
||||
rightMenu: {clear: true, disable: true},
|
||||
statusBar: true,
|
||||
leftMenu: {disable: false, previewMode: true},
|
||||
fileMenu: {protect: true},
|
||||
navigation: {disable: false, previewMode: true},
|
||||
comments: {disable: false, previewMode: true},
|
||||
chat: false,
|
||||
review: false,
|
||||
viewport: false,
|
||||
documentHolder: true,
|
||||
toolbar: true,
|
||||
plugins: true
|
||||
}, 'review');
|
||||
|
||||
if (this.view) {
|
||||
this.view.$el.find('.no-group-mask.review').css('opacity', 1);
|
||||
|
@ -783,7 +798,9 @@ define([
|
|||
// Common.Utils.InternalSettings.set(me.view.appPrefix + "track-changes", (state ? 0 : 1) + (global ? 2 : 0));
|
||||
// };
|
||||
|
||||
var trackChanges = typeof (me.appConfig.customization) == 'object' ? me.appConfig.customization.trackChanges : undefined;
|
||||
var trackChanges = me.appConfig.customization && me.appConfig.customization.review ? me.appConfig.customization.review.trackChanges : undefined;
|
||||
(trackChanges===undefined) && (trackChanges = me.appConfig.customization ? me.appConfig.customization.trackChanges : undefined);
|
||||
|
||||
if (config.isReviewOnly || trackChanges!==undefined)
|
||||
me.api.asc_SetLocalTrackRevisions(config.isReviewOnly || trackChanges===true);
|
||||
else
|
||||
|
@ -792,7 +809,8 @@ define([
|
|||
|
||||
// _setReviewStatus(state, global);
|
||||
|
||||
if ( typeof (me.appConfig.customization) == 'object' && (me.appConfig.customization.showReviewChanges==true) ) {
|
||||
if ( typeof (me.appConfig.customization) == 'object' && (me.appConfig.customization.review && me.appConfig.customization.review.showReviewChanges==true ||
|
||||
(!me.appConfig.customization.review || me.appConfig.customization.review.showReviewChanges===undefined) && me.appConfig.customization.showReviewChanges==true) ) {
|
||||
me.dlgChanges = (new Common.Views.ReviewChangesDialog({
|
||||
popoverChanges : me.popoverChanges,
|
||||
mode : me.appConfig
|
||||
|
@ -806,8 +824,11 @@ define([
|
|||
config.canViewReview = (config.isEdit || me.api.asc_HaveRevisionsChanges(true)); // check revisions from all users
|
||||
if (config.canViewReview) {
|
||||
var val = Common.localStorage.getItem(me.view.appPrefix + "review-mode");
|
||||
if (val===null)
|
||||
val = me.appConfig.customization && /^(original|final|markup)$/i.test(me.appConfig.customization.reviewDisplay) ? me.appConfig.customization.reviewDisplay.toLocaleLowerCase() : 'original';
|
||||
if (val===null) {
|
||||
val = me.appConfig.customization && me.appConfig.customization.review ? me.appConfig.customization.review.reviewDisplay : undefined;
|
||||
!val && (val = me.appConfig.customization ? me.appConfig.customization.reviewDisplay : undefined);
|
||||
val = /^(original|final|markup)$/i.test(val) ? val.toLocaleLowerCase() : 'original';
|
||||
}
|
||||
me.turnDisplayMode((config.isEdit || config.isRestrictedEdit) ? 'markup' : val); // load display mode only in viewer
|
||||
me.view.turnDisplayMode((config.isEdit || config.isRestrictedEdit) ? 'markup' : val);
|
||||
}
|
||||
|
|
|
@ -7,6 +7,8 @@ define([
|
|||
], function () {
|
||||
'use strict';
|
||||
|
||||
!Common.UI && (Common.UI = {});
|
||||
|
||||
Common.UI.Themes = new (function(locale) {
|
||||
!locale && (locale = {});
|
||||
var themes_map = {
|
||||
|
@ -237,7 +239,7 @@ define([
|
|||
|
||||
$(window).on('storage', function (e) {
|
||||
if ( e.key == 'ui-theme' || e.key == 'ui-theme-id' ) {
|
||||
me.setTheme(e.originalEvent.newValue);
|
||||
me.setTheme(e.originalEvent.newValue, true);
|
||||
}
|
||||
})
|
||||
|
||||
|
@ -250,11 +252,19 @@ define([
|
|||
$('body').addClass(theme_name);
|
||||
}
|
||||
|
||||
if ( !document.body.className.match(/theme-type-/) ) {
|
||||
document.body.classList.add('theme-type-' + themes_map[theme_name].type);
|
||||
}
|
||||
|
||||
var obj = get_current_theme_colors(name_colors);
|
||||
obj.type = themes_map[theme_name].type;
|
||||
obj.name = theme_name;
|
||||
api.asc_setSkin(obj);
|
||||
|
||||
if ( this.isDarkTheme() ) {
|
||||
this.api.asc_setContentDarkMode(this.isContentThemeDark());
|
||||
}
|
||||
|
||||
Common.NotificationCenter.on('document:ready', on_document_ready.bind(this));
|
||||
},
|
||||
|
||||
|
@ -263,7 +273,7 @@ define([
|
|||
},
|
||||
|
||||
setAvailable: function (value) {
|
||||
this.locked = value;
|
||||
this.locked = !value;
|
||||
},
|
||||
|
||||
map: function () {
|
||||
|
@ -275,7 +285,8 @@ define([
|
|||
},
|
||||
|
||||
currentThemeId: function () {
|
||||
return get_ui_theme_name(Common.localStorage.getItem('ui-theme')) || id_default_light_theme;
|
||||
var t = Common.localStorage.getItem('ui-theme') || Common.localStorage.getItem('ui-theme-id');
|
||||
return get_ui_theme_name(t) || id_default_light_theme;
|
||||
},
|
||||
|
||||
defaultThemeId: function (type) {
|
||||
|
@ -290,19 +301,33 @@ define([
|
|||
return themes_map[this.currentThemeId()].type == 'dark';
|
||||
},
|
||||
|
||||
isContentThemeDark: function () {
|
||||
return Common.localStorage.getItem("content-theme") == 'dark';
|
||||
},
|
||||
|
||||
toggleContentTheme: function () {
|
||||
var is_current_dark = this.isContentThemeDark();
|
||||
is_current_dark ? Common.localStorage.setItem('content-theme', 'light') : Common.localStorage.setItem('content-theme', 'dark');
|
||||
|
||||
if ( this.api.asc_setContentDarkMode )
|
||||
this.api.asc_setContentDarkMode(!is_current_dark);
|
||||
|
||||
Common.NotificationCenter.trigger('contenttheme:dark', !is_current_dark);
|
||||
},
|
||||
|
||||
setTheme: function (obj, force) {
|
||||
var id = get_ui_theme_name(obj);
|
||||
if ( (this.currentThemeId() != id || force) && !!themes_map[id] ) {
|
||||
var classname = document.body.className.replace(/theme-\w+\s?/, '');
|
||||
document.body.className = classname;
|
||||
|
||||
$('body').addClass(id);
|
||||
document.body.className = document.body.className.replace(/theme-[\w-]+\s?/gi, '').trim();
|
||||
document.body.classList.add(id, 'theme-type-' + themes_map[id].type);
|
||||
|
||||
if ( this.api ) {
|
||||
var obj = get_current_theme_colors(name_colors);
|
||||
obj.type = themes_map[id].type;
|
||||
obj.name = id;
|
||||
|
||||
this.api.asc_setSkin(obj);
|
||||
}
|
||||
|
||||
if ( !(Common.Utils.isIE10 || Common.Utils.isIE11) ) {
|
||||
var theme_obj = {
|
||||
|
|
|
@ -71,6 +71,14 @@
|
|||
var key, handler, k, i, modifiersMatch, scope;
|
||||
key = event.keyCode;
|
||||
|
||||
if (Common.UI.HintManager.isHintVisible()) {
|
||||
if (key === 112) {
|
||||
Common.UI.HintManager.clearHints();
|
||||
} else if (key !== 27) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (index(_downKeys, key) == -1) {
|
||||
_downKeys.push(key);
|
||||
}
|
||||
|
|
|
@ -56,6 +56,7 @@ define([
|
|||
guid : '',
|
||||
userid : 0,
|
||||
username : 'Guest',
|
||||
parsedName : 'Guest',
|
||||
usercolor : null,
|
||||
date : undefined,
|
||||
quote : '',
|
||||
|
@ -88,6 +89,7 @@ define([
|
|||
time : 0, // acs
|
||||
userid : 0,
|
||||
username : 'Guest',
|
||||
parsedName : 'Guest',
|
||||
usercolor : null,
|
||||
reply : '',
|
||||
date : undefined,
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
</div>
|
||||
<div id="chat-options" class="layout-item">
|
||||
<div id="chat-options-ct">
|
||||
<textarea id="chat-msg-text" class="user-select textarea-control" maxlength="<%=maxMsgLength%>"></textarea>
|
||||
<button id="chat-msg-btn-add" class="btn normal dlg-btn primary"><%=scope.textSend%></button>
|
||||
<textarea id="chat-msg-text" class="user-select textarea-control" maxlength="<%=maxMsgLength%>" data-hint="1" data-hint-direction="left-top"></textarea>
|
||||
<button id="chat-msg-btn-add" class="btn normal dlg-btn primary" data-hint="1" data-hint-direction="bottom" data-hint-offset="big"><%=scope.textSend%></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -4,7 +4,7 @@
|
|||
<!-- comment block -->
|
||||
|
||||
<div class="user-name">
|
||||
<div class="color" style="display: inline-block; background-color: <% if (usercolor!==null) { %><%=usercolor%><% } else { %> #cfcfcf <% } %>; " ></div><%= scope.getUserName(username) %>
|
||||
<div class="color" style="display: inline-block; background-color: <% if (usercolor!==null) { %><%=usercolor%><% } else { %> #cfcfcf <% } %>; " ></div><%= scope.getEncodedName(parsedName) %>
|
||||
</div>
|
||||
<div class="user-date"><%=date%></div>
|
||||
<% if (quote!==null && quote!=='') { %>
|
||||
|
@ -31,7 +31,7 @@
|
|||
<% } %>
|
||||
<div class="reply-item-ct" <% if (scope.viewmode && index==replys.length-1) { %>style="padding-bottom: 0;" <% } %>;>
|
||||
<div class="user-name">
|
||||
<div class="color" style="display: inline-block; background-color: <% if (item.get("usercolor")!==null) { %><%=item.get("usercolor")%><% } else { %> #cfcfcf <% } %>; " ></div><%= scope.getUserName(item.get("username")) %>
|
||||
<div class="color" style="display: inline-block; background-color: <% if (item.get("usercolor")!==null) { %><%=item.get("usercolor")%><% } else { %> #cfcfcf <% } %>; " ></div><%= scope.getEncodedName(item.get("parsedName")) %>
|
||||
</div>
|
||||
<div class="user-date"><%=item.get("date")%></div>
|
||||
<% if (!item.get("editText")) { %>
|
||||
|
|
|
@ -1,13 +1,18 @@
|
|||
<div id="comments-box" class="layout-ct vbox">
|
||||
<div class="layout-item messages-ct"></div>
|
||||
<div class="layout-item add-link-ct">
|
||||
<label class="btn new"><%=textAddCommentToDoc%></label>
|
||||
<label id="add-comment-doc" class="btn new" data-hint="1" data-hint-direction="bottom" data-hint-offset="medium"><%=textAddCommentToDoc%></label>
|
||||
</div>
|
||||
<div style="display: none;" class="layout-item new-comment-ct">
|
||||
<div class="inner-ct">
|
||||
<textarea id="comment-msg-new" class="user-select textarea-control" placeholder="<%=textEnterCommentHint%>" maxlength="<%=maxCommLength%>"></textarea>
|
||||
<textarea id="comment-msg-new" class="user-select textarea-control" placeholder="<%=textEnterCommentHint%>" maxlength="<%=maxCommLength%>" data-hint="1" data-hint-direction="left-top"></textarea>
|
||||
</div>
|
||||
<button class="btn add normal dlg-btn primary"><%=textAddComment%></button>
|
||||
<button class="btn cancel normal dlg-btn"><%=textCancel%></button>
|
||||
<button class="btn add normal dlg-btn primary" data-hint="1" data-hint-direction="bottom" data-hint-offset="big"><%=textAddComment%></button>
|
||||
<button class="btn cancel normal dlg-btn" data-hint="1" data-hint-direction="bottom" data-hint-offset="big"><%=textCancel%></button>
|
||||
</div>
|
||||
<div id="comments-header" class="">
|
||||
<label><%=textComments%></label>
|
||||
<div id="comments-btn-close" style="float:right;margin-left: 4px;"></div>
|
||||
<div id="comments-btn-sort" style="float:right;"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<!-- comment block -->
|
||||
|
||||
<div class="user-name">
|
||||
<div class="color" style="display: inline-block; background-color: <% if (usercolor!==null) { %><%=usercolor%><% } else { %> #cfcfcf <% } %>; " ></div><%= scope.getUserName(username) %>
|
||||
<div class="color" style="display: inline-block; background-color: <% if (usercolor!==null) { %><%=usercolor%><% } else { %> #cfcfcf <% } %>; " ></div><%= scope.getEncodedName(parsedName) %>
|
||||
</div>
|
||||
<div class="user-date"><%=date%></div>
|
||||
<% if (!editTextInPopover || hint) { %>
|
||||
|
@ -32,7 +32,7 @@
|
|||
<% } %>
|
||||
<div class="reply-item-ct">
|
||||
<div class="user-name">
|
||||
<div class="color" style="display: inline-block; background-color: <% if (item.get("usercolor")!==null) { %><%=item.get("usercolor")%><% } else { %> #cfcfcf <% } %>; " ></div><%= scope.getUserName(item.get("username")) %>
|
||||
<div class="color" style="display: inline-block; background-color: <% if (item.get("usercolor")!==null) { %><%=item.get("usercolor")%><% } else { %> #cfcfcf <% } %>; " ></div><%= scope.getEncodedName(item.get("parsedName")) %>
|
||||
</div>
|
||||
<div class="user-date"><%=item.get("date")%></div>
|
||||
<% if (!item.get("editTextInPopover")) { %>
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
<div class="btn-delete img-commonctrl"></div>
|
||||
<% } %>
|
||||
<% } else if (editable) { %>
|
||||
<div class="btn-accept img-commonctrl"></div>
|
||||
<div class="btn-reject img-commonctrl"></div>
|
||||
<div class="btn-accept"></div>
|
||||
<div class="btn-reject tool "></div>
|
||||
<% } %>
|
||||
<% } %>
|
||||
</div>
|
||||
|
|
|
@ -1,9 +1,19 @@
|
|||
|
||||
function checkScaling() {
|
||||
var str_mq_150 = "screen and (-webkit-min-device-pixel-ratio: 1.5) and (-webkit-max-device-pixel-ratio: 1.9), " +
|
||||
"screen and (min-resolution: 1.5dppx) and (max-resolution: 1.9dppx)";
|
||||
if ( window.matchMedia(str_mq_150).matches ) {
|
||||
document.body.classList.add('pixel-ratio__1_5');
|
||||
var matches = {
|
||||
'pixel-ratio__1_25': "screen and (-webkit-min-device-pixel-ratio: 1.25) and (-webkit-max-device-pixel-ratio: 1.49), " +
|
||||
"screen and (min-resolution: 1.25dppx) and (max-resolution: 1.49dppx)",
|
||||
'pixel-ratio__1_5': "screen and (-webkit-min-device-pixel-ratio: 1.5) and (-webkit-max-device-pixel-ratio: 1.74), " +
|
||||
"screen and (min-resolution: 1.5dppx) and (max-resolution: 1.74dppx)",
|
||||
'pixel-ratio__1_75': "screen and (-webkit-min-device-pixel-ratio: 1.75) and (-webkit-max-device-pixel-ratio: 1.99), " +
|
||||
"screen and (min-resolution: 1.75dppx) and (max-resolution: 1.99dppx)",
|
||||
};
|
||||
|
||||
for (var c in matches) {
|
||||
if ( window.matchMedia(matches[c]).matches ) {
|
||||
document.body.classList.add(c);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( !window.matchMedia("screen and (-webkit-device-pixel-ratio: 1.5)," +
|
||||
|
@ -11,8 +21,8 @@ function checkScaling() {
|
|||
"screen and (-webkit-device-pixel-ratio: 2)").matches )
|
||||
{
|
||||
// don't add zoom for mobile devices
|
||||
if (!(/android|avantgo|playbook|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent || navigator.vendor || window.opera)))
|
||||
document.getElementsByTagName('html')[0].setAttribute('style', 'zoom: ' + (1 / window.devicePixelRatio) + ';');
|
||||
// if (!(/android|avantgo|playbook|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent || navigator.vendor || window.opera)))
|
||||
// document.getElementsByTagName('html')[0].setAttribute('style', 'zoom: ' + (1 / window.devicePixelRatio) + ';');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -136,29 +136,56 @@ var utils = new(function() {
|
|||
scale = window.AscCommon.checkDeviceScale();
|
||||
AscCommon.correctApplicationScale(scale);
|
||||
} else {
|
||||
var str_mq_150 = "screen and (-webkit-min-device-pixel-ratio: 1.5) and (-webkit-max-device-pixel-ratio: 1.9), " +
|
||||
"screen and (min-resolution: 1.5dppx) and (max-resolution: 1.9dppx)";
|
||||
var str_mq_125 = "screen and (-webkit-min-device-pixel-ratio: 1.25) and (-webkit-max-device-pixel-ratio: 1.49), " +
|
||||
"screen and (min-resolution: 1.25dppx) and (max-resolution: 1.49dppx)";
|
||||
var str_mq_150 = "screen and (-webkit-min-device-pixel-ratio: 1.5) and (-webkit-max-device-pixel-ratio: 1.74), " +
|
||||
"screen and (min-resolution: 1.5dppx) and (max-resolution: 1.74dppx)";
|
||||
var str_mq_175 = "screen and (-webkit-min-device-pixel-ratio: 1.75) and (-webkit-max-device-pixel-ratio: 1.99), " +
|
||||
"screen and (min-resolution: 1.75dppx) and (max-resolution: 1.99dppx)";
|
||||
var str_mq_200 = "screen and (-webkit-min-device-pixel-ratio: 2), " +
|
||||
"screen and (min-resolution: 2dppx), screen and (min-resolution: 192dpi)";
|
||||
|
||||
if ( window.matchMedia(str_mq_125).matches ) {
|
||||
scale.devicePixelRatio = 1.5;
|
||||
} else
|
||||
if ( window.matchMedia(str_mq_150).matches ) {
|
||||
scale.devicePixelRatio = 1.5;
|
||||
} else
|
||||
if ( window.matchMedia(str_mq_175).matches ) {
|
||||
scale.devicePixelRatio = 1.75;
|
||||
} else
|
||||
if ( window.matchMedia(str_mq_200).matches )
|
||||
scale.devicePixelRatio = 2;
|
||||
else scale.devicePixelRatio = 1;
|
||||
}
|
||||
|
||||
var $root = $(document.body);
|
||||
if ( scale.devicePixelRatio < 1.5 ) {
|
||||
$root.removeClass('pixel-ratio__1_5 pixel-ratio__2');
|
||||
var classes = document.body.className;
|
||||
var clear_list = classes.replace(/pixel-ratio__[\w-]+/gi,'').trim();
|
||||
if ( scale.devicePixelRatio < 1.25 ) {
|
||||
if ( /pixel-ratio__/.test(classes) ) {
|
||||
document.body.className = clear_list;
|
||||
}
|
||||
} else
|
||||
if ( !(scale.devicePixelRatio < 1.5) && scale.devicePixelRatio < 2 ) {
|
||||
$root.removeClass('pixel-ratio__2');
|
||||
$root.addClass('pixel-ratio__1_5');
|
||||
if ( scale.devicePixelRatio < 1.5 ) {
|
||||
if ( !/pixel-ratio__1_25/.test(classes) ) {
|
||||
document.body.className = clear_list + ' pixel-ratio__1_25';
|
||||
}
|
||||
} else
|
||||
if ( scale.devicePixelRatio < 1.75 ) {
|
||||
if ( !/pixel-ratio__1_5/.test(classes) ) {
|
||||
document.body.className = clear_list + ' pixel-ratio__1_5';
|
||||
}
|
||||
} else
|
||||
if ( !(scale.devicePixelRatio < 1.75) && scale.devicePixelRatio < 2 ) {
|
||||
if ( !/pixel-ratio__1_75/.test(classes) ) {
|
||||
document.body.className = clear_list + ' pixel-ratio__1_75';
|
||||
}
|
||||
} else {
|
||||
$root.addClass('pixel-ratio__2');
|
||||
$root.removeClass('pixel-ratio__1_5');
|
||||
if ( !/pixel-ratio__2/.test(classes) ) {
|
||||
document.body.className = clear_list + ' pixel-ratio__2';
|
||||
}
|
||||
}
|
||||
|
||||
me.zoom = scale.correct ? scale.zoom : 1;
|
||||
|
@ -886,7 +913,7 @@ Common.Utils.lockControls = function(causes, lock, opts, defControls) {
|
|||
});
|
||||
};
|
||||
|
||||
Common.Utils.injectButtons = function($slots, id, iconCls, caption, lock, split, menu, toggle) {
|
||||
Common.Utils.injectButtons = function($slots, id, iconCls, caption, lock, split, menu, toggle, dataHint, dataHintDirection, dataHintOffset, dataHintTitle) {
|
||||
var btnsArr = createButtonSet();
|
||||
btnsArr.setDisabled(true);
|
||||
id = id || ("id-toolbar-" + iconCls);
|
||||
|
@ -904,7 +931,11 @@ Common.Utils.injectButtons = function($slots, id, iconCls, caption, lock, split,
|
|||
menu: menu || false,
|
||||
enableToggle: toggle || false,
|
||||
lock: lock,
|
||||
disabled: true
|
||||
disabled: true,
|
||||
dataHint: dataHint,
|
||||
dataHintDirection: dataHintDirection,
|
||||
dataHintOffset: dataHintOffset,
|
||||
dataHintTitle: dataHintTitle
|
||||
});
|
||||
|
||||
btnsArr.add(button);
|
||||
|
|
|
@ -156,7 +156,7 @@ define([
|
|||
this._onBtnAddMessage(event);
|
||||
}
|
||||
} else
|
||||
if (event.keyCode == Common.UI.Keys.ESC) {
|
||||
if (event.keyCode == Common.UI.Keys.ESC && !Common.UI.HintManager.isHintVisible()) {
|
||||
this.hide();
|
||||
}
|
||||
},
|
||||
|
|
|
@ -102,7 +102,7 @@ define([
|
|||
var view = this,
|
||||
textBox = $(this.el).find('textarea'),
|
||||
domTextBox = null,
|
||||
minHeight = 50,
|
||||
minHeight = 55,
|
||||
lineHeight = 0,
|
||||
scrollPos = 0,
|
||||
oldHeight = 0,
|
||||
|
@ -293,6 +293,9 @@ define([
|
|||
Common.UI.BaseView.prototype.initialize.call(this, options);
|
||||
|
||||
this.store = this.options.store;
|
||||
|
||||
var filter = Common.localStorage.getKeysFilter();
|
||||
this.appPrefix = (filter && filter.length) ? filter.split(',')[0] : '';
|
||||
},
|
||||
|
||||
render: function () {
|
||||
|
@ -304,7 +307,8 @@ define([
|
|||
textAddComment: me.textAddComment,
|
||||
textCancel: me.textCancel,
|
||||
textEnterCommentHint: me.textEnterCommentHint,
|
||||
maxCommLength: Asc.c_oAscMaxCellOrCommentLength
|
||||
maxCommLength: Asc.c_oAscMaxCellOrCommentLength,
|
||||
textComments: me.textComments
|
||||
}));
|
||||
|
||||
this.buttonAddCommentToDoc = new Common.UI.Button({
|
||||
|
@ -321,9 +325,73 @@ define([
|
|||
enableToggle: false
|
||||
});
|
||||
|
||||
this.buttonSort = new Common.UI.Button({
|
||||
parentEl: $('#comments-btn-sort', this.$el),
|
||||
cls: 'btn-toolbar',
|
||||
iconCls: 'toolbar__icon btn-sorting',
|
||||
hint: this.textSort,
|
||||
menu: new Common.UI.Menu({
|
||||
menuAlign: 'tr-br',
|
||||
style: 'min-width: auto;',
|
||||
items: [
|
||||
{
|
||||
caption: this.mniDateDesc,
|
||||
value: 'date-desc',
|
||||
checkable: true,
|
||||
checked: (Common.localStorage.getItem(this.appPrefix + "comments-sort") || 'date-desc') === 'date-desc',
|
||||
toggleGroup: 'sortcomments'
|
||||
},
|
||||
{
|
||||
caption: this.mniDateAsc,
|
||||
value: 'date-asc',
|
||||
checkable: true,
|
||||
checked: (Common.localStorage.getItem(this.appPrefix + "comments-sort") || 'date-desc') === 'date-asc',
|
||||
toggleGroup: 'sortcomments'
|
||||
},
|
||||
{
|
||||
caption: this.mniAuthorAsc,
|
||||
value: 'author-asc',
|
||||
checkable: true,
|
||||
checked: Common.localStorage.getItem(this.appPrefix + "comments-sort") === 'author-asc',
|
||||
toggleGroup: 'sortcomments'
|
||||
},
|
||||
{
|
||||
caption: this.mniAuthorDesc,
|
||||
value: 'author-desc',
|
||||
checkable: true,
|
||||
checked: Common.localStorage.getItem(this.appPrefix + "comments-sort") === 'author-desc',
|
||||
toggleGroup: 'sortcomments'
|
||||
}
|
||||
// {
|
||||
// caption: this.mniPositionAsc,
|
||||
// value: 'position-asc',
|
||||
// checkable: true,
|
||||
// checked: Common.localStorage.getItem(this.appPrefix + "comments-sort") === 'position-asc',
|
||||
// toggleGroup: 'sortcomments'
|
||||
// }
|
||||
// {
|
||||
// caption: this.mniPositionDesc,
|
||||
// value: 'position-desc',
|
||||
// checkable: true,
|
||||
// checked: Common.localStorage.getItem(this.appPrefix + "comments-sort") === 'position-desc',
|
||||
// toggleGroup: 'sortcomments'
|
||||
// }
|
||||
]
|
||||
})
|
||||
});
|
||||
|
||||
this.buttonClose = new Common.UI.Button({
|
||||
parentEl: $('#comments-btn-close', this.$el),
|
||||
cls: 'btn-toolbar',
|
||||
iconCls: 'toolbar__icon btn-close',
|
||||
hint: this.textClosePanel
|
||||
});
|
||||
|
||||
this.buttonAddCommentToDoc.on('click', _.bind(this.onClickShowBoxDocumentComment, this));
|
||||
this.buttonAdd.on('click', _.bind(this.onClickAddDocumentComment, this));
|
||||
this.buttonCancel.on('click', _.bind(this.onClickCancelDocumentComment, this));
|
||||
this.buttonClose.on('click', _.bind(this.onClickClosePanel, this));
|
||||
this.buttonSort.menu.on('item:toggle', _.bind(this.onSortClick, this));
|
||||
|
||||
this.txtComment = $('#comment-msg-new', this.el);
|
||||
this.txtComment.keydown(function (event) {
|
||||
|
@ -658,6 +726,9 @@ define([
|
|||
getUserName: function (username) {
|
||||
return Common.Utils.String.htmlEncode(AscCommon.UserInfoParser.getParsedName(username));
|
||||
},
|
||||
getEncodedName: function (username) {
|
||||
return Common.Utils.String.htmlEncode(username);
|
||||
},
|
||||
|
||||
pickLink: function (message) {
|
||||
var arr = [], offset, len;
|
||||
|
@ -730,6 +801,14 @@ define([
|
|||
});
|
||||
},
|
||||
|
||||
onSortClick: function(menu, item, state) {
|
||||
state && this.fireEvent('comment:sort', [item.value]);
|
||||
},
|
||||
|
||||
onClickClosePanel: function() {
|
||||
Common.NotificationCenter.trigger('leftmenu:change', 'hide');
|
||||
},
|
||||
|
||||
textComments : 'Comments',
|
||||
textAnonym : 'Guest',
|
||||
textAddCommentToDoc : 'Add Comment to Document',
|
||||
|
@ -744,6 +823,14 @@ define([
|
|||
textEdit : 'Edit',
|
||||
textAdd : "Add",
|
||||
textOpenAgain : "Open Again",
|
||||
textHintAddComment : 'Add Comment'
|
||||
textHintAddComment : 'Add Comment',
|
||||
textSort: 'Sort comments',
|
||||
mniPositionAsc: 'From top',
|
||||
mniPositionDesc: 'From bottom',
|
||||
mniAuthorAsc: 'Author A to Z',
|
||||
mniAuthorDesc: 'Author Z to A',
|
||||
mniDateDesc: 'Newest',
|
||||
mniDateAsc: 'Oldest',
|
||||
textClosePanel: 'Close comments'
|
||||
}, Common.Views.Comments || {}))
|
||||
});
|
|
@ -85,7 +85,7 @@ define([
|
|||
'<div class="hedset">' +
|
||||
// '<span class="btn-slot text" id="slot-btn-users"></span>' +
|
||||
'<section id="tlb-box-users" class="box-cousers dropdown"">' +
|
||||
'<div class="btn-users">' +
|
||||
'<div class="btn-users" data-hint="0" data-hint-direction="bottom" data-hint-offset="big">' +
|
||||
'<i class="icon toolbar__icon icon--inverse btn-users"></i>' +
|
||||
'<label class="caption">+</label>' +
|
||||
'</div>' +
|
||||
|
@ -97,13 +97,14 @@ define([
|
|||
'</section>'+
|
||||
'</div>' +
|
||||
'<div class="hedset">' +
|
||||
'<div class="btn-slot" id="slot-btn-mode"></div>' +
|
||||
'<div class="btn-slot" id="slot-btn-back"></div>' +
|
||||
'<div class="btn-slot" id="slot-btn-favorite"></div>' +
|
||||
'<div class="btn-slot" id="slot-btn-options"></div>' +
|
||||
'</div>' +
|
||||
'<div class="hedset">' +
|
||||
'<div class="btn-slot" id="slot-btn-user-name"></div>' +
|
||||
'<div class="btn-current-user hidden">' +
|
||||
'<div class="btn-current-user btn-header hidden">' +
|
||||
'<i class="icon toolbar__icon icon--inverse btn-user"></i>' +
|
||||
'</div>' +
|
||||
'</div>' +
|
||||
|
@ -350,6 +351,10 @@ define([
|
|||
|
||||
if ( me.btnOptions )
|
||||
me.btnOptions.updateHint(me.tipViewSettings);
|
||||
|
||||
if ( me.btnContentMode ) {
|
||||
me.btnContentMode.on('click', function (e) { Common.UI.Themes.toggleContentTheme(); });
|
||||
}
|
||||
}
|
||||
|
||||
function onDocNameKeyDown(e) {
|
||||
|
@ -386,6 +391,12 @@ define([
|
|||
}
|
||||
}
|
||||
|
||||
function onContentThemeChangedToDark(isdark) {
|
||||
if ( this.btnContentMode ) {
|
||||
this.btnContentMode.changeIcon(!isdark ? {curr: 'btn-mode-dark', next: 'btn-mode-light'} : {curr: 'btn-mode-light', next: 'btn-mode-dark'});
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
options: {
|
||||
branding: {},
|
||||
|
@ -415,7 +426,10 @@ define([
|
|||
id: 'btn-goback',
|
||||
cls: 'btn-header',
|
||||
iconCls: 'toolbar__icon icon--inverse btn-goback',
|
||||
split: true
|
||||
split: true,
|
||||
dataHint: '0',
|
||||
dataHintDirection: 'bottom',
|
||||
dataHintOffset: 'big'
|
||||
});
|
||||
|
||||
storeUsers = this.options.storeUsers;
|
||||
|
@ -428,7 +442,10 @@ define([
|
|||
me.btnOptions = new Common.UI.Button({
|
||||
cls: 'btn-header no-caret',
|
||||
iconCls: 'toolbar__icon icon--inverse btn-ic-options',
|
||||
menu: true
|
||||
menu: true,
|
||||
dataHint: '0',
|
||||
dataHintDirection: 'bottom',
|
||||
dataHintOffset: 'big'
|
||||
});
|
||||
|
||||
me.mnuZoom = {options: {value: 100}};
|
||||
|
@ -436,7 +453,10 @@ define([
|
|||
me.btnFavorite = new Common.UI.Button({
|
||||
id: 'btn-favorite',
|
||||
cls: 'btn-header',
|
||||
iconCls: 'toolbar__icon icon--inverse btn-favorite'
|
||||
iconCls: 'toolbar__icon icon--inverse btn-favorite',
|
||||
dataHint: '0',
|
||||
dataHintDirection: 'bottom',
|
||||
dataHintOffset: 'big'
|
||||
});
|
||||
|
||||
Common.NotificationCenter.on({
|
||||
|
@ -444,6 +464,7 @@ define([
|
|||
'app:face': function(mode) {Common.Utils.asyncCall(onAppShowed, me, mode);}
|
||||
});
|
||||
Common.NotificationCenter.on('collaboration:sharingdeny', onLostEditRights);
|
||||
Common.NotificationCenter.on('contenttheme:dark', onContentThemeChangedToDark.bind(this));
|
||||
},
|
||||
|
||||
render: function (el, role) {
|
||||
|
@ -459,7 +480,10 @@ define([
|
|||
return (new Common.UI.Button({
|
||||
cls: 'btn-header',
|
||||
iconCls: iconid,
|
||||
disabled: disabled === true
|
||||
disabled: disabled === true,
|
||||
dataHint:'0',
|
||||
dataHintDirection: 'left',
|
||||
dataHintOffset: '10, 10'
|
||||
})).render(slot);
|
||||
}
|
||||
|
||||
|
@ -536,6 +560,11 @@ define([
|
|||
|
||||
$panelUsers.hide();
|
||||
|
||||
if ( !!window.DE ) {
|
||||
var mode_cls = Common.UI.Themes.isContentThemeDark() ? 'btn-mode-dark' : 'btn-mode-light';
|
||||
me.btnContentMode = createTitleButton('toolbar__icon icon--inverse ' + mode_cls, $html.findById('#slot-btn-mode'));
|
||||
}
|
||||
|
||||
return $html;
|
||||
} else
|
||||
if ( role == 'title' ) {
|
||||
|
|
|
@ -292,7 +292,9 @@ define([
|
|||
parentEl: $window.find('#id-dlg-list-color'),
|
||||
style: "width:45px;",
|
||||
additionalAlign: this.menuAddAlign,
|
||||
color: this.color
|
||||
color: this.color,
|
||||
cls: 'move-focus',
|
||||
takeFocusOnClose: true
|
||||
});
|
||||
this.btnColor.on('color:select', _.bind(this.onColorsSelect, this));
|
||||
this.colors = this.btnColor.getPicker();
|
||||
|
@ -321,7 +323,7 @@ define([
|
|||
},
|
||||
|
||||
getFocusedComponents: function() {
|
||||
return [this.cmbNumFormat, this.cmbBulletFormat, this.spnSize, this.spnStart];
|
||||
return [this.cmbNumFormat, this.cmbBulletFormat, this.spnSize, this.spnStart, this.btnColor];
|
||||
},
|
||||
|
||||
afterRender: function() {
|
||||
|
|
|
@ -159,7 +159,10 @@ define([
|
|||
menu: modes && modes.length > 1,
|
||||
split: modes && modes.length > 1,
|
||||
value: guid,
|
||||
hint: model.get('name')
|
||||
hint: model.get('name'),
|
||||
dataHint: '1',
|
||||
dataHintDirection: 'bottom',
|
||||
dataHintOffset: 'small'
|
||||
});
|
||||
|
||||
var $slot = $('<span class="btn-slot text x-huge"></span>').appendTo(_group);
|
||||
|
@ -386,7 +389,10 @@ define([
|
|||
menu: _menu_items.length > 1,
|
||||
split: _menu_items.length > 1,
|
||||
value: guid,
|
||||
hint: model.get('name')
|
||||
hint: model.get('name'),
|
||||
dataHint: '1',
|
||||
dataHintDirection: 'bottom',
|
||||
dataHintOffset: 'small'
|
||||
});
|
||||
|
||||
if ( btn.split ) {
|
||||
|
|
|
@ -228,7 +228,10 @@ define([
|
|||
cls: 'btn-text-default',
|
||||
style: 'width: 100%;',
|
||||
caption: this.txtInvisibleSignature,
|
||||
disabled: this._state.invisibleSignDisabled
|
||||
disabled: this._state.invisibleSignDisabled,
|
||||
dataHint: '2',
|
||||
dataHintDirection: 'bottom',
|
||||
dataHintOffset: 'medium'
|
||||
});
|
||||
this.btnsInvisibleSignature.push(button);
|
||||
if (this._isSetEvents) {
|
||||
|
@ -243,7 +246,10 @@ define([
|
|||
style: 'width: 100%;',
|
||||
caption: this.txtAddPwd,
|
||||
disabled: this._state.disabled || this._state.disabledPassword,
|
||||
visible: !this._state.hasPassword
|
||||
visible: !this._state.hasPassword,
|
||||
dataHint: '2',
|
||||
dataHintDirection: 'bottom',
|
||||
dataHintOffset: 'medium'
|
||||
});
|
||||
this.btnsAddPwd.push(button);
|
||||
if (this._isSetEvents) {
|
||||
|
@ -258,7 +264,10 @@ define([
|
|||
style: 'width: 100%;',
|
||||
caption: this.txtDeletePwd,
|
||||
disabled: this._state.disabled || this._state.disabledPassword,
|
||||
visible: this._state.hasPassword
|
||||
visible: this._state.hasPassword,
|
||||
dataHint: '2',
|
||||
dataHintDirection: 'bottom',
|
||||
dataHintOffset: 'medium'
|
||||
});
|
||||
this.btnsDelPwd.push(button);
|
||||
if (this._isSetEvents) {
|
||||
|
@ -273,7 +282,10 @@ define([
|
|||
style: 'width: 100%;',
|
||||
caption: this.txtChangePwd,
|
||||
disabled: this._state.disabled || this._state.disabledPassword,
|
||||
visible: this._state.hasPassword
|
||||
visible: this._state.hasPassword,
|
||||
dataHint: '2',
|
||||
dataHintDirection: 'bottom',
|
||||
dataHintOffset: 'medium'
|
||||
});
|
||||
this.btnsChangePwd.push(button);
|
||||
if (this._isSetEvents) {
|
||||
|
|
|
@ -237,14 +237,20 @@ define([
|
|||
cls: 'btn-toolbar x-huge icon-top',
|
||||
caption: this.txtAccept,
|
||||
split: !this.appConfig.canUseReviewPermissions,
|
||||
iconCls: 'toolbar__icon btn-review-save'
|
||||
iconCls: 'toolbar__icon btn-review-save',
|
||||
dataHint: '1',
|
||||
dataHintDirection: 'bottom',
|
||||
dataHintOffset: 'small'
|
||||
});
|
||||
|
||||
this.btnReject = new Common.UI.Button({
|
||||
cls: 'btn-toolbar x-huge icon-top',
|
||||
caption: this.txtReject,
|
||||
split: !this.appConfig.canUseReviewPermissions,
|
||||
iconCls: 'toolbar__icon btn-review-deny'
|
||||
iconCls: 'toolbar__icon btn-review-deny',
|
||||
dataHint: '1',
|
||||
dataHintDirection: 'bottom',
|
||||
dataHintOffset: 'small'
|
||||
});
|
||||
|
||||
if (this.appConfig.canFeatureComparison)
|
||||
|
@ -252,7 +258,10 @@ define([
|
|||
cls : 'btn-toolbar x-huge icon-top',
|
||||
caption : this.txtCompare,
|
||||
split : true,
|
||||
iconCls: 'toolbar__icon btn-compare'
|
||||
iconCls: 'toolbar__icon btn-compare',
|
||||
dataHint: '1',
|
||||
dataHintDirection: 'bottom',
|
||||
dataHintOffset: 'small'
|
||||
});
|
||||
|
||||
this.btnTurnOn = new Common.UI.Button({
|
||||
|
@ -260,7 +269,10 @@ define([
|
|||
iconCls: 'toolbar__icon btn-ic-review',
|
||||
caption: this.txtTurnon,
|
||||
split: !this.appConfig.isReviewOnly,
|
||||
enableToggle: true
|
||||
enableToggle: true,
|
||||
dataHint: '1',
|
||||
dataHintDirection: 'bottom',
|
||||
dataHintOffset: 'small'
|
||||
});
|
||||
this.btnsTurnReview = [this.btnTurnOn];
|
||||
}
|
||||
|
@ -268,16 +280,22 @@ define([
|
|||
this.btnPrev = new Common.UI.Button({
|
||||
cls: 'btn-toolbar x-huge icon-top',
|
||||
iconCls: 'toolbar__icon btn-review-prev',
|
||||
caption: this.txtPrev
|
||||
caption: this.txtPrev,
|
||||
dataHint: '1',
|
||||
dataHintDirection: 'bottom',
|
||||
dataHintOffset: 'small'
|
||||
});
|
||||
|
||||
this.btnNext = new Common.UI.Button({
|
||||
cls: 'btn-toolbar x-huge icon-top',
|
||||
iconCls: 'toolbar__icon btn-review-next',
|
||||
caption: this.txtNext
|
||||
caption: this.txtNext,
|
||||
dataHint: '1',
|
||||
dataHintDirection: 'bottom',
|
||||
dataHintOffset: 'small'
|
||||
});
|
||||
|
||||
if (!this.appConfig.isRestrictedEdit) {// hide Display mode option for fillForms and commenting mode
|
||||
if (!this.appConfig.isRestrictedEdit && !(this.appConfig.customization && this.appConfig.customization.review && this.appConfig.customization.review.hideReviewDisplay)) {// hide Display mode option for fillForms and commenting mode
|
||||
var menuTemplate = _.template('<a id="<%= id %>" tabindex="-1" type="menuitem"><div><%= caption %></div>' +
|
||||
'<% if (options.description !== null) { %><label style="display: block;color: #a5a5a5;cursor: pointer;white-space: normal;"><%= options.description %></label>' +
|
||||
'<% } %></a>');
|
||||
|
@ -317,7 +335,10 @@ define([
|
|||
value: 'original'
|
||||
}
|
||||
]
|
||||
})
|
||||
}),
|
||||
dataHint: '1',
|
||||
dataHintDirection: 'bottom',
|
||||
dataHintOffset: 'small'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -326,7 +347,10 @@ define([
|
|||
this.btnSharing = new Common.UI.Button({
|
||||
cls: 'btn-toolbar x-huge icon-top',
|
||||
iconCls: 'toolbar__icon btn-ic-sharing',
|
||||
caption: this.txtSharing
|
||||
caption: this.txtSharing,
|
||||
dataHint: '1',
|
||||
dataHintDirection: 'bottom',
|
||||
dataHintOffset: 'small'
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -335,7 +359,10 @@ define([
|
|||
cls: 'btn-toolbar x-huge icon-top',
|
||||
iconCls: 'toolbar__icon btn-ic-coedit',
|
||||
caption: this.txtCoAuthMode,
|
||||
menu: true
|
||||
menu: true,
|
||||
dataHint: '1',
|
||||
dataHintDirection: 'bottom',
|
||||
dataHintOffset: 'small'
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -346,7 +373,10 @@ define([
|
|||
this.btnHistory = new Common.UI.Button({
|
||||
cls: 'btn-toolbar x-huge icon-top',
|
||||
iconCls: 'toolbar__icon btn-ic-history',
|
||||
caption: this.txtHistory
|
||||
caption: this.txtHistory,
|
||||
dataHint: '1',
|
||||
dataHintDirection: 'bottom',
|
||||
dataHintOffset: 'small'
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -355,7 +385,10 @@ define([
|
|||
cls: 'btn-toolbar x-huge icon-top',
|
||||
iconCls: 'toolbar__icon btn-ic-chat',
|
||||
caption: this.txtChat,
|
||||
enableToggle: true
|
||||
enableToggle: true,
|
||||
dataHint: '1',
|
||||
dataHintDirection: 'bottom',
|
||||
dataHintOffset: 'small'
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -364,13 +397,19 @@ define([
|
|||
cls: 'btn-toolbar x-huge icon-top',
|
||||
caption: this.txtCommentRemove,
|
||||
split: true,
|
||||
iconCls: 'toolbar__icon btn-rem-comment'
|
||||
iconCls: 'toolbar__icon btn-rem-comment',
|
||||
dataHint: '1',
|
||||
dataHintDirection: 'bottom',
|
||||
dataHintOffset: 'small'
|
||||
});
|
||||
this.btnCommentResolve = new Common.UI.Button({
|
||||
cls: 'btn-toolbar x-huge icon-top',
|
||||
caption: this.txtCommentResolve,
|
||||
split: true,
|
||||
iconCls: 'toolbar__icon btn-resolve-all'
|
||||
iconCls: 'toolbar__icon btn-resolve-all',
|
||||
dataHint: '1',
|
||||
dataHintDirection: 'bottom',
|
||||
dataHintOffset: 'small'
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -669,7 +708,10 @@ define([
|
|||
checkable: true,
|
||||
toggleGroup: 'menuTurnReviewStb'
|
||||
}
|
||||
]})
|
||||
]}),
|
||||
dataHint: '0',
|
||||
dataHintDirection: 'top',
|
||||
dataHintOffset: '2, -16'
|
||||
});
|
||||
|
||||
this.btnsTurnReview.push(button);
|
||||
|
@ -682,7 +724,10 @@ define([
|
|||
iconCls: 'toolbar__icon btn-ic-docspell',
|
||||
hintAnchor : 'top',
|
||||
hint: this.tipSetSpelling,
|
||||
enableToggle: true
|
||||
enableToggle: true,
|
||||
dataHint: '0',
|
||||
dataHintDirection: 'top',
|
||||
dataHintOffset: 'small'
|
||||
});
|
||||
this.btnsSpelling.push(button);
|
||||
|
||||
|
@ -693,7 +738,10 @@ define([
|
|||
iconCls: 'toolbar__icon btn-ic-doclang',
|
||||
hintAnchor : 'top',
|
||||
hint: this.tipSetDocLang,
|
||||
disabled: true
|
||||
disabled: true,
|
||||
dataHint: '0',
|
||||
dataHintDirection: 'top',
|
||||
dataHintOffset: 'small'
|
||||
});
|
||||
this.btnsDocLang.push(button);
|
||||
|
||||
|
|
|
@ -176,7 +176,7 @@ define([
|
|||
var view = this,
|
||||
textBox = this.$el.find('textarea'),
|
||||
domTextBox = null,
|
||||
minHeight = 50,
|
||||
minHeight = 55,
|
||||
lineHeight = 0,
|
||||
scrollPos = 0,
|
||||
oldHeight = 0,
|
||||
|
|
|
@ -105,15 +105,15 @@ define([
|
|||
'<table style="margin-top: 30px;">',
|
||||
'<tr>',
|
||||
'<td><label style="font-weight: bold;margin-bottom: 3px;">' + this.textCertificate + '</label></td>' +
|
||||
'<td rowspan="2" style="vertical-align: top; padding-left: 30px;"><button id="id-dlg-sign-change" class="btn btn-text-default" style="">' + this.textSelect + '</button></td>',
|
||||
'<td rowspan="2" style="vertical-align: top; padding-left: 20px;"><button id="id-dlg-sign-change" class="btn btn-text-default" style="float:right;">' + this.textSelect + '</button></td>',
|
||||
'</tr>',
|
||||
'<tr><td><div id="id-dlg-sign-certificate" class="hidden" style="max-width: 212px;overflow: hidden;"></td></tr>',
|
||||
'<tr><td><div id="id-dlg-sign-certificate" class="hidden" style="max-width: 240px;overflow: hidden;white-space: nowrap;"></td></tr>',
|
||||
'</table>',
|
||||
'</div>'
|
||||
].join('');
|
||||
|
||||
this.templateCertificate = _.template([
|
||||
'<label style="display: block;margin-bottom: 3px;"><%= Common.Utils.String.htmlEncode(name) %></label>',
|
||||
'<label style="display: block;margin-bottom: 3px;overflow: hidden;text-overflow: ellipsis;"><%= Common.Utils.String.htmlEncode(name) %></label>',
|
||||
'<label style="display: block;"><%= Common.Utils.String.htmlEncode(valid) %></label>'
|
||||
].join(''));
|
||||
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"en": ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"],
|
||||
"ru": ["а", "б", "в", "г", "д", "е", "ё", "ж", "з", "и", "й", "к", "л", "м", "н", "о", "п", "р", "с", "т", "у", "ф", "х", "ц", "ч", "ш", "щ", "э", "ю", "я"]
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"en": ["q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "[", "]", "a", "s", "d", "f", "g", "h", "j", "k", "l", ";", "'", "z", "x", "c", "v", "b", "n", "m"],
|
||||
"ru": ["й", "ц", "у", "к", "е", "н", "г", "ш", "щ", "з", "х", "ъ", "ф", "ы", "в", "а", "п", "р", "о", "л", "д", "ж", "э", "я", "ч", "с", "м", "и", "т", "ь", "б", "ю"],
|
||||
"de": ["q", "w", "e", "r", "t", "z", "u", "i", "o", "p", "ü", "a", "s", "d", "f", "g", "h", "j", "k", "l", "ö", "ä", "z", "x", "c", "v", "b", "n", "m"],
|
||||
"fr": ["a", "z", "e", "r", "t", "y", "u", "i", "o", "p", "q", "s", "d", "f", "g", "h", "j", "k", "l", "m", "w", "x", "c", "v", "b", "n"]
|
||||
}
|
10
apps/common/main/resources/img/doc-formats/docm.svg
Normal file
|
@ -0,0 +1,10 @@
|
|||
<svg width="100" height="127" viewBox="0 0 100 127" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<symbol id="svg-format-docm">
|
||||
<path d="M95 23V119C95 119.796 94.6839 120.559 94.1213 121.121C93.5587 121.684 92.7956 122 92 122H8C7.20435 122 6.44129 121.684 5.87868 121.121C5.31607 120.559 5 119.796 5 119V8C5 7.20435 5.31607 6.44129 5.87868 5.87868C6.44129 5.31607 7.20435 5 8 5H77L95 23Z" fill="#214479"/>
|
||||
<path opacity="0.2" d="M95 23H80C79.2044 23 78.4413 22.6839 77.8787 22.1213C77.3161 21.5587 77 20.7956 77 20V5L95 23Z" fill="black"/>
|
||||
<path d="M39.4824 109.635C39.4824 111.045 39.0801 112.125 38.2754 112.875C37.4746 113.625 36.3164 114 34.8008 114H32.375V105.434H35.0645C36.4629 105.434 37.5488 105.803 38.3223 106.541C39.0957 107.279 39.4824 108.311 39.4824 109.635ZM37.5957 109.682C37.5957 107.842 36.7832 106.922 35.1582 106.922H34.1914V112.5H34.9707C36.7207 112.5 37.5957 111.561 37.5957 109.682ZM49.0332 109.705C49.0332 111.123 48.6816 112.213 47.9785 112.975C47.2754 113.736 46.2676 114.117 44.9551 114.117C43.6426 114.117 42.6348 113.736 41.9316 112.975C41.2285 112.213 40.877 111.119 40.877 109.693C40.877 108.268 41.2285 107.18 41.9316 106.43C42.6387 105.676 43.6504 105.299 44.9668 105.299C46.2832 105.299 47.2891 105.678 47.9844 106.436C48.6836 107.193 49.0332 108.283 49.0332 109.705ZM42.7812 109.705C42.7812 110.662 42.9629 111.383 43.3262 111.867C43.6895 112.352 44.2324 112.594 44.9551 112.594C46.4043 112.594 47.1289 111.631 47.1289 109.705C47.1289 107.775 46.4082 106.811 44.9668 106.811C44.2441 106.811 43.6992 107.055 43.332 107.543C42.9648 108.027 42.7812 108.748 42.7812 109.705ZM54.4473 106.822C53.7637 106.822 53.2344 107.08 52.8594 107.596C52.4844 108.107 52.2969 108.822 52.2969 109.74C52.2969 111.65 53.0137 112.605 54.4473 112.605C55.0488 112.605 55.7773 112.455 56.6328 112.154V113.678C55.9297 113.971 55.1445 114.117 54.2773 114.117C53.0312 114.117 52.0781 113.74 51.418 112.986C50.7578 112.229 50.4277 111.143 50.4277 109.729C50.4277 108.838 50.5898 108.059 50.9141 107.391C51.2383 106.719 51.7031 106.205 52.3086 105.85C52.918 105.49 53.6309 105.311 54.4473 105.311C55.2793 105.311 56.1152 105.512 56.9551 105.914L56.3691 107.391C56.0488 107.238 55.7266 107.105 55.4023 106.992C55.0781 106.879 54.7598 106.822 54.4473 106.822ZM62.0879 114L60.0254 107.279H59.9727C60.0469 108.646 60.084 109.559 60.084 110.016V114H58.4609V105.434H60.9336L62.9609 111.984H62.9961L65.1465 105.434H67.6191V114H65.9258V109.945C65.9258 109.754 65.9277 109.533 65.9316 109.283C65.9395 109.033 65.9668 108.369 66.0137 107.291H65.9609L63.752 114H62.0879Z" fill="white"/>
|
||||
<path d="M67.8 48L61.5 75L54.5 48H51.5H48.5L41.5 75L35.2 48H29.4L37.9 82H44.3L51.5 54.1L58.7 82H65.1L73.6 48H67.8Z" fill="white"/>
|
||||
<path d="M15 17C15 15.8954 15.8954 15 17 15H29C30.1046 15 31 15.8954 31 17V26C31 27.1046 30.1046 28 29 28H17C15.8954 28 15 27.1046 15 26V17Z" fill="white"/>
|
||||
<path d="M22.2969 26L19.8125 18.8457H19.7656C19.832 19.9082 19.8652 20.9043 19.8652 21.834V26H18.5938V17.4336H20.5684L22.9473 24.248H22.9824L25.4316 17.4336H27.4121V26H26.0645V21.7637C26.0645 21.3379 26.0742 20.7832 26.0938 20.0996C26.1172 19.416 26.1367 19.002 26.1523 18.8574H26.1055L23.5332 26H22.2969Z" fill="#214479"/>
|
||||
</symbol>
|
||||
</svg>
|
After Width: | Height: | Size: 3.1 KiB |
14
apps/common/main/resources/img/doc-formats/pptm.svg
Normal file
|
@ -0,0 +1,14 @@
|
|||
<svg width="100" height="127" viewBox="0 0 100 127" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<symbol id="svg-format-pptm">
|
||||
<path d="M95 23V119C95 119.796 94.6839 120.559 94.1213 121.121C93.5587 121.684 92.7956 122 92 122H8C7.20435 122 6.44129 121.684 5.87868 121.121C5.31607 120.559 5 119.796 5 119V8C5 7.20435 5.31607 6.44129 5.87868 5.87868C6.44129 5.31607 7.20435 5 8 5H77L95 23Z" fill="#DD682B"/>
|
||||
<path opacity="0.2" d="M95 23H80C79.2044 23 78.4413 22.6839 77.8787 22.1213C77.3161 21.5587 77 20.7956 77 20V5L95 23Z" fill="black"/>
|
||||
<path d="M37.2146 109.465H37.8123C38.3708 109.465 38.7888 109.355 39.0662 109.137C39.3435 108.914 39.4822 108.592 39.4822 108.17C39.4822 107.744 39.365 107.43 39.1306 107.227C38.9001 107.023 38.5369 106.922 38.0408 106.922H37.2146V109.465ZM41.3162 108.105C41.3162 109.027 41.0271 109.732 40.449 110.221C39.8748 110.709 39.0564 110.953 37.9939 110.953H37.2146V114H35.3982V105.434H38.1345C39.1736 105.434 39.9626 105.658 40.5017 106.107C41.0447 106.553 41.3162 107.219 41.3162 108.105ZM44.7498 109.465H45.3474C45.906 109.465 46.324 109.355 46.6013 109.137C46.8787 108.914 47.0173 108.592 47.0173 108.17C47.0173 107.744 46.9001 107.43 46.6658 107.227C46.4353 107.023 46.072 106.922 45.5759 106.922H44.7498V109.465ZM48.8513 108.105C48.8513 109.027 48.5623 109.732 47.9841 110.221C47.4099 110.709 46.5916 110.953 45.5291 110.953H44.7498V114H42.9333V105.434H45.6697C46.7087 105.434 47.4978 105.658 48.0369 106.107C48.5798 106.553 48.8513 107.219 48.8513 108.105ZM53.7732 114H51.9568V106.945H49.6306V105.434H56.0994V106.945H53.7732V114ZM61.0447 114L58.9822 107.279H58.9294C59.0037 108.646 59.0408 109.559 59.0408 110.016V114H57.4177V105.434H59.8904L61.9177 111.984H61.9529L64.1033 105.434H66.5759V114H64.8826V109.945C64.8826 109.754 64.8845 109.533 64.8884 109.283C64.8962 109.033 64.9236 108.369 64.9705 107.291H64.9177L62.7087 114H61.0447Z" fill="white"/>
|
||||
<path d="M50 69C54.2435 69 58.3131 67.3143 61.3137 64.3137C64.3143 61.3131 66 57.2435 66 53H50V37C45.7565 37 41.6869 38.6857 38.6863 41.6863C35.6857 44.6869 34 48.7565 34 53C34 57.2435 35.6857 61.3131 38.6863 64.3137C41.6869 67.3143 45.7565 69 50 69Z" fill="white"/>
|
||||
<path d="M53 34V50H69C69 45.7565 67.3143 41.6869 64.3137 38.6863C61.3131 35.6857 57.2435 34 53 34Z" fill="white"/>
|
||||
<path d="M75 89H25V91H75V89Z" fill="white"/>
|
||||
<path d="M75 83H25V85H75V83Z" fill="white"/>
|
||||
<path d="M75 77H25V79H75V77Z" fill="white"/>
|
||||
<path d="M15 17C15 15.8954 15.8954 15 17 15H29C30.1046 15 31 15.8954 31 17V26C31 27.1046 30.1046 28 29 28H17C15.8954 28 15 27.1046 15 26V17Z" fill="white"/>
|
||||
<path d="M22.2969 26L19.8125 18.8457H19.7656C19.832 19.9082 19.8652 20.9043 19.8652 21.834V26H18.5938V17.4336H20.5684L22.9473 24.248H22.9824L25.4316 17.4336H27.4121V26H26.0645V21.7637C26.0645 21.3379 26.0742 20.7832 26.0938 20.0996C26.1172 19.416 26.1367 19.002 26.1523 18.8574H26.1055L23.5332 26H22.2969Z" fill="#DD682B"/>
|
||||
</symbol>
|
||||
</svg>
|
After Width: | Height: | Size: 2.8 KiB |
10
apps/common/main/resources/img/doc-formats/xlsm.svg
Normal file
|
@ -0,0 +1,10 @@
|
|||
<svg width="100" height="127" viewBox="0 0 100 127" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<symbol id="svg-format-xlsm">
|
||||
<path d="M95 23V119C95 119.796 94.6839 120.559 94.1213 121.121C93.5587 121.684 92.7956 122 92 122H8C7.20435 122 6.44129 121.684 5.87868 121.121C5.31607 120.559 5 119.796 5 119V8C5 7.20435 5.31607 6.44129 5.87868 5.87868C6.44129 5.31607 7.20435 5 8 5H77L95 23Z" fill="#1F7244"/>
|
||||
<path opacity="0.2" d="M95 23H80C79.2044 23 78.4413 22.6839 77.8787 22.1213C77.3161 21.5587 77 20.7956 77 20V5L95 23Z" fill="black"/>
|
||||
<path d="M42.4446 114H40.3704L38.3782 110.76L36.386 114H34.4407L37.2825 109.582L34.6223 105.434H36.6262L38.4719 108.516L40.2825 105.434H42.2395L39.55 109.682L42.4446 114ZM43.5227 114V105.434H45.3391V112.5H48.8137V114H43.5227ZM55.3645 111.621C55.3645 112.395 55.0852 113.004 54.5266 113.449C53.9719 113.895 53.1985 114.117 52.2063 114.117C51.2922 114.117 50.4836 113.945 49.7805 113.602V111.914C50.3586 112.172 50.8469 112.354 51.2454 112.459C51.6477 112.564 52.0149 112.617 52.3469 112.617C52.7454 112.617 53.05 112.541 53.261 112.389C53.4758 112.236 53.5833 112.01 53.5833 111.709C53.5833 111.541 53.5364 111.393 53.4426 111.264C53.3489 111.131 53.2102 111.004 53.0266 110.883C52.8469 110.762 52.4778 110.568 51.9192 110.303C51.3958 110.057 51.0032 109.82 50.7415 109.594C50.4797 109.367 50.2708 109.104 50.1145 108.803C49.9583 108.502 49.8801 108.15 49.8801 107.748C49.8801 106.99 50.136 106.395 50.6477 105.961C51.1633 105.527 51.8743 105.311 52.7805 105.311C53.2258 105.311 53.6497 105.363 54.052 105.469C54.4583 105.574 54.8821 105.723 55.3235 105.914L54.7375 107.326C54.2805 107.139 53.9016 107.008 53.6008 106.934C53.304 106.859 53.011 106.822 52.7219 106.822C52.3782 106.822 52.1145 106.902 51.9309 107.062C51.7473 107.223 51.6555 107.432 51.6555 107.689C51.6555 107.85 51.6926 107.99 51.7668 108.111C51.8411 108.229 51.9583 108.344 52.1184 108.457C52.2825 108.566 52.6672 108.766 53.2727 109.055C54.0735 109.438 54.6223 109.822 54.9192 110.209C55.2161 110.592 55.3645 111.062 55.3645 111.621ZM60.5442 114L58.4817 107.279H58.429C58.5032 108.646 58.5403 109.559 58.5403 110.016V114H56.9172V105.434H59.3899L61.4172 111.984H61.4524L63.6028 105.434H66.0754V114H64.3821V109.945C64.3821 109.754 64.384 109.533 64.3879 109.283C64.3958 109.033 64.4231 108.369 64.47 107.291H64.4172L62.2083 114H60.5442Z" fill="white"/>
|
||||
<path d="M52.75 61.63L64 45H58.5L50 57.56L41.5 45H36L47.25 61.63L35.5 79H41L50 65.7L59 79H64.5L52.75 61.63Z" fill="white"/>
|
||||
<path d="M15 15C15 13.8954 15.8954 13 17 13H29C30.1046 13 31 13.8954 31 15V24C31 25.1046 30.1046 26 29 26H17C15.8954 26 15 25.1046 15 24V15Z" fill="white"/>
|
||||
<path d="M22.2969 24L19.8125 16.8457H19.7656C19.832 17.9082 19.8652 18.9043 19.8652 19.834V24H18.5938V15.4336H20.5684L22.9473 22.248H22.9824L25.4316 15.4336H27.4121V24H26.0645V19.7637C26.0645 19.3379 26.0742 18.7832 26.0938 18.0996C26.1172 17.416 26.1367 17.002 26.1523 16.8574H26.1055L23.5332 24H22.2969Z" fill="#1F7244"/>
|
||||
</symbol>
|
||||
</svg>
|
After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 284 B After Width: | Height: | Size: 183 B |
Before Width: | Height: | Size: 291 B After Width: | Height: | Size: 188 B |
Before Width: | Height: | Size: 311 B After Width: | Height: | Size: 193 B |
BIN
apps/common/main/resources/img/toolbar/1x/btn-mode-dark.png
Normal file
After Width: | Height: | Size: 796 B |
BIN
apps/common/main/resources/img/toolbar/1x/btn-mode-light.png
Normal file
After Width: | Height: | Size: 530 B |
Before Width: | Height: | Size: 275 B After Width: | Height: | Size: 178 B |
BIN
apps/common/main/resources/img/toolbar/2x/btn-mode-dark@2x.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
apps/common/main/resources/img/toolbar/2x/btn-mode-light@2x.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 369 B After Width: | Height: | Size: 193 B |
|
@ -332,7 +332,7 @@
|
|||
.border-radius(1px);
|
||||
background-color: transparent;
|
||||
|
||||
.masked & {
|
||||
.masked:not(.statusbar) & {
|
||||
&:disabled {
|
||||
opacity: 1;
|
||||
}
|
||||
|
@ -677,6 +677,14 @@
|
|||
&:active:not(.disabled),
|
||||
&.active:not(.disabled) {
|
||||
.caret {
|
||||
border-color: @icon-normal;
|
||||
}
|
||||
}
|
||||
|
||||
&:not(.disabled) {
|
||||
&:focus, .btn-group.open &, .btn-group:active & {
|
||||
border-color: @border-control-focus-ie;
|
||||
border-color: @border-control-focus;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -739,6 +747,11 @@
|
|||
width: 28px;
|
||||
height: 28px;
|
||||
}
|
||||
|
||||
&:focus:not(.disabled) {
|
||||
box-shadow: inset 0 0 0 @scaled-one-px-value-ie @border-control-focus-ie;
|
||||
box-shadow: inset 0 0 0 @scaled-one-px-value @border-control-focus;
|
||||
}
|
||||
}
|
||||
|
||||
.btn-text-default {
|
||||
|
@ -978,6 +991,7 @@
|
|||
&.active:not(.disabled) {
|
||||
.caret {
|
||||
background-position: @arrow-small-offset-x @arrow-small-offset-y;
|
||||
border-color: @icon-normal;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -985,6 +999,18 @@
|
|||
&.disabled {
|
||||
opacity: @component-disabled-opacity;
|
||||
}
|
||||
|
||||
&:not(:disabled) {
|
||||
.icon {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
.icon {
|
||||
.icon();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.cnt-lang {
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
--background-notification-badge: #ffd114;
|
||||
--background-scrim: fade(black, 60%);
|
||||
--background-loader: fade(#181818, 90%);
|
||||
--background-alt-key-hint: #FFD938;
|
||||
|
||||
--highlight-button-hover: #555;
|
||||
--highlight-button-pressed: #707070;
|
||||
|
@ -56,7 +57,7 @@
|
|||
|
||||
// Canvas
|
||||
|
||||
--canvas-background: #666;
|
||||
--canvas-background: #555;
|
||||
--canvas-content-background: #fff;
|
||||
--canvas-page-border: #555;
|
||||
|
||||
|
@ -87,8 +88,8 @@
|
|||
--canvas-scroll-thumb-hover: #999;
|
||||
--canvas-scroll-thumb-pressed: #adadad;
|
||||
--canvas-scroll-thumb-border: #2a2a2a;
|
||||
--canvas-scroll-thumb-border-hover: #2a2a2a;
|
||||
--canvas-scroll-thumb-border-pressed: #2a2a2a;
|
||||
--canvas-scroll-thumb-border-hover: #999;
|
||||
--canvas-scroll-thumb-border-pressed: #adadad;
|
||||
--canvas-scroll-arrow: #999;
|
||||
--canvas-scroll-arrow-hover: #404040;
|
||||
--canvas-scroll-arrow-pressed: #404040;
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
@background-notification-badge-ie: #ffd112;
|
||||
@background-scrim-ie: fade(#000, 20%);
|
||||
@background-loader-ie: fade(#000, 65%);
|
||||
@background-alt-key-hint-ie: #FFD938;
|
||||
|
||||
@highlight-button-hover-ie: #d8dadc;
|
||||
@highlight-button-pressed-ie: #7d858c;
|
||||
|
@ -49,6 +50,9 @@
|
|||
@icon-contrast-popover-ie: #fff;
|
||||
@icon-success-ie: #5b9f27;
|
||||
|
||||
@canvas-scroll-thumb-hover-ie: #c0c0c0;
|
||||
@canvas-scroll-thumb-border-hover-ie: #cbcbcb;
|
||||
|
||||
@button-header-normal-icon-offset-x-ie: -20px;
|
||||
@button-header-active-icon-offset-x-ie: -20px;
|
||||
@scaled-one-px-value-ie: 1px;
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
--background-notification-badge: #ffd112;
|
||||
--background-scrim: fade(#000, 20%);
|
||||
--background-loader: fade(#181818, 90%);
|
||||
--background-alt-key-hint: #FFD938;
|
||||
|
||||
--highlight-button-hover: #e0e0e0;
|
||||
--highlight-button-pressed: #cbcbcb;
|
||||
|
@ -149,6 +150,7 @@
|
|||
@background-notification-badge: var(--background-notification-badge);
|
||||
@background-scrim: var(--background-scrim);
|
||||
@background-loader: var(--background-loader);
|
||||
@background-alt-key-hint: var(--background-alt-key-hint);
|
||||
|
||||
// Highlight
|
||||
// -------------------------
|
||||
|
@ -232,3 +234,5 @@
|
|||
@canvas-background: var(--canvas-background);
|
||||
@canvas-content-background: var(--canvas-content-background);
|
||||
@canvas-page-border: var(--canvas-page-border);
|
||||
@canvas-scroll-thumb-hover: var(--canvas-scroll-thumb-hover);
|
||||
@canvas-scroll-thumb-border-hover: var(--canvas-scroll-thumb-border-hover);
|
||||
|
|
|
@ -57,4 +57,18 @@
|
|||
.form-control:not(input) {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
li {
|
||||
img {
|
||||
-webkit-filter: none;
|
||||
filter: none;
|
||||
}
|
||||
|
||||
&.selected {
|
||||
img {
|
||||
-webkit-filter: none;
|
||||
filter: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -48,6 +48,12 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.active, &:active {
|
||||
.caret {
|
||||
border-color: @icon-normal;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -7,6 +7,24 @@
|
|||
display: table-row;
|
||||
}
|
||||
|
||||
#comments-header {
|
||||
position: absolute;
|
||||
height: 45px;
|
||||
left: 0;
|
||||
top: 0;
|
||||
right: 0;
|
||||
padding: 12px;
|
||||
overflow: hidden;
|
||||
border-bottom: @scaled-one-px-value-ie solid @border-toolbar-ie;
|
||||
border-bottom: @scaled-one-px-value solid @border-toolbar;
|
||||
|
||||
label {
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
margin-top: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
.messages-ct {
|
||||
position: absolute;
|
||||
overflow: hidden;
|
||||
|
@ -14,6 +32,7 @@
|
|||
right: 0;
|
||||
bottom: 45px;
|
||||
height: 300px;
|
||||
padding-top: 45px;
|
||||
border-bottom: @scaled-one-px-value-ie solid @border-toolbar-ie;
|
||||
border-bottom: @scaled-one-px-value solid @border-toolbar;
|
||||
|
||||
|
@ -94,7 +113,7 @@
|
|||
|
||||
textarea {
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
height: 55px;
|
||||
resize: none;
|
||||
margin-bottom: 5px;
|
||||
border: @scaled-one-px-value-ie solid @border-regular-control-ie;
|
||||
|
@ -273,15 +292,65 @@
|
|||
background-position: -22px -232px;
|
||||
}
|
||||
|
||||
.btn-accept {
|
||||
background-position: -2px -253px;
|
||||
|
||||
.tool {
|
||||
float: right;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
cursor: pointer;
|
||||
overflow: hidden;
|
||||
padding: 0px;
|
||||
margin-right: 2px;
|
||||
|
||||
&.btn-reject {
|
||||
position: relative;
|
||||
|
||||
&.disabled {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.btn-reject {
|
||||
background-position: -22px -253px;
|
||||
&:before, &:after {
|
||||
content: ' ';
|
||||
position: absolute;
|
||||
left: 8px;
|
||||
top: 2px;
|
||||
height: 12px;
|
||||
width: 2px;
|
||||
background-color: @icon-normal-ie;
|
||||
background-color: @icon-normal;
|
||||
}
|
||||
|
||||
.btn-resolve {
|
||||
&:before {
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
|
||||
&:after {
|
||||
transform: rotate(-45deg);
|
||||
}
|
||||
}
|
||||
|
||||
&.help {
|
||||
width: 20px;
|
||||
margin-right:0;
|
||||
line-height: 14px;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
color: @text-normal-ie;
|
||||
color: @text-normal;
|
||||
opacity: 0.7;
|
||||
|
||||
&:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
&.disabled {
|
||||
opacity: @component-disabled-opacity;
|
||||
cursor: default;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn-resolve,.btn-accept {
|
||||
position: relative;
|
||||
|
||||
&:after {
|
||||
|
|
|
@ -127,6 +127,9 @@ label {
|
|||
|
||||
.panel-menu {
|
||||
width: 260px;
|
||||
max-height: 100%;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
float: left;
|
||||
border-right: @scaled-one-px-value-ie solid @border-toolbar-ie;
|
||||
border-right: @scaled-one-px-value solid @border-toolbar;
|
||||
|
|
19
apps/common/main/resources/less/hint-manager.less
Normal file
|
@ -0,0 +1,19 @@
|
|||
.hint-div {
|
||||
display: none;
|
||||
position: absolute;
|
||||
z-index: @zindex-navbar + 3;
|
||||
width: auto;
|
||||
min-width: 18px;
|
||||
height: 18px;
|
||||
text-align: center;
|
||||
background-color: @background-alt-key-hint-ie;
|
||||
background-color: @background-alt-key-hint;
|
||||
color: @text-normal;
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
padding: 0 4px;
|
||||
box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
|
||||
&.disabled {
|
||||
opacity: 0.4;
|
||||
}
|
||||
}
|
|
@ -46,8 +46,8 @@
|
|||
.hover {
|
||||
.ps-scrollbar-x {
|
||||
&.always-visible-x {
|
||||
background-color: @border-regular-control-ie;
|
||||
background-color: @border-regular-control;
|
||||
background-color: @canvas-scroll-thumb-hover-ie;
|
||||
background-color: @canvas-scroll-thumb-hover;
|
||||
background-position: center -7px;
|
||||
}
|
||||
}
|
||||
|
@ -56,10 +56,10 @@
|
|||
&.in-scrolling {
|
||||
.ps-scrollbar-x {
|
||||
&.always-visible-x {
|
||||
background-color: @border-regular-control-ie;
|
||||
background-color: @border-regular-control;
|
||||
border-color: @border-regular-control-ie;
|
||||
border-color: @border-regular-control;
|
||||
background-color: @canvas-scroll-thumb-hover-ie;
|
||||
background-color: @canvas-scroll-thumb-hover;
|
||||
border-color: @canvas-scroll-thumb-border-hover-ie;
|
||||
border-color: @canvas-scroll-thumb-border-hover;
|
||||
background-position: center -7px;
|
||||
}
|
||||
}
|
||||
|
@ -115,8 +115,8 @@
|
|||
|
||||
.ps-scrollbar-y {
|
||||
&.always-visible-y {
|
||||
background-color: @border-regular-control-ie;
|
||||
background-color: @border-regular-control;
|
||||
background-color: @canvas-scroll-thumb-hover-ie;
|
||||
background-color: @canvas-scroll-thumb-hover;
|
||||
background-position: -7px center;
|
||||
}
|
||||
}
|
||||
|
@ -128,10 +128,10 @@
|
|||
|
||||
.ps-scrollbar-y {
|
||||
&.always-visible-y {
|
||||
background-color: @border-regular-control-ie;
|
||||
background-color: @border-regular-control;
|
||||
border-color: @border-regular-control-ie;
|
||||
border-color: @border-regular-control;
|
||||
background-color: @canvas-scroll-thumb-hover-ie;
|
||||
background-color: @canvas-scroll-thumb-hover;
|
||||
border-color: @canvas-scroll-thumb-border-hover-ie;
|
||||
border-color: @canvas-scroll-thumb-border-hover;
|
||||
background-position: -7px center;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
border: @scaled-one-px-value solid @border-color-shading;
|
||||
}
|
||||
|
||||
&:hover, &.selected {
|
||||
&:hover, &:focus, &.selected {
|
||||
border-color: @icon-normal-ie;
|
||||
border-color: @icon-normal;
|
||||
em span {
|
||||
|
|
|
@ -224,6 +224,12 @@
|
|||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
&.no-group-mask {
|
||||
.elset {
|
||||
position: relative;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.elset {
|
||||
|
@ -386,6 +392,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
.theme-type-light & {
|
||||
.extra {
|
||||
#header-logo {
|
||||
i {
|
||||
|
@ -394,6 +401,7 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tabs .scroll {
|
||||
&.left {
|
||||
|
|
|
@ -85,10 +85,8 @@
|
|||
&.close {
|
||||
position: relative;
|
||||
opacity: 0.7;
|
||||
transition: transform .3s;
|
||||
|
||||
&:hover {
|
||||
transform: scale(1.1);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@ class ContextMenuController extends Component {
|
|||
extraItems: []
|
||||
};
|
||||
|
||||
this.fastCoAuthTips = [];
|
||||
this.onMenuItemClick = this.onMenuItemClick.bind(this);
|
||||
this.onMenuClosed = this.onMenuClosed.bind(this);
|
||||
this.onActionClosed = this.onActionClosed.bind(this);
|
||||
|
@ -103,7 +104,7 @@ class ContextMenuController extends Component {
|
|||
}
|
||||
|
||||
onApiOpenContextMenu(x, y) {
|
||||
if ( !this.state.opened && $$('.dialog.modal-in').length < 1 && !$$('.popover.modal-in, .sheet-modal.modal-in').length) {
|
||||
if ( !this.state.opened && $$('.dialog.modal-in, .popover.modal-in, .sheet-modal.modal-in, .popup.modal-in, #pe-preview, .add-comment-popup').length < 1) {
|
||||
this.setState({
|
||||
items: this.initMenuItems(),
|
||||
extraItems: this.initExtraItems()
|
||||
|
@ -161,9 +162,6 @@ class ContextMenuController extends Component {
|
|||
/** coauthoring begin **/
|
||||
const tipHeight = 20;
|
||||
|
||||
if (!this.fastCoAuthTips) {
|
||||
this.fastCoAuthTips = [];
|
||||
}
|
||||
let src;
|
||||
for (let i=0; i<this.fastCoAuthTips.length; i++) {
|
||||
if (this.fastCoAuthTips[i].attr('userid') === UserId) {
|
||||
|
|
|
@ -182,7 +182,31 @@ const PluginsController = inject('storeAppOptions')(observer(props => {
|
|||
|
||||
const onPluginsInit = pluginsdata => {
|
||||
!(pluginsdata instanceof Array) && (pluginsdata = pluginsdata["pluginsData"]);
|
||||
registerPlugins(pluginsdata)
|
||||
parsePlugins(pluginsdata)
|
||||
};
|
||||
|
||||
const parsePlugins = pluginsdata => {
|
||||
let isEdit = storeAppOptions.isEdit;
|
||||
|
||||
if ( pluginsdata instanceof Array ) {
|
||||
let lang = storeAppOptions.lang.split(/[\-_]/)[0];
|
||||
pluginsdata.forEach((item) => {
|
||||
item.variations.forEach( (itemVar) => {
|
||||
let description = itemVar.description;
|
||||
if (typeof itemVar.descriptionLocale == 'object')
|
||||
description = itemVar.descriptionLocale[lang] || itemVar.descriptionLocale['en'] || description || '';
|
||||
|
||||
if(itemVar.buttons !== undefined) {
|
||||
itemVar.buttons.forEach( (button) => {
|
||||
if (typeof button.textLocale == 'object')
|
||||
button.text = button.textLocale[lang] || button.textLocale['en'] || button.text || '';
|
||||
button.visible = (isEdit || button.isViewer !== false);
|
||||
})
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
registerPlugins(pluginsdata);
|
||||
};
|
||||
|
||||
const registerPlugins = plugins => {
|
||||
|
@ -194,6 +218,7 @@ const PluginsController = inject('storeAppOptions')(observer(props => {
|
|||
plugin.set_Name(item['name']);
|
||||
plugin.set_Guid(item['guid']);
|
||||
plugin.set_BaseUrl(item['baseUrl']);
|
||||
plugin.set_MinVersion && plugin.set_MinVersion(item['minVersion']);
|
||||
|
||||
let variations = item['variations'],
|
||||
variationsArr = [];
|
||||
|
@ -245,7 +270,7 @@ const PluginsController = inject('storeAppOptions')(observer(props => {
|
|||
arr = arr.concat(plugins.plugins);
|
||||
}
|
||||
|
||||
registerPlugins(arr);
|
||||
parsePlugins(arr);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -43,6 +43,9 @@ const dateToLocaleTimeString = (date) => {
|
|||
// MM/dd/yyyy hh:mm AM
|
||||
return (date.getMonth() + 1) + '/' + (date.getDate()) + '/' + date.getFullYear() + ' ' + format(date);
|
||||
};
|
||||
const parseUserName = name => {
|
||||
return AscCommon.UserInfoParser.getParsedName(name);
|
||||
};
|
||||
//end utils
|
||||
|
||||
class CommentsController extends Component {
|
||||
|
@ -74,7 +77,7 @@ class CommentsController extends Component {
|
|||
const api = Common.EditorApi.get();
|
||||
/** coauthoring begin **/
|
||||
const isLiveCommenting = LocalStorage.getBool(`${window.editorType}-mobile-settings-livecomment`, true);
|
||||
const resolved = LocalStorage.getBool(`${window.editorType}-settings-resolvedcomment`, true);
|
||||
const resolved = LocalStorage.getBool(`${window.editorType}-settings-resolvedcomment`);
|
||||
this.storeApplicationSettings.changeDisplayComments(isLiveCommenting);
|
||||
this.storeApplicationSettings.changeDisplayResolved(resolved);
|
||||
isLiveCommenting ? api.asc_showComments(resolved) : api.asc_hideComments();
|
||||
|
@ -123,17 +126,22 @@ class CommentsController extends Component {
|
|||
((data.asc_getTime() === '') ? new Date() : new Date(stringUtcToLocalDate(data.asc_getTime())));
|
||||
|
||||
let user = this.usersStore.searchUserById(data.asc_getUserId());
|
||||
const name = data.asc_getUserName();
|
||||
const parsedName = parseUserName(name);
|
||||
|
||||
changeComment.comment = data.asc_getText();
|
||||
changeComment.userId = data.asc_getUserId();
|
||||
changeComment.userName = data.asc_getUserName();
|
||||
changeComment.userName = name;
|
||||
changeComment.parsedName = Common.Utils.String.htmlEncode(parsedName);
|
||||
changeComment.userInitials = this.usersStore.getInitials(parsedName);
|
||||
changeComment.userColor = (user) ? user.asc_getColor() : null;
|
||||
changeComment.resolved = data.asc_getSolved();
|
||||
changeComment.quote = data.asc_getQuoteText();
|
||||
changeComment.time = date.getTime();
|
||||
changeComment.date = dateToLocaleTimeString(date);
|
||||
changeComment.editable = this.appOptions.canEditComments || (data.asc_getUserId() === this.curUserId);
|
||||
changeComment.removable = this.appOptions.canDeleteComments || (data.asc_getUserId() === this.curUserId);
|
||||
changeComment.editable = (this.appOptions.canEditComments || (data.asc_getUserId() === this.curUserId)) && AscCommon.UserInfoParser.canEditComment(name);
|
||||
changeComment.removable = (this.appOptions.canDeleteComments || (data.asc_getUserId() === this.curUserId)) && AscCommon.UserInfoParser.canDeleteComment(name);
|
||||
changeComment.hide = !AscCommon.UserInfoParser.canViewComment(name);
|
||||
|
||||
let dateReply = null;
|
||||
const replies = [];
|
||||
|
@ -146,17 +154,19 @@ class CommentsController extends Component {
|
|||
|
||||
user = this.usersStore.searchUserById(data.asc_getReply(i).asc_getUserId());
|
||||
const userName = data.asc_getReply(i).asc_getUserName();
|
||||
const parsedName = parseUserName(userName);
|
||||
replies.push({
|
||||
ind: i,
|
||||
userId: data.asc_getReply(i).asc_getUserId(),
|
||||
userName: userName,
|
||||
parsedName: Common.Utils.String.htmlEncode(parsedName),
|
||||
userColor: (user) ? user.asc_getColor() : null,
|
||||
date: dateToLocaleTimeString(dateReply),
|
||||
reply: data.asc_getReply(i).asc_getText(),
|
||||
time: dateReply.getTime(),
|
||||
userInitials: this.usersStore.getInitials(userName),
|
||||
editable: this.appOptions.canEditComments || (data.asc_getReply(i).asc_getUserId() === this.curUserId),
|
||||
removable: this.appOptions.canDeleteComments || (data.asc_getReply(i).asc_getUserId() === this.curUserId)
|
||||
userInitials: this.usersStore.getInitials(parsedName),
|
||||
editable: (this.appOptions.canEditComments || (data.asc_getReply(i).asc_getUserId() === this.curUserId)) && AscCommon.UserInfoParser.canEditComment(userName),
|
||||
removable: (this.appOptions.canDeleteComments || (data.asc_getReply(i).asc_getUserId() === this.curUserId)) && AscCommon.UserInfoParser.canDeleteComment(userName)
|
||||
});
|
||||
}
|
||||
changeComment.replies = replies;
|
||||
|
@ -172,10 +182,12 @@ class CommentsController extends Component {
|
|||
const user = this.usersStore.searchUserById(data.asc_getUserId());
|
||||
const groupName = id.substr(0, id.lastIndexOf('_')+1).match(/^(doc|sheet[0-9_]+)_/);
|
||||
const userName = data.asc_getUserName();
|
||||
const parsedName = parseUserName(userName);
|
||||
const comment = {
|
||||
uid : id,
|
||||
userId : data.asc_getUserId(),
|
||||
userName : userName,
|
||||
parsedName : Common.Utils.String.htmlEncode(parsedName),
|
||||
userColor : (user) ? user.asc_getColor() : null,
|
||||
date : dateToLocaleTimeString(date),
|
||||
quote : data.asc_getQuoteText(),
|
||||
|
@ -185,9 +197,10 @@ class CommentsController extends Component {
|
|||
time : date.getTime(),
|
||||
replies : [],
|
||||
groupName : (groupName && groupName.length>1) ? groupName[1] : null,
|
||||
userInitials : this.usersStore.getInitials(userName),
|
||||
editable : this.appOptions.canEditComments || (data.asc_getUserId() === this.curUserId),
|
||||
removable : this.appOptions.canDeleteComments || (data.asc_getUserId() === this.curUserId)
|
||||
userInitials : this.usersStore.getInitials(parsedName),
|
||||
editable : (this.appOptions.canEditComments || (data.asc_getUserId() === this.curUserId)) && AscCommon.UserInfoParser.canEditComment(userName),
|
||||
removable : (this.appOptions.canDeleteComments || (data.asc_getUserId() === this.curUserId)) && AscCommon.UserInfoParser.canDeleteComment(userName),
|
||||
hide : !AscCommon.UserInfoParser.canViewComment(userName),
|
||||
};
|
||||
if (comment) {
|
||||
const replies = this.readSDKReplies(data);
|
||||
|
@ -208,17 +221,19 @@ class CommentsController extends Component {
|
|||
((data.asc_getReply(i).asc_getTime() === '') ? new Date() : new Date(stringUtcToLocalDate(data.asc_getReply(i).asc_getTime())));
|
||||
const user = this.usersStore.searchUserById(data.asc_getReply(i).asc_getUserId());
|
||||
const userName = data.asc_getReply(i).asc_getUserName();
|
||||
const parsedName = parseUserName(userName);
|
||||
replies.push({
|
||||
ind : i,
|
||||
userId : data.asc_getReply(i).asc_getUserId(),
|
||||
userName : userName,
|
||||
parsedName : Common.Utils.String.htmlEncode(parsedName),
|
||||
userColor : (user) ? user.asc_getColor() : null,
|
||||
date : dateToLocaleTimeString(date),
|
||||
reply : data.asc_getReply(i).asc_getText(),
|
||||
time : date.getTime(),
|
||||
userInitials : this.usersStore.getInitials(userName),
|
||||
editable : this.appOptions.canEditComments || (data.asc_getReply(i).asc_getUserId() === this.curUserId),
|
||||
removable : this.appOptions.canDeleteComments || (data.asc_getReply(i).asc_getUserId() === this.curUserId)
|
||||
userInitials : this.usersStore.getInitials(parsedName),
|
||||
editable : (this.appOptions.canEditComments || (data.asc_getReply(i).asc_getUserId() === this.curUserId)) && AscCommon.UserInfoParser.canEditComment(userName),
|
||||
removable : (this.appOptions.canDeleteComments || (data.asc_getReply(i).asc_getUserId() === this.curUserId)) && AscCommon.UserInfoParser.canDeleteComment(userName)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -241,6 +256,7 @@ class AddCommentController extends Component {
|
|||
};
|
||||
|
||||
Common.Notifications.on('addcomment', () => {
|
||||
f7.popover.close('#idx-context-menu-popover'); //close context menu
|
||||
this.setState({isOpen: true});
|
||||
});
|
||||
}
|
||||
|
@ -252,9 +268,9 @@ class AddCommentController extends Component {
|
|||
if (!this.currentUser) {
|
||||
this.currentUser = this.props.users.setCurrentUser(this.props.storeAppOptions.user.id);
|
||||
}
|
||||
const name = this.currentUser.asc_getUserName();
|
||||
const name = parseUserName(this.currentUser.asc_getUserName());
|
||||
return {
|
||||
name: name,
|
||||
name: Common.Utils.String.htmlEncode(name),
|
||||
initials: this.props.users.getInitials(name),
|
||||
color: this.currentUser.asc_getColor()
|
||||
};
|
||||
|
@ -296,9 +312,9 @@ class EditCommentController extends Component {
|
|||
}
|
||||
getUserInfo () {
|
||||
this.currentUser = this.props.users.currentUser;
|
||||
const name = this.currentUser.asc_getUserName();
|
||||
const name = parseUserName(this.currentUser.asc_getUserName());
|
||||
return {
|
||||
name: name,
|
||||
name: Common.Utils.String.htmlEncode(name),
|
||||
initials: this.props.users.getInitials(name),
|
||||
color: this.currentUser.asc_getColor()
|
||||
};
|
||||
|
@ -441,7 +457,11 @@ class ViewCommentsController extends Component {
|
|||
});
|
||||
}
|
||||
closeViewCurComments () {
|
||||
if (Device.phone) {
|
||||
f7.sheet.close('#view-comment-sheet');
|
||||
} else {
|
||||
f7.popover.close('#view-comment-popover');
|
||||
}
|
||||
this.setState({isOpenViewCurComments: false});
|
||||
}
|
||||
onResolveComment (comment) {
|
||||
|
@ -479,7 +499,12 @@ class ViewCommentsController extends Component {
|
|||
});
|
||||
}
|
||||
const api = Common.EditorApi.get();
|
||||
api.asc_showComments(this.props.storeApplicationSettings.isResolvedComments);
|
||||
api.asc_changeComment(comment.uid, ascComment);
|
||||
|
||||
if(!this.props.storeApplicationSettings.isResolvedComments) {
|
||||
this.closeViewCurComments();
|
||||
}
|
||||
}
|
||||
}
|
||||
deleteComment (comment) {
|
||||
|
@ -591,7 +616,7 @@ class ViewCommentsController extends Component {
|
|||
const _CommentsController = inject('storeAppOptions', 'storeComments', 'users', "storeApplicationSettings")(observer(CommentsController));
|
||||
const _AddCommentController = inject('storeAppOptions', 'storeComments', 'users')(observer(AddCommentController));
|
||||
const _EditCommentController = inject('storeComments', 'users')(observer(EditCommentController));
|
||||
const _ViewCommentsController = inject('storeComments', 'users')(observer(withTranslation()(ViewCommentsController)));
|
||||
const _ViewCommentsController = inject('storeComments', 'users', "storeApplicationSettings")(observer(withTranslation()(ViewCommentsController)));
|
||||
|
||||
export {
|
||||
_CommentsController as CommentsController,
|
||||
|
|
|
@ -17,15 +17,24 @@ class InitReview extends Component {
|
|||
Common.Notifications.on('document:ready', () => {
|
||||
const api = Common.EditorApi.get();
|
||||
const appOptions = props.storeAppOptions;
|
||||
api.asc_SetTrackRevisions(appOptions.isReviewOnly || LocalStorage.getBool("de-mobile-track-changes-" + (appOptions.fileKey || '')));
|
||||
|
||||
let trackChanges = appOptions.customization && appOptions.customization.review ? appOptions.customization.review.trackChanges : undefined;
|
||||
(trackChanges===undefined) && (trackChanges = appOptions.customization ? appOptions.customization.trackChanges : undefined);
|
||||
trackChanges = appOptions.isReviewOnly || trackChanges === true || trackChanges !== false
|
||||
&& LocalStorage.getBool("de-mobile-track-changes-" + (appOptions.fileKey || ''));
|
||||
|
||||
api.asc_SetTrackRevisions(trackChanges);
|
||||
// Init display mode
|
||||
if (!appOptions.canReview) {
|
||||
const canViewReview = appOptions.isEdit || api.asc_HaveRevisionsChanges(true);
|
||||
appOptions.setCanViewReview(canViewReview);
|
||||
if (canViewReview) {
|
||||
let viewReviewMode = LocalStorage.getItem("de-view-review-mode");
|
||||
if (viewReviewMode === null)
|
||||
viewReviewMode = appOptions.customization && /^(original|final|markup)$/i.test(appOptions.customization.reviewDisplay) ? appOptions.customization.reviewDisplay.toLocaleLowerCase() : 'original';
|
||||
if (viewReviewMode === null) {
|
||||
viewReviewMode = appOptions.customization && appOptions.customization.review ? appOptions.customization.review.reviewDisplay : undefined;
|
||||
!viewReviewMode && (viewReviewMode = appOptions.customization ? appOptions.customization.reviewDisplay : undefined);
|
||||
viewReviewMode = /^(original|final|markup)$/i.test(viewReviewMode) ? viewReviewMode.toLocaleLowerCase() : 'original';
|
||||
}
|
||||
viewReviewMode = (appOptions.isEdit || appOptions.isRestrictedEdit) ? 'markup' : viewReviewMode;
|
||||
const displayMode = viewReviewMode.toLocaleLowerCase();
|
||||
if (displayMode === 'final') {
|
||||
|
@ -60,7 +69,8 @@ class Review extends Component {
|
|||
this.appConfig = props.storeAppOptions;
|
||||
this.editorPrefix = window.editorType || '';
|
||||
|
||||
let trackChanges = typeof this.appConfig.customization == 'object' ? this.appConfig.customization.trackChanges : undefined;
|
||||
let trackChanges = this.appConfig.customization && this.appConfig.customization.review ? this.appConfig.customization.review.trackChanges : undefined;
|
||||
(trackChanges===undefined) && (trackChanges = this.appConfig.customization ? this.appConfig.customization.trackChanges : undefined);
|
||||
trackChanges = this.appConfig.isReviewOnly || trackChanges === true || trackChanges !== false
|
||||
&& LocalStorage.getBool(`${this.editorPrefix}-mobile-track-changes-${this.appConfig.fileKey || ''}`);
|
||||
|
||||
|
@ -135,33 +145,8 @@ class ReviewChange extends Component {
|
|||
this.onDeleteChange = this.onDeleteChange.bind(this);
|
||||
|
||||
this.appConfig = props.storeAppOptions;
|
||||
}
|
||||
|
||||
if (this.appConfig && this.appConfig.canUseReviewPermissions) {
|
||||
const permissions = this.appConfig.customization.reviewPermissions;
|
||||
let arr = [];
|
||||
const groups = Common.Utils.UserInfoParser.getParsedGroups(Common.Utils.UserInfoParser.getCurrentName());
|
||||
groups && groups.forEach(function(group) {
|
||||
const item = permissions[group.trim()];
|
||||
item && (arr = arr.concat(item));
|
||||
});
|
||||
this.currentUserGroups = arr;
|
||||
}
|
||||
}
|
||||
intersection (arr1, arr2) { //Computes the list of values that are the intersection of all the arrays.
|
||||
const arr = [];
|
||||
arr1.forEach((item1) => {
|
||||
arr2.forEach((item2) => {
|
||||
if (item1 === item2) {
|
||||
arr.push(item2);
|
||||
}
|
||||
});
|
||||
});
|
||||
return arr;
|
||||
}
|
||||
checkUserGroups (username) {
|
||||
const groups = Common.Utils.UserInfoParser.getParsedGroups(username);
|
||||
return this.currentUserGroups && groups && (this.intersection(this.currentUserGroups, (groups.length>0) ? groups : [""]).length>0);
|
||||
}
|
||||
dateToLocaleTimeString (date) {
|
||||
const format = (date) => {
|
||||
let strTime,
|
||||
|
@ -445,7 +430,7 @@ class ReviewChange extends Component {
|
|||
const userColor = item.get_UserColor();
|
||||
const goto = (item.get_MoveType() == Asc.c_oAscRevisionsMove.MoveTo || item.get_MoveType() == Asc.c_oAscRevisionsMove.MoveFrom);
|
||||
date = this.dateToLocaleTimeString(date);
|
||||
const editable = this.appConfig.isReviewOnly && (item.get_UserId() == this.appConfig.user.id) || !this.appConfig.isReviewOnly && (!this.appConfig.canUseReviewPermissions || this.checkUserGroups(item.get_UserName()));
|
||||
const editable = this.appConfig.isReviewOnly && (item.get_UserId() == this.appConfig.user.id) || !this.appConfig.isReviewOnly && (!this.appConfig.canUseReviewPermissions || AscCommon.UserInfoParser.canEditReview(item.get_UserName()));
|
||||
arr.push({date: date, user: user, userColor: userColor, changeText: changeText, goto: goto, editable: editable});
|
||||
});
|
||||
return arr;
|
||||
|
@ -493,13 +478,14 @@ class ReviewChange extends Component {
|
|||
let change;
|
||||
let goto = false;
|
||||
if (arrChangeReview.length > 0) {
|
||||
const name = AscCommon.UserInfoParser.getParsedName(arrChangeReview[0].user);
|
||||
change = {
|
||||
date: arrChangeReview[0].date,
|
||||
user: arrChangeReview[0].user,
|
||||
userName: Common.Utils.String.htmlEncode(Common.Utils.UserInfoParser.getParsedName(arrChangeReview[0].user)),
|
||||
userName: Common.Utils.String.htmlEncode(name),
|
||||
color: arrChangeReview[0].userColor.get_hex(),
|
||||
text: arrChangeReview[0].changeText,
|
||||
initials: this.props.users.getInitials(arrChangeReview[0].user),
|
||||
initials: this.props.users.getInitials(name),
|
||||
editable: arrChangeReview[0].editable
|
||||
};
|
||||
goto = arrChangeReview[0].goto;
|
||||
|
|
|
@ -70,6 +70,8 @@ export class storeComments {
|
|||
comment.comment = changeComment.comment;
|
||||
comment.userId = changeComment.userId;
|
||||
comment.userName = changeComment.userName;
|
||||
comment.parsedName = changeComment.parsedName;
|
||||
comment.userInitials = changeComment.userInitials;
|
||||
comment.userColor = changeComment.userColor;
|
||||
comment.resolved = changeComment.resolved;
|
||||
comment.quote = changeComment.quote;
|
||||
|
@ -78,6 +80,7 @@ export class storeComments {
|
|||
comment.editable = changeComment.editable;
|
||||
comment.removable = changeComment.removable;
|
||||
comment.replies = changeComment.replies;
|
||||
comment.hide =changeComment.hide;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ export class storeUsers {
|
|||
}
|
||||
|
||||
getInitials (name) {
|
||||
const fio = Common.Utils.UserInfoParser.getParsedName(name).split(' ');
|
||||
const fio = name.split(' ');
|
||||
let initials = fio[0].substring(0, 1).toUpperCase();
|
||||
for (let i = fio.length-1; i>0; i--) {
|
||||
if (fio[i][0]!=='(' && fio[i][0]!==')') {
|
||||
|
|
|
@ -148,9 +148,9 @@ const CommentActions = ({comment, onCommentMenuClick, opened, openActionComment}
|
|||
<ActionsGroup>
|
||||
{comment && <Fragment>
|
||||
{comment.editable && <ActionsButton onClick={() => {onCommentMenuClick('editComment', comment);}}>{_t.textEdit}</ActionsButton>}
|
||||
{!comment.resolved ?
|
||||
{!comment.resolved && comment.editable ?
|
||||
<ActionsButton onClick={() => {onCommentMenuClick('resolve', comment);}}>{_t.textResolve}</ActionsButton> :
|
||||
<ActionsButton onClick={() => {onCommentMenuClick('resolve', comment);}}>{_t.textReopen}</ActionsButton>
|
||||
comment.editable && <ActionsButton onClick={() => {onCommentMenuClick('resolve', comment);}}>{_t.textReopen}</ActionsButton>
|
||||
}
|
||||
<ActionsButton onClick={() => {onCommentMenuClick('addReply', comment);}}>{_t.textAddReply}</ActionsButton>
|
||||
{comment.removable && <ActionsButton color='red' onClick={() => {onCommentMenuClick('deleteComment', comment);}}>{_t.textDeleteComment}</ActionsButton>}
|
||||
|
@ -223,7 +223,7 @@ const EditCommentPopup = inject("storeComments")(observer(({storeComments, comme
|
|||
<div className='initials' style={{backgroundColor: `${comment.userColor}`}}>{comment.userInitials}</div>
|
||||
}
|
||||
<div>
|
||||
<div className='name'>{comment.userName}</div>
|
||||
<div className='name'>{comment.parsedName}</div>
|
||||
<div className='comment-date'>{comment.date}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -260,7 +260,7 @@ const EditCommentDialog = inject("storeComments")(observer(({storeComments, comm
|
|||
<div class="comment-header">
|
||||
${Device.android ? templateInitials : ''}
|
||||
<div>
|
||||
<div class='name'>${comment.userName}</div>
|
||||
<div class='name'>${comment.parsedName}</div>
|
||||
<div class='comment-date'>${comment.date}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -479,7 +479,7 @@ const EditReplyPopup = inject("storeComments")(observer(({storeComments, comment
|
|||
<div className='initials' style={{backgroundColor: `${reply.userColor}`}}>{reply.userInitials}</div>
|
||||
}
|
||||
<div>
|
||||
<div className='name'>{reply.userName}</div>
|
||||
<div className='name'>{reply.parsedName}</div>
|
||||
<div className='reply-date'>{reply.date}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -516,7 +516,7 @@ const EditReplyDialog = inject("storeComments")(observer(({storeComments, commen
|
|||
<div class="comment-header">
|
||||
${Device.android ? templateInitials : ''}
|
||||
<div>
|
||||
<div class='name'>${reply.userName}</div>
|
||||
<div class='name'>${reply.parsedName}</div>
|
||||
<div class='reply-date'>${reply.date}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -614,15 +614,17 @@ const pickLink = (message) => {
|
|||
|
||||
arrayComment = arrayComment.sort(function(item1,item2){ return item1.start - item2.start; });
|
||||
|
||||
let str_res = (arrayComment.length>0) ? <label>{Common.Utils.String.htmlEncode(message.substring(0, arrayComment[0].start))}{arrayComment[0].str}</label> : <label>{Common.Utils.String.htmlEncode(message)}</label>;
|
||||
let str_res = (arrayComment.length>0) ? <label>{Common.Utils.String.htmlEncode(message.substring(0, arrayComment[0].start))}{arrayComment[0].str}</label> : <label>{message}</label>;
|
||||
|
||||
for (var i=1; i<arrayComment.length; i++) {
|
||||
str_res = <label>{str_res}{Common.Utils.String.htmlEncode(message.substring(arrayComment[i-1].end, arrayComment[i].start))}{arrayComment[i].str}</label>;
|
||||
}
|
||||
|
||||
if (arrayComment.length>0) {
|
||||
str_res = <label>{str_res}{Common.Utils.String.htmlEncode(message.substring(arrayComment[i-1].end, message.length))}</label>;
|
||||
}
|
||||
return str_res;
|
||||
|
||||
return str_res;
|
||||
}
|
||||
|
||||
// View comments
|
||||
|
@ -633,7 +635,7 @@ const ViewComments = ({storeComments, storeAppOptions, onCommentMenuClick, onRes
|
|||
|
||||
const viewMode = !storeAppOptions.canComments;
|
||||
const comments = storeComments.groupCollectionFilter || storeComments.collectionComments;
|
||||
const sortComments = comments.length > 0 ? [...comments].sort((a, b) => a.time > b.time ? 1 : -1) : null;
|
||||
const sortComments = comments.length > 0 ? [...comments].sort((a, b) => a.time > b.time ? -1 : 1) : null;
|
||||
|
||||
const [clickComment, setComment] = useState();
|
||||
const [commentActionsOpened, openActionComment] = useState(false);
|
||||
|
@ -657,19 +659,20 @@ const ViewComments = ({storeComments, storeAppOptions, onCommentMenuClick, onRes
|
|||
<List className='comment-list'>
|
||||
{sortComments.map((comment, indexComment) => {
|
||||
return (
|
||||
!comment.hide &&
|
||||
<ListItem key={`comment-${indexComment}`} onClick={e => {
|
||||
!e.target.closest('.comment-menu') && !e.target.closest('.reply-menu') ? showComment(comment) : null}}>
|
||||
<div slot='header' className='comment-header'>
|
||||
<div className='left'>
|
||||
{isAndroid && <div className='initials' style={{backgroundColor: `${comment.userColor ? comment.userColor : '#cfcfcf'}`}}>{comment.userInitials}</div>}
|
||||
<div>
|
||||
<div className='user-name'>{comment.userName}</div>
|
||||
<div className='user-name'>{comment.parsedName}</div>
|
||||
<div className='comment-date'>{comment.date}</div>
|
||||
</div>
|
||||
</div>
|
||||
{!viewMode &&
|
||||
<div className='right'>
|
||||
<div className='comment-resolve' onClick={() => {onResolveComment(comment);}}><Icon icon={comment.resolved ? 'icon-resolve-comment check' : 'icon-resolve-comment'} /></div>
|
||||
{comment.editable && <div className='comment-resolve' onClick={() => {onResolveComment(comment);}}><Icon icon={comment.resolved ? 'icon-resolve-comment check' : 'icon-resolve-comment'} /></div> }
|
||||
<div className='comment-menu'
|
||||
onClick={() => {setComment(comment); openActionComment(true);}}
|
||||
><Icon icon='icon-menu-comment'/></div>
|
||||
|
@ -693,11 +696,11 @@ const ViewComments = ({storeComments, storeAppOptions, onCommentMenuClick, onRes
|
|||
<div className='left'>
|
||||
{isAndroid && <div className='initials' style={{backgroundColor: `${reply.userColor ? reply.userColor : '#cfcfcf'}`}}>{reply.userInitials}</div>}
|
||||
<div>
|
||||
<div className='user-name'>{reply.userName}</div>
|
||||
<div className='user-name'>{reply.parsedName}</div>
|
||||
<div className='reply-date'>{reply.date}</div>
|
||||
</div>
|
||||
</div>
|
||||
{!viewMode &&
|
||||
{!viewMode && reply.editable &&
|
||||
<div className='right'>
|
||||
<div className='reply-menu'
|
||||
onClick={() => {setComment(comment); setReply(reply); openActionReply(true);}}
|
||||
|
@ -792,13 +795,13 @@ const CommentList = inject("storeComments", "storeAppOptions")(observer(({storeC
|
|||
<div className='left'>
|
||||
{isAndroid && <div className='initials' style={{backgroundColor: `${comment.userColor ? comment.userColor : '#cfcfcf'}`}}>{comment.userInitials}</div>}
|
||||
<div>
|
||||
<div className='user-name'>{comment.userName}</div>
|
||||
<div className='user-name'>{comment.parsedName}</div>
|
||||
<div className='comment-date'>{comment.date}</div>
|
||||
</div>
|
||||
</div>
|
||||
{!viewMode &&
|
||||
<div className='right'>
|
||||
<div className='comment-resolve' onClick={() => {onResolveComment(comment);}}><Icon icon={comment.resolved ? 'icon-resolve-comment check' : 'icon-resolve-comment'} /></div>
|
||||
{comment.editable && <div className='comment-resolve' onClick={() => {onResolveComment(comment);}}><Icon icon={comment.resolved ? 'icon-resolve-comment check' : 'icon-resolve-comment'}/></div>}
|
||||
<div className='comment-menu'
|
||||
onClick={() => {openActionComment(true);}}
|
||||
><Icon icon='icon-menu-comment'/></div>
|
||||
|
@ -822,11 +825,11 @@ const CommentList = inject("storeComments", "storeAppOptions")(observer(({storeC
|
|||
<div className='left'>
|
||||
{isAndroid && <div className='initials' style={{backgroundColor: `${reply.userColor ? reply.userColor : '#cfcfcf'}`}}>{reply.userInitials}</div>}
|
||||
<div>
|
||||
<div className='user-name'>{reply.userName}</div>
|
||||
<div className='user-name'>{reply.parsedName}</div>
|
||||
<div className='reply-date'>{reply.date}</div>
|
||||
</div>
|
||||
</div>
|
||||
{!viewMode &&
|
||||
{!viewMode && reply.editable &&
|
||||
<div className='right'>
|
||||
<div className='reply-menu'
|
||||
onClick={() => {setReply(reply); openActionReply(true);}}
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 290 55"><defs><style>.cls-1,.cls-2,.cls-3{fill-rule:evenodd;}.cls-1{fill:url(#grad_173);}.cls-2{fill:url(#grad_168);}.cls-3{fill:url(#grad_91);}.cls-4{fill:#526484;}.cls-5{fill:#3a4968;}</style><linearGradient id="grad_173" x1="35" y1="63.54" x2="35" y2="24.24" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#d94315" stop-opacity="0.3"/><stop offset="0.88" stop-color="#d9420b"/></linearGradient><linearGradient id="grad_168" x1="35.03" y1="46.52" x2="35.03" y2="20.68" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#8bba24" stop-opacity="0.3"/><stop offset="0.66" stop-color="#8bba25"/></linearGradient><linearGradient id="grad_91" x1="35" y1="35.95" x2="35" y2="1.23" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#28a8e0" stop-opacity="0.3"/><stop offset="1" stop-color="#26a8de"/></linearGradient></defs><path class="cls-1" d="M31.36,53.32L7.5,42.58c-2-.9-2-2.38,0-3.28l8.36-3.77,15.49,7a10.15,10.15,0,0,0,7.28,0l15.49-7L62.5,39.3c2,0.9,2,2.38,0,3.28L38.64,53.32a10.14,10.14,0,0,1-7.28,0h0Z"/><path class="cls-2" d="M31.39,40.14L7.56,29.39c-2-.9-2-2.38,0-3.28l8.1-3.65,15.73,7.09a10.12,10.12,0,0,0,7.28,0L54.4,22.46l8.1,3.65c2,0.9,2,2.38,0,3.28L38.67,40.14a10.12,10.12,0,0,1-7.28,0h0Z"/><path class="cls-3" d="M31.36,27.19L7.5,16.58c-2-.89-2-2.35,0-3.24L31.36,2.74a10.27,10.27,0,0,1,7.28,0L62.5,13.34c2,0.89,2,2.35,0,3.24L38.64,27.19a10.26,10.26,0,0,1-7.28,0h0Z"/><path class="cls-4" d="M72.06,27.86q0-6.86,4-10.31a14.37,14.37,0,0,1,18.68,0q4,3.45,4,10.35t-4,10.31a14.37,14.37,0,0,1-18.68,0q-4-3.45-4-10.31v0h0Zm5.78,0q0,4.74,1.8,7a7.77,7.77,0,0,0,3.9,2.79q0.51,0.12,1,.17a7.12,7.12,0,0,0,.92.06,7.59,7.59,0,0,0,.94-0.06,5.83,5.83,0,0,0,1-.21,7.58,7.58,0,0,0,3.87-2.79Q93,32.56,93,27.89T91.2,21a7.58,7.58,0,0,0-3.87-2.79,5.83,5.83,0,0,0-1-.21,7.76,7.76,0,0,0-.94-0.06,7.27,7.27,0,0,0-.92.06q-0.45.06-1,.17A7.77,7.77,0,0,0,79.64,21q-1.8,2.22-1.8,6.92v0h0Z"/><polygon class="cls-4" points="102 15 109 15 119.89 35 120 35 120 15 125 15 125 41 118 41 107.13 20.96 107.01 20.96 107 41 102 41 102 15 102 15"/><polygon class="cls-4" points="130 15 135 15 135 37 147 37 147 41 130 41 130 15 130 15"/><polygon class="cls-4" points="148 15 155.47 25.98 155.59 25.98 163 15 168.5 15 158 31 158 41 153 41 153 31 142.5 15 148 15"/><path class="cls-5" d="M168,27.94q0-6.77,3.9-10.18a13.88,13.88,0,0,1,18.22,0Q194,21.17,194,28t-3.88,10.18a13.88,13.88,0,0,1-18.22,0Q168,34.75,168,28v0h0Zm5.63,0q0,4.68,1.75,6.87a7.57,7.57,0,0,0,3.81,2.76q0.49,0.11.93,0.17a6.85,6.85,0,0,0,.89.06,7.31,7.31,0,0,0,.91-0.06,5.6,5.6,0,0,0,1-.21,7.39,7.39,0,0,0,3.77-2.76q1.71-2.19,1.71-6.79t-1.71-6.79a7.39,7.39,0,0,0-3.77-2.76,5.61,5.61,0,0,0-1-.21,7.48,7.48,0,0,0-.91-0.06,7,7,0,0,0-.89.06q-0.44.06-.93,0.17a7.57,7.57,0,0,0-3.81,2.76q-1.75,2.19-1.75,6.83v0h0Z"/><polygon class="cls-5" points="197 15 212 15 212 19 202 19 202 26 211 26 211 30 202 30 202 41 197 41 197 15 197 15"/><polygon class="cls-5" points="216 15 231 15 231 19 221 19 221 26 230 26 230 30 221 30 221 41 216 41 216 15 216 15"/><polygon class="cls-5" points="234 41 234 15 239 15 239 41 234 41 234 41"/><path class="cls-5" d="M262,19.88a18.8,18.8,0,0,0-6.3-1c-7,0-8.28,5.64-8.28,9.13,0,2.54.84,9.19,7.67,9.19a17,17,0,0,0,6.57-1.24L262,40.42a42.48,42.48,0,0,1-7.46.81c-5.08,0-12.54-3.1-12.54-13.36,0-9.28,7-13,13-13a24.56,24.56,0,0,1,7,.8v4.25Z"/><polygon class="cls-5" points="266 15 282 15 282 19 271 19 271 26 281 26 281 30 271 30 271 37 282 37 282 41 266 41 266 15 266 15"/></svg>
|
Before Width: | Height: | Size: 3.5 KiB |
|
@ -36,6 +36,6 @@
|
|||
display: inline-block;
|
||||
width: 100%;
|
||||
height: 55px;
|
||||
background: url('../../../../common/mobile/resources/img/about/logo.svg') no-repeat center;
|
||||
background: url('../../../../common/main/resources/img/about/logo_s.svg') no-repeat center;
|
||||
}
|
||||
}
|
|
@ -56,8 +56,11 @@
|
|||
padding-right: 16px;
|
||||
.right {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
justify-content: flex-end;
|
||||
width: 70px;
|
||||
.comment-resolve {
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.reply-header {
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
--f7-range-knob-size: 16px;
|
||||
|
||||
--f7-link-highlight-color: transparent;
|
||||
--f7-touch-ripple-color: @touchColor;
|
||||
--f7-link-touch-ripple-color: @touchColor;
|
||||
|
||||
.button {
|
||||
|
@ -42,6 +41,7 @@
|
|||
--f7-dialog-button-text-color: @themeColor;
|
||||
|
||||
.navbar {
|
||||
--f7-touch-ripple-color: @touchColor;
|
||||
.sheet-close {
|
||||
width: 56px;
|
||||
height: 56px;
|
||||
|
@ -258,6 +258,9 @@
|
|||
flex: 1;
|
||||
font-size: 17px;
|
||||
margin-left: 5px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
&:first-child {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
|
|
@ -383,7 +383,10 @@
|
|||
}
|
||||
}
|
||||
|
||||
.page {
|
||||
.color-palettes {
|
||||
.list {
|
||||
ul {
|
||||
.palette {
|
||||
padding: 8px 0px;
|
||||
a {
|
||||
|
@ -393,6 +396,7 @@
|
|||
min-height: 26px;
|
||||
margin: 1px 1px 0 0;
|
||||
box-shadow: 0 0 0 1px rgba(0, 0, 0, .15) inset;
|
||||
border-radius: 0;
|
||||
&.active:after {
|
||||
content: ' ';
|
||||
position: absolute;
|
||||
|
@ -409,6 +413,8 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.row {
|
||||
padding: 0;
|
||||
}
|
||||
|
@ -427,6 +433,7 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#color-picker {
|
||||
display: flex;
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
"DE.ApplicationController.downloadTextText": "Téléchargement du document...",
|
||||
"DE.ApplicationController.errorAccessDeny": "Vous tentez d'exéсuter une action pour laquelle vous ne disposez pas des droits.<br>Veuillez contacter l'administrateur de Document Server.",
|
||||
"DE.ApplicationController.errorDefaultMessage": "Code d'erreur: %1",
|
||||
"DE.ApplicationController.errorEditingDownloadas": "Une erreure s'est produite lors du travail avec le document.<br>Utilisez l'option 'Télécharger comme...' pour enregistrer une copie de sauvegarde du fichier sur le disque dur de votre ordinateur.",
|
||||
"DE.ApplicationController.errorEditingDownloadas": "Une erreur s'est produite lors du travail avec le document.<br>Utilisez l'option 'Télécharger comme...' pour enregistrer une copie de sauvegarde du fichier sur le disque dur de votre ordinateur.",
|
||||
"DE.ApplicationController.errorFilePassProtect": "Le fichier est protégé par le mot de passe et ne peut pas être ouvert.",
|
||||
"DE.ApplicationController.errorFileSizeExceed": "La taille du fichier dépasse les limites établies sur votre serveur.<br>Veuillez contacter votre administrateur de Document Server pour obtenir plus d'informations. ",
|
||||
"DE.ApplicationController.errorSubmit": "Échec de soumission",
|
||||
|
|
|
@ -19,10 +19,14 @@
|
|||
"DE.ApplicationController.errorUserDrop": "В настоящий момент файл недоступен.",
|
||||
"DE.ApplicationController.notcriticalErrorTitle": "Внимание",
|
||||
"DE.ApplicationController.scriptLoadError": "Слишком медленное подключение, некоторые компоненты не удалось загрузить. Пожалуйста, обновите страницу.",
|
||||
"DE.ApplicationController.textAnonymous": "Анонимный пользователь",
|
||||
"DE.ApplicationController.textClear": "Очистить все поля",
|
||||
"DE.ApplicationController.textGotIt": "ОК",
|
||||
"DE.ApplicationController.textGuest": "Гость",
|
||||
"DE.ApplicationController.textLoadingDocument": "Загрузка документа",
|
||||
"DE.ApplicationController.textNext": "Следующее поле",
|
||||
"DE.ApplicationController.textOf": "из",
|
||||
"DE.ApplicationController.textRequired": "Заполните все обязательные поля для отправки формы.",
|
||||
"DE.ApplicationController.textSubmit": "Отправить",
|
||||
"DE.ApplicationController.textSubmited": "<b>Форма успешно отправлена</b><br>Нажмите, чтобы закрыть подсказку",
|
||||
"DE.ApplicationController.txtClose": "Закрыть",
|
||||
|
|
|
@ -11,20 +11,29 @@
|
|||
"DE.ApplicationController.downloadTextText": "Prenašanje dokumenta ...",
|
||||
"DE.ApplicationController.errorAccessDeny": "Poskušate izvesti dejanje, za katerega nimate pravic. <br> Obrnite se na skrbnika strežnika dokumentov.",
|
||||
"DE.ApplicationController.errorDefaultMessage": "Koda napake: %1",
|
||||
"DE.ApplicationController.errorEditingDownloadas": "Med delom z dokumentom je prišlo do napake.<br>S funkcijo »Prenesi kot ...« shranite varnostno kopijo datoteke na trdi disk računalnika.",
|
||||
"DE.ApplicationController.errorFilePassProtect": "Dokument je zaščiten z geslom in ga ni mogoče odpreti.",
|
||||
"DE.ApplicationController.errorFileSizeExceed": "Velikost datoteke presega omejitev, nastavljeno za vaš strežnik. <br> Za podrobnosti se obrnite na skrbnika strežnika dokumentov.",
|
||||
"DE.ApplicationController.errorSubmit": "Pošiljanje je spodletelo",
|
||||
"DE.ApplicationController.errorUpdateVersionOnDisconnect": "Povezava s spletom je bila obnovljena in spremenjena je različica datoteke. <br> Preden nadaljujete z delom, morate datoteko prenesti ali kopirati njeno vsebino, da se prepričate, da se nič ne izgubi, in nato znova naložite to stran.",
|
||||
"DE.ApplicationController.errorUserDrop": "Do datoteke v tem trenutku ni možno dostopati.",
|
||||
"DE.ApplicationController.notcriticalErrorTitle": "Opozorilo",
|
||||
"DE.ApplicationController.scriptLoadError": "Povezava je počasna, nekatere komponente niso pravilno naložene.Prosimo osvežite stran.",
|
||||
"DE.ApplicationController.textClear": "Počisti vsa polja",
|
||||
"DE.ApplicationController.textLoadingDocument": "Nalaganje dokumenta",
|
||||
"DE.ApplicationController.textNext": "Naslednje polje",
|
||||
"DE.ApplicationController.textOf": "od",
|
||||
"DE.ApplicationController.textSubmit": "Pošlji",
|
||||
"DE.ApplicationController.textSubmited": "<b>Obrazec poslan uspešno</b><br>Pritisnite tukaj za zaprtje obvestila",
|
||||
"DE.ApplicationController.txtClose": "Zapri",
|
||||
"DE.ApplicationController.unknownErrorText": "Neznana napaka.",
|
||||
"DE.ApplicationController.unsupportedBrowserErrorText": "Vaš brskalnik ni podprt.",
|
||||
"DE.ApplicationController.waitText": "Prosimo počakajte ...",
|
||||
"DE.ApplicationView.txtDownload": "Prenesi",
|
||||
"DE.ApplicationView.txtDownloadDocx": "Prenesi kot DOCX",
|
||||
"DE.ApplicationView.txtDownloadPdf": "Prenesi kot PDF",
|
||||
"DE.ApplicationView.txtEmbed": "Vdelano",
|
||||
"DE.ApplicationView.txtFileLocation": "Odpri lokacijo dokumenta",
|
||||
"DE.ApplicationView.txtFullScreen": "Celozaslonski",
|
||||
"DE.ApplicationView.txtPrint": "Natisni",
|
||||
"DE.ApplicationView.txtShare": "Deli"
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
"DE.ApplicationController.textNext": "Sonraki alan",
|
||||
"DE.ApplicationController.textOf": "'in",
|
||||
"DE.ApplicationController.textSubmit": "Kaydet",
|
||||
"DE.ApplicationController.textSubmited": "<b>Form başarılı bir şekilde kaydedildi</b><br>İpucunu kapatmak için tıklayın",
|
||||
"DE.ApplicationController.txtClose": "Kapat",
|
||||
"DE.ApplicationController.unknownErrorText": "Bilinmeyen hata.",
|
||||
"DE.ApplicationController.unsupportedBrowserErrorText": "Tarayıcınız desteklenmiyor.",
|
||||
|
|
|
@ -11,20 +11,29 @@
|
|||
"DE.ApplicationController.downloadTextText": "正在下载文件...",
|
||||
"DE.ApplicationController.errorAccessDeny": "您正在尝试执行您没有权限的操作。<br>请联系您的文档服务器管理员.",
|
||||
"DE.ApplicationController.errorDefaultMessage": "错误代码:%1",
|
||||
"DE.ApplicationController.errorEditingDownloadas": "在处理文档期间发生错误。<br>使用“下载为…”选项将文件备份复制到您的计算机硬盘中。",
|
||||
"DE.ApplicationController.errorFilePassProtect": "该文档受密码保护,无法被打开。",
|
||||
"DE.ApplicationController.errorFileSizeExceed": "文件大小超出了为服务器设置的限制.<br>有关详细信息,请与文档服务器管理员联系。",
|
||||
"DE.ApplicationController.errorSubmit": "提交失败",
|
||||
"DE.ApplicationController.errorUpdateVersionOnDisconnect": "网络连接已恢复,文件版本已变更。<br>在继续工作之前,需要下载文件或复制其内容以避免丢失数据,然后刷新此页。",
|
||||
"DE.ApplicationController.errorUserDrop": "该文件现在无法访问。",
|
||||
"DE.ApplicationController.notcriticalErrorTitle": "警告",
|
||||
"DE.ApplicationController.scriptLoadError": "连接速度过慢,部分组件无法被加载。请重新加载页面。",
|
||||
"DE.ApplicationController.textClear": "清除所有字段",
|
||||
"DE.ApplicationController.textLoadingDocument": "文件加载中…",
|
||||
"DE.ApplicationController.textNext": "下一域",
|
||||
"DE.ApplicationController.textOf": "的",
|
||||
"DE.ApplicationController.textSubmit": "提交",
|
||||
"DE.ApplicationController.textSubmited": "<b>表单成功地被提交了</b><br>点击以关闭贴士",
|
||||
"DE.ApplicationController.txtClose": "关闭",
|
||||
"DE.ApplicationController.unknownErrorText": "未知错误。",
|
||||
"DE.ApplicationController.unsupportedBrowserErrorText": "您的浏览器不受支持",
|
||||
"DE.ApplicationController.waitText": "请稍候...",
|
||||
"DE.ApplicationView.txtDownload": "下载",
|
||||
"DE.ApplicationView.txtDownloadDocx": "导出成docx格式",
|
||||
"DE.ApplicationView.txtDownloadPdf": "导出成PDF格式",
|
||||
"DE.ApplicationView.txtEmbed": "嵌入",
|
||||
"DE.ApplicationView.txtFileLocation": "打开文件所在位置",
|
||||
"DE.ApplicationView.txtFullScreen": "全屏",
|
||||
"DE.ApplicationView.txtPrint": "打印",
|
||||
"DE.ApplicationView.txtShare": "共享"
|
||||
|
|
|
@ -90,7 +90,6 @@ define([
|
|||
this.addListeners({
|
||||
'FormsTab': {
|
||||
'forms:insert': this.onControlsSelect,
|
||||
'forms:new-color': this.onNewControlsColor,
|
||||
'forms:clear': this.onClearClick,
|
||||
'forms:no-color': this.onNoControlsColor,
|
||||
'forms:select-color': this.onSelectControlsColor,
|
||||
|
@ -206,10 +205,6 @@ define([
|
|||
Common.NotificationCenter.trigger('edit:complete', this.toolbar);
|
||||
},
|
||||
|
||||
onNewControlsColor: function() {
|
||||
this.view.mnuFormsColorPicker.addNewColor();
|
||||
},
|
||||
|
||||
onNoControlsColor: function(item) {
|
||||
if (!item.isChecked())
|
||||
this.api.asc_SetSpecialFormsHighlightColor(201, 200, 255);
|
||||
|
@ -253,19 +248,26 @@ define([
|
|||
if (this._state.DisabledEditing != disable) {
|
||||
this._state.DisabledEditing = disable;
|
||||
|
||||
var app = this.getApplication();
|
||||
var rightMenuController = app.getController('RightMenu');
|
||||
rightMenuController.getView('RightMenu').clearSelection();
|
||||
rightMenuController.SetDisabled(disable);
|
||||
app.getController('Toolbar').DisableToolbar(disable, false, false, true);
|
||||
app.getController('Statusbar').getView('Statusbar').SetDisabled(disable);
|
||||
app.getController('Common.Controllers.ReviewChanges').SetDisabled(disable);
|
||||
app.getController('DocumentHolder').getView().SetDisabled(disable);
|
||||
app.getController('Navigation') && app.getController('Navigation').SetDisabled(disable);
|
||||
app.getController('LeftMenu').setPreviewMode(disable);
|
||||
var comments = app.getController('Common.Controllers.Comments');
|
||||
if (comments)
|
||||
comments.setPreviewMode(disable);
|
||||
Common.NotificationCenter.trigger('editing:disable', disable, {
|
||||
viewMode: false,
|
||||
reviewMode: false,
|
||||
fillFormwMode: true,
|
||||
allowMerge: false,
|
||||
allowSignature: false,
|
||||
allowProtect: false,
|
||||
rightMenu: {clear: true, disable: true},
|
||||
statusBar: true,
|
||||
leftMenu: {disable: false, previewMode: true},
|
||||
fileMenu: false,
|
||||
navigation: {disable: false, previewMode: true},
|
||||
comments: {disable: false, previewMode: true},
|
||||
chat: false,
|
||||
review: true,
|
||||
viewport: false,
|
||||
documentHolder: true,
|
||||
toolbar: true,
|
||||
plugins: false
|
||||
}, 'forms');
|
||||
if (this.view)
|
||||
this.view.$el.find('.no-group-mask.form-view').css('opacity', 1);
|
||||
}
|
||||
|
|
|
@ -666,21 +666,29 @@ define([
|
|||
this.dlgSearch && this.dlgSearch.setMode(this.viewmode ? 'no-replace' : 'search');
|
||||
},
|
||||
|
||||
SetDisabled: function(disable, disableFileMenu) {
|
||||
this.mode.isEdit = !disable;
|
||||
SetDisabled: function(disable, options) {
|
||||
if (this.leftMenu._state.disabled !== disable) {
|
||||
this.leftMenu._state.disabled = disable;
|
||||
if (disable) {
|
||||
this.previsEdit = this.mode.isEdit;
|
||||
this.prevcanEdit = this.mode.canEdit;
|
||||
this.mode.isEdit = this.mode.canEdit = !disable;
|
||||
} else {
|
||||
this.mode.isEdit = this.previsEdit;
|
||||
this.mode.canEdit = this.prevcanEdit;
|
||||
}
|
||||
}
|
||||
|
||||
if (disable) this.leftMenu.close();
|
||||
|
||||
/** coauthoring begin **/
|
||||
if (!options || options.comments && options.comments.disable)
|
||||
this.leftMenu.btnComments.setDisabled(disable);
|
||||
var comments = this.getApplication().getController('Common.Controllers.Comments');
|
||||
if (comments)
|
||||
comments.setPreviewMode(disable);
|
||||
this.setPreviewMode(disable);
|
||||
if (!options || options.chat)
|
||||
this.leftMenu.btnChat.setDisabled(disable);
|
||||
/** coauthoring end **/
|
||||
this.leftMenu.btnPlugins.setDisabled(disable);
|
||||
if (!options || options.navigation && options.navigation.disable)
|
||||
this.leftMenu.btnNavigation.setDisabled(disable);
|
||||
if (disableFileMenu) this.leftMenu.getMenu('file').SetDisabled(disable);
|
||||
|
||||
this.leftMenu.btnPlugins.setDisabled(disable);
|
||||
},
|
||||
|
||||
/** coauthoring begin **/
|
||||
|
@ -808,6 +816,7 @@ define([
|
|||
case 'escape':
|
||||
// if (!this.leftMenu.isOpened()) return true;
|
||||
if ( this.leftMenu.menuFile.isVisible() ) {
|
||||
if (Common.UI.HintManager.needCloseFileMenu())
|
||||
this.leftMenu.menuFile.hide();
|
||||
return false;
|
||||
}
|
||||
|
@ -827,8 +836,10 @@ define([
|
|||
}
|
||||
if (this.leftMenu.btnAbout.pressed || this.leftMenu.btnPlugins.pressed ||
|
||||
$(e.target).parents('#left-menu').length ) {
|
||||
if (!Common.UI.HintManager.isHintVisible()) {
|
||||
this.leftMenu.close();
|
||||
Common.NotificationCenter.trigger('layout:changed', 'leftmenu');
|
||||
}
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -52,7 +52,8 @@ define([
|
|||
'common/main/lib/view/UserNameDialog',
|
||||
'common/main/lib/util/LocalStorage',
|
||||
'documenteditor/main/app/collection/ShapeGroups',
|
||||
'documenteditor/main/app/collection/EquationGroups'
|
||||
'documenteditor/main/app/collection/EquationGroups',
|
||||
'common/main/lib/component/HintManager'
|
||||
], function () {
|
||||
'use strict';
|
||||
|
||||
|
@ -161,6 +162,11 @@ define([
|
|||
weakCompare : function(obj1, obj2){return obj1.type === obj2.type;}
|
||||
});
|
||||
|
||||
this.stackDisableActions = new Common.IrregularStack({
|
||||
strongCompare : function(obj1, obj2){return obj1.type === obj2.type;},
|
||||
weakCompare : function(obj1, obj2){return obj1.type === obj2.type;}
|
||||
});
|
||||
|
||||
this._state = {isDisconnected: false, usersCount: 1, fastCoauth: true, lostEditingRights: false, licenseType: false, isDocModified: false};
|
||||
this.languages = null;
|
||||
|
||||
|
@ -177,6 +183,7 @@ define([
|
|||
this.api = this.getApplication().getController('Viewport').getApi();
|
||||
|
||||
Common.UI.FocusManager.init();
|
||||
Common.UI.HintManager.init(this.api);
|
||||
Common.UI.Themes.init(this.api);
|
||||
|
||||
if (this.api){
|
||||
|
@ -213,7 +220,7 @@ define([
|
|||
Common.NotificationCenter.on('download:advanced', _.bind(this.onAdvancedOptions, this));
|
||||
Common.NotificationCenter.on('showmessage', _.bind(this.onExternalMessage, this));
|
||||
Common.NotificationCenter.on('showerror', _.bind(this.onError, this));
|
||||
|
||||
Common.NotificationCenter.on('editing:disable', _.bind(this.onEditingDisable, this));
|
||||
|
||||
this.isShowOpenDialog = false;
|
||||
|
||||
|
@ -704,18 +711,84 @@ define([
|
|||
return"#"+("000000"+color.toString(16)).substr(-6);
|
||||
},
|
||||
|
||||
|
||||
disableEditing: function(disable) {
|
||||
disableEditing: function(disable, temp) {
|
||||
var app = this.getApplication();
|
||||
if (this.appOptions.canEdit && this.editorConfig.mode !== 'view') {
|
||||
app.getController('RightMenu').getView('RightMenu').clearSelection();
|
||||
app.getController('RightMenu').SetDisabled(disable, false);
|
||||
Common.NotificationCenter.trigger('editing:disable', disable, {
|
||||
viewMode: disable,
|
||||
reviewMode: false,
|
||||
fillFormwMode: false,
|
||||
allowMerge: false,
|
||||
allowSignature: false,
|
||||
allowProtect: false,
|
||||
rightMenu: {clear: true, disable: true},
|
||||
statusBar: true,
|
||||
leftMenu: {disable: true, previewMode: true},
|
||||
fileMenu: {protect: true, history: temp},
|
||||
navigation: {disable: !temp, previewMode: true},
|
||||
comments: {disable: !temp, previewMode: true},
|
||||
chat: true,
|
||||
review: true,
|
||||
viewport: true,
|
||||
documentHolder: true,
|
||||
toolbar: true,
|
||||
plugins: false
|
||||
}, temp ? 'reconnect' : 'disconnect');
|
||||
},
|
||||
|
||||
onEditingDisable: function(disable, options, type) {
|
||||
var app = this.getApplication();
|
||||
|
||||
var action = {type: type, disable: disable, options: options};
|
||||
if (disable && !this.stackDisableActions.get({type: type}))
|
||||
this.stackDisableActions.push(action);
|
||||
!disable && this.stackDisableActions.pop({type: type});
|
||||
var prev_options = !disable && (this.stackDisableActions.length()>0) ? this.stackDisableActions.get(this.stackDisableActions.length()-1) : null;
|
||||
|
||||
if (options.rightMenu && app.getController('RightMenu')) {
|
||||
options.rightMenu.clear && app.getController('RightMenu').getView('RightMenu').clearSelection();
|
||||
options.rightMenu.disable && app.getController('RightMenu').SetDisabled(disable, options.allowMerge, options.allowSignature);
|
||||
}
|
||||
if (options.statusBar) {
|
||||
app.getController('Statusbar').getView('Statusbar').SetDisabled(disable);
|
||||
}
|
||||
app.getController('LeftMenu').SetDisabled(disable, true);
|
||||
app.getController('Toolbar').DisableToolbar(disable, disable);
|
||||
if (options.review) {
|
||||
app.getController('Common.Controllers.ReviewChanges').SetDisabled(disable);
|
||||
}
|
||||
if (options.viewport) {
|
||||
app.getController('Viewport').SetDisabled(disable);
|
||||
}
|
||||
if (options.toolbar) {
|
||||
app.getController('Toolbar').DisableToolbar(disable, options.viewMode, options.reviewMode, options.fillFormwMode);
|
||||
}
|
||||
if (options.documentHolder) {
|
||||
app.getController('DocumentHolder').getView().SetDisabled(disable, options.allowProtect);
|
||||
}
|
||||
if (options.leftMenu) {
|
||||
if (options.leftMenu.disable)
|
||||
app.getController('LeftMenu').SetDisabled(disable, options);
|
||||
if (options.leftMenu.previewMode)
|
||||
app.getController('LeftMenu').setPreviewMode(disable);
|
||||
}
|
||||
if (options.fileMenu) {
|
||||
app.getController('LeftMenu').leftMenu.getMenu('file').SetDisabled(disable, options.fileMenu);
|
||||
if (options.leftMenu.disable)
|
||||
app.getController('LeftMenu').leftMenu.getMenu('file').applyMode();
|
||||
}
|
||||
if (options.comments) {
|
||||
var comments = this.getApplication().getController('Common.Controllers.Comments');
|
||||
if (comments && options.comments.previewMode)
|
||||
comments.setPreviewMode(disable);
|
||||
}
|
||||
if (options.navigation && options.navigation.previewMode) {
|
||||
app.getController('Navigation') && app.getController('Navigation').SetDisabled(disable);
|
||||
}
|
||||
if (options.plugins) {
|
||||
app.getController('Common.Controllers.Plugins').getView('Common.Views.Plugins').disableControls(disable);
|
||||
}
|
||||
|
||||
if (prev_options) {
|
||||
this.onEditingDisable(prev_options.disable, prev_options.options, prev_options.type);
|
||||
}
|
||||
},
|
||||
|
||||
onRequestClose: function() {
|
||||
|
@ -800,6 +873,8 @@ define([
|
|||
isDisabled = !cansave && !isSyncButton && !forcesave || this._state.isDisconnected || this._state.fastCoauth && this._state.usersCount>1 && !forcesave;
|
||||
toolbarView.btnSave.setDisabled(isDisabled);
|
||||
}
|
||||
|
||||
Common.UI.HintManager.clearHints(true);
|
||||
},
|
||||
|
||||
onLongActionBegin: function(type, id) {
|
||||
|
@ -845,6 +920,10 @@ define([
|
|||
Common.Utils.InternalSettings.get("de-settings-livecomment") ? this.api.asc_showComments(Common.Utils.InternalSettings.get("de-settings-resolvedcomment")) : this.api.asc_hideComments();
|
||||
}
|
||||
|
||||
if ( id == Asc.c_oAscAsyncAction['Disconnect']) {
|
||||
this.disableEditing(false, true);
|
||||
}
|
||||
|
||||
if ( type == Asc.c_oAscAsyncActionType.BlockInteraction &&
|
||||
(!this.getApplication().getController('LeftMenu').dlgSearch || !this.getApplication().getController('LeftMenu').dlgSearch.isVisible()) &&
|
||||
(!this.getApplication().getController('Toolbar').dlgSymbolTable || !this.getApplication().getController('Toolbar').dlgSymbolTable.isVisible()) &&
|
||||
|
@ -945,6 +1024,12 @@ define([
|
|||
title = this.loadingDocumentTitleText + ' ';
|
||||
text = this.loadingDocumentTextText;
|
||||
break;
|
||||
|
||||
case Asc.c_oAscAsyncAction['Disconnect']:
|
||||
text = this.textDisconnect;
|
||||
this.disableEditing(true, true);
|
||||
break;
|
||||
|
||||
default:
|
||||
if (typeof action.id == 'string'){
|
||||
title = action.id;
|
||||
|
@ -1264,7 +1349,7 @@ define([
|
|||
if (Asc.c_oLicenseResult.ExpiredLimited === licType)
|
||||
this._state.licenseType = licType;
|
||||
|
||||
if ( this.onServerVersion(params.asc_getBuildVersion()) ) return;
|
||||
if ( this.onServerVersion(params.asc_getBuildVersion()) || !this.onLanguageLoaded()) return;
|
||||
|
||||
this.permissions.review = (this.permissions.review === undefined) ? (this.permissions.edit !== false) : this.permissions.review;
|
||||
|
||||
|
@ -1310,6 +1395,15 @@ define([
|
|||
if (this.permissions.editCommentAuthorOnly===undefined && this.permissions.deleteCommentAuthorOnly===undefined)
|
||||
this.appOptions.canEditComments = this.appOptions.canDeleteComments = this.appOptions.isOffline;
|
||||
}
|
||||
if (typeof (this.editorConfig.customization) == 'object') {
|
||||
if (this.editorConfig.customization.showReviewChanges!==undefined)
|
||||
console.log("Obsolete: The 'showReviewChanges' parameter of the 'customization' section is deprecated. Please use 'showReviewChanges' parameter in the 'customization.review' section instead.");
|
||||
if (this.editorConfig.customization.reviewDisplay!==undefined)
|
||||
console.log("Obsolete: The 'reviewDisplay' parameter of the 'customization' section is deprecated. Please use 'reviewDisplay' parameter in the 'customization.review' section instead.");
|
||||
if (this.editorConfig.customization.trackChanges!==undefined)
|
||||
console.log("Obsolete: The 'trackChanges' parameter of the 'customization' section is deprecated. Please use 'trackChanges' parameter in the 'customization.review' section instead.");
|
||||
}
|
||||
|
||||
this.appOptions.trialMode = params.asc_getLicenseMode();
|
||||
this.appOptions.isBeta = params.asc_getIsBeta();
|
||||
this.appOptions.isSignatureSupport= this.appOptions.isEdit && this.appOptions.isDesktopApp && this.appOptions.isOffline && this.api.asc_isSignaturesSupport();
|
||||
|
@ -1349,7 +1443,7 @@ define([
|
|||
this.appOptions.canUseReviewPermissions = this.appOptions.canLicense && (!!this.permissions.reviewGroups ||
|
||||
this.editorConfig.customization && this.editorConfig.customization.reviewPermissions && (typeof (this.editorConfig.customization.reviewPermissions) == 'object'));
|
||||
this.appOptions.canUseCommentPermissions = this.appOptions.canLicense && !!this.permissions.commentGroups;
|
||||
AscCommon.UserInfoParser.setParser(this.appOptions.canUseReviewPermissions || this.appOptions.canUseCommentPermissions);
|
||||
AscCommon.UserInfoParser.setParser(true);
|
||||
AscCommon.UserInfoParser.setCurrentName(this.appOptions.user.fullname);
|
||||
this.appOptions.canUseReviewPermissions && AscCommon.UserInfoParser.setReviewPermissions(this.permissions.reviewGroups, this.editorConfig.customization.reviewPermissions);
|
||||
this.appOptions.canUseCommentPermissions && AscCommon.UserInfoParser.setCommentPermissions(this.permissions.commentGroups);
|
||||
|
@ -2425,17 +2519,7 @@ define([
|
|||
warningDocumentIsLocked: function() {
|
||||
var me = this;
|
||||
var _disable_ui = function (disable) {
|
||||
me.disableEditing(disable);
|
||||
var app = me.getApplication();
|
||||
app.getController('DocumentHolder').getView().SetDisabled(disable);
|
||||
app.getController('Navigation') && app.getController('Navigation').SetDisabled(disable);
|
||||
|
||||
var leftMenu = app.getController('LeftMenu');
|
||||
leftMenu.leftMenu.getMenu('file').getButton('protect').setDisabled(disable);
|
||||
leftMenu.setPreviewMode(disable);
|
||||
|
||||
var comments = app.getController('Common.Controllers.Comments');
|
||||
if (comments) comments.setPreviewMode(disable);
|
||||
me.disableEditing(disable, true);
|
||||
};
|
||||
|
||||
Common.Utils.warningDocumentIsLocked({disablefunc: _disable_ui});
|
||||
|
@ -2551,6 +2635,18 @@ define([
|
|||
this.getApplication().getController('DocumentHolder').getView().focus();
|
||||
},
|
||||
|
||||
onLanguageLoaded: function() {
|
||||
if (!Common.Locale.getCurrentLanguage()) {
|
||||
Common.UI.warning({
|
||||
msg: this.errorLang,
|
||||
buttons: [],
|
||||
closable: false
|
||||
});
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
|
||||
leavePageText: 'You have unsaved changes in this document. Click \'Stay on this Page\' then \'Save\' to save them. Click \'Leave this Page\' to discard all the unsaved changes.',
|
||||
criticalErrorTitle: 'Error',
|
||||
notcriticalErrorTitle: 'Warning',
|
||||
|
@ -2922,7 +3018,9 @@ define([
|
|||
txtNoTableOfFigures: "No table of figures entries found.",
|
||||
txtTableOfFigures: 'Table of figures',
|
||||
txtStyle_endnote_text: 'Endnote Text',
|
||||
txtTOCHeading: 'TOC Heading'
|
||||
txtTOCHeading: 'TOC Heading',
|
||||
textDisconnect: 'Connection is lost',
|
||||
errorLang: 'The interface language is not loaded.<br>Please contact your Document Server administrator.'
|
||||
}
|
||||
})(), DE.Controllers.Main || {}))
|
||||
});
|
|
@ -144,7 +144,9 @@ define([
|
|||
}
|
||||
|
||||
var trackRevisions = me.api.asc_IsTrackRevisions(),
|
||||
trackChanges = typeof (config.customization) == 'object' ? config.customization.trackChanges : undefined;
|
||||
trackChanges = config.customization && config.customization.review ? config.customization.review.trackChanges : undefined;
|
||||
(trackChanges===undefined) && (trackChanges = config.customization ? config.customization.trackChanges : undefined);
|
||||
|
||||
if ( config.isReviewOnly || trackChanges===true || (trackChanges!==false) && trackRevisions) {
|
||||
_process_changestip();
|
||||
} else if ( trackRevisions ) {
|
||||
|
|
|
@ -310,14 +310,12 @@ define([
|
|||
toolbar.mnuMultiChangeLevel.menu.on('item:click', _.bind(this.onChangeLevelClick, this, 2));
|
||||
toolbar.btnHighlightColor.on('click', _.bind(this.onBtnHighlightColor, this));
|
||||
toolbar.btnFontColor.on('click', _.bind(this.onBtnFontColor, this));
|
||||
toolbar.btnFontColor.on('color:select', _.bind(this.onSelectFontColor, this));
|
||||
toolbar.btnFontColor.on('auto:select', _.bind(this.onAutoFontColor, this));
|
||||
toolbar.btnParagraphColor.on('click', _.bind(this.onBtnParagraphColor, this));
|
||||
toolbar.btnParagraphColor.on('color:select', _.bind(this.onParagraphColorPickerSelect, this));
|
||||
toolbar.mnuHighlightColorPicker.on('select', _.bind(this.onSelectHighlightColor, this));
|
||||
toolbar.mnuFontColorPicker.on('select', _.bind(this.onSelectFontColor, this));
|
||||
toolbar.mnuParagraphColorPicker.on('select', _.bind(this.onParagraphColorPickerSelect, this));
|
||||
toolbar.mnuHighlightTransparent.on('click', _.bind(this.onHighlightTransparentClick, this));
|
||||
$('#id-toolbar-menu-auto-fontcolor').on('click', _.bind(this.onAutoFontColor, this));
|
||||
$('#id-toolbar-menu-new-fontcolor').on('click', _.bind(this.onNewFontColor, this));
|
||||
$('#id-toolbar-menu-new-paracolor').on('click', _.bind(this.onNewParagraphColor, this));
|
||||
toolbar.mnuLineSpace.on('item:toggle', _.bind(this.onLineSpaceToggle, this));
|
||||
toolbar.mnuNonPrinting.on('item:toggle', _.bind(this.onMenuNonPrintingToggle, this));
|
||||
toolbar.btnShowHidenChars.on('toggle', _.bind(this.onNonPrintingToggle, this));
|
||||
|
@ -895,6 +893,8 @@ define([
|
|||
if (need_disable != toolbar.btnColumns.isDisabled())
|
||||
toolbar.btnColumns.setDisabled(need_disable);
|
||||
|
||||
toolbar.btnLineNumbers.setDisabled(in_image && in_para || this._state.lock_doc);
|
||||
|
||||
if (toolbar.listStylesAdditionalMenuItem && (frame_pr===undefined) !== toolbar.listStylesAdditionalMenuItem.isDisabled())
|
||||
toolbar.listStylesAdditionalMenuItem.setDisabled(frame_pr===undefined);
|
||||
|
||||
|
@ -1761,6 +1761,7 @@ define([
|
|||
|
||||
switch (item.value) {
|
||||
case 0:
|
||||
this._state.linenum = undefined;
|
||||
this.api.asc_SetLineNumbersProps(Asc.c_oAscSectionApplyType.Current, null);
|
||||
break;
|
||||
case 1:
|
||||
|
@ -2437,10 +2438,6 @@ define([
|
|||
return out_value;
|
||||
},
|
||||
|
||||
onNewFontColor: function(picker, color) {
|
||||
this.toolbar.mnuFontColorPicker.addNewColor();
|
||||
},
|
||||
|
||||
onAutoFontColor: function(e) {
|
||||
this._state.clrtext = this._state.clrtext_asccolor = undefined;
|
||||
|
||||
|
@ -2449,21 +2446,14 @@ define([
|
|||
this.api.put_TextColor(color);
|
||||
|
||||
this.toolbar.btnFontColor.currentColor = {color: color, isAuto: true};
|
||||
this.toolbar.btnFontColor.setColor('000');
|
||||
|
||||
this.toolbar.mnuFontColorPicker.clearSelection();
|
||||
this.toolbar.mnuFontColorPicker.currentColor = {color: color, isAuto: true};
|
||||
},
|
||||
|
||||
onNewParagraphColor: function(picker, color) {
|
||||
this.toolbar.mnuParagraphColorPicker.addNewColor();
|
||||
},
|
||||
|
||||
onSelectHighlightColor: function(picker, color) {
|
||||
this._setMarkerColor(color, 'menu');
|
||||
},
|
||||
|
||||
onSelectFontColor: function(picker, color) {
|
||||
onSelectFontColor: function(btn, color) {
|
||||
this._state.clrtext = this._state.clrtext_asccolor = undefined;
|
||||
|
||||
this.toolbar.btnFontColor.currentColor = color;
|
||||
|
@ -2476,7 +2466,7 @@ define([
|
|||
Common.component.Analytics.trackEvent('ToolBar', 'Text Color');
|
||||
},
|
||||
|
||||
onParagraphColorPickerSelect: function(picker, color) {
|
||||
onParagraphColorPickerSelect: function(btn, color) {
|
||||
this._state.clrback = this._state.clrshd_asccolor = undefined;
|
||||
|
||||
this.toolbar.btnParagraphColor.currentColor = color;
|
||||
|
@ -2514,9 +2504,6 @@ define([
|
|||
|
||||
onHighlightTransparentClick: function(item, e) {
|
||||
this._setMarkerColor('transparent', 'menu');
|
||||
item.setChecked(true, true);
|
||||
this.toolbar.btnHighlightColor.currentColor = 'transparent';
|
||||
this.toolbar.btnHighlightColor.setColor(this.toolbar.btnHighlightColor.currentColor);
|
||||
},
|
||||
|
||||
onParagraphColor: function(shd) {
|
||||
|
@ -2562,9 +2549,8 @@ define([
|
|||
onApiTextColor: function(color) {
|
||||
if (color.get_auto()) {
|
||||
if (this._state.clrtext !== 'auto') {
|
||||
this.toolbar.btnFontColor.setAutoColor(true);
|
||||
this.toolbar.mnuFontColorPicker.clearSelection();
|
||||
var clr_item = this.toolbar.btnFontColor.menu.$el.find('#id-toolbar-menu-auto-fontcolor > a');
|
||||
!clr_item.hasClass('selected') && clr_item.addClass('selected');
|
||||
this._state.clrtext = 'auto';
|
||||
}
|
||||
} else {
|
||||
|
@ -2583,8 +2569,7 @@ define([
|
|||
(clr.effectValue!==this._state.clrtext.effectValue || this._state.clrtext.color.indexOf(clr.color)<0)) ||
|
||||
(type1!='object' && this._state.clrtext.indexOf(clr)<0 )) {
|
||||
|
||||
var clr_item = this.toolbar.btnFontColor.menu.$el.find('#id-toolbar-menu-auto-fontcolor > a');
|
||||
clr_item.hasClass('selected') && clr_item.removeClass('selected');
|
||||
this.toolbar.btnFontColor.setAutoColor(false);
|
||||
if ( typeof(clr) == 'object' ) {
|
||||
var isselected = false;
|
||||
for (var i=0; i<10; i++) {
|
||||
|
@ -2983,7 +2968,8 @@ define([
|
|||
var me = this;
|
||||
|
||||
if (h === 'menu') {
|
||||
me.toolbar.mnuHighlightTransparent.setChecked(false);
|
||||
me._state.clrhighlight = undefined;
|
||||
me.onApiHighlightColor();
|
||||
|
||||
me.toolbar.btnHighlightColor.currentColor = strcolor;
|
||||
me.toolbar.btnHighlightColor.setColor(me.toolbar.btnHighlightColor.currentColor);
|
||||
|
@ -3051,9 +3037,11 @@ define([
|
|||
var toolbar = this.toolbar;
|
||||
if(disable) {
|
||||
if (reviewmode) {
|
||||
mask = $("<div class='toolbar-group-mask'>").appendTo(toolbar.$el.find('.toolbar section.panel .group:not(.no-mask):not(.no-group-mask.review)'));
|
||||
mask = $("<div class='toolbar-group-mask'>").appendTo(toolbar.$el.find('.toolbar section.panel .group:not(.no-mask):not(.no-group-mask.review):not(.no-group-mask.inner-elset)'));
|
||||
mask = $("<div class='toolbar-group-mask'>").appendTo(toolbar.$el.find('.toolbar section.panel .group.no-group-mask.inner-elset .elset'));
|
||||
} else if (fillformmode) {
|
||||
mask = $("<div class='toolbar-group-mask'>").appendTo(toolbar.$el.find('.toolbar section.panel .group:not(.no-mask):not(.no-group-mask.form-view)'));
|
||||
mask = $("<div class='toolbar-group-mask'>").appendTo(toolbar.$el.find('.toolbar section.panel .group:not(.no-mask):not(.no-group-mask.form-view):not(.no-group-mask.inner-elset)'));
|
||||
mask = $("<div class='toolbar-group-mask'>").appendTo(toolbar.$el.find('.toolbar section.panel .group.no-group-mask.inner-elset .elset:not(.no-group-mask.form-view)'));
|
||||
} else
|
||||
mask = $("<div class='toolbar-mask'>").appendTo(toolbar.$el.find('.toolbar'));
|
||||
} else {
|
||||
|
@ -3061,10 +3049,19 @@ define([
|
|||
}
|
||||
$('.no-group-mask').each(function(index, item){
|
||||
var $el = $(item);
|
||||
if ($el.find('.toolbar-group-mask').length>0)
|
||||
if ($el.find('> .toolbar-group-mask').length>0)
|
||||
$el.css('opacity', 0.4);
|
||||
else {
|
||||
$el.css('opacity', reviewmode || fillformmode || !disable ? 1 : 0.4);
|
||||
$el.find('.elset').each(function(index, elitem){
|
||||
var $elset = $(elitem);
|
||||
if ($elset.find('> .toolbar-group-mask').length>0) {
|
||||
$elset.css('opacity', 0.4);
|
||||
} else {
|
||||
$elset.css('opacity', reviewmode || fillformmode || !disable ? 1 : 0.4);
|
||||
}
|
||||
$el.css('opacity', 1);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -3193,7 +3190,7 @@ define([
|
|||
me.appOptions = config;
|
||||
|
||||
if ( config.canCoAuthoring && config.canComments ) {
|
||||
this.btnsComment = Common.Utils.injectButtons(this.toolbar.$el.find('.slot-comment'), 'tlbtn-addcomment-', 'toolbar__icon btn-menu-comments', this.toolbar.capBtnComment);
|
||||
this.btnsComment = Common.Utils.injectButtons(this.toolbar.$el.find('.slot-comment'), 'tlbtn-addcomment-', 'toolbar__icon btn-menu-comments', this.toolbar.capBtnComment, undefined, undefined, undefined, undefined, '1', 'bottom');
|
||||
if ( this.btnsComment.length ) {
|
||||
var _comments = DE.getController('Common.Controllers.Comments').getView();
|
||||
this.btnsComment.forEach(function (btn) {
|
||||
|
|
|
@ -153,6 +153,8 @@ define([
|
|||
|
||||
Common.NotificationCenter.on('app:face', this.onAppShowed.bind(this));
|
||||
Common.NotificationCenter.on('app:ready', this.onAppReady.bind(this));
|
||||
Common.NotificationCenter.on('uitheme:changed', this.onThemeChanged.bind(this));
|
||||
Common.NotificationCenter.on('contenttheme:dark', this.onContentThemeChangedToDark.bind(this));
|
||||
},
|
||||
|
||||
onAppShowed: function (config) {
|
||||
|
@ -248,6 +250,14 @@ define([
|
|||
if (!config.isEdit)
|
||||
mnuitemHideRulers.hide();
|
||||
|
||||
me.header.menuItemsDarkMode = new Common.UI.MenuItem({
|
||||
caption: 'Dark mode',
|
||||
checkable: true,
|
||||
checked: Common.UI.Themes.isContentThemeDark(),
|
||||
disabled: !Common.UI.Themes.isDarkTheme(),
|
||||
value: 'mode:dark'
|
||||
});
|
||||
|
||||
me.header.mnuitemFitPage = new Common.UI.MenuItem({
|
||||
caption: me.textFitPage,
|
||||
checkable: true,
|
||||
|
@ -286,6 +296,8 @@ define([
|
|||
mnuitemHideStatusBar,
|
||||
mnuitemHideRulers,
|
||||
{caption:'--'},
|
||||
me.header.menuItemsDarkMode,
|
||||
{caption:'--'},
|
||||
me.header.mnuitemFitPage,
|
||||
me.header.mnuitemFitWidth,
|
||||
me.header.mnuZoom,
|
||||
|
@ -314,6 +326,7 @@ define([
|
|||
})).on('click', _on_btn_zoom.bind(me, 'up'));
|
||||
|
||||
me.header.btnOptions.menu.on('item:click', me.onOptionsItemClick.bind(this));
|
||||
me.header.btnContentMode.setDisabled(!Common.UI.Themes.isDarkTheme());
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -354,6 +367,25 @@ define([
|
|||
this.api.Resize();
|
||||
},
|
||||
|
||||
onThemeChanged: function (id) {
|
||||
var menuItem = this.header.menuItemsDarkMode;
|
||||
if ( !Common.UI.Themes.isDarkTheme() ) {
|
||||
Common.Utils.InternalSettings.set("de-mode-dark", menuItem.isChecked());
|
||||
|
||||
menuItem.setChecked(false);
|
||||
menuItem.setDisabled(true);
|
||||
} else {
|
||||
menuItem.setChecked(Common.Utils.InternalSettings.get("de-mode-dark"));
|
||||
menuItem.setDisabled(false);
|
||||
}
|
||||
|
||||
this.header.btnContentMode.setDisabled(!Common.UI.Themes.isDarkTheme());
|
||||
},
|
||||
|
||||
onContentThemeChangedToDark: function (isdark) {
|
||||
this.header.menuItemsDarkMode.setChecked(isdark, true);
|
||||
},
|
||||
|
||||
onWindowResize: function(e) {
|
||||
this.onLayoutChanged('window');
|
||||
Common.NotificationCenter.trigger('window:resize');
|
||||
|
@ -400,6 +432,7 @@ define([
|
|||
Common.NotificationCenter.trigger('edit:complete', me.header);
|
||||
break;
|
||||
case 'advanced': me.header.fireEvent('file:settings', me.header); break;
|
||||
case 'mode:dark': Common.UI.Themes.toggleContentTheme(); break;
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td class="padding-small" colspan=2>
|
||||
<button type="button" class="btn btn-text-default auto" id="chart-button-edit-data" style="min-width:115px;"><%= scope.textEditData %></button>
|
||||
<button type="button" class="btn btn-text-default auto" id="chart-button-edit-data" style="min-width:115px;" data-hint="1" data-hint-direction="bottom" data-hint-offset="big"><%= scope.textEditData %></button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -64,7 +64,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td align="center" colspan=2>
|
||||
<label class="link" id="chart-advanced-link"><%= scope.textAdvanced %></label>
|
||||
<label class="link" id="chart-advanced-link" data-hint="1" data-hint-direction="bottom" data-hint-offset="medium"><%= scope.textAdvanced %></label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="finish-cell"></tr>
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
<div id="form-txt-help"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="form-textfield">
|
||||
<tr class="form-not-image">
|
||||
<td class="padding-small">
|
||||
<div id="form-chb-fixed"></div>
|
||||
</td>
|
||||
|
@ -62,13 +62,34 @@
|
|||
<div id="form-color-btn" style="display: inline-block; float: right;"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="form-textfield">
|
||||
<td class="padding-small">
|
||||
<div id="form-chb-autofit"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="form-textfield">
|
||||
<td class="padding-small">
|
||||
<div id="form-chb-multiline"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="form-image">
|
||||
<td class="padding-large">
|
||||
<label class="input-label"><%= scope.textScale %></label>
|
||||
<div id="form-combo-scale" style="width: 100%;"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="form-image">
|
||||
<td class="padding-large">
|
||||
<div id="form-chb-aspect"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="form-image">
|
||||
<td class="padding-large">
|
||||
<div id="form-button-replace" style="width:100%;"></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table cols="2" class="form-list">
|
||||
<table cols="2" class="form-list" style="margin-top:5px;">
|
||||
<tr>
|
||||
<td colspan="2" class="padding-small">
|
||||
<label class="input-label"><%= scope.textValue %></label>
|
||||
|
|
|
@ -71,7 +71,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td class="padding-small">
|
||||
<button type="button" class="btn btn-text-default" id="headerfooter-button-current" style="width:100%;"><%= scope.textInsertCurrent %></button>
|
||||
<button type="button" class="btn btn-text-default" id="headerfooter-button-current" style="width:100%;" data-hint="1" data-hint-direction="bottom" data-hint-offset="big"><%= scope.textInsertCurrent %></button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|