Modify

Opened 14 years ago

#7451 new enhancement

Allow select/unselect all on preview page

Reported by: ian.sherratt@… Owned by: Tristan Rivoallan
Priority: normal Component: WikiImportPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

Simple select/unselect all functionality is handy, here's my stab for our install, use if you like :)

Cheers Ian

Index: 0.11/wikiimport/templates/admin_wikiimport_preview.html
===================================================================
--- 0.11/wikiimport/templates/admin_wikiimport_preview.html     (revision 8330)
+++ 0.11/wikiimport/templates/admin_wikiimport_preview.html     (working copy)
@@ -10,7 +10,23 @@
 </head>
 
 <body>
+<script type="text/javascript">//<![CDATA[
+function toggleAllCheckboxesOnForm(targetform)
+{
 
+  for(var i=0; i < targetform.elements.length; i++)
+  {
+        if (targetform.elements[i].checked == true){
+           targetform.elements[i].checked = false;
+        }
+        else
+        {
+           targetform.elements[i].checked = true;
+        }
+  }
+}
+//]]></script>
+
        <h2>Preview import</h2>
 
        <p class="help">Pages marked for update will get a new version. Previous content will still be available in page's history.</p>
@@ -19,7 +35,9 @@
        <table id="complist" class="listing">
                <thead>
                        <tr>
-                               <th class="wikiimport-check">Perform operation ?</th>
+                               <th class="wikiimport-check">Perform operation ? 
+                                       <input type="checkbox" checked="1" onchange="toggleAllCheckboxesOnForm(this.form); "/>
+                               </th>
                                <th>Page name</th>
                                <th>Operation</th>
                        </tr>

Attachments (0)

Change History (0)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain Tristan Rivoallan.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.