Changeset 1500238
- Timestamp:
- 09/22/2016 10:41:57 AM (9 years ago)
- Location:
- fast-page-switch
- Files:
-
- 2 edited
- 7 copied
-
tags/1.5.2 (copied) (copied from fast-page-switch/trunk)
-
tags/1.5.2/fast-page-switch.php (copied) (copied from fast-page-switch/trunk/fast-page-switch.php) (5 diffs)
-
tags/1.5.2/fps-admin.php (copied) (copied from fast-page-switch/trunk/fps-admin.php)
-
tags/1.5.2/languages (copied) (copied from fast-page-switch/trunk/languages)
-
tags/1.5.2/languages/fast-page-switch.pot (copied) (copied from fast-page-switch/trunk/languages/fast-page-switch.pot)
-
tags/1.5.2/readme.txt (copied) (copied from fast-page-switch/trunk/readme.txt) (2 diffs)
-
tags/1.5.2/uninstall.php (copied) (copied from fast-page-switch/trunk/uninstall.php)
-
trunk/fast-page-switch.php (modified) (5 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
fast-page-switch/tags/1.5.2/fast-page-switch.php
r1500080 r1500238 4 4 Plugin URI: https://marcwiest.com 5 5 Description: Save time switching between posts of any post-type in wp-admin. 6 Version: 1.5. 16 Version: 1.5.2 7 7 Author: Marc Wiest 8 8 Author URI: https://marcwiest.com … … 138 138 <script> 139 139 jQuery(document).ready(function($) { 140 'use strict';141 140 142 141 var fps = $('#fast-page-switch'), … … 150 149 } 151 150 152 fps.on( ' change', function(e) {151 fps.on( 'select2:select', function(e) { 153 152 e.preventDefault; 154 153 155 $(this).parent('#fps-wrapper').addClass('fps-js-reveal-spinner'); 156 157 if ( fps.val() !== '<?php echo $post->ID; ?>' ) { 158 159 location_change( $(this).val() ); 154 var val = $(this).val(); 155 156 if ( val !== '<?php echo $post->ID; ?>' ) { 157 158 location_change( val ); 159 160 reveal_spinner(); 160 161 161 162 // - Select2 was getting stuck on the new value when a … … 164 165 // the old method for reseting a value is also used. 165 166 if ( s2Exists ) { 166 fps.select2( 'val','<?php echo $post->ID; ?>'); // Select2 v3167 fps.select2( 'val', val ); // Select2 v3 167 168 } 168 fps.val( '<?php echo $post->ID; ?>').trigger('change'); //Select2 v4169 fps.val( val ).trigger( 'change' ); // select & Select2 v4 169 170 } 170 171 }); … … 173 174 var admin_url = '<?php trailingslashit(admin_url()); ?>'; 174 175 window.location.href = admin_url + 'post.php?post=' + post_id + '&action=edit'; 176 } 177 178 // The only scenario not working is if the user confirms to "leave", 179 // because there is no way to check the reurn of the confirm window. 180 // Source Code: wp-admin/js/post.js line 482 181 function reveal_spinner() { 182 var editor = typeof tinymce !== 'undefined' && tinymce.get('content'); 183 if ( ( editor && ! editor.isHidden() && editor.isDirty() ) || 184 ( wp.autosave && wp.autosave.server.postChanged() ) ) { 185 $('#fps-wrapper').removeClass('fps-js-reveal-spinner'); 186 } else { 187 $('#fps-wrapper').addClass('fps-js-reveal-spinner'); 188 } 175 189 } 176 190 -
fast-page-switch/tags/1.5.2/readme.txt
r1500078 r1500238 4 4 Requires at least: 3.1 5 5 Tested up to: 4.7 6 Stable tag: 1.5. 16 Stable tag: 1.5.2 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 24 24 25 25 == Changelog == 26 27 = 1.5.2 - September 21, 2016 = 28 * Improved select2 JS. 26 29 27 30 = 1.5.1 - September 21, 2016 = -
fast-page-switch/trunk/fast-page-switch.php
r1500080 r1500238 4 4 Plugin URI: https://marcwiest.com 5 5 Description: Save time switching between posts of any post-type in wp-admin. 6 Version: 1.5. 16 Version: 1.5.2 7 7 Author: Marc Wiest 8 8 Author URI: https://marcwiest.com … … 138 138 <script> 139 139 jQuery(document).ready(function($) { 140 'use strict';141 140 142 141 var fps = $('#fast-page-switch'), … … 150 149 } 151 150 152 fps.on( ' change', function(e) {151 fps.on( 'select2:select', function(e) { 153 152 e.preventDefault; 154 153 155 $(this).parent('#fps-wrapper').addClass('fps-js-reveal-spinner'); 156 157 if ( fps.val() !== '<?php echo $post->ID; ?>' ) { 158 159 location_change( $(this).val() ); 154 var val = $(this).val(); 155 156 if ( val !== '<?php echo $post->ID; ?>' ) { 157 158 location_change( val ); 159 160 reveal_spinner(); 160 161 161 162 // - Select2 was getting stuck on the new value when a … … 164 165 // the old method for reseting a value is also used. 165 166 if ( s2Exists ) { 166 fps.select2( 'val','<?php echo $post->ID; ?>'); // Select2 v3167 fps.select2( 'val', val ); // Select2 v3 167 168 } 168 fps.val( '<?php echo $post->ID; ?>').trigger('change'); //Select2 v4169 fps.val( val ).trigger( 'change' ); // select & Select2 v4 169 170 } 170 171 }); … … 173 174 var admin_url = '<?php trailingslashit(admin_url()); ?>'; 174 175 window.location.href = admin_url + 'post.php?post=' + post_id + '&action=edit'; 176 } 177 178 // The only scenario not working is if the user confirms to "leave", 179 // because there is no way to check the reurn of the confirm window. 180 // Source Code: wp-admin/js/post.js line 482 181 function reveal_spinner() { 182 var editor = typeof tinymce !== 'undefined' && tinymce.get('content'); 183 if ( ( editor && ! editor.isHidden() && editor.isDirty() ) || 184 ( wp.autosave && wp.autosave.server.postChanged() ) ) { 185 $('#fps-wrapper').removeClass('fps-js-reveal-spinner'); 186 } else { 187 $('#fps-wrapper').addClass('fps-js-reveal-spinner'); 188 } 175 189 } 176 190 -
fast-page-switch/trunk/readme.txt
r1500078 r1500238 4 4 Requires at least: 3.1 5 5 Tested up to: 4.7 6 Stable tag: 1.5. 16 Stable tag: 1.5.2 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 24 24 25 25 == Changelog == 26 27 = 1.5.2 - September 21, 2016 = 28 * Improved select2 JS. 26 29 27 30 = 1.5.1 - September 21, 2016 =
Note: See TracChangeset
for help on using the changeset viewer.