Print

Print


Commit in SlicDiagWeb/src/main/webapp on MAIN
dbSelect.jsp+32-111.5 -> 1.6
home.html+1-11.3 -> 1.4
tabs.jsp+2-21.2 -> 1.3
treeFrame.jsp+41.5 -> 1.6
+39-14
4 modified files
Selection box is now colored correctly in Firefox

SlicDiagWeb/src/main/webapp
dbSelect.jsp 1.5 -> 1.6
diff -u -r1.5 -r1.6
--- dbSelect.jsp	13 Dec 2007 00:39:48 -0000	1.5
+++ dbSelect.jsp	14 Dec 2007 19:06:31 -0000	1.6
@@ -264,6 +264,13 @@
                 submitData(theForm, tableId);
             }
             
+            function submitAndPlotData(theForm, tableId) {
+                submitData(theForm, tableId);
+                
+                // Redirect to the Plots tab
+                top.location = "index.jsp?tab=plots.jsp#top";
+            }
+            
             function submitData(theForm, tableId) {
                 prepareData(theForm, tableId);
                 //alert("Submit?");
@@ -285,7 +292,7 @@
                 
                 // Check if this file has already been added
                 for (var i=1; i<lastRow; i++) {
-                    var val = tbl.rows[i].cells[2].firstChild.nodeValue;
+                    var val = tbl.rows[i].cells[3].firstChild.nodeValue;
                     if (val == file) {
                         alert("File has already been added: "+file+" \nNo action taken.");
                         return false;
@@ -318,11 +325,13 @@
                   sel.name = 'selRow' + lastRow;
                   for (var ii=0; ii<colorsArr.length; ii++) {
                     var opt = new Option(colorsArr[ii], colorsArr[ii]);
-                    opt.style.background = colorsArr[ii];
+                    opt.style.backgroundColor = colorsArr[ii];
                     sel.options[ii] = opt;
                   }
                   sel.selectedIndex = lastRow-1;
+                  sel.onchange= function(event) {changeBackground(this)};
                   cellRightSel.appendChild(sel);
+                  sel.style.backgroundColor = sel.options[sel.selectedIndex].style.backgroundColor;
                   
                   // "File" cell
                   var cell = row.insertCell(3);
@@ -341,6 +350,12 @@
             //alert("info: "+theForm.name);
             return false;
         }
+        
+        function changeBackground(sel) {
+            //alert(sel.options[sel.selectedIndex].style.backgroundColor);
+            sel.style.backgroundColor = sel.options[sel.selectedIndex].style.backgroundColor;
+            toggleId('warningId', true);
+        }
     </SCRIPT>
     </head>                                                       
     <body>
@@ -386,9 +401,9 @@
                 
                 <TR>
                     <TD>
-                        <c:out value="${arrDisp[fn:length(arrDisp)-1]}"/>:
+                        <b>${arrDisp[fn:length(arrDisp)-1]}</b>:
                     </TD>                    
-                    <TD COLSPAN="5">
+                    <TD COLSPAN="4">
                         <SELECT ID="${arrDisp[fn:length(arrDisp)-1]}" name="${arrDisp[fn:length(arrDisp)-1]}"> 
                             <c:set var="v" value="${aida:createList(data.rows, arrDB[fn:length(arrDisp)-1], false)}"/>
                             ${aida:sortList(v, true)}
@@ -400,7 +415,7 @@
                         </SELECT>
                     </TD>
                     <TD>
-                        <button  style="background-color: #fea;" onclick="addFile('${arrDisp[fn:length(arrDisp)-1]}', 'dataTable')"><b>Add</b></button>
+                        <button title="Add this File to the selected Data table" style="background-color: #fea;" onclick="addFile('${arrDisp[fn:length(arrDisp)-1]}', 'dataTable')"><b>Select Data</b></button>
                     </TD>
                     <TD>
                         <button  style="background-color: #fea;" onclick="resetForm(this.form)">Reset Form</button>
@@ -425,11 +440,14 @@
             <input type="hidden" name="full_selection" value="${initParam.full_selection}"/>
         </form>
         
-        <br><h3>Selected Data:</h3>
+        <br><br><h3>Selected Data:</h3>
+        
         <form name="dataSubmitForm" action="dbSelect.jsp">
-            <button  style="background-color: orange;" onclick="clearData(this.form, 'dataTable')">Clear Data</button>
+            <button title="Save selection and go to the Plot page" style="background-color: orange;" onclick="submitAndPlotData(this.form, 'dataTable')"><b>Plot Data</b></button>
+            &nbsp;
+            <button title="Save selection" style="background-color: orange;" onclick="submitData(this.form, 'dataTable')">Save Data</button>
             &nbsp;
-            <button  style="background-color: orange;" onclick="submitData(this.form, 'dataTable')"><b>Submit</b></button>
+            <button title="Clear selection" style="background-color: orange;" onclick="clearData(this.form, 'dataTable')">Clear Data</button>
             <c:set var="arrRes" value="${fn:split(initParam.namesResult, ' ')}" />         
             <TABLE ID="dataTable">
                 <TR>
@@ -457,9 +475,12 @@
                                 />
                             </TD>
                             <TD>
-                                <SELECT name="color${arrItems[0]}" id="color${arrItems[0]}" onchange="toggleId('warningId', true)"> 
+                                <SELECT style="background-color: ${arrItems[2]};" name="color${arrItems[0]}" id="color${arrItems[0]}" onChange="changeBackground(this);"> 
                                     <c:forEach var="obj" items="${arrColors}">
-                                        <OPTION style="background-color: ${obj};" value="${obj}" <c:if test="${arrItems[2] == obj}"> selected</c:if> >
+                                        <OPTION style="background-color: ${obj};" value="${obj}" 
+                                        <c:if test="${arrItems[2] == obj}"> 
+                                            selected
+                                        </c:if> >
                                             <c:out value="${obj}"/>
                                         </OPTION> 
                                     </c:forEach>                  
@@ -483,7 +504,7 @@
                 <TR><TD>
                         <font size=+2>
                             <b>You've made changes to the data selection. If you want save it,<br>
-                            don't forget to push "Submit" or "Clear" button before leaving this page! </b>&nbsp;
+                            don't forget to push "Plot Data" or "Save Data" button before leaving this page! </b>&nbsp;
                         </font>
                 </TD></TR>
             </TABLE>

SlicDiagWeb/src/main/webapp
home.html 1.3 -> 1.4
diff -u -r1.3 -r1.4
--- home.html	13 Dec 2007 00:39:48 -0000	1.3
+++ home.html	14 Dec 2007 19:06:31 -0000	1.4
@@ -42,7 +42,7 @@
         <br>
         <br>
       <div id="footer">
-        <p>Version: 2.1.0
+        <p>Version: 2.1.1
       </div>
 
 </body>

SlicDiagWeb/src/main/webapp
tabs.jsp 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- tabs.jsp	20 Nov 2007 20:03:53 -0000	1.2
+++ tabs.jsp	14 Dec 2007 19:06:31 -0000	1.3
@@ -16,11 +16,11 @@
                   scope="page">
             <tab:tab name="Home" value="home.html" >
             </tab:tab>
-            <tab:tab name="Manage" value="dbFrame.jsp" >
+            <tab:tab name="Select" value="dbSelect.jsp" >
             </tab:tab>
             <tab:tab name="Plot" value="plots.jsp" >
             </tab:tab>
-            <tab:tab name="Select" value="dbSelect.jsp" >
+            <tab:tab name="Manage" value="dbFrame.jsp" >
             </tab:tab>
         </tab:tabs>
         <tab:tabBody color="orange">

SlicDiagWeb/src/main/webapp
treeFrame.jsp 1.5 -> 1.6
diff -u -r1.5 -r1.6
--- treeFrame.jsp	29 Nov 2007 22:38:41 -0000	1.5
+++ treeFrame.jsp	14 Dec 2007 19:06:31 -0000	1.6
@@ -15,6 +15,10 @@
         
         <c:if test="${empty plotData || (plotData == initParam.no_selection)}">
             <h3>Tree Frame</h3>
+            <p>
+                No data has been selected.<br>
+                Please go to the <b>"Select"</b> tab and select/save some data.
+            </p>
         </c:if>
         
         <c:if test="${!empty plotData && !(plotData == initParam.no_selection)}">
CVSspam 0.2.8