diff --git a/build.xml b/build.xml index a103a7b..614ebae 100644 --- a/build.xml +++ b/build.xml @@ -54,9 +54,9 @@ ant -DMODULE_PATH=$VIZ_PFAD -DWEBAPP_DIR=$WEBAPP -DMODULE=viz dist - @@ -68,5 +68,6 @@ ant -DMODULE_PATH=$VIZ_PFAD -DWEBAPP_DIR=$WEBAPP -DMODULE=viz dist - --> + + diff --git a/src-modules/module/viz/conf/includes.txt b/src-modules/module/viz/conf/includes.txt index a610c5d..f6138e4 100644 --- a/src-modules/module/viz/conf/includes.txt +++ b/src-modules/module/viz/conf/includes.txt @@ -1,9 +1,11 @@ doku/viz_modul/viz.html +images/icons/more.svg +images/icons/chart-bar.svg +style/sx_viz_muster.css WEB-INF/conf/edustore/db/bin/SQL_ENV_viz.sam xml/js/viz/viz_functions.js xml/js/viz/d3.min.js xml/js/viz/d3-license.txt xml/viz_html_chart.xsl -images/icons/chart-bar.svg xml/js/viz/plot.js diff --git a/src-modules/module/viz/conf/viz.xml b/src-modules/module/viz/conf/viz.xml index cb9cdc2..304698a 100644 --- a/src-modules/module/viz/conf/viz.xml +++ b/src-modules/module/viz/conf/viz.xml @@ -1,6 +1,6 @@ - @@ -33,7 +33,75 @@ rightname="CS_BIA_STANDARDREPORTS_ADMIN[VIZ]" /> + + Schlüsseltabelle für Dialogtypen von Visualisierungseigenschaften + + + + + + + +superx +superx +viz_property_input_type +tid +1 +viz_property_input_type_pk + + + + + + +
+ + Schlüsseltabelle für Gruppen von Visualisierungseigenschaften + + + + + + + +superx +superx +viz_property_group +tid +1 +viz_property_group_pk + + + + + + +
+ + Schlüsseltabelle für Renderer von Visualisierungen + + + + + + + +superx +superx +viz_renderer +tid +1 +viz_renderer_pk + + + + + +
Diagrammentwürfe @@ -94,6 +162,14 @@ rightname="CS_BIA_STANDARDREPORTS_ADMIN[VIZ]" /> + 1=ja, 0=nein + Mit "|" getrennt + 1=ja, 0=nein + + + Wird als Tooltip angezeigt + + @@ -142,17 +218,17 @@ rightname="CS_BIA_STANDARDREPORTS_ADMIN[VIZ]" /> Abfragen zur Administration von Visualisierungen +parent="Masken verwalten">Abfragen zur Administration von Visualisierungen - + @@ -179,6 +255,16 @@ parent="Visualisierungen">Abfragen zur Administration von Visualisierungen + + + + + + + + @@ -199,6 +285,10 @@ parent="Visualisierungen">Abfragen zur Administration von Visualisierungen + + + + + + + + + + + + image/svg+xml + + + + + + + ... + + diff --git a/superx/xml/js/viz/viz_functions.js b/superx/xml/js/viz/viz_functions.js index b88372a..6ae0132 100644 --- a/superx/xml/js/viz/viz_functions.js +++ b/superx/xml/js/viz/viz_functions.js @@ -38,7 +38,7 @@ this.value=value; this.isDefault=isDefault; } -function chartProperty(name,caption,isMeasure,isMandatory) +function dimensionProperty(name,caption,isMeasure,isMandatory) { this.name=name; this.caption=caption; @@ -172,9 +172,9 @@ function prepareBarXForm() { var chartProperties=[]; var propertyCounter=0; - var myProp= new chartProperty("viz_dimension1","Kategorie-Dimension",false,true); + var myProp= new dimensionProperty("viz_dimension1","Kategorie-Dimension",false,true); chartProperties[0]=myProp; - var myProp= new chartProperty("viz_measure1","Maß",true,true); + var myProp= new dimensionProperty("viz_measure1","Maß",true,true); chartProperties[1]=myProp; return chartProperties; @@ -184,11 +184,11 @@ function prepareBarYForm() { var chartProperties=[]; var propertyCounter=0; - var myProp= new chartProperty("viz_dimension1","Kategorie-Dimension",true,false,true,null,null,true); + var myProp= new dimensionProperty("viz_dimension1","Kategorie-Dimension",true,false,true,null,null,true); chartProperties[0]=myProp; - var myProp= new chartProperty("viz_dimension2","Serien-Dimension",true,false,false,null,null,true); + var myProp= new dimensionProperty("viz_dimension2","Serien-Dimension",true,false,false,null,null,true); chartProperties[1]=myProp; - var myProp= new chartProperty("viz_measure1","Maß",true,true,true,null,null,true); + var myProp= new dimensionProperty("viz_measure1","Maß",true,true,true,null,null,true); chartProperties[2]=myProp; return chartProperties; @@ -198,11 +198,11 @@ function prepareLineForm() { var chartProperties=[]; var propertyCounter=0; - var myProp= new chartProperty("viz_dimension1","Kategorie-Dimension",true,false,true,null,null,true); + var myProp= new dimensionProperty("viz_dimension1","Kategorie-Dimension",true,false,true,null,null,true); chartProperties[0]=myProp; - var myProp= new chartProperty("viz_dimension2","Serien-Dimension",true,false,false,null,null,true); + var myProp= new dimensionProperty("viz_dimension2","Serien-Dimension",true,false,false,null,null,true); chartProperties[1]=myProp; - var myProp= new chartProperty("viz_measure1","Maß",true,true,true,null,null,true); + var myProp= new dimensionProperty("viz_measure1","Maß",true,true,true,null,null,true); chartProperties[2]=myProp; return chartProperties; @@ -212,9 +212,9 @@ function prepareLineForm_alt() { var chartProperties=[]; var propertyCounter=0; - var myProp= new chartProperty("dimension1","X-Achse",true,false,true,null,null,true); + var myProp= new dimensionProperty("dimension1","X-Achse",true,false,true,null,null,true); chartProperties[0]=myProp; - var myProp= new chartProperty("measure1","Y-Achse",true,true,true,null,null,true); + var myProp= new dimensionProperty("measure1","Y-Achse",true,true,true,null,null,true); chartProperties[1]=myProp; return chartProperties; @@ -397,6 +397,12 @@ function renderForm(formDiv,myChartProperties) */ for(var k=0;k < myChartProperties.length;k++) { + myForm.appendChild(renderDimensionField(myChartProperties[k])); + } +} + +function renderDimensionField(dimensionProperty) +{ const fieldElem = document.createElement("div"); fieldElem.classList.add("field"); fieldElem.classList.add("is-grouped"); @@ -407,7 +413,7 @@ function renderForm(formDiv,myChartProperties) label.classList.add("label"); label.classList.add("is-required"); label.classList.add("is-small"); - const textnode = document.createTextNode(myChartProperties[k].caption); + const textnode = document.createTextNode(dimensionProperty.caption); label.appendChild(textnode); labelElem.appendChild(label); fieldElem.appendChild(labelElem); @@ -423,17 +429,18 @@ function renderForm(formDiv,myChartProperties) inputSelectElem.classList.add("is-fullwidth"); const selElem = document.createElement("select"); - selElem.name=myChartProperties[k].name; - selElem.id=myChartProperties[k].name; - fillSelectOptions(selElem,myChartProperties[k].getValueResultset(),myChartProperties[k].isMandatory); + selElem.name=dimensionProperty.name; + selElem.id=dimensionProperty.name; + selElem.onchange= function () { + createChart('chartDiv'); + }; + fillSelectOptions(selElem,dimensionProperty.getValueResultset(),dimensionProperty.isMandatory); inputSelectElem.appendChild(selElem); inputParaElem.appendChild(inputSelectElem); inputFieldElem.appendChild(inputParaElem); fieldElem.appendChild(inputFieldElem); - - - myForm.appendChild(fieldElem); - } + return fieldElem; + } function renderFormDetails(formDiv,myCommonChartProperties) @@ -443,8 +450,8 @@ function renderFormDetails(formDiv,myCommonChartProperties) while (myForm.firstChild) { myForm.removeChild(myForm.firstChild); } + /* const tabElem = document.createElement("table"); - //tabElem.caption="Eigenschaften"; for(var k=0;k < myCommonChartProperties.length;k++) { const rowElem = document.createElement("tr"); @@ -452,7 +459,7 @@ function renderFormDetails(formDiv,myCommonChartProperties) const textnode = document.createTextNode(myCommonChartProperties[k].caption); tdCap.appendChild(textnode); rowElem.appendChild(tdCap); - if(myCommonChartProperties[k].inputType==0) + if(myCommonChartProperties[k].inputType=="TEXT") { //Einfaches Texteingabefeld: const tdInpElem = document.createElement("td"); @@ -466,7 +473,7 @@ function renderFormDetails(formDiv,myCommonChartProperties) } else - { // Klappmenü: + { const tdSelElem = document.createElement("td"); const selElem = document.createElement("select"); selElem.name=myCommonChartProperties[k].name; @@ -475,11 +482,76 @@ function renderFormDetails(formDiv,myCommonChartProperties) tdSelElem.appendChild(selElem); rowElem.appendChild(tdSelElem); } - //here values, and then: tabElem.appendChild( rowElem); - } - myForm.appendChild(tabElem); - //TODO: myCommonChartProperties auf separatem TAB + } +*/ + for(var k=0;k < myCommonChartProperties.length;k++) + { + myForm.appendChild(renderChartPropertyField(myCommonChartProperties[k])); + } +} + +function renderChartPropertyField(commonChartProperty) +{ + const fieldElem = document.createElement("div"); + fieldElem.classList.add("field"); + fieldElem.classList.add("is-grouped"); + //label: + const labelElem = document.createElement("div"); + labelElem.classList.add("label-container"); + const label = document.createElement("label"); + label.classList.add("label"); + label.classList.add("is-required"); + label.classList.add("is-small"); + const textnode = document.createTextNode(commonChartProperty.caption); + label.appendChild(textnode); + labelElem.appendChild(label); + fieldElem.appendChild(labelElem); + //input: + const inputFieldElem = document.createElement("div"); + inputFieldElem.classList.add("field"); + //inputFieldElem.classList.add("is-active"); + const inputParaElem = document.createElement("p"); + inputParaElem.classList.add("control-new"); + const inputElem = document.createElement("div"); + inputElem.classList.add("is-small"); + inputElem.classList.add("is-fullwidth"); + if(commonChartProperty.inputType=="TEXT") + { + //Einfaches Texteingabefeld: + const inpElem = document.createElement("input"); + inpElem.type="TEXT"; + inpElem.size=15; + inpElem.title=commonChartProperty.explanation; + inpElem.name=commonChartProperty.name; + inpElem.id=commonChartProperty.name; + inpElem.value=commonChartProperty.defaultValue; + inpElem.onchange= function () { + createChart('chartDiv'); + }; + inputElem.appendChild(inpElem); + inputParaElem.appendChild(inputElem); + + } + else + { + //select input: + inputElem.classList.add("select"); + const selElem = document.createElement("select"); + selElem.name=commonChartProperty.name; + selElem.id=commonChartProperty.name; + selElem.title=commonChartProperty.explanation; + selElem.onchange= function () { + createChart('chartDiv'); + }; + fillSelectOptions(selElem,commonChartProperty.getValueResultset(),commonChartProperty.isMandatory); + inputElem.appendChild(selElem); + inputParaElem.appendChild(inputElem); + } + inputFieldElem.appendChild(inputParaElem); + fieldElem.appendChild(inputFieldElem); + return fieldElem; + } function fillSelectOptions(myCombo,myValues,isMandatory) @@ -642,15 +714,18 @@ for(row=1;row + + +var newCommonChartProperty = new commonChartProperty(" + +"," + +", +true + +false + +," + +" +," + +"," + +"," + +"," + +"); commonChartProperties.push(newCommonChartProperty); - -var newCommonChartProperty = new commonChartProperty("chartCaption","Titel des Diagramms", false,0, null,"]]> -"); + + + +var newCommonChartProperty = new commonChartProperty("chartCaption","Titel des Diagramms", false,"TEXT", ""," +","wird unter dem Diagramm angezeigt","TITLE"); commonChartProperties.push(newCommonChartProperty); -