Changeset 3652
- Timestamp:
- 03/21/2006 12:33:36 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit-comments.php
r3563 r3652 23 23 } 24 24 } 25 } 26 27 function getNumChecked(form) 28 { 29 var num = 0; 30 for (i = 0, n = form.elements.length; i < n; i++) { 31 if(form.elements[i].type == "checkbox") { 32 if(form.elements[i].checked == true) 33 num++; 34 } 35 } 36 return num; 25 37 } 26 38 //--> … … 169 181 ?></table> 170 182 <p><a href="javascript:;" onclick="checkAll(document.getElementById('deletecomments')); return false; "><?php _e('Invert Checkbox Selection') ?></a></p> 171 <p class="submit"><input type="submit" name="delete_button" value="<?php _e('Delete Checked Comments »') ?>" onclick=" return confirm('<?php _e("You are about to delete these comments permanently \\n \'Cancel\' to stop, \'OK\' to delete.")?>')" />183 <p class="submit"><input type="submit" name="delete_button" value="<?php _e('Delete Checked Comments »') ?>" onclick="var numchecked = getNumChecked(document.getElementById('deletecomments')); if(numchecked < 1) { alert('<?php _e("Please select some comments to delete"); ?>'); return false } return confirm('<?php printf(__("You are about to delete %s comments permanently \\n \'Cancel\' to stop, \'OK\' to delete."), "' + numchecked + '"); ?>')" /> 172 184 <input type="submit" name="spam_button" value="<?php _e('Mark Checked Comments as Spam »') ?>" onclick="return confirm('<?php _e("You are about to mark these comments as spam \\n \'Cancel\' to stop, \'OK\' to mark as spam.") ?>')" /></p> 173 185 </form>
Note: See TracChangeset
for help on using the changeset viewer.