Commit 976f94b1 authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

add modal

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@47084 954022d7-b5bf-4e40-9824-e11837661b57
parent 4022f3e2
...@@ -389,6 +389,7 @@ ...@@ -389,6 +389,7 @@
//api.asc_setViewerMode(true); //api.asc_setViewerMode(true);
var oTmpHyperlinkObj = null; var oTmpHyperlinkObj = null;
var aDialogNames = []; var aDialogNames = [];
var bIsUpdateChartProperties = false;
// Comment events // Comment events
api.asc_registerCallback("asc_onMouseMove", eventMouseMoveComment); api.asc_registerCallback("asc_onMouseMove", eventMouseMoveComment);
...@@ -1984,6 +1985,7 @@ ...@@ -1984,6 +1985,7 @@
var objectsExist = api.asc_drawingObjectsExist(); var objectsExist = api.asc_drawingObjectsExist();
if (!chart) // selected image if (!chart) // selected image
return; return;
bIsUpdateChartProperties = true;
var chartForm = $("#chartSelector"); var chartForm = $("#chartSelector");
chartForm.find("#changeRange").removeClass("ToolbarChangeRange2").addClass("ToolbarChangeRange"); chartForm.find("#changeRange").removeClass("ToolbarChangeRange2").addClass("ToolbarChangeRange");
chartForm.find("#switchTypeField").show(); chartForm.find("#switchTypeField").show();
...@@ -1997,6 +1999,10 @@ ...@@ -1997,6 +1999,10 @@
chartForm.dialog({ autoOpen: false, closeOnEscape: true, height: 'auto', width: 400, chartForm.dialog({ autoOpen: false, closeOnEscape: true, height: 'auto', width: 400,
resizable: false, modal: true, title: "Chart properties", draggable: true, resizable: false, modal: true, title: "Chart properties", draggable: true,
open: function() { open: function() {
if (!bIsUpdateChartProperties)
return;
bIsUpdateChartProperties = false;
var range = chart.asc_getRange(); var range = chart.asc_getRange();
var interval = range.asc_getInterval(); var interval = range.asc_getInterval();
...@@ -2119,8 +2125,9 @@ ...@@ -2119,8 +2125,9 @@
// Images // Images
function showImageUrlDialog() { function showImageUrlDialog() {
$("#imageSelector").css("visibility", "visible"); var imageForm = $("#imageSelector");
$("#imageSelector").dialog({ autoOpen: false, closeOnEscape: true, height: 160, width: 400, imageForm.css("visibility", "visible");
imageForm.dialog({ autoOpen: false, closeOnEscape: true, height: 160, width: 400,
resizable: false, modal: true, title: "Add image", draggable: true, resizable: false, modal: true, title: "Add image", draggable: true,
open: function() { open: function() {
$("#imageSelectorUrl").val(""); $("#imageSelectorUrl").val("");
...@@ -2149,7 +2156,7 @@ ...@@ -2149,7 +2156,7 @@
$("#imageSelectorUrl").val(""); $("#imageSelectorUrl").val("");
} }
}); });
$("#imageSelector").dialog("open"); imageForm.dialog("open");
} }
$("#changeRange").click(function () { $("#changeRange").click(function () {
...@@ -2163,6 +2170,9 @@ ...@@ -2163,6 +2170,9 @@
chartForm.find("#titlesField").hide(); chartForm.find("#titlesField").hide();
chartForm.find("#legendField").hide(); chartForm.find("#legendField").hide();
chartForm.find("#typeField").hide(); chartForm.find("#typeField").hide();
chartForm.dialog("option", "modal", false);
chartForm.dialog("close").dialog("open");
} else { } else {
selector.removeClass("ToolbarChangeRange2").addClass("ToolbarChangeRange"); selector.removeClass("ToolbarChangeRange2").addClass("ToolbarChangeRange");
chartForm.find("#switchTypeField").show(); chartForm.find("#switchTypeField").show();
...@@ -2171,6 +2181,9 @@ ...@@ -2171,6 +2181,9 @@
chartForm.find("#titlesField").show(); chartForm.find("#titlesField").show();
chartForm.find("#legendField").show(); chartForm.find("#legendField").show();
chartForm.find("#typeField").show(); chartForm.find("#typeField").show();
chartForm.dialog("option", "modal", true);
chartForm.dialog("close").dialog("open");
} }
}); });
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment