Changeset 920
- Timestamp:
- 01/26/2009 08:48:22 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-messages/bp-messages-templatetags.php
r713 r920 217 217 218 218 function bp_messages_options() { 219 global $bp; 220 221 if ( $bp['current_action'] != 'sentbox' ) { 219 222 ?> 220 <?php _e( 'Select:', 'buddypress' ) ?>223 <?php _e( 'Select:', 'buddypress' ) ?> 221 224 <select name="message-type-select" id="message-type-select"> 222 225 <option value=""></option> … … 227 230 <a href="#" id="mark_as_read"><?php _e('Mark as Read', 'buddypress') ?></a> 228 231 <a href="#" id="mark_as_unread"><?php _e('Mark as Unread', 'buddypress') ?></a> 229 <a href="#" id="delete_messages"><?php _e('Delete', 'buddypress') ?></a> 232 <?php } ?> 233 <a href="#" id="delete_<?php echo $bp['current_action'] ?>_messages"><?php _e('Delete Selected', 'buddypress') ?></a> 230 234 <?php 231 235 } -
trunk/bp-messages/js/general.php
r805 r920 159 159 ); 160 160 161 jQuery("a#delete_ messages").click(161 jQuery("a#delete_inbox_messages").click( 162 162 function() { 163 163 checkboxes_tosend = ''; 164 164 checkboxes = jQuery("#message-threads tr td input[type='checkbox']"); 165 165 166 for(var i=0; i<checkboxes.length; i++) { 166 167 if(checkboxes[i].checked) { … … 186 187 } 187 188 189 if ( !checkboxes_tosend ) return false; 190 188 191 jQuery.post( ajaxurl, { 189 192 action: 'messages_delete', … … 206 209 } 207 210 ); 211 212 jQuery("a#delete_sentbox_messages").click( 213 function() { 214 checkboxes_tosend = ''; 215 checkboxes = jQuery("#message-threads tr td input[type='checkbox']"); 216 217 if ( !checkboxes.length ) return false; 218 219 for(var i=0; i<checkboxes.length; i++) { 220 if(checkboxes[i].checked) { 221 checkboxes_tosend += checkboxes[i].value; 222 223 if ( i != checkboxes.length - 1 ) { 224 checkboxes_tosend += ',' 225 } 226 alert('tr#m-' + checkboxes[i].value); 227 jQuery('tr#m-' + checkboxes[i].value).remove(); 228 } 229 } 230 231 if ( !checkboxes_tosend ) return false; 232 233 jQuery.post( ajaxurl, { 234 action: 'messages_delete', 235 'thread_ids': checkboxes_tosend 236 }, 237 function(response) { 238 response = response.substr(0, response.length-1); 239 var err_num = response.split('[[split]]'); 240 241 jQuery('#message').remove(); 242 243 if ( err_num[0] == "-1" ) { 244 // error 245 jQuery('table#message-threads').before('<div id="message" class="error fade"><p>' + err_num[1] + '</p></div>') 246 } else { 247 jQuery('table#message-threads').before('<div id="message" class="updated"><p>' + response + '</p></div>') 248 } 249 }); 250 return false; 251 } 252 ); 253 208 254 209 255 jQuery("a#close-notice").click( -
trunk/buddypress-theme/member-themes/buddypress-member/messages/index.php
r657 r920 10 10 11 11 <div id="content"> 12 <h2><?php _e( "Inbox", "buddypress"); ?></h2>12 <h2><?php _e( "Inbox", "buddypress" ); ?></h2> 13 13 <?php do_action( 'template_notices' ) // (error/success feedback) ?> 14 14 -
trunk/buddypress-theme/member-themes/buddypress-member/messages/sentbox.php
r657 r920 2 2 3 3 <div class="content-header"> 4 4 <div class="messages-options"> 5 <?php bp_messages_options() ?> 6 </div> 5 7 </div> 6 8 … … 16 18 <table id="message-threads"> 17 19 <?php while ( bp_message_threads() ) : bp_message_thread(); ?> 18 <tr >20 <tr id="m-<?php bp_message_thread_id() ?>"> 19 21 <td width="1%"> 20 22 </td> … … 30 32 <td width="4%"> 31 33 <a href="<?php bp_message_thread_delete_link() ?>" title="<?php _e("Delete Message", "buddypress"); ?>"><?php _e("Delete", "buddypress"); ?></a> 32 <input type="checkbox" name=" " value="" />34 <input type="checkbox" name="message_ids[]" value="<?php bp_message_thread_id() ?>" /> 33 35 </td> 34 36 </tr>
Note: See TracChangeset
for help on using the changeset viewer.