Changeset 1914
- Timestamp:
- 09/21/2009 10:06:48 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/bp-themes/bp-sn-parent/_inc/js/ajax.js (modified) (60 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-themes/bp-sn-parent/_inc/js/ajax.js
r1871 r1914 1 1 jQuery(document).ready( function() { 2 jQuery("ul#letter-list li a").livequery('click', 2 var j = jQuery; 3 4 j("div#members-directory-page ul#letter-list li a").livequery('click', 3 5 function() { 4 j Query('.ajax-loader').toggle();5 6 j Query("div#members-list-options a.selected").removeClass("selected");7 j Query("#letter-list li a.selected").removeClass("selected");8 9 j Query(this).addClass('selected');10 j Query("input#members_search").val('');11 12 var letter = j Query(this).attr('id')6 j('.ajax-loader').toggle(); 7 8 j("div#members-list-options a.selected").removeClass("selected"); 9 j("#letter-list li a.selected").removeClass("selected"); 10 11 j(this).addClass('selected'); 12 j("input#members_search").val(''); 13 14 var letter = j(this).attr('id') 13 15 letter = letter.split('-'); 14 16 15 var page = ( j Query('input#members-page-num').val() ) ? jQuery('input#members-page-num').val() : 1;16 17 j Query.post( ajaxurl, {17 var page = ( j('input#members-page-num').val() ) ? j('input#members-page-num').val() : 1; 18 19 j.post( ajaxurl, { 18 20 action: 'directory_members', 19 21 'cookie': encodeURIComponent(document.cookie), 20 '_wpnonce': j Query("input#_wpnonce-member-filter").val(),22 '_wpnonce': j("input#_wpnonce-member-filter").val(), 21 23 'letter': letter[1], 22 24 'page': page … … 26 28 response = response.substr(0, response.length-1); 27 29 28 j Query("#member-dir-list").fadeOut(200,29 function() { 30 j Query('.ajax-loader').toggle();31 j Query("#member-dir-list").html(response);32 j Query("#member-dir-list").fadeIn(200);30 j("#member-dir-list").fadeOut(200, 31 function() { 32 j('.ajax-loader').toggle(); 33 j("#member-dir-list").html(response); 34 j("#member-dir-list").fadeIn(200); 33 35 } 34 36 ); … … 39 41 ); 40 42 41 j Query("form#search-members-form").submit( function() {42 j Query('.ajax-loader').toggle();43 44 var page = ( j Query('input#members-page-num').val() ) ? jQuery('input#members-page-num').val() : 1;45 46 j Query.post( ajaxurl, {43 j("form#search-members-form").submit( function() { 44 j('.ajax-loader').toggle(); 45 46 var page = ( j('input#members-page-num').val() ) ? j('input#members-page-num').val() : 1; 47 48 j.post( ajaxurl, { 47 49 action: 'directory_members', 48 50 'cookie': encodeURIComponent(document.cookie), 49 '_wpnonce': j Query("input#_wpnonce-member-filter").val(),50 's': j Query("input#members_search").val(),51 '_wpnonce': j("input#_wpnonce-member-filter").val(), 52 's': j("input#members_search").val(), 51 53 'page': page 52 54 }, … … 55 57 response = response.substr(0, response.length-1); 56 58 57 j Query("#member-dir-list").fadeOut(200,58 function() { 59 j Query('.ajax-loader').toggle();60 j Query("#member-dir-list").html(response);61 j Query("#member-dir-list").fadeIn(200);59 j("#member-dir-list").fadeOut(200, 60 function() { 61 j('.ajax-loader').toggle(); 62 j("#member-dir-list").html(response); 63 j("#member-dir-list").fadeIn(200); 62 64 } 63 65 ); … … 68 70 ); 69 71 70 j Query("div#member-dir-pag a").livequery('click',72 j("div#member-dir-pag a").livequery('click', 71 73 function() { 72 j Query('.ajax-loader').toggle();73 74 var page = j Query(this).attr('href');74 j('.ajax-loader').toggle(); 75 76 var page = j(this).attr('href'); 75 77 page = page.split('upage='); 76 78 77 if ( !j Query("input#selected_letter").val() )79 if ( !j("input#selected_letter").val() ) 78 80 var letter = ''; 79 81 else 80 var letter = j Query("input#selected_letter").val();82 var letter = j("input#selected_letter").val(); 81 83 82 if ( !j Query("input#search_terms").val() )84 if ( !j("input#search_terms").val() ) 83 85 var search_terms = ''; 84 86 else 85 var search_terms = j Query("input#search_terms").val();86 87 j Query.post( ajaxurl, {87 var search_terms = j("input#search_terms").val(); 88 89 j.post( ajaxurl, { 88 90 action: 'directory_members', 89 91 'cookie': encodeURIComponent(document.cookie), 90 '_wpnonce': j Query("input#_wpnonce").val(),92 '_wpnonce': j("input#_wpnonce").val(), 91 93 'upage': page[1], 92 '_wpnonce': j Query("input#_wpnonce-member-filter").val(),94 '_wpnonce': j("input#_wpnonce-member-filter").val(), 93 95 94 96 'letter': letter, … … 99 101 response = response.substr(0, response.length-1); 100 102 101 j Query("#member-dir-list").fadeOut(200,102 function() { 103 j Query('.ajax-loader').toggle();104 j Query("#member-dir-list").html(response);105 j Query("#member-dir-list").fadeIn(200);106 } 107 ); 108 }); 109 110 return false; 111 } 112 ); 113 114 j Query("div.friendship-button a").livequery('click',115 function() { 116 j Query(this).parent().addClass('loading');117 var fid = j Query(this).attr('id');103 j("#member-dir-list").fadeOut(200, 104 function() { 105 j('.ajax-loader').toggle(); 106 j("#member-dir-list").html(response); 107 j("#member-dir-list").fadeIn(200); 108 } 109 ); 110 }); 111 112 return false; 113 } 114 ); 115 116 j("div.friendship-button a").livequery('click', 117 function() { 118 j(this).parent().addClass('loading'); 119 var fid = j(this).attr('id'); 118 120 fid = fid.split('-'); 119 121 fid = fid[1]; 120 122 121 var nonce = j Query(this).attr('href');123 var nonce = j(this).attr('href'); 122 124 nonce = nonce.split('?_wpnonce='); 123 125 nonce = nonce[1].split('&'); 124 126 nonce = nonce[0]; 125 127 126 var thelink = j Query(this);127 128 j Query.post( ajaxurl, {128 var thelink = j(this); 129 130 j.post( ajaxurl, { 129 131 action: 'addremove_friend', 130 132 'cookie': encodeURIComponent(document.cookie), … … 140 142 141 143 if ( action == 'add' ) { 142 j Query(parentdiv).fadeOut(200,144 j(parentdiv).fadeOut(200, 143 145 function() { 144 146 parentdiv.removeClass('add_friend'); … … 150 152 151 153 } else if ( action == 'remove' ) { 152 j Query(parentdiv).fadeOut(200,154 j(parentdiv).fadeOut(200, 153 155 function() { 154 156 parentdiv.removeClass('remove_friend'); … … 164 166 ); 165 167 166 j Query("div#wire-pagination a").livequery('click',168 j("div#wire-pagination a").livequery('click', 167 169 function() { 168 j Query('.ajax-loader').toggle();169 170 var fpage = j Query(this).attr('href');170 j('.ajax-loader').toggle(); 171 172 var fpage = j(this).attr('href'); 171 173 fpage = fpage.split('='); 172 174 173 j Query.post( ajaxurl, {175 j.post( ajaxurl, { 174 176 action: 'get_wire_posts', 175 177 'cookie': encodeURIComponent(document.cookie), 176 '_wpnonce': j Query("input#_wpnonce").val(),178 '_wpnonce': j("input#_wpnonce").val(), 177 179 'wpage': fpage[1], 178 'bp_wire_item_id': j Query("input#bp_wire_item_id").val()179 }, 180 function(response) 181 { 182 j Query('.ajax-loader').toggle();183 184 response = response.substr(0, response.length-1); 185 186 j Query("#wire-post-list-content").fadeOut(200,187 function() { 188 j Query("#wire-post-list-content").html(response);189 j Query("#wire-post-list-content").fadeIn(200);180 'bp_wire_item_id': j("input#bp_wire_item_id").val() 181 }, 182 function(response) 183 { 184 j('.ajax-loader').toggle(); 185 186 response = response.substr(0, response.length-1); 187 188 j("#wire-post-list-content").fadeOut(200, 189 function() { 190 j("#wire-post-list-content").html(response); 191 j("#wire-post-list-content").fadeIn(200); 190 192 } 191 193 ); … … 198 200 ); 199 201 200 j Query("div#pag a").livequery('click',202 j("div#pag a").livequery('click', 201 203 function() { 202 j Query('.ajax-loader').toggle();203 204 var frpage = j Query(this).attr('href');204 j('.ajax-loader').toggle(); 205 206 var frpage = j(this).attr('href'); 205 207 frpage = frpage.split('='); 206 208 207 j Query.post( ajaxurl, {209 j.post( ajaxurl, { 208 210 action: 'friends_search', 209 211 'cookie': encodeURIComponent(document.cookie), 210 '_wpnonce': j Query("input#_wpnonce_friend_search").val(),211 'initiator_id': j Query("input#initiator").val(),212 '_wpnonce': j("input#_wpnonce_friend_search").val(), 213 'initiator_id': j("input#initiator").val(), 212 214 'frpage': frpage[1], 213 215 214 'friend-search-box': j Query("#friend-search-box").val()216 'friend-search-box': j("#friend-search-box").val() 215 217 }, 216 218 function(response) … … 218 220 response = response.substr( 0, response.length - 1 ); 219 221 220 j Query("div#friends-loop").fadeOut(200,221 function() { 222 j Query('.ajax-loader').toggle();223 j Query("div#friends-loop").html(response);224 j Query("div#friends-loop").fadeIn(200);225 } 226 ); 227 }); 228 229 return false; 230 } 231 ); 232 233 j Query("input#friend-search-box").keyup(222 j("div#friends-loop").fadeOut(200, 223 function() { 224 j('.ajax-loader').toggle(); 225 j("div#friends-loop").html(response); 226 j("div#friends-loop").fadeIn(200); 227 } 228 ); 229 }); 230 231 return false; 232 } 233 ); 234 235 j("input#friend-search-box").keyup( 234 236 235 237 function(e) { 236 238 if ( e.which == 13 ) { 237 j Query('.ajax-loader').toggle();238 239 j Query.post( ajaxurl, {239 j('.ajax-loader').toggle(); 240 241 j.post( ajaxurl, { 240 242 action: 'friends_search', 241 243 'cookie': encodeURIComponent(document.cookie), 242 '_wpnonce': j Query("input#_wpnonce_friend_search").val(),243 244 'friend-search-box': j Query("#friend-search-box").val()244 '_wpnonce': j("input#_wpnonce_friend_search").val(), 245 246 'friend-search-box': j("#friend-search-box").val() 245 247 }, 246 248 function(response) … … 248 250 response = response.substr( 0, response.length - 1 ); 249 251 250 j Query("div#friends-loop").fadeOut(200,252 j("div#friends-loop").fadeOut(200, 251 253 function() { 252 j Query('.ajax-loader').toggle();253 j Query("div#friends-loop").html(response);254 j Query("div#friends-loop").fadeIn(200);254 j('.ajax-loader').toggle(); 255 j("div#friends-loop").html(response); 256 j("div#friends-loop").fadeIn(200); 255 257 } 256 258 ); … … 263 265 ); 264 266 265 j Query("ul#letter-list li a").livequery('click',267 j("div#groups-directory-page ul#letter-list li a").livequery('click', 266 268 function() { 267 j Query('.ajax-loader').toggle();268 269 j Query("div#groups-list-options a.selected").removeClass("selected");270 j Query("#letter-list li a.selected").removeClass("selected");271 272 j Query(this).addClass('selected');273 j Query("input#groups_search").val('');274 275 var letter = j Query(this).attr('id')269 j('.ajax-loader').toggle(); 270 271 j("div#groups-list-options a.selected").removeClass("selected"); 272 j("#letter-list li a.selected").removeClass("selected"); 273 274 j(this).addClass('selected'); 275 j("input#groups_search").val(''); 276 277 var letter = j(this).attr('id') 276 278 letter = letter.split('-'); 277 279 278 j Query.post( ajaxurl, {280 j.post( ajaxurl, { 279 281 action: 'directory_groups', 280 282 'cookie': encodeURIComponent(document.cookie), 281 '_wpnonce': j Query("input#_wpnonce-group-filter").val(),283 '_wpnonce': j("input#_wpnonce-group-filter").val(), 282 284 'letter': letter[1], 283 285 'page': 1 … … 286 288 { 287 289 response = response.substr(0, response.length-1); 288 j Query("#group-dir-list").fadeOut(200,289 function() { 290 j Query('.ajax-loader').toggle();291 j Query("#group-dir-list").html(response);292 j Query("#group-dir-list").fadeIn(200);290 j("#group-dir-list").fadeOut(200, 291 function() { 292 j('.ajax-loader').toggle(); 293 j("#group-dir-list").html(response); 294 j("#group-dir-list").fadeIn(200); 293 295 } 294 296 ); … … 299 301 ); 300 302 301 j Query("form#search-groups-form").submit( function() {302 j Query('.ajax-loader').toggle();303 304 j Query.post( ajaxurl, {303 j("form#search-groups-form").submit( function() { 304 j('.ajax-loader').toggle(); 305 306 j.post( ajaxurl, { 305 307 action: 'directory_groups', 306 308 'cookie': encodeURIComponent(document.cookie), 307 '_wpnonce': j Query("input#_wpnonce-group-filter").val(),308 's': j Query("input#groups_search").val(),309 '_wpnonce': j("input#_wpnonce-group-filter").val(), 310 's': j("input#groups_search").val(), 309 311 'page': 1 310 312 }, … … 312 314 { 313 315 response = response.substr(0, response.length-1); 314 j Query("#group-dir-list").fadeOut(200,315 function() { 316 j Query('.ajax-loader').toggle();317 j Query("#group-dir-list").html(response);318 j Query("#group-dir-list").fadeIn(200);316 j("#group-dir-list").fadeOut(200, 317 function() { 318 j('.ajax-loader').toggle(); 319 j("#group-dir-list").html(response); 320 j("#group-dir-list").fadeIn(200); 319 321 } 320 322 ); … … 325 327 ); 326 328 327 j Query("div#group-dir-pag a").livequery('click',329 j("div#group-dir-pag a").livequery('click', 328 330 function() { 329 j Query('.ajax-loader').toggle();330 331 var page = j Query(this).attr('href');331 j('.ajax-loader').toggle(); 332 333 var page = j(this).attr('href'); 332 334 page = page.split('gpage='); 333 335 334 if ( !j Query("input#selected_letter").val() )336 if ( !j("input#selected_letter").val() ) 335 337 var letter = ''; 336 338 else 337 var letter = j Query("input#selected_letter").val();339 var letter = j("input#selected_letter").val(); 338 340 339 if ( !j Query("input#search_terms").val() )341 if ( !j("input#search_terms").val() ) 340 342 var search_terms = ''; 341 343 else 342 var search_terms = j Query("input#search_terms").val();343 344 j Query.post( ajaxurl, {344 var search_terms = j("input#search_terms").val(); 345 346 j.post( ajaxurl, { 345 347 action: 'directory_groups', 346 348 'cookie': encodeURIComponent(document.cookie), 347 '_wpnonce': j Query("input#_wpnonce").val(),349 '_wpnonce': j("input#_wpnonce").val(), 348 350 'gpage': page[1], 349 '_wpnonce': j Query("input#_wpnonce-group-filter").val(),351 '_wpnonce': j("input#_wpnonce-group-filter").val(), 350 352 351 353 'letter': letter, … … 355 357 { 356 358 response = response.substr(0, response.length-1); 357 j Query("#group-dir-list").fadeOut(200,358 function() { 359 j Query('.ajax-loader').toggle();360 j Query("#group-dir-list").html(response);361 j Query("#group-dir-list").fadeIn(200);359 j("#group-dir-list").fadeOut(200, 360 function() { 361 j('.ajax-loader').toggle(); 362 j("#group-dir-list").html(response); 363 j("#group-dir-list").fadeIn(200); 362 364 } 363 365 ); … … 368 370 ); 369 371 370 j Query(".directory-listing div.group-button a").livequery('click',371 function() { 372 var gid = j Query(this).parent().attr('id');372 j(".directory-listing div.group-button a").livequery('click', 373 function() { 374 var gid = j(this).parent().attr('id'); 373 375 gid = gid.split('-'); 374 376 gid = gid[1]; 375 377 376 var nonce = j Query(this).attr('href');378 var nonce = j(this).attr('href'); 377 379 nonce = nonce.split('?_wpnonce='); 378 380 nonce = nonce[1].split('&'); 379 381 nonce = nonce[0]; 380 382 381 var thelink = j Query(this);382 383 j Query.post( ajaxurl, {383 var thelink = j(this); 384 385 j.post( ajaxurl, { 384 386 action: 'joinleave_group', 385 387 'cookie': encodeURIComponent(document.cookie), … … 392 394 var parentdiv = thelink.parent(); 393 395 394 j Query(parentdiv).fadeOut(200,396 j(parentdiv).fadeOut(200, 395 397 function() { 396 398 parentdiv.fadeIn(200).html(response); … … 402 404 ); 403 405 404 j Query("form#group-search-form").submit(405 function() { 406 return false; 407 } 408 ); 409 410 j Query("div#invite-list input").click(411 function() { 412 j Query('.ajax-loader').toggle();413 414 var friend_id = j Query(this).val();415 416 if ( j Query(this).attr('checked') == true ) {406 j("form#group-search-form").submit( 407 function() { 408 return false; 409 } 410 ); 411 412 j("div#invite-list input").click( 413 function() { 414 j('.ajax-loader').toggle(); 415 416 var friend_id = j(this).val(); 417 418 if ( j(this).attr('checked') == true ) { 417 419 var friend_action = 'invite'; 418 420 } else { … … 420 422 } 421 423 422 j Query.post( ajaxurl, {424 j.post( ajaxurl, { 423 425 action: 'groups_invite_user', 424 426 'friend_action': friend_action, 425 427 'cookie': encodeURIComponent(document.cookie), 426 '_wpnonce': j Query("input#_wpnonce_invite_uninvite_user").val(),428 '_wpnonce': j("input#_wpnonce_invite_uninvite_user").val(), 427 429 'friend_id': friend_id, 428 'group_id': j Query("input#group_id").val()429 }, 430 function(response) 431 { 432 if ( j Query("#message") )433 j Query("#message").hide();434 435 j Query('.ajax-loader').toggle();430 'group_id': j("input#group_id").val() 431 }, 432 function(response) 433 { 434 if ( j("#message") ) 435 j("#message").hide(); 436 437 j('.ajax-loader').toggle(); 436 438 437 439 if ( friend_action == 'invite' ) { 438 j Query('#friend-list').append(response);440 j('#friend-list').append(response); 439 441 } else if ( friend_action == 'uninvite' ) { 440 j Query('#friend-list li#uid-' + friend_id).remove();441 } 442 }); 443 } 444 ); 445 446 j Query("#friend-list li a.remove").livequery('click',447 function() { 448 j Query('.ajax-loader').toggle();449 450 var friend_id = j Query(this).attr('id');442 j('#friend-list li#uid-' + friend_id).remove(); 443 } 444 }); 445 } 446 ); 447 448 j("#friend-list li a.remove").livequery('click', 449 function() { 450 j('.ajax-loader').toggle(); 451 452 var friend_id = j(this).attr('id'); 451 453 friend_id = friend_id.split('-'); 452 454 friend_id = friend_id[1]; 453 455 454 j Query.post( ajaxurl, {456 j.post( ajaxurl, { 455 457 action: 'groups_invite_user', 456 458 'friend_action': 'uninvite', 457 459 'cookie': encodeURIComponent(document.cookie), 458 '_wpnonce': j Query("input#_wpnonce_invite_uninvite_user").val(),460 '_wpnonce': j("input#_wpnonce_invite_uninvite_user").val(), 459 461 'friend_id': friend_id, 460 'group_id': j Query("input#group_id").val()461 }, 462 function(response) 463 { 464 j Query('.ajax-loader').toggle();465 j Query('#friend-list li#uid-' + friend_id).remove();466 j Query('#invite-list input#f-' + friend_id).attr('checked', false);467 }); 468 469 return false; 470 } 471 ); 472 473 j Query("div#pag a").livequery('click',462 'group_id': j("input#group_id").val() 463 }, 464 function(response) 465 { 466 j('.ajax-loader').toggle(); 467 j('#friend-list li#uid-' + friend_id).remove(); 468 j('#invite-list input#f-' + friend_id).attr('checked', false); 469 }); 470 471 return false; 472 } 473 ); 474 475 j("div#pag a").livequery('click', 474 476 function() { 475 j Query('.ajax-loader').toggle();476 477 var grpage = j Query(this).attr('href');477 j('.ajax-loader').toggle(); 478 479 var grpage = j(this).attr('href'); 478 480 grpage = grpage.split('='); 479 481 480 j Query.post( ajaxurl, {482 j.post( ajaxurl, { 481 483 action: 'group_filter', 482 484 'cookie': encodeURIComponent(document.cookie), 483 '_wpnonce': j Query("input#_wpnonce_group_filter").val(),485 '_wpnonce': j("input#_wpnonce_group_filter").val(), 484 486 'grpage': grpage[1], 485 487 486 'group-filter-box': j Query("#group-filter-box").val()488 'group-filter-box': j("#group-filter-box").val() 487 489 }, 488 490 function(response) … … 490 492 response = response.substr( 0, response.length - 1 ); 491 493 492 j Query("div#group-loop").fadeOut(200,493 function() { 494 j Query('.ajax-loader').toggle();495 j Query("div#group-loop").html(response);496 j Query("div#group-loop").fadeIn(200);497 } 498 ); 499 }); 500 501 return false; 502 } 503 ); 504 505 j Query("input#group-filter-box").keyup(494 j("div#group-loop").fadeOut(200, 495 function() { 496 j('.ajax-loader').toggle(); 497 j("div#group-loop").html(response); 498 j("div#group-loop").fadeIn(200); 499 } 500 ); 501 }); 502 503 return false; 504 } 505 ); 506 507 j("input#group-filter-box").keyup( 506 508 function(e) { 507 509 if ( e.which == 13 ) { 508 j Query('.ajax-loader').toggle();509 510 j Query.post( ajaxurl, {510 j('.ajax-loader').toggle(); 511 512 j.post( ajaxurl, { 511 513 action: 'group_filter', 512 514 'cookie': encodeURIComponent(document.cookie), 513 '_wpnonce': j Query("input#_wpnonce_group_filter").val(),514 515 'group-filter-box': j Query("#group-filter-box").val()515 '_wpnonce': j("input#_wpnonce_group_filter").val(), 516 517 'group-filter-box': j("#group-filter-box").val() 516 518 }, 517 519 function(response) … … 519 521 response = response.substr( 0, response.length - 1 ); 520 522 521 j Query("div#group-loop").fadeOut(200,523 j("div#group-loop").fadeOut(200, 522 524 function() { 523 j Query('.ajax-loader').toggle();524 j Query("div#group-loop").html(response);525 j Query("div#group-loop").fadeIn(200);525 j('.ajax-loader').toggle(); 526 j("div#group-loop").html(response); 527 j("div#group-loop").fadeIn(200); 526 528 } 527 529 ); … … 533 535 ); 534 536 535 j Query("div#member-pagination a").livequery('click',537 j("div#member-pagination a").livequery('click', 536 538 function() { 537 j Query('.ajax-loader').toggle();538 539 var mlpage = j Query(this).attr('href');539 j('.ajax-loader').toggle(); 540 541 var mlpage = j(this).attr('href'); 540 542 mlpage = mlpage.split('='); 541 543 542 j Query.post( ajaxurl, {544 j.post( ajaxurl, { 543 545 action: 'get_group_members', 544 546 'cookie': encodeURIComponent(document.cookie), 545 '_wpnonce': j Query("input#_member_pag_nonce").val(),546 'group_id': j Query("#group_id").val(),547 '_wpnonce': j("input#_member_pag_nonce").val(), 548 'group_id': j("#group_id").val(), 547 549 'mlpage': mlpage[1] 548 550 }, … … 551 553 response = response.substr(0, response.length-1); 552 554 553 j Query("form#group-members-form").fadeOut(200,554 function() { 555 j Query("form#group-members-form").html(response);556 j Query("form#group-members-form").fadeIn(200);555 j("form#group-members-form").fadeOut(200, 556 function() { 557 j("form#group-members-form").html(response); 558 j("form#group-members-form").fadeIn(200); 557 559 } 558 560 ); … … 565 567 ); 566 568 567 j Query("div#member-admin-pagination a").livequery('click',569 j("div#member-admin-pagination a").livequery('click', 568 570 function() { 569 j Query('.ajax-loader').toggle();570 571 var mlpage = j Query(this).attr('href');571 j('.ajax-loader').toggle(); 572 573 var mlpage = j(this).attr('href'); 572 574 mlpage = mlpage.split('='); 573 575 574 j Query.post( ajaxurl, {576 j.post( ajaxurl, { 575 577 action: 'get_group_members_admin', 576 578 'cookie': encodeURIComponent(document.cookie), 577 '_wpnonce': j Query("input#_member_admin_pag_nonce").val(),578 'group_id': j Query("#group_id").val(),579 '_wpnonce': j("input#_member_admin_pag_nonce").val(), 580 'group_id': j("#group_id").val(), 579 581 'mlpage': mlpage[1] 580 582 }, … … 583 585 response = response.substr(0, response.length-1); 584 586 585 j Query("form#group-members-form").fadeOut(200,586 function() { 587 j Query("form#group-members-form").html(response);588 j Query("form#group-members-form").fadeIn(200);587 j("form#group-members-form").fadeOut(200, 588 function() { 589 j("form#group-members-form").html(response); 590 j("form#group-members-form").fadeIn(200); 589 591 } 590 592 ); … … 597 599 ); 598 600 599 j Query("input#send-notice").click(600 function() { 601 if ( j Query("#send_to") ) {602 j Query("#send_to").val('');601 j("input#send-notice").click( 602 function() { 603 if ( j("#send_to") ) { 604 j("#send_to").val(''); 603 605 } 604 606 } 605 607 ); 606 608 607 j Query("input#send_reply_button").click(609 j("input#send_reply_button").click( 608 610 function() { 609 611 //tinyMCE.triggerSave(true, true); 610 612 611 613 var rand = Math.floor(Math.random()*100001); 612 j Query("form#send-reply").before('<div style="display:none;" class="ajax_reply" id="' + rand + '">Sending Message...</div>');613 j Query("div#" + rand).fadeIn();614 j("form#send-reply").before('<div style="display:none;" class="ajax_reply" id="' + rand + '">Sending Message...</div>'); 615 j("div#" + rand).fadeIn(); 614 616 615 j Query.post( ajaxurl, {617 j.post( ajaxurl, { 616 618 action: 'messages_send_reply', 617 619 'cookie': encodeURIComponent(document.cookie), 618 '_wpnonce': j Query("input#send_message_nonce").val(),619 620 'content': j Query("#message_content").val(),621 'send_to': j Query("input#send_to").val(),622 'subject': j Query("input#subject").val(),623 'thread_id': j Query("input#thread_id").val()620 '_wpnonce': j("input#send_message_nonce").val(), 621 622 'content': j("#message_content").val(), 623 'send_to': j("input#send_to").val(), 624 'subject': j("input#subject").val(), 625 'thread_id': j("input#thread_id").val() 624 626 }, 625 627 function(response) … … 629 631 630 632 setTimeout( function() { 631 j Query("div#" + rand).slideUp();633 j("div#" + rand).slideUp(); 632 634 }, 500); 633 635 … … 640 642 641 643 //tinyMCE.activeEditor.setContent('') 642 j Query("#message_content").val('');644 j("#message_content").val(''); 643 645 644 j Query("div#" + rand).html(response).attr('class', css_class).slideDown();646 j("div#" + rand).html(response).attr('class', css_class).slideDown(); 645 647 }, 1250); 646 648 }); … … 650 652 ); 651 653 652 j Query("a#mark_as_read").click(654 j("a#mark_as_read").click( 653 655 function() { 654 656 checkboxes_tosend = ''; 655 checkboxes = j Query("#message-threads tr td input[type='checkbox']");657 checkboxes = j("#message-threads tr td input[type='checkbox']"); 656 658 for(var i=0; i<checkboxes.length; i++) { 657 659 if(checkboxes[i].checked) { 658 if ( j Query('tr#m-' + checkboxes[i].value).hasClass('unread') ) {660 if ( j('tr#m-' + checkboxes[i].value).hasClass('unread') ) { 659 661 checkboxes_tosend += checkboxes[i].value; 660 j Query('tr#m-' + checkboxes[i].value).removeClass('unread');661 j Query('tr#m-' + checkboxes[i].value).addClass('read');662 j Query('tr#m-' + checkboxes[i].value + ' td span.unread-count').html('0');663 var inboxcount = j Query('.inbox-count').html();662 j('tr#m-' + checkboxes[i].value).removeClass('unread'); 663 j('tr#m-' + checkboxes[i].value).addClass('read'); 664 j('tr#m-' + checkboxes[i].value + ' td span.unread-count').html('0'); 665 var inboxcount = j('.inbox-count').html(); 664 666 if ( parseInt(inboxcount) == 1 ) { 665 j Query('.inbox-count').css('display', 'none');666 j Query('.inbox-count').html('0');667 j('.inbox-count').css('display', 'none'); 668 j('.inbox-count').html('0'); 667 669 } else { 668 j Query('.inbox-count').html(parseInt(inboxcount) - 1);670 j('.inbox-count').html(parseInt(inboxcount) - 1); 669 671 } 670 672 … … 676 678 } 677 679 678 j Query.post( ajaxurl, {680 j.post( ajaxurl, { 679 681 action: 'messages_markread', 680 682 'thread_ids': checkboxes_tosend … … 685 687 if ( err_num[0] == "-1" ) { 686 688 // error 687 j Query('table#message-threads').before('<div id="message" class="error fade"><p>' + err_num[1] + '</p></div>')689 j('table#message-threads').before('<div id="message" class="error fade"><p>' + err_num[1] + '</p></div>') 688 690 } 689 691 }); … … 692 694 ); 693 695 694 j Query("a#mark_as_unread").click(696 j("a#mark_as_unread").click( 695 697 function() { 696 698 checkboxes_tosend = ''; 697 checkboxes = j Query("#message-threads tr td input[type='checkbox']");699 checkboxes = j("#message-threads tr td input[type='checkbox']"); 698 700 for(var i=0; i<checkboxes.length; i++) { 699 701 if(checkboxes[i].checked) { 700 if ( j Query('tr#m-' + checkboxes[i].value).hasClass('read') ) {702 if ( j('tr#m-' + checkboxes[i].value).hasClass('read') ) { 701 703 checkboxes_tosend += checkboxes[i].value; 702 j Query('tr#m-' + checkboxes[i].value).removeClass('read');703 j Query('tr#m-' + checkboxes[i].value).addClass('unread');704 j Query('tr#m-' + checkboxes[i].value + ' td span.unread-count').html('1');705 var inboxcount = j Query('.inbox-count').html();704 j('tr#m-' + checkboxes[i].value).removeClass('read'); 705 j('tr#m-' + checkboxes[i].value).addClass('unread'); 706 j('tr#m-' + checkboxes[i].value + ' td span.unread-count').html('1'); 707 var inboxcount = j('.inbox-count').html(); 706 708 707 709 if ( parseInt(inboxcount) == 0 ) { 708 j Query('.inbox-count').css('display', 'inline');709 j Query('.inbox-count').html('1');710 j('.inbox-count').css('display', 'inline'); 711 j('.inbox-count').html('1'); 710 712 } else { 711 j Query('.inbox-count').html(parseInt(inboxcount) + 1);713 j('.inbox-count').html(parseInt(inboxcount) + 1); 712 714 } 713 715 … … 719 721 } 720 722 721 j Query.post( ajaxurl, {723 j.post( ajaxurl, { 722 724 action: 'messages_markunread', 723 725 'thread_ids': checkboxes_tosend … … 728 730 if ( err_num[0] == "-1" ) { 729 731 // error 730 j Query('table#message-threads').before('<div id="message" class="error fade"><p>' + err_num[1] + '</p></div>')732 j('table#message-threads').before('<div id="message" class="error fade"><p>' + err_num[1] + '</p></div>') 731 733 } 732 734 }); … … 735 737 ); 736 738 737 j Query("a#delete_inbox_messages").click(739 j("a#delete_inbox_messages").click( 738 740 function() { 739 741 checkboxes_tosend = ''; 740 checkboxes = j Query("#message-threads tr td input[type='checkbox']");742 checkboxes = j("#message-threads tr td input[type='checkbox']"); 741 743 742 744 for(var i=0; i<checkboxes.length; i++) { … … 744 746 checkboxes_tosend += checkboxes[i].value; 745 747 746 if ( j Query('tr#m-' + checkboxes[i].value).hasClass('unread') ) {747 var inboxcount = j Query('.inbox-count').html();748 if ( j('tr#m-' + checkboxes[i].value).hasClass('unread') ) { 749 var inboxcount = j('.inbox-count').html(); 748 750 749 751 if ( parseInt(inboxcount) == 1 ) { 750 j Query('.inbox-count').css('display', 'none');751 j Query('.inbox-count').html('0');752 j('.inbox-count').css('display', 'none'); 753 j('.inbox-count').html('0'); 752 754 } else { 753 j Query('.inbox-count').html(parseInt(inboxcount) - 1);755 j('.inbox-count').html(parseInt(inboxcount) - 1); 754 756 } 755 757 } … … 759 761 } 760 762 761 j Query('tr#m-' + checkboxes[i].value).remove();763 j('tr#m-' + checkboxes[i].value).remove(); 762 764 } 763 765 } … … 765 767 if ( !checkboxes_tosend ) return false; 766 768 767 j Query.post( ajaxurl, {769 j.post( ajaxurl, { 768 770 action: 'messages_delete', 769 771 'thread_ids': checkboxes_tosend … … 773 775 var err_num = response.split('[[split]]'); 774 776 775 j Query('#message').remove();777 j('#message').remove(); 776 778 777 779 if ( err_num[0] == "-1" ) { 778 780 // error 779 j Query('table#message-threads').before('<div id="message" class="error fade"><p>' + err_num[1] + '</p></div>')781 j('table#message-threads').before('<div id="message" class="error fade"><p>' + err_num[1] + '</p></div>') 780 782 } else { 781 j Query('table#message-threads').before('<div id="message" class="updated"><p>' + response + '</p></div>')783 j('table#message-threads').before('<div id="message" class="updated"><p>' + response + '</p></div>') 782 784 } 783 785 }); … … 786 788 ); 787 789 788 j Query("a#delete_sentbox_messages").click(790 j("a#delete_sentbox_messages").click( 789 791 function() { 790 792 checkboxes_tosend = ''; 791 checkboxes = j Query("#message-threads tr td input[type='checkbox']");793 checkboxes = j("#message-threads tr td input[type='checkbox']"); 792 794 793 795 if ( !checkboxes.length ) return false; … … 800 802 checkboxes_tosend += ',' 801 803 } 802 j Query('tr#m-' + checkboxes[i].value).remove();804 j('tr#m-' + checkboxes[i].value).remove(); 803 805 } 804 806 } … … 806 808 if ( !checkboxes_tosend ) return false; 807 809 808 j Query.post( ajaxurl, {810 j.post( ajaxurl, { 809 811 action: 'messages_delete', 810 812 'thread_ids': checkboxes_tosend … … 814 816 var err_num = response.split('[[split]]'); 815 817 816 j Query('#message').remove();818 j('#message').remove(); 817 819 818 820 if ( err_num[0] == "-1" ) { 819 821 // error 820 j Query('table#message-threads').before('<div id="message" class="error fade"><p>' + err_num[1] + '</p></div>')822 j('table#message-threads').before('<div id="message" class="error fade"><p>' + err_num[1] + '</p></div>') 821 823 } else { 822 j Query('table#message-threads').before('<div id="message" class="updated"><p>' + response + '</p></div>')824 j('table#message-threads').before('<div id="message" class="updated"><p>' + response + '</p></div>') 823 825 } 824 826 }); … … 828 830 829 831 830 j Query("a#close-notice").click(831 function() { 832 j Query.post( ajaxurl, {832 j("a#close-notice").click( 833 function() { 834 j.post( ajaxurl, { 833 835 action: 'messages_close_notice', 834 'notice_id': j Query('.notice').attr('id')836 'notice_id': j('.notice').attr('id') 835 837 }, 836 838 function(response) { … … 840 842 if ( err_num[0] == "-1" ) { 841 843 // error 842 j Query('.notice').before('<div id="message" class="error fade"><p>' + err_num[1] + '</p></div>')844 j('.notice').before('<div id="message" class="error fade"><p>' + err_num[1] + '</p></div>') 843 845 } else { 844 j Query('.notice').remove();846 j('.notice').remove(); 845 847 } 846 848 }); … … 849 851 ); 850 852 851 j Query("select#message-type-select").change(852 function() { 853 var selection = j Query("select#message-type-select").val();854 var checkboxes = j Query("td input[type='checkbox']");853 j("select#message-type-select").change( 854 function() { 855 var selection = j("select#message-type-select").val(); 856 var checkboxes = j("td input[type='checkbox']"); 855 857 for(var i=0; i<checkboxes.length; i++) { 856 858 checkboxes[i].checked = ""; … … 859 861 switch(selection) { 860 862 case 'unread': 861 var checkboxes = j Query("tr.unread td input[type='checkbox']");863 var checkboxes = j("tr.unread td input[type='checkbox']"); 862 864 for(var i=0; i<checkboxes.length; i++) { 863 865 checkboxes[i].checked = "checked"; … … 865 867 break; 866 868 case 'read': 867 var checkboxes = j Query("tr.read td input[type='checkbox']");869 var checkboxes = j("tr.read td input[type='checkbox']"); 868 870 for(var i=0; i<checkboxes.length; i++) { 869 871 checkboxes[i].checked = "checked"; … … 879 881 ); 880 882 881 j Query("form#status-update-form").livequery('submit',882 function() { 883 j Query.post( ajaxurl, {883 j("form#status-update-form").livequery('submit', 884 function() { 885 j.post( ajaxurl, { 884 886 action: 'status_new_status', 885 887 'cookie': encodeURIComponent(document.cookie), 886 '_wpnonce': j Query('input#_wpnonce_add_status').val(),887 'status-update-input': j Query('#status-update-input').val()888 '_wpnonce': j('input#_wpnonce_add_status').val(), 889 'status-update-input': j('#status-update-input').val() 888 890 }, 889 891 function(response) { 890 892 if ( response == "1" ) { 891 j Query("div#user-status").slideUp(400,893 j("div#user-status").slideUp(400, 892 894 function() { 893 j Query.post( ajaxurl, {895 j.post( ajaxurl, { 894 896 action: 'status_show_status', 895 897 'cookie': encodeURIComponent(document.cookie) 896 898 }, 897 899 function(response) { 898 j Query("div#user-status").html(response);899 j Query("div#user-status").slideDown(400);900 j Query(window).unbind('click');900 j("div#user-status").html(response); 901 j("div#user-status").slideDown(400); 902 j(window).unbind('click'); 901 903 }); 902 904 } … … 909 911 ); 910 912 911 j Query("a#status-clear-status").livequery('click',912 function() { 913 j Query.post( ajaxurl, {913 j("a#status-clear-status").livequery('click', 914 function() { 915 j.post( ajaxurl, { 914 916 action: 'status_clear_status', 915 917 'cookie': encodeURIComponent(document.cookie) 916 918 }, 917 919 function(response) { 918 j Query("div#user-status").fadeOut(300,919 function() { 920 j Query("div#user-status").html(response);921 j Query("div#user-status").fadeIn(300);922 } 923 ); 924 }); 925 926 return false; 927 } 928 ); 929 930 j Query("div.status-editable p, a#status-new-status").livequery('click',931 function() { 932 j Query.post( ajaxurl, {920 j("div#user-status").fadeOut(300, 921 function() { 922 j("div#user-status").html(response); 923 j("div#user-status").fadeIn(300); 924 } 925 ); 926 }); 927 928 return false; 929 } 930 ); 931 932 j("div.status-editable p, a#status-new-status").livequery('click', 933 function() { 934 j.post( ajaxurl, { 933 935 action: 'status_show_form', 934 936 'cookie': encodeURIComponent(document.cookie) 935 937 }, 936 938 function(response) { 937 j Query("div#user-status").slideUp(400,938 function() { 939 j Query("div#user-status").html(response);940 j Query("div#user-status").slideDown(400, function() {941 j Query("#status-update-input").focus();939 j("div#user-status").slideUp(400, 940 function() { 941 j("div#user-status").html(response); 942 j("div#user-status").slideDown(400, function() { 943 j("#status-update-input").focus(); 942 944 }); 943 945 } 944 946 ); 945 947 946 j Query(window).bind('click', function(ev) {947 if ( !j Query(ev.target).is('div#user-status') && !jQuery(ev.target).parents('div#user-status').length ) {948 j Query.post( ajaxurl, {948 j(window).bind('click', function(ev) { 949 if ( !j(ev.target).is('div#user-status') && !j(ev.target).parents('div#user-status').length ) { 950 j.post( ajaxurl, { 949 951 action: 'status_show_status', 950 952 'cookie': encodeURIComponent(document.cookie) 951 953 }, 952 954 function(response) { 953 j Query("div#user-status").slideUp(400,955 j("div#user-status").slideUp(400, 954 956 function() { 955 j Query("div#user-status").html(response);956 j Query("div#user-status").slideDown(400);957 j("div#user-status").html(response); 958 j("div#user-status").slideDown(400); 957 959 } 958 960 ); 959 961 960 j Query(window).unbind('click');962 j(window).unbind('click'); 961 963 }); 962 964 } … … 968 970 ); 969 971 970 j Query("form#status-update-form").livequery('submit',971 function() { 972 j Query.post( ajaxurl, {972 j("form#status-update-form").livequery('submit', 973 function() { 974 j.post( ajaxurl, { 973 975 action: 'status_new_status', 974 976 'cookie': encodeURIComponent(document.cookie), 975 '_wpnonce': j Query('input#_wpnonce_add_status').val(),976 'status-update-input': j Query('#status-update-input').val()977 '_wpnonce': j('input#_wpnonce_add_status').val(), 978 'status-update-input': j('#status-update-input').val() 977 979 }, 978 980 function(response) { 979 981 if ( response == "1" ) { 980 j Query("div#user-status").slideUp(400,982 j("div#user-status").slideUp(400, 981 983 function() { 982 j Query.post( ajaxurl, {984 j.post( ajaxurl, { 983 985 action: 'status_show_status', 984 986 'cookie': encodeURIComponent(document.cookie) 985 987 }, 986 988 function(response) { 987 j Query("div#user-status").html(response);988 j Query("div#user-status").slideDown(400);989 j Query(window).unbind('click');989 j("div#user-status").html(response); 990 j("div#user-status").slideDown(400); 991 j(window).unbind('click'); 990 992 }); 991 993 } … … 998 1000 ); 999 1001 1000 j Query("a#status-clear-status").livequery('click',1001 function() { 1002 j Query.post( ajaxurl, {1002 j("a#status-clear-status").livequery('click', 1003 function() { 1004 j.post( ajaxurl, { 1003 1005 action: 'status_clear_status', 1004 1006 'cookie': encodeURIComponent(document.cookie) 1005 1007 }, 1006 1008 function(response) { 1007 j Query("div#user-status").fadeOut(300,1008 function() { 1009 j Query("div#user-status").html(response);1010 j Query("div#user-status").fadeIn(300);1011 } 1012 ); 1013 }); 1014 1015 return false; 1016 } 1017 ); 1018 1019 j Query("ul#letter-list li a").livequery('click',1009 j("div#user-status").fadeOut(300, 1010 function() { 1011 j("div#user-status").html(response); 1012 j("div#user-status").fadeIn(300); 1013 } 1014 ); 1015 }); 1016 1017 return false; 1018 } 1019 ); 1020 1021 j("div#blogs-directory-page ul#letter-list li a").livequery('click', 1020 1022 function() { 1021 j Query('.ajax-loader').toggle();1022 1023 j Query("div#blogs-list-options a.selected").removeClass("selected");1024 j Query("#letter-list li a.selected").removeClass("selected");1025 1026 j Query(this).addClass('selected');1027 j Query("input#blogs_search").val('');1028 1029 var letter = j Query(this).attr('id')1023 j('.ajax-loader').toggle(); 1024 1025 j("div#blogs-list-options a.selected").removeClass("selected"); 1026 j("#letter-list li a.selected").removeClass("selected"); 1027 1028 j(this).addClass('selected'); 1029 j("input#blogs_search").val(''); 1030 1031 var letter = j(this).attr('id') 1030 1032 letter = letter.split('-'); 1031 1033 1032 j Query.post( ajaxurl, {1034 j.post( ajaxurl, { 1033 1035 action: 'directory_blogs', 1034 1036 'cookie': encodeURIComponent(document.cookie), 1035 '_wpnonce': j Query("input#_wpnonce-blog-filter").val(),1037 '_wpnonce': j("input#_wpnonce-blog-filter").val(), 1036 1038 'letter': letter[1], 1037 1039 'page': 1 … … 1040 1042 { 1041 1043 response = response.substr(0, response.length-1); 1042 j Query("#blog-dir-list").fadeOut(200,1043 function() { 1044 j Query('.ajax-loader').toggle();1045 j Query("#blog-dir-list").html(response);1046 j Query("#blog-dir-list").fadeIn(200);1044 j("#blog-dir-list").fadeOut(200, 1045 function() { 1046 j('.ajax-loader').toggle(); 1047 j("#blog-dir-list").html(response); 1048 j("#blog-dir-list").fadeIn(200); 1047 1049 } 1048 1050 ); … … 1053 1055 ); 1054 1056 1055 j Query("form#search-blogs-form").submit( function() {1056 j Query('.ajax-loader').toggle();1057 1058 j Query.post( ajaxurl, {1057 j("form#search-blogs-form").submit( function() { 1058 j('.ajax-loader').toggle(); 1059 1060 j.post( ajaxurl, { 1059 1061 action: 'directory_blogs', 1060 1062 'cookie': encodeURIComponent(document.cookie), 1061 '_wpnonce': j Query("input#_wpnonce-blog-filter").val(),1062 's': j Query("input#blogs_search").val(),1063 '_wpnonce': j("input#_wpnonce-blog-filter").val(), 1064 's': j("input#blogs_search").val(), 1063 1065 'page': 1 1064 1066 }, … … 1066 1068 { 1067 1069 response = response.substr(0, response.length-1); 1068 j Query("#blog-dir-list").fadeOut(200,1069 function() { 1070 j Query('.ajax-loader').toggle();1071 j Query("#blog-dir-list").html(response);1072 j Query("#blog-dir-list").fadeIn(200);1070 j("#blog-dir-list").fadeOut(200, 1071 function() { 1072 j('.ajax-loader').toggle(); 1073 j("#blog-dir-list").html(response); 1074 j("#blog-dir-list").fadeIn(200); 1073 1075 } 1074 1076 ); … … 1079 1081 ); 1080 1082 1081 j Query("div#blog-dir-pag a").livequery('click',1083 j("div#blog-dir-pag a").livequery('click', 1082 1084 function() { 1083 j Query('.ajax-loader').toggle();1084 1085 var page = j Query(this).attr('href');1085 j('.ajax-loader').toggle(); 1086 1087 var page = j(this).attr('href'); 1086 1088 page = page.split('bpage='); 1087 1089 1088 if ( !j Query("input#selected_letter").val() )1090 if ( !j("input#selected_letter").val() ) 1089 1091 var letter = ''; 1090 1092 else 1091 var letter = j Query("input#selected_letter").val();1093 var letter = j("input#selected_letter").val(); 1092 1094 1093 if ( !j Query("input#search_terms").val() )1095 if ( !j("input#search_terms").val() ) 1094 1096 var search_terms = ''; 1095 1097 else 1096 var search_terms = j Query("input#search_terms").val();1098 var search_terms = j("input#search_terms").val(); 1097 1099 1098 j Query.post( ajaxurl, {1100 j.post( ajaxurl, { 1099 1101 action: 'directory_blogs', 1100 1102 'cookie': encodeURIComponent(document.cookie), 1101 '_wpnonce': j Query("input#_wpnonce").val(),1103 '_wpnonce': j("input#_wpnonce").val(), 1102 1104 'bpage': page[1], 1103 '_wpnonce': j Query("input#_wpnonce-blog-filter").val(),1105 '_wpnonce': j("input#_wpnonce-blog-filter").val(), 1104 1106 1105 1107 'letter': letter, … … 1109 1111 { 1110 1112 response = response.substr(0, response.length-1); 1111 j Query("#blog-dir-list").fadeOut(200,1112 function() { 1113 j Query('.ajax-loader').toggle();1114 j Query("#blog-dir-list").html(response);1115 j Query("#blog-dir-list").fadeIn(200);1113 j("#blog-dir-list").fadeOut(200, 1114 function() { 1115 j('.ajax-loader').toggle(); 1116 j("#blog-dir-list").html(response); 1117 j("#blog-dir-list").fadeIn(200); 1116 1118 } 1117 1119 );
Note: See TracChangeset
for help on using the changeset viewer.