Merge branch 'bootstrap' of https://github.com/PrestaShop/PrestaShop into bootstrap

This commit is contained in:
Jerome Nadaud
2013-11-04 19:50:48 +01:00
19 changed files with 901 additions and 5606 deletions
-1
View File
@@ -37,7 +37,6 @@ echo '
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="robots" content="NOFOLLOW, NOINDEX" />
<link type="text/css" rel="stylesheet" href="'._PS_JS_DIR_.'jquery/ui/themes/base/jquery.ui.datepicker.css" />
<link type="text/css" rel="stylesheet" href="'._PS_CSS_DIR_.'admin.css" />
<link type="text/css" rel="stylesheet" href="'._PS_JS_DIR_.'jquery/plugins/cluetip/jquery.cluetip.css" />
<link type="text/css" rel="stylesheet" href="themes/'.Context::getContext()->employee->bo_theme.'/css/backward/admin.css" />
<link type="text/css" rel="stylesheet" href="'._PS_JS_DIR_.'jquery/plugins/chosen/jquery.chosen.css" />
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,49 @@
#nobootstrap a {
line-height: normal; }
#nobootstrap .categorieList a {
line-height: 20px; }
#nobootstrap p {
line-height: normal; }
#nobootstrap legend {
font-size: 13px;
line-height: 20px;
width: auto !important; }
#nobootstrap label {
font-size: 13px;
display: inline;
line-height: normal; }
#nobootstrap .breadcrumb {
padding: 0; }
#nobootstrap select, #nobootstrap textarea, #nobootstrap input {
height: auto !important;
font-size: 12px !important;
line-height: normal;
margin-bottom: auto;
font-family: Arial, Verdana, Helvetica, sans-serif;
margin-bottom: 0 !important;
width: auto; }
#nobootstrap label, #nobootstrap input, #nobootstrap button, #nobootstrap select, #nobootstrap textarea {
font-size: 12px;
line-height: 13px; }
#nobootstrap input[type="radio"], #nobootstrap input[type="checkbox"] {
margin: 0; }
#nobootstrap input[type="text"] {
height: 14px !important; }
#nobootstrap table.table {
margin: 0;
padding: 0;
width: 100%;
border-collapse: collapse; }
#nobootstrap table.widthfull {
width: 100%; }
#nobootstrap .table th, #nobootstrap .table td {
line-height: normal;
vertical-align: middle;
border-top: none; }
#nobootstrap #header #header_search #bo_search_submit {
height: 25px !important; }
#nobootstrap [class^="icon-"], #nobootstrap [class*=" icon-"] {
width: auto; }
#nobootstrap .toolbarBox [class^="process-icon-"], #nobootstrap .toolbarBox [class*=" process-icon-"] {
text-indent: -9000px;
overflow: hidden; }
@@ -14,7 +14,7 @@
display: inline
line-height: normal
.breadcrumb
padding:0
padding: 0
li
line-height:normal
select, textarea, input
@@ -1,75 +0,0 @@
.path_bar {display:none;}
/*toolbarBox*/
.toolbarBox { background-color: #F8F8F8; border: 1px solid #CCCCCC; margin-bottom:10px; padding: 10px 0; border-radius:3px; -moz-border-radius:3px; -webkit-border-radius:3px;}
.toolbarBox .pageTitle { margin-left:10px; line-height:48px}
.toolbarBox .pageTitle h3 {font-size: 2em; font-weight: bold; line-height: 48px; margin: 0; padding: 0}
.toolbarBox ul.cc_button {float:right;margin:0;padding:0}
.toolbarBox ul.cc_button li {color: #666666; float: left; height: 48px; list-style: none outside none; padding: 1px 1px 3px 4px; text-align: center}
.toolbarBox a.toolbar_btn { border-width: 1px;font-size:11px;cursor: pointer; display: block; float: left; padding: 1px 5px; white-space: nowrap; text-shadow: 0 1px 0 #ffffff}
.toolbarBox a.toolbar_btn:hover {}
.toolbarBox .toolbar_btn span{ display: block;float: none;height: 32px;margin: 0 auto;width: 32px}
.toolbarBox .process-icon-delete { background-image: url('../img/process-icon-delete.png')}
.toolbarBox .process-icon-duplicate { background-image: url('../img/process-icon-duplicate.png')}
.toolbarBox .process-icon-preview { background-image: url('../img/process-icon-preview.png')}
.toolbarBox .process-icon-stats { background-image: url('../img/process-icon-stats.png')}
.toolbarBox .process-icon-cancel { background-image: url('../img/process-icon-cancel.png')}
.toolbarBox .process-icon-new, .toolbarBox .process-icon-newAttributes{ background-image: url('../img/process-icon-new.png')}
.toolbarBox .process-icon-save, .toolbarBox .process-icon-save-settings { background-image: url('../img/process-icon-save.png')}
.toolbarBox .process-icon-save-and-stay { background-image: url('../img/process-icon-save-and-stay.png')}
.toolbarBox .process-icon-edit { background-image: url('../img/process-icon-edit.png')}
.toolbarBox .process-icon-back { background-image: url('../img/process-icon-back.png')}
.toolbarBox .process-icon-refresh-index { background-image: url('../img/process-icon-refresh-index.png')}
.toolbarBox .process-icon-refresh-cache { background-image: url('../img/process-icon-refresh-cache.png')}
.toolbarBox .process-icon-save-calendar { background-image: url('../img/process-icon-save-calendar.png')}
.toolbarBox .process-icon-new-module { background-image: url('../img/process-icon-new-module.png')}
.toolbarBox .process-icon-new-module-addon { background-image: url('../img/process-icon-new-module-addon.png')}
div.fix-toolbar {border-bottom: 1px solid #E0E0E0;position:fixed;top:0;opacity:0.9;z-index:1}
/*FILTER MODULE*/
.filter-module { background-color:#ebedf4; border:1px solid #c2c4d9; padding:10px; display:block; min-height:35px;}
.filter-module #filternameForm {float:left; margin-right:30px;}
.filter-module label {width:auto;}
.filter-module .select-filter { float:left;}
.filter-module .button-filter { float:right;}
/*SIDEBAR*/
.sidebar { position:relative; float:left; width:220px; display:inline;}
.sidebar h3 { background-color:#ebedf4; font-weight:bold; display:block; padding:5px;}
.sidebar .subHeadline { font-weight:bold; float:right; margin-top:-28px; margin-right:5px;}
.sidebar ul.categorieList {}
.sidebar ul.categorieList li { border-top:1px solid #ccc; position:relative; line-height:20px;}
.sidebar ul.categorieList li:first-child { border-top:none;}
.sidebar ul.categorieList li a {color:#3a6ea7;}
.sidebar ul.categorieList li div.categorieWidth { text-indent:5px; overflow:hidden;}
.sidebar ul.categorieList li div.count{ position:absolute; top:0; right:5px;}
/*MODULECONTAINER*/
#moduleContainer { margin-left:220px; padding:13px 0 0 20px;}
#moduleContainer .table tr th { height:40px;}
#moduleContainer .table tr td { font-size:12px; vertical-align:top; padding: 5px 7px 0; border-top:1px solid #ccc; border-bottom:none;}
#moduleContainer .table tr:first-child {border-top:1px solid #ccc}
#moduleContainer .table tr:hover { background-color:#FFF1B5;}
#moduleContainer .moduleDesc { font-size:12px; position:relative; margin-bottom:10px;}
#moduleContainer .moduleDesc h3 { color:#3A6EA7; margin:0;}
#moduleContainer .moduleDesc .metadata { float:left; display:block; margin:5px 0;}
#moduleContainer .moduleDesc .metadata dl { float:left; margin:0; padding-right:10px;}
#moduleContainer .moduleDesc .metadata dl dt, .moduleDesc .metadata dl dd { float:left; margin:0; padding:0;}
#moduleContainer .moduleDesc .metadata dl dd { padding-right:10px;}
#moduleContainer .moduleDesc .metadata dl dt { font-weight:bold; padding-right:5px;}
#moduleContainer .moduleDesc p.desc { color:#666; font-size:12px; display:block; clear:both;}
#moduleContainer .setup {background-color:#6db300; font-size:10px; color:#fff; text-transform:uppercase; position:relative; left:10px; padding:0px 4px; display: inline-block; border-radius:3px;}
#moduleContainer .setup.non-install { border: solid 1px #ec7000; background-color: #ffedb1; color: #ec7000}
#moduleContainer .setup.must-have { background-color: #ec7000;}
#moduleContainer .setup.off{ background-color:#ccc;}
#moduleContainer .row-actions-module span { padding-right:5px;}
#moduleContainer .row-actions-module span a { font-size:12px;}
#moduleContainer .button.uninstalled,
#moduleContainer .button.installed { float:right; display: inline-block; margin-top:15px; font-size:12px;}
#moduleContainer .button.updated { margin-top:15px; display: inline-block; font-size:12px;}
#list-action-button{width:175px}
#list-action-button li{margin-left:10px;display: inline;float: left;}
#moduleContainer .moduleName {font-size:12px; color:#3A6EA7;font-weight:bold;}
#moduleContainer .moduleFavDesc { font-family:Georgia; font-style:italic; color:#666;}
@@ -157,7 +157,7 @@ $(function() {
<tbody>
{foreach $addons key=key item=addon}
<tr>
<td><a href="{$addon.href|escape:'htmlall':'UTF-8'}" target="_blank"><strong>{$addon.title|escape:'htmlall':'UTF-8'}</strong></a></td>
<td><a href="{$addon.href|escape:'htmlall':'UTF-8'}" target="_blank"><strong><i class="icon-external-link-sign"></i> {$addon.title|escape:'htmlall':'UTF-8'}</strong></a></td>
<td><a href="{$addon.href|escape:'htmlall':'UTF-8'}" target="_blank">{$addon.description|truncate:256:'...'|escape:'htmlall':'UTF-8'}</a></td>
</tr>
{/foreach}
+8 -10
View File
@@ -1923,18 +1923,16 @@ class AdminControllerCore extends Controller
$admin_webpath = str_ireplace(_PS_ROOT_DIR_, '', _PS_ADMIN_DIR_);
$admin_webpath = preg_replace('/^'.preg_quote(DIRECTORY_SEPARATOR, '/').'/', '', $admin_webpath);
// Deprecated stylesheets
if (!$this->bootstrap)
{
$this->addCSS(_PS_CSS_DIR_.'admin.css', 'all');
$this->addCSS(__PS_BASE_URI__.$admin_webpath.'/themes/'.$this->bo_theme.'/css/backward/admin.css', 'all');
}
//Bootstrap v3.00 + Specific Admin Theme
//Bootstrap v3.01 + Specific Admin Theme
$this->addCSS(__PS_BASE_URI__.$admin_webpath.'/themes/'.$this->bo_theme.'/css/admin-theme.css', 'all');
// Reset bootstrap style for the #nobootstrap field - Backward compatibility
$this->addCSS(_PS_CSS_DIR_.'bootstrap_admin_reset.css', 'all');
// Deprecated stylesheets + reset bootstrap style for the #nobootstrap field - Backward compatibility
if (!$this->bootstrap)
{
$this->addCSS(__PS_BASE_URI__.$admin_webpath.'/themes/'.$this->bo_theme.'/css/backward/admin.css', 'all');
$this->addCSS(__PS_BASE_URI__.$admin_webpath.'/themes/'.$this->bo_theme.'/css/backward/bootstrap_admin_reset.css', 'all');
}
if ($this->context->language->is_rtl)
$this->addCSS(_THEME_CSS_DIR_.'rtl.css');
@@ -303,7 +303,8 @@ class AdminDashboardControllerCore extends AdminController
'date_to' => $this->context->employee->stats_date_to,
'compare_from' => $this->context->employee->stats_compare_from,
'compare_to' => $this->context->employee->stats_compare_to,
'dashboard_use_push' => (int)Tools::getValue('dashboard_use_push')
'dashboard_use_push' => (int)Tools::getValue('dashboard_use_push'),
'extra' => (int)Tools::getValue('extra')
);
die(Tools::jsonEncode(Hook::exec('dashboardData', $params, $id_module, true, true, (int)Tools::getValue('dashboard_use_push'))));
@@ -115,7 +115,7 @@ class AdminEmployeesControllerCore extends AdminController
$path = _PS_ADMIN_DIR_.'/themes/';
foreach (scandir($path) as $theme)
if ($theme[0] != '.' && is_dir($path.$theme) && (file_exists($path.$theme.'/css/admin.css') || file_exists($path.$theme.'/css/admin-theme.css')))
if ($theme[0] != '.' && is_dir($path.$theme) && (file_exists($path.$theme.'/css/admin-theme.css')))
$this->themes[] = $theme;
$home_tab = Tab::getInstanceFromClassName('AdminDashboard', $this->context->language->id);
-2060
View File
File diff suppressed because it is too large Load Diff
-2672
View File
File diff suppressed because it is too large Load Diff
-86
View File
@@ -1,86 +0,0 @@
#nobootstrap a {
line-height:normal;
}
#nobootstrap .categorieList a {
line-height:20px;
}
#nobootstrap p {
line-height:normal;
}
#nobootstrap legend {
font-size:13px;
line-height:20px;
width:auto!important;
}
#nobootstrap label {
font-size:13px;
display:inline;
line-height:normal;
}
#nobootstrap .breadcrumb {
padding:0;
}
#nobootstrap li {
line-height:normal;
}
#nobootstrap select,#nobootstrap textarea, #nobootstrap input {
height:auto!important;
font-size:12px!important;
line-height:normal;
margin-bottom:auto;
font-family:Arial,Verdana,Helvetica,sans-serif;
margin-bottom:0!important;
width:auto;
}
#nobootstrap label, #nobootstrap input, #nobootstrap button, #nobootstrap select, #nobootstrap textarea {
font-size:12px;
line-height:13px;
}
#nobootstrap input[type="radio"],#nobootstrap input[type="checkbox"] {
margin:0;
}
#nobootstrap input[type="text"] {
height:14px!important;
}
#nobootstrap table.table {
margin:0;
padding:0;
width:100%;
border-collapse: collapse;
}
#nobootstrap table.widthfull {
width:100%;
}
#nobootstrap .table thead th {
vertical-align:top;
}
#nobootstrap .table th,#nobootstrap .table td {
line-height:normal;
vertical-align:middle;
border-top:none;
}
#nobootstrap #header #header_search #bo_search_submit {
height:25px!important;
}
#nobootstrap [class^="icon-"], #nobootstrap [class*=" icon-"] { width: auto}
#nobootstrap .toolbarBox [class^="process-icon-"], #nobootstrap .toolbarBox [class*=" process-icon-"] {
text-indent: -9000px;
overflow: hidden
}
+3 -18
View File
@@ -31,7 +31,6 @@ $(document).ready( function () {
$(".preactivationLink").click(function() {
preactivationLinkClick($(this).attr("rel"));
});
refreshDashboard(false, false);
getBlogRss();
@@ -40,7 +39,7 @@ $(document).ready( function () {
});
function refreshDashboard(module_name, use_push)
function refreshDashboard(module_name, use_push, extra)
{
module_list = new Array();
@@ -72,7 +71,8 @@ function refreshDashboard(module_name, use_push)
ajax:true,
action:'refreshDashboard',
module:module_list[module_id],
dashboard_use_push:Number(use_push)
dashboard_use_push:Number(use_push),
extra:extra
},
dataType: 'json',
success : function(widgets){
@@ -82,9 +82,6 @@ function refreshDashboard(module_name, use_push)
if (parseInt(dashboard_use_push) == 1)
refreshDashboard(false, true);
},
error : function(data){
//@TODO display errors
}
});
}
@@ -108,9 +105,6 @@ function setDashboardDateRange(action)
}
else
$('#datepickerFrom, #datepickerTo').parent('.input-group').addClass('has-error');
},
error : function(data){
//@TODO display errors
}
});
}
@@ -218,9 +212,6 @@ function getBlogRss()
else {
$('.dash_news').hide();
}
},
error : function(data){
//@TODO display errors
}
});
}
@@ -280,9 +271,6 @@ function saveDashConfig(widget_name)
refreshDashboard(widget_name);
toggleDashConfig(widget_name);
}
},
error : function(data){
//@TODO display errors
}
});
}
@@ -300,9 +288,6 @@ function preactivationLinkClick(module)
type: 'POST',
success : function(jsonData){
},
error : function(data){
//@TODO display errors
}
});
}
@@ -0,0 +1,36 @@
<?php
/*
* 2007-2013 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2013 PrestaShop SA
* @version Release: $Revision: 13573 $
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
class DashGoalsAjaxModuleAdminController extends ModuleAdminController
{
public function initContent()
{
parent::initContent();
die ('Todo');
}
}
+6 -7
View File
@@ -111,16 +111,15 @@ class Dashgoals extends Module
public function hookDashboardData($params)
{
return array('data_chart' => array('dash_goals_chart1' => $this->getChartData()));
$year = ((isset($params['extra']) && $params['extra'] > 1970 && $params['extra'] < 2999) ? $params['extra'] : date('Y'));
return array('data_chart' => array('dash_goals_chart1' => $this->getChartData($year)));
}
public function getChartData()
public function getChartData($year)
{
$year = date('Y');
$visits = AdminStatsController::getVisits(false, date('Y-01-01'), date('Y-12-31'), 'month');
$orders = AdminStatsController::getOrders(date('Y-01-01'), date('Y-12-31'), 'month');
$sales = AdminStatsController::getTotalSales(date('Y-01-01'), date('Y-12-31'), 'month');
$visits = AdminStatsController::getVisits(false, $year.date('-01-01'), $year.date('-12-31'), 'month');
$orders = AdminStatsController::getOrders($year.date('-01-01'), $year.date('-12-31'), 'month');
$sales = AdminStatsController::getTotalSales($year.date('-01-01'), $year.date('-12-31'), 'month');
$stream1 = array('key' => $this->l('Traffic'), 'values' => array());
$stream2 = array('key' => $this->l('Conversion Rate'), 'values' => array());
+22
View File
@@ -28,6 +28,28 @@ function dashgoals_calc_sales()
});
}
function dashgoals_changeYear(xward)
{
var new_year = dashgoals_year;
if (xward == 'forward')
new_year = dashgoals_year + 1;
else if (xward == 'backward')
new_year = dashgoals_year - 1;
$('#dashgoals_title').text($('#dashgoals_title').text().replace(dashgoals_year, new_year));
dashgoals_year = new_year;
refreshDashboard('dashgoals', false, dashgoals_year);
}
function dashgoals_changeConfYear(xward)
{
// Todo
// getModuleLink('dashgoals', 'ajax', array('year' => $('#dashgoals_conftitle').text()), $ssl = null, $id_lang = null, $id_shop = null)
if (xward == 'forward')
$('#dashgoals_conftitle').text(parseInt($('#dashgoals_conftitle').text()) + 1);
else if (xward == 'backward')
$('#dashgoals_conftitle').text(parseInt($('#dashgoals_conftitle').text()) - 1);
}
$(document).ready(function() {
$('.dashgoals_config_input').keyup(function() {
dashgoals_calc_sales();
@@ -28,16 +28,20 @@
var currency_sign = '{$currency->sign|addslashes}';
var currency_blank = {$currency->blank|intval};
var priceDisplayPrecision = 0;
var dashgoals_year = {$goals_year|intval};
</script>
<section id="dashgoals" class="panel widget">
<header class="panel-heading">
<i class="icon-bar-chart"></i> {l s='Goals' mod='dashgoals'}
<i class="icon-bar-chart"></i> <span id="dashgoals_title">{l s='Your %s Forecast' mod='dashgoals' sprintf=$goals_year}</span>
<a href="javascript:void(0);" onclick="dashgoals_changeYear('backward');" class="icon-backward"></a>
<a href="javascript:void(0);" onclick="dashgoals_changeYear('forward');" class="icon-forward"></a>
<span class="panel-heading-action">
<a class="list-toolbar-btn" href="javascript:toggleDashConfig('dashgoals');" title="configure">
<a class="list-toolbar-btn" href="javascript:void(0);" onclick="toggleDashConfig('dashgoals');" title="configure">
<i class="process-icon-configure"></i>
</a>
<a class="list-toolbar-btn" href="#" onclick="refreshDashboard('dashgoals');" title="refresh">
<a class="list-toolbar-btn" href="javascript:void(0);" onclick="refreshDashboard('dashgoals');" title="refresh">
<i class="process-icon-refresh"></i>
</a>
</span>
@@ -48,7 +52,11 @@
<table class="table table-condensed table-striped table-bordered">
<thead>
<tr>
<th>{$goals_year}</th>
<th>
<a href="javascript:void(0);" onclick="dashgoals_changeConfYear('backward');" class="icon-backward"></a>
<span id="dashgoals_conftitle">{$goals_year}</span>
<a href="javascript:void(0);" onclick="dashgoals_changeConfYear('forward');" class="icon-forward"></a>
</th>
<th>{l s='Traffic' mod='dashgoals'}</th>
<th>{l s='Conversion Rate' mod='dashgoals'}</th>
<th>{l s='Average Cart Value' mod='dashgoals'}</th>
+9 -11
View File
@@ -22,14 +22,12 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
$(document).ready(function() {
$('input.validate, textarea.validate').on('keyup', function() {
if ($(this).hasClass('is_required') || $(this).val().length)
{
if (window['validate_'+$(this).attr('data-validate')]($(this).val()))
$(this).parent().removeClass('form-error').addClass('form-ok');
else
$(this).parent().addClass('form-error').removeClass('form-ok');
}
});
});
$(document).on('keyup', 'input.validate, textarea.validate', function() {
if ($(this).hasClass('is_required') || $(this).val().length)
{
if (window['validate_'+$(this).attr('data-validate')]($(this).val()))
$(this).parent().removeClass('form-error').addClass('form-ok');
else
$(this).parent().addClass('form-error').removeClass('form-ok');
}
});