Changeset 9947 for extensions
- Timestamp:
- Mar 31, 2011, 11:32:35 AM (14 years ago)
- Location:
- extensions/autoupdate/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/autoupdate/trunk/template/autoupdate.js
r9935 r9947 1 var todo = 0; 2 var queuedManager = $.manageAjax.create('queued', { 3 queue: true, 4 maxRequests: 1, 5 beforeSend: function() { autoupdate_bar_toggle(1); }, 6 complete: function() { autoupdate_bar_toggle(-1); } 7 }); 8 1 9 function updateAll() { 2 10 if (confirm(confirmMsg)) { 3 extList = [];4 11 jQuery('.updateExtension').each( function() { 5 if (jQuery(this).parents('div').css('display') == 'block') { 6 extList.push(jQuery(this).attr('onClick')); 7 } 12 if (jQuery(this).parents('div').css('display') == 'block') 13 jQuery(this).click(); 8 14 }); 9 if (extList.length > 0) eval(extList[0]);10 15 } 11 16 }; … … 57 62 58 63 function upgradeExtension(type, id, revision) { 59 jQuery('.autoupdate_bar').toggle(); 60 jQuery.ajax({ 64 queuedManager.add({ 61 65 type: 'GET', 66 dataType: 'json', 62 67 url: 'ws.php', 63 68 data: { method: 'pwg.'+type+'s.update', id: id, revision: revision, pwg_token: pwg_token, format: 'json' }, 64 69 success: function(data) { 65 70 if (data['stat'] == 'ok') { 71 jQuery.jGrowl( data['result'], { theme: 'success', header: successHead, life: 4000, sticky: false }); 66 72 jQuery("#"+type+"_"+id).remove(); 67 73 checkFieldsets(); 68 jQuery.jGrowl(69 data['result'],70 {71 theme: 'success',72 header: successHead,73 life: 4000,74 sticky: false75 }76 );77 if (extList.length > 0) extList.shift();78 if (extList.length > 0) eval(extList[0]);79 74 } else { 80 jQuery.jGrowl( 81 data['result'], 82 { 83 theme: 'error', 84 header: errorHead, 85 sticky: true 86 } 87 ); 88 extList = []; 75 jQuery.jGrowl( data['result'], { theme: 'error', header: errorHead, sticky: true }); 89 76 } 90 jQuery('.autoupdate_bar').toggle();91 77 }, 92 78 error: function(data) { 93 jQuery.jGrowl( 94 errorMsg, 95 { 96 theme: 'error', 97 header: errorHead, 98 sticky: true 99 } 100 ); 101 extList = []; 102 jQuery('.autoupdate_bar').toggle(); 103 }, 104 dataType: 'json' 79 jQuery.jGrowl( errorMsg, { theme: 'error', header: errorHead, sticky: true }); 80 } 105 81 }); 106 82 }; … … 121 97 }); 122 98 }; 99 100 function autoupdate_bar_toggle(i) { 101 todo = todo + i; 102 if ((i == 1 && todo == 1) || (i == -1 && todo == 0)) 103 jQuery('.autoupdate_bar').toggle(); 104 } -
extensions/autoupdate/trunk/template/update_ext.tpl
r9735 r9947 1 {combine_script id='jquery.ajaxmanager' load='footer' require='jquery' path='themes/default/js/plugins/jquery.ajaxmanager.js' } 1 2 {combine_script id='jquery.jgrowl' load='footer' require='jquery' path='themes/default/js/plugins/jquery.jgrowl_minimized.js' } 2 {combine_script id='jquery.autoupdate' load='footer' require='jquery ' path='plugins/autoupdate/template/autoupdate.js' }3 {combine_script id='jquery.autoupdate' load='footer' require='jquery.ajaxmanager,jquery.jgrowl' path='plugins/autoupdate/template/autoupdate.js' } 3 4 {combine_css path="admin/themes/default/uploadify.jGrowl.css"} 4 5 5 {footer_script require='jquery.autoupdate,jquery.effects.blind ,jquery.jgrowl'}6 {footer_script require='jquery.autoupdate,jquery.effects.blind'} 6 7 var pwg_token = '{$PWG_TOKEN}'; 7 8 var extList = new Array(); -
extensions/autoupdate/trunk/ws_functions.inc.php
r9935 r9947 2 2 3 3 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 4 5 global $conf;6 4 7 5 $service = &$arr[0];
Note: See TracChangeset
for help on using the changeset viewer.