From aa96761a828b31dcbc9a82daeb05b7f5778c9352 Mon Sep 17 00:00:00 2001 From: Catouse Date: Wed, 26 Mar 2014 15:44:57 +0800 Subject: [PATCH] * changed css names. * added method 'setSyncTrigger' in 'my.full.js'. --- module/bug/control.php | 2 +- module/bug/view/batchcreate.html.php | 2 +- module/bug/view/batchedit.html.php | 14 +++---- module/bug/view/edit.html.php | 8 ++-- module/common/lang/en.php | 2 + module/common/lang/zh-cn.php | 3 +- module/common/view/chosen.html.php | 11 +++--- module/product/control.php | 3 ++ module/product/view/browse.html.php | 2 +- module/story/control.php | 2 + module/story/view/create.html.php | 52 ++++++++++++++++--------- module/story/view/header.html.php | 4 +- module/task/control.php | 2 +- module/task/view/batchcreate.html.php | 12 +++--- module/task/view/batchedit.html.php | 18 ++++----- module/testcase/view/batchedit.html.php | 8 ++-- module/testcase/view/edit.html.php | 14 +++---- module/testtask/view/linkcase.html.php | 2 +- module/todo/view/batchcreate.html.php | 2 +- module/todo/view/batchedit.html.php | 2 +- module/todo/view/create.html.php | 4 +- module/tree/control.php | 5 ++- www/js/my.full.js | 23 ++++++++++- www/theme/default/style.css | 11 ++++++ 24 files changed, 133 insertions(+), 75 deletions(-) diff --git a/module/bug/control.php b/module/bug/control.php index ff0ce859ce..edeae900b9 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -939,7 +939,7 @@ class bug extends control $bugs = $this->bug->getUserBugPairs($account); if($id) die(html::select("bugs[$id]", $bugs, '', 'class="select-1 f-left"')); - die(html::select('bug', $bugs, '', 'class=select-1')); + die(html::select('bug', $bugs, '', 'class=form-control')); } /** diff --git a/module/bug/view/batchcreate.html.php b/module/bug/view/batchcreate.html.php index a5eea7ba31..78b10818fd 100644 --- a/module/bug/view/batchcreate.html.php +++ b/module/bug/view/batchcreate.html.php @@ -34,7 +34,7 @@ - + bug->typeList, '');?> bug->severityList, '');?> diff --git a/module/bug/view/batchedit.html.php b/module/bug/view/batchedit.html.php index a02ab886ed..2e6672d9ac 100644 --- a/module/bug/view/batchedit.html.php +++ b/module/bug/view/batchedit.html.php @@ -37,13 +37,13 @@ ?> - bug->typeList, $bugs[$bugID]->type, 'class=select-1');?> - bug->severityList, $bugs[$bugID]->severity, 'class=select-1');?> - bug->priList, $bugs[$bugID]->pri, 'class=select-1');?> - title, 'class=text-1');?> - assignedTo, 'class=select-1');?> - bug->statusList, $bugs[$bugID]->status, 'class=select-1');?> - resolvedBy, 'class=select-1');?> + bug->typeList, $bugs[$bugID]->type, 'class=form-control');?> + bug->severityList, $bugs[$bugID]->severity, 'class=form-control');?> + bug->priList, $bugs[$bugID]->pri, 'class=form-control');?> + title, 'class=form-control');?> + assignedTo, 'class=form-control');?> + bug->statusList, $bugs[$bugID]->status, 'class=form-control');?> + resolvedBy, 'class=form-control');?>
lang->bug->resolutionList, $bugs[$bugID]->resolution, "class=w-80px onchange=setDuplicate(this.value,$bugID)");?>
' resolution != 'duplicate') echo "style='display:none'";?>>bug->duplicateBug}'");?>
diff --git a/module/bug/view/edit.html.php b/module/bug/view/edit.html.php index f1b325dbf2..499554bbd8 100644 --- a/module/bug/view/edit.html.php +++ b/module/bug/view/edit.html.php @@ -32,7 +32,7 @@ js::set('oldResolvedBuild' , $bug->resolvedBuild);
BUG #id . $lang->colon;?> - title), 'class=text-1');?> + title), 'class=form-control');?>
@@ -165,7 +165,7 @@ js::set('oldResolvedBuild' , $bug->resolvedBuild); bug->resolvedDate;?> - resolvedDate, 'class=text-1');?> + resolvedDate, 'class=form-control');?> bug->resolvedBuild;?> @@ -177,7 +177,7 @@ js::set('oldResolvedBuild' , $bug->resolvedBuild); resolution != 'duplicate') echo "style='display:none'";?>> bug->duplicateBug;?> - duplicateBug, 'class=text-1');?> + duplicateBug, 'class=form-control');?> bug->closedBy;?> @@ -185,7 +185,7 @@ js::set('oldResolvedBuild' , $bug->resolvedBuild); bug->closedDate;?> - closedDate, 'class=text-1');?> + closedDate, 'class=form-control');?> diff --git a/module/common/lang/en.php b/module/common/lang/en.php index 7d7f43ef2a..1ec014eb4e 100644 --- a/module/common/lang/en.php +++ b/module/common/lang/en.php @@ -364,6 +364,8 @@ $lang->downNotify = "Down notify"; $lang->suhosinInfo = "Warming:data is too large! Please enlarge the setting of sohusin.post.max_vars and sohusin.request.max_vars in php.ini. Otherwise partial data can't be saved."; $lang->noResultsMatch = "No results match"; +$lang->selectAnOption = "Select an option"; +$lang->selectSomeOptions = "Select some options"; $lang->chooseUsersToMail = "Choose users to mail..."; /* Date times. */ diff --git a/module/common/lang/zh-cn.php b/module/common/lang/zh-cn.php index 5942c02447..e62335c3c9 100644 --- a/module/common/lang/zh-cn.php +++ b/module/common/lang/zh-cn.php @@ -365,7 +365,7 @@ $lang->suhosinInfo = "警告:数据太多,请在php.ini中修改noResultsMatch = "没有匹配结果"; $lang->selectAnOption = "选择一个选项"; -$lang->selectSoomeOptions = "选择一些选项"; +$lang->selectSomeOptions = "选择一些选项"; $lang->chooseUsersToMail = "选择要发信通知的用户..."; /* 时间格式设置。*/ @@ -421,6 +421,7 @@ $lang->icons['team'] = 'group'; $lang->icons['create'] = 'plus'; $lang->icons['batchCreate'] = 'plus-sign'; +$lang->icons['batchEdit'] = 'edit-sign'; $lang->icons['edit'] = 'pencil'; $lang->icons['delete'] = 'remove'; $lang->icons['copy'] = 'copy'; diff --git a/module/common/view/chosen.html.php b/module/common/view/chosen.html.php index 3a575544eb..2df6d3595c 100755 --- a/module/common/view/chosen.html.php +++ b/module/common/view/chosen.html.php @@ -10,15 +10,16 @@ if($config->debug) #colorbox, #cboxOverlay, #cboxWrapper{z-index:9999;} diff --git a/module/product/control.php b/module/product/control.php index 93e011a7fd..a737be41aa 100644 --- a/module/product/control.php +++ b/module/product/control.php @@ -478,8 +478,11 @@ class product extends control $output = html::select('plan', $plans, $planID, "class='form-control'"); if(count($plans) == 1 and $needCreate) { + $output .= ""; $output .= html::a($this->createLink('productplan', 'create', "productID=$productID"), $this->lang->productplan->create, '_blank'); + $output .= '  '; $output .= html::a("javascript:loadProductPlans($productID)", $this->lang->refresh); + $output .= ''; } die($output); } diff --git a/module/product/view/browse.html.php b/module/product/view/browse.html.php index 34440da26b..85f99c6636 100644 --- a/module/product/view/browse.html.php +++ b/module/product/view/browse.html.php @@ -65,7 +65,7 @@
- +
recTotal}&recPerPage={$pager->recPerPage}";?> diff --git a/module/story/control.php b/module/story/control.php index 510ab939d5..faf0f63ec3 100644 --- a/module/story/control.php +++ b/module/story/control.php @@ -209,6 +209,7 @@ class story extends control $plans['same'] = $this->lang->story->same; $this->view->title = $product->name . $this->lang->colon . $this->lang->story->batchCreate; + $this->view->productName = $product->name; $this->view->position[] = html::a($this->createLink('product', 'browse', "product=$productID"), $product->name); $this->view->position[] = $this->lang->story->common; $this->view->position[] = $this->lang->story->batchCreate; @@ -376,6 +377,7 @@ class story extends control $this->view->productID = $productID; $this->view->storyIDList = $storyIDList; $this->view->stories = $stories; + $this->view->productName = $product->name; $this->display(); } diff --git a/module/story/view/create.html.php b/module/story/view/create.html.php index d580ba43b1..b049e40df3 100644 --- a/module/story/view/create.html.php +++ b/module/story/view/create.html.php @@ -17,40 +17,48 @@
icons['story']);?> - story->create;?> + icons['create']);?> story->create;?>
- - + + - + + + @@ -59,15 +67,15 @@ - + - + - + @@ -75,15 +83,21 @@ - + - + + - - + - + - +
story->product;?> - - + story->product;?> + + +
"; echo html::a($this->createLink('tree', 'browse', "rootID=$productID&view=story"), $lang->tree->manage, '_blank'); + echo '  '; echo html::a("javascript:loadProductModules($productID)", $lang->refresh); + echo ''; } ?> - -
story->plan;?> - +
"; echo html::a($this->createLink('productplan', 'create', "productID=$productID"), $lang->productplan->create, '_blank'); + echo '  '; echo html::a("javascript:loadProductPlans($productID)", $lang->refresh); + echo ''; } ?> - +
story->title;?>
story->spec;?>
story->specTemplate;?>
story->specTemplate;?>
story->verify;?>
story->pri;?>
story->estimate;?>story->hour;?> +
+ + story->hour;?> +
+
story->reviewedBy;?>story->needNotReview, '', "id='needNotReview'");?>story->needNotReview, '', "id='needNotReview'");?>
story->mailto;?> + story->keywords;?>
story->legendAttatch;?>fetch('file', 'buildform');?>fetch('file', 'buildform');?>
diff --git a/module/story/view/header.html.php b/module/story/view/header.html.php index 918b361559..5ddaecc4e7 100644 --- a/module/story/view/header.html.php +++ b/module/story/view/header.html.php @@ -21,7 +21,7 @@ function loadProductPlans(productID) $(function() { - $("#reviewedBy").chosen({no_results_text:noResultsMatch}); - $("#mailto").chosen({no_results_text:noResultsMatch}); + $("#reviewedBy").chosen(defaultChosenOptions); + $("#mailto").chosen(defaultChosenOptions); }) diff --git a/module/task/control.php b/module/task/control.php index aa83d134ca..fc46472b6b 100644 --- a/module/task/control.php +++ b/module/task/control.php @@ -824,7 +824,7 @@ class task extends control $tasks = $this->task->getUserTaskPairs($account, $status); if($id) die(html::select("tasks[$id]", $tasks, '', 'class="select-1 f-left"')); - die(html::select('task', $tasks, '', 'class=select-1')); + die(html::select('task', $tasks, '', 'class=form-control')); } /** diff --git a/module/task/view/batchcreate.html.php b/module/task/view/batchcreate.html.php index cb2592dde5..d91ba61447 100644 --- a/module/task/view/batchcreate.html.php +++ b/module/task/view/batchcreate.html.php @@ -57,13 +57,13 @@ echo html::a("javascript:copyStoryTitle($i)", "", '', "class='sameAsStory' title='{$lang->task->copyStoryTitle}'"); ?> - - task->typeList, $type, 'class=select-1');?> - - - + + task->typeList, $type, 'class=form-control');?> + + + - task->priList, $pri, 'class=select-1');?> + task->priList, $pri, 'class=form-control');?> diff --git a/module/task/view/batchedit.html.php b/module/task/view/batchedit.html.php index f8a170d4e1..302d11f1d1 100755 --- a/module/task/view/batchedit.html.php +++ b/module/task/view/batchedit.html.php @@ -39,18 +39,18 @@ ?> - name, 'class=text-1');?> - module, 'class=select-1')?> - assignedTo, 'class=select-1');?> - task->typeList, $tasks[$taskID]->type, 'class=select-1');?> - task->statusList, $tasks[$taskID]->status, 'class=select-1');?> - task->priList, $tasks[$taskID]->pri, 'class=select-1');?> + name, 'class=form-control');?> + module, 'class=form-control')?> + assignedTo, 'class=form-control');?> + task->typeList, $tasks[$taskID]->type, 'class=form-control');?> + task->statusList, $tasks[$taskID]->status, 'class=form-control');?> + task->priList, $tasks[$taskID]->pri, 'class=form-control');?> estimate, "class='text-1 a-center'");?> left, "class='text-1 a-center'");?> - finishedBy, 'class=select-1');?> - closedBy, 'class=select-1');?> - task->reasonList, $tasks[$taskID]->closedReason, 'class=select-1');?> + finishedBy, 'class=form-control');?> + closedBy, 'class=form-control');?> + task->reasonList, $tasks[$taskID]->closedReason, 'class=form-control');?> diff --git a/module/testcase/view/batchedit.html.php b/module/testcase/view/batchedit.html.php index 27cd41619b..2bc65adedf 100644 --- a/module/testcase/view/batchedit.html.php +++ b/module/testcase/view/batchedit.html.php @@ -27,11 +27,11 @@ tree->getOptionMenu($cases[$caseID]->product, $viewType = 'case', $startModuleID = 0); ?> - testcase->priList, $cases[$caseID]->pri, 'class=select-1');?> - testcase->statusList, $cases[$caseID]->status, 'class=select-1');?> + testcase->priList, $cases[$caseID]->pri, 'class=form-control');?> + testcase->statusList, $cases[$caseID]->status, 'class=form-control');?> module, "class='select-1'");?> - title, 'class=text-1'); echo "*";?> - testcase->typeList, $cases[$caseID]->type, 'class=select-1');?> + title, 'class=form-control'); echo "*";?> + testcase->typeList, $cases[$caseID]->type, 'class=form-control');?> testcase->stageList, $cases[$caseID]->stage, "class='select-1 chosen' multiple data-placeholder='{$lang->testcase->stage}'");?> diff --git a/module/testcase/view/edit.html.php b/module/testcase/view/edit.html.php index 2b993bc2d4..effe2cf1cf 100644 --- a/module/testcase/view/edit.html.php +++ b/module/testcase/view/edit.html.php @@ -20,7 +20,7 @@
CASE #id . $lang->colon;?> - title, 'class=text-1');?> + title, 'class=form-control');?>
@@ -89,12 +89,12 @@ testcase->story;?> -
story, 'class=select-1');?>
+
story, 'class=form-control');?>
testcase->type;?> - testcase->typeList, $case->type, 'class=select-1');?> + testcase->typeList, $case->type, 'class=form-control');?> testcase->stage;?> @@ -102,19 +102,19 @@ testcase->pri;?> - testcase->priList, $case->pri, 'class=select-1');?> + testcase->priList, $case->pri, 'class=form-control');?> testcase->status;?> - testcase->statusList, $case->status, 'class=select-1');?> + testcase->statusList, $case->status, 'class=form-control');?> testcase->keywords;?> - keywords, 'class=text-1');?> + keywords, 'class=form-control');?> testcase->linkCase;?> - linkCase, 'class=text-1');?> + linkCase, 'class=form-control');?> diff --git a/module/testtask/view/linkcase.html.php b/module/testtask/view/linkcase.html.php index 782e781c57..7afea8143b 100644 --- a/module/testtask/view/linkcase.html.php +++ b/module/testtask/view/linkcase.html.php @@ -45,7 +45,7 @@ createLink('testcase', 'view', "testcaseID=$case->id"), sprintf('%03d', $case->id));?> - id]", array_combine(range($case->version, 1), range($case->version, 1)), '', 'class=select-1');?> + id]", array_combine(range($case->version, 1), range($case->version, 1)), '', 'class=form-control');?> pri?>'>pri?> todo->typeList, '', "onchange=loadList(this.value,$i+1) class='select-1'");?> - todo->priList, $pri, 'class=select-1');?> + todo->priList, $pri, 'class=form-control');?>
diff --git a/module/todo/view/batchedit.html.php b/module/todo/view/batchedit.html.php index a21347e266..8122c462be 100644 --- a/module/todo/view/batchedit.html.php +++ b/module/todo/view/batchedit.html.php @@ -30,7 +30,7 @@ id . html::hidden("todoIDList[$todo->id]", $todo->id);?> id]", $todo->date, "class='text-2 date'");?> id]", $lang->todo->typeList, $todo->type, "onchange=loadList(this.value,$todo->id) class='select-1'");?> - id]", $lang->todo->priList, $todo->pri, 'class=select-1');?> + id]", $lang->todo->priList, $todo->pri, 'class=form-control');?>
diff --git a/module/todo/view/create.html.php b/module/todo/view/create.html.php index 6e3e1432b2..d4cbfe8bee 100644 --- a/module/todo/view/create.html.php +++ b/module/todo/view/create.html.php @@ -32,8 +32,8 @@ todo->name;?> - -
+ +
diff --git a/module/tree/control.php b/module/tree/control.php index df1c4bf4c2..1085894f5c 100644 --- a/module/tree/control.php +++ b/module/tree/control.php @@ -313,11 +313,14 @@ class tree extends control } if($returnType == 'html') { - $output = html::select("module", $optionMenu, '', "onchange=loadModuleRelated()"); + $output = html::select("module", $optionMenu, '', "onchange='loadModuleRelated()' class='form-control'"); if(count($optionMenu) == 1 and $needManage) { + $output .= ""; $output .= html::a($this->createLink('tree', 'browse', "rootID=$rootID&view=$viewType"), $this->lang->tree->manage, '_blank'); + $output .= '  '; $output .= html::a("javascript:loadProductModules($rootID)", $this->lang->refresh); + $output .= ''; } die($output); } diff --git a/www/js/my.full.js b/www/js/my.full.js index f4fadfa4f5..2b35bc98d5 100644 --- a/www/js/my.full.js +++ b/www/js/my.full.js @@ -894,7 +894,7 @@ function setModal() function setTableBehavior() { $('#wrap .table:not(.table-data, .table-form) tbody td').click(function(){$(this).closest('tr').toggleClass('active');}); - $('#wrap .outer > .table, #wrap .outer > form > .table, #wrap .outer > .mian > .table, #wrap .outer > .mian > form > .table, #wrap .outer > .container > .table').not('.table-data').addClass('table table-condensed table-hover table-striped table-borderless tablesorter'); + $('#wrap .outer > .table, #wrap .outer > form > .table, #wrap .outer > .mian > .table, #wrap .outer > .mian > form > .table, #wrap .outer > .container > .table').not('.table-data, .table-form').addClass('table table-condensed table-hover table-striped table-borderless tablesorter'); } /** @@ -911,6 +911,25 @@ function condensedForm() }); } +/** + * Update data to the target element synchronous. + * + * @access public + * @return void + */ +function setSyncTrigger() +{ + $("[data-sync-target]").on('input propertychange', function() + { + var $this = $(this); + var val = $this.prop('tagName') == 'INPUT' ? $this.val() : $this.html(); + var target = $($this.attr('data-sync-target')); + console.log(target); + if(target.prop('tagName') == 'INPUT') target.val(val); + else target.html(val); + }); +} + /* Ping the server every some minutes to keep the session. */ needPing = true; @@ -936,6 +955,8 @@ $(document).ready(function() toggleSearch(); toggleTreeBox(); + setSyncTrigger(); + hideClearDataLink(); $(window).resize(saveWindowSize); // When window resized, call it again. diff --git a/www/theme/default/style.css b/www/theme/default/style.css index 8114bd6ebb..4da5190a14 100644 --- a/www/theme/default/style.css +++ b/www/theme/default/style.css @@ -20,6 +20,9 @@ /* Height definitions */ .h-5px {height:5px} .h-10px {height:10px} .h-20px {height:20px} .h-30px {height:30px} .h-35px {height:35px} .h-40px {height:40px} .h-45px {height:45px} .h-50px {height:50px} .h-60px {height:60px} .h-70px {height:70px} .h-80px {height:80px} .h-100px {height:100px} .h-120px {height:120px} .h-130px {height:130px} .h-140px {height:140px} .h-150px {height:150px} .h-200px {height:200px} +/* paddings */ +.pd-0 {padding: 0 !important} + /* Style of text */ .text-latin {font-family: Arial;} .text-lg {font-size: 24px;} @@ -205,6 +208,7 @@ i[class^="icon-"].disabled,i[class*=" icon-"].disabled,i[class^="icon-"].disable .table-form > tbody > tr > td .checkbox {margin: 0} .table-form > tbody > tr > td .btn + .btn {margin-left: 8px;} .table-form > tbody > tr > td .btn-group .btn + .btn {margin-left: -1px;} +.table-form tr > td > .input-group {width: 100%} /* Table data */ .table-data th, .table-data td {padding: 5px;} @@ -229,6 +233,7 @@ i[class^="icon-"].disabled,i[class*=" icon-"].disabled,i[class^="icon-"].disable .form-condensed fieldset.collapsed legend:before {content: '\e6bb'} .form-condensed .chosen-container-single .chosen-single {padding: 4px 10px; height: 30px} .form-condensed .chosen-container-single .chosen-single div {padding: 4px 10px} +.form-condensed .table-fixed select.form-control {padding: 5px} /* help in form */ .help-block {margin-bottom: 5px;} @@ -242,6 +247,10 @@ form .star {display: none;}/* hide star */ .required-wrapper{position: relative;width: 100%; height: 0;overflow: visible;} .required-wrapper.required:after{right: -13px;top: 4px} +.table-form > thead > tr > th.required:after {top: 2px; padding-left: 4px;} + +/* Auto Height textarea */ +div.form-control[contenteditable='true'] {height: auto; text-align: left; outline: 0; overflow-x: hidden; overflow-y: auto;} /* Panel */ .panel > .table > thead > tr > th,.panel > form > .table > thead > tr > th {background-color: transparent;} @@ -388,6 +397,8 @@ body {font-size: 12px; color:#141414;padding-bottom: 40px;} .outer .table th {vertical-align: middle;} .outer .table tr > th:first-child, .outer .table tr > td:first-child {padding-left: 15px} .outer .table tr > th:last-child, .outer .table tr > td:last-child {padding-right: 15px} +.outer .table.table-form tr > th:last-child, .outer .table.table-form tr > td:last-child {padding-right: 5px} +.outer .table.table-form.table-fixed tr > th:last-child, .outer .table.table-form.table-fixed tr > td:last-child {padding-right: 15px} .outer .table tbody > tr:last-child td {border-bottom: 1px solid #e5e5e5; padding-top: 8px} .outer .table-form .table tr > th:first-child, .outer .table-form .table tr > td:first-child {padding-left: 5px} .outer .table-form .table tr > th:last-child, .outer .table-form .table tr > td:last-child {padding-right: 5px}