Changeset 1744
- Timestamp:
- 08/31/2009 07:42:08 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-themes/bp-sn-framework/_inc/js/ajax.js
r1684 r1744 875 875 ); 876 876 877 jQuery("form#status-update-form").livequery('submit', 878 function() { 879 jQuery.post( ajaxurl, { 880 action: 'status_new_status', 881 'cookie': encodeURIComponent(document.cookie), 882 '_wpnonce': jQuery('input#_wpnonce_add_status').val(), 883 'status-update-input': jQuery('#status-update-input').val() 884 }, 885 function(response) { 886 if ( response == "1" ) { 887 jQuery("div#user-status").slideUp(400, 888 function() { 889 jQuery.post( ajaxurl, { 890 action: 'status_show_status', 891 'cookie': encodeURIComponent(document.cookie) 892 }, 893 function(response) { 894 jQuery("div#user-status").html(response); 895 jQuery("div#user-status").slideDown(400); 896 jQuery(window).unbind('click'); 897 }); 898 } 899 ); 900 } 901 }); 902 903 return false; 904 } 905 ); 906 907 jQuery("a#status-clear-status").livequery('click', 908 function() { 909 jQuery.post( ajaxurl, { 910 action: 'status_clear_status', 911 'cookie': encodeURIComponent(document.cookie) 912 }, 913 function(response) { 914 jQuery("div#user-status").fadeOut(300, 915 function() { 916 jQuery("div#user-status").html(response); 917 jQuery("div#user-status").fadeIn(300); 918 } 919 ); 920 }); 921 922 return false; 923 } 924 ); 925 877 926 jQuery("div#user-status p, a#status-new-status").livequery('click', 878 927 function() { … … 963 1012 } 964 1013 ); 965 966 jQuery("div#user-status p, a#status-new-status").livequery('click',967 function() {968 jQuery.post( ajaxurl, {969 action: 'status_show_form',970 'cookie': encodeURIComponent(document.cookie)971 },972 function(response) {973 jQuery("div#user-status").slideUp(400,974 function() {975 jQuery("div#user-status").html(response);976 jQuery("div#user-status").slideDown(400, function() {977 jQuery("#status-update-input").focus();978 });979 }980 );981 982 jQuery(window).bind('click', function(ev) {983 if ( !jQuery(ev.target).is('div#user-status') && !jQuery(ev.target).parents('div#user-status').length ) {984 jQuery.post( ajaxurl, {985 action: 'status_show_status',986 'cookie': encodeURIComponent(document.cookie)987 },988 function(response) {989 jQuery("div#user-status").slideUp(400,990 function() {991 jQuery("div#user-status").html(response);992 jQuery("div#user-status").slideDown(400);993 }994 );995 996 jQuery(window).unbind('click');997 });998 }999 });1000 });1001 1002 return false;1003 }1004 );1005 1006 jQuery("form#status-update-form").livequery('submit',1007 function() {1008 jQuery.post( ajaxurl, {1009 action: 'status_new_status',1010 'cookie': encodeURIComponent(document.cookie),1011 '_wpnonce': jQuery('input#_wpnonce_add_status').val(),1012 'status-update-input': jQuery('#status-update-input').val()1013 },1014 function(response) {1015 if ( response == "1" ) {1016 jQuery("div#user-status").slideUp(400,1017 function() {1018 jQuery.post( ajaxurl, {1019 action: 'status_show_status',1020 'cookie': encodeURIComponent(document.cookie)1021 },1022 function(response) {1023 jQuery("div#user-status").html(response);1024 jQuery("div#user-status").slideDown(400);1025 jQuery(window).unbind('click');1026 });1027 }1028 );1029 }1030 });1031 1032 return false;1033 }1034 );1035 1036 jQuery("a#status-clear-status").livequery('click',1037 function() {1038 jQuery.post( ajaxurl, {1039 action: 'status_clear_status',1040 'cookie': encodeURIComponent(document.cookie)1041 },1042 function(response) {1043 jQuery("div#user-status").fadeOut(300,1044 function() {1045 jQuery("div#user-status").html(response);1046 jQuery("div#user-status").fadeIn(300);1047 }1048 );1049 });1050 1051 return false;1052 }1053 );1054 1014 1055 1015 jQuery("ul#letter-list li a").livequery('click',
Note: See TracChangeset
for help on using the changeset viewer.