Merge pull request #78 from ONLYOFFICE/feature/bug-fix

Feature/bug fix
This commit is contained in:
Julia Radzhabova 2017-07-05 14:07:49 +03:00 committed by GitHub
commit a946d157fd
11 changed files with 38 additions and 20 deletions

View file

@ -49,23 +49,24 @@ Common.Utils = _.extend(new(function() {
return (is && (m = regex.exec(userAgent))) ? parseFloat(m[1]) : 0; return (is && (m = regex.exec(userAgent))) ? parseFloat(m[1]) : 0;
}, },
docMode = document.documentMode, docMode = document.documentMode,
isEdge = check(/edge/),
isOpera = check(/opera/), isOpera = check(/opera/),
isOpera10_5 = isOpera && check(/version\/10\.5/), isOpera10_5 = isOpera && check(/version\/10\.5/),
isChrome = check(/\bchrome\b/), isIE = !isOpera && (check(/msie/) || check(/trident/) || check(/edge/)),
isWebKit = check(/webkit/),
isSafari = !isChrome && check(/safari/),
isSafari2 = isSafari && check(/applewebkit\/4/), // unique to Safari 2
isSafari3 = isSafari && check(/version\/3/),
isSafari4 = isSafari && check(/version\/4/),
isSafari5_0 = isSafari && check(/version\/5\.0/),
isSafari5 = isSafari && check(/version\/5/),
isIE = !isOpera && (check(/msie/) || check(/trident/)),
isIE7 = isIE && ((check(/msie 7/) && docMode != 8 && docMode != 9 && docMode != 10) || docMode == 7), isIE7 = isIE && ((check(/msie 7/) && docMode != 8 && docMode != 9 && docMode != 10) || docMode == 7),
isIE8 = isIE && ((check(/msie 8/) && docMode != 7 && docMode != 9 && docMode != 10) || docMode == 8), isIE8 = isIE && ((check(/msie 8/) && docMode != 7 && docMode != 9 && docMode != 10) || docMode == 8),
isIE9 = isIE && ((check(/msie 9/) && docMode != 7 && docMode != 8 && docMode != 10) || docMode == 9), isIE9 = isIE && ((check(/msie 9/) && docMode != 7 && docMode != 8 && docMode != 10) || docMode == 9),
isIE10 = isIE && ((check(/msie 10/) && docMode != 7 && docMode != 8 && docMode != 9) || docMode == 10), isIE10 = isIE && ((check(/msie 10/) && docMode != 7 && docMode != 8 && docMode != 9) || docMode == 10),
isIE11 = isIE && ((check(/trident\/7\.0/) && docMode != 7 && docMode != 8 && docMode != 9 && docMode != 10) || docMode == 11), isIE11 = isIE && ((check(/trident\/7\.0/) && docMode != 7 && docMode != 8 && docMode != 9 && docMode != 10) || docMode == 11),
isIE6 = isIE && check(/msie 6/), isIE6 = isIE && check(/msie 6/),
isChrome = !isIE && check(/\bchrome\b/),
isWebKit = !isIE && check(/webkit/),
isSafari = !isIE && !isChrome && check(/safari/),
isSafari2 = isSafari && check(/applewebkit\/4/), // unique to Safari 2
isSafari3 = isSafari && check(/version\/3/),
isSafari4 = isSafari && check(/version\/4/),
isSafari5_0 = isSafari && check(/version\/5\.0/),
isSafari5 = isSafari && check(/version\/5/),
isGecko = !isWebKit && !isIE && check(/gecko/), // IE11 adds "like gecko" into the user agent string isGecko = !isWebKit && !isIE && check(/gecko/), // IE11 adds "like gecko" into the user agent string
isGecko3 = isGecko && check(/rv:1\.9/), isGecko3 = isGecko && check(/rv:1\.9/),
isGecko4 = isGecko && check(/rv:2\.0/), isGecko4 = isGecko && check(/rv:2\.0/),

View file

@ -1063,6 +1063,7 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem
}); });
if (rec) { if (rec) {
rec.set('tabAlign', align); rec.set('tabAlign', align);
this._tabListChanged = true;
} else { } else {
rec = new Common.UI.DataViewModel(); rec = new Common.UI.DataViewModel();
rec.set({ rec.set({

View file

@ -342,9 +342,9 @@
<td>Maintain the proportions of the selected object when resizing.</td> <td>Maintain the proportions of the selected object when resizing.</td>
</tr> </tr>
<tr> <tr>
<td>Movement by three-pixel increments</td> <td>Movement by one-pixel increments</td>
<td>Ctrl</td> <td>Ctrl</td>
<td>Hold down the Ctrl key and use the keybord arrows to move the selected object by three pixels at a time.</td> <td>Hold down the Ctrl key and use the keybord arrows to move the selected object by one pixel at a time.</td>
</tr> </tr>
</table> </table>
</div> </div>

View file

@ -340,9 +340,9 @@
<td>Сохранять пропорции выбранного объекта при изменении размера.</td> <td>Сохранять пропорции выбранного объекта при изменении размера.</td>
</tr> </tr>
<tr> <tr>
<td>Перемещение с шагом в три пикселя</td> <td>Перемещение с шагом в один пиксель</td>
<td>Ctrl</td> <td>Ctrl</td>
<td>Удерживайте клавишу Ctrl и используйте стрелки на клавиатуре, чтобы перемещать выбранный объект на три пикселя за раз.</td> <td>Удерживайте клавишу Ctrl и используйте стрелки на клавиатуре, чтобы перемещать выбранный объект на один пиксель за раз.</td>
</tr> </tr>
</table> </table>
</div> </div>

View file

@ -507,6 +507,7 @@ define([ 'text!presentationeditor/main/app/template/ParagraphSettingsAdvanced
}); });
if (rec) { if (rec) {
rec.set('tabAlign', align); rec.set('tabAlign', align);
this._tabListChanged = true;
} else { } else {
rec = new Common.UI.DataViewModel(); rec = new Common.UI.DataViewModel();
rec.set({ rec.set({

View file

@ -496,9 +496,10 @@ define([
this._state.no_paragraph = true; this._state.no_paragraph = true;
var i = -1; var i = -1;
while (++i < selectedObjects.length) { while (++i < selectedObjects.length) {
if (selectedObjects[i].get_ObjectType() == Asc.c_oAscTypeSelectElement.Paragraph) { var type = selectedObjects[i].get_ObjectType();
if (type == Asc.c_oAscTypeSelectElement.Paragraph || type == Asc.c_oAscTypeSelectElement.Shape || type == Asc.c_oAscTypeSelectElement.Chart || type == Asc.c_oAscTypeSelectElement.Table) {
this._state.no_paragraph = selectedObjects[i].get_ObjectValue().get_Locked(); this._state.no_paragraph = selectedObjects[i].get_ObjectValue().get_Locked();
break; if (this._state.no_paragraph) break; // break if one of the objects is locked
} }
} }
this._state.no_paragraph = this._state.no_paragraph || this.langMenu.items.length<1; this._state.no_paragraph = this._state.no_paragraph || this.langMenu.items.length<1;

View file

@ -370,7 +370,7 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="padding-small" width="200"> <td class="padding-small" width="230">
<label class="input-label"><%= scope.textShowEmptyCells %></label> <label class="input-label"><%= scope.textShowEmptyCells %></label>
<div id="spark-dlg-combo-empty" class="input-group-nr" style="margin-right: 10px;"></div> <div id="spark-dlg-combo-empty" class="input-group-nr" style="margin-right: 10px;"></div>
</td> </td>

View file

@ -888,7 +888,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
]; ];
this.cmbEmptyCells = new Common.UI.ComboBox({ this.cmbEmptyCells = new Common.UI.ComboBox({
el : $('#spark-dlg-combo-empty'), el : $('#spark-dlg-combo-empty'),
menuStyle : 'min-width: 188px;', menuStyle : 'min-width: 220px;',
editable : false, editable : false,
cls : 'input-group-nr' cls : 'input-group-nr'
}); });
@ -1288,7 +1288,6 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
if (this._changedProps) { if (this._changedProps) {
this._changedProps.asc_setType(rawData.type); this._changedProps.asc_setType(rawData.type);
} }
this.chartSettings.asc_setType(rawData.type);
this._state.SparkType = rawData.type; this._state.SparkType = rawData.type;
var changed = false, var changed = false,
@ -1305,7 +1304,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
this.cmbEmptyCells.setValue((rawData.type !== Asc.c_oAscSparklineType.Line && value==Asc.c_oAscEDispBlanksAs.Span) ? this.textEmptyLine : value); this.cmbEmptyCells.setValue((rawData.type !== Asc.c_oAscSparklineType.Line && value==Asc.c_oAscEDispBlanksAs.Span) ? this.textEmptyLine : value);
} }
this.updateSparkStyles(this.chartSettings.asc_getStyles()); this.updateSparkStyles(this.chartSettings.asc_getStyles(rawData.type));
}, },

View file

@ -506,6 +506,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ParagraphSettingsAdvanced.
}); });
if (rec) { if (rec) {
rec.set('tabAlign', align); rec.set('tabAlign', align);
this._tabListChanged = true;
} else { } else {
rec = new Common.UI.DataViewModel(); rec = new Common.UI.DataViewModel();
rec.set({ rec.set({

View file

@ -304,7 +304,14 @@
<td>Alt+'='</td> <td>Alt+'='</td>
<td>Insert the <b>SUM</b> function into the selected cell.</td> <td>Insert the <b>SUM</b> function into the selected cell.</td>
</tr> </tr>
<tr>
<th colspan="3">Modifying Objects</th>
</tr>
<tr>
<td>Movement by one-pixel increments</td>
<td>Ctrl</td>
<td>Hold down the Ctrl key and use the keybord arrows to move the selected object by one pixel at a time.</td>
</tr>
</table> </table>
</div> </div>
</body> </body>

View file

@ -305,6 +305,13 @@
<td>Alt+'='</td> <td>Alt+'='</td>
<td>Вставить функцию <b>SUM</b> в выделенную ячейку.</td> <td>Вставить функцию <b>SUM</b> в выделенную ячейку.</td>
</tr> </tr>
<th colspan="3">Модификация объектов</th>
</tr>
<tr>
<td>Перемещение с шагом в один пиксель</td>
<td>Ctrl</td>
<td>Удерживайте клавишу Ctrl и используйте стрелки на клавиатуре, чтобы перемещать выбранный объект на один пиксель за раз.</td>
</tr>
</table> </table>
</div> </div>
</body> </body>