// Some fix

This commit is contained in:
Jerome Nadaud
2013-09-13 17:11:12 +02:00
parent 5e2aa392da
commit 74237ff694
6 changed files with 115 additions and 62 deletions
@@ -28,7 +28,7 @@
<input type="hidden" name="submitted_tabs[]" value="Attachments" />
<h3>{l s='Attachment'}</h3>
<div class="row">
<div class="form-group">
<label class="control-label col-lg-3 required" for="attachment_name_{$id_lang}">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='Maximum 32 characters.'}">
@@ -36,17 +36,15 @@
</span>
</label>
<div class="col-lg-7">
<div class="row">
{include file="controllers/products/input_text_lang.tpl"
languages=$languages
input_value=$attachment_name
input_name="attachment_name"
}
</div>
{include file="controllers/products/input_text_lang.tpl"
languages=$languages
input_value=$attachment_name
input_name="attachment_name"
}
</div>
</div>
<div class="row">
<div class="form-group">
<label class="control-label col-lg-3" for="attachment_description_{$id_lang}">{l s='Description:'} </label>
<div class="col-lg-9">
{include
@@ -58,7 +56,7 @@
</div>
</div>
<div class="row">
<div class="form-group">
<label class="control-label col-lg-3" for="attachement_filename">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='Upload a file from your computer'} ({$PS_ATTACHMENT_MAXIMUM_SIZE|string_format:'%.2f'} {l s='MB max.'})">
@@ -66,25 +64,23 @@
</span>
</label>
<div class="col-lg-7">
<div class="row">
<div class="col-lg-8">
<input id="attachement_file" type="file" name="attachment_file" class="hide" />
<div class="dummyfile input-group">
<span class="input-group-addon"><i class="icon-file"></i></span>
<input id="attachement_filename" type="text" class="disabled" name="filename" readonly />
<span class="input-group-btn">
<button id="attachement_fileselectbutton" type="button" name="submitAddAttachments" class="btn btn-default">
<i class="icon-folder-open"></i> {l s='Choose a file'}
</button>
</span>
</div>
</div>
<div class="col-lg-4">
<button type="submit" name="submitAddAttachments" class="btn btn-default">
<i class="icon-cloud-upload"></i> {l s='Upload attachment file'}
</button>
<div class="col-lg-8">
<input id="attachement_file" type="file" name="attachment_file" class="hide" />
<div class="dummyfile input-group">
<span class="input-group-addon"><i class="icon-file"></i></span>
<input id="attachement_filename" type="text" class="disabled" name="filename" readonly />
<span class="input-group-btn">
<button id="attachement_fileselectbutton" type="button" name="submitAddAttachments" class="btn btn-default">
<i class="icon-folder-open"></i> {l s='Choose a file'}
</button>
</span>
</div>
</div>
<div class="col-lg-4">
<button type="submit" name="submitAddAttachments" class="btn btn-default">
<i class="icon-cloud-upload"></i> {l s='Upload attachment file'}
</button>
</div>
</div>
<script>
$(document).ready(function(){
@@ -102,7 +98,7 @@
<hr/>
<div class="row">
<div class="form-group">
<div class="col-lg-9 col-lg-offset-3">
<div class="row">
<div class="col-lg-6">
@@ -24,11 +24,11 @@
*}
{foreach from=$languages item=language}
<div class="row translatable-field lang-{$language.id_lang}">
<div class="translatable-field lang-{$language.id_lang}">
<div class="col-lg-10">
<textarea
id="{$input_name}_{$language.id_lang}"
name="{$input_name}_{$language.id_lang}"
name="{$input_name}_{$language.id_lasng}"
class="autoload_rte" >
{if isset($input_value[$language.id_lang])}{$input_value[$language.id_lang]|htmlentitiesUTF8}{/if}
</textarea>
@@ -0,0 +1,34 @@
{*
* 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
*}
<li class="tree-folder">
<span class="tree-folder-name{if isset($node['disabled']) && $node['disabled'] == true} tree-folder-name-disable{/if}">
<input type="checkbox" name="categories[]" value="{$node['id_category']}"{if isset($node['disabled']) && $node['disabled'] == true} disabled="disabled"{/if} />
<i class="icon-folder-close"></i>
<label class="tree-toggler">{$node['name']}</label>
</span>
<ul class="tree">
{$children}
</ul>
</li>
@@ -0,0 +1,31 @@
{*
* 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
*}
<li class="tree-item{if isset($node['disabled']) && $node['disabled'] == true} tree-item-disable{/if}">
<label class="tree-item-name">
<input type="checkbox" name="categories[]" value="{$node['id_category']}"{if isset($node['disabled']) && $node['disabled'] == true} disabled="disabled"{/if} />
<i class="tree-dot"></i>
{$node['name']}
</label>
</li>
+6
View File
@@ -100,6 +100,12 @@ class HelperFormCore extends Helper
if (isset($params['tree']['root_category']))
$tree->setRootCategory($params['tree']['root_category']);
if (isset($params['tree']['use_search']))
$tree->setUseSearch($params['tree']['use_search']);
if (isset($params['tree']['use_checkbox']))
$tree->setuseCheckBox($params['tree']['use_checkbox']);
$this->context->smarty->assign('categories_tree', $tree->render());
$categories = false;
}
+18 -32
View File
@@ -219,11 +219,17 @@ class AdminScenesControllerCore extends AdminController
_THEME_SCENE_DIR_.$obj->id.'-scene_default.jpg?rand='.(int)rand().'" /><br />';
$image_to_map_desc .= '
<div id="ajax_choose_product" style="display:none; padding:6px; padding-top:2px; width:600px;">
<div id="ajax_choose_product" style="display:none;" class="panel panel-default">
<div class="panel-heading">
'.$this->l('Begin typing the first few letters of the product name, then select the product you are looking for from the drop-down list:').'
<br /><input type="text" value="" id="product_autocomplete_input" style="width: 450px"/>
<input type="button" class="button" value="'.$this->l('OK').'" onclick="$(this).prev().search();" />
<input type="button" class="button" value="'.$this->l('Delete').'" onclick="undoEdit();" />
</div>
<div class="panel-body">
<input type="text" value="" id="product_autocomplete_input" />
</div>
<div class="panel-footer">
<button type="button" class="btn btn-default" onclick="undoEdit();"><i class="icon-remove"></i>&nbsp;'.$this->l('Delete').'</button>
<button type="button" class="btn btn-default" onclick="$(this).prev().search();"><i class="icon-check-sign"></i>&nbsp;'.$this->l('Ok').'</button>
</div>
</div>
';
@@ -255,36 +261,16 @@ class AdminScenesControllerCore extends AdminController
foreach (Scene::getIndexedCategories($obj->id) as $row)
$selected_cat[] = $row['id_category'];
$root_category = Category::getRootCategory();
if (!$root_category->id)
{
$root_category->id = 0;
$root_category->name = $this->l('Root');
}
$root_category = array('id_category' => (int)$root_category->id, 'name' => $root_category->name);
$trads = array(
'Root' => $root_category,
'selected' => $this->l('Selected'),
'Check all' => $this->l('Check all'),
'Check All' => $this->l('Check All'),
'Uncheck All' => $this->l('Uncheck All'),
'Collapse All' => $this->l('Collapse All'),
'Expand All' => $this->l('Expand All'),
'search' => $this->l('Search a category')
);
$this->fields_form['input'][] = array(
'type' => 'categories',
'type' => 'categories',
'label' => $this->l('Categories'),
'name' => 'categories',
'values' => array('trads' => $trads,
'selected_cat' => $selected_cat,
'input_name' => 'categories[]',
'use_radio' => false,
'use_search' => true,
'disabled_categories' => array(4),
'top_category' => Category::getTopCategory(),
'use_context' => true,
'name' => 'categories',
'tree' => array(
'id' => 'categories-tree',
'title' => 'Categories',
'selected_categories' => $selected_cat,
'use_search' => true,
'use_checkbox' => true
)
);
}