// Multishop interface reworked
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 632 B |
Binary file not shown.
|
After Width: | Height: | Size: 565 B |
Binary file not shown.
|
After Width: | Height: | Size: 781 B |
Binary file not shown.
|
After Width: | Height: | Size: 649 B |
@@ -0,0 +1,42 @@
|
||||
{*
|
||||
* 2007-2012 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-2012 PrestaShop SA
|
||||
* @version Release: $Revision: 14740 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
{if $toolbar_btn}
|
||||
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn toolbar_scroll=$toolbar_scroll title=$title}
|
||||
{/if}
|
||||
|
||||
<div class="multishop-left">
|
||||
<div class="multishop-title">{l s='Multishop tree'}</div>
|
||||
{include file="controllers/shop/tree.tpl" selected_tree_id=$selected_tree_id}
|
||||
</div>
|
||||
<div class="multishop-right">{$content}</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$().ready(function(){
|
||||
if (parseInt($('.multishop-right').css('height')) > 200)
|
||||
$('.multishop-left').css('height', $('.multishop-right').css('height'));
|
||||
})
|
||||
</script>
|
||||
@@ -25,13 +25,6 @@
|
||||
*}
|
||||
{extends file="helpers/form/form.tpl"}
|
||||
|
||||
{block name="label"}
|
||||
{if $input.type == 'text' && $input.name == 'name'}
|
||||
<div class="hint" name="help_box" style="display:block;">{l s='You can\'t change the shop group when you have more than one Shop'}</div><br />
|
||||
{/if}
|
||||
{$smarty.block.parent}
|
||||
{/block}
|
||||
|
||||
{block name="input"}
|
||||
{if $input.type == 'theme'}
|
||||
{foreach $input.values as $theme}
|
||||
@@ -43,7 +36,7 @@
|
||||
{/foreach}
|
||||
<div class="clear"> </div>
|
||||
{elseif $input.type == 'textShopGroup'}
|
||||
{$input.value}
|
||||
<p style="color: #000000; padding: 0px; font-size: 12px; margin-top: 4px;">{$input.value}</p>
|
||||
{else}
|
||||
{if $input.type == 'select' && $input.name == 'id_category'}
|
||||
<script type="text/javascript">
|
||||
|
||||
@@ -27,8 +27,12 @@
|
||||
{extends file="helpers/list/list_content.tpl"}
|
||||
|
||||
{block name="td_content"}
|
||||
{if $key == 'url' && !isset($tr.$key)}
|
||||
<a href="{$link->getAdminLink('AdminShopUrl')}&id_shop={$tr.$identifier}&addshop_url" class="multishop_warning">{l s='Click here to set an URL for this shop'}</a>
|
||||
{if $key == 'url'}
|
||||
{if isset($tr.$key)}
|
||||
<a href="{$tr.$key}" onmouseover="$(this).css('text-decoration', 'underline')" onmouseout="$(this).css('text-decoration', 'none')">{$tr.$key}</a>
|
||||
{else}
|
||||
<a href="{$link->getAdminLink('AdminShopUrl')}&id_shop={$tr.$identifier}&addshop_url" class="multishop_warning">{l s='Click here to set an URL for this shop'}</a>
|
||||
{/if}
|
||||
{else}
|
||||
{$smarty.block.parent}
|
||||
{/if}
|
||||
|
||||
@@ -0,0 +1,216 @@
|
||||
{*
|
||||
* 2007-2012 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-2012 PrestaShop SA
|
||||
* @version Release: $Revision: 14740 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
<ul id="multishop-tree">
|
||||
</ul>
|
||||
|
||||
<script type="text/javascript">
|
||||
function check_selected_tree_node(d)
|
||||
{
|
||||
{if isset($selected_tree_id)}
|
||||
$.each(d, function(k, v)
|
||||
{
|
||||
if (v.attr.id == '{$selected_tree_id}')
|
||||
{
|
||||
setTimeout(function()
|
||||
{
|
||||
$('#{$selected_tree_id}').children('a').addClass('selected');
|
||||
}, 100);
|
||||
}
|
||||
|
||||
if (v.children)
|
||||
{
|
||||
check_selected_tree_node(v.children);
|
||||
}
|
||||
});
|
||||
{/if}
|
||||
}
|
||||
|
||||
function customMenu(node)
|
||||
{
|
||||
var node_id = node.attr('id');
|
||||
|
||||
// Click on a group
|
||||
if (new RegExp(/^tree-group-[0-9]+$/).exec(node_id))
|
||||
{
|
||||
var id = node_id.substr(11);
|
||||
return {
|
||||
"edit_shop_group" : {
|
||||
"separator_before" : false,
|
||||
"separator_after" : true,
|
||||
"label" : "{l s='Edit this shop group'}",
|
||||
"icon" : "../img/admin/edit.gif",
|
||||
"action" : function (obj){
|
||||
location.href = '{$link->getAdminLink('AdminShopGroup')}&updateshop_group&id_shop_group='+id;
|
||||
}
|
||||
},
|
||||
"add_shop_group" : {
|
||||
"separator_before" : false,
|
||||
"separator_after" : false,
|
||||
"label" : "{l s='Add new shop group'}",
|
||||
"icon" : "../img/admin/add.gif",
|
||||
"action" : function (obj){
|
||||
location.href = '{$link->getAdminLink('AdminShopGroup')}&addshop_group';
|
||||
}
|
||||
},
|
||||
"add_shop" : {
|
||||
"separator_before" : false,
|
||||
"separator_after" : true,
|
||||
"label" : "{l s='Add new shop'}",
|
||||
"icon" : "../img/admin/add.gif",
|
||||
"action" : function (obj){
|
||||
location.href = '{$link->getAdminLink('AdminShop')}&addshop&id_shop_group='+id;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
// Click on a shop
|
||||
else if (new RegExp(/^tree-shop-[0-9]+$/).exec(node_id))
|
||||
{
|
||||
var id = node_id.substr(10);
|
||||
var id_parent = node.parent().parent().attr('id').substr(11);
|
||||
return {
|
||||
"edit_shop" : {
|
||||
"separator_before" : false,
|
||||
"separator_after" : true,
|
||||
"label" : "{l s='Edit this shop'}",
|
||||
"icon" : "../img/admin/edit.gif",
|
||||
"action" : function (obj){
|
||||
location.href = '{$link->getAdminLink('AdminShop')}&updateshop&id_shop='+id;
|
||||
}
|
||||
},
|
||||
"add_shop" : {
|
||||
"separator_before" : false,
|
||||
"separator_after" : false,
|
||||
"label" : "{l s='Add new shop'}",
|
||||
"icon" : "../img/admin/add.gif",
|
||||
"action" : function (obj){
|
||||
location.href = '{$link->getAdminLink('AdminShop')}&addshop&id_shop_group='+id_parent;
|
||||
}
|
||||
},
|
||||
"add_url" : {
|
||||
"separator_before" : false,
|
||||
"separator_after" : true,
|
||||
"label" : "{l s='Add new URL'}",
|
||||
"icon" : "../img/admin/add.gif",
|
||||
"action" : function (obj){
|
||||
location.href = '{$link->getAdminLink('AdminShopUrl')}&addshop_url&id_shop='+id;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
// Click on an URL
|
||||
else if (new RegExp(/^tree-url-[0-9]+$/).exec(node_id))
|
||||
{
|
||||
var id = node_id.substr(9);
|
||||
var id_parent = node.parent().parent().attr('id').substr(10);
|
||||
return {
|
||||
"edit_url" : {
|
||||
"separator_before" : false,
|
||||
"separator_after" : true,
|
||||
"label" : "{l s='Edit this URL'}",
|
||||
"icon" : "../img/admin/edit.gif",
|
||||
"action" : function (obj){
|
||||
location.href = '{$link->getAdminLink('AdminShopUrl')}&updateshop_url&id_shop_url='+id;
|
||||
}
|
||||
},
|
||||
"add_url" : {
|
||||
"separator_before" : false,
|
||||
"separator_after" : true,
|
||||
"label" : "{l s='Add new URL'}",
|
||||
"icon" : "../img/admin/add.gif",
|
||||
"action" : function (obj){
|
||||
location.href = '{$link->getAdminLink('AdminShopUrl')}&addshop_url&id_shop='+id_parent;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
// Click on root node
|
||||
else
|
||||
{
|
||||
return {
|
||||
"add_shop_group" : {
|
||||
"separator_before" : false,
|
||||
"separator_after" : false,
|
||||
"label" : "{l s='Add new shop group'}",
|
||||
"icon" : "../img/admin/add.gif",
|
||||
"action" : function (obj){
|
||||
location.href = '{$link->getAdminLink('AdminShopGroup')}&addshop_group';
|
||||
}
|
||||
},
|
||||
"add_shop" : {
|
||||
"separator_before" : false,
|
||||
"separator_after" : true,
|
||||
"label" : "{l s='Add new shop'}",
|
||||
"icon" : "../img/admin/add.gif",
|
||||
"action" : function (obj){
|
||||
location.href = '{$link->getAdminLink('AdminShop')}&addshop';
|
||||
}
|
||||
},
|
||||
"add_url" : {
|
||||
"separator_before" : false,
|
||||
"separator_after" : true,
|
||||
"label" : "{l s='Add new URL'}",
|
||||
"icon" : "../img/admin/add.gif",
|
||||
"action" : function (obj){
|
||||
location.href = '{$link->getAdminLink('AdminShopUrl')}&addshop_url';
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
$("#multishop-tree").jstree({
|
||||
'plugins': ["themes","json_data","cookies","contextmenu"],
|
||||
'json_data': {
|
||||
'ajax': {
|
||||
'url': "{$link->getAdminLink('AdminShop')}",
|
||||
'data': function(n)
|
||||
{
|
||||
return {
|
||||
'ajax': 'true',
|
||||
'action': 'tree',
|
||||
'id': n.attr ? n.attr('id').replace(/tree-(group|shop|url)-/i, '') : '0'
|
||||
};
|
||||
},
|
||||
'success': check_selected_tree_node
|
||||
}
|
||||
},
|
||||
'cookies': {
|
||||
'save_selected': false
|
||||
},
|
||||
'core': {
|
||||
'html_titles': true,
|
||||
'animation': 300
|
||||
},
|
||||
'contextmenu': {
|
||||
items : customMenu
|
||||
},
|
||||
'themes': {
|
||||
'theme': 'classic'
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,27 @@
|
||||
{*
|
||||
* 2007-2012 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-2012 PrestaShop SA
|
||||
* @version Release: $Revision: 14740 $
|
||||
* @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/shop/content.tpl"}
|
||||
@@ -47,15 +47,18 @@
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
toggleShareOrders();
|
||||
$('input[name=share_customer]').click(function()
|
||||
if (!$("input[name=share_order]").prop('disabled'))
|
||||
{
|
||||
toggleShareOrders();
|
||||
});
|
||||
$('input[name=share_stock]').click(function()
|
||||
{
|
||||
toggleShareOrders();
|
||||
});
|
||||
$('input[name=share_customer]').click(function()
|
||||
{
|
||||
toggleShareOrders();
|
||||
});
|
||||
$('input[name=share_stock]').click(function()
|
||||
{
|
||||
toggleShareOrders();
|
||||
});
|
||||
}
|
||||
|
||||
$('#useImportData').click(function() {
|
||||
$('#importList').slideToggle('slow');
|
||||
@@ -63,15 +66,3 @@
|
||||
});
|
||||
|
||||
{/block}
|
||||
|
||||
{block name="label"}
|
||||
|
||||
{if $input.type == 'text' && $input.name == 'name'}
|
||||
<div class="hint" name="help_box" style="display:block;">{l s='You can\'t edit the shop group when you have more than one shop'}</div><br />
|
||||
{/if}
|
||||
|
||||
{if isset($input.label)}
|
||||
<label>{$input.label} </label>
|
||||
{/if}
|
||||
|
||||
{/block}
|
||||
@@ -0,0 +1,27 @@
|
||||
{*
|
||||
* 2007-2012 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-2012 PrestaShop SA
|
||||
* @version Release: $Revision: 14740 $
|
||||
* @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/shop/content.tpl"}
|
||||
@@ -30,6 +30,29 @@
|
||||
fillShopUrl();
|
||||
checkMainUrlInfo();
|
||||
$('#domain, #physical_uri, #virtual_uri').keyup(fillShopUrl);
|
||||
|
||||
var change_domain_value = false;
|
||||
$('#domain').keydown(function()
|
||||
{
|
||||
if (!$('#domain_ssl').val() || $('#domain_ssl').val() == $('#domain').val())
|
||||
{
|
||||
change_domain_value = true;
|
||||
}
|
||||
});
|
||||
|
||||
$('#domain_ssl').keydown(function()
|
||||
{
|
||||
change_domain_value = false;
|
||||
});
|
||||
|
||||
$('#domain').keyup(function()
|
||||
{
|
||||
if (change_domain_value)
|
||||
{
|
||||
change_domain_value = false;
|
||||
$('#domain_ssl').val($('#domain').val());
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
var shopUrl = {$js_shop_url};
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
{*
|
||||
* 2007-2012 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-2012 PrestaShop SA
|
||||
* @version Release: $Revision: 9608 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
{extends file="helpers/list/list_content.tpl"}
|
||||
|
||||
{block name="td_content"}
|
||||
{if $key == 'url'}
|
||||
<a href="{$tr.$key}" onmouseover="$(this).css('text-decoration', 'underline')" onmouseout="$(this).css('text-decoration', 'none')">{$tr.$key}</a>
|
||||
{else}
|
||||
{$smarty.block.parent}
|
||||
{/if}
|
||||
{/block}
|
||||
@@ -43,7 +43,7 @@
|
||||
{if isset($field.image)}<img src="{$field.image}" alt="{$field.title|escape:'htmlall':'UTF-8'}}" />{/if}
|
||||
{$field.title}
|
||||
</legend>
|
||||
{elseif $key == 'description'}
|
||||
{elseif $key == 'description' && $field}
|
||||
<p class="description">{$field}</p>
|
||||
{elseif $key == 'input'}
|
||||
{foreach $field as $input}
|
||||
@@ -378,7 +378,7 @@
|
||||
{/if}
|
||||
</fieldset>
|
||||
{block name="other_fieldsets"}{/block}
|
||||
{if isset($fields[$f+1])}<br class="clear" />{/if}
|
||||
{if isset($fields[$f+1])}<br />{/if}
|
||||
{/foreach}
|
||||
</form>
|
||||
{/block}
|
||||
|
||||
@@ -133,7 +133,7 @@
|
||||
<col width="52px" />
|
||||
{/if}
|
||||
<thead>
|
||||
<tr class="nodrag nodrop">
|
||||
<tr class="nodrag nodrop" style="height: 40px">
|
||||
<th class="center">
|
||||
{if $has_bulk_actions}
|
||||
<input type="checkbox" name="checkme" class="noborder" onclick="checkDelBoxes(this.form, '{$table}Box[]', this.checked)" />
|
||||
@@ -149,7 +149,7 @@
|
||||
<br />
|
||||
<a href="{$currentIndex}&{$table}Orderby={$key|urlencode}&{$table}Orderway=desc&token={$token}"><img border="0" src="../img/admin/down{if isset($order_by) && ($key == $order_by) && ($order_way == 'DESC')}_d{/if}.gif" /></a>
|
||||
<a href="{$currentIndex}&{$table}Orderby={$key|urlencode}&{$table}Orderway=asc&token={$token}"><img border="0" src="../img/admin/up{if isset($order_by) && ($key == $order_by) && ($order_way == 'ASC')}_d{/if}.gif" /></a>
|
||||
{else}
|
||||
{elseif !$simple_header}
|
||||
<br />
|
||||
{/if}
|
||||
</th>
|
||||
@@ -165,7 +165,7 @@
|
||||
</th>
|
||||
{/if}
|
||||
{if $has_actions}
|
||||
<th class="center">{l s='Actions'}<br /> </th>
|
||||
<th class="center">{l s='Actions'}{if !$simple_header}<br /> {/if}</th>
|
||||
{/if}
|
||||
</tr>
|
||||
{if !$simple_header}
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
<div style="clear: both; padding-top:15px;" id="conf_id_{$key}" {if $field['is_invisible']} class="isInvisible"{/if}>
|
||||
{if ($field['multishop_default'])}
|
||||
<div class="preference_default_multishop">
|
||||
<input type="checkbox" name="configUseDefault[{$key}]" value="1" {if $field['is_disabled']} {/if} onclick="checkMultishopDefaultValue(this, '{$key}')" />
|
||||
<input type="checkbox" name="multishopOverrideOption[{$key}]" value="1" {if !$field['is_disabled']}checked="checked"{/if} onclick="checkMultishopDefaultValue(this, '{$key}')" />
|
||||
</div>
|
||||
{/if}
|
||||
{block name="label"}
|
||||
|
||||
Reference in New Issue
Block a user