// Replaced screencast option by menu option
This commit is contained in:
@@ -144,15 +144,6 @@ if (Tools::isSubmit('submitTrackClickOnHelp'))
|
|||||||
HelpAccess::trackClick($label, $version);
|
HelpAccess::trackClick($label, $version);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Tools::isSubmit('toggleScreencast'))
|
|
||||||
{
|
|
||||||
if (Validate::isLoadedObject($context->employee))
|
|
||||||
{
|
|
||||||
$context->employee->bo_show_screencast = !$context->employee->bo_show_screencast;
|
|
||||||
$context->employee->update();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Tools::isSubmit('getChildrenCategories') && Tools::isSubmit('id_category_parent'))
|
if (Tools::isSubmit('getChildrenCategories') && Tools::isSubmit('id_category_parent'))
|
||||||
{
|
{
|
||||||
$children_categories = Category::getChildrenWithNbSelectedSubCat(Tools::getValue('id_category_parent'), Tools::getValue('selectedCat'), Context::getContext()->language->id, null, Tools::getValue('use_shop_context'));
|
$children_categories = Category::getChildrenWithNbSelectedSubCat(Tools::getValue('id_category_parent'), Tools::getValue('selectedCat'), Context::getContext()->language->id, null, Tools::getValue('use_shop_context'));
|
||||||
|
|||||||
@@ -23,110 +23,51 @@
|
|||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*}
|
*}
|
||||||
|
|
||||||
<div class="pageTitleHome">
|
<div class="pageTitleHome">
|
||||||
<span><h3>{l s='Dashboard'}</h3></span>
|
<span><h3>{l s='Dashboard'}</h3></span>
|
||||||
</div>
|
</div>
|
||||||
<div id="dashboard">
|
<div id="dashboard">
|
||||||
<div id="homepage">
|
<div id="homepage">
|
||||||
|
|
||||||
|
<div id="column_left">
|
||||||
<div id="column_left">
|
{if $upgrade}
|
||||||
{if $upgrade}
|
<div id="blockNewVersionCheck">
|
||||||
<div id="blockNewVersionCheck">
|
{if $upgrade->need_upgrade}
|
||||||
{if $upgrade->need_upgrade}
|
<div class="warning warn" style="margin-bottom:10px;"><h3>{l s='A new version of PrestaShop is available.'} : <a style="text-decoration: underline;" href="{$upgrade->link}" target="_blank">{l s='Download'} {$upgrade->version_name}</a> !</h3></div>
|
||||||
<div class="warning warn" style="margin-bottom:10px;"><h3>{l s='A new version of PrestaShop is available.'} : <a style="text-decoration: underline;" href="{$upgrade->link}" target="_blank">{l s='Download'} {$upgrade->version_name}</a> !</h3></div>
|
|
||||||
{/if}
|
|
||||||
</div>
|
|
||||||
{else}
|
|
||||||
<p>{l s='Update notifications are unavailable'}</p>
|
|
||||||
<p> </p>
|
|
||||||
<p>{l s='To receive PrestaShop update warnings, you need to activate you account. '} <b>allow_url_fopen</b> [<a href="http://www.php.net/manual/{$isoUser}/ref.filesystem.php">{l s='more info on php.net'}</a>]</p>
|
|
||||||
<p>{l s='If you don\'t know how to do this, please contact your hosting provider!'}</p><br />
|
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{if $employee->bo_show_screencast}
|
|
||||||
<div id="adminpresentation" style="display:block">
|
|
||||||
<h2>{l s='Video'}</h2>
|
|
||||||
<div id="video">
|
|
||||||
<a href="{$protocol}://screencasts.prestashop.com/v1.5/screencast.php?iso_lang={$isoUser}" id="screencast_fancybox"><img height="128" width="220" src="../img/admin/preview_fr.jpg" /><span class="mask-player"></span></a>
|
|
||||||
</div>
|
|
||||||
<div id="video-content">
|
|
||||||
<p>{l s='Take part in the e-commerce adventure with PrestaShop, the best open-source shopping-cart solution on the planet. With more than 310 native features, PrestaShop comes fully equipped to help create a world of opportunity without limits. '}</p>
|
|
||||||
</div>
|
|
||||||
<div id="footer_iframe_home">
|
|
||||||
<!--<a href="#">{l s='View more video tutorials.'}</a>-->
|
|
||||||
<input type="checkbox" id="screencast_dont_show_again">
|
|
||||||
<label for="screencast_dont_show_again">{l s='Do not show me this again.'}</label>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="separation"></div>
|
{else}
|
||||||
</div>
|
<p>{l s='Update notifications are unavailable'}</p>
|
||||||
<script type="text/javascript">
|
<p> </p>
|
||||||
$(document).ready(function() {
|
<p>{l s='To receive PrestaShop update warnings, you need to activate you account. '} <b>allow_url_fopen</b> [<a href="http://www.php.net/manual/{$isoUser}/ref.filesystem.php">{l s='more info on php.net'}</a>]</p>
|
||||||
$('#screencast_dont_show_again').click(function() {
|
<p>{l s='If you don\'t know how to do this, please contact your hosting provider!'}</p><br />
|
||||||
if ($(this).is(':checked'))
|
|
||||||
{
|
|
||||||
$.ajax({
|
|
||||||
type : 'POST',
|
|
||||||
data : {
|
|
||||||
ajax : '1',
|
|
||||||
controller : 'AdminHome',
|
|
||||||
token : '{$token}',
|
|
||||||
id_employee : '{$employee->id}',
|
|
||||||
action : 'hideScreencast'
|
|
||||||
},
|
|
||||||
url: 'ajax-tab.php',
|
|
||||||
dataType : 'json',
|
|
||||||
success: function(data) {
|
|
||||||
if (!data)
|
|
||||||
jAlert("TECHNICAL ERROR - no return status found");
|
|
||||||
else if (data.status != "ok")
|
|
||||||
jAlert("TECHNICAL ERROR: "+data.msg);
|
|
||||||
|
|
||||||
$('#adminpresentation').slideUp('slow');
|
|
||||||
|
|
||||||
},
|
|
||||||
error: function(data, textStatus, errorThrown)
|
|
||||||
{
|
|
||||||
jAlert("TECHNICAL ERROR: "+data);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<h2>{l s='Quick links'}</h2>
|
<h2>{l s='Quick links'}</h2>
|
||||||
<ul class="F_list clearfix">
|
<ul class="F_list clearfix">
|
||||||
{foreach from=$quick_links key=k item=link}
|
{foreach from=$quick_links key=k item=link}
|
||||||
<li id="{$k}_block">
|
<li id="{$k}_block">
|
||||||
<a href="{$link.href}">
|
<a href="{$link.href}">
|
||||||
<h4>{$link.title}</h4>
|
<h4>{$link.title}</h4>
|
||||||
<p>{$link.description}</p>
|
<p>{$link.description}</p>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
{hook h="displayAdminHomeQuickLinks"}
|
{hook h="displayAdminHomeQuickLinks"}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<div id="partner_preactivation">
|
<div id="partner_preactivation">
|
||||||
<p class="center"><img src="../img/loader.gif" alt="" /></p>
|
<p class="center"><img src="../img/loader.gif" alt="" /></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="separation"></div>
|
<div class="separation"></div>
|
||||||
|
|
||||||
|
|
||||||
{$tips_optimization}
|
{$tips_optimization}
|
||||||
<div id="discover_prestashop"><p class="center"><img src="../img/loader.gif" alt="" />{l s='Loading...'}</p></div>
|
<div id="discover_prestashop"><p class="center"><img src="../img/loader.gif" alt="" />{l s='Loading...'}</p></div>
|
||||||
|
|
||||||
{hook h="displayAdminHomeInfos"}
|
{hook h="displayAdminHomeInfos"}
|
||||||
{hook h="displayBackOfficeHome"} {*old name of the hook*}
|
{hook h="displayBackOfficeHome"} {*old name of the hook*}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="column_right">
|
<div id="column_right">
|
||||||
<h2>{l s='Your Information'}</h2>
|
<h2>{l s='Your Information'}</h2>
|
||||||
{$monthly_statistics}
|
{$monthly_statistics}
|
||||||
{$customers_service}
|
{$customers_service}
|
||||||
{$stats_sales}
|
{$stats_sales}
|
||||||
@@ -137,7 +78,7 @@ $(document).ready(function() {
|
|||||||
</div>
|
</div>
|
||||||
<div class="clear"> </div>
|
<div class="clear"> </div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
@@ -218,27 +159,5 @@ $(document).ready(function() {
|
|||||||
$('#discover_prestashop').fadeOut('slow');
|
$('#discover_prestashop').fadeOut('slow');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$('#screencast_fancybox').bind('click', function(event)
|
|
||||||
{
|
|
||||||
$.fancybox(
|
|
||||||
this.href,
|
|
||||||
{
|
|
||||||
'width' : 660,
|
|
||||||
'height' : 384,
|
|
||||||
'transitionIn' : 'none',
|
|
||||||
'transitionOut' : 'none',
|
|
||||||
'type' : 'iframe',
|
|
||||||
'scrolling' : 'no',
|
|
||||||
'onComplete' : function()
|
|
||||||
{
|
|
||||||
// Rewrite some css properties of Fancybox
|
|
||||||
$('#fancybox-wrap').css('width', '');
|
|
||||||
$('#fancybox-content').css('background-color', '');
|
|
||||||
$('#fancybox-content').css( 'border', '');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
event.preventDefault();
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -63,8 +63,11 @@ class EmployeeCore extends ObjectModel
|
|||||||
/** @var integer employee desired screen width */
|
/** @var integer employee desired screen width */
|
||||||
public $bo_width;
|
public $bo_width;
|
||||||
|
|
||||||
/** @var bool, true */
|
/** @var bool, false */
|
||||||
public $bo_show_screencast;
|
public $bo_menu;
|
||||||
|
|
||||||
|
/* Deprecated */
|
||||||
|
public $bo_show_screencast = false;
|
||||||
|
|
||||||
/** @var boolean Status */
|
/** @var boolean Status */
|
||||||
public $active = 1;
|
public $active = 1;
|
||||||
@@ -90,7 +93,7 @@ class EmployeeCore extends ObjectModel
|
|||||||
'default_tab' => array('type' => self::TYPE_INT, 'validate' => 'isInt'),
|
'default_tab' => array('type' => self::TYPE_INT, 'validate' => 'isInt'),
|
||||||
'bo_theme' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'size' => 32),
|
'bo_theme' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'size' => 32),
|
||||||
'bo_width' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'),
|
'bo_width' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'),
|
||||||
'bo_show_screencast' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'),
|
'bo_menu' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'),
|
||||||
'stats_date_from' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'),
|
'stats_date_from' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'),
|
||||||
'stats_date_to' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'),
|
'stats_date_to' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -234,22 +234,21 @@ class AdminEmployeesControllerCore extends AdminController
|
|||||||
'hint' => $this->l('Back Office theme')
|
'hint' => $this->l('Back Office theme')
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'type' => 'switch',
|
'type' => 'radio',
|
||||||
'label' => $this->l('Show screencast at login:'),
|
'label' => $this->l('Display admin menu:'),
|
||||||
'name' => 'bo_show_screencast',
|
'name' => 'bo_menu',
|
||||||
'hint' => $this->l('Display the welcome video in the Admin panel dashboard at log in.'),
|
|
||||||
'required' => false,
|
'required' => false,
|
||||||
'is_bool' => true,
|
'is_bool' => true,
|
||||||
'values' => array(
|
'values' => array(
|
||||||
array(
|
array(
|
||||||
'id' => 'bo_show_screencast_on',
|
'id' => 'bo_menu_on',
|
||||||
'value' => 1,
|
'value' => 0,
|
||||||
'label' => $this->l('Enabled')
|
'label' => $this->l('Top')
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'id' => 'bo_show_screencast_off',
|
'id' => 'bo_menu_off',
|
||||||
'value' => 0,
|
'value' => 1,
|
||||||
'label' => $this->l('Disabled')
|
'label' => $this->l('Left')
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -491,9 +491,6 @@ class AdminHomeControllerCore extends AdminController
|
|||||||
$isoCountry = Context::getContext()->country->iso_code;
|
$isoCountry = Context::getContext()->country->iso_code;
|
||||||
$stream_context = @stream_context_create(array('http' => array('method'=> 'GET', 'timeout' => 2)));
|
$stream_context = @stream_context_create(array('http' => array('method'=> 'GET', 'timeout' => 2)));
|
||||||
|
|
||||||
// SCREENCAST
|
|
||||||
$result['screencast'] = 'OK';
|
|
||||||
|
|
||||||
// PREACTIVATION
|
// PREACTIVATION
|
||||||
$result['partner_preactivation'] = $this->getBlockPartners();
|
$result['partner_preactivation'] = $this->getBlockPartners();
|
||||||
|
|
||||||
@@ -510,20 +507,6 @@ class AdminHomeControllerCore extends AdminController
|
|||||||
$this->content = Tools::jsonEncode($result);
|
$this->content = Tools::jsonEncode($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function ajaxProcessHideScreencast()
|
|
||||||
{
|
|
||||||
if ($employee = new Employee((int)Tools::getValue('id_employee')))
|
|
||||||
{
|
|
||||||
$employee->bo_show_screencast = 0;
|
|
||||||
if ($employee->save())
|
|
||||||
$this->content = '{"status":"ok"}';
|
|
||||||
else
|
|
||||||
$this->content = '{"status":"error","msg":"not saved"}';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
$this->content = '{"status":"error", "msg":"employee does not exists"}';
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getBlockPartners()
|
public function getBlockPartners()
|
||||||
{
|
{
|
||||||
// Init var
|
// Init var
|
||||||
|
|||||||
@@ -702,7 +702,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_show_screencast` tinyint(1) NOT NULL default '1',
|
`bo_menu` tinyint(1) NOT NULL default '0',
|
||||||
`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',
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
SET NAMES 'utf8';
|
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());
|
||||||
|
|
||||||
|
ALTER TABLE `PREFIX_employee` CHANGE `bo_show_screencast` `bo_menu` TINYINT(1) NOT NULL DEFAULT '0';
|
||||||
|
UPDATE `PREFIX_employee` SET bo_menu = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user