continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r572576 - in /maven/continuum/trunk/continuum-webapp/src/main: resources/localization/Continuum.properties webapp/WEB-INF/jsp/buildResults.jsp webapp/WEB-INF/jsp/components/projectSummaryComponent.jsp
Date Tue, 04 Sep 2007 08:25:10 GMT
Author: evenisse
Date: Tue Sep  4 01:25:09 2007
New Revision: 572576

URL: http://svn.apache.org/viewvc?rev=572576&view=rev
Log:
Add select/unselect All links for checkboxes

Modified:
    maven/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
    maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/buildResults.jsp
    maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/components/projectSummaryComponent.jsp

Modified: maven/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties?rev=572576&r1=572575&r2=572576&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
Tue Sep  4 01:25:09 2007
@@ -40,6 +40,8 @@
 builds = Builds
 info = Project Information
 or = OR
+selectAll = Select All
+unselectAll = Unselect All
 
 # ----------------------------------------------------------------------
 # Page: Top

Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/buildResults.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/buildResults.jsp?rev=572576&r1=572575&r2=572576&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/buildResults.jsp (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/buildResults.jsp Tue
Sep  4 01:25:09 2007
@@ -91,6 +91,8 @@
                     <td>
                       <redback:ifAuthorized permission="continuum-modify-group" resource="${projectGroupName}">
                         <input type="button" name="delete-project" value="<ww:text
name="delete"/>" onclick="document.forms.buildResultsForm.submit();" />
+                        <a href="#" onclick="selectAll();return false;"><ww:text
name="selectAll"/></a>
+                        <a href="#" onclick="unselectAll();return false;"><ww:text
name="unselectAll"/></a>
                       </redback:ifAuthorized>
                     </td>
                   </tr>
@@ -100,6 +102,33 @@
           </ww:if>
         </form>
       </div>
+
+    <script language="javascript">
+        <!--
+        function selectAll()
+        {
+            var inputs = document.getElementsByTagName("input");
+            for( var i = 0; inputs && i < inputs.length; i++ )
+            {
+                if( inputs[i].type == "checkbox" )
+                {
+                    inputs[i].checked = true;
+                }
+            }
+        }
+        function unselectAll()
+        {
+            var inputs = document.getElementsByTagName("input");
+            for( var i = 0; inputs && i < inputs.length; i++ )
+            {
+                if( inputs[i].type == "checkbox" )
+                {
+                    inputs[i].checked = false;
+                }
+            }
+        }
+        -->
+    </script>
     </body>
   </ww:i18n>
 </html>

Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/components/projectSummaryComponent.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/components/projectSummaryComponent.jsp?rev=572576&r1=572575&r2=572576&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/components/projectSummaryComponent.jsp
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/components/projectSummaryComponent.jsp
Tue Sep  4 01:25:09 2007
@@ -234,6 +234,8 @@
                 <input type="button" name="delete-projects" value="<ww:text name="projectGroup.deleteProjects"/>"
onclick="document.forms.projectsForm.methodToCall.value='remove';document.forms.projectsForm.submit();"
/>
                 <input type="button" name="build-projects" value="<ww:text name="projectGroup.buildProjects"/>"
onclick="document.forms.projectsForm.methodToCall.value='build';document.forms.projectsForm.submit();"
/>
                 <input type="button" name="cancel-builds" value="<ww:text name="projectGroup.cancelBuilds"/>"
onclick="document.forms.projectsForm.action='cancelBuilds.action';document.forms.projectsForm.submit();"
/>
+                <a href="#" onclick="selectAll();return false;"><ww:text name="selectAll"/></a>
+                <a href="#" onclick="unselectAll();return false;"><ww:text name="unselectAll"/></a>
               </redback:ifAuthorized>
             </td>
           </tr>
@@ -243,4 +245,31 @@
   </ww:if>
   </form>
 </ww:if>
+
+<script language="javascript">
+    <!--
+    function selectAll()
+    {
+        var inputs = document.getElementsByTagName("input");
+        for( var i = 0; inputs && i < inputs.length; i++ )
+        {
+            if( inputs[i].type == "checkbox" )
+            {
+                inputs[i].checked = true;
+            }
+        }
+    }
+    function unselectAll()
+    {
+        var inputs = document.getElementsByTagName("input");
+        for( var i = 0; inputs && i < inputs.length; i++ )
+        {
+            if( inputs[i].type == "checkbox" )
+            {
+                inputs[i].checked = false;
+            }
+        }
+    }
+    -->
+</script>
 </ww:i18n>



Mime
View raw message