Merge branch 'develop' into feature/new-mobile

This commit is contained in:
Alexander Yuzhin 2016-11-30 18:25:26 +03:00
commit 193c1a3f04
10 changed files with 129 additions and 43 deletions

View file

@ -53,7 +53,7 @@
$dlgShare = common.view.modals.create('share');
var _encoded = encodeURIComponent(appConfig.shareUrl);
var _mailto = 'mailto:?subject=I have shared a document with you: ' + appConfig.docTitle + '&body=I have shared a document with you: ' + _encoded + '"';
var _mailto = 'mailto:?subject=I have shared a document with you: ' + appConfig.docTitle + '&body=I have shared a document with you: ' + _encoded;
$dlgShare.find('#btn-copyshort').on('click', copytext.bind(this, $dlgShare.find('#id-short-url')));
$dlgShare.find('.share-buttons > span').on('click', function(e){

View file

@ -11,6 +11,9 @@ var sdk_dev_scrpipts = [
"../../../../sdkjs/common/apiCommon.js",
"../../../../sdkjs/common/SerializeCommonWordExcel.js",
"../../../../sdkjs/common/editorscommon.js",
"../../../../sdkjs/common/HistoryCommon.js",
"../../../../sdkjs/common/TableId.js",
"../../../../sdkjs/common/TableIdChanges.js",
"../../../../sdkjs/common/NumFormat.js",
"../../../../sdkjs/common/SerializeChart.js",
"../../../../sdkjs/common/AdvancedOptions.js",
@ -28,7 +31,6 @@ var sdk_dev_scrpipts = [
"../../../../sdkjs/common/Drawings/Hit.js",
"../../../../sdkjs/common/Drawings/ArcTo.js",
"../../../../sdkjs/common/Drawings/ColorArray.js",
"../../../../sdkjs/common/Drawings/Format/Constants.js",
"../../../../sdkjs/common/Drawings/CommonController.js",
"../../../../sdkjs/word/Editor/GraphicObjects/DrawingStates.js",
"../../../../sdkjs/common/Drawings/Format/CreateGeometry.js",
@ -82,12 +84,21 @@ var sdk_dev_scrpipts = [
"../../../../sdkjs/word/Editor/GraphicObjects/WrapManager.js",
"../../../../sdkjs/word/Editor/CollaborativeEditing.js",
"../../../../sdkjs/word/Editor/Comments.js",
"../../../../sdkjs/word/Editor/CommentsChanges.js",
"../../../../sdkjs/word/Editor/Styles.js",
"../../../../sdkjs/word/Editor/StylesChanges.js",
"../../../../sdkjs/word/Editor/ParagraphContent.js",
"../../../../sdkjs/word/Editor/Paragraph/ParaTextPr.js",
"../../../../sdkjs/word/Editor/Paragraph/ParaTextPrChanges.js",
"../../../../sdkjs/word/Editor/Paragraph/ParaDrawing.js",
"../../../../sdkjs/word/Editor/Paragraph/ParaDrawingChanges.js",
"../../../../sdkjs/word/Editor/Paragraph.js",
"../../../../sdkjs/word/Editor/ParagraphChanges.js",
"../../../../sdkjs/word/Editor/DocumentContentBase.js",
"../../../../sdkjs/word/Editor/Document.js",
"../../../../sdkjs/word/Editor/DocumentChanges.js",
"../../../../sdkjs/word/Editor/DocumentContent.js",
"../../../../sdkjs/word/Editor/DocumentContentChanges.js",
"../../../../sdkjs/word/Editor/DocumentControllerBase.js",
"../../../../sdkjs/word/Editor/LogicDocumentController.js",
"../../../../sdkjs/word/Editor/DrawingsController.js",
@ -95,25 +106,35 @@ var sdk_dev_scrpipts = [
"../../../../sdkjs/word/Editor/FlowObjects.js",
"../../../../sdkjs/word/Editor/ParagraphContentBase.js",
"../../../../sdkjs/word/Editor/Hyperlink.js",
"../../../../sdkjs/word/Editor/HyperlinkChanges.js",
"../../../../sdkjs/word/Editor/Field.js",
"../../../../sdkjs/word/Editor/FieldChanges.js",
"../../../../sdkjs/word/Editor/Run.js",
"../../../../sdkjs/word/Editor/RunChanges.js",
"../../../../sdkjs/word/Editor/Math.js",
"../../../../sdkjs/word/Editor/MathChanges.js",
"../../../../sdkjs/word/Editor/Paragraph_Recalculate.js",
"../../../../sdkjs/word/Editor/Sections.js",
"../../../../sdkjs/word/Editor/SectionsChanges.js",
"../../../../sdkjs/word/Editor/Numbering.js",
"../../../../sdkjs/word/Editor/HeaderFooter.js",
"../../../../sdkjs/word/Editor/Common.js",
"../../../../sdkjs/word/Editor/Numbering.js",
"../../../../sdkjs/word/Editor/NumberingChanges.js",
"../../../../sdkjs/word/Editor/Table.js",
"../../../../sdkjs/word/Editor/Table/TableChanges.js",
"../../../../sdkjs/word/Editor/Table/TableRecalculate.js",
"../../../../sdkjs/word/Editor/Table/TableDraw.js",
"../../../../sdkjs/word/Editor/Table/TableRow.js",
"../../../../sdkjs/word/Editor/Table/TableRowChanges.js",
"../../../../sdkjs/word/Editor/Table/TableCell.js",
"../../../../sdkjs/word/Editor/Table/TableCellChanges.js",
"../../../../sdkjs/word/Editor/Serialize2.js",
"../../../../sdkjs/word/Editor/Search.js",
"../../../../sdkjs/word/Editor/FontClassification.js",
"../../../../sdkjs/word/Editor/Spelling.js",
"../../../../sdkjs/word/Editor/Footnotes.js",
"../../../../sdkjs/word/Editor/FootnotesChanges.js",
"../../../../sdkjs/word/Editor/FootEndNote.js",
"../../../../sdkjs/word/Drawing/Graphics.js",
"../../../../sdkjs/word/Drawing/ShapeDrawer.js",

View file

@ -8,6 +8,9 @@ var sdk_dev_scrpipts = [
"../../../../sdkjs/common/apiCommon.js",
"../../../../sdkjs/common/SerializeCommonWordExcel.js",
"../../../../sdkjs/common/editorscommon.js",
"../../../../sdkjs/common/HistoryCommon.js",
"../../../../sdkjs/common/TableId.js",
"../../../../sdkjs/common/TableIdChanges.js",
"../../../../sdkjs/common/NumFormat.js",
"../../../../sdkjs/common/SerializeChart.js",
"../../../../sdkjs/common/AdvancedOptions.js",
@ -25,7 +28,6 @@ var sdk_dev_scrpipts = [
"../../../../sdkjs/common/Drawings/Hit.js",
"../../../../sdkjs/common/Drawings/ArcTo.js",
"../../../../sdkjs/common/Drawings/ColorArray.js",
"../../../../sdkjs/common/Drawings/Format/Constants.js",
"../../../../sdkjs/common/Drawings/CommonController.js",
"../../../../sdkjs/common/Drawings/States.js",
"../../../../sdkjs/common/Drawings/Format/CreateGeometry.js",
@ -75,17 +77,23 @@ var sdk_dev_scrpipts = [
"../../../../sdkjs/slide/Drawing/ThemeLoader.js",
"../../../../sdkjs/word/Editor/Serialize2.js",
"../../../../sdkjs/word/Editor/Numbering.js",
"../../../../sdkjs/word/Editor/NumberingChanges.js",
"../../../../sdkjs/slide/Editor/CollaborativeEditing.js",
"../../../../sdkjs/word/Drawing/GraphicsEvents.js",
"../../../../sdkjs/word/Drawing/Rulers.js",
"../../../../sdkjs/word/Editor/Table.js",
"../../../../sdkjs/word/Editor/Table/TableChanges.js",
"../../../../sdkjs/word/Editor/Table/TableRecalculate.js",
"../../../../sdkjs/word/Editor/Table/TableDraw.js",
"../../../../sdkjs/word/Editor/Table/TableRow.js",
"../../../../sdkjs/word/Editor/Table/TableRowChanges.js",
"../../../../sdkjs/word/Editor/Table/TableCell.js",
"../../../../sdkjs/word/Editor/Table/TableCellChanges.js",
"../../../../sdkjs/word/Editor/Common.js",
"../../../../sdkjs/word/Editor/Sections.js",
"../../../../sdkjs/word/Editor/SectionsChanges.js",
"../../../../sdkjs/word/Editor/Styles.js",
"../../../../sdkjs/word/Editor/StylesChanges.js",
"../../../../sdkjs/slide/Editor/Format/StylesPrototype.js",
"../../../../sdkjs/word/Drawing/Graphics.js",
"../../../../sdkjs/word/Drawing/ShapeDrawer.js",
@ -99,10 +107,17 @@ var sdk_dev_scrpipts = [
"../../../../sdkjs/slide/Editor/Format/Layout.js",
"../../../../sdkjs/slide/Editor/Format/Comments.js",
"../../../../sdkjs/word/Editor/ParagraphContent.js",
"../../../../sdkjs/word/Editor/Paragraph/ParaTextPr.js",
"../../../../sdkjs/word/Editor/Paragraph/ParaTextPrChanges.js",
"../../../../sdkjs/word/Editor/Paragraph/ParaDrawing.js",
"../../../../sdkjs/word/Editor/Paragraph/ParaDrawingChanges.js",
"../../../../sdkjs/word/Editor/Paragraph.js",
"../../../../sdkjs/word/Editor/ParagraphChanges.js",
"../../../../sdkjs/word/Editor/DocumentContentBase.js",
"../../../../sdkjs/word/Editor/Document.js",
"../../../../sdkjs/word/Editor/DocumentChanges.js",
"../../../../sdkjs/word/Editor/DocumentContent.js",
"../../../../sdkjs/word/Editor/DocumentContentChanges.js",
"../../../../sdkjs/word/Editor/DocumentControllerBase.js",
"../../../../sdkjs/word/Editor/LogicDocumentController.js",
"../../../../sdkjs/word/Editor/DrawingsController.js",
@ -115,8 +130,11 @@ var sdk_dev_scrpipts = [
"../../../../sdkjs/word/Editor/Numbering.js",
"../../../../sdkjs/word/Editor/ParagraphContentBase.js",
"../../../../sdkjs/word/Editor/Hyperlink.js",
"../../../../sdkjs/word/Editor/HyperlinkChanges.js",
"../../../../sdkjs/word/Editor/Field.js",
"../../../../sdkjs/word/Editor/FieldChanges.js",
"../../../../sdkjs/word/Editor/Run.js",
"../../../../sdkjs/word/Editor/RunChanges.js",
"../../../../sdkjs/word/Math/mathTypes.js",
"../../../../sdkjs/word/Math/mathText.js",
"../../../../sdkjs/word/Math/mathContent.js",
@ -134,8 +152,10 @@ var sdk_dev_scrpipts = [
"../../../../sdkjs/word/Editor/Paragraph_Recalculate.js",
"../../../../sdkjs/word/Editor/HeaderFooter.js",
"../../../../sdkjs/word/Editor/Math.js",
"../../../../sdkjs/word/Editor/MathChanges.js",
"../../../../sdkjs/word/Editor/Spelling.js",
"../../../../sdkjs/word/Editor/Footnotes.js",
"../../../../sdkjs/word/Editor/FootnotesChanges.js",
"../../../../sdkjs/word/Editor/FootEndNote.js",
"../../../../sdkjs/word/Editor/Search.js",
"../../../../sdkjs/word/Editor/FontClassification.js",

View file

@ -125,6 +125,7 @@ define([
this.api.isCEditorFocused = false;
this.editor.cellNameDisabled(false);
}
this.editor.$btnfunc.toggleClass('disabled', state == Asc.c_oAscCellEditorState.editText);
},
onApiCellSelection: function(info) {
@ -147,6 +148,7 @@ define([
onCellsRange: function(status) {
this.editor.cellNameDisabled(status != Asc.c_oAscSelectionDialogType.None);
this.editor.$btnfunc.toggleClass('disabled', status != Asc.c_oAscSelectionDialogType.None);
},
onLayoutResize: function(o, r) {

View file

@ -272,7 +272,7 @@ define([
setApi: function(api) {
this.api = api;
this.api.asc_registerCallback('asc_onInitTablePictures', _.bind(this.onApiInitTableTemplates, this));
this.api.asc_registerCallback('asc_onSendThemeColors', _.bind(this.onSendThemeColors, this));
this.api.asc_registerCallback('asc_onInitEditorStyles', _.bind(this.onApiInitEditorStyles, this));
this.api.asc_registerCallback('asc_onCoAuthoringDisconnect',_.bind(this.onApiCoAuthoringDisconnect, this, true));
Common.NotificationCenter.on('api:disconnect', _.bind(this.onApiCoAuthoringDisconnect, this));
@ -1366,14 +1366,21 @@ define([
},
onTableTplMenuOpen: function(cmp) {
var scroller = this.toolbar.mnuTableTemplatePicker.scroller;
this.onApiInitTableTemplates(this.api.asc_getTablePictures(this.api.asc_getCellInfo().asc_getFormatTableInfo()));
var scroller = this.toolbar.mnuTableTemplatePicker.scroller;
if (scroller) {
scroller.update({alwaysVisibleY: true});
scroller.scrollTop(0);
}
},
onSendThemeColors: function() {
// get new table templates
if (this.toolbar.btnTableTemplate.rendered && this.toolbar.btnTableTemplate.cmpEl.hasClass('open'))
this.onTableTplMenuOpen();
},
onApiInitTableTemplates: function(images) {
var store = this.getCollection('TableTemplates');
if (store) {
@ -1385,7 +1392,8 @@ define([
type : item.asc_getType(),
imageUrl : item.asc_getImage(),
allowSelected : true,
selected : false
selected : false,
tip : item.asc_getDisplayName()
});
});

View file

@ -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>

View file

@ -102,7 +102,6 @@ define([
cellNameDisabled: function(disabled){
(disabled) ? this.$cellname.attr('disabled', 'disabled') : this.$cellname.removeAttr('disabled');
this.$btnfunc.toggleClass('disabled', disabled);
this.btnNamedRanges.setDisabled(disabled);
},

View file

@ -840,7 +840,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',
@ -868,7 +868,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
el: $('#spark-dlg-btn-data')
});
// this.btnSelectLocationData.on('click', _.bind(this.onSelectData, this));
*/
this._arrEmptyCells = [
{ value: Asc.c_oAscEDispBlanksAs.Gap, displayValue: this.textGaps },
@ -1373,6 +1373,12 @@ 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] : '');
this.txtSparkDataLocation.setValue((value[1]) ? value[1] : '');
}
this._changedProps = new Asc.sparklineGroup();
this._noApply = false;
}

View file

@ -140,7 +140,7 @@ define([
setApi: function(o) {
this.api = o;
if (o) {
this.api.asc_registerCallback('asc_onInitTablePictures', _.bind(this.onApiInitTableTemplates, this));
this.api.asc_registerCallback('asc_onSendThemeColors', _.bind(this.onSendThemeColors, this));
}
return this;
},
@ -347,6 +347,14 @@ define([
}
},
onSendThemeColors: function() {
// get new table templates
if (this.cmbTableTemplate) {
this.onApiInitTableTemplates(this.api.asc_getTablePictures(this._originalProps));
this.cmbTableTemplate.menuPicker.scroller.update({alwaysVisibleY: true});
}
},
onApiInitTableTemplates: function(Templates){
var self = this;
this._isTemplatesChanged = true;
@ -387,7 +395,8 @@ define([
type : template.asc_getType(),
imageUrl : template.asc_getImage(),
allowSelected : true,
selected : false
selected : false,
tip : template.asc_getDisplayName()
});
});
self.cmbTableTemplate.menuPicker.store.add(arr);

View file

@ -8,6 +8,9 @@ var sdk_dev_scrpipts = [
"../../../../sdkjs/common/apiCommon.js",
"../../../../sdkjs/common/SerializeCommonWordExcel.js",
"../../../../sdkjs/common/editorscommon.js",
"../../../../sdkjs/common/HistoryCommon.js",
"../../../../sdkjs/common/TableId.js",
"../../../../sdkjs/common/TableIdChanges.js",
"../../../../sdkjs/common/NumFormat.js",
"../../../../sdkjs/common/SerializeChart.js",
"../../../../sdkjs/common/AdvancedOptions.js",
@ -25,7 +28,6 @@ var sdk_dev_scrpipts = [
"../../../../sdkjs/common/Drawings/Hit.js",
"../../../../sdkjs/common/Drawings/ArcTo.js",
"../../../../sdkjs/common/Drawings/ColorArray.js",
"../../../../sdkjs/common/Drawings/Format/Constants.js",
"../../../../sdkjs/common/Drawings/CommonController.js",
"../../../../sdkjs/common/Drawings/States.js",
"../../../../sdkjs/common/Drawings/Format/CreateGeometry.js",
@ -61,7 +63,7 @@ var sdk_dev_scrpipts = [
"../../../../sdkjs/common/Overlay.js",
"../../../../sdkjs/common/Drawings/HatchPattern.js",
"../../../../sdkjs/common/scroll.js",
"../../../../sdkjs/cell/view/iscroll.js",
"../../../../sdkjs/common/Scrolls/iscroll.js",
"../../../../sdkjs/common/wordcopypaste.js",
"../../../../sdkjs/cell/apiDefines.js",
"../../../../sdkjs/cell/document/empty-workbook.js",
@ -114,12 +116,21 @@ var sdk_dev_scrpipts = [
"../../../../sdkjs/cell/Private/comments.js",
"../../../../sdkjs/word/Editor/Common.js",
"../../../../sdkjs/word/Editor/Comments.js",
"../../../../sdkjs/word/Editor/CommentsChanges.js",
"../../../../sdkjs/word/Editor/Styles.js",
"../../../../sdkjs/word/Editor/StylesChanges.js",
"../../../../sdkjs/word/Editor/ParagraphContent.js",
"../../../../sdkjs/word/Editor/Paragraph/ParaTextPr.js",
"../../../../sdkjs/word/Editor/Paragraph/ParaTextPrChanges.js",
"../../../../sdkjs/word/Editor/Paragraph/ParaDrawing.js",
"../../../../sdkjs/word/Editor/Paragraph/ParaDrawingChanges.js",
"../../../../sdkjs/word/Editor/Paragraph.js",
"../../../../sdkjs/word/Editor/ParagraphChanges.js",
"../../../../sdkjs/word/Editor/DocumentContentBase.js",
"../../../../sdkjs/word/Editor/Document.js",
"../../../../sdkjs/word/Editor/DocumentChanges.js",
"../../../../sdkjs/word/Editor/DocumentContent.js",
"../../../../sdkjs/word/Editor/DocumentContentChanges.js",
"../../../../sdkjs/word/Editor/DocumentControllerBase.js",
"../../../../sdkjs/word/Editor/LogicDocumentController.js",
"../../../../sdkjs/word/Editor/DrawingsController.js",
@ -127,22 +138,32 @@ var sdk_dev_scrpipts = [
"../../../../sdkjs/word/Editor/FlowObjects.js",
"../../../../sdkjs/word/Editor/ParagraphContentBase.js",
"../../../../sdkjs/word/Editor/Hyperlink.js",
"../../../../sdkjs/word/Editor/HyperlinkChanges.js",
"../../../../sdkjs/word/Editor/Field.js",
"../../../../sdkjs/word/Editor/FieldChanges.js",
"../../../../sdkjs/word/Editor/Run.js",
"../../../../sdkjs/word/Editor/RunChanges.js",
"../../../../sdkjs/word/Editor/Math.js",
"../../../../sdkjs/word/Editor/MathChanges.js",
"../../../../sdkjs/word/Editor/Paragraph_Recalculate.js",
"../../../../sdkjs/word/Editor/Sections.js",
"../../../../sdkjs/word/Editor/SectionsChanges.js",
"../../../../sdkjs/word/Editor/Numbering.js",
"../../../../sdkjs/word/Editor/NumberingChanges.js",
"../../../../sdkjs/word/Editor/HeaderFooter.js",
"../../../../sdkjs/word/Editor/Table.js",
"../../../../sdkjs/word/Editor/Table/TableChanges.js",
"../../../../sdkjs/word/Editor/Table/TableRecalculate.js",
"../../../../sdkjs/word/Editor/Table/TableDraw.js",
"../../../../sdkjs/word/Editor/Table/TableRow.js",
"../../../../sdkjs/word/Editor/Table/TableRowChanges.js",
"../../../../sdkjs/word/Editor/Table/TableCell.js",
"../../../../sdkjs/word/Editor/Table/TableCellChanges.js",
"../../../../sdkjs/word/Editor/Serialize2.js",
"../../../../sdkjs/word/Editor/FontClassification.js",
"../../../../sdkjs/word/Editor/Spelling.js",
"../../../../sdkjs/word/Editor/Footnotes.js",
"../../../../sdkjs/word/Editor/FootnotesChanges.js",
"../../../../sdkjs/word/Editor/FootEndNote.js",
"../../../../sdkjs/word/Editor/GraphicObjects/WrapManager.js",
"../../../../sdkjs/word/Math/mathTypes.js",