Skip to content

Commit

Permalink
* ajusted style of head part.
Browse files Browse the repository at this point in the history
  • Loading branch information
catouse committed Mar 13, 2014
1 parent 92e4b4a commit cfe5286
Show file tree
Hide file tree
Showing 10 changed files with 225 additions and 246 deletions.
2 changes: 1 addition & 1 deletion lib/front/front.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ public static function linkButton($label = '', $link = '', $target = 'self', $mi
$link .= $onlybody;
}

return " <input type='button' value='$label' $misc onclick='{$target}.location=\"$link\"' class='button-c' /> ";
return " <input type='button' value='$label' $misc onclick='{$target}.location=\"$link\"' class='btn' /> ";
}

/**
Expand Down
4 changes: 2 additions & 2 deletions module/common/lang/zh-cn.php
Original file line number Diff line number Diff line change
Expand Up @@ -356,8 +356,8 @@

$lang->zentaoSite = "官方网站";
$lang->chinaScrum = "<a href='http://api.zentao.net/goto.php?item=chinascrum' target='_blank'>Scrum社区</a>&nbsp; ";
$lang->agileTraining = "<a href='http://api.zentao.net/goto.php?item=agiletrain' target='_blank'>培训</a>&nbsp; ";
$lang->donate = "<a href='http://api.zentao.net/goto.php?item=donate' target='_blank'><i class='icon-heart'></i> 捐赠</a>&nbsp; ";
$lang->agileTraining = "<a href='http://api.zentao.net/goto.php?item=agiletrain' target='_blank'>培训</a> ";
$lang->donate = "<a href='http://api.zentao.net/goto.php?item=donate' target='_blank'>捐赠 </a>";
$lang->proVersion = "<a href='http://api.zentao.net/goto.php?item=proversion&from=footer' target='_blank' class='red'>购买专业版(特惠)!</a>&nbsp; ";
$lang->downNotify = "下载桌面提醒";

Expand Down
35 changes: 20 additions & 15 deletions module/common/model.php
Original file line number Diff line number Diff line change
Expand Up @@ -229,15 +229,21 @@ public static function printTopBar()
{
echo html::a(helper::createLink('user', 'login'), $lang->login);
}

echo '&nbsp;|&nbsp; ';
echo html::a(helper::createLink('misc', 'about'), $lang->aboutZenTao, '', "class='about'");
echo $lang->agileTraining;
echo $lang->donate;

echo '&nbsp;|&nbsp;';
echo html::select('', $app->config->langs, $app->cookie->lang, 'onchange="selectLang(this.value)"');
echo html::select('', $app->lang->themes, $app->cookie->theme, 'onchange="selectTheme(this.value)"');
echo "<div class='dropdown' id='langSelection'><a href='javascript:;' data-toggle='dropdown'>" . $app->config->langs[$app->cookie->lang] . " <span class='caret'></span></a><ul class='dropdown-menu pull-right'>";
foreach ($app->config->langs as $key => $value)
{
echo "<li" . ($app->cookie->lang == $key ? " class='active'" : '') . "><a href='javascript:;' data-value='" . $key . "'>" . $value . "</a></li>";
}
echo '</ul></div>';
echo "<div class='dropdown' id='themeSelection'><a href='javascript:;' data-toggle='dropdown'>" . $app->lang->themes[$app->cookie->theme] . " <span class='caret'></span></a><ul class='dropdown-menu pull-right'>";
foreach ($app->lang->themes as $key => $value)
{
echo "<li" . ($app->cookie->theme == $key ? " class='active'" : '') . "><a href='javascript:;' data-value='" . $key . "'>" . $value . "</a></li>";
}
echo '</ul></div>';
}

/**
Expand Down Expand Up @@ -306,7 +312,7 @@ public function setMobileMenu()
public static function printMainmenu($moduleName, $methodName = '')
{
global $app, $lang;
echo "<ul>\n";
echo "<ul class='nav'>\n";

/* Set the main main menu. */
$mainMenu = $moduleName;
Expand Down Expand Up @@ -354,7 +360,7 @@ public static function printMainmenu($moduleName, $methodName = '')
echo "<li $active><a href='$link' $active id='menu$menuKey'>$menuLabel</a></li>\n";
}
}

echo "</ul>\n";
}

/**
Expand Down Expand Up @@ -384,12 +390,11 @@ public static function printSearchBox()
$searchObject = $methodName;
}

echo "<li id='searchbox'>";
echo html::select('searchType', $lang->searchObjects, $searchObject);
echo html::input('searchQuery', $lang->searchTips, "onclick='this.value=\"\"' onkeydown='if(event.keyCode==13) shortcut()' class='w-80px'");
echo "<a href='javascript:shortcut();return false;' id='objectSwitcher' class='icon-circle-arrow-right'></a>";
echo "</li>";
echo "</ul>\n";
echo "<div class='input-group input-group-sm' id='searchbox'>";
echo html::select('searchType', $lang->searchObjects, $searchObject, "class='form-control'");
echo html::input('searchQuery', '', "onclick='this.value=\"\"' onkeydown='if(event.keyCode==13) shortcut()' class='form-control' placeholder='" . $lang->searchTips . "'");
echo "<div id='objectSwitcher' class='input-group-btn'><a href='javascript:shortcut();return false;' class='btn'><i class='icon-circle-arrow-right'></i></a></div>";
echo "</div>\n";
}

/**
Expand Down Expand Up @@ -442,7 +447,7 @@ public static function printModuleMenu($moduleName)
}

/* The beginning of the menu. */
echo "<ul>\n";
echo "<ul class='nav'>\n";

/* Cycling to print every sub menus. */
foreach($submenus as $subMenuKey => $submenu)
Expand Down
35 changes: 18 additions & 17 deletions module/common/view/header.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,27 @@
//include 'validation.html.php';
?>
<?php if(empty($_GET['onlybody']) or $_GET['onlybody'] != 'yes'):?>
<div id='header'>
<table class='cont navbar' id='topbar'>
<tr>
<td class='w-p50'>
<header id='header'>
<div id='topbar'>
<div class='pull-right' id='topnav'><?php commonModel::printTopBar();?></div>
<h5 id='companyname'>
<?php echo $app->company->name;?>
<small class='actions'>
<?php
echo "<span id='companyname'>{$app->company->name}</span> ";
if($app->company->website) echo html::a($app->company->website, $lang->company->website, '_blank');
if($app->company->backyard) echo html::a($app->company->backyard, $lang->company->backyard, '_blank');
if($app->company->backyard) echo html::a($app->company->backyard, $lang->company->backyard, '_blank');
?>
</td>
<td class='a-right'><?php commonModel::printTopBar();?></td>
</tr>
</table>
<table class='cont navbar' id='navbar'>
<tr><td id='mainmenu'><?php commonModel::printMainmenu($this->moduleName); commonModel::printSearchBox();?></td></tr>
</table>
</div>
<div class="navbar" id="modulemenu">
<?php commonModel::printModuleMenu($this->moduleName);?>
</div>
</small>
</h5>
</div>
<nav id='mainmenu'>
<?php commonModel::printMainmenu($this->moduleName); commonModel::printSearchBox();?>
</nav>
<nav id="modulemenu">
<?php commonModel::printModuleMenu($this->moduleName);?>
</nav>
</header>

<div id='wrap'>
<?php endif;?>
<div class='outer'>
4 changes: 1 addition & 3 deletions module/product/model.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,7 @@ public function select($products, $productID, $currentModule, $currentMethod, $e

setCookie("lastProduct", $productID, $this->config->cookieLife, $this->config->webRoot);
$currentProduct = $this->getById($productID);
$output = "<div id='currentItem'>";
$output .= "<a onclick=\"showDropMenu('product', '$productID', '$currentModule', '$currentMethod', '$extra')\">{$currentProduct->name}<span id='dropIcon'></span></a>";
$output .= "</div><div id='dropMenu'></div>";
$output .= "<a id='currentItem' href=\"javascript:showDropMenu('product', '$productID', '$currentModule', '$currentMethod', '$extra')\">{$currentProduct->name} <span class='icon-caret-down'></span></a><div id='dropMenu'></div>";
return $output;
}

Expand Down
98 changes: 48 additions & 50 deletions module/product/view/ajaxgetdropmenu.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,59 +2,57 @@
<?php js::set('module', $module);?>
<?php js::set('method', $method);?>
<?php js::set('extra', $extra);?>
<input type='text' class='gray' id='search' value='' onkeyup='searchItems(this.value, "product", productID, module, method, extra)' placeholder='<?php echo $this->app->loadLang('search')->search->common;?>' />
<input type='text' class='form-control' id='search' value='' onkeyup='searchItems(this.value, "product", productID, module, method, extra)' placeholder='<?php echo $this->app->loadLang('search')->search->common;?>'/>

<div id='resultList'>
<div id='searchResult'>
<div id='defaultMenu' class='f-left'>
<ul>
<?php
$iCharges = 0;
$others = 0;
$closeds = 0;
foreach($products as $product)
{
if($product->status == 'normal' and $product->PO == $this->app->user->account) $iCharges++;
if($product->status == 'normal' and !($product->PO == $this->app->user->account)) $others++;
if($product->status == 'closed') $closeds++;
}

if($iCharges and $others) echo "<span class='black'>{$lang->product->mine}</span>";
foreach($products as $product)
{
if($product->status == 'normal' and $product->PO == $this->app->user->account)
{
echo "<li>" . html::a(sprintf($link, $product->id), $product->name, '', "class='mine'"). "</li>";
}
}

if($iCharges and $others) echo "<span class='black'>{$lang->product->other}</span>";
$class = ($iCharges and $others) ? "class='other'" : '';
<div id='searchResult'>
<div id='defaultMenu'>
<ul>
<?php
$iCharges = 0;
$others = 0;
$closeds = 0;
foreach($products as $product)
{
if($product->status == 'normal' and $product->PO == $this->app->user->account) $iCharges++;
if($product->status == 'normal' and !($product->PO == $this->app->user->account)) $others++;
if($product->status == 'closed') $closeds++;
}

if($iCharges and $others) echo "<span class='black'>{$lang->product->mine}</span>";
foreach($products as $product)
{
if($product->status == 'normal' and $product->PO == $this->app->user->account)
{
echo "<li>" . html::a(sprintf($link, $product->id), "<i class='icon-cube'></i> " . $product->name, '', "class='mine'"). "</li>";
}
}

if($iCharges and $others) echo "<span class='black'>{$lang->product->other}</span>";
$class = ($iCharges and $others) ? "class='other'" : '';
foreach($products as $product)
{
if($product->status == 'normal' and !($product->PO == $this->app->user->account))
{
echo "<li>" . html::a(sprintf($link, $product->id), "<i class='icon-cube'></i> " . $product->name, '', "$class"). "</li>";
}
}
?>
</ul>

<?php if($closeds):?>
<div class='a-right'><a class='gray' id='more' onClick='switchMore()'><?php echo $lang->product->closed . ' <i class="icon-angle-right"></i>';?></a></div>
<?php endif;?>

</div>

<div id='moreMenu'>
<ul>
<?php
foreach($products as $product)
{
if($product->status == 'normal' and !($product->PO == $this->app->user->account))
{
echo "<li>" . html::a(sprintf($link, $product->id), $product->name, '', "$class"). "</li>";
}
if($product->status == 'closed') echo "<li>" . html::a(sprintf($link, $product->id), "<i class='icon-cube'></i> " . $product->name, '', "class='closed'"). "</li>";
}
?>
</ul>

<?php if($closeds):?>
<div class='a-right'><a class='gray' id='more' onClick='switchMore()'><?php echo $lang->product->closed;?></a></div>
<?php endif;?>

</div>

<div id='moreMenu' class='hidden f-left'>
<ul>
<?php
foreach($products as $product)
{
if($product->status == 'closed') echo "<li>" . html::a(sprintf($link, $product->id), $product->name, '', "class='closed'"). "</li>";
}
?>
</ul>
</div>
?>
</ul>
</div>
</div>
4 changes: 1 addition & 3 deletions module/project/model.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,7 @@ public function select($projects, $projectID, $currentModule, $currentMethod, $e

setCookie("lastProject", $projectID, $this->config->cookieLife, $this->config->webRoot);
$currentProject = $this->getById($projectID);
$output = "<div id='currentItem'>";
$output .= "<a onclick=\"showDropMenu('project', '$projectID', '$currentModule', '$currentMethod', '$extra')\">{$currentProject->name}<span id='dropIcon'></span></a>";
$output .= "</div><div id='dropMenu'></div>";
$output .= "<a id='currentItem' href=\"javascript:showDropMenu('project', '$projectID', '$currentModule', '$currentMethod', '$extra')\">{$currentProject->name} <span class='icon-caret-down'></span></a><div id='dropMenu'></div>";
return $output;
}

Expand Down
96 changes: 46 additions & 50 deletions module/project/view/ajaxgetdropmenu.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,59 +2,55 @@
<?php js::set('module', $module);?>
<?php js::set('method', $method);?>
<?php js::set('extra', $extra);?>
<input type='text' class='gray' id='search' value='' onkeyup='searchItems(this.value, "project", projectID, module, method, extra)' placeholder='<?php echo $this->app->loadLang('search')->search->common;?>' />
<input type='text' class='form-control' id='search' value='' onkeyup='searchItems(this.value, "project", projectID, module, method, extra)' placeholder='<?php echo $this->app->loadLang('search')->search->common;?>'/>

<div id='resultList'>
<div id='searchResult'>
<div id='defaultMenu' class='f-left'>
<ul>
<?php
$iCharges = 0;
$others = 0;
$dones = 0;
foreach($projects as $project)
{
if($project->status != 'done' and $project->PM == $this->app->user->account) $iCharges++;
if($project->status != 'done' and !($project->PM == $this->app->user->account)) $others++;
if($project->status == 'done') $dones++;
}

if($iCharges and $others) echo "<span class='black'>{$lang->project->mine}</span>";
foreach($projects as $project)
{
if($project->status != 'done' and $project->PM == $this->app->user->account)
{
echo "<li>" . html::a(sprintf($link, $project->id), $project->name). "</li>";
}
}

if($iCharges and $others) echo "<span class='black'>{$lang->project->other}</span>";
$class = ($iCharges and $others) ? "class='other'" : '';
<div id='searchResult'>
<div id='defaultMenu'>
<ul>
<?php
$iCharges = 0;
$others = 0;
$dones = 0;
foreach($projects as $project)
{
if($project->status != 'done' and $project->PM == $this->app->user->account) $iCharges++;
if($project->status != 'done' and !($project->PM == $this->app->user->account)) $others++;
if($project->status == 'done') $dones++;
}

if($iCharges and $others) echo "<span class='black'>{$lang->project->mine}</span>";
foreach($projects as $project)
{
if($project->status != 'done' and $project->PM == $this->app->user->account)
{
echo "<li>" . html::a(sprintf($link, $project->id), "<i class='icon-folder-close-alt'></i> " . $project->name). "</li>";
}
}

if($iCharges and $others) echo "<span class='black'>{$lang->project->other}</span>";
$class = ($iCharges and $others) ? "class='other'" : '';
foreach($projects as $project)
{
if($project->status != 'done' and !($project->PM == $this->app->user->account))
{
echo "<li>" . html::a(sprintf($link, $project->id), "<i class='icon-folder-close-alt'></i> " . $project->name, '', "$class"). "</li>";
}
}
?>
</ul>

<?php if($dones):?>
<div class='actions'><a id='more' href='javascript:switchMore()'><?php echo $lang->project->doneProjects . ' <i class="icon-angle-right"></i>';?></a></div>
<?php endif;?>
</div>
<div id='moreMenu'>
<ul>
<?php
foreach($projects as $project)
{
if($project->status != 'done' and !($project->PM == $this->app->user->account))
{
echo "<li>" . html::a(sprintf($link, $project->id), $project->name, '', "$class"). "</li>";
}
if($project->status == 'done') echo "<li>" . html::a(sprintf($link, $project->id), "<i class='icon-folder-close-alt'></i> " . $project->name, '', "class='done'"). "</li>";
}
?>
</ul>

<?php if($dones):?>
<div class='a-right'><a id='more' onClick='switchMore()'><?php echo $lang->project->doneProjects . '&raquo;';?></a></div>
<?php endif;?>

</div>

<div id='moreMenu' class='hidden f-left'>
<ul>
<?php
foreach($projects as $project)
{
if($project->status == 'done') echo "<li>" . html::a(sprintf($link, $project->id), $project->name, '', "class='done'"). "</li>";
}
?>
</ul>
</div>
?>
</ul>
</div>
</div>
Loading

0 comments on commit cfe5286

Please sign in to comment.