[PE] bug 34035, 33978, 33945.

This commit is contained in:
Julia Radzhabova 2017-03-14 13:51:39 +03:00
parent ef65270ec7
commit 52e9b6a6ee
2 changed files with 60 additions and 53 deletions

View file

@ -91,9 +91,12 @@ define([
$target = $(e.currentTarget), $target = $(e.currentTarget),
type = $target.data('type'); type = $target.data('type');
if ($('.modal.modal-in').length > 0) {
return;
}
PE.getController('AddContainer').hideModal(); PE.getController('AddContainer').hideModal();
_.delay(function () {
if ($target) { if ($target) {
var picker; var picker;
var modal = uiApp.modal({ var modal = uiApp.modal({
@ -148,7 +151,6 @@ define([
marginTop: - Math.round($$(modal).outerHeight() / 2) + 'px' marginTop: - Math.round($$(modal).outerHeight() / 2) + 'px'
}); });
} }
}, 300);
}, },
// Public // Public

View file

@ -69,14 +69,19 @@ define([
return _sizes[index]; return _sizes[index];
}, },
sizeByValue: function (value) { indexSizeByValue: function (value) {
var index = 0; var index = 0;
_.each(_sizes, function (size, idx) { _.each(_sizes, function (size, idx) {
if (Math.abs(size - value) < 0.25) { if (Math.abs(size - value) < 0.25) {
index = idx; index = idx;
} }
}); });
return _sizes[index];
return index;
},
sizeByValue: function (value) {
return _sizes[this.indexSizeByValue(value)];
} }
} }
})(); })();
@ -182,7 +187,7 @@ define([
}, },
_initTableOptionsView: function() { _initTableOptionsView: function() {
var margins = _tableObject.get_DefaultMargins(); var margins = _tableObject.get_CellMargins();
if (margins) { if (margins) {
var distance = Common.Utils.Metric.fnRecalcFromMM(margins.get_Left()); var distance = Common.Utils.Metric.fnRecalcFromMM(margins.get_Left());
$('#table-options-margins input').val(distance); $('#table-options-margins input').val(distance);
@ -262,7 +267,7 @@ define([
// }); // });
// } // }
$('#edit-table-bordersize input').val([borderSizeTransform.sizeByIndex(_cellBorderWidth)]); $('#edit-table-bordersize input').val([borderSizeTransform.indexSizeByValue(_cellBorderWidth)]);
$('#edit-table-bordersize .item-after').text(borderSizeTransform.sizeByValue(_cellBorderWidth) + ' ' + _metricText); $('#edit-table-bordersize .item-after').text(borderSizeTransform.sizeByValue(_cellBorderWidth) + ' ' + _metricText);
var borderPalette = me.getView('EditTable').paletteBorderColor; var borderPalette = me.getView('EditTable').paletteBorderColor;