Changeset 1030021
- Timestamp:
- 11/21/2014 09:54:25 AM (11 years ago)
- Location:
- jumpout/trunk
- Files:
-
- 3 edited
-
class.php (modified) (1 diff)
-
js/main.js (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
jumpout/trunk/class.php
r1005649 r1030021 124 124 $result = json_decode($result); 125 125 126 if (defined('JSON_ERROR_NONE') || json_last_error() == JSON_ERROR_NONE) { 126 if (is_array($result) || (function_exists('json_last_error') && defined('JSON_ERROR_NONE') && json_last_error() == JSON_ERROR_NONE)) { // 3.0.2 even in 5.2 it can be no json_last_error function 127 //if (defined('JSON_ERROR_NONE') || json_last_error() == JSON_ERROR_NONE) { 127 128 128 129 if ('error' == $result->status) { -
jumpout/trunk/js/main.js
r996491 r1030021 8 8 jQuery('.sync svg').css('display', 'inline'); 9 9 10 11 12 jQuery.getJSON('?page=jumpout&action=sync&type=json') 13 .done(function( data ) { 14 15 if ('undefined' != typeof(data.status)) { 16 if ('success' == data.status) { 17 location.reload(); 18 19 jQuery('.sync').css('background', '#199701'); 20 jQuery('.sync').css('color', '#ffffff'); 21 jQuery('.sync svg').css('display', 'none'); 22 jQuery('.sync span').html('Готово! Перезагрузка страницы...'); 23 24 } else if ('error' == data.status) { 25 26 syncError(); 27 if ('session token not found' == data.message) { 28 window.location = '?page=jumpout&action=session_token_error'; 29 } else if ('not enough params' == data.message) { 30 alert('Похоже при синхронизации плагин отправил неверный запрос. Попробуйте обновить плагин или напишите в техподдержку.'); 31 } 32 } 33 } else { 34 syncError(); 35 } 36 37 //console.log(data); 38 //jQuery('.sync span').html('Синхронизировать'); 39 //jQuery('.sync svg').css('display', 'none'); 40 }) 41 // 3.0.2 - just refreshing page if failed, maybe it was just an error when wp returned html instead of json, but sync completed 42 .fail(function( jqxhr, textStatus, error ) { 43 var err = textStatus + ", " + error; 44 console.log( "Request Failed: " + err ); 45 location.reload(); 46 }); 47 48 49 50 10 51 jQuery.getJSON('?page=jumpout&action=sync&type=json', function( data ) { 11 52 12 if ('undefined' != typeof(data.status)) {13 if ('success' == data.status) {14 location.reload();15 16 jQuery('.sync').css('background', '#199701');17 jQuery('.sync').css('color', '#ffffff');18 jQuery('.sync svg').css('display', 'none');19 jQuery('.sync span').html('Готово! Перезагрузка страницы...');20 21 } else if ('error' == data.status) {22 23 syncError();24 if ('session token not found' == data.message) {25 window.location = '?page=jumpout&action=session_token_error';26 } else if ('not enough params' == data.message) {27 alert('Похоже при синхронизации плагин отправил неверный запрос. Попробуйте обновить плагин или напишите в техподдержку.');28 }29 }30 } else {31 syncError();32 }33 34 console.log(data);35 36 37 //jQuery('.sync span').html('Синхронизировать');38 //jQuery('.sync svg').css('display', 'none');39 53 40 54 }); -
jumpout/trunk/readme.txt
r1005649 r1030021 4 4 Requires at least: 2.5.0 5 5 Tested up to: 4.0 6 Stable tag: 3.0. 16 Stable tag: 3.0.2 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 40 40 = 3.0.1 = 41 41 * Добавлена поддержка скрипта MagicBegins 42 = 3.0.2 = 43 * Исправлена проблема синхронизации на некоторых хостингах
Note: See TracChangeset
for help on using the changeset viewer.