From 4be5a4c3ec04693b2b6b79a7d2cafef79173193f Mon Sep 17 00:00:00 2001 From: Catouse Date: Wed, 16 May 2018 15:05:29 +0800 Subject: [PATCH] * refactor codes. --- module/block/control.php | 6 +++--- module/block/css/dashboard.css | 3 +-- module/block/view/productstatisticblock.html.php | 4 ++-- module/product/view/all.html.php | 2 +- module/product/view/create.html.php | 2 +- www/js/zui/min.js | 4 ++-- www/theme/zui/css/min.css | 4 ++-- 7 files changed, 12 insertions(+), 13 deletions(-) diff --git a/module/block/control.php b/module/block/control.php index 4e82ae038d..9b47b3c322 100644 --- a/module/block/control.php +++ b/module/block/control.php @@ -242,12 +242,12 @@ class block extends control $block->actionLink = ''; if($block->block == 'overview') { - if($module == 'product' && common::hasPriv('product', 'create')) $block->actionLink = html::a($this->createLink('product', 'create'), " " . $this->lang->product->create, '', "class='btn btn-sm'"); - if($module == 'project' && common::hasPriv('project', 'create')) $block->actionLink = html::a($this->createLink('project', 'create'), " " . $this->lang->project->create, '', "class='btn btn-sm'"); + if($module == 'product' && common::hasPriv('product', 'create')) $block->actionLink = html::a($this->createLink('product', 'create'), " " . $this->lang->product->create, '', "class='btn'"); + if($module == 'project' && common::hasPriv('project', 'create')) $block->actionLink = html::a($this->createLink('project', 'create'), " " . $this->lang->project->create, '', "class='btn'"); if($module == 'qa' && common::hasPriv('testcase', 'create')) { $this->app->loadLang('testcase'); - $block->actionLink = html::a($this->createLink('testcase', 'create', 'productID='), " " . $this->lang->testcase->create, '', "class='btn btn-sm'"); + $block->actionLink = html::a($this->createLink('testcase', 'create', 'productID='), " " . $this->lang->testcase->create, '', "class='btn'"); } } diff --git a/module/block/css/dashboard.css b/module/block/css/dashboard.css index 0326b2b2ad..880b1090f8 100644 --- a/module/block/css/dashboard.css +++ b/module/block/css/dashboard.css @@ -1,3 +1,2 @@ -.nav > li > a.btn {color: #3c4353; margin-top: 4px;} -.nav > li > a.btn-sm {padding: 2px 8px; font-size: 12px; line-height: 1.5; border-radius: 4px;} .block-statistic .nav-stacked {overflow: auto; max-height: 220px;} +.nav > li > .btn {padding: 0 5px; line-height: 24px; margin: 3px; color: #3C4353;} \ No newline at end of file diff --git a/module/block/view/productstatisticblock.html.php b/module/block/view/productstatisticblock.html.php index 62d35963d5..5b811fc8d7 100644 --- a/module/block/view/productstatisticblock.html.php +++ b/module/block/view/productstatisticblock.html.php @@ -32,8 +32,8 @@ .block-statistic .tile-title {font-size: 18px; color: #A6AAB8;} .block-statistic .tile-amount {font-size: 48px; margin-bottom: 10px;} .block-statistic .col-nav {border-left: 1px solid #EBF2FB; width: 260px; padding-left: 0;} - .block-statistic .nav-secondary > li > a {font-size: 16px; color: #838A9D; position: relative; box-shadow: none; padding-left: 20px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; transition: all .2s;} - .block-statistic .nav-secondary > li.active > a {font-size: 20px; color: #3C4353; background: transparent; box-shadow: none;} + .block-statistic .nav-secondary > li > a {font-size: 14px; color: #838A9D; position: relative; box-shadow: none; padding-left: 20px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; transition: all .2s;} + .block-statistic .nav-secondary > li.active > a {color: #3C4353; background: transparent; box-shadow: none;} .block-statistic .nav-secondary > li.active > a:hover, .block-statistic .nav-secondary > li.active > a:focus, .block-statistic .nav-secondary > li > a:hover {box-shadow: none;} diff --git a/module/product/view/all.html.php b/module/product/view/all.html.php index fa020b14f5..6b67b62961 100644 --- a/module/product/view/all.html.php +++ b/module/product/view/all.html.php @@ -96,7 +96,7 @@ id);?> - createLink('product', 'view', 'product=' . $product->id), $product->name);?> + createLink('product', 'view', 'product=' . $product->id), $product->name);?> '>line, '');?> stories['active'];?> stories['changed'];?> diff --git a/module/product/view/create.html.php b/module/product/view/create.html.php index 47189f0a1f..b2c7a393f6 100644 --- a/module/product/view/create.html.php +++ b/module/product/view/create.html.php @@ -66,7 +66,7 @@ $proudctTypeList = array(); foreach($lang->product->typeList as $key => $type) $productTypeList[$key] = $type . zget($lang->product->typeTips, $key, ''); ?> - + diff --git a/www/js/zui/min.js b/www/js/zui/min.js index cb2d061db7..f0604bf1a9 100644 --- a/www/js/zui/min.js +++ b/www/js/zui/min.js @@ -74,5 +74,5 @@ function(){var t,e,i,s,n,o={}.hasOwnProperty,a=function(t,e){function i(){this.c * Original idea by: * Binny V A, http://www.openjs.com/scripts/events/keyboard_shortcuts/ */ -function(t){function e(e){if("string"==typeof e.data){var i=e.handler,s=e.data.toLowerCase().split(" ");e.handler=function(e){if(this===e.target||!/textarea|select/i.test(e.target.nodeName)&&"text"!==e.target.type){var n="keypress"!==e.type&&t.hotkeys.specialKeys[e.which],o=String.fromCharCode(e.which).toLowerCase(),a="",r={};e.altKey&&"alt"!==n&&(a+="alt+"),e.ctrlKey&&"ctrl"!==n&&(a+="ctrl+"),e.metaKey&&!e.ctrlKey&&"meta"!==n&&(a+="meta+"),e.shiftKey&&"shift"!==n&&(a+="shift+"),n?r[a+n]=!0:(r[a+o]=!0,r[a+t.hotkeys.shiftNums[o]]=!0,"shift+"===a&&(r[t.hotkeys.shiftNums[o]]=!0));for(var l=0,h=s.length;l","/":"?","\\":"|"}},t.each(["keydown","keyup","keypress"],function(){t.event.special[this]={add:e}})}(jQuery),function(t){"use strict";function e(e,i){if(e===!1)return e;if(!e)return i;e===!0?e={add:!0,"delete":!0,edit:!0,sort:!0}:"string"==typeof e&&(e=e.split(","));var s;return t.isArray(e)&&(s={},t.each(e,function(e,i){t.isPlainObject(i)?s[i.action]=i:s[i]=!0}),e=s),t.isPlainObject(e)&&(s={},t.each(e,function(e,i){i?s[e]=t.extend({type:e},a[e],t.isPlainObject(i)?i:null):s[e]=!1}),e=s),i?t.extend(!0,{},i,e):e}function i(e,i,s){return i=i||e.type,t(s||e.template).addClass("tree-action").attr(t.extend({"data-type":i,title:e.title||""},e.attr)).data("action",e)}var s="zui.tree",n=0,o=function(e,i){this.name=s,this.$=t(e),this.getOptions(i),this._init()},a={sort:{template:''},add:{template:''},edit:{template:''},"delete":{template:''}};o.DEFAULTS={animate:null,initialState:"normal",toggleTemplate:''},o.prototype.add=function(e,i,s,n,o){var a,r=t(e),l=this.options;if(r.is("li")?(a=r.children("ul"),a.length||(a=t("