Changeset 7151
- Timestamp:
- 06/04/2013 01:45:27 PM (11 years ago)
- Location:
- trunk/bp-templates/bp-legacy
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-templates/bp-legacy/buddypress-functions.php
r7116 r7151 259 259 'view' => __( 'View', 'buddypress' ), 260 260 'mark_as_fav' => __( 'Favorite', 'buddypress' ), 261 'remove_fav' => __( 'Remove Favorite', 'buddypress' ) 261 'remove_fav' => __( 'Remove Favorite', 'buddypress' ), 262 'unsaved_changes' => __( 'Your profile has unsaved changes. If you leave the page, the changes will be lost.', 'buddypress' ), 262 263 ); 263 264 wp_localize_script( $handle, 'BP_DTheme', $params ); -
trunk/bp-templates/bp-legacy/js/buddypress.js
r7116 r7151 880 880 } ); 881 881 882 jq("#profile-edit-form input:not(:submit), #profile-edit-form textarea, #profile-edit-form select, #signup_form input:not(:submit), #signup_form textarea, #signup_form select").change( function() { 883 var shouldconfirm = true; 884 885 jq('#profile-edit-form input:submit, #signup_form input:submit').on( 'click', function() { 886 shouldconfirm = false; 887 }); 888 889 window.onbeforeunload = function(e) { 890 if ( shouldconfirm ) { 891 return BP_DTheme.unsaved_changes; 892 } 893 }; 894 }); 882 895 883 896 /** Friendship Requests **************************************/
Note: See TracChangeset
for help on using the changeset viewer.