Changeset 2115
- Timestamp:
- 11/23/2015 02:22:51 AM (9 years ago)
- Location:
- sites/trunk/translate.wordpress.org/public_html
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/translate.wordpress.org/public_html/gp-templates-new/locale-projects.php
r2113 r2115 98 98 <script> 99 99 jQuery('#sort-filter').change( function() { 100 var current_url = document.location.href.replace(/[?&]filter=[^&$]*/, '' ); 101 document.location.replace( 102 current_url + 103 ( -1 == current_url.indexOf('?') ? '?filter=' : '&filter=' ) + 104 this.options[ this.options.selectedIndex ].value 105 ); 100 var current_url = document.location.href; 101 var filter = this.options[ this.options.selectedIndex ].value; 102 103 if ( current_url.indexOf( 'filter=' ) > -1 ) { 104 document.location.replace( 105 current_url.replace(/([?&]filter=)([^&$]*)/, '$1' + filter ) 106 ); 107 } else { 108 document.location.replace( 109 current_url + 110 ( -1 == current_url.indexOf('?') ? '?filter=' : '&filter=' ) + 111 filter 112 ); 113 } 106 114 } ).prop('disabled', ''); 107 115 </script> -
sites/trunk/translate.wordpress.org/public_html/gp-templates/locale-projects.php
r2072 r2115 98 98 <script> 99 99 jQuery('#sort-filter').change( function() { 100 var current_url = document.location.href.replace(/[?&]filter=[^&$]*/, '' ); 101 document.location.replace( 102 current_url + 103 ( -1 == current_url.indexOf('?') ? '?filter=' : '&filter=' ) + 104 this.options[ this.options.selectedIndex ].value 105 ); 100 var current_url = document.location.href; 101 var filter = this.options[ this.options.selectedIndex ].value; 102 103 if ( current_url.indexOf( 'filter=' ) > -1 ) { 104 document.location.replace( 105 current_url.replace(/([?&]filter=)([^&$]*)/, '$1' + filter ) 106 ); 107 } else { 108 document.location.replace( 109 current_url + 110 ( -1 == current_url.indexOf('?') ? '?filter=' : '&filter=' ) + 111 filter 112 ); 113 } 106 114 } ).prop('disabled', ''); 107 115 </script>
Note: See TracChangeset
for help on using the changeset viewer.