From d6916ee14571d95f12d447322cf866dbfa6ebbfa Mon Sep 17 00:00:00 2001 From: Catouse Date: Fri, 18 Apr 2014 10:31:14 +0800 Subject: [PATCH] * fixed style. --- module/bug/control.php | 2 +- module/project/view/bug.html.php | 2 +- module/task/control.php | 2 +- module/task/js/recordestimate.js | 25 +++++++++------------- module/testcase/css/common.css | 2 +- module/testcase/view/create.html.php | 2 +- module/todo/css/batchcreate.css | 8 +------ module/todo/js/batchcreate.js | 13 ------------ module/todo/view/batchcreate.html.php | 30 ++++++++++++--------------- module/todo/view/batchedit.html.php | 5 +++-- module/todo/view/footer.html.php | 15 ++++++++------ module/user/js/todo.js | 12 +++-------- 12 files changed, 44 insertions(+), 74 deletions(-) diff --git a/module/bug/control.php b/module/bug/control.php index 8bf0f78175..6b4004eab1 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -973,7 +973,7 @@ class bug extends control if($account == '') $account = $this->app->user->account; $bugs = $this->bug->getUserBugPairs($account); - if($id) die(html::select("bugs[$id]", $bugs, '', 'class="select-1 f-left"')); + if($id) die(html::select("bugs[$id]", $bugs, '', 'class="form-control"')); die(html::select('bug', $bugs, '', 'class=form-control')); } diff --git a/module/project/view/bug.html.php b/module/project/view/bug.html.php index 6d0ba6984b..806c9e4d82 100644 --- a/module/project/view/bug.html.php +++ b/module/project/view/bug.html.php @@ -20,7 +20,7 @@ id");?> - +
id}&orderBy=%s&build=$buildID&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?> diff --git a/module/task/control.php b/module/task/control.php index a95c180da0..1e3e8e54ac 100644 --- a/module/task/control.php +++ b/module/task/control.php @@ -831,7 +831,7 @@ class task extends control if($account == '') $account = $this->app->user->account; $tasks = $this->task->getUserTaskPairs($account, $status); - if($id) die(html::select("tasks[$id]", $tasks, '', 'class="select-1 f-left"')); + if($id) die(html::select("tasks[$id]", $tasks, '', 'class="form-control"')); die(html::select('task', $tasks, '', 'class=form-control')); } diff --git a/module/task/js/recordestimate.js b/module/task/js/recordestimate.js index 29b1dae49d..fd7d720cfb 100644 --- a/module/task/js/recordestimate.js +++ b/module/task/js/recordestimate.js @@ -1,17 +1,12 @@ -$(function(){ - // startDate = new Date(1970, 1, 1); - // $(".date").datePicker({ - // createButton: true, - // startDate: startDate, - // endDate: new Date() - // }).dpSetPosition($.dpConst.POS_TOP, $.dpConst.POS_LEFT); +$(function() +{ + $("#recordForm").submit(function() + { + $('#recordForm .left').each(function() + { + if($(this).val() !== '') left = $(this).val(); + }); + if(left === '0') return confirm(confirmRecord); + }); }) -$("#recordForm").submit(function() -{ - $('#recordForm .left').each(function() - { - if($(this).val() !== '') left = $(this).val(); - }); - if(left === '0') return confirm(confirmRecord); -}); diff --git a/module/testcase/css/common.css b/module/testcase/css/common.css index ff84b3c44a..54e737e994 100644 --- a/module/testcase/css/common.css +++ b/module/testcase/css/common.css @@ -1,3 +1,3 @@ .delbutton{font-size:12px; color:red; width:80px; padding:0} .addbutton{font-size:12px; color:darkgreen; width:80px; padding:0} -.table-form > tbody > tr > td .btn-group-vertical > .btn {margin-left: 0; padding: 2px 8px} +.table-form > tbody > tr > td .btn-group-vertical > .btn {margin-left: 0!important; padding: 2px 8px} diff --git a/module/testcase/view/create.html.php b/module/testcase/view/create.html.php index e9ede96b1f..547aa25b51 100644 --- a/module/testcase/view/create.html.php +++ b/module/testcase/view/create.html.php @@ -101,7 +101,7 @@ echo ""; echo ''; echo ''; - echo "
$stepID' . html::textarea('steps[]', $step->desc, "rows='3' class='form-control'") . '' . html::textarea('expects[]', $step->expect, "rows='3' class='form-control'") . '
"; + echo "
"; echo ""; echo ""; echo ""; diff --git a/module/todo/css/batchcreate.css b/module/todo/css/batchcreate.css index c515014666..f7d0b1a669 100755 --- a/module/todo/css/batchcreate.css +++ b/module/todo/css/batchcreate.css @@ -1,7 +1 @@ -.half-left{text-align:right} -.half-right{text-align:left} -.nameBox .f-left {margin-left:20px} -.select-2 {width: 75px} -.text-1, .select-1{width:98%} -select {border:1px solid #ccc} -textarea {height:16px} +#datepicker {position: relative; top: -6px; margin-left: 10px;} diff --git a/module/todo/js/batchcreate.js b/module/todo/js/batchcreate.js index 628839fd7c..6ae7cda750 100644 --- a/module/todo/js/batchcreate.js +++ b/module/todo/js/batchcreate.js @@ -12,16 +12,3 @@ function updateAction(date) link = createLink('todo', 'batchCreate', 'date=' + date); location.href=link; } - -$(function(){ - var endDate = new Date('2222', '1', '1'); - $("#date").datePicker({ - createButton: true, - startDate: new Date() - }).dpSetPosition($.dpConst.POS_TOP, $.dpConst.POS_LEFT) - .bind('click', function(){ - $(this).dpDisplay(); - this.blur(); - return false; - }); -}) diff --git a/module/todo/view/batchcreate.html.php b/module/todo/view/batchcreate.html.php index 35cfb0cf52..bb80241a77 100755 --- a/module/todo/view/batchcreate.html.php +++ b/module/todo/view/batchcreate.html.php @@ -12,26 +12,22 @@ ?> -
-
- icons['todo']);?> - icons['batchCreate']);?> todo->common . $lang->colon . $lang->todo->batchCreate;?> -
-
- - + + +
-
-
- todo->date;?> - - todo->periods['future'];?> -
+
+
+ icons['todo']);?> + icons['batchCreate']);?> todo->common . $lang->colon . $lang->todo->batchCreate;?> +
+ todo->date;?> + + todo->periods['future'];?>
-
- + @@ -52,7 +48,7 @@ diff --git a/module/todo/view/batchedit.html.php b/module/todo/view/batchedit.html.php index e1566c13b6..82e45b817a 100644 --- a/module/todo/view/batchedit.html.php +++ b/module/todo/view/batchedit.html.php @@ -29,7 +29,7 @@ - + @@ -59,8 +59,9 @@ diff --git a/module/todo/view/footer.html.php b/module/todo/view/footer.html.php index 2c37a9055f..11d28e20a5 100644 --- a/module/todo/view/footer.html.php +++ b/module/todo/view/footer.html.php @@ -12,6 +12,8 @@ function loadList(type, id) divClass = '.nameBox'; divID = '#nameBox'; } + console.log("divClass:"+divClass); + console.log("divID:"+divID); customHtml = $(divID).html(); if(type == 'bug') @@ -37,6 +39,7 @@ function loadList(type, id) } } + console.log("link:"+link); if(type == 'bug' || type == 'task') { $(divClass).load(link); @@ -49,7 +52,7 @@ function loadList(type, id) function selectNext() { - $("#end ").get(0).selectedIndex = $("#begin ").get(0).selectedIndex + 3; + $("#end ")[0].selectedIndex = $("#begin ")[0].selectedIndex + 3; } function setBeginsAndEnds(i, beginOrEnd) @@ -58,20 +61,20 @@ function setBeginsAndEnds(i, beginOrEnd) { for(j = 0; j < batchCreateNum; j++) { - if(j != 0) $("#begins" + j).get(0).selectedIndex = $("#ends" + (j - 1)).get(0).selectedIndex; - $("#ends" + j).get(0).selectedIndex = $("#begins" + j).get(0).selectedIndex + 3; + if(j != 0) $("#begins" + j)[0].selectedIndex = $("#ends" + (j - 1))[0].selectedIndex; + $("#ends" + j)[0].selectedIndex = $("#begins" + j)[0].selectedIndex + 3; } } else { if(beginOrEnd == 'begin') { - $("#ends" + i).get(0).selectedIndex = $("#begins" + i).get(0).selectedIndex + 3; + $("#ends" + i)[0].selectedIndex = $("#begins" + i)[0].selectedIndex + 3; } for(j = i+1; j < batchCreateNum; j++) { - $("#begins" + j).get(0).selectedIndex = $("#ends" + (j - 1)).get(0).selectedIndex; - $("#ends" + j).get(0).selectedIndex = $("#begins" + j).get(0).selectedIndex + 3; + $("#begins" + j)[0].selectedIndex = $("#ends" + (j - 1))[0].selectedIndex; + $("#ends" + j)[0].selectedIndex = $("#begins" + j)[0].selectedIndex + 3; } } } diff --git a/module/user/js/todo.js b/module/user/js/todo.js index 726447fa21..72b0c829f4 100644 --- a/module/user/js/todo.js +++ b/module/user/js/todo.js @@ -3,13 +3,7 @@ function changeDate(date) location.href = createLink('user', 'todo', 'account=' + account + '&type=' + date.replace(/\-/g, '')); } -startDate = new Date(1970, 1, 1); -$(".todo-date").datePicker({createButton:true, startDate:startDate, maxDate:'%y-%M-%d'}) -.dpSetPosition($.dpConst.POS_TOP, $.dpConst.POS_LEFT) -.bind('click', function() { - $(this).dpDisplay(); - this.blur(); - return false; +$(function() +{ + $(".colorbox").modalTrigger({width:960, type:'iframe'}); }); - -$(".colorbox").modalTrigger({width:960, type:'iframe'});
idAB;?>idAB;?> todo->type;?> todo->pri;?> todo->name;?>
- +
todo->pri;?> todo->name;?> todo->beginAndEnd;?> todo->status;?> todo->status;?>
- begin, 'onchange=selectNext(); class="form-control" style="width: 50%"') . html::select('end', $times, $todo->end, 'class="form-control" style="width: 50%"');?> + begin, 'class="form-control" style="width: 50%"') . html::select('ends[$i]', $times, $todo->end, 'class="form-control" style="width: 50%"');?>
+
id]", $lang->todo->statusList, $todo->status, "class='form-control'");?>