ofbiz-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jler...@apache.org
Subject svn commit: r616697 - in /ofbiz/trunk: applications/product/webapp/catalog/feature/EditFeatureCategoryFeatures.ftl framework/images/webapp/images/maincss.css framework/images/webapp/images/selectall.js
Date Wed, 30 Jan 2008 09:20:59 GMT
Author: jleroux
Date: Wed Jan 30 01:20:59 2008
New Revision: 616697

URL: http://svn.apache.org/viewvc?rev=616697&view=rev
Log:
A patch from Bilgin Ibryam "Highlight Selected Feature" (https://issues.apache.org/jira/browse/OFBIZ-689)
- OFBIZ-689
A slight change a big effect !


Modified:
    ofbiz/trunk/applications/product/webapp/catalog/feature/EditFeatureCategoryFeatures.ftl
    ofbiz/trunk/framework/images/webapp/images/maincss.css
    ofbiz/trunk/framework/images/webapp/images/selectall.js

Modified: ofbiz/trunk/applications/product/webapp/catalog/feature/EditFeatureCategoryFeatures.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/feature/EditFeatureCategoryFeatures.ftl?rev=616697&r1=616696&r2=616697&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/feature/EditFeatureCategoryFeatures.ftl
(original)
+++ ofbiz/trunk/applications/product/webapp/catalog/feature/EditFeatureCategoryFeatures.ftl
Wed Jan 30 01:20:59 2008
@@ -79,14 +79,14 @@
                 <td><b>${uiLabelMap.ProductIdSeqNum}</b></td>
                 <td><b>${uiLabelMap.ProductIdCode}</b></td>
                 <td><b>${uiLabelMap.ProductAbbrev}</b></td>
-                <td align="right"><b>${uiLabelMap.CommonAll}<input type="checkbox"
name="selectAll" value="${uiLabelMap.CommonY}" onclick="javascript:toggleAll(this, 'selectAllForm');"></td>
+                <td align="right"><b>${uiLabelMap.CommonAll}<input type="checkbox"
name="selectAll" value="${uiLabelMap.CommonY}" onclick="javascript:toggleAll(this, 'selectAllForm');highlightAllRows(this,
'productFeatureId_tableRow_', 'selectAllForm');"></td>
              </tr>
         <#if (listSize > 0)>
             <#assign rowCount = 0>
             <#assign rowClass = "2">
             <#list productFeatures as productFeature>
             <#assign curProductFeatureType = productFeature.getRelatedOneCache("ProductFeatureType")>
-            <tr valign="middle"<#if rowClass == "1"> class="alternate-row"</#if>>
+            <tr id="productFeatureId_tableRow_${rowCount}" valign="middle"<#if rowClass
== "1"> class="alternate-row"</#if>>
               <input type="hidden" name="productFeatureId_o_${rowCount}" value="${productFeature.productFeatureId}">
               <td><a href="<@ofbizUrl>EditFeature?productFeatureId=${productFeature.productFeatureId}</@ofbizUrl>"
class="buttontext">${productFeature.productFeatureId}</a></td>
               <td><input type="text" size='15' name="description_o_${rowCount}"
value="${productFeature.description}"></td>
@@ -115,7 +115,7 @@
               <td><input type="text" size='5' name="defaultSequenceNum_o_${rowCount}"
value="${productFeature.defaultSequenceNum?if_exists}"></td>
               <td><input type="text" size='5' name="idCode_o_${rowCount}" value="${productFeature.idCode?if_exists}"></td>
               <td><input type="text" size='5' name="abbrev_o_${rowCount}" value="${productFeature.abbrev?if_exists}"></td>
-              <td align="right"><input type="checkbox" name="_rowSubmit_o_${rowCount}"
value="Y" onclick="javascript:checkToggle(this, 'selectAllForm');"></td>
+              <td align="right"><input type="checkbox" name="_rowSubmit_o_${rowCount}"
value="Y" onclick="javascript:checkToggle(this, 'selectAllForm');highlightRow(this,'productFeatureId_tableRow_${rowCount}');"></td>
             </tr>
             <#assign rowCount = rowCount + 1>
             <#-- toggle the row color -->
@@ -131,4 +131,4 @@
         </#if>
         </table>
     </div>
-</div>
\ No newline at end of file
+</div>

Modified: ofbiz/trunk/framework/images/webapp/images/maincss.css
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/images/webapp/images/maincss.css?rev=616697&r1=616696&r2=616697&view=diff
==============================================================================
--- ofbiz/trunk/framework/images/webapp/images/maincss.css (original)
+++ ofbiz/trunk/framework/images/webapp/images/maincss.css Wed Jan 30 01:20:59 2008
@@ -1565,6 +1565,14 @@
 background-color: #eeeeee;
 }
 
+.basic-table .selected {
+background: #FFFCCF;
+}
+
+.basic-table .alternate-rowSelected {
+background: #FFF55F;
+}
+
 .basic-table tr .button-col {
 /* button column style - for the small
 collection of buttons used in lists */

Modified: ofbiz/trunk/framework/images/webapp/images/selectall.js
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/images/webapp/images/selectall.js?rev=616697&r1=616696&r2=616697&view=diff
==============================================================================
--- ofbiz/trunk/framework/images/webapp/images/selectall.js (original)
+++ ofbiz/trunk/framework/images/webapp/images/selectall.js Wed Jan 30 01:20:59 2008
@@ -80,6 +80,36 @@
     cform.submit();
 }
 
+// highlight the selected row(s)
+
+function highlightRow(e,rowId){
+    var currentClassName = document.getElementById(rowId).className;
+    if (e.checked) {
+        if (currentClassName == '' ) {
+            document.getElementById(rowId).className = 'selected';
+        } else if (currentClassName == 'alternate-row') {
+            document.getElementById(rowId).className = 'alternate-rowSelected';
+        }
+    } else {
+        if (currentClassName == 'selected') {
+            document.getElementById(rowId).className = '';
+        } else if (currentClassName == 'alternate-rowSelected') {
+            document.getElementById(rowId).className = 'alternate-row';
+        }
+    }
+}
+
+function highlightAllRows(e, halfRowId, formName){
+    var cform = document[formName];
+    var len = cform.elements.length;
+    for (var i = 0; i < len; i++) {
+        var element = cform.elements[i];
+        if (element.name.substring(0, 10) == "_rowSubmit") {
+            highlightRow(e, halfRowId+element.name.substring(13));
+        }
+    }
+}
+
 // popup windows functions
 
 function popUp(url, name, height, width) {



Mime
View raw message