Merge branch 'develop' into feature/sparklines

This commit is contained in:
Julia Radzhabova 2016-10-07 11:10:43 +03:00
commit e32d00d91a
30 changed files with 216 additions and 42 deletions

View file

@ -57,6 +57,14 @@ define([
findRevisions: function(revision) { findRevisions: function(revision) {
return this.where({revision: revision}); return this.where({revision: revision});
},
hasChanges: function() {
return !!this.findWhere({isRevision: false});
},
hasCollapsed: function() {
return !!this.findWhere({isRevision: true, hasChanges: true, isExpanded: false});
} }
}); });
}); });

View file

@ -396,7 +396,7 @@ define([
'</div>', '</div>',
'</div>', '</div>',
'<div style="position: absolute; left: <%=scope.tablePadding%>px; top: <%=scope.tablePadding%>px; right: <%=scope.tablePadding%>px; bottom: <%=scope.tablePadding%>px;">', '<div style="position: absolute; left: <%=scope.tablePadding%>px; top: <%=scope.tablePadding%>px; right: <%=scope.tablePadding%>px; bottom: <%=scope.tablePadding%>px;">',
'<table cols="<%=scope.columns%>" width="100%" height="100%" style="border-collapse: inherit; border-spacing: <%= scope.spacingMode ? scope.cellPadding : 0 %>px;">', '<table id="<%=scope.id%>-table-content" cols="<%=scope.columns%>" width="100%" height="100%" style="border-collapse: inherit; border-spacing: <%= scope.spacingMode ? scope.cellPadding : 0 %>px;">',
'<% for (var row = 0; row < scope.rows; row++) { %>', '<% for (var row = 0; row < scope.rows; row++) { %>',
'<tr>', '<tr>',
'<% for (var col = 0; col < scope.columns; col++) { %>', '<% for (var col = 0; col < scope.columns; col++) { %>',
@ -441,7 +441,8 @@ define([
topBorder, rightBorder, bottomBorder, leftBorder, topBorder, rightBorder, bottomBorder, leftBorder,
topBorderSelector, rightBorderSelector, bottomBorderSelector, topBorderSelector, rightBorderSelector, bottomBorderSelector,
leftBorderSelector, leftBorderSelector,
virtualBorderSize, virtualBorderColor; virtualBorderSize, virtualBorderColor,
table_content, cells_content;
me.id = me.options.id || Common.UI.getId(); me.id = me.options.id || Common.UI.getId();
me.width = me.options.width; me.width = me.options.width;
@ -501,6 +502,10 @@ define([
rightBorderSelector = $('#' + meId + '-table-right-border-selector'); rightBorderSelector = $('#' + meId + '-table-right-border-selector');
bottomBorderSelector = $('#' + meId + '-table-bottom-border-selector'); bottomBorderSelector = $('#' + meId + '-table-bottom-border-selector');
leftBorderSelector = $('#' + meId + '-table-left-border-selector'); leftBorderSelector = $('#' + meId + '-table-left-border-selector');
table_content = $('#' + meId + '-table-content');
cells_content = table_content.find('.cell-content');
table_content.find('.content-box').css('height', (me.rows>1) ? '50%' : 'auto');
topBorderSelector.on('click', function(e){ topBorderSelector.on('click', function(e){
if (me.overwriteStyle){ if (me.overwriteStyle){
@ -671,6 +676,14 @@ define([
return null; return null;
}; };
me.setTableColor = function(color) {
table_content.css('background-color', (color == 'transparent' ) ? color : ('#'+color));
};
me.setCellsColor = function(color) {
cells_content.css('background-color', (color == 'transparent' ) ? color : ('#'+color));
};
if (me.options.el) { if (me.options.el) {
me.render(null, { me.render(null, {
borderSize: borderSize, borderSize: borderSize,

View file

@ -66,6 +66,7 @@ define([
this.panelHistory= this.createView('Common.Views.History', { this.panelHistory= this.createView('Common.Views.History', {
storeHistory: this.getApplication().getCollection('Common.Collections.HistoryVersions') storeHistory: this.getApplication().getCollection('Common.Collections.HistoryVersions')
}); });
this.panelHistory.storeHistory.on('reset', _.bind(this.onResetStore, this));
this.panelHistory.on('render:after', _.bind(this.onAfterRender, this)); this.panelHistory.on('render:after', _.bind(this.onAfterRender, this));
Common.Gateway.on('sethistorydata', _.bind(this.onSetHistoryData, this)); Common.Gateway.on('sethistorydata', _.bind(this.onSetHistoryData, this));
}, },
@ -86,6 +87,13 @@ define([
onAfterRender: function(historyView) { onAfterRender: function(historyView) {
historyView.viewHistoryList.on('item:click', _.bind(this.onSelectRevision, this)); historyView.viewHistoryList.on('item:click', _.bind(this.onSelectRevision, this));
historyView.btnBackToDocument.on('click', _.bind(this.onClickBackToDocument, this)); historyView.btnBackToDocument.on('click', _.bind(this.onClickBackToDocument, this));
historyView.btnExpand.on('click', _.bind(this.onClickExpand, this));
},
onResetStore: function() {
var hasChanges = this.panelHistory.storeHistory.hasChanges();
this.panelHistory.$el.find('#history-expand-changes')[hasChanges ? 'show' : 'hide']();
this.panelHistory.$el.find('#history-list').css('padding-bottom', hasChanges ? '45px' : 0);
}, },
onDownloadUrl: function(url) { onDownloadUrl: function(url) {
@ -183,6 +191,20 @@ define([
Common.Gateway.requestHistoryClose(); Common.Gateway.requestHistoryClose();
}, },
onClickExpand: function () {
var store = this.panelHistory.storeHistory,
needExpand = store.hasCollapsed();
store.where({isRevision: true, hasChanges: true, isExpanded: !needExpand}).forEach(function(item){
item.set('isExpanded', needExpand);
});
store.where({isRevision: false}).forEach(function(item){
item.set('isVisible', needExpand);
});
this.panelHistory.viewHistoryList.scroller.update({minScrollbarLength: 40});
this.panelHistory.btnExpand.cmpEl.text(needExpand ? this.panelHistory.textHideAll : this.panelHistory.textShowAll);
},
notcriticalErrorTitle: 'Warning' notcriticalErrorTitle: 'Warning'
}, Common.Controllers.History || {})); }, Common.Controllers.History || {}));

View file

@ -2,6 +2,6 @@
<div id="header-logo"></div> <div id="header-logo"></div>
<div id="header-caption"><div><%= headerCaption %></div></div> <div id="header-caption"><div><%= headerCaption %></div></div>
<div id="header-developer" class="hidden"><div><%= headerDeveloper %></div></div> <div id="header-developer" class="hidden"><div><%= headerDeveloper %></div></div>
<div id="header-documentcaption"><span><%= documentCaption %></span></div> <div id="header-documentcaption"><div><%= documentCaption %></div></div>
<div id="header-back" style="display: <%= canBack ? 'table-cell' : 'none' %>;"><div><%= textBack %></div></div> <div id="header-back" style="display: <%= canBack ? 'table-cell' : 'none' %>;"><div><%= textBack %></div></div>
</div> </div>

View file

@ -96,11 +96,11 @@ Common.Utils = _.extend(new(function() {
Table : 1, Table : 1,
Image : 2, Image : 2,
Header : 3, Header : 3,
Shape : 4, TextArt : 4,
Slide : 5, Shape : 5,
Chart : 6, Slide : 6,
MailMerge : 7, Chart : 7,
TextArt : 8 MailMerge : 8
}, },
me = this, me = this,
checkSize = function() { checkSize = function() {

View file

@ -166,7 +166,7 @@ define([
if (!value) if (!value)
value = ''; value = '';
var dc = $('#header-documentcaption span'); var dc = $('#header-documentcaption div');
if (dc) if (dc)
dc.html(Common.Utils.String.htmlEncode(value)); dc.html(Common.Utils.String.htmlEncode(value));
@ -228,7 +228,7 @@ define([
}, },
setCanRename: function(rename) { setCanRename: function(rename) {
var dc = $('#header-documentcaption span'); var dc = $('#header-documentcaption div');
if (rename) { if (rename) {
var me = this; var me = this;
dc.tooltip({title: me.txtRename, placement: 'cursor'}); dc.tooltip({title: me.txtRename, placement: 'cursor'});
@ -252,6 +252,7 @@ define([
dc.off('click'); dc.off('click');
} }
dc.css('cursor', rename ? 'pointer' : 'default'); dc.css('cursor', rename ? 'pointer' : 'default');
dc.toggleClass('renamed', rename);
}, },
textBack: 'Go to Documents', textBack: 'Go to Documents',

View file

@ -55,10 +55,13 @@ define([
template: _.template([ template: _.template([
'<div id="history-box" class="layout-ct vbox">', '<div id="history-box" class="layout-ct vbox">',
'<div id="history-header" class="">', '<div id="history-header" class="">',
'<div id="history-btn-back"><%=scope.textHistoryHeader%></div>', '<div id="history-btn-back"><%=scope.textCloseHistory%></div>',
'</div>', '</div>',
'<div id="history-list" class="">', '<div id="history-list" class="">',
'</div>', '</div>',
'<div id="history-expand-changes" class="">',
'<div id="history-btn-expand"><%=scope.textHideAll%></div>',
'</div>',
'</div>' '</div>'
].join('')), ].join('')),
@ -110,6 +113,7 @@ define([
this.scroller.update({minScrollbarLength: 40}); this.scroller.update({minScrollbarLength: 40});
} else } else
Common.UI.DataView.prototype.onClickItem.call(this, view, record, e); Common.UI.DataView.prototype.onClickItem.call(this, view, record, e);
me.btnExpand.cmpEl.text(me.storeHistory.hasCollapsed() ? me.textShowAll : me.textHideAll);
}; };
var changetooltip = function (dataview, view, record) { var changetooltip = function (dataview, view, record) {
@ -132,14 +136,22 @@ define([
enableToggle: false enableToggle: false
}); });
this.btnExpand = new Common.UI.Button({
el: $('#history-btn-expand'),
enableToggle: false
});
this.trigger('render:after', this); this.trigger('render:after', this);
return this; return this;
}, },
textHistoryHeader: 'Back to Document', textHistoryHeader: 'Back to Document',
textRestore: 'Restore', textRestore: 'Restore',
textShow: 'Show Changes', textShow: 'Expand',
textHide: 'Hide Changes' textHide: 'Collapse',
textCloseHistory: 'Close History',
textHideAll: 'Hide detailed changes',
textShowAll: 'Show detailed changes'
}, Common.Views.History || {})) }, Common.Views.History || {}))
}); });

View file

@ -80,8 +80,17 @@
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
background-color: @app-header-bg-color; background-color: @app-header-bg-color;
padding: 0 15px + @app-header-height / 3; padding: 0 7px + @app-header-height / 3;
cursor: default; cursor: default;
div {
display: inline-block;
padding: 2px 8px;
&.renamed {
background-color: @app-header-bg-color-dark;
}
}
} }
#header-back { #header-back {

View file

@ -26,10 +26,33 @@
} }
} }
#history-expand-changes {
position: absolute;
height: 45px;
left: 0;
bottom: 0;
right: 0;
overflow: hidden;
border-top: 1px solid @gray-dark;
#history-btn-expand {
height: 27px;
margin-top: 8px;
padding-top: 4px;
padding-left: 20px;
font-size: 13px;
cursor: pointer;
&:hover {
background-color: @secondary;
}
}
}
#history-list { #history-list {
height: 100%; height: 100%;
overflow: hidden; overflow: hidden;
padding-top: 45px; padding: 45px 0;
.item { .item {
display: block; display: block;

View file

@ -18,7 +18,7 @@
.tablestyler-cell .cell-content .content-text { .tablestyler-cell .cell-content .content-text {
display: block; display: block;
background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAAECAAAAACBhLHlAAAAEUlEQVR42mM4cIABiP7/ByIAJwAG/emrCjYAAAAASUVORK5CYII=') repeat 0 0 scroll; background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAAECAQAAAAO5iayAAAAAXNSR0IArs4c6QAAAAJiS0dEAP+Hj8y/AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4AkeChACzh0FVAAAABFJREFUCNdjPPCfgYGJAQUAACB0AcMrPC7hAAAAAElFTkSuQmCC') repeat 0 0 scroll;
height: 100%; height: 100%;
} }
} }

View file

@ -190,10 +190,6 @@ define([
var close_menu = true; var close_menu = true;
switch (action) { switch (action) {
case 'back': case 'back':
if (this.mode.canUseHistory && this.leftMenu.panelHistory.isVisible()) {
// reload editor
Common.Gateway.requestHistoryClose();
}
break; break;
case 'save': this.api.asc_Save(); break; case 'save': this.api.asc_Save(); break;
case 'save-desktop': this.api.asc_DownloadAs(); break; case 'save-desktop': this.api.asc_DownloadAs(); break;

View file

@ -403,7 +403,7 @@ define([
markedAsVersion: (group!==version.versionGroup), markedAsVersion: (group!==version.versionGroup),
selected: (opts.data.currentVersion == version.version), selected: (opts.data.currentVersion == version.version),
canRestore: this.appOptions.canHistoryRestore && (ver < versions.length-1), canRestore: this.appOptions.canHistoryRestore && (ver < versions.length-1),
isExpanded: false isExpanded: true
})); }));
if (opts.data.currentVersion == version.version) { if (opts.data.currentVersion == version.version) {
currentVersion = arrVersions[arrVersions.length-1]; currentVersion = arrVersions[arrVersions.length-1];
@ -451,7 +451,7 @@ define([
selected: false, selected: false,
canRestore: this.appOptions.canHistoryRestore, canRestore: this.appOptions.canHistoryRestore,
isRevision: false, isRevision: false,
isVisible: false isVisible: true
})); }));
arrColors.push(user.get('colorval')); arrColors.push(user.get('colorval'));
} }

View file

@ -212,8 +212,6 @@ define([
this._settings[Common.Utils.documentSettingsType.Image].needShow = false; this._settings[Common.Utils.documentSettingsType.Image].needShow = false;
this._settings[Common.Utils.documentSettingsType.Chart].needShow = false; this._settings[Common.Utils.documentSettingsType.Chart].needShow = false;
this._settings[Common.Utils.documentSettingsType.Shape].needShow = false;
this._settings[Common.Utils.documentSettingsType.TextArt].needShow = false;
}, },
onCoAuthoringDisconnect: function() { onCoAuthoringDisconnect: function() {

View file

@ -252,6 +252,7 @@ define([
toolbar.mnuPageNumberPosPicker.on('item:click', _.bind(this.onInsertPageNumberClick, this)); toolbar.mnuPageNumberPosPicker.on('item:click', _.bind(this.onInsertPageNumberClick, this));
toolbar.btnEditHeader.menu.on('item:click', _.bind(this.onEditHeaderFooterClick, this)); toolbar.btnEditHeader.menu.on('item:click', _.bind(this.onEditHeaderFooterClick, this));
toolbar.mnuPageNumCurrentPos.on('click', _.bind(this.onPageNumCurrentPosClick, this)); toolbar.mnuPageNumCurrentPos.on('click', _.bind(this.onPageNumCurrentPosClick, this));
toolbar.mnuInsertPageCount.on('click', _.bind(this.onInsertPageCountClick, this));
toolbar.listStyles.on('click', _.bind(this.onListStyleSelect, this)); toolbar.listStyles.on('click', _.bind(this.onListStyleSelect, this));
toolbar.listStyles.on('contextmenu', _.bind(this.onListStyleContextMenu, this)); toolbar.listStyles.on('contextmenu', _.bind(this.onListStyleContextMenu, this));
toolbar.styleMenu.on('hide:before', _.bind(this.onListStyleBeforeHide, this)); toolbar.styleMenu.on('hide:before', _.bind(this.onListStyleBeforeHide, this));
@ -1699,6 +1700,14 @@ define([
Common.component.Analytics.trackEvent('ToolBar', 'Page Number'); Common.component.Analytics.trackEvent('ToolBar', 'Page Number');
}, },
onInsertPageCountClick: function(item, e) {
if (this.api)
this.api.asc_AddPageCount();
Common.NotificationCenter.trigger('edit:complete', this.toolbar);
Common.component.Analytics.trackEvent('ToolBar', 'Pages Count');
},
onEditHeaderFooterClick: function(menu, item) { onEditHeaderFooterClick: function(menu, item) {
if (this.api) { if (this.api) {
if (item.value == 'header') if (item.value == 'header')

View file

@ -217,6 +217,8 @@ define([
me._changedProps.get_Shade().put_Color(Common.Utils.ThemeColor.getRgbColor(color)); me._changedProps.get_Shade().put_Color(Common.Utils.ThemeColor.getRgbColor(color));
} }
} }
var colorstr = (typeof(color) == 'object') ? color.color : color;
me.tableStyler.setCellsColor(colorstr);
}, me)); }, me));
}); });
this.btnBackColor.render( $('#drop-advanced-button-color')); this.btnBackColor.render( $('#drop-advanced-button-color'));
@ -706,6 +708,9 @@ define([
this._UpdateTableBordersStyle(ct, border, size, color, this.Borders); this._UpdateTableBordersStyle(ct, border, size, color, this.Borders);
}, this); }, this);
var colorstr = (typeof(this.paragraphShade) == 'object') ? this.paragraphShade.color : this.paragraphShade;
this.tableStyler.setCellsColor(colorstr);
if (this.isFrame) if (this.isFrame)
this.setHeight(500); this.setHeight(500);

View file

@ -88,7 +88,7 @@ define([
new Common.UI.MenuItem({ new Common.UI.MenuItem({
el : $('#fm-btn-return',this.el), el : $('#fm-btn-return',this.el),
action : 'back', action : 'back',
caption : this.btnReturnCaption, caption : this.btnCloseMenuCaption,
canFocused: false canFocused: false
}), }),
new Common.UI.MenuItem({ new Common.UI.MenuItem({
@ -329,6 +329,7 @@ define([
btnHistoryCaption : 'Versions History', btnHistoryCaption : 'Versions History',
btnSaveAsCaption : 'Save as', btnSaveAsCaption : 'Save as',
textDownload : 'Download', textDownload : 'Download',
btnRenameCaption : 'Rename...' btnRenameCaption : 'Rename...',
btnCloseMenuCaption : 'Close Menu'
}, DE.Views.FileMenu || {})); }, DE.Views.FileMenu || {}));
}); });

View file

@ -733,6 +733,9 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem
this._UpdateTableBordersStyle(ct, border, size, color, this.Borders); this._UpdateTableBordersStyle(ct, border, size, color, this.Borders);
}, this); }, this);
var colorstr = (typeof(this.paragraphShade) == 'object') ? this.paragraphShade.color : this.paragraphShade;
this.BordersImage.setCellsColor(colorstr);
if (this.storageName) { if (this.storageName) {
var value = Common.localStorage.getItem(this.storageName); var value = Common.localStorage.getItem(this.storageName);
this.setActiveCategory((value!==null) ? parseInt(value) : 0); this.setActiveCategory((value!==null) ? parseInt(value) : 0);
@ -888,6 +891,8 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem
this._changedProps.get_Shade().put_Color(Common.Utils.ThemeColor.getRgbColor(this.paragraphShade)); this._changedProps.get_Shade().put_Color(Common.Utils.ThemeColor.getRgbColor(this.paragraphShade));
} }
} }
var colorstr = (typeof(color) == 'object') ? color.color : color;
this.BordersImage.setCellsColor(colorstr);
}, },

View file

@ -1083,6 +1083,13 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
this._UpdateTableBordersStyle(ct, border, size, color, (this._allTable) ? this.TableBorders : this.CellBorders, (this._allTable) ? this.ChangedTableBorders : this.ChangedCellBorders); this._UpdateTableBordersStyle(ct, border, size, color, (this._allTable) ? this.TableBorders : this.CellBorders, (this._allTable) ? this.ChangedTableBorders : this.ChangedCellBorders);
}, this); }, this);
var cellcolorstr = (typeof(this.CellColor.Color) == 'object') ? this.CellColor.Color.color : this.CellColor.Color,
tablecolorstr = (typeof(this.TableColor.Color) == 'object') ? this.TableColor.Color.color : this.TableColor.Color;
this.tableBordersImageSpacing.setTableColor(tablecolorstr);
this.tableBordersImage.setTableColor(tablecolorstr);
this.tableBordersImageSpacing.setCellsColor(cellcolorstr);
this.tableBordersImage.setCellsColor((this._allTable) ? tablecolorstr : cellcolorstr);
if (this.storageName) { if (this.storageName) {
var value = Common.localStorage.getItem(this.storageName); var value = Common.localStorage.getItem(this.storageName);
this.setActiveCategory((value!==null) ? parseInt(value) : 0); this.setActiveCategory((value!==null) ? parseInt(value) : 0);
@ -1379,6 +1386,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
} }
this._changedProps = new Asc.CTableProp(); this._changedProps = new Asc.CTableProp();
this._changedProps.put_CellSelect(!this._allTable);
this._cellBackground = null; this._cellBackground = null;
this.ChangedTableBorders = undefined; this.ChangedTableBorders = undefined;
this.ChangedCellBorders = undefined; this.ChangedCellBorders = undefined;
@ -1673,6 +1681,10 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
this._cellBackground.put_Value(0); this._cellBackground.put_Value(0);
this._cellBackground.put_Color(Common.Utils.ThemeColor.getRgbColor(this.CellColor.Color)); this._cellBackground.put_Color(Common.Utils.ThemeColor.getRgbColor(this.CellColor.Color));
} }
var colorstr = (typeof(color) == 'object') ? color.color : color;
this.tableBordersImageSpacing.setCellsColor(colorstr);
if (!this._allTable)
this.tableBordersImage.setCellsColor(colorstr);
}, },
onColorsTableBackSelect: function(picker, color) { onColorsTableBackSelect: function(picker, color) {
@ -1693,6 +1705,11 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
background.put_Color(Common.Utils.ThemeColor.getRgbColor(this.TableColor.Color)); background.put_Color(Common.Utils.ThemeColor.getRgbColor(this.TableColor.Color));
} }
} }
var colorstr = (typeof(color) == 'object') ? color.color : color;
this.tableBordersImageSpacing.setTableColor(colorstr);
this.tableBordersImage.setTableColor(colorstr);
if (this._allTable)
this.tableBordersImage.setCellsColor(colorstr);
}, },
_UpdateBordersSpacing_: function (){ _UpdateBordersSpacing_: function (){

View file

@ -555,7 +555,9 @@ define([
}; };
this.mnuPageNumCurrentPos = clone(this.mnuPageNumberPosPicker); this.mnuPageNumCurrentPos = clone(this.mnuPageNumberPosPicker);
this.mnuInsertPageNum = clone(this.mnuPageNumberPosPicker); this.mnuInsertPageNum = clone(this.mnuPageNumberPosPicker);
this.mnuInsertPageCount = clone(this.mnuPageNumberPosPicker);
this.paragraphControls.push(this.mnuPageNumCurrentPos); this.paragraphControls.push(this.mnuPageNumCurrentPos);
this.paragraphControls.push(this.mnuInsertPageCount);
this.toolbarControls.push(this.btnEditHeader); this.toolbarControls.push(this.btnEditHeader);
this.btnInsertShape = new Common.UI.Button({ this.btnInsertShape = new Common.UI.Button({
@ -1262,11 +1264,16 @@ define([
}) })
] ]
}) })
}),
this.mnuInsertPageCount = new Common.UI.MenuItem({
caption: this.textInsertPageCount,
disabled: this.mnuInsertPageCount.isDisabled()
}) })
] ]
}) })
); );
this.paragraphControls.push(this.mnuPageNumCurrentPos); this.paragraphControls.push(this.mnuPageNumCurrentPos);
this.paragraphControls.push(this.mnuInsertPageCount);
this.mnuZoomOut = new Common.UI.Button({ this.mnuZoomOut = new Common.UI.Button({
el : $('#id-menu-zoom-out'), el : $('#id-menu-zoom-out'),
@ -1900,7 +1907,8 @@ define([
textRight: 'Right: ', textRight: 'Right: ',
textPageSizeCustom: 'Custom Page Size', textPageSizeCustom: 'Custom Page Size',
textPortrait: 'Portrait', textPortrait: 'Portrait',
textLandscape: 'Landscape' textLandscape: 'Landscape',
textInsertPageCount: 'Insert number of pages'
}, DE.Views.Toolbar || {})); }, DE.Views.Toolbar || {}));
}); });

View file

@ -143,8 +143,13 @@
"Common.Views.Header.textBack": "Go to Documents", "Common.Views.Header.textBack": "Go to Documents",
"Common.Views.Header.txtHeaderDeveloper": "DEVELOPER MODE", "Common.Views.Header.txtHeaderDeveloper": "DEVELOPER MODE",
"Common.Views.Header.txtRename": "Rename", "Common.Views.Header.txtRename": "Rename",
"Common.Views.History.textHistoryHeader": "Back to Document", "Common.Views.History.textCloseHistory": "Close History",
"del_Common.Views.History.textHistoryHeader": "Back to Document",
"Common.Views.History.textRestore": "Restore", "Common.Views.History.textRestore": "Restore",
"Common.Views.History.textShow": "Expand",
"Common.Views.History.textHide": "Collapse",
"Common.Views.History.textHideAll": "Hide detailed changes",
"Common.Views.History.textShowAll": "Show detailed changes",
"Common.Views.ImageFromUrlDialog.cancelButtonText": "Cancel", "Common.Views.ImageFromUrlDialog.cancelButtonText": "Cancel",
"Common.Views.ImageFromUrlDialog.okButtonText": "OK", "Common.Views.ImageFromUrlDialog.okButtonText": "OK",
"Common.Views.ImageFromUrlDialog.textUrl": "Paste an image URL:", "Common.Views.ImageFromUrlDialog.textUrl": "Paste an image URL:",
@ -868,6 +873,7 @@
"DE.Views.DropcapSettingsAdvanced.tipFontName": "Font Name", "DE.Views.DropcapSettingsAdvanced.tipFontName": "Font Name",
"DE.Views.DropcapSettingsAdvanced.txtNoBorders": "No borders", "DE.Views.DropcapSettingsAdvanced.txtNoBorders": "No borders",
"DE.Views.FileMenu.btnBackCaption": "Go to Documents", "DE.Views.FileMenu.btnBackCaption": "Go to Documents",
"DE.Views.FileMenu.btnCloseMenuCaption": "Close Menu",
"DE.Views.FileMenu.btnCreateNewCaption": "Create New", "DE.Views.FileMenu.btnCreateNewCaption": "Create New",
"DE.Views.FileMenu.btnDownloadCaption": "Download as...", "DE.Views.FileMenu.btnDownloadCaption": "Download as...",
"DE.Views.FileMenu.btnHelpCaption": "Help...", "DE.Views.FileMenu.btnHelpCaption": "Help...",
@ -1443,6 +1449,7 @@
"DE.Views.Toolbar.textHideTitleBar": "Hide Title Bar", "DE.Views.Toolbar.textHideTitleBar": "Hide Title Bar",
"DE.Views.Toolbar.textInMargin": "In Margin", "DE.Views.Toolbar.textInMargin": "In Margin",
"DE.Views.Toolbar.textInsColumnBreak": "Insert Column Break", "DE.Views.Toolbar.textInsColumnBreak": "Insert Column Break",
"DE.Views.Toolbar.textInsertPageCount": "Insert number of pages",
"DE.Views.Toolbar.textInsertPageNumber": "Insert page number", "DE.Views.Toolbar.textInsertPageNumber": "Insert page number",
"DE.Views.Toolbar.textInsPageBreak": "Insert Page Break", "DE.Views.Toolbar.textInsPageBreak": "Insert Page Break",
"DE.Views.Toolbar.textInsSectionBreak": "Insert Section Break", "DE.Views.Toolbar.textInsSectionBreak": "Insert Section Break",

View file

@ -48,6 +48,7 @@ define([
'common/main/lib/component/Tooltip', 'common/main/lib/component/Tooltip',
'common/main/lib/controller/Fonts', 'common/main/lib/controller/Fonts',
'common/main/lib/collection/TextArt', 'common/main/lib/collection/TextArt',
'common/main/lib/view/OpenDialog',
'presentationeditor/main/app/collection/ShapeGroups', 'presentationeditor/main/app/collection/ShapeGroups',
'presentationeditor/main/app/collection/SlideLayouts' 'presentationeditor/main/app/collection/SlideLayouts'
], function () { 'use strict'; ], function () { 'use strict';
@ -122,9 +123,12 @@ define([
this.api.asc_registerCallback('asc_onDocumentName', _.bind(this.onDocumentName, this)); this.api.asc_registerCallback('asc_onDocumentName', _.bind(this.onDocumentName, this));
this.api.asc_registerCallback('asc_onPrintUrl', _.bind(this.onPrintUrl, this)); this.api.asc_registerCallback('asc_onPrintUrl', _.bind(this.onPrintUrl, this));
this.api.asc_registerCallback('asc_onMeta', _.bind(this.onMeta, this)); this.api.asc_registerCallback('asc_onMeta', _.bind(this.onMeta, this));
this.api.asc_registerCallback('asc_onAdvancedOptions', _.bind(this.onAdvancedOptions, this));
Common.NotificationCenter.on('api:disconnect', _.bind(this.onCoAuthoringDisconnect, this)); Common.NotificationCenter.on('api:disconnect', _.bind(this.onCoAuthoringDisconnect, this));
Common.NotificationCenter.on('goback', _.bind(this.goBack, this)); Common.NotificationCenter.on('goback', _.bind(this.goBack, this));
this.isShowOpenDialog = false;
// Initialize api gateway // Initialize api gateway
this.editorConfig = {}; this.editorConfig = {};
this.appOptions = {}; this.appOptions = {};
@ -473,6 +477,8 @@ define([
this.loadMask = new Common.UI.LoadMask({owner: $('#viewport')}); this.loadMask = new Common.UI.LoadMask({owner: $('#viewport')});
this.loadMask.setTitle(title); this.loadMask.setTitle(title);
if (!this.isShowOpenDialog)
this.loadMask.show(); this.loadMask.show();
} }
else { else {
@ -1514,6 +1520,29 @@ define([
if (url) this.iframePrint.src = url; if (url) this.iframePrint.src = url;
}, },
onAdvancedOptions: function(advOptions) {
var type = advOptions.asc_getOptionId(),
me = this, dlg;
if (type == Asc.c_oAscAdvancedOptionsID.DRM) {
dlg = new Common.Views.OpenDialog({
type: type,
handler: function (value) {
me.isShowOpenDialog = false;
if (me && me.api) {
me.api.asc_setAdvancedOptions(type, new Asc.asc_CDRMAdvancedOptions(value));
me.loadMask && me.loadMask.show();
}
}
});
}
if (dlg) {
this.isShowOpenDialog = true;
this.loadMask && this.loadMask.hide();
this.onLongActionEnd(Asc.c_oAscAsyncActionType.BlockInteraction, LoadingDocument);
dlg.show();
}
},
updatePlugins: function(plugins) { // plugins from config updatePlugins: function(plugins) { // plugins from config
if (!plugins || !plugins.pluginsData || plugins.pluginsData.length<1) return; if (!plugins || !plugins.pluginsData || plugins.pluginsData.length<1) return;

View file

@ -91,7 +91,7 @@ define([
new Common.UI.MenuItem({ new Common.UI.MenuItem({
el : $('#fm-btn-return',this.el), el : $('#fm-btn-return',this.el),
action : 'back', action : 'back',
caption : this.btnReturnCaption, caption : this.btnCloseMenuCaption,
canFocused: false canFocused: false
}), }),
new Common.UI.MenuItem({ new Common.UI.MenuItem({
@ -324,6 +324,7 @@ define([
btnBackCaption : 'Go to Documents', btnBackCaption : 'Go to Documents',
btnSettingsCaption : 'Advanced Settings...', btnSettingsCaption : 'Advanced Settings...',
btnSaveAsCaption : 'Save as', btnSaveAsCaption : 'Save as',
btnRenameCaption : 'Rename...' btnRenameCaption : 'Rename...',
btnCloseMenuCaption : 'Close Menu'
}, PE.Views.FileMenu || {})); }, PE.Views.FileMenu || {}));
}); });

View file

@ -318,7 +318,7 @@ define([
strInputMode: 'Turn on hieroglyphs', strInputMode: 'Turn on hieroglyphs',
strZoom: 'Default Zoom Value', strZoom: 'Default Zoom Value',
okButtonText: 'Apply', okButtonText: 'Apply',
txtFitSlide: 'Fit Slide', txtFitSlide: 'Fit to Slide',
txtInput: 'Alternate Input', txtInput: 'Alternate Input',
strUnit: 'Unit of Measurement', strUnit: 'Unit of Measurement',
txtCm: 'Centimeter', txtCm: 'Centimeter',
@ -340,7 +340,7 @@ define([
textAutoRecover: 'Autorecover', textAutoRecover: 'Autorecover',
strAutoRecover: 'Turn on autorecover', strAutoRecover: 'Turn on autorecover',
txtInch: 'Inch', txtInch: 'Inch',
txtFitWidth: 'Fit Width' txtFitWidth: 'Fit to Width'
}, PE.Views.FileMenuPanels.Settings || {})); }, PE.Views.FileMenuPanels.Settings || {}));
PE.Views.FileMenuPanels.RecentFiles = Common.UI.BaseView.extend({ PE.Views.FileMenuPanels.RecentFiles = Common.UI.BaseView.extend({

View file

@ -368,8 +368,8 @@ define([
tipUsers : 'Document is currently being edited by several users.', tipUsers : 'Document is currently being edited by several users.',
tipMoreUsers : 'and %1 users.', tipMoreUsers : 'and %1 users.',
tipShowUsers : 'To see all users click the icon below.', tipShowUsers : 'To see all users click the icon below.',
tipFitPage : 'Fit Slide', tipFitPage : 'Fit to Slide',
tipFitWidth : 'Fit Width', tipFitWidth : 'Fit to Width',
tipZoomIn : 'Zoom In', tipZoomIn : 'Zoom In',
tipZoomOut : 'Zoom Out', tipZoomOut : 'Zoom Out',
tipZoomFactor : 'Magnification', tipZoomFactor : 'Magnification',

View file

@ -1586,8 +1586,8 @@ define([
textHideTitleBar: 'Hide Title Bar', textHideTitleBar: 'Hide Title Bar',
textHideStatusBar: 'Hide Status Bar', textHideStatusBar: 'Hide Status Bar',
textHideLines: 'Hide Rulers', textHideLines: 'Hide Rulers',
textFitPage: 'Fit Slide', textFitPage: 'Fit to Slide',
textFitWidth: 'Fit Width', textFitWidth: 'Fit to Width',
textZoom: 'Zoom', textZoom: 'Zoom',
tipInsertChart: 'Insert Chart', tipInsertChart: 'Insert Chart',
textLine: 'Line Chart', textLine: 'Line Chart',

View file

@ -95,6 +95,12 @@
"Common.Views.InsertTableDialog.txtMinText": "The minimum value for this field is {0}.", "Common.Views.InsertTableDialog.txtMinText": "The minimum value for this field is {0}.",
"Common.Views.InsertTableDialog.txtRows": "Number of Rows", "Common.Views.InsertTableDialog.txtRows": "Number of Rows",
"Common.Views.InsertTableDialog.txtTitle": "Table Size", "Common.Views.InsertTableDialog.txtTitle": "Table Size",
"Common.Views.OpenDialog.cancelButtonText": "Cancel",
"Common.Views.OpenDialog.okButtonText": "OK",
"Common.Views.OpenDialog.txtEncoding": "Encoding ",
"Common.Views.OpenDialog.txtPassword": "Password",
"Common.Views.OpenDialog.txtTitle": "Choose %1 options",
"Common.Views.OpenDialog.txtTitleProtected": "Protected File",
"Common.Views.PluginDlg.textLoading": "Loading", "Common.Views.PluginDlg.textLoading": "Loading",
"Common.Views.Plugins.strPlugins": "Plugins", "Common.Views.Plugins.strPlugins": "Plugins",
"Common.Views.Plugins.textLoading": "Loading", "Common.Views.Plugins.textLoading": "Loading",
@ -338,6 +344,7 @@
"PE.Views.DocumentPreview.txtPrev": "Previous Slide", "PE.Views.DocumentPreview.txtPrev": "Previous Slide",
"PE.Views.FileMenu.btnAboutCaption": "About", "PE.Views.FileMenu.btnAboutCaption": "About",
"PE.Views.FileMenu.btnBackCaption": "Go to Documents", "PE.Views.FileMenu.btnBackCaption": "Go to Documents",
"PE.Views.FileMenu.btnCloseMenuCaption": "Close Menu",
"PE.Views.FileMenu.btnCreateNewCaption": "Create New", "PE.Views.FileMenu.btnCreateNewCaption": "Create New",
"PE.Views.FileMenu.btnDownloadCaption": "Download as...", "PE.Views.FileMenu.btnDownloadCaption": "Download as...",
"PE.Views.FileMenu.btnHelpCaption": "Help...", "PE.Views.FileMenu.btnHelpCaption": "Help...",
@ -657,7 +664,7 @@
"PE.Views.Statusbar.goToPageText": "Go to Slide", "PE.Views.Statusbar.goToPageText": "Go to Slide",
"PE.Views.Statusbar.pageIndexText": "Slide {0} of {1}", "PE.Views.Statusbar.pageIndexText": "Slide {0} of {1}",
"PE.Views.Statusbar.tipAccessRights": "Manage document access rights", "PE.Views.Statusbar.tipAccessRights": "Manage document access rights",
"PE.Views.Statusbar.tipFitPage": "Fit Slide", "PE.Views.Statusbar.tipFitPage": "Fit to Slide",
"PE.Views.Statusbar.tipFitWidth": "Fit to Width", "PE.Views.Statusbar.tipFitWidth": "Fit to Width",
"PE.Views.Statusbar.tipMoreUsers": "and %1 users.", "PE.Views.Statusbar.tipMoreUsers": "and %1 users.",
"PE.Views.Statusbar.tipPreview": "Start Slideshow", "PE.Views.Statusbar.tipPreview": "Start Slideshow",
@ -786,7 +793,7 @@
"PE.Views.Toolbar.textCancel": "Cancel", "PE.Views.Toolbar.textCancel": "Cancel",
"PE.Views.Toolbar.textColumn": "Column Chart", "PE.Views.Toolbar.textColumn": "Column Chart",
"PE.Views.Toolbar.textCompactView": "View Compact Toolbar", "PE.Views.Toolbar.textCompactView": "View Compact Toolbar",
"PE.Views.Toolbar.textFitPage": "Fit Slide", "PE.Views.Toolbar.textFitPage": "Fit to Slide",
"PE.Views.Toolbar.textFitWidth": "Fit to Width", "PE.Views.Toolbar.textFitWidth": "Fit to Width",
"PE.Views.Toolbar.textHideLines": "Hide Rulers", "PE.Views.Toolbar.textHideLines": "Hide Rulers",
"PE.Views.Toolbar.textHideStatusBar": "Hide Status Bar", "PE.Views.Toolbar.textHideStatusBar": "Hide Status Bar",

View file

@ -109,6 +109,7 @@
@import "../../../../common/main/resources/less/scroller.less"; @import "../../../../common/main/resources/less/scroller.less";
@import "../../../../common/main/resources/less/synchronize-tip.less"; @import "../../../../common/main/resources/less/synchronize-tip.less";
@import "../../../../common/main/resources/less/common.less"; @import "../../../../common/main/resources/less/common.less";
@import "../../../../common/main/resources/less/opendialog.less";
@import "../../../../common/main/resources/less/plugins.less"; @import "../../../../common/main/resources/less/plugins.less";
// App // App

View file

@ -2202,7 +2202,7 @@ define([
var me = this; var me = this;
if (me.api.isRangeSelection !== true) { if (me.api.isRangeSelection !== true) {
if (me.api.asc_getAddFormatTableOptions() != false) { if (!me.api.asc_getCellInfo().asc_getFormatTableInfo()) {
var handlerDlg = function(dlg, result) { var handlerDlg = function(dlg, result) {
if (result == 'ok') { if (result == 'ok') {
me._state.filter = undefined; me._state.filter = undefined;

View file

@ -78,7 +78,7 @@ define([
new Common.UI.MenuItem({ new Common.UI.MenuItem({
el : $('#fm-btn-return',this.el), el : $('#fm-btn-return',this.el),
action : 'back', action : 'back',
caption : this.btnReturnCaption, caption : this.btnCloseMenuCaption,
canFocused: false canFocused: false
}), }),
new Common.UI.MenuItem({ new Common.UI.MenuItem({
@ -300,6 +300,7 @@ define([
btnBackCaption : 'Go to Documents', btnBackCaption : 'Go to Documents',
btnSettingsCaption : 'Advanced Settings...', btnSettingsCaption : 'Advanced Settings...',
btnSaveAsCaption : 'Save as', btnSaveAsCaption : 'Save as',
btnRenameCaption : 'Rename...' btnRenameCaption : 'Rename...',
btnCloseMenuCaption : 'Close Menu'
}, SSE.Views.FileMenu || {})); }, SSE.Views.FileMenu || {}));
}); });

View file

@ -528,6 +528,7 @@
"SSE.Views.DocumentHolder.txtWidth": "Width", "SSE.Views.DocumentHolder.txtWidth": "Width",
"SSE.Views.DocumentHolder.vertAlignText": "Vertical Alignment", "SSE.Views.DocumentHolder.vertAlignText": "Vertical Alignment",
"SSE.Views.FileMenu.btnBackCaption": "Go to Documents", "SSE.Views.FileMenu.btnBackCaption": "Go to Documents",
"SSE.Views.FileMenu.btnCloseMenuCaption": "Close Menu",
"SSE.Views.FileMenu.btnCreateNewCaption": "Create New", "SSE.Views.FileMenu.btnCreateNewCaption": "Create New",
"SSE.Views.FileMenu.btnDownloadCaption": "Download as...", "SSE.Views.FileMenu.btnDownloadCaption": "Download as...",
"SSE.Views.FileMenu.btnHelpCaption": "Help...", "SSE.Views.FileMenu.btnHelpCaption": "Help...",