* ajusted style.

* fixed 'setTemplate' method for kindeditor.
 * added some icons deifinitions.
 * ajusted style of tips after create project.
This commit is contained in:
Catouse
2014-04-15 10:56:16 +08:00
parent 04a2a2ce8d
commit c58fea7d7e
17 changed files with 75 additions and 57 deletions

View File

@@ -1,2 +1,10 @@
.ke-outline .ke-icon-savetemplate {background-image: url(theme/default/images/kindeditor/save.gif); background-position: center; width: 56px; height: 20px;}
#tplBox {padding: 0}
.ke-outline .ke-icon-savetemplate {background-image: url(theme/default/images/kindeditor/save.gif); background-position: center; width: 56px; height: 20px;}
/* template box */
#tplBox .list-group-item {padding: 6px 6px;}
#tplBox .list-group-item:hover {background: #f1f1f1}
#tplBox .list-group-item a {color: #333}
.bootbox-prompt .modal-dialog {width: 500px; margin-top: 10%;}
#buildBoxActions {padding-left: 15px;}

View File

@@ -42,7 +42,7 @@ function loadAll(productID)
if(changeProductConfirmed || firstChoice)
{
$('#taskIdBox').innerHTML = '<select id="task"></select>'; // Reset the task.
$('#task').chosen({no_results_text: noResultsMatch});
$('#task').chosen(defaultChosenOptions);
loadProductModules(productID);
loadProductProjects(productID);
loadProductBuilds(productID);
@@ -116,7 +116,7 @@ function loadProductBuilds(productID)
if(page == 'create')
{
$('#buildBox').load(link, function(){ notice(); });
$('#buildBox').load(link, function(){ notice(); $('#openedBuild').chosen(defaultChosenOptions)});
}
else
{
@@ -219,7 +219,7 @@ function setStories(moduleID, productID)
if(!stories) stories = '<select id="story" name="story" class="form-control"></select>';
$('#story').replaceWith(stories);
$('#story_chosen').remove();
$("#story").chosen({no_results_text: ''});
$("#story").chosen(defaultChosenOptions);
});
}
@@ -233,15 +233,18 @@ function notice()
{
if($('#openedBuild').find('option').length <= 1)
{
var html = '';
if($('#project').val() == '')
{
$('#buildBox').append('<a href="' + createLink('release', 'create','productID=' + $('#product').val()) + '" target="_blank">' + createRelease + ' </a>');
$('#buildBox').append('<a href="javascript:loadProductBuilds(' + $('#product').val() + ')">' + refresh + '</a>');
html += '<a href="' + createLink('release', 'create','productID=' + $('#product').val()) + '" target="_blank">' + createRelease + ' </a>';
html += '<a href="javascript:loadProductBuilds(' + $('#product').val() + ')">' + refresh + '</a>';
}
else
{
$('#buildBox').append('<a href="' + createLink('build', 'create','projectID=' + $('#project').val()) + '" target="_blank">' + createBuild + '</a>');
$('#buildBox').append('<a href="javascript:loadProjectBuilds(' + $('project').val() + ')">' + refresh + '</a>');
html += '<a href="' + createLink('build', 'create','projectID=' + $('#project').val()) + '" target="_blank">' + createBuild + '</a>';
html += '<a href="javascript:loadProjectBuilds(' + $('project').val() + ')">' + refresh + '</a>';
}
var $bba = $('#buildBoxActions');
if($bba.length) $bba.html(html); else $('#buildBox').append(html);
}
}

View File

@@ -49,7 +49,7 @@ KindEditor.plugin('savetemplate', function(K)
click: function(id)
{
content = self.html();
jPrompt(setTemplateTitle, '','', function(r)
bootbox.prompt(setTemplateTitle, function(r)
{
if(!r || !content) return;
saveTemplateLink = createLink('bug', 'saveTemplate');
@@ -66,9 +66,10 @@ KindEditor.plugin('savetemplate', function(K)
/* Set template. */
function setTemplate(templateID)
{
$('#tplTitleBox' + templateID).attr('style', 'text-decoration:underline; color:#8B008B');
$('#tplBox .list-group-item.active').removeClass('active');
$('#tplTitleBox' + templateID).closest('.list-group-item').addClass('active');
steps = $('#template' + templateID).html();
editor.html(steps);
editor['#'].html(steps);
}
/* Delete template. */

View File

@@ -1,10 +1,14 @@
<div class='side' id='treebox'>
<button class='side-handle' data-id='storyTree'><i class='icon-caret-left'></i></button>
<header class='nobr'><?php echo html::icon($lang->icons['product']);?> <strong><?php echo $productName;?></strong></header>
<div class='side-body'>
<?php echo $moduleTree;?>
<div class='text-right'>
<?php common::printLink('tree', 'browse', "productID=$productID&view=bug", $lang->tree->manage);?>
<div class='panel panel-sm'>
<div class='panel-heading nobr'><?php echo html::icon($lang->icons['product']);?> <strong><?php echo $productName;?></strong></div>
<div class='panel-body'>
<?php echo $moduleTree;?>
<div class='text-right'>
<?php common::printLink('tree', 'browse', "productID=$productID&view=bug", $lang->tree->manage);?>
</div>
</div>
</div>
</div>
</div>

View File

@@ -66,7 +66,7 @@ js::set('customed', $customed);
if($customed)
{
include './browse.custom.html.php';
include '../../common/view/footer.lite.html.php';
include '../../common/view/footer.html.php';
exit;
}
?>

View File

@@ -5,9 +5,9 @@ KindEditor.lang({'savetemplate' : '<?php echo $lang->bug->saveTemplate;?>'});
<?php
foreach($templates as $key => $template)
{
echo "<li id='tplBox$template->id' class='nobr'>";
echo $lang->arrow. " <a id='tplTitleBox$template->id' href='javascript:setTemplate($template->id)'>$template->title</a>";
echo "&nbsp; <a href='javascript:void();' onclick='deleteTemplate($template->id)'><i class='icon-remove'></i></a>";
echo "<li id='tplBox$template->id' class='nobr list-group-item'>";
echo "<i class='text-muted icon-angle-left'></i> <a id='tplTitleBox$template->id' href='javascript:setTemplate($template->id)'>$template->title</a>";
echo "&nbsp; <a href='javascript:void();' onclick='deleteTemplate($template->id)' class='pull-right'><i class='icon-remove'></i></a>";
echo "<span id='template$template->id' class='hidden'>$template->content</span>";
echo '</li>';
}

View File

@@ -14,7 +14,6 @@
include '../../common/view/header.html.php';
include '../../common/view/form.html.php';
include '../../common/view/chosen.html.php';
include '../../common/view/alert.html.php';
include '../../common/view/kindeditor.html.php';
js::set('holders', $lang->bug->placeholder);
js::set('page', 'create');
@@ -35,7 +34,6 @@ js::set('refresh', $lang->refresh);
<th class='w-110px'><?php echo $lang->bug->lblProductAndModule;?></th>
<td class='w-400px'>
<?php echo html::select('product', $products, $productID, "onchange=loadAll(this.value) class='form-control' autocomplete='off'");?>
</td>
<td>
<div class='input-group' id='moduleIdBox'>
@@ -64,6 +62,7 @@ js::set('refresh', $lang->refresh);
<?php echo html::select('openedBuild[]', $builds, $buildID, "size=4 multiple=multiple class='chosen form-control'");?>
</span>
</td>
<td id='buildBoxActions'></td>
</tr>
<tr>
<th><nobr><?php echo $lang->bug->lblAssignedTo;?></nobr></th>
@@ -77,7 +76,7 @@ js::set('refresh', $lang->refresh);
<th><?php echo $lang->bug->steps;?></th>
<td colspan='2'><?php echo html::textarea('steps', $steps, "rows='10' class='form-control'");?></td>
<td style='vertical-align: top;'>
<ul id='tplBox' style='list-unstyled'><?php echo $this->fetch('bug', 'buildTemplates');?></ul>
<ul id='tplBox' class='list-group'><?php echo $this->fetch('bug', 'buildTemplates');?></ul>
</td>
</tr>
<tr>

View File

@@ -212,8 +212,8 @@ class build extends control
*/
public function ajaxGetProductBuilds($productID, $varName, $build = '', $index = 0)
{
if($varName == 'openedBuild' ) die(html::select($varName . '[]', $this->build->getProductBuildPairs($productID, 'noempty,release'), $build, 'size=4 class=select-3 multiple'));
if($varName == 'openedBuilds' ) die(html::select($varName . "[$index][]", $this->build->getProductBuildPairs($productID, 'noempty,release'), $build, 'size=4 class=select-3 multiple'));
if($varName == 'openedBuild' ) die(html::select($varName . '[]', $this->build->getProductBuildPairs($productID, 'noempty,release'), $build, 'size=4 class=form-control multiple'));
if($varName == 'openedBuilds' ) die(html::select($varName . "[$index][]", $this->build->getProductBuildPairs($productID, 'noempty,release'), $build, 'size=4 class=form-control multiple'));
if($varName == 'resolvedBuild') die(html::select($varName, $this->build->getProductBuildPairs($productID, 'noempty,release'), $build, "class='form-control'"));
}
@@ -233,7 +233,7 @@ class build extends control
if($varName == 'openedBuild')
{
$builds = $this->build->getProjectBuildPairs($projectID, $productID, 'noempty,release');
$output = html::select($varName . '[]', $builds , $build, 'size=4 class=select-3 multiple');
$output = html::select($varName . '[]', $builds , $build, 'size=4 class=form-control multiple');
if(count($builds) == 1 and $needCreate)
{
$output .= html::a($this->createLink('build', 'create', "projectID=$projectID"), $this->lang->build->create, '_blank');
@@ -241,7 +241,7 @@ class build extends control
}
die($output);
}
if($varName == 'openedBuilds') die(html::select($varName . "[$index][]", $this->build->getProjectBuildPairs($projectID, $productID, 'noempty'), $build, 'size=4 class=select-3 multiple'));
if($varName == 'openedBuilds') die(html::select($varName . "[$index][]", $this->build->getProjectBuildPairs($projectID, $productID, 'noempty'), $build, 'size=4 class=form-control multiple'));
if($varName == 'resolvedBuild') die(html::select($varName, $this->build->getProjectBuildPairs($projectID, $productID, 'noempty'), $build, "class='form-control'"));
if($varName == 'testTaskBuild') die(html::select('build', $this->build->getProjectBuildPairs($projectID, $productID, 'noempty'), $build, "class='form-control'"));
}

View File

@@ -435,6 +435,7 @@ $lang->icons['app'] = 'th-large';
$lang->icons['results'] = 'flag-checkered';
$lang->icons['create'] = 'plus';
$lang->icons['post'] = 'edit';
$lang->icons['batchCreate'] = 'plus-sign';
$lang->icons['batchEdit'] = 'edit-sign';
$lang->icons['batchClose'] = 'off';

View File

@@ -4,7 +4,7 @@
<i class='icon icon-terminal'></i> <strong id='debugTitle'><?php echo $lang->debug;?></strong>
</header>
<div id='debugContent'></div>
<div id='debugIframeTip' class='hidden'>#<strong id='debugIframeTipId'></strong> <span class='debugIframeTipTime'></span> The following content from iframe.</div>
<div id='debugIframeTip' class='hidden'>#<strong id='debugIframeTipId'></strong> <span id='debugIframeTipTime'></span> The following content from iframe.</div>
<iframe style='width:580px; height: 400px ' frameborder='0' name='hiddenwin' id='hiddenwin' scrolling='no' class='debugwin'></iframe>
</div>
<style>

View File

@@ -45,7 +45,7 @@ function initKindeditor(afterInit)
if(editor.tools == 'fullTools') editorTool = fullTools;
var K = KindEditor, $editor = $('#' + editorID);
keEditor = K.create('#' + editorID,
window.editor['#'] = window.editor[editorID] = K.create('#' + editorID,
{
cssPath:[themeRoot + 'zui/css/min.css'],
width:'100%',

View File

@@ -18,7 +18,7 @@
if($product->status == 'closed') $closeds++;
}
if($iCharges and $others) echo "<span class='black'>{$lang->product->mine}</span>";
if($iCharges and $others) echo "<li class='heading'>{$lang->product->mine}</li>";
foreach($products as $product)
{
if($product->status == 'normal' and $product->PO == $this->app->user->account)
@@ -27,7 +27,7 @@
}
}
if($iCharges and $others) echo "<span class='black'>{$lang->product->other}</span>";
if($iCharges and $others) echo "<li class='heading'>{$lang->product->other}</li>";
$class = ($iCharges and $others) ? "class='other'" : '';
foreach($products as $product)
{

View File

@@ -3,3 +3,5 @@
#productsBox > label > input {margin-left: 0; margin-right: 5px;}
#productsBox > label:hover {background: #f1f1f1}
#productsBox > label.checked, #productsBox > label.checked:hover {background: #E5FFE6; border: 1px solid #229F24;}
.radio-inline+.radio-inline, .checkbox-inline+.checkbox-inline {margin-left: 0;}
.checkbox-inline {margin-right: 10px; margin-bottom: 10px;}

View File

@@ -18,7 +18,7 @@
if($project->status == 'done') $dones++;
}
if($iCharges and $others) echo "<span class='black'>{$lang->project->mine}</span>";
if($iCharges and $others) echo "<li class='heading'>{$lang->project->mine}</li>";
foreach($projects as $project)
{
if($project->status != 'done' and $project->PM == $this->app->user->account)
@@ -27,7 +27,7 @@
}
}
if($iCharges and $others) echo "<span class='black'>{$lang->project->other}</span>";
if($iCharges and $others) echo "<li class='heading'>{$lang->project->other}</li>";
$class = ($iCharges and $others) ? "class='other'" : '';
foreach($projects as $project)
{

View File

@@ -13,24 +13,19 @@
<?php if(isset($tips)):?>
<?php $defaultURL = $this-> createLink('project', 'task', 'projectID=' . $projectID);?>
<?php include '../../common/view/header.lite.html.php';?>
<body>
<script>
$(document).ready(function() {$('#tipsModal').modal('show');});
</script>
<div class='modal fade' id='tipsModal'>
<div class='modal-dialog mw-500px'>
<body style='background: #e5e5e5'>
<div class='modal-dialog mw-500px' id='tipsModal'>
<div class='modal-header'>
<a href='<?php echo $defaultURL;?>' class='close'>&times;</a>
<h4 class='modal-title' id='myModalLabel'><i class='icon-info-sign'></i></h4>
<h4 class='modal-title' id='myModalLabel'><i class='icon-ok-sign'></i> <?php echo $lang->project->tips;?></h4>
</div>
<div class='modal-body'>
<?php echo $tips;?>
<?php echo $tips;?>
</div>
<div class='modal-footer'>
<div class='text-center'><a href='<?php echo $defaultURL;?>' class='btn btn-primary'><?php echo $lang->project->task;?> <i class='icon-arrow-right'></i></div></a>
</div>
</div>
</div>
</body>
</html>
<?php exit;?>

View File

@@ -1,11 +1,9 @@
<table align='center' class='table-3' style='margin-top:10px'>
<caption><?php echo $lang->project->tips;?></caption>
<tr>
<td><?php echo $lang->project->afterInfo;?>
<div class='f-14px pt-10px'><?php echo $lang->arrow . html::a($this->createLink('project', 'team', "projectID=$projectID"), $lang->project->setTeam);?></div>
<div class='f-14px pt-10px'><?php echo $lang->arrow . html::a($this->createLink('project', 'linkstory', "projectID=$projectID"), $lang->project->linkStory);?></div>
<div class='f-14px pt-10px'><?php echo $lang->arrow . html::a($this->createLink('task', 'create', "project=$projectID"), $lang->project->createTask);?></div>
<div class='f-14px pt-10px'><?php echo $lang->arrow . html::a($this->createLink('project', 'task', "projectID=$projectID"), $lang->project->goback);?></div>
</td>
</tr>
</table>
<div style='margin: 0 auto; max-width: 300px'>
<h6><?php echo $lang->project->afterInfo;?></h6>
<div class='list-group mg-0'>
<?php echo html::a($this->createLink('project', 'team', "projectID=$projectID"), $lang->project->setTeam . " <i class='icon-chevron-right pull-right'></i>", '', "class='list-group-item'");?>
<?php echo html::a($this->createLink('project', 'linkstory', "projectID=$projectID"), $lang->project->linkStory . " <i class='icon-chevron-right pull-right'></i>", '', "class='list-group-item'");?>
<?php echo html::a($this->createLink('task', 'create', "project=$projectID"), $lang->project->createTask . " <i class='icon-chevron-right pull-right'></i>", '', "class='list-group-item'");?>
<?php echo html::a($this->createLink('project', 'task', "projectID=$projectID"), $lang->project->goback . " <i class='icon-chevron-right pull-right'></i>", '', "class='list-group-item'");?>
</div>
</div>

View File

@@ -13,7 +13,7 @@
/* Width definitions */
.w-p5 {width: 5%} .w-p10 {width: 10%} .w-p15 {width: 15%} .w-p20 {width: 20%} .w-p25 {width: 25%} .w-p30 {width: 30%} .w-p35 {width: 35%} .w-p40 {width: 40%} .w-p45 {width: 45%} .w-p50 {width: 50%} .w-p55 {width: 55%} .w-p60 {width: 60%} .w-p65 {width: 65%} .w-p70 {width: 70%} .w-p75 {width: 75%} .w-p80 {width: 80%} .w-p85 {width: 85%} .w-p90 {width: 90%} .w-p94 {width: 94%} .w-p95 {width: 95%} .w-p98 {width: 98%} .w-p99 {width: 99%} .w-p100{width: 100%}
.w-auto {width: auto} .w-20px {width:20px} .w-30px {width:30px} .w-35px {width:35px} .w-40px {width:40px} .w-45px {width:45px} .w-50px {width:50px} .w-60px {width:60px} .w-70px {width:70px} .w-80px {width:80px} .w-90px {width:90px} .w-100px {width:100px} .w-110px {width:110px} .w-120px {width:120px} .w-130px {width:130px} .w-140px {width:140px} .w-150px {width:150px} .w-160px {width:160px} .w-180px {width:180px} .w-200px {width:200px} .w-300px {width:300px}, .w-400px {width:400px} .w-500px {width:500px} .w-600px {width:600px} .w-700px {width:700px} .w-800px {width:800px} .w-900px {width:900px}
.w-auto {width: auto} .w-20px {width:20px} .w-30px {width:30px} .w-35px {width:35px} .w-40px {width:40px} .w-45px {width:45px} .w-50px {width:50px} .w-60px {width:60px} .w-70px {width:70px} .w-80px {width:80px} .w-90px {width:90px} .w-100px {width:100px} .w-110px {width:110px} .w-120px {width:120px} .w-130px {width:130px} .w-140px {width:140px} .w-150px {width:150px} .w-160px {width:160px} .w-180px {width:180px} .w-200px {width:200px} .w-300px {width:300px} .w-400px {width:400px} .w-500px {width:500px} .w-600px {width:600px} .w-700px {width:700px} .w-800px {width:800px} .w-900px {width:900px}
.mw-200px {max-width:200px} .mw-400px {max-width:400px} .mw-500px {max-width:500px} .mw-600px {max-width:600px} .mw-700px {max-width:700px} .mw-800px {max-width:800px} .mw-900px {max-width:900px}
.w-id {width:60px;} .w-pri {width:40px;} .w-severity {width:50px;} .w-hour {width:48px;} .w-date {width:80px;} .w-user {width:65px;} .w-status {width:55px} .w-type {width:80px} .w-resolution {width:60px}
@@ -34,12 +34,18 @@
/* Style of text */
.text-latin {font-family: Arial;}
.text-lg {font-size: 24px;}
.text-strong {font-weight: bold;}
.text-middle,.text-middle td {vertical-align: middle !important;}
tr.text-center > td, tr.text-center > th {text-align: center;}
tr.text-center > td.text-left, tr.text-center > th.text-left {text-align: left;}
tr.text-center > td.text-right, tr.text-center > th.text-right {text-align: right;}
tr.text-top td {vertical-align: top!important;}
/* === Components === */
/* Lable */
.label-badge {padding: 2px 6px}
/*small .label-badge, small.label-badge.small.label-badge {padding: 2px 4px}*/
/* hr */
hr.small {margin: 10px 0}
@@ -70,7 +76,7 @@ hr.small {margin: 10px 0}
.table tr.active td, .table-hover>tbody>tr.active:hover>td, .table-hover>tbody>tr.active:hover>th, .table-striped>tbody>tr.active:nth-child(odd).active>td, .table-striped>tbody>tr.active:nth-child(odd)>th {background-color: #FCE6A2}
.table caption {padding: 8px 20px; border-bottom: 1px solid #ddd; background: #fafafa;}
.table.table-condensed caption {padding: 6px 20px;}
.table.table-condensed caption {padding: 6px 15px;}
/* Datepicker */
.datepicker-wrapper {position: relative;}
@@ -101,6 +107,7 @@ i[class^="icon-"].disabled,i[class*=" icon-"].disabled,i[class^="icon-"].disable
.actionbox .btn-icon {background: #e5e5e5; color: #808080; border: 1px solid #ddd; padding: 0 1px; height: 20px; line-height: 18px}
.actionbox ol {padding-left: 25px; line-height: 20px}
.actionbox .alert {margin:2px 0 8px; padding: 5px 10px; min-height: 34px}
.actionbox #historyItem {margin:0}
/* zenicon */
.icon-green-testcase-createCase:before,.icon-green-story-createCase:before,.icon-green-task-create:before,
@@ -295,9 +302,9 @@ body {font-size: 12px; color:#141414;padding-bottom: 40px;}
#defaultMenu > ul > li:first-child, #moreMenu > ul > li:first-child, #searchResult > ul > li:first-child {margin-top: 10px; border-top: 1px dashed #ddd}
#defaultMenu > ul > li, #moreMenu > ul > li,#searchResult > ul > li {display: block; float: none; margin: 0 -15px; padding: 2px 10px; border-bottom: 1px dashed #ddd;}
#defaultMenu > ul > li:hover, #defaultMenu > .actions > a:hover, #moreMenu > ul > li:hover, #searchResult > ul > li:hover {background: #f1f1f1}
#defaultMenu > ul > li > a, #moreMenu > ul > li > a, #searchResult > ul > li > a {line-height: 24px}
#defaultMenu > ul > li > a, #moreMenu > ul > li > a, #searchResult > ul > li > a {line-height: 24px; display: block;}
#moreMenu > ul > li > a {color: #808080}
#defaultMenu > ul > li > a:hover, #moreMenu > ul > li > a:hover, #searchResult > ul > li > a:hover {background: none}
#defaultMenu > ul > li > a:hover, #moreMenu > ul > li > a:hover, #searchResult > ul > li > a:hover, #defaultMenu > ul > li.heading:hover {background: none}
#defaultMenu > .actions > a {display: block; text-align: right; margin: 0 -15px; padding-right: 15px; line-height: 30px}
#searchResult.show-more #defaultMenu > ul > li, #defaultMenu > .actions > a {border-right: 1px solid #ddd}
#defaultMenu > .actions > a > i, #defaultMenu > ul > li > a > i, #moreMenu > ul > li > a > i {font-size: 14px; display: inline-block; margin-right: 5px;}