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

Conflicts:
	admin-dev/themes/default/js/admin-theme.js
This commit is contained in:
Kevin Granger committed 2013-10-11 11:28:44 +02:00
commit b61528057a
12 files changed
+137 -122

No files matched your search

+30 -1
View File
@@ -129,5 +129,34 @@ $( document ).ready(function() {
$(window).scroll(function() { $(window).scroll(function() {
animateGoTop(); animateGoTop();
}); });
animateGoTop();
}); });
function openModulesList() {
if (!modules_list_loaded)
{
$.ajax({
type: "POST",
url : admin_modules_link,
async: true,
data : {
ajax : "1",
controller : "AdminModules",
action : "getTabModulesList",
tab_modules_list : tab_modules_list,
back_tab_modules_list : window.location.href
},
success : function(data)
{
$('#modules_list_container_tab').html(data).slideDown();
$('#modules_list_loader').hide();
modules_list_loaded = true;
}
});
}
else
{
$('#modules_list_container_tab').slideDown();
$('#modules_list_loader').hide();
}
return false;
}
@@ -1,4 +1,28 @@
{include file='controllers/modules/header.tpl'} {*
* 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
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
{include file='controllers/modules/top.tpl'}
<div class="panel"> <div class="panel">
<div class="panel-heading"> <div class="panel-heading">
<i class="icon-list-ul"></i> <i class="icon-list-ul"></i>
@@ -22,28 +22,7 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*} *}
{include file='controllers/modules/top.tpl'}
{$kpis}
<div class="page-head">
<h2 class="page-title">
{l s='List of modules'}
</h2>
<div class="page-bar toolbarBox">
<div class="btn-toolbar">
<ul class="cc_button nav nav-pills pull-right">
{if $add_permission eq '1'}
<li>
<a id="desc-module-new" class="toolbar_btn" href="#top_container" onclick="$('#module_install').slideToggle();" title="{l s='Add a new module'}">
<i class="process-icon-new-module" ></i>
<div>{l s='Add a new module'}</div>
</a>
</li>
{/if}
</ul>
</div>
</div>
</div>
{if $add_permission eq '1'} {if $add_permission eq '1'}
<div id="module_install" class="row" style="{if !isset($smarty.post.downloadflag)}display: none;{/if}"> <div id="module_install" class="row" style="{if !isset($smarty.post.downloadflag)}display: none;{/if}">
@@ -0,0 +1,45 @@
{*
* 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
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
{$kpis}
<div class="page-head">
<h2 class="page-title">
{l s='List of modules'}
</h2>
<div class="page-bar toolbarBox">
<div class="btn-toolbar">
<ul class="cc_button nav nav-pills pull-right">
{if $add_permission eq '1'}
<li>
<a id="desc-module-new" class="toolbar_btn" href="#top_container" onclick="$('#module_install').slideToggle();" title="{l s='Add a new module'}">
<i class="process-icon-new-module" ></i>
<div>{l s='Add a new module'}</div>
</a>
</li>
{/if}
</ul>
</div>
</div>
</div>
+6 -3
View File
@@ -32,15 +32,18 @@
<a href="http://www.prestashop.com/" target="_blank">PrestaShop&trade; {$ps_version}</a> - <span>{l s='Load time: '} {number_format(microtime(true) - $timer_start, 3, '.', '')}s</span> <a href="http://www.prestashop.com/" target="_blank">PrestaShop&trade; {$ps_version}</a> - <span>{l s='Load time: '} {number_format(microtime(true) - $timer_start, 3, '.', '')}s</span>
</div> </div>
<div class="col-sm-2 hidden-xs social-networks"> <div class="col-sm-2 hidden-xs social-networks">
<a class="link-social link-twitter" href="https://twitter.com/PrestaShop" title="Twitter"> <a class="link-social link-twitter" href="https://twitter.com/PrestaShop" target="_blank" title="Twitter">
<i class="icon-twitter"></i> <i class="icon-twitter"></i>
</a> </a>
<a class="link-social link-facebook" href="https://www.facebook.com/prestashop" title="Facebook"> <a class="link-social link-facebook" href="https://www.facebook.com/prestashop" target="_blank" title="Facebook">
<i class="icon-facebook"></i> <i class="icon-facebook"></i>
</a> </a>
<a class="link-social link-github" href="https://github.com/PrestaShop/PrestaShop/" title="Github"> <a class="link-social link-github" href="https://github.com/PrestaShop/PrestaShop/" target="_blank" title="Github">
<i class="icon-github"></i> <i class="icon-github"></i>
</a> </a>
<a class="link-social link-google" href="https://plus.google.com/communities/106282122101569374397" target="_blank" title="Google">
<i class="icon-google-plus"></i>
</a>
</div> </div>
<div class="col-sm-5"> <div class="col-sm-5">
@@ -72,6 +72,8 @@
var currentIndex = '{$currentIndex}'; var currentIndex = '{$currentIndex}';
var default_language = '{$default_language|intval}'; var default_language = '{$default_language|intval}';
var choose_language_translate = "{l s='Choose language' slashes=1}"; var choose_language_translate = "{l s='Choose language' slashes=1}";
var admin_modules_link = '{$link->getAdminLink("AdminModules")|addslashes}';
var tab_modules_list = '{if isset($tab_modules_list) && $tab_modules_list}{$tab_modules_list|addslashes}{/if}';
</script> </script>
{/if} {/if}
{if isset($css_files)} {if isset($css_files)}
@@ -68,8 +68,7 @@
if (btn_submit.html().length > 0) if (btn_submit.html().length > 0)
lbl_save.find('span').html(btn_submit.html()); lbl_save.find('span').html(btn_submit.html());
if (btn_save_and_stay.length > 0) if (btn_save_and_stay.length > 0) {
{
//get reference on current save link label //get reference on current save link label
lbl_save_and_stay = $('#page-header-desc-{$table}-save-and-stay'); lbl_save_and_stay = $('#page-header-desc-{$table}-save-and-stay');
@@ -100,12 +99,10 @@
return false; return false;
}); });
if (btn_save_and_stay) if (btn_save_and_stay) {
{
btn_save_and_stay.click(function() { btn_save_and_stay.click(function() {
//add hidden input to emulate submit button click when posting the form -> field name posted //add hidden input to emulate submit button click when posting the form -> field name posted
btn_submit.before('<input type="hidden" name="'+btn_submit.attr("name")+'AndStay" value="1" />'); btn_submit.before('<input type="hidden" name="'+btn_submit.attr("name")+'AndStay" value="1" />');
$('#{$table}_form').submit(); $('#{$table}_form').submit();
return false; return false;
}); });
@@ -113,47 +110,17 @@
{/block} {/block}
} }
{if isset($tab_modules_open)} {if isset($tab_modules_open) && $tab_modules_open}
if ({$tab_modules_open}) $('#modules_list_container').modal('show');
openModulesList(); openModulesList();
{/if} {/if}
}); });
{if isset($tab_modules_list)}
$('.process-icon-modules-list').parent('a').unbind().bind('click', function (){
openModulesList();
});
function openModulesList() {if isset($tab_modules_list)}
{ $('.process-icon-modules-list').parent('a').unbind().bind('click', function (){
$('#modules_list_container').modal('show'); $('#modules_list_container').modal('show');
if (!modules_list_loaded) openModulesList();
{ });
$.ajax({
type: "POST",
url : '{$admin_module_ajax_url}',
async: true,
data : {
ajax : "1",
controller : "AdminModules",
action : "getTabModulesList",
tab_modules_list : '{$tab_modules_list}',
back_tab_modules_list : '{$back_tab_modules_list}'
},
success : function(data)
{
$('#modules_list_container_tab').html(data).slideDown();
$('#modules_list_loader').hide();
modules_list_loaded = true;
}
});
}
else
{
$('#modules_list_container_tab').slideDown();
$('#modules_list_loader').hide();
}
return false;
}
{/if} {/if}
//]]> //]]>
</script> </script>
+9 -44
View File
@@ -46,7 +46,7 @@
{/foreach} {/foreach}
</ul> </ul>
<script language="javascript" type="text/javascript"> <script type="text/javascript">
//<![CDATA[ //<![CDATA[
var submited = false var submited = false
var modules_list_loaded = false; var modules_list_loaded = false;
@@ -71,16 +71,12 @@
if (btn_save_and_stay.length > 0) if (btn_save_and_stay.length > 0)
{ {
//get reference on current save link label //get reference on current save link label
lbl_save_and_stay = $('#desc-{$table}-save-and-stay div'); lbl_save_and_stay = $('#desc-{$table}-save-and-stay div');
//override save and stay link label with submit button value //override save and stay link label with submit button value
if (btn_submit.val().length > 0 && lbl_save_and_stay && !lbl_save_and_stay.hasClass('locked')) if (btn_submit.val().length > 0 && lbl_save_and_stay && !lbl_save_and_stay.hasClass('locked'))
{
lbl_save_and_stay.html(btn_submit.val() + " {l s='and stay'} "); lbl_save_and_stay.html(btn_submit.val() + " {l s='and stay'} ");
}
} }
//hide standard submit button //hide standard submit button
@@ -117,47 +113,16 @@
} }
{/block} {/block}
} }
{if isset($tab_modules_open)} {if isset($tab_modules_open) && $tab_modules_open}
if ({$tab_modules_open}) $('#modules_list_container').slideDown();
openModulesList(); openModulesList();
{/if} {/if}
}); });
{if isset($tab_modules_list)} {if isset($tab_modules_list) && $tab_modules_list}
$('.process-icon-modules-list').parent('a').unbind().bind('click', function (){ $('.process-icon-modules-list').parent('a').unbind().bind('click', function (){
openModulesList(); $('#modules_list_container').slideDown();
}); openModulesList();
});
function openModulesList()
{
$('#modules_list_container').slideDown();
if (!modules_list_loaded)
{
$.ajax({
type: "POST",
url : '{$admin_module_ajax_url}',
async: true,
data : {
ajax : "1",
controller : "AdminModules",
action : "getTabModulesList",
tab_modules_list : '{$tab_modules_list}',
back_tab_modules_list : '{$back_tab_modules_list}'
},
success : function(data)
{
$('#modules_list_container_tab').html(data).slideDown();
$('#modules_list_loader').hide();
modules_list_loaded = true;
}
});
}
else
{
$('#modules_list_container_tab').slideDown();
$('#modules_list_loader').hide();
}
return false;
}
{/if} {/if}
//]]> //]]>
</script> </script>
+4 -3
View File
@@ -139,13 +139,14 @@ class Autoload
else else
{ {
$filename_tmp = tempnam(dirname($filename), basename($filename.'.')); $filename_tmp = tempnam(dirname($filename), basename($filename.'.'));
if($filename_tmp !== FALSE and file_put_contents($filename_tmp, $content, LOCK_EX) !== FALSE) if ($filename_tmp !== false AND file_put_contents($filename_tmp, $content, LOCK_EX) !== false)
{ {
@rename($filename_tmp, $filename); if (!@rename($filename_tmp, $filename))
unlink($filename_tmp);
@chmod($filename, 0666); @chmod($filename, 0666);
} }
// $filename_tmp couldn't be written. $filename should be there anyway (even if outdated), no need to die.
else else
// $filename_tmp couldn't be written. $filename should be there anyway (even if outdated), no need to die.
error_log('Cannot write temporary file '.$filename_tmp); error_log('Cannot write temporary file '.$filename_tmp);
} }
$this->index = $classes; $this->index = $classes;
+1 -1
View File
@@ -64,7 +64,7 @@ class EmployeeCore extends ObjectModel
public $bo_width; public $bo_width;
/** @var bool, false */ /** @var bool, false */
public $bo_menu; public $bo_menu = 1;
/* Deprecated */ /* Deprecated */
public $bo_show_screencast = false; public $bo_show_screencast = false;
+1 -1
View File
@@ -724,7 +724,7 @@ CREATE TABLE `PREFIX_employee` (
`bo_theme` varchar(32) default NULL, `bo_theme` varchar(32) default NULL,
`default_tab` int(10) unsigned NOT NULL DEFAULT 0, `default_tab` int(10) unsigned NOT NULL DEFAULT 0,
`bo_width` int(10) unsigned NOT NULL DEFAULT 0, `bo_width` int(10) unsigned NOT NULL DEFAULT 0,
`bo_menu` tinyint(1) NOT NULL default '0', `bo_menu` tinyint(1) NOT NULL default '1',
`active` tinyint(1) unsigned NOT NULL default '0', `active` tinyint(1) unsigned NOT NULL default '0',
`id_last_order` int(10) unsigned NOT NULL default '0', `id_last_order` int(10) unsigned NOT NULL default '0',
`id_last_customer_message` int(10) unsigned NOT NULL default '0', `id_last_customer_message` int(10) unsigned NOT NULL default '0',
+3 -3
View File
@@ -3,8 +3,8 @@ SET NAMES 'utf8';
INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES('PS_DASHBOARD_USE_PUSH', '0', NOW(), NOW()); INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES('PS_DASHBOARD_USE_PUSH', '0', NOW(), NOW());
UPDATE `PREFIX_configuration` SET `value` = 'graphnvd3' WHERE `name` = 'PS_STATS_RENDER'; UPDATE `PREFIX_configuration` SET `value` = 'graphnvd3' WHERE `name` = 'PS_STATS_RENDER';
ALTER TABLE `PREFIX_employee` CHANGE `bo_show_screencast` `bo_menu` TINYINT(1) NOT NULL DEFAULT '0'; ALTER TABLE `PREFIX_employee` CHANGE `bo_show_screencast` `bo_menu` TINYINT(1) NOT NULL DEFAULT '1';
UPDATE `PREFIX_employee` SET bo_menu = 0; UPDATE `PREFIX_employee` SET bo_menu = 1;
CREATE TABLE `PREFIX_configuration_kpi` ( CREATE TABLE `PREFIX_configuration_kpi` (
`id_configuration_kpi` int(10) unsigned NOT NULL auto_increment, `id_configuration_kpi` int(10) unsigned NOT NULL auto_increment,
@@ -30,4 +30,4 @@ CREATE TABLE `PREFIX_configuration_kpi_lang` (
/* PHP:ps1600_add_missing_index(); */; /* PHP:ps1600_add_missing_index(); */;
UPDATE `PREFIX_configuration` SET `value`='-' WHERE `name`='PS_ATTRIBUTE_ANCHOR_SEPARATOR'; UPDATE `PREFIX_configuration` SET `value`='-' WHERE `name` = 'PS_ATTRIBUTE_ANCHOR_SEPARATOR';