// fix scenes

This commit is contained in:
Kevin Granger
2013-09-17 17:15:40 +02:00
parent 0971750f9f
commit 51663f972e
4 changed files with 98 additions and 89 deletions
+37 -32
View File
@@ -8134,25 +8134,30 @@ textarea {
stroke-width: 0; }
/* line 552, admin-theme.sass */
.thumbnail {
background-color: white;
border-color: #cccccc !important; }
/* line 556, admin-theme.sass */
.highlight {
background-color: #ffffc0; }
/* line 555, admin-theme.sass */
/* line 559, admin-theme.sass */
.hook_panel {
-webkit-box-shadow: rgba(255, 255, 255, 0.9) 0 0 0 1px inset;
box-shadow: rgba(255, 255, 255, 0.9) 0 0 0 1px inset;
padding: 10px 10px 5px 10px;
margin-bottom: 3px !important; }
/* line 560, admin-theme.sass */
/* line 564, admin-theme.sass */
.module_name {
font-size: 1.2em; }
/* line 564, admin-theme.sass */
/* line 568, admin-theme.sass */
.hook_panel_header {
margin: 0 -10px 0 -10px;
padding: 0 10px 10px 10px; }
/* line 567, admin-theme.sass */
/* line 571, admin-theme.sass */
.hook_panel_header .hook_name {
font-weight: 400;
font-size: 1.2em;
@@ -8165,15 +8170,15 @@ textarea {
border: solid 1px #cccccc;
background-color: white;
padding: 0 4px; }
/* line 575, admin-theme.sass */
/* line 579, admin-theme.sass */
.hook_panel_header .hook_title {
text-transform: uppercase;
font-size: 1em; }
/* line 578, admin-theme.sass */
/* line 582, admin-theme.sass */
.hook_panel_header .hook_description {
padding: 3px 0 0 3px; }
/* line 582, admin-theme.sass */
/* line 586, admin-theme.sass */
.module_list .module_list_item {
display: table;
width: 100%;
@@ -8188,7 +8193,7 @@ textarea {
-o-border-radius: 3px;
border-radius: 3px; }
/* line 590, admin-theme.sass */
/* line 594, admin-theme.sass */
.module_col_select {
display: table-cell;
width: 22px;
@@ -8197,13 +8202,13 @@ textarea {
text-align: center;
border-right: 1px solid #dddddd; }
/* line 597, admin-theme.sass */
/* line 601, admin-theme.sass */
.module_col_position {
display: table-cell;
width: 60px;
vertical-align: middle;
text-align: right; }
/* line 602, admin-theme.sass */
/* line 606, admin-theme.sass */
.module_col_position .positions {
font-family: "Ubuntu", sans-serif;
font-weight: 200;
@@ -8221,41 +8226,41 @@ textarea {
border: solid 1px #cccccc;
background-color: #eeeeee; }
/* line 613, admin-theme.sass */
/* line 617, admin-theme.sass */
.module_col_icon {
display: table-cell;
width: 50px;
text-align: center;
vertical-align: middle; }
/* line 619, admin-theme.sass */
/* line 623, admin-theme.sass */
.module_col_infos {
display: table-cell;
height: 50px;
vertical-align: middle; }
/* line 624, admin-theme.sass */
/* line 628, admin-theme.sass */
.module_col_actions {
display: table-cell;
width: 160px;
padding: 0 10px;
vertical-align: middle;
text-align: right; }
/* line 630, admin-theme.sass */
/* line 634, admin-theme.sass */
.module_col_actions .btn-group {
text-align: left; }
/* line 634, admin-theme.sass */
/* line 638, admin-theme.sass */
.tree {
padding: 0 0 0 20px;
list-style: none; }
/* line 637, admin-theme.sass */
/* line 641, admin-theme.sass */
.tree input {
margin-right: 4px; }
/* line 639, admin-theme.sass */
/* line 643, admin-theme.sass */
.tree i {
font-size: 1.3em; }
/* line 643, admin-theme.sass */
/* line 647, admin-theme.sass */
.tree .tree-item-name, .tree .tree-folder-name {
padding: 0 5px;
-webkit-border-radius: 6px;
@@ -8264,17 +8269,17 @@ textarea {
-o-border-radius: 6px;
border-radius: 6px;
font-weight: normal; }
/* line 647, admin-theme.sass */
/* line 651, admin-theme.sass */
.tree .tree-item-name:hover, .tree .tree-folder-name:hover {
background-color: #eeeeee;
cursor: pointer; }
/* line 650, admin-theme.sass */
/* line 654, admin-theme.sass */
.tree .tree-selected {
background-color: #a4dcf5; }
/* line 652, admin-theme.sass */
/* line 656, admin-theme.sass */
.tree .tree-selected i.tree-dot {
background-color: #1ba6e5; }
/* line 654, admin-theme.sass */
/* line 658, admin-theme.sass */
.tree i.tree-dot {
display: inline-block;
position: relative;
@@ -8287,22 +8292,22 @@ textarea {
-ms-border-radius: 6px;
-o-border-radius: 6px;
border-radius: 6px; }
/* line 662, admin-theme.sass */
/* line 666, admin-theme.sass */
.tree .tree-item-disable, .tree .tree-folder-name-disable {
color: #cccccc; }
/* line 664, admin-theme.sass */
/* line 668, admin-theme.sass */
.tree .tree-item-disable:hover, .tree .tree-folder-name-disable:hover {
color: #cccccc;
background-color: none; }
/* line 669, admin-theme.sass */
/* line 672, admin-theme.sass */
.nav-tabs {
border-bottom: none; }
/* line 672, admin-theme.sass */
/* line 675, admin-theme.sass */
.nav-tabs li.active a.tab-page {
background-color: white; }
/* line 677, admin-theme.sass */
/* line 679, admin-theme.sass */
.tagify-container {
background-color: white;
padding: 2px 6px;
@@ -8316,10 +8321,10 @@ textarea {
border: solid 1px #cccccc;
-webkit-box-shadow: rgba(0, 0, 0, 0.075) 0 1px 1px inset;
box-shadow: rgba(0, 0, 0, 0.075) 0 1px 1px inset; }
/* line 685, admin-theme.sass */
/* line 687, admin-theme.sass */
.tagify-container span {
float: left; }
/* line 687, admin-theme.sass */
/* line 689, admin-theme.sass */
.tagify-container > span {
display: inline-block;
padding: 3px 5px;
@@ -8328,20 +8333,20 @@ textarea {
border: 1px solid #1ba6e5;
background-color: #60c1ed;
color: white; }
/* line 695, admin-theme.sass */
/* line 697, admin-theme.sass */
.tagify-container > span > a {
padding-left: 5px;
color: #1ba6e5;
text-decoration: none;
font-weight: bold; }
/* line 700, admin-theme.sass */
/* line 702, admin-theme.sass */
.tagify-container > input {
margin-top: 2px;
border: 0 none;
width: 100px;
-webkit-box-shadow: none;
box-shadow: none; }
/* line 705, admin-theme.sass */
/* line 707, admin-theme.sass */
.tagify-container > input:focus {
outline: 0;
-webkit-box-shadow: none;
@@ -549,6 +549,10 @@ textarea
fill: rgba(white,0.30)
stroke-width: 0
.thumbnail
background-color: white
border-color: #ccc!important
.highlight
background-color: #FFFFC0
@@ -665,14 +669,12 @@ textarea
color: #ccc
background-color: none
.nav-tabs
border-bottom: none
li.active
a.tab-page
background-color: white
//tag
.tagify-container
background-color: white
@@ -377,13 +377,17 @@
{elseif $input.type == 'checkbox'}
{foreach $input.values.query as $value}
{assign var=id_checkbox value=$input.name|cat:'_'|cat:$value[$input.values.id]}
<input type="checkbox"
name="{$id_checkbox}"
id="{$id_checkbox}"
class="{if isset($input.class)}{$input.class}{/if}"
{if isset($value.val)}value="{$value.val|escape:'htmlall':'UTF-8'}"{/if}
{if isset($fields_value[$id_checkbox]) && $fields_value[$id_checkbox]}checked="checked"{/if} />
<label for="{$id_checkbox}" class="t"><strong>{$value[$input.values.name]}</strong></label><br />
<div class="checkbox">
<label for="{$id_checkbox}">
<input type="checkbox"
name="{$id_checkbox}"
id="{$id_checkbox}"
class="{if isset($input.class)}{$input.class}{/if}"
{if isset($value.val)}value="{$value.val|escape:'htmlall':'UTF-8'}"{/if}
{if isset($fields_value[$id_checkbox]) && $fields_value[$id_checkbox]}checked="checked"{/if} />
{$value[$input.values.name]}
</label>
</div>
{/foreach}
{elseif $input.type == 'file'}
{if isset($input.display_image) && $input.display_image}
@@ -397,19 +401,17 @@
</div>
{/if}
{/if}
<div class="col-lg-7">
<div class="row">
<div class="col-lg-8">
<input id="{$input.name}" type="file" name="{$input.name}" class="hide" />
<div class="dummyfile input-group">
<span class="input-group-addon"><i class="icon-file"></i></span>
<input id="{$input.name}-name" type="text" class="disabled" name="filename" readonly />
<span class="input-group-btn">
<button id="{$input.name}-selectbutton" type="button" name="submitAddAttachments" class="btn btn-default">
<i class="icon-folder-open"></i> {l s='Choose a file'}
</button>
</span>
</div>
<div class="row">
<div class="col-lg-7">
<input id="{$input.name}" type="file" name="{$input.name}" class="hide" />
<div class="dummyfile input-group">
<span class="input-group-addon"><i class="icon-file"></i></span>
<input id="{$input.name}-name" type="text" class="disabled" name="filename" readonly />
<span class="input-group-btn">
<button id="{$input.name}-selectbutton" type="button" name="submitAddAttachments" class="btn btn-default">
<i class="icon-folder-open"></i> {l s='Choose a file'}
</button>
</span>
</div>
</div>
</div>
@@ -507,7 +509,7 @@
{/block}{* end block input *}
{block name="description"}
{if isset($input.desc) && !empty($input.desc)}
<p class="preference_description">
<p class="help-block">
{if is_array($input.desc)}
{foreach $input.desc as $p}
{if is_array($p)}
+34 -34
View File
@@ -153,24 +153,19 @@ class AdminScenesControllerCore extends AdminController
'legend' => array(
'title' => $this->l('Image Maps'),
'icon' => 'icon-picture',
),
'submit' => array(
'title' => $this->l('Save'),
'class' => 'button'
),
'description' =>
'<h4>'.$this->l('How to map products in the image:').'</h4>
<p>'.
$this->l('When a customer hovers over the image, a pop-up appears displaying a brief description of the product.').
$this->l('The customer can then click to open the full product page.').
$this->l('To achieve this, please define the \'mapping zone\' that, when hovered over, will display the pop-up.').
$this->l('Left click with your mouse to draw the four-sided mapping zone, then release.').
$this->l('Then begin typing the name of the associated product, and a list of products will appear.').
$this->l('Click the appropriate product and then click OK. Repeat these steps for each mapping zone you wish to create.').
$this->l('When you have finished mapping zones, click "Save Image Map."').
'</p>',
'input' => array(
array(
'type' => 'description',
'name' => 'description',
'label' => $this->l('How to map products in the image:'),
'text' => $this->l('When a customer hovers over the image, a pop-up appears displaying a brief description of the product.').
$this->l('The customer can then click to open the full product page.').
$this->l('To achieve this, please define the \'mapping zone\' that, when hovered over, will display the pop-up.').
$this->l('Left click with your mouse to draw the four-sided mapping zone, then release.').
$this->l('Then begin typing the name of the associated product, and a list of products will appear.').
$this->l('Click the appropriate product and then click OK. Repeat these steps for each mapping zone you wish to create.').
$this->l('When you have finished mapping zones, click "Save Image Map."')
),
array(
'type' => 'text',
'label' => $this->l('Image map name:'),
@@ -200,6 +195,10 @@ class AdminScenesControllerCore extends AdminController
)
),
),
'submit' => array(
'title' => $this->l('Save'),
'class' => 'btn btn-default'
),
);
$this->fields_form = $fields_form;
@@ -217,28 +216,29 @@ class AdminScenesControllerCore extends AdminController
$this->addJqueryPlugin('autocomplete');
$this->addJqueryPlugin('imgareaselect');
$this->addJs(_PS_JS_DIR_.'admin-scene-cropping.js' );
$image_to_map_desc .= '<br /><img id="large_scene_image" alt="" src="'.
_THEME_SCENE_DIR_.$obj->id.'-scene_default.jpg?rand='.(int)rand().'" /><br />';
$image_to_map_desc .= '<div class="panel panel-default"><span class="thumbnail row-margin-bottom"><img id="large_scene_image" alt="" src="'.
_THEME_SCENE_DIR_.$obj->id.'-scene_default.jpg?rand='.(int)rand().'" /></span>';
$image_to_map_desc .= '
<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:').'
</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>
<div id="ajax_choose_product" class="row" style="display:none;">
<div class="col-lg-12">
<p class="alert alert-info">'
.$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:').'
</p>
<div class="input-group row-margin-bottom">
<span class="input-group-addon">
<i class="icon-search"></i>
</span>
<input type="text" value="" id="product_autocomplete_input" />
</div>
<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>
';
if ($obj->id && file_exists(_PS_SCENE_IMG_DIR_.'thumbs/'.$obj->id.'-m_scene_default.jpg'))
$image_to_map_desc .= '<br/>
<img id="large_scene_image" style="clear:both;border:1px solid black;" alt="" src="'._THEME_SCENE_DIR_.'thumbs/'.$obj->id.'-m_scene_default.jpg?rand='.(int)rand().'" />
<br />';
$image_to_map_desc .= '</div><hr/><img class="thumbnail" id="large_scene_image" style="clear:both;border:1px solid black;" alt="" src="'._THEME_SCENE_DIR_.'thumbs/'.$obj->id.'-m_scene_default.jpg?rand='.(int)rand().'" />';
$img_alt_desc = '';
$img_alt_desc .= $this->l('If you want to use a thumbnail other than one generated from simply reducing the mapped image, please upload it here.')
@@ -277,7 +277,7 @@ class AdminScenesControllerCore extends AdminController
);
}
else
$image_to_map_desc .= '<br/><span class="bold">'.$this->l('Please add a picture to continue mapping the image.').'</span><br/><br/>';
$image_to_map_desc .= '<span>'.$this->l('Please add a picture to continue mapping the image.').'</span>';
if (Shop::isFeatureActive())
{