From 3c0f9f70986ee820e322006b702be73ca23b115f Mon Sep 17 00:00:00 2001 From: devjin Date: Fri, 19 Oct 2012 08:46:14 +0000 Subject: [PATCH] add a upate module function and install module function. git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@11807 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/admin/tpl/js/admin.js | 36 +++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/modules/admin/tpl/js/admin.js b/modules/admin/tpl/js/admin.js index 8ffe03048..0fffd4909 100644 --- a/modules/admin/tpl/js/admin.js +++ b/modules/admin/tpl/js/admin.js @@ -1,4 +1,40 @@ /* NHN (developers@xpressengine.com) */ +// insert fog layer +function showWaitingFogLayer() { + var $bg = jQuery(''); + $bg.height(jQuery(window).height()); + jQuery('.wfsr') + .wrap('
') + .before($bg); +} + +function hideWaitingFogLayer() { + jQuery('.wfsr').prev('span').remove(); + jQuery('.wfsr').unwrap(); +} + + +// install module +function doInstallModule(module) { + var params = new Array(); + params['module_name'] = module; + exec_xml('install','procInstallAdminInstall',params, completeInstallModule); + showWaitingFogLayer(); +} + +// upgrade module +function doUpdateModule(module) { + var params = new Array(); + params['module_name'] = module; + exec_xml('install','procInstallAdminUpdate',params, completeInstallModule); + showWaitingFogLayer(); +} + +function completeInstallModule(ret_obj) { + alert(ret_obj['message']); + location.reload(); +} + jQuery(function($){ // iSO mobile device toolbar remove window.scrollTo(0,0);