Commit 4fcb3b15 authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@47081 954022d7-b5bf-4e40-9824-e11837661b57
parent 2a7f469e
......@@ -2035,39 +2035,44 @@
<input type='text' id='imageSelectorUrl' style='width: 340px; margin: 10px;'/>
</div>
<div id='chartSelector' style='font-size: 12px; visibility: hidden;'>
<select id='chartType' style='width: 340px; margin: 10px;'>
<option value='Line' selected>Line</option>
<option value='Bar'>Bar</option>
<option value='HBar'>HBar</option>
<option value='Area'>Area</option>
<option value='Pie'>Pie</option>
<option value='Scatter'>Scatter</option>
<option value='Stock'>Stock</option>
</select>
<select id='chartSubType' style='width: 340px; margin: 10px;'>
<option value='Normal' selected>Normal</option>
<option value='stacked'>Stacked</option>
<option value='stackedPer'>100Stacked</option>
</select>
<fieldset>
<legend>Data</legend>
<input type='text' style='margin-left: 10px; width: 80%;' id='chartRange' value=''>
<img class='ToolbarIcon ToolbarChangeRange' id='changeRange'>
<br>
<input type='radio' name='dataRadio' id='dataRows' style='margin-left: 10px;'>Rows<br>
<input type='radio' name='dataRadio' id='dataColumns' style='margin-left: 10px;'>Columns<br>
<fieldset id="switchTypeField">
<legend>Switch Row/Column</legend>
<input type='radio' name='dataRadio' id='dataRows' style='margin-left: 10px;'>Rows<br>
<input type='radio' name='dataRadio' id='dataColumns' style='margin-left: 10px;'>Columns<br>
</fieldset>
</fieldset>
<fieldset>
<fieldset id="typeField">
<legend>Type</legend>
<select id='chartType' style='width: 320px; margin: 10px;'>
<option value='Line' selected>Line</option>
<option value='Bar'>Bar</option>
<option value='HBar'>HBar</option>
<option value='Area'>Area</option>
<option value='Pie'>Pie</option>
<option value='Scatter'>Scatter</option>
<option value='Stock'>Stock</option>
</select>
<select id='chartSubType' style='width: 320px; margin: 10px;'>
<option value='Normal' selected>Normal</option>
<option value='stacked'>Stacked</option>
<option value='stackedPer'>100Stacked</option>
</select>
</fieldset>
<fieldset id="gridField">
<legend>Grid</legend>
<input type='checkbox' id='xGridShow' checked style='margin-left: 10px;'>Vertical<br>
<input type='checkbox' id='yGridShow' checked style='margin-left: 10px;'>Horizontal<br>
</fieldset>
<fieldset>
<fieldset id="axisField">
<legend>Axis</legend>
<input type='checkbox' id='xAxisShow' checked style='margin-left: 10px;'>Show X<br>
<input type='checkbox' id='yAxisShow' checked style='margin-left: 10px;'>Show Y<br>
</fieldset>
<fieldset>
<fieldset id="titlesField">
<legend>Titles</legend>
<input type='text' style='margin-left: 10px;' id='chartTitle' value='Diagramm'><br>
<span style='margin-left: 10px;'>X axis title</span>
......@@ -2076,7 +2081,7 @@
<input type='text' style='margin-left: 10px;' id='yAxisTitle' value='Y axis'><br>
<input type='checkbox' id='valueShow' style='margin-left: 10px;'>Show values<br>
</fieldset>
<fieldset>
<fieldset id="legendField">
<legend>Legend</legend>
<input type='checkbox' id='legendShow' checked style='margin-left: 10px;'>Show<br>
<input type='radio' name='legendRadio' id='legendLeft' checked style='margin-left: 10px;'>Left<br>
......
......@@ -1983,17 +1983,24 @@
var objectsExist = api.asc_drawingObjectsExist();
if (!chart) // selected image
return;
$("#chartSelector").css("visibility", "visible");
$("#chartSelector").dialog({ autoOpen: false, closeOnEscape: true, height: 'auto', width: 400,
var chartForm = $("#chartSelector");
chartForm.find("#changeRange").removeClass("ToolbarChangeRange2").addClass("ToolbarChangeRange");
chartForm.find("#switchTypeField").show();
chartForm.find("#gridField").show();
chartForm.find("#axisField").show();
chartForm.find("#titlesField").show();
chartForm.find("#legendField").show();
chartForm.find("#typeField").show();
chartForm.css("visibility", "visible");
chartForm.dialog({ autoOpen: false, closeOnEscape: true, height: 'auto', width: 400,
resizable: false, modal: true, title: "Chart properties", draggable: true,
open: function() {
var chartForm = $("#chartSelector");
var range = chart.asc_getRange();
var interval = range.asc_getInterval();
chartForm.find("#chartRange").val(interval);
chartForm.find("#changeRange").addClass("ToolbarChangeRange").removeClass("ToolbarChangeRange2");
chartForm.find("#chartRange").bind("keyup", function() {
var result = range.asc_checkInterval(chartForm.find("#chartType").val(),chartForm.find("#chartSubType").val(),chartForm.find("#chartRange").val(),chartForm.find("#dataRows").is(":checked"));
if (result)
......@@ -2106,7 +2113,7 @@
create: function() {
}
});
$("#chartSelector").dialog("open");
chartForm.dialog("open");
}
// Images
......@@ -2146,10 +2153,23 @@
$("#changeRange").click(function () {
var selector = $(this);
var chartForm = $("#chartSelector");
if (selector.hasClass("ToolbarChangeRange")) {
selector.removeClass("ToolbarChangeRange").addClass("ToolbarChangeRange2")
selector.removeClass("ToolbarChangeRange").addClass("ToolbarChangeRange2");
chartForm.find("#switchTypeField").hide();
chartForm.find("#gridField").hide();
chartForm.find("#axisField").hide();
chartForm.find("#titlesField").hide();
chartForm.find("#legendField").hide();
chartForm.find("#typeField").hide();
} else {
selector.removeClass("ToolbarChangeRange2").addClass("ToolbarChangeRange")
selector.removeClass("ToolbarChangeRange2").addClass("ToolbarChangeRange");
chartForm.find("#switchTypeField").show();
chartForm.find("#gridField").show();
chartForm.find("#axisField").show();
chartForm.find("#titlesField").show();
chartForm.find("#legendField").show();
chartForm.find("#typeField").show();
}
});
......
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