* fixed style.

This commit is contained in:
Catouse
2014-04-18 10:31:14 +08:00
parent a0bc37e751
commit d6916ee145
12 changed files with 44 additions and 74 deletions

View File

@@ -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'));
}

View File

@@ -20,7 +20,7 @@
<?php common::printIcon('bug', 'create', "productID=$productID&extra=projectID=$project->id");?>
</div>
</div>
<table class='table table-fixed tablesorter' id='bugList'>
<table class='table table-condensed table-hover table-striped table-borderless tablesorter table-fixed' id='bugList'>
<thead>
<tr>
<?php $vars = "projectID={$project->id}&orderBy=%s&build=$buildID&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?>

View File

@@ -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'));
}

View File

@@ -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);
});

View File

@@ -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}

View File

@@ -101,7 +101,7 @@
echo "<td class='stepID strong'>$stepID</td>";
echo '<td class="w-p50">' . html::textarea('steps[]', $step->desc, "rows='3' class='form-control'") . '</td>';
echo '<td>' . html::textarea('expects[]', $step->expect, "rows='3' class='form-control'") . '</td>';
echo "<td class='a-left w-100px'><div class='btn-group-vertical'>";
echo "<td class='text-left w-100px'><div class='btn-group-vertical'>";
echo "<input type='button' tabindex='-1' class='addbutton btn btn-xs' onclick='preInsert($stepID)' value='{$lang->testcase->insertBefore}' />";
echo "<input type='button' tabindex='-1' class='addbutton btn btn-xs' onclick='postInsert($stepID)' value='{$lang->testcase->insertAfter}' />";
echo "<input type='button' tabindex='-1' class='delbutton btn btn-xs' onclick='deleteRow($stepID)' value='{$lang->testcase->deleteStep}' />";

View File

@@ -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;}

View File

@@ -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;
});
})

View File

@@ -12,26 +12,22 @@
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/datepicker.html.php';?>
<div id='titlebar'>
<div class='heading'>
<span class='prefix'><?php echo html::icon($lang->icons['todo']);?></span>
<strong><small class='text-muted'><?php echo html::icon($lang->icons['batchCreate']);?></small> <?php echo $lang->todo->common . $lang->colon . $lang->todo->batchCreate;?></strong>
</div>
</div>
<form class='form-condensed' method='post' target='hiddenwin'>
<table class='table table-form' >
<caption class='text-left'>
<div class='form-group mg-0 w-300px'>
<div class='input-group'>
<span class='input-group-addon'><?php echo $lang->todo->date;?></span>
<?php echo html::input('date', $date, "class='form-control form-date' onchange='updateAction(this.value)'");?>
<span class='input-group-addon'><input type='checkbox' id='switchDate' onclick='switchDateTodo(this);'> <?php echo $lang->todo->periods['future'];?></span>
</div>
<div id='titlebar'>
<div class='heading'>
<span class='prefix pull-left'><?php echo html::icon($lang->icons['todo']);?></span>
<strong class='pull-left'><small class='text-muted'><?php echo html::icon($lang->icons['batchCreate']);?></small> <?php echo $lang->todo->common . $lang->colon . $lang->todo->batchCreate;?></strong>
<div class='input-group w-200px pull-left' id='datepicker'>
<span class='input-group-addon'><?php echo $lang->todo->date;?></span>
<?php echo html::input('date', $date, "class='form-control form-date' onchange='updateAction(this.value)'");?>
<span class='input-group-addon'><input type='checkbox' id='switchDate' onclick='switchDateTodo(this);'> <?php echo $lang->todo->periods['future'];?></span>
</div>
</caption>
</div>
</div>
<table class='table table-form table-fixed'>
<thead>
<tr>
<th class='w-20px'><?php echo $lang->idAB;?></th>
<th class='w-30px'><?php echo $lang->idAB;?></th>
<th class='w-100px'><?php echo $lang->todo->type;?></th>
<th class='w-80px'><?php echo $lang->todo->pri;?></th>
<th class='w-p40 red'><?php echo $lang->todo->name;?></th>
@@ -52,7 +48,7 @@
<td><div class='form-control' contenteditable='true' data-sync-target='#descs\[<?php echo $i;?>\]'></div><?php echo html::textarea("descs[$i]", '', "rows='1' class='form-control hidden'");?></td>
<td>
<div class='input-group'>
<?php echo html::select('begin', $times, $time, 'onchange=selectNext(); class="form-control" style="width: 50%"') . html::select('end', $times, '', 'class="form-control" style="width: 50%"');?>
<?php echo html::select("begins[$i]", $times, $time, "onchange=\"setBeginsAndEnds($i, 'begin');\" class='form-control' style='width: 50%'") . html::select("ends[$i]", $times, '', "onchange=\"setBeginsAndEnds($i, 'end');\" class='form-control' style='width: 50%'");?>
</div>
</td>
</tr>

View File

@@ -29,7 +29,7 @@
<th class='w-80px'> <?php echo $lang->todo->pri;?></th>
<th class='w-p65 red'><?php echo $lang->todo->name;?></th>
<th class='w-140px'> <?php echo $lang->todo->beginAndEnd;?></th>
<th class='w-90px'> <?php echo $lang->todo->status;?></th>
<th class='w-100px'> <?php echo $lang->todo->status;?></th>
</tr>
</thead>
<?php foreach($editedTodos as $todo):?>
@@ -59,8 +59,9 @@
</td>
<td>
<div class='input-group'>
<?php echo html::select('begin', $times, $todo->begin, 'onchange=selectNext(); class="form-control" style="width: 50%"') . html::select('end', $times, $todo->end, 'class="form-control" style="width: 50%"');?>
<?php echo html::select('begins[$i]', $times, $todo->begin, 'class="form-control" style="width: 50%"') . html::select('ends[$i]', $times, $todo->end, 'class="form-control" style="width: 50%"');?>
</div>
</td>
<td><?php echo html::select("status[$todo->id]", $lang->todo->statusList, $todo->status, "class='form-control'");?></td>
</tr>
<?php endforeach;?>

View File

@@ -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;
}
}
}

View File

@@ -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'});