Skip to content
This repository was archived by the owner on Nov 12, 2019. It is now read-only.

Commit 79b6841

Browse files
author
dMetzger
committed
// Back office theme "origins" looks a lot more like the old theme
1 parent 66962e5 commit 79b6841

12 files changed

+41
-35
lines changed

admin-dev/header.inc.php

+11-9
Original file line numberDiff line numberDiff line change
@@ -55,22 +55,24 @@
5555
<link rel="shortcut icon" href="'._PS_IMG_.'favicon.ico" />
5656
'.Module::hookExec('backOfficeHeader').'
5757
<!--[if IE]>
58+
<link type="text/css" rel="stylesheet" href="'._PS_CSS_DIR_.'admin-ie.css" />
59+
<![endif]-->
5860
<style type="text/css">
59-
fieldset {position:relative;padding-top:25px}
60-
legend {position:absolute;top:-0.5em;left:1.1em}
61+
div#header_infos, div#header_infos a#header_shopname, div#header_infos a#header_logout {
62+
color:'.(Tools::getBrightness(empty($employee->bo_color) ? '#FFFFFF' : $employee->bo_color) < 128 ? 'white' : '#383838').'
63+
}
6164
</style>
62-
<![endif]-->
6365
</head>
6466
<body '.((!empty($employee->bo_color))
65-
? 'style="background-color:'.Tools::htmlentitiesUTF8($employee->bo_color).'"'
66-
: 'style="background:#EFEFEF url(../img/admin/bg.png)"').'
67+
? 'style="background:'.Tools::htmlentitiesUTF8($employee->bo_color).'"'
68+
: '').'
6769
>
6870
<div id="top_container" />
6971
<div id="container">
70-
<div id="header_infos">
71-
<a id="header_shopname" href="index.php">'.Configuration::get('PS_SHOP_NAME').'</a><br />
72+
<div id="header_infos"><span>
73+
<a id="header_shopname" href="index.php"><span>'.Configuration::get('PS_SHOP_NAME').'</span></a><br />
7274
'.Tools::substr($employee->firstname, 0, 1).'.&nbsp;'.htmlentities($employee->lastname, ENT_COMPAT, 'UTF-8').'
73-
[ <a href="index.php?logout" id="header_logout">'.translate('logout').'</a> ]
75+
[ <a href="index.php?logout" id="header_logout"><span>'.translate('logout').'</span></a> ]</span>
7476
</div>
7577
<div id="header_search">
7678
<form method="post" action="index.php?tab=AdminSearch&token='.Tools::getAdminTokenLite('AdminSearch').'">
@@ -85,7 +87,7 @@
8587
<option value="4" '.(Tools::getValue('bo_search_type') == 4 ? 'selected="selected"' : '').'>'.translate('invoices').'</option>
8688
<option value="5" '.(Tools::getValue('bo_search_type') == 5 ? 'selected="selected"' : '').'>'.translate('carts').'</option>
8789
</select>
88-
<input type="submit" id="bo_search_submit" value="'.translate('Search').'"/>
90+
<input type="submit" id="bo_search_submit" class="button" value="'.translate('Search').'"/>
8991
</form>
9092
</div>
9193
<div id="header_quick">

admin-dev/themes/flashyturtle/admin.css

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
body{background:#EFEFEF url(../../../img/admin/bg.png)}
12
#top_container{background:url(bg-top.png) repeat-x 0 -60px;margin:0;padding:0}
2-
#header_infos{color:#FFF;float:left;font-size:10px;margin:10px 20px 4px 0;width:360px;height:43px}
3-
#header_infos #header_shopname{color:#FFF;font-size:24px;font-weight:700}
4-
#header_infos #header_logout{color:#FFF;text-decoration:underline}
3+
div#header_infos span{color:#FFF}
4+
#header_infos{float:left;font-size:10px;margin:10px 20px 4px 0;width:360px;height:43px}
5+
div#header_infos a#header_shopname span{color:#FFF;font-size:24px;font-weight:700}
6+
div#header_infos a#header_logout span{color:#FFF;text-decoration:underline}
57
#header_search{background:url(searchbar.png) no-repeat;float:right;height:39px;width:356px}
68
#header_search #bo_query{background:transparent;border:none;color:#FFF;float:left;height:16px;line-height:16px;margin:10px 0 0 30px;outline:0;vertical-align:middle;width:140px}
79
#header_search #bo_search_type{background:#ECECEC;border:#000;float:left;height:21px;line-height:21px;margin-top:9px;vertical-align:middle;width:90px}
@@ -23,9 +25,9 @@ a.button{padding:3px 15px;color:white;}
2325
.table tr td{border-bottom:1px solid #F0EADA;color:#963;font-size:.9em;height:23px;padding:0 4px 0 6px}
2426
.table tr.last td{border-bottom:none}
2527
.alt_row{background-color:#EFEFEF}
26-
.path_bar{background-color:#E2EBEE;border:1px solid #999;font-family:Trebuchet,Arial,Helvetica,sans-serif;font-size:13px;margin-bottom:20px;padding:5px}
28+
.path_bar{background-color:#E2EBEE;border:1px solid #999999;font-family:Trebuchet,Arial,Helvetica,sans-serif;font-size:13px;margin-bottom:20px;padding:5px}
2729
.path_bar a{font-weight:700}
28-
.cat_bar{background-color:#F4E8CD;border:1px solid #999;font-family:Trebuchet,Arial,Helvetica,sans-serif;font-size:12px;font-weight:700;margin-bottom:20px;padding:5px}
30+
.cat_bar{background-color:#F4E8CD;border:1px solid #999999;font-family:Trebuchet,Arial,Helvetica,sans-serif;font-size:12px;font-weight:700;margin-bottom:20px;padding:5px}
2931
.cat_bar a{font-weight:700}
3032
fieldset{background:#FFF;border:1px solid #8E8E8E;font-size:1.1em;margin:0;padding:1em}
3133
legend{background:#7AB51D url(thead.png) repeat-x top left;border:1px solid #364A14;font-weight:700;margin:0;padding:.2em .5em;text-align:left;color:#FFFFFF}

admin-dev/themes/origins/admin.css

+17-17
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
#top_container{background:url(bg-top.png) repeat-x 0 -60px;margin:0;padding:0}
2-
#header_infos{color:#FFF;float:left;font-size:10px;margin:10px 20px 4px 0;width:360px;height:43px}
3-
#header_infos #header_shopname{color:#FFF;font-size:24px;font-weight:700}
4-
#header_infos #header_logout{color:#FFF;text-decoration:underline}
5-
#header_search{background:url(searchbar.png) no-repeat;float:right;height:39px;width:356px}
6-
#header_search #bo_query{background:transparent;border:none;color:#FFF;float:left;height:16px;line-height:16px;margin:10px 0 0 30px;outline:0;vertical-align:middle;width:140px}
7-
#header_search #bo_search_type{background:#ECECEC;border:#000;float:left;height:21px;line-height:21px;margin-top:9px;vertical-align:middle;width:90px}
8-
#header_search #bo_search_submit{background:url(searchbutton.png) no-repeat;border:none;color:#000;cursor:pointer;float:left;font-size:10px;font-weight:700;height:24px;line-height:24px;margin:7px 0 0 2px;outline:0;padding-bottom:2px;width:79px}
9-
#header_search #bo_search_submit:hover{background-position:0 -24px}
10-
#header_quick{background:url(bg-quick.png) no-repeat;float:right;height:39px;margin-right:1px;width:175px}
11-
#header_quick #quick_select{background:#ECECEC;border:#000;height:21px;line-height:21px;margin:8px 0 0 30px;vertical-align:middle;width:140px}
12-
#header_myaccount{background:url(bg-lang.png) no-repeat;display:block;float:right;height:39px;margin-right:1px;width:39px}
1+
body{background:#EFEFEF}
2+
#top_container{margin:0;padding:0}
3+
#header_infos{float:left;font-size:10px;margin:10px 20px 4px 0;width:360px;height:43px}
4+
#header_infos #header_shopname{font-size:24px;font-weight:700}
5+
#header_infos #header_logout{text-decoration:underline}
6+
#header_search{float:right;height:39px;width:356px}
7+
#header_search #bo_query{float:left;height:16px;line-height:16px;margin:8px 2px 0 30px;vertical-align:middle;width:140px}
8+
#header_search #bo_search_type{float:left;height:21px;line-height:21px;margin:8px 2px 0 0;vertical-align:middle;width:90px}
9+
#header_search #bo_search_submit{cursor:pointer;float:left;font-weight:700;margin:7px 0 0 2px;width:79px}
10+
#header_quick{float:right;height:39px;margin-right:1px;width:175px}
11+
#header_quick #quick_select{margin:8px 0 0 20px;vertical-align:middle;width:140px}
12+
#header_myaccount{background:url(bg-lang.png) no-repeat;display:block;float:right;height:16px;margin:8px 1px 0 0;width:16px}
1313
.button{background-color:#FFF6D3;border:1px solid #DFD5AF;border-left:1px solid #FFF6D3;border-top:1px solid #FFF6D3;color:#268CCD;padding:3px}
1414
.button[disabled=disabled]{color:#8C8C8C}
1515
input.button[disabled=disabled]:hover{background-color:#FFF6D3}
@@ -21,19 +21,19 @@ input.button[disabled=disabled]:hover{background-color:#FFF6D3}
2121
.table tr td{border-bottom:1px solid #DEDEDE;color:#963;font-size:.9em;height:23px;padding:0 4px 0 6px}
2222
.table tr.last td{border-bottom:none}
2323
.alt_row{background-color:#EFEFEF}
24-
.path_bar{background-color:#E2EBEE;border:1px solid #999;font-family:Trebuchet,Arial,Helvetica,sans-serif;font-size:13px;margin-bottom:20px;padding:5px}
24+
.path_bar{background-color:#E2EBEE;border:1px solid #999999;font-family:Trebuchet,Arial,Helvetica,sans-serif;font-size:13px;margin-bottom:20px;padding:5px}
2525
.path_bar a{font-weight:700}
26-
.cat_bar{background-color:#F4E8CD;border:1px solid #999;font-family:Trebuchet,Arial,Helvetica,sans-serif;font-size:12px;font-weight:700;margin-bottom:20px;padding:5px}
26+
.cat_bar{background-color:#F4E8CD;border:1px solid #999999;font-family:Trebuchet,Arial,Helvetica,sans-serif;font-size:12px;font-weight:700;margin-bottom:20px;padding:5px}
2727
.cat_bar a{font-weight:700}
2828
fieldset{background:#FFFFF0;border:1px solid #DFD5C3;font-size:1.1em;margin:0;padding:1em}
2929
legend{background:#FFF6D3;border:1px solid #DFD5C3;font-weight:700;margin:0;padding:.2em .5em;text-align:left}
30-
#menu{float:left;height:35px;line-height:normal;margin:10px 0 0;*margin:7px 0 0;padding:0;width:100%;}
31-
#menu li{background:url(bg-tab.png) repeat-x 0 -2px;float:left;height:35px;list-style:none;margin:0 1px 0 0;list-style:none;display:block;-moz-border-radius-topright:6px;-moz-border-radius-topleft:6px;-webkit-border-top-right-radius:6px;-webkit-border-top-left-radius:6px}
30+
#menu{float:left;height:35px;line-height:normal;margin:10px 0 0;*margin:7px 0 0;padding:0;width:100%;padding:0 1px}
31+
#menu li{background:url(bg-tab.png) repeat-x 0 -2px;float:left;height:34px;list-style:none;margin:0 1px 0 0;list-style:none;display:block;border:1px solid #999999;-moz-border-radius-topright:6px;-moz-border-radius-topleft:6px;-webkit-border-top-right-radius:6px;-webkit-border-top-left-radius:6px}
3232
#menu li a{color:#000;display:block;height:20px;padding:6px 8px 4px 0}
3333
#menu img{display:inline;padding:0 3px 0 6px;vertical-align:top;width:16px;height:16px}
3434
#menu li.active{background-position:0 -38px;white-space:nowrap;}
3535
#menu li.active a{color:#000}
36-
#submenu{clear:both;color:#666;margin:0;height:38px;padding:0}
36+
#submenu{background:#ECEADE;clear:both;color:#666;margin:0;height:38px;padding:0;border:1px solid #999999}
3737
.withLeftBorder{background:transparent url(separator_subnav.png) no-repeat 0 5px}
3838
#submenu li{display:inline;list-style:none;margin:0;background:transparent url(separator_subnav.png) no-repeat right 0;padding-left:10px;padding-right:10px;margin-top:8px;float:left;height:20px}
3939
#submenu li a{text-decoration:underline}

admin-dev/themes/origins/bg-lang.png

-805 Bytes
Loading

admin-dev/themes/origins/bg-tab.png

-744 Bytes
Loading

admin-dev/themes/origins/bg-top.png

-9.28 KB
Binary file not shown.
1.51 KB
Loading
-930 Bytes
Binary file not shown.
52 Bytes
Loading
2.08 KB
Loading

classes/Tools.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -1080,10 +1080,10 @@ public static function toCamelCase($str, $capitaliseFirstChar = false) {
10801080
static public function getBrightness($hex)
10811081
{
10821082
$hex = str_replace('#', '', $hex);
1083-
$c_r = hexdec(substr($hex, 0, 2));
1084-
$c_g = hexdec(substr($hex, 2, 2));
1085-
$c_b = hexdec(substr($hex, 4, 2));
1086-
return (($c_r * 299) + ($c_g * 587) + ($c_b * 114)) / 1000;
1083+
$r = hexdec(substr($hex, 0, 2));
1084+
$g = hexdec(substr($hex, 2, 2));
1085+
$b = hexdec(substr($hex, 4, 2));
1086+
return (($r * 299) + ($g * 587) + ($b * 114)) / 1000;
10871087
}
10881088
static public function minifyHTMLpregCallback ($preg_matches)
10891089
{

css/admin-ie.css

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
fieldset {position:relative;padding-top:25px}
2+
fieldset legend {position:absolute;top:-0.5em;left:1.1em}

0 commit comments

Comments
 (0)