Merge branch 'release/v4.1.0'

This commit is contained in:
Alexey Golubev 2016-09-05 13:47:35 +03:00
commit 37a9483923
155 changed files with 9413 additions and 8017 deletions

View file

@ -1,4 +1,4 @@
[![License](https://img.shields.io/badge/License-GNU%20AGPL%20V3-green.svg?style=flat)](http://www.gnu.org/licenses/agpl-3.0.ru.html) ![Release](https://img.shields.io/badge/Release-v4.0.3-blue.svg?style=flat) [![License](https://img.shields.io/badge/License-GNU%20AGPL%20V3-green.svg?style=flat)](http://www.gnu.org/licenses/agpl-3.0.ru.html) ![Release](https://img.shields.io/badge/Release-v4.1.0-blue.svg?style=flat)
## web-apps ## web-apps
@ -14,10 +14,11 @@ SaaS version: [http://www.onlyoffice.com](http://www.onlyoffice.com "http://www.
## User Feedback and Support ## User Feedback and Support
If you have any problems with or questions about [ONLYOFFICE Document Server][2], please visit our official forum to find answers to your questions: [dev.onlyoffice.org][1]. If you have any problems with or questions about [ONLYOFFICE Document Server][2], please visit our official forum to find answers to your questions: [dev.onlyoffice.org][1] or you can ask and answer ONLYOFFICE development questions on [Stack Overflow][3].
[1]: http://dev.onlyoffice.org [1]: http://dev.onlyoffice.org
[2]: https://github.com/ONLYOFFICE/DocumentServer [2]: https://github.com/ONLYOFFICE/DocumentServer
[3]: http://stackoverflow.com/questions/tagged/onlyoffice
## License ## License

View file

@ -218,7 +218,7 @@ define([
style : me.style style : me.style
})); }));
if (me.menu && _.isFunction(me.menu.render)) if (me.menu && _.isObject(me.menu) && _.isFunction(me.menu.render))
me.menu.render(me.cmpEl); me.menu.render(me.cmpEl);
parentEl.html(me.cmpEl); parentEl.html(me.cmpEl);
@ -379,7 +379,7 @@ define([
} }
if (me.disabled) { if (me.disabled) {
me.setDisabled(me.disabled); me.setDisabled(!(me.disabled=false));
} }
me.trigger('render:after', me); me.trigger('render:after', me);
@ -414,7 +414,7 @@ define([
}, },
setDisabled: function(disabled) { setDisabled: function(disabled) {
if (this.rendered) { if (this.rendered && this.disabled != disabled) {
var el = this.cmpEl, var el = this.cmpEl,
isGroup = el.hasClass('btn-group'); isGroup = el.hasClass('btn-group');
@ -461,6 +461,8 @@ define([
updateHint: function(hint) { updateHint: function(hint) {
this.options.hint = hint; this.options.hint = hint;
if (!this.rendered) return;
var cmpEl = this.cmpEl, var cmpEl = this.cmpEl,
modalParents = cmpEl.closest('.asc-window'); modalParents = cmpEl.closest('.asc-window');
@ -489,6 +491,13 @@ define([
} }
} }
} }
},
setMenu: function (m) {
if (m && _.isObject(m) && _.isFunction(m.render)){
this.menu = m;
this.menu.render(this.cmpEl);
}
} }
}); });
}); });

View file

@ -215,4 +215,52 @@ define([
txtNoBorders: 'No Borders' txtNoBorders: 'No Borders'
}, Common.UI.ComboBorderSizeEditable || {})); }, Common.UI.ComboBorderSizeEditable || {}));
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>',
'<div style="display: table-cell;"></div>',
'<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"><span class="caret img-commonctrl"></span></button>',
'<ul class="dropdown-menu <%= menuCls %>" style="<%= menuStyle %>" role="menu">',
'<% _.each(items, function(item) { %>',
'<li id="<%= item.id %>" data-value="<%= item.value %>"><a tabindex="-1" type="menuitem" style="padding: 2px 0;">',
'<span style="margin-top: 0;"></span>',
'<% if (item.offsety!==undefined) { %>',
'<img src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" align="left" style="background-position: 0 -<%= item.offsety %>px;">',
'<% } %>',
'</a></li>',
'<% }); %>',
'</ul>',
'</div>'
].join('')),
initialize : function(options) {
Common.UI.ComboBorderSize.prototype.initialize.call(this, _.extend({
store: new Common.UI.BordersStore(),
data: [
{value: Asc.c_oDashType.solid, offsety: 140},
{value: Asc.c_oDashType.sysDot, offsety: 160},
{value: Asc.c_oDashType.sysDash, offsety: 180},
{value: Asc.c_oDashType.dash, offsety: 200},
{value: Asc.c_oDashType.dashDot, offsety: 220},
{value: Asc.c_oDashType.lgDash, offsety: 240},
{value: Asc.c_oDashType.lgDashDot, offsety: 260},
{value: Asc.c_oDashType.lgDashDotDot, offsety: 280}
]
}, options));
},
render : function(parentEl) {
Common.UI.ComboBorderSize.prototype.render.call(this, parentEl);
return this;
},
updateFormControl: function(record) {
var formcontrol = $(this.el).find('.form-control');
formcontrol[0].innerHTML = '';
formcontrol.removeClass('text').addClass('image');
formcontrol.css('background-position', '0 -' + record.get('offsety') + 'px');
}
}, Common.UI.ComboBorderType || {}));
}); });

View file

@ -188,13 +188,6 @@ define([
Common.NotificationCenter.on('menumanager:hideall', _.bind(me.closeMenu, me)); Common.NotificationCenter.on('menumanager:hideall', _.bind(me.closeMenu, me));
this.scroller = new Common.UI.Scroller({
el: $('.dropdown-menu', me.cmpEl),
minScrollbarLength : 40,
scrollYMarginOffset: 30,
includePadding : true
});
// set default selection // set default selection
this.setDefaultSelection(); this.setDefaultSelection();
@ -218,8 +211,17 @@ define([
openMenu: function(delay) { openMenu: function(delay) {
var me = this; var me = this;
if ( !this.scroller ) {
this.scroller = new Common.UI.Scroller(_.extend({
el: $('.dropdown-menu', this.cmpEl),
minScrollbarLength: 40,
scrollYMarginOffset: 30,
includePadding: true
}, this.options.scroller));
}
_.delay(function(){ _.delay(function(){
me.cmpEl.addClass('open') me.cmpEl.addClass('open');
}, delay || 0); }, delay || 0);
}, },
@ -232,6 +234,16 @@ define([
}, },
onBeforeShowMenu: function(e) { onBeforeShowMenu: function(e) {
if ( !this.scroller ) {
this.scroller = new Common.UI.Scroller(_.extend({
el: $('.dropdown-menu', this.cmpEl),
minScrollbarLength: 40,
scrollYMarginOffset: 30,
includePadding: true
}, this.options.scroller));
}
Common.NotificationCenter.trigger('menu:show');
this.trigger('show:before', this, e); this.trigger('show:before', this, e);
if (this.options.hint) { if (this.options.hint) {
var tip = this.cmpEl.data('bs.tooltip'); var tip = this.cmpEl.data('bs.tooltip');
@ -273,6 +285,7 @@ define([
onAfterHideMenu: function(e) { onAfterHideMenu: function(e) {
this.cmpEl.find('.dropdown-toggle').blur(); this.cmpEl.find('.dropdown-toggle').blur();
this.trigger('hide:after', this, e); this.trigger('hide:after', this, e);
Common.NotificationCenter.trigger('menu:hide');
}, },
onAfterKeydownMenu: function(e) { onAfterKeydownMenu: function(e) {
@ -308,6 +321,8 @@ define([
me._skipInputChange = true; me._skipInputChange = true;
me.cmpEl.find('ul li:first a').focus(); me.cmpEl.find('ul li:first a').focus();
}, 10); }, 10);
} else if (e.keyCode == Common.UI.Keys.RETURN && $(e.target).val() === me.lastValue){
this._input.trigger('change', { reapply: true });
} else } else
me._skipInputChange = false; me._skipInputChange = false;
}, },
@ -329,7 +344,7 @@ define([
var val = $(e.target).val(), var val = $(e.target).val(),
record = {}; record = {};
if (this.lastValue === val) { if (this.lastValue === val && !(extra && extra.reapply)) {
if (extra && extra.onkeydown) if (extra && extra.onkeydown)
this.trigger('combo:blur', this, e); this.trigger('combo:blur', this, e);
return; return;
@ -523,12 +538,12 @@ define([
this.scroller.destroy(); this.scroller.destroy();
delete this.scroller; delete this.scroller;
} }
this.scroller = new Common.UI.Scroller({ this.scroller = new Common.UI.Scroller(_.extend({
el: $('.dropdown-menu', this.cmpEl), el: $('.dropdown-menu', this.cmpEl),
minScrollbarLength : 40, minScrollbarLength : 40,
scrollYMarginOffset: 30, scrollYMarginOffset: 30,
includePadding : true includePadding : true
}); }, this.options.scroller));
} }
} }
})()); })());

View file

@ -85,11 +85,14 @@ define([
initialize : function(options) { initialize : function(options) {
Common.UI.ComboBox.prototype.initialize.call(this, _.extend(options, { Common.UI.ComboBox.prototype.initialize.call(this, _.extend(options, {
displayField: 'name' displayField: 'name',
scroller: {
alwaysVisibleY: true,
onChange: this.updateVisibleFontsTiles.bind(this)
}
})); }));
this.recent = _.isNumber(options.recent) ? options.recent : 3; this.recent = _.isNumber(options.recent) ? options.recent : 3;
this.bindUpdateVisibleFontsTiles = _.bind(this.updateVisibleFontsTiles, this);
Common.NotificationCenter.on('fonts:change', _.bind(this.onApiChangeFont, this)); Common.NotificationCenter.on('fonts:change', _.bind(this.onApiChangeFont, this));
Common.NotificationCenter.on('fonts:load', _.bind(this.fillFonts, this)); Common.NotificationCenter.on('fonts:load', _.bind(this.fillFonts, this));
@ -109,8 +112,6 @@ define([
this._input.on('keyup', _.bind(this.onInputKeyUp, this)); this._input.on('keyup', _.bind(this.onInputKeyUp, this));
this._input.on('keydown', _.bind(this.onInputKeyDown, this)); this._input.on('keydown', _.bind(this.onInputKeyDown, this));
this.scroller.update({alwaysVisibleY: true, onChange:this.bindUpdateVisibleFontsTiles});
return this; return this;
}, },
@ -138,8 +139,9 @@ define([
}, 10); }, 10);
return false; return false;
} else if ((e.keyCode == Common.UI.Keys.HOME || e.keyCode == Common.UI.Keys.END || e.keyCode == Common.UI.Keys.BACKSPACE) && this.isMenuOpen()) { } else if ((e.keyCode == Common.UI.Keys.HOME || e.keyCode == Common.UI.Keys.END || e.keyCode == Common.UI.Keys.BACKSPACE) && this.isMenuOpen()) {
setTimeout(function() {
me._input.focus(); me._input.focus();
setTimeout(function() {
me._input[0].selectionStart = me._input[0].selectionEnd = (e.keyCode == Common.UI.Keys.HOME) ? 0 : me._input[0].value.length;
}, 10); }, 10);
} }
@ -157,7 +159,12 @@ define([
this.selectCandidate(e.keyCode == Common.UI.Keys.DELETE || e.keyCode == Common.UI.Keys.BACKSPACE); this.selectCandidate(e.keyCode == Common.UI.Keys.DELETE || e.keyCode == Common.UI.Keys.BACKSPACE);
if (this._selectedItem) { if (this._selectedItem) {
var me = this; var me = this;
setTimeout(function() { if (me._timerSelection===undefined)
me._timerSelection = setInterval(function(){
if ((new Date()) - me._inInputKeyDown<100 || !me._selectedItem) return;
clearInterval(me._timerSelection);
me._timerSelection = undefined;
var input = me._input[0], var input = me._input[0],
text = me._selectedItem.get(me.displayField), text = me._selectedItem.get(me.displayField),
inputVal = input.value; inputVal = input.value;
@ -176,6 +183,7 @@ define([
}, },
onInputKeyDown: function(e) { onInputKeyDown: function(e) {
this._inInputKeyDown = (new Date());
var me = this; var me = this;
if (e.keyCode == Common.UI.Keys.ESC){ if (e.keyCode == Common.UI.Keys.ESC){

View file

@ -536,7 +536,7 @@ define([
var innerEl = $(this.el).find('.inner'), var innerEl = $(this.el).find('.inner'),
inner_top = innerEl.offset().top, inner_top = innerEl.offset().top,
idx = _.indexOf(this.store.models, record), idx = _.indexOf(this.store.models, record),
div = (idx>=0) ? $(this.dataViewItems[idx].el) : innerEl.find('#' + record.get('id')); div = (idx>=0 && this.dataViewItems.length>idx) ? $(this.dataViewItems[idx].el) : innerEl.find('#' + record.get('id'));
if (div.length<=0) return; if (div.length<=0) return;
var div_top = div.offset().top; var div_top = div.offset().top;
@ -676,7 +676,7 @@ define([
? this.parentMenu.cmpEl ? this.parentMenu.cmpEl
: this.parentMenu.cmpEl.find('[role=menu]'), : this.parentMenu.cmpEl.find('[role=menu]'),
innerEl = $(this.el).find('.inner').andSelf().filter('.inner'), innerEl = $(this.el).find('.inner').andSelf().filter('.inner'),
docH = $(document).height(), docH = Common.Utils.innerHeight(),
menuH = menuRoot.outerHeight(), menuH = menuRoot.outerHeight(),
top = parseInt(menuRoot.css('top')); top = parseInt(menuRoot.css('top'));

View file

@ -58,8 +58,8 @@ define([
var onMouseMove = function(event){ var onMouseMove = function(event){
me.setTableSize( me.setTableSize(
Math.ceil((event.offsetX === undefined ? event.originalEvent.layerX : event.offsetX) / me.itemSize), Math.ceil((event.offsetX === undefined ? event.originalEvent.layerX : event.offsetX*Common.Utils.zoom()) / me.itemSize),
Math.ceil((event.offsetY === undefined ? event.originalEvent.layerY : event.offsetY) / me.itemSize), Math.ceil((event.offsetY === undefined ? event.originalEvent.layerY : event.offsetY*Common.Utils.zoom()) / me.itemSize),
event event
); );
}; };

View file

@ -134,8 +134,8 @@ define([
var onSBAreaMouseMove = function(event, element, eOpts){ var onSBAreaMouseMove = function(event, element, eOpts){
if (arrowSatBrightness.length>0 && areaSatBrightness.length>0) { if (arrowSatBrightness.length>0 && areaSatBrightness.length>0) {
var pos = [ var pos = [
Math.max(0, Math.min(100, (parseInt((event.pageX - areaSatBrightness.offset().left) / areaSatBrightness.width() * 100)))), Math.max(0, Math.min(100, (parseInt((event.pageX*Common.Utils.zoom() - areaSatBrightness.offset().left) / areaSatBrightness.width() * 100)))),
Math.max(0, Math.min(100, (parseInt((event.pageY - areaSatBrightness.offset().top) / areaSatBrightness.height() * 100)))) Math.max(0, Math.min(100, (parseInt((event.pageY*Common.Utils.zoom() - areaSatBrightness.offset().top) / areaSatBrightness.height() * 100))))
]; ];
arrowSatBrightness.css('left', pos[0] + '%'); arrowSatBrightness.css('left', pos[0] + '%');
@ -154,7 +154,7 @@ define([
var onHueAreaMouseMove = function(event, element, eOpts){ var onHueAreaMouseMove = function(event, element, eOpts){
if (arrowHue&& areaHue) { if (arrowHue&& areaHue) {
var pos = Math.max(0, Math.min(100, (parseInt((event.pageY - areaHue.offset().top) / areaHue.height() * 100)))); var pos = Math.max(0, Math.min(100, (parseInt((event.pageY*Common.Utils.zoom() - areaHue.offset().top) / areaHue.height() * 100))));
arrowHue.css('top', pos + '%'); arrowHue.css('top', pos + '%');
hueVal = parseInt(360 * pos / 100.0); hueVal = parseInt(360 * pos / 100.0);

View file

@ -231,6 +231,11 @@ define([
mouseup : this.resize.eventStop mouseup : this.resize.eventStop
}); });
Common.NotificationCenter.on({
'frame:mousemove': this.resize.eventMove,
'frame:mouseup': this.resize.eventStop
});
var panel = e.data.panel; var panel = e.data.panel;
this.resize.type = e.data.type; this.resize.type = e.data.type;
this.resize.$el = panel.el; this.resize.$el = panel.el;
@ -244,23 +249,25 @@ define([
if (e.data.type == 'vertical') { if (e.data.type == 'vertical') {
this.resize.height = parseInt(this.resize.$el.css('height')); this.resize.height = parseInt(this.resize.$el.css('height'));
this.resize.max = (panel.maxpos > 0 ? panel.maxpos : this.resize.$el.parent().height() + panel.maxpos) - this.resize.height; this.resize.max = (panel.maxpos > 0 ? panel.maxpos : this.resize.$el.parent().height() + panel.maxpos) - this.resize.height;
this.resize.inity = e.pageY - parseInt(e.currentTarget.style.top); this.resize.inity = e.pageY*Common.Utils.zoom() - parseInt(e.currentTarget.style.top);
} else } else
if (e.data.type == 'horizontal') { if (e.data.type == 'horizontal') {
this.resize.width = parseInt(this.resize.$el.css('width')); this.resize.width = parseInt(this.resize.$el.css('width'));
this.resize.max = (panel.maxpos > 0 ? panel.maxpos : this.resize.$el.parent().height() + panel.maxpos) - this.resize.width; this.resize.max = (panel.maxpos > 0 ? panel.maxpos : this.resize.$el.parent().height() + panel.maxpos) - this.resize.width;
this.resize.initx = e.pageX - parseInt(e.currentTarget.style.left); this.resize.initx = e.pageX*Common.Utils.zoom() - parseInt(e.currentTarget.style.left);
} }
Common.NotificationCenter.trigger('layout:resizestart');
}, },
resizeMove: function(e) { resizeMove: function(e) {
var zoom = (e instanceof jQuery.Event) ? Common.Utils.zoom() : 1;
if (this.resize.type == 'vertical') { if (this.resize.type == 'vertical') {
var prop = 'top', var prop = 'top',
value = e.pageY - this.resize.inity; value = e.pageY*zoom - this.resize.inity;
} else } else
if (this.resize.type == 'horizontal') { if (this.resize.type == 'horizontal') {
prop = 'left'; prop = 'left';
value = e.pageX - this.resize.initx; value = e.pageX*zoom - this.resize.initx;
} }
if (this.resize.fmin && this.resize.fmax) { if (this.resize.fmin && this.resize.fmax) {
@ -283,13 +290,21 @@ define([
mouseup : this.resize.eventStop mouseup : this.resize.eventStop
}); });
Common.NotificationCenter.off({
'frame:mousemove': this.resize.eventMove,
'frame:mouseup': this.resize.eventStop
});
if (!this.resize.$el) return;
var zoom = (e instanceof jQuery.Event) ? Common.Utils.zoom() : 1;
if (this.resize.type == 'vertical') { if (this.resize.type == 'vertical') {
var prop = 'height'; var prop = 'height';
var value = e.pageY - this.resize.inity; var value = e.pageY*zoom - this.resize.inity;
} else } else
if (this.resize.type == 'horizontal') { if (this.resize.type == 'horizontal') {
prop = 'width'; prop = 'width';
value = e.pageX - this.resize.initx; value = e.pageX*zoom - this.resize.initx;
} }
if (this.resize.fmin && this.resize.fmax) { if (this.resize.fmin && this.resize.fmax) {
@ -331,6 +346,7 @@ define([
this.doLayout(); this.doLayout();
this.trigger('layout:resizedrag', this); this.trigger('layout:resizedrag', this);
} }
Common.NotificationCenter.trigger('layout:resizestop');
}, },
freezePanels: function (value) { freezePanels: function (value) {

View file

@ -147,7 +147,7 @@ define([
}, },
template: _.template([ template: _.template([
'<ul class="dropdown-menu <%= options.cls %>" style="<%= options.style %>" role="menu"></ul>' '<ul class="dropdown-menu <%= options.cls %>" oo_editor_input="true" style="<%= options.style %>" role="menu"></ul>'
].join('')), ].join('')),
initialize : function(options) { initialize : function(options) {
@ -410,6 +410,8 @@ define([
}, },
onBeforeShowMenu: function(e) { onBeforeShowMenu: function(e) {
Common.NotificationCenter.trigger('menu:show');
if (this.mustLayout) { if (this.mustLayout) {
delete this.mustLayout; delete this.mustLayout;
this.doLayout.call(this); this.doLayout.call(this);
@ -439,6 +441,7 @@ define([
onAfterHideMenu: function(e) { onAfterHideMenu: function(e) {
this.trigger('hide:after', this, e); this.trigger('hide:after', this, e);
Common.NotificationCenter.trigger('menu:hide', this);
}, },
onAfterKeydownMenu: function(e) { onAfterKeydownMenu: function(e) {
@ -528,8 +531,8 @@ define([
menuParent = this.menuAlignEl || menuRoot.parent(), menuParent = this.menuAlignEl || menuRoot.parent(),
m = this.menuAlign.match(/^([a-z]+)-([a-z]+)/), m = this.menuAlign.match(/^([a-z]+)-([a-z]+)/),
offset = menuParent.offset(), offset = menuParent.offset(),
docW = Math.min($(document).width(), $('body').width()), docW = Common.Utils.innerWidth(),
docH = $(document).height() - 10, // Yep, it's magic number docH = Common.Utils.innerHeight() - 10, // Yep, it's magic number
menuW = menuRoot.outerWidth(), menuW = menuRoot.outerWidth(),
menuH = menuRoot.outerHeight(), menuH = menuRoot.outerHeight(),
parentW = menuParent.outerWidth(), parentW = menuParent.outerWidth(),

View file

@ -146,7 +146,7 @@ define([
e.preventDefault(); e.preventDefault();
e.stopPropagation(); e.stopPropagation();
var pos = Math.max(0, Math.min(100, (Math.round((e.pageX - me.cmpEl.offset().left - me._dragstart) / me.width * 100)))); var pos = Math.max(0, Math.min(100, (Math.round((e.pageX*Common.Utils.zoom() - me.cmpEl.offset().left - me._dragstart) / me.width * 100))));
me.setThumbPosition(pos); me.setThumbPosition(pos);
me.lastValue = me.value; me.lastValue = me.value;
@ -167,7 +167,7 @@ define([
e.preventDefault(); e.preventDefault();
e.stopPropagation(); e.stopPropagation();
var pos = Math.max(0, Math.min(100, (Math.round((e.pageX - me.cmpEl.offset().left - me._dragstart) / me.width * 100)))); var pos = Math.max(0, Math.min(100, (Math.round((e.pageX*Common.Utils.zoom() - me.cmpEl.offset().left - me._dragstart) / me.width * 100))));
me.setThumbPosition(pos); me.setThumbPosition(pos);
me.lastValue = me.value; me.lastValue = me.value;
@ -179,7 +179,7 @@ define([
var onMouseDown = function (e) { var onMouseDown = function (e) {
if ( me.disabled ) return; if ( me.disabled ) return;
me._dragstart = e.pageX - me.thumb.offset().left - 7; me._dragstart = e.pageX*Common.Utils.zoom() - me.thumb.offset().left - 7;
me.thumb.addClass('active'); me.thumb.addClass('active');
$(document).on('mouseup', onMouseUp); $(document).on('mouseup', onMouseUp);
@ -192,7 +192,7 @@ define([
var onTrackMouseDown = function (e) { var onTrackMouseDown = function (e) {
if ( me.disabled ) return; if ( me.disabled ) return;
var pos = Math.max(0, Math.min(100, (Math.round((e.pageX - me.cmpEl.offset().left) / me.width * 100)))); var pos = Math.max(0, Math.min(100, (Math.round((e.pageX*Common.Utils.zoom() - me.cmpEl.offset().left) / me.width * 100))));
me.setThumbPosition(pos); me.setThumbPosition(pos);
me.lastValue = me.value; me.lastValue = me.value;
@ -342,7 +342,7 @@ define([
lastValue = me.thumbs[index].value, lastValue = me.thumbs[index].value,
minValue = (index-1<0) ? 0 : me.thumbs[index-1].position, minValue = (index-1<0) ? 0 : me.thumbs[index-1].position,
maxValue = (index+1<me.thumbs.length) ? me.thumbs[index+1].position : 100, maxValue = (index+1<me.thumbs.length) ? me.thumbs[index+1].position : 100,
pos = Math.max(minValue, Math.min(maxValue, (Math.round((e.pageX - me.cmpEl.offset().left - me._dragstart) / me.width * 100)))), pos = Math.max(minValue, Math.min(maxValue, (Math.round((e.pageX*Common.Utils.zoom() - me.cmpEl.offset().left - me._dragstart) / me.width * 100)))),
value = pos/me.delta + me.minValue; value = pos/me.delta + me.minValue;
me.setThumbPosition(index, pos); me.setThumbPosition(index, pos);
@ -366,7 +366,7 @@ define([
lastValue = me.thumbs[index].value, lastValue = me.thumbs[index].value,
minValue = (index-1<0) ? 0 : me.thumbs[index-1].position, minValue = (index-1<0) ? 0 : me.thumbs[index-1].position,
maxValue = (index+1<me.thumbs.length) ? me.thumbs[index+1].position : 100, maxValue = (index+1<me.thumbs.length) ? me.thumbs[index+1].position : 100,
pos = Math.max(minValue, Math.min(maxValue, (Math.round((e.pageX - me.cmpEl.offset().left - me._dragstart) / me.width * 100)))), pos = Math.max(minValue, Math.min(maxValue, (Math.round((e.pageX*Common.Utils.zoom() - me.cmpEl.offset().left - me._dragstart) / me.width * 100)))),
value = pos/me.delta + me.minValue; value = pos/me.delta + me.minValue;
me.setThumbPosition(index, pos); me.setThumbPosition(index, pos);
@ -382,7 +382,7 @@ define([
var index = e.data, var index = e.data,
thumb = me.thumbs[index].thumb; thumb = me.thumbs[index].thumb;
me._dragstart = e.pageX - thumb.offset().left - thumb.width()/2; me._dragstart = e.pageX*Common.Utils.zoom() - thumb.offset().left - thumb.width()/2;
me.setActiveThumb(index); me.setActiveThumb(index);
_.each(me.thumbs, function (item, idx) { _.each(me.thumbs, function (item, idx) {
@ -396,7 +396,7 @@ define([
var onTrackMouseDown = function (e) { var onTrackMouseDown = function (e) {
if ( me.disabled ) return; if ( me.disabled ) return;
var pos = Math.max(0, Math.min(100, (Math.round((e.pageX - me.cmpEl.offset().left) / me.width * 100)))), var pos = Math.max(0, Math.min(100, (Math.round((e.pageX*Common.Utils.zoom() - me.cmpEl.offset().left) / me.width * 100)))),
index = findThumb(pos), index = findThumb(pos),
lastValue = me.thumbs[index].value, lastValue = me.thumbs[index].value,
value = pos/me.delta + me.minValue; value = pos/me.delta + me.minValue;

View file

@ -111,7 +111,7 @@ define([
$(document).off('mouseup.switcher', onMouseUp); $(document).off('mouseup.switcher', onMouseUp);
$(document).off('mousemove.switcher', onMouseMove); $(document).off('mousemove.switcher', onMouseMove);
var pos = Math.round((e.pageX - me._dragstart)); var pos = Math.round((e.pageX*Common.Utils.zoom() - me._dragstart));
me.value = (me.value) ? (pos > -me.delta) : (pos > me.delta); me.value = (me.value) ? (pos > -me.delta) : (pos > me.delta);
me.cmpEl.toggleClass('on', me.value); me.cmpEl.toggleClass('on', me.value);
me.thumb.css({left: '', right: ''}); me.thumb.css({left: '', right: ''});
@ -127,7 +127,7 @@ define([
e.preventDefault(); e.preventDefault();
e.stopPropagation(); e.stopPropagation();
var pos = Math.round((e.pageX - me._dragstart)); var pos = Math.round((e.pageX*Common.Utils.zoom() - me._dragstart));
if (me.value) { if (me.value) {
me.thumb.css({right: (pos<1) ? Math.min(me.width-me.thumbWidth - 2, -pos) : 0, left: 'auto'}); me.thumb.css({right: (pos<1) ? Math.min(me.width-me.thumbWidth - 2, -pos) : 0, left: 'auto'});
} else { } else {
@ -138,7 +138,7 @@ define([
var onMouseDown = function (e) { var onMouseDown = function (e) {
if ( me.disabled ) return; if ( me.disabled ) return;
me._dragstart = e.pageX; me._dragstart = e.pageX*Common.Utils.zoom();
me._isMouseMove = false; me._isMouseMove = false;
$(document).on('mouseup.switcher', onMouseUp); $(document).on('mouseup.switcher', onMouseUp);

View file

@ -95,7 +95,7 @@ define([
applyPlacement: function () { applyPlacement: function () {
var showxy = this.target.offset(); var showxy = this.target.offset();
(this.placement == 'top') ? tipEl.css({bottom : $(document).height() - showxy.top + 'px', right: $(document).width() - showxy.left - this.target.width()/2 + 'px'}) (this.placement == 'top') ? tipEl.css({bottom : Common.Utils.innerHeight() - showxy.top + 'px', right: Common.Utils.innerWidth() - showxy.left - this.target.width()/2 + 'px'})
: tipEl.css({top : showxy.top + this.target.height()/2 + 'px', left: showxy.left + this.target.width() + 'px'}); : tipEl.css({top : showxy.top + this.target.height()/2 + 'px', left: showxy.left + this.target.width() + 'px'});
}, },

View file

@ -234,8 +234,8 @@ define([
function dragMove (e) { function dragMove (e) {
if (!_.isUndefined(me.drag)) { if (!_.isUndefined(me.drag)) {
me.drag.moveX = e.clientX; me.drag.moveX = e.clientX*Common.Utils.zoom();
var leftPos = Math.max(e.clientX - me.drag.anchorX - me.tabBarLeft - me.scrollLeft, 0); var leftPos = Math.max(me.drag.moveX - me.drag.anchorX - me.tabBarLeft - me.scrollLeft, 0);
leftPos = Math.min(leftPos, me.tabBarRight - me.tabBarLeft - me.drag.tabWidth - me.scrollLeft); leftPos = Math.min(leftPos, me.tabBarRight - me.tabBarLeft - me.drag.tabWidth - me.scrollLeft);
me.drag.tab.$el.css('left', leftPos + 'px'); me.drag.tab.$el.css('left', leftPos + 'px');
@ -250,16 +250,17 @@ define([
} }
if (!_.isUndefined(bar) && !_.isUndefined(tab) && bar.tabs.length > 1) { if (!_.isUndefined(bar) && !_.isUndefined(tab) && bar.tabs.length > 1) {
var index = bar.tabs.indexOf(tab); var index = bar.tabs.indexOf(tab),
_clientX = e.clientX*Common.Utils.zoom();
me.bar = bar; me.bar = bar;
me.drag = {tab: tab, index: index}; me.drag = {tab: tab, index: index};
this.calculateBounds(); this.calculateBounds();
this.setAbsTabs(); this.setAbsTabs();
me.drag.moveX = e.clientX; me.drag.moveX = _clientX;
me.drag.mouseX = e.clientX; me.drag.mouseX = _clientX;
me.drag.anchorX = e.clientX - this.bounds[index].left; me.drag.anchorX = _clientX - this.bounds[index].left;
me.drag.tabWidth = this.bounds[index].width; me.drag.tabWidth = this.bounds[index].width;
document.addEventListener('dragstart',dragDropText); document.addEventListener('dragstart',dragDropText);

View file

@ -144,8 +144,8 @@ define([
this.cmpEl.on('click', function(event){ this.cmpEl.on('click', function(event){
var pos = { var pos = {
x: event.pageX - me.cmpEl.offset().left, x: event.pageX*Common.Utils.zoom() - me.cmpEl.offset().left,
y: event.pageY - me.cmpEl.offset().top y: event.pageY*Common.Utils.zoom() - me.cmpEl.offset().top
}; };
var ptInPoly = function(npol, xp, yp, x, y) { var ptInPoly = function(npol, xp, yp, x, y) {

View file

@ -47,10 +47,14 @@ define([
], function () { ], function () {
'use strict'; 'use strict';
Common.UI.ThemeColorPalette = Common.UI.BaseView.extend({ Common.UI.ThemeColorPalette = Common.UI.BaseView.extend(_.extend({
options: { options: {
dynamiccolors: 10, dynamiccolors: 10,
standardcolors: 10,
themecolors: 10,
effects: 5,
allowReselect: true, allowReselect: true,
transparent: false,
value: '000000' value: '000000'
}, },
@ -96,12 +100,7 @@ define([
var me = this, var me = this,
el = $(this.el); el = $(this.el);
this.colors = me.options.colors || [ this.colors = me.options.colors || this.generateColorData(me.options.themecolors, me.options.effects, me.options.standardcolors, me.options.transparent);
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2}, {color: '000000', effectId: 3}, {color: 'FFFFFF', effectId: 4}, {color: '000000', effectId: 5},
{color: 'FF0000', effectId: 1}, {color: 'FF6600', effectId: 1}, {color: 'FFFF00', effectId: 2}, {color: 'CCFFCC', effectId: 3}, {color: '008000', effectId: 4},
'-', '--', '-',
'000000', '5301B3', '980ABD', 'B2275F', 'F83D26', 'F86A1D', 'F7AC16', 'F7CA12', 'FAFF44', 'D6EF39'
];
el.addClass('theme-colorpalette'); el.addClass('theme-colorpalette');
this.render(); this.render();
@ -366,13 +365,50 @@ define([
aEffectIdx++; aEffectIdx++;
} }
} }
var selected = $(this.el).find('a.' + this.selectedCls);
if (selected.length && selected.hasClass('palette-color-effect')) {
this.value = selected[0].className.match(this.colorRe)[1].toUpperCase();
}
this.options.updateColorsArr = undefined; this.options.updateColorsArr = undefined;
}, },
clearSelection: function(suppressEvent) { clearSelection: function(suppressEvent) {
$(this.el).find('a.' + this.selectedCls).removeClass(this.selectedCls); $(this.el).find('a.' + this.selectedCls).removeClass(this.selectedCls);
this.value = undefined; this.value = undefined;
} },
}); generateColorData: function(themecolors, effects, standardcolors, transparent) {
var arr = [],
len = (themecolors>0 && effects>0) ? themecolors * effects : 0;
if (themecolors>0) {
arr = [this.textThemeColors, '-'];
for (var i=0; i<themecolors; i++)
arr.push({color: 'FFFFFF', effectId: 1});
if (effects>0) arr.push('-');
for (var i=0; i<len; i++)
arr.push({color: 'FFFFFF', effectId: 1});
if (standardcolors)
arr.push('-', '--', '-');
}
if (standardcolors) {
arr.push(this.textStandartColors, '-');
if (transparent) {
arr.push('transparent');
standardcolors--;
}
for (var i=0; i<standardcolors; i++)
arr.push('FFFFFF');
}
if (this.options.dynamiccolors && (themecolors || standardcolors))
arr.push('-', '--');
return arr;
},
textThemeColors : 'Theme Colors',
textStandartColors : 'Standart Colors'
}, Common.UI.ThemeColorPalette || {}));
}); });

View file

@ -150,7 +150,12 @@ define([
title: 'Title', title: 'Title',
alias: 'Window', alias: 'Window',
cls: '', cls: '',
toolclose: 'close' toolclose: 'close',
maxwidth: undefined,
maxheight: undefined,
minwidth: 0,
minheight: 0,
enableKeyEvents: true
}; };
var template = '<div class="asc-window<%= modal?" modal":"" %><%= cls?" "+cls:"" %>" id="<%= id %>" style="width:<%= width %>px;">' + var template = '<div class="asc-window<%= modal?" modal":"" %><%= cls?" "+cls:"" %>" id="<%= id %>" style="width:<%= width %>px;">' +
@ -178,7 +183,7 @@ define([
} }
function _keydown(event) { function _keydown(event) {
if (!this.isLocked() && this.isVisible()) { if (!this.isLocked() && this.isVisible() && this.initConfig.enableKeyEvents) {
switch (event.keyCode) { switch (event.keyCode) {
case Common.UI.Keys.ESC: case Common.UI.Keys.ESC:
if ( $('.asc-loadmask').length<1 ) { if ( $('.asc-loadmask').length<1 ) {
@ -207,8 +212,8 @@ define([
var main_width = document.documentElement.offsetWidth; var main_width = document.documentElement.offsetWidth;
var main_height = document.documentElement.offsetHeight; var main_height = document.documentElement.offsetHeight;
} else { } else {
main_width = window.innerWidth; main_width = Common.Utils.innerWidth();
main_height = window.innerHeight; main_height = Common.Utils.innerHeight();
} }
if (this.initConfig.height == 'auto') { if (this.initConfig.height == 'auto') {
@ -240,16 +245,17 @@ define([
function _dragstart(event) { function _dragstart(event) {
if ( $(event.target).hasClass('close') ) return; if ( $(event.target).hasClass('close') ) return;
Common.UI.Menu.Manager.hideAll(); Common.UI.Menu.Manager.hideAll();
var zoom = (event instanceof jQuery.Event) ? Common.Utils.zoom() : 1;
this.dragging.enabled = true; this.dragging.enabled = true;
this.dragging.initx = event.pageX - parseInt(this.$window.css('left')); this.dragging.initx = event.pageX*zoom - parseInt(this.$window.css('left'));
this.dragging.inity = event.pageY - parseInt(this.$window.css('top')); this.dragging.inity = event.pageY*zoom - parseInt(this.$window.css('top'));
if (window.innerHeight == undefined) { if (window.innerHeight == undefined) {
var main_width = document.documentElement.offsetWidth; var main_width = document.documentElement.offsetWidth;
var main_height = document.documentElement.offsetHeight; var main_height = document.documentElement.offsetHeight;
} else { } else {
main_width = window.innerWidth; main_width = Common.Utils.innerWidth();
main_height = window.innerHeight; main_height = Common.Utils.innerHeight();
} }
this.dragging.maxx = main_width - parseInt(this.$window.css("width")); this.dragging.maxx = main_width - parseInt(this.$window.css("width"));
@ -276,8 +282,9 @@ define([
function _mousemove(event) { function _mousemove(event) {
if (this.dragging.enabled) { if (this.dragging.enabled) {
var left = event.pageX - this.dragging.initx, var zoom = (event instanceof jQuery.Event) ? Common.Utils.zoom() : 1,
top = event.pageY - this.dragging.inity; left = event.pageX*zoom - this.dragging.initx,
top = event.pageY*zoom - this.dragging.inity;
left < 0 ? (left = 0) : left > this.dragging.maxx && (left = this.dragging.maxx); left < 0 ? (left = 0) : left > this.dragging.maxx && (left = this.dragging.maxx);
top < 0 ? (top = 0) : top > this.dragging.maxy && (top = this.dragging.maxy); top < 0 ? (top = 0) : top > this.dragging.maxy && (top = this.dragging.maxy);
@ -286,6 +293,84 @@ define([
} }
} }
/* window resize functions */
function _resizestart(event) {
Common.UI.Menu.Manager.hideAll();
var el = $(event.target),
left = parseInt(this.$window.css('left')),
top = parseInt(this.$window.css('top'));
this.resizing.enabled = true;
this.resizing.initpage_x = event.pageX*Common.Utils.zoom();
this.resizing.initpage_y = event.pageY*Common.Utils.zoom();
this.resizing.initx = this.resizing.initpage_x - left;
this.resizing.inity = this.resizing.initpage_y - top;
this.resizing.initw = parseInt(this.$window.css("width"));
this.resizing.inith = parseInt(this.$window.css("height"));
this.resizing.type = [el.hasClass('left') ? -1 : (el.hasClass('right') ? 1 : 0), el.hasClass('top') ? -1 : (el.hasClass('bottom') ? 1 : 0)];
var main_width = (window.innerHeight == undefined) ? document.documentElement.offsetWidth : Common.Utils.innerWidth(),
main_height = (window.innerHeight == undefined) ? document.documentElement.offsetHeight : Common.Utils.innerHeight(),
maxwidth = (this.initConfig.maxwidth) ? this.initConfig.maxwidth : main_width,
maxheight = (this.initConfig.maxheight) ? this.initConfig.maxheight : main_height;
if (this.resizing.type[0]>0) {
this.resizing.maxx = Math.min(main_width, left+maxwidth);
this.resizing.minx = left+this.initConfig.minwidth;
} else if (this.resizing.type[0]<0) {
this.resizing.maxx = left+this.resizing.initw-this.initConfig.minwidth;
this.resizing.minx = Math.max(0, left+this.resizing.initw-maxwidth);
}
if (this.resizing.type[1]>0) {
this.resizing.maxy = Math.min(main_height, top+maxheight);
this.resizing.miny = top+this.initConfig.minheight;
} else if (this.resizing.type[1]<0) {
this.resizing.maxy = top+this.resizing.inith-this.initConfig.minheight;
this.resizing.miny = Math.max(0, top+this.resizing.inith-maxheight);
}
$(document.body).css('cursor', el.css('cursor'));
this.$window.find('.resize-border').addClass('resizing');
this.$window.find('.header').addClass('resizing');
$(document).on('mousemove', this.binding.resize);
$(document).on('mouseup', this.binding.resizeStop);
this.fireEvent('resize', [this, 'start']);
}
function _resize(event) {
if (this.resizing.enabled) {
var resized = false,
zoom = (event instanceof jQuery.Event) ? Common.Utils.zoom() : 1,
pageX = event.pageX*zoom,
pageY = event.pageY*zoom;
if (this.resizing.type[0] && pageX<this.resizing.maxx && pageX>this.resizing.minx) {
if (this.resizing.type[0]<0)
this.$window.css({left: pageX - this.resizing.initx});
this.setWidth(this.resizing.initw + (pageX - this.resizing.initpage_x) * this.resizing.type[0]);
resized = true;
}
if (this.resizing.type[1] && pageY<this.resizing.maxy && pageY>this.resizing.miny) {
if (this.resizing.type[1]<0)
this.$window.css({top: pageY - this.resizing.inity});
this.setHeight(this.resizing.inith + (pageY - this.resizing.initpage_y) * this.resizing.type[1]);
resized = true;
}
if (resized) this.fireEvent('resizing');
}
}
function _resizestop() {
$(document).off('mousemove', this.binding.resize);
$(document).off('mouseup', this.binding.resizeStop);
$(document.body).css('cursor', 'auto');
this.$window.find('.resize-border').removeClass('resizing');
this.$window.find('.header').removeClass('resizing');
this.resizing.enabled = false;
this.fireEvent('resize', [this, 'end']);
}
Common.UI.alert = function(options) { Common.UI.alert = function(options) {
var me = this.Window.prototype; var me = this.Window.prototype;
var arrBtns = {ok: me.okButtonText, cancel: me.cancelButtonText, var arrBtns = {ok: me.okButtonText, cancel: me.cancelButtonText,
@ -325,23 +410,21 @@ define([
'</div>' + '</div>' +
'</div>' + '</div>' +
'<% if (dontshow) { %><div class="separator horizontal" style="width: 100%;"/><% } %>' + '<% if (dontshow) { %><div class="separator horizontal" style="width: 100%;"/><% } %>' +
'<div class="footer <% if (dontshow) { %> dontshow <% } %>">' +
'<% if (_.size(buttons) > 0) { %>' + '<% if (_.size(buttons) > 0) { %>' +
'<div class="footer <% if (dontshow) { %> dontshow <% } %>">' +
'<% for(var bt in buttons) { %>' + '<% for(var bt in buttons) { %>' +
'<button class="btn normal dlg-btn <%= buttons[bt].cls %>" result="<%= bt %>"><%= buttons[bt].text %></button>'+ '<button class="btn normal dlg-btn <%= buttons[bt].cls %>" result="<%= bt %>"><%= buttons[bt].text %></button>'+
'<% } %>' + '<% } %>' +
'<% } else { %>' + '</div>' +
'<button class="btn normal dlg-btn primary" result="ok">OK</button>'+ '<% } %>';
'<% } %>' +
'</div>';
var win = new Common.UI.Window({ _.extend(options, {
cls: 'alert', cls: 'alert',
title: options.title,
width: options.width,
onprimary: onKeyDown, onprimary: onKeyDown,
tpl: _.template(template, options) tpl: _.template(template, options)
}), });
var win = new Common.UI.Window(options),
chDontShow = null; chDontShow = null;
function autoSize(window) { function autoSize(window) {
@ -355,6 +438,10 @@ define([
if (!options.dontshow) body.css('padding-bottom', '10px'); if (!options.dontshow) body.css('padding-bottom', '10px');
if (options.maxwidth && options.width=='auto') {
if ((text.position().left + text.width() + parseInt(text_cnt.css('padding-right'))) > options.maxwidth)
options.width = options.maxwidth;
}
if (options.width=='auto') { if (options.width=='auto') {
text_cnt.height(Math.max(text.height() + ((check.length>0) ? (check.height() + parseInt(check.css('margin-top'))) : 0), icon.height())); text_cnt.height(Math.max(text.height() + ((check.length>0) ? (check.height() + parseInt(check.css('margin-top'))) : 0), icon.height()));
body.height(parseInt(text_cnt.css('height')) + parseInt(footer.css('height'))); body.height(parseInt(text_cnt.css('height')) + parseInt(footer.css('height')));
@ -450,6 +537,7 @@ define([
$window : undefined, $window : undefined,
$lastmodal : undefined, $lastmodal : undefined,
dragging : {enabled: false}, dragging : {enabled: false},
resizing : {enabled: false},
initialize : function(options) { initialize : function(options) {
this.initConfig = {}; this.initConfig = {};
@ -503,6 +591,9 @@ define([
this.$window.css('height',this.initConfig.height); this.$window.css('height',this.initConfig.height);
} }
if (this.initConfig.resizable)
this.setResizable(this.initConfig.resizable);
var me = this; var me = this;
Common.NotificationCenter.on('window:close', function() { Common.NotificationCenter.on('window:close', function() {
if (me.$window && me.isVisible()) me.close(); if (me.$window && me.isVisible()) me.close();
@ -683,6 +774,7 @@ define([
if (width >= 0) { if (width >= 0) {
var min = parseInt(this.$window.css('min-width')); var min = parseInt(this.$window.css('min-width'));
width < min && (width = min); width < min && (width = min);
width -= (parseInt(this.$window.css('border-left-width')) + parseInt(this.$window.css('border-right-width')));
this.$window.width(width); this.$window.width(width);
} }
}, },
@ -695,6 +787,7 @@ define([
if (height >= 0) { if (height >= 0) {
var min = parseInt(this.$window.css('min-height')); var min = parseInt(this.$window.css('min-height'));
height < min && (height = min); height < min && (height = min);
height -= (parseInt(this.$window.css('border-bottom-width')) + parseInt(this.$window.css('border-top-width')));
this.$window.height(height); this.$window.height(height);
if (this.initConfig.header) if (this.initConfig.header)
@ -729,6 +822,40 @@ define([
return this.$window && this.$window.is(':visible'); return this.$window && this.$window.is(':visible');
}, },
setResizable: function(resizable, minSize, maxSize) {
if (resizable !== this.resizable) {
if (resizable) {
var bordersTemplate = '<div class="resize-border left" style="top:' + ((this.initConfig.header) ? '33' : '5') + 'px; bottom: 5px; height: auto; border-right-style: solid; cursor: e-resize;"></div>' +
'<div class="resize-border left bottom" style="border-bottom-left-radius: 5px; cursor: sw-resize;"></div>' +
'<div class="resize-border bottom" style="left: 4px; right: 4px; width: auto; z-index: 2; border-top-style: solid; cursor: s-resize;"></div>' +
'<div class="resize-border right bottom" style="border-bottom-right-radius: 5px; cursor: se-resize;"></div>' +
'<div class="resize-border right" style="top:' + ((this.initConfig.header) ? '33' : '5') + 'px; bottom: 5px; height: auto; border-left-style: solid; cursor: w-resize;"></div>' +
'<div class="resize-border left top" style="border-top-left-radius: 5px; cursor: se-resize;"></div>' +
'<div class="resize-border top" style="left: 4px; right: 4px; width: auto; z-index: 2; border-bottom-style:' + ((this.initConfig.header) ? "none" : "solid") + '; cursor: s-resize;"></div>' +
'<div class="resize-border right top" style="border-top-right-radius: 5px; cursor: sw-resize;"></div>';
if (this.initConfig.header)
bordersTemplate += '<div class="resize-border left" style="top: 5px; height: 28px; cursor: e-resize;"></div>' +
'<div class="resize-border right" style="top: 5px; height: 28px; cursor: w-resize;"></div>';
this.$window.append(_.template(bordersTemplate));
this.binding.resize = _.bind(_resize, this);
this.binding.resizeStop = _.bind(_resizestop, this);
this.binding.resizeStart = _.bind(_resizestart, this);
(minSize && minSize.length>1) && (this.initConfig.minwidth = minSize[0]);
(minSize && minSize.length>1) && (this.initConfig.minheight = minSize[1]);
(maxSize && maxSize.length>1) && (this.initConfig.maxwidth = maxSize[0]);
(maxSize && maxSize.length>1) && (this.initConfig.maxheight = maxSize[1]);
this.$window.find('.resize-border').on('mousedown', this.binding.resizeStart);
} else {
this.$window.find('.resize-border').remove();
}
this.resizable = resizable;
}
},
onPrimary: function() {}, onPrimary: function() {},
cancelButtonText: 'Cancel', cancelButtonText: 'Cancel',

View file

@ -919,6 +919,19 @@ define([
// internal // internal
updateComments: function (needRender, disableSort) { updateComments: function (needRender, disableSort) {
var me = this;
me.updateCommentsTime = new Date();
if (me.timerUpdateComments===undefined)
me.timerUpdateComments = setInterval(function(){
if ((new Date()) - me.updateCommentsTime>100) {
clearInterval(me.timerUpdateComments);
me.timerUpdateComments = undefined;
me.updateCommentsView(needRender, disableSort);
}
}, 25);
},
updateCommentsView: function (needRender, disableSort) {
var i, end = true; var i, end = true;
if (_.isUndefined(disableSort)) { if (_.isUndefined(disableSort)) {
@ -1079,7 +1092,6 @@ define([
if (dialog) { if (dialog) {
if (this.popoverComments.length) { if (this.popoverComments.length) {
_.delay(function() { _.delay(function() {
me.api.asc_enableKeyEvents(false);
dialog.commentsView.setFocusToTextBox(); dialog.commentsView.setFocusToTextBox();
}, 200); }, 200);
return; return;
@ -1234,7 +1246,6 @@ define([
var panel = $('.new-comment-ct', this.view.el); var panel = $('.new-comment-ct', this.view.el);
if (panel && panel.length) { if (panel && panel.length) {
if ('none' !== panel.css('display')) { if ('none' !== panel.css('display')) {
this.api.asc_enableKeyEvents(false);
this.view.txtComment.focus(); this.view.txtComment.focus();
} }

View file

@ -97,9 +97,10 @@ define([
externalEditor.serviceCommand('window:drag', state == 'start'); externalEditor.serviceCommand('window:drag', state == 'start');
},this), },this),
'show': _.bind(function(cmp){ 'show': _.bind(function(cmp){
var h = this.diagramEditorView.getHeight(); var h = this.diagramEditorView.getHeight(),
if (window.innerHeight>h && h<700 || window.innerHeight<h) { innerHeight = Common.Utils.innerHeight();
h = Math.min(window.innerHeight, 700); if (innerHeight>h && h<700 || innerHeight<h) {
h = Math.min(innerHeight, 700);
this.diagramEditorView.setHeight(h); this.diagramEditorView.setHeight(h);
} }
@ -182,7 +183,6 @@ define([
if (this.diagramEditorView) { if (this.diagramEditorView) {
if (eventData.type == 'documentReady') { if (eventData.type == 'documentReady') {
this.diagramEditorView._isExternalDocReady = true; this.diagramEditorView._isExternalDocReady = true;
this.diagramEditorView.setControlsDisabled(false);
if (this.diagramEditorView._chartData) { if (this.diagramEditorView._chartData) {
externalEditor && externalEditor.serviceCommand('setChartData', this.diagramEditorView._chartData); externalEditor && externalEditor.serviceCommand('setChartData', this.diagramEditorView._chartData);
this.diagramEditorView._chartData = null; this.diagramEditorView._chartData = null;
@ -191,6 +191,10 @@ define([
this.onDiagrammEditingDisabled(); this.onDiagrammEditingDisabled();
} }
} else } else
if (eventData.type == 'chartDataReady') {
if (this.needDisableEditing===undefined)
this.diagramEditorView.setControlsDisabled(false);
} else
if (eventData.type == "shortcut") { if (eventData.type == "shortcut") {
if (eventData.data.key == 'escape') if (eventData.data.key == 'escape')
this.diagramEditorView.hide(); this.diagramEditorView.hide();

View file

@ -97,9 +97,10 @@ define([
externalEditor.serviceCommand('window:drag', state == 'start'); externalEditor.serviceCommand('window:drag', state == 'start');
},this), },this),
'show': _.bind(function(cmp){ 'show': _.bind(function(cmp){
var h = this.mergeEditorView.getHeight(); var h = this.mergeEditorView.getHeight(),
if (window.innerHeight>h && h<700 || window.innerHeight<h) { innerHeight = Common.Utils.innerHeight();
h = Math.min(window.innerHeight, 700); if (innerHeight>h && h<700 || innerHeight<h) {
h = Math.min(innerHeight, 700);
this.mergeEditorView.setHeight(h); this.mergeEditorView.setHeight(h);
} }

View file

@ -66,6 +66,8 @@ define([
storePlugins: this.getApplication().getCollection('Common.Collections.Plugins') storePlugins: this.getApplication().getCollection('Common.Collections.Plugins')
}); });
this.panelPlugins.on('render:after', _.bind(this.onAfterRender, this)); this.panelPlugins.on('render:after', _.bind(this.onAfterRender, this));
this._moveOffset = {x:0, y:0};
}, },
setApi: function(api) { setApi: function(api) {
@ -73,6 +75,9 @@ define([
this.api.asc_registerCallback("asc_onPluginShow", _.bind(this.onPluginShow, this)); this.api.asc_registerCallback("asc_onPluginShow", _.bind(this.onPluginShow, this));
this.api.asc_registerCallback("asc_onPluginClose", _.bind(this.onPluginClose, this)); this.api.asc_registerCallback("asc_onPluginClose", _.bind(this.onPluginClose, this));
this.api.asc_registerCallback("asc_onPluginResize", _.bind(this.onPluginResize, this));
this.api.asc_registerCallback("asc_onPluginMouseUp", _.bind(this.onPluginMouseUp, this));
this.api.asc_registerCallback("asc_onPluginMouseMove", _.bind(this.onPluginMouseMove, this));
return this; return this;
}, },
@ -87,6 +92,22 @@ define([
onAfterRender: function(panelPlugins) { onAfterRender: function(panelPlugins) {
panelPlugins.viewPluginsList.on('item:click', _.bind(this.onSelectPlugin, this)); panelPlugins.viewPluginsList.on('item:click', _.bind(this.onSelectPlugin, this));
this.bindViewEvents(this.panelPlugins, this.events); this.bindViewEvents(this.panelPlugins, this.events);
var me = this;
Common.NotificationCenter.on({
'layout:resizestart': function(e){
if (me.panelPlugins.isVisible()) {
var offset = me.panelPlugins.currentPluginFrame.offset();
me._moveOffset = {x: offset.left + parseInt(me.panelPlugins.currentPluginFrame.css('padding-left')),
y: offset.top + parseInt(me.panelPlugins.currentPluginFrame.css('padding-top'))};
me.api.asc_pluginEnableMouseEvents(true);
}
},
'layout:resizestop': function(e){
if (me.panelPlugins.isVisible()) {
me.api.asc_pluginEnableMouseEvents(false);
}
}
});
}, },
updatePluginsList: function() { updatePluginsList: function() {
@ -114,6 +135,8 @@ define([
variation.set_InitData(itemVar.get('initData')); variation.set_InitData(itemVar.get('initData'));
variation.set_UpdateOleOnResize(itemVar.get('isUpdateOleOnResize')); variation.set_UpdateOleOnResize(itemVar.get('isUpdateOleOnResize'));
variation.set_Buttons(itemVar.get('buttons')); variation.set_Buttons(itemVar.get('buttons'));
variation.set_Size(itemVar.get('size'));
variation.set_InitOnSelectionChanged(itemVar.get('initOnSelectionChanged'));
variationsArr.push(variation); variationsArr.push(variation);
}); });
plugin.set_Variations(variationsArr); plugin.set_Variations(variationsArr);
@ -195,14 +218,15 @@ define([
onPluginShow: function(plugin, variationIndex) { onPluginShow: function(plugin, variationIndex) {
var variation = plugin.get_Variations()[variationIndex]; var variation = plugin.get_Variations()[variationIndex];
if (!variation.get_Visual()) return; if (variation.get_Visual()) {
if (variation.get_InsideMode()) { if (variation.get_InsideMode()) {
this.panelPlugins.openInsideMode(plugin.get_Name(), ((plugin.get_BaseUrl().length == 0) ? this.panelPlugins.pluginsPath : plugin.get_BaseUrl()) + variation.get_Url()); this.panelPlugins.openInsideMode(plugin.get_Name(), ((plugin.get_BaseUrl().length == 0) ? this.panelPlugins.pluginsPath : plugin.get_BaseUrl()) + variation.get_Url());
} else { } else {
var me = this, var me = this,
arrBtns = variation.get_Buttons(), arrBtns = variation.get_Buttons(),
newBtns = {}; newBtns = {},
size = variation.get_Size();
if (!size || size.length<2) size = [800, 600];
if (_.isArray(arrBtns)) { if (_.isArray(arrBtns)) {
_.each(arrBtns, function(b, index){ _.each(arrBtns, function(b, index){
@ -213,24 +237,45 @@ define([
var _baseUrl = (plugin.get_BaseUrl().length == 0) ? me.panelPlugins.pluginsPath : plugin.get_BaseUrl(); var _baseUrl = (plugin.get_BaseUrl().length == 0) ? me.panelPlugins.pluginsPath : plugin.get_BaseUrl();
me.pluginDlg = new Common.Views.PluginDlg({ me.pluginDlg = new Common.Views.PluginDlg({
title: plugin.get_Name(), title: plugin.get_Name(),
width: size[0], // inner width
height: size[1], // inner height
url: _baseUrl + variation.get_Url(), url: _baseUrl + variation.get_Url(),
buttons: newBtns, buttons: newBtns,
toolcallback: _.bind(this.onToolClose, this) toolcallback: _.bind(this.onToolClose, this)
}); });
me.pluginDlg.on('render:after', function(obj){ me.pluginDlg.on('render:after', function(obj){
obj.getChild('.footer .dlg-btn').on('click', _.bind(me.onDlgBtnClick, me)); obj.getChild('.footer .dlg-btn').on('click', _.bind(me.onDlgBtnClick, me));
me.pluginContainer = me.pluginDlg.$window.find('#id-plugin-container');
}).on('close', function(obj){ }).on('close', function(obj){
me.pluginDlg = undefined; me.pluginDlg = undefined;
}).on('drag', function(args){
me.api.asc_pluginEnableMouseEvents(args[1]=='start');
}).on('resize', function(args){
me.api.asc_pluginEnableMouseEvents(args[1]=='start');
}); });
me.pluginDlg.show(); me.pluginDlg.show();
} }
} else
this.panelPlugins.openNotVisualMode(plugin.get_Guid());
}, },
onPluginClose: function() { onPluginClose: function() {
if (this.pluginDlg) if (this.pluginDlg)
this.pluginDlg.close(); this.pluginDlg.close();
else else if (this.panelPlugins.iframePlugin)
this.panelPlugins.closeInsideMode(); this.panelPlugins.closeInsideMode();
else
this.panelPlugins.closeNotVisualMode();
},
onPluginResize: function(size, minSize, maxSize, callback ) {
if (this.pluginDlg) {
var resizable = (minSize && minSize.length>1 && maxSize && maxSize.length>1 && (maxSize[0] > minSize[0] || maxSize[1] > minSize[1] || maxSize[0]==0 || maxSize[1] == 0));
this.pluginDlg.setResizable(resizable, minSize, maxSize);
this.pluginDlg.setInnerSize(size[0], size[1]);
if (callback)
callback.call();
}
}, },
onDlgBtnClick: function(event) { onDlgBtnClick: function(event) {
@ -240,6 +285,23 @@ define([
onToolClose: function() { onToolClose: function() {
this.api.asc_pluginButtonClick(-1); this.api.asc_pluginButtonClick(-1);
},
onPluginMouseUp: function(x, y) {
if (this.pluginDlg) {
if (this.pluginDlg.binding.dragStop) this.pluginDlg.binding.dragStop();
if (this.pluginDlg.binding.resizeStop) this.pluginDlg.binding.resizeStop();
} else
Common.NotificationCenter.trigger('frame:mouseup', { pageX: x*Common.Utils.zoom()+this._moveOffset.x, pageY: y*Common.Utils.zoom()+this._moveOffset.y });
},
onPluginMouseMove: function(x, y) {
if (this.pluginDlg) {
var offset = this.pluginContainer.offset();
if (this.pluginDlg.binding.drag) this.pluginDlg.binding.drag({ pageX: x*Common.Utils.zoom()+offset.left, pageY: y*Common.Utils.zoom()+offset.top });
if (this.pluginDlg.binding.resize) this.pluginDlg.binding.resize({ pageX: x*Common.Utils.zoom()+offset.left, pageY: y*Common.Utils.zoom()+offset.top });
} else
Common.NotificationCenter.trigger('frame:mousemove', { pageX: x*Common.Utils.zoom()+this._moveOffset.x, pageY: y*Common.Utils.zoom()+this._moveOffset.y });
} }
}, Common.Controllers.Plugins || {})); }, Common.Controllers.Plugins || {}));

View file

@ -46,14 +46,17 @@ function onDropDownKeyDown(e) {
$parent.trigger(beforeEvent); $parent.trigger(beforeEvent);
if ($parent.hasClass('no-stop-propagate') && arguments.length>1 && arguments[1] instanceof jQuery.Event) { if ($parent.hasClass('no-stop-propagate')) {
if (arguments.length>1 && arguments[1] instanceof KeyboardEvent)
e = arguments[1]; e = arguments[1];
if ( /^(38|40|27|13|9)$/.test(e.keyCode) && !e.ctrlKey && !e.altKey) { if ( /^(38|40|27|13|9|37|39)$/.test(e.keyCode) && !e.ctrlKey && !e.altKey) {
patchDropDownKeyDownAdditional.call(this, e); patchDropDownKeyDownAdditional.call(this, e);
if (!/(37|39)/.test(e.keyCode)) {
e.preventDefault(); e.preventDefault();
e.stopPropagation(); e.stopPropagation();
} }
} else if ( !$parent.hasClass('no-stop-propagate') || /^(38|40|27|13|9)$/.test(e.keyCode) && !e.ctrlKey && !e.altKey) { }
} else {
patchDropDownKeyDown.call(this, e); patchDropDownKeyDown.call(this, e);
e.preventDefault(); e.preventDefault();
e.stopPropagation(); e.stopPropagation();
@ -141,17 +144,19 @@ function patchDropDownKeyDownAdditional(e) { // only for formula menu when typin
var $this = $(this); var $this = $(this);
if (!/(37|39)/.test(e.keyCode)) {
e.preventDefault(); e.preventDefault();
e.stopPropagation(); e.stopPropagation();
}
if ($this.is('.disabled, :disabled')) return; if ($this.is('.disabled, :disabled')) return;
var $parent = getParent($this); var $parent = getParent($this);
var isActive = $parent.hasClass('open') || $parent.hasClass('over'); var isActive = $parent.hasClass('open') || $parent.hasClass('over');
if (!isActive || (isActive && e.keyCode == 27)) { if (!isActive || (isActive && (e.keyCode == 27 || e.keyCode == 37 || e.keyCode == 39))) {
if (e.which == 27) // if (e.which == 27)
$parent.find('[data-toggle=dropdown]').focus(); // $parent.find('[data-toggle=dropdown]').focus();
return (isActive) ? $this.click() : undefined; return (isActive) ? $this.click() : undefined;
} }

View file

@ -63,7 +63,9 @@ define([
initDataType: 0, initDataType: 0,
initData: "", initData: "",
isUpdateOleOnResize: false, isUpdateOleOnResize: false,
buttons: [] buttons: [],
size: [800, 600],
initOnSelectionChanged: false
} }
} }
}); });

View file

@ -115,7 +115,7 @@
}, },
mousemove: function (e) { mousemove: function (e) {
this.targetXY = [e.clientX, e.clientY]; this.targetXY = [e.clientX*Common.Utils.zoom(), e.clientY*Common.Utils.zoom()];
}, },
leave: function(obj) { leave: function(obj) {
@ -153,10 +153,11 @@
$tip.appendTo(this.options.container) : $tip.insertAfter(this.$element); $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element);
if (typeof at == 'object') { if (typeof at == 'object') {
var tp = {top: at[1] + 15, left: at[0] + 18}; var tp = {top: at[1] + 15, left: at[0] + 18},
innerWidth = Common.Utils.innerWidth();
if (tp.left + $tip.width() > window.innerWidth) { if (tp.left + $tip.width() > innerWidth) {
tp.left = window.innerWidth - $tip.width() - 30; tp.left = innerWidth - $tip.width() - 30;
} }
$tip.offset(tp).addClass('in'); $tip.offset(tp).addClass('in');

View file

@ -88,7 +88,7 @@ Common.Utils = _.extend(new(function() {
ipRe = /^(((https?)|(ftps?)):\/\/)?([\-\wа-яё]*:?[\-\wа-яё]*@)?(((1[0-9]{2}|2[0-4][0-9]|25[0-5]|[1-9][0-9]|[0-9])\.){3}(1[0-9]{2}|2[0-4][0-9]|25[0-5]|[1-9][0-9]|[0-9]))(:\d+)?(\/[%\-\wа-яё]*(\.[\wа-яё]{2,})?(([\wа-яё\-\.\?\\\/+@&#;:`~=%!,\(\)]*)(\.[\wа-яё]{2,})?)*)*\/?/i, ipRe = /^(((https?)|(ftps?)):\/\/)?([\-\wа-яё]*:?[\-\wа-яё]*@)?(((1[0-9]{2}|2[0-4][0-9]|25[0-5]|[1-9][0-9]|[0-9])\.){3}(1[0-9]{2}|2[0-4][0-9]|25[0-5]|[1-9][0-9]|[0-9]))(:\d+)?(\/[%\-\wа-яё]*(\.[\wа-яё]{2,})?(([\wа-яё\-\.\?\\\/+@&#;:`~=%!,\(\)]*)(\.[\wа-яё]{2,})?)*)*\/?/i,
hostnameRe = /^(((https?)|(ftps?)):\/\/)?([\-\wа-яё]*:?[\-\wа-яё]*@)?(([\-\wа-яё]+\.)+[\wа-яё\-]{2,}(:\d+)?(\/[%\-\wа-яё]*(\.[\wа-яё]{2,})?(([\wа-яё\-\.\?\\\/+@&#;:`~=%!,\(\)]*)(\.[\wа-яё]{2,})?)*)*\/?)/i, hostnameRe = /^(((https?)|(ftps?)):\/\/)?([\-\wа-яё]*:?[\-\wа-яё]*@)?(([\-\wа-яё]+\.)+[\wа-яё\-]{2,}(:\d+)?(\/[%\-\wа-яё]*(\.[\wа-яё]{2,})?(([\wа-яё\-\.\?\\\/+@&#;:`~=%!,\(\)]*)(\.[\wа-яё]{2,})?)*)*\/?)/i,
localRe = /^(((https?)|(ftps?)):\/\/)([\-\wа-яё]*:?[\-\wа-яё]*@)?(([\-\wа-яё]+)(:\d+)?(\/[%\-\wа-яё]*(\.[\wа-яё]{2,})?(([\wа-яё\-\.\?\\\/+@&#;:`~=%!,\(\)]*)(\.[\wа-яё]{2,})?)*)*\/?)/i, localRe = /^(((https?)|(ftps?)):\/\/)([\-\wа-яё]*:?[\-\wа-яё]*@)?(([\-\wа-яё]+)(:\d+)?(\/[%\-\wа-яё]*(\.[\wа-яё]{2,})?(([\wа-яё\-\.\?\\\/+@&#;:`~=%!,\(\)]*)(\.[\wа-яё]{2,})?)*)*\/?)/i,
emailStrongRe = /(mailto:)([a-z0-9'\._-]+@[a-z0-9\.-]+\.[a-z0-9]{2,4})([a-яё0-9\._%+-=\? :&]*)/ig, emailStrongRe = /(mailto:)?([a-z0-9'\._-]+@[a-z0-9\.-]+\.[a-z0-9]{2,4})([a-яё0-9\._%+-=\?:&]*)/ig,
ipStrongRe = /(((https?)|(ftps?)):\/\/([\-\wа-яё]*:?[\-\wа-яё]*@)?)(((1[0-9]{2}|2[0-4][0-9]|25[0-5]|[1-9][0-9]|[0-9])\.){3}(1[0-9]{2}|2[0-4][0-9]|25[0-5]|[1-9][0-9]|[0-9]))(:\d+)?(\/[%\-\wа-яё]*(\.[\wа-яё]{2,})?(([\wа-яё\-\.\?\\\/+@&#;:`~=%!,\(\)]*)(\.[\wа-яё]{2,})?)*)*\/?/ig, ipStrongRe = /(((https?)|(ftps?)):\/\/([\-\wа-яё]*:?[\-\wа-яё]*@)?)(((1[0-9]{2}|2[0-4][0-9]|25[0-5]|[1-9][0-9]|[0-9])\.){3}(1[0-9]{2}|2[0-4][0-9]|25[0-5]|[1-9][0-9]|[0-9]))(:\d+)?(\/[%\-\wа-яё]*(\.[\wа-яё]{2,})?(([\wа-яё\-\.\?\\\/+@&#;:`~=%!,\(\)]*)(\.[\wа-яё]{2,})?)*)*\/?/ig,
hostnameStrongRe = /((((https?)|(ftps?)):\/\/([\-\wа-яё]*:?[\-\wа-яё]*@)?)|(([\-\wа-яё]*:?[\-\wа-яё]*@)?www\.))((([\-\wа-яё]+\.)+[\wа-яё\-]{2,}|([\-\wа-яё]+))(:\d+)?(\/[%\-\wа-яё]*(\.[\wа-яё]{2,})?(([\wа-яё\-\.\?\\\/+@&#;:`~=%!,\(\)]*)(\.[\wа-яё]{2,})?)*)*\/?)/ig, hostnameStrongRe = /((((https?)|(ftps?)):\/\/([\-\wа-яё]*:?[\-\wа-яё]*@)?)|(([\-\wа-яё]*:?[\-\wа-яё]*@)?www\.))((([\-\wа-яё]+\.)+[\wа-яё\-]{2,}|([\-\wа-яё]+))(:\d+)?(\/[%\-\wа-яё]*(\.[\wа-яё]{2,})?(([\wа-яё\-\.\?\\\/+@&#;:`~=%!,\(\)]*)(\.[\wа-яё]{2,})?)*)*\/?)/ig,
documentSettingsType = { documentSettingsType = {
@ -101,7 +101,21 @@ Common.Utils = _.extend(new(function() {
Chart : 6, Chart : 6,
MailMerge : 7, MailMerge : 7,
TextArt : 8 TextArt : 8
},
me = this,
checkSize = function() {
if (isChrome && !isOpera && document && document.firstElementChild && document.body) {
document.firstElementChild.style.zoom = "reset";
me.zoom = document.body.clientWidth / window.innerWidth;
}
me.innerWidth = window.innerWidth * me.zoom;
me.innerHeight = window.innerHeight * me.zoom;
}; };
me.zoom = 1;
me.innerWidth = window.innerWidth;
me.innerHeight = window.innerHeight;
checkSize();
$(window).on('resize', checkSize);
return { return {
userAgent: userAgent, userAgent: userAgent,
@ -162,7 +176,10 @@ Common.Utils = _.extend(new(function() {
emailStrongRe: emailStrongRe, emailStrongRe: emailStrongRe,
ipStrongRe: ipStrongRe, ipStrongRe: ipStrongRe,
hostnameStrongRe: hostnameStrongRe, hostnameStrongRe: hostnameStrongRe,
documentSettingsType: documentSettingsType documentSettingsType: documentSettingsType,
zoom: function() {return me.zoom;},
innerWidth: function() {return me.innerWidth;},
innerHeight: function() {return me.innerHeight;}
} }
})(), Common.Utils || {}); })(), Common.Utils || {});

View file

@ -52,7 +52,7 @@ define([
initialize: function(options) { initialize: function(options) {
Common.UI.BaseView.prototype.initialize.call(this,arguments); Common.UI.BaseView.prototype.initialize.call(this,arguments);
this.txtVersionNum = '4.0'; this.txtVersionNum = '4.1';
this.txtAscMail = 'support@onlyoffice.com'; this.txtAscMail = 'support@onlyoffice.com';
this.txtAscTelNum = '+371 660-16425'; this.txtAscTelNum = '+371 660-16425';
this.txtAscUrl = 'www.onlyoffice.com'; this.txtAscUrl = 'www.onlyoffice.com';

View file

@ -227,21 +227,9 @@ define([
_pickLink: function(message) { _pickLink: function(message) {
var arr = [], offset, len; var arr = [], offset, len;
message.replace(Common.Utils.emailStrongRe, function(subStr) {
offset = arguments[arguments.length-2];
arr.push({start: offset, end: subStr.length+offset, str: '<a href="' + subStr + '">' + subStr + '</a>'});
return '';
});
message.replace(Common.Utils.ipStrongRe, function(subStr) { message.replace(Common.Utils.ipStrongRe, function(subStr) {
offset = arguments[arguments.length-2]; offset = arguments[arguments.length-2];
len = subStr.length; arr.push({start: offset, end: subStr.length+offset, str: '<a href="' + subStr + '" target="_blank" data-can-copy="true">' + subStr + '</a>'});
var elem = _.find(arr, function(item){
return ( (offset>=item.start) && (offset<item.end) ||
(offset<=item.start) && (offset+len>item.start));
});
if (!elem)
arr.push({start: offset, end: len+offset, str: '<a href="' + subStr + '" target="_blank" data-can-copy="true">' + subStr + '</a>'});
return ''; return '';
}); });
@ -258,6 +246,20 @@ define([
arr.push({start: offset, end: len+offset, str: '<a href="' + ref + '" target="_blank" data-can-copy="true">' + subStr + '</a>'}); arr.push({start: offset, end: len+offset, str: '<a href="' + ref + '" target="_blank" data-can-copy="true">' + subStr + '</a>'});
return ''; return '';
}); });
message.replace(Common.Utils.emailStrongRe, function(subStr) {
var ref = (! /((^mailto:)\/\/)/i.test(subStr) ) ? ('mailto:' + subStr) : subStr;
offset = arguments[arguments.length-2];
len = subStr.length;
var elem = _.find(arr, function(item){
return ( (offset>=item.start) && (offset<item.end) ||
(offset<=item.start) && (offset+len>item.start));
});
if (!elem)
arr.push({start: offset, end: len+offset, str: '<a href="' + ref + '">' + subStr + '</a>'});
return '';
});
arr = _.sortBy(arr, function(item){ return item.start; }); arr = _.sortBy(arr, function(item){ return item.start; });
var str_res = (arr.length>0) ? ( message.substring(0, arr[0].start) + arr[0].str) : message; var str_res = (arr.length>0) ? ( message.substring(0, arr[0].start) + arr[0].str) : message;

View file

@ -1356,21 +1356,9 @@ define([
var arr = [], offset, len; var arr = [], offset, len;
message = Common.Utils.String.htmlEncode(message); message = Common.Utils.String.htmlEncode(message);
message.replace(Common.Utils.emailStrongRe, function(subStr) {
offset = arguments[arguments.length-2];
arr.push({start: offset, end: subStr.length+offset, str: '<a href="' + subStr + '">' + subStr + '</a>'});
return '';
});
message.replace(Common.Utils.ipStrongRe, function(subStr) { message.replace(Common.Utils.ipStrongRe, function(subStr) {
offset = arguments[arguments.length-2]; offset = arguments[arguments.length-2];
len = subStr.length; arr.push({start: offset, end: subStr.length+offset, str: '<a href="' + subStr + '" target="_blank" data-can-copy="true">' + subStr + '</a>'});
var elem = _.find(arr, function(item){
return ( (offset>=item.start) && (offset<item.end) ||
(offset<=item.start) && (offset+len>item.start));
});
if (!elem)
arr.push({start: offset, end: len+offset, str: '<a href="' + subStr + '" target="_blank" data-can-copy="true">' + subStr + '</a>'});
return ''; return '';
}); });
@ -1387,6 +1375,20 @@ define([
arr.push({start: offset, end: len+offset, str: '<a href="' + ref + '" target="_blank" data-can-copy="true">' + subStr + '</a>'}); arr.push({start: offset, end: len+offset, str: '<a href="' + ref + '" target="_blank" data-can-copy="true">' + subStr + '</a>'});
return ''; return '';
}); });
message.replace(Common.Utils.emailStrongRe, function(subStr) {
var ref = (! /((^mailto:)\/\/)/i.test(subStr) ) ? ('mailto:' + subStr) : subStr;
offset = arguments[arguments.length-2];
len = subStr.length;
var elem = _.find(arr, function(item){
return ( (offset>=item.start) && (offset<item.end) ||
(offset<=item.start) && (offset+len>item.start));
});
if (!elem)
arr.push({start: offset, end: len+offset, str: '<a href="' + ref + '">' + subStr + '</a>'});
return '';
});
arr = _.sortBy(arr, function(item){ return item.start; }); arr = _.sortBy(arr, function(item){ return item.start; });
var str_res = (arr.length>0) ? ( message.substring(0, arr[0].start) + arr[0].str) : message; var str_res = (arr.length>0) ? ( message.substring(0, arr[0].start) + arr[0].str) : message;

View file

@ -48,7 +48,7 @@ define([
_.extend(_options, { _.extend(_options, {
title: this.textTitle, title: this.textTitle,
width: 910, width: 910,
height: (window.innerHeight-700)<0 ? window.innerHeight: 700, height: (Common.Utils.innerHeight()-700)<0 ? Common.Utils.innerHeight(): 700,
cls: 'advanced-settings-dlg', cls: 'advanced-settings-dlg',
header: true, header: true,
toolclose: 'hide', toolclose: 'hide',
@ -134,8 +134,8 @@ define([
this.$window.find('> .body').css('height', height-header_height); this.$window.find('> .body').css('height', height-header_height);
this.$window.find('> .body > .box').css('height', height-85); this.$window.find('> .body > .box').css('height', height-85);
var top = ((parseInt(window.innerHeight) - parseInt(height)) / 2) * 0.9; var top = ((Common.Utils.innerHeight() - parseInt(height)) / 2) * 0.9;
var left = (parseInt(window.innerWidth) - parseInt(this.initConfig.width)) / 2; var left = (Common.Utils.innerWidth() - parseInt(this.initConfig.width)) / 2;
this.$window.css('left',left); this.$window.css('left',left);
this.$window.css('top',top); this.$window.css('top',top);

View file

@ -48,7 +48,7 @@ define([
_.extend(_options, { _.extend(_options, {
title: this.textTitle, title: this.textTitle,
width: 910, width: 910,
height: (window.innerHeight-700)<0 ? window.innerHeight: 700, height: (Common.Utils.innerHeight()-700)<0 ? Common.Utils.innerHeight(): 700,
cls: 'advanced-settings-dlg', cls: 'advanced-settings-dlg',
header: true, header: true,
toolclose: 'hide', toolclose: 'hide',
@ -134,8 +134,8 @@ define([
this.$window.find('> .body').css('height', height-header_height); this.$window.find('> .body').css('height', height-header_height);
this.$window.find('> .body > .box').css('height', height-85); this.$window.find('> .body > .box').css('height', height-85);
var top = ((parseInt(window.innerHeight) - parseInt(height)) / 2) * 0.9; var top = ((Common.Utils.innerHeight() - parseInt(height)) / 2) * 0.9;
var left = (parseInt(window.innerWidth) - parseInt(this.initConfig.width)) / 2; var left = (Common.Utils.innerWidth() - parseInt(this.initConfig.width)) / 2;
this.$window.css('left',left); this.$window.css('left',left);
this.$window.css('top',top); this.$window.css('top',top);

View file

@ -194,7 +194,7 @@ define([
if (e.which == 3) { // right button click if (e.which == 3) { // right button click
Common.UI.Menu.Manager.hideAll(); Common.UI.Menu.Manager.hideAll();
var me = this, var me = this,
showPoint = [e.pageX, e.pageY], showPoint = [e.pageX*Common.Utils.zoom(), e.pageY*Common.Utils.zoom()],
menuContainer = $(this.el).find(Common.Utils.String.format('#menu-container-{0}', this.gotoDocsMenu.id)); menuContainer = $(this.el).find(Common.Utils.String.format('#menu-container-{0}', this.gotoDocsMenu.id));
if (!this.gotoDocsMenu.rendered) { if (!this.gotoDocsMenu.rendered) {
// Prepare menu container // Prepare menu container

View file

@ -61,18 +61,24 @@ define([
header : true, header : true,
cls : 'open-dlg', cls : 'open-dlg',
contentTemplate : '', contentTemplate : '',
title : t.txtTitle.replace('%1', (options.type == Asc.c_oAscAdvancedOptionsID.CSV) ? 'CSV' : 'TXT') title : (options.type == Asc.c_oAscAdvancedOptionsID.DRM) ? t.txtTitleProtected : t.txtTitle.replace('%1', (options.type == Asc.c_oAscAdvancedOptionsID.CSV) ? 'CSV' : 'TXT')
}, options); }, options);
this.template = options.template || [ this.template = options.template || [
'<div class="box" style="height:' + (_options.height - 85) + 'px;">', '<div class="box" style="height:' + (_options.height - 85) + 'px;">',
'<div class="content-panel" >', '<div class="content-panel" >',
'<% if (type == Asc.c_oAscAdvancedOptionsID.DRM) { %>',
'<label class="header">' + t.txtPassword + '</label>',
'<div id="id-password-txt" style="margin-bottom:15px;"></div>',
'<% } else { %>',
'<label class="header">' + t.txtEncoding + '</label>', '<label class="header">' + t.txtEncoding + '</label>',
'<div id="id-codepages-combo" class="input-group-nr" style="margin-bottom:15px;"></div>', '<div id="id-codepages-combo" class="input-group-nr" style="margin-bottom:15px;"></div>',
'<% if (type == Asc.c_oAscAdvancedOptionsID.CSV) { %>', '<% if (type == Asc.c_oAscAdvancedOptionsID.CSV) { %>',
'<label class="header">' + t.txtDelimiter + '</label>', '<label class="header">' + t.txtDelimiter + '</label>',
'<div id="id-delimiters-combo" class="input-group-nr" style="max-width: 110px;"></div>', '<div id="id-delimiters-combo" class="input-group-nr" style="max-width: 110px;"></div>',
'<% } %>', '<% } %>',
'<% } %>',
'</div>', '</div>',
'</div>', '</div>',
@ -97,18 +103,46 @@ define([
if (this.$window) { if (this.$window) {
this.$window.find('.tool').hide(); this.$window.find('.tool').hide();
this.$window.find('.dlg-btn').on('click', _.bind(this.onBtnClick, this)); this.$window.find('.dlg-btn').on('click', _.bind(this.onBtnClick, this));
if (this.type == Asc.c_oAscAdvancedOptionsID.DRM) {
var me = this;
me.inputPwd = new Common.UI.InputField({
el: $('#id-password-txt'),
type: 'password',
allowBlank: false,
validateOnBlur: false
});
} else
this.initCodePages(); this.initCodePages();
} }
}, },
show: function() {
Common.UI.Window.prototype.show.apply(this, arguments);
if (this.type == Asc.c_oAscAdvancedOptionsID.DRM) {
var me = this;
setTimeout(function(){
me.inputPwd.cmpEl.find('input').focus();
}, 500);
}
},
onBtnClick: function (event) { onBtnClick: function (event) {
if (this.handler && this.cmbEncoding) { if (this.handler) {
if (this.cmbEncoding)
this.handler.call(this, this.cmbEncoding.getValue(), this.cmbDelimiter ? this.cmbDelimiter.getValue() : null); this.handler.call(this, this.cmbEncoding.getValue(), this.cmbDelimiter ? this.cmbDelimiter.getValue() : null);
else
this.handler.call(this, this.inputPwd.getValue());
} }
this.close(); this.close();
}, },
onPrimary: function() {
this.onBtnClick();
return false;
},
initCodePages: function () { initCodePages: function () {
var i, c, codepage, encodedata = [], listItems = [], length = 0; var i, c, codepage, encodedata = [], listItems = [], length = 0;
@ -311,7 +345,9 @@ define([
txtEncoding : "Encoding ", txtEncoding : "Encoding ",
txtSpace : "Space", txtSpace : "Space",
txtTab : "Tab", txtTab : "Tab",
txtTitle : "Choose %1 options" txtTitle : "Choose %1 options",
txtPassword : "Password",
txtTitleProtected : "Protected File"
}, Common.Views.OpenDialog || {})); }, Common.Views.OpenDialog || {}));
}); });

View file

@ -172,12 +172,22 @@ define([
this.pluginsPanel.toggleClass('hidden', false); this.pluginsPanel.toggleClass('hidden', false);
}, },
openNotVisualMode: function(pluginGuid) {
var rec = this.viewPluginsList.store.findWhere({guid: pluginGuid});
if (rec)
this.viewPluginsList.cmpEl.find('#' + rec.get('id')).parent().addClass('selected');
},
closeNotVisualMode: function() {
this.viewPluginsList.cmpEl.find('.selected').removeClass('selected');
},
_onLoad: function() { _onLoad: function() {
if (this.loadMask) if (this.loadMask)
this.loadMask.hide(); this.loadMask.hide();
}, },
strPlugins: 'Add-ons', strPlugins: 'Plugins',
textLoading: 'Loading', textLoading: 'Loading',
textStart: 'Start' textStart: 'Start'
@ -187,13 +197,16 @@ define([
initialize : function(options) { initialize : function(options) {
var _options = {}; var _options = {};
_.extend(_options, { _.extend(_options, {
width: 800,
height: (window.innerHeight-600)<0 ? window.innerHeight: 600,
cls: 'advanced-settings-dlg', cls: 'advanced-settings-dlg',
header: true header: true,
enableKeyEvents: false
}, options); }, options);
var header_footer = (_options.buttons && _.size(_options.buttons)>0) ? 85 : 34; var header_footer = (_options.buttons && _.size(_options.buttons)>0) ? 85 : 34;
_options.width = (Common.Utils.innerWidth()-_options.width)<0 ? Common.Utils.innerWidth(): _options.width,
_options.height += header_footer;
_options.height = (Common.Utils.innerHeight()-_options.height)<0 ? Common.Utils.innerHeight(): _options.height;
this.template = [ this.template = [
'<div id="id-plugin-container" class="box" style="height:' + (_options.height-header_footer) + 'px;">', '<div id="id-plugin-container" class="box" style="height:' + (_options.height-header_footer) + 'px;">',
'<div id="id-plugin-placeholder" style="width: 100%;height: 100%;"></div>', '<div id="id-plugin-placeholder" style="width: 100%;height: 100%;"></div>',
@ -218,6 +231,10 @@ define([
Common.UI.Window.prototype.render.call(this); Common.UI.Window.prototype.render.call(this);
this.$window.find('> .body').css({height: 'auto', overflow: 'hidden'}); this.$window.find('> .body').css({height: 'auto', overflow: 'hidden'});
this.boxEl = this.$window.find('.body > .box');
this._headerFooterHeight = (this.options.buttons && _.size(this.options.buttons)>0) ? 85 : 34;
this._headerFooterHeight += ((parseInt(this.$window.css('border-top-width')) + parseInt(this.$window.css('border-bottom-width'))));
var iframe = document.createElement("iframe"); var iframe = document.createElement("iframe");
iframe.id = 'plugin_iframe'; iframe.id = 'plugin_iframe';
iframe.name = 'pluginFrameEditor', iframe.name = 'pluginFrameEditor',
@ -227,50 +244,46 @@ define([
iframe.frameBorder = 0; iframe.frameBorder = 0;
iframe.scrolling = "no"; iframe.scrolling = "no";
iframe.onload = _.bind(this._onLoad,this); iframe.onload = _.bind(this._onLoad,this);
$('#id-plugin-placeholder').append(iframe);
this.loadMask = new Common.UI.LoadMask({owner: $('#id-plugin-placeholder')});
this.loadMask.setTitle(this.textLoading);
this.loadMask.show();
iframe.src = this.url;
var me = this; var me = this;
setTimeout(function(){
if (me.isLoaded) return;
me.loadMask = new Common.UI.LoadMask({owner: $('#id-plugin-placeholder')});
me.loadMask.setTitle(this.textLoading);
me.loadMask.show();
if (me.isLoaded) me.loadMask.hide();
}, 500);
this.on('close', function(obj){ iframe.src = this.url;
}); $('#id-plugin-placeholder').append(iframe);
this.on('show', function(obj){ this.on('resizing', function(args){
var h = me.getHeight(); me.boxEl.css('height', parseInt(me.$window.css('height')) - me._headerFooterHeight);
if (window.innerHeight>h && h<600 || window.innerHeight<h) {
h = Math.min(window.innerHeight, 600);
me.setHeight(h);
}
}); });
}, },
_onLoad: function() { _onLoad: function() {
this.isLoaded = true;
if (this.loadMask) if (this.loadMask)
this.loadMask.hide(); this.loadMask.hide();
}, },
setHeight: function(height) { setInnerSize: function(width, height) {
if (height >= 0) { var maxHeight = Common.Utils.innerHeight(),
var min = parseInt(this.$window.css('min-height')); maxWidth = Common.Utils.innerWidth(),
height < min && (height = min); borders_width = (parseInt(this.$window.css('border-left-width')) + parseInt(this.$window.css('border-right-width')));
this.$window.height(height); if (maxHeight<height + this._headerFooterHeight)
height = maxHeight - this._headerFooterHeight;
if (maxWidth<width + borders_width)
width = maxWidth - borders_width;
var header_height = (this.initConfig.header) ? parseInt(this.$window.find('> .header').css('height')) : 0; this.boxEl.css('height', height);
this.$window.find('> .body').css('height', height-header_height); Common.UI.Window.prototype.setHeight.call(this, height + this._headerFooterHeight);
this.$window.find('> .body > .box').css('height', height-85); Common.UI.Window.prototype.setWidth.call(this, width + borders_width);
var top = ((parseInt(window.innerHeight) - parseInt(height)) / 2) * 0.9; this.$window.css('left',(maxWidth - width - borders_width) / 2);
var left = (parseInt(window.innerWidth) - parseInt(this.initConfig.width)) / 2; this.$window.css('top',((maxHeight - height - this._headerFooterHeight) / 2) * 0.9);
this.$window.css('left',left);
this.$window.css('top',top);
}
}, },
textLoading : 'Loading' textLoading : 'Loading'

Binary file not shown.

Before

Width:  |  Height:  |  Size: 132 B

After

Width:  |  Height:  |  Size: 216 B

View file

@ -74,7 +74,7 @@
} }
.options-btn-icon(@icon-class, @index, @icon-size) { .options-btn-icon(@icon-class, @index, @icon-size) {
.@{icon-class} {background-position: -@icon-size -@index*@icon-size;} .@{icon-class} {background-position: 0 -@index*@icon-size;}
button.over > .@{icon-class} {background-position: -1*@icon-size -@index*@icon-size;} button.over > .@{icon-class} {background-position: -1*@icon-size -@index*@icon-size;}
// .btn-group.open > .@{icon-class}, // .btn-group.open > .@{icon-class},
button.active > .@{icon-class}, button.active > .@{icon-class},

View file

@ -27,10 +27,11 @@
&:hover, &:hover,
&.over { &.over {
background-color: @secondary; background-color: @secondary;
.plugin-icon {
.box-shadow(0 0 0 2px transparent);
} }
&.selected {
background-color: @primary;
color: #fff;
} }
} }
@ -57,11 +58,14 @@
} }
.plugin-caret { .plugin-caret {
float: right; //float: right;
width: 16px; width: 16px;
height: 16px; height: 16px;
background-position: -1px -274px; background-position: -1px -274px;
margin: 7px; margin: 7px;
display: inline-block;
position: absolute;
right: 0;
} }
} }
} }

View file

@ -80,6 +80,10 @@
} }
} }
} }
&.resizing {
cursor: inherit !important;
}
} }
> .body { > .body {
@ -185,6 +189,32 @@
-o-transform: none !important; -o-transform: none !important;
-o-transition: none !important; -o-transition: none !important;
} }
.resize-border {
position: absolute;
width: 5px;
height: 5px;
z-index: 1;
background: @gray-lighter;
border: 1px none @gray-dark;
&.left {
left: 0;
}
&.right {
right: 0;
}
&.top {
top: 0;
}
&.bottom {
bottom: 0;
}
&.resizing {
cursor: inherit !important;
}
}
} }
.modal-dlg { .modal-dlg {

View file

@ -274,7 +274,7 @@ define([
this.api.SetTextBoxInputMode(parseInt(value) == 1); this.api.SetTextBoxInputMode(parseInt(value) == 1);
/** coauthoring begin **/ /** coauthoring begin **/
if (this.mode.isEdit && this.mode.canLicense && !this.mode.isOffline) { if (this.mode.isEdit && this.mode.canLicense && !this.mode.isOffline && this.mode.canCoAuthoring) {
value = Common.localStorage.getItem("de-settings-coauthmode"); value = Common.localStorage.getItem("de-settings-coauthmode");
var fast_coauth = (value===null || parseInt(value) == 1); var fast_coauth = (value===null || parseInt(value) == 1);
this.api.asc_SetFastCollaborative(fast_coauth); this.api.asc_SetFastCollaborative(fast_coauth);

View file

@ -155,24 +155,15 @@ define([
// Syncronize focus with api // Syncronize focus with api
$(document.body).on('focus', 'input, textarea', function(e) { $(document.body).on('focus', 'input, textarea', function(e) {
if (!/area_id/.test(e.target.id)) { if (!/area_id/.test(e.target.id)) {
me.api.asc_enableKeyEvents(false);
if (/msg-reply/.test(e.target.className)) if (/msg-reply/.test(e.target.className))
me.dontCloseDummyComment = true; me.dontCloseDummyComment = true;
} }
}); });
$("#editor_sdk").focus(function (e) {
if (!me.isModalShowed) {
me.api.asc_enableKeyEvents(true);
}
});
$(document.body).on('blur', 'input, textarea', function(e) { $(document.body).on('blur', 'input, textarea', function(e) {
if (!me.isModalShowed) { if (!me.isModalShowed) {
/* if (!/area_id/.test(e.target.id) && $(e.target).parent().find(e.relatedTarget).length<1 /* When focus in combobox goes from input to it's menu button or menu items */
* TODO: Workaround bug #25004. Clipboard feature processing in sdk. || !e.relatedTarget) {
*/
if (!(Common.Utils.isSafari && Common.Utils.isMac) && !/area_id/.test(e.target.id)) {
me.api.asc_enableKeyEvents(true); me.api.asc_enableKeyEvents(true);
if (/msg-reply/.test(e.target.className)) if (/msg-reply/.test(e.target.className))
me.dontCloseDummyComment = false; me.dontCloseDummyComment = false;
@ -206,14 +197,18 @@ define([
}, },
'settings:unitschanged':_.bind(this.unitsChanged, this), 'settings:unitschanged':_.bind(this.unitsChanged, this),
'dataview:focus': function(e){ 'dataview:focus': function(e){
me.api.asc_enableKeyEvents(false);
}, },
'dataview:blur': function(e){ 'dataview:blur': function(e){
if (!me.isModalShowed) { if (!me.isModalShowed) {
me.api.asc_enableKeyEvents(true); me.api.asc_enableKeyEvents(true);
me.onEditComplete();
} }
}, },
'menu:show': function(e){
},
'menu:hide': function(e){
if (!me.isModalShowed)
me.api.asc_enableKeyEvents(true);
},
'edit:complete': _.bind(me.onEditComplete, me) 'edit:complete': _.bind(me.onEditComplete, me)
}); });
@ -318,6 +313,7 @@ define([
if (!old_rights) if (!old_rights)
Common.UI.warning({ Common.UI.warning({
title: this.notcriticalErrorTitle, title: this.notcriticalErrorTitle,
maxwidth: 600,
msg : _.isEmpty(data.message) ? this.warnProcessRightsChange : data.message, msg : _.isEmpty(data.message) ? this.warnProcessRightsChange : data.message,
callback: function(){ callback: function(){
me._state.lostEditingRights = false; me._state.lostEditingRights = false;
@ -565,7 +561,7 @@ define([
if ( type == Asc.c_oAscAsyncActionType.BlockInteraction && if ( type == Asc.c_oAscAsyncActionType.BlockInteraction &&
(!this.getApplication().getController('LeftMenu').dlgSearch || !this.getApplication().getController('LeftMenu').dlgSearch.isVisible()) && (!this.getApplication().getController('LeftMenu').dlgSearch || !this.getApplication().getController('LeftMenu').dlgSearch.isVisible()) &&
!( id == Asc.c_oAscAsyncAction['ApplyChanges'] && this.dontCloseDummyComment ) ) { !( id == Asc.c_oAscAsyncAction['ApplyChanges'] && this.dontCloseDummyComment ) ) {
this.onEditComplete(this.loadMask); // this.onEditComplete(this.loadMask); //если делать фокус, то при принятии чужих изменений, заканчивается свой композитный ввод
this.api.asc_enableKeyEvents(true); this.api.asc_enableKeyEvents(true);
} }
}, },
@ -795,7 +791,7 @@ define([
me.api.SetTextBoxInputMode(value!==null && parseInt(value) == 1); me.api.SetTextBoxInputMode(value!==null && parseInt(value) == 1);
/** coauthoring begin **/ /** coauthoring begin **/
if (me.appOptions.isEdit && me.appOptions.canLicense && !me.appOptions.isOffline) { if (me.appOptions.isEdit && me.appOptions.canLicense && !me.appOptions.isOffline && me.appOptions.canCoAuthoring) {
value = Common.localStorage.getItem("de-settings-coauthmode"); value = Common.localStorage.getItem("de-settings-coauthmode");
me._state.fastCoauth = (value===null || parseInt(value) == 1); me._state.fastCoauth = (value===null || parseInt(value) == 1);
me.api.asc_SetFastCollaborative(me._state.fastCoauth); me.api.asc_SetFastCollaborative(me._state.fastCoauth);
@ -846,7 +842,8 @@ define([
if (me.appOptions.isEdit) { if (me.appOptions.isEdit) {
value = Common.localStorage.getItem("de-settings-autosave"); value = Common.localStorage.getItem("de-settings-autosave");
value = (!me._state.fastCoauth && value!==null) ? parseInt(value) : 1; value = (!me._state.fastCoauth && value!==null) ? parseInt(value) : (me.appOptions.canCoAuthoring ? 1 : 0);
me.api.asc_setAutoSaveGap(value); me.api.asc_setAutoSaveGap(value);
if (me.needToUpdateVersion) if (me.needToUpdateVersion)
@ -855,7 +852,7 @@ define([
if (window.styles_loaded) { if (window.styles_loaded) {
clearInterval(timer_sl); clearInterval(timer_sl);
toolbarController.getView('Toolbar').createDelayedElements(); toolbarController.createDelayedElements();
documentHolderController.getView('DocumentHolder').createDelayedElements(); documentHolderController.getView('DocumentHolder').createDelayedElements();
me.loadLanguages(); me.loadLanguages();
@ -924,9 +921,20 @@ define([
}, },
onEditorPermissions: function(params) { onEditorPermissions: function(params) {
var licType = params.asc_getLicenseType();
if (Asc.c_oLicenseResult.Expired === licType || Asc.c_oLicenseResult.Error === licType || Asc.c_oLicenseResult.ExpiredTrial === licType) {
Common.UI.warning({
title: this.titleLicenseExp,
msg: this.warnLicenseExp,
buttons: [],
closable: false
});
return;
}
this.permissions.review = (this.permissions.review === undefined) ? (this.permissions.edit !== false) : this.permissions.review; this.permissions.review = (this.permissions.review === undefined) ? (this.permissions.edit !== false) : this.permissions.review;
this.appOptions.canAnalytics = params.asc_getIsAnalyticsEnable(); this.appOptions.canAnalytics = params.asc_getIsAnalyticsEnable();
this.appOptions.canLicense = params.asc_getCanLicense ? params.asc_getCanLicense() : false; this.appOptions.canLicense = (licType === Asc.c_oLicenseResult.Success);
this.appOptions.isLightVersion = params.asc_getIsLight(); this.appOptions.isLightVersion = params.asc_getIsLight();
/** coauthoring begin **/ /** coauthoring begin **/
this.appOptions.canCoAuthoring = !this.appOptions.isLightVersion; this.appOptions.canCoAuthoring = !this.appOptions.isLightVersion;
@ -952,7 +960,7 @@ define([
this.appOptions.canDownloadOrigin = !this.appOptions.nativeApp && this.permissions.download !== false && (type && typeof type[1] === 'string'); this.appOptions.canDownloadOrigin = !this.appOptions.nativeApp && this.permissions.download !== false && (type && typeof type[1] === 'string');
this.appOptions.canDownload = !this.appOptions.nativeApp && this.permissions.download !== false && (!type || typeof type[1] !== 'string'); this.appOptions.canDownload = !this.appOptions.nativeApp && this.permissions.download !== false && (!type || typeof type[1] !== 'string');
this._state.licenseWarning = !this.appOptions.canLicense && this.appOptions.canEdit && this.editorConfig.mode !== 'view'; this._state.licenseWarning = (licType===Asc.c_oLicenseResult.Connections) && this.appOptions.canEdit && this.editorConfig.mode !== 'view';
this.appOptions.canBranding = params.asc_getCanBranding() && (typeof this.editorConfig.customization == 'object'); this.appOptions.canBranding = params.asc_getCanBranding() && (typeof this.editorConfig.customization == 'object');
if (this.appOptions.canBranding) { if (this.appOptions.canBranding) {
@ -1166,7 +1174,7 @@ define([
break; break;
case Asc.c_oAscError.ID.CoAuthoringDisconnect: case Asc.c_oAscError.ID.CoAuthoringDisconnect:
config.msg = this.errorCoAuthoringDisconnect; config.msg = (this.appOptions.isEdit) ? this.errorCoAuthoringDisconnect : this.errorViewerDisconnect;
break; break;
case Asc.c_oAscError.ID.ConvertationPassword: case Asc.c_oAscError.ID.ConvertationPassword:
@ -1596,14 +1604,14 @@ define([
}, },
onAdvancedOptions: function(advOptions) { onAdvancedOptions: function(advOptions) {
var type = advOptions.asc_getOptionId(); var type = advOptions.asc_getOptionId(),
me = this, dlg;
if (type == Asc.c_oAscAdvancedOptionsID.TXT) { if (type == Asc.c_oAscAdvancedOptionsID.TXT) {
var me = this; dlg = new Common.Views.OpenDialog({
var dlg = new Common.Views.OpenDialog({
type: type, type: type,
codepages: advOptions.asc_getOptions().asc_getCodePages(), codepages: advOptions.asc_getOptions().asc_getCodePages(),
settings: advOptions.asc_getOptions().asc_getRecommendedSettings(), settings: advOptions.asc_getOptions().asc_getRecommendedSettings(),
handler: function (encoding, delimiter) { handler: function (encoding) {
me.isShowOpenDialog = false; me.isShowOpenDialog = false;
if (me && me.api) { if (me && me.api) {
me.api.asc_setAdvancedOptions(type, new Asc.asc_CTXTAdvancedOptions(encoding)); me.api.asc_setAdvancedOptions(type, new Asc.asc_CTXTAdvancedOptions(encoding));
@ -1611,11 +1619,22 @@ define([
} }
} }
}); });
} else if (type == Asc.c_oAscAdvancedOptionsID.DRM) {
dlg = new Common.Views.OpenDialog({
type: type,
handler: function (value) {
me.isShowOpenDialog = false;
if (me && me.api) {
me.api.asc_setAdvancedOptions(type, new Asc.asc_CDRMAdvancedOptions(value));
me.loadMask && me.loadMask.show();
}
}
});
}
if (dlg) {
this.isShowOpenDialog = true; this.isShowOpenDialog = true;
this.loadMask && this.loadMask.hide(); this.loadMask && this.loadMask.hide();
this.onLongActionEnd(Asc.c_oAscAsyncActionType.BlockInteraction, LoadingDocument); this.onLongActionEnd(Asc.c_oAscAsyncActionType.BlockInteraction, LoadingDocument);
dlg.show(); dlg.show();
} }
}, },
@ -1655,7 +1674,7 @@ define([
}, },
applySettings: function() { applySettings: function() {
if (this.appOptions.isEdit && this.appOptions.canLicense && !this.appOptions.isOffline) { if (this.appOptions.isEdit && this.appOptions.canLicense && !this.appOptions.isOffline && this.appOptions.canCoAuthoring) {
var value = Common.localStorage.getItem("de-settings-coauthmode"), var value = Common.localStorage.getItem("de-settings-coauthmode"),
oldval = this._state.fastCoauth; oldval = this._state.fastCoauth;
this._state.fastCoauth = (value===null || parseInt(value) == 1); this._state.fastCoauth = (value===null || parseInt(value) == 1);
@ -1731,7 +1750,9 @@ define([
initDataType: itemVar.initDataType, initDataType: itemVar.initDataType,
initData: itemVar.initData, initData: itemVar.initData,
isUpdateOleOnResize : itemVar.isUpdateOleOnResize, isUpdateOleOnResize : itemVar.isUpdateOleOnResize,
buttons: itemVar.buttons buttons: itemVar.buttons,
size: itemVar.size,
initOnSelectionChanged: itemVar.initOnSelectionChanged
})); }));
}); });
if (variationsArr.length>0) if (variationsArr.length>0)
@ -1819,7 +1840,7 @@ define([
txtLines: 'Lines', txtLines: 'Lines',
txtEditingMode: 'Set editing mode...', txtEditingMode: 'Set editing mode...',
textAnonymous: 'Anonymous', textAnonymous: 'Anonymous',
loadingDocumentTitleText: 'Loading Document', loadingDocumentTitleText: 'Loading document',
loadingDocumentTextText: 'Loading document...', loadingDocumentTextText: 'Loading document...',
warnProcessRightsChange: 'You have been denied the right to edit the file.', warnProcessRightsChange: 'You have been denied the right to edit the file.',
errorProcessSaveResult: 'Saving is failed.', errorProcessSaveResult: 'Saving is failed.',
@ -1852,7 +1873,10 @@ define([
textBuyNow: 'Visit website', textBuyNow: 'Visit website',
textNoLicenseTitle: 'ONLYOFFICE open source version', textNoLicenseTitle: 'ONLYOFFICE open source version',
warnNoLicense: 'You are using an open source version of ONLYOFFICE. The version has limitations for concurrent connections to the document server (20 connections at a time).<br>If you need more please consider purchasing a commercial license.', warnNoLicense: 'You are using an open source version of ONLYOFFICE. The version has limitations for concurrent connections to the document server (20 connections at a time).<br>If you need more please consider purchasing a commercial license.',
textContactUs: 'Contact sales' textContactUs: 'Contact sales',
errorViewerDisconnect: 'Connection is lost. You can still view the document,<br>but will not be able to download until the connection is restored.',
warnLicenseExp: 'Your license has expired.<br>Please update your license and refresh the page.',
titleLicenseExp: 'License expired'
} }
})(), DE.Controllers.Main || {})) })(), DE.Controllers.Main || {}))
}); });

View file

@ -310,6 +310,7 @@ define([
this._settings[type].hidden = 0; this._settings[type].hidden = 0;
this._settings[type].btn.setDisabled(false); this._settings[type].btn.setDisabled(false);
this.rightmenu.SetActivePane(type, true); this.rightmenu.SetActivePane(type, true);
this._settings[type].panel.setLocked(this._settings[type].locked);
this._settings[type].panel.ChangeSettings.call(this._settings[type].panel); this._settings[type].panel.ChangeSettings.call(this._settings[type].panel);
}, },

View file

@ -166,7 +166,7 @@ define([
// Create toolbar view // Create toolbar view
this.toolbar = this.createView('Toolbar'); this.toolbar = this.createView('Toolbar');
this.toolbar.on('render:after', _.bind(this.onToolbarAfterRender, this)); // this.toolbar.on('render:after', _.bind(this.onToolbarAfterRender, this));
}, },
onToolbarAfterRender: function(toolbar) { onToolbarAfterRender: function(toolbar) {
@ -240,7 +240,7 @@ define([
toolbar.btnDropCap.menu.on('item:click', _.bind(this.onDropCapSelect, this)); toolbar.btnDropCap.menu.on('item:click', _.bind(this.onDropCapSelect, this));
toolbar.mnuDropCapAdvanced.on('click', _.bind(this.onDropCapAdvancedClick, this)); toolbar.mnuDropCapAdvanced.on('click', _.bind(this.onDropCapAdvancedClick, this));
toolbar.btnColumns.menu.on('item:click', _.bind(this.onColumnsSelect, this)); toolbar.btnColumns.menu.on('item:click', _.bind(this.onColumnsSelect, this));
toolbar.btnPageOrient.on('toggle', _.bind(this.onPageOrientToggle, this)); toolbar.btnPageOrient.menu.on('item:click', _.bind(this.onPageOrientSelect, this));
toolbar.btnPageMargins.menu.on('item:click', _.bind(this.onPageMarginsSelect, this)); toolbar.btnPageMargins.menu.on('item:click', _.bind(this.onPageMarginsSelect, this));
toolbar.btnClearStyle.on('click', _.bind(this.onClearStyleClick, this)); toolbar.btnClearStyle.on('click', _.bind(this.onClearStyleClick, this));
toolbar.btnCopyStyle.on('toggle', _.bind(this.onCopyStyleToggle, this)); toolbar.btnCopyStyle.on('toggle', _.bind(this.onCopyStyleToggle, this));
@ -723,7 +723,7 @@ define([
onApiPageOrient: function(isportrait) { onApiPageOrient: function(isportrait) {
if (this._state.pgorient !== isportrait) { if (this._state.pgorient !== isportrait) {
this.toolbar.btnPageOrient.toggle(!isportrait, true); this.toolbar.btnPageOrient.menu.items[isportrait ? 0 : 1].setChecked(true);
this._state.pgorient = isportrait; this._state.pgorient = isportrait;
} }
}, },
@ -765,7 +765,7 @@ define([
onApiZoomChange: function(percent, type) { onApiZoomChange: function(percent, type) {
this.toolbar.btnFitPage.setChecked(type == 2, true); this.toolbar.btnFitPage.setChecked(type == 2, true);
this.toolbar.btnFitWidth.setChecked(type == 1, true); this.toolbar.btnFitWidth.setChecked(type == 1, true);
this.toolbar.mnuZoom.options.value = percent;
$('.menu-zoom .zoom', this.toolbar.el).html(percent + '%'); $('.menu-zoom .zoom', this.toolbar.el).html(percent + '%');
}, },
@ -873,29 +873,21 @@ define([
onCopyPaste: function(copy, e) { onCopyPaste: function(copy, e) {
var me = this; var me = this;
if (me.api) { if (me.api) {
if (typeof window['AscDesktopEditor'] === 'object') { // AscDesktopEditor object may exists in desktop version var res = (copy) ? me.api.Copy() : me.api.Paste();
copy ? me.api.Copy() : me.api.Paste(); if (!res) {
// window['AscDesktopEditor'][copy ? 'Copy' : 'Paste'](); // desktop editor's methods
} else {
var value = Common.localStorage.getItem("de-hide-copywarning"); var value = Common.localStorage.getItem("de-hide-copywarning");
if (!(value && parseInt(value) == 1)) { if (!(value && parseInt(value) == 1)) {
(new Common.Views.CopyWarningDialog({ (new Common.Views.CopyWarningDialog({
handler: function(dontshow) { handler: function(dontshow) {
copy ? me.api.Copy() : me.api.Paste();
if (dontshow) Common.localStorage.setItem("de-hide-copywarning", 1); if (dontshow) Common.localStorage.setItem("de-hide-copywarning", 1);
Common.NotificationCenter.trigger('edit:complete', me.toolbar); Common.NotificationCenter.trigger('edit:complete', me.toolbar);
} }
})).show(); })).show();
} else {
copy ? me.api.Copy() : me.api.Paste();
Common.NotificationCenter.trigger('edit:complete', me.toolbar);
} }
} } else
Common.component.Analytics.trackEvent('ToolBar', 'Copy Warning'); Common.component.Analytics.trackEvent('ToolBar', 'Copy Warning');
} else {
Common.NotificationCenter.trigger('edit:complete', me.toolbar);
} }
Common.NotificationCenter.trigger('edit:complete', me.toolbar);
}, },
onIncrease: function(e) { onIncrease: function(e) {
@ -1107,7 +1099,6 @@ define([
msg: this.textFontSizeErr, msg: this.textFontSizeErr,
callback: function() { callback: function() {
_.defer(function(btn) { _.defer(function(btn) {
me.api.asc_enableKeyEvents(false);
$('input', combo.cmpEl).focus(); $('input', combo.cmpEl).focus();
}) })
} }
@ -1387,10 +1378,11 @@ define([
Common.NotificationCenter.trigger('edit:complete', this.toolbar, this.toolbar.btnInsertShape); Common.NotificationCenter.trigger('edit:complete', this.toolbar, this.toolbar.btnInsertShape);
}, },
onPageOrientToggle: function(btn, state, e) { onPageOrientSelect: function(menu, item) {
this._state.pgorient = undefined; this._state.pgorient = undefined;
if (this.api) if (this.api && item.checked) {
this.api.change_PageOrient(!state); this.api.change_PageOrient(item.value);
}
Common.NotificationCenter.trigger('edit:complete', this.toolbar); Common.NotificationCenter.trigger('edit:complete', this.toolbar);
Common.component.Analytics.trackEvent('ToolBar', 'Page Orientation'); Common.component.Analytics.trackEvent('ToolBar', 'Page Orientation');
@ -1767,11 +1759,11 @@ define([
menu.items[3].setDisabled(isAllDefailtNotModifaed); menu.items[3].setDisabled(isAllDefailtNotModifaed);
menu.items[4].setDisabled(isAllCustomDeleted); menu.items[4].setDisabled(isAllCustomDeleted);
var top = e.clientY; var top = e.clientY*Common.Utils.zoom();
if ($('#header-container').is(":visible")) { if ($('#header-container').is(":visible")) {
top -= $('#header-container').height() top -= $('#header-container').height()
} }
showPoint = [e.clientX, top]; showPoint = [e.clientX*Common.Utils.zoom(), top];
if (record != undefined) { if (record != undefined) {
//itemMenu //itemMenu
@ -2197,9 +2189,12 @@ define([
}, },
fillEquations: function() { fillEquations: function() {
if (!this.toolbar.btnInsertEquation.rendered) return;
var me = this, equationsStore = this.getApplication().getCollection('EquationGroups'); var me = this, equationsStore = this.getApplication().getCollection('EquationGroups');
me.equationPickers = []; me.equationPickers = [];
me.toolbar.btnInsertEquation.menu.removeAll();
for (var i = 0; i < equationsStore.length; ++i) { for (var i = 0; i < equationsStore.length; ++i) {
var equationGroup = equationsStore.at(i); var equationGroup = equationsStore.at(i);
@ -2388,8 +2383,9 @@ define([
}, },
fillTextArt: function() { fillTextArt: function() {
var me = this; if (!this.toolbar.btnInsertText.rendered) return;
var me = this;
if (this.toolbar.mnuTextArtPicker) { if (this.toolbar.mnuTextArtPicker) {
var models = this.getApplication().getCollection('Common.Collections.TextArt').models, var models = this.getApplication().getCollection('Common.Collections.TextArt').models,
count = this.toolbar.mnuTextArtPicker.store.length; count = this.toolbar.mnuTextArtPicker.store.length;
@ -2635,6 +2631,11 @@ define([
me._mailMergeDlg.show(); me._mailMergeDlg.show();
}, },
createDelayedElements: function() {
this.toolbar.createDelayedElements();
this.onToolbarAfterRender(this.toolbar);
},
textEmptyImgUrl : 'You need to specify image URL.', textEmptyImgUrl : 'You need to specify image URL.',
textWarning : 'Warning', textWarning : 'Warning',
textFontSizeErr : 'The entered value is incorrect.<br>Please enter a numeric value between 1 and 100', textFontSizeErr : 'The entered value is incorrect.<br>Please enter a numeric value between 1 and 100',

View file

@ -21,7 +21,7 @@
<button type="button" class="btn btn-text-default" id="shape-button-from-file" style="width:90px;"><%= scope.textFromFile %></button> <button type="button" class="btn btn-text-default" id="shape-button-from-file" style="width:90px;"><%= scope.textFromFile %></button>
</td> </td>
<td class="padding-small" width="50%"> <td class="padding-small" width="50%">
<button type="button" class="btn btn-text-default" id="shape-button-from-url" style="width:90px;"><%= scope.textFromUrl %></button> <button type="button" class="btn btn-text-default" id="shape-button-from-url" style="width:90px;float:right;"><%= scope.textFromUrl %></button>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -29,7 +29,7 @@
<div id="shape-combo-fill-type" style="width: 90px;"></div> <div id="shape-combo-fill-type" style="width: 90px;"></div>
</td> </td>
<td rowspan="2"> <td rowspan="2">
<div style="width: 90px; height: 80px; padding: 14px 20px; border: 1px solid #AFAFAF; border-radius: 2px; background: #ffffff;"> <div style="width: 90px; height: 80px; padding: 14px 20px; border: 1px solid #AFAFAF; border-radius: 2px; background: #ffffff;float:right;">
<div id="shape-texture-img" style="width: 50px;height: 50px;"></div> <div id="shape-texture-img" style="width: 50px;height: 50px;"></div>
</div> </div>
</td> </td>
@ -108,6 +108,14 @@
</div> </div>
</td> </td>
</tr> </tr>
<tr>
<td class="padding-small">
<div style="display:inline-block;width:100px;vertical-align: middle;">
<label class="input-label" style=""><%= scope.strType %></label>
<div id="shape-combo-border-type" style="width: 93px;"></div>
</div>
</td>
</tr>
<tr class="shape-only"> <tr class="shape-only">
<td class="padding-small"> <td class="padding-small">
<div class="separator horizontal"></div> <div class="separator horizontal"></div>

View file

@ -83,6 +83,14 @@
</div> </div>
</td> </td>
</tr> </tr>
<tr>
<td class="padding-small">
<div style="display:inline-block;width:100px;vertical-align: middle;">
<label class="input-label" style=""><%= scope.strType %></label>
<div id="textart-combo-border-type" style="width: 93px;"></div>
</div>
</td>
</tr>
<tr> <tr>
<td class="padding-small"> <td class="padding-small">
<div class="separator horizontal"></div> <div class="separator horizontal"></div>

View file

@ -63,7 +63,6 @@ define([
}, },
initialize: function () { initialize: function () {
var me = this;
this._initSettings = true; this._initSettings = true;
this._state = { this._state = {
@ -85,133 +84,8 @@ define([
this.render(); this.render();
var viewData = [
{ offsetx: 0, data: Asc.c_oAscWrapStyle2.Inline, iconCls:'wrap-inline', tip: this.txtInline, selected: true },
{ offsetx: 50, data: Asc.c_oAscWrapStyle2.Square, iconCls:'wrap-square', tip: this.txtSquare },
{ offsetx: 100, data: Asc.c_oAscWrapStyle2.Tight, iconCls:'wrap-tight', tip: this.txtTight },
{ offsetx: 150, data: Asc.c_oAscWrapStyle2.Through, iconCls:'wrap-through', tip: this.txtThrough },
{ offsetx: 200, data: Asc.c_oAscWrapStyle2.TopAndBottom, iconCls:'wrap-topAndBottom', tip: this.txtTopAndBottom },
{ offsetx: 250, data: Asc.c_oAscWrapStyle2.InFront, iconCls:'wrap-inFront', tip: this.txtInFront },
{ offsetx: 300, data: Asc.c_oAscWrapStyle2.Behind, iconCls:'wrap-behind', tip: this.txtBehind }
];
this.btnWrapType = new Common.UI.Button({
cls : 'btn-large-dataview',
iconCls : 'item-wrap wrap-inline',
menu : new Common.UI.Menu({
items: [
{ template: _.template('<div id="id-chart-menu-wrap" style="width: 235px; margin: 0 5px;"></div>') }
]
})
});
this.btnWrapType.on('render:after', function(btn) {
me.mnuWrapPicker = new Common.UI.DataView({
el: $('#id-chart-menu-wrap'),
parentMenu: btn.menu,
store: new Common.UI.DataViewStore(viewData),
itemTemplate: _.template('<div id="<%= id %>" class="item-wrap" style="background-position: -<%= offsetx %>px 0;"></div>')
});
});
this.btnWrapType.render($('#chart-button-wrap'));
this.mnuWrapPicker.on('item:click', _.bind(this.onSelectWrap, this, this.btnWrapType));
this.lockedControls.push(this.btnWrapType);
this.btnChartType = new Common.UI.Button({
cls : 'btn-large-dataview',
iconCls : 'item-chartlist bar-normal',
menu : new Common.UI.Menu({
style: 'width: 560px;',
items: [
{ template: _.template('<div id="id-chart-menu-type" class="menu-insertchart" style="margin: 5px 5px 5px 10px;"></div>') }
]
})
});
this.btnChartType.on('render:after', function(btn) {
me.mnuChartTypePicker = new Common.UI.DataView({
el: $('#id-chart-menu-type'),
parentMenu: btn.menu,
restoreHeight: 411,
groups: new Common.UI.DataViewGroupStore([
{ id: 'menu-chart-group-bar', caption: me.textColumn },
{ id: 'menu-chart-group-line', caption: me.textLine },
{ id: 'menu-chart-group-pie', caption: me.textPie },
{ id: 'menu-chart-group-hbar', caption: me.textBar },
{ id: 'menu-chart-group-area', caption: me.textArea },
{ id: 'menu-chart-group-scatter', caption: me.textPoint },
{ id: 'menu-chart-group-stock', caption: me.textStock }
]),
store: new Common.UI.DataViewStore([
{ group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barNormal, iconCls: 'column-normal', selected: true},
{ group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barStacked, iconCls: 'column-stack'},
{ group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barStackedPer, iconCls: 'column-pstack'},
{ group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barNormal3d, iconCls: 'column-3d-normal'},
{ group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barStacked3d, iconCls: 'column-3d-stack'},
{ group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barStackedPer3d, iconCls: 'column-3d-pstack'},
{ group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barNormal3dPerspective, iconCls: 'column-3d-normal-per'},
{ group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.lineNormal, iconCls: 'line-normal'},
{ group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.lineStacked, iconCls: 'line-stack'},
{ group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.lineStackedPer, iconCls: 'line-pstack'},
{ group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.line3d, iconCls: 'line-3d'},
{ group: 'menu-chart-group-pie', type: Asc.c_oAscChartTypeSettings.pie, iconCls: 'pie-normal'},
{ group: 'menu-chart-group-pie', type: Asc.c_oAscChartTypeSettings.doughnut, iconCls: 'pie-doughnut'},
{ group: 'menu-chart-group-pie', type: Asc.c_oAscChartTypeSettings.pie3d, iconCls: 'pie-3d-normal'},
{ group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarNormal, iconCls: 'bar-normal'},
{ group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarStacked, iconCls: 'bar-stack'},
{ group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarStackedPer, iconCls: 'bar-pstack'},
{ group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarNormal3d, iconCls: 'bar-3d-normal'},
{ group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarStacked3d, iconCls: 'bar-3d-stack'},
{ group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarStackedPer3d, iconCls: 'bar-3d-pstack'},
{ group: 'menu-chart-group-area', type: Asc.c_oAscChartTypeSettings.areaNormal, iconCls: 'area-normal'},
{ group: 'menu-chart-group-area', type: Asc.c_oAscChartTypeSettings.areaStacked, iconCls: 'area-stack'},
{ group: 'menu-chart-group-area', type: Asc.c_oAscChartTypeSettings.areaStackedPer, iconCls: 'area-pstack'},
{ group: 'menu-chart-group-scatter', type: Asc.c_oAscChartTypeSettings.scatter, iconCls: 'point-normal'},
{ group: 'menu-chart-group-stock', type: Asc.c_oAscChartTypeSettings.stock, iconCls: 'stock-normal'}
]),
itemTemplate: _.template('<div id="<%= id %>" class="item-chartlist <%= iconCls %>"></div>')
});
});
this.btnChartType.render($('#chart-button-type'));
this.mnuChartTypePicker.on('item:click', _.bind(this.onSelectType, this, this.btnChartType));
this.lockedControls.push(this.btnChartType);
this.btnChartStyle = new Common.UI.Button({
cls : 'btn-large-dataview',
iconCls : 'item-wrap',
menu : new Common.UI.Menu({
menuAlign: 'tr-br',
items: [
{ template: _.template('<div id="id-chart-menu-style" style="width: 245px; margin: 0 5px;"></div>') }
]
})
});
this.btnChartStyle.on('render:after', function(btn) {
me.mnuChartStylePicker = new Common.UI.DataView({
el: $('#id-chart-menu-style'),
style: 'max-height: 411px;',
parentMenu: btn.menu,
store: new Common.UI.DataViewStore(),
itemTemplate: _.template('<div id="<%= id %>" class="item-wrap" style="background-image: url(<%= imageUrl %>); background-position: 0 0;"></div>')
});
if (me.btnChartStyle.menu) {
me.btnChartStyle.menu.on('show:after', function () {
me.mnuChartStylePicker.scroller.update({alwaysVisibleY: true});
});
}
});
this.btnChartStyle.render($('#chart-button-style'));
this.mnuChartStylePicker.on('item:click', _.bind(this.onSelectStyle, this, this.btnChartStyle));
this.lockedControls.push(this.btnChartStyle);
this.labelWidth = $(this.el).find('#chart-label-width'); this.labelWidth = $(this.el).find('#chart-label-width');
this.labelHeight = $(this.el).find('#chart-label-height'); this.labelHeight = $(this.el).find('#chart-label-height');
this.btnEditData = new Common.UI.Button({
el: $('#chart-button-edit-data')
});
this.lockedControls.push(this.btnEditData);
this.btnEditData.on('click', _.bind(this.setEditData, this));
$(this.el).on('click', '#chart-advanced-link', _.bind(this.openAdvancedSettings, this));
}, },
render: function () { render: function () {
@ -219,8 +93,6 @@ define([
el.html(this.template({ el.html(this.template({
scope: this scope: this
})); }));
this.linkAdvanced = $('#chart-advanced-link');
}, },
setApi: function(api) { setApi: function(api) {
@ -331,11 +203,114 @@ define([
this.labelHeight[0].innerHTML = this.textHeight + ': ' + value.toFixed(1) + ' ' + Common.Utils.Metric.getCurrentMetricName(); this.labelHeight[0].innerHTML = this.textHeight + ': ' + value.toFixed(1) + ' ' + Common.Utils.Metric.getCurrentMetricName();
}, },
createDelayedControls: function() {
var me = this,
viewData = [
{ offsetx: 0, data: Asc.c_oAscWrapStyle2.Inline, iconCls:'wrap-inline', tip: this.txtInline, selected: true },
{ offsetx: 50, data: Asc.c_oAscWrapStyle2.Square, iconCls:'wrap-square', tip: this.txtSquare },
{ offsetx: 100, data: Asc.c_oAscWrapStyle2.Tight, iconCls:'wrap-tight', tip: this.txtTight },
{ offsetx: 150, data: Asc.c_oAscWrapStyle2.Through, iconCls:'wrap-through', tip: this.txtThrough },
{ offsetx: 200, data: Asc.c_oAscWrapStyle2.TopAndBottom, iconCls:'wrap-topAndBottom', tip: this.txtTopAndBottom },
{ offsetx: 250, data: Asc.c_oAscWrapStyle2.InFront, iconCls:'wrap-inFront', tip: this.txtInFront },
{ offsetx: 300, data: Asc.c_oAscWrapStyle2.Behind, iconCls:'wrap-behind', tip: this.txtBehind }
];
this.btnWrapType = new Common.UI.Button({
cls : 'btn-large-dataview',
iconCls : 'item-wrap wrap-inline',
menu : new Common.UI.Menu({
items: [
{ template: _.template('<div id="id-chart-menu-wrap" style="width: 235px; margin: 0 5px;"></div>') }
]
})
});
this.btnWrapType.on('render:after', function(btn) {
me.mnuWrapPicker = new Common.UI.DataView({
el: $('#id-chart-menu-wrap'),
parentMenu: btn.menu,
store: new Common.UI.DataViewStore(viewData),
itemTemplate: _.template('<div id="<%= id %>" class="item-wrap" style="background-position: -<%= offsetx %>px 0;"></div>')
});
});
this.btnWrapType.render($('#chart-button-wrap'));
this.mnuWrapPicker.on('item:click', _.bind(this.onSelectWrap, this, this.btnWrapType));
this.lockedControls.push(this.btnWrapType);
this.btnChartType = new Common.UI.Button({
cls : 'btn-large-dataview',
iconCls : 'item-chartlist bar-normal',
menu : new Common.UI.Menu({
style: 'width: 560px;',
items: [
{ template: _.template('<div id="id-chart-menu-type" class="menu-insertchart" style="margin: 5px 5px 5px 10px;"></div>') }
]
})
});
this.btnChartType.on('render:after', function(btn) {
me.mnuChartTypePicker = new Common.UI.DataView({
el: $('#id-chart-menu-type'),
parentMenu: btn.menu,
restoreHeight: 411,
groups: new Common.UI.DataViewGroupStore([
{ id: 'menu-chart-group-bar', caption: me.textColumn },
{ id: 'menu-chart-group-line', caption: me.textLine },
{ id: 'menu-chart-group-pie', caption: me.textPie },
{ id: 'menu-chart-group-hbar', caption: me.textBar },
{ id: 'menu-chart-group-area', caption: me.textArea },
{ id: 'menu-chart-group-scatter', caption: me.textPoint },
{ id: 'menu-chart-group-stock', caption: me.textStock }
]),
store: new Common.UI.DataViewStore([
{ group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barNormal, iconCls: 'column-normal', selected: true},
{ group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barStacked, iconCls: 'column-stack'},
{ group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barStackedPer, iconCls: 'column-pstack'},
{ group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barNormal3d, iconCls: 'column-3d-normal'},
{ group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barStacked3d, iconCls: 'column-3d-stack'},
{ group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barStackedPer3d, iconCls: 'column-3d-pstack'},
{ group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barNormal3dPerspective, iconCls: 'column-3d-normal-per'},
{ group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.lineNormal, iconCls: 'line-normal'},
{ group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.lineStacked, iconCls: 'line-stack'},
{ group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.lineStackedPer, iconCls: 'line-pstack'},
{ group: 'menu-chart-group-line', type: Asc.c_oAscChartTypeSettings.line3d, iconCls: 'line-3d'},
{ group: 'menu-chart-group-pie', type: Asc.c_oAscChartTypeSettings.pie, iconCls: 'pie-normal'},
{ group: 'menu-chart-group-pie', type: Asc.c_oAscChartTypeSettings.doughnut, iconCls: 'pie-doughnut'},
{ group: 'menu-chart-group-pie', type: Asc.c_oAscChartTypeSettings.pie3d, iconCls: 'pie-3d-normal'},
{ group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarNormal, iconCls: 'bar-normal'},
{ group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarStacked, iconCls: 'bar-stack'},
{ group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarStackedPer, iconCls: 'bar-pstack'},
{ group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarNormal3d, iconCls: 'bar-3d-normal'},
{ group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarStacked3d, iconCls: 'bar-3d-stack'},
{ group: 'menu-chart-group-hbar', type: Asc.c_oAscChartTypeSettings.hBarStackedPer3d, iconCls: 'bar-3d-pstack'},
{ group: 'menu-chart-group-area', type: Asc.c_oAscChartTypeSettings.areaNormal, iconCls: 'area-normal'},
{ group: 'menu-chart-group-area', type: Asc.c_oAscChartTypeSettings.areaStacked, iconCls: 'area-stack'},
{ group: 'menu-chart-group-area', type: Asc.c_oAscChartTypeSettings.areaStackedPer, iconCls: 'area-pstack'},
{ group: 'menu-chart-group-scatter', type: Asc.c_oAscChartTypeSettings.scatter, iconCls: 'point-normal'},
{ group: 'menu-chart-group-stock', type: Asc.c_oAscChartTypeSettings.stock, iconCls: 'stock-normal'}
]),
itemTemplate: _.template('<div id="<%= id %>" class="item-chartlist <%= iconCls %>"></div>')
});
});
this.btnChartType.render($('#chart-button-type'));
this.mnuChartTypePicker.on('item:click', _.bind(this.onSelectType, this, this.btnChartType));
this.lockedControls.push(this.btnChartType);
this.btnEditData = new Common.UI.Button({
el: $('#chart-button-edit-data')
});
this.lockedControls.push(this.btnEditData);
this.btnEditData.on('click', _.bind(this.setEditData, this));
this.linkAdvanced = $('#chart-advanced-link');
$(this.el).on('click', '#chart-advanced-link', _.bind(this.openAdvancedSettings, this));
},
createDelayedElements: function() { createDelayedElements: function() {
this.createDelayedControls();
this.updateMetricUnit(); this.updateMetricUnit();
}, },
_ChartWrapStyleChanged: function(style) { _ChartWrapStyleChanged: function(style) {
if (!this.mnuWrapPicker) return;
if (this._state.WrappingStyle!==style) { if (this._state.WrappingStyle!==style) {
this._noApply = true; this._noApply = true;
var record = this.mnuWrapPicker.store.findWhere({data: style}); var record = this.mnuWrapPicker.store.findWhere({data: style});
@ -507,6 +482,36 @@ define([
updateChartStyles: function(styles) { updateChartStyles: function(styles) {
var me = this; var me = this;
if (!this.btnChartStyle) {
this.btnChartStyle = new Common.UI.Button({
cls : 'btn-large-dataview',
iconCls : 'item-wrap',
menu : new Common.UI.Menu({
menuAlign: 'tr-br',
items: [
{ template: _.template('<div id="id-chart-menu-style" style="width: 245px; margin: 0 5px;"></div>') }
]
})
});
this.btnChartStyle.render($('#chart-button-style'));
this.lockedControls.push(this.btnChartStyle);
this.mnuChartStylePicker = new Common.UI.DataView({
el: $('#id-chart-menu-style'),
style: 'max-height: 411px;',
parentMenu: this.btnChartStyle.menu,
store: new Common.UI.DataViewStore(),
itemTemplate: _.template('<div id="<%= id %>" class="item-wrap" style="background-image: url(<%= imageUrl %>); background-position: 0 0;"></div>')
});
if (this.btnChartStyle.menu) {
this.btnChartStyle.menu.on('show:after', function () {
me.mnuChartStylePicker.scroller.update({alwaysVisibleY: true});
});
}
this.mnuChartStylePicker.on('item:click', _.bind(this.onSelectStyle, this, this.btnChartStyle));
}
if (styles && styles.length>0){ if (styles && styles.length>0){
var stylesStore = this.mnuChartStylePicker.store; var stylesStore = this.mnuChartStylePicker.store;
if (stylesStore) { if (stylesStore) {
@ -542,6 +547,8 @@ define([
}, },
disableControls: function(disable) { disableControls: function(disable) {
if (this._initSettings) return;
if (this._state.DisabledControls!==disable) { if (this._state.DisabledControls!==disable) {
this._state.DisabledControls = disable; this._state.DisabledControls = disable;
_.each(this.lockedControls, function(item) { _.each(this.lockedControls, function(item) {
@ -570,7 +577,7 @@ define([
textBar: 'Bar Chart', textBar: 'Bar Chart',
textArea: 'Area Chart', textArea: 'Area Chart',
textPie: 'Pie Chart', textPie: 'Pie Chart',
textPoint: 'Point Chart', textPoint: 'XY (Scatter) Chart',
textStock: 'Stock Chart', textStock: 'Stock Chart',
textStyle: 'Style' textStyle: 'Style'

View file

@ -110,9 +110,6 @@ define([
menu.alignPosition(); menu.alignPosition();
} }
_.delay(function() { _.delay(function() {
var value = Common.localStorage.getItem("de-settings-inputmode"); // only for hieroglyphs mode
if (value!==null && parseInt(value) == 1)
me.api.asc_enableKeyEvents(false);
menu.cmpEl.focus(); menu.cmpEl.focus();
}, 10); }, 10);
@ -1616,7 +1613,6 @@ define([
addComment: function(item, e, eOpt){ addComment: function(item, e, eOpt){
if (this.api && this.mode.canCoAuthoring && this.mode.isEdit && this.mode.canComments) { if (this.api && this.mode.canCoAuthoring && this.mode.isEdit && this.mode.canComments) {
this.suppressEditComplete = true; this.suppressEditComplete = true;
this.api.asc_enableKeyEvents(false);
var controller = DE.getController('Common.Controllers.Comments'); var controller = DE.getController('Common.Controllers.Comments');
if (controller) { if (controller) {
@ -1667,26 +1663,20 @@ define([
onCutCopyPaste: function(item, e) { onCutCopyPaste: function(item, e) {
var me = this; var me = this;
if (me.api) { if (me.api) {
if (typeof window['AscDesktopEditor'] === 'object') { var res = (item.value == 'cut') ? me.api.Cut() : ((item.value == 'copy') ? me.api.Copy() : me.api.Paste());
(item.value == 'cut') ? me.api.Cut() : ((item.value == 'copy') ? me.api.Copy() : me.api.Paste()); if (!res) {
} else {
var value = Common.localStorage.getItem("de-hide-copywarning"); var value = Common.localStorage.getItem("de-hide-copywarning");
if (!(value && parseInt(value) == 1)) { if (!(value && parseInt(value) == 1)) {
(new Common.Views.CopyWarningDialog({ (new Common.Views.CopyWarningDialog({
handler: function(dontshow) { handler: function(dontshow) {
(item.value == 'cut') ? me.api.Cut() : ((item.value == 'copy') ? me.api.Copy() : me.api.Paste());
if (dontshow) Common.localStorage.setItem("de-hide-copywarning", 1); if (dontshow) Common.localStorage.setItem("de-hide-copywarning", 1);
me.fireEvent('editcomplete', me); me.fireEvent('editcomplete', me);
} }
})).show(); })).show();
} else { }
(item.value == 'cut') ? me.api.Cut() : ((item.value == 'copy') ? me.api.Copy() : me.api.Paste()); }
}
me.fireEvent('editcomplete', me); me.fireEvent('editcomplete', me);
}
}
} else {
me.fireEvent('editcomplete', me);
}
}, },
createDelayedElements: function() { createDelayedElements: function() {

View file

@ -171,26 +171,7 @@ define([
this.btnBorderColor.on('render:after', function(btn) { this.btnBorderColor.on('render:after', function(btn) {
me.colorsBorder = new Common.UI.ThemeColorPalette({ me.colorsBorder = new Common.UI.ThemeColorPalette({
el: $('#drop-advanced-border-color-menu'), el: $('#drop-advanced-border-color-menu')
dynamiccolors: 10,
colors: [
me.textThemeColors, '-', {color: '3366FF', effectId: 1}, {color: '0000FF', effectId: 2}, {color: '000090', effectId: 3}, {color: '660066', effectId: 4}, {color: '800000', effectId: 5},
{color: 'FF0000', effectId: 1}, {color: 'FF6600', effectId: 1}, {color: 'FFFF00', effectId: 2}, {color: 'CCFFCC', effectId: 3}, {color: '008000', effectId: 4},
'-',
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2}, {color: '000000', effectId: 3}, {color: 'FFFFFF', effectId: 4}, {color: '000000', effectId: 5},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
'-', '--', '-', me.textStandartColors, '-',
'3D55FE', '5301B3', '980ABD', 'B2275F', 'F83D26', 'F86A1D', 'F7AC16', 'F7CA12', 'FAFF44', 'D6EF39',
'-', '--'
]
}) })
.on('select', _.bind(function(picker, color) { .on('select', _.bind(function(picker, color) {
me.btnBorderColor.setColor(color); me.btnBorderColor.setColor(color);
@ -216,25 +197,7 @@ define([
this.btnBackColor.on('render:after', function(btn) { this.btnBackColor.on('render:after', function(btn) {
me.colorsBack = new Common.UI.ThemeColorPalette({ me.colorsBack = new Common.UI.ThemeColorPalette({
el: $('#drop-advanced-back-color-menu'), el: $('#drop-advanced-back-color-menu'),
dynamiccolors: 10, transparent: true
colors: [
me.textThemeColors, '-', {color: '3366FF', effectId: 1}, {color: '0000FF', effectId: 2}, {color: '000090', effectId: 3}, {color: '660066', effectId: 4}, {color: '800000', effectId: 5},
{color: 'FF0000', effectId: 1}, {color: 'FF6600', effectId: 1}, {color: 'FFFF00', effectId: 2}, {color: 'CCFFCC', effectId: 3}, {color: '008000', effectId: 4},
'-',
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2}, {color: '000000', effectId: 3}, {color: 'FFFFFF', effectId: 4}, {color: '000000', effectId: 5},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
'-', '--', '-', me.textStandartColors, '-', 'transparent',
'5301B3', '980ABD', 'B2275F', 'F83D26', 'F86A1D', 'F7AC16', 'F7CA12', 'FAFF44', 'D6EF39',
'-', '--'
]
}) })
.on('select', _.bind(function(picker, color) { .on('select', _.bind(function(picker, color) {
var clr, border; var clr, border;
@ -1199,8 +1162,6 @@ define([
txtNoBorders: 'No borders', txtNoBorders: 'No borders',
textNewColor: 'Add New Custom Color', textNewColor: 'Add New Custom Color',
textPosition: 'Position', textPosition: 'Position',
textThemeColors : 'Theme Colors',
textStandartColors : 'Standart Colors',
textAlign: 'Alignment', textAlign: 'Alignment',
textTop: 'Top', textTop: 'Top',
textLeft: 'Left', textLeft: 'Left',

View file

@ -110,10 +110,6 @@ define([
template: _.template([ template: _.template([
'<table><tbody>', '<table><tbody>',
'<tr class="edit">',
'<td class="left"><label><%= scope.txtInput %></label></td>',
'<td class="right"><div id="fms-chb-input-mode"/></td>',
'</tr>','<tr class="divider edit"></tr>',
/** coauthoring begin **/ /** coauthoring begin **/
'<tr class="coauth">', '<tr class="coauth">',
'<td class="left"><label><%= scope.txtLiveComment %></label></td>', '<td class="left"><label><%= scope.txtLiveComment %></label></td>',
@ -124,6 +120,10 @@ define([
'<td class="left"><label><%= scope.txtSpellCheck %></label></td>', '<td class="left"><label><%= scope.txtSpellCheck %></label></td>',
'<td class="right"><div id="fms-chb-spell-check"/></td>', '<td class="right"><div id="fms-chb-spell-check"/></td>',
'</tr>','<tr class="divider edit"></tr>', '</tr>','<tr class="divider edit"></tr>',
'<tr class="edit">',
'<td class="left"><label><%= scope.txtInput %></label></td>',
'<td class="right"><div id="fms-chb-input-mode"/></td>',
'</tr>','<tr class="divider edit"></tr>',
'<tr>', '<tr>',
'<td class="left"><label><%= scope.textAlignGuides %></label></td>', '<td class="left"><label><%= scope.textAlignGuides %></label></td>',
'<td class="right"><span id="fms-chb-align-guides" /></td>', '<td class="right"><span id="fms-chb-align-guides" /></td>',
@ -312,7 +312,7 @@ define([
} }
/** coauthoring begin **/ /** coauthoring begin **/
$('tr.coauth', this.el)[mode.isEdit && mode.canCoAuthoring ? 'show' : 'hide'](); $('tr.coauth', this.el)[mode.isEdit && mode.canCoAuthoring ? 'show' : 'hide']();
$('tr.coauth.changes', this.el)[mode.isEdit && mode.canLicense && !mode.isOffline ? 'show' : 'hide'](); $('tr.coauth.changes', this.el)[mode.isEdit && mode.canLicense && !mode.isOffline && mode.canCoAuthoring ? 'show' : 'hide']();
/** coauthoring end **/ /** coauthoring end **/
}, },
@ -329,7 +329,7 @@ define([
this.chLiveComment.setValue(!(value!==null && parseInt(value) == 0)); this.chLiveComment.setValue(!(value!==null && parseInt(value) == 0));
value = Common.localStorage.getItem("de-settings-coauthmode"); value = Common.localStorage.getItem("de-settings-coauthmode");
var fast_coauth = (value===null || parseInt(value) == 1) && !(this.mode.isDesktopApp && this.mode.isOffline); var fast_coauth = (value===null || parseInt(value) == 1) && !(this.mode.isDesktopApp && this.mode.isOffline) && this.mode.canCoAuthoring;
item = this.cmbCoAuthMode.store.findWhere({value: parseInt(value)}); item = this.cmbCoAuthMode.store.findWhere({value: parseInt(value)});
this.cmbCoAuthMode.setValue(item ? item.get('value') : 1); this.cmbCoAuthMode.setValue(item ? item.get('value') : 1);
@ -352,7 +352,7 @@ define([
this._oldUnits = this.cmbUnit.getValue(); this._oldUnits = this.cmbUnit.getValue();
value = Common.localStorage.getItem("de-settings-autosave"); value = Common.localStorage.getItem("de-settings-autosave");
this.chAutosave.setValue(fast_coauth || (value===null || parseInt(value) == 1)); this.chAutosave.setValue(fast_coauth || (value===null ? this.mode.canCoAuthoring : parseInt(value) == 1));
value = Common.localStorage.getItem("de-settings-spellcheck"); value = Common.localStorage.getItem("de-settings-spellcheck");
this.chSpell.setValue(value===null || parseInt(value) == 1); this.chSpell.setValue(value===null || parseInt(value) == 1);
@ -366,7 +366,7 @@ define([
Common.localStorage.setItem("de-settings-zoom", this.cmbZoom.getValue()); Common.localStorage.setItem("de-settings-zoom", this.cmbZoom.getValue());
/** coauthoring begin **/ /** coauthoring begin **/
Common.localStorage.setItem("de-settings-livecomment", this.chLiveComment.isChecked() ? 1 : 0); Common.localStorage.setItem("de-settings-livecomment", this.chLiveComment.isChecked() ? 1 : 0);
if (this.mode.isEdit && this.mode.canLicense && !this.mode.isOffline) { if (this.mode.isEdit && this.mode.canLicense && !this.mode.isOffline && this.mode.canCoAuthoring) {
Common.localStorage.setItem("de-settings-coauthmode", this.cmbCoAuthMode.getValue()); Common.localStorage.setItem("de-settings-coauthmode", this.cmbCoAuthMode.getValue());
Common.localStorage.setItem(this.cmbCoAuthMode.getValue() ? "de-settings-showchanges-fast" : "de-settings-showchanges-strict", this.cmbShowChanges.getValue()); Common.localStorage.setItem(this.cmbCoAuthMode.getValue() ? "de-settings-showchanges-fast" : "de-settings-showchanges-strict", this.cmbShowChanges.getValue());
} }

View file

@ -64,7 +64,6 @@ define([
}, },
initialize: function () { initialize: function () {
var me = this;
this._initSettings = true; this._initSettings = true;
this._state = { this._state = {
@ -80,67 +79,6 @@ define([
this._locked = false; this._locked = false;
this.render(); this.render();
var _arrPosition = [
[c_pageNumPosition.PAGE_NUM_POSITION_TOP, c_pageNumPosition.PAGE_NUM_POSITION_LEFT, 'icon-right-panel btn-colontitul-tl', 'headerfooter-button-top-left', this.textTopLeft],
[c_pageNumPosition.PAGE_NUM_POSITION_TOP, c_pageNumPosition.PAGE_NUM_POSITION_CENTER, 'icon-right-panel btn-colontitul-tc', 'headerfooter-button-top-center', this.textTopCenter],
[c_pageNumPosition.PAGE_NUM_POSITION_TOP, c_pageNumPosition.PAGE_NUM_POSITION_RIGHT, 'icon-right-panel btn-colontitul-tr', 'headerfooter-button-top-right', this.textTopRight],
[c_pageNumPosition.PAGE_NUM_POSITION_BOTTOM, c_pageNumPosition.PAGE_NUM_POSITION_LEFT, 'icon-right-panel btn-colontitul-bl', 'headerfooter-button-bottom-left', this.textBottomLeft],
[c_pageNumPosition.PAGE_NUM_POSITION_BOTTOM, c_pageNumPosition.PAGE_NUM_POSITION_CENTER, 'icon-right-panel btn-colontitul-bc', 'headerfooter-button-bottom-center', this.textBottomCenter],
[c_pageNumPosition.PAGE_NUM_POSITION_BOTTOM, c_pageNumPosition.PAGE_NUM_POSITION_RIGHT, 'icon-right-panel btn-colontitul-br', 'headerfooter-button-bottom-right', this.textBottomRight]
];
this._btnsPosition = [];
_.each(_arrPosition, function(item, index, list){
var _btn = new Common.UI.Button({
cls: 'btn-options huge',
iconCls: item[2],
posWhere:item[0],
posAlign:item[1],
hint: item[4]
});
_btn.render( $('#'+item[3])) ;
_btn.on('click', _.bind(this.onBtnPositionClick, this));
this._btnsPosition.push( _btn );
this.lockedControls.push(_btn);
}, this);
this.numPosition = new Common.UI.MetricSpinner({
el: $('#headerfooter-spin-position'),
step: .1,
width: 85,
value: '1.25 cm',
defaultUnit : "cm",
maxValue: 55.88,
minValue: 0
});
this.spinners.push(this.numPosition);
this.lockedControls.push(this.numPosition);
this.lblPosition = $(this.el).find('#headerfooter-label-position');
this.chDiffFirst = new Common.UI.CheckBox({
el: $('#headerfooter-check-diff-first'),
labelText: this.textDiffFirst
});
this.lockedControls.push(this.chDiffFirst);
this.chDiffOdd = new Common.UI.CheckBox({
el: $('#headerfooter-check-diff-odd'),
labelText: this.textDiffOdd
});
this.lockedControls.push(this.chDiffOdd);
this.chSameAs = new Common.UI.CheckBox({
el: $('#headerfooter-check-same-as'),
labelText: this.textSameAs
});
this.lockedControls.push(this.chSameAs);
this.numPosition.on('change', _.bind(this.onNumPositionChange, this));
this.chDiffFirst.on('change', _.bind(this.onDiffFirstChange, this));
this.chDiffOdd.on('change', _.bind(this.onDiffOddChange, this));
this.chSameAs.on('change', _.bind(this.onSameAsChange, this));
}, },
render: function () { render: function () {
@ -240,7 +178,71 @@ define([
} }
}, },
createDelayedControls: function() {
var _arrPosition = [
[c_pageNumPosition.PAGE_NUM_POSITION_TOP, c_pageNumPosition.PAGE_NUM_POSITION_LEFT, 'icon-right-panel btn-colontitul-tl', 'headerfooter-button-top-left', this.textTopLeft],
[c_pageNumPosition.PAGE_NUM_POSITION_TOP, c_pageNumPosition.PAGE_NUM_POSITION_CENTER, 'icon-right-panel btn-colontitul-tc', 'headerfooter-button-top-center', this.textTopCenter],
[c_pageNumPosition.PAGE_NUM_POSITION_TOP, c_pageNumPosition.PAGE_NUM_POSITION_RIGHT, 'icon-right-panel btn-colontitul-tr', 'headerfooter-button-top-right', this.textTopRight],
[c_pageNumPosition.PAGE_NUM_POSITION_BOTTOM, c_pageNumPosition.PAGE_NUM_POSITION_LEFT, 'icon-right-panel btn-colontitul-bl', 'headerfooter-button-bottom-left', this.textBottomLeft],
[c_pageNumPosition.PAGE_NUM_POSITION_BOTTOM, c_pageNumPosition.PAGE_NUM_POSITION_CENTER, 'icon-right-panel btn-colontitul-bc', 'headerfooter-button-bottom-center', this.textBottomCenter],
[c_pageNumPosition.PAGE_NUM_POSITION_BOTTOM, c_pageNumPosition.PAGE_NUM_POSITION_RIGHT, 'icon-right-panel btn-colontitul-br', 'headerfooter-button-bottom-right', this.textBottomRight]
];
this._btnsPosition = [];
_.each(_arrPosition, function(item, index, list){
var _btn = new Common.UI.Button({
cls: 'btn-options huge',
iconCls: item[2],
posWhere:item[0],
posAlign:item[1],
hint: item[4]
});
_btn.render( $('#'+item[3])) ;
_btn.on('click', _.bind(this.onBtnPositionClick, this));
this._btnsPosition.push( _btn );
this.lockedControls.push(_btn);
}, this);
this.numPosition = new Common.UI.MetricSpinner({
el: $('#headerfooter-spin-position'),
step: .1,
width: 85,
value: '1.25 cm',
defaultUnit : "cm",
maxValue: 55.88,
minValue: 0
});
this.spinners.push(this.numPosition);
this.lockedControls.push(this.numPosition);
this.lblPosition = $(this.el).find('#headerfooter-label-position');
this.chDiffFirst = new Common.UI.CheckBox({
el: $('#headerfooter-check-diff-first'),
labelText: this.textDiffFirst
});
this.lockedControls.push(this.chDiffFirst);
this.chDiffOdd = new Common.UI.CheckBox({
el: $('#headerfooter-check-diff-odd'),
labelText: this.textDiffOdd
});
this.lockedControls.push(this.chDiffOdd);
this.chSameAs = new Common.UI.CheckBox({
el: $('#headerfooter-check-same-as'),
labelText: this.textSameAs
});
this.lockedControls.push(this.chSameAs);
this.numPosition.on('change', _.bind(this.onNumPositionChange, this));
this.chDiffFirst.on('change', _.bind(this.onDiffFirstChange, this));
this.chDiffOdd.on('change', _.bind(this.onDiffOddChange, this));
this.chSameAs.on('change', _.bind(this.onSameAsChange, this));
},
createDelayedElements: function() { createDelayedElements: function() {
this.createDelayedControls();
this.updateMetricUnit(); this.updateMetricUnit();
}, },
@ -249,6 +251,8 @@ define([
}, },
disableControls: function(disable) { disableControls: function(disable) {
if (this._initSettings) return;
if (this._state.DisabledControls!==disable) { if (this._state.DisabledControls!==disable) {
this._state.DisabledControls = disable; this._state.DisabledControls = disable;
_.each(this.lockedControls, function(item) { _.each(this.lockedControls, function(item) {

View file

@ -64,7 +64,6 @@ define([
}, },
initialize: function () { initialize: function () {
var me = this;
this._initSettings = true; this._initSettings = true;
this._state = { this._state = {
@ -84,7 +83,35 @@ define([
this.render(); this.render();
var viewData = [ this.labelWidth = $(this.el).find('#image-label-width');
this.labelHeight = $(this.el).find('#image-label-height');
},
render: function () {
var el = $(this.el);
el.html(this.template({
scope: this
}));
},
setApi: function(api) {
this.api = api;
if (this.api)
this.api.asc_registerCallback('asc_onImgWrapStyleChanged', _.bind(this._ImgWrapStyleChanged, this));
return this;
},
updateMetricUnit: function() {
var value = Common.Utils.Metric.fnRecalcFromMM(this._state.Width);
this.labelWidth[0].innerHTML = this.textWidth + ': ' + value.toFixed(1) + ' ' + Common.Utils.Metric.getCurrentMetricName();
value = Common.Utils.Metric.fnRecalcFromMM(this._state.Height);
this.labelHeight[0].innerHTML = this.textHeight + ': ' + value.toFixed(1) + ' ' + Common.Utils.Metric.getCurrentMetricName();
},
createDelayedControls: function() {
var me = this,
viewData = [
{ offsetx: 0, data: Asc.c_oAscWrapStyle2.Inline, iconcls:'wrap-inline', tip: this.txtInline, selected: true }, { offsetx: 0, data: Asc.c_oAscWrapStyle2.Inline, iconcls:'wrap-inline', tip: this.txtInline, selected: true },
{ offsetx: 50, data: Asc.c_oAscWrapStyle2.Square, iconcls:'wrap-square', tip: this.txtSquare }, { offsetx: 50, data: Asc.c_oAscWrapStyle2.Square, iconcls:'wrap-square', tip: this.txtSquare },
{ offsetx: 100, data: Asc.c_oAscWrapStyle2.Tight, iconcls:'wrap-tight', tip: this.txtTight }, { offsetx: 100, data: Asc.c_oAscWrapStyle2.Tight, iconcls:'wrap-tight', tip: this.txtTight },
@ -116,9 +143,6 @@ define([
this.mnuWrapPicker.on('item:click', _.bind(this.onSelectWrap, this, this.btnWrapType)); this.mnuWrapPicker.on('item:click', _.bind(this.onSelectWrap, this, this.btnWrapType));
this.lockedControls.push(this.btnWrapType); this.lockedControls.push(this.btnWrapType);
this.labelWidth = $(this.el).find('#image-label-width');
this.labelHeight = $(this.el).find('#image-label-height');
this.btnOriginalSize = new Common.UI.Button({ this.btnOriginalSize = new Common.UI.Button({
el: $('#image-button-original-size') el: $('#image-button-original-size')
}); });
@ -149,35 +173,14 @@ define([
if (this.api) this.api.asc_pluginRun(this._originalProps.asc_getPluginGuid(), 0, this._originalProps.asc_getPluginData()); if (this.api) this.api.asc_pluginRun(this._originalProps.asc_getPluginGuid(), 0, this._originalProps.asc_getPluginData());
this.fireEvent('editcomplete', this); this.fireEvent('editcomplete', this);
}, this)); }, this));
$(this.el).on('click', '#image-advanced-link', _.bind(this.openAdvancedSettings, this));
},
render: function () {
var el = $(this.el);
el.html(this.template({
scope: this
}));
this.linkAdvanced = $('#image-advanced-link'); this.linkAdvanced = $('#image-advanced-link');
this.lblReplace = $('#image-lbl-replace'); this.lblReplace = $('#image-lbl-replace');
}, $(this.el).on('click', '#image-advanced-link', _.bind(this.openAdvancedSettings, this));
setApi: function(api) {
this.api = api;
if (this.api)
this.api.asc_registerCallback('asc_onImgWrapStyleChanged', _.bind(this._ImgWrapStyleChanged, this));
return this;
},
updateMetricUnit: function() {
var value = Common.Utils.Metric.fnRecalcFromMM(this._state.Width);
this.labelWidth[0].innerHTML = this.textWidth + ': ' + value.toFixed(1) + ' ' + Common.Utils.Metric.getCurrentMetricName();
value = Common.Utils.Metric.fnRecalcFromMM(this._state.Height);
this.labelHeight[0].innerHTML = this.textHeight + ': ' + value.toFixed(1) + ' ' + Common.Utils.Metric.getCurrentMetricName();
}, },
createDelayedElements: function() { createDelayedElements: function() {
this.createDelayedControls();
this.updateMetricUnit(); this.updateMetricUnit();
}, },
@ -239,15 +242,16 @@ define([
if (this._state.isOleObject) { if (this._state.isOleObject) {
var plugin = DE.getCollection('Common.Collections.Plugins').findWhere({guid: pluginGuid}); var plugin = DE.getCollection('Common.Collections.Plugins').findWhere({guid: pluginGuid});
this.btnEditObject.setDisabled(plugin===null || plugin ===undefined); this.btnEditObject.setDisabled(plugin===null || plugin ===undefined || this._locked);
} else { } else {
this.btnInsertFromUrl.setDisabled(pluginGuid===null); this.btnInsertFromUrl.setDisabled(pluginGuid===null || this._locked);
this.btnInsertFromFile.setDisabled(pluginGuid===null); this.btnInsertFromFile.setDisabled(pluginGuid===null || this._locked);
} }
} }
}, },
_ImgWrapStyleChanged: function(style) { _ImgWrapStyleChanged: function(style) {
if (!this.mnuWrapPicker) return;
if (this._state.WrappingStyle!==style) { if (this._state.WrappingStyle!==style) {
this._noApply = true; this._noApply = true;
var record = this.mnuWrapPicker.store.findWhere({data: style}); var record = this.mnuWrapPicker.store.findWhere({data: style});
@ -387,6 +391,8 @@ define([
}, },
disableControls: function(disable) { disableControls: function(disable) {
if (this._initSettings) return;
if (this._state.DisabledControls!==disable) { if (this._state.DisabledControls!==disable) {
this._state.DisabledControls = disable; this._state.DisabledControls = disable;
_.each(this.lockedControls, function(item) { _.each(this.lockedControls, function(item) {

View file

@ -366,6 +366,6 @@ define([
tipSupport : 'Feedback & Support', tipSupport : 'Feedback & Support',
tipFile : 'File', tipFile : 'File',
tipSearch : 'Search', tipSearch : 'Search',
tipPlugins : 'Add-ons' tipPlugins : 'Plugins'
}, DE.Views.LeftMenu || {})); }, DE.Views.LeftMenu || {}));
}); });

View file

@ -72,7 +72,9 @@ define([
}, },
initialize: function () { initialize: function () {
var me = this; var me = this,
_set = DE.enumLockMM;
this._initSettings = true; this._initSettings = true;
this._state = { this._state = {
@ -88,18 +90,8 @@ define([
this.emailAddresses = undefined; this.emailAddresses = undefined;
this.mergeMailData = undefined; this.mergeMailData = undefined;
var _set = DE.enumLockMM;
this.render(); this.render();
this.btnEditData = new Common.UI.Button({
el: me.$el.find('#mmerge-button-edit-data'),
lock: [_set.preview, _set.lostConnect]
});
this.btnEditData.on('click', _.bind(this.onEditData, this));
this.lblAddRecipients = $('#mmerge-lbl-add-recipients');
this.btnInsField = new Common.UI.Button({ this.btnInsField = new Common.UI.Button({
cls: 'btn-text-menu-default', cls: 'btn-text-menu-default',
caption: this.textInsertField, caption: this.textInsertField,
@ -120,19 +112,6 @@ define([
}); });
this.btnInsField.render( $('#mmerge-btn-ins-field',me.$el)) ; this.btnInsField.render( $('#mmerge-btn-ins-field',me.$el)) ;
this.chHighlight = new Common.UI.Switcher({
el: me.$el.find('#mmerge-switcher-highlight'),
lock: [_set.noFields, _set.lostConnect]
});
this.chHighlight.on('change', _.bind(this.onCheckHighlightChange, this));
this.chPreview = new Common.UI.Switcher({
el: me.$el.find('#mmerge-switcher-preview'),
lock: [_set.noRecipients, _set.lostConnect]
});
this.chPreview.on('change', _.bind(this.onCheckPreviewChange, this));
this.emptyDBControls.push(this.chPreview);
this.txtFieldNum = new Common.UI.InputField({ this.txtFieldNum = new Common.UI.InputField({
el : $('#mmerge-field-num', me.$el), el : $('#mmerge-field-num', me.$el),
allowBlank : true, allowBlank : true,
@ -161,6 +140,52 @@ define([
} }
}); });
this.emptyDBControls.push(this.txtFieldNum); this.emptyDBControls.push(this.txtFieldNum);
},
render: function () {
this.$el.html(this.template({
scope: this
}));
},
setApi: function(api) {
this.api = api;
if (this.api) {
this.api.asc_registerCallback('asc_onPreviewMailMergeResult', _.bind(this.onPreviewMailMergeResult, this));
this.api.asc_registerCallback('asc_onEndPreviewMailMergeResult', _.bind(this.onEndPreviewMailMergeResult, this));
this.api.asc_registerCallback('asc_onStartMailMerge', _.bind(this.onStartMailMerge, this));
this.api.asc_registerCallback('asc_onSaveMailMerge', _.bind(this.onSaveMailMerge, this));
this.api.asc_registerCallback('asc_onEndAction', _.bind(this.onLongActionEnd, this));
Common.Gateway.on('setemailaddresses', _.bind(this.onSetEmailAddresses, this));
Common.Gateway.on('processmailmerge', _.bind(this.onProcessMailMerge, this));
}
return this;
},
createDelayedControls: function() {
var me = this,
_set = DE.enumLockMM;
this.btnEditData = new Common.UI.Button({
el: me.$el.find('#mmerge-button-edit-data'),
lock: [_set.preview, _set.lostConnect]
});
this.btnEditData.on('click', _.bind(this.onEditData, this));
this.lblAddRecipients = $('#mmerge-lbl-add-recipients');
this.chHighlight = new Common.UI.Switcher({
el: me.$el.find('#mmerge-switcher-highlight'),
lock: [_set.noFields, _set.lostConnect]
});
this.chHighlight.on('change', _.bind(this.onCheckHighlightChange, this));
this.chPreview = new Common.UI.Switcher({
el: me.$el.find('#mmerge-switcher-preview'),
lock: [_set.noRecipients, _set.lostConnect]
});
this.chPreview.on('change', _.bind(this.onCheckPreviewChange, this));
this.emptyDBControls.push(this.chPreview);
this.btnFirst = new Common.UI.Button({ this.btnFirst = new Common.UI.Button({
cls: 'btn-toolbar', cls: 'btn-toolbar',
@ -343,32 +368,26 @@ define([
}).on('click', _.bind(this.onMergeClick, this, false)); }).on('click', _.bind(this.onMergeClick, this, false));
this.emptyDBControls.push(this.btnMerge); this.emptyDBControls.push(this.btnMerge);
this.$el.on('click', '#mmerge-readmore-link', _.bind(this.openHelp, this));
},
render: function () {
this.$el.html(this.template({
scope: this
}));
this.linkReadMore = $('#mmerge-readmore-link', this.$el); this.linkReadMore = $('#mmerge-readmore-link', this.$el);
}, this.$el.on('click', '#mmerge-readmore-link', _.bind(this.openHelp, this));
setApi: function(api) { if (this.mode) {
this.api = api; if (!this.mode.mergeFolderUrl)
if (this.api) { this.btnPortal.setVisible(false);
this.api.asc_registerCallback('asc_onPreviewMailMergeResult', _.bind(this.onPreviewMailMergeResult, this)); if (!this.mode.canSendEmailAddresses) {
this.api.asc_registerCallback('asc_onEndPreviewMailMergeResult', _.bind(this.onEndPreviewMailMergeResult, this)); this._arrMergeSrc.pop();
this.api.asc_registerCallback('asc_onStartMailMerge', _.bind(this.onStartMailMerge, this)); this.cmbMergeTo.setData(this._arrMergeSrc);
this.api.asc_registerCallback('asc_onSaveMailMerge', _.bind(this.onSaveMailMerge, this)); this.cmbMergeTo.setValue(this._arrMergeSrc[0].value);
this.api.asc_registerCallback('asc_onEndAction', _.bind(this.onLongActionEnd, this)); }
Common.Gateway.on('setemailaddresses', _.bind(this.onSetEmailAddresses, this));
Common.Gateway.on('processmailmerge', _.bind(this.onProcessMailMerge, this));
} }
return this;
}, },
ChangeSettings: function(props) { ChangeSettings: function(props) {
if (this._initSettings) {
this.createDelayedControls();
this._initSettings = false;
}
this.disableInsertControls(this._locked); this.disableInsertControls(this._locked);
if (props) { if (props) {
@ -763,6 +782,8 @@ define([
}, },
disableControls: function(disable) { disableControls: function(disable) {
if (this._initSettings) return;
this.lockControls(DE.enumLockMM.lostConnect, disable, { this.lockControls(DE.enumLockMM.lostConnect, disable, {
array: _.union([this.btnEditData, this.btnInsField, this.chHighlight], (this.mode.mergeFolderUrl) ? [this.btnPortal] : []), array: _.union([this.btnEditData, this.btnInsField, this.chHighlight], (this.mode.mergeFolderUrl) ? [this.btnPortal] : []),
merge: true merge: true
@ -775,13 +796,6 @@ define([
setMode: function(mode) { setMode: function(mode) {
this.mode = mode; this.mode = mode;
if (!this.mode.mergeFolderUrl)
this.btnPortal.setVisible(false);
if (!this.mode.canSendEmailAddresses) {
this._arrMergeSrc.pop();
this.cmbMergeTo.setData(this._arrMergeSrc);
this.cmbMergeTo.setValue(this._arrMergeSrc[0].value);
}
}, },
disableEditing: function(disable) { disableEditing: function(disable) {
@ -807,7 +821,7 @@ define([
}, },
disablePreviewMode: function() { disablePreviewMode: function() {
if (this.api && this.chPreview.getValue()) { if (this.api && this.chPreview && this.chPreview.getValue()) {
this.api.asc_EndPreviewMailMergeResult(); this.api.asc_EndPreviewMailMergeResult();
} }
}, },

View file

@ -67,7 +67,6 @@ define([
}, },
initialize: function () { initialize: function () {
var me = this;
this._initSettings = true; this._initSettings = true;
this._state = { this._state = {
@ -157,40 +156,8 @@ define([
this.btnColor = new Common.UI.ColorButton({ this.btnColor = new Common.UI.ColorButton({
style: "width:45px;", style: "width:45px;",
disabled: this._locked, disabled: this._locked,
menu : new Common.UI.Menu({ menu : true
items: [
{ template: _.template('<div id="paragraph-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
{ template: _.template('<a id="paragraph-color-new" style="padding-left:12px;">' + me.textNewColor + '</a>') }
]
})
}); });
this.btnColor.on('render:after', function(btn) {
me.mnuColorPicker = new Common.UI.ThemeColorPalette({
el: $('#paragraph-color-menu'),
dynamiccolors: 10,
colors: [
me.textThemeColors, '-', {color: '3366FF', effectId: 1}, {color: '0000FF', effectId: 2}, {color: '000090', effectId: 3}, {color: '660066', effectId: 4}, {color: '800000', effectId: 5},
{color: 'FF0000', effectId: 1}, {color: 'FF6600', effectId: 1}, {color: 'FFFF00', effectId: 2}, {color: 'CCFFCC', effectId: 3}, {color: '008000', effectId: 4},
'-',
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2}, {color: '000000', effectId: 3}, {color: 'FFFFFF', effectId: 4}, {color: '000000', effectId: 5},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
'-', '--', '-', me.textStandartColors, '-', 'transparent',
'5301B3', '980ABD', 'B2275F', 'F83D26', 'F86A1D', 'F7AC16', 'F7CA12', 'FAFF44', 'D6EF39',
'-', '--'
]
});
me.mnuColorPicker.on('select', _.bind(me.onColorPickerSelect, me));
});
this.btnColor.render( $('#paragraph-color-btn')); this.btnColor.render( $('#paragraph-color-btn'));
this.lockedControls.push(this.btnColor); this.lockedControls.push(this.btnColor);
@ -428,6 +395,7 @@ define([
}, },
createDelayedElements: function() { createDelayedElements: function() {
this.UpdateThemeColors();
this.updateMetricUnit(); this.updateMetricUnit();
}, },
@ -474,7 +442,19 @@ define([
}, },
UpdateThemeColors: function() { UpdateThemeColors: function() {
if (this.mnuColorPicker) if (!this.mnuColorPicker) {
this.btnColor.setMenu( new Common.UI.Menu({
items: [
{ template: _.template('<div id="paragraph-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
{ template: _.template('<a id="paragraph-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
]
}));
this.mnuColorPicker = new Common.UI.ThemeColorPalette({
el: $('#paragraph-color-menu'),
transparent: true
});
this.mnuColorPicker.on('select', _.bind(this.onColorPickerSelect, this));
}
this.mnuColorPicker.updateColors(Common.Utils.ThemeColor.getEffectColors(), Common.Utils.ThemeColor.getStandartColors()); this.mnuColorPicker.updateColors(Common.Utils.ThemeColor.getEffectColors(), Common.Utils.ThemeColor.getStandartColors());
}, },
@ -514,8 +494,6 @@ define([
textAdvanced: 'Show advanced settings', textAdvanced: 'Show advanced settings',
textAt: 'At', textAt: 'At',
txtAutoText: 'Auto', txtAutoText: 'Auto',
textThemeColors: 'Theme Colors',
textStandartColors: 'Standart Colors',
textBackColor: 'Background color', textBackColor: 'Background color',
textNewColor: 'Add New Custom Color' textNewColor: 'Add New Custom Color'
}, DE.Views.ParagraphSettings || {})); }, DE.Views.ParagraphSettings || {}));

View file

@ -220,26 +220,7 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem
this.btnBorderColor.on('render:after', function(btn) { this.btnBorderColor.on('render:after', function(btn) {
me.colorsBorder = new Common.UI.ThemeColorPalette({ me.colorsBorder = new Common.UI.ThemeColorPalette({
el: $('#paragraphadv-border-color-menu'), el: $('#paragraphadv-border-color-menu')
dynamiccolors: 10,
colors: [
me.textThemeColors, '-', {color: '3366FF', effectId: 1}, {color: '0000FF', effectId: 2}, {color: '000090', effectId: 3}, {color: '660066', effectId: 4}, {color: '800000', effectId: 5},
{color: 'FF0000', effectId: 1}, {color: 'FF6600', effectId: 1}, {color: 'FFFF00', effectId: 2}, {color: 'CCFFCC', effectId: 3}, {color: '008000', effectId: 4},
'-',
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2}, {color: '000000', effectId: 3}, {color: 'FFFFFF', effectId: 4}, {color: '000000', effectId: 5},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
'-', '--', '-', me.textStandartColors, '-',
'3D55FE', '5301B3', '980ABD', 'B2275F', 'F83D26', 'F86A1D', 'F7AC16', 'F7CA12', 'FAFF44', 'D6EF39',
'-', '--'
]
}); });
me.colorsBorder.on('select', _.bind(me.onColorsBorderSelect, me)); me.colorsBorder.on('select', _.bind(me.onColorsBorderSelect, me));
}); });
@ -294,25 +275,7 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem
this.btnBackColor.on('render:after', function(btn) { this.btnBackColor.on('render:after', function(btn) {
me.colorsBack = new Common.UI.ThemeColorPalette({ me.colorsBack = new Common.UI.ThemeColorPalette({
el: $('#paragraphadv-back-color-menu'), el: $('#paragraphadv-back-color-menu'),
dynamiccolors: 10, transparent: true
colors: [
me.textThemeColors, '-', {color: '3366FF', effectId: 1}, {color: '0000FF', effectId: 2}, {color: '000090', effectId: 3}, {color: '660066', effectId: 4}, {color: '800000', effectId: 5},
{color: 'FF0000', effectId: 1}, {color: 'FF6600', effectId: 1}, {color: 'FFFF00', effectId: 2}, {color: 'CCFFCC', effectId: 3}, {color: '008000', effectId: 4},
'-',
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2}, {color: '000000', effectId: 3}, {color: 'FFFFFF', effectId: 4}, {color: '000000', effectId: 5},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
'-', '--', '-', me.textStandartColors, '-', 'transparent',
'5301B3', '980ABD', 'B2275F', 'F83D26', 'F86A1D', 'F7AC16', 'F7CA12', 'FAFF44', 'D6EF39',
'-', '--'
]
}); });
me.colorsBack.on('select', _.bind(me.onColorsBackSelect, me)); me.colorsBack.on('select', _.bind(me.onColorsBackSelect, me));
}); });
@ -1179,8 +1142,6 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem
strSubscript: 'Subscript', strSubscript: 'Subscript',
strSmallCaps: 'Small caps', strSmallCaps: 'Small caps',
strAllCaps: 'All caps', strAllCaps: 'All caps',
textThemeColors : 'Theme Colors',
textStandartColors : 'Standart Colors',
strOrphan: 'Orphan control', strOrphan: 'Orphan control',
strKeepNext: 'Keep with next', strKeepNext: 'Keep with next',
strTabs: 'Tab', strTabs: 'Tab',

View file

@ -71,7 +71,7 @@ define([
}, },
initialize: function () { initialize: function () {
var me = this;
this._initSettings = true; this._initSettings = true;
this._originalProps = null; this._originalProps = null;
this._noApply = true; this._noApply = true;
@ -89,6 +89,7 @@ define([
StrokeType: Asc.c_oAscStrokeType.STROKE_COLOR, StrokeType: Asc.c_oAscStrokeType.STROKE_COLOR,
StrokeWidth: this._pt2mm(1), StrokeWidth: this._pt2mm(1),
StrokeColor: '000000', StrokeColor: '000000',
StrokeBorderType: Asc.c_oDashType.solid,
FGColor: '000000', FGColor: '000000',
BGColor: 'ffffff', BGColor: 'ffffff',
GradColor: '000000', GradColor: '000000',
@ -117,6 +118,7 @@ define([
this.BorderColor = {Value: 1, Color: 'transparent'}; // value=1 - цвет определен - прозрачный или другой, value=0 - цвет не определен, рисуем прозрачным this.BorderColor = {Value: 1, Color: 'transparent'}; // value=1 - цвет определен - прозрачный или другой, value=0 - цвет не определен, рисуем прозрачным
this.BorderSize = 0; this.BorderSize = 0;
this.BorderType = Asc.c_oDashType.solid;
this.textureNames = [this.txtCanvas, this.txtCarton, this.txtDarkFabric, this.txtGrain, this.txtGranite, this.txtGreyPaper, this.textureNames = [this.txtCanvas, this.txtCarton, this.txtDarkFabric, this.txtGrain, this.txtGranite, this.txtGreyPaper,
this.txtKnit, this.txtLeather, this.txtBrownPaper, this.txtPapyrus, this.txtWood]; this.txtKnit, this.txtLeather, this.txtBrownPaper, this.txtPapyrus, this.txtWood];
@ -125,466 +127,6 @@ define([
this.render(); this.render();
this._arrFillSrc = [
{displayValue: this.textColor, value: Asc.c_oAscFill.FILL_TYPE_SOLID},
{displayValue: this.textGradientFill, value: Asc.c_oAscFill.FILL_TYPE_GRAD},
{displayValue: this.textImageTexture, value: Asc.c_oAscFill.FILL_TYPE_BLIP},
{displayValue: this.textPatternFill, value: Asc.c_oAscFill.FILL_TYPE_PATT},
{displayValue: this.textNoFill, value: Asc.c_oAscFill.FILL_TYPE_NOFILL}
];
this.cmbFillSrc = new Common.UI.ComboBox({
el: $('#shape-combo-fill-src'),
cls: 'input-group-nr',
style: 'width: 100%;',
menuStyle: 'min-width: 190px;',
editable: false,
data: this._arrFillSrc
});
this.cmbFillSrc.setValue(this._arrFillSrc[0].value);
this.cmbFillSrc.on('selected', _.bind(this.onFillSrcSelect, this));
this.fillControls.push(this.cmbFillSrc);
this.btnBackColor = new Common.UI.ColorButton({
style: "width:45px;",
menu : new Common.UI.Menu({
items: [
{ template: _.template('<div id="shape-back-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
{ template: _.template('<a id="shape-back-color-new" style="padding-left:12px;">' + me.textNewColor + '</a>') }
]
})
});
this.btnBackColor.on('render:after', function(btn) {
me.colorsBack = new Common.UI.ThemeColorPalette({
el: $('#shape-back-color-menu'),
dynamiccolors: 10,
value: 'transparent',
colors: [
me.textThemeColors, '-', {color: '3366FF', effectId: 1}, {color: '0000FF', effectId: 2}, {color: '000090', effectId: 3}, {color: '660066', effectId: 4}, {color: '800000', effectId: 5},
{color: 'FF0000', effectId: 1}, {color: 'FF6600', effectId: 1}, {color: 'FFFF00', effectId: 2}, {color: 'CCFFCC', effectId: 3}, {color: '008000', effectId: 4},
'-',
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2}, {color: '000000', effectId: 3}, {color: 'FFFFFF', effectId: 4}, {color: '000000', effectId: 5},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
'-', '--', '-', me.textStandartColors, '-', 'transparent',
'5301B3', '980ABD', 'B2275F', 'F83D26', 'F86A1D', 'F7AC16', 'F7CA12', 'FAFF44', 'D6EF39',
'-', '--'
]
});
me.colorsBack.on('select', _.bind(me.onColorsBackSelect, me));
});
this.btnBackColor.render( $('#shape-back-color-btn'));
this.btnBackColor.setColor('transparent');
$(this.el).on('click', '#shape-back-color-new', _.bind(this.addNewColor, this, this.colorsBack, this.btnBackColor));
this.fillControls.push(this.btnBackColor);
this.cmbPattern = new Common.UI.ComboDataView({
itemWidth: 28,
itemHeight: 28,
menuMaxHeight: 300,
enableKeyEvents: true,
cls: 'combo-pattern'
});
this.cmbPattern.menuPicker.itemTemplate = this.cmbPattern.fieldPicker.itemTemplate = _.template([
'<div class="style" id="<%= id %>">',
'<img src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" class="combo-pattern-item" ',
'width="' + this.cmbPattern.itemWidth + '" height="' + this.cmbPattern.itemHeight + '" ',
'style="background-position: -<%= offsetx %>px -<%= offsety %>px;"/>',
'</div>'
].join(''));
this.cmbPattern.render($('#shape-combo-pattern'));
this.cmbPattern.openButton.menu.cmpEl.css({
'min-width': 178,
'max-width': 178
});
this.cmbPattern.on('click', _.bind(this.onPatternSelect, this));
this.cmbPattern.openButton.menu.on('show:after', function () {
me.cmbPattern.menuPicker.scroller.update({alwaysVisibleY: true});
});
this.fillControls.push(this.cmbPattern);
this.btnFGColor = new Common.UI.ColorButton({
style: "width:45px;",
menu : new Common.UI.Menu({
items: [
{ template: _.template('<div id="shape-foreground-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
{ template: _.template('<a id="shape-foreground-color-new" style="padding-left:12px;">' + me.textNewColor + '</a>') }
]
})
});
this.btnFGColor.on('render:after', function(btn) {
me.colorsFG = new Common.UI.ThemeColorPalette({
el: $('#shape-foreground-color-menu'),
dynamiccolors: 10,
value: '000000',
colors: [
me.textThemeColors, '-', {color: '3366FF', effectId: 1}, {color: '0000FF', effectId: 2}, {color: '000090', effectId: 3}, {color: '660066', effectId: 4}, {color: '800000', effectId: 5},
{color: 'FF0000', effectId: 1}, {color: 'FF6600', effectId: 1}, {color: 'FFFF00', effectId: 2}, {color: 'CCFFCC', effectId: 3}, {color: '008000', effectId: 4},
'-',
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2}, {color: '000000', effectId: 3}, {color: 'FFFFFF', effectId: 4}, {color: '000000', effectId: 5},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
'-', '--', '-', me.textStandartColors, '-',
'3D55FE', '5301B3', '980ABD', 'B2275F', 'F83D26', 'F86A1D', 'F7AC16', 'F7CA12', 'FAFF44', 'D6EF39',
'-', '--'
]
});
me.colorsFG.on('select', _.bind(me.onColorsFGSelect, me));
});
this.btnFGColor.render( $('#shape-foreground-color-btn'));
this.btnFGColor.setColor('000000');
$(this.el).on('click', '#shape-foreground-color-new', _.bind(this.addNewColor, this, this.colorsFG, this.btnFGColor));
this.fillControls.push(this.btnFGColor);
this.btnBGColor = new Common.UI.ColorButton({
style: "width:45px;",
menu : new Common.UI.Menu({
items: [
{ template: _.template('<div id="shape-background-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
{ template: _.template('<a id="shape-background-color-new" style="padding-left:12px;">' + me.textNewColor + '</a>') }
]
})
});
this.btnBGColor.on('render:after', function(btn) {
me.colorsBG = new Common.UI.ThemeColorPalette({
el: $('#shape-background-color-menu'),
dynamiccolors: 10,
value: 'ffffff',
colors: [
me.textThemeColors, '-', {color: '3366FF', effectId: 1}, {color: '0000FF', effectId: 2}, {color: '000090', effectId: 3}, {color: '660066', effectId: 4}, {color: '800000', effectId: 5},
{color: 'FF0000', effectId: 1}, {color: 'FF6600', effectId: 1}, {color: 'FFFF00', effectId: 2}, {color: 'CCFFCC', effectId: 3}, {color: '008000', effectId: 4},
'-',
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2}, {color: '000000', effectId: 3}, {color: 'FFFFFF', effectId: 4}, {color: '000000', effectId: 5},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
'-', '--', '-', me.textStandartColors, '-',
'3D55FE', '5301B3', '980ABD', 'B2275F', 'F83D26', 'F86A1D', 'F7AC16', 'F7CA12', 'FAFF44', 'D6EF39',
'-', '--'
]
});
me.colorsBG.on('select', _.bind(me.onColorsBGSelect, me));
});
this.btnBGColor.render( $('#shape-background-color-btn'));
this.btnBGColor.setColor('ffffff');
$(this.el).on('click', '#shape-background-color-new', _.bind(this.addNewColor, this, this.colorsBG, this.btnBGColor));
this.fillControls.push(this.btnBGColor);
this.btnInsertFromFile = new Common.UI.Button({
el: $('#shape-button-from-file')
});
this.fillControls.push(this.btnInsertFromFile);
this.btnInsertFromUrl = new Common.UI.Button({
el: $('#shape-button-from-url')
});
this.fillControls.push(this.btnInsertFromUrl);
this.btnInsertFromFile.on('click', _.bind(function(btn){
if (this.api) this.api.ChangeShapeImageFromFile();
this.fireEvent('editcomplete', this);
}, this));
this.btnInsertFromUrl.on('click', _.bind(this.insertFromUrl, this));
this._arrFillType = [
{displayValue: this.textStretch, value: Asc.c_oAscFillBlipType.STRETCH},
{displayValue: this.textTile, value: Asc.c_oAscFillBlipType.TILE}
];
this.cmbFillType = new Common.UI.ComboBox({
el: $('#shape-combo-fill-type'),
cls: 'input-group-nr',
menuStyle: 'min-width: 90px;',
editable: false,
data: this._arrFillType
});
this.cmbFillType.setValue(this._arrFillType[0].value);
this.cmbFillType.on('selected', _.bind(this.onFillTypeSelect, this));
this.fillControls.push(this.cmbFillType);
this.btnTexture = new Common.UI.ComboBox({
el: $('#shape-combo-fill-texture'),
template: _.template([
'<div class="input-group combobox combo-dataview-menu input-group-nr dropdown-toggle" tabindex="0" data-toggle="dropdown">',
'<div class="form-control text" style="width: 90px;">' + this.textSelectTexture + '</div>',
'<div style="display: table-cell;"></div>',
'<button type="button" class="btn btn-default"><span class="caret img-commonctrl"></span></button>',
'</div>'
].join(''))
});
this.textureMenu = new Common.UI.Menu({
items: [
{ template: _.template('<div id="id-shape-menu-texture" style="width: 233px; margin: 0 5px;"></div>') }
]
});
this.textureMenu.render($('#shape-combo-fill-texture'));
this.fillControls.push(this.btnTexture);
this.numTransparency = new Common.UI.MetricSpinner({
el: $('#shape-spin-transparency'),
step: 1,
width: 62,
value: '100 %',
defaultUnit : "%",
maxValue: 100,
minValue: 0
});
this.numTransparency.on('change', _.bind(this.onNumTransparencyChange, this));
this.fillControls.push(this.numTransparency);
this.sldrTransparency = new Common.UI.SingleSlider({
el: $('#shape-slider-transparency'),
width: 75,
minValue: 0,
maxValue: 100,
value: 100
});
this.sldrTransparency.on('change', _.bind(this.onTransparencyChange, this));
this.sldrTransparency.on('changecomplete', _.bind(this.onTransparencyChangeComplete, this));
this.fillControls.push(this.sldrTransparency);
this.lblTransparencyStart = $(this.el).find('#shape-lbl-transparency-start');
this.lblTransparencyEnd = $(this.el).find('#shape-lbl-transparency-end');
this._arrGradType = [
{displayValue: this.textLinear, value: Asc.c_oAscFillGradType.GRAD_LINEAR},
{displayValue: this.textRadial, value: Asc.c_oAscFillGradType.GRAD_PATH}
];
this.cmbGradType = new Common.UI.ComboBox({
el: $('#shape-combo-grad-type'),
cls: 'input-group-nr',
menuStyle: 'min-width: 90px;',
editable: false,
data: this._arrGradType
});
this.cmbGradType.setValue(this._arrGradType[0].value);
this.cmbGradType.on('selected', _.bind(this.onGradTypeSelect, this));
this.fillControls.push(this.cmbGradType);
this._viewDataLinear = [
{ offsetx: 0, offsety: 0, type:45, subtype:-1, iconcls:'gradient-left-top' },
{ offsetx: 50, offsety: 0, type:90, subtype:4, iconcls:'gradient-top'},
{ offsetx: 100, offsety: 0, type:135, subtype:5, iconcls:'gradient-right-top'},
{ offsetx: 0, offsety: 50, type:0, subtype:6, iconcls:'gradient-left', cls: 'item-gradient-separator', selected: true},
{ offsetx: 100, offsety: 50, type:180, subtype:1, iconcls:'gradient-right'},
{ offsetx: 0, offsety: 100, type:315, subtype:2, iconcls:'gradient-left-bottom'},
{ offsetx: 50, offsety: 100, type:270, subtype:3, iconcls:'gradient-bottom'},
{ offsetx: 100, offsety: 100, type:225, subtype:7, iconcls:'gradient-right-bottom'}
];
this._viewDataRadial = [
{ offsetx: 100, offsety: 150, type:2, subtype:5, iconcls:'gradient-radial-center'}
];
this.btnDirection = new Common.UI.Button({
cls : 'btn-large-dataview',
iconCls : 'item-gradient gradient-left',
menu : new Common.UI.Menu({
style: 'min-width: 60px;',
menuAlign: 'tr-br',
items: [
{ template: _.template('<div id="id-shape-menu-direction" style="width: 175px; margin: 0 5px;"></div>') }
]
})
});
this.btnDirection.on('render:after', function(btn) {
me.mnuDirectionPicker = new Common.UI.DataView({
el: $('#id-shape-menu-direction'),
parentMenu: btn.menu,
restoreHeight: 174,
allowScrollbar: false,
store: new Common.UI.DataViewStore(me._viewDataLinear),
itemTemplate: _.template('<div id="<%= id %>" class="item-gradient" style="background-position: -<%= offsetx %>px -<%= offsety %>px;"></div>')
});
});
this.btnDirection.render($('#shape-button-direction'));
this.mnuDirectionPicker.on('item:click', _.bind(this.onSelectGradient, this, this.btnDirection));
this.fillControls.push(this.btnDirection);
this.btnGradColor = new Common.UI.ColorButton({
style: "width:45px;",
menu : new Common.UI.Menu({
items: [
{ template: _.template('<div id="shape-gradient-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
{ template: _.template('<a id="shape-gradient-color-new" style="padding-left:12px;">' + me.textNewColor + '</a>') }
]
})
});
this.btnGradColor.on('render:after', function(btn) {
me.colorsGrad = new Common.UI.ThemeColorPalette({
el: $('#shape-gradient-color-menu'),
dynamiccolors: 10,
value: '000000',
colors: [
me.textThemeColors, '-', {color: '3366FF', effectId: 1}, {color: '0000FF', effectId: 2}, {color: '000090', effectId: 3}, {color: '660066', effectId: 4}, {color: '800000', effectId: 5},
{color: 'FF0000', effectId: 1}, {color: 'FF6600', effectId: 1}, {color: 'FFFF00', effectId: 2}, {color: 'CCFFCC', effectId: 3}, {color: '008000', effectId: 4},
'-',
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2}, {color: '000000', effectId: 3}, {color: 'FFFFFF', effectId: 4}, {color: '000000', effectId: 5},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
'-', '--', '-', me.textStandartColors, '-',
'3D55FE', '5301B3', '980ABD', 'B2275F', 'F83D26', 'F86A1D', 'F7AC16', 'F7CA12', 'FAFF44', 'D6EF39',
'-', '--'
]
});
me.colorsGrad.on('select', _.bind(me.onColorsGradientSelect, me));
});
this.btnGradColor.render( $('#shape-gradient-color-btn'));
this.btnGradColor.setColor('000000');
$(this.el).on('click', '#shape-gradient-color-new', _.bind(this.addNewColor, this, this.colorsGrad, this.btnGradColor));
this.fillControls.push(this.btnGradColor);
this.sldrGradient = new Common.UI.MultiSliderGradient({
el: $('#shape-slider-gradient'),
width: 125,
minValue: 0,
maxValue: 100,
values: [0, 100]
});
this.sldrGradient.on('change', _.bind(this.onGradientChange, this));
this.sldrGradient.on('changecomplete', _.bind(this.onGradientChangeComplete, this));
this.sldrGradient.on('thumbclick', function(cmp, index){
me.GradColor.currentIdx = index;
var color = me.GradColor.colors[me.GradColor.currentIdx];
me.btnGradColor.setColor(color);
me.colorsGrad.select(color,false);
});
this.sldrGradient.on('thumbdblclick', function(cmp){
me.btnGradColor.cmpEl.find('button').dropdown('toggle');
});
this.fillControls.push(this.sldrGradient);
this.cmbBorderSize = new Common.UI.ComboBorderSizeEditable({
el: $('#shape-combo-border-size'),
style: "width: 93px;",
txtNoBorders: this.txtNoBorders
})
.on('selected', _.bind(this.onBorderSizeSelect, this))
.on('changed:before',_.bind(this.onBorderSizeChanged, this, true))
.on('changed:after', _.bind(this.onBorderSizeChanged, this, false))
.on('combo:blur', _.bind(this.onComboBlur, this, false));
this.BorderSize = this.cmbBorderSize.store.at(2).get('value');
this.cmbBorderSize.setValue(this.BorderSize);
this.lockedControls.push(this.cmbBorderSize);
this.btnBorderColor = new Common.UI.ColorButton({
style: "width:45px;",
menu : new Common.UI.Menu({
items: [
{ template: _.template('<div id="shape-border-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
{ template: _.template('<a id="shape-border-color-new" style="padding-left:12px;">' + me.textNewColor + '</a>') }
]
})
});
this.lockedControls.push(this.btnBorderColor);
this.btnBorderColor.on('render:after', function(btn) {
me.colorsBorder = new Common.UI.ThemeColorPalette({
el: $('#shape-border-color-menu'),
dynamiccolors: 10,
value: '000000',
colors: [
me.textThemeColors, '-', {color: '3366FF', effectId: 1}, {color: '0000FF', effectId: 2}, {color: '000090', effectId: 3}, {color: '660066', effectId: 4}, {color: '800000', effectId: 5},
{color: 'FF0000', effectId: 1}, {color: 'FF6600', effectId: 1}, {color: 'FFFF00', effectId: 2}, {color: 'CCFFCC', effectId: 3}, {color: '008000', effectId: 4},
'-',
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2}, {color: '000000', effectId: 3}, {color: 'FFFFFF', effectId: 4}, {color: '000000', effectId: 5},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
'-', '--', '-', me.textStandartColors, '-',
'3D55FE', '5301B3', '980ABD', 'B2275F', 'F83D26', 'F86A1D', 'F7AC16', 'F7CA12', 'FAFF44', 'D6EF39',
'-', '--'
]
});
me.colorsBorder.on('select', _.bind(me.onColorsBorderSelect, me));
});
this.btnBorderColor.render( $('#shape-border-color-btn'));
this.btnBorderColor.setColor('000000');
$(this.el).on('click', '#shape-border-color-new', _.bind(this.addNewColor, this, this.colorsBorder, this.btnBorderColor));
var viewData = [
{ offsetx: 0, data: Asc.c_oAscWrapStyle2.Inline, iconcls:'wrap-inline', tip: this.txtInline, selected: true },
{ offsetx: 50, data: Asc.c_oAscWrapStyle2.Square, iconcls:'wrap-square', tip: this.txtSquare },
{ offsetx: 100, data: Asc.c_oAscWrapStyle2.Tight, iconcls:'wrap-tight', tip: this.txtTight },
{ offsetx: 150, data: Asc.c_oAscWrapStyle2.Through, iconcls:'wrap-through', tip: this.txtThrough },
{ offsetx: 200, data: Asc.c_oAscWrapStyle2.TopAndBottom, iconcls:'wrap-topAndBottom', tip: this.txtTopAndBottom },
{ offsetx: 250, data: Asc.c_oAscWrapStyle2.InFront, iconcls:'wrap-inFront', tip: this.txtInFront },
{ offsetx: 300, data: Asc.c_oAscWrapStyle2.Behind, iconcls:'wrap-behind', tip: this.txtBehind }
];
this.btnWrapType = new Common.UI.Button({
cls : 'btn-large-dataview',
iconCls : 'item-wrap wrap-inline',
menu : new Common.UI.Menu({
items: [
{ template: _.template('<div id="id-shape-menu-wrap" style="width: 235px; margin: 0 5px;"></div>') }
]
})
});
this.btnWrapType.on('render:after', function(btn) {
me.mnuWrapPicker = new Common.UI.DataView({
el: $('#id-shape-menu-wrap'),
parentMenu: btn.menu,
store: new Common.UI.DataViewStore(viewData),
itemTemplate: _.template('<div id="<%= id %>" class="item-wrap" style="background-position: -<%= offsetx %>px 0;"></div>')
});
});
this.btnWrapType.render($('#shape-button-wrap'));
this.mnuWrapPicker.on('item:click', _.bind(this.onSelectWrap, this, this.btnWrapType));
this.lockedControls.push(this.btnWrapType);
this.btnChangeShape = new Common.UI.Button({
cls: 'btn-icon-default',
iconCls: 'btn-change-shape',
menu : new Common.UI.Menu({
menuAlign: 'tr-br',
cls: 'menu-shapes',
items: []
})
});
this.btnChangeShape.render( $('#shape-btn-change')) ;
this.lockedControls.push(this.btnChangeShape);
$(this.el).on('click', '#shape-advanced-link', _.bind(this.openAdvancedSettings, this));
this.FillColorContainer = $('#shape-panel-color-fill'); this.FillColorContainer = $('#shape-panel-color-fill');
this.FillImageContainer = $('#shape-panel-image-fill'); this.FillImageContainer = $('#shape-panel-image-fill');
this.FillPatternContainer = $('#shape-panel-pattern-fill'); this.FillPatternContainer = $('#shape-panel-pattern-fill');
@ -599,8 +141,6 @@ define([
el.html(this.template({ el.html(this.template({
scope: this scope: this
})); }));
this.linkAdvanced = $('#shape-advanced-link');
}, },
setApi: function(api) { setApi: function(api) {
@ -1020,6 +560,7 @@ define([
stroke.put_color(Common.Utils.ThemeColor.getRgbColor({color: '000000', effectId: 29})); stroke.put_color(Common.Utils.ThemeColor.getRgbColor({color: '000000', effectId: 29}));
else if (this._state.StrokeType == Asc.c_oAscStrokeType.STROKE_NONE || this._state.StrokeType === null) else if (this._state.StrokeType == Asc.c_oAscStrokeType.STROKE_NONE || this._state.StrokeType === null)
stroke.put_color(Common.Utils.ThemeColor.getRgbColor(Common.Utils.ThemeColor.colorValue2EffectId(this.BorderColor.Color))); stroke.put_color(Common.Utils.ThemeColor.getRgbColor(Common.Utils.ThemeColor.colorValue2EffectId(this.BorderColor.Color)));
stroke.asc_putPrstDash(this.BorderType);
stroke.put_width(this._pt2mm(this.BorderSize)); stroke.put_width(this._pt2mm(this.BorderSize));
} }
props.put_stroke(stroke); props.put_stroke(stroke);
@ -1057,6 +598,26 @@ define([
this.applyBorderSize(record.value); this.applyBorderSize(record.value);
}, },
onBorderTypeSelect: function(combo, record) {
this.BorderType = record.value;
if (this.api && !this._noApply) {
var props = new Asc.asc_CShapeProperty();
var stroke = new Asc.asc_CStroke();
if (this.BorderSize<0.01) {
stroke.put_type( Asc.c_oAscStrokeType.STROKE_NONE);
} else {
stroke.put_type( Asc.c_oAscStrokeType.STROKE_COLOR);
stroke.put_color(Common.Utils.ThemeColor.getRgbColor(this.BorderColor.Color));
stroke.put_width(this._pt2mm(this.BorderSize));
stroke.asc_putPrstDash(this.BorderType);
}
props.put_stroke(stroke);
this.imgprops.put_ShapeProperties(props);
this.api.ImgApply(this.imgprops);
}
this.fireEvent('editcomplete', this);
},
onColorsBorderSelect: function(picker, color) { onColorsBorderSelect: function(picker, color) {
this.btnBorderColor.setColor(color); this.btnBorderColor.setColor(color);
this.BorderColor = {Value: 1, Color: color}; this.BorderColor = {Value: 1, Color: color};
@ -1069,6 +630,7 @@ define([
stroke.put_type( Asc.c_oAscStrokeType.STROKE_COLOR); stroke.put_type( Asc.c_oAscStrokeType.STROKE_COLOR);
stroke.put_color(Common.Utils.ThemeColor.getRgbColor(this.BorderColor.Color)); stroke.put_color(Common.Utils.ThemeColor.getRgbColor(this.BorderColor.Color));
stroke.put_width(this._pt2mm(this.BorderSize)); stroke.put_width(this._pt2mm(this.BorderSize));
stroke.asc_putPrstDash(this.BorderType);
} }
props.put_stroke(stroke); props.put_stroke(stroke);
this.imgprops.put_ShapeProperties(props); this.imgprops.put_ShapeProperties(props);
@ -1078,6 +640,7 @@ define([
}, },
_ImgWrapStyleChanged: function(style) { _ImgWrapStyleChanged: function(style) {
if (!this.mnuWrapPicker) return;
if (this._state.WrappingStyle!==style) { if (this._state.WrappingStyle!==style) {
this._noApply = true; this._noApply = true;
var record = this.mnuWrapPicker.store.findWhere({data: style}); var record = this.mnuWrapPicker.store.findWhere({data: style});
@ -1434,8 +997,9 @@ define([
} }
// border colors // border colors
var stroke = shapeprops.get_stroke(); var stroke = shapeprops.get_stroke(),
var strokeType = stroke.get_type(); strokeType = stroke.get_type(),
borderType;
if (stroke) { if (stroke) {
if ( strokeType == Asc.c_oAscStrokeType.STROKE_COLOR ) { if ( strokeType == Asc.c_oAscStrokeType.STROKE_COLOR ) {
@ -1452,6 +1016,7 @@ define([
} else { } else {
this.BorderColor = {Value: 1, Color: 'transparent'}; this.BorderColor = {Value: 1, Color: 'transparent'};
} }
borderType = stroke.asc_getPrstDash();
} else { // no stroke } else { // no stroke
strokeType = null; strokeType = null;
this.BorderColor = {Value: 0, Color: 'transparent'}; this.BorderColor = {Value: 0, Color: 'transparent'};
@ -1514,6 +1079,11 @@ define([
this._state.StrokeType = strokeType; this._state.StrokeType = strokeType;
} }
if (this._state.StrokeBorderType !== borderType) {
this.BorderType = this._state.StrokeBorderType = borderType;
this.cmbBorderType.setValue(borderType);
}
// pattern colors // pattern colors
type1 = typeof(this.FGColor.Color); type1 = typeof(this.FGColor.Color);
type2 = typeof(this._state.FGColor); type2 = typeof(this._state.FGColor);
@ -1592,7 +1162,261 @@ define([
} }
}, },
createDelayedControls: function() {
var me = this;
this._arrFillSrc = [
{displayValue: this.textColor, value: Asc.c_oAscFill.FILL_TYPE_SOLID},
{displayValue: this.textGradientFill, value: Asc.c_oAscFill.FILL_TYPE_GRAD},
{displayValue: this.textImageTexture, value: Asc.c_oAscFill.FILL_TYPE_BLIP},
{displayValue: this.textPatternFill, value: Asc.c_oAscFill.FILL_TYPE_PATT},
{displayValue: this.textNoFill, value: Asc.c_oAscFill.FILL_TYPE_NOFILL}
];
this.cmbFillSrc = new Common.UI.ComboBox({
el: $('#shape-combo-fill-src'),
cls: 'input-group-nr',
style: 'width: 100%;',
menuStyle: 'min-width: 190px;',
editable: false,
data: this._arrFillSrc
});
this.cmbFillSrc.setValue(this._arrFillSrc[0].value);
this.cmbFillSrc.on('selected', _.bind(this.onFillSrcSelect, this));
this.fillControls.push(this.cmbFillSrc);
this.cmbPattern = new Common.UI.ComboDataView({
itemWidth: 28,
itemHeight: 28,
menuMaxHeight: 300,
enableKeyEvents: true,
cls: 'combo-pattern'
});
this.cmbPattern.menuPicker.itemTemplate = this.cmbPattern.fieldPicker.itemTemplate = _.template([
'<div class="style" id="<%= id %>">',
'<img src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" class="combo-pattern-item" ',
'width="' + this.cmbPattern.itemWidth + '" height="' + this.cmbPattern.itemHeight + '" ',
'style="background-position: -<%= offsetx %>px -<%= offsety %>px;"/>',
'</div>'
].join(''));
this.cmbPattern.render($('#shape-combo-pattern'));
this.cmbPattern.openButton.menu.cmpEl.css({
'min-width': 178,
'max-width': 178
});
this.cmbPattern.on('click', _.bind(this.onPatternSelect, this));
this.cmbPattern.openButton.menu.on('show:after', function () {
me.cmbPattern.menuPicker.scroller.update({alwaysVisibleY: true});
});
this.fillControls.push(this.cmbPattern);
this.btnInsertFromFile = new Common.UI.Button({
el: $('#shape-button-from-file')
});
this.fillControls.push(this.btnInsertFromFile);
this.btnInsertFromUrl = new Common.UI.Button({
el: $('#shape-button-from-url')
});
this.fillControls.push(this.btnInsertFromUrl);
this.btnInsertFromFile.on('click', _.bind(function(btn){
if (this.api) this.api.ChangeShapeImageFromFile();
this.fireEvent('editcomplete', this);
}, this));
this.btnInsertFromUrl.on('click', _.bind(this.insertFromUrl, this));
this._arrFillType = [
{displayValue: this.textStretch, value: Asc.c_oAscFillBlipType.STRETCH},
{displayValue: this.textTile, value: Asc.c_oAscFillBlipType.TILE}
];
this.cmbFillType = new Common.UI.ComboBox({
el: $('#shape-combo-fill-type'),
cls: 'input-group-nr',
menuStyle: 'min-width: 90px;',
editable: false,
data: this._arrFillType
});
this.cmbFillType.setValue(this._arrFillType[0].value);
this.cmbFillType.on('selected', _.bind(this.onFillTypeSelect, this));
this.fillControls.push(this.cmbFillType);
this.numTransparency = new Common.UI.MetricSpinner({
el: $('#shape-spin-transparency'),
step: 1,
width: 62,
value: '100 %',
defaultUnit : "%",
maxValue: 100,
minValue: 0
});
this.numTransparency.on('change', _.bind(this.onNumTransparencyChange, this));
this.fillControls.push(this.numTransparency);
this.sldrTransparency = new Common.UI.SingleSlider({
el: $('#shape-slider-transparency'),
width: 75,
minValue: 0,
maxValue: 100,
value: 100
});
this.sldrTransparency.on('change', _.bind(this.onTransparencyChange, this));
this.sldrTransparency.on('changecomplete', _.bind(this.onTransparencyChangeComplete, this));
this.fillControls.push(this.sldrTransparency);
this.lblTransparencyStart = $(this.el).find('#shape-lbl-transparency-start');
this.lblTransparencyEnd = $(this.el).find('#shape-lbl-transparency-end');
this._arrGradType = [
{displayValue: this.textLinear, value: Asc.c_oAscFillGradType.GRAD_LINEAR},
{displayValue: this.textRadial, value: Asc.c_oAscFillGradType.GRAD_PATH}
];
this.cmbGradType = new Common.UI.ComboBox({
el: $('#shape-combo-grad-type'),
cls: 'input-group-nr',
menuStyle: 'min-width: 90px;',
editable: false,
data: this._arrGradType
});
this.cmbGradType.setValue(this._arrGradType[0].value);
this.cmbGradType.on('selected', _.bind(this.onGradTypeSelect, this));
this.fillControls.push(this.cmbGradType);
this._viewDataLinear = [
{ offsetx: 0, offsety: 0, type:45, subtype:-1, iconcls:'gradient-left-top' },
{ offsetx: 50, offsety: 0, type:90, subtype:4, iconcls:'gradient-top'},
{ offsetx: 100, offsety: 0, type:135, subtype:5, iconcls:'gradient-right-top'},
{ offsetx: 0, offsety: 50, type:0, subtype:6, iconcls:'gradient-left', cls: 'item-gradient-separator', selected: true},
{ offsetx: 100, offsety: 50, type:180, subtype:1, iconcls:'gradient-right'},
{ offsetx: 0, offsety: 100, type:315, subtype:2, iconcls:'gradient-left-bottom'},
{ offsetx: 50, offsety: 100, type:270, subtype:3, iconcls:'gradient-bottom'},
{ offsetx: 100, offsety: 100, type:225, subtype:7, iconcls:'gradient-right-bottom'}
];
this._viewDataRadial = [
{ offsetx: 100, offsety: 150, type:2, subtype:5, iconcls:'gradient-radial-center'}
];
this.btnDirection = new Common.UI.Button({
cls : 'btn-large-dataview',
iconCls : 'item-gradient gradient-left',
menu : new Common.UI.Menu({
style: 'min-width: 60px;',
menuAlign: 'tr-br',
items: [
{ template: _.template('<div id="id-shape-menu-direction" style="width: 175px; margin: 0 5px;"></div>') }
]
})
});
this.btnDirection.on('render:after', function(btn) {
me.mnuDirectionPicker = new Common.UI.DataView({
el: $('#id-shape-menu-direction'),
parentMenu: btn.menu,
restoreHeight: 174,
allowScrollbar: false,
store: new Common.UI.DataViewStore(me._viewDataLinear),
itemTemplate: _.template('<div id="<%= id %>" class="item-gradient" style="background-position: -<%= offsetx %>px -<%= offsety %>px;"></div>')
});
});
this.btnDirection.render($('#shape-button-direction'));
this.mnuDirectionPicker.on('item:click', _.bind(this.onSelectGradient, this, this.btnDirection));
this.fillControls.push(this.btnDirection);
this.sldrGradient = new Common.UI.MultiSliderGradient({
el: $('#shape-slider-gradient'),
width: 125,
minValue: 0,
maxValue: 100,
values: [0, 100]
});
this.sldrGradient.on('change', _.bind(this.onGradientChange, this));
this.sldrGradient.on('changecomplete', _.bind(this.onGradientChangeComplete, this));
this.sldrGradient.on('thumbclick', function(cmp, index){
me.GradColor.currentIdx = index;
var color = me.GradColor.colors[me.GradColor.currentIdx];
me.btnGradColor.setColor(color);
me.colorsGrad.select(color,false);
});
this.sldrGradient.on('thumbdblclick', function(cmp){
me.btnGradColor.cmpEl.find('button').dropdown('toggle');
});
this.fillControls.push(this.sldrGradient);
this.cmbBorderSize = new Common.UI.ComboBorderSizeEditable({
el: $('#shape-combo-border-size'),
style: "width: 93px;",
txtNoBorders: this.txtNoBorders
})
.on('selected', _.bind(this.onBorderSizeSelect, this))
.on('changed:before',_.bind(this.onBorderSizeChanged, this, true))
.on('changed:after', _.bind(this.onBorderSizeChanged, this, false))
.on('combo:blur', _.bind(this.onComboBlur, this, false));
this.BorderSize = this.cmbBorderSize.store.at(2).get('value');
this.cmbBorderSize.setValue(this.BorderSize);
this.lockedControls.push(this.cmbBorderSize);
this.cmbBorderType = new Common.UI.ComboBorderType({
el: $('#shape-combo-border-type'),
style: "width: 93px;",
menuStyle: 'min-width: 93px;'
}).on('selected', _.bind(this.onBorderTypeSelect, this))
.on('combo:blur', _.bind(this.onComboBlur, this, false));
this.BorderType = Asc.c_oDashType.solid;
this.cmbBorderType.setValue(this.BorderType);
this.lockedControls.push(this.cmbBorderType);
var viewData = [
{ offsetx: 0, data: Asc.c_oAscWrapStyle2.Inline, iconcls:'wrap-inline', tip: this.txtInline, selected: true },
{ offsetx: 50, data: Asc.c_oAscWrapStyle2.Square, iconcls:'wrap-square', tip: this.txtSquare },
{ offsetx: 100, data: Asc.c_oAscWrapStyle2.Tight, iconcls:'wrap-tight', tip: this.txtTight },
{ offsetx: 150, data: Asc.c_oAscWrapStyle2.Through, iconcls:'wrap-through', tip: this.txtThrough },
{ offsetx: 200, data: Asc.c_oAscWrapStyle2.TopAndBottom, iconcls:'wrap-topAndBottom', tip: this.txtTopAndBottom },
{ offsetx: 250, data: Asc.c_oAscWrapStyle2.InFront, iconcls:'wrap-inFront', tip: this.txtInFront },
{ offsetx: 300, data: Asc.c_oAscWrapStyle2.Behind, iconcls:'wrap-behind', tip: this.txtBehind }
];
this.btnWrapType = new Common.UI.Button({
cls : 'btn-large-dataview',
iconCls : 'item-wrap wrap-inline',
menu : new Common.UI.Menu({
items: [
{ template: _.template('<div id="id-shape-menu-wrap" style="width: 235px; margin: 0 5px;"></div>') }
]
})
});
this.btnWrapType.on('render:after', function(btn) {
me.mnuWrapPicker = new Common.UI.DataView({
el: $('#id-shape-menu-wrap'),
parentMenu: btn.menu,
store: new Common.UI.DataViewStore(viewData),
itemTemplate: _.template('<div id="<%= id %>" class="item-wrap" style="background-position: -<%= offsetx %>px 0;"></div>')
});
});
this.btnWrapType.render($('#shape-button-wrap'));
this.mnuWrapPicker.on('item:click', _.bind(this.onSelectWrap, this, this.btnWrapType));
this.lockedControls.push(this.btnWrapType);
this.btnChangeShape = new Common.UI.Button({
cls: 'btn-icon-default',
iconCls: 'btn-change-shape',
menu : new Common.UI.Menu({
menuAlign: 'tr-br',
cls: 'menu-shapes',
items: []
})
});
this.btnChangeShape.render( $('#shape-btn-change')) ;
this.lockedControls.push(this.btnChangeShape);
this.linkAdvanced = $('#shape-advanced-link');
$(this.el).on('click', '#shape-advanced-link', _.bind(this.openAdvancedSettings, this));
},
createDelayedElements: function() { createDelayedElements: function() {
this.createDelayedControls();
var global_hatch_menu_map = [ var global_hatch_menu_map = [
0,1,3,2,4, 0,1,3,2,4,
53,5,6,7,8, 53,5,6,7,8,
@ -1624,7 +1448,6 @@ define([
this.PatternFillType = this.patternViewData[0].type; this.PatternFillType = this.patternViewData[0].type;
} }
this.fillAutoShapes(); this.fillAutoShapes();
this.UpdateThemeColors(); this.UpdateThemeColors();
}, },
@ -1632,6 +1455,26 @@ define([
onInitStandartTextures: function(texture) { onInitStandartTextures: function(texture) {
var me = this; var me = this;
if (texture && texture.length>0){ if (texture && texture.length>0){
if (!this.btnTexture) {
this.btnTexture = new Common.UI.ComboBox({
el: $('#shape-combo-fill-texture'),
template: _.template([
'<div class="input-group combobox combo-dataview-menu input-group-nr dropdown-toggle" tabindex="0" data-toggle="dropdown">',
'<div class="form-control text" style="width: 90px;">' + this.textSelectTexture + '</div>',
'<div style="display: table-cell;"></div>',
'<button type="button" class="btn btn-default"><span class="caret img-commonctrl"></span></button>',
'</div>'
].join(''))
});
this.textureMenu = new Common.UI.Menu({
items: [
{ template: _.template('<div id="id-shape-menu-texture" style="width: 233px; margin: 0 5px;"></div>') }
]
});
this.textureMenu.render($('#shape-combo-fill-texture'));
this.fillControls.push(this.btnTexture);
}
var texturearray = []; var texturearray = [];
_.each(texture, function(item){ _.each(texture, function(item){
texturearray.push({ texturearray.push({
@ -1712,6 +1555,105 @@ define([
}, },
UpdateThemeColors: function() { UpdateThemeColors: function() {
if (!this.btnBackColor) {
// create color buttons
this.btnBackColor = new Common.UI.ColorButton({
style: "width:45px;",
menu : new Common.UI.Menu({
items: [
{ template: _.template('<div id="shape-back-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
{ template: _.template('<a id="shape-back-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
]
})
});
this.btnBackColor.render( $('#shape-back-color-btn'));
this.btnBackColor.setColor('transparent');
this.fillControls.push(this.btnBackColor);
this.colorsBack = new Common.UI.ThemeColorPalette({
el: $('#shape-back-color-menu'),
value: 'transparent',
transparent: true
});
this.colorsBack.on('select', _.bind(this.onColorsBackSelect, this));
$(this.el).on('click', '#shape-back-color-new', _.bind(this.addNewColor, this, this.colorsBack, this.btnBackColor));
this.btnFGColor = new Common.UI.ColorButton({
style: "width:45px;",
menu : new Common.UI.Menu({
items: [
{ template: _.template('<div id="shape-foreground-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
{ template: _.template('<a id="shape-foreground-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
]
})
});
this.btnFGColor.render( $('#shape-foreground-color-btn'));
this.btnFGColor.setColor('000000');
this.fillControls.push(this.btnFGColor);
this.colorsFG = new Common.UI.ThemeColorPalette({
el: $('#shape-foreground-color-menu'),
value: '000000'
});
this.colorsFG.on('select', _.bind(this.onColorsFGSelect, this));
$(this.el).on('click', '#shape-foreground-color-new', _.bind(this.addNewColor, this, this.colorsFG, this.btnFGColor));
this.btnBGColor = new Common.UI.ColorButton({
style: "width:45px;",
menu : new Common.UI.Menu({
items: [
{ template: _.template('<div id="shape-background-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
{ template: _.template('<a id="shape-background-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
]
})
});
this.btnBGColor.render( $('#shape-background-color-btn'));
this.btnBGColor.setColor('ffffff');
this.fillControls.push(this.btnBGColor);
this.colorsBG = new Common.UI.ThemeColorPalette({
el: $('#shape-background-color-menu'),
value: 'ffffff'
});
this.colorsBG.on('select', _.bind(this.onColorsBGSelect, this));
$(this.el).on('click', '#shape-background-color-new', _.bind(this.addNewColor, this, this.colorsBG, this.btnBGColor));
this.btnGradColor = new Common.UI.ColorButton({
style: "width:45px;",
menu : new Common.UI.Menu({
items: [
{ template: _.template('<div id="shape-gradient-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
{ template: _.template('<a id="shape-gradient-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
]
})
});
this.btnGradColor.render( $('#shape-gradient-color-btn'));
this.btnGradColor.setColor('000000');
this.fillControls.push(this.btnGradColor);
this.colorsGrad = new Common.UI.ThemeColorPalette({
el: $('#shape-gradient-color-menu'),
value: '000000'
});
this.colorsGrad.on('select', _.bind(this.onColorsGradientSelect, this));
$(this.el).on('click', '#shape-gradient-color-new', _.bind(this.addNewColor, this, this.colorsGrad, this.btnGradColor));
this.btnBorderColor = new Common.UI.ColorButton({
style: "width:45px;",
menu : new Common.UI.Menu({
items: [
{ template: _.template('<div id="shape-border-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
{ template: _.template('<a id="shape-border-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
]
})
});
this.btnBorderColor.render( $('#shape-border-color-btn'));
this.btnBorderColor.setColor('000000');
this.lockedControls.push(this.btnBorderColor);
this.colorsBorder = new Common.UI.ThemeColorPalette({
el: $('#shape-border-color-menu'),
value: '000000'
});
this.colorsBorder.on('select', _.bind(this.onColorsBorderSelect, this));
$(this.el).on('click', '#shape-border-color-new', _.bind(this.addNewColor, this, this.colorsBorder, this.btnBorderColor));
}
this.colorsBorder.updateColors(Common.Utils.ThemeColor.getEffectColors(), Common.Utils.ThemeColor.getStandartColors()); this.colorsBorder.updateColors(Common.Utils.ThemeColor.getEffectColors(), Common.Utils.ThemeColor.getStandartColors());
this.colorsBack.updateColors(Common.Utils.ThemeColor.getEffectColors(), Common.Utils.ThemeColor.getStandartColors()); this.colorsBack.updateColors(Common.Utils.ThemeColor.getEffectColors(), Common.Utils.ThemeColor.getStandartColors());
this.colorsFG.updateColors(Common.Utils.ThemeColor.getEffectColors(), Common.Utils.ThemeColor.getStandartColors()); this.colorsFG.updateColors(Common.Utils.ThemeColor.getEffectColors(), Common.Utils.ThemeColor.getStandartColors());
@ -1751,6 +1693,8 @@ define([
}, },
disableControls: function(disable, disableFill) { disableControls: function(disable, disableFill) {
if (this._initSettings) return;
this.disableFillPanels(disable || disableFill); this.disableFillPanels(disable || disableFill);
if (this._state.DisabledControls!==disable) { if (this._state.DisabledControls!==disable) {
this._state.DisabledControls = disable; this._state.DisabledControls = disable;
@ -1800,8 +1744,6 @@ define([
txtPapyrus : 'Papyrus', txtPapyrus : 'Papyrus',
txtWood : 'Wood', txtWood : 'Wood',
textNewColor : 'Add New Custom Color', textNewColor : 'Add New Custom Color',
textThemeColors : 'Theme Colors',
textStandartColors : 'Standart Colors',
textAdvanced : 'Show advanced settings', textAdvanced : 'Show advanced settings',
strTransparency : 'Opacity', strTransparency : 'Opacity',
textNoFill : 'No Fill', textNoFill : 'No Fill',
@ -1825,6 +1767,7 @@ define([
txtTopAndBottom: 'Top and bottom', txtTopAndBottom: 'Top and bottom',
txtBehind: 'Behind', txtBehind: 'Behind',
txtInFront: 'In front', txtInFront: 'In front',
textBorderSizeErr: 'The entered value is incorrect.<br>Please enter a value between 0 pt and 1584 pt.' textBorderSizeErr: 'The entered value is incorrect.<br>Please enter a value between 0 pt and 1584 pt.',
strType: 'Type'
}, DE.Views.ShapeSettings || {})); }, DE.Views.ShapeSettings || {}));
}); });

View file

@ -208,7 +208,6 @@ define([
this.btnLanguage.cmpEl.on({ this.btnLanguage.cmpEl.on({
'show.bs.dropdown': function () { 'show.bs.dropdown': function () {
_.defer(function(){ _.defer(function(){
me.api.asc_enableKeyEvents(false);
me.btnLanguage.cmpEl.find('ul').focus(); me.btnLanguage.cmpEl.find('ul').focus();
}, 100); }, 100);
}, },
@ -234,7 +233,6 @@ define([
}); });
this.cntZoom.cmpEl.on('show.bs.dropdown', function () { this.cntZoom.cmpEl.on('show.bs.dropdown', function () {
_.defer(function(){ _.defer(function(){
me.api.asc_enableKeyEvents(false);
me.cntZoom.cmpEl.find('ul').focus(); me.cntZoom.cmpEl.find('ul').focus();
}, 100); }, 100);
} }
@ -585,7 +583,7 @@ define([
data: this.options.languages data: this.options.languages
}); });
this.cmbLanguage.scroller.update({alwaysVisibleY: true}); if (this.cmbLanguage.scroller) this.cmbLanguage.scroller.update({alwaysVisibleY: true});
this.cmbLanguage.on('selected', _.bind(this.onLangSelect, this)); this.cmbLanguage.on('selected', _.bind(this.onLangSelect, this));
this.cmbLanguage.setValue(Common.util.LanguageInfo.getLocalLanguageName(this.options.current)[0]); this.cmbLanguage.setValue(Common.util.LanguageInfo.getLocalLanguageName(this.options.current)[0]);
this.onLangSelect(this.cmbLanguage, this.cmbLanguage.getSelectedRecord()); this.onLangSelect(this.cmbLanguage, this.cmbLanguage.getSelectedRecord());

View file

@ -69,7 +69,7 @@ define([
}, },
initialize: function () { initialize: function () {
var me = this; this._initSettings = true;
this._state = { this._state = {
TemplateId: 0, TemplateId: 0,
@ -99,255 +99,6 @@ define([
this._wrapHandled = false; this._wrapHandled = false;
this.render(); this.render();
this.chHeader = new Common.UI.CheckBox({
el: $('#table-checkbox-header'),
labelText: this.textHeader
});
this.lockedControls.push(this.chHeader);
this.chTotal = new Common.UI.CheckBox({
el: $('#table-checkbox-total'),
labelText: this.textTotal
});
this.lockedControls.push(this.chTotal);
this.chBanded = new Common.UI.CheckBox({
el: $('#table-checkbox-banded'),
labelText: this.textBanded
});
this.lockedControls.push(this.chBanded);
this.chFirst = new Common.UI.CheckBox({
el: $('#table-checkbox-first'),
labelText: this.textFirst
});
this.lockedControls.push(this.chFirst);
this.chLast = new Common.UI.CheckBox({
el: $('#table-checkbox-last'),
labelText: this.textLast
});
this.lockedControls.push(this.chLast);
this.chColBanded = new Common.UI.CheckBox({
el: $('#table-checkbox-col-banded'),
labelText: this.textBanded
});
this.lockedControls.push(this.chColBanded);
this.chHeader.on('change', _.bind(this.onCheckTemplateChange, this, 0));
this.chTotal.on('change', _.bind(this.onCheckTemplateChange, this, 1));
this.chBanded.on('change', _.bind(this.onCheckTemplateChange, this, 2));
this.chFirst.on('change', _.bind(this.onCheckTemplateChange, this, 3));
this.chLast.on('change', _.bind(this.onCheckTemplateChange, this, 4));
this.chColBanded.on('change', _.bind(this.onCheckTemplateChange, this, 5));
this.cmbTableTemplate = new Common.UI.ComboDataView({
itemWidth: 70,
itemHeight: 50,
menuMaxHeight: 300,
enableKeyEvents: true,
cls: 'combo-template'
});
this.cmbTableTemplate.render($('#table-combo-template'));
this.cmbTableTemplate.openButton.menu.cmpEl.css({
'min-width': 175,
'max-width': 175
});
this.cmbTableTemplate.on('click', _.bind(this.onTableTemplateSelect, this));
this.cmbTableTemplate.openButton.menu.on('show:after', function () {
me.cmbTableTemplate.menuPicker.scroller.update({alwaysVisibleY: true});
});
this.lockedControls.push(this.cmbTableTemplate);
this.btnWrapNone = new Common.UI.Button({
cls: 'btn-options huge',
iconCls: 'icon-right-panel btn-wrap-none',
posId: c_tableWrap.TABLE_WRAP_NONE,
hint: this.textWrapNoneTooltip,
enableToggle: true,
allowDepress: false,
toggleGroup : 'tablewrapGroup'
});
this.btnWrapNone.render( $('#table-button-wrap-none')) ;
this.btnWrapNone.on('click', _.bind(this.onBtnWrapClick, this));
this.lockedControls.push(this.btnWrapNone);
this.btnWrapParallel = new Common.UI.Button({
cls: 'btn-options huge',
iconCls: 'icon-right-panel btn-wrap-parallel',
posId: c_tableWrap.TABLE_WRAP_PARALLEL,
hint: this.textWrapParallelTooltip,
enableToggle: true,
allowDepress: false,
toggleGroup : 'tablewrapGroup'
});
this.btnWrapParallel.render( $('#table-button-wrap-parallel')) ;
this.btnWrapParallel.on('click', _.bind(this.onBtnWrapClick, this));
this.lockedControls.push(this.btnWrapParallel);
var _arrBorderPosition = [
['l', 'btn-borders-small btn-position-left', 'table-button-border-left', this.tipLeft],
['c','btn-borders-small btn-position-inner-vert', 'table-button-border-inner-vert', this.tipInnerVert],
['r','btn-borders-small btn-position-right', 'table-button-border-right', this.tipRight],
['t','btn-borders-small btn-position-top', 'table-button-border-top', this.tipTop],
['m','btn-borders-small btn-position-inner-hor', 'table-button-border-inner-hor', this.tipInnerHor],
['b', 'btn-borders-small btn-position-bottom', 'table-button-border-bottom', this.tipBottom],
['cm', 'btn-borders-small btn-position-inner', 'table-button-border-inner', this.tipInner],
['lrtb', 'btn-borders-small btn-position-outer', 'table-button-border-outer', this.tipOuter],
['lrtbcm', 'btn-borders-small btn-position-all', 'table-button-border-all', this.tipAll],
['', 'btn-borders-small btn-position-none', 'table-button-border-none', this.tipNone]
];
this._btnsBorderPosition = [];
_.each(_arrBorderPosition, function(item, index, list){
var _btn = new Common.UI.Button({
cls: 'btn-toolbar',
iconCls: item[1],
strId :item[0],
hint: item[3]
});
_btn.render( $('#'+item[2])) ;
_btn.on('click', _.bind(this.onBtnBordersClick, this));
this._btnsBorderPosition.push( _btn );
this.lockedControls.push(_btn);
}, this);
this.cmbBorderSize = new Common.UI.ComboBorderSize({
el: $('#table-combo-border-size'),
style: "width: 93px;"
});
this.BorderSize = this.cmbBorderSize.store.at(1).get('value');
this.cmbBorderSize.setValue(this.BorderSize);
this.cmbBorderSize.on('selected', _.bind(this.onBorderSizeSelect, this));
this.lockedControls.push(this.cmbBorderSize);
this.btnBorderColor = new Common.UI.ColorButton({
style: "width:45px;",
menu : new Common.UI.Menu({
items: [
{ template: _.template('<div id="table-border-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
{ template: _.template('<a id="table-border-color-new" style="padding-left:12px;">' + me.textNewColor + '</a>') }
]
})
});
this.btnBorderColor.on('render:after', function(btn) {
me.borderColor = new Common.UI.ThemeColorPalette({
el: $('#table-border-color-menu'),
dynamiccolors: 10,
colors: [
me.textThemeColors, '-', {color: '3366FF', effectId: 1}, {color: '0000FF', effectId: 2}, {color: '000090', effectId: 3}, {color: '660066', effectId: 4}, {color: '800000', effectId: 5},
{color: 'FF0000', effectId: 1}, {color: 'FF6600', effectId: 1}, {color: 'FFFF00', effectId: 2}, {color: 'CCFFCC', effectId: 3}, {color: '008000', effectId: 4},
'-',
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2}, {color: '000000', effectId: 3}, {color: 'FFFFFF', effectId: 4}, {color: '000000', effectId: 5},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
'-', '--', '-', me.textStandartColors, '-',
'3D55FE', '5301B3', '980ABD', 'B2275F', 'F83D26', 'F86A1D', 'F7AC16', 'F7CA12', 'FAFF44', 'D6EF39',
'-', '--'
]
});
me.borderColor.on('select', _.bind(me.onColorsBorderSelect, me));
});
this.btnBorderColor.render( $('#table-border-color-btn'));
this.btnBorderColor.setColor('000000');
$(this.el).on('click', '#table-border-color-new', _.bind(this.addNewColor, this, this.borderColor, this.btnBorderColor));
this.lockedControls.push(this.btnBorderColor);
this.btnBackColor = new Common.UI.ColorButton({
style: "width:45px;",
menu : new Common.UI.Menu({
items: [
{ template: _.template('<div id="table-back-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
{ template: _.template('<a id="table-back-color-new" style="padding-left:12px;">' + me.textNewColor + '</a>') }
]
})
});
this.btnBackColor.on('render:after', function(btn) {
me.colorsBack = new Common.UI.ThemeColorPalette({
el: $('#table-back-color-menu'),
dynamiccolors: 10,
colors: [
me.textThemeColors, '-', {color: '3366FF', effectId: 1}, {color: '0000FF', effectId: 2}, {color: '000090', effectId: 3}, {color: '660066', effectId: 4}, {color: '800000', effectId: 5},
{color: 'FF0000', effectId: 1}, {color: 'FF6600', effectId: 1}, {color: 'FFFF00', effectId: 2}, {color: 'CCFFCC', effectId: 3}, {color: '008000', effectId: 4},
'-',
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2}, {color: '000000', effectId: 3}, {color: 'FFFFFF', effectId: 4}, {color: '000000', effectId: 5},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
'-', '--', '-', me.textStandartColors, '-', 'transparent',
'5301B3', '980ABD', 'B2275F', 'F83D26', 'F86A1D', 'F7AC16', 'F7CA12', 'FAFF44', 'D6EF39',
'-', '--'
]
});
me.colorsBack.on('select', _.bind(me.onColorsBackSelect, me));
});
this.btnBackColor.render( $('#table-back-color-btn'));
$(this.el).on('click', '#table-back-color-new', _.bind(this.addNewColor, this, this.colorsBack, this.btnBackColor, this.btnBackColor));
this.lockedControls.push(this.btnBackColor);
this.btnEdit = new Common.UI.Button({
cls: 'btn-icon-default',
iconCls: 'btn-edit-table',
menu : new Common.UI.Menu({
menuAlign: 'tr-br',
items: [
{ caption: this.selectRowText, value: 0 },
{ caption: this.selectColumnText, value: 1 },
{ caption: this.selectCellText, value: 2 },
{ caption: this.selectTableText, value: 3 },
{ caption: '--' },
{ caption: this.insertRowAboveText, value: 4 },
{ caption: this.insertRowBelowText, value: 5 },
{ caption: this.insertColumnLeftText, value: 6 },
{ caption: this.insertColumnRightText, value: 7 },
{ caption: '--' },
{ caption: this.deleteRowText, value: 8 },
{ caption: this.deleteColumnText, value: 9 },
{ caption: this.deleteTableText, value: 10 },
{ caption: '--' },
{ caption: this.mergeCellsText, value: 11 },
{ caption: this.splitCellsText, value: 12 }
]
})
});
this.btnEdit.render( $('#table-btn-edit')) ;
this.mnuMerge = this.btnEdit.menu.items[this.btnEdit.menu.items.length-2];
this.mnuSplit = this.btnEdit.menu.items[this.btnEdit.menu.items.length-1];
this.btnEdit.menu.on('show:after', _.bind( function(){
if (this.api) {
this.mnuMerge.setDisabled(!this.api.CheckBeforeMergeCells());
this.mnuSplit.setDisabled(!this.api.CheckBeforeSplitCells());
}
}, this));
this.btnEdit.menu.on('item:click', _.bind(this.onEditClick, this));
this.lockedControls.push(this.btnEdit);
this.chRepeatRow = new Common.UI.CheckBox({
el: $('#table-checkbox-repeat-row'),
labelText: this.strRepeatRow
});
this.chRepeatRow.on('change', _.bind(this.onCheckRepeatRowChange, this));
this.lockedControls.push(this.chRepeatRow);
$(this.el).on('click', '#table-advanced-link', _.bind(this.openAdvancedSettings, this));
}, },
onCheckTemplateChange: function(type, field, newValue, oldValue, eOpts) { onCheckTemplateChange: function(type, field, newValue, oldValue, eOpts) {
@ -502,8 +253,6 @@ define([
el.html(this.template({ el.html(this.template({
scope: this scope: this
})); }));
this.linkAdvanced = $('#table-advanced-link');
}, },
setApi: function(o) { setApi: function(o) {
@ -516,7 +265,171 @@ define([
return this; return this;
}, },
createDelayedControls: function() {
this.chHeader = new Common.UI.CheckBox({
el: $('#table-checkbox-header'),
labelText: this.textHeader
});
this.lockedControls.push(this.chHeader);
this.chTotal = new Common.UI.CheckBox({
el: $('#table-checkbox-total'),
labelText: this.textTotal
});
this.lockedControls.push(this.chTotal);
this.chBanded = new Common.UI.CheckBox({
el: $('#table-checkbox-banded'),
labelText: this.textBanded
});
this.lockedControls.push(this.chBanded);
this.chFirst = new Common.UI.CheckBox({
el: $('#table-checkbox-first'),
labelText: this.textFirst
});
this.lockedControls.push(this.chFirst);
this.chLast = new Common.UI.CheckBox({
el: $('#table-checkbox-last'),
labelText: this.textLast
});
this.lockedControls.push(this.chLast);
this.chColBanded = new Common.UI.CheckBox({
el: $('#table-checkbox-col-banded'),
labelText: this.textBanded
});
this.lockedControls.push(this.chColBanded);
this.chHeader.on('change', _.bind(this.onCheckTemplateChange, this, 0));
this.chTotal.on('change', _.bind(this.onCheckTemplateChange, this, 1));
this.chBanded.on('change', _.bind(this.onCheckTemplateChange, this, 2));
this.chFirst.on('change', _.bind(this.onCheckTemplateChange, this, 3));
this.chLast.on('change', _.bind(this.onCheckTemplateChange, this, 4));
this.chColBanded.on('change', _.bind(this.onCheckTemplateChange, this, 5));
this.btnWrapNone = new Common.UI.Button({
cls: 'btn-options huge',
iconCls: 'icon-right-panel btn-wrap-none',
posId: c_tableWrap.TABLE_WRAP_NONE,
hint: this.textWrapNoneTooltip,
enableToggle: true,
allowDepress: false,
toggleGroup : 'tablewrapGroup'
});
this.btnWrapNone.render( $('#table-button-wrap-none')) ;
this.btnWrapNone.on('click', _.bind(this.onBtnWrapClick, this));
this.lockedControls.push(this.btnWrapNone);
this.btnWrapParallel = new Common.UI.Button({
cls: 'btn-options huge',
iconCls: 'icon-right-panel btn-wrap-parallel',
posId: c_tableWrap.TABLE_WRAP_PARALLEL,
hint: this.textWrapParallelTooltip,
enableToggle: true,
allowDepress: false,
toggleGroup : 'tablewrapGroup'
});
this.btnWrapParallel.render( $('#table-button-wrap-parallel')) ;
this.btnWrapParallel.on('click', _.bind(this.onBtnWrapClick, this));
this.lockedControls.push(this.btnWrapParallel);
var _arrBorderPosition = [
['l', 'btn-borders-small btn-position-left', 'table-button-border-left', this.tipLeft],
['c','btn-borders-small btn-position-inner-vert', 'table-button-border-inner-vert', this.tipInnerVert],
['r','btn-borders-small btn-position-right', 'table-button-border-right', this.tipRight],
['t','btn-borders-small btn-position-top', 'table-button-border-top', this.tipTop],
['m','btn-borders-small btn-position-inner-hor', 'table-button-border-inner-hor', this.tipInnerHor],
['b', 'btn-borders-small btn-position-bottom', 'table-button-border-bottom', this.tipBottom],
['cm', 'btn-borders-small btn-position-inner', 'table-button-border-inner', this.tipInner],
['lrtb', 'btn-borders-small btn-position-outer', 'table-button-border-outer', this.tipOuter],
['lrtbcm', 'btn-borders-small btn-position-all', 'table-button-border-all', this.tipAll],
['', 'btn-borders-small btn-position-none', 'table-button-border-none', this.tipNone]
];
this._btnsBorderPosition = [];
_.each(_arrBorderPosition, function(item, index, list){
var _btn = new Common.UI.Button({
cls: 'btn-toolbar',
iconCls: item[1],
strId :item[0],
hint: item[3]
});
_btn.render( $('#'+item[2])) ;
_btn.on('click', _.bind(this.onBtnBordersClick, this));
this._btnsBorderPosition.push( _btn );
this.lockedControls.push(_btn);
}, this);
this.cmbBorderSize = new Common.UI.ComboBorderSize({
el: $('#table-combo-border-size'),
style: "width: 93px;"
});
this.BorderSize = this.cmbBorderSize.store.at(1).get('value');
this.cmbBorderSize.setValue(this.BorderSize);
this.cmbBorderSize.on('selected', _.bind(this.onBorderSizeSelect, this));
this.lockedControls.push(this.cmbBorderSize);
this.btnEdit = new Common.UI.Button({
cls: 'btn-icon-default',
iconCls: 'btn-edit-table',
menu : new Common.UI.Menu({
menuAlign: 'tr-br',
items: [
{ caption: this.selectRowText, value: 0 },
{ caption: this.selectColumnText, value: 1 },
{ caption: this.selectCellText, value: 2 },
{ caption: this.selectTableText, value: 3 },
{ caption: '--' },
{ caption: this.insertRowAboveText, value: 4 },
{ caption: this.insertRowBelowText, value: 5 },
{ caption: this.insertColumnLeftText, value: 6 },
{ caption: this.insertColumnRightText, value: 7 },
{ caption: '--' },
{ caption: this.deleteRowText, value: 8 },
{ caption: this.deleteColumnText, value: 9 },
{ caption: this.deleteTableText, value: 10 },
{ caption: '--' },
{ caption: this.mergeCellsText, value: 11 },
{ caption: this.splitCellsText, value: 12 }
]
})
});
this.btnEdit.render( $('#table-btn-edit')) ;
this.mnuMerge = this.btnEdit.menu.items[this.btnEdit.menu.items.length-2];
this.mnuSplit = this.btnEdit.menu.items[this.btnEdit.menu.items.length-1];
this.btnEdit.menu.on('show:after', _.bind( function(){
if (this.api) {
this.mnuMerge.setDisabled(!this.api.CheckBeforeMergeCells());
this.mnuSplit.setDisabled(!this.api.CheckBeforeSplitCells());
}
}, this));
this.btnEdit.menu.on('item:click', _.bind(this.onEditClick, this));
this.lockedControls.push(this.btnEdit);
this.chRepeatRow = new Common.UI.CheckBox({
el: $('#table-checkbox-repeat-row'),
labelText: this.strRepeatRow
});
this.chRepeatRow.on('change', _.bind(this.onCheckRepeatRowChange, this));
this.lockedControls.push(this.chRepeatRow);
this.linkAdvanced = $('#table-advanced-link');
$(this.el).on('click', '#table-advanced-link', _.bind(this.openAdvancedSettings, this));
},
createDelayedElements: function() {
this.createDelayedControls();
this.UpdateThemeColors();
},
ChangeSettings: function(props) { ChangeSettings: function(props) {
if (this._initSettings)
this.createDelayedElements();
this._initSettings = false;
this.disableControls(this._locked); this.disableControls(this._locked);
if (props ) if (props )
@ -708,6 +621,7 @@ define([
}, },
_TblWrapStyleChanged: function(style) { _TblWrapStyleChanged: function(style) {
if (!this.btnWrapNone || !this.btnWrapParallel) return;
if ( this._state.WrapStyle!==style ) { if ( this._state.WrapStyle!==style ) {
this._noApply = true; this._noApply = true;
this.btnWrapNone.toggle((style==c_tableWrap.TABLE_WRAP_NONE), true); this.btnWrapNone.toggle((style==c_tableWrap.TABLE_WRAP_NONE), true);
@ -722,16 +636,73 @@ define([
}, },
UpdateThemeColors: function() { UpdateThemeColors: function() {
if (this.colorsBack) if (!this.btnBackColor) {
// create color buttons
this.btnBorderColor = new Common.UI.ColorButton({
style: "width:45px;",
menu : new Common.UI.Menu({
items: [
{ template: _.template('<div id="table-border-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
{ template: _.template('<a id="table-border-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
]
})
});
this.btnBorderColor.render( $('#table-border-color-btn'));
this.btnBorderColor.setColor('000000');
this.lockedControls.push(this.btnBorderColor);
this.borderColor = new Common.UI.ThemeColorPalette({
el: $('#table-border-color-menu')
});
this.borderColor.on('select', _.bind(this.onColorsBorderSelect, this));
$(this.el).on('click', '#table-border-color-new', _.bind(this.addNewColor, this, this.borderColor, this.btnBorderColor));
this.btnBackColor = new Common.UI.ColorButton({
style: "width:45px;",
menu : new Common.UI.Menu({
items: [
{ template: _.template('<div id="table-back-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
{ template: _.template('<a id="table-back-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
]
})
});
this.btnBackColor.render( $('#table-back-color-btn'));
this.lockedControls.push(this.btnBackColor);
this.colorsBack = new Common.UI.ThemeColorPalette({
el: $('#table-back-color-menu'),
transparent: true
});
this.colorsBack.on('select', _.bind(this.onColorsBackSelect, this));
$(this.el).on('click', '#table-back-color-new', _.bind(this.addNewColor, this, this.colorsBack, this.btnBackColor, this.btnBackColor));
}
this.colorsBack.updateColors(Common.Utils.ThemeColor.getEffectColors(), Common.Utils.ThemeColor.getStandartColors()); this.colorsBack.updateColors(Common.Utils.ThemeColor.getEffectColors(), Common.Utils.ThemeColor.getStandartColors());
if (this.borderColor)
this.borderColor.updateColors(Common.Utils.ThemeColor.getEffectColors(), Common.Utils.ThemeColor.getStandartColors()); this.borderColor.updateColors(Common.Utils.ThemeColor.getEffectColors(), Common.Utils.ThemeColor.getStandartColors());
this.btnBorderColor.setColor(this.borderColor.getColor());
}, },
_onInitTemplates: function(Templates){ _onInitTemplates: function(Templates){
var self = this; var self = this;
this._isTemplatesChanged = true; this._isTemplatesChanged = true;
if (!this.cmbTableTemplate) {
this.cmbTableTemplate = new Common.UI.ComboDataView({
itemWidth: 70,
itemHeight: 50,
menuMaxHeight: 300,
enableKeyEvents: true,
cls: 'combo-template'
});
this.cmbTableTemplate.render($('#table-combo-template'));
this.cmbTableTemplate.openButton.menu.cmpEl.css({
'min-width': 175,
'max-width': 175
});
this.cmbTableTemplate.on('click', _.bind(this.onTableTemplateSelect, this));
this.cmbTableTemplate.openButton.menu.on('show:after', function () {
self.cmbTableTemplate.menuPicker.scroller.update({alwaysVisibleY: true});
});
this.lockedControls.push(this.cmbTableTemplate);
}
var count = self.cmbTableTemplate.menuPicker.store.length; var count = self.cmbTableTemplate.menuPicker.store.length;
if (count>0 && count==Templates.length) { if (count>0 && count==Templates.length) {
var data = self.cmbTableTemplate.menuPicker.store.models; var data = self.cmbTableTemplate.menuPicker.store.models;
@ -794,6 +765,8 @@ define([
}, },
disableControls: function(disable) { disableControls: function(disable) {
if (this._initSettings) return;
if (this._state.DisabledControls!==disable) { if (this._state.DisabledControls!==disable) {
this._state.DisabledControls = disable; this._state.DisabledControls = disable;
_.each(this.lockedControls, function(item) { _.each(this.lockedControls, function(item) {
@ -840,8 +813,6 @@ define([
textLast : 'Last', textLast : 'Last',
textEmptyTemplate : 'No templates', textEmptyTemplate : 'No templates',
strRepeatRow : 'Repeat as header row at the top of each page', strRepeatRow : 'Repeat as header row at the top of each page',
textThemeColors : 'Theme Colors',
textStandartColors : 'Standart Colors',
tipTop: 'Set Outer Top Border Only', tipTop: 'Set Outer Top Border Only',
tipLeft: 'Set Outer Left Border Only', tipLeft: 'Set Outer Left Border Only',
tipBottom: 'Set Outer Bottom Border Only', tipBottom: 'Set Outer Bottom Border Only',

View file

@ -889,26 +889,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
this.btnBorderColor.on('render:after', function(btn) { this.btnBorderColor.on('render:after', function(btn) {
me.colorsBorder = new Common.UI.ThemeColorPalette({ me.colorsBorder = new Common.UI.ThemeColorPalette({
el: $('#tableadv-border-color-menu'), el: $('#tableadv-border-color-menu')
dynamiccolors: 10,
colors: [
me.textThemeColors, '-', {color: '3366FF', effectId: 1}, {color: '0000FF', effectId: 2}, {color: '000090', effectId: 3}, {color: '660066', effectId: 4}, {color: '800000', effectId: 5},
{color: 'FF0000', effectId: 1}, {color: 'FF6600', effectId: 1}, {color: 'FFFF00', effectId: 2}, {color: 'CCFFCC', effectId: 3}, {color: '008000', effectId: 4},
'-',
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2}, {color: '000000', effectId: 3}, {color: 'FFFFFF', effectId: 4}, {color: '000000', effectId: 5},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
'-', '--', '-', me.textStandartColors, '-',
'3D55FE', '5301B3', '980ABD', 'B2275F', 'F83D26', 'F86A1D', 'F7AC16', 'F7CA12', 'FAFF44', 'D6EF39',
'-', '--'
]
}); });
me.colorsBorder.on('select', _.bind(me.onColorsBorderSelect, me)); me.colorsBorder.on('select', _.bind(me.onColorsBorderSelect, me));
}); });
@ -929,25 +910,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
this.btnBackColor.on('render:after', function(btn) { this.btnBackColor.on('render:after', function(btn) {
me.colorsBack = new Common.UI.ThemeColorPalette({ me.colorsBack = new Common.UI.ThemeColorPalette({
el: $('#tableadv-back-color-menu'), el: $('#tableadv-back-color-menu'),
dynamiccolors: 10, transparent: true
colors: [
me.textThemeColors, '-', {color: '3366FF', effectId: 1}, {color: '0000FF', effectId: 2}, {color: '000090', effectId: 3}, {color: '660066', effectId: 4}, {color: '800000', effectId: 5},
{color: 'FF0000', effectId: 1}, {color: 'FF6600', effectId: 1}, {color: 'FFFF00', effectId: 2}, {color: 'CCFFCC', effectId: 3}, {color: '008000', effectId: 4},
'-',
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2}, {color: '000000', effectId: 3}, {color: 'FFFFFF', effectId: 4}, {color: '000000', effectId: 5},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
'-', '--', '-', me.textStandartColors, '-', 'transparent',
'5301B3', '980ABD', 'B2275F', 'F83D26', 'F86A1D', 'F7AC16', 'F7CA12', 'FAFF44', 'D6EF39',
'-', '--'
]
}); });
me.colorsBack.on('select', _.bind(me.onColorsBackSelect, me)); me.colorsBack.on('select', _.bind(me.onColorsBackSelect, me));
}); });
@ -967,25 +930,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
this.btnTableBackColor.on('render:after', function(btn) { this.btnTableBackColor.on('render:after', function(btn) {
me.colorsTableBack = new Common.UI.ThemeColorPalette({ me.colorsTableBack = new Common.UI.ThemeColorPalette({
el: $('#tableadv-table-back-color-menu'), el: $('#tableadv-table-back-color-menu'),
dynamiccolors: 10, transparent: true
colors: [
me.textThemeColors, '-', {color: '3366FF', effectId: 1}, {color: '0000FF', effectId: 2}, {color: '000090', effectId: 3}, {color: '660066', effectId: 4}, {color: '800000', effectId: 5},
{color: 'FF0000', effectId: 1}, {color: 'FF6600', effectId: 1}, {color: 'FFFF00', effectId: 2}, {color: 'CCFFCC', effectId: 3}, {color: '008000', effectId: 4},
'-',
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2}, {color: '000000', effectId: 3}, {color: 'FFFFFF', effectId: 4}, {color: '000000', effectId: 5},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
'-', '--', '-', me.textStandartColors, '-', 'transparent',
'5301B3', '980ABD', 'B2275F', 'F83D26', 'F86A1D', 'F7AC16', 'F7CA12', 'FAFF44', 'D6EF39',
'-', '--'
]
}); });
me.colorsTableBack.on('select', _.bind(me.onColorsTableBackSelect, me)); me.colorsTableBack.on('select', _.bind(me.onColorsTableBackSelect, me));
}); });
@ -1253,7 +1198,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
if (cellWidth !== null) if (cellWidth !== null)
this.nfPrefWidth.setValue(cellWidth>0 ? Common.Utils.Metric.fnRecalcFromMM(cellWidth) : -cellWidth , true); this.nfPrefWidth.setValue(cellWidth>0 ? Common.Utils.Metric.fnRecalcFromMM(cellWidth) : -cellWidth , true);
this.chPrefWidth.setValue(cellWidth !== null, true); this.chPrefWidth.setValue((props.get_CellsWidthNotEqual()) ? 'indeterminate' : (cellWidth !== null), true);
value = (this.chPrefWidth.getValue()!=='checked'); value = (this.chPrefWidth.getValue()!=='checked');
this.nfPrefWidth.setDisabled(value); this.nfPrefWidth.setDisabled(value);
this.cmbPrefWidthUnit.setDisabled(value); this.cmbPrefWidthUnit.setDisabled(value);
@ -2141,8 +2086,6 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
okButtonText: 'Ok', okButtonText: 'Ok',
txtNoBorders: 'No borders', txtNoBorders: 'No borders',
textNewColor: 'Add New Custom Color', textNewColor: 'Add New Custom Color',
textThemeColors : 'Theme Colors',
textStandartColors : 'Standart Colors',
textCenter: 'Center', textCenter: 'Center',
textMargin: 'Margin', textMargin: 'Margin',
textPage: 'Page', textPage: 'Page',

View file

@ -69,7 +69,6 @@ define([
}, },
initialize: function () { initialize: function () {
var me = this;
this._initSettings = true; this._initSettings = true;
this._noApply = true; this._noApply = true;
this.imgprops = null; this.imgprops = null;
@ -86,6 +85,7 @@ define([
StrokeType: Asc.c_oAscStrokeType.STROKE_COLOR, StrokeType: Asc.c_oAscStrokeType.STROKE_COLOR,
StrokeWidth: this._pt2mm(1), StrokeWidth: this._pt2mm(1),
StrokeColor: '000000', StrokeColor: '000000',
StrokeBorderType: Asc.c_oDashType.solid,
GradColor: '000000', GradColor: '000000',
GradFillType: Asc.c_oAscFillGradType.GRAD_LINEAR, GradFillType: Asc.c_oAscFillGradType.GRAD_LINEAR,
FormId: null, FormId: null,
@ -103,300 +103,10 @@ define([
this.BorderColor = {Value: 1, Color: 'transparent'}; // value=1 - цвет определен - прозрачный или другой, value=0 - цвет не определен, рисуем прозрачным this.BorderColor = {Value: 1, Color: 'transparent'}; // value=1 - цвет определен - прозрачный или другой, value=0 - цвет не определен, рисуем прозрачным
this.BorderSize = 0; this.BorderSize = 0;
this.BorderType = Asc.c_oDashType.solid;
this.render(); this.render();
this.cmbTextArt = new Common.UI.ComboDataView({
itemWidth: 50,
itemHeight: 50,
menuMaxHeight: 300,
enableKeyEvents: true,
showLast: false,
cls: 'combo-textart'
});
this.cmbTextArt.render($('#textart-combo-template'));
this.cmbTextArt.openButton.menu.cmpEl.css({
'min-width': 178,
'max-width': 178
});
this.cmbTextArt.on('click', _.bind(this.onTextArtSelect, this));
this.cmbTextArt.openButton.menu.on('show:after', function () {
me.cmbTextArt.menuPicker.scroller.update({alwaysVisibleY: true});
});
this.lockedControls.push(this.cmbTextArt);
this._arrFillSrc = [
{displayValue: this.textColor, value: Asc.c_oAscFill.FILL_TYPE_SOLID},
{displayValue: this.textGradientFill, value: Asc.c_oAscFill.FILL_TYPE_GRAD},
{displayValue: this.textNoFill, value: Asc.c_oAscFill.FILL_TYPE_NOFILL}
];
this.cmbFillSrc = new Common.UI.ComboBox({
el: $('#textart-combo-fill-src'),
cls: 'input-group-nr',
style: 'width: 100%;',
menuStyle: 'min-width: 190px;',
editable: false,
data: this._arrFillSrc
});
this.cmbFillSrc.setValue(this._arrFillSrc[0].value);
this.cmbFillSrc.on('selected', _.bind(this.onFillSrcSelect, this));
this.lockedControls.push(this.cmbFillSrc);
this.btnBackColor = new Common.UI.ColorButton({
style: "width:45px;",
menu : new Common.UI.Menu({
items: [
{ template: _.template('<div id="textart-back-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
{ template: _.template('<a id="textart-back-color-new" style="padding-left:12px;">' + me.textNewColor + '</a>') }
]
})
});
this.btnBackColor.on('render:after', function(btn) {
me.colorsBack = new Common.UI.ThemeColorPalette({
el: $('#textart-back-color-menu'),
dynamiccolors: 10,
value: 'transparent',
colors: [
me.textThemeColors, '-', {color: '3366FF', effectId: 1}, {color: '0000FF', effectId: 2}, {color: '000090', effectId: 3}, {color: '660066', effectId: 4}, {color: '800000', effectId: 5},
{color: 'FF0000', effectId: 1}, {color: 'FF6600', effectId: 1}, {color: 'FFFF00', effectId: 2}, {color: 'CCFFCC', effectId: 3}, {color: '008000', effectId: 4},
'-',
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2}, {color: '000000', effectId: 3}, {color: 'FFFFFF', effectId: 4}, {color: '000000', effectId: 5},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
'-', '--', '-', me.textStandartColors, '-', 'transparent',
'5301B3', '980ABD', 'B2275F', 'F83D26', 'F86A1D', 'F7AC16', 'F7CA12', 'FAFF44', 'D6EF39',
'-', '--'
]
});
me.colorsBack.on('select', _.bind(me.onColorsBackSelect, me));
});
this.btnBackColor.render( $('#textart-back-color-btn'));
this.btnBackColor.setColor('transparent');
$(this.el).on('click', '#textart-back-color-new', _.bind(this.addNewColor, this, this.colorsBack, this.btnBackColor));
this.lockedControls.push(this.btnBackColor);
this.numTransparency = new Common.UI.MetricSpinner({
el: $('#textart-spin-transparency'),
step: 1,
width: 62,
value: '100 %',
defaultUnit : "%",
maxValue: 100,
minValue: 0
});
this.numTransparency.on('change', _.bind(this.onNumTransparencyChange, this));
this.lockedControls.push(this.numTransparency);
this.sldrTransparency = new Common.UI.SingleSlider({
el: $('#textart-slider-transparency'),
width: 75,
minValue: 0,
maxValue: 100,
value: 100
});
this.sldrTransparency.on('change', _.bind(this.onTransparencyChange, this));
this.sldrTransparency.on('changecomplete', _.bind(this.onTransparencyChangeComplete, this));
this.lockedControls.push(this.sldrTransparency);
this.lblTransparencyStart = $(this.el).find('#textart-lbl-transparency-start');
this.lblTransparencyEnd = $(this.el).find('#textart-lbl-transparency-end');
this._arrGradType = [
{displayValue: this.textLinear, value: Asc.c_oAscFillGradType.GRAD_LINEAR},
{displayValue: this.textRadial, value: Asc.c_oAscFillGradType.GRAD_PATH}
];
this.cmbGradType = new Common.UI.ComboBox({
el: $('#textart-combo-grad-type'),
cls: 'input-group-nr',
menuStyle: 'min-width: 90px;',
editable: false,
data: this._arrGradType
});
this.cmbGradType.setValue(this._arrGradType[0].value);
this.cmbGradType.on('selected', _.bind(this.onGradTypeSelect, this));
this.lockedControls.push(this.cmbGradType);
this._viewDataLinear = [
{ offsetx: 0, offsety: 0, type:45, subtype:-1, iconcls:'gradient-left-top' },
{ offsetx: 50, offsety: 0, type:90, subtype:4, iconcls:'gradient-top'},
{ offsetx: 100, offsety: 0, type:135, subtype:5, iconcls:'gradient-right-top'},
{ offsetx: 0, offsety: 50, type:0, subtype:6, iconcls:'gradient-left', cls: 'item-gradient-separator', selected: true},
{ offsetx: 100, offsety: 50, type:180, subtype:1, iconcls:'gradient-right'},
{ offsetx: 0, offsety: 100, type:315, subtype:2, iconcls:'gradient-left-bottom'},
{ offsetx: 50, offsety: 100, type:270, subtype:3, iconcls:'gradient-bottom'},
{ offsetx: 100, offsety: 100, type:225, subtype:7, iconcls:'gradient-right-bottom'}
];
this._viewDataRadial = [
{ offsetx: 100, offsety: 150, type:2, subtype:5, iconcls:'gradient-radial-center'}
];
this.btnDirection = new Common.UI.Button({
cls : 'btn-large-dataview',
iconCls : 'item-gradient gradient-left',
menu : new Common.UI.Menu({
style: 'min-width: 60px;',
menuAlign: 'tr-br',
items: [
{ template: _.template('<div id="id-textart-menu-direction" style="width: 175px; margin: 0 5px;"></div>') }
]
})
});
this.btnDirection.on('render:after', function(btn) {
me.mnuDirectionPicker = new Common.UI.DataView({
el: $('#id-textart-menu-direction'),
parentMenu: btn.menu,
restoreHeight: 174,
store: new Common.UI.DataViewStore(me._viewDataLinear),
itemTemplate: _.template('<div id="<%= id %>" class="item-gradient" style="background-position: -<%= offsetx %>px -<%= offsety %>px;"></div>')
});
});
this.btnDirection.render($('#textart-button-direction'));
this.mnuDirectionPicker.on('item:click', _.bind(this.onSelectGradient, this, this.btnDirection));
this.lockedControls.push(this.btnDirection);
this.btnGradColor = new Common.UI.ColorButton({
style: "width:45px;",
menu : new Common.UI.Menu({
items: [
{ template: _.template('<div id="textart-gradient-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
{ template: _.template('<a id="textart-gradient-color-new" style="padding-left:12px;">' + me.textNewColor + '</a>') }
]
})
});
this.btnGradColor.on('render:after', function(btn) {
me.colorsGrad = new Common.UI.ThemeColorPalette({
el: $('#textart-gradient-color-menu'),
dynamiccolors: 10,
value: '000000',
colors: [
me.textThemeColors, '-', {color: '3366FF', effectId: 1}, {color: '0000FF', effectId: 2}, {color: '000090', effectId: 3}, {color: '660066', effectId: 4}, {color: '800000', effectId: 5},
{color: 'FF0000', effectId: 1}, {color: 'FF6600', effectId: 1}, {color: 'FFFF00', effectId: 2}, {color: 'CCFFCC', effectId: 3}, {color: '008000', effectId: 4},
'-',
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2}, {color: '000000', effectId: 3}, {color: 'FFFFFF', effectId: 4}, {color: '000000', effectId: 5},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
'-', '--', '-', me.textStandartColors, '-',
'3D55FE', '5301B3', '980ABD', 'B2275F', 'F83D26', 'F86A1D', 'F7AC16', 'F7CA12', 'FAFF44', 'D6EF39',
'-', '--'
]
});
me.colorsGrad.on('select', _.bind(me.onColorsGradientSelect, me));
});
this.btnGradColor.render( $('#textart-gradient-color-btn'));
this.btnGradColor.setColor('000000');
$(this.el).on('click', '#textart-gradient-color-new', _.bind(this.addNewColor, this, this.colorsGrad, this.btnGradColor));
this.lockedControls.push(this.btnGradColor);
this.sldrGradient = new Common.UI.MultiSliderGradient({
el: $('#textart-slider-gradient'),
width: 125,
minValue: 0,
maxValue: 100,
values: [0, 100]
});
this.sldrGradient.on('change', _.bind(this.onGradientChange, this));
this.sldrGradient.on('changecomplete', _.bind(this.onGradientChangeComplete, this));
this.sldrGradient.on('thumbclick', function(cmp, index){
me.GradColor.currentIdx = index;
var color = me.GradColor.colors[me.GradColor.currentIdx];
me.btnGradColor.setColor(color);
me.colorsGrad.select(color,false);
});
this.sldrGradient.on('thumbdblclick', function(cmp){
me.btnGradColor.cmpEl.find('button').dropdown('toggle');
});
this.lockedControls.push(this.sldrGradient);
this.cmbBorderSize = new Common.UI.ComboBorderSizeEditable({
el: $('#textart-combo-border-size'),
style: "width: 93px;",
txtNoBorders: this.txtNoBorders
})
.on('selected', _.bind(this.onBorderSizeSelect, this))
.on('changed:before',_.bind(this.onBorderSizeChanged, this, true))
.on('changed:after', _.bind(this.onBorderSizeChanged, this, false))
.on('combo:blur', _.bind(this.onComboBlur, this, false));
this.BorderSize = this.cmbBorderSize.store.at(2).get('value');
this.cmbBorderSize.setValue(this.BorderSize);
this.lockedControls.push(this.cmbBorderSize);
this.btnBorderColor = new Common.UI.ColorButton({
style: "width:45px;",
menu : new Common.UI.Menu({
items: [
{ template: _.template('<div id="textart-border-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
{ template: _.template('<a id="textart-border-color-new" style="padding-left:12px;">' + me.textNewColor + '</a>') }
]
})
});
this.lockedControls.push(this.btnBorderColor);
this.btnBorderColor.on('render:after', function(btn) {
me.colorsBorder = new Common.UI.ThemeColorPalette({
el: $('#textart-border-color-menu'),
dynamiccolors: 10,
value: '000000',
colors: [
me.textThemeColors, '-', {color: '3366FF', effectId: 1}, {color: '0000FF', effectId: 2}, {color: '000090', effectId: 3}, {color: '660066', effectId: 4}, {color: '800000', effectId: 5},
{color: 'FF0000', effectId: 1}, {color: 'FF6600', effectId: 1}, {color: 'FFFF00', effectId: 2}, {color: 'CCFFCC', effectId: 3}, {color: '008000', effectId: 4},
'-',
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2}, {color: '000000', effectId: 3}, {color: 'FFFFFF', effectId: 4}, {color: '000000', effectId: 5},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
'-', '--', '-', me.textStandartColors, '-',
'3D55FE', '5301B3', '980ABD', 'B2275F', 'F83D26', 'F86A1D', 'F7AC16', 'F7CA12', 'FAFF44', 'D6EF39',
'-', '--'
]
});
me.colorsBorder.on('select', _.bind(me.onColorsBorderSelect, me));
});
this.btnBorderColor.render( $('#textart-border-color-btn'));
this.btnBorderColor.setColor('000000');
$(this.el).on('click', '#textart-border-color-new', _.bind(this.addNewColor, this, this.colorsBorder, this.btnBorderColor));
this.cmbTransform = new Common.UI.ComboDataView({
itemWidth: 50,
itemHeight: 50,
menuMaxHeight: 300,
enableKeyEvents: true,
cls: 'combo-textart'
});
this.cmbTransform.render($('#textart-combo-transform'));
this.cmbTransform.openButton.menu.cmpEl.css({
'min-width': 178,
'max-width': 178
});
this.cmbTransform.on('click', _.bind(this.onTransformSelect, this));
this.cmbTransform.openButton.menu.on('show:after', function () {
me.cmbTransform.menuPicker.scroller.update({alwaysVisibleY: true});
});
this.lockedControls.push(this.cmbTransform);
this.FillColorContainer = $('#textart-panel-color-fill'); this.FillColorContainer = $('#textart-panel-color-fill');
this.FillGradientContainer = $('#textart-panel-gradient-fill'); this.FillGradientContainer = $('#textart-panel-gradient-fill');
this.TransparencyContainer = $('#textart-panel-transparent-fill'); this.TransparencyContainer = $('#textart-panel-transparent-fill');
@ -716,6 +426,7 @@ define([
stroke.put_color(Common.Utils.ThemeColor.getRgbColor({color: '000000', effectId: 29})); stroke.put_color(Common.Utils.ThemeColor.getRgbColor({color: '000000', effectId: 29}));
else if (this._state.StrokeType == Asc.c_oAscStrokeType.STROKE_NONE || this._state.StrokeType === null) else if (this._state.StrokeType == Asc.c_oAscStrokeType.STROKE_NONE || this._state.StrokeType === null)
stroke.put_color(Common.Utils.ThemeColor.getRgbColor(Common.Utils.ThemeColor.colorValue2EffectId(this.BorderColor.Color))); stroke.put_color(Common.Utils.ThemeColor.getRgbColor(Common.Utils.ThemeColor.colorValue2EffectId(this.BorderColor.Color)));
stroke.asc_putPrstDash(this.BorderType);
stroke.put_width(this._pt2mm(this.BorderSize)); stroke.put_width(this._pt2mm(this.BorderSize));
} }
props.asc_putLine(stroke); props.asc_putLine(stroke);
@ -753,6 +464,26 @@ define([
this.applyBorderSize(record.value); this.applyBorderSize(record.value);
}, },
onBorderTypeSelect: function(combo, record) {
this.BorderType = record.value;
if (this.api && !this._noApply) {
var props = new Asc.asc_TextArtProperties();
var stroke = new Asc.asc_CStroke();
if (this.BorderSize<0.01) {
stroke.put_type( Asc.c_oAscStrokeType.STROKE_NONE);
} else {
stroke.put_type( Asc.c_oAscStrokeType.STROKE_COLOR);
stroke.put_color(Common.Utils.ThemeColor.getRgbColor(this.BorderColor.Color));
stroke.put_width(this._pt2mm(this.BorderSize));
stroke.asc_putPrstDash(this.BorderType);
}
props.asc_putLine(stroke);
this.shapeprops.put_TextArtProperties(props);
this.api.ImgApply(this.imgprops);
}
this.fireEvent('editcomplete', this);
},
onColorsBorderSelect: function(picker, color) { onColorsBorderSelect: function(picker, color) {
this.btnBorderColor.setColor(color); this.btnBorderColor.setColor(color);
this.BorderColor = {Value: 1, Color: color}; this.BorderColor = {Value: 1, Color: color};
@ -765,6 +496,7 @@ define([
stroke.put_type( Asc.c_oAscStrokeType.STROKE_COLOR); stroke.put_type( Asc.c_oAscStrokeType.STROKE_COLOR);
stroke.put_color(Common.Utils.ThemeColor.getRgbColor(this.BorderColor.Color)); stroke.put_color(Common.Utils.ThemeColor.getRgbColor(this.BorderColor.Color));
stroke.put_width(this._pt2mm(this.BorderSize)); stroke.put_width(this._pt2mm(this.BorderSize));
stroke.asc_putPrstDash(this.BorderType);
} }
props.asc_putLine(stroke); props.asc_putLine(stroke);
this.shapeprops.put_TextArtProperties(props); this.shapeprops.put_TextArtProperties(props);
@ -940,7 +672,8 @@ define([
// border colors // border colors
var stroke = shapeprops.asc_getLine(), var stroke = shapeprops.asc_getLine(),
strokeType = (stroke) ? stroke.get_type() : null; strokeType = (stroke) ? stroke.get_type() : null,
borderType;
if (stroke) { if (stroke) {
if ( strokeType == Asc.c_oAscStrokeType.STROKE_COLOR ) { if ( strokeType == Asc.c_oAscStrokeType.STROKE_COLOR ) {
@ -957,6 +690,7 @@ define([
} else { } else {
this.BorderColor = {Value: 1, Color: 'transparent'}; this.BorderColor = {Value: 1, Color: 'transparent'};
} }
borderType = stroke.asc_getPrstDash();
} else { // no stroke } else { // no stroke
this.BorderColor = {Value: 0, Color: 'transparent'}; this.BorderColor = {Value: 0, Color: 'transparent'};
} }
@ -1018,6 +752,11 @@ define([
this._state.StrokeType = strokeType; this._state.StrokeType = strokeType;
} }
if (this._state.StrokeBorderType !== borderType) {
this.BorderType = this._state.StrokeBorderType = borderType;
this.cmbBorderType.setValue(borderType);
}
color = this.GradColor.colors[this.GradColor.currentIdx]; color = this.GradColor.colors[this.GradColor.currentIdx];
type1 = typeof(color); type1 = typeof(color);
type2 = typeof(this._state.GradColor); type2 = typeof(this._state.GradColor);
@ -1058,14 +797,201 @@ define([
} }
}, },
createDelayedControls: function() {
var me = this;
this._arrFillSrc = [
{displayValue: this.textColor, value: Asc.c_oAscFill.FILL_TYPE_SOLID},
{displayValue: this.textGradientFill, value: Asc.c_oAscFill.FILL_TYPE_GRAD},
{displayValue: this.textNoFill, value: Asc.c_oAscFill.FILL_TYPE_NOFILL}
];
this.cmbFillSrc = new Common.UI.ComboBox({
el: $('#textart-combo-fill-src'),
cls: 'input-group-nr',
style: 'width: 100%;',
menuStyle: 'min-width: 190px;',
editable: false,
data: this._arrFillSrc
});
this.cmbFillSrc.setValue(this._arrFillSrc[0].value);
this.cmbFillSrc.on('selected', _.bind(this.onFillSrcSelect, this));
this.lockedControls.push(this.cmbFillSrc);
this.numTransparency = new Common.UI.MetricSpinner({
el: $('#textart-spin-transparency'),
step: 1,
width: 62,
value: '100 %',
defaultUnit : "%",
maxValue: 100,
minValue: 0
});
this.numTransparency.on('change', _.bind(this.onNumTransparencyChange, this));
this.lockedControls.push(this.numTransparency);
this.sldrTransparency = new Common.UI.SingleSlider({
el: $('#textart-slider-transparency'),
width: 75,
minValue: 0,
maxValue: 100,
value: 100
});
this.sldrTransparency.on('change', _.bind(this.onTransparencyChange, this));
this.sldrTransparency.on('changecomplete', _.bind(this.onTransparencyChangeComplete, this));
this.lockedControls.push(this.sldrTransparency);
this.lblTransparencyStart = $(this.el).find('#textart-lbl-transparency-start');
this.lblTransparencyEnd = $(this.el).find('#textart-lbl-transparency-end');
this._arrGradType = [
{displayValue: this.textLinear, value: Asc.c_oAscFillGradType.GRAD_LINEAR},
{displayValue: this.textRadial, value: Asc.c_oAscFillGradType.GRAD_PATH}
];
this.cmbGradType = new Common.UI.ComboBox({
el: $('#textart-combo-grad-type'),
cls: 'input-group-nr',
menuStyle: 'min-width: 90px;',
editable: false,
data: this._arrGradType
});
this.cmbGradType.setValue(this._arrGradType[0].value);
this.cmbGradType.on('selected', _.bind(this.onGradTypeSelect, this));
this.lockedControls.push(this.cmbGradType);
this._viewDataLinear = [
{ offsetx: 0, offsety: 0, type:45, subtype:-1, iconcls:'gradient-left-top' },
{ offsetx: 50, offsety: 0, type:90, subtype:4, iconcls:'gradient-top'},
{ offsetx: 100, offsety: 0, type:135, subtype:5, iconcls:'gradient-right-top'},
{ offsetx: 0, offsety: 50, type:0, subtype:6, iconcls:'gradient-left', cls: 'item-gradient-separator', selected: true},
{ offsetx: 100, offsety: 50, type:180, subtype:1, iconcls:'gradient-right'},
{ offsetx: 0, offsety: 100, type:315, subtype:2, iconcls:'gradient-left-bottom'},
{ offsetx: 50, offsety: 100, type:270, subtype:3, iconcls:'gradient-bottom'},
{ offsetx: 100, offsety: 100, type:225, subtype:7, iconcls:'gradient-right-bottom'}
];
this._viewDataRadial = [
{ offsetx: 100, offsety: 150, type:2, subtype:5, iconcls:'gradient-radial-center'}
];
this.btnDirection = new Common.UI.Button({
cls : 'btn-large-dataview',
iconCls : 'item-gradient gradient-left',
menu : new Common.UI.Menu({
style: 'min-width: 60px;',
menuAlign: 'tr-br',
items: [
{ template: _.template('<div id="id-textart-menu-direction" style="width: 175px; margin: 0 5px;"></div>') }
]
})
});
this.btnDirection.on('render:after', function(btn) {
me.mnuDirectionPicker = new Common.UI.DataView({
el: $('#id-textart-menu-direction'),
parentMenu: btn.menu,
restoreHeight: 174,
store: new Common.UI.DataViewStore(me._viewDataLinear),
itemTemplate: _.template('<div id="<%= id %>" class="item-gradient" style="background-position: -<%= offsetx %>px -<%= offsety %>px;"></div>')
});
});
this.btnDirection.render($('#textart-button-direction'));
this.mnuDirectionPicker.on('item:click', _.bind(this.onSelectGradient, this, this.btnDirection));
this.lockedControls.push(this.btnDirection);
this.sldrGradient = new Common.UI.MultiSliderGradient({
el: $('#textart-slider-gradient'),
width: 125,
minValue: 0,
maxValue: 100,
values: [0, 100]
});
this.sldrGradient.on('change', _.bind(this.onGradientChange, this));
this.sldrGradient.on('changecomplete', _.bind(this.onGradientChangeComplete, this));
this.sldrGradient.on('thumbclick', function(cmp, index){
me.GradColor.currentIdx = index;
var color = me.GradColor.colors[me.GradColor.currentIdx];
me.btnGradColor.setColor(color);
me.colorsGrad.select(color,false);
});
this.sldrGradient.on('thumbdblclick', function(cmp){
me.btnGradColor.cmpEl.find('button').dropdown('toggle');
});
this.lockedControls.push(this.sldrGradient);
this.cmbBorderSize = new Common.UI.ComboBorderSizeEditable({
el: $('#textart-combo-border-size'),
style: "width: 93px;",
txtNoBorders: this.txtNoBorders
})
.on('selected', _.bind(this.onBorderSizeSelect, this))
.on('changed:before',_.bind(this.onBorderSizeChanged, this, true))
.on('changed:after', _.bind(this.onBorderSizeChanged, this, false))
.on('combo:blur', _.bind(this.onComboBlur, this, false));
this.BorderSize = this.cmbBorderSize.store.at(2).get('value');
this.cmbBorderSize.setValue(this.BorderSize);
this.lockedControls.push(this.cmbBorderSize);
this.cmbBorderType = new Common.UI.ComboBorderType({
el: $('#textart-combo-border-type'),
style: "width: 93px;",
menuStyle: 'min-width: 93px;'
}).on('selected', _.bind(this.onBorderTypeSelect, this))
.on('combo:blur', _.bind(this.onComboBlur, this, false));
this.BorderType = Asc.c_oDashType.solid;
this.cmbBorderType.setValue(this.BorderType);
this.lockedControls.push(this.cmbBorderType);
this.cmbTransform = new Common.UI.ComboDataView({
itemWidth: 50,
itemHeight: 50,
menuMaxHeight: 300,
enableKeyEvents: true,
cls: 'combo-textart'
});
this.cmbTransform.render($('#textart-combo-transform'));
this.cmbTransform.openButton.menu.cmpEl.css({
'min-width': 178,
'max-width': 178
});
this.cmbTransform.on('click', _.bind(this.onTransformSelect, this));
this.cmbTransform.openButton.menu.on('show:after', function () {
me.cmbTransform.menuPicker.scroller.update({alwaysVisibleY: true});
});
this.lockedControls.push(this.cmbTransform);
},
createDelayedElements: function() { createDelayedElements: function() {
this.createDelayedControls();
this.UpdateThemeColors(); this.UpdateThemeColors();
this.fillTransform(this.api.asc_getPropertyEditorTextArts()); this.fillTransform(this.api.asc_getPropertyEditorTextArts());
}, },
fillTextArt: function() { fillTextArt: function() {
var me = this, var me = this;
models = this.application.getCollection('Common.Collections.TextArt').models,
if (!this.cmbTextArt) {
this.cmbTextArt = new Common.UI.ComboDataView({
itemWidth: 50,
itemHeight: 50,
menuMaxHeight: 300,
enableKeyEvents: true,
showLast: false,
cls: 'combo-textart'
});
this.cmbTextArt.render($('#textart-combo-template'));
this.cmbTextArt.openButton.menu.cmpEl.css({
'min-width': 178,
'max-width': 178
});
this.cmbTextArt.on('click', _.bind(this.onTextArtSelect, this));
this.cmbTextArt.openButton.menu.on('show:after', function () {
me.cmbTextArt.menuPicker.scroller.update({alwaysVisibleY: true});
});
this.lockedControls.push(this.cmbTextArt);
}
var models = this.application.getCollection('Common.Collections.TextArt').models,
count = this.cmbTextArt.menuPicker.store.length; count = this.cmbTextArt.menuPicker.store.length;
if (count>0 && count==models.length) { if (count>0 && count==models.length) {
var data = this.cmbTextArt.menuPicker.store.models; var data = this.cmbTextArt.menuPicker.store.models;
@ -1123,6 +1049,66 @@ define([
}, },
UpdateThemeColors: function() { UpdateThemeColors: function() {
if (!this.btnBackColor) {
this.btnBorderColor = new Common.UI.ColorButton({
style: "width:45px;",
menu : new Common.UI.Menu({
items: [
{ template: _.template('<div id="textart-border-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
{ template: _.template('<a id="textart-border-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
]
})
});
this.btnBorderColor.render( $('#textart-border-color-btn'));
this.btnBorderColor.setColor('000000');
this.lockedControls.push(this.btnBorderColor);
this.colorsBorder = new Common.UI.ThemeColorPalette({
el: $('#textart-border-color-menu'),
value: '000000'
});
this.colorsBorder.on('select', _.bind(this.onColorsBorderSelect, this));
$(this.el).on('click', '#textart-border-color-new', _.bind(this.addNewColor, this, this.colorsBorder, this.btnBorderColor));
this.btnGradColor = new Common.UI.ColorButton({
style: "width:45px;",
menu : new Common.UI.Menu({
items: [
{ template: _.template('<div id="textart-gradient-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
{ template: _.template('<a id="textart-gradient-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
]
})
});
this.btnGradColor.render( $('#textart-gradient-color-btn'));
this.btnGradColor.setColor('000000');
this.lockedControls.push(this.btnGradColor);
this.colorsGrad = new Common.UI.ThemeColorPalette({
el: $('#textart-gradient-color-menu'),
value: '000000'
});
this.colorsGrad.on('select', _.bind(this.onColorsGradientSelect, this));
$(this.el).on('click', '#textart-gradient-color-new', _.bind(this.addNewColor, this, this.colorsGrad, this.btnGradColor));
this.btnBackColor = new Common.UI.ColorButton({
style: "width:45px;",
menu : new Common.UI.Menu({
items: [
{ template: _.template('<div id="textart-back-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
{ template: _.template('<a id="textart-back-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
]
})
});
this.btnBackColor.render( $('#textart-back-color-btn'));
this.btnBackColor.setColor('transparent');
this.lockedControls.push(this.btnBackColor);
this.colorsBack = new Common.UI.ThemeColorPalette({
el: $('#textart-back-color-menu'),
value: 'transparent',
transparent: true
});
this.colorsBack.on('select', _.bind(this.onColorsBackSelect, this));
$(this.el).on('click', '#textart-back-color-new', _.bind(this.addNewColor, this, this.colorsBack, this.btnBackColor));
}
this.colorsBorder.updateColors(Common.Utils.ThemeColor.getEffectColors(), Common.Utils.ThemeColor.getStandartColors()); this.colorsBorder.updateColors(Common.Utils.ThemeColor.getEffectColors(), Common.Utils.ThemeColor.getStandartColors());
this.colorsBack.updateColors(Common.Utils.ThemeColor.getEffectColors(), Common.Utils.ThemeColor.getStandartColors()); this.colorsBack.updateColors(Common.Utils.ThemeColor.getEffectColors(), Common.Utils.ThemeColor.getStandartColors());
this.colorsGrad.updateColors(Common.Utils.ThemeColor.getEffectColors(), Common.Utils.ThemeColor.getStandartColors()); this.colorsGrad.updateColors(Common.Utils.ThemeColor.getEffectColors(), Common.Utils.ThemeColor.getStandartColors());
@ -1147,6 +1133,8 @@ define([
}, },
disableControls: function(disable) { disableControls: function(disable) {
if (this._initSettings) return;
if (this._state.DisabledControls!==disable) { if (this._state.DisabledControls!==disable) {
this._state.DisabledControls = disable; this._state.DisabledControls = disable;
_.each(this.lockedControls, function(item) { _.each(this.lockedControls, function(item) {
@ -1162,8 +1150,6 @@ define([
strFill : 'Fill', strFill : 'Fill',
textColor : 'Color Fill', textColor : 'Color Fill',
textNewColor : 'Add New Custom Color', textNewColor : 'Add New Custom Color',
textThemeColors : 'Theme Colors',
textStandartColors : 'Standart Colors',
strTransparency : 'Opacity', strTransparency : 'Opacity',
textNoFill : 'No Fill', textNoFill : 'No Fill',
textSelectTexture : 'Select', textSelectTexture : 'Select',
@ -1175,6 +1161,7 @@ define([
textGradient: 'Gradient', textGradient: 'Gradient',
textBorderSizeErr: 'The entered value is incorrect.<br>Please enter a value between 0 pt and 1584 pt.', textBorderSizeErr: 'The entered value is incorrect.<br>Please enter a value between 0 pt and 1584 pt.',
textTransform: 'Transform', textTransform: 'Transform',
textTemplate: 'Template' textTemplate: 'Template',
strType: 'Type'
}, DE.Views.TextArtSettings || {})); }, DE.Views.TextArtSettings || {}));
}); });

File diff suppressed because it is too large Load diff

View file

@ -86,6 +86,8 @@
"Common.UI.SearchDialog.txtBtnReplaceAll": "Replace All", "Common.UI.SearchDialog.txtBtnReplaceAll": "Replace All",
"Common.UI.SynchronizeTip.textDontShow": "Don't show this message again", "Common.UI.SynchronizeTip.textDontShow": "Don't show this message again",
"Common.UI.SynchronizeTip.textSynchronize": "The document has been changed by another user.<br/>Please click to save your changes and reload the updates.", "Common.UI.SynchronizeTip.textSynchronize": "The document has been changed by another user.<br/>Please click to save your changes and reload the updates.",
"Common.UI.ThemeColorPalette.textStandartColors": "Standard Colors",
"Common.UI.ThemeColorPalette.textThemeColors": "Theme Colors",
"Common.UI.Window.cancelButtonText": "Cancel", "Common.UI.Window.cancelButtonText": "Cancel",
"Common.UI.Window.closeButtonText": "Close", "Common.UI.Window.closeButtonText": "Close",
"Common.UI.Window.noButtonText": "No", "Common.UI.Window.noButtonText": "No",
@ -157,7 +159,9 @@
"Common.Views.OpenDialog.okButtonText": "OK", "Common.Views.OpenDialog.okButtonText": "OK",
"Common.Views.OpenDialog.txtEncoding": "Encoding ", "Common.Views.OpenDialog.txtEncoding": "Encoding ",
"Common.Views.OpenDialog.txtTitle": "Choose %1 options", "Common.Views.OpenDialog.txtTitle": "Choose %1 options",
"Common.Views.Plugins.strPlugins": "Add-ons", "Common.Views.OpenDialog.txtPassword": "Password",
"Common.Views.OpenDialog.txtTitleProtected": "Protected File",
"Common.Views.Plugins.strPlugins": "Plugins",
"Common.Views.Plugins.textLoading": "Loading", "Common.Views.Plugins.textLoading": "Loading",
"Common.Views.Plugins.textStart": "Start", "Common.Views.Plugins.textStart": "Start",
"Common.Views.ReviewChanges.txtAccept": "Accept", "Common.Views.ReviewChanges.txtAccept": "Accept",
@ -205,6 +209,7 @@
"DE.Controllers.Main.errorUpdateVersion": "The file version has been changed. The page will be reloaded.", "DE.Controllers.Main.errorUpdateVersion": "The file version has been changed. The page will be reloaded.",
"DE.Controllers.Main.errorUserDrop": "The file cannot be accessed right now.", "DE.Controllers.Main.errorUserDrop": "The file cannot be accessed right now.",
"DE.Controllers.Main.errorUsersExceed": "The number of users allowed by the pricing plan was exceeded", "DE.Controllers.Main.errorUsersExceed": "The number of users allowed by the pricing plan was exceeded",
"DE.Controllers.Main.errorViewerDisconnect": "Connection is lost. You can still view the document,<br>but will not be able to download until the connection is restored.",
"DE.Controllers.Main.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.", "DE.Controllers.Main.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.",
"DE.Controllers.Main.loadFontsTextText": "Loading data...", "DE.Controllers.Main.loadFontsTextText": "Loading data...",
"DE.Controllers.Main.loadFontsTitleText": "Loading Data", "DE.Controllers.Main.loadFontsTitleText": "Loading Data",
@ -215,7 +220,7 @@
"DE.Controllers.Main.loadImageTextText": "Loading image...", "DE.Controllers.Main.loadImageTextText": "Loading image...",
"DE.Controllers.Main.loadImageTitleText": "Loading Image", "DE.Controllers.Main.loadImageTitleText": "Loading Image",
"DE.Controllers.Main.loadingDocumentTextText": "Loading document...", "DE.Controllers.Main.loadingDocumentTextText": "Loading document...",
"DE.Controllers.Main.loadingDocumentTitleText": "Loading Document", "DE.Controllers.Main.loadingDocumentTitleText": "Loading document",
"DE.Controllers.Main.mailMergeLoadFileText": "Loading Data Source...", "DE.Controllers.Main.mailMergeLoadFileText": "Loading Data Source...",
"DE.Controllers.Main.mailMergeLoadFileTitle": "Loading Data Source", "DE.Controllers.Main.mailMergeLoadFileTitle": "Loading Data Source",
"DE.Controllers.Main.notcriticalErrorTitle": "Warning", "DE.Controllers.Main.notcriticalErrorTitle": "Warning",
@ -272,6 +277,8 @@
"DE.Controllers.Main.warnBrowserZoom": "Your browser current zoom setting is not fully supported. Please reset to the default zoom by pressing Ctrl+0.", "DE.Controllers.Main.warnBrowserZoom": "Your browser current zoom setting is not fully supported. Please reset to the default zoom by pressing Ctrl+0.",
"DE.Controllers.Main.warnNoLicense": "You are using an open source version of ONLYOFFICE. The version has limitations for concurrent connections to the document server (20 connections at a time).<br>If you need more please consider purchasing a commercial license.", "DE.Controllers.Main.warnNoLicense": "You are using an open source version of ONLYOFFICE. The version has limitations for concurrent connections to the document server (20 connections at a time).<br>If you need more please consider purchasing a commercial license.",
"DE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.", "DE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.",
"DE.Controllers.Main.warnLicenseExp": "Your license has expired.<br>Please update your license and refresh the page.",
"DE.Controllers.Main.titleLicenseExp": "License expired",
"DE.Controllers.Statusbar.textHasChanges": "New changes have been tracked", "DE.Controllers.Statusbar.textHasChanges": "New changes have been tracked",
"DE.Controllers.Statusbar.textTrackChanges": "The document is opened with the Track Changes mode enabled", "DE.Controllers.Statusbar.textTrackChanges": "The document is opened with the Track Changes mode enabled",
"DE.Controllers.Statusbar.zoomText": "Zoom {0}%", "DE.Controllers.Statusbar.zoomText": "Zoom {0}%",
@ -841,8 +848,6 @@
"DE.Views.DropcapSettingsAdvanced.textRelative": "Relative to", "DE.Views.DropcapSettingsAdvanced.textRelative": "Relative to",
"DE.Views.DropcapSettingsAdvanced.textRight": "Right", "DE.Views.DropcapSettingsAdvanced.textRight": "Right",
"DE.Views.DropcapSettingsAdvanced.textRowHeight": "Height in rows", "DE.Views.DropcapSettingsAdvanced.textRowHeight": "Height in rows",
"DE.Views.DropcapSettingsAdvanced.textStandartColors": "Standard Colors",
"DE.Views.DropcapSettingsAdvanced.textThemeColors": "Theme Colors",
"DE.Views.DropcapSettingsAdvanced.textTitle": "Drop Cap - Advanced Settings", "DE.Views.DropcapSettingsAdvanced.textTitle": "Drop Cap - Advanced Settings",
"DE.Views.DropcapSettingsAdvanced.textTitleFrame": "Frame - Advanced Settings", "DE.Views.DropcapSettingsAdvanced.textTitleFrame": "Frame - Advanced Settings",
"DE.Views.DropcapSettingsAdvanced.textTop": "Top", "DE.Views.DropcapSettingsAdvanced.textTop": "Top",
@ -1031,7 +1036,7 @@
"DE.Views.LeftMenu.tipChat": "Chat", "DE.Views.LeftMenu.tipChat": "Chat",
"DE.Views.LeftMenu.tipComments": "Comments", "DE.Views.LeftMenu.tipComments": "Comments",
"DE.Views.LeftMenu.tipFile": "File", "DE.Views.LeftMenu.tipFile": "File",
"DE.Views.LeftMenu.tipPlugins": "Add-ons", "DE.Views.LeftMenu.tipPlugins": "Plugins",
"DE.Views.LeftMenu.tipSearch": "Search", "DE.Views.LeftMenu.tipSearch": "Search",
"DE.Views.LeftMenu.tipSupport": "Feedback & Support", "DE.Views.LeftMenu.tipSupport": "Feedback & Support",
"DE.Views.LeftMenu.tipTitles": "Titles", "DE.Views.LeftMenu.tipTitles": "Titles",
@ -1114,8 +1119,6 @@
"DE.Views.ParagraphSettings.textBackColor": "Background color", "DE.Views.ParagraphSettings.textBackColor": "Background color",
"DE.Views.ParagraphSettings.textExact": "Exactly", "DE.Views.ParagraphSettings.textExact": "Exactly",
"DE.Views.ParagraphSettings.textNewColor": "Add New Custom Color", "DE.Views.ParagraphSettings.textNewColor": "Add New Custom Color",
"DE.Views.ParagraphSettings.textStandartColors": "Standard Colors",
"DE.Views.ParagraphSettings.textThemeColors": "Theme Colors",
"DE.Views.ParagraphSettings.txtAutoText": "Auto", "DE.Views.ParagraphSettings.txtAutoText": "Auto",
"DE.Views.ParagraphSettingsAdvanced.cancelButtonText": "Cancel", "DE.Views.ParagraphSettingsAdvanced.cancelButtonText": "Cancel",
"DE.Views.ParagraphSettingsAdvanced.noTabs": "The specified tabs will appear in this field", "DE.Views.ParagraphSettingsAdvanced.noTabs": "The specified tabs will appear in this field",
@ -1156,12 +1159,10 @@
"DE.Views.ParagraphSettingsAdvanced.textRight": "Right", "DE.Views.ParagraphSettingsAdvanced.textRight": "Right",
"DE.Views.ParagraphSettingsAdvanced.textSet": "Specify", "DE.Views.ParagraphSettingsAdvanced.textSet": "Specify",
"DE.Views.ParagraphSettingsAdvanced.textSpacing": "Spacing", "DE.Views.ParagraphSettingsAdvanced.textSpacing": "Spacing",
"DE.Views.ParagraphSettingsAdvanced.textStandartColors": "Standard Colors",
"DE.Views.ParagraphSettingsAdvanced.textTabCenter": "Center", "DE.Views.ParagraphSettingsAdvanced.textTabCenter": "Center",
"DE.Views.ParagraphSettingsAdvanced.textTabLeft": "Left", "DE.Views.ParagraphSettingsAdvanced.textTabLeft": "Left",
"DE.Views.ParagraphSettingsAdvanced.textTabPosition": "Tab Position", "DE.Views.ParagraphSettingsAdvanced.textTabPosition": "Tab Position",
"DE.Views.ParagraphSettingsAdvanced.textTabRight": "Right", "DE.Views.ParagraphSettingsAdvanced.textTabRight": "Right",
"DE.Views.ParagraphSettingsAdvanced.textThemeColors": "Theme Colors",
"DE.Views.ParagraphSettingsAdvanced.textTitle": "Paragraph - Advanced Settings", "DE.Views.ParagraphSettingsAdvanced.textTitle": "Paragraph - Advanced Settings",
"DE.Views.ParagraphSettingsAdvanced.textTop": "Top", "DE.Views.ParagraphSettingsAdvanced.textTop": "Top",
"DE.Views.ParagraphSettingsAdvanced.tipAll": "Set Outer Border and All Inner Lines", "DE.Views.ParagraphSettingsAdvanced.tipAll": "Set Outer Border and All Inner Lines",
@ -1190,6 +1191,7 @@
"DE.Views.ShapeSettings.strSize": "Size", "DE.Views.ShapeSettings.strSize": "Size",
"DE.Views.ShapeSettings.strStroke": "Stroke", "DE.Views.ShapeSettings.strStroke": "Stroke",
"DE.Views.ShapeSettings.strTransparency": "Opacity", "DE.Views.ShapeSettings.strTransparency": "Opacity",
"DE.Views.ShapeSettings.strType": "Type",
"DE.Views.ShapeSettings.textAdvanced": "Show advanced settings", "DE.Views.ShapeSettings.textAdvanced": "Show advanced settings",
"DE.Views.ShapeSettings.textBorderSizeErr": "The entered value is incorrect.<br>Please enter a value between 0 pt and 1584 pt.", "DE.Views.ShapeSettings.textBorderSizeErr": "The entered value is incorrect.<br>Please enter a value between 0 pt and 1584 pt.",
"DE.Views.ShapeSettings.textColor": "Color Fill", "DE.Views.ShapeSettings.textColor": "Color Fill",
@ -1206,11 +1208,9 @@
"DE.Views.ShapeSettings.textPatternFill": "Pattern", "DE.Views.ShapeSettings.textPatternFill": "Pattern",
"DE.Views.ShapeSettings.textRadial": "Radial", "DE.Views.ShapeSettings.textRadial": "Radial",
"DE.Views.ShapeSettings.textSelectTexture": "Select", "DE.Views.ShapeSettings.textSelectTexture": "Select",
"DE.Views.ShapeSettings.textStandartColors": "Standard Colors",
"DE.Views.ShapeSettings.textStretch": "Stretch", "DE.Views.ShapeSettings.textStretch": "Stretch",
"DE.Views.ShapeSettings.textStyle": "Style", "DE.Views.ShapeSettings.textStyle": "Style",
"DE.Views.ShapeSettings.textTexture": "From Texture", "DE.Views.ShapeSettings.textTexture": "From Texture",
"DE.Views.ShapeSettings.textThemeColors": "Theme Colors",
"DE.Views.ShapeSettings.textTile": "Tile", "DE.Views.ShapeSettings.textTile": "Tile",
"DE.Views.ShapeSettings.textWrap": "Wrapping Style", "DE.Views.ShapeSettings.textWrap": "Wrapping Style",
"DE.Views.ShapeSettings.txtBehind": "Behind", "DE.Views.ShapeSettings.txtBehind": "Behind",
@ -1291,9 +1291,7 @@
"DE.Views.TableSettings.textOK": "OK", "DE.Views.TableSettings.textOK": "OK",
"DE.Views.TableSettings.textRows": "Rows", "DE.Views.TableSettings.textRows": "Rows",
"DE.Views.TableSettings.textSelectBorders": "Select borders you want to change applying style chosen above", "DE.Views.TableSettings.textSelectBorders": "Select borders you want to change applying style chosen above",
"DE.Views.TableSettings.textStandartColors": "Standard Colors",
"DE.Views.TableSettings.textTemplate": "Select From Template", "DE.Views.TableSettings.textTemplate": "Select From Template",
"DE.Views.TableSettings.textThemeColors": "Theme Colors",
"DE.Views.TableSettings.textTotal": "Total", "DE.Views.TableSettings.textTotal": "Total",
"DE.Views.TableSettings.textWrap": "Text Wrapping", "DE.Views.TableSettings.textWrap": "Text Wrapping",
"DE.Views.TableSettings.textWrapNoneTooltip": "Inline table", "DE.Views.TableSettings.textWrapNoneTooltip": "Inline table",
@ -1351,12 +1349,10 @@
"DE.Views.TableSettingsAdvanced.textRight": "Right", "DE.Views.TableSettingsAdvanced.textRight": "Right",
"DE.Views.TableSettingsAdvanced.textRightOf": "to the right of", "DE.Views.TableSettingsAdvanced.textRightOf": "to the right of",
"DE.Views.TableSettingsAdvanced.textRightTooltip": "Right", "DE.Views.TableSettingsAdvanced.textRightTooltip": "Right",
"DE.Views.TableSettingsAdvanced.textStandartColors": "Standard Colors",
"DE.Views.TableSettingsAdvanced.textTable": "Table", "DE.Views.TableSettingsAdvanced.textTable": "Table",
"DE.Views.TableSettingsAdvanced.textTableBackColor": "Table Background", "DE.Views.TableSettingsAdvanced.textTableBackColor": "Table Background",
"DE.Views.TableSettingsAdvanced.textTablePosition": "Table Position", "DE.Views.TableSettingsAdvanced.textTablePosition": "Table Position",
"DE.Views.TableSettingsAdvanced.textTableSize": "Table Size", "DE.Views.TableSettingsAdvanced.textTableSize": "Table Size",
"DE.Views.TableSettingsAdvanced.textThemeColors": "Theme Colors",
"DE.Views.TableSettingsAdvanced.textTitle": "Table - Advanced Settings", "DE.Views.TableSettingsAdvanced.textTitle": "Table - Advanced Settings",
"DE.Views.TableSettingsAdvanced.textTop": "Top", "DE.Views.TableSettingsAdvanced.textTop": "Top",
"DE.Views.TableSettingsAdvanced.textVertical": "Vertical", "DE.Views.TableSettingsAdvanced.textVertical": "Vertical",
@ -1387,6 +1383,7 @@
"DE.Views.TextArtSettings.strSize": "Size", "DE.Views.TextArtSettings.strSize": "Size",
"DE.Views.TextArtSettings.strStroke": "Stroke", "DE.Views.TextArtSettings.strStroke": "Stroke",
"DE.Views.TextArtSettings.strTransparency": "Opacity", "DE.Views.TextArtSettings.strTransparency": "Opacity",
"DE.Views.TextArtSettings.strType": "Type",
"DE.Views.TextArtSettings.textBorderSizeErr": "The entered value is incorrect.<br>Please enter a value between 0 pt and 1584 pt.", "DE.Views.TextArtSettings.textBorderSizeErr": "The entered value is incorrect.<br>Please enter a value between 0 pt and 1584 pt.",
"DE.Views.TextArtSettings.textColor": "Color Fill", "DE.Views.TextArtSettings.textColor": "Color Fill",
"DE.Views.TextArtSettings.textDirection": "Direction", "DE.Views.TextArtSettings.textDirection": "Direction",
@ -1397,10 +1394,8 @@
"DE.Views.TextArtSettings.textNoFill": "No Fill", "DE.Views.TextArtSettings.textNoFill": "No Fill",
"DE.Views.TextArtSettings.textRadial": "Radial", "DE.Views.TextArtSettings.textRadial": "Radial",
"DE.Views.TextArtSettings.textSelectTexture": "Select", "DE.Views.TextArtSettings.textSelectTexture": "Select",
"DE.Views.TextArtSettings.textStandartColors": "Standard Colors",
"DE.Views.TextArtSettings.textStyle": "Style", "DE.Views.TextArtSettings.textStyle": "Style",
"DE.Views.TextArtSettings.textTemplate": "Template", "DE.Views.TextArtSettings.textTemplate": "Template",
"DE.Views.TextArtSettings.textThemeColors": "Theme Colors",
"DE.Views.TextArtSettings.textTransform": "Transform", "DE.Views.TextArtSettings.textTransform": "Transform",
"DE.Views.TextArtSettings.txtNoBorders": "No Line", "DE.Views.TextArtSettings.txtNoBorders": "No Line",
"DE.Views.Toolbar.mniCustomTable": "Insert Custom Table", "DE.Views.Toolbar.mniCustomTable": "Insert Custom Table",
@ -1440,6 +1435,7 @@
"DE.Views.Toolbar.textInsTextArt": "Insert Text Art", "DE.Views.Toolbar.textInsTextArt": "Insert Text Art",
"DE.Views.Toolbar.textInText": "In Text", "DE.Views.Toolbar.textInText": "In Text",
"DE.Views.Toolbar.textItalic": "Italic", "DE.Views.Toolbar.textItalic": "Italic",
"DE.Views.Toolbar.textLandscape": "Landscape",
"DE.Views.Toolbar.textLeft": "Left: ", "DE.Views.Toolbar.textLeft": "Left: ",
"DE.Views.Toolbar.textLine": "Line Chart", "DE.Views.Toolbar.textLine": "Line Chart",
"DE.Views.Toolbar.textMarginsLast": "Last Custom", "DE.Views.Toolbar.textMarginsLast": "Last Custom",
@ -1456,8 +1452,8 @@
"DE.Views.Toolbar.textPageSizeCustom": "Custom Page Size", "DE.Views.Toolbar.textPageSizeCustom": "Custom Page Size",
"DE.Views.Toolbar.textPie": "Pie Chart", "DE.Views.Toolbar.textPie": "Pie Chart",
"DE.Views.Toolbar.textPoint": "Point Chart", "DE.Views.Toolbar.textPoint": "Point Chart",
"DE.Views.Toolbar.textPortrait": "Portrait",
"DE.Views.Toolbar.textRight": "Right: ", "DE.Views.Toolbar.textRight": "Right: ",
"DE.Views.Toolbar.textStandartColors": "Standard Colors",
"DE.Views.Toolbar.textStock": "Stock Chart", "DE.Views.Toolbar.textStock": "Stock Chart",
"DE.Views.Toolbar.textStrikeout": "Strikeout", "DE.Views.Toolbar.textStrikeout": "Strikeout",
"DE.Views.Toolbar.textStyleMenuDelete": "Delete style", "DE.Views.Toolbar.textStyleMenuDelete": "Delete style",
@ -1468,7 +1464,6 @@
"DE.Views.Toolbar.textStyleMenuUpdate": "Update from selection", "DE.Views.Toolbar.textStyleMenuUpdate": "Update from selection",
"DE.Views.Toolbar.textSubscript": "Subscript", "DE.Views.Toolbar.textSubscript": "Subscript",
"DE.Views.Toolbar.textSuperscript": "Superscript", "DE.Views.Toolbar.textSuperscript": "Superscript",
"DE.Views.Toolbar.textThemeColors": "Theme Colors",
"DE.Views.Toolbar.textTitleError": "Error", "DE.Views.Toolbar.textTitleError": "Error",
"DE.Views.Toolbar.textToCurrent": "To current position", "DE.Views.Toolbar.textToCurrent": "To current position",
"DE.Views.Toolbar.textTop": "Top: ", "DE.Views.Toolbar.textTop": "Top: ",

View file

@ -233,11 +233,11 @@
"DE.Controllers.Main.splitMaxColsErrorText": "El número de columnas debe ser menos que %1.", "DE.Controllers.Main.splitMaxColsErrorText": "El número de columnas debe ser menos que %1.",
"DE.Controllers.Main.splitMaxRowsErrorText": "El número de filas debe ser menos que %1.", "DE.Controllers.Main.splitMaxRowsErrorText": "El número de filas debe ser menos que %1.",
"DE.Controllers.Main.textAnonymous": "Anónimo", "DE.Controllers.Main.textAnonymous": "Anónimo",
"DE.Controllers.Main.textBuyNow": "Comprar ahora", "DE.Controllers.Main.textBuyNow": "Visit website",
"DE.Controllers.Main.textCloseTip": "\nPulse para cerrar el consejo", "DE.Controllers.Main.textCloseTip": "\nPulse para cerrar el consejo",
"DE.Controllers.Main.textContactUs": "Ponga en contacto con nosotros", "DE.Controllers.Main.textContactUs": "Contact sales",
"DE.Controllers.Main.textLoadingDocument": "Cargando documento", "DE.Controllers.Main.textLoadingDocument": "Cargando documento",
"DE.Controllers.Main.textNoLicenseTitle": "Licencia ha expirado o no ha encontrado", "DE.Controllers.Main.textNoLicenseTitle": "ONLYOFFICE open source version",
"DE.Controllers.Main.textStrict": "Modo estricto", "DE.Controllers.Main.textStrict": "Modo estricto",
"DE.Controllers.Main.textTryUndoRedo": "Las funciones Anular/Rehacer se desactivan para el modo co-edición rápido.<br>Haga Clic en el botón \"modo estricto\" para cambiar al modo de co-edición estricta para editar el archivo sin la interferencia de otros usuarios y enviar sus cambios sólo después de guardarlos. Se puede cambiar entre los modos de co-edición usando los ajustes avanzados de edición.", "DE.Controllers.Main.textTryUndoRedo": "Las funciones Anular/Rehacer se desactivan para el modo co-edición rápido.<br>Haga Clic en el botón \"modo estricto\" para cambiar al modo de co-edición estricta para editar el archivo sin la interferencia de otros usuarios y enviar sus cambios sólo después de guardarlos. Se puede cambiar entre los modos de co-edición usando los ajustes avanzados de edición.",
"DE.Controllers.Main.titleUpdateVersion": "Versión ha cambiado", "DE.Controllers.Main.titleUpdateVersion": "Versión ha cambiado",
@ -267,7 +267,7 @@
"DE.Controllers.Main.uploadImageTitleText": "Subiendo imagen", "DE.Controllers.Main.uploadImageTitleText": "Subiendo imagen",
"DE.Controllers.Main.warnBrowserIE9": "Este aplicación tiene baja capacidad en IE9. Utilice IE10 o superior", "DE.Controllers.Main.warnBrowserIE9": "Este aplicación tiene baja capacidad en IE9. Utilice IE10 o superior",
"DE.Controllers.Main.warnBrowserZoom": "La configuración actual de zoom de su navegador no está soportada por completo. Por favor restablezca zoom predeterminado pulsando Ctrl+0.", "DE.Controllers.Main.warnBrowserZoom": "La configuración actual de zoom de su navegador no está soportada por completo. Por favor restablezca zoom predeterminado pulsando Ctrl+0.",
"DE.Controllers.Main.warnNoLicense": "La licencia ha expirado o no ha sido encontrada. No puede editar archivos.<br>Haga clic en el botón 'Comprar ahora' para comprar una licencia Enterprise Edition o ´Contactar con nosotros´ si usa Intergration Edition.", "DE.Controllers.Main.warnNoLicense": "You are using an open source version of ONLYOFFICE. The version has limitations for concurrent connections to the document server (20 connections at a time).<br>If you need more please consider purchasing a commercial license.",
"DE.Controllers.Main.warnProcessRightsChange": "El derecho de edición del archivo es denegado", "DE.Controllers.Main.warnProcessRightsChange": "El derecho de edición del archivo es denegado",
"DE.Controllers.Statusbar.textHasChanges": "Nuevos cambios han sido encontrado", "DE.Controllers.Statusbar.textHasChanges": "Nuevos cambios han sido encontrado",
"DE.Controllers.Statusbar.textTrackChanges": "El documento se abre con el modo de cambio de pista activado", "DE.Controllers.Statusbar.textTrackChanges": "El documento se abre con el modo de cambio de pista activado",

View file

@ -86,6 +86,8 @@
"Common.UI.SearchDialog.txtBtnReplaceAll": "Заменить все", "Common.UI.SearchDialog.txtBtnReplaceAll": "Заменить все",
"Common.UI.SynchronizeTip.textDontShow": "Больше не показывать это сообщение", "Common.UI.SynchronizeTip.textDontShow": "Больше не показывать это сообщение",
"Common.UI.SynchronizeTip.textSynchronize": "Документ изменен другим пользователем.<br/>Нажмите, чтобы сохранить свои изменения и загрузить обновления.", "Common.UI.SynchronizeTip.textSynchronize": "Документ изменен другим пользователем.<br/>Нажмите, чтобы сохранить свои изменения и загрузить обновления.",
"Common.UI.ThemeColorPalette.textStandartColors": "Стандартные цвета",
"Common.UI.ThemeColorPalette.textThemeColors": "Цвета темы",
"Common.UI.Window.cancelButtonText": "Отмена", "Common.UI.Window.cancelButtonText": "Отмена",
"Common.UI.Window.closeButtonText": "Закрыть", "Common.UI.Window.closeButtonText": "Закрыть",
"Common.UI.Window.noButtonText": "Нет", "Common.UI.Window.noButtonText": "Нет",
@ -157,6 +159,9 @@
"Common.Views.OpenDialog.okButtonText": "OK", "Common.Views.OpenDialog.okButtonText": "OK",
"Common.Views.OpenDialog.txtEncoding": "Кодировка", "Common.Views.OpenDialog.txtEncoding": "Кодировка",
"Common.Views.OpenDialog.txtTitle": "Выбрать параметры %1", "Common.Views.OpenDialog.txtTitle": "Выбрать параметры %1",
"Common.Views.Plugins.strPlugins": "Дополнения",
"Common.Views.Plugins.textLoading": "Загрузка",
"Common.Views.Plugins.textStart": "Запустить",
"Common.Views.ReviewChanges.txtAccept": "Принять", "Common.Views.ReviewChanges.txtAccept": "Принять",
"Common.Views.ReviewChanges.txtAcceptAll": "Принять все изменения", "Common.Views.ReviewChanges.txtAcceptAll": "Принять все изменения",
"Common.Views.ReviewChanges.txtAcceptCurrent": "Принять текущее изменение", "Common.Views.ReviewChanges.txtAcceptCurrent": "Принять текущее изменение",
@ -202,6 +207,7 @@
"DE.Controllers.Main.errorUpdateVersion": "Версия файла была изменена. Страница будет перезагружена.", "DE.Controllers.Main.errorUpdateVersion": "Версия файла была изменена. Страница будет перезагружена.",
"DE.Controllers.Main.errorUserDrop": "В настоящий момент файл недоступен.", "DE.Controllers.Main.errorUserDrop": "В настоящий момент файл недоступен.",
"DE.Controllers.Main.errorUsersExceed": "Превышено количество пользователей, разрешенных согласно тарифному плану", "DE.Controllers.Main.errorUsersExceed": "Превышено количество пользователей, разрешенных согласно тарифному плану",
"DE.Controllers.Main.errorViewerDisconnect": "Подключение прервано. Вы по-прежнему можете просматривать документ,<br>но не сможете скачать его до восстановления подключения.",
"DE.Controllers.Main.leavePageText": "Документ содержит несохраненные изменения. Чтобы сохранить их, нажмите \"Остаться на этой странице\", затем \"Сохранить\". Нажмите \"Покинуть эту страницу\", чтобы сбросить все несохраненные изменения.", "DE.Controllers.Main.leavePageText": "Документ содержит несохраненные изменения. Чтобы сохранить их, нажмите \"Остаться на этой странице\", затем \"Сохранить\". Нажмите \"Покинуть эту страницу\", чтобы сбросить все несохраненные изменения.",
"DE.Controllers.Main.loadFontsTextText": "Загрузка данных...", "DE.Controllers.Main.loadFontsTextText": "Загрузка данных...",
"DE.Controllers.Main.loadFontsTitleText": "Загрузка данных", "DE.Controllers.Main.loadFontsTitleText": "Загрузка данных",
@ -233,11 +239,11 @@
"DE.Controllers.Main.splitMaxColsErrorText": "Число столбцов должно быть меньше, чем %1.", "DE.Controllers.Main.splitMaxColsErrorText": "Число столбцов должно быть меньше, чем %1.",
"DE.Controllers.Main.splitMaxRowsErrorText": "Число строк должно быть меньше, чем %1.", "DE.Controllers.Main.splitMaxRowsErrorText": "Число строк должно быть меньше, чем %1.",
"DE.Controllers.Main.textAnonymous": "Аноним", "DE.Controllers.Main.textAnonymous": "Аноним",
"DE.Controllers.Main.textBuyNow": "Visit website", "DE.Controllers.Main.textBuyNow": "Перейти на сайт",
"DE.Controllers.Main.textCloseTip": "\nЩелкните, чтобы закрыть эту подсказку", "DE.Controllers.Main.textCloseTip": "\nЩелкните, чтобы закрыть эту подсказку",
"DE.Controllers.Main.textContactUs": "Contact sales", "DE.Controllers.Main.textContactUs": "Связаться с отделом продаж",
"DE.Controllers.Main.textLoadingDocument": "Загрузка документа", "DE.Controllers.Main.textLoadingDocument": "Загрузка документа",
"DE.Controllers.Main.textNoLicenseTitle": "ONLYOFFICE open source version", "DE.Controllers.Main.textNoLicenseTitle": "Open source версия ONLYOFFICE",
"DE.Controllers.Main.textStrict": "Строгий режим", "DE.Controllers.Main.textStrict": "Строгий режим",
"DE.Controllers.Main.textTryUndoRedo": "Функции отмены и повтора действий отключены в Быстром режиме совместного редактирования.<br>Нажмите на кнопку 'Строгий режим' для переключения в Строгий режим совместного редактирования, чтобы редактировать файл без вмешательства других пользователей и отправлять изменения только после того, как вы их сохраните. Переключаться между режимами совместного редактирования можно с помощью Дополнительных параметров редактора.", "DE.Controllers.Main.textTryUndoRedo": "Функции отмены и повтора действий отключены в Быстром режиме совместного редактирования.<br>Нажмите на кнопку 'Строгий режим' для переключения в Строгий режим совместного редактирования, чтобы редактировать файл без вмешательства других пользователей и отправлять изменения только после того, как вы их сохраните. Переключаться между режимами совместного редактирования можно с помощью Дополнительных параметров редактора.",
"DE.Controllers.Main.titleUpdateVersion": "Версия изменилась", "DE.Controllers.Main.titleUpdateVersion": "Версия изменилась",
@ -267,7 +273,7 @@
"DE.Controllers.Main.uploadImageTitleText": "Загрузка изображения", "DE.Controllers.Main.uploadImageTitleText": "Загрузка изображения",
"DE.Controllers.Main.warnBrowserIE9": "В IE9 приложение имеет низкую производительность. Используйте IE10 или более позднюю версию.", "DE.Controllers.Main.warnBrowserIE9": "В IE9 приложение имеет низкую производительность. Используйте IE10 или более позднюю версию.",
"DE.Controllers.Main.warnBrowserZoom": "Текущее значение масштаба страницы в браузере поддерживается не полностью. Вернитесь к масштабу по умолчанию, нажав Ctrl+0.", "DE.Controllers.Main.warnBrowserZoom": "Текущее значение масштаба страницы в браузере поддерживается не полностью. Вернитесь к масштабу по умолчанию, нажав Ctrl+0.",
"DE.Controllers.Main.warnNoLicense": "You are using an open source version of ONLYOFFICE. The version has limitations for concurrent connections to the document server (20 connections at a time).<br>If you need more please consider purchasing a commercial license.", "DE.Controllers.Main.warnNoLicense": "Вы используете open source версию ONLYOFFICE. Эта версия имеет ограничения по количеству одновременных подключений к серверу документов (20 подключений одновременно).<br>Если требуется больше, рассмотрите вопрос о покупке коммерческой лицензии.",
"DE.Controllers.Main.warnProcessRightsChange": "Вам было отказано в праве на редактирование этого файла.", "DE.Controllers.Main.warnProcessRightsChange": "Вам было отказано в праве на редактирование этого файла.",
"DE.Controllers.Statusbar.textHasChanges": "Отслежены новые изменения", "DE.Controllers.Statusbar.textHasChanges": "Отслежены новые изменения",
"DE.Controllers.Statusbar.textTrackChanges": "Документ открыт при включенном режиме отслеживания изменений", "DE.Controllers.Statusbar.textTrackChanges": "Документ открыт при включенном режиме отслеживания изменений",
@ -838,8 +844,6 @@
"DE.Views.DropcapSettingsAdvanced.textRelative": "Относительно", "DE.Views.DropcapSettingsAdvanced.textRelative": "Относительно",
"DE.Views.DropcapSettingsAdvanced.textRight": "Справа", "DE.Views.DropcapSettingsAdvanced.textRight": "Справа",
"DE.Views.DropcapSettingsAdvanced.textRowHeight": "Высота в строках", "DE.Views.DropcapSettingsAdvanced.textRowHeight": "Высота в строках",
"DE.Views.DropcapSettingsAdvanced.textStandartColors": "Стандартные цвета",
"DE.Views.DropcapSettingsAdvanced.textThemeColors": "Цвета темы",
"DE.Views.DropcapSettingsAdvanced.textTitle": "Буквица - дополнительные параметры", "DE.Views.DropcapSettingsAdvanced.textTitle": "Буквица - дополнительные параметры",
"DE.Views.DropcapSettingsAdvanced.textTitleFrame": "Рамка - дополнительные параметры", "DE.Views.DropcapSettingsAdvanced.textTitleFrame": "Рамка - дополнительные параметры",
"DE.Views.DropcapSettingsAdvanced.textTop": "Сверху", "DE.Views.DropcapSettingsAdvanced.textTop": "Сверху",
@ -943,6 +947,8 @@
"DE.Views.HyperlinkSettingsDialog.txtEmpty": "Это поле обязательно для заполнения", "DE.Views.HyperlinkSettingsDialog.txtEmpty": "Это поле обязательно для заполнения",
"DE.Views.HyperlinkSettingsDialog.txtNotUrl": "Это поле должно быть URL-адресом в формате \"http://www.example.com\"", "DE.Views.HyperlinkSettingsDialog.txtNotUrl": "Это поле должно быть URL-адресом в формате \"http://www.example.com\"",
"DE.Views.ImageSettings.textAdvanced": "Дополнительные параметры", "DE.Views.ImageSettings.textAdvanced": "Дополнительные параметры",
"DE.Views.ImageSettings.textEdit": "Редактировать",
"DE.Views.ImageSettings.textEditObject": "Редактировать объект",
"DE.Views.ImageSettings.textFromFile": "Из файла", "DE.Views.ImageSettings.textFromFile": "Из файла",
"DE.Views.ImageSettings.textFromUrl": "По URL", "DE.Views.ImageSettings.textFromUrl": "По URL",
"DE.Views.ImageSettings.textHeight": "Высота", "DE.Views.ImageSettings.textHeight": "Высота",
@ -1026,6 +1032,7 @@
"DE.Views.LeftMenu.tipChat": "Чат", "DE.Views.LeftMenu.tipChat": "Чат",
"DE.Views.LeftMenu.tipComments": "Комментарии", "DE.Views.LeftMenu.tipComments": "Комментарии",
"DE.Views.LeftMenu.tipFile": "Файл", "DE.Views.LeftMenu.tipFile": "Файл",
"DE.Views.LeftMenu.tipPlugins": "Дополнения",
"DE.Views.LeftMenu.tipSearch": "Поиск", "DE.Views.LeftMenu.tipSearch": "Поиск",
"DE.Views.LeftMenu.tipSupport": "Обратная связь и поддержка", "DE.Views.LeftMenu.tipSupport": "Обратная связь и поддержка",
"DE.Views.LeftMenu.tipTitles": "Заголовки", "DE.Views.LeftMenu.tipTitles": "Заголовки",
@ -1108,8 +1115,6 @@
"DE.Views.ParagraphSettings.textBackColor": "Цвет фона", "DE.Views.ParagraphSettings.textBackColor": "Цвет фона",
"DE.Views.ParagraphSettings.textExact": "Точно", "DE.Views.ParagraphSettings.textExact": "Точно",
"DE.Views.ParagraphSettings.textNewColor": "Пользовательский цвет", "DE.Views.ParagraphSettings.textNewColor": "Пользовательский цвет",
"DE.Views.ParagraphSettings.textStandartColors": "Стандартные цвета",
"DE.Views.ParagraphSettings.textThemeColors": "Цвета темы",
"DE.Views.ParagraphSettings.txtAutoText": "Авто", "DE.Views.ParagraphSettings.txtAutoText": "Авто",
"DE.Views.ParagraphSettingsAdvanced.cancelButtonText": "Отмена", "DE.Views.ParagraphSettingsAdvanced.cancelButtonText": "Отмена",
"DE.Views.ParagraphSettingsAdvanced.noTabs": "В этом поле появятся позиции табуляции, которые вы зададите", "DE.Views.ParagraphSettingsAdvanced.noTabs": "В этом поле появятся позиции табуляции, которые вы зададите",
@ -1150,12 +1155,10 @@
"DE.Views.ParagraphSettingsAdvanced.textRight": "Справа", "DE.Views.ParagraphSettingsAdvanced.textRight": "Справа",
"DE.Views.ParagraphSettingsAdvanced.textSet": "Задать", "DE.Views.ParagraphSettingsAdvanced.textSet": "Задать",
"DE.Views.ParagraphSettingsAdvanced.textSpacing": "Интервал", "DE.Views.ParagraphSettingsAdvanced.textSpacing": "Интервал",
"DE.Views.ParagraphSettingsAdvanced.textStandartColors": "Стандартные цвета",
"DE.Views.ParagraphSettingsAdvanced.textTabCenter": "По центру", "DE.Views.ParagraphSettingsAdvanced.textTabCenter": "По центру",
"DE.Views.ParagraphSettingsAdvanced.textTabLeft": "По левому краю", "DE.Views.ParagraphSettingsAdvanced.textTabLeft": "По левому краю",
"DE.Views.ParagraphSettingsAdvanced.textTabPosition": "Позиция", "DE.Views.ParagraphSettingsAdvanced.textTabPosition": "Позиция",
"DE.Views.ParagraphSettingsAdvanced.textTabRight": "По правому краю", "DE.Views.ParagraphSettingsAdvanced.textTabRight": "По правому краю",
"DE.Views.ParagraphSettingsAdvanced.textThemeColors": "Цвета темы",
"DE.Views.ParagraphSettingsAdvanced.textTitle": "Абзац - дополнительные параметры", "DE.Views.ParagraphSettingsAdvanced.textTitle": "Абзац - дополнительные параметры",
"DE.Views.ParagraphSettingsAdvanced.textTop": "Сверху", "DE.Views.ParagraphSettingsAdvanced.textTop": "Сверху",
"DE.Views.ParagraphSettingsAdvanced.tipAll": "Задать внешнюю границу и все внутренние линии", "DE.Views.ParagraphSettingsAdvanced.tipAll": "Задать внешнюю границу и все внутренние линии",
@ -1184,6 +1187,7 @@
"DE.Views.ShapeSettings.strSize": "Толщина", "DE.Views.ShapeSettings.strSize": "Толщина",
"DE.Views.ShapeSettings.strStroke": "Обводка", "DE.Views.ShapeSettings.strStroke": "Обводка",
"DE.Views.ShapeSettings.strTransparency": "Непрозрачность", "DE.Views.ShapeSettings.strTransparency": "Непрозрачность",
"DE.Views.ShapeSettings.strType": "Тип",
"DE.Views.ShapeSettings.textAdvanced": "Дополнительные параметры", "DE.Views.ShapeSettings.textAdvanced": "Дополнительные параметры",
"DE.Views.ShapeSettings.textBorderSizeErr": "Введено некорректное значение.<br>Пожалуйста, введите значение от 0 до 1584 пунктов.", "DE.Views.ShapeSettings.textBorderSizeErr": "Введено некорректное значение.<br>Пожалуйста, введите значение от 0 до 1584 пунктов.",
"DE.Views.ShapeSettings.textColor": "Заливка цветом", "DE.Views.ShapeSettings.textColor": "Заливка цветом",
@ -1200,11 +1204,9 @@
"DE.Views.ShapeSettings.textPatternFill": "Узор", "DE.Views.ShapeSettings.textPatternFill": "Узор",
"DE.Views.ShapeSettings.textRadial": "Радиальный", "DE.Views.ShapeSettings.textRadial": "Радиальный",
"DE.Views.ShapeSettings.textSelectTexture": "Выбрать", "DE.Views.ShapeSettings.textSelectTexture": "Выбрать",
"DE.Views.ShapeSettings.textStandartColors": "Стандартные цвета",
"DE.Views.ShapeSettings.textStretch": "Растяжение", "DE.Views.ShapeSettings.textStretch": "Растяжение",
"DE.Views.ShapeSettings.textStyle": "Стиль", "DE.Views.ShapeSettings.textStyle": "Стиль",
"DE.Views.ShapeSettings.textTexture": "Из текстуры", "DE.Views.ShapeSettings.textTexture": "Из текстуры",
"DE.Views.ShapeSettings.textThemeColors": "Цвета темы",
"DE.Views.ShapeSettings.textTile": "Плитка", "DE.Views.ShapeSettings.textTile": "Плитка",
"DE.Views.ShapeSettings.textWrap": "Стиль обтекания", "DE.Views.ShapeSettings.textWrap": "Стиль обтекания",
"DE.Views.ShapeSettings.txtBehind": "За текстом", "DE.Views.ShapeSettings.txtBehind": "За текстом",
@ -1285,9 +1287,7 @@
"DE.Views.TableSettings.textOK": "OK", "DE.Views.TableSettings.textOK": "OK",
"DE.Views.TableSettings.textRows": "Строки", "DE.Views.TableSettings.textRows": "Строки",
"DE.Views.TableSettings.textSelectBorders": "Выберите границы, к которым надо применить выбранный стиль", "DE.Views.TableSettings.textSelectBorders": "Выберите границы, к которым надо применить выбранный стиль",
"DE.Views.TableSettings.textStandartColors": "Стандартные цвета",
"DE.Views.TableSettings.textTemplate": "По шаблону", "DE.Views.TableSettings.textTemplate": "По шаблону",
"DE.Views.TableSettings.textThemeColors": "Цвета темы",
"DE.Views.TableSettings.textTotal": "Итоговая", "DE.Views.TableSettings.textTotal": "Итоговая",
"DE.Views.TableSettings.textWrap": "Обтекание текстом", "DE.Views.TableSettings.textWrap": "Обтекание текстом",
"DE.Views.TableSettings.textWrapNoneTooltip": "Встроенная таблица", "DE.Views.TableSettings.textWrapNoneTooltip": "Встроенная таблица",
@ -1345,12 +1345,10 @@
"DE.Views.TableSettingsAdvanced.textRight": "Справа", "DE.Views.TableSettingsAdvanced.textRight": "Справа",
"DE.Views.TableSettingsAdvanced.textRightOf": "справа от", "DE.Views.TableSettingsAdvanced.textRightOf": "справа от",
"DE.Views.TableSettingsAdvanced.textRightTooltip": "По правому краю", "DE.Views.TableSettingsAdvanced.textRightTooltip": "По правому краю",
"DE.Views.TableSettingsAdvanced.textStandartColors": "Стандартные цвета",
"DE.Views.TableSettingsAdvanced.textTable": "Таблица", "DE.Views.TableSettingsAdvanced.textTable": "Таблица",
"DE.Views.TableSettingsAdvanced.textTableBackColor": "Фон таблицы", "DE.Views.TableSettingsAdvanced.textTableBackColor": "Фон таблицы",
"DE.Views.TableSettingsAdvanced.textTablePosition": "Положение таблицы", "DE.Views.TableSettingsAdvanced.textTablePosition": "Положение таблицы",
"DE.Views.TableSettingsAdvanced.textTableSize": "Размер таблицы", "DE.Views.TableSettingsAdvanced.textTableSize": "Размер таблицы",
"DE.Views.TableSettingsAdvanced.textThemeColors": "Цвета темы",
"DE.Views.TableSettingsAdvanced.textTitle": "Таблица - дополнительные параметры", "DE.Views.TableSettingsAdvanced.textTitle": "Таблица - дополнительные параметры",
"DE.Views.TableSettingsAdvanced.textTop": "Сверху", "DE.Views.TableSettingsAdvanced.textTop": "Сверху",
"DE.Views.TableSettingsAdvanced.textVertical": "По вертикали", "DE.Views.TableSettingsAdvanced.textVertical": "По вертикали",
@ -1381,6 +1379,7 @@
"DE.Views.TextArtSettings.strSize": "Толщина", "DE.Views.TextArtSettings.strSize": "Толщина",
"DE.Views.TextArtSettings.strStroke": "Обводка", "DE.Views.TextArtSettings.strStroke": "Обводка",
"DE.Views.TextArtSettings.strTransparency": "Непрозрачность", "DE.Views.TextArtSettings.strTransparency": "Непрозрачность",
"DE.Views.TextArtSettings.strType": "Тип",
"DE.Views.TextArtSettings.textBorderSizeErr": "Введено некорректное значение.<br>Пожалуйста, введите значение от 0 до 1584 пунктов.", "DE.Views.TextArtSettings.textBorderSizeErr": "Введено некорректное значение.<br>Пожалуйста, введите значение от 0 до 1584 пунктов.",
"DE.Views.TextArtSettings.textColor": "Заливка цветом", "DE.Views.TextArtSettings.textColor": "Заливка цветом",
"DE.Views.TextArtSettings.textDirection": "Направление", "DE.Views.TextArtSettings.textDirection": "Направление",
@ -1391,10 +1390,8 @@
"DE.Views.TextArtSettings.textNoFill": "Без заливки", "DE.Views.TextArtSettings.textNoFill": "Без заливки",
"DE.Views.TextArtSettings.textRadial": "Радиальный", "DE.Views.TextArtSettings.textRadial": "Радиальный",
"DE.Views.TextArtSettings.textSelectTexture": "Выбрать", "DE.Views.TextArtSettings.textSelectTexture": "Выбрать",
"DE.Views.TextArtSettings.textStandartColors": "Стандартные цвета",
"DE.Views.TextArtSettings.textStyle": "Стиль", "DE.Views.TextArtSettings.textStyle": "Стиль",
"DE.Views.TextArtSettings.textTemplate": "Шаблон", "DE.Views.TextArtSettings.textTemplate": "Шаблон",
"DE.Views.TextArtSettings.textThemeColors": "Цвета темы",
"DE.Views.TextArtSettings.textTransform": "Трансформация", "DE.Views.TextArtSettings.textTransform": "Трансформация",
"DE.Views.TextArtSettings.txtNoBorders": "Без обводки", "DE.Views.TextArtSettings.txtNoBorders": "Без обводки",
"DE.Views.Toolbar.mniCustomTable": "Пользовательская таблица", "DE.Views.Toolbar.mniCustomTable": "Пользовательская таблица",
@ -1434,6 +1431,7 @@
"DE.Views.Toolbar.textInsTextArt": "Вставить объект Text Art", "DE.Views.Toolbar.textInsTextArt": "Вставить объект Text Art",
"DE.Views.Toolbar.textInText": "В тексте", "DE.Views.Toolbar.textInText": "В тексте",
"DE.Views.Toolbar.textItalic": "Курсив", "DE.Views.Toolbar.textItalic": "Курсив",
"DE.Views.Toolbar.textLandscape": "Альбомная",
"DE.Views.Toolbar.textLeft": "Левое: ", "DE.Views.Toolbar.textLeft": "Левое: ",
"DE.Views.Toolbar.textLine": "График", "DE.Views.Toolbar.textLine": "График",
"DE.Views.Toolbar.textMarginsLast": "Последние настраиваемые", "DE.Views.Toolbar.textMarginsLast": "Последние настраиваемые",
@ -1450,8 +1448,8 @@
"DE.Views.Toolbar.textPageSizeCustom": "Особый размер страницы", "DE.Views.Toolbar.textPageSizeCustom": "Особый размер страницы",
"DE.Views.Toolbar.textPie": "Круговая", "DE.Views.Toolbar.textPie": "Круговая",
"DE.Views.Toolbar.textPoint": "Точечная", "DE.Views.Toolbar.textPoint": "Точечная",
"DE.Views.Toolbar.textPortrait": "Книжная",
"DE.Views.Toolbar.textRight": "Правое: ", "DE.Views.Toolbar.textRight": "Правое: ",
"DE.Views.Toolbar.textStandartColors": "Стандартные цвета",
"DE.Views.Toolbar.textStock": "Биржевая", "DE.Views.Toolbar.textStock": "Биржевая",
"DE.Views.Toolbar.textStrikeout": "Зачеркнутый", "DE.Views.Toolbar.textStrikeout": "Зачеркнутый",
"DE.Views.Toolbar.textStyleMenuDelete": "Удалить стиль", "DE.Views.Toolbar.textStyleMenuDelete": "Удалить стиль",
@ -1462,7 +1460,6 @@
"DE.Views.Toolbar.textStyleMenuUpdate": "Обновить из выделенного фрагмента", "DE.Views.Toolbar.textStyleMenuUpdate": "Обновить из выделенного фрагмента",
"DE.Views.Toolbar.textSubscript": "Подстрочные знаки", "DE.Views.Toolbar.textSubscript": "Подстрочные знаки",
"DE.Views.Toolbar.textSuperscript": "Надстрочные знаки", "DE.Views.Toolbar.textSuperscript": "Надстрочные знаки",
"DE.Views.Toolbar.textThemeColors": "Цвета темы",
"DE.Views.Toolbar.textTitleError": "Ошибка", "DE.Views.Toolbar.textTitleError": "Ошибка",
"DE.Views.Toolbar.textToCurrent": "В текущей позиции", "DE.Views.Toolbar.textToCurrent": "В текущей позиции",
"DE.Views.Toolbar.textTop": "Верхнее: ", "DE.Views.Toolbar.textTop": "Верхнее: ",

View file

@ -209,7 +209,7 @@
"DE.Controllers.Main.loadImageTextText": "Nalaganje slike...", "DE.Controllers.Main.loadImageTextText": "Nalaganje slike...",
"DE.Controllers.Main.loadImageTitleText": "Nalaganje Slike", "DE.Controllers.Main.loadImageTitleText": "Nalaganje Slike",
"DE.Controllers.Main.loadingDocumentTextText": "Nalaganje dokumenta...", "DE.Controllers.Main.loadingDocumentTextText": "Nalaganje dokumenta...",
"DE.Controllers.Main.loadingDocumentTitleText": "Nalaganje Dokumenta", "DE.Controllers.Main.loadingDocumentTitleText": "Nalaganje dokumenta",
"DE.Controllers.Main.mailMergeLoadFileText": "Loading Data Source...", "DE.Controllers.Main.mailMergeLoadFileText": "Loading Data Source...",
"DE.Controllers.Main.mailMergeLoadFileTitle": "Loading Data Source", "DE.Controllers.Main.mailMergeLoadFileTitle": "Loading Data Source",
"DE.Controllers.Main.notcriticalErrorTitle": "Opozorilo", "DE.Controllers.Main.notcriticalErrorTitle": "Opozorilo",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View file

@ -3,6 +3,7 @@ body {
height: 100%; height: 100%;
.user-select(none); .user-select(none);
color: @gray-deep; color: @gray-deep;
position: fixed;
&.safari { &.safari {
position: absolute; position: absolute;

View file

@ -387,6 +387,9 @@
.menu-icon-normal(mnu-direct-horiz, 33, @menu-icon-size); .menu-icon-normal(mnu-direct-horiz, 33, @menu-icon-size);
.menu-icon-normal(mnu-direct-rup, 34, @menu-icon-size); .menu-icon-normal(mnu-direct-rup, 34, @menu-icon-size);
.menu-icon-normal(mnu-direct-rdown, 35, @menu-icon-size); .menu-icon-normal(mnu-direct-rdown, 35, @menu-icon-size);
.menu-icon-normal(mnu-orient-portrait, 36, @menu-icon-size);
.menu-icon-normal(mnu-orient-landscape, 37, @menu-icon-size);
.menu-otherstates-icon(ppm-toolbar, @menu-icon-size); .menu-otherstates-icon(ppm-toolbar, @menu-icon-size);

View file

@ -53,16 +53,6 @@
margin-bottom: 5px; margin-bottom: 5px;
} }
.loader-page-text {
display: inline-block;
font-size: 14px;
margin-left: 80px;
margin-top: 125px;
color: #888;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
line-height: 20px;
}
.romb { .romb {
width: 40px; width: 40px;
height: 40px; height: 40px;

View file

@ -149,6 +149,7 @@ var sdk_dev_scrpipts = [
"../../../../sdkjs/word/Private/TrackRevisions.js", "../../../../sdkjs/word/Private/TrackRevisions.js",
"../../../../sdkjs/common/applyDocumentChanges.js", "../../../../sdkjs/common/applyDocumentChanges.js",
"../../../../sdkjs/common/Drawings/Format/OleObject.js", "../../../../sdkjs/common/Drawings/Format/OleObject.js",
"../../../../sdkjs/common/Drawings/Format/DrawingContent.js",
"../../../../sdkjs/common/clipboard_base.js", "../../../../sdkjs/common/clipboard_base.js",
"../../../../sdkjs/common/plugins.js", "../../../../sdkjs/common/plugins.js",
"../../../../sdkjs/word/apiBuilder.js", "../../../../sdkjs/word/apiBuilder.js",

View file

@ -157,7 +157,8 @@ require([
, 'Common.Controllers.Chat', , 'Common.Controllers.Chat',
'Common.Controllers.Comments', 'Common.Controllers.Comments',
/** coauthoring end **/ /** coauthoring end **/
'Common.Controllers.ExternalDiagramEditor' ,'Common.Controllers.Plugins'
,'Common.Controllers.ExternalDiagramEditor'
] ]
}); });
@ -184,6 +185,7 @@ require([
,'common/main/lib/controller/Comments', ,'common/main/lib/controller/Comments',
'common/main/lib/controller/Chat', 'common/main/lib/controller/Chat',
/** coauthoring end **/ /** coauthoring end **/
'common/main/lib/controller/Plugins',
'presentationeditor/main/app/view/ChartSettings', 'presentationeditor/main/app/view/ChartSettings',
'common/main/lib/controller/ExternalDiagramEditor' 'common/main/lib/controller/ExternalDiagramEditor'
], function() { ], function() {

View file

@ -172,6 +172,14 @@ define([
return this; return this;
}, },
enablePlugins: function() {
if (this.mode.canPlugins) {
this.leftMenu.btnPlugins.show();
this.leftMenu.setOptionsPanel('plugins', this.getApplication().getController('Common.Controllers.Plugins').getView('Common.Views.Plugins'));
} else
this.leftMenu.btnPlugins.hide();
},
clickMenuFileItem: function(menu, action, isopts) { clickMenuFileItem: function(menu, action, isopts) {
var close_menu = true; var close_menu = true;
switch (action) { switch (action) {
@ -210,7 +218,7 @@ define([
this.api.SetTextBoxInputMode(parseInt(value) == 1); this.api.SetTextBoxInputMode(parseInt(value) == 1);
/** coauthoring begin **/ /** coauthoring begin **/
if (this.mode.isEdit && this.mode.canLicense && !this.mode.isOffline) { if (this.mode.isEdit && this.mode.canLicense && !this.mode.isOffline && this.mode.canCoAuthoring) {
value = Common.localStorage.getItem("pe-settings-coauthmode"); value = Common.localStorage.getItem("pe-settings-coauthmode");
this.api.asc_SetFastCollaborative(value===null || parseInt(value) == 1); this.api.asc_SetFastCollaborative(value===null || parseInt(value) == 1);
} }
@ -331,6 +339,7 @@ define([
this.leftMenu.btnComments.setDisabled(true); this.leftMenu.btnComments.setDisabled(true);
this.leftMenu.btnChat.setDisabled(true); this.leftMenu.btnChat.setDisabled(true);
/** coauthoring end **/ /** coauthoring end **/
this.leftMenu.btnPlugins.setDisabled(true);
this.leftMenu.getMenu('file').setMode({isDisconnected: true}); this.leftMenu.getMenu('file').setMode({isDisconnected: true});
if ( this.dlgSearch ) { if ( this.dlgSearch ) {
@ -445,7 +454,14 @@ define([
$.fn.dropdown.Constructor.prototype.keydown.call(menu_opened[0], e); $.fn.dropdown.Constructor.prototype.keydown.call(menu_opened[0], e);
return false; return false;
} }
if (this.leftMenu.btnFile.pressed || this.leftMenu.btnAbout.pressed || if (this.mode.canPlugins && this.leftMenu.panelPlugins) {
menu_opened = this.leftMenu.panelPlugins.$el.find('#menu-plugin-container.open > [data-toggle="dropdown"]');
if (menu_opened.length) {
$.fn.dropdown.Constructor.prototype.keydown.call(menu_opened[0], e);
return false;
}
}
if (this.leftMenu.btnFile.pressed || this.leftMenu.btnAbout.pressed || this.leftMenu.btnPlugins.pressed ||
$(e.target).parents('#left-menu').length ) { $(e.target).parents('#left-menu').length ) {
this.leftMenu.close(); this.leftMenu.close();
Common.NotificationCenter.trigger('layout:changed', 'leftmenu'); Common.NotificationCenter.trigger('layout:changed', 'leftmenu');

View file

@ -127,6 +127,7 @@ define([
// Initialize api gateway // Initialize api gateway
this.editorConfig = {}; this.editorConfig = {};
this.appOptions = {}; this.appOptions = {};
this.plugins = undefined;
Common.Gateway.on('init', _.bind(this.loadConfig, this)); Common.Gateway.on('init', _.bind(this.loadConfig, this));
Common.Gateway.on('showmessage', _.bind(this.onExternalMessage, this)); Common.Gateway.on('showmessage', _.bind(this.onExternalMessage, this));
Common.Gateway.on('opendocument', _.bind(this.loadDocument, this)); Common.Gateway.on('opendocument', _.bind(this.loadDocument, this));
@ -138,23 +139,15 @@ define([
// Syncronize focus with api // Syncronize focus with api
$(document.body).on('focus', 'input, textarea', function(e) { $(document.body).on('focus', 'input, textarea', function(e) {
if (!/area_id/.test(e.target.id)) { if (!/area_id/.test(e.target.id)) {
me.api.asc_enableKeyEvents(false);
if (/msg-reply/.test(e.target.className)) if (/msg-reply/.test(e.target.className))
me.dontCloseDummyComment = true; me.dontCloseDummyComment = true;
} }
}); });
$("#editor_sdk").focus(function (e) {
if (!me.isModalShowed)
me.api.asc_enableKeyEvents(true);
});
$(document.body).on('blur', 'input, textarea', function(e) { $(document.body).on('blur', 'input, textarea', function(e) {
if (!me.isModalShowed) { if (!me.isModalShowed) {
/* if (!/area_id/.test(e.target.id) && $(e.target).parent().find(e.relatedTarget).length<1 /* When focus in combobox goes from input to it's menu button or menu items */
* TODO: Workaround bug #25004. Clipboard feature processing in sdk. || !e.relatedTarget) {
*/
if (!(Common.Utils.isSafari && Common.Utils.isMac) && !/area_id/.test(e.target.id)) {
me.api.asc_enableKeyEvents(true); me.api.asc_enableKeyEvents(true);
if (/msg-reply/.test(e.target.className)) if (/msg-reply/.test(e.target.className))
me.dontCloseDummyComment = false; me.dontCloseDummyComment = false;
@ -188,14 +181,18 @@ define([
}, },
'settings:unitschanged':_.bind(this.unitsChanged, this), 'settings:unitschanged':_.bind(this.unitsChanged, this),
'dataview:focus': function(e){ 'dataview:focus': function(e){
me.api.asc_enableKeyEvents(false);
}, },
'dataview:blur': function(e){ 'dataview:blur': function(e){
if (!me.isModalShowed) { if (!me.isModalShowed) {
me.api.asc_enableKeyEvents(true); me.api.asc_enableKeyEvents(true);
me.onEditComplete();
} }
}, },
'menu:show': function(e){
},
'menu:hide': function(e){
if (!me.isModalShowed)
me.api.asc_enableKeyEvents(true);
},
'edit:complete': _.bind(me.onEditComplete, me) 'edit:complete': _.bind(me.onEditComplete, me)
}); });
@ -223,6 +220,8 @@ define([
this.appOptions.canBackToFolder = (this.editorConfig.canBackToFolder!==false) && (typeof (this.editorConfig.customization) == 'object') this.appOptions.canBackToFolder = (this.editorConfig.canBackToFolder!==false) && (typeof (this.editorConfig.customization) == 'object')
&& (typeof (this.editorConfig.customization.goback) == 'object') && !_.isEmpty(this.editorConfig.customization.goback.url); && (typeof (this.editorConfig.customization.goback) == 'object') && !_.isEmpty(this.editorConfig.customization.goback.url);
this.appOptions.canBack = this.editorConfig.nativeApp !== true && this.appOptions.canBackToFolder === true; this.appOptions.canBack = this.editorConfig.nativeApp !== true && this.appOptions.canBackToFolder === true;
this.appOptions.canPlugins = false;
this.plugins = this.editorConfig.plugins;
this.getApplication() this.getApplication()
.getController('Viewport') .getController('Viewport')
@ -295,6 +294,7 @@ define([
if (!old_rights) if (!old_rights)
Common.UI.warning({ Common.UI.warning({
title: this.notcriticalErrorTitle, title: this.notcriticalErrorTitle,
maxwidth: 600,
msg : _.isEmpty(data.message) ? this.warnProcessRightsChange : data.message, msg : _.isEmpty(data.message) ? this.warnProcessRightsChange : data.message,
callback: function(){ callback: function(){
me._state.lostEditingRights = false; me._state.lostEditingRights = false;
@ -591,7 +591,7 @@ define([
me.api.SetTextBoxInputMode(value!==null && parseInt(value) == 1); me.api.SetTextBoxInputMode(value!==null && parseInt(value) == 1);
/** coauthoring begin **/ /** coauthoring begin **/
if (me.appOptions.isEdit && me.appOptions.canLicense && !me.appOptions.isOffline) { if (me.appOptions.isEdit && me.appOptions.canLicense && !me.appOptions.isOffline && me.appOptions.canCoAuthoring) {
value = Common.localStorage.getItem("pe-settings-coauthmode"); value = Common.localStorage.getItem("pe-settings-coauthmode");
me._state.fastCoauth = (value===null || parseInt(value) == 1); me._state.fastCoauth = (value===null || parseInt(value) == 1);
} else } else
@ -607,7 +607,8 @@ define([
fontsController = application.getController('Common.Controllers.Fonts'), fontsController = application.getController('Common.Controllers.Fonts'),
rightmenuController = application.getController('RightMenu'), rightmenuController = application.getController('RightMenu'),
leftmenuController = application.getController('LeftMenu'), leftmenuController = application.getController('LeftMenu'),
chatController = application.getController('Common.Controllers.Chat'); chatController = application.getController('Common.Controllers.Chat'),
pluginsController = application.getController('Common.Controllers.Plugins');
leftmenuController.getView('LeftMenu').getMenu('file').loadDocument({doc:me.document}); leftmenuController.getView('LeftMenu').getMenu('file').loadDocument({doc:me.document});
leftmenuController.setMode(me.appOptions).setApi(me.api).createDelayedElements(); leftmenuController.setMode(me.appOptions).setApi(me.api).createDelayedElements();
@ -615,6 +616,10 @@ define([
chatController.setApi(this.api).setMode(this.appOptions); chatController.setApi(this.api).setMode(this.appOptions);
application.getController('Common.Controllers.ExternalDiagramEditor').setApi(this.api).loadConfig({config:this.editorConfig, customization: this.editorConfig.customization}); application.getController('Common.Controllers.ExternalDiagramEditor').setApi(this.api).loadConfig({config:this.editorConfig, customization: this.editorConfig.customization});
pluginsController.setApi(me.api);
me.updatePluginsList(me.plugins);
me.api.asc_registerCallback('asc_onPluginsInit', _.bind(me.updatePluginsList, me));
documentHolderController.setApi(me.api); documentHolderController.setApi(me.api);
documentHolderController.createDelayedElements(); documentHolderController.createDelayedElements();
statusbarController.createDelayedElements(); statusbarController.createDelayedElements();
@ -630,7 +635,7 @@ define([
if (me.appOptions.isEdit) { if (me.appOptions.isEdit) {
value = Common.localStorage.getItem("pe-settings-autosave"); value = Common.localStorage.getItem("pe-settings-autosave");
value = (!me._state.fastCoauth && value!==null) ? parseInt(value) : 1; value = (!me._state.fastCoauth && value!==null) ? parseInt(value) : (me.appOptions.canCoAuthoring ? 1 : 0);
me.api.asc_setAutoSaveGap(value); me.api.asc_setAutoSaveGap(value);
if (me.needToUpdateVersion) if (me.needToUpdateVersion)
@ -707,8 +712,19 @@ define([
}, },
onEditorPermissions: function(params) { onEditorPermissions: function(params) {
var licType = params.asc_getLicenseType();
if (Asc.c_oLicenseResult.Expired === licType || Asc.c_oLicenseResult.Error === licType || Asc.c_oLicenseResult.ExpiredTrial === licType) {
Common.UI.warning({
title: this.titleLicenseExp,
msg: this.warnLicenseExp,
buttons: [],
closable: false
});
return;
}
this.appOptions.isOffline = this.api.asc_isOffline(); this.appOptions.isOffline = this.api.asc_isOffline();
this.appOptions.canLicense = params.asc_getCanLicense ? params.asc_getCanLicense() : false; this.appOptions.canLicense = (licType === Asc.c_oLicenseResult.Success);
this.appOptions.isLightVersion = params.asc_getIsLight(); this.appOptions.isLightVersion = params.asc_getIsLight();
/** coauthoring begin **/ /** coauthoring begin **/
this.appOptions.canCoAuthoring = !this.appOptions.isLightVersion; this.appOptions.canCoAuthoring = !this.appOptions.isLightVersion;
@ -723,7 +739,7 @@ define([
this.appOptions.canChat = this.appOptions.canLicense && !this.appOptions.isOffline && !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.chat===false); this.appOptions.canChat = this.appOptions.canLicense && !this.appOptions.isOffline && !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.chat===false);
this.appOptions.canPrint = (this.permissions.print !== false); this.appOptions.canPrint = (this.permissions.print !== false);
this._state.licenseWarning = !this.appOptions.canLicense && this.appOptions.canEdit && this.editorConfig.mode !== 'view'; this._state.licenseWarning = (licType===Asc.c_oLicenseResult.Connections) && this.appOptions.canEdit && this.editorConfig.mode !== 'view';
this.appOptions.canBranding = params.asc_getCanBranding() && (typeof this.editorConfig.customization == 'object'); this.appOptions.canBranding = params.asc_getCanBranding() && (typeof this.editorConfig.customization == 'object');
if (this.appOptions.canBranding) { if (this.appOptions.canBranding) {
@ -935,7 +951,7 @@ define([
break; break;
case Asc.c_oAscError.ID.CoAuthoringDisconnect: case Asc.c_oAscError.ID.CoAuthoringDisconnect:
config.msg = this.errorCoAuthoringDisconnect; config.msg = (this.appOptions.isEdit) ? this.errorCoAuthoringDisconnect : this.errorViewerDisconnect;
break; break;
case Asc.c_oAscError.ID.ConvertationPassword: case Asc.c_oAscError.ID.ConvertationPassword:
@ -1432,7 +1448,7 @@ define([
}, },
applySettings: function() { applySettings: function() {
if (this.appOptions.isEdit && this.appOptions.canLicense && !this.appOptions.isOffline) { if (this.appOptions.isEdit && this.appOptions.canLicense && !this.appOptions.isOffline && this.appOptions.canCoAuthoring) {
var value = Common.localStorage.getItem("pe-settings-coauthmode"), var value = Common.localStorage.getItem("pe-settings-coauthmode"),
oldval = this._state.fastCoauth; oldval = this._state.fastCoauth;
this._state.fastCoauth = (value===null || parseInt(value) == 1); this._state.fastCoauth = (value===null || parseInt(value) == 1);
@ -1479,6 +1495,63 @@ define([
if (url) this.iframePrint.src = url; if (url) this.iframePrint.src = url;
}, },
updatePluginsList: function(plugins) {
var pluginStore = this.getApplication().getCollection('Common.Collections.Plugins'),
isEdit = this.appOptions.isEdit;
if (pluginStore && plugins) {
var arr = [];
plugins.pluginsData.forEach(function(item){
var variations = item.variations,
variationsArr = [];
variations.forEach(function(itemVar){
var isSupported = false;
for (var i=0; i<itemVar.EditorsSupport.length; i++){
if (itemVar.EditorsSupport[i]=='slide') {
isSupported = true; break;
}
}
if (isSupported && (isEdit || itemVar.isViewer))
variationsArr.push(new Common.Models.PluginVariation({
description: itemVar.description,
index: variationsArr.length,
url : itemVar.url,
icons : itemVar.icons,
isViewer: itemVar.isViewer,
EditorsSupport: itemVar.EditorsSupport,
isVisual: itemVar.isVisual,
isModal: itemVar.isModal,
isInsideMode: itemVar.isInsideMode,
initDataType: itemVar.initDataType,
initData: itemVar.initData,
isUpdateOleOnResize : itemVar.isUpdateOleOnResize,
buttons: itemVar.buttons,
size: itemVar.size,
initOnSelectionChanged: itemVar.initOnSelectionChanged
}));
});
if (variationsArr.length>0)
arr.push(new Common.Models.Plugin({
name : item.name,
guid: item.guid,
baseUrl : item.baseUrl,
variations: variationsArr,
currentVariation: 0
}));
});
pluginStore.reset(arr);
this.appOptions.pluginsPath = (plugins.url);
this.appOptions.canPlugins = (arr.length>0);
} else {
this.appOptions.pluginsPath = '';
this.appOptions.canPlugins = false;
}
if (this.appOptions.canPlugins)
this.getApplication().getController('Common.Controllers.Plugins').setMode(this.appOptions);
this.getApplication().getController('LeftMenu').enablePlugins();
},
// Translation // Translation
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.', 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.',
defaultTitleText: 'ONLYOFFICE Presentation Editor', defaultTitleText: 'ONLYOFFICE Presentation Editor',
@ -1554,7 +1627,7 @@ define([
txtSldLtTVertTitleAndTx: 'Vertical Title and Text', txtSldLtTVertTitleAndTx: 'Vertical Title and Text',
txtSldLtTVertTitleAndTxOverChart: 'Vertical Title and Text Over Chart', txtSldLtTVertTitleAndTxOverChart: 'Vertical Title and Text Over Chart',
txtSldLtTVertTx: 'Vertical Text', txtSldLtTVertTx: 'Vertical Text',
textLoadingDocument: 'Loading document', textLoadingDocument: 'Loading presentation',
warnBrowserZoom: 'Your browser\'s current zoom setting is not fully supported. Please reset to the default zoom by pressing Ctrl+0.', warnBrowserZoom: 'Your browser\'s current zoom setting is not fully supported. Please reset to the default zoom by pressing Ctrl+0.',
warnBrowserIE9: 'The application has low capabilities on IE9. Use IE10 or higher', warnBrowserIE9: 'The application has low capabilities on IE9. Use IE10 or higher',
loadThemeTitleText: 'Loading Theme', loadThemeTitleText: 'Loading Theme',
@ -1580,8 +1653,8 @@ define([
applyChangesTextText: 'Loading data...', applyChangesTextText: 'Loading data...',
savePreparingText: 'Preparing to save', savePreparingText: 'Preparing to save',
savePreparingTitle: 'Preparing to save. Please wait...', savePreparingTitle: 'Preparing to save. Please wait...',
loadingDocumentTitleText: 'Loading Document', loadingDocumentTitleText: 'Loading presentation',
loadingDocumentTextText: 'Loading document...', loadingDocumentTextText: 'Loading presentation...',
warnProcessRightsChange: 'You have been denied the right to edit the file.', warnProcessRightsChange: 'You have been denied the right to edit the file.',
errorProcessSaveResult: 'Saving is failed.', errorProcessSaveResult: 'Saving is failed.',
textCloseTip: '\nClick to close the tip.', textCloseTip: '\nClick to close the tip.',
@ -1603,7 +1676,10 @@ define([
textBuyNow: 'Visit website', textBuyNow: 'Visit website',
textNoLicenseTitle: 'ONLYOFFICE open source version', textNoLicenseTitle: 'ONLYOFFICE open source version',
warnNoLicense: 'You are using an open source version of ONLYOFFICE. The version has limitations for concurrent connections to the document server (20 connections at a time).<br>If you need more please consider purchasing a commercial license.', warnNoLicense: 'You are using an open source version of ONLYOFFICE. The version has limitations for concurrent connections to the document server (20 connections at a time).<br>If you need more please consider purchasing a commercial license.',
textContactUs: 'Contact sales' textContactUs: 'Contact sales',
errorViewerDisconnect: 'Connection is lost. You can still view the document,<br>but will not be able to download until the connection is restored.',
warnLicenseExp: 'Your license has expired.<br>Please update your license and refresh the page.',
titleLicenseExp: 'License expired'
} }
})(), PE.Controllers.Main || {})) })(), PE.Controllers.Main || {}))
}); });

View file

@ -879,29 +879,21 @@ define([
onCopyPaste: function(copy, e) { onCopyPaste: function(copy, e) {
var me = this; var me = this;
if (me.api) { if (me.api) {
if (typeof window['AscDesktopEditor'] === 'object') { var res = (copy) ? me.api.Copy() : me.api.Paste();
copy ? me.api.Copy() : me.api.Paste(); if (!res) {
Common.NotificationCenter.trigger('edit:complete', me.toolbar);
} else {
var value = Common.localStorage.getItem("pe-hide-copywarning"); var value = Common.localStorage.getItem("pe-hide-copywarning");
if (!(value && parseInt(value) == 1)) { if (!(value && parseInt(value) == 1)) {
(new Common.Views.CopyWarningDialog({ (new Common.Views.CopyWarningDialog({
handler: function(dontshow) { handler: function(dontshow) {
copy ? me.api.Copy() : me.api.Paste();
if (dontshow) Common.localStorage.setItem("pe-hide-copywarning", 1); if (dontshow) Common.localStorage.setItem("pe-hide-copywarning", 1);
Common.NotificationCenter.trigger('edit:complete', me.toolbar); Common.NotificationCenter.trigger('edit:complete', me.toolbar);
} }
})).show(); })).show();
} else {
copy ? me.api.Copy() : me.api.Paste();
Common.NotificationCenter.trigger('edit:complete', me.toolbar);
} }
} } else
Common.component.Analytics.trackEvent('ToolBar', 'Copy Warning'); Common.component.Analytics.trackEvent('ToolBar', 'Copy Warning');
} else {
Common.NotificationCenter.trigger('edit:complete', me.toolbar);
} }
Common.NotificationCenter.trigger('edit:complete', me.toolbar);
}, },
onBold: function(btn, e) { onBold: function(btn, e) {
@ -1106,7 +1098,6 @@ define([
msg: this.textFontSizeErr, msg: this.textFontSizeErr,
callback: function() { callback: function() {
_.defer(function(btn) { _.defer(function(btn) {
me.api.asc_enableKeyEvents(false);
$('input', combo.cmpEl).focus(); $('input', combo.cmpEl).focus();
}) })
} }

View file

@ -7,6 +7,7 @@
<button id="left-btn-comments" class="btn btn-category" content-target="left-panel-comments"><span class="btn-icon img-toolbarmenu btn-menu-comments">&nbsp;</span></button> <button id="left-btn-comments" class="btn btn-category" content-target="left-panel-comments"><span class="btn-icon img-toolbarmenu btn-menu-comments">&nbsp;</span></button>
<button id="left-btn-chat" class="btn btn-category" content-target="left-panel-chat"><span class="btn-icon img-toolbarmenu btn-menu-chat">&nbsp;</span></button> <button id="left-btn-chat" class="btn btn-category" content-target="left-panel-chat"><span class="btn-icon img-toolbarmenu btn-menu-chat">&nbsp;</span></button>
<!-- /** coauthoring end **/ --> <!-- /** coauthoring end **/ -->
<button id="left-btn-plugins" class="btn btn-category" content-target=""><span class="btn-icon img-toolbarmenu btn-menu-plugin">&nbsp;</span></button>
<button id="left-btn-support" class="btn btn-category" content-target=""><span class="btn-icon img-toolbarmenu btn-menu-support">&nbsp;</span></button> <button id="left-btn-support" class="btn btn-category" content-target=""><span class="btn-icon img-toolbarmenu btn-menu-support">&nbsp;</span></button>
<button id="left-btn-about" class="btn btn-category" content-target=""><span class="btn-icon img-toolbarmenu btn-menu-about">&nbsp;</span></button> <button id="left-btn-about" class="btn btn-category" content-target=""><span class="btn-icon img-toolbarmenu btn-menu-about">&nbsp;</span></button>
</div> </div>
@ -15,5 +16,6 @@
<div id="left-panel-comments" class="" style="display: none;" /> <div id="left-panel-comments" class="" style="display: none;" />
<div id="left-panel-chat" class="" style="display: none;" /> <div id="left-panel-chat" class="" style="display: none;" />
<!-- /** coauthoring end **/ --> <!-- /** coauthoring end **/ -->
<div id="left-panel-plugins" class="" style="display: none; height: 100%;" />
</div> </div>
</div> </div>

View file

@ -21,7 +21,7 @@
<button type="button" class="btn btn-text-default" id="shape-button-from-file" style="width:90px;"><%= scope.textFromFile %></button> <button type="button" class="btn btn-text-default" id="shape-button-from-file" style="width:90px;"><%= scope.textFromFile %></button>
</td> </td>
<td class="padding-small" width="50%"> <td class="padding-small" width="50%">
<button type="button" class="btn btn-text-default" id="shape-button-from-url" style="width:90px;"><%= scope.textFromUrl %></button> <button type="button" class="btn btn-text-default" id="shape-button-from-url" style="width:90px;float:right;"><%= scope.textFromUrl %></button>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -29,7 +29,7 @@
<div id="shape-combo-fill-type" style="width: 90px;"></div> <div id="shape-combo-fill-type" style="width: 90px;"></div>
</td> </td>
<td rowspan="2"> <td rowspan="2">
<div style="width: 90px; height: 80px; padding: 14px 20px; border: 1px solid #AFAFAF; border-radius: 2px; background: #ffffff;"> <div style="width: 90px; height: 80px; padding: 14px 20px; border: 1px solid #AFAFAF; border-radius: 2px; background: #ffffff;float:right;">
<div id="shape-texture-img" style="width: 50px;height: 50px;"></div> <div id="shape-texture-img" style="width: 50px;height: 50px;"></div>
</div> </div>
</td> </td>
@ -108,6 +108,14 @@
</div> </div>
</td> </td>
</tr> </tr>
<tr>
<td class="padding-small">
<div style="display:inline-block;width:100px;vertical-align: middle;">
<label class="input-label" style=""><%= scope.strType %></label>
<div id="shape-combo-border-type" style="width: 93px;"></div>
</div>
</td>
</tr>
<tr class="shape-only"> <tr class="shape-only">
<td class="padding-small"></td> <td class="padding-small"></td>
</tr> </tr>

View file

@ -21,7 +21,7 @@
<button type="button" class="btn btn-text-default" id="slide-button-from-file" style="width:90px;"><%= scope.textFromFile %></button> <button type="button" class="btn btn-text-default" id="slide-button-from-file" style="width:90px;"><%= scope.textFromFile %></button>
</td> </td>
<td class="padding-small" width="50%"> <td class="padding-small" width="50%">
<button type="button" class="btn btn-text-default" id="slide-button-from-url" style="width:90px;"><%= scope.textFromUrl %></button> <button type="button" class="btn btn-text-default" id="slide-button-from-url" style="width:90px;float:right;"><%= scope.textFromUrl %></button>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -29,7 +29,7 @@
<div id="slide-combo-fill-type" style="width: 90px;"></div> <div id="slide-combo-fill-type" style="width: 90px;"></div>
</td> </td>
<td rowspan="2"> <td rowspan="2">
<div style="width: 90px; height: 80px; padding: 14px 20px; border: 1px solid #AFAFAF; border-radius: 2px; background: #ffffff;"> <div style="width: 90px; height: 80px; padding: 14px 20px; border: 1px solid #AFAFAF; border-radius: 2px; background: #ffffff;float:right;">
<div id="slide-texture-img" style="width: 50px;height: 50px;"></div> <div id="slide-texture-img" style="width: 50px;height: 50px;"></div>
</div> </div>
</td> </td>

View file

@ -36,7 +36,7 @@
<button type="button" class="btn btn-text-default" id="textart-button-from-file" style="width:90px;"><%= scope.textFromFile %></button> <button type="button" class="btn btn-text-default" id="textart-button-from-file" style="width:90px;"><%= scope.textFromFile %></button>
</td> </td>
<td class="padding-small" width="50%"> <td class="padding-small" width="50%">
<button type="button" class="btn btn-text-default" id="textart-button-from-url" style="width:90px;"><%= scope.textFromUrl %></button> <button type="button" class="btn btn-text-default" id="textart-button-from-url" style="width:90px;float:right;"><%= scope.textFromUrl %></button>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -44,7 +44,7 @@
<div id="textart-combo-fill-type" style="width: 90px;"></div> <div id="textart-combo-fill-type" style="width: 90px;"></div>
</td> </td>
<td rowspan="2"> <td rowspan="2">
<div style="width: 90px; height: 80px; padding: 14px 20px; border: 1px solid #AFAFAF; border-radius: 2px; background: #ffffff;"> <div style="width: 90px; height: 80px; padding: 14px 20px; border: 1px solid #AFAFAF; border-radius: 2px; background: #ffffff;float:right;">
<div id="textart-texture-img" style="width: 50px;height: 50px;"></div> <div id="textart-texture-img" style="width: 50px;height: 50px;"></div>
</div> </div>
</td> </td>
@ -123,6 +123,14 @@
</div> </div>
</td> </td>
</tr> </tr>
<tr>
<td class="padding-small">
<div style="display:inline-block;width:100px;vertical-align: middle;">
<label class="input-label" style=""><%= scope.strType %></label>
<div id="textart-combo-border-type" style="width: 93px;"></div>
</div>
</td>
</tr>
<tr> <tr>
<td class="padding-small"> <td class="padding-small">
<div class="separator horizontal"></div> <div class="separator horizontal"></div>

View file

@ -512,7 +512,7 @@ define([
textBar: 'Bar Chart', textBar: 'Bar Chart',
textArea: 'Area Chart', textArea: 'Area Chart',
textPie: 'Pie Chart', textPie: 'Pie Chart',
textPoint: 'Point Chart', textPoint: 'XY (Scatter) Chart',
textStock: 'Stock Chart', textStock: 'Stock Chart',
textStyle: 'Style' textStyle: 'Style'
}, PE.Views.ChartSettings || {})); }, PE.Views.ChartSettings || {}));

View file

@ -101,9 +101,6 @@ define([
menu.alignPosition(); menu.alignPosition();
} }
_.delay(function() { _.delay(function() {
var value = Common.localStorage.getItem("pe-settings-inputmode"); // only for hieroglyphs mode
if (value!==null && parseInt(value) == 1)
me.api.asc_enableKeyEvents(false);
menu.cmpEl.focus(); menu.cmpEl.focus();
}, 10); }, 10);
@ -191,6 +188,12 @@ define([
var onFocusObject = function(selectedElements) { var onFocusObject = function(selectedElements) {
if (me.mode.isEdit && me.currentMenu && me.currentMenu.isVisible()){ if (me.mode.isEdit && me.currentMenu && me.currentMenu.isVisible()){
if (me.api.asc_getCurrentFocusObject() === 0 ){ // thumbnails
if (me.slideMenu===me.currentMenu) {
me.currentMenu.options.initMenu({isSlideSelect: me.slideMenu.items[2].isVisible(), fromThumbs: true});
me.currentMenu.alignPosition();
}
} else {
var obj = fillMenuProps(selectedElements); var obj = fillMenuProps(selectedElements);
if (obj) { if (obj) {
if (obj.menu_to_show===me.currentMenu) { if (obj.menu_to_show===me.currentMenu) {
@ -199,6 +202,7 @@ define([
} }
} }
} }
}
}; };
var handleDocumentWheel = function(event){ var handleDocumentWheel = function(event){
@ -688,6 +692,14 @@ define([
me.slidesCount = count; me.slidesCount = count;
}; };
var onApiCurrentPages = function(number) {
if (me.currentMenu && me.currentMenu.isVisible()) {
if (me._isFromSlideMenu !== true && me._isFromSlideMenu !== number)
me.currentMenu.hide();
me._isFromSlideMenu = number;
}
};
this.setApi = function(o) { this.setApi = function(o) {
me.api = o; me.api = o;
@ -698,6 +710,7 @@ define([
me.api.asc_registerCallback('asc_onPaintSlideNum', _.bind(onPaintSlideNum, me)); me.api.asc_registerCallback('asc_onPaintSlideNum', _.bind(onPaintSlideNum, me));
me.api.asc_registerCallback('asc_onEndPaintSlideNum', _.bind(onEndPaintSlideNum, me)); me.api.asc_registerCallback('asc_onEndPaintSlideNum', _.bind(onEndPaintSlideNum, me));
me.api.asc_registerCallback('asc_onCountPages', _.bind(onApiCountPages, me)); me.api.asc_registerCallback('asc_onCountPages', _.bind(onApiCountPages, me));
me.api.asc_registerCallback('asc_onCurrentPage', _.bind(onApiCurrentPages, me));
me.slidesCount = me.api.getCountPages(); me.slidesCount = me.api.getCountPages();
//hyperlink //hyperlink
@ -813,7 +826,6 @@ define([
addComment: function(item, e, eOpt){ addComment: function(item, e, eOpt){
if (this.api && this.mode.canCoAuthoring && this.mode.isEdit && this.mode.canComments) { if (this.api && this.mode.canCoAuthoring && this.mode.isEdit && this.mode.canComments) {
this.suppressEditComplete = true; this.suppressEditComplete = true;
this.api.asc_enableKeyEvents(false);
var controller = PE.getController('Common.Controllers.Comments'); var controller = PE.getController('Common.Controllers.Comments');
if (controller) { if (controller) {
@ -838,26 +850,20 @@ define([
onCutCopyPaste: function(item, e) { onCutCopyPaste: function(item, e) {
var me = this; var me = this;
if (me.api) { if (me.api) {
if (typeof window['AscDesktopEditor'] === 'object') { var res = (item.value == 'cut') ? me.api.Cut() : ((item.value == 'copy') ? me.api.Copy() : me.api.Paste());
(item.value == 'cut') ? me.api.Cut() : ((item.value == 'copy') ? me.api.Copy() : me.api.Paste()); if (!res) {
} else {
var value = Common.localStorage.getItem("pe-hide-copywarning"); var value = Common.localStorage.getItem("pe-hide-copywarning");
if (!(value && parseInt(value) == 1)) { if (!(value && parseInt(value) == 1)) {
(new Common.Views.CopyWarningDialog({ (new Common.Views.CopyWarningDialog({
handler: function(dontshow) { handler: function(dontshow) {
(item.value == 'cut') ? me.api.Cut() : ((item.value == 'copy') ? me.api.Copy() : me.api.Paste());
if (dontshow) Common.localStorage.setItem("pe-hide-copywarning", 1); if (dontshow) Common.localStorage.setItem("pe-hide-copywarning", 1);
me.fireEvent('editcomplete', me); me.fireEvent('editcomplete', me);
} }
})).show(); })).show();
} else { }
(item.value == 'cut') ? me.api.Cut() : ((item.value == 'copy') ? me.api.Copy() : me.api.Paste()); }
}
me.fireEvent('editcomplete', me); me.fireEvent('editcomplete', me);
}
}
} else {
me.fireEvent('editcomplete', me);
}
}, },
fullScreen: function(element) { fullScreen: function(element) {
@ -905,14 +911,15 @@ define([
var mnuDeleteSlide = new Common.UI.MenuItem({ var mnuDeleteSlide = new Common.UI.MenuItem({
caption : me.txtDeleteSlide caption : me.txtDeleteSlide
}).on('click', _.bind(function(item) { }).on('click', function(item) {
if (me.api){ if (me.api){
me._isFromSlideMenu = true;
me.api.DeleteSlide(); me.api.DeleteSlide();
me.fireEvent('editcomplete', this); me.fireEvent('editcomplete', me);
Common.component.Analytics.trackEvent('DocumentHolder', 'Delete Slide'); Common.component.Analytics.trackEvent('DocumentHolder', 'Delete Slide');
} }
}, me)); });
var mnuChangeSlide = new Common.UI.MenuItem({ var mnuChangeSlide = new Common.UI.MenuItem({
caption : me.txtChangeLayout, caption : me.txtChangeLayout,
@ -1014,9 +1021,10 @@ define([
caption : me.txtNewSlide caption : me.txtNewSlide
}).on('click', function(item) { }).on('click', function(item) {
if (me.api) { if (me.api) {
me._isFromSlideMenu = true;
me.api.AddSlide(); me.api.AddSlide();
me.fireEvent('editcomplete', this); me.fireEvent('editcomplete', me);
Common.component.Analytics.trackEvent('DocumentHolder', 'Add Slide'); Common.component.Analytics.trackEvent('DocumentHolder', 'Add Slide');
} }
}), }),
@ -1024,9 +1032,10 @@ define([
caption : me.txtDuplicateSlide caption : me.txtDuplicateSlide
}).on('click', function(item){ }).on('click', function(item){
if (me.api) { if (me.api) {
me._isFromSlideMenu = true;
me.api.DublicateSlide(); me.api.DublicateSlide();
me.fireEvent('editcomplete', this); me.fireEvent('editcomplete', me);
Common.component.Analytics.trackEvent('DocumentHolder', 'Dublicate Hyperlink'); Common.component.Analytics.trackEvent('DocumentHolder', 'Dublicate Hyperlink');
} }
}), }),

View file

@ -258,7 +258,7 @@ define([
this.lblAutosave.text(this.textAutoRecover); this.lblAutosave.text(this.textAutoRecover);
} }
/** coauthoring begin **/ /** coauthoring begin **/
$('tr.coauth.changes', this.el)[mode.isEdit && mode.canLicense && !mode.isOffline ? 'show' : 'hide'](); $('tr.coauth.changes', this.el)[mode.isEdit && mode.canLicense && !mode.isOffline && mode.canCoAuthoring ? 'show' : 'hide']();
/** coauthoring end **/ /** coauthoring end **/
}, },
@ -273,7 +273,7 @@ define([
/** coauthoring begin **/ /** coauthoring begin **/
value = Common.localStorage.getItem("pe-settings-coauthmode"); value = Common.localStorage.getItem("pe-settings-coauthmode");
var fast_coauth = (value===null || parseInt(value) == 1) && !(this.mode.isDesktopApp && this.mode.isOffline); var fast_coauth = (value===null || parseInt(value) == 1) && !(this.mode.isDesktopApp && this.mode.isOffline) && this.mode.canCoAuthoring;
item = this.cmbCoAuthMode.store.findWhere({value: parseInt(value)}); item = this.cmbCoAuthMode.store.findWhere({value: parseInt(value)});
this.cmbCoAuthMode.setValue(item ? item.get('value') : 1); this.cmbCoAuthMode.setValue(item ? item.get('value') : 1);
@ -286,7 +286,7 @@ define([
this._oldUnits = this.cmbUnit.getValue(); this._oldUnits = this.cmbUnit.getValue();
value = Common.localStorage.getItem("pe-settings-autosave"); value = Common.localStorage.getItem("pe-settings-autosave");
this.chAutosave.setValue(fast_coauth || (value===null || parseInt(value) == 1)); this.chAutosave.setValue(fast_coauth || (value===null ? this.mode.canCoAuthoring : parseInt(value) == 1));
value = Common.localStorage.getItem("pe-settings-showsnaplines"); value = Common.localStorage.getItem("pe-settings-showsnaplines");
this.chAlignGuides.setValue(value===null || parseInt(value) == 1); this.chAlignGuides.setValue(value===null || parseInt(value) == 1);
@ -296,7 +296,7 @@ define([
Common.localStorage.setItem("pe-settings-inputmode", this.chInputMode.isChecked() ? 1 : 0); Common.localStorage.setItem("pe-settings-inputmode", this.chInputMode.isChecked() ? 1 : 0);
Common.localStorage.setItem("pe-settings-zoom", this.cmbZoom.getValue()); Common.localStorage.setItem("pe-settings-zoom", this.cmbZoom.getValue());
/** coauthoring begin **/ /** coauthoring begin **/
if (this.mode.isEdit && this.mode.canLicense && !this.mode.isOffline) { if (this.mode.isEdit && this.mode.canLicense && !this.mode.isOffline && this.mode.canCoAuthoring) {
Common.localStorage.setItem("pe-settings-coauthmode", this.cmbCoAuthMode.getValue()); Common.localStorage.setItem("pe-settings-coauthmode", this.cmbCoAuthMode.getValue());
} }
/** coauthoring end **/ /** coauthoring end **/

View file

@ -111,8 +111,8 @@ define([
}, this)); }, this));
this.btnInsertFromUrl.on('click', _.bind(this.insertFromUrl, this)); this.btnInsertFromUrl.on('click', _.bind(this.insertFromUrl, this));
this.btnEditObject.on('click', _.bind(function(btn){ this.btnEditObject.on('click', _.bind(function(btn){
// if (this.api) this.api.asc_pluginRun(this._originalProps.asc_getPluginGuid(), 0, this._originalProps.asc_getPluginData()); if (this.api) this.api.asc_pluginRun(this._originalProps.asc_getPluginGuid(), 0, this._originalProps.asc_getPluginData());
// this.fireEvent('editcomplete', this); this.fireEvent('editcomplete', this);
}, this)); }, this));
$(this.el).on('click', '#image-advanced-link', _.bind(this.openAdvancedSettings, this)); $(this.el).on('click', '#image-advanced-link', _.bind(this.openAdvancedSettings, this));
}, },
@ -180,12 +180,11 @@ define([
} }
if (this._state.isOleObject) { if (this._state.isOleObject) {
// var plugin = DE.getCollection('Common.Collections.Plugins').findWhere({guid: pluginGuid}); var plugin = PE.getCollection('Common.Collections.Plugins').findWhere({guid: pluginGuid});
// this.btnEditObject.setDisabled(plugin===null || plugin ===undefined); this.btnEditObject.setDisabled(plugin===null || plugin ===undefined || this._locked);
this.btnEditObject.setDisabled(true);
} else { } else {
this.btnInsertFromUrl.setDisabled(pluginGuid===null); this.btnInsertFromUrl.setDisabled(pluginGuid===null || this._locked);
this.btnInsertFromFile.setDisabled(pluginGuid===null); this.btnInsertFromFile.setDisabled(pluginGuid===null || this._locked);
} }
} }
}, },

View file

@ -50,6 +50,7 @@ define([
'common/main/lib/view/Comments', 'common/main/lib/view/Comments',
'common/main/lib/view/Chat', 'common/main/lib/view/Chat',
/** coauthoring end **/ /** coauthoring end **/
'common/main/lib/view/Plugins',
'common/main/lib/view/SearchDialog', 'common/main/lib/view/SearchDialog',
'presentationeditor/main/app/view/FileMenu' 'presentationeditor/main/app/view/FileMenu'
], function (menuTemplate, $, _, Backbone) { ], function (menuTemplate, $, _, Backbone) {
@ -69,6 +70,7 @@ define([
/** coauthoring begin **/ /** coauthoring begin **/
'click #left-btn-comments': _.bind(this.onCoauthOptions, this), 'click #left-btn-comments': _.bind(this.onCoauthOptions, this),
'click #left-btn-chat': _.bind(this.onCoauthOptions, this), 'click #left-btn-chat': _.bind(this.onCoauthOptions, this),
'click #left-btn-plugins': _.bind(this.onCoauthOptions, this),
/** coauthoring end **/ /** coauthoring end **/
'click #left-btn-support': function() { 'click #left-btn-support': function() {
var config = this.mode.customization; var config = this.mode.customization;
@ -154,6 +156,16 @@ define([
this.btnChat.on('click', _.bind(this.onBtnMenuClick, this)); this.btnChat.on('click', _.bind(this.onBtnMenuClick, this));
/** coauthoring end **/ /** coauthoring end **/
this.btnPlugins = new Common.UI.Button({
el: $('#left-btn-plugins'),
hint: this.tipPlugins,
enableToggle: true,
disabled: true,
toggleGroup: 'leftMenuGroup'
});
this.btnPlugins.hide();
this.btnPlugins.on('click', _.bind(this.onBtnMenuClick, this));
this.btnSearch.on('click', _.bind(this.onBtnMenuClick, this)); this.btnSearch.on('click', _.bind(this.onBtnMenuClick, this));
this.btnThumbs.on('click', _.bind(this.onBtnMenuClick, this)); this.btnThumbs.on('click', _.bind(this.onBtnMenuClick, this));
this.btnAbout.on('toggle', _.bind(this.onBtnMenuToggle, this)); this.btnAbout.on('toggle', _.bind(this.onBtnMenuToggle, this));
@ -216,8 +228,8 @@ define([
(!btn.pressed) && this.fireEvent('panel:show', [this, btn.options.action, btn.pressed]); (!btn.pressed) && this.fireEvent('panel:show', [this, btn.options.action, btn.pressed]);
}, },
/** coauthoring begin **/
onCoauthOptions: function(e) { onCoauthOptions: function(e) {
/** coauthoring begin **/
if (this.mode.canCoAuthoring) { if (this.mode.canCoAuthoring) {
if (this.mode.canComments) { if (this.mode.canComments) {
if (this.btnComments.pressed && this.btnComments.$el.hasClass('notify')) if (this.btnComments.pressed && this.btnComments.$el.hasClass('notify'))
@ -235,16 +247,28 @@ define([
this.panelChat['hide'](); this.panelChat['hide']();
} }
} }
/** coauthoring end **/
if (this.mode.canPlugins && this.panelPlugins) {
if (this.btnPlugins.pressed) {
this.panelPlugins.show();
} else
this.panelPlugins['hide']();
}
}, },
setOptionsPanel: function(name, panel) { setOptionsPanel: function(name, panel) {
/** coauthoring begin **/
if (name == 'chat') { if (name == 'chat') {
this.panelChat = panel.render('#left-panel-chat'); this.panelChat = panel.render('#left-panel-chat');
} else if (name == 'comment') { } else if (name == 'comment') {
this.panelComments = panel; this.panelComments = panel;
} else /** coauthoring end **/
if (name == 'plugins' && !this.panelPlugins) {
this.panelPlugins = panel.render('#left-panel-plugins');
} }
}, },
/** coauthoring begin **/
markCoauthOptions: function(opt, ignoreDisabled) { markCoauthOptions: function(opt, ignoreDisabled) {
if (opt=='chat' && this.btnChat.isVisible() && if (opt=='chat' && this.btnChat.isVisible() &&
!this.btnChat.isDisabled() && !this.btnChat.pressed) { !this.btnChat.isDisabled() && !this.btnChat.pressed) {
@ -276,6 +300,10 @@ define([
} }
} }
/** coauthoring end **/ /** coauthoring end **/
if (this.mode.canPlugins && this.panelPlugins) {
this.panelPlugins['hide']();
this.btnPlugins.toggle(false, true);
}
this.fireEvent('panel:show', [this, '', false]); this.fireEvent('panel:show', [this, '', false]);
}, },
@ -297,6 +325,7 @@ define([
this.btnComments.setDisabled(disable); this.btnComments.setDisabled(disable);
this.btnChat.setDisabled(disable); this.btnChat.setDisabled(disable);
/** coauthoring end **/ /** coauthoring end **/
this.btnPlugins.setDisabled(disable);
}, },
showMenu: function(menu) { showMenu: function(menu) {
@ -352,6 +381,7 @@ define([
tipSupport : 'Feedback & Support', tipSupport : 'Feedback & Support',
tipFile : 'File', tipFile : 'File',
tipSearch : 'Search', tipSearch : 'Search',
tipSlides: 'Slides' tipSlides: 'Slides',
tipPlugins : 'Plugins'
}, PE.Views.LeftMenu || {})); }, PE.Views.LeftMenu || {}));
}); });

View file

@ -88,6 +88,7 @@ define([
StrokeType: Asc.c_oAscStrokeType.STROKE_COLOR, StrokeType: Asc.c_oAscStrokeType.STROKE_COLOR,
StrokeWidth: this._pt2mm(1), StrokeWidth: this._pt2mm(1),
StrokeColor: '000000', StrokeColor: '000000',
StrokeBorderType: Asc.c_oDashType.solid,
FGColor: '000000', FGColor: '000000',
BGColor: 'ffffff', BGColor: 'ffffff',
GradColor: '000000', GradColor: '000000',
@ -113,6 +114,7 @@ define([
this.BorderColor = {Value: 1, Color: 'transparent'}; // value=1 - цвет определен - прозрачный или другой, value=0 - цвет не определен, рисуем прозрачным this.BorderColor = {Value: 1, Color: 'transparent'}; // value=1 - цвет определен - прозрачный или другой, value=0 - цвет не определен, рисуем прозрачным
this.BorderSize = 0; this.BorderSize = 0;
this.BorderType = Asc.c_oDashType.solid;
this.textureNames = [this.txtCanvas, this.txtCarton, this.txtDarkFabric, this.txtGrain, this.txtGranite, this.txtGreyPaper, this.textureNames = [this.txtCanvas, this.txtCarton, this.txtDarkFabric, this.txtGrain, this.txtGranite, this.txtGreyPaper,
this.txtKnit, this.txtLeather, this.txtBrownPaper, this.txtPapyrus, this.txtWood]; this.txtKnit, this.txtLeather, this.txtBrownPaper, this.txtPapyrus, this.txtWood];
@ -154,26 +156,8 @@ define([
this.btnBackColor.on('render:after', function(btn) { this.btnBackColor.on('render:after', function(btn) {
me.colorsBack = new Common.UI.ThemeColorPalette({ me.colorsBack = new Common.UI.ThemeColorPalette({
el: $('#shape-back-color-menu'), el: $('#shape-back-color-menu'),
dynamiccolors: 10,
value: 'transparent', value: 'transparent',
colors: [ transparent: true
me.textThemeColors, '-', {color: '3366FF', effectId: 1}, {color: '0000FF', effectId: 2}, {color: '000090', effectId: 3}, {color: '660066', effectId: 4}, {color: '800000', effectId: 5},
{color: 'FF0000', effectId: 1}, {color: 'FF6600', effectId: 1}, {color: 'FFFF00', effectId: 2}, {color: 'CCFFCC', effectId: 3}, {color: '008000', effectId: 4},
'-',
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2}, {color: '000000', effectId: 3}, {color: 'FFFFFF', effectId: 4}, {color: '000000', effectId: 5},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
'-', '--', '-', me.textStandartColors, '-', 'transparent',
'5301B3', '980ABD', 'B2275F', 'F83D26', 'F86A1D', 'F7AC16', 'F7CA12', 'FAFF44', 'D6EF39',
'-', '--'
]
}); });
me.colorsBack.on('select', _.bind(me.onColorsBackSelect, me)); me.colorsBack.on('select', _.bind(me.onColorsBackSelect, me));
}); });
@ -220,26 +204,7 @@ define([
this.btnFGColor.on('render:after', function(btn) { this.btnFGColor.on('render:after', function(btn) {
me.colorsFG = new Common.UI.ThemeColorPalette({ me.colorsFG = new Common.UI.ThemeColorPalette({
el: $('#shape-foreground-color-menu'), el: $('#shape-foreground-color-menu'),
dynamiccolors: 10, value: '000000'
value: '000000',
colors: [
me.textThemeColors, '-', {color: '3366FF', effectId: 1}, {color: '0000FF', effectId: 2}, {color: '000090', effectId: 3}, {color: '660066', effectId: 4}, {color: '800000', effectId: 5},
{color: 'FF0000', effectId: 1}, {color: 'FF6600', effectId: 1}, {color: 'FFFF00', effectId: 2}, {color: 'CCFFCC', effectId: 3}, {color: '008000', effectId: 4},
'-',
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2}, {color: '000000', effectId: 3}, {color: 'FFFFFF', effectId: 4}, {color: '000000', effectId: 5},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
'-', '--', '-', me.textStandartColors, '-',
'3D55FE', '5301B3', '980ABD', 'B2275F', 'F83D26', 'F86A1D', 'F7AC16', 'F7CA12', 'FAFF44', 'D6EF39',
'-', '--'
]
}); });
me.colorsFG.on('select', _.bind(me.onColorsFGSelect, me)); me.colorsFG.on('select', _.bind(me.onColorsFGSelect, me));
}); });
@ -261,26 +226,7 @@ define([
this.btnBGColor.on('render:after', function(btn) { this.btnBGColor.on('render:after', function(btn) {
me.colorsBG = new Common.UI.ThemeColorPalette({ me.colorsBG = new Common.UI.ThemeColorPalette({
el: $('#shape-background-color-menu'), el: $('#shape-background-color-menu'),
dynamiccolors: 10, value: 'ffffff'
value: 'ffffff',
colors: [
me.textThemeColors, '-', {color: '3366FF', effectId: 1}, {color: '0000FF', effectId: 2}, {color: '000090', effectId: 3}, {color: '660066', effectId: 4}, {color: '800000', effectId: 5},
{color: 'FF0000', effectId: 1}, {color: 'FF6600', effectId: 1}, {color: 'FFFF00', effectId: 2}, {color: 'CCFFCC', effectId: 3}, {color: '008000', effectId: 4},
'-',
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2}, {color: '000000', effectId: 3}, {color: 'FFFFFF', effectId: 4}, {color: '000000', effectId: 5},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
'-', '--', '-', me.textStandartColors, '-',
'3D55FE', '5301B3', '980ABD', 'B2275F', 'F83D26', 'F86A1D', 'F7AC16', 'F7CA12', 'FAFF44', 'D6EF39',
'-', '--'
]
}); });
me.colorsBG.on('select', _.bind(me.onColorsBGSelect, me)); me.colorsBG.on('select', _.bind(me.onColorsBGSelect, me));
}); });
@ -432,26 +378,7 @@ define([
this.btnGradColor.on('render:after', function(btn) { this.btnGradColor.on('render:after', function(btn) {
me.colorsGrad = new Common.UI.ThemeColorPalette({ me.colorsGrad = new Common.UI.ThemeColorPalette({
el: $('#shape-gradient-color-menu'), el: $('#shape-gradient-color-menu'),
dynamiccolors: 10, value: '000000'
value: '000000',
colors: [
me.textThemeColors, '-', {color: '3366FF', effectId: 1}, {color: '0000FF', effectId: 2}, {color: '000090', effectId: 3}, {color: '660066', effectId: 4}, {color: '800000', effectId: 5},
{color: 'FF0000', effectId: 1}, {color: 'FF6600', effectId: 1}, {color: 'FFFF00', effectId: 2}, {color: 'CCFFCC', effectId: 3}, {color: '008000', effectId: 4},
'-',
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2}, {color: '000000', effectId: 3}, {color: 'FFFFFF', effectId: 4}, {color: '000000', effectId: 5},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
'-', '--', '-', me.textStandartColors, '-',
'3D55FE', '5301B3', '980ABD', 'B2275F', 'F83D26', 'F86A1D', 'F7AC16', 'F7CA12', 'FAFF44', 'D6EF39',
'-', '--'
]
}); });
me.colorsGrad.on('select', _.bind(me.onColorsGradientSelect, me)); me.colorsGrad.on('select', _.bind(me.onColorsGradientSelect, me));
}); });
@ -506,26 +433,7 @@ define([
this.btnBorderColor.on('render:after', function(btn) { this.btnBorderColor.on('render:after', function(btn) {
me.colorsBorder = new Common.UI.ThemeColorPalette({ me.colorsBorder = new Common.UI.ThemeColorPalette({
el: $('#shape-border-color-menu'), el: $('#shape-border-color-menu'),
dynamiccolors: 10, value: '000000'
value: '000000',
colors: [
me.textThemeColors, '-', {color: '3366FF', effectId: 1}, {color: '0000FF', effectId: 2}, {color: '000090', effectId: 3}, {color: '660066', effectId: 4}, {color: '800000', effectId: 5},
{color: 'FF0000', effectId: 1}, {color: 'FF6600', effectId: 1}, {color: 'FFFF00', effectId: 2}, {color: 'CCFFCC', effectId: 3}, {color: '008000', effectId: 4},
'-',
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2}, {color: '000000', effectId: 3}, {color: 'FFFFFF', effectId: 4}, {color: '000000', effectId: 5},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
'-', '--', '-', me.textStandartColors, '-',
'3D55FE', '5301B3', '980ABD', 'B2275F', 'F83D26', 'F86A1D', 'F7AC16', 'F7CA12', 'FAFF44', 'D6EF39',
'-', '--'
]
}); });
me.colorsBorder.on('select', _.bind(me.onColorsBorderSelect, me)); me.colorsBorder.on('select', _.bind(me.onColorsBorderSelect, me));
}); });
@ -534,6 +442,16 @@ define([
$(this.el).on('click', '#shape-border-color-new', _.bind(this.addNewColor, this, this.colorsBorder, this.btnBorderColor)); $(this.el).on('click', '#shape-border-color-new', _.bind(this.addNewColor, this, this.colorsBorder, this.btnBorderColor));
this.lockedControls.push(this.btnBorderColor); this.lockedControls.push(this.btnBorderColor);
this.cmbBorderType = new Common.UI.ComboBorderType({
el: $('#shape-combo-border-type'),
style: "width: 93px;",
menuStyle: 'min-width: 93px;'
}).on('selected', _.bind(this.onBorderTypeSelect, this))
.on('combo:blur', _.bind(this.onComboBlur, this, false));
this.BorderType = Asc.c_oDashType.solid;
this.cmbBorderType.setValue(this.BorderType);
this.lockedControls.push(this.cmbBorderType);
this.btnChangeShape = new Common.UI.Button({ this.btnChangeShape = new Common.UI.Button({
cls: 'btn-icon-default', cls: 'btn-icon-default',
iconCls: 'btn-change-shape', iconCls: 'btn-change-shape',
@ -968,6 +886,7 @@ define([
stroke.put_color(Common.Utils.ThemeColor.getRgbColor({color: '000000', effectId: 29})); stroke.put_color(Common.Utils.ThemeColor.getRgbColor({color: '000000', effectId: 29}));
else if (this._state.StrokeType == Asc.c_oAscStrokeType.STROKE_NONE || this._state.StrokeType === null) else if (this._state.StrokeType == Asc.c_oAscStrokeType.STROKE_NONE || this._state.StrokeType === null)
stroke.put_color(Common.Utils.ThemeColor.getRgbColor(Common.Utils.ThemeColor.colorValue2EffectId(this.BorderColor.Color))); stroke.put_color(Common.Utils.ThemeColor.getRgbColor(Common.Utils.ThemeColor.colorValue2EffectId(this.BorderColor.Color)));
stroke.asc_putPrstDash(this.BorderType);
stroke.put_width(this._pt2mm(this.BorderSize)); stroke.put_width(this._pt2mm(this.BorderSize));
} }
props.put_stroke(stroke); props.put_stroke(stroke);
@ -1004,6 +923,25 @@ define([
this.applyBorderSize(record.value); this.applyBorderSize(record.value);
}, },
onBorderTypeSelect: function(combo, record) {
this.BorderType = record.value;
if (this.api && !this._noApply) {
var props = new Asc.asc_CShapeProperty();
var stroke = new Asc.asc_CStroke();
if (this.BorderSize<0.01) {
stroke.put_type( Asc.c_oAscStrokeType.STROKE_NONE);
} else {
stroke.put_type( Asc.c_oAscStrokeType.STROKE_COLOR);
stroke.put_color(Common.Utils.ThemeColor.getRgbColor(this.BorderColor.Color));
stroke.put_width(this._pt2mm(this.BorderSize));
stroke.asc_putPrstDash(this.BorderType);
}
props.put_stroke(stroke);
this.api.ShapeApply(props);
}
this.fireEvent('editcomplete', this);
},
onColorsBorderSelect: function(picker, color) { onColorsBorderSelect: function(picker, color) {
this.btnBorderColor.setColor(color); this.btnBorderColor.setColor(color);
this.BorderColor = {Value: 1, Color: color}; this.BorderColor = {Value: 1, Color: color};
@ -1016,6 +954,7 @@ define([
stroke.put_type( Asc.c_oAscStrokeType.STROKE_COLOR); stroke.put_type( Asc.c_oAscStrokeType.STROKE_COLOR);
stroke.put_color(Common.Utils.ThemeColor.getRgbColor(this.BorderColor.Color)); stroke.put_color(Common.Utils.ThemeColor.getRgbColor(this.BorderColor.Color));
stroke.put_width(this._pt2mm(this.BorderSize)); stroke.put_width(this._pt2mm(this.BorderSize));
stroke.asc_putPrstDash(this.BorderType);
} }
props.put_stroke(stroke); props.put_stroke(stroke);
this.api.ShapeApply(props); this.api.ShapeApply(props);
@ -1298,8 +1237,9 @@ define([
} }
// border colors // border colors
var stroke = props.get_stroke(); var stroke = props.get_stroke(),
var strokeType = stroke.get_type(); strokeType = stroke.get_type(),
borderType;
if (stroke) { if (stroke) {
if ( strokeType == Asc.c_oAscStrokeType.STROKE_COLOR ) { if ( strokeType == Asc.c_oAscStrokeType.STROKE_COLOR ) {
@ -1316,6 +1256,7 @@ define([
} else { } else {
this.BorderColor = {Value: 1, Color: 'transparent'}; this.BorderColor = {Value: 1, Color: 'transparent'};
} }
borderType = stroke.asc_getPrstDash();
} else { // no stroke } else { // no stroke
strokeType = null; strokeType = null;
this.BorderColor = {Value: 0, Color: 'transparent'}; this.BorderColor = {Value: 0, Color: 'transparent'};
@ -1378,6 +1319,11 @@ define([
this._state.StrokeType = strokeType; this._state.StrokeType = strokeType;
} }
if (this._state.StrokeBorderType !== borderType) {
this.BorderType = this._state.StrokeBorderType = borderType;
this.cmbBorderType.setValue(borderType);
}
// pattern colors // pattern colors
type1 = typeof(this.FGColor.Color); type1 = typeof(this.FGColor.Color);
type2 = typeof(this._state.FGColor); type2 = typeof(this._state.FGColor);
@ -1663,8 +1609,6 @@ define([
txtPapyrus : 'Papyrus', txtPapyrus : 'Papyrus',
txtWood : 'Wood', txtWood : 'Wood',
textNewColor : 'Add New Custom Color', textNewColor : 'Add New Custom Color',
textThemeColors : 'Theme Colors',
textStandartColors : 'Standart Colors',
textAdvanced : 'Show advanced settings', textAdvanced : 'Show advanced settings',
strTransparency : 'Opacity', strTransparency : 'Opacity',
textNoFill : 'No Fill', textNoFill : 'No Fill',
@ -1680,6 +1624,7 @@ define([
textDirection: 'Direction', textDirection: 'Direction',
textStyle: 'Style', textStyle: 'Style',
textGradient: 'Gradient', textGradient: 'Gradient',
textBorderSizeErr: 'The entered value is incorrect.<br>Please enter a value between 0 pt and 1584 pt.' textBorderSizeErr: 'The entered value is incorrect.<br>Please enter a value between 0 pt and 1584 pt.',
strType: 'Type'
}, PE.Views.ShapeSettings || {})); }, PE.Views.ShapeSettings || {}));
}); });

View file

@ -146,26 +146,8 @@ define([
this.btnBackColor.on('render:after', function(btn) { this.btnBackColor.on('render:after', function(btn) {
me.colorsBack = new Common.UI.ThemeColorPalette({ me.colorsBack = new Common.UI.ThemeColorPalette({
el: $('#slide-back-color-menu'), el: $('#slide-back-color-menu'),
dynamiccolors: 10,
value: 'ffffff', value: 'ffffff',
colors: [ transparent: true
me.textThemeColors, '-', {color: '3366FF', effectId: 1}, {color: '0000FF', effectId: 2}, {color: '000090', effectId: 3}, {color: '660066', effectId: 4}, {color: '800000', effectId: 5},
{color: 'FF0000', effectId: 1}, {color: 'FF6600', effectId: 1}, {color: 'FFFF00', effectId: 2}, {color: 'CCFFCC', effectId: 3}, {color: '008000', effectId: 4},
'-',
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2}, {color: '000000', effectId: 3}, {color: 'FFFFFF', effectId: 4}, {color: '000000', effectId: 5},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
'-', '--', '-', me.textStandartColors, '-', 'transparent',
'5301B3', '980ABD', 'B2275F', 'F83D26', 'F86A1D', 'F7AC16', 'F7CA12', 'FAFF44', 'D6EF39',
'-', '--'
]
}); });
me.colorsBack.on('select', _.bind(me.onColorsBackSelect, me)); me.colorsBack.on('select', _.bind(me.onColorsBackSelect, me));
}); });
@ -208,26 +190,7 @@ define([
this.btnFGColor.on('render:after', function(btn) { this.btnFGColor.on('render:after', function(btn) {
me.colorsFG = new Common.UI.ThemeColorPalette({ me.colorsFG = new Common.UI.ThemeColorPalette({
el: $('#slide-foreground-color-menu'), el: $('#slide-foreground-color-menu'),
dynamiccolors: 10, value: '000000'
value: '000000',
colors: [
me.textThemeColors, '-', {color: '3366FF', effectId: 1}, {color: '0000FF', effectId: 2}, {color: '000090', effectId: 3}, {color: '660066', effectId: 4}, {color: '800000', effectId: 5},
{color: 'FF0000', effectId: 1}, {color: 'FF6600', effectId: 1}, {color: 'FFFF00', effectId: 2}, {color: 'CCFFCC', effectId: 3}, {color: '008000', effectId: 4},
'-',
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2}, {color: '000000', effectId: 3}, {color: 'FFFFFF', effectId: 4}, {color: '000000', effectId: 5},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
'-', '--', '-', me.textStandartColors, '-',
'3D55FE', '5301B3', '980ABD', 'B2275F', 'F83D26', 'F86A1D', 'F7AC16', 'F7CA12', 'FAFF44', 'D6EF39',
'-', '--'
]
}); });
me.colorsFG.on('select', _.bind(me.onColorsFGSelect, me)); me.colorsFG.on('select', _.bind(me.onColorsFGSelect, me));
}); });
@ -249,26 +212,7 @@ define([
this.btnBGColor.on('render:after', function(btn) { this.btnBGColor.on('render:after', function(btn) {
me.colorsBG = new Common.UI.ThemeColorPalette({ me.colorsBG = new Common.UI.ThemeColorPalette({
el: $('#slide-background-color-menu'), el: $('#slide-background-color-menu'),
dynamiccolors: 10, value: 'ffffff'
value: 'ffffff',
colors: [
me.textThemeColors, '-', {color: '3366FF', effectId: 1}, {color: '0000FF', effectId: 2}, {color: '000090', effectId: 3}, {color: '660066', effectId: 4}, {color: '800000', effectId: 5},
{color: 'FF0000', effectId: 1}, {color: 'FF6600', effectId: 1}, {color: 'FFFF00', effectId: 2}, {color: 'CCFFCC', effectId: 3}, {color: '008000', effectId: 4},
'-',
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2}, {color: '000000', effectId: 3}, {color: 'FFFFFF', effectId: 4}, {color: '000000', effectId: 5},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
'-', '--', '-', me.textStandartColors, '-',
'3D55FE', '5301B3', '980ABD', 'B2275F', 'F83D26', 'F86A1D', 'F7AC16', 'F7CA12', 'FAFF44', 'D6EF39',
'-', '--'
]
}); });
me.colorsBG.on('select', _.bind(me.onColorsBGSelect, me)); me.colorsBG.on('select', _.bind(me.onColorsBGSelect, me));
}); });
@ -393,26 +337,7 @@ define([
this.btnGradColor.on('render:after', function(btn) { this.btnGradColor.on('render:after', function(btn) {
me.colorsGrad = new Common.UI.ThemeColorPalette({ me.colorsGrad = new Common.UI.ThemeColorPalette({
el: $('#slide-gradient-color-menu'), el: $('#slide-gradient-color-menu'),
dynamiccolors: 10, value: '000000'
value: '000000',
colors: [
me.textThemeColors, '-', {color: '3366FF', effectId: 1}, {color: '0000FF', effectId: 2}, {color: '000090', effectId: 3}, {color: '660066', effectId: 4}, {color: '800000', effectId: 5},
{color: 'FF0000', effectId: 1}, {color: 'FF6600', effectId: 1}, {color: 'FFFF00', effectId: 2}, {color: 'CCFFCC', effectId: 3}, {color: '008000', effectId: 4},
'-',
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2}, {color: '000000', effectId: 3}, {color: 'FFFFFF', effectId: 4}, {color: '000000', effectId: 5},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
'-', '--', '-', me.textStandartColors, '-',
'3D55FE', '5301B3', '980ABD', 'B2275F', 'F83D26', 'F86A1D', 'F7AC16', 'F7CA12', 'FAFF44', 'D6EF39',
'-', '--'
]
}); });
me.colorsGrad.on('select', _.bind(me.onColorsGradientSelect, me)); me.colorsGrad.on('select', _.bind(me.onColorsGradientSelect, me));
}); });
@ -1054,6 +979,8 @@ define([
} }
this.cmbEffectType.setDisabled(arr.length<1 || this._stateDisabled.effects); this.cmbEffectType.setDisabled(arr.length<1 || this._stateDisabled.effects);
this.numDuration.setDisabled(arr.length<1 || this._stateDisabled.effects);
this.btnPreview.setDisabled(arr.length<1 || this._stateDisabled.effects);
}, },
onEffectNameSelect: function(combo, record) { onEffectNameSelect: function(combo, record) {
@ -1486,10 +1413,11 @@ define([
this._stateDisabled.background = background; this._stateDisabled.background = background;
} }
if (effects !== this._stateDisabled.effects) { if (effects !== this._stateDisabled.effects) {
var length = this.cmbEffectType.store.length;
this.cmbEffectName.setDisabled(effects); this.cmbEffectName.setDisabled(effects);
this.cmbEffectType.setDisabled(effects); this.cmbEffectType.setDisabled(length<1 || effects);
this.numDuration.setDisabled(effects); this.numDuration.setDisabled(length<1 || effects);
this.btnPreview.setDisabled(effects); this.btnPreview.setDisabled(length<1 || effects);
this._stateDisabled.effects = effects; this._stateDisabled.effects = effects;
} }
if (timing !== this._stateDisabled.timing) { if (timing !== this._stateDisabled.timing) {
@ -1522,8 +1450,6 @@ define([
txtPapyrus : 'Papyrus', txtPapyrus : 'Papyrus',
txtWood : 'Wood', txtWood : 'Wood',
textNewColor : 'Add New Custom Color', textNewColor : 'Add New Custom Color',
textThemeColors : 'Theme Colors',
textStandartColors : 'Standart Colors',
textAdvanced : 'Show advanced settings', textAdvanced : 'Show advanced settings',
textNoFill : 'No Fill', textNoFill : 'No Fill',
textSelectTexture : 'Select', textSelectTexture : 'Select',

View file

@ -137,7 +137,6 @@ define([
}); });
this.cntZoom.cmpEl.on('show.bs.dropdown', function () { this.cntZoom.cmpEl.on('show.bs.dropdown', function () {
_.defer(function(){ _.defer(function(){
me.api.asc_enableKeyEvents(false);
me.cntZoom.cmpEl.find('ul').focus(); me.cntZoom.cmpEl.find('ul').focus();
}, 100); }, 100);
} }

View file

@ -203,26 +203,7 @@ define([
this.btnBorderColor.on('render:after', function(btn) { this.btnBorderColor.on('render:after', function(btn) {
me.borderColor = new Common.UI.ThemeColorPalette({ me.borderColor = new Common.UI.ThemeColorPalette({
el: $('#table-border-color-menu'), el: $('#table-border-color-menu')
dynamiccolors: 10,
colors: [
me.textThemeColors, '-', {color: '3366FF', effectId: 1}, {color: '0000FF', effectId: 2}, {color: '000090', effectId: 3}, {color: '660066', effectId: 4}, {color: '800000', effectId: 5},
{color: 'FF0000', effectId: 1}, {color: 'FF6600', effectId: 1}, {color: 'FFFF00', effectId: 2}, {color: 'CCFFCC', effectId: 3}, {color: '008000', effectId: 4},
'-',
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2}, {color: '000000', effectId: 3}, {color: 'FFFFFF', effectId: 4}, {color: '000000', effectId: 5},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
'-', '--', '-', me.textStandartColors, '-',
'3D55FE', '5301B3', '980ABD', 'B2275F', 'F83D26', 'F86A1D', 'F7AC16', 'F7CA12', 'FAFF44', 'D6EF39',
'-', '--'
]
}); });
me.borderColor.on('select', _.bind(me.onColorsBorderSelect, me)); me.borderColor.on('select', _.bind(me.onColorsBorderSelect, me));
}); });
@ -244,25 +225,7 @@ define([
this.btnBackColor.on('render:after', function(btn) { this.btnBackColor.on('render:after', function(btn) {
me.colorsBack = new Common.UI.ThemeColorPalette({ me.colorsBack = new Common.UI.ThemeColorPalette({
el: $('#table-back-color-menu'), el: $('#table-back-color-menu'),
dynamiccolors: 10, transparent: true
colors: [
me.textThemeColors, '-', {color: '3366FF', effectId: 1}, {color: '0000FF', effectId: 2}, {color: '000090', effectId: 3}, {color: '660066', effectId: 4}, {color: '800000', effectId: 5},
{color: 'FF0000', effectId: 1}, {color: 'FF6600', effectId: 1}, {color: 'FFFF00', effectId: 2}, {color: 'CCFFCC', effectId: 3}, {color: '008000', effectId: 4},
'-',
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2}, {color: '000000', effectId: 3}, {color: 'FFFFFF', effectId: 4}, {color: '000000', effectId: 5},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
'-', '--', '-', me.textStandartColors, '-', 'transparent',
'5301B3', '980ABD', 'B2275F', 'F83D26', 'F86A1D', 'F7AC16', 'F7CA12', 'FAFF44', 'D6EF39',
'-', '--'
]
}); });
me.colorsBack.on('select', _.bind(me.onColorsBackSelect, me)); me.colorsBack.on('select', _.bind(me.onColorsBackSelect, me));
}); });
@ -620,8 +583,10 @@ define([
UpdateThemeColors: function() { UpdateThemeColors: function() {
if (this.colorsBack) if (this.colorsBack)
this.colorsBack.updateColors(Common.Utils.ThemeColor.getEffectColors(), Common.Utils.ThemeColor.getStandartColors()); this.colorsBack.updateColors(Common.Utils.ThemeColor.getEffectColors(), Common.Utils.ThemeColor.getStandartColors());
if (this.borderColor) if (this.borderColor) {
this.borderColor.updateColors(Common.Utils.ThemeColor.getEffectColors(), Common.Utils.ThemeColor.getStandartColors()); this.borderColor.updateColors(Common.Utils.ThemeColor.getEffectColors(), Common.Utils.ThemeColor.getStandartColors());
this.btnBorderColor.setColor(this.borderColor.getColor());
}
}, },
_onInitTemplates: function(Templates){ _onInitTemplates: function(Templates){
@ -724,8 +689,6 @@ define([
textFirst : 'First', textFirst : 'First',
textLast : 'Last', textLast : 'Last',
textEmptyTemplate : 'No templates', textEmptyTemplate : 'No templates',
textThemeColors : 'Theme Colors',
textStandartColors : 'Standart Colors',
tipTop: 'Set Outer Top Border Only', tipTop: 'Set Outer Top Border Only',
tipLeft: 'Set Outer Left Border Only', tipLeft: 'Set Outer Left Border Only',
tipBottom: 'Set Outer Bottom Border Only', tipBottom: 'Set Outer Bottom Border Only',

View file

@ -87,6 +87,7 @@ define([
StrokeType: Asc.c_oAscStrokeType.STROKE_COLOR, StrokeType: Asc.c_oAscStrokeType.STROKE_COLOR,
StrokeWidth: this._pt2mm(1), StrokeWidth: this._pt2mm(1),
StrokeColor: '000000', StrokeColor: '000000',
StrokeBorderType: Asc.c_oDashType.solid,
FGColor: '000000', FGColor: '000000',
BGColor: 'ffffff', BGColor: 'ffffff',
GradColor: '000000', GradColor: '000000',
@ -110,6 +111,7 @@ define([
this.BorderColor = {Value: 1, Color: 'transparent'}; // value=1 - цвет определен - прозрачный или другой, value=0 - цвет не определен, рисуем прозрачным this.BorderColor = {Value: 1, Color: 'transparent'}; // value=1 - цвет определен - прозрачный или другой, value=0 - цвет не определен, рисуем прозрачным
this.BorderSize = 0; this.BorderSize = 0;
this.BorderType = Asc.c_oDashType.solid;
this.textureNames = [this.txtCanvas, this.txtCarton, this.txtDarkFabric, this.txtGrain, this.txtGranite, this.txtGreyPaper, this.textureNames = [this.txtCanvas, this.txtCarton, this.txtDarkFabric, this.txtGrain, this.txtGranite, this.txtGreyPaper,
this.txtKnit, this.txtLeather, this.txtBrownPaper, this.txtPapyrus, this.txtWood]; this.txtKnit, this.txtLeather, this.txtBrownPaper, this.txtPapyrus, this.txtWood];
@ -168,26 +170,8 @@ define([
this.btnBackColor.on('render:after', function(btn) { this.btnBackColor.on('render:after', function(btn) {
me.colorsBack = new Common.UI.ThemeColorPalette({ me.colorsBack = new Common.UI.ThemeColorPalette({
el: $('#textart-back-color-menu'), el: $('#textart-back-color-menu'),
dynamiccolors: 10,
value: 'transparent', value: 'transparent',
colors: [ transparent: true
me.textThemeColors, '-', {color: '3366FF', effectId: 1}, {color: '0000FF', effectId: 2}, {color: '000090', effectId: 3}, {color: '660066', effectId: 4}, {color: '800000', effectId: 5},
{color: 'FF0000', effectId: 1}, {color: 'FF6600', effectId: 1}, {color: 'FFFF00', effectId: 2}, {color: 'CCFFCC', effectId: 3}, {color: '008000', effectId: 4},
'-',
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2}, {color: '000000', effectId: 3}, {color: 'FFFFFF', effectId: 4}, {color: '000000', effectId: 5},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
'-', '--', '-', me.textStandartColors, '-', 'transparent',
'5301B3', '980ABD', 'B2275F', 'F83D26', 'F86A1D', 'F7AC16', 'F7CA12', 'FAFF44', 'D6EF39',
'-', '--'
]
}); });
me.colorsBack.on('select', _.bind(me.onColorsBackSelect, me)); me.colorsBack.on('select', _.bind(me.onColorsBackSelect, me));
}); });
@ -235,26 +219,7 @@ define([
this.btnFGColor.on('render:after', function(btn) { this.btnFGColor.on('render:after', function(btn) {
me.colorsFG = new Common.UI.ThemeColorPalette({ me.colorsFG = new Common.UI.ThemeColorPalette({
el: $('#textart-foreground-color-menu'), el: $('#textart-foreground-color-menu'),
dynamiccolors: 10, value: '000000'
value: '000000',
colors: [
me.textThemeColors, '-', {color: '3366FF', effectId: 1}, {color: '0000FF', effectId: 2}, {color: '000090', effectId: 3}, {color: '660066', effectId: 4}, {color: '800000', effectId: 5},
{color: 'FF0000', effectId: 1}, {color: 'FF6600', effectId: 1}, {color: 'FFFF00', effectId: 2}, {color: 'CCFFCC', effectId: 3}, {color: '008000', effectId: 4},
'-',
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2}, {color: '000000', effectId: 3}, {color: 'FFFFFF', effectId: 4}, {color: '000000', effectId: 5},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
'-', '--', '-', me.textStandartColors, '-',
'3D55FE', '5301B3', '980ABD', 'B2275F', 'F83D26', 'F86A1D', 'F7AC16', 'F7CA12', 'FAFF44', 'D6EF39',
'-', '--'
]
}); });
me.colorsFG.on('select', _.bind(me.onColorsFGSelect, me)); me.colorsFG.on('select', _.bind(me.onColorsFGSelect, me));
}); });
@ -276,26 +241,7 @@ define([
this.btnBGColor.on('render:after', function(btn) { this.btnBGColor.on('render:after', function(btn) {
me.colorsBG = new Common.UI.ThemeColorPalette({ me.colorsBG = new Common.UI.ThemeColorPalette({
el: $('#textart-background-color-menu'), el: $('#textart-background-color-menu'),
dynamiccolors: 10, value: 'ffffff'
value: 'ffffff',
colors: [
me.textThemeColors, '-', {color: '3366FF', effectId: 1}, {color: '0000FF', effectId: 2}, {color: '000090', effectId: 3}, {color: '660066', effectId: 4}, {color: '800000', effectId: 5},
{color: 'FF0000', effectId: 1}, {color: 'FF6600', effectId: 1}, {color: 'FFFF00', effectId: 2}, {color: 'CCFFCC', effectId: 3}, {color: '008000', effectId: 4},
'-',
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2}, {color: '000000', effectId: 3}, {color: 'FFFFFF', effectId: 4}, {color: '000000', effectId: 5},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
'-', '--', '-', me.textStandartColors, '-',
'3D55FE', '5301B3', '980ABD', 'B2275F', 'F83D26', 'F86A1D', 'F7AC16', 'F7CA12', 'FAFF44', 'D6EF39',
'-', '--'
]
}); });
me.colorsBG.on('select', _.bind(me.onColorsBGSelect, me)); me.colorsBG.on('select', _.bind(me.onColorsBGSelect, me));
}); });
@ -447,26 +393,7 @@ define([
this.btnGradColor.on('render:after', function(btn) { this.btnGradColor.on('render:after', function(btn) {
me.colorsGrad = new Common.UI.ThemeColorPalette({ me.colorsGrad = new Common.UI.ThemeColorPalette({
el: $('#textart-gradient-color-menu'), el: $('#textart-gradient-color-menu'),
dynamiccolors: 10, value: '000000'
value: '000000',
colors: [
me.textThemeColors, '-', {color: '3366FF', effectId: 1}, {color: '0000FF', effectId: 2}, {color: '000090', effectId: 3}, {color: '660066', effectId: 4}, {color: '800000', effectId: 5},
{color: 'FF0000', effectId: 1}, {color: 'FF6600', effectId: 1}, {color: 'FFFF00', effectId: 2}, {color: 'CCFFCC', effectId: 3}, {color: '008000', effectId: 4},
'-',
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2}, {color: '000000', effectId: 3}, {color: 'FFFFFF', effectId: 4}, {color: '000000', effectId: 5},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
'-', '--', '-', me.textStandartColors, '-',
'3D55FE', '5301B3', '980ABD', 'B2275F', 'F83D26', 'F86A1D', 'F7AC16', 'F7CA12', 'FAFF44', 'D6EF39',
'-', '--'
]
}); });
me.colorsGrad.on('select', _.bind(me.onColorsGradientSelect, me)); me.colorsGrad.on('select', _.bind(me.onColorsGradientSelect, me));
}); });
@ -522,26 +449,7 @@ define([
this.btnBorderColor.on('render:after', function(btn) { this.btnBorderColor.on('render:after', function(btn) {
me.colorsBorder = new Common.UI.ThemeColorPalette({ me.colorsBorder = new Common.UI.ThemeColorPalette({
el: $('#textart-border-color-menu'), el: $('#textart-border-color-menu'),
dynamiccolors: 10, value: '000000'
value: '000000',
colors: [
me.textThemeColors, '-', {color: '3366FF', effectId: 1}, {color: '0000FF', effectId: 2}, {color: '000090', effectId: 3}, {color: '660066', effectId: 4}, {color: '800000', effectId: 5},
{color: 'FF0000', effectId: 1}, {color: 'FF6600', effectId: 1}, {color: 'FFFF00', effectId: 2}, {color: 'CCFFCC', effectId: 3}, {color: '008000', effectId: 4},
'-',
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2}, {color: '000000', effectId: 3}, {color: 'FFFFFF', effectId: 4}, {color: '000000', effectId: 5},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
'-', '--', '-', me.textStandartColors, '-',
'3D55FE', '5301B3', '980ABD', 'B2275F', 'F83D26', 'F86A1D', 'F7AC16', 'F7CA12', 'FAFF44', 'D6EF39',
'-', '--'
]
}); });
me.colorsBorder.on('select', _.bind(me.onColorsBorderSelect, me)); me.colorsBorder.on('select', _.bind(me.onColorsBorderSelect, me));
}); });
@ -549,6 +457,16 @@ define([
this.btnBorderColor.setColor('000000'); this.btnBorderColor.setColor('000000');
$(this.el).on('click', '#textart-border-color-new', _.bind(this.addNewColor, this, this.colorsBorder, this.btnBorderColor)); $(this.el).on('click', '#textart-border-color-new', _.bind(this.addNewColor, this, this.colorsBorder, this.btnBorderColor));
this.cmbBorderType = new Common.UI.ComboBorderType({
el: $('#textart-combo-border-type'),
style: "width: 93px;",
menuStyle: 'min-width: 93px;'
}).on('selected', _.bind(this.onBorderTypeSelect, this))
.on('combo:blur', _.bind(this.onComboBlur, this, false));
this.BorderType = Asc.c_oDashType.solid;
this.cmbBorderType.setValue(this.BorderType);
this.lockedControls.push(this.cmbBorderType);
this.cmbTransform = new Common.UI.ComboDataView({ this.cmbTransform = new Common.UI.ComboDataView({
itemWidth: 50, itemWidth: 50,
itemHeight: 50, itemHeight: 50,
@ -997,6 +915,7 @@ define([
stroke.put_color(Common.Utils.ThemeColor.getRgbColor({color: '000000', effectId: 29})); stroke.put_color(Common.Utils.ThemeColor.getRgbColor({color: '000000', effectId: 29}));
else if (this._state.StrokeType == Asc.c_oAscStrokeType.STROKE_NONE || this._state.StrokeType === null) else if (this._state.StrokeType == Asc.c_oAscStrokeType.STROKE_NONE || this._state.StrokeType === null)
stroke.put_color(Common.Utils.ThemeColor.getRgbColor(Common.Utils.ThemeColor.colorValue2EffectId(this.BorderColor.Color))); stroke.put_color(Common.Utils.ThemeColor.getRgbColor(Common.Utils.ThemeColor.colorValue2EffectId(this.BorderColor.Color)));
stroke.asc_putPrstDash(this.BorderType);
stroke.put_width(this._pt2mm(this.BorderSize)); stroke.put_width(this._pt2mm(this.BorderSize));
} }
props.asc_putLine(stroke); props.asc_putLine(stroke);
@ -1034,6 +953,26 @@ define([
this.applyBorderSize(record.value); this.applyBorderSize(record.value);
}, },
onBorderTypeSelect: function(combo, record) {
this.BorderType = record.value;
if (this.api && !this._noApply) {
var props = new Asc.asc_TextArtProperties();
var stroke = new Asc.asc_CStroke();
if (this.BorderSize<0.01) {
stroke.put_type( Asc.c_oAscStrokeType.STROKE_NONE);
} else {
stroke.put_type( Asc.c_oAscStrokeType.STROKE_COLOR);
stroke.put_color(Common.Utils.ThemeColor.getRgbColor(this.BorderColor.Color));
stroke.put_width(this._pt2mm(this.BorderSize));
stroke.asc_putPrstDash(this.BorderType);
}
props.asc_putLine(stroke);
this.shapeprops.put_TextArtProperties(props);
this.api.ShapeApply(this.shapeprops);
}
this.fireEvent('editcomplete', this);
},
onColorsBorderSelect: function(picker, color) { onColorsBorderSelect: function(picker, color) {
this.btnBorderColor.setColor(color); this.btnBorderColor.setColor(color);
this.BorderColor = {Value: 1, Color: color}; this.BorderColor = {Value: 1, Color: color};
@ -1046,6 +985,7 @@ define([
stroke.put_type( Asc.c_oAscStrokeType.STROKE_COLOR); stroke.put_type( Asc.c_oAscStrokeType.STROKE_COLOR);
stroke.put_color(Common.Utils.ThemeColor.getRgbColor(this.BorderColor.Color)); stroke.put_color(Common.Utils.ThemeColor.getRgbColor(this.BorderColor.Color));
stroke.put_width(this._pt2mm(this.BorderSize)); stroke.put_width(this._pt2mm(this.BorderSize));
stroke.asc_putPrstDash(this.BorderType);
} }
props.asc_putLine(stroke); props.asc_putLine(stroke);
this.shapeprops.put_TextArtProperties(props); this.shapeprops.put_TextArtProperties(props);
@ -1299,7 +1239,8 @@ define([
// border colors // border colors
var stroke = shapeprops.asc_getLine(), var stroke = shapeprops.asc_getLine(),
strokeType = (stroke) ? stroke.get_type() : null; strokeType = (stroke) ? stroke.get_type() : null,
borderType;
if (stroke) { if (stroke) {
if ( strokeType == Asc.c_oAscStrokeType.STROKE_COLOR ) { if ( strokeType == Asc.c_oAscStrokeType.STROKE_COLOR ) {
@ -1316,6 +1257,7 @@ define([
} else { } else {
this.BorderColor = {Value: 1, Color: 'transparent'}; this.BorderColor = {Value: 1, Color: 'transparent'};
} }
borderType = stroke.asc_getPrstDash();
} else { // no stroke } else { // no stroke
this.BorderColor = {Value: 0, Color: 'transparent'}; this.BorderColor = {Value: 0, Color: 'transparent'};
} }
@ -1377,6 +1319,11 @@ define([
this._state.StrokeType = strokeType; this._state.StrokeType = strokeType;
} }
if (this._state.StrokeBorderType !== borderType) {
this.BorderType = this._state.StrokeBorderType = borderType;
this.cmbBorderType.setValue(borderType);
}
// pattern colors // pattern colors
type1 = typeof(this.FGColor.Color); type1 = typeof(this.FGColor.Color);
type2 = typeof(this._state.FGColor); type2 = typeof(this._state.FGColor);
@ -1665,8 +1612,6 @@ define([
txtPapyrus : 'Papyrus', txtPapyrus : 'Papyrus',
txtWood : 'Wood', txtWood : 'Wood',
textNewColor : 'Add New Custom Color', textNewColor : 'Add New Custom Color',
textThemeColors : 'Theme Colors',
textStandartColors : 'Standart Colors',
strTransparency : 'Opacity', strTransparency : 'Opacity',
textNoFill : 'No Fill', textNoFill : 'No Fill',
textSelectTexture : 'Select', textSelectTexture : 'Select',
@ -1683,6 +1628,7 @@ define([
textGradient: 'Gradient', textGradient: 'Gradient',
textBorderSizeErr: 'The entered value is incorrect.<br>Please enter a value between 0 pt and 1584 pt.', textBorderSizeErr: 'The entered value is incorrect.<br>Please enter a value between 0 pt and 1584 pt.',
textTransform: 'Transform', textTransform: 'Transform',
textTemplate: 'Template' textTemplate: 'Template',
strType: 'Type'
}, PE.Views.TextArtSettings || {})); }, PE.Views.TextArtSettings || {}));
}); });

View file

@ -410,26 +410,7 @@ define([
colorVal.css('background-color', btn.currentColor || 'transparent'); colorVal.css('background-color', btn.currentColor || 'transparent');
me.mnuFontColorPicker = new Common.UI.ThemeColorPalette({ me.mnuFontColorPicker = new Common.UI.ThemeColorPalette({
el: $('#id-toolbar-menu-fontcolor'), el: $('#id-toolbar-menu-fontcolor')
dynamiccolors: 10,
colors: [
me.textThemeColors, '-', {color: '3366FF', effectId: 1}, {color: '0000FF', effectId: 2}, {color: '000090', effectId: 3}, {color: '660066', effectId: 4}, {color: '800000', effectId: 5},
{color: 'FF0000', effectId: 1}, {color: 'FF6600', effectId: 1}, {color: 'FFFF00', effectId: 2}, {color: 'CCFFCC', effectId: 3}, {color: '008000', effectId: 4},
'-',
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2}, {color: '000000', effectId: 3}, {color: 'FFFFFF', effectId: 4}, {color: '000000', effectId: 5},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1}, {color: 'FFFFFF', effectId: 2},{color: '000000', effectId: 1},
'-', '--', '-', me.textStandartColors, '-',
'3D55FE', '5301B3', '980ABD', 'B2275F', 'F83D26', 'F86A1D', 'F7AC16', 'F7CA12', 'FAFF44', 'D6EF39',
'-', '--'
]
}); });
}); });
me.paragraphControls.push(me.btnFontColor); me.paragraphControls.push(me.btnFontColor);
@ -810,7 +791,7 @@ define([
}); });
}).on('show:after', function(btn, e) { }).on('show:after', function(btn, e) {
var mnu = $(this.el).find('.dropdown-menu '), var mnu = $(this.el).find('.dropdown-menu '),
docH = $(document).height(), docH = Common.Utils.innerHeight(),
menuH = mnu.outerHeight(), menuH = mnu.outerHeight(),
top = parseInt(mnu.css('top')); top = parseInt(mnu.css('top'));
@ -1595,8 +1576,6 @@ define([
textCancel: 'Cancel', textCancel: 'Cancel',
tipColorSchemas: 'Change Color Scheme', tipColorSchemas: 'Change Color Scheme',
textNewColor: 'Add New Custom Color', textNewColor: 'Add New Custom Color',
textThemeColors: 'Theme Colors',
textStandartColors: 'Standart Colors',
mniSlideStandard: 'Standard (4:3)', mniSlideStandard: 'Standard (4:3)',
mniSlideWide: 'Widescreen (16:9)', mniSlideWide: 'Widescreen (16:9)',
mniSlideAdvanced: 'Advanced Settings', mniSlideAdvanced: 'Advanced Settings',
@ -1616,7 +1595,7 @@ define([
textBar: 'Bar Chart', textBar: 'Bar Chart',
textArea: 'Area Chart', textArea: 'Area Chart',
textPie: 'Pie Chart', textPie: 'Pie Chart',
textPoint: 'Point Chart', textPoint: 'XY (Scatter) Chart',
textStock: 'Stock Chart', textStock: 'Stock Chart',
tipSynchronize: 'The document has been changed by another user. Please click to save your changes and reload the updates.', tipSynchronize: 'The document has been changed by another user. Please click to save your changes and reload the updates.',
txtScheme1: 'Office', txtScheme1: 'Office',

View file

@ -148,7 +148,8 @@ require([
, 'Common.Controllers.Chat', , 'Common.Controllers.Chat',
'Common.Controllers.Comments', 'Common.Controllers.Comments',
/** coauthoring end **/ /** coauthoring end **/
'Common.Controllers.ExternalDiagramEditor' ,'Common.Controllers.Plugins'
,'Common.Controllers.ExternalDiagramEditor'
] ]
}); });
@ -175,6 +176,7 @@ require([
,'common/main/lib/controller/Comments', ,'common/main/lib/controller/Comments',
'common/main/lib/controller/Chat', 'common/main/lib/controller/Chat',
/** coauthoring end **/ /** coauthoring end **/
'common/main/lib/controller/Plugins',
'presentationeditor/main/app/view/ChartSettings', 'presentationeditor/main/app/view/ChartSettings',
'common/main/lib/controller/ExternalDiagramEditor' 'common/main/lib/controller/ExternalDiagramEditor'
], function() { ], function() {

View file

@ -123,8 +123,8 @@
"PE.Controllers.Main.loadImagesTitleText": "Načítání obrázků", "PE.Controllers.Main.loadImagesTitleText": "Načítání obrázků",
"PE.Controllers.Main.loadImageTextText": "Načítání obrázku...", "PE.Controllers.Main.loadImageTextText": "Načítání obrázku...",
"PE.Controllers.Main.loadImageTitleText": "Načítání obrázku", "PE.Controllers.Main.loadImageTitleText": "Načítání obrázku",
"PE.Controllers.Main.loadingDocumentTextText": "Načítám dokument...", "PE.Controllers.Main.loadingDocumentTextText": "Načítám prezentace...",
"PE.Controllers.Main.loadingDocumentTitleText": "Načítání dokumentu", "PE.Controllers.Main.loadingDocumentTitleText": "Načítání prezentace",
"PE.Controllers.Main.loadThemeTextText": "Loading theme...", "PE.Controllers.Main.loadThemeTextText": "Loading theme...",
"PE.Controllers.Main.loadThemeTitleText": "Loading Theme", "PE.Controllers.Main.loadThemeTitleText": "Loading Theme",
"PE.Controllers.Main.notcriticalErrorTitle": "Varování", "PE.Controllers.Main.notcriticalErrorTitle": "Varování",
@ -144,7 +144,7 @@
"PE.Controllers.Main.splitMaxRowsErrorText": "Počet řádků musí být menší než %1.", "PE.Controllers.Main.splitMaxRowsErrorText": "Počet řádků musí být menší než %1.",
"PE.Controllers.Main.textAnonymous": "Anonymní", "PE.Controllers.Main.textAnonymous": "Anonymní",
"PE.Controllers.Main.textCloseTip": "Zavřete tento tip kliknutím", "PE.Controllers.Main.textCloseTip": "Zavřete tento tip kliknutím",
"PE.Controllers.Main.textLoadingDocument": "Načítání dokumentu", "PE.Controllers.Main.textLoadingDocument": "Načítání prezentace",
"PE.Controllers.Main.textShape": "Tvar", "PE.Controllers.Main.textShape": "Tvar",
"PE.Controllers.Main.textStrict": "Strict mode", "PE.Controllers.Main.textStrict": "Strict mode",
"PE.Controllers.Main.textTryUndoRedo": "The Undo/Redo functions are disabled for the Fast co-editing mode.<br>Click the 'Strict mode' button to switch to the Strict co-editing mode to edit the file without other users interference and send your changes only after you save them. You can switch between the co-editing modes using the editor Advanced settings.", "PE.Controllers.Main.textTryUndoRedo": "The Undo/Redo functions are disabled for the Fast co-editing mode.<br>Click the 'Strict mode' button to switch to the Strict co-editing mode to edit the file without other users interference and send your changes only after you save them. You can switch between the co-editing modes using the editor Advanced settings.",

View file

@ -126,8 +126,8 @@
"PE.Controllers.Main.loadImagesTitleText": "Bilder werden geladen", "PE.Controllers.Main.loadImagesTitleText": "Bilder werden geladen",
"PE.Controllers.Main.loadImageTextText": "Bild wird geladen...", "PE.Controllers.Main.loadImageTextText": "Bild wird geladen...",
"PE.Controllers.Main.loadImageTitleText": "Bild wird geladen", "PE.Controllers.Main.loadImageTitleText": "Bild wird geladen",
"PE.Controllers.Main.loadingDocumentTextText": "Dokument wird geladen...\t", "PE.Controllers.Main.loadingDocumentTextText": "Präsentation wird geladen...",
"PE.Controllers.Main.loadingDocumentTitleText": "Dokument wird geladen\t", "PE.Controllers.Main.loadingDocumentTitleText": "Präsentation wird geladen",
"PE.Controllers.Main.loadThemeTextText": "Design wird geladen...", "PE.Controllers.Main.loadThemeTextText": "Design wird geladen...",
"PE.Controllers.Main.loadThemeTitleText": "Laden des Designs", "PE.Controllers.Main.loadThemeTitleText": "Laden des Designs",
"PE.Controllers.Main.notcriticalErrorTitle": "Achtung", "PE.Controllers.Main.notcriticalErrorTitle": "Achtung",

View file

@ -28,6 +28,8 @@
"Common.UI.SearchDialog.txtBtnReplaceAll": "Replace All", "Common.UI.SearchDialog.txtBtnReplaceAll": "Replace All",
"Common.UI.SynchronizeTip.textDontShow": "Don't show this message again", "Common.UI.SynchronizeTip.textDontShow": "Don't show this message again",
"Common.UI.SynchronizeTip.textSynchronize": "The document has been changed by another user.<br/>Please click to save your changes and reload the updates.", "Common.UI.SynchronizeTip.textSynchronize": "The document has been changed by another user.<br/>Please click to save your changes and reload the updates.",
"Common.UI.ThemeColorPalette.textStandartColors": "Standard Colors",
"Common.UI.ThemeColorPalette.textThemeColors": "Theme Colors",
"Common.UI.Window.cancelButtonText": "Cancel", "Common.UI.Window.cancelButtonText": "Cancel",
"Common.UI.Window.closeButtonText": "Close", "Common.UI.Window.closeButtonText": "Close",
"Common.UI.Window.noButtonText": "No", "Common.UI.Window.noButtonText": "No",
@ -91,6 +93,9 @@
"Common.Views.InsertTableDialog.txtMinText": "The minimum value for this field is {0}.", "Common.Views.InsertTableDialog.txtMinText": "The minimum value for this field is {0}.",
"Common.Views.InsertTableDialog.txtRows": "Number of Rows", "Common.Views.InsertTableDialog.txtRows": "Number of Rows",
"Common.Views.InsertTableDialog.txtTitle": "Table Size", "Common.Views.InsertTableDialog.txtTitle": "Table Size",
"Common.Views.Plugins.strPlugins": "Plugins",
"Common.Views.Plugins.textLoading": "Loading",
"Common.Views.Plugins.textStart": "Start",
"PE.Controllers.LeftMenu.newDocumentTitle": "Unnamed presentation", "PE.Controllers.LeftMenu.newDocumentTitle": "Unnamed presentation",
"PE.Controllers.LeftMenu.requestEditRightsText": "Requesting editing rights...", "PE.Controllers.LeftMenu.requestEditRightsText": "Requesting editing rights...",
"PE.Controllers.LeftMenu.textNoTextFound": "The data you have been searching for could not be found. Please adjust your search options.", "PE.Controllers.LeftMenu.textNoTextFound": "The data you have been searching for could not be found. Please adjust your search options.",
@ -117,6 +122,7 @@
"PE.Controllers.Main.errorUpdateVersion": "The file version has been changed. The page will be reloaded.", "PE.Controllers.Main.errorUpdateVersion": "The file version has been changed. The page will be reloaded.",
"PE.Controllers.Main.errorUserDrop": "The file cannot be accessed right now.", "PE.Controllers.Main.errorUserDrop": "The file cannot be accessed right now.",
"PE.Controllers.Main.errorUsersExceed": "The number of users allowed by the pricing plan was exceeded", "PE.Controllers.Main.errorUsersExceed": "The number of users allowed by the pricing plan was exceeded",
"PE.Controllers.Main.errorViewerDisconnect": "Connection is lost. You can still view the document,<br>but will not be able to download until the connection is restored.",
"PE.Controllers.Main.leavePageText": "You have unsaved changes in this presentation. Click \"Stay on This Page\", then \"Save\" to save them. Click \"Leave This Page\" to discard all the unsaved changes.", "PE.Controllers.Main.leavePageText": "You have unsaved changes in this presentation. Click \"Stay on This Page\", then \"Save\" to save them. Click \"Leave This Page\" to discard all the unsaved changes.",
"PE.Controllers.Main.loadFontsTextText": "Loading data...", "PE.Controllers.Main.loadFontsTextText": "Loading data...",
"PE.Controllers.Main.loadFontsTitleText": "Loading Data", "PE.Controllers.Main.loadFontsTitleText": "Loading Data",
@ -126,8 +132,8 @@
"PE.Controllers.Main.loadImagesTitleText": "Loading Images", "PE.Controllers.Main.loadImagesTitleText": "Loading Images",
"PE.Controllers.Main.loadImageTextText": "Loading image...", "PE.Controllers.Main.loadImageTextText": "Loading image...",
"PE.Controllers.Main.loadImageTitleText": "Loading Image", "PE.Controllers.Main.loadImageTitleText": "Loading Image",
"PE.Controllers.Main.loadingDocumentTextText": "Loading document...", "PE.Controllers.Main.loadingDocumentTextText": "Loading presentation...",
"PE.Controllers.Main.loadingDocumentTitleText": "Loading Document", "PE.Controllers.Main.loadingDocumentTitleText": "Loading presentation",
"PE.Controllers.Main.loadThemeTextText": "Loading theme...", "PE.Controllers.Main.loadThemeTextText": "Loading theme...",
"PE.Controllers.Main.loadThemeTitleText": "Loading Theme", "PE.Controllers.Main.loadThemeTitleText": "Loading Theme",
"PE.Controllers.Main.notcriticalErrorTitle": "Warning", "PE.Controllers.Main.notcriticalErrorTitle": "Warning",
@ -217,6 +223,8 @@
"PE.Controllers.Main.warnBrowserZoom": "Your browser current zoom setting is not fully supported. Please reset to the default zoom by pressing Ctrl+0.", "PE.Controllers.Main.warnBrowserZoom": "Your browser current zoom setting is not fully supported. Please reset to the default zoom by pressing Ctrl+0.",
"PE.Controllers.Main.warnNoLicense": "You are using an open source version of ONLYOFFICE. The version has limitations for concurrent connections to the document server (20 connections at a time).<br>If you need more please consider purchasing a commercial license.", "PE.Controllers.Main.warnNoLicense": "You are using an open source version of ONLYOFFICE. The version has limitations for concurrent connections to the document server (20 connections at a time).<br>If you need more please consider purchasing a commercial license.",
"PE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.", "PE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.",
"PE.Controllers.Main.warnLicenseExp": "Your license has expired.<br>Please update your license and refresh the page.",
"PE.Controllers.Main.titleLicenseExp": "License expired",
"PE.Controllers.Statusbar.zoomText": "Zoom {0}%", "PE.Controllers.Statusbar.zoomText": "Zoom {0}%",
"PE.Controllers.Toolbar.confirmAddFontName": "The font you are going to save is not available on the current device.<br>The text style will be displayed using one of the system fonts, the saved font will be used when it is available.<br>Do you want to continue?", "PE.Controllers.Toolbar.confirmAddFontName": "The font you are going to save is not available on the current device.<br>The text style will be displayed using one of the system fonts, the saved font will be used when it is available.<br>Do you want to continue?",
"PE.Controllers.Toolbar.textEmptyImgUrl": "You need to specify image URL.", "PE.Controllers.Toolbar.textEmptyImgUrl": "You need to specify image URL.",
@ -419,6 +427,7 @@
"PE.Views.LeftMenu.tipChat": "Chat", "PE.Views.LeftMenu.tipChat": "Chat",
"PE.Views.LeftMenu.tipComments": "Comments", "PE.Views.LeftMenu.tipComments": "Comments",
"PE.Views.LeftMenu.tipFile": "File", "PE.Views.LeftMenu.tipFile": "File",
"PE.Views.LeftMenu.tipPlugins": "Plugins",
"PE.Views.LeftMenu.tipSearch": "Search", "PE.Views.LeftMenu.tipSearch": "Search",
"PE.Views.LeftMenu.tipSlides": "Slides", "PE.Views.LeftMenu.tipSlides": "Slides",
"PE.Views.LeftMenu.tipSupport": "Feedback & Support", "PE.Views.LeftMenu.tipSupport": "Feedback & Support",
@ -476,6 +485,7 @@
"PE.Views.ShapeSettings.strSize": "Size", "PE.Views.ShapeSettings.strSize": "Size",
"PE.Views.ShapeSettings.strStroke": "Stroke", "PE.Views.ShapeSettings.strStroke": "Stroke",
"PE.Views.ShapeSettings.strTransparency": "Opacity", "PE.Views.ShapeSettings.strTransparency": "Opacity",
"PE.Views.ShapeSettings.strType": "Type",
"PE.Views.ShapeSettings.textAdvanced": "Show advanced settings", "PE.Views.ShapeSettings.textAdvanced": "Show advanced settings",
"PE.Views.ShapeSettings.textBorderSizeErr": "The entered value is incorrect.<br>Please enter a value between 0 pt and 1584 pt.", "PE.Views.ShapeSettings.textBorderSizeErr": "The entered value is incorrect.<br>Please enter a value between 0 pt and 1584 pt.",
"PE.Views.ShapeSettings.textColor": "Color Fill", "PE.Views.ShapeSettings.textColor": "Color Fill",
@ -492,11 +502,9 @@
"PE.Views.ShapeSettings.textPatternFill": "Pattern", "PE.Views.ShapeSettings.textPatternFill": "Pattern",
"PE.Views.ShapeSettings.textRadial": "Radial", "PE.Views.ShapeSettings.textRadial": "Radial",
"PE.Views.ShapeSettings.textSelectTexture": "Select", "PE.Views.ShapeSettings.textSelectTexture": "Select",
"PE.Views.ShapeSettings.textStandartColors": "Standard Colors",
"PE.Views.ShapeSettings.textStretch": "Stretch", "PE.Views.ShapeSettings.textStretch": "Stretch",
"PE.Views.ShapeSettings.textStyle": "Style", "PE.Views.ShapeSettings.textStyle": "Style",
"PE.Views.ShapeSettings.textTexture": "From Texture", "PE.Views.ShapeSettings.textTexture": "From Texture",
"PE.Views.ShapeSettings.textThemeColors": "Theme Colors",
"PE.Views.ShapeSettings.textTile": "Tile", "PE.Views.ShapeSettings.textTile": "Tile",
"PE.Views.ShapeSettings.txtBrownPaper": "Brown Paper", "PE.Views.ShapeSettings.txtBrownPaper": "Brown Paper",
"PE.Views.ShapeSettings.txtCanvas": "Canvas", "PE.Views.ShapeSettings.txtCanvas": "Canvas",
@ -582,11 +590,9 @@
"PE.Views.SlideSettings.textSelectTexture": "Select", "PE.Views.SlideSettings.textSelectTexture": "Select",
"PE.Views.SlideSettings.textSmoothly": "Smoothly", "PE.Views.SlideSettings.textSmoothly": "Smoothly",
"PE.Views.SlideSettings.textSplit": "Split", "PE.Views.SlideSettings.textSplit": "Split",
"PE.Views.SlideSettings.textStandartColors": "Standard Colors",
"PE.Views.SlideSettings.textStretch": "Stretch", "PE.Views.SlideSettings.textStretch": "Stretch",
"PE.Views.SlideSettings.textStyle": "Style", "PE.Views.SlideSettings.textStyle": "Style",
"PE.Views.SlideSettings.textTexture": "From Texture", "PE.Views.SlideSettings.textTexture": "From Texture",
"PE.Views.SlideSettings.textThemeColors": "Theme Colors",
"PE.Views.SlideSettings.textTile": "Tile", "PE.Views.SlideSettings.textTile": "Tile",
"PE.Views.SlideSettings.textTop": "Top", "PE.Views.SlideSettings.textTop": "Top",
"PE.Views.SlideSettings.textTopLeft": "Top Left", "PE.Views.SlideSettings.textTopLeft": "Top Left",
@ -611,14 +617,14 @@
"PE.Views.SlideSettings.txtLeather": "Leather", "PE.Views.SlideSettings.txtLeather": "Leather",
"PE.Views.SlideSettings.txtPapyrus": "Papyrus", "PE.Views.SlideSettings.txtPapyrus": "Papyrus",
"PE.Views.SlideSettings.txtWood": "Wood", "PE.Views.SlideSettings.txtWood": "Wood",
"PE.Views.SlideshowSettings.textTitle": "Show Settings",
"PE.Views.SlideshowSettings.textLoop": "Loop continuously until 'Esc' is pressed",
"PE.Views.SlideshowSettings.cancelButtonText": "Cancel", "PE.Views.SlideshowSettings.cancelButtonText": "Cancel",
"PE.Views.SlideshowSettings.okButtonText": "Ok", "PE.Views.SlideshowSettings.okButtonText": "Ok",
"PE.Views.SlideshowSettings.textLoop": "Loop continuously until 'Esc' is pressed",
"PE.Views.SlideshowSettings.textTitle": "Show Settings",
"PE.Views.SlideSizeSettings.cancelButtonText": "Cancel", "PE.Views.SlideSizeSettings.cancelButtonText": "Cancel",
"PE.Views.SlideSizeSettings.okButtonText": "OK", "PE.Views.SlideSizeSettings.okButtonText": "OK",
"PE.Views.SlideSizeSettings.strPortrait": "Portrait",
"PE.Views.SlideSizeSettings.strLandscape": "Landscape", "PE.Views.SlideSizeSettings.strLandscape": "Landscape",
"PE.Views.SlideSizeSettings.strPortrait": "Portrait",
"PE.Views.SlideSizeSettings.textHeight": "Height", "PE.Views.SlideSizeSettings.textHeight": "Height",
"PE.Views.SlideSizeSettings.textSlideOrientation": "Slide Orientation", "PE.Views.SlideSizeSettings.textSlideOrientation": "Slide Orientation",
"PE.Views.SlideSizeSettings.textSlideSize": "Slide Size", "PE.Views.SlideSizeSettings.textSlideSize": "Slide Size",
@ -680,9 +686,7 @@
"PE.Views.TableSettings.textNewColor": "Custom Color", "PE.Views.TableSettings.textNewColor": "Custom Color",
"PE.Views.TableSettings.textRows": "Rows", "PE.Views.TableSettings.textRows": "Rows",
"PE.Views.TableSettings.textSelectBorders": "Select borders you want to change applying style chosen above", "PE.Views.TableSettings.textSelectBorders": "Select borders you want to change applying style chosen above",
"PE.Views.TableSettings.textStandartColors": "Standard Colors",
"PE.Views.TableSettings.textTemplate": "Select From Template", "PE.Views.TableSettings.textTemplate": "Select From Template",
"PE.Views.TableSettings.textThemeColors": "Theme Colors",
"PE.Views.TableSettings.textTotal": "Total", "PE.Views.TableSettings.textTotal": "Total",
"PE.Views.TableSettings.tipAll": "Set Outer Border and All Inner Lines", "PE.Views.TableSettings.tipAll": "Set Outer Border and All Inner Lines",
"PE.Views.TableSettings.tipBottom": "Set Outer Bottom Border Only", "PE.Views.TableSettings.tipBottom": "Set Outer Bottom Border Only",
@ -714,6 +718,7 @@
"PE.Views.TextArtSettings.strSize": "Size", "PE.Views.TextArtSettings.strSize": "Size",
"PE.Views.TextArtSettings.strStroke": "Stroke", "PE.Views.TextArtSettings.strStroke": "Stroke",
"PE.Views.TextArtSettings.strTransparency": "Opacity", "PE.Views.TextArtSettings.strTransparency": "Opacity",
"PE.Views.TextArtSettings.strType": "Type",
"PE.Views.TextArtSettings.textBorderSizeErr": "The entered value is incorrect.<br>Please enter a value between 0 pt and 1584 pt.", "PE.Views.TextArtSettings.textBorderSizeErr": "The entered value is incorrect.<br>Please enter a value between 0 pt and 1584 pt.",
"PE.Views.TextArtSettings.textColor": "Color Fill", "PE.Views.TextArtSettings.textColor": "Color Fill",
"PE.Views.TextArtSettings.textDirection": "Direction", "PE.Views.TextArtSettings.textDirection": "Direction",
@ -729,12 +734,10 @@
"PE.Views.TextArtSettings.textPatternFill": "Pattern", "PE.Views.TextArtSettings.textPatternFill": "Pattern",
"PE.Views.TextArtSettings.textRadial": "Radial", "PE.Views.TextArtSettings.textRadial": "Radial",
"PE.Views.TextArtSettings.textSelectTexture": "Select", "PE.Views.TextArtSettings.textSelectTexture": "Select",
"PE.Views.TextArtSettings.textStandartColors": "Standard Colors",
"PE.Views.TextArtSettings.textStretch": "Stretch", "PE.Views.TextArtSettings.textStretch": "Stretch",
"PE.Views.TextArtSettings.textStyle": "Style", "PE.Views.TextArtSettings.textStyle": "Style",
"PE.Views.TextArtSettings.textTemplate": "Template", "PE.Views.TextArtSettings.textTemplate": "Template",
"PE.Views.TextArtSettings.textTexture": "From Texture", "PE.Views.TextArtSettings.textTexture": "From Texture",
"PE.Views.TextArtSettings.textThemeColors": "Theme Colors",
"PE.Views.TextArtSettings.textTile": "Tile", "PE.Views.TextArtSettings.textTile": "Tile",
"PE.Views.TextArtSettings.textTransform": "Transform", "PE.Views.TextArtSettings.textTransform": "Transform",
"PE.Views.TextArtSettings.txtBrownPaper": "Brown Paper", "PE.Views.TextArtSettings.txtBrownPaper": "Brown Paper",
@ -791,12 +794,13 @@
"PE.Views.Toolbar.textShapeAlignMiddle": "Align Middle", "PE.Views.Toolbar.textShapeAlignMiddle": "Align Middle",
"PE.Views.Toolbar.textShapeAlignRight": "Align Right", "PE.Views.Toolbar.textShapeAlignRight": "Align Right",
"PE.Views.Toolbar.textShapeAlignTop": "Align Top", "PE.Views.Toolbar.textShapeAlignTop": "Align Top",
"PE.Views.Toolbar.textStandartColors": "Standard Colors", "PE.Views.Toolbar.textShowBegin": "Show from Beginning",
"PE.Views.Toolbar.textShowCurrent": "Show from Current slide",
"PE.Views.Toolbar.textShowSettings": "Show Settings",
"PE.Views.Toolbar.textStock": "Stock Chart", "PE.Views.Toolbar.textStock": "Stock Chart",
"PE.Views.Toolbar.textStrikeout": "Strikeout", "PE.Views.Toolbar.textStrikeout": "Strikeout",
"PE.Views.Toolbar.textSubscript": "Subscript", "PE.Views.Toolbar.textSubscript": "Subscript",
"PE.Views.Toolbar.textSuperscript": "Superscript", "PE.Views.Toolbar.textSuperscript": "Superscript",
"PE.Views.Toolbar.textThemeColors": "Theme Colors",
"PE.Views.Toolbar.textTitleError": "Error", "PE.Views.Toolbar.textTitleError": "Error",
"PE.Views.Toolbar.textUnderline": "Underline", "PE.Views.Toolbar.textUnderline": "Underline",
"PE.Views.Toolbar.textZoom": "Zoom", "PE.Views.Toolbar.textZoom": "Zoom",
@ -863,8 +867,5 @@
"PE.Views.Toolbar.txtScheme7": "Equity", "PE.Views.Toolbar.txtScheme7": "Equity",
"PE.Views.Toolbar.txtScheme8": "Flow", "PE.Views.Toolbar.txtScheme8": "Flow",
"PE.Views.Toolbar.txtScheme9": "Foundry", "PE.Views.Toolbar.txtScheme9": "Foundry",
"PE.Views.Toolbar.txtUngroup": "Ungroup", "PE.Views.Toolbar.txtUngroup": "Ungroup"
"PE.Views.Toolbar.textShowBegin": "Show from Beginning",
"PE.Views.Toolbar.textShowCurrent": "Show from Current slide",
"PE.Views.Toolbar.textShowSettings": "Show Settings"
} }

View file

@ -126,8 +126,8 @@
"PE.Controllers.Main.loadImagesTitleText": "Cargando imágenes", "PE.Controllers.Main.loadImagesTitleText": "Cargando imágenes",
"PE.Controllers.Main.loadImageTextText": "Cargando imagen...", "PE.Controllers.Main.loadImageTextText": "Cargando imagen...",
"PE.Controllers.Main.loadImageTitleText": "Cargando imagen", "PE.Controllers.Main.loadImageTitleText": "Cargando imagen",
"PE.Controllers.Main.loadingDocumentTextText": "Cargando documento...", "PE.Controllers.Main.loadingDocumentTextText": "Cargando presentación...",
"PE.Controllers.Main.loadingDocumentTitleText": "Cargando documento", "PE.Controllers.Main.loadingDocumentTitleText": "Cargando presentación",
"PE.Controllers.Main.loadThemeTextText": "Cargando tema...", "PE.Controllers.Main.loadThemeTextText": "Cargando tema...",
"PE.Controllers.Main.loadThemeTitleText": "Cargando tema", "PE.Controllers.Main.loadThemeTitleText": "Cargando tema",
"PE.Controllers.Main.notcriticalErrorTitle": "Aviso", "PE.Controllers.Main.notcriticalErrorTitle": "Aviso",
@ -146,11 +146,11 @@
"PE.Controllers.Main.splitMaxColsErrorText": "El número de columnas debe ser menos que %1.", "PE.Controllers.Main.splitMaxColsErrorText": "El número de columnas debe ser menos que %1.",
"PE.Controllers.Main.splitMaxRowsErrorText": "El número de filas debe ser menos que %1.", "PE.Controllers.Main.splitMaxRowsErrorText": "El número de filas debe ser menos que %1.",
"PE.Controllers.Main.textAnonymous": "Anónimo", "PE.Controllers.Main.textAnonymous": "Anónimo",
"PE.Controllers.Main.textBuyNow": "Comprar ahora", "PE.Controllers.Main.textBuyNow": "Visit website",
"PE.Controllers.Main.textCloseTip": "Pulse para cerrar el consejo", "PE.Controllers.Main.textCloseTip": "Pulse para cerrar el consejo",
"PE.Controllers.Main.textContactUs": "Ponga en contacto con nosotros", "PE.Controllers.Main.textContactUs": "Contact sales",
"PE.Controllers.Main.textLoadingDocument": "Cargando presentación", "PE.Controllers.Main.textLoadingDocument": "Cargando presentación",
"PE.Controllers.Main.textNoLicenseTitle": "Licencia ha expirado o no ha encontrado", "PE.Controllers.Main.textNoLicenseTitle": "ONLYOFFICE open source version",
"PE.Controllers.Main.textShape": "Forma", "PE.Controllers.Main.textShape": "Forma",
"PE.Controllers.Main.textStrict": "Modo estricto", "PE.Controllers.Main.textStrict": "Modo estricto",
"PE.Controllers.Main.textTryUndoRedo": "Las funciones Anular/Rehacer se desactivan para el modo co-edición rápido.<br>Haga Clic en el botón \"modo estricto\" para cambiar al modo de co-edición estricta para editar el archivo sin la interferencia de otros usuarios y enviar sus cambios sólo después de guardarlos. Se puede cambiar entre los modos de co-edición usando los ajustes avanzados de edición.", "PE.Controllers.Main.textTryUndoRedo": "Las funciones Anular/Rehacer se desactivan para el modo co-edición rápido.<br>Haga Clic en el botón \"modo estricto\" para cambiar al modo de co-edición estricta para editar el archivo sin la interferencia de otros usuarios y enviar sus cambios sólo después de guardarlos. Se puede cambiar entre los modos de co-edición usando los ajustes avanzados de edición.",
@ -215,7 +215,7 @@
"PE.Controllers.Main.uploadImageTitleText": "Subiendo imagen", "PE.Controllers.Main.uploadImageTitleText": "Subiendo imagen",
"PE.Controllers.Main.warnBrowserIE9": "Este aplicación tiene baja capacidad en IE9. Utilice IE10 o superior", "PE.Controllers.Main.warnBrowserIE9": "Este aplicación tiene baja capacidad en IE9. Utilice IE10 o superior",
"PE.Controllers.Main.warnBrowserZoom": "La configuración actual de zoom de su navegador no está soportada por completo. Por favor restablezca zoom predeterminado pulsando Ctrl+0.", "PE.Controllers.Main.warnBrowserZoom": "La configuración actual de zoom de su navegador no está soportada por completo. Por favor restablezca zoom predeterminado pulsando Ctrl+0.",
"PE.Controllers.Main.warnNoLicense": "La licencia ha expirado o no ha sido encontrada. No puede editar archivos.<br>Haga clic en el botón 'Comprar ahora' para comprar una licencia Enterprise Edition o ´Contactar con nosotros´ si usa Intergration Edition.", "PE.Controllers.Main.warnNoLicense": "You are using an open source version of ONLYOFFICE. The version has limitations for concurrent connections to the document server (20 connections at a time).<br>If you need more please consider purchasing a commercial license.",
"PE.Controllers.Main.warnProcessRightsChange": "El derecho de edición del archivo es denegado.", "PE.Controllers.Main.warnProcessRightsChange": "El derecho de edición del archivo es denegado.",
"PE.Controllers.Statusbar.zoomText": "Zoom {0}%", "PE.Controllers.Statusbar.zoomText": "Zoom {0}%",
"PE.Controllers.Toolbar.confirmAddFontName": "El tipo de letra que usted va a guardar no está disponible en este dispositivo.<br>El estilo de letra se mostrará usando uno de los tipos de letra del dispositivo, el tipo de letra guardado va a usarse cuando esté disponible.<br>¿Desea continuar?", "PE.Controllers.Toolbar.confirmAddFontName": "El tipo de letra que usted va a guardar no está disponible en este dispositivo.<br>El estilo de letra se mostrará usando uno de los tipos de letra del dispositivo, el tipo de letra guardado va a usarse cuando esté disponible.<br>¿Desea continuar?",

View file

@ -126,8 +126,8 @@
"PE.Controllers.Main.loadImagesTitleText": "Chargement des images", "PE.Controllers.Main.loadImagesTitleText": "Chargement des images",
"PE.Controllers.Main.loadImageTextText": "Chargement d'une image...", "PE.Controllers.Main.loadImageTextText": "Chargement d'une image...",
"PE.Controllers.Main.loadImageTitleText": "Chargement d'une image", "PE.Controllers.Main.loadImageTitleText": "Chargement d'une image",
"PE.Controllers.Main.loadingDocumentTextText": "Chargement du document...", "PE.Controllers.Main.loadingDocumentTextText": "Chargement de présentation...",
"PE.Controllers.Main.loadingDocumentTitleText": "Chargement du document", "PE.Controllers.Main.loadingDocumentTitleText": "Chargement de présentation",
"PE.Controllers.Main.loadThemeTextText": "Chargement du thème en cours...", "PE.Controllers.Main.loadThemeTextText": "Chargement du thème en cours...",
"PE.Controllers.Main.loadThemeTitleText": "Chargement du thème", "PE.Controllers.Main.loadThemeTitleText": "Chargement du thème",
"PE.Controllers.Main.notcriticalErrorTitle": "Avertissement", "PE.Controllers.Main.notcriticalErrorTitle": "Avertissement",

View file

@ -123,8 +123,8 @@
"PE.Controllers.Main.loadImagesTitleText": "Caricamento delle immagini", "PE.Controllers.Main.loadImagesTitleText": "Caricamento delle immagini",
"PE.Controllers.Main.loadImageTextText": "Caricamento dell'immagine in corso...", "PE.Controllers.Main.loadImageTextText": "Caricamento dell'immagine in corso...",
"PE.Controllers.Main.loadImageTitleText": "Caricamento dell'immagine", "PE.Controllers.Main.loadImageTitleText": "Caricamento dell'immagine",
"PE.Controllers.Main.loadingDocumentTextText": "Caricamento del documento in corso...", "PE.Controllers.Main.loadingDocumentTextText": "Caricamento della presentazione in corso...",
"PE.Controllers.Main.loadingDocumentTitleText": "Caricamento del documento", "PE.Controllers.Main.loadingDocumentTitleText": "Caricamento della presentazione",
"PE.Controllers.Main.loadThemeTextText": "Caricamento del tema in corso...", "PE.Controllers.Main.loadThemeTextText": "Caricamento del tema in corso...",
"PE.Controllers.Main.loadThemeTitleText": "Caricamento del tema", "PE.Controllers.Main.loadThemeTitleText": "Caricamento del tema",
"PE.Controllers.Main.notcriticalErrorTitle": "Avviso", "PE.Controllers.Main.notcriticalErrorTitle": "Avviso",
@ -144,7 +144,7 @@
"PE.Controllers.Main.splitMaxRowsErrorText": "Il numero di righe deve essere inferiore a %1.", "PE.Controllers.Main.splitMaxRowsErrorText": "Il numero di righe deve essere inferiore a %1.",
"PE.Controllers.Main.textAnonymous": "Anonimo", "PE.Controllers.Main.textAnonymous": "Anonimo",
"PE.Controllers.Main.textCloseTip": "\nClicca per chiudere il consiglio", "PE.Controllers.Main.textCloseTip": "\nClicca per chiudere il consiglio",
"PE.Controllers.Main.textLoadingDocument": "Caricamento del documento", "PE.Controllers.Main.textLoadingDocument": "Caricamento della presentazione",
"PE.Controllers.Main.textShape": "Forma", "PE.Controllers.Main.textShape": "Forma",
"PE.Controllers.Main.textStrict": "Strict mode", "PE.Controllers.Main.textStrict": "Strict mode",
"PE.Controllers.Main.textTryUndoRedo": "The Undo/Redo functions are disabled for the Fast co-editing mode.<br>Click the 'Strict mode' button to switch to the Strict co-editing mode to edit the file without other users interference and send your changes only after you save them. You can switch between the co-editing modes using the editor Advanced settings.", "PE.Controllers.Main.textTryUndoRedo": "The Undo/Redo functions are disabled for the Fast co-editing mode.<br>Click the 'Strict mode' button to switch to the Strict co-editing mode to edit the file without other users interference and send your changes only after you save them. You can switch between the co-editing modes using the editor Advanced settings.",

View file

@ -126,8 +126,8 @@
"PE.Controllers.Main.loadImagesTitleText": "イメージの読み込み中", "PE.Controllers.Main.loadImagesTitleText": "イメージの読み込み中",
"PE.Controllers.Main.loadImageTextText": "イメージの読み込み中...", "PE.Controllers.Main.loadImageTextText": "イメージの読み込み中...",
"PE.Controllers.Main.loadImageTitleText": "イメージの読み込み中", "PE.Controllers.Main.loadImageTitleText": "イメージの読み込み中",
"PE.Controllers.Main.loadingDocumentTextText": "ドキュメントを読み込んでいます...", "PE.Controllers.Main.loadingDocumentTextText": "プレゼンテーションを読み込み中...",
"PE.Controllers.Main.loadingDocumentTitleText": "ドキュメントを読み込んでいます", "PE.Controllers.Main.loadingDocumentTitleText": "プレゼンテーションを読み込み中...",
"PE.Controllers.Main.loadThemeTextText": "テーマの読み込み中...", "PE.Controllers.Main.loadThemeTextText": "テーマの読み込み中...",
"PE.Controllers.Main.loadThemeTitleText": "テーマの読み込み中", "PE.Controllers.Main.loadThemeTitleText": "テーマの読み込み中",
"PE.Controllers.Main.notcriticalErrorTitle": " 警告", "PE.Controllers.Main.notcriticalErrorTitle": " 警告",
@ -146,11 +146,11 @@
"PE.Controllers.Main.splitMaxColsErrorText": "列の数は%1より小さくなければなりません。", "PE.Controllers.Main.splitMaxColsErrorText": "列の数は%1より小さくなければなりません。",
"PE.Controllers.Main.splitMaxRowsErrorText": "行数は%1より小さくなければなりません。", "PE.Controllers.Main.splitMaxRowsErrorText": "行数は%1より小さくなければなりません。",
"PE.Controllers.Main.textAnonymous": "匿名", "PE.Controllers.Main.textAnonymous": "匿名",
"PE.Controllers.Main.textBuyNow": "Visit website", "PE.Controllers.Main.textBuyNow": "今すぐに購入",
"PE.Controllers.Main.textCloseTip": "ヒントを閉じるためにクリックください", "PE.Controllers.Main.textCloseTip": "ヒントを閉じるためにクリックください",
"PE.Controllers.Main.textContactUs": "Contact sales", "PE.Controllers.Main.textContactUs": "お問い合わせ",
"PE.Controllers.Main.textLoadingDocument": "プレゼンテーションを読み込み中...", "PE.Controllers.Main.textLoadingDocument": "プレゼンテーションを読み込み中...",
"PE.Controllers.Main.textNoLicenseTitle": "ONLYOFFICE open source version", "PE.Controllers.Main.textNoLicenseTitle": "ライセンスは期限切れないか、または見つかりません",
"PE.Controllers.Main.textShape": "図形", "PE.Controllers.Main.textShape": "図形",
"PE.Controllers.Main.textStrict": "厳格モード", "PE.Controllers.Main.textStrict": "厳格モード",
"PE.Controllers.Main.textTryUndoRedo": "ファスト共同編集モードに元に戻す/やり直しの機能は無効になります。<br>他のユーザーの干渉なし編集するために「厳密なモード」をクリックして、厳密な共同編集モードに切り替えてください。保存した後にのみ、変更を送信してください。編集の詳細設定を使用して共同編集モードを切り替えることができます。", "PE.Controllers.Main.textTryUndoRedo": "ファスト共同編集モードに元に戻す/やり直しの機能は無効になります。<br>他のユーザーの干渉なし編集するために「厳密なモード」をクリックして、厳密な共同編集モードに切り替えてください。保存した後にのみ、変更を送信してください。編集の詳細設定を使用して共同編集モードを切り替えることができます。",
@ -215,7 +215,7 @@
"PE.Controllers.Main.uploadImageTitleText": "イメージをアップロードしています", "PE.Controllers.Main.uploadImageTitleText": "イメージをアップロードしています",
"PE.Controllers.Main.warnBrowserIE9": "IE9にアプリケーションの機能のレベルが低いです。IE10または次のバージョンを使ってください。", "PE.Controllers.Main.warnBrowserIE9": "IE9にアプリケーションの機能のレベルが低いです。IE10または次のバージョンを使ってください。",
"PE.Controllers.Main.warnBrowserZoom": "お使いのブラウザの現在のズームの設定は完全にサポートされていません。Ctrl+0を押して、デフォルトのズームにリセットしてください。", "PE.Controllers.Main.warnBrowserZoom": "お使いのブラウザの現在のズームの設定は完全にサポートされていません。Ctrl+0を押して、デフォルトのズームにリセットしてください。",
"PE.Controllers.Main.warnNoLicense": "You are using an open source version of ONLYOFFICE. The version has limitations for concurrent connections to the document server (20 connections at a time).<br>If you need more please consider purchasing a commercial license.", "PE.Controllers.Main.warnNoLicense": "ライセンスが見つかりなかったか、期限切れました。ファイルを編集することができません。<br>Enterprise Editionのライセンスを購入するために「今すぐ購入」をクリックしてください。Integration Editionの場合は、「お問い合わせください」をクリックしてください。",
"PE.Controllers.Main.warnProcessRightsChange": "ファイルを編集する権限を拒否されています。", "PE.Controllers.Main.warnProcessRightsChange": "ファイルを編集する権限を拒否されています。",
"PE.Controllers.Statusbar.zoomText": "ズーム{0}%", "PE.Controllers.Statusbar.zoomText": "ズーム{0}%",
"PE.Controllers.Toolbar.confirmAddFontName": "保存しようとしているフォントを現在のデバイスで使用することができません。<br>システムフォントを使って、テキストのスタイルが表示されます。利用できます時、保存されたフォントが使用されます。<br>続行しますか。", "PE.Controllers.Toolbar.confirmAddFontName": "保存しようとしているフォントを現在のデバイスで使用することができません。<br>システムフォントを使って、テキストのスタイルが表示されます。利用できます時、保存されたフォントが使用されます。<br>続行しますか。",

View file

@ -123,8 +123,8 @@
"PE.Controllers.Main.loadImagesTitleText": "Carregando imagens", "PE.Controllers.Main.loadImagesTitleText": "Carregando imagens",
"PE.Controllers.Main.loadImageTextText": "Carregando imagem...", "PE.Controllers.Main.loadImageTextText": "Carregando imagem...",
"PE.Controllers.Main.loadImageTitleText": "Carregando imagem", "PE.Controllers.Main.loadImageTitleText": "Carregando imagem",
"PE.Controllers.Main.loadingDocumentTextText": "Carregando documento...", "PE.Controllers.Main.loadingDocumentTextText": "Carregando apresentação...",
"PE.Controllers.Main.loadingDocumentTitleText": "Carregando documento", "PE.Controllers.Main.loadingDocumentTitleText": "Carregando apresentação",
"PE.Controllers.Main.loadThemeTextText": "Carregando temas...", "PE.Controllers.Main.loadThemeTextText": "Carregando temas...",
"PE.Controllers.Main.loadThemeTitleText": "Carregando tema", "PE.Controllers.Main.loadThemeTitleText": "Carregando tema",
"PE.Controllers.Main.notcriticalErrorTitle": "Aviso", "PE.Controllers.Main.notcriticalErrorTitle": "Aviso",
@ -144,7 +144,7 @@
"PE.Controllers.Main.splitMaxRowsErrorText": "O número de linhas deve ser inferior a %1.", "PE.Controllers.Main.splitMaxRowsErrorText": "O número de linhas deve ser inferior a %1.",
"PE.Controllers.Main.textAnonymous": "Anônimo", "PE.Controllers.Main.textAnonymous": "Anônimo",
"PE.Controllers.Main.textCloseTip": "\nClique para fechar a dica", "PE.Controllers.Main.textCloseTip": "\nClique para fechar a dica",
"PE.Controllers.Main.textLoadingDocument": "Carregando documento", "PE.Controllers.Main.textLoadingDocument": "Carregando apresentação",
"PE.Controllers.Main.textShape": "Forma", "PE.Controllers.Main.textShape": "Forma",
"PE.Controllers.Main.textStrict": "Strict mode", "PE.Controllers.Main.textStrict": "Strict mode",
"PE.Controllers.Main.textTryUndoRedo": "The Undo/Redo functions are disabled for the Fast co-editing mode.<br>Click the 'Strict mode' button to switch to the Strict co-editing mode to edit the file without other users interference and send your changes only after you save them. You can switch between the co-editing modes using the editor Advanced settings.", "PE.Controllers.Main.textTryUndoRedo": "The Undo/Redo functions are disabled for the Fast co-editing mode.<br>Click the 'Strict mode' button to switch to the Strict co-editing mode to edit the file without other users interference and send your changes only after you save them. You can switch between the co-editing modes using the editor Advanced settings.",

View file

@ -28,6 +28,8 @@
"Common.UI.SearchDialog.txtBtnReplaceAll": "Заменить все", "Common.UI.SearchDialog.txtBtnReplaceAll": "Заменить все",
"Common.UI.SynchronizeTip.textDontShow": "Больше не показывать это сообщение", "Common.UI.SynchronizeTip.textDontShow": "Больше не показывать это сообщение",
"Common.UI.SynchronizeTip.textSynchronize": "Документ изменен другим пользователем.<br/>Нажмите, чтобы сохранить свои изменения и загрузить обновления.", "Common.UI.SynchronizeTip.textSynchronize": "Документ изменен другим пользователем.<br/>Нажмите, чтобы сохранить свои изменения и загрузить обновления.",
"Common.UI.ThemeColorPalette.textStandartColors": "Стандартные цвета",
"Common.UI.ThemeColorPalette.textThemeColors": "Цвета темы",
"Common.UI.Window.cancelButtonText": "Отмена", "Common.UI.Window.cancelButtonText": "Отмена",
"Common.UI.Window.closeButtonText": "Закрыть", "Common.UI.Window.closeButtonText": "Закрыть",
"Common.UI.Window.noButtonText": "Нет", "Common.UI.Window.noButtonText": "Нет",
@ -91,6 +93,9 @@
"Common.Views.InsertTableDialog.txtMinText": "Минимальное значение для этого поля - {0}.", "Common.Views.InsertTableDialog.txtMinText": "Минимальное значение для этого поля - {0}.",
"Common.Views.InsertTableDialog.txtRows": "Количество строк", "Common.Views.InsertTableDialog.txtRows": "Количество строк",
"Common.Views.InsertTableDialog.txtTitle": "Размер таблицы", "Common.Views.InsertTableDialog.txtTitle": "Размер таблицы",
"Common.Views.Plugins.strPlugins": "Дополнения",
"Common.Views.Plugins.textLoading": "Загрузка",
"Common.Views.Plugins.textStart": "Запустить",
"PE.Controllers.LeftMenu.newDocumentTitle": "Презентация без имени", "PE.Controllers.LeftMenu.newDocumentTitle": "Презентация без имени",
"PE.Controllers.LeftMenu.requestEditRightsText": "Запрос прав на редактирование...", "PE.Controllers.LeftMenu.requestEditRightsText": "Запрос прав на редактирование...",
"PE.Controllers.LeftMenu.textNoTextFound": "Искомые данные не найдены. Пожалуйста, измените параметры поиска.", "PE.Controllers.LeftMenu.textNoTextFound": "Искомые данные не найдены. Пожалуйста, измените параметры поиска.",
@ -117,6 +122,7 @@
"PE.Controllers.Main.errorUpdateVersion": "Версия файла была изменена. Страница будет перезагружена.", "PE.Controllers.Main.errorUpdateVersion": "Версия файла была изменена. Страница будет перезагружена.",
"PE.Controllers.Main.errorUserDrop": "В настоящий момент файл недоступен.", "PE.Controllers.Main.errorUserDrop": "В настоящий момент файл недоступен.",
"PE.Controllers.Main.errorUsersExceed": "Превышено количество пользователей, разрешенных согласно тарифному плану", "PE.Controllers.Main.errorUsersExceed": "Превышено количество пользователей, разрешенных согласно тарифному плану",
"PE.Controllers.Main.errorViewerDisconnect": "Подключение прервано. Вы по-прежнему можете просматривать документ,<br>но не сможете скачать его до восстановления подключения.",
"PE.Controllers.Main.leavePageText": "Презентация содержит несохраненные изменения. Чтобы сохранить их, нажмите \"Остаться на этой странице\", затем \"Сохранить\". Нажмите \"Покинуть эту страницу\", чтобы сбросить все несохраненные изменения.", "PE.Controllers.Main.leavePageText": "Презентация содержит несохраненные изменения. Чтобы сохранить их, нажмите \"Остаться на этой странице\", затем \"Сохранить\". Нажмите \"Покинуть эту страницу\", чтобы сбросить все несохраненные изменения.",
"PE.Controllers.Main.loadFontsTextText": "Загрузка данных...", "PE.Controllers.Main.loadFontsTextText": "Загрузка данных...",
"PE.Controllers.Main.loadFontsTitleText": "Загрузка данных", "PE.Controllers.Main.loadFontsTitleText": "Загрузка данных",
@ -126,8 +132,8 @@
"PE.Controllers.Main.loadImagesTitleText": "Загрузка изображений", "PE.Controllers.Main.loadImagesTitleText": "Загрузка изображений",
"PE.Controllers.Main.loadImageTextText": "Загрузка изображения...", "PE.Controllers.Main.loadImageTextText": "Загрузка изображения...",
"PE.Controllers.Main.loadImageTitleText": "Загрузка изображения", "PE.Controllers.Main.loadImageTitleText": "Загрузка изображения",
"PE.Controllers.Main.loadingDocumentTextText": "Загрузка документа...", "PE.Controllers.Main.loadingDocumentTextText": "Загрузка презентации...",
"PE.Controllers.Main.loadingDocumentTitleText": "Загрузка документа", "PE.Controllers.Main.loadingDocumentTitleText": "Загрузка презентации",
"PE.Controllers.Main.loadThemeTextText": "Загрузка темы...", "PE.Controllers.Main.loadThemeTextText": "Загрузка темы...",
"PE.Controllers.Main.loadThemeTitleText": "Загрузка темы", "PE.Controllers.Main.loadThemeTitleText": "Загрузка темы",
"PE.Controllers.Main.notcriticalErrorTitle": "Предупреждение", "PE.Controllers.Main.notcriticalErrorTitle": "Предупреждение",
@ -146,11 +152,11 @@
"PE.Controllers.Main.splitMaxColsErrorText": "Число столбцов должно быть меньше, чем %1.", "PE.Controllers.Main.splitMaxColsErrorText": "Число столбцов должно быть меньше, чем %1.",
"PE.Controllers.Main.splitMaxRowsErrorText": "Число строк должно быть меньше, чем %1.", "PE.Controllers.Main.splitMaxRowsErrorText": "Число строк должно быть меньше, чем %1.",
"PE.Controllers.Main.textAnonymous": "Аноним", "PE.Controllers.Main.textAnonymous": "Аноним",
"PE.Controllers.Main.textBuyNow": "Visit website", "PE.Controllers.Main.textBuyNow": "Перейти на сайт",
"PE.Controllers.Main.textCloseTip": "\nЩелкните, чтобы закрыть эту подсказку", "PE.Controllers.Main.textCloseTip": "\nЩелкните, чтобы закрыть эту подсказку",
"PE.Controllers.Main.textContactUs": "Contact sales", "PE.Controllers.Main.textContactUs": "Связаться с отделом продаж",
"PE.Controllers.Main.textLoadingDocument": "Загрузка презентации", "PE.Controllers.Main.textLoadingDocument": "Загрузка презентации",
"PE.Controllers.Main.textNoLicenseTitle": "ONLYOFFICE open source version", "PE.Controllers.Main.textNoLicenseTitle": "Open source версия ONLYOFFICE",
"PE.Controllers.Main.textShape": "Фигура", "PE.Controllers.Main.textShape": "Фигура",
"PE.Controllers.Main.textStrict": "Строгий режим", "PE.Controllers.Main.textStrict": "Строгий режим",
"PE.Controllers.Main.textTryUndoRedo": "Функции отмены и повтора действий отключены в Быстром режиме совместного редактирования.<br>Нажмите на кнопку 'Строгий режим' для переключения в Строгий режим совместного редактирования, чтобы редактировать файл без вмешательства других пользователей и отправлять изменения только после того, как вы их сохраните. Переключаться между режимами совместного редактирования можно с помощью Дополнительных параметров редактора.", "PE.Controllers.Main.textTryUndoRedo": "Функции отмены и повтора действий отключены в Быстром режиме совместного редактирования.<br>Нажмите на кнопку 'Строгий режим' для переключения в Строгий режим совместного редактирования, чтобы редактировать файл без вмешательства других пользователей и отправлять изменения только после того, как вы их сохраните. Переключаться между режимами совместного редактирования можно с помощью Дополнительных параметров редактора.",
@ -215,7 +221,7 @@
"PE.Controllers.Main.uploadImageTitleText": "Загрузка изображения", "PE.Controllers.Main.uploadImageTitleText": "Загрузка изображения",
"PE.Controllers.Main.warnBrowserIE9": "В IE9 приложение имеет низкую производительность. Используйте IE10 или более позднюю версию.", "PE.Controllers.Main.warnBrowserIE9": "В IE9 приложение имеет низкую производительность. Используйте IE10 или более позднюю версию.",
"PE.Controllers.Main.warnBrowserZoom": "Текущее значение масштаба страницы в браузере поддерживается не полностью. Вернитесь к масштабу по умолчанию, нажав Ctrl+0", "PE.Controllers.Main.warnBrowserZoom": "Текущее значение масштаба страницы в браузере поддерживается не полностью. Вернитесь к масштабу по умолчанию, нажав Ctrl+0",
"PE.Controllers.Main.warnNoLicense": "You are using an open source version of ONLYOFFICE. The version has limitations for concurrent connections to the document server (20 connections at a time).<br>If you need more please consider purchasing a commercial license.", "PE.Controllers.Main.warnNoLicense": "Вы используете open source версию ONLYOFFICE. Эта версия имеет ограничения по количеству одновременных подключений к серверу документов (20 подключений одновременно).<br>Если требуется больше, рассмотрите вопрос о покупке коммерческой лицензии.",
"PE.Controllers.Main.warnProcessRightsChange": "Вам было отказано в праве на редактирование этого файла.", "PE.Controllers.Main.warnProcessRightsChange": "Вам было отказано в праве на редактирование этого файла.",
"PE.Controllers.Statusbar.zoomText": "Масштаб {0}%", "PE.Controllers.Statusbar.zoomText": "Масштаб {0}%",
"PE.Controllers.Toolbar.confirmAddFontName": "Шрифт, который вы собираетесь сохранить, недоступен на этом устройстве.<br>Стиль текста будет отображаться с использованием одного из системных шрифтов; сохраненный шрифт будет использоваться, когда он будет доступен.<br>Вы хотите продолжить?", "PE.Controllers.Toolbar.confirmAddFontName": "Шрифт, который вы собираетесь сохранить, недоступен на этом устройстве.<br>Стиль текста будет отображаться с использованием одного из системных шрифтов; сохраненный шрифт будет использоваться, когда он будет доступен.<br>Вы хотите продолжить?",
@ -303,14 +309,14 @@
"PE.Views.DocumentHolder.txtGroup": "Сгруппировать", "PE.Views.DocumentHolder.txtGroup": "Сгруппировать",
"PE.Views.DocumentHolder.txtNewSlide": "Новый слайд", "PE.Views.DocumentHolder.txtNewSlide": "Новый слайд",
"PE.Views.DocumentHolder.txtPressLink": "Нажмите клавишу CTRL и щелкните по ссылке", "PE.Views.DocumentHolder.txtPressLink": "Нажмите клавишу CTRL и щелкните по ссылке",
"PE.Views.DocumentHolder.txtPreview": "Просмотр", "PE.Views.DocumentHolder.txtPreview": "Начать показ слайдов",
"PE.Views.DocumentHolder.txtSelectAll": "Выделить все", "PE.Views.DocumentHolder.txtSelectAll": "Выделить все",
"PE.Views.DocumentHolder.txtSlide": "Слайд", "PE.Views.DocumentHolder.txtSlide": "Слайд",
"PE.Views.DocumentHolder.txtUngroup": "Разгруппировать", "PE.Views.DocumentHolder.txtUngroup": "Разгруппировать",
"PE.Views.DocumentHolder.vertAlignText": "Вертикальное выравнивание", "PE.Views.DocumentHolder.vertAlignText": "Вертикальное выравнивание",
"PE.Views.DocumentPreview.goToSlideText": "Перейти к слайду", "PE.Views.DocumentPreview.goToSlideText": "Перейти к слайду",
"PE.Views.DocumentPreview.slideIndexText": "Слайд {0} из {1}", "PE.Views.DocumentPreview.slideIndexText": "Слайд {0} из {1}",
"PE.Views.DocumentPreview.txtClose": "Закрыть просмотр", "PE.Views.DocumentPreview.txtClose": "Завершить показ слайдов",
"PE.Views.DocumentPreview.txtExitFullScreen": "Выйти из полноэкранного режима", "PE.Views.DocumentPreview.txtExitFullScreen": "Выйти из полноэкранного режима",
"PE.Views.DocumentPreview.txtFinalMessage": "Просмотр слайдов завершен. Щелкните, чтобы выйти.", "PE.Views.DocumentPreview.txtFinalMessage": "Просмотр слайдов завершен. Щелкните, чтобы выйти.",
"PE.Views.DocumentPreview.txtFullScreen": "Полноэкранный режим", "PE.Views.DocumentPreview.txtFullScreen": "Полноэкранный режим",
@ -397,6 +403,8 @@
"PE.Views.HyperlinkSettingsDialog.txtPrev": "Предыдущий слайд", "PE.Views.HyperlinkSettingsDialog.txtPrev": "Предыдущий слайд",
"PE.Views.HyperlinkSettingsDialog.txtSlide": "Слайд", "PE.Views.HyperlinkSettingsDialog.txtSlide": "Слайд",
"PE.Views.ImageSettings.textAdvanced": "Дополнительные параметры", "PE.Views.ImageSettings.textAdvanced": "Дополнительные параметры",
"PE.Views.ImageSettings.textEdit": "Редактировать",
"PE.Views.ImageSettings.textEditObject": "Редактировать объект",
"PE.Views.ImageSettings.textFromFile": "Из файла", "PE.Views.ImageSettings.textFromFile": "Из файла",
"PE.Views.ImageSettings.textFromUrl": "По URL", "PE.Views.ImageSettings.textFromUrl": "По URL",
"PE.Views.ImageSettings.textHeight": "Высота", "PE.Views.ImageSettings.textHeight": "Высота",
@ -417,6 +425,7 @@
"PE.Views.LeftMenu.tipChat": "Чат", "PE.Views.LeftMenu.tipChat": "Чат",
"PE.Views.LeftMenu.tipComments": "Комментарии", "PE.Views.LeftMenu.tipComments": "Комментарии",
"PE.Views.LeftMenu.tipFile": "Файл", "PE.Views.LeftMenu.tipFile": "Файл",
"PE.Views.LeftMenu.tipPlugins": "Дополнения",
"PE.Views.LeftMenu.tipSearch": "Поиск", "PE.Views.LeftMenu.tipSearch": "Поиск",
"PE.Views.LeftMenu.tipSlides": "Слайды", "PE.Views.LeftMenu.tipSlides": "Слайды",
"PE.Views.LeftMenu.tipSupport": "Обратная связь и поддержка", "PE.Views.LeftMenu.tipSupport": "Обратная связь и поддержка",
@ -474,6 +483,7 @@
"PE.Views.ShapeSettings.strSize": "Толщина", "PE.Views.ShapeSettings.strSize": "Толщина",
"PE.Views.ShapeSettings.strStroke": "Обводка", "PE.Views.ShapeSettings.strStroke": "Обводка",
"PE.Views.ShapeSettings.strTransparency": "Непрозрачность", "PE.Views.ShapeSettings.strTransparency": "Непрозрачность",
"PE.Views.ShapeSettings.strType": "Тип",
"PE.Views.ShapeSettings.textAdvanced": "Дополнительные параметры", "PE.Views.ShapeSettings.textAdvanced": "Дополнительные параметры",
"PE.Views.ShapeSettings.textBorderSizeErr": "Введено некорректное значение.<br>Пожалуйста, введите значение от 0 до 1584 пунктов.", "PE.Views.ShapeSettings.textBorderSizeErr": "Введено некорректное значение.<br>Пожалуйста, введите значение от 0 до 1584 пунктов.",
"PE.Views.ShapeSettings.textColor": "Заливка цветом", "PE.Views.ShapeSettings.textColor": "Заливка цветом",
@ -490,11 +500,9 @@
"PE.Views.ShapeSettings.textPatternFill": "Узор", "PE.Views.ShapeSettings.textPatternFill": "Узор",
"PE.Views.ShapeSettings.textRadial": "Радиальный", "PE.Views.ShapeSettings.textRadial": "Радиальный",
"PE.Views.ShapeSettings.textSelectTexture": "Выбрать", "PE.Views.ShapeSettings.textSelectTexture": "Выбрать",
"PE.Views.ShapeSettings.textStandartColors": "Стандартные цвета",
"PE.Views.ShapeSettings.textStretch": "Растяжение", "PE.Views.ShapeSettings.textStretch": "Растяжение",
"PE.Views.ShapeSettings.textStyle": "Стиль", "PE.Views.ShapeSettings.textStyle": "Стиль",
"PE.Views.ShapeSettings.textTexture": "Из текстуры", "PE.Views.ShapeSettings.textTexture": "Из текстуры",
"PE.Views.ShapeSettings.textThemeColors": "Цвета темы",
"PE.Views.ShapeSettings.textTile": "Плитка", "PE.Views.ShapeSettings.textTile": "Плитка",
"PE.Views.ShapeSettings.txtBrownPaper": "Крафт-бумага", "PE.Views.ShapeSettings.txtBrownPaper": "Крафт-бумага",
"PE.Views.ShapeSettings.txtCanvas": "Холст", "PE.Views.ShapeSettings.txtCanvas": "Холст",
@ -580,11 +588,9 @@
"PE.Views.SlideSettings.textSelectTexture": "Выбрать", "PE.Views.SlideSettings.textSelectTexture": "Выбрать",
"PE.Views.SlideSettings.textSmoothly": "Плавно", "PE.Views.SlideSettings.textSmoothly": "Плавно",
"PE.Views.SlideSettings.textSplit": "Панорама", "PE.Views.SlideSettings.textSplit": "Панорама",
"PE.Views.SlideSettings.textStandartColors": "Стандартные цвета",
"PE.Views.SlideSettings.textStretch": "Растяжение", "PE.Views.SlideSettings.textStretch": "Растяжение",
"PE.Views.SlideSettings.textStyle": "Стиль", "PE.Views.SlideSettings.textStyle": "Стиль",
"PE.Views.SlideSettings.textTexture": "Из текстуры", "PE.Views.SlideSettings.textTexture": "Из текстуры",
"PE.Views.SlideSettings.textThemeColors": "Цвета темы",
"PE.Views.SlideSettings.textTile": "Плитка", "PE.Views.SlideSettings.textTile": "Плитка",
"PE.Views.SlideSettings.textTop": "Сверху", "PE.Views.SlideSettings.textTop": "Сверху",
"PE.Views.SlideSettings.textTopLeft": "Сверху слева", "PE.Views.SlideSettings.textTopLeft": "Сверху слева",
@ -609,9 +615,16 @@
"PE.Views.SlideSettings.txtLeather": "Кожа", "PE.Views.SlideSettings.txtLeather": "Кожа",
"PE.Views.SlideSettings.txtPapyrus": "Папирус", "PE.Views.SlideSettings.txtPapyrus": "Папирус",
"PE.Views.SlideSettings.txtWood": "Дерево", "PE.Views.SlideSettings.txtWood": "Дерево",
"PE.Views.SlideshowSettings.cancelButtonText": "Отмена",
"PE.Views.SlideshowSettings.okButtonText": "Ok",
"PE.Views.SlideshowSettings.textLoop": "Непрерывный цикл до нажатия клавиши 'Esc'",
"PE.Views.SlideshowSettings.textTitle": "Параметры показа слайдов",
"PE.Views.SlideSizeSettings.cancelButtonText": "Отмена", "PE.Views.SlideSizeSettings.cancelButtonText": "Отмена",
"PE.Views.SlideSizeSettings.okButtonText": "OK", "PE.Views.SlideSizeSettings.okButtonText": "OK",
"PE.Views.SlideSizeSettings.strLandscape": "Альбомная",
"PE.Views.SlideSizeSettings.strPortrait": "Книжная",
"PE.Views.SlideSizeSettings.textHeight": "Высота", "PE.Views.SlideSizeSettings.textHeight": "Высота",
"PE.Views.SlideSizeSettings.textSlideOrientation": "Ориентация слайда",
"PE.Views.SlideSizeSettings.textSlideSize": "Размер слайда", "PE.Views.SlideSizeSettings.textSlideSize": "Размер слайда",
"PE.Views.SlideSizeSettings.textTitle": "Настройки размера слайда", "PE.Views.SlideSizeSettings.textTitle": "Настройки размера слайда",
"PE.Views.SlideSizeSettings.textWidth": "Ширина", "PE.Views.SlideSizeSettings.textWidth": "Ширина",
@ -634,7 +647,7 @@
"PE.Views.Statusbar.tipFitPage": "По размеру слайда", "PE.Views.Statusbar.tipFitPage": "По размеру слайда",
"PE.Views.Statusbar.tipFitWidth": "По ширине", "PE.Views.Statusbar.tipFitWidth": "По ширине",
"PE.Views.Statusbar.tipMoreUsers": "и %1 пользователей.", "PE.Views.Statusbar.tipMoreUsers": "и %1 пользователей.",
"PE.Views.Statusbar.tipPreview": "Начать просмотр", "PE.Views.Statusbar.tipPreview": "Начать показ слайдов",
"PE.Views.Statusbar.tipShowUsers": "Чтобы увидеть всех пользователей, нажмите на значок ниже.", "PE.Views.Statusbar.tipShowUsers": "Чтобы увидеть всех пользователей, нажмите на значок ниже.",
"PE.Views.Statusbar.tipUsers": "Документ редактируется несколькими пользователями.", "PE.Views.Statusbar.tipUsers": "Документ редактируется несколькими пользователями.",
"PE.Views.Statusbar.tipViewUsers": "Просмотр пользователей и управление правами доступа к документу", "PE.Views.Statusbar.tipViewUsers": "Просмотр пользователей и управление правами доступа к документу",
@ -671,9 +684,7 @@
"PE.Views.TableSettings.textNewColor": "Пользовательский цвет", "PE.Views.TableSettings.textNewColor": "Пользовательский цвет",
"PE.Views.TableSettings.textRows": "Строки", "PE.Views.TableSettings.textRows": "Строки",
"PE.Views.TableSettings.textSelectBorders": "Выберите границы, к которым надо применить выбранный стиль", "PE.Views.TableSettings.textSelectBorders": "Выберите границы, к которым надо применить выбранный стиль",
"PE.Views.TableSettings.textStandartColors": "Стандартные цвета",
"PE.Views.TableSettings.textTemplate": "По шаблону", "PE.Views.TableSettings.textTemplate": "По шаблону",
"PE.Views.TableSettings.textThemeColors": "Цвета темы",
"PE.Views.TableSettings.textTotal": "Итоговая", "PE.Views.TableSettings.textTotal": "Итоговая",
"PE.Views.TableSettings.tipAll": "Задать внешнюю границу и все внутренние линии", "PE.Views.TableSettings.tipAll": "Задать внешнюю границу и все внутренние линии",
"PE.Views.TableSettings.tipBottom": "Задать только внешнюю нижнюю границу", "PE.Views.TableSettings.tipBottom": "Задать только внешнюю нижнюю границу",
@ -705,6 +716,7 @@
"PE.Views.TextArtSettings.strSize": "Толщина", "PE.Views.TextArtSettings.strSize": "Толщина",
"PE.Views.TextArtSettings.strStroke": "Обводка", "PE.Views.TextArtSettings.strStroke": "Обводка",
"PE.Views.TextArtSettings.strTransparency": "Непрозрачность", "PE.Views.TextArtSettings.strTransparency": "Непрозрачность",
"PE.Views.TextArtSettings.strType": "Тип",
"PE.Views.TextArtSettings.textBorderSizeErr": "Введено некорректное значение.<br>Пожалуйста, введите значение от 0 до 1584 пунктов.", "PE.Views.TextArtSettings.textBorderSizeErr": "Введено некорректное значение.<br>Пожалуйста, введите значение от 0 до 1584 пунктов.",
"PE.Views.TextArtSettings.textColor": "Заливка цветом", "PE.Views.TextArtSettings.textColor": "Заливка цветом",
"PE.Views.TextArtSettings.textDirection": "Направление", "PE.Views.TextArtSettings.textDirection": "Направление",
@ -720,12 +732,10 @@
"PE.Views.TextArtSettings.textPatternFill": "Узор", "PE.Views.TextArtSettings.textPatternFill": "Узор",
"PE.Views.TextArtSettings.textRadial": "Радиальный", "PE.Views.TextArtSettings.textRadial": "Радиальный",
"PE.Views.TextArtSettings.textSelectTexture": "Выбрать", "PE.Views.TextArtSettings.textSelectTexture": "Выбрать",
"PE.Views.TextArtSettings.textStandartColors": "Стандартные цвета",
"PE.Views.TextArtSettings.textStretch": "Растяжение", "PE.Views.TextArtSettings.textStretch": "Растяжение",
"PE.Views.TextArtSettings.textStyle": "Стиль", "PE.Views.TextArtSettings.textStyle": "Стиль",
"PE.Views.TextArtSettings.textTemplate": "Шаблон", "PE.Views.TextArtSettings.textTemplate": "Шаблон",
"PE.Views.TextArtSettings.textTexture": "Из текстуры", "PE.Views.TextArtSettings.textTexture": "Из текстуры",
"PE.Views.TextArtSettings.textThemeColors": "Цвета темы",
"PE.Views.TextArtSettings.textTile": "Плитка", "PE.Views.TextArtSettings.textTile": "Плитка",
"PE.Views.TextArtSettings.textTransform": "Трансформация", "PE.Views.TextArtSettings.textTransform": "Трансформация",
"PE.Views.TextArtSettings.txtBrownPaper": "Крафт-бумага", "PE.Views.TextArtSettings.txtBrownPaper": "Крафт-бумага",
@ -782,12 +792,13 @@
"PE.Views.Toolbar.textShapeAlignMiddle": "Выровнять по середине", "PE.Views.Toolbar.textShapeAlignMiddle": "Выровнять по середине",
"PE.Views.Toolbar.textShapeAlignRight": "Выровнять по правому краю", "PE.Views.Toolbar.textShapeAlignRight": "Выровнять по правому краю",
"PE.Views.Toolbar.textShapeAlignTop": "Выровнять по верхнему краю", "PE.Views.Toolbar.textShapeAlignTop": "Выровнять по верхнему краю",
"PE.Views.Toolbar.textStandartColors": "Стандартные цвета", "PE.Views.Toolbar.textShowBegin": "Показ слайдов с начала",
"PE.Views.Toolbar.textShowCurrent": "Показ слайдов с текущего слайда",
"PE.Views.Toolbar.textShowSettings": "Параметры показа слайдов",
"PE.Views.Toolbar.textStock": "Биржевая", "PE.Views.Toolbar.textStock": "Биржевая",
"PE.Views.Toolbar.textStrikeout": "Зачеркнутый", "PE.Views.Toolbar.textStrikeout": "Зачеркнутый",
"PE.Views.Toolbar.textSubscript": "Подстрочные знаки", "PE.Views.Toolbar.textSubscript": "Подстрочные знаки",
"PE.Views.Toolbar.textSuperscript": "Надстрочные знаки", "PE.Views.Toolbar.textSuperscript": "Надстрочные знаки",
"PE.Views.Toolbar.textThemeColors": "Цвета темы",
"PE.Views.Toolbar.textTitleError": "Ошибка", "PE.Views.Toolbar.textTitleError": "Ошибка",
"PE.Views.Toolbar.textUnderline": "Подчеркнутый", "PE.Views.Toolbar.textUnderline": "Подчеркнутый",
"PE.Views.Toolbar.textZoom": "Масштаб", "PE.Views.Toolbar.textZoom": "Масштаб",
@ -818,7 +829,7 @@
"PE.Views.Toolbar.tipNumbers": "Нумерованный список", "PE.Views.Toolbar.tipNumbers": "Нумерованный список",
"PE.Views.Toolbar.tipOpenDocument": "Открыть презентацию", "PE.Views.Toolbar.tipOpenDocument": "Открыть презентацию",
"PE.Views.Toolbar.tipPaste": "Вставить", "PE.Views.Toolbar.tipPaste": "Вставить",
"PE.Views.Toolbar.tipPreview": "Начать просмотр", "PE.Views.Toolbar.tipPreview": "Начать показ слайдов",
"PE.Views.Toolbar.tipPrint": "Печать", "PE.Views.Toolbar.tipPrint": "Печать",
"PE.Views.Toolbar.tipRedo": "Повторить", "PE.Views.Toolbar.tipRedo": "Повторить",
"PE.Views.Toolbar.tipSave": "Сохранить", "PE.Views.Toolbar.tipSave": "Сохранить",

View file

@ -123,8 +123,8 @@
"PE.Controllers.Main.loadImagesTitleText": "Nalaganje slik", "PE.Controllers.Main.loadImagesTitleText": "Nalaganje slik",
"PE.Controllers.Main.loadImageTextText": "Nalaganje slike...", "PE.Controllers.Main.loadImageTextText": "Nalaganje slike...",
"PE.Controllers.Main.loadImageTitleText": "Nalaganje Slike", "PE.Controllers.Main.loadImageTitleText": "Nalaganje Slike",
"PE.Controllers.Main.loadingDocumentTextText": "Nalaganje dokumenta...", "PE.Controllers.Main.loadingDocumentTextText": "Nalaganje predstavitve...",
"PE.Controllers.Main.loadingDocumentTitleText": "Nalaganje Dokumenta", "PE.Controllers.Main.loadingDocumentTitleText": "Nalaganje predstavitve",
"PE.Controllers.Main.loadThemeTextText": "Nalaganje teme...", "PE.Controllers.Main.loadThemeTextText": "Nalaganje teme...",
"PE.Controllers.Main.loadThemeTitleText": "Nalaganje teme", "PE.Controllers.Main.loadThemeTitleText": "Nalaganje teme",
"PE.Controllers.Main.notcriticalErrorTitle": "Opozorilo", "PE.Controllers.Main.notcriticalErrorTitle": "Opozorilo",
@ -144,7 +144,7 @@
"PE.Controllers.Main.splitMaxRowsErrorText": "Število vrstic mora biti manj kot %1.", "PE.Controllers.Main.splitMaxRowsErrorText": "Število vrstic mora biti manj kot %1.",
"PE.Controllers.Main.textAnonymous": "Anonimno", "PE.Controllers.Main.textAnonymous": "Anonimno",
"PE.Controllers.Main.textCloseTip": "\nPritisni za zapiranje namiga", "PE.Controllers.Main.textCloseTip": "\nPritisni za zapiranje namiga",
"PE.Controllers.Main.textLoadingDocument": "Nalaganje Dokumenta", "PE.Controllers.Main.textLoadingDocument": "Nalaganje predstavitve",
"PE.Controllers.Main.textShape": "Oblika", "PE.Controllers.Main.textShape": "Oblika",
"PE.Controllers.Main.textStrict": "Strict mode", "PE.Controllers.Main.textStrict": "Strict mode",
"PE.Controllers.Main.textTryUndoRedo": "The Undo/Redo functions are disabled for the Fast co-editing mode.<br>Click the 'Strict mode' button to switch to the Strict co-editing mode to edit the file without other users interference and send your changes only after you save them. You can switch between the co-editing modes using the editor Advanced settings.", "PE.Controllers.Main.textTryUndoRedo": "The Undo/Redo functions are disabled for the Fast co-editing mode.<br>Click the 'Strict mode' button to switch to the Strict co-editing mode to edit the file without other users interference and send your changes only after you save them. You can switch between the co-editing modes using the editor Advanced settings.",

View file

@ -123,8 +123,8 @@
"PE.Controllers.Main.loadImagesTitleText": "Resimler yükleniyor", "PE.Controllers.Main.loadImagesTitleText": "Resimler yükleniyor",
"PE.Controllers.Main.loadImageTextText": "Resim yükleniyor...", "PE.Controllers.Main.loadImageTextText": "Resim yükleniyor...",
"PE.Controllers.Main.loadImageTitleText": "Resim yükleniyor", "PE.Controllers.Main.loadImageTitleText": "Resim yükleniyor",
"PE.Controllers.Main.loadingDocumentTextText": "Döküman yükleniyor...", "PE.Controllers.Main.loadingDocumentTextText": "Sunum yükleniyor...",
"PE.Controllers.Main.loadingDocumentTitleText": "Döküman yükleniyor", "PE.Controllers.Main.loadingDocumentTitleText": "Sunum yükleniyor",
"PE.Controllers.Main.loadThemeTextText": "Tema yükleniyor...", "PE.Controllers.Main.loadThemeTextText": "Tema yükleniyor...",
"PE.Controllers.Main.loadThemeTitleText": "Tema Yükleniyor", "PE.Controllers.Main.loadThemeTitleText": "Tema Yükleniyor",
"PE.Controllers.Main.notcriticalErrorTitle": "Dikkat", "PE.Controllers.Main.notcriticalErrorTitle": "Dikkat",
@ -144,7 +144,7 @@
"PE.Controllers.Main.splitMaxRowsErrorText": "Satır sayısı %1'den az olmalıdır.", "PE.Controllers.Main.splitMaxRowsErrorText": "Satır sayısı %1'den az olmalıdır.",
"PE.Controllers.Main.textAnonymous": "Anonim", "PE.Controllers.Main.textAnonymous": "Anonim",
"PE.Controllers.Main.textCloseTip": "\nUcu kapamak için tıklayın", "PE.Controllers.Main.textCloseTip": "\nUcu kapamak için tıklayın",
"PE.Controllers.Main.textLoadingDocument": "Döküman yükleniyor", "PE.Controllers.Main.textLoadingDocument": "Sunum yükleniyor",
"PE.Controllers.Main.textShape": "Şekil", "PE.Controllers.Main.textShape": "Şekil",
"PE.Controllers.Main.textStrict": "Strict mode", "PE.Controllers.Main.textStrict": "Strict mode",
"PE.Controllers.Main.textTryUndoRedo": "The Undo/Redo functions are disabled for the Fast co-editing mode.<br>Click the 'Strict mode' button to switch to the Strict co-editing mode to edit the file without other users interference and send your changes only after you save them. You can switch between the co-editing modes using the editor Advanced settings.", "PE.Controllers.Main.textTryUndoRedo": "The Undo/Redo functions are disabled for the Fast co-editing mode.<br>Click the 'Strict mode' button to switch to the Strict co-editing mode to edit the file without other users interference and send your changes only after you save them. You can switch between the co-editing modes using the editor Advanced settings.",

Some files were not shown because too many files have changed in this diff Show more