Merge branch 'develop' into feature/special_paste_word
This commit is contained in:
commit
6f0a3c33e5
10
.travis.yml
Normal file
10
.travis.yml
Normal file
|
@ -0,0 +1,10 @@
|
|||
dist: trusty
|
||||
language: node_js
|
||||
node_js:
|
||||
- '6'
|
||||
before_install: npm install -g grunt-cli
|
||||
before_script:
|
||||
- cd build
|
||||
script:
|
||||
- npm install
|
||||
- grunt --level=ADVANCED
|
|
@ -50,7 +50,6 @@
|
|||
lang: <language code>,
|
||||
location: <location>,
|
||||
canCoAuthoring: <can coauthoring documents>,
|
||||
canAutosave: <can autosave documents>,
|
||||
canBackToFolder: <can return to folder> - deprecated. use "customization.goback" parameter,
|
||||
createUrl: 'create document url',
|
||||
sharingSettingsUrl: 'document sharing settings url',
|
||||
|
@ -113,6 +112,7 @@
|
|||
rightMenu: true,
|
||||
toolbar: true,
|
||||
header: true,
|
||||
statusBar: true,
|
||||
autosave: true,
|
||||
forcesave: false,
|
||||
commentAuthorOnly: false
|
||||
|
@ -131,8 +131,7 @@
|
|||
events: {
|
||||
'onReady': <document ready callback>,
|
||||
'onBack': <back to folder callback>,
|
||||
'onDocumentStateChange': <document state changed callback>,
|
||||
'onSave': <save request callback>
|
||||
'onDocumentStateChange': <document state changed callback>
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -280,9 +279,6 @@
|
|||
|
||||
if (handler) {
|
||||
res = handler.call(_self, {target: _self, data: msg.data});
|
||||
if (msg.event === 'onSave' && res !== false) {
|
||||
_processSaveResult(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -65,7 +65,6 @@
|
|||
'onRequestEmailAddresses': onRequestEmailAddresses,
|
||||
'onRequestStartMailMerge': onRequestStartMailMerge,
|
||||
'onRequestHistoryClose': onRequestHistoryClose,
|
||||
'onSave': onDocumentSave,
|
||||
'onError': onError
|
||||
}
|
||||
});
|
||||
|
@ -195,12 +194,6 @@
|
|||
docEditor.applyEditRights(true, "Someone is editing this document right now. Please try again later.");
|
||||
}
|
||||
|
||||
function onDocumentSave(event) {
|
||||
var url = event.data;
|
||||
// if you want to async save process return false
|
||||
// and call api.processSaveResult when ready
|
||||
}
|
||||
|
||||
function onError(event) {
|
||||
// critical error happened
|
||||
// examine event.data.errorCode and event.data.errorDescription for details
|
||||
|
|
|
@ -142,13 +142,6 @@ if (Common === undefined) {
|
|||
_postMessage({ event: 'onReady' });
|
||||
},
|
||||
|
||||
save: function(url) {
|
||||
_postMessage({
|
||||
event: 'onSave',
|
||||
data: url
|
||||
});
|
||||
},
|
||||
|
||||
requestEditRights: function() {
|
||||
_postMessage({ event: 'onRequestEditRights' });
|
||||
},
|
||||
|
|
|
@ -331,7 +331,7 @@ define([
|
|||
$(document).off('mouseup', onMouseUp);
|
||||
};
|
||||
|
||||
var onAfterHideMenu = function(e) {
|
||||
var onAfterHideMenu = function(e, isFromInputControl) {
|
||||
me.cmpEl.find('.dropdown-toggle').blur();
|
||||
if (me.cmpEl.hasClass('active') !== me.pressed)
|
||||
me.cmpEl.trigger('button.internal.active', [me.pressed]);
|
||||
|
@ -416,14 +416,16 @@ define([
|
|||
setDisabled: function(disabled) {
|
||||
if (this.rendered && this.disabled != disabled) {
|
||||
var el = this.cmpEl,
|
||||
isGroup = el.hasClass('btn-group');
|
||||
isGroup = el.hasClass('btn-group'),
|
||||
me = this;
|
||||
|
||||
disabled = (disabled===true);
|
||||
|
||||
if (disabled !== el.hasClass('disabled')) {
|
||||
var decorateBtn = function(button) {
|
||||
button.toggleClass('disabled', disabled);
|
||||
(disabled) ? button.attr({disabled: disabled}) : button.removeAttr('disabled');
|
||||
if (!me.options.allowMouseEventsOnDisabled)
|
||||
(disabled) ? button.attr({disabled: disabled}) : button.removeAttr('disabled');
|
||||
};
|
||||
|
||||
decorateBtn(el);
|
||||
|
|
|
@ -294,10 +294,10 @@ define([
|
|||
e.preventDefault();
|
||||
},
|
||||
|
||||
onAfterHideMenu: function(e) {
|
||||
onAfterHideMenu: function(e, isFromInputControl) {
|
||||
this.cmpEl.find('.dropdown-toggle').blur();
|
||||
this.trigger('hide:after', this, e);
|
||||
Common.NotificationCenter.trigger('menu:hide');
|
||||
this.trigger('hide:after', this, e, isFromInputControl);
|
||||
Common.NotificationCenter.trigger('menu:hide', this, isFromInputControl);
|
||||
},
|
||||
|
||||
onAfterKeydownMenu: function(e) {
|
||||
|
|
|
@ -59,7 +59,8 @@ define([
|
|||
enableKeyEvents : false,
|
||||
beforeOpenHandler : null,
|
||||
additionalMenuItems : null,
|
||||
showLast: true
|
||||
showLast: true,
|
||||
minWidth: -1
|
||||
},
|
||||
|
||||
template: _.template([
|
||||
|
@ -85,6 +86,8 @@ define([
|
|||
this.rootWidth = 0;
|
||||
this.rootHeight = 0;
|
||||
this.rendered = false;
|
||||
this.needFillComboView = false;
|
||||
this.minWidth = this.options.minWidth;
|
||||
|
||||
this.fieldPicker = new Common.UI.DataView({
|
||||
cls: 'field-picker',
|
||||
|
@ -209,11 +212,13 @@ define([
|
|||
},
|
||||
|
||||
checkSize: function() {
|
||||
if (this.cmpEl) {
|
||||
if (this.cmpEl && this.cmpEl.is(':visible')) {
|
||||
var me = this,
|
||||
width = this.cmpEl.width(),
|
||||
height = this.cmpEl.height();
|
||||
|
||||
if (width < this.minWidth) return;
|
||||
|
||||
if (this.rootWidth != width || this.rootHeight != height) {
|
||||
this.rootWidth = width;
|
||||
this.rootHeight = height;
|
||||
|
@ -304,10 +309,10 @@ define([
|
|||
}
|
||||
},
|
||||
|
||||
onAfterHideMenu: function(e) {
|
||||
onAfterHideMenu: function(e, isFromInputControl) {
|
||||
this.menuPicker.selectedBeforeHideRec = this.menuPicker.getSelectedRec()[0]; // for DataView - onKeyDown - Return key
|
||||
(this.showLast) ? this.menuPicker.showLastSelected() : this.menuPicker.deselectAll();
|
||||
this.trigger('hide:after', this, e);
|
||||
this.trigger('hide:after', this, e, isFromInputControl);
|
||||
},
|
||||
|
||||
onFieldPickerSelect: function(picker, item, record) {
|
||||
|
@ -315,6 +320,7 @@ define([
|
|||
},
|
||||
|
||||
onMenuPickerSelect: function(picker, item, record, fromKeyDown) {
|
||||
this.needFillComboView = this.disabled;
|
||||
if (this.disabled || fromKeyDown===true) return;
|
||||
|
||||
this.fillComboView(record, false);
|
||||
|
@ -375,6 +381,17 @@ define([
|
|||
this.cmpEl.toggleClass('disabled', disabled);
|
||||
$('button', this.openButton.cmpEl).toggleClass('disabled', disabled);
|
||||
this.fieldPicker.setDisabled(disabled);
|
||||
|
||||
if (this.needFillComboView && !disabled) {
|
||||
var picker = this.menuPicker;
|
||||
if (picker) {
|
||||
var record = picker.getSelectedRec();
|
||||
if (record) {
|
||||
record = record[0];
|
||||
this.fillComboView(record || picker.store.at(0), false);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
isDisabled: function() {
|
||||
|
@ -383,6 +400,8 @@ define([
|
|||
|
||||
fillComboView: function(record, forceSelect, forceFill) {
|
||||
if (!_.isUndefined(record) && record instanceof Backbone.Model){
|
||||
this.needFillComboView = false;
|
||||
|
||||
var me = this,
|
||||
store = me.menuPicker.store,
|
||||
fieldPickerEl = $(me.fieldPicker.el);
|
||||
|
@ -405,7 +424,7 @@ define([
|
|||
|
||||
var indexRec = store.indexOf(record),
|
||||
countRec = store.length,
|
||||
maxViewCount = Math.floor((fieldPickerEl.width()) / (me.itemWidth + (me.itemMarginLeft || 0) + (me.itemMarginRight || 0) + (me.itemPaddingLeft || 0) + (me.itemPaddingRight || 0) +
|
||||
maxViewCount = Math.floor(Math.max(fieldPickerEl.width(), me.minWidth) / (me.itemWidth + (me.itemMarginLeft || 0) + (me.itemMarginRight || 0) + (me.itemPaddingLeft || 0) + (me.itemPaddingRight || 0) +
|
||||
(me.itemBorderLeft || 0) + (me.itemBorderRight || 0))),
|
||||
newStyles = [];
|
||||
|
||||
|
|
|
@ -439,9 +439,9 @@ define([
|
|||
e.preventDefault();
|
||||
},
|
||||
|
||||
onAfterHideMenu: function(e) {
|
||||
this.trigger('hide:after', this, e);
|
||||
Common.NotificationCenter.trigger('menu:hide', this);
|
||||
onAfterHideMenu: function(e, isFromInputControl) {
|
||||
this.trigger('hide:after', this, e, isFromInputControl);
|
||||
Common.NotificationCenter.trigger('menu:hide', this, isFromInputControl);
|
||||
},
|
||||
|
||||
onAfterKeydownMenu: function(e) {
|
||||
|
|
|
@ -63,7 +63,10 @@ define([
|
|||
'<div class="slider multi-slider-gradient">',
|
||||
'<div class="track"></div>',
|
||||
'<% _.each(items, function(item) { %>',
|
||||
'<div class="thumb img-commonctrl" style=""></div>',
|
||||
'<div class="thumb img-commonctrl" style="">',
|
||||
'<div class="thumb-top"></div>',
|
||||
'<div class="thumb-bottom"></div>',
|
||||
'</div>',
|
||||
'<% }); %>',
|
||||
'</div>'
|
||||
].join('')),
|
||||
|
@ -98,6 +101,7 @@ define([
|
|||
me.thumbs[i].thumb.on('dblclick', null, function() {
|
||||
me.trigger('thumbdblclick', me);
|
||||
});
|
||||
me.thumbs[i].thumbcolor = me.thumbs[i].thumb.find('> div');
|
||||
}
|
||||
|
||||
if (me.styleStr!=='') {
|
||||
|
@ -118,6 +122,7 @@ define([
|
|||
setColorValue: function(color, index) {
|
||||
var ind = (index!==undefined) ? index : this.currentThumb;
|
||||
this.colorValues[ind] = color;
|
||||
this.thumbs[ind].thumbcolor.css('background-color', color);
|
||||
this.changeGradientStyle();
|
||||
},
|
||||
|
||||
|
@ -145,6 +150,18 @@ define([
|
|||
}
|
||||
style = Common.Utils.String.format('linear-gradient(to right, {0} {1}%, {2} {3}%)', this.colorValues[0], this.getValue(0), this.colorValues[1], this.getValue(1));
|
||||
this.trackEl.css('background', style);
|
||||
},
|
||||
|
||||
sortThumbs: function() {
|
||||
var recalc_indexes = Common.UI.MultiSlider.prototype.sortThumbs.call(this),
|
||||
new_colors = [],
|
||||
me = this;
|
||||
_.each (recalc_indexes, function(recalc_index) {
|
||||
new_colors.push(me.colorValues[recalc_index]);
|
||||
});
|
||||
this.colorValues = new_colors;
|
||||
this.trigger('sortthumbs', me, recalc_indexes);
|
||||
return recalc_indexes;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
@ -338,16 +338,21 @@ define([
|
|||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
var index = e.data,
|
||||
var index = e.data.index,
|
||||
lastValue = me.thumbs[index].value,
|
||||
minValue = (index-1<0) ? 0 : me.thumbs[index-1].position,
|
||||
maxValue = (index+1<me.thumbs.length) ? me.thumbs[index+1].position : 100,
|
||||
pos = Math.max(minValue, Math.min(maxValue, (Math.round((e.pageX*Common.Utils.zoom() - me.cmpEl.offset().left - me._dragstart) / me.width * 100)))),
|
||||
position = Math.round((e.pageX*Common.Utils.zoom() - me.cmpEl.offset().left - me._dragstart) / me.width * 100),
|
||||
need_sort = position < minValue || position > maxValue,
|
||||
pos = Math.max(0, Math.min(100, position)),
|
||||
value = pos/me.delta + me.minValue;
|
||||
|
||||
me.setThumbPosition(index, pos);
|
||||
me.thumbs[index].value = value;
|
||||
|
||||
if (need_sort)
|
||||
me.sortThumbs();
|
||||
|
||||
$(document).off('mouseup', onMouseUp);
|
||||
$(document).off('mousemove', onMouseMove);
|
||||
|
||||
|
@ -362,16 +367,21 @@ define([
|
|||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
var index = e.data,
|
||||
var index = e.data.index,
|
||||
lastValue = me.thumbs[index].value,
|
||||
minValue = (index-1<0) ? 0 : me.thumbs[index-1].position,
|
||||
maxValue = (index+1<me.thumbs.length) ? me.thumbs[index+1].position : 100,
|
||||
pos = Math.max(minValue, Math.min(maxValue, (Math.round((e.pageX*Common.Utils.zoom() - me.cmpEl.offset().left - me._dragstart) / me.width * 100)))),
|
||||
position = Math.round((e.pageX*Common.Utils.zoom() - me.cmpEl.offset().left - me._dragstart) / me.width * 100),
|
||||
need_sort = position < minValue || position > maxValue,
|
||||
pos = Math.max(0, Math.min(100, position)),
|
||||
value = pos/me.delta + me.minValue;
|
||||
|
||||
me.setThumbPosition(index, pos);
|
||||
me.thumbs[index].value = value;
|
||||
|
||||
if (need_sort)
|
||||
me.sortThumbs();
|
||||
|
||||
if (Math.abs(value-lastValue)>0.001)
|
||||
me.trigger('change', me, value, lastValue);
|
||||
};
|
||||
|
@ -379,7 +389,7 @@ define([
|
|||
var onMouseDown = function (e) {
|
||||
if ( me.disabled ) return;
|
||||
|
||||
var index = e.data,
|
||||
var index = e.data.index,
|
||||
thumb = me.thumbs[index].thumb;
|
||||
|
||||
me._dragstart = e.pageX*Common.Utils.zoom() - thumb.offset().left - thumb.width()/2;
|
||||
|
@ -389,8 +399,8 @@ define([
|
|||
(index == idx) ? item.thumb.css('z-index', 500) : item.thumb.css('z-index', '');
|
||||
});
|
||||
|
||||
$(document).on('mouseup', null, index, onMouseUp);
|
||||
$(document).on('mousemove', null, index, onMouseMove);
|
||||
$(document).on('mouseup', null, e.data, onMouseUp);
|
||||
$(document).on('mousemove', null, e.data, onMouseMove);
|
||||
};
|
||||
|
||||
var onTrackMouseDown = function (e) {
|
||||
|
@ -441,7 +451,7 @@ define([
|
|||
index: index
|
||||
});
|
||||
me.setValue(index, me.options.values[index]);
|
||||
thumb.on('mousedown', null, index, onMouseDown);
|
||||
thumb.on('mousedown', null, me.thumbs[index], onMouseDown);
|
||||
});
|
||||
me.setActiveThumb(0, true);
|
||||
|
||||
|
@ -489,6 +499,18 @@ define([
|
|||
if (disabled !== this.disabled)
|
||||
this.cmpEl.toggleClass('disabled', disabled);
|
||||
this.disabled = disabled;
|
||||
},
|
||||
|
||||
sortThumbs: function() {
|
||||
this.thumbs.sort(function(a, b) {
|
||||
return (a.position - b.position);
|
||||
});
|
||||
var recalc_indexes = [];
|
||||
_.each (this.thumbs, function(thumb, index) {
|
||||
recalc_indexes.push(thumb.index);
|
||||
thumb.index = index;
|
||||
});
|
||||
return recalc_indexes;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
@ -186,13 +186,13 @@ function getParent($this) {
|
|||
return $parent && $parent.length ? $parent : $this.parent();
|
||||
}
|
||||
|
||||
function clearMenus() {
|
||||
function clearMenus(isFromInputControl) {
|
||||
$('.dropdown-toggle').each(function (e) {
|
||||
var $parent = ($(this)).parent();
|
||||
if (!$parent.hasClass('open')) return;
|
||||
$parent.trigger(e = $.Event('hide.bs.dropdown'));
|
||||
if (e.isDefaultPrevented()) return;
|
||||
$parent.removeClass('open').trigger('hidden.bs.dropdown');
|
||||
$parent.removeClass('open').trigger('hidden.bs.dropdown', isFromInputControl);
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -217,7 +217,7 @@ $(document)
|
|||
|
||||
function onDropDownClick(e) {
|
||||
if (e.which == 1 || e.which == undefined)
|
||||
clearMenus();
|
||||
clearMenus(/form-control/.test(e.target.className));
|
||||
}
|
||||
|
||||
if (!!clickDefHandler) {
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
<div id="header-container">
|
||||
<div id="header-logo"></div>
|
||||
<div id="header-caption"><div><%= headerCaption %></div></div>
|
||||
<div id="header-developer" class="hidden"><div><%= headerDeveloper %></div></div>
|
||||
<div id="header-documentcaption"><div><%= documentCaption %></div></div>
|
||||
<div id="header-back" style="display: <%= canBack ? 'table-cell' : 'none' %>;"><div><%= textBack %></div></div>
|
||||
</div>
|
|
@ -54,7 +54,6 @@ define([
|
|||
options : {
|
||||
branding: {},
|
||||
headerCaption: 'Default Caption',
|
||||
headerDeveloper: 'DEVELOPER MODE',
|
||||
documentCaption: '',
|
||||
canBack: false
|
||||
},
|
||||
|
@ -79,16 +78,15 @@ define([
|
|||
this.options = this.options ? _({}).extend(this.options, options) : options;
|
||||
|
||||
this.headerCaption = this.options.headerCaption;
|
||||
this.headerDeveloper = this.txtHeaderDeveloper;
|
||||
this.documentCaption = this.options.documentCaption;
|
||||
this.canBack = this.options.canBack;
|
||||
this.branding = this.options.customization;
|
||||
this.isModified = false;
|
||||
},
|
||||
|
||||
render: function () {
|
||||
$(this.el).html(this.template({
|
||||
headerCaption : this.headerCaption,
|
||||
headerDeveloper : this.headerDeveloper,
|
||||
documentCaption : Common.Utils.String.htmlEncode(this.documentCaption),
|
||||
canBack : this.canBack,
|
||||
textBack : this.textBack
|
||||
|
@ -158,14 +156,18 @@ define([
|
|||
return this.headerCaption;
|
||||
},
|
||||
|
||||
setDocumentCaption: function(value, applyOnly) {
|
||||
if (_.isUndefined(applyOnly)) {
|
||||
this.documentCaption = value;
|
||||
}
|
||||
setDocumentCaption: function(value, isModified) {
|
||||
if (isModified !== undefined)
|
||||
this.isModified = isModified;
|
||||
|
||||
this.documentCaption = value;
|
||||
|
||||
if (!value)
|
||||
value = '';
|
||||
|
||||
if (this.isModified)
|
||||
value = value + '*';
|
||||
|
||||
var dc = $('#header-documentcaption div');
|
||||
if (dc)
|
||||
dc.html(Common.Utils.String.htmlEncode(value));
|
||||
|
@ -223,10 +225,6 @@ define([
|
|||
}
|
||||
},
|
||||
|
||||
setDeveloperMode: function(mode) {
|
||||
$('#header-developer').toggleClass('hidden', !mode);
|
||||
},
|
||||
|
||||
setCanRename: function(rename) {
|
||||
var dc = $('#header-documentcaption div');
|
||||
if (rename) {
|
||||
|
@ -257,7 +255,6 @@ define([
|
|||
|
||||
textBack: 'Go to Documents',
|
||||
openNewTabText: 'Open in New Tab',
|
||||
txtHeaderDeveloper: 'DEVELOPER MODE',
|
||||
txtRename: 'Rename'
|
||||
}, Common.Views.Header || {}))
|
||||
});
|
||||
|
|
|
@ -295,7 +295,7 @@
|
|||
height: 20px;
|
||||
line-height: @line-height-base;
|
||||
background-color: #EE3525;
|
||||
margin: 18px 25px;
|
||||
margin: 10px 18px;
|
||||
padding: 2px 10px;
|
||||
color: #fff;
|
||||
overflow: hidden;
|
||||
|
|
|
@ -46,34 +46,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
#header-developer {
|
||||
background-color: #ffb400;
|
||||
padding-left: 15px + @app-header-height / 3;
|
||||
& > div {
|
||||
position: relative;
|
||||
background-color: #ffb400;
|
||||
color: #6e4e00 !important;
|
||||
padding-right: 15px;
|
||||
cursor: default;
|
||||
z-index: 1;
|
||||
white-space: nowrap;
|
||||
height: @app-header-height;
|
||||
line-height: @app-header-height;
|
||||
|
||||
&:after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: -@app-header-height / 2;
|
||||
width: @app-header-height / 2;
|
||||
height: @app-header-height;
|
||||
border-top: @app-header-height / 2 solid transparent;
|
||||
border-left: @app-header-height / 3 solid #ffb400;
|
||||
border-bottom: @app-header-height / 2 solid transparent;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#header-documentcaption {
|
||||
width: 100%;
|
||||
max-width: 100px;
|
||||
|
|
|
@ -4,10 +4,41 @@
|
|||
|
||||
.thumb {
|
||||
top: 18px;
|
||||
background-position: @multislide-thumb-offset-x @multislide-thumb-offset-y;
|
||||
background: none;
|
||||
|
||||
&.active {
|
||||
background-position: @multislide-thumb-offset-x @multislide-thumb-offset-y - 30px;
|
||||
.thumb-top {
|
||||
position: absolute;
|
||||
top: 2px;
|
||||
left: 2px;
|
||||
width: 9px;
|
||||
height: 9px;
|
||||
background-color: #ffffff;
|
||||
-moz-transform: rotate(45deg);
|
||||
-ms-transform: rotate(45deg);
|
||||
-webkit-transform: rotate(45deg);
|
||||
-o-transform: rotate(45deg);
|
||||
transform: rotate(45deg);
|
||||
border-top: solid 1px @gray-darker;
|
||||
border-left: solid 1px @gray-darker;
|
||||
border-radius: 0 3px;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
|
||||
.thumb-bottom {
|
||||
position: absolute;
|
||||
top: 6px;
|
||||
left: 1px;
|
||||
width: 10px;
|
||||
height: 8px;
|
||||
background-color: #ffffff;
|
||||
border: solid 1px @gray-darker;
|
||||
border-top: none;
|
||||
border-radius: 2px;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
|
||||
&.active .thumb-bottom {
|
||||
border-bottom-width: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -120,6 +120,11 @@ define([
|
|||
row = -1,
|
||||
standartColors = Common.Utils.ThemeColor.getStandartColors();
|
||||
|
||||
// Disable duplicate
|
||||
if ($(me.el).find('.list-block.color-palette').length > 0) {
|
||||
return
|
||||
}
|
||||
|
||||
_.each(Common.Utils.ThemeColor.getEffectColors(), function(effect, index) {
|
||||
if (0 == index % me.options.themecolors) {
|
||||
themeColors.push([]);
|
||||
|
|
|
@ -174,6 +174,8 @@ define([
|
|||
if (this.mode.canUseHistory)
|
||||
this.leftMenu.setOptionsPanel('history', this.getApplication().getController('Common.Controllers.History').getView('Common.Views.History'));
|
||||
|
||||
this.mode.isTrial && this.leftMenu.setDeveloperMode(true);
|
||||
|
||||
Common.util.Shortcuts.resumeEvents();
|
||||
return this;
|
||||
},
|
||||
|
@ -184,6 +186,7 @@ define([
|
|||
this.leftMenu.setOptionsPanel('plugins', this.getApplication().getController('Common.Controllers.Plugins').getView('Common.Views.Plugins'));
|
||||
} else
|
||||
this.leftMenu.btnPlugins.hide();
|
||||
this.mode.isTrial && this.leftMenu.setDeveloperMode(true);
|
||||
},
|
||||
|
||||
clickMenuFileItem: function(menu, action, isopts) {
|
||||
|
|
|
@ -69,7 +69,8 @@ define([
|
|||
toolbar: '#viewport #toolbar',
|
||||
leftMenu: '#viewport #left-menu, #viewport #id-toolbar-full-placeholder-btn-settings, #viewport #id-toolbar-short-placeholder-btn-settings',
|
||||
rightMenu: '#viewport #right-menu',
|
||||
header: '#viewport #header'
|
||||
header: '#viewport #header',
|
||||
statusBar: '#statusbar'
|
||||
};
|
||||
|
||||
Common.localStorage.setId('text');
|
||||
|
@ -103,7 +104,7 @@ define([
|
|||
weakCompare : function(obj1, obj2){return obj1.type === obj2.type;}
|
||||
});
|
||||
|
||||
this._state = {isDisconnected: false, usersCount: 1, fastCoauth: true, startModifyDocument: true, lostEditingRights: false, licenseWarning: false};
|
||||
this._state = {isDisconnected: false, usersCount: 1, fastCoauth: true, lostEditingRights: false, licenseWarning: false};
|
||||
|
||||
// Initialize viewport
|
||||
|
||||
|
@ -168,6 +169,8 @@ define([
|
|||
if (!/area_id/.test(e.target.id)) {
|
||||
if (/msg-reply/.test(e.target.className))
|
||||
me.dontCloseDummyComment = true;
|
||||
else if (/chat-msg-text/.test(e.target.id))
|
||||
me.dontCloseChat = true;
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -180,6 +183,8 @@ define([
|
|||
me.api.asc_enableKeyEvents(true);
|
||||
if (/msg-reply/.test(e.target.className))
|
||||
me.dontCloseDummyComment = false;
|
||||
else if (/chat-msg-text/.test(e.target.id))
|
||||
me.dontCloseChat = false;
|
||||
}
|
||||
}
|
||||
}).on('dragover', function(e) {
|
||||
|
@ -218,14 +223,23 @@ define([
|
|||
},
|
||||
'menu:show': function(e){
|
||||
},
|
||||
'menu:hide': function(e){
|
||||
if (!me.isModalShowed)
|
||||
'menu:hide': function(e, isFromInputControl){
|
||||
if (!me.isModalShowed && !isFromInputControl)
|
||||
me.api.asc_enableKeyEvents(true);
|
||||
},
|
||||
'edit:complete': _.bind(me.onEditComplete, me)
|
||||
});
|
||||
|
||||
this.initNames(); //for shapes
|
||||
|
||||
Common.util.Shortcuts.delegateShortcuts({
|
||||
shortcuts: {
|
||||
'command+s,ctrl+s': _.bind(function (e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
}, this)
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -574,14 +588,9 @@ define([
|
|||
if (id==Asc.c_oAscAsyncAction['Save'] || id==Asc.c_oAscAsyncAction['ForceSaveButton']) {
|
||||
if (this._state.fastCoauth && this._state.usersCount>1) {
|
||||
var me = this;
|
||||
if (me._state.timerSave===undefined)
|
||||
me._state.timerSave = setInterval(function(){
|
||||
if ((new Date()) - me._state.isSaving>500) {
|
||||
clearInterval(me._state.timerSave);
|
||||
me.getApplication().getController('Statusbar').setStatusCaption(me.textChangesSaved, false, 3000);
|
||||
me._state.timerSave = undefined;
|
||||
}
|
||||
}, 500);
|
||||
me._state.timerSave = setTimeout(function () {
|
||||
me.getApplication().getController('Statusbar').setStatusCaption(me.textChangesSaved, false, 3000);
|
||||
}, 500);
|
||||
} else
|
||||
this.getApplication().getController('Statusbar').setStatusCaption(this.textChangesSaved, false, 3000);
|
||||
} else
|
||||
|
@ -596,7 +605,7 @@ define([
|
|||
|
||||
if ( type == Asc.c_oAscAsyncActionType.BlockInteraction &&
|
||||
(!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.dontCloseChat)) ) {
|
||||
// this.onEditComplete(this.loadMask); //если делать фокус, то при принятии чужих изменений, заканчивается свой композитный ввод
|
||||
this.api.asc_enableKeyEvents(true);
|
||||
}
|
||||
|
@ -613,7 +622,7 @@ define([
|
|||
|
||||
case Asc.c_oAscAsyncAction['Save']:
|
||||
case Asc.c_oAscAsyncAction['ForceSaveButton']:
|
||||
this._state.isSaving = new Date();
|
||||
clearTimeout(this._state.timerSave);
|
||||
force = true;
|
||||
title = this.saveTitleText;
|
||||
text = this.saveTextText;
|
||||
|
@ -965,7 +974,7 @@ define([
|
|||
this.appOptions.canUseHistory = this.appOptions.canLicense && !this.appOptions.isLightVersion && this.editorConfig.canUseHistory && this.appOptions.canCoAuthoring && !this.appOptions.isDesktopApp;
|
||||
this.appOptions.canHistoryClose = this.editorConfig.canHistoryClose;
|
||||
this.appOptions.canHistoryRestore= this.editorConfig.canHistoryRestore && !!this.permissions.changeHistory;
|
||||
this.appOptions.canUseMailMerge= this.appOptions.canLicense && this.appOptions.canEdit && !this.appOptions.isDesktopApp;
|
||||
this.appOptions.canUseMailMerge= this.appOptions.canLicense && this.appOptions.canEdit && /*!this.appOptions.isDesktopApp*/ !this.appOptions.isOffline;
|
||||
this.appOptions.canSendEmailAddresses = this.appOptions.canLicense && this.editorConfig.canSendEmailAddresses && this.appOptions.canEdit && this.appOptions.canCoAuthoring;
|
||||
this.appOptions.canComments = (licType === Asc.c_oLicenseResult.Success || licType === Asc.c_oLicenseResult.SuccessLimit) && !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.comments===false);
|
||||
this.appOptions.canChat = (licType === Asc.c_oLicenseResult.Success || licType === Asc.c_oLicenseResult.SuccessLimit) && !this.appOptions.isOffline && !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.chat===false);
|
||||
|
@ -976,6 +985,7 @@ define([
|
|||
this.appOptions.canForcesave = this.appOptions.isEdit && !this.appOptions.isOffline && (typeof (this.editorConfig.customization) == 'object' && !!this.editorConfig.customization.forcesave);
|
||||
this.appOptions.forcesave = this.appOptions.canForcesave;
|
||||
this.appOptions.canEditComments= this.appOptions.isOffline || !(typeof (this.editorConfig.customization) == 'object' && this.editorConfig.customization.commentAuthorOnly);
|
||||
this.appOptions.isTrial = params.asc_getTrial();
|
||||
|
||||
var type = /^(?:(pdf|djvu|xps))$/.exec(this.document.fileType);
|
||||
this.appOptions.canDownloadOrigin = !this.appOptions.nativeApp && this.permissions.download !== false && (type && typeof type[1] === 'string');
|
||||
|
@ -988,7 +998,6 @@ define([
|
|||
if (this.appOptions.canBranding)
|
||||
headerView.setBranding(this.editorConfig.customization);
|
||||
|
||||
params.asc_getTrial() && headerView.setDeveloperMode(true);
|
||||
this.appOptions.canRename && headerView.setCanRename(true);
|
||||
|
||||
this.appOptions.canBrandingExt = params.asc_getCanBranding() && (typeof this.editorConfig.customization == 'object' || this.editorConfig.plugins);
|
||||
|
@ -1106,7 +1115,6 @@ define([
|
|||
|
||||
me.api.asc_registerCallback('asc_onDocumentModifiedChanged', _.bind(me.onDocumentModifiedChanged, me));
|
||||
me.api.asc_registerCallback('asc_onDocumentCanSaveChanged', _.bind(me.onDocumentCanSaveChanged, me));
|
||||
me.api.asc_registerCallback('asc_onSaveUrl', _.bind(me.onSaveUrl, me));
|
||||
/** coauthoring begin **/
|
||||
me.api.asc_registerCallback('asc_onCollaborativeChanges', _.bind(me.onCollaborativeChanges, me));
|
||||
me.api.asc_registerCallback('asc_OnTryUndoInFastCollaborative',_.bind(me.onTryUndoInFastCollaborative, me));
|
||||
|
@ -1259,6 +1267,10 @@ define([
|
|||
config.msg = this.errorAccessDeny;
|
||||
break;
|
||||
|
||||
case Asc.c_oAscError.ID.UplImageUrl:
|
||||
config.msg = this.errorBadImageUrl;
|
||||
break;
|
||||
|
||||
default:
|
||||
config.msg = this.errorDefaultMessage.replace('%1', id);
|
||||
break;
|
||||
|
@ -1355,33 +1367,32 @@ define([
|
|||
title = headerView.getDocumentCaption() + ' - ' + title;
|
||||
|
||||
if (isModified) {
|
||||
if (!_.isUndefined(title) && (!this._state.fastCoauth || this._state.usersCount<2 )) {
|
||||
clearTimeout(this._state.timerCaption);
|
||||
if (!_.isUndefined(title)) {
|
||||
title = '* ' + title;
|
||||
headerView.setDocumentCaption(headerView.getDocumentCaption() + '*', true);
|
||||
headerView.setDocumentCaption(headerView.getDocumentCaption(), true);
|
||||
}
|
||||
} else {
|
||||
headerView.setDocumentCaption(headerView.getDocumentCaption());
|
||||
if (this._state.fastCoauth && this._state.usersCount>1) {
|
||||
this._state.timerCaption = setTimeout(function () {
|
||||
headerView.setDocumentCaption(headerView.getDocumentCaption(), false);
|
||||
}, 500);
|
||||
} else
|
||||
headerView.setDocumentCaption(headerView.getDocumentCaption(), false);
|
||||
}
|
||||
|
||||
if (window.document.title != title)
|
||||
window.document.title = title;
|
||||
|
||||
if (!this._state.fastCoauth || this._state.usersCount<2 ) {
|
||||
Common.Gateway.setDocumentModified(isModified);
|
||||
if (isModified)
|
||||
this.getApplication().getController('Statusbar').setStatusCaption('', true);
|
||||
} else if ( this._state.startModifyDocument!==undefined && this._state.startModifyDocument === isModified){
|
||||
Common.Gateway.setDocumentModified(isModified);
|
||||
this._state.startModifyDocument = (this._state.startModifyDocument) ? !this._state.startModifyDocument : undefined;
|
||||
}
|
||||
Common.Gateway.setDocumentModified(isModified);
|
||||
if (isModified && (!this._state.fastCoauth || this._state.usersCount<2))
|
||||
this.getApplication().getController('Statusbar').setStatusCaption('', true);
|
||||
|
||||
this._state.isDocModified = isModified;
|
||||
}
|
||||
},
|
||||
|
||||
onDocumentModifiedChanged: function() {
|
||||
if (this._state.fastCoauth && this._state.usersCount>1 && this._state.startModifyDocument===undefined ) return;
|
||||
|
||||
var isModified = this.api.asc_isDocumentCanSave();
|
||||
if (this._state.isDocModified !== isModified) {
|
||||
Common.Gateway.setDocumentModified(this.api.isDocumentModified());
|
||||
|
@ -1467,10 +1478,6 @@ define([
|
|||
$('#loading-mask').hide().remove();
|
||||
},
|
||||
|
||||
onSaveUrl: function(url) {
|
||||
Common.Gateway.save(url);
|
||||
},
|
||||
|
||||
onDownloadUrl: function(url) {
|
||||
if (this._state.isFromGatewayDownloadAs)
|
||||
Common.Gateway.downloadAs(url);
|
||||
|
@ -2122,7 +2129,8 @@ define([
|
|||
errorAccessDeny: 'You are trying to perform an action you do not have rights for.<br>Please contact your Document Server administrator.',
|
||||
titleServerVersion: 'Editor updated',
|
||||
errorServerVersion: 'The editor version has been updated. The page will be reloaded to apply the changes.',
|
||||
textChangesSaved: 'All changes saved'
|
||||
textChangesSaved: 'All changes saved',
|
||||
errorBadImageUrl: 'Image url is incorrect'
|
||||
}
|
||||
})(), DE.Controllers.Main || {}))
|
||||
});
|
||||
|
|
|
@ -672,7 +672,7 @@ define([
|
|||
toolbar.mnuInsertPageNum.setDisabled(need_disable);
|
||||
}
|
||||
|
||||
need_disable = paragraph_locked || header_locked || in_header || in_equation && !btn_eq_state;
|
||||
need_disable = paragraph_locked || header_locked || in_header || in_equation && !btn_eq_state || this.api.asc_IsCursorInFootnote();
|
||||
if (need_disable != toolbar.btnInsertPageBreak.isDisabled()) {
|
||||
toolbar.btnInsertPageBreak.setDisabled(need_disable);
|
||||
}
|
||||
|
|
|
@ -166,7 +166,7 @@ define([
|
|||
|
||||
if (this._isChartStylesChanged) {
|
||||
if (rec)
|
||||
this.cmbChartStyle.fillComboView(this.cmbChartStyle.menuPicker.getSelectedRec(),true);
|
||||
this.cmbChartStyle.fillComboView(this.cmbChartStyle.menuPicker.getSelectedRec()[0],true);
|
||||
else
|
||||
this.cmbChartStyle.fillComboView(this.cmbChartStyle.menuPicker.store.at(0), true);
|
||||
}
|
||||
|
|
|
@ -2199,8 +2199,8 @@ define([
|
|||
{ caption: '--' },
|
||||
menuImageAdvanced
|
||||
]
|
||||
}).on('hide:after', function(menu) {
|
||||
me.fireEvent('editcomplete', me);
|
||||
}).on('hide:after', function(menu, e, isFromInputControl) {
|
||||
if (!isFromInputControl) me.fireEvent('editcomplete', me);
|
||||
me.currentMenu = null;
|
||||
});
|
||||
|
||||
|
@ -2767,13 +2767,13 @@ define([
|
|||
menuHyperlinkSeparator,
|
||||
menuParagraphAdvancedInTable
|
||||
]
|
||||
}).on('hide:after', function(menu) {
|
||||
}).on('hide:after', function(menu, e, isFromInputControl) {
|
||||
if (me.suppressEditComplete) {
|
||||
me.suppressEditComplete = false;
|
||||
return;
|
||||
}
|
||||
|
||||
me.fireEvent('editcomplete', me);
|
||||
if (!isFromInputControl) me.fireEvent('editcomplete', me);
|
||||
me.currentMenu = null;
|
||||
});
|
||||
|
||||
|
@ -3146,13 +3146,13 @@ define([
|
|||
menuStyleSeparator,
|
||||
menuStyle
|
||||
]
|
||||
}).on('hide:after', function(menu, e) {
|
||||
}).on('hide:after', function(menu, e, isFromInputControl) {
|
||||
if (me.suppressEditComplete) {
|
||||
me.suppressEditComplete = false;
|
||||
return;
|
||||
}
|
||||
|
||||
me.fireEvent('editcomplete', me);
|
||||
if (!isFromInputControl) me.fireEvent('editcomplete', me);
|
||||
me.currentMenu = null;
|
||||
});
|
||||
|
||||
|
@ -3178,8 +3178,8 @@ define([
|
|||
items: [
|
||||
menuEditHeaderFooter
|
||||
]
|
||||
}).on('hide:after', function(menu) {
|
||||
me.fireEvent('editcomplete', me);
|
||||
}).on('hide:after', function(menu, e, isFromInputControl) {
|
||||
if (!isFromInputControl) me.fireEvent('editcomplete', me);
|
||||
me.currentMenu = null;
|
||||
});
|
||||
|
||||
|
|
|
@ -358,6 +358,24 @@ define([
|
|||
Common.NotificationCenter.trigger('layout:changed', 'history');
|
||||
},
|
||||
|
||||
setDeveloperMode: function(mode) {
|
||||
if ( !this.$el.is(':visible') ) return;
|
||||
|
||||
if (!this.developerHint) {
|
||||
this.developerHint = $('<div id="developer-hint">' + this.txtDeveloper + '</div>').appendTo(this.$el);
|
||||
this.devHeight = this.developerHint.outerHeight();
|
||||
$(window).on('resize', _.bind(this.onWindowResize, this));
|
||||
}
|
||||
this.developerHint.toggleClass('hidden', !mode);
|
||||
|
||||
var lastbtn = this.$el.find('button.btn-category:visible:last-of-type');
|
||||
this.minDevPosition = lastbtn.offset().top - lastbtn.offsetParent().offset().top + lastbtn.height() + 20;
|
||||
this.onWindowResize();
|
||||
},
|
||||
|
||||
onWindowResize: function() {
|
||||
this.developerHint.css('top', Math.max((this.$el.height()-this.devHeight)/2, this.minDevPosition));
|
||||
},
|
||||
/** coauthoring begin **/
|
||||
tipComments : 'Comments',
|
||||
tipChat : 'Chat',
|
||||
|
@ -366,6 +384,7 @@ define([
|
|||
tipSupport : 'Feedback & Support',
|
||||
tipFile : 'File',
|
||||
tipSearch : 'Search',
|
||||
tipPlugins : 'Plugins'
|
||||
tipPlugins : 'Plugins',
|
||||
txtDeveloper: 'DEVELOPER MODE'
|
||||
}, DE.Views.LeftMenu || {}));
|
||||
});
|
||||
|
|
|
@ -457,8 +457,8 @@ define([
|
|||
this.mnuColorPicker.updateColors(Common.Utils.ThemeColor.getEffectColors(), Common.Utils.ThemeColor.getStandartColors());
|
||||
},
|
||||
|
||||
onHideMenus: function(e){
|
||||
this.fireEvent('editcomplete', this);
|
||||
onHideMenus: function(menu, e, isFromInputControl){
|
||||
if (!isFromInputControl) this.fireEvent('editcomplete', this);
|
||||
},
|
||||
|
||||
setLocked: function (locked) {
|
||||
|
|
|
@ -79,42 +79,48 @@ define([
|
|||
asctype: Common.Utils.documentSettingsType.Paragraph,
|
||||
enableToggle: true,
|
||||
disabled: true,
|
||||
toggleGroup: 'tabpanelbtnsGroup'
|
||||
toggleGroup: 'tabpanelbtnsGroup',
|
||||
allowMouseEventsOnDisabled: true
|
||||
});
|
||||
this.btnTable = new Common.UI.Button({
|
||||
hint: this.txtTableSettings,
|
||||
asctype: Common.Utils.documentSettingsType.Table,
|
||||
enableToggle: true,
|
||||
disabled: true,
|
||||
toggleGroup: 'tabpanelbtnsGroup'
|
||||
toggleGroup: 'tabpanelbtnsGroup',
|
||||
allowMouseEventsOnDisabled: true
|
||||
});
|
||||
this.btnImage = new Common.UI.Button({
|
||||
hint: this.txtImageSettings,
|
||||
asctype: Common.Utils.documentSettingsType.Image,
|
||||
enableToggle: true,
|
||||
disabled: true,
|
||||
toggleGroup: 'tabpanelbtnsGroup'
|
||||
toggleGroup: 'tabpanelbtnsGroup',
|
||||
allowMouseEventsOnDisabled: true
|
||||
});
|
||||
this.btnHeaderFooter = new Common.UI.Button({
|
||||
hint: this.txtHeaderFooterSettings,
|
||||
asctype: Common.Utils.documentSettingsType.Header,
|
||||
enableToggle: true,
|
||||
disabled: true,
|
||||
toggleGroup: 'tabpanelbtnsGroup'
|
||||
toggleGroup: 'tabpanelbtnsGroup',
|
||||
allowMouseEventsOnDisabled: true
|
||||
});
|
||||
this.btnChart = new Common.UI.Button({
|
||||
hint: this.txtChartSettings,
|
||||
asctype: Common.Utils.documentSettingsType.Chart,
|
||||
enableToggle: true,
|
||||
disabled: true,
|
||||
toggleGroup: 'tabpanelbtnsGroup'
|
||||
toggleGroup: 'tabpanelbtnsGroup',
|
||||
allowMouseEventsOnDisabled: true
|
||||
});
|
||||
this.btnShape = new Common.UI.Button({
|
||||
hint: this.txtShapeSettings,
|
||||
asctype: Common.Utils.documentSettingsType.Shape,
|
||||
enableToggle: true,
|
||||
disabled: true,
|
||||
toggleGroup: 'tabpanelbtnsGroup'
|
||||
toggleGroup: 'tabpanelbtnsGroup',
|
||||
allowMouseEventsOnDisabled: true
|
||||
});
|
||||
|
||||
this.btnTextArt = new Common.UI.Button({
|
||||
|
@ -122,7 +128,8 @@ define([
|
|||
asctype: Common.Utils.documentSettingsType.TextArt,
|
||||
enableToggle: true,
|
||||
disabled: true,
|
||||
toggleGroup: 'tabpanelbtnsGroup'
|
||||
toggleGroup: 'tabpanelbtnsGroup',
|
||||
allowMouseEventsOnDisabled: true
|
||||
});
|
||||
|
||||
this._settings = [];
|
||||
|
|
|
@ -1341,6 +1341,18 @@ define([
|
|||
this.sldrGradient.on('thumbdblclick', function(cmp){
|
||||
me.btnGradColor.cmpEl.find('button').dropdown('toggle');
|
||||
});
|
||||
this.sldrGradient.on('sortthumbs', function(cmp, recalc_indexes){
|
||||
var colors = [],
|
||||
currentIdx;
|
||||
_.each (recalc_indexes, function(recalc_index, index) {
|
||||
colors.push(me.GradColor.colors[recalc_index]);
|
||||
if (me.GradColor.currentIdx == recalc_index)
|
||||
currentIdx = index;
|
||||
});
|
||||
me.OriginalFillType = null;
|
||||
me.GradColor.colors = colors;
|
||||
me.GradColor.currentIdx = currentIdx;
|
||||
});
|
||||
this.fillControls.push(this.sldrGradient);
|
||||
|
||||
this.cmbBorderSize = new Common.UI.ComboBorderSizeEditable({
|
||||
|
|
|
@ -276,6 +276,8 @@ define([
|
|||
this.panelUsers = $('#status-users-ct', this.el);
|
||||
this.panelUsers.on('shown.bs.dropdown', function () {
|
||||
me.panelUsersList.scroller.update({minScrollbarLength : 40, alwaysVisibleY: true});
|
||||
var tip = me.panelUsersBlock.data('bs.tooltip');
|
||||
if (tip) tip.hide();
|
||||
});
|
||||
|
||||
this.panelUsersBlock = this.panelUsers.find('#status-users-block');
|
||||
|
|
|
@ -430,7 +430,7 @@ define([
|
|||
if (this._initSettings)
|
||||
this.createDelayedElements();
|
||||
|
||||
this.disableControls(this._locked);
|
||||
this.disableControls(this._locked); // need to update combodataview after disabled state
|
||||
|
||||
if (props )
|
||||
{
|
||||
|
@ -461,7 +461,7 @@ define([
|
|||
|
||||
if (this._isTemplatesChanged) {
|
||||
if (rec)
|
||||
this.cmbTableTemplate.fillComboView(this.cmbTableTemplate.menuPicker.getSelectedRec(),true);
|
||||
this.cmbTableTemplate.fillComboView(this.cmbTableTemplate.menuPicker.getSelectedRec()[0],true);
|
||||
else
|
||||
this.cmbTableTemplate.fillComboView(this.cmbTableTemplate.menuPicker.store.at(0), true);
|
||||
}
|
||||
|
|
|
@ -916,6 +916,18 @@ define([
|
|||
this.sldrGradient.on('thumbdblclick', function(cmp){
|
||||
me.btnGradColor.cmpEl.find('button').dropdown('toggle');
|
||||
});
|
||||
this.sldrGradient.on('sortthumbs', function(cmp, recalc_indexes){
|
||||
var colors = [],
|
||||
currentIdx;
|
||||
_.each (recalc_indexes, function(recalc_index, index) {
|
||||
colors.push(me.GradColor.colors[recalc_index]);
|
||||
if (me.GradColor.currentIdx == recalc_index)
|
||||
currentIdx = index;
|
||||
});
|
||||
me.OriginalFillType = null;
|
||||
me.GradColor.colors = colors;
|
||||
me.GradColor.currentIdx = currentIdx;
|
||||
});
|
||||
this.lockedControls.push(this.sldrGradient);
|
||||
|
||||
this.cmbBorderSize = new Common.UI.ComboBorderSizeEditable({
|
||||
|
|
|
@ -1206,7 +1206,9 @@ define([
|
|||
);
|
||||
if (this.mode.isDesktopApp || this.mode.canBrandingExt && this.mode.customization && this.mode.customization.header===false)
|
||||
this.mnuitemHideTitleBar.hide();
|
||||
|
||||
if (this.mode.canBrandingExt && this.mode.customization && this.mode.customization.statusBar===false)
|
||||
this.mnuitemHideStatusBar.hide();
|
||||
|
||||
this.btnMarkers.setMenu(
|
||||
new Common.UI.Menu({
|
||||
items: [
|
||||
|
|
|
@ -141,7 +141,7 @@
|
|||
"Common.Views.ExternalMergeEditor.textTitle": "Mail Merge Recipients",
|
||||
"Common.Views.Header.openNewTabText": "Open in New Tab",
|
||||
"Common.Views.Header.textBack": "Go to Documents",
|
||||
"Common.Views.Header.txtHeaderDeveloper": "DEVELOPER MODE",
|
||||
"del_Common.Views.Header.txtHeaderDeveloper": "DEVELOPER MODE",
|
||||
"Common.Views.Header.txtRename": "Rename",
|
||||
"Common.Views.History.textCloseHistory": "Close History",
|
||||
"Common.Views.History.textHide": "Collapse",
|
||||
|
@ -301,6 +301,7 @@
|
|||
"DE.Controllers.Main.titleServerVersion": "Editor updated",
|
||||
"DE.Controllers.Main.errorServerVersion": "The editor version has been updated. The page will be reloaded to apply the changes.",
|
||||
"DE.Controllers.Main.textChangesSaved": "All changes saved",
|
||||
"DE.Controllers.Main.errorBadImageUrl": "Image URL is incorrect",
|
||||
"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.zoomText": "Zoom {0}%",
|
||||
|
@ -1089,6 +1090,7 @@
|
|||
"DE.Views.LeftMenu.tipSearch": "Search",
|
||||
"DE.Views.LeftMenu.tipSupport": "Feedback & Support",
|
||||
"DE.Views.LeftMenu.tipTitles": "Titles",
|
||||
"DE.Views.LeftMenu.txtDeveloper": "DEVELOPER MODE",
|
||||
"DE.Views.MailMergeEmailDlg.cancelButtonText": "Cancel",
|
||||
"DE.Views.MailMergeEmailDlg.filePlaceholder": "PDF",
|
||||
"DE.Views.MailMergeEmailDlg.okButtonText": "Send",
|
||||
|
|
|
@ -430,3 +430,19 @@ button.notify .btn-menu-comments {background-position: -0*@toolbar-icon-size -60
|
|||
font: 12px tahoma, arial, verdana, sans-serif;
|
||||
}
|
||||
}
|
||||
|
||||
#developer-hint {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
padding: 12px 0;
|
||||
background-color: #ffb400;
|
||||
color: #6e4e00 !important;
|
||||
white-space: nowrap;
|
||||
line-height: @app-header-height;
|
||||
writing-mode: vertical-rl;
|
||||
-moz-transform: rotate(180deg);
|
||||
-ms-transform: rotate(180deg);
|
||||
-webkit-transform: rotate(180deg);
|
||||
-o-transform: rotate(180deg);
|
||||
transform: rotate(180deg);
|
||||
}
|
|
@ -394,6 +394,7 @@
|
|||
color: #ffffff;
|
||||
font: 11px arial;
|
||||
white-space: nowrap;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
|
||||
#id-toolbar-menu-auto-fontcolor > a.selected {
|
||||
|
|
|
@ -161,7 +161,7 @@ define([
|
|||
},
|
||||
|
||||
onApiShowPopMenu: function(posX, posY) {
|
||||
if ($('.popover.settings, .popup.settings, .picker-modal.settings, .modal.modal-in').length > 0) {
|
||||
if ($('.popover.settings, .popup.settings, .picker-modal.settings, .modal.modal-in, .actions-modal').length > 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -79,7 +79,6 @@ define([
|
|||
isDisconnected : false,
|
||||
usersCount : 1,
|
||||
fastCoauth : true,
|
||||
startModifyDocument : true,
|
||||
lostEditingRights : false,
|
||||
licenseWarning : false
|
||||
};
|
||||
|
@ -313,14 +312,9 @@ define([
|
|||
me.setLongActionView(action)
|
||||
} else {
|
||||
if (me._state.fastCoauth && me._state.usersCount>1 && id==Asc.c_oAscAsyncAction['Save']) {
|
||||
if (me._state.timerSave===undefined)
|
||||
me._state.timerSave = setInterval(function(){
|
||||
if ((new Date()) - me._state.isSaving>500) {
|
||||
clearInterval(me._state.timerSave);
|
||||
//console.debug('End long action');
|
||||
me._state.timerSave = undefined;
|
||||
}
|
||||
}, 500);
|
||||
// me._state.timerSave = setTimeout(function () {
|
||||
//console.debug('End long action');
|
||||
// }, 500);
|
||||
} else {
|
||||
// console.debug('End long action');
|
||||
}
|
||||
|
@ -353,7 +347,7 @@ define([
|
|||
break;
|
||||
|
||||
case Asc.c_oAscAsyncAction['Save']:
|
||||
me._state.isSaving = new Date();
|
||||
// clearTimeout(this._state.timerSave);
|
||||
title = me.saveTitleText;
|
||||
text = me.saveTextText;
|
||||
break;
|
||||
|
@ -677,7 +671,6 @@ define([
|
|||
|
||||
me.api.asc_registerCallback('asc_onDocumentModifiedChanged', _.bind(me.onDocumentModifiedChanged, me));
|
||||
me.api.asc_registerCallback('asc_onDocumentCanSaveChanged', _.bind(me.onDocumentCanSaveChanged, me));
|
||||
me.api.asc_registerCallback('asc_onSaveUrl', _.bind(me.onSaveUrl, me));
|
||||
/** coauthoring begin **/
|
||||
me.api.asc_registerCallback('asc_onCollaborativeChanges', _.bind(me.onCollaborativeChanges, me));
|
||||
me.api.asc_registerCallback('asc_OnTryUndoInFastCollaborative',_.bind(me.onTryUndoInFastCollaborative, me));
|
||||
|
@ -817,6 +810,10 @@ define([
|
|||
config.msg = this.errorConnectToServer;
|
||||
break;
|
||||
|
||||
case Asc.c_oAscError.ID.UplImageUrl:
|
||||
config.msg = this.errorBadImageUrl;
|
||||
break;
|
||||
|
||||
default:
|
||||
config.msg = this.errorDefaultMessage.replace('%1', id);
|
||||
break;
|
||||
|
@ -879,21 +876,12 @@ define([
|
|||
if (window.document.title != title)
|
||||
window.document.title = title;
|
||||
|
||||
if (!this._state.fastCoauth || this._state.usersCount<2 )
|
||||
Common.Gateway.setDocumentModified(isModified);
|
||||
else if ( this._state.startModifyDocument!==undefined && this._state.startModifyDocument === isModified){
|
||||
Common.Gateway.setDocumentModified(isModified);
|
||||
this._state.startModifyDocument = (this._state.startModifyDocument) ? !this._state.startModifyDocument : undefined;
|
||||
}
|
||||
|
||||
Common.Gateway.setDocumentModified(isModified);
|
||||
this._state.isDocModified = isModified;
|
||||
}
|
||||
},
|
||||
|
||||
onDocumentModifiedChanged: function() {
|
||||
if (this._state.fastCoauth && this._state.usersCount > 1 && this._state.startModifyDocument===undefined )
|
||||
return;
|
||||
|
||||
var isModified = this.api.asc_isDocumentCanSave();
|
||||
if (this._state.isDocModified !== isModified) {
|
||||
Common.Gateway.setDocumentModified(this.api.isDocumentModified());
|
||||
|
@ -929,10 +917,6 @@ define([
|
|||
$('#loading-mask').hide().remove();
|
||||
},
|
||||
|
||||
onSaveUrl: function(url) {
|
||||
Common.Gateway.save(url);
|
||||
},
|
||||
|
||||
onDownloadUrl: function(url) {
|
||||
if (this._state.isFromGatewayDownloadAs) {
|
||||
Common.Gateway.downloadAs(url);
|
||||
|
@ -1231,7 +1215,8 @@ define([
|
|||
textClose: 'Close',
|
||||
textDone: 'Done',
|
||||
titleServerVersion: 'Editor updated',
|
||||
errorServerVersion: 'The editor version has been updated. The page will be reloaded to apply the changes.'
|
||||
errorServerVersion: 'The editor version has been updated. The page will be reloaded to apply the changes.',
|
||||
errorBadImageUrl: 'Image url is incorrect'
|
||||
}
|
||||
})(), DE.Controllers.Main || {}))
|
||||
});
|
|
@ -117,7 +117,7 @@ define([
|
|||
text: '',
|
||||
afterText:
|
||||
'<div class="content-block">' +
|
||||
'<div class="row">' +
|
||||
'<div class="row no-gutter" style="text-align: center;">' +
|
||||
'<div class="col-50">' + me.textColumns + '</div>' +
|
||||
'<div class="col-50">' + me.textRows + '</div>' +
|
||||
'</div>' +
|
||||
|
@ -152,9 +152,12 @@ define([
|
|||
rotateEffect: true,
|
||||
value: [3, 3],
|
||||
cols: [{
|
||||
textAlign: 'left',
|
||||
textAlign: 'center',
|
||||
width: '100%',
|
||||
values: [1,2,3,4,5,6,7,8,9,10]
|
||||
}, {
|
||||
textAlign: 'center',
|
||||
width: '100%',
|
||||
values: [1,2,3,4,5,6,7,8,9,10]
|
||||
}]
|
||||
});
|
||||
|
|
|
@ -40,12 +40,13 @@
|
|||
</div>
|
||||
<div class="page" id="addimage-url">
|
||||
<div class="page-content">
|
||||
<div class="content-block-title"><%= scope.textAddress %></div>
|
||||
<% if (!android) { %><div class="content-block-title"><%= scope.textAddress %></div><% } %>
|
||||
<div class="list-block">
|
||||
<ul>
|
||||
<li>
|
||||
<div id="addimage-link-url" class="item-content">
|
||||
<div class="item-inner">
|
||||
<% if (android) { %><div class="item-title label"><%= scope.textAddress %></div><% } %>
|
||||
<div class="item-input">
|
||||
<input type="url" placeholder="<%= scope.textImageURL %>">
|
||||
</div>
|
||||
|
|
|
@ -69,6 +69,7 @@
|
|||
"DE.Controllers.Main.errorUsersExceed": "The number of users 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' to await the autosave of the document. Click 'Leave this Page' to discard all the unsaved changes.",
|
||||
"DE.Controllers.Main.errorBadImageUrl": "Image URL is incorrect",
|
||||
"DE.Controllers.Main.loadFontsTextText": "Loading data...",
|
||||
"DE.Controllers.Main.loadFontsTitleText": "Loading Data",
|
||||
"DE.Controllers.Main.loadFontTextText": "Loading data...",
|
||||
|
|
|
@ -19,9 +19,10 @@ var sdk_dev_scrpipts = [
|
|||
"../../../../sdkjs/common/AdvancedOptions.js",
|
||||
"../../../../sdkjs/common/FontsFreeType/font_engine.js",
|
||||
"../../../../sdkjs/common/FontsFreeType/FontFile.js",
|
||||
"../../../../sdkjs/common/FontsFreeType/font_map.js",
|
||||
"../../../../sdkjs/common/FontsFreeType/font_map.js",
|
||||
"../../../../sdkjs/common/FontsFreeType/FontManager.js",
|
||||
"../../../../sdkjs/word/Editor/FontClassification.js",
|
||||
"../../../../sdkjs/common/FontsFreeType/character.js",
|
||||
"../../../../sdkjs/common/Drawings/Metafile.js",
|
||||
"../../../../sdkjs/common/FontsFreeType/TextMeasurer.js",
|
||||
"../../../../sdkjs/common/Drawings/WorkEvents.js",
|
||||
|
@ -86,10 +87,13 @@ var sdk_dev_scrpipts = [
|
|||
"../../../../sdkjs/word/Editor/GraphicObjects/GraphicPage.js",
|
||||
"../../../../sdkjs/word/Editor/GraphicObjects/WrapManager.js",
|
||||
"../../../../sdkjs/word/Editor/CollaborativeEditing.js",
|
||||
"../../../../sdkjs/word/Editor/DocumentContentElementBase.js",
|
||||
"../../../../sdkjs/word/Editor/StructuredDocumentTags/BlockLevel.js",
|
||||
"../../../../sdkjs/word/Editor/Comments.js",
|
||||
"../../../../sdkjs/word/Editor/CommentsChanges.js",
|
||||
"../../../../sdkjs/word/Editor/Styles.js",
|
||||
"../../../../sdkjs/word/Editor/StylesChanges.js",
|
||||
"../../../../sdkjs/word/Editor/RevisionsChange.js",
|
||||
"../../../../sdkjs/word/Editor/ParagraphContent.js",
|
||||
"../../../../sdkjs/word/Editor/Paragraph/ParaTextPr.js",
|
||||
"../../../../sdkjs/word/Editor/Paragraph/ParaTextPrChanges.js",
|
||||
|
|
|
@ -166,6 +166,7 @@ define([
|
|||
this.leftMenu.btnChat.hide();
|
||||
this.leftMenu.btnComments.hide();
|
||||
}
|
||||
this.mode.isTrial && this.leftMenu.setDeveloperMode(true);
|
||||
/** coauthoring end **/
|
||||
Common.util.Shortcuts.resumeEvents();
|
||||
this.leftMenu.btnThumbs.toggle(true);
|
||||
|
@ -178,6 +179,7 @@ define([
|
|||
this.leftMenu.setOptionsPanel('plugins', this.getApplication().getController('Common.Controllers.Plugins').getView('Common.Views.Plugins'));
|
||||
} else
|
||||
this.leftMenu.btnPlugins.hide();
|
||||
this.mode.isTrial && this.leftMenu.setDeveloperMode(true);
|
||||
},
|
||||
|
||||
clickMenuFileItem: function(menu, action, isopts) {
|
||||
|
|
|
@ -69,7 +69,8 @@ define([
|
|||
toolbar: '#viewport #toolbar',
|
||||
leftMenu: '#viewport #left-menu, #viewport #id-toolbar-full-placeholder-btn-settings, #viewport #id-toolbar-short-placeholder-btn-settings',
|
||||
rightMenu: '#viewport #right-menu',
|
||||
header: '#viewport #header'
|
||||
header: '#viewport #header',
|
||||
statusBar: '#statusbar'
|
||||
};
|
||||
|
||||
Common.localStorage.setId('presentation');
|
||||
|
@ -97,7 +98,7 @@ define([
|
|||
onLaunch: function() {
|
||||
var me = this;
|
||||
|
||||
this._state = {isDisconnected: false, usersCount: 1, fastCoauth: true, startModifyDocument: true, lostEditingRights: false, licenseWarning: false};
|
||||
this._state = {isDisconnected: false, usersCount: 1, fastCoauth: true, lostEditingRights: false, licenseWarning: false};
|
||||
|
||||
window.storagename = 'presentation';
|
||||
|
||||
|
@ -158,6 +159,8 @@ define([
|
|||
if (!/area_id/.test(e.target.id)) {
|
||||
if (/msg-reply/.test(e.target.className))
|
||||
me.dontCloseDummyComment = true;
|
||||
else if (/chat-msg-text/.test(e.target.id))
|
||||
me.dontCloseChat = true;
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -170,6 +173,8 @@ define([
|
|||
me.api.asc_enableKeyEvents(true);
|
||||
if (/msg-reply/.test(e.target.className))
|
||||
me.dontCloseDummyComment = false;
|
||||
else if (/chat-msg-text/.test(e.target.id))
|
||||
me.dontCloseChat = false;
|
||||
}
|
||||
}
|
||||
}).on('dragover', function(e) {
|
||||
|
@ -208,14 +213,22 @@ define([
|
|||
},
|
||||
'menu:show': function(e){
|
||||
},
|
||||
'menu:hide': function(e){
|
||||
if (!me.isModalShowed)
|
||||
'menu:hide': function(e, isFromInputControl){
|
||||
if (!me.isModalShowed && !isFromInputControl)
|
||||
me.api.asc_enableKeyEvents(true);
|
||||
},
|
||||
'edit:complete': _.bind(me.onEditComplete, me)
|
||||
});
|
||||
|
||||
this.initNames();
|
||||
Common.util.Shortcuts.delegateShortcuts({
|
||||
shortcuts: {
|
||||
'command+s,ctrl+s': _.bind(function (e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
}, this)
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -388,14 +401,9 @@ define([
|
|||
if (id==Asc.c_oAscAsyncAction['Save'] || id==Asc.c_oAscAsyncAction['ForceSaveButton']) {
|
||||
if (this._state.fastCoauth && this._state.usersCount>1) {
|
||||
var me = this;
|
||||
if (me._state.timerSave===undefined)
|
||||
me._state.timerSave = setInterval(function(){
|
||||
if ((new Date()) - me._state.isSaving>500) {
|
||||
clearInterval(me._state.timerSave);
|
||||
me.getApplication().getController('Statusbar').setStatusCaption(me.textChangesSaved, false, 3000);
|
||||
me._state.timerSave = undefined;
|
||||
}
|
||||
}, 500);
|
||||
me._state.timerSave = setTimeout(function () {
|
||||
me.getApplication().getController('Statusbar').setStatusCaption(me.textChangesSaved, false, 3000);
|
||||
}, 500);
|
||||
} else
|
||||
this.getApplication().getController('Statusbar').setStatusCaption(this.textChangesSaved, false, 3000);
|
||||
} else
|
||||
|
@ -408,7 +416,7 @@ define([
|
|||
if ((id==Asc.c_oAscAsyncAction['Save'] || id==Asc.c_oAscAsyncAction['ForceSaveButton']) && (!this._state.fastCoauth || this._state.usersCount<2))
|
||||
this.synchronizeChanges();
|
||||
|
||||
if (type == Asc.c_oAscAsyncActionType.BlockInteraction && !((id == Asc.c_oAscAsyncAction['LoadDocumentFonts'] || id == Asc.c_oAscAsyncAction['ApplyChanges']) && this.dontCloseDummyComment )) {
|
||||
if (type == Asc.c_oAscAsyncActionType.BlockInteraction && !((id == Asc.c_oAscAsyncAction['LoadDocumentFonts'] || id == Asc.c_oAscAsyncAction['ApplyChanges']) && (this.dontCloseDummyComment || this.dontCloseChat))) {
|
||||
this.onEditComplete(this.loadMask);
|
||||
this.api.asc_enableKeyEvents(true);
|
||||
}
|
||||
|
@ -425,7 +433,7 @@ define([
|
|||
|
||||
case Asc.c_oAscAsyncAction['Save']:
|
||||
case Asc.c_oAscAsyncAction['ForceSaveButton']:
|
||||
this._state.isSaving = new Date();
|
||||
clearTimeout(this._state.timerSave);
|
||||
force = true;
|
||||
title = this.saveTitleText;
|
||||
text = this.saveTextText;
|
||||
|
@ -742,6 +750,7 @@ define([
|
|||
this.appOptions.canForcesave = this.appOptions.isEdit && !this.appOptions.isOffline && (typeof (this.editorConfig.customization) == 'object' && !!this.editorConfig.customization.forcesave);
|
||||
this.appOptions.forcesave = this.appOptions.canForcesave;
|
||||
this.appOptions.canEditComments= this.appOptions.isOffline || !(typeof (this.editorConfig.customization) == 'object' && this.editorConfig.customization.commentAuthorOnly);
|
||||
this.appOptions.isTrial = params.asc_getTrial();
|
||||
|
||||
this._state.licenseWarning = (licType===Asc.c_oLicenseResult.Connections) && this.appOptions.canEdit && this.editorConfig.mode !== 'view';
|
||||
|
||||
|
@ -750,7 +759,6 @@ define([
|
|||
if (this.appOptions.canBranding)
|
||||
headerView.setBranding(this.editorConfig.customization);
|
||||
|
||||
params.asc_getTrial() && headerView.setDeveloperMode(true);
|
||||
this.appOptions.canRename && headerView.setCanRename(true);
|
||||
|
||||
this.appOptions.canBrandingExt = params.asc_getCanBranding() && (typeof this.editorConfig.customization == 'object' || this.editorConfig.plugins);
|
||||
|
@ -866,7 +874,6 @@ define([
|
|||
me.api.asc_registerCallback('asc_onChangeObjectLock', _.bind(me._onChangeObjectLock, me));
|
||||
me.api.asc_registerCallback('asc_onDocumentModifiedChanged', _.bind(me.onDocumentModifiedChanged, me));
|
||||
me.api.asc_registerCallback('asc_onDocumentCanSaveChanged', _.bind(me.onDocumentCanSaveChanged, me));
|
||||
me.api.asc_registerCallback('asc_onSaveUrl', _.bind(me.onSaveUrl, me));
|
||||
/** coauthoring begin **/
|
||||
me.api.asc_registerCallback('asc_onCollaborativeChanges', _.bind(me.onCollaborativeChanges, me));
|
||||
me.api.asc_registerCallback('asc_OnTryUndoInFastCollaborative',_.bind(me.onTryUndoInFastCollaborative, me));
|
||||
|
@ -1011,6 +1018,10 @@ define([
|
|||
config.msg = this.errorAccessDeny;
|
||||
break;
|
||||
|
||||
case Asc.c_oAscError.ID.UplImageUrl:
|
||||
config.msg = this.errorBadImageUrl;
|
||||
break;
|
||||
|
||||
default:
|
||||
config.msg = this.errorDefaultMessage.replace('%1', id);
|
||||
break;
|
||||
|
@ -1110,25 +1121,26 @@ define([
|
|||
title = headerView.getDocumentCaption() + ' - ' + title;
|
||||
|
||||
if (isModified) {
|
||||
if (!_.isUndefined(title) && (!this._state.fastCoauth || this._state.usersCount<2 )) {
|
||||
clearTimeout(this._state.timerCaption);
|
||||
if (!_.isUndefined(title)) {
|
||||
title = '* ' + title;
|
||||
headerView.setDocumentCaption(headerView.getDocumentCaption() + '*', true);
|
||||
headerView.setDocumentCaption(headerView.getDocumentCaption(), true);
|
||||
}
|
||||
} else {
|
||||
headerView.setDocumentCaption(headerView.getDocumentCaption());
|
||||
if (this._state.fastCoauth && this._state.usersCount>1) {
|
||||
this._state.timerCaption = setTimeout(function () {
|
||||
headerView.setDocumentCaption(headerView.getDocumentCaption(), false);
|
||||
}, 500);
|
||||
} else
|
||||
headerView.setDocumentCaption(headerView.getDocumentCaption(), false);
|
||||
}
|
||||
|
||||
if (window.document.title != title)
|
||||
window.document.title = title;
|
||||
|
||||
if (!this._state.fastCoauth || this._state.usersCount<2 ) {
|
||||
Common.Gateway.setDocumentModified(isModified);
|
||||
if (isModified)
|
||||
this.getApplication().getController('Statusbar').setStatusCaption('', true);
|
||||
} else if ( this._state.startModifyDocument!==undefined && this._state.startModifyDocument === isModified){
|
||||
Common.Gateway.setDocumentModified(isModified);
|
||||
this._state.startModifyDocument = (this._state.startModifyDocument) ? !this._state.startModifyDocument : undefined;
|
||||
}
|
||||
Common.Gateway.setDocumentModified(isModified);
|
||||
if (isModified && (!this._state.fastCoauth || this._state.usersCount<2))
|
||||
this.getApplication().getController('Statusbar').setStatusCaption('', true);
|
||||
|
||||
this._state.isDocModified = isModified;
|
||||
}
|
||||
|
@ -1138,8 +1150,6 @@ define([
|
|||
},
|
||||
|
||||
onDocumentModifiedChanged: function() {
|
||||
if (this._state.fastCoauth && this._state.usersCount>1 && this._state.startModifyDocument===undefined ) return;
|
||||
|
||||
var isModified = this.api.asc_isDocumentCanSave();
|
||||
if (this._state.isDocModified !== isModified) {
|
||||
Common.Gateway.setDocumentModified(this.api.isDocumentModified());
|
||||
|
@ -1217,10 +1227,6 @@ define([
|
|||
$('#loading-mask').hide().remove();
|
||||
},
|
||||
|
||||
onSaveUrl: function(url) {
|
||||
Common.Gateway.save(url);
|
||||
},
|
||||
|
||||
onDownloadUrl: function(url) {
|
||||
Common.Gateway.downloadAs(url);
|
||||
},
|
||||
|
@ -1911,7 +1917,8 @@ define([
|
|||
errorAccessDeny: 'You are trying to perform an action you do not have rights for.<br>Please contact your Document Server administrator.',
|
||||
titleServerVersion: 'Editor updated',
|
||||
errorServerVersion: 'The editor version has been updated. The page will be reloaded to apply the changes.',
|
||||
textChangesSaved: 'All changes saved'
|
||||
textChangesSaved: 'All changes saved',
|
||||
errorBadImageUrl: 'Image url is incorrect'
|
||||
}
|
||||
})(), PE.Controllers.Main || {}))
|
||||
});
|
||||
|
|
|
@ -697,11 +697,11 @@ define([
|
|||
},
|
||||
|
||||
onApiLockDocumentTheme: function() {
|
||||
this.toolbar.lockToolbar(PE.enumLock.themeLock, true, {array: [this.toolbar.btnColorSchemas]});
|
||||
this.toolbar.lockToolbar(PE.enumLock.themeLock, true, {array: [this.toolbar.btnColorSchemas, this.toolbar.listTheme]});
|
||||
},
|
||||
|
||||
onApiUnLockDocumentTheme: function() {
|
||||
this.toolbar.lockToolbar(PE.enumLock.themeLock, false, {array: [this.toolbar.btnColorSchemas]});
|
||||
this.toolbar.lockToolbar(PE.enumLock.themeLock, false, {array: [this.toolbar.btnColorSchemas, this.toolbar.listTheme]});
|
||||
},
|
||||
|
||||
onApiCoAuthoringDisconnect: function(disableDownload) {
|
||||
|
@ -872,7 +872,7 @@ define([
|
|||
if (this.api && this.api.asc_isDocumentCanSave) {
|
||||
var isModified = this.api.asc_isDocumentCanSave();
|
||||
var isSyncButton = $('.btn-icon', this.toolbar.btnSave.cmpEl).hasClass('btn-synch');
|
||||
if (!isModified && !isSyncButton)
|
||||
if (!isModified && !isSyncButton && !this.toolbar.mode.forcesave)
|
||||
return;
|
||||
|
||||
this.api.asc_Save();
|
||||
|
|
|
@ -149,7 +149,7 @@ define([
|
|||
|
||||
if (this._isChartStylesChanged) {
|
||||
if (rec)
|
||||
this.cmbChartStyle.fillComboView(this.cmbChartStyle.menuPicker.getSelectedRec(),true);
|
||||
this.cmbChartStyle.fillComboView(this.cmbChartStyle.menuPicker.getSelectedRec()[0],true);
|
||||
else
|
||||
this.cmbChartStyle.fillComboView(this.cmbChartStyle.menuPicker.store.at(0), true);
|
||||
}
|
||||
|
|
|
@ -1683,13 +1683,13 @@ define([
|
|||
{caption: '--'},
|
||||
mnuPreview
|
||||
]
|
||||
}).on('hide:after', function(menu) {
|
||||
}).on('hide:after', function(menu, e, isFromInputControl) {
|
||||
if (me.suppressEditComplete) {
|
||||
me.suppressEditComplete = false;
|
||||
return;
|
||||
}
|
||||
|
||||
me.fireEvent('editcomplete', me);
|
||||
if (!isFromInputControl) me.fireEvent('editcomplete', me);
|
||||
me.currentMenu = null;
|
||||
}).on('render:after', function(cmp) {
|
||||
me.slideLayoutMenu = new Common.UI.DataView({
|
||||
|
@ -2425,13 +2425,13 @@ define([
|
|||
menuAddHyperlinkPara,
|
||||
menuHyperlinkPara
|
||||
]
|
||||
}).on('hide:after', function(menu) {
|
||||
}).on('hide:after', function(menu, e, isFromInputControl) {
|
||||
if (me.suppressEditComplete) {
|
||||
me.suppressEditComplete = false;
|
||||
return;
|
||||
}
|
||||
|
||||
me.fireEvent('editcomplete', me);
|
||||
if (!isFromInputControl) me.fireEvent('editcomplete', me);
|
||||
me.currentMenu = null;
|
||||
});
|
||||
|
||||
|
@ -2591,13 +2591,13 @@ define([
|
|||
menuAddHyperlinkTable,
|
||||
menuHyperlinkTable
|
||||
]
|
||||
}).on('hide:after', function(menu) {
|
||||
}).on('hide:after', function(menu, e, isFromInputControl) {
|
||||
if (me.suppressEditComplete) {
|
||||
me.suppressEditComplete = false;
|
||||
return;
|
||||
}
|
||||
|
||||
me.fireEvent('editcomplete', me);
|
||||
if (!isFromInputControl) me.fireEvent('editcomplete', me);
|
||||
me.currentMenu = null;
|
||||
});
|
||||
|
||||
|
@ -2654,13 +2654,13 @@ define([
|
|||
menuAddCommentImg
|
||||
/** coauthoring end **/
|
||||
]
|
||||
}).on('hide:after', function(menu) {
|
||||
}).on('hide:after', function(menu, e, isFromInputControl) {
|
||||
if (me.suppressEditComplete) {
|
||||
me.suppressEditComplete = false;
|
||||
return;
|
||||
}
|
||||
|
||||
me.fireEvent('editcomplete', me);
|
||||
if (!isFromInputControl) me.fireEvent('editcomplete', me);
|
||||
me.currentMenu = null;
|
||||
});
|
||||
|
||||
|
|
|
@ -373,6 +373,25 @@ define([
|
|||
return this;
|
||||
},
|
||||
|
||||
setDeveloperMode: function(mode) {
|
||||
if ( !this.$el.is(':visible') ) return;
|
||||
|
||||
if (!this.developerHint) {
|
||||
this.developerHint = $('<div id="developer-hint">' + this.txtDeveloper + '</div>').appendTo(this.$el);
|
||||
this.devHeight = this.developerHint.outerHeight();
|
||||
$(window).on('resize', _.bind(this.onWindowResize, this));
|
||||
}
|
||||
this.developerHint.toggleClass('hidden', !mode);
|
||||
|
||||
var lastbtn = this.$el.find('button.btn-category:visible:last-of-type');
|
||||
this.minDevPosition = lastbtn.offset().top - lastbtn.offsetParent().offset().top + lastbtn.height() + 20;
|
||||
this.onWindowResize();
|
||||
},
|
||||
|
||||
onWindowResize: function() {
|
||||
this.developerHint.css('top', Math.max((this.$el.height()-this.devHeight)/2, this.minDevPosition));
|
||||
},
|
||||
|
||||
/** coauthoring begin **/
|
||||
tipComments : 'Comments',
|
||||
tipChat : 'Chat',
|
||||
|
@ -382,6 +401,7 @@ define([
|
|||
tipFile : 'File',
|
||||
tipSearch : 'Search',
|
||||
tipSlides: 'Slides',
|
||||
tipPlugins : 'Plugins'
|
||||
tipPlugins : 'Plugins',
|
||||
txtDeveloper: 'DEVELOPER MODE'
|
||||
}, PE.Views.LeftMenu || {}));
|
||||
});
|
||||
|
|
|
@ -355,8 +355,8 @@ define([
|
|||
}
|
||||
},
|
||||
|
||||
onHideMenus: function(e){
|
||||
this.fireEvent('editcomplete', this);
|
||||
onHideMenus: function(menu, e, isFromInputControl){
|
||||
if (!isFromInputControl) this.fireEvent('editcomplete', this);
|
||||
},
|
||||
|
||||
setLocked: function (locked) {
|
||||
|
|
|
@ -78,42 +78,48 @@ define([
|
|||
asctype: Common.Utils.documentSettingsType.Paragraph,
|
||||
enableToggle: true,
|
||||
disabled: true,
|
||||
toggleGroup: 'tabpanelbtnsGroup'
|
||||
toggleGroup: 'tabpanelbtnsGroup',
|
||||
allowMouseEventsOnDisabled: true
|
||||
});
|
||||
this.btnTable = new Common.UI.Button({
|
||||
hint: this.txtTableSettings,
|
||||
asctype: Common.Utils.documentSettingsType.Table,
|
||||
enableToggle: true,
|
||||
disabled: true,
|
||||
toggleGroup: 'tabpanelbtnsGroup'
|
||||
toggleGroup: 'tabpanelbtnsGroup',
|
||||
allowMouseEventsOnDisabled: true
|
||||
});
|
||||
this.btnImage = new Common.UI.Button({
|
||||
hint: this.txtImageSettings,
|
||||
asctype: Common.Utils.documentSettingsType.Image,
|
||||
enableToggle: true,
|
||||
disabled: true,
|
||||
toggleGroup: 'tabpanelbtnsGroup'
|
||||
toggleGroup: 'tabpanelbtnsGroup',
|
||||
allowMouseEventsOnDisabled: true
|
||||
});
|
||||
this.btnSlide = new Common.UI.Button({
|
||||
hint: this.txtSlideSettings,
|
||||
asctype: Common.Utils.documentSettingsType.Slide,
|
||||
enableToggle: true,
|
||||
disabled: true,
|
||||
toggleGroup: 'tabpanelbtnsGroup'
|
||||
toggleGroup: 'tabpanelbtnsGroup',
|
||||
allowMouseEventsOnDisabled: true
|
||||
});
|
||||
this.btnChart = new Common.UI.Button({
|
||||
hint: this.txtChartSettings,
|
||||
asctype: Common.Utils.documentSettingsType.Chart,
|
||||
enableToggle: true,
|
||||
disabled: true,
|
||||
toggleGroup: 'tabpanelbtnsGroup'
|
||||
toggleGroup: 'tabpanelbtnsGroup',
|
||||
allowMouseEventsOnDisabled: true
|
||||
});
|
||||
this.btnShape = new Common.UI.Button({
|
||||
hint: this.txtShapeSettings,
|
||||
asctype: Common.Utils.documentSettingsType.Shape,
|
||||
enableToggle: true,
|
||||
disabled: true,
|
||||
toggleGroup: 'tabpanelbtnsGroup'
|
||||
toggleGroup: 'tabpanelbtnsGroup',
|
||||
allowMouseEventsOnDisabled: true
|
||||
});
|
||||
|
||||
this.btnTextArt = new Common.UI.Button({
|
||||
|
@ -121,7 +127,8 @@ define([
|
|||
asctype: Common.Utils.documentSettingsType.TextArt,
|
||||
enableToggle: true,
|
||||
disabled: true,
|
||||
toggleGroup: 'tabpanelbtnsGroup'
|
||||
toggleGroup: 'tabpanelbtnsGroup',
|
||||
allowMouseEventsOnDisabled: true
|
||||
});
|
||||
|
||||
this._settings = [];
|
||||
|
|
|
@ -1234,6 +1234,18 @@ define([
|
|||
this.sldrGradient.on('thumbdblclick', function(cmp){
|
||||
me.btnGradColor.cmpEl.find('button').dropdown('toggle');
|
||||
});
|
||||
this.sldrGradient.on('sortthumbs', function(cmp, recalc_indexes){
|
||||
var colors = [],
|
||||
currentIdx;
|
||||
_.each (recalc_indexes, function(recalc_index, index) {
|
||||
colors.push(me.GradColor.colors[recalc_index]);
|
||||
if (me.GradColor.currentIdx == recalc_index)
|
||||
currentIdx = index;
|
||||
});
|
||||
me.OriginalFillType = null;
|
||||
me.GradColor.colors = colors;
|
||||
me.GradColor.currentIdx = currentIdx;
|
||||
});
|
||||
this.fillControls.push(this.sldrGradient);
|
||||
|
||||
this.cmbBorderSize = new Common.UI.ComboBorderSizeEditable({
|
||||
|
|
|
@ -755,6 +755,18 @@ define([
|
|||
this.sldrGradient.on('thumbdblclick', function(cmp){
|
||||
me.btnGradColor.cmpEl.find('button').dropdown('toggle');
|
||||
});
|
||||
this.sldrGradient.on('sortthumbs', function(cmp, recalc_indexes){
|
||||
var colors = [],
|
||||
currentIdx;
|
||||
_.each (recalc_indexes, function(recalc_index, index) {
|
||||
colors.push(me.GradColor.colors[recalc_index]);
|
||||
if (me.GradColor.currentIdx == recalc_index)
|
||||
currentIdx = index;
|
||||
});
|
||||
me.OriginalFillType = null;
|
||||
me.GradColor.colors = colors;
|
||||
me.GradColor.currentIdx = currentIdx;
|
||||
});
|
||||
this.FillItems.push(this.sldrGradient);
|
||||
|
||||
},
|
||||
|
|
|
@ -175,6 +175,8 @@ define([
|
|||
this.panelUsers = $('#status-users-ct', this.el);
|
||||
this.panelUsers.on('shown.bs.dropdown', function () {
|
||||
me.panelUsersList.scroller.update({minScrollbarLength : 40, alwaysVisibleY: true});
|
||||
var tip = me.panelUsersBlock.data('bs.tooltip');
|
||||
if (tip) tip.hide();
|
||||
});
|
||||
|
||||
this.panelUsersBlock = this.panelUsers.find('#status-users-block');
|
||||
|
|
|
@ -357,7 +357,7 @@ define([
|
|||
if (this._initSettings)
|
||||
this.createDelayedElements();
|
||||
|
||||
this.disableControls(this._locked);
|
||||
this.disableControls(this._locked); // need to update combodataview after disabled state
|
||||
|
||||
if (props )
|
||||
{
|
||||
|
@ -376,7 +376,7 @@ define([
|
|||
|
||||
if (this._isTemplatesChanged) {
|
||||
if (rec)
|
||||
this.cmbTableTemplate.fillComboView(this.cmbTableTemplate.menuPicker.getSelectedRec(),true);
|
||||
this.cmbTableTemplate.fillComboView(this.cmbTableTemplate.menuPicker.getSelectedRec()[0],true);
|
||||
else
|
||||
this.cmbTableTemplate.fillComboView(this.cmbTableTemplate.menuPicker.store.at(0), true);
|
||||
}
|
||||
|
|
|
@ -1224,6 +1224,18 @@ define([
|
|||
this.sldrGradient.on('thumbdblclick', function(cmp){
|
||||
me.btnGradColor.cmpEl.find('button').dropdown('toggle');
|
||||
});
|
||||
this.sldrGradient.on('sortthumbs', function(cmp, recalc_indexes){
|
||||
var colors = [],
|
||||
currentIdx;
|
||||
_.each (recalc_indexes, function(recalc_index, index) {
|
||||
colors.push(me.GradColor.colors[recalc_index]);
|
||||
if (me.GradColor.currentIdx == recalc_index)
|
||||
currentIdx = index;
|
||||
});
|
||||
me.OriginalFillType = null;
|
||||
me.GradColor.colors = colors;
|
||||
me.GradColor.currentIdx = currentIdx;
|
||||
});
|
||||
this.lockedControls.push(this.sldrGradient);
|
||||
|
||||
this.cmbBorderSize = new Common.UI.ComboBorderSizeEditable({
|
||||
|
|
|
@ -855,7 +855,7 @@ define([
|
|||
enableKeyEvents: true,
|
||||
itemHeight : 38,
|
||||
hint: this.tipSlideTheme,
|
||||
lock: [_set.lostConnect, _set.noSlides],
|
||||
lock: [_set.themeLock, _set.lostConnect, _set.noSlides],
|
||||
beforeOpenHandler: function(e) {
|
||||
var cmp = this,
|
||||
menu = cmp.openButton.menu,
|
||||
|
@ -1159,6 +1159,8 @@ define([
|
|||
);
|
||||
if (this.mode.isDesktopApp || this.mode.canBrandingExt && this.mode.customization && this.mode.customization.header===false)
|
||||
this.mnuitemHideTitleBar.hide();
|
||||
if (this.mode.canBrandingExt && this.mode.customization && this.mode.customization.statusBar===false)
|
||||
this.mnuitemHideStatusBar.hide();
|
||||
|
||||
this.mnuZoomOut = new Common.UI.Button({
|
||||
el : $('#id-menu-zoom-out'),
|
||||
|
|
|
@ -80,7 +80,7 @@
|
|||
"Common.Views.ExternalDiagramEditor.textTitle": "Chart Editor",
|
||||
"Common.Views.Header.openNewTabText": "Open in New Tab",
|
||||
"Common.Views.Header.textBack": "Go to Documents",
|
||||
"Common.Views.Header.txtHeaderDeveloper": "DEVELOPER MODE",
|
||||
"del_Common.Views.Header.txtHeaderDeveloper": "DEVELOPER MODE",
|
||||
"Common.Views.Header.txtRename": "Rename",
|
||||
"Common.Views.ImageFromUrlDialog.cancelButtonText": "Cancel",
|
||||
"Common.Views.ImageFromUrlDialog.okButtonText": "OK",
|
||||
|
@ -248,6 +248,7 @@
|
|||
"PE.Controllers.Main.titleServerVersion": "Editor updated",
|
||||
"PE.Controllers.Main.errorServerVersion": "The editor version has been updated. The page will be reloaded to apply the changes.",
|
||||
"PE.Controllers.Main.textChangesSaved": "All changes saved",
|
||||
"PE.Controllers.Main.errorBadImageUrl": "Image URL is incorrect",
|
||||
"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.textAccent": "Accents",
|
||||
|
@ -875,6 +876,7 @@
|
|||
"PE.Views.LeftMenu.tipSlides": "Slides",
|
||||
"PE.Views.LeftMenu.tipSupport": "Feedback & Support",
|
||||
"PE.Views.LeftMenu.tipTitles": "Titles",
|
||||
"PE.Views.LeftMenu.txtDeveloper": "DEVELOPER MODE",
|
||||
"PE.Views.ParagraphSettings.strLineHeight": "Line Spacing",
|
||||
"PE.Views.ParagraphSettings.strParagraphSpacing": "Paragraph Spacing",
|
||||
"PE.Views.ParagraphSettings.strSpacingAfter": "After",
|
||||
|
|
|
@ -451,4 +451,20 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#developer-hint {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
padding: 12px 0;
|
||||
background-color: #ffb400;
|
||||
color: #6e4e00 !important;
|
||||
white-space: nowrap;
|
||||
line-height: @app-header-height;
|
||||
writing-mode: vertical-rl;
|
||||
-moz-transform: rotate(180deg);
|
||||
-ms-transform: rotate(180deg);
|
||||
-webkit-transform: rotate(180deg);
|
||||
-o-transform: rotate(180deg);
|
||||
transform: rotate(180deg);
|
||||
}
|
|
@ -386,6 +386,7 @@
|
|||
color: #ffffff;
|
||||
font: 11px arial;
|
||||
white-space: nowrap;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
|
||||
.item-equation {
|
||||
|
|
|
@ -163,7 +163,7 @@ define([
|
|||
},
|
||||
|
||||
onApiShowPopMenu: function(posX, posY) {
|
||||
if (_isPopMenuHidden || $('.popover.settings, .popup.settings, .picker-modal.settings, .modal-in').length > 0)
|
||||
if (_isPopMenuHidden || $('.popover.settings, .popup.settings, .picker-modal.settings, .modal-in, .actions-modal').length > 0)
|
||||
return;
|
||||
|
||||
var me = this,
|
||||
|
@ -193,7 +193,7 @@ define([
|
|||
newDocumentPage.focus();
|
||||
}
|
||||
} else
|
||||
this.api.openInternalLink(url);
|
||||
this.api.asc_GoToInternalHyperlink(url);
|
||||
},
|
||||
|
||||
_initMenu: function (stack) {
|
||||
|
|
|
@ -79,7 +79,6 @@ define([
|
|||
isDisconnected : false,
|
||||
usersCount : 1,
|
||||
fastCoauth : true,
|
||||
startModifyDocument : true,
|
||||
lostEditingRights : false,
|
||||
licenseWarning : false
|
||||
};
|
||||
|
@ -303,14 +302,9 @@ define([
|
|||
me.setLongActionView(action)
|
||||
} else {
|
||||
if (me._state.fastCoauth && me._state.usersCount>1 && id==Asc.c_oAscAsyncAction['Save']) {
|
||||
if (me._state.timerSave===undefined)
|
||||
me._state.timerSave = setInterval(function(){
|
||||
if ((new Date()) - me._state.isSaving>500) {
|
||||
clearInterval(me._state.timerSave);
|
||||
//console.debug('End long action');
|
||||
me._state.timerSave = undefined;
|
||||
}
|
||||
}, 500);
|
||||
// me._state.timerSave = setTimeout(function () {
|
||||
//console.debug('End long action');
|
||||
// }, 500);
|
||||
} else {
|
||||
// console.debug('End long action');
|
||||
}
|
||||
|
@ -343,7 +337,7 @@ define([
|
|||
break;
|
||||
|
||||
case Asc.c_oAscAsyncAction['Save']:
|
||||
me._state.isSaving = new Date();
|
||||
// clearTimeout(me._state.timerSave);
|
||||
title = me.saveTitleText;
|
||||
text = me.saveTextText;
|
||||
break;
|
||||
|
@ -637,7 +631,6 @@ define([
|
|||
me.api.asc_registerCallback('asc_onChangeObjectLock', _.bind(me._onChangeObjectLock, me));
|
||||
me.api.asc_registerCallback('asc_onDocumentModifiedChanged', _.bind(me.onDocumentModifiedChanged, me));
|
||||
me.api.asc_registerCallback('asc_onDocumentCanSaveChanged', _.bind(me.onDocumentCanSaveChanged, me));
|
||||
me.api.asc_registerCallback('asc_onSaveUrl', _.bind(me.onSaveUrl, me));
|
||||
/** coauthoring begin **/
|
||||
me.api.asc_registerCallback('asc_onCollaborativeChanges', _.bind(me.onCollaborativeChanges, me));
|
||||
me.api.asc_registerCallback('asc_OnTryUndoInFastCollaborative',_.bind(me.onTryUndoInFastCollaborative, me));
|
||||
|
@ -769,6 +762,10 @@ define([
|
|||
config.msg = this.errorConnectToServer;
|
||||
break;
|
||||
|
||||
case Asc.c_oAscError.ID.UplImageUrl:
|
||||
config.msg = this.errorBadImageUrl;
|
||||
break;
|
||||
|
||||
default:
|
||||
config.msg = this.errorDefaultMessage.replace('%1', id);
|
||||
break;
|
||||
|
@ -830,21 +827,12 @@ define([
|
|||
if (window.document.title != title)
|
||||
window.document.title = title;
|
||||
|
||||
if (!this._state.fastCoauth || this._state.usersCount<2 )
|
||||
Common.Gateway.setDocumentModified(isModified);
|
||||
else if ( this._state.startModifyDocument!==undefined && this._state.startModifyDocument === isModified){
|
||||
Common.Gateway.setDocumentModified(isModified);
|
||||
this._state.startModifyDocument = (this._state.startModifyDocument) ? !this._state.startModifyDocument : undefined;
|
||||
}
|
||||
|
||||
Common.Gateway.setDocumentModified(isModified);
|
||||
this._state.isDocModified = isModified;
|
||||
}
|
||||
},
|
||||
|
||||
onDocumentModifiedChanged: function() {
|
||||
if (this._state.fastCoauth && this._state.usersCount > 1 && this._state.startModifyDocument===undefined )
|
||||
return;
|
||||
|
||||
var isModified = this.api.asc_isDocumentCanSave();
|
||||
if (this._state.isDocModified !== isModified) {
|
||||
Common.Gateway.setDocumentModified(this.api.isDocumentModified());
|
||||
|
@ -889,10 +877,6 @@ define([
|
|||
$('#loading-mask').hide().remove();
|
||||
},
|
||||
|
||||
onSaveUrl: function(url) {
|
||||
Common.Gateway.save(url);
|
||||
},
|
||||
|
||||
onDownloadUrl: function(url) {
|
||||
if (this._state.isFromGatewayDownloadAs) {
|
||||
Common.Gateway.downloadAs(url);
|
||||
|
@ -1233,7 +1217,8 @@ define([
|
|||
textClose: 'Close',
|
||||
textDone: 'Done',
|
||||
titleServerVersion: 'Editor updated',
|
||||
errorServerVersion: 'The editor version has been updated. The page will be reloaded to apply the changes.'
|
||||
errorServerVersion: 'The editor version has been updated. The page will be reloaded to apply the changes.',
|
||||
errorBadImageUrl: 'Image url is incorrect'
|
||||
}
|
||||
})(), PE.Controllers.Main || {}))
|
||||
});
|
|
@ -103,7 +103,7 @@ define([
|
|||
var name = layout.get_Name();
|
||||
_layouts.push({
|
||||
imageUrl : layout.get_Image(),
|
||||
title : (name !== '') ? name : me.layoutNames[layout.getType()],
|
||||
title : (name !== '') ? name : PE.getController('Main').layoutNames[layout.getType()],
|
||||
itemWidth : layout.get_Width(),
|
||||
itemHeight : layout.get_Height(),
|
||||
idx : layout.getIndex()
|
||||
|
|
|
@ -104,7 +104,7 @@ define([
|
|||
text: '',
|
||||
afterText:
|
||||
'<div class="content-block">' +
|
||||
'<div class="row">' +
|
||||
'<div class="row no-gutter" style="text-align: center;">' +
|
||||
'<div class="col-50">' + me.textColumns + '</div>' +
|
||||
'<div class="col-50">' + me.textRows + '</div>' +
|
||||
'</div>' +
|
||||
|
@ -139,9 +139,12 @@ define([
|
|||
rotateEffect: true,
|
||||
value: [3, 3],
|
||||
cols: [{
|
||||
textAlign: 'left',
|
||||
textAlign: 'center',
|
||||
width: '100%',
|
||||
values: [1,2,3,4,5,6,7,8,9,10]
|
||||
}, {
|
||||
textAlign: 'center',
|
||||
width: '100%',
|
||||
values: [1,2,3,4,5,6,7,8,9,10]
|
||||
}]
|
||||
});
|
||||
|
|
|
@ -40,12 +40,13 @@
|
|||
</div>
|
||||
<div class="page" id="addimage-url">
|
||||
<div class="page-content">
|
||||
<div class="content-block-title"><%= scope.textAddress %></div>
|
||||
<% if (!android) { %><div class="content-block-title"><%= scope.textAddress %></div><% } %>
|
||||
<div class="list-block">
|
||||
<ul>
|
||||
<li>
|
||||
<div id="addimage-link-url" class="item-content">
|
||||
<div class="item-inner">
|
||||
<% if (android) { %><div class="item-title label"><%= scope.textAddress %></div><% } %>
|
||||
<div class="item-input">
|
||||
<input type="url" placeholder="<%= scope.textImageURL %>">
|
||||
</div>
|
||||
|
|
|
@ -83,6 +83,7 @@
|
|||
"PE.Controllers.Main.errorUsersExceed": "The number of users was exceeded",
|
||||
"PE.Controllers.Main.errorViewerDisconnect": "Connection is lost. You can still view the document,<br>but will not be able to download or print until the connection is restored.",
|
||||
"PE.Controllers.Main.leavePageText": "You have unsaved changes in this document. Click 'Stay on this Page' to await the autosave of the document. Click 'Leave this Page' to discard all the unsaved changes.",
|
||||
"PE.Controllers.Main.errorBadImageUrl": "Image URL is incorrect",
|
||||
"PE.Controllers.Main.loadFontsTextText": "Loading data...",
|
||||
"PE.Controllers.Main.loadFontsTitleText": "Loading Data",
|
||||
"PE.Controllers.Main.loadFontTextText": "Loading data...",
|
||||
|
|
|
@ -77,6 +77,8 @@ var sdk_dev_scrpipts = [
|
|||
"../../../../sdkjs/cell/model/CellInfo.js",
|
||||
"../../../../sdkjs/cell/view/DrawingObjectsController.js",
|
||||
"../../../../sdkjs/slide/Drawing/ThemeLoader.js",
|
||||
"../../../../sdkjs/word/Editor/DocumentContentElementBase.js",
|
||||
"../../../../sdkjs/word/Editor/StructuredDocumentTags/BlockLevel.js",
|
||||
"../../../../sdkjs/word/Editor/Serialize2.js",
|
||||
"../../../../sdkjs/word/Editor/Numbering.js",
|
||||
"../../../../sdkjs/word/Editor/NumberingChanges.js",
|
||||
|
@ -96,6 +98,7 @@ var sdk_dev_scrpipts = [
|
|||
"../../../../sdkjs/word/Editor/SectionsChanges.js",
|
||||
"../../../../sdkjs/word/Editor/Styles.js",
|
||||
"../../../../sdkjs/word/Editor/StylesChanges.js",
|
||||
"../../../../sdkjs/word/Editor/RevisionsChange.js",
|
||||
"../../../../sdkjs/slide/Editor/Format/StylesPrototype.js",
|
||||
"../../../../sdkjs/word/Drawing/Graphics.js",
|
||||
"../../../../sdkjs/word/Drawing/ShapeDrawer.js",
|
||||
|
|
|
@ -47,6 +47,7 @@ define([
|
|||
'spreadsheeteditor/main/app/view/DocumentHolder',
|
||||
'spreadsheeteditor/main/app/view/HyperlinkSettingsDialog',
|
||||
'spreadsheeteditor/main/app/view/ParagraphSettingsAdvanced',
|
||||
'spreadsheeteditor/main/app/view/ImageSettingsAdvanced',
|
||||
'spreadsheeteditor/main/app/view/SetValueDialog',
|
||||
'spreadsheeteditor/main/app/view/AutoFilterDialog'
|
||||
], function () {
|
||||
|
@ -184,6 +185,7 @@ define([
|
|||
view.pmiTextAdvanced.on('click', _.bind(me.onTextAdvanced, me));
|
||||
view.mnuShapeAdvanced.on('click', _.bind(me.onShapeAdvanced, me));
|
||||
view.mnuChartEdit.on('click', _.bind(me.onChartEdit, me));
|
||||
view.mnuImgAdvanced.on('click', _.bind(me.onImgAdvanced, me));
|
||||
|
||||
var documentHolderEl = view.cmpEl;
|
||||
|
||||
|
@ -688,6 +690,25 @@ define([
|
|||
})).show();
|
||||
},
|
||||
|
||||
onImgAdvanced: function(item) {
|
||||
var me = this;
|
||||
|
||||
(new SSE.Views.ImageSettingsAdvanced({
|
||||
imageProps : item.imageInfo,
|
||||
api : me.api,
|
||||
handler : function(result, value) {
|
||||
if (result == 'ok') {
|
||||
if (me.api) {
|
||||
me.api.asc_setGraphicObjectProps(value.imageProps);
|
||||
|
||||
Common.component.Analytics.trackEvent('DocumentHolder', 'Apply advanced image settings');
|
||||
}
|
||||
}
|
||||
Common.NotificationCenter.trigger('edit:complete', me);
|
||||
}
|
||||
})).show();
|
||||
},
|
||||
|
||||
onChartEdit: function(item) {
|
||||
var me = this;
|
||||
var win, props;
|
||||
|
@ -805,7 +826,7 @@ define([
|
|||
linkstr = props.asc_getHyperlinkUrl() + '<br><b>' + me.textCtrlClick + '</b>';
|
||||
}
|
||||
} else {
|
||||
linkstr = props.asc_getTooltip() || (props.asc_getSheet() + '!' + props.asc_getRange());
|
||||
linkstr = props.asc_getTooltip() || (props.asc_getLocation());
|
||||
}
|
||||
|
||||
if (hyperlinkTip.ref && hyperlinkTip.ref.isVisible()) {
|
||||
|
@ -1213,9 +1234,10 @@ define([
|
|||
documentHolder.mnuChartEdit.chartInfo = elValue;
|
||||
ischartmenu = true;
|
||||
has_chartprops = true;
|
||||
}
|
||||
else
|
||||
} else {
|
||||
documentHolder.mnuImgAdvanced.imageInfo = elValue;
|
||||
isimagemenu = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1227,8 +1249,10 @@ define([
|
|||
documentHolder.mnuChartEdit.setDisabled(isObjLocked);
|
||||
documentHolder.pmiImgCut.setDisabled(isObjLocked);
|
||||
documentHolder.pmiImgPaste.setDisabled(isObjLocked);
|
||||
documentHolder.mnuImgAdvanced.setVisible(isimagemenu && !isshapemenu && !ischartmenu);
|
||||
documentHolder.mnuImgAdvanced.setDisabled(isObjLocked);
|
||||
if (showMenu) this.showPopupMenu(documentHolder.imgMenu, {}, event);
|
||||
documentHolder.mnuShapeSeparator.setVisible(documentHolder.mnuShapeAdvanced.isVisible() || documentHolder.mnuChartEdit.isVisible());
|
||||
documentHolder.mnuShapeSeparator.setVisible(documentHolder.mnuShapeAdvanced.isVisible() || documentHolder.mnuChartEdit.isVisible() || documentHolder.mnuImgAdvanced.isVisible());
|
||||
} else if (istextshapemenu || istextchartmenu) {
|
||||
if (!showMenu && !documentHolder.textInShapeMenu.isVisible()) return;
|
||||
|
||||
|
|
|
@ -174,6 +174,7 @@ define([
|
|||
this.leftMenu.btnChat.hide();
|
||||
this.leftMenu.btnComments.hide();
|
||||
}
|
||||
this.mode.isTrial && this.leftMenu.setDeveloperMode(true);
|
||||
/** coauthoring end **/
|
||||
Common.util.Shortcuts.resumeEvents();
|
||||
if (!this.mode.isEditMailMerge && !this.mode.isEditDiagram)
|
||||
|
@ -187,6 +188,7 @@ define([
|
|||
this.leftMenu.setOptionsPanel('plugins', this.getApplication().getController('Common.Controllers.Plugins').getView('Common.Views.Plugins'));
|
||||
} else
|
||||
this.leftMenu.btnPlugins.hide();
|
||||
this.mode.isTrial && this.leftMenu.setDeveloperMode(true);
|
||||
},
|
||||
|
||||
clickMenuFileItem: function(menu, action, isopts) {
|
||||
|
|
|
@ -74,7 +74,8 @@ define([
|
|||
toolbar: '#viewport #toolbar',
|
||||
leftMenu: '#viewport #left-menu, #viewport #id-toolbar-full-placeholder-btn-settings, #viewport #id-toolbar-short-placeholder-btn-settings',
|
||||
rightMenu: '#viewport #right-menu',
|
||||
header: '#viewport #header'
|
||||
header: '#viewport #header',
|
||||
statusBar: '#statusbar'
|
||||
};
|
||||
|
||||
Common.localStorage.setId('table');
|
||||
|
@ -102,7 +103,7 @@ define([
|
|||
onLaunch: function() {
|
||||
// $(document.body).css('position', 'absolute');
|
||||
|
||||
this._state = {isDisconnected: false, usersCount: 1, fastCoauth: true, startModifyDocument: true, lostEditingRights: false, licenseWarning: false};
|
||||
this._state = {isDisconnected: false, usersCount: 1, fastCoauth: true, lostEditingRights: false, licenseWarning: false};
|
||||
|
||||
if (!Common.Utils.isBrowserSupported()){
|
||||
Common.Utils.showBrowserRestriction();
|
||||
|
@ -166,6 +167,8 @@ define([
|
|||
if (e && e.target && !/area_id/.test(e.target.id)) {
|
||||
if (/msg-reply/.test(e.target.className))
|
||||
me.dontCloseDummyComment = true;
|
||||
else if (/chat-msg-text/.test(e.target.id))
|
||||
me.dontCloseChat = true;
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -180,6 +183,8 @@ define([
|
|||
me.api.asc_enableKeyEvents(true);
|
||||
if (/msg-reply/.test(e.target.className))
|
||||
me.dontCloseDummyComment = false;
|
||||
else if (/chat-msg-text/.test(e.target.id))
|
||||
me.dontCloseChat = false;
|
||||
}
|
||||
}
|
||||
}).on('dragover', function(e) {
|
||||
|
@ -217,8 +222,8 @@ define([
|
|||
},
|
||||
'menu:show': function(e){
|
||||
},
|
||||
'menu:hide': function(menu){
|
||||
if (!me.isModalShowed && (!menu || !menu.cmpEl.hasClass('from-cell-edit'))) {
|
||||
'menu:hide': function(menu, isFromInputControl){
|
||||
if (!me.isModalShowed && (!menu || !menu.cmpEl.hasClass('from-cell-edit')) && !isFromInputControl) {
|
||||
me.api.asc_InputClearKeyboardElement();
|
||||
me.api.asc_enableKeyEvents(true);
|
||||
}
|
||||
|
@ -425,12 +430,12 @@ define([
|
|||
this.setLongActionView(action);
|
||||
} else {
|
||||
if (this.loadMask) {
|
||||
if (this.loadMask.isVisible() && !this.dontCloseDummyComment)
|
||||
if (this.loadMask.isVisible() && !this.dontCloseDummyComment && !this.dontCloseChat)
|
||||
this.api.asc_enableKeyEvents(true);
|
||||
this.loadMask.hide();
|
||||
}
|
||||
|
||||
if (type == Asc.c_oAscAsyncActionType.BlockInteraction && !( (id == Asc.c_oAscAsyncAction['LoadDocumentFonts'] || id == Asc.c_oAscAsyncAction['ApplyChanges']) && this.dontCloseDummyComment ))
|
||||
if (type == Asc.c_oAscAsyncActionType.BlockInteraction && !( (id == Asc.c_oAscAsyncAction['LoadDocumentFonts'] || id == Asc.c_oAscAsyncAction['ApplyChanges']) && (this.dontCloseDummyComment || this.dontCloseChat) ))
|
||||
this.onEditComplete(this.loadMask, {restorefocus:true});
|
||||
}
|
||||
},
|
||||
|
@ -649,7 +654,6 @@ define([
|
|||
|
||||
rightmenuController.createDelayedElements();
|
||||
|
||||
me.api.asc_registerCallback('asc_onSaveUrl', _.bind(me.onSaveUrl, me));
|
||||
me.api.asc_registerCallback('asc_onDocumentModifiedChanged', _.bind(me.onDocumentModifiedChanged, me));
|
||||
me.api.asc_registerCallback('asc_onDocumentCanSaveChanged', _.bind(me.onDocumentCanSaveChanged, me));
|
||||
me.api.asc_registerCallback('asc_OnTryUndoInFastCollaborative',_.bind(me.onTryUndoInFastCollaborative, me));
|
||||
|
@ -760,6 +764,7 @@ define([
|
|||
this.appOptions.canComments = (licType === Asc.c_oLicenseResult.Success || licType === Asc.c_oLicenseResult.SuccessLimit) && !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.comments===false);
|
||||
this.appOptions.canChat = (licType === Asc.c_oLicenseResult.Success || licType === Asc.c_oLicenseResult.SuccessLimit) && !this.appOptions.isOffline && !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.chat===false);
|
||||
this.appOptions.canRename = !!this.permissions.rename;
|
||||
this.appOptions.isTrial = params.asc_getTrial();
|
||||
|
||||
this.appOptions.canBranding = (licType === Asc.c_oLicenseResult.Success) && (typeof this.editorConfig.customization == 'object');
|
||||
if (this.appOptions.canBranding)
|
||||
|
@ -769,7 +774,6 @@ define([
|
|||
if (this.appOptions.canBrandingExt)
|
||||
this.updatePlugins(this.plugins, true);
|
||||
|
||||
params.asc_getTrial() && this.headerView.setDeveloperMode(true);
|
||||
this.appOptions.canRename && this.headerView.setCanRename(true);
|
||||
}
|
||||
|
||||
|
@ -1043,6 +1047,16 @@ define([
|
|||
config.closable = true;
|
||||
break;
|
||||
|
||||
case Asc.c_oAscError.ID.FrmlOperandExpected:
|
||||
config.msg = this.errorOperandExpected;
|
||||
config.closable = true;
|
||||
break;
|
||||
|
||||
case Asc.c_oAscError.ID.FrmlWrongReferences:
|
||||
config.msg = this.errorFrmlWrongReferences;
|
||||
config.closable = true;
|
||||
break;
|
||||
|
||||
case Asc.c_oAscError.ID.UnexpectedGuid:
|
||||
config.msg = this.errorUnexpectedGuid;
|
||||
break;
|
||||
|
@ -1067,10 +1081,6 @@ define([
|
|||
config.msg = this.errorDataRange;
|
||||
break;
|
||||
|
||||
case Asc.c_oAscError.ID.FrmlOperandExpected:
|
||||
config.msg = this.errorOperandExpected;
|
||||
break;
|
||||
|
||||
case Asc.c_oAscError.ID.VKeyEncrypt:
|
||||
config.msg = this.errorToken;
|
||||
break;
|
||||
|
@ -1156,10 +1166,6 @@ define([
|
|||
config.msg = this.errorOpenWarning;
|
||||
break;
|
||||
|
||||
case Asc.c_oAscError.ID.FrmlWrongReferences:
|
||||
config.msg = this.errorFrmlWrongReferences;
|
||||
break;
|
||||
|
||||
case Asc.c_oAscError.ID.CopyMultiselectAreaError:
|
||||
config.msg = this.errorCopyMultiselectArea;
|
||||
break;
|
||||
|
@ -1271,24 +1277,26 @@ define([
|
|||
title = this.headerView.getDocumentCaption() + ' - ' + title;
|
||||
|
||||
if (change) {
|
||||
if (!_.isUndefined(title) && (!this._state.fastCoauth || this._state.usersCount<2 )) {
|
||||
clearTimeout(this._state.timerCaption);
|
||||
if (!_.isUndefined(title)) {
|
||||
title = '* ' + title;
|
||||
this.headerView.setDocumentCaption(this.headerView.getDocumentCaption() + '*', true);
|
||||
this.headerView.setDocumentCaption(this.headerView.getDocumentCaption(), true);
|
||||
}
|
||||
} else {
|
||||
this.headerView.setDocumentCaption(this.headerView.getDocumentCaption());
|
||||
if (this._state.fastCoauth && this._state.usersCount>1) {
|
||||
var me = this;
|
||||
this._state.timerCaption = setTimeout(function () {
|
||||
me.headerView.setDocumentCaption(me.headerView.getDocumentCaption(), false);
|
||||
}, 500);
|
||||
} else
|
||||
this.headerView.setDocumentCaption(this.headerView.getDocumentCaption(), false);
|
||||
}
|
||||
|
||||
if (window.document.title != title)
|
||||
window.document.title = title;
|
||||
|
||||
if (!this._state.fastCoauth || this._state.usersCount<2 )
|
||||
Common.Gateway.setDocumentModified(change);
|
||||
else if ( this._state.startModifyDocument!==undefined && this._state.startModifyDocument === change){
|
||||
Common.Gateway.setDocumentModified(change);
|
||||
this._state.startModifyDocument = (this._state.startModifyDocument) ? !this._state.startModifyDocument : undefined;
|
||||
}
|
||||
|
||||
Common.Gateway.setDocumentModified(change);
|
||||
|
||||
this._state.isDocModified = change;
|
||||
}
|
||||
},
|
||||
|
@ -1297,8 +1305,6 @@ define([
|
|||
},
|
||||
|
||||
onDocumentModifiedChanged: function(change) {
|
||||
if (this._state.fastCoauth && this._state.usersCount>1 && this._state.startModifyDocument===undefined ) return;
|
||||
|
||||
this.updateWindowTitle(change);
|
||||
Common.Gateway.setDocumentModified(change);
|
||||
|
||||
|
@ -1360,10 +1366,6 @@ define([
|
|||
$('#loading-mask').hide().remove();
|
||||
},
|
||||
|
||||
onSaveUrl: function(url) {
|
||||
Common.Gateway.save(url);
|
||||
},
|
||||
|
||||
onDownloadUrl: function(url) {
|
||||
Common.Gateway.downloadAs(url);
|
||||
},
|
||||
|
@ -2057,7 +2059,7 @@ define([
|
|||
errorFileVKey: 'External error.<br>Incorrect securety key. Please, contact support.',
|
||||
errorStockChart: 'Incorrect row order. To build a stock chart place the data on the sheet in the following order:<br> opening price, max price, min price, closing price.',
|
||||
errorDataRange: 'Incorrect data range.',
|
||||
errorOperandExpected: 'Operand expected',
|
||||
errorOperandExpected: 'The entered function syntax is not correct. Please check if you are missing one of the parentheses - \'(\' or \')\'.',
|
||||
errorKeyEncrypt: 'Unknown key descriptor',
|
||||
errorKeyExpire: 'Key descriptor expired',
|
||||
errorUsersExceed: 'Count of users was exceed',
|
||||
|
|
|
@ -307,7 +307,7 @@ define([
|
|||
if (this.api) {
|
||||
var isModified = this.api.asc_isDocumentCanSave();
|
||||
var isSyncButton = $('.btn-icon', this.toolbar.btnSave.cmpEl).hasClass('btn-synch');
|
||||
if (!isModified && !isSyncButton)
|
||||
if (!isModified && !isSyncButton && !this.toolbar.mode.forcesave)
|
||||
return;
|
||||
|
||||
this.api.asc_Save();
|
||||
|
@ -608,7 +608,7 @@ define([
|
|||
|
||||
if (me.api) {
|
||||
var merged = me.api.asc_getCellInfo().asc_getFlags().asc_getMerge();
|
||||
if (!merged && me.api.asc_mergeCellsDataLost(item.value)) {
|
||||
if ((merged !== Asc.c_oAscMergeOptions.Merge) && me.api.asc_mergeCellsDataLost(item.value)) {
|
||||
Common.UI.warning({
|
||||
msg: me.warnMergeLostData,
|
||||
buttons: ['yes', 'no'],
|
||||
|
@ -1308,8 +1308,13 @@ define([
|
|||
shortcuts: {
|
||||
'command+l,ctrl+l': function(e) {
|
||||
if (me.editMode && !me._state.multiselect) {
|
||||
if (!me.api.asc_getCellInfo().asc_getFormatTableInfo())
|
||||
me._setTableFormat(me.toolbar.mnuTableTemplatePicker.store.at(23).get('name'));
|
||||
var formattableinfo = me.api.asc_getCellInfo().asc_getFormatTableInfo();
|
||||
if (!formattableinfo) {
|
||||
if (_.isUndefined(me.toolbar.mnuTableTemplatePicker))
|
||||
me.onApiInitTableTemplates(me.api.asc_getTablePictures(formattableinfo));
|
||||
var store = me.getCollection('TableTemplates');
|
||||
me._setTableFormat(store.at(23).get('name'));
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -1935,7 +1940,7 @@ define([
|
|||
|
||||
val = info.asc_getFlags().asc_getMerge();
|
||||
if (this._state.merge !== val) {
|
||||
toolbar.btnMerge.toggle(val===true, true);
|
||||
toolbar.btnMerge.toggle(val===Asc.c_oAscMergeOptions.Merge, true);
|
||||
this._state.merge = val;
|
||||
}
|
||||
|
||||
|
@ -2564,8 +2569,23 @@ define([
|
|||
|
||||
if (me._state.tablename)
|
||||
me.api.asc_changeAutoFilter(me._state.tablename, Asc.c_oAscChangeFilterOptions.style, fmtname);
|
||||
else
|
||||
me.api.asc_addAutoFilter(fmtname, dlg.getSettings());
|
||||
else {
|
||||
var settings = dlg.getSettings();
|
||||
if (settings.selectionType == Asc.c_oAscSelectionType.RangeMax || settings.selectionType == Asc.c_oAscSelectionType.RangeRow ||
|
||||
settings.selectionType == Asc.c_oAscSelectionType.RangeCol)
|
||||
Common.UI.warning({
|
||||
title: me.textLongOperation,
|
||||
msg: me.warnLongOperation,
|
||||
buttons: ['ok', 'cancel'],
|
||||
callback: function(btn) {
|
||||
if (btn == 'ok')
|
||||
setTimeout(function() { me.api.asc_addAutoFilter(fmtname, settings.range)}, 1);
|
||||
Common.NotificationCenter.trigger('edit:complete', me.toolbar);
|
||||
}
|
||||
});
|
||||
else
|
||||
me.api.asc_addAutoFilter(fmtname, settings.range);
|
||||
}
|
||||
}
|
||||
|
||||
Common.NotificationCenter.trigger('edit:complete', me.toolbar);
|
||||
|
@ -2577,14 +2597,30 @@ define([
|
|||
|
||||
win.show();
|
||||
win.setSettings({
|
||||
api : me.api
|
||||
api : me.api,
|
||||
selectionType: me.api.asc_getCellInfo().asc_getFlags().asc_getSelectionType()
|
||||
});
|
||||
} else {
|
||||
me._state.filter = undefined;
|
||||
if (me._state.tablename)
|
||||
me.api.asc_changeAutoFilter(me._state.tablename, Asc.c_oAscChangeFilterOptions.style, fmtname);
|
||||
else
|
||||
me.api.asc_addAutoFilter(fmtname);
|
||||
else {
|
||||
var selectionType = me.api.asc_getCellInfo().asc_getFlags().asc_getSelectionType();
|
||||
if (selectionType == Asc.c_oAscSelectionType.RangeMax || selectionType == Asc.c_oAscSelectionType.RangeRow ||
|
||||
selectionType == Asc.c_oAscSelectionType.RangeCol)
|
||||
Common.UI.warning({
|
||||
title: me.textLongOperation,
|
||||
msg: me.warnLongOperation,
|
||||
buttons: ['ok', 'cancel'],
|
||||
callback: function(btn) {
|
||||
if (btn == 'ok')
|
||||
setTimeout(function() { me.api.asc_addAutoFilter(fmtname)}, 1);
|
||||
Common.NotificationCenter.trigger('edit:complete', me.toolbar);
|
||||
}
|
||||
});
|
||||
else
|
||||
me.api.asc_addAutoFilter(fmtname);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -3017,7 +3053,9 @@ define([
|
|||
txtExpandSort: 'The data next to the selection will not be sorted. Do you want to expand the selection to include the adjacent data or continue with sorting the currently selected cells only?',
|
||||
txtExpand: 'Expand and sort',
|
||||
txtSorting: 'Sorting',
|
||||
txtSortSelected: 'Sort selected'
|
||||
txtSortSelected: 'Sort selected',
|
||||
textLongOperation: 'Long operation',
|
||||
warnLongOperation: 'The operation you are about to perform might take rather much time to complete.<br>Are you sure you want to continue?'
|
||||
|
||||
}, SSE.Controllers.Toolbar || {}));
|
||||
});
|
|
@ -335,35 +335,35 @@
|
|||
<!--<div id="spark-dlg-radio-single" style="display: block;"></div>-->
|
||||
<!--</div>-->
|
||||
<table cols="2" style="width: 100%;">
|
||||
<tr>
|
||||
<td colspan=2 >
|
||||
<label class="header"><%= scope.textDataRange %></label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="padding-small" width="200">
|
||||
<div id="spark-dlg-txt-range" class="input-row" style="margin-right: 10px;"></div>
|
||||
</td>
|
||||
<td class="padding-small" style="text-align: right;">
|
||||
<button type="button" class="btn btn-text-default" id="spark-dlg-btn-data" style="min-width: 100px;"><%= scope.textSelectData %></button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan=2 >
|
||||
<label class="header"><%= scope.textLocationRange %></label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="padding-large" width="200">
|
||||
<div id="spark-dlg-txt-location" class="input-row" style="margin-right: 10px;"></div>
|
||||
</td>
|
||||
<td class="padding-large" style="text-align: right;">
|
||||
<button type="button" class="btn btn-text-default" id="spark-dlg-btn-location-data" style="min-width: 100px;"><%= scope.textSelectData %></button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan=2 class="padding-large"></td>
|
||||
</tr>
|
||||
<!--<tr>-->
|
||||
<!--<td colspan=2 >-->
|
||||
<!--<label class="header"><%= scope.textDataRange %></label>-->
|
||||
<!--</td>-->
|
||||
<!--</tr>-->
|
||||
<!--<tr>-->
|
||||
<!--<td class="padding-small" width="200">-->
|
||||
<!--<div id="spark-dlg-txt-range" class="input-row" style="margin-right: 10px;"></div>-->
|
||||
<!--</td>-->
|
||||
<!--<td class="padding-small" style="text-align: right;">-->
|
||||
<!--<button type="button" class="btn btn-text-default" id="spark-dlg-btn-data" style="min-width: 100px;"><%= scope.textSelectData %></button>-->
|
||||
<!--</td>-->
|
||||
<!--</tr>-->
|
||||
<!--<tr>-->
|
||||
<!--<td colspan=2 >-->
|
||||
<!--<label class="header"><%= scope.textLocationRange %></label>-->
|
||||
<!--</td>-->
|
||||
<!--</tr>-->
|
||||
<!--<tr>-->
|
||||
<!--<td class="padding-large" width="200">-->
|
||||
<!--<div id="spark-dlg-txt-location" class="input-row" style="margin-right: 10px;"></div>-->
|
||||
<!--</td>-->
|
||||
<!--<td class="padding-large" style="text-align: right;">-->
|
||||
<!--<button type="button" class="btn btn-text-default" id="spark-dlg-btn-location-data" style="min-width: 100px;"><%= scope.textSelectData %></button>-->
|
||||
<!--</td>-->
|
||||
<!--</tr>-->
|
||||
<!--<tr>-->
|
||||
<!--<td colspan=2 class="padding-large"></td>-->
|
||||
<!--</tr>-->
|
||||
<tr>
|
||||
<td colspan=2 class="padding-small">
|
||||
<label class="header"><%= scope.textEmptyCells %></label>
|
||||
|
|
|
@ -748,10 +748,12 @@ define([
|
|||
itemTemplate: _.template([
|
||||
'<div>',
|
||||
'<label class="checkbox-indeterminate" style="position:absolute;">',
|
||||
'<% if (!check) { %>',
|
||||
'<input type="button" class="img-commonctrl"/>',
|
||||
'<% } else { %>',
|
||||
'<% if (check=="indeterminate") { %>',
|
||||
'<input type="button" class="indeterminate img-commonctrl"/>',
|
||||
'<% } else if (check) { %>',
|
||||
'<input type="button" class="checked img-commonctrl"/>',
|
||||
'<% } else { %>',
|
||||
'<input type="button" class="img-commonctrl"/>',
|
||||
'<% } %>',
|
||||
'</label>',
|
||||
'<div id="<%= id %>" class="list-item" style="pointer-events:none;margin-left:20px;display:inline-block;width: 185px;"><%= Common.Utils.String.htmlEncode(value) %></div>',
|
||||
|
@ -1035,6 +1037,18 @@ define([
|
|||
} else {
|
||||
record.set('check', check);
|
||||
idxs[parseInt(record.get('throughIndex'))] = check;
|
||||
|
||||
var selectAllState = check;
|
||||
for (var i=0; i< this.cells.length; i++) {
|
||||
var cell = this.cells.at(i);
|
||||
if ('1' == cell.get('groupid') && cell.get('check') !== check) {
|
||||
selectAllState = 'indeterminate';
|
||||
break;
|
||||
}
|
||||
}
|
||||
this.checkCellTrigerBlock = true;
|
||||
this.cells.at(0).set('check', selectAllState);
|
||||
this.checkCellTrigerBlock = undefined;
|
||||
}
|
||||
|
||||
this.btnOk.setDisabled(false);
|
||||
|
@ -1182,7 +1196,8 @@ define([
|
|||
isnumber, value,
|
||||
index = 0, throughIndex = 2,
|
||||
applyfilter = true,
|
||||
haveUnselectedCell = false,
|
||||
selectAllState = false,
|
||||
selectedCells = 0,
|
||||
arr = [], arrEx = [],
|
||||
idxs = (me.filter) ? me.filteredIndexes : me.throughIndexes;
|
||||
|
||||
|
@ -1212,9 +1227,7 @@ define([
|
|||
check : idxs[throughIndex],
|
||||
throughIndex : throughIndex
|
||||
}));
|
||||
if (!idxs[throughIndex]) {
|
||||
haveUnselectedCell = true;
|
||||
}
|
||||
if (idxs[throughIndex]) selectedCells++;
|
||||
} else {
|
||||
arrEx.push(new Common.UI.DataViewModel({
|
||||
cellvalue : value
|
||||
|
@ -1224,6 +1237,9 @@ define([
|
|||
++throughIndex;
|
||||
});
|
||||
|
||||
if (selectedCells==arr.length) selectAllState = true;
|
||||
else if (selectedCells>0) selectAllState = 'indeterminate';
|
||||
|
||||
if (me.filter || idxs[0]==undefined)
|
||||
idxs[0] = true;
|
||||
if (!me.filter || arr.length>0)
|
||||
|
@ -1255,7 +1271,7 @@ define([
|
|||
|
||||
if (this.cells.length) {
|
||||
this.checkCellTrigerBlock = true;
|
||||
this.cells.at(0).set('check', !haveUnselectedCell);
|
||||
this.cells.at(0).set('check', selectAllState);
|
||||
this.checkCellTrigerBlock = undefined;
|
||||
}
|
||||
this.btnOk.setDisabled(this.cells.length<1);
|
||||
|
|
|
@ -136,7 +136,7 @@ define([
|
|||
},
|
||||
|
||||
onApiRangeChanged: function(info) {
|
||||
this.inputRange.setValue(info);
|
||||
this.inputRange.setValue(info.asc_getName());
|
||||
if (this.inputRange.cmpEl.hasClass('error'))
|
||||
this.inputRange.cmpEl.removeClass('error');
|
||||
},
|
||||
|
|
|
@ -181,7 +181,7 @@ define([
|
|||
|
||||
if (this._isChartStylesChanged) {
|
||||
if (rec)
|
||||
this.cmbChartStyle.fillComboView(this.cmbChartStyle.menuPicker.getSelectedRec(),true);
|
||||
this.cmbChartStyle.fillComboView(this.cmbChartStyle.menuPicker.getSelectedRec()[0],true);
|
||||
else
|
||||
this.cmbChartStyle.fillComboView(this.cmbChartStyle.menuPicker.store.at(0), true);
|
||||
}
|
||||
|
@ -925,6 +925,7 @@ define([
|
|||
{
|
||||
chartSettings: props,
|
||||
imageSettings: (me.isChart) ? me._originalProps : null,
|
||||
sparklineStyles: me.sparklineStyles,
|
||||
isChart: me.isChart,
|
||||
api: me.api,
|
||||
handler: function(result, value) {
|
||||
|
@ -1109,6 +1110,7 @@ define([
|
|||
if (styles && styles.length>1){
|
||||
var stylesStore = this.cmbSparkStyle.menuPicker.store,
|
||||
selectedIdx = styles[styles.length-1];
|
||||
this.sparklineStyles = styles;
|
||||
if (stylesStore.length == styles.length-1) {
|
||||
var data = stylesStore.models;
|
||||
for (var i=0; i<styles.length-1; i++) {
|
||||
|
|
|
@ -91,6 +91,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
|
|||
this.api = this.options.api;
|
||||
this.chartSettings = this.options.chartSettings;
|
||||
this.imageSettings = this.options.imageSettings;
|
||||
this.sparklineStyles = this.options.sparklineStyles;
|
||||
this.isChart = this.options.isChart;
|
||||
this.vertAxisProps = null;
|
||||
this.horAxisProps = null;
|
||||
|
@ -819,7 +820,8 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
|
|||
itemHeight: 50,
|
||||
menuMaxHeight: 272,
|
||||
enableKeyEvents: true,
|
||||
cls: 'combo-spark-style'
|
||||
cls: 'combo-spark-style',
|
||||
minWidth: 190
|
||||
});
|
||||
this.cmbSparkStyle.render($('#spark-dlg-combo-style'));
|
||||
this.cmbSparkStyle.openButton.menu.cmpEl.css({
|
||||
|
@ -844,7 +846,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
|
|||
labelText: this.textSingle,
|
||||
name: 'asc-radio-sparkline'
|
||||
});
|
||||
*/
|
||||
|
||||
this.txtSparkDataRange = new Common.UI.InputField({
|
||||
el : $('#spark-dlg-txt-range'),
|
||||
name : 'range',
|
||||
|
@ -872,6 +874,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
|
|||
el: $('#spark-dlg-btn-location-data')
|
||||
});
|
||||
this.btnSelectLocationData.on('click', _.bind(this.onSelectLocationData, this));
|
||||
*/
|
||||
|
||||
this._arrEmptyCells = [
|
||||
{ value: Asc.c_oAscEDispBlanksAs.Gap, displayValue: this.textGaps },
|
||||
|
@ -1382,7 +1385,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
|
|||
if (record)
|
||||
this.btnSparkType.setIconCls('item-chartlist ' + record.get('iconCls'));
|
||||
|
||||
this.updateSparkStyles(props.asc_getStyles());
|
||||
this.updateSparkStyles((this.sparklineStyles) ? this.sparklineStyles : props.asc_getStyles());
|
||||
|
||||
if (this._state.SparkType !== Asc.c_oAscSparklineType.Line)
|
||||
this._arrEmptyCells.pop();
|
||||
|
@ -1402,6 +1405,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
|
|||
this.spnSparkMinValue.setValue((props.asc_getManualMin() !== null) ? props.asc_getManualMin() : '', true);
|
||||
this.spnSparkMaxValue.setValue((props.asc_getManualMax() !== null) ? props.asc_getManualMax() : '', true);
|
||||
|
||||
/*
|
||||
var value = props.asc_getDataRanges();
|
||||
if (value && value.length==2) {
|
||||
this.txtSparkDataRange.setValue((value[0]) ? value[0] : '');
|
||||
|
@ -1425,6 +1429,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
|
|||
return (isvalid==Asc.c_oAscError.ID.DataRangeError) ? me.textInvalidRange : true;
|
||||
};
|
||||
}
|
||||
*/
|
||||
|
||||
this._changedProps = new Asc.sparklineGroup();
|
||||
this._noApply = false;
|
||||
|
|
|
@ -418,6 +418,10 @@ define([
|
|||
caption : me.advancedShapeText
|
||||
});
|
||||
|
||||
me.mnuImgAdvanced = new Common.UI.MenuItem({
|
||||
caption : me.advancedImgText
|
||||
});
|
||||
|
||||
me.mnuChartEdit = new Common.UI.MenuItem({
|
||||
caption : me.chartText
|
||||
});
|
||||
|
@ -469,7 +473,8 @@ define([
|
|||
me.mnuUnGroupImg,
|
||||
me.mnuShapeSeparator,
|
||||
me.mnuChartEdit,
|
||||
me.mnuShapeAdvanced
|
||||
me.mnuShapeAdvanced,
|
||||
me.mnuImgAdvanced
|
||||
]
|
||||
});
|
||||
|
||||
|
@ -680,17 +685,17 @@ define([
|
|||
textFreezePanes: 'Freeze Panes',
|
||||
textUnFreezePanes: 'Unfreeze Panes',
|
||||
txtSelect: 'Select',
|
||||
selectRowText : 'Select Row',
|
||||
selectColumnText : 'Select Entire Column',
|
||||
selectDataText : 'Select Column Data',
|
||||
selectTableText : 'Select Table',
|
||||
insertRowAboveText : 'Insert Row Above',
|
||||
insertRowBelowText : 'Insert Row Below',
|
||||
insertColumnLeftText : 'Insert Column Left',
|
||||
insertColumnRightText : 'Insert Column Right',
|
||||
deleteRowText : 'Delete Row',
|
||||
deleteColumnText : 'Delete Column',
|
||||
deleteTableText : 'Delete Table',
|
||||
selectRowText : 'Row',
|
||||
selectColumnText : 'Entire Column',
|
||||
selectDataText : 'Column Data',
|
||||
selectTableText : 'Table',
|
||||
insertRowAboveText : 'Row Above',
|
||||
insertRowBelowText : 'Row Below',
|
||||
insertColumnLeftText : 'Column Left',
|
||||
insertColumnRightText : 'Column Right',
|
||||
deleteRowText : 'Row',
|
||||
deleteColumnText : 'Column',
|
||||
deleteTableText : 'Table',
|
||||
txtFilter: 'Filter',
|
||||
txtFilterValue: 'Filter by Selected cell\'s value',
|
||||
txtFilterCellColor: 'Filter by cell\'s color',
|
||||
|
@ -706,7 +711,8 @@ define([
|
|||
txtSparklines: 'Sparklines',
|
||||
txtClearSparklines: 'Clear Selected Sparklines',
|
||||
txtClearSparklineGroups: 'Clear Selected Sparkline Groups',
|
||||
txtShowComment: 'Show Comment'
|
||||
txtShowComment: 'Show Comment',
|
||||
advancedImgText: 'Image Advanced Settings'
|
||||
|
||||
}, SSE.Views.DocumentHolder || {}));
|
||||
});
|
|
@ -288,13 +288,16 @@ define([
|
|||
this.cmbType.selectRecord(selectedItem);
|
||||
else if (props.formatInfo.asc_getType() == Asc.c_oAscNumFormatType.Fraction)
|
||||
this.cmbType.setValue(this.txtCustom);
|
||||
else if (props.formatInfo.asc_getType() == Asc.c_oAscNumFormatType.Time)
|
||||
this.cmbType.setValue(this.api.asc_getLocaleExample(props.format, 1.534));
|
||||
else
|
||||
this.cmbType.setValue(this.api.asc_getLocaleExample(props.format), 37973);
|
||||
this.cmbType.setValue(this.api.asc_getLocaleExample(props.format, 38822));
|
||||
}
|
||||
this.Format = props.format;
|
||||
this.lblExample.text(this.api.asc_getLocaleExample(this.Format));
|
||||
}
|
||||
// for fraction - if props.format not in cmbType - setValue(this.txtCustom)
|
||||
// for date/time - if props.format not in cmbType - setValue(this.api.asc_getLocaleExample(props.format, 37973))
|
||||
// for date/time - if props.format not in cmbType - setValue(this.api.asc_getLocaleExample(props.format, 38822))
|
||||
// for cmbNegative - if props.format not in cmbNegative - setValue(this.api.asc_getLocaleExample(props.format))
|
||||
}
|
||||
},
|
||||
|
@ -439,7 +442,7 @@ define([
|
|||
|
||||
var formatsarr = this.api.asc_getFormatCells(info),
|
||||
data = [],
|
||||
exampleVal = (record.value == Asc.c_oAscNumFormatType.Date) ? 37973 : ((record.value == Asc.c_oAscNumFormatType.Time) ? 0.123 : parseFloat("-1234.12345678901234567890"));
|
||||
exampleVal = (record.value == Asc.c_oAscNumFormatType.Date) ? 38822 : ((record.value == Asc.c_oAscNumFormatType.Time) ? 1.534 : parseFloat("-1234.12345678901234567890"));
|
||||
formatsarr.forEach(function(item) {
|
||||
data.push({value: item, displayValue: me.api.asc_getLocaleExample(item, exampleVal)});
|
||||
});
|
||||
|
|
|
@ -339,6 +339,25 @@ define([
|
|||
return this;
|
||||
},
|
||||
|
||||
setDeveloperMode: function(mode) {
|
||||
if ( !this.$el.is(':visible') ) return;
|
||||
|
||||
if (!this.developerHint) {
|
||||
this.developerHint = $('<div id="developer-hint">' + this.txtDeveloper + '</div>').appendTo(this.$el);
|
||||
this.devHeight = this.developerHint.outerHeight();
|
||||
$(window).on('resize', _.bind(this.onWindowResize, this));
|
||||
}
|
||||
this.developerHint.toggleClass('hidden', !mode);
|
||||
|
||||
var lastbtn = this.$el.find('button.btn-category:visible:last-of-type');
|
||||
this.minDevPosition = lastbtn.offset().top - lastbtn.offsetParent().offset().top + lastbtn.height() + 20;
|
||||
this.onWindowResize();
|
||||
},
|
||||
|
||||
onWindowResize: function() {
|
||||
this.developerHint.css('top', Math.max((this.$el.height()-this.devHeight)/2, this.minDevPosition));
|
||||
},
|
||||
|
||||
/** coauthoring begin **/
|
||||
tipComments : 'Comments',
|
||||
tipChat : 'Chat',
|
||||
|
@ -347,6 +366,7 @@ define([
|
|||
tipSupport : 'Feedback & Support',
|
||||
tipFile : 'File',
|
||||
tipSearch : 'Search',
|
||||
tipPlugins : 'Plugins'
|
||||
tipPlugins : 'Plugins',
|
||||
txtDeveloper: 'DEVELOPER MODE'
|
||||
}, SSE.Views.LeftMenu || {}));
|
||||
});
|
||||
|
|
|
@ -364,8 +364,8 @@ define([
|
|||
}
|
||||
},
|
||||
|
||||
onHideMenus: function(e){
|
||||
Common.NotificationCenter.trigger('edit:complete', this);
|
||||
onHideMenus: function(menu, e, isFromInputControl){
|
||||
if (!isFromInputControl) Common.NotificationCenter.trigger('edit:complete', this);
|
||||
},
|
||||
|
||||
setLocked: function (locked) {
|
||||
|
|
|
@ -77,28 +77,32 @@ define([
|
|||
asctype: Common.Utils.documentSettingsType.Paragraph,
|
||||
enableToggle: true,
|
||||
disabled: true,
|
||||
toggleGroup: 'tabpanelbtnsGroup'
|
||||
toggleGroup: 'tabpanelbtnsGroup',
|
||||
allowMouseEventsOnDisabled: true
|
||||
});
|
||||
this.btnImage = new Common.UI.Button({
|
||||
hint: this.txtImageSettings,
|
||||
asctype: Common.Utils.documentSettingsType.Image,
|
||||
enableToggle: true,
|
||||
disabled: true,
|
||||
toggleGroup: 'tabpanelbtnsGroup'
|
||||
toggleGroup: 'tabpanelbtnsGroup',
|
||||
allowMouseEventsOnDisabled: true
|
||||
});
|
||||
this.btnChart = new Common.UI.Button({
|
||||
hint: this.txtChartSettings,
|
||||
asctype: Common.Utils.documentSettingsType.Chart,
|
||||
enableToggle: true,
|
||||
disabled: true,
|
||||
toggleGroup: 'tabpanelbtnsGroup'
|
||||
toggleGroup: 'tabpanelbtnsGroup',
|
||||
allowMouseEventsOnDisabled: true
|
||||
});
|
||||
this.btnShape = new Common.UI.Button({
|
||||
hint: this.txtShapeSettings,
|
||||
asctype: Common.Utils.documentSettingsType.Shape,
|
||||
enableToggle: true,
|
||||
disabled: true,
|
||||
toggleGroup: 'tabpanelbtnsGroup'
|
||||
toggleGroup: 'tabpanelbtnsGroup',
|
||||
allowMouseEventsOnDisabled: true
|
||||
});
|
||||
|
||||
this.btnTextArt = new Common.UI.Button({
|
||||
|
@ -106,7 +110,8 @@ define([
|
|||
asctype: Common.Utils.documentSettingsType.TextArt,
|
||||
enableToggle: true,
|
||||
disabled: true,
|
||||
toggleGroup: 'tabpanelbtnsGroup'
|
||||
toggleGroup: 'tabpanelbtnsGroup',
|
||||
allowMouseEventsOnDisabled: true
|
||||
});
|
||||
|
||||
this.btnTable = new Common.UI.Button({
|
||||
|
@ -114,7 +119,8 @@ define([
|
|||
asctype: Common.Utils.documentSettingsType.Table,
|
||||
enableToggle: true,
|
||||
disabled: true,
|
||||
toggleGroup: 'tabpanelbtnsGroup'
|
||||
toggleGroup: 'tabpanelbtnsGroup',
|
||||
allowMouseEventsOnDisabled: true
|
||||
});
|
||||
|
||||
this._settings = [];
|
||||
|
|
|
@ -1258,6 +1258,18 @@ define([
|
|||
this.sldrGradient.on('thumbdblclick', function(cmp){
|
||||
me.btnGradColor.cmpEl.find('button').dropdown('toggle');
|
||||
});
|
||||
this.sldrGradient.on('sortthumbs', function(cmp, recalc_indexes){
|
||||
var colors = [],
|
||||
currentIdx;
|
||||
_.each (recalc_indexes, function(recalc_index, index) {
|
||||
colors.push(me.GradColor.colors[recalc_index]);
|
||||
if (me.GradColor.currentIdx == recalc_index)
|
||||
currentIdx = index;
|
||||
});
|
||||
me.OriginalFillType = null;
|
||||
me.GradColor.colors = colors;
|
||||
me.GradColor.currentIdx = currentIdx;
|
||||
});
|
||||
this.fillControls.push(this.sldrGradient);
|
||||
|
||||
this.cmbBorderSize = new Common.UI.ComboBorderSizeEditable({
|
||||
|
|
|
@ -189,6 +189,8 @@ define([
|
|||
this.panelUsers = $('#status-users-ct', this.el);
|
||||
this.panelUsers.on('shown.bs.dropdown', function () {
|
||||
me.panelUsersList.scroller.update({minScrollbarLength : 40, alwaysVisibleY: true});
|
||||
var tip = me.panelUsersBlock.data('bs.tooltip');
|
||||
if (tip) tip.hide();
|
||||
});
|
||||
|
||||
this.panelUsersBlock = this.panelUsers.find('#status-users-block');
|
||||
|
|
|
@ -74,6 +74,7 @@ define([
|
|||
|
||||
this.options.tpl = _.template(this.template, this.options);
|
||||
this.checkRangeType = Asc.c_oAscSelectionDialogType.FormatTable;
|
||||
this.selectionType = Asc.c_oAscSelectionType.RangeCells;
|
||||
|
||||
Common.UI.Window.prototype.initialize.call(this, this.options);
|
||||
},
|
||||
|
@ -129,6 +130,8 @@ define([
|
|||
}
|
||||
if (settings.title)
|
||||
me.setTitle(settings.title);
|
||||
if (settings.selectionType)
|
||||
me.selectionType = settings.selectionType;
|
||||
|
||||
me.api.asc_unregisterCallback('asc_onSelectionRangeChanged', _.bind(me.onApiRangeChanged, me));
|
||||
me.api.asc_registerCallback('asc_onSelectionRangeChanged', _.bind(me.onApiRangeChanged, me));
|
||||
|
@ -145,15 +148,16 @@ define([
|
|||
if (this.checkRangeType == Asc.c_oAscSelectionDialogType.FormatTable) {
|
||||
var options = this.api.asc_getAddFormatTableOptions(this.inputRange.getValue());
|
||||
options.asc_setIsTitle(this.cbTitle.checked);
|
||||
return options;
|
||||
return { selectionType: this.selectionType, range: options};
|
||||
} else
|
||||
return this.inputRange.getValue();
|
||||
return { selectionType: this.selectionType, range: this.inputRange.getValue()};
|
||||
},
|
||||
|
||||
onApiRangeChanged: function(info) {
|
||||
this.inputRange.setValue(info);
|
||||
this.inputRange.setValue(info.asc_getName());
|
||||
if (this.inputRange.cmpEl.hasClass('error'))
|
||||
this.inputRange.cmpEl.removeClass('error');
|
||||
this.selectionType = info.asc_getType();
|
||||
},
|
||||
|
||||
isRangeValid: function() {
|
||||
|
|
|
@ -325,7 +325,7 @@ define([
|
|||
if (this._initSettings)
|
||||
this.createDelayedControls();
|
||||
|
||||
this.disableControls(this._locked);
|
||||
this.disableControls(this._locked); // need to update combodataview after disabled state
|
||||
|
||||
if (props )//formatTableInfo
|
||||
{
|
||||
|
@ -405,7 +405,7 @@ define([
|
|||
|
||||
if (this._isTemplatesChanged) {
|
||||
if (rec)
|
||||
this.cmbTableTemplate.fillComboView(this.cmbTableTemplate.menuPicker.getSelectedRec(),true);
|
||||
this.cmbTableTemplate.fillComboView(this.cmbTableTemplate.menuPicker.getSelectedRec()[0],true);
|
||||
else
|
||||
this.cmbTableTemplate.fillComboView(this.cmbTableTemplate.menuPicker.store.at(0), true);
|
||||
}
|
||||
|
@ -444,6 +444,7 @@ define([
|
|||
self.cmbTableTemplate.menuPicker.scroller.update({alwaysVisibleY: true});
|
||||
});
|
||||
this.lockedControls.push(this.cmbTableTemplate);
|
||||
if (this._locked) this.cmbTableTemplate.setDisabled(this._locked);
|
||||
}
|
||||
|
||||
var count = self.cmbTableTemplate.menuPicker.store.length;
|
||||
|
@ -477,10 +478,25 @@ define([
|
|||
var handlerDlg = function(dlg, result) {
|
||||
if (result == 'ok') {
|
||||
me.api.asc_setSelectionDialogMode(Asc.c_oAscSelectionDialogType.None);
|
||||
me.api.asc_changeTableRange(me._state.TableName, dlg.getSettings());
|
||||
|
||||
var settings = dlg.getSettings();
|
||||
if (settings.selectionType == Asc.c_oAscSelectionType.RangeMax || settings.selectionType == Asc.c_oAscSelectionType.RangeRow ||
|
||||
settings.selectionType == Asc.c_oAscSelectionType.RangeCol)
|
||||
Common.UI.warning({
|
||||
title: me.textLongOperation,
|
||||
msg: me.warnLongOperation,
|
||||
buttons: ['ok', 'cancel'],
|
||||
callback: function(btn) {
|
||||
if (btn == 'ok')
|
||||
setTimeout(function() { me.api.asc_changeTableRange(me._state.TableName, settings.range)}, 1);
|
||||
Common.NotificationCenter.trigger('edit:complete', me);
|
||||
}
|
||||
});
|
||||
else
|
||||
me.api.asc_changeTableRange(me._state.TableName, settings.range);
|
||||
}
|
||||
|
||||
Common.NotificationCenter.trigger('edit:complete', me.toolbar);
|
||||
Common.NotificationCenter.trigger('edit:complete', me);
|
||||
};
|
||||
var win = new SSE.Views.TableOptionsDialog({
|
||||
handler: handlerDlg
|
||||
|
@ -544,7 +560,9 @@ define([
|
|||
notcriticalErrorTitle : 'Warning',
|
||||
textReservedName : 'The name you are trying to use is already referenced in cell formulas. Please use some other name.',
|
||||
textAdvanced: 'Show advanced settings',
|
||||
textConvertRange: 'Convert to range'
|
||||
textConvertRange: 'Convert to range',
|
||||
textLongOperation: 'Long operation',
|
||||
warnLongOperation: 'The operation you are about to perform might take rather much time to complete.<br>Are you sure you want to continue?'
|
||||
|
||||
}, SSE.Views.TableSettings || {}));
|
||||
});
|
|
@ -1228,6 +1228,18 @@ define([
|
|||
this.sldrGradient.on('thumbdblclick', function(cmp){
|
||||
me.btnGradColor.cmpEl.find('button').dropdown('toggle');
|
||||
});
|
||||
this.sldrGradient.on('sortthumbs', function(cmp, recalc_indexes){
|
||||
var colors = [],
|
||||
currentIdx;
|
||||
_.each (recalc_indexes, function(recalc_index, index) {
|
||||
colors.push(me.GradColor.colors[recalc_index]);
|
||||
if (me.GradColor.currentIdx == recalc_index)
|
||||
currentIdx = index;
|
||||
});
|
||||
me.OriginalFillType = null;
|
||||
me.GradColor.colors = colors;
|
||||
me.GradColor.currentIdx = currentIdx;
|
||||
});
|
||||
this.lockedControls.push(this.sldrGradient);
|
||||
|
||||
this.cmbBorderSize = new Common.UI.ComboBorderSizeEditable({
|
||||
|
|
|
@ -392,7 +392,7 @@ define([
|
|||
},
|
||||
{
|
||||
caption : me.txtUnmerge,
|
||||
value : Asc.c_oAscMergeOptions.Unmerge
|
||||
value : Asc.c_oAscMergeOptions.None
|
||||
}
|
||||
]
|
||||
})
|
||||
|
@ -1551,10 +1551,10 @@ define([
|
|||
{ id: 'menu-chart-group-hbar', caption: me.textBar },
|
||||
{ id: 'menu-chart-group-area', caption: me.textArea, inline: true },
|
||||
{ id: 'menu-chart-group-scatter', caption: me.textPoint, inline: true },
|
||||
{ id: 'menu-chart-group-stock', caption: me.textStock, inline: true },
|
||||
{ id: 'menu-chart-group-sparkcolumn', inline: true, headername: me.textSparks },
|
||||
{ id: 'menu-chart-group-sparkline', inline: true },
|
||||
{ id: 'menu-chart-group-sparkwin', inline: true }
|
||||
{ id: 'menu-chart-group-stock', caption: me.textStock, inline: true }
|
||||
// ,{ id: 'menu-chart-group-sparkcolumn', inline: true, headername: me.textSparks },
|
||||
// { id: 'menu-chart-group-sparkline', inline: true },
|
||||
// { id: 'menu-chart-group-sparkwin', inline: true }
|
||||
]),
|
||||
store: new Common.UI.DataViewStore([
|
||||
{ group: 'menu-chart-group-bar', type: Asc.c_oAscChartTypeSettings.barNormal, allowSelected: true, iconCls: 'column-normal', selected: true},
|
||||
|
@ -1581,10 +1581,10 @@ define([
|
|||
{ group: 'menu-chart-group-area', type: Asc.c_oAscChartTypeSettings.areaStacked, allowSelected: true, iconCls: 'area-stack'},
|
||||
{ group: 'menu-chart-group-area', type: Asc.c_oAscChartTypeSettings.areaStackedPer, allowSelected: true, iconCls: 'area-pstack'},
|
||||
{ group: 'menu-chart-group-scatter', type: Asc.c_oAscChartTypeSettings.scatter, allowSelected: true, iconCls: 'point-normal'},
|
||||
{ group: 'menu-chart-group-stock', type: Asc.c_oAscChartTypeSettings.stock, allowSelected: true, iconCls: 'stock-normal'},
|
||||
{ group: 'menu-chart-group-sparkcolumn', type: Asc.c_oAscSparklineType.Column, allowSelected: true, iconCls: 'spark-column', tip: me.textColumnSpark},
|
||||
{ group: 'menu-chart-group-sparkline', type: Asc.c_oAscSparklineType.Line, allowSelected: true, iconCls: 'spark-line', tip: me.textLineSpark},
|
||||
{ group: 'menu-chart-group-sparkwin', type: Asc.c_oAscSparklineType.Stacked, allowSelected: true, iconCls: 'spark-win', tip: me.textWinLossSpark}
|
||||
{ group: 'menu-chart-group-stock', type: Asc.c_oAscChartTypeSettings.stock, allowSelected: true, iconCls: 'stock-normal'}
|
||||
// ,{ group: 'menu-chart-group-sparkcolumn', type: Asc.c_oAscSparklineType.Column, allowSelected: true, iconCls: 'spark-column', tip: me.textColumnSpark},
|
||||
// { group: 'menu-chart-group-sparkline', type: Asc.c_oAscSparklineType.Line, allowSelected: true, iconCls: 'spark-line', tip: me.textLineSpark},
|
||||
// { group: 'menu-chart-group-sparkwin', type: Asc.c_oAscSparklineType.Stacked, allowSelected: true, iconCls: 'spark-win', tip: me.textWinLossSpark}
|
||||
]),
|
||||
itemTemplate: _.template('<div id="<%= id %>" class="item-chartlist <%= iconCls %>"></div>')
|
||||
});
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
"Common.Views.DocumentAccessDialog.textTitle": "Sharing Settings",
|
||||
"Common.Views.Header.openNewTabText": "Open in New Tab",
|
||||
"Common.Views.Header.textBack": "Go to Documents",
|
||||
"Common.Views.Header.txtHeaderDeveloper": "DEVELOPER MODE",
|
||||
"del_Common.Views.Header.txtHeaderDeveloper": "DEVELOPER MODE",
|
||||
"Common.Views.Header.txtRename": "Rename",
|
||||
"Common.Views.ImageFromUrlDialog.cancelButtonText": "Cancel",
|
||||
"Common.Views.ImageFromUrlDialog.okButtonText": "OK",
|
||||
|
@ -702,6 +702,8 @@
|
|||
"SSE.Controllers.Toolbar.txtSymbol_xsi": "Xi",
|
||||
"SSE.Controllers.Toolbar.txtSymbol_zeta": "Zeta",
|
||||
"SSE.Controllers.Toolbar.warnMergeLostData": "Only the data from the upper-left cell will remain in the merged cell. <br>Are you sure you want to continue?",
|
||||
"SSE.Controllers.Toolbar.textLongOperation": "Long operation",
|
||||
"SSE.Controllers.Toolbar.warnLongOperation": "The operation you are about to perform might take rather much time to complete.<br>Are you sure you want to continue?",
|
||||
"SSE.Views.AutoFilterDialog.btnCustomFilter": "Custom Filter",
|
||||
"SSE.Views.AutoFilterDialog.cancelButtonText": "Cancel",
|
||||
"SSE.Views.AutoFilterDialog.okButtonText": "OK",
|
||||
|
@ -934,27 +936,28 @@
|
|||
"SSE.Views.DigitalFilterDialog.textUse2": "Use * to present any series of character",
|
||||
"SSE.Views.DigitalFilterDialog.txtTitle": "Custom Filter",
|
||||
"SSE.Views.DocumentHolder.advancedShapeText": "Shape Advanced Settings",
|
||||
"SSE.Views.DocumentHolder.advancedImgText": "Image Advanced Settings",
|
||||
"SSE.Views.DocumentHolder.bottomCellText": "Align Bottom",
|
||||
"SSE.Views.DocumentHolder.centerCellText": "Align Center",
|
||||
"SSE.Views.DocumentHolder.chartText": "Chart Advanced Settings",
|
||||
"SSE.Views.DocumentHolder.deleteColumnText": "Delete Column",
|
||||
"SSE.Views.DocumentHolder.deleteRowText": "Delete Row",
|
||||
"SSE.Views.DocumentHolder.deleteTableText": "Delete Table",
|
||||
"SSE.Views.DocumentHolder.deleteColumnText": "Column",
|
||||
"SSE.Views.DocumentHolder.deleteRowText": "Row",
|
||||
"SSE.Views.DocumentHolder.deleteTableText": "Table",
|
||||
"SSE.Views.DocumentHolder.direct270Text": "Rotate at 270°",
|
||||
"SSE.Views.DocumentHolder.direct90Text": "Rotate at 90°",
|
||||
"SSE.Views.DocumentHolder.directHText": "Horizontal",
|
||||
"SSE.Views.DocumentHolder.directionText": "Text Direction",
|
||||
"SSE.Views.DocumentHolder.editChartText": "Edit Data",
|
||||
"SSE.Views.DocumentHolder.editHyperlinkText": "Edit Hyperlink",
|
||||
"SSE.Views.DocumentHolder.insertColumnLeftText": "Insert Column Left",
|
||||
"SSE.Views.DocumentHolder.insertColumnRightText": "Insert Column Right",
|
||||
"SSE.Views.DocumentHolder.insertRowAboveText": "Insert Row Above",
|
||||
"SSE.Views.DocumentHolder.insertRowBelowText": "Insert Row Below",
|
||||
"SSE.Views.DocumentHolder.insertColumnLeftText": "Column Left",
|
||||
"SSE.Views.DocumentHolder.insertColumnRightText": "Column Right",
|
||||
"SSE.Views.DocumentHolder.insertRowAboveText": "Row Above",
|
||||
"SSE.Views.DocumentHolder.insertRowBelowText": "Row Below",
|
||||
"SSE.Views.DocumentHolder.removeHyperlinkText": "Remove Hyperlink",
|
||||
"SSE.Views.DocumentHolder.selectColumnText": "Select Entire Column",
|
||||
"SSE.Views.DocumentHolder.selectDataText": "Select Column Data",
|
||||
"SSE.Views.DocumentHolder.selectRowText": "Select Row",
|
||||
"SSE.Views.DocumentHolder.selectTableText": "Select Table",
|
||||
"SSE.Views.DocumentHolder.selectColumnText": "Entire Column",
|
||||
"SSE.Views.DocumentHolder.selectDataText": "Column Data",
|
||||
"SSE.Views.DocumentHolder.selectRowText": "Row",
|
||||
"SSE.Views.DocumentHolder.selectTableText": "Table",
|
||||
"SSE.Views.DocumentHolder.textArrangeBack": "Send to Background",
|
||||
"SSE.Views.DocumentHolder.textArrangeBackward": "Move Backward",
|
||||
"SSE.Views.DocumentHolder.textArrangeForward": "Move Forward",
|
||||
|
@ -1193,6 +1196,7 @@
|
|||
"SSE.Views.LeftMenu.tipPlugins": "Plugins",
|
||||
"SSE.Views.LeftMenu.tipSearch": "Search",
|
||||
"SSE.Views.LeftMenu.tipSupport": "Feedback & Support",
|
||||
"SSE.Views.LeftMenu.txtDeveloper": "DEVELOPER MODE",
|
||||
"SSE.Views.MainSettingsPrint.okButtonText": "Save",
|
||||
"SSE.Views.MainSettingsPrint.strBottom": "Bottom",
|
||||
"SSE.Views.MainSettingsPrint.strLandscape": "Landscape",
|
||||
|
@ -1481,6 +1485,8 @@
|
|||
"SSE.Views.TableSettings.textTemplate": "Select From Template",
|
||||
"SSE.Views.TableSettings.textTotal": "Total",
|
||||
"SSE.Views.TableSettings.textConvertRange": "Convert to range",
|
||||
"SSE.Views.TableSettings.textLongOperation": "Long operation",
|
||||
"SSE.Views.TableSettings.warnLongOperation": "The operation you are about to perform might take rather much time to complete.<br>Are you sure you want to continue?",
|
||||
"SSE.Views.TableSettingsAdvanced.cancelButtonText": "Cancel",
|
||||
"SSE.Views.TableSettingsAdvanced.okButtonText": "Ok",
|
||||
"SSE.Views.TableSettingsAdvanced.textAlt": "Alternative Text",
|
||||
|
|
|
@ -12,6 +12,16 @@
|
|||
|
||||
.border-values {
|
||||
border: 1px solid @input-border;
|
||||
|
||||
.item {
|
||||
&.selected {
|
||||
background-color: @secondary;
|
||||
border-color: @secondary;
|
||||
color: @gray-deep;
|
||||
border-style: solid;
|
||||
border-width: 1px 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.body {
|
||||
|
|
|
@ -516,4 +516,20 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#developer-hint {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
padding: 12px 0;
|
||||
background-color: #ffb400;
|
||||
color: #6e4e00 !important;
|
||||
white-space: nowrap;
|
||||
line-height: @app-header-height;
|
||||
writing-mode: vertical-rl;
|
||||
-moz-transform: rotate(180deg);
|
||||
-ms-transform: rotate(180deg);
|
||||
-webkit-transform: rotate(180deg);
|
||||
-o-transform: rotate(180deg);
|
||||
transform: rotate(180deg);
|
||||
}
|
|
@ -238,6 +238,7 @@
|
|||
font: 11px arial;
|
||||
pointer-events: none;
|
||||
white-space: nowrap;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
|
||||
#id-toolbar-btn-num-format button .caption {
|
||||
|
|
|
@ -61,9 +61,15 @@ define([
|
|||
},
|
||||
|
||||
initialize: function() {
|
||||
var me = this;
|
||||
this.addListeners({
|
||||
'CellEditor': {
|
||||
'function:click': this.onInsertFunction.bind(this)
|
||||
'function:click': this.onInsertFunction.bind(this),
|
||||
'function:hint': function (name, type) {
|
||||
setTimeout(function(){
|
||||
me.api.asc_insertFormula(name, type, false);
|
||||
}, 0);
|
||||
}
|
||||
}
|
||||
// 'Viewport': {
|
||||
// 'layout:resizedrag': _.bind(this.onLayoutResize, this)
|
||||
|
@ -77,6 +83,7 @@ define([
|
|||
// this.api.isCEditorFocused = false;
|
||||
this.api.asc_registerCallback('asc_onSelectionNameChanged', _.bind(this.onApiCellSelection, this));
|
||||
this.api.asc_registerCallback('asc_onEditCell', _.bind(this.onApiEditCell, this));
|
||||
this.api.asc_registerCallback('asc_onFormulaCompleteMenu', _.bind(this.onFormulaCompleteMenu, this));
|
||||
// this.api.asc_registerCallback('asc_onCoAuthoringDisconnect', _.bind(this.onApiDisconnect,this));
|
||||
// Common.NotificationCenter.on('api:disconnect', _.bind(this.onApiDisconnect, this));
|
||||
// Common.NotificationCenter.on('cells:range', _.bind(this.onCellsRange, this));
|
||||
|
@ -176,6 +183,15 @@ define([
|
|||
button: '#ce-function'
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
onFormulaCompleteMenu: function(funcarr) {
|
||||
if ( funcarr && funcarr.length ) {
|
||||
this.editor.resetFunctionsHint(funcarr);
|
||||
!this.editor.$boxfuncs.hasClass('.opened') && this.editor.$boxfuncs.addClass('opened');
|
||||
} else {
|
||||
this.editor.$boxfuncs.removeClass('opened');
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
|
@ -127,7 +127,7 @@ define([
|
|||
}
|
||||
break;
|
||||
case 'unmerge':
|
||||
me.api.asc_mergeCells(Asc.c_oAscMergeOptions.Unmerge);
|
||||
me.api.asc_mergeCells(Asc.c_oAscMergeOptions.None);
|
||||
break;
|
||||
case 'hide':
|
||||
me.api[info.asc_getFlags().asc_getSelectionType() == Asc.c_oAscSelectionType.RangeRow ? 'asc_hideRows' : 'asc_hideColumns']();
|
||||
|
@ -182,7 +182,7 @@ define([
|
|||
onApiShowPopMenu: function(posX, posY) {
|
||||
if ( !_isEdit ) return;
|
||||
|
||||
if ($('.popover.settings, .popup.settings, .picker-modal.settings, .modal-in').length > 0) {
|
||||
if ($('.popover.settings, .popup.settings, .picker-modal.settings, .modal-in, .actions-modal').length > 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -278,12 +278,13 @@ define([
|
|||
event: 'edit'
|
||||
});
|
||||
|
||||
(cellinfo.asc_getFlags().asc_getMerge() == Asc.c_oAscMergeOptions.None) &&
|
||||
menuItems.push({
|
||||
caption: me.menuMerge,
|
||||
event: 'merge'
|
||||
});
|
||||
|
||||
cellinfo.asc_getFlags().asc_getMerge() &&
|
||||
(cellinfo.asc_getFlags().asc_getMerge() == Asc.c_oAscMergeOptions.Merge) &&
|
||||
menuItems.push({
|
||||
caption: me.menuUnmerge,
|
||||
event: 'unmerge'
|
||||
|
|
|
@ -80,7 +80,6 @@ define([
|
|||
isDisconnected : false,
|
||||
usersCount : 1,
|
||||
fastCoauth : true,
|
||||
startModifyDocument : true,
|
||||
lostEditingRights : false,
|
||||
licenseWarning : false
|
||||
};
|
||||
|
@ -306,15 +305,9 @@ define([
|
|||
me.setLongActionView(action)
|
||||
} else {
|
||||
if (me._state.fastCoauth && me._state.usersCount>1 && id==Asc.c_oAscAsyncAction['Save']) {
|
||||
var me = me;
|
||||
if (me._state.timerSave===undefined)
|
||||
me._state.timerSave = setInterval(function(){
|
||||
if ((new Date()) - me._state.isSaving>500) {
|
||||
clearInterval(me._state.timerSave);
|
||||
// console.debug('End long action');
|
||||
me._state.timerSave = undefined;
|
||||
}
|
||||
}, 500);
|
||||
// me._state.timerSave = setTimeout(function () {
|
||||
//console.debug('End long action');
|
||||
// }, 500);
|
||||
} else {
|
||||
// console.debug('End long action');
|
||||
}
|
||||
|
@ -347,7 +340,7 @@ define([
|
|||
break;
|
||||
|
||||
case Asc.c_oAscAsyncAction['Save']:
|
||||
me._state.isSaving = new Date();
|
||||
// clearTimeout(me._state.timerSave);
|
||||
title = me.saveTitleText;
|
||||
text = me.saveTextText;
|
||||
break;
|
||||
|
@ -653,7 +646,6 @@ define([
|
|||
|
||||
me.api.asc_registerCallback('asc_onDocumentModifiedChanged', _.bind(me.onDocumentModifiedChanged, me));
|
||||
me.api.asc_registerCallback('asc_onDocumentCanSaveChanged', _.bind(me.onDocumentCanSaveChanged, me));
|
||||
me.api.asc_registerCallback('asc_onSaveUrl', _.bind(me.onSaveUrl, me));
|
||||
/** coauthoring begin **/
|
||||
me.api.asc_registerCallback('asc_onCollaborativeChanges', _.bind(me.onCollaborativeChanges, me));
|
||||
me.api.asc_registerCallback('asc_OnTryUndoInFastCollaborative',_.bind(me.onTryUndoInFastCollaborative, me));
|
||||
|
@ -794,6 +786,7 @@ define([
|
|||
|
||||
case Asc.c_oAscError.ID.FrmlOperandExpected:
|
||||
config.msg = this.errorOperandExpected;
|
||||
config.closable = true;
|
||||
break;
|
||||
|
||||
case Asc.c_oAscError.ID.VKeyEncrypt:
|
||||
|
@ -883,6 +876,7 @@ define([
|
|||
|
||||
case Asc.c_oAscError.ID.FrmlWrongReferences:
|
||||
config.msg = this.errorFrmlWrongReferences;
|
||||
config.closable = true;
|
||||
break;
|
||||
|
||||
case Asc.c_oAscError.ID.CopyMultiselectAreaError:
|
||||
|
@ -973,21 +967,12 @@ define([
|
|||
if (window.document.title != title)
|
||||
window.document.title = title;
|
||||
|
||||
if (!this._state.fastCoauth || this._state.usersCount<2 )
|
||||
Common.Gateway.setDocumentModified(isModified);
|
||||
else if ( this._state.startModifyDocument!==undefined && this._state.startModifyDocument === isModified){
|
||||
Common.Gateway.setDocumentModified(isModified);
|
||||
this._state.startModifyDocument = (this._state.startModifyDocument) ? !this._state.startModifyDocument : undefined;
|
||||
}
|
||||
|
||||
Common.Gateway.setDocumentModified(isModified);
|
||||
this._state.isDocModified = isModified;
|
||||
}
|
||||
},
|
||||
|
||||
onDocumentModifiedChanged: function() {
|
||||
if (this._state.fastCoauth && this._state.usersCount > 1 && this._state.startModifyDocument===undefined )
|
||||
return;
|
||||
|
||||
var isModified = this.api.asc_isDocumentCanSave();
|
||||
if (this._state.isDocModified !== isModified) {
|
||||
Common.Gateway.setDocumentModified(this.api.asc_isDocumentModified());
|
||||
|
@ -1023,10 +1008,6 @@ define([
|
|||
$('#loading-mask').hide().remove();
|
||||
},
|
||||
|
||||
onSaveUrl: function(url) {
|
||||
Common.Gateway.save(url);
|
||||
},
|
||||
|
||||
onDownloadUrl: function(url) {
|
||||
if (this._state.isFromGatewayDownloadAs) {
|
||||
Common.Gateway.downloadAs(url);
|
||||
|
|
|
@ -87,6 +87,7 @@ define([
|
|||
|
||||
_.defer(function () {
|
||||
var editorLang = SSE.getController("Main").editorConfig.lang;
|
||||
editorLang = (editorLang ? editorLang : 'en').split("-")[0].toLowerCase();
|
||||
|
||||
var localizationFunctions = function(data) {
|
||||
fc = data;
|
||||
|
@ -107,6 +108,8 @@ define([
|
|||
functions = {},
|
||||
editorLang = SSE.getController("Main").editorConfig.lang;
|
||||
|
||||
editorLang = (editorLang ? editorLang : 'en').split("-")[0].toLowerCase();
|
||||
|
||||
var localizationFunctionsDesc = function (data) {
|
||||
var jsonDesc = {},
|
||||
view = me.getView('AddFunction');
|
||||
|
|
|
@ -82,12 +82,13 @@
|
|||
<div id="addother-imagefromurl">
|
||||
<div class="page" id="addimage-fromurl" data-page="addimage-url">
|
||||
<div class="page-content">
|
||||
<div class="content-block-title"><%= scope.textAddress %></div>
|
||||
<% if (!android) { %><div class="content-block-title"><%= scope.textAddress %></div><% } %>
|
||||
<div class="list-block">
|
||||
<ul>
|
||||
<li>
|
||||
<div id="addimage-link-url" class="item-content">
|
||||
<div class="item-inner">
|
||||
<% if (android) { %><div class="item-title label"><%= scope.textAddress %></div><% } %>
|
||||
<div class="item-input">
|
||||
<input type="url" placeholder="<%= scope.textImageURL %>">
|
||||
</div>
|
||||
|
|
|
@ -11,4 +11,7 @@
|
|||
<div class="ce-group group-expand">
|
||||
<button id="ce-btn-expand" type="button" class="btn"><span class="caret"></span></button>
|
||||
</div>
|
||||
<div class="ce-group group-functions-list">
|
||||
<ul class="func-list"></ul>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -47,7 +47,6 @@ define([
|
|||
'use strict';
|
||||
|
||||
SSE.Views.CellEditor = Backbone.View.extend({
|
||||
|
||||
el: '.pages > .page',
|
||||
template: _.template(template),
|
||||
|
||||
|
@ -58,6 +57,9 @@ define([
|
|||
}
|
||||
},
|
||||
|
||||
touch: {},
|
||||
tplHintItem: _.template('<li><a><%= caption %></a></li>'),
|
||||
|
||||
initialize: function (options) {
|
||||
},
|
||||
|
||||
|
@ -67,8 +69,17 @@ define([
|
|||
|
||||
this.$cellname = $('#ce-cell-name', this.el);
|
||||
this.$btnexpand = $('#ce-btn-expand', this.el);
|
||||
this.$boxfuncs = $('.group-functions-list', this.el);
|
||||
this.$listfuncs = $('.func-list', this.$boxfuncs);
|
||||
|
||||
// this.$btnfunc = $('#ce-function', this.el);
|
||||
|
||||
this.$listfuncs.on({
|
||||
'touchstart': this.onTouchStart.bind(this),
|
||||
'touchmove': this.onTouchMove.bind(this),
|
||||
'touchend': this.onTouchEnd.bind(this)
|
||||
});
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
|
@ -91,10 +102,90 @@ define([
|
|||
// Common.NotificationCenter.trigger('edit:complete', this.editor, {restorefocus:true});
|
||||
},
|
||||
|
||||
clearFunctionsHint: function () {
|
||||
this.$listfuncs.find('li').off('click');
|
||||
this.$listfuncs.empty();
|
||||
this.$listfuncs.scrollLeft(0);
|
||||
},
|
||||
|
||||
cellNameDisabled: function(disabled){
|
||||
// (disabled) ? this.$cellname.attr('disabled', 'disabled') : this.$cellname.removeAttr('disabled');
|
||||
// this.$btnfunc.toggleClass('disabled', disabled);
|
||||
// this.btnNamedRanges.setDisabled(disabled);
|
||||
},
|
||||
|
||||
resetFunctionsHint: function(funcarr) {
|
||||
this.clearFunctionsHint();
|
||||
|
||||
var me = this;
|
||||
var onhintclick = function(name, type, e) {
|
||||
this.fireEvent('function:hint', [name, type]);
|
||||
};
|
||||
|
||||
var items = [];
|
||||
_.each(funcarr, function(func, index) {
|
||||
var $item = $(me.tplHintItem({
|
||||
caption: func.asc_getName()
|
||||
}));
|
||||
|
||||
$item.on('click', onhintclick.bind(me, func.asc_getName(), func.asc_getType()));
|
||||
items.push($item);
|
||||
});
|
||||
|
||||
this.$listfuncs.append(items);
|
||||
},
|
||||
|
||||
hasHiddenFunctionsHint: function() {
|
||||
var _left_bound_ = this.$boxfuncs.offset().left,
|
||||
_right_bound_ = _left_bound_ + this.$boxfuncs.width();
|
||||
|
||||
var $items = this.$listfuncs.find('li');
|
||||
var rect = $items.first().get(0).getBoundingClientRect();
|
||||
|
||||
if ( !(rect.left < _left_bound_) ) {
|
||||
rect = $items.last().get(0).getBoundingClientRect();
|
||||
|
||||
if ( !(rect.right > _right_bound_) )
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
},
|
||||
|
||||
onTouchStart: function(e) {
|
||||
if ( this.hasHiddenFunctionsHint() ) {
|
||||
var touches = e.originalEvent.changedTouches;
|
||||
this.touch.startx = touches[0].clientX;
|
||||
this.touch.scrollx = this.$listfuncs.scrollLeft();
|
||||
|
||||
this.touch.timer = setTimeout(function () {
|
||||
// touch.longtouch = true;
|
||||
}, 500);
|
||||
e.preventDefault();
|
||||
}
|
||||
},
|
||||
|
||||
onTouchMove: function(e) {
|
||||
if ( this.touch.startx !== undefined ) {
|
||||
var touches = e.originalEvent.changedTouches;
|
||||
|
||||
if ( this.touch.longtouch ) {}
|
||||
else {
|
||||
if ( this.touch.timer ) clearTimeout(this.touch.timer), delete this.touch.timer;
|
||||
this.$listfuncs.scrollLeft(this.touch.scrollx + (this.touch.startx - touches[0].clientX));
|
||||
}
|
||||
|
||||
e.preventDefault();
|
||||
}
|
||||
},
|
||||
|
||||
onTouchEnd: function(e) {
|
||||
if ( this.touch.startx !== undefined ) {
|
||||
this.touch.longtouch = false;
|
||||
delete this.touch.startx;
|
||||
e.preventDefault();
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
|
|
|
@ -188,6 +188,11 @@ define([
|
|||
var me = this;
|
||||
$('.settings .sortdown').single('click', function (e) {me.fireEvent('insert:sort',['down']);});
|
||||
$('.settings .sortup').single('click', function (e) {me.fireEvent('insert:sort',['up']);});
|
||||
|
||||
// temporary hidden
|
||||
// TODO: make filter's options menu
|
||||
$('.settings #other-chb-insfilter').parents('.list-block').hide();
|
||||
|
||||
$('.settings #other-chb-insfilter input:checkbox').single('change', function (e) {
|
||||
var $checkbox = $(e.currentTarget);
|
||||
me.fireEvent('insert:filter', [$checkbox.is(':checked')]);
|
||||
|
|
|
@ -283,7 +283,8 @@
|
|||
"SSE.Views.AddOther.textInsert": "Einfügen",
|
||||
"SSE.Views.AddOther.textInsertImage": "Bild einfügen",
|
||||
"SSE.Views.AddOther.textLink": "Link",
|
||||
"SSE.Views.AddOther.textSort": "Sortieren und Filtern",
|
||||
"SSE.Views.AddOther.textSortOrig": "Sortieren und Filtern",
|
||||
"SSE.Views.AddOther.textSort": "Sortieren",
|
||||
"SSE.Views.EditCell.textAccounting": "Rechnungswesen",
|
||||
"SSE.Views.EditCell.textAlignBottom": "Unten ausrichten",
|
||||
"SSE.Views.EditCell.textAlignCenter": "Zentriert ausrichten",
|
||||
|
|
|
@ -285,7 +285,8 @@
|
|||
"SSE.Views.AddOther.textInsert": "Insert",
|
||||
"SSE.Views.AddOther.textInsertImage": "Insert Image",
|
||||
"SSE.Views.AddOther.textLink": "Link",
|
||||
"SSE.Views.AddOther.textSort": "Sort and Filter",
|
||||
"SSE.Views.AddOther.textSortOrig": "Sort and Filter",
|
||||
"SSE.Views.AddOther.textSort": "Sort",
|
||||
"SSE.Views.EditCell.textAccounting": "Accounting",
|
||||
"SSE.Views.EditCell.textAlignBottom": "Align Bottom",
|
||||
"SSE.Views.EditCell.textAlignCenter": "Align Center",
|
||||
|
|
|
@ -283,6 +283,7 @@
|
|||
"SSE.Views.AddOther.textInsert": "Insérer",
|
||||
"SSE.Views.AddOther.textInsertImage": "Insérer une image",
|
||||
"SSE.Views.AddOther.textLink": "Lien",
|
||||
"SSE.Views.AddOther.textSortOrig": "Trier",
|
||||
"SSE.Views.AddOther.textSort": "Trier et filtrer",
|
||||
"SSE.Views.EditCell.textAccounting": "Comptabilité",
|
||||
"SSE.Views.EditCell.textAlignBottom": "Aligner en bas",
|
||||
|
|
|
@ -283,7 +283,8 @@
|
|||
"SSE.Views.AddOther.textInsert": "Вставить",
|
||||
"SSE.Views.AddOther.textInsertImage": "Вставить изображение",
|
||||
"SSE.Views.AddOther.textLink": "Ссылка",
|
||||
"SSE.Views.AddOther.textSort": "Сортировка и фильтрация",
|
||||
"SSE.Views.AddOther.textSortOrig": "Сортировка и фильтрация",
|
||||
"SSE.Views.AddOther.textSort": "Сортировка",
|
||||
"SSE.Views.EditCell.textAccounting": "Финансовый",
|
||||
"SSE.Views.EditCell.textAlignBottom": "По нижнему краю",
|
||||
"SSE.Views.EditCell.textAlignCenter": "По центру",
|
||||
|
|
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue