From d7c1abd5f74fa0650345ca671fbf8c65823408f5 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Fri, 25 Jan 2013 05:31:11 +0000 Subject: [PATCH] * change for webapp. --- module/common/lang/en.php | 4 +++- module/common/lang/zh-cn.php | 4 +++- module/group/lang/resource.php | 26 +++++++++++++------------- module/webapp/config.php | 2 +- module/webapp/control.php | 6 +----- module/webapp/js/common.js | 2 +- module/webapp/model.php | 2 -- module/webapp/view/index.html.php | 7 +++---- 8 files changed, 25 insertions(+), 28 deletions(-) diff --git a/module/common/lang/en.php b/module/common/lang/en.php index 3bd30c3d1b..795d8220d0 100644 --- a/module/common/lang/en.php +++ b/module/common/lang/en.php @@ -248,7 +248,9 @@ $lang->report->menu->staff = array('link' => 'Company|report|workload'); /* Resource menu. */ $lang->webapp = new stdclass(); $lang->webapp->menu = new stdclass(); -$lang->webapp->menu->obtain = array('link' => 'App Store|webapp|obtain'); +$lang->webapp->menu->obtain = array('link' => ' App Store|webapp|obtain', 'float' => 'right'); +$lang->webapp->menu->manageTree = array('link' => " Manage|tree|browse|rootID=0&view=webapp", 'float' => 'right'); +$lang->webapp->menu->create = array('link' => " Create|webapp|create", 'float' => 'right'); /* Company menu. */ $lang->company = new stdclass(); diff --git a/module/common/lang/zh-cn.php b/module/common/lang/zh-cn.php index 578d2b6be1..b53cfd3c99 100644 --- a/module/common/lang/zh-cn.php +++ b/module/common/lang/zh-cn.php @@ -248,7 +248,9 @@ $lang->report->menu->staff = array('link' => '组织|report|workload'); /* 资源视图菜单设置。*/ $lang->webapp = new stdclass(); $lang->webapp->menu = new stdclass(); -$lang->webapp->menu->obtain = array('link' => ' 应用商店|webapp|obtain', 'float' => 'right'); +$lang->webapp->menu->obtain = array('link' => ' 应用商店|webapp|obtain', 'float' => 'right'); +$lang->webapp->menu->manageTree = array('link' => " 维护分类|tree|browse|rootID=0&view=webapp", 'float' => 'right'); +$lang->webapp->menu->create = array('link' => " 创建应用|webapp|create", 'float' => 'right'); /* 组织结构视图菜单设置。*/ $lang->company = new stdclass(); diff --git a/module/group/lang/resource.php b/module/group/lang/resource.php index 70fda3ca63..9400b0f06c 100644 --- a/module/group/lang/resource.php +++ b/module/group/lang/resource.php @@ -662,20 +662,20 @@ $lang->convert->methodOrder[45] = 'execute'; $lang->convert->methodOrder[50] = 'convertBugFree'; $lang->convert->methodOrder[55] = 'convertRedmine'; -//$lang->resource->webapp = new stdclass(); -//$lang->resource->webapp->index = 'index'; -//$lang->resource->webapp->obtain = 'obtain'; -//$lang->resource->webapp->create = 'create'; -//$lang->resource->webapp->edit = 'edit'; -//$lang->resource->webapp->install = 'install'; -//$lang->resource->webapp->uninstall = 'uninstall'; +$lang->resource->webapp = new stdclass(); +$lang->resource->webapp->index = 'index'; +$lang->resource->webapp->obtain = 'obtain'; +$lang->resource->webapp->create = 'create'; +$lang->resource->webapp->edit = 'edit'; +$lang->resource->webapp->install = 'install'; +$lang->resource->webapp->uninstall = 'uninstall'; -//$lang->webapp->methodOrder[5] = 'index'; -//$lang->webapp->methodOrder[10] = 'obtain'; -//$lang->webapp->methodOrder[15] = 'create'; -//$lang->webapp->methodOrder[20] = 'edit'; -//$lang->webapp->methodOrder[25] = 'install'; -//$lang->webapp->methodOrder[30] = 'uninstall'; +$lang->webapp->methodOrder[5] = 'index'; +$lang->webapp->methodOrder[10] = 'obtain'; +$lang->webapp->methodOrder[15] = 'create'; +$lang->webapp->methodOrder[20] = 'edit'; +$lang->webapp->methodOrder[25] = 'install'; +$lang->webapp->methodOrder[30] = 'uninstall'; /* Others. */ $lang->resource->api = new stdclass(); diff --git a/module/webapp/config.php b/module/webapp/config.php index d125eb2392..53e26ff6c5 100644 --- a/module/webapp/config.php +++ b/module/webapp/config.php @@ -1,6 +1,6 @@ webapp = new stdClass(); -$config->webapp->url = 'http://www.zentao.com'; +$config->webapp->url = 'http://www.zentao.net'; $config->webapp->apiRoot = $config->webapp->url . '/webapp-'; $config->webapp->create = new stdClass(); diff --git a/module/webapp/control.php b/module/webapp/control.php index 6ed1232fff..f4241eb13e 100644 --- a/module/webapp/control.php +++ b/module/webapp/control.php @@ -87,11 +87,7 @@ class webapp extends control { $this->webapp->update($webappID); if(dao::isError())die(js::error(dao::getError())); - echo ""; - die(); + die(js::reload('parent.parent')); } $this->view->modules = $this->webapp->getModules(); diff --git a/module/webapp/js/common.js b/module/webapp/js/common.js index fd9baf07a6..1e296c573a 100644 --- a/module/webapp/js/common.js +++ b/module/webapp/js/common.js @@ -16,7 +16,7 @@ function toggleShowapp(webappID, webappName) height = document.documentElement.clientHeight - 110; if(url[webappID] == undefined) url[webappID] = $('#useapp' + webappID).attr('href'); $('#useapp' + webappID).attr('href', '#iframe' + webappID); - var html = "

" + webappName + "

"; + var html = "

" + webappName + "

"; $('#webapps').parent().parent().after(html); show[webappID] = true; } diff --git a/module/webapp/model.php b/module/webapp/model.php index 4f6173798b..48116797ff 100644 --- a/module/webapp/model.php +++ b/module/webapp/model.php @@ -62,8 +62,6 @@ class webappModel extends model $module = trim($module, '/'); $this->lang->webapp->menu->$moduleID = array('link' => "$module|webapp|index|module=$moduleID"); } - $this->lang->webapp->menu->manageTree = array('link' => " {$this->lang->webapp->manageTree}|tree|browse|rootID=0&view=webapp", 'float' => 'right'); - $this->lang->webapp->menu->create = array('link' => " {$this->lang->webapp->create}|webapp|create", 'float' => 'right'); } diff --git a/module/webapp/view/index.html.php b/module/webapp/view/index.html.php index 52419bf322..0dd656c043 100644 --- a/module/webapp/view/index.html.php +++ b/module/webapp/view/index.html.php @@ -28,7 +28,6 @@ id"), $lang->webapp->uninstall, 'hiddenwin', "class='button-c'"); $url = $webapp->addType == 'custom' ? $webapp->url : $config->webapp->url . "/webapp-showapp-{$webapp->appid}.html"; $method = ''; $popup = ''; @@ -43,9 +42,9 @@ $method = "popup($width, $height);"; $popup = 'popup'; } - $useAppCode = html::a($url, $lang->webapp->useapp, $target, "id='useapp$webapp->id' class='button-c $popup' onclick='addView($webapp->id);$method'"); - $editAppCode = html::a(inlink('edit', "webappID=$webapp->id"), $lang->edit, '', "class='button-c webapp'"); - echo $useAppCode . $editAppCode . $uninstallCode; + echo html::a($url, $lang->webapp->useapp, $target, "id='useapp$webapp->id' class='button-c $popup' onclick='addView($webapp->id);$method'"); + common::printLink('webapp', 'edit', "webappID=$webapp->id", $lang->edit, '', "class='button-c webapp'"); + common::printLink('webapp', 'uninstall', "webapp=$webapp->id", $lang->webapp->uninstall, 'hiddenwin', "class='button-c'"); ?>