diff --git a/lib/base/front/front.class.php b/lib/base/front/front.class.php index e60d59800b..652ed1df9b 100644 --- a/lib/base/front/front.class.php +++ b/lib/base/front/front.class.php @@ -5,7 +5,7 @@ * * The author disclaims copyright to this source code. In place of * a legal notice, here is a blessing: - * + * * May you do good and not evil. * May you find forgiveness for yourself and forgive others. * May you share freely, never taking more than you give. @@ -14,16 +14,16 @@ /** * html类,生成html标签。 * The html class, to build html tags. - * + * * @package framework */ class baseHTML { /** * 生成title标签。 - * Create the title tag. - * - * @param mixed $title + * Create the title tag. + * + * @param mixed $title * @static * @access public * @return string. @@ -36,12 +36,12 @@ class baseHTML /** * 生成meta标签。 * Create a meta. - * + * * @param mixed $name the meta name * @param mixed $value the meta value * @static * @access public - * @return string + * @return string */ public static function meta($name, $value) { @@ -66,12 +66,12 @@ class baseHTML /** * 创建图标。 * Create icon. - * + * * @param name $name the name of the icon. * @param cssClass $class the extra css class of the icon. * @static * @access public - * @return string + * @return string */ public static function icon($name, $class = '') { @@ -82,9 +82,9 @@ class baseHTML /** * 生成rss标签。 * Create the rss tag. - * - * @param string $url - * @param string $title + * + * @param string $url + * @param string $title * @static * @access public * @return string @@ -382,8 +382,8 @@ class baseHTML * * @param string $name the name of the text input tag. * @param string $value the default value. - * @param string $options - * @param string $attrib + * @param string $options + * @param string $attrib * @static * @access public * @return void @@ -402,8 +402,8 @@ class baseHTML * * @param string $name the name of the text input tag. * @param string $value the default value. - * @param string $options - * @param string $attrib + * @param string $options + * @param string $attrib * @static * @access public * @return void @@ -434,7 +434,7 @@ class baseHTML /** * 创建提交按钮。 * Create submit button. - * + * * @param string $label the label of the button * @param string $class the class of the button * @param string $misc other params @@ -455,9 +455,9 @@ class baseHTML /** * 创建重置按钮。 * Create reset button. - * - * @param string $label - * @param string $class + * + * @param string $label + * @param string $class * @static * @access public * @return string the reset button tag. @@ -474,10 +474,10 @@ class baseHTML /** * 创建返回按钮。 - * Back button. - * - * @param string $label - * @param string $misc + * Back button. + * + * @param string $label + * @param string $misc * @static * @access public * @return string the back button tag. @@ -498,7 +498,7 @@ class baseHTML /** * 创建通用按钮。 * Create common button. - * + * * @param string $label the label of the button * @param string $class the class of the button * @param string $misc other params @@ -516,7 +516,7 @@ class baseHTML /** * 创建一个带有链接的按钮。 * create a button, when click, go to a link. - * + * * @param string $label the link title * @param string $link the link url * @param string $class the link style @@ -552,7 +552,7 @@ class baseHTML /** * 创建全选标签。 * Create tags like "" - * + * * @param string $scope the scope of select all. * @param string $type the type of input tag. * @param boolean $checked if the type is checkbox, set the checked attribute. @@ -566,19 +566,19 @@ class baseHTML $string = << function selectAll(checker, scope, type) -{ +{ if(scope) { if(type == 'button') { - $('#' + scope + ' input').each(function() + $('#' + scope + ' input').each(function() { $(this).prop("checked", true) }); } else if(type == 'checkbox') { - $('#' + scope + ' input').each(function() + $('#' + scope + ' input').each(function() { $(this).prop("checked", checker.checked) }); @@ -588,14 +588,14 @@ function selectAll(checker, scope, type) { if(type == 'button') { - $('input:checkbox').each(function() + $('input:checkbox').each(function() { $(this).prop("checked", true) }); } else if(type == 'checkbox') - { - $('input:checkbox').each(function() + { + $('input:checkbox').each(function() { $(this).prop("checked", checker.checked) }); @@ -620,7 +620,7 @@ EOT; /** * 创建反选标签。 * Create tags like "" - * + * * @param string $scope the scope of select reverse. * @static * @access public @@ -631,17 +631,17 @@ EOT; $string = << function selectReverse(scope) -{ +{ if(scope) { - $('#' + scope + ' input').each(function() + $('#' + scope + ' input').each(function() { $(this).prop("checked", !$(this).prop("checked")) }); } else { - $('input:checkbox').each(function() + $('input:checkbox').each(function() { $(this).prop("checked", !$(this).prop("checked")) }); @@ -658,10 +658,10 @@ EOT; /** * 创建全选、反选按钮组。 * Create select buttons include 'selectAll' and 'selectReverse'. - * + * * @param string $scope the scope of select reverse. - * @param bool $asGroup - * @param string $appendClass + * @param bool $asGroup + * @param string $appendClass * @static * @access public * @return string @@ -697,7 +697,7 @@ EOT; /** * 打印星星。 * Print the star images. - * + * * @param float $stars 0 1 1.5 2 2.5 3 3.5 4 4.5 5 * @access public * @static @@ -729,7 +729,7 @@ EOT; /** * JS类。 * JS class. - * + * * @package front */ class baseJS @@ -737,8 +737,8 @@ class baseJS /** * 引入一个js文件。 * Import a js file. - * - * @param string $url + * + * @param string $url * @param string $ieParam like 'lt IE 9' * @static * @access public @@ -758,9 +758,9 @@ class baseJS /** * 开始输出js。 - * The start of javascript. - * - * @param bool $full + * The start of javascript. + * + * @param bool $full * @static * @access public * @return string @@ -773,9 +773,9 @@ class baseJS /** * 结束输出js。 - * The end of javascript. - * - * @param bool $newline + * The end of javascript. + * + * @param bool $newline * @static * @access public * @return void @@ -788,10 +788,10 @@ class baseJS /** * 显示一个警告框。 - * Show a alert box. - * - * @param string $message - * @param bool $full + * Show a alert box. + * + * @param string $message + * @param bool $full * @static * @access public * @return string @@ -803,8 +803,8 @@ class baseJS /** * 关闭浏览器窗口。 - * Close window - * + * Close window + * * @static * @access public * @return void @@ -817,9 +817,9 @@ class baseJS /** * 显示错误信息。 * Show error info. - * - * @param string|array $message - * @param bool $full + * + * @param string|array $message + * @param bool $full * @static * @access public * @return string @@ -843,15 +843,15 @@ class baseJS /** * 重置禁用的提交按钮。 - * Reset the submit form. - * + * Reset the submit form. + * * @static * @access public * @return string */ static public function resetForm() { - return self::start() . 'if(window.parent) window.parent.document.body.click();' . self::end(); + return self::start() . 'if(window.parent) window.parent.$.enableForm();' . self::end(); } /** @@ -939,7 +939,7 @@ EOT; /** * 关闭当前窗口。 * Close current window. - * + * * @static * @access public * @return string @@ -989,8 +989,8 @@ EOT; * 用Javascript关闭colorbox弹出框。 * Close colorbox in javascript. * This is a obsolete method, you can use 'closeModal' instead. - * - * @param string $window + * + * @param string $window * @static * @access public * @return string @@ -1003,10 +1003,10 @@ EOT; /** * 用Javascript关闭模态框。 * Close modal with javascript. - * - * @param string $window - * @param string $location - * @param string $callback + * + * @param string $window + * @param string $location + * @param string $callback * @static * @access public * @return string @@ -1023,7 +1023,7 @@ EOT; /** * 导出$config到js,因为js的createLink()方法需要获取config信息。 * Export the config vars for createLink() js version. - * + * * @static * @access public * @return void @@ -1079,8 +1079,8 @@ EOT; /** * 执行js代码。 * Execute some js code. - * - * @param string $code + * + * @param string $code * @static * @access public * @return string @@ -1096,9 +1096,9 @@ EOT; /** * 设置Javascript变量值。 * Set js value. - * - * @param string $key - * @param mix $value + * + * @param string $key + * @param mix $value * @static * @access public * @return string @@ -1112,7 +1112,7 @@ EOT; $js = self::start(false); if(!$viewOBJOut and $prefix) { - $js .= 'if(typeof(v) != "object") v = {};'; + $js .= 'if(typeof(v) != "object") v = {};'; $viewOBJOut = true; } @@ -1161,8 +1161,8 @@ class baseCSS /** * 引入css文件。 * Import a css file. - * - * @param string $url + * + * @param string $url * @access public * @return void */ @@ -1176,8 +1176,8 @@ class baseCSS /** * 打印css代码。 * Print a css code. - * - * @param string $css + * + * @param string $css * @static * @access public * @return void diff --git a/module/block/control.php b/module/block/control.php index 1987f4738b..59b58101fb 100644 --- a/module/block/control.php +++ b/module/block/control.php @@ -435,15 +435,19 @@ class block extends control $this->app->user = new stdclass(); $this->app->user->account = 'guest'; } + $this->app->user->admin = strpos($this->app->company->admins, ",{$this->app->user->account},") !== false; $this->app->user->rights = $this->loadModel('user')->authorize($this->app->user->account); + $this->app->user->groups = $this->user->getGroups($this->app->user->account); + $this->app->user->view = $this->user->grantUserView($this->app->user->account, $this->app->user->rights['acls']); $sso = base64_decode($this->get->sso); $this->view->sso = $sso; $this->view->sign = strpos($sso, '?') === false ? '?' : '&'; } - $block = $this->block->getByID($id); - $this->view->longBlock = $this->block->isLongBlock($block); + if($id) $block = $this->block->getByID($id); + $this->view->longBlock = $this->block->isLongBlock($id ? $block : $params); + $this->view->selfCall = $this->selfCall; $this->viewType = (isset($params->viewType) and $params->viewType == 'json') ? 'json' : 'html'; $this->params = $params; diff --git a/module/block/view/bugblock.html.php b/module/block/view/bugblock.html.php index 2f0f3182f2..7a89f85c24 100644 --- a/module/block/view/bugblock.html.php +++ b/module/block/view/bugblock.html.php @@ -22,10 +22,10 @@ .block-bugs.block-sm .c-status {text-align: center;}
- '> +
'> - + diff --git a/module/block/view/buildblock.html.php b/module/block/view/buildblock.html.php index 26261ab722..4526c1a3fe 100644 --- a/module/block/view/buildblock.html.php +++ b/module/block/view/buildblock.html.php @@ -14,7 +14,7 @@
block->emptyTip;?>
-
idAB?>idAB?> priAB?>
+
@@ -43,4 +43,4 @@
idAB?>
- \ No newline at end of file + diff --git a/module/block/view/caseblock.html.php b/module/block/view/caseblock.html.php index f7d0f2cfe8..cd531ac5d8 100644 --- a/module/block/view/caseblock.html.php +++ b/module/block/view/caseblock.html.php @@ -22,7 +22,7 @@ .case-status-blocked { color: #a6aab8; } .case-status-investigate {color: #a6aab8;} - '> +
'> diff --git a/module/block/view/flowchart.html.php b/module/block/view/flowchart.html.php index e9844f8c96..fb32e6c06f 100644 --- a/module/block/view/flowchart.html.php +++ b/module/block/view/flowchart.html.php @@ -1,52 +1,47 @@ - -
-
- - - - - - - - - - - - - block->flowchart as $flowchart):?> - - - - - - - - - - - -
block->role?>
+
+block->flowchart as $rowIndex => $flow):?> + +
+ +
+ +
+
+ \ No newline at end of file diff --git a/module/block/view/planblock.html.php b/module/block/view/planblock.html.php index af0ce9bb65..0e8bead272 100644 --- a/module/block/view/planblock.html.php +++ b/module/block/view/planblock.html.php @@ -14,7 +14,7 @@
block->emptyTip;?>
- +
diff --git a/module/block/view/productblock.html.php b/module/block/view/productblock.html.php index f6a03e92fd..d5a78aae97 100644 --- a/module/block/view/productblock.html.php +++ b/module/block/view/productblock.html.php @@ -17,7 +17,7 @@ .block-products.block-sm .c-project {display: none;}
-
+
diff --git a/module/block/view/productstatisticblock.html.php b/module/block/view/productstatisticblock.html.php index 39d4aefb71..a1a07a1b10 100644 --- a/module/block/view/productstatisticblock.html.php +++ b/module/block/view/productstatisticblock.html.php @@ -61,8 +61,8 @@ html[lang="en"] .product-info .type-info {color: #A6AAB8; text-align: center; po .block-statistic.block-sm .nav-secondary > li.switch-icon {width: 40px;} .block-statistic.block-sm .types-line > li > div {padding: 18px 2px 5px;} -#unexpired-plan, #doing-project{margin-left:-12px} -#unexpired-plan + span, #doing-project + span, #total-release + span{color:#000;font-weight:bold} +.status-count{margin:auto} +.status-count tr:first-child td:last-child{color:#000;font-weight:bold}
product->name;?>