Fixed minor UI glithces
This commit is contained in:
@@ -266,14 +266,14 @@
|
||||
|
||||
<td>
|
||||
{loop type="image" name="cat_image" source="product" source_id="$ID" limit="1" width="50" height="50" resize_mode="crop" backend_context="1"}
|
||||
<a href="{url path='admin/product/edit' id=$ID}" title="{intl l='Edit this product'}">
|
||||
<a href="{url path='/admin/products/update' product_id=$ID}" title="{intl l='Edit this product'}">
|
||||
<img src="{$IMAGE_URL}" alt="{$TITLE}" />
|
||||
</a>
|
||||
{/loop}
|
||||
|
||||
<td class="object-title"><a href="{url path="/admin/product/update/$ID"}" title="{intl l='Edit this product'}">{$REF}</a></td>
|
||||
<td class="object-title"><a href="{url path='/admin/products/update' product_id=$ID}" title="{intl l='Edit this product'}">{$REF}</a></td>
|
||||
|
||||
<td class="object-title"><a href="{url path="/admin/product/update/$ID"}" title="{intl l='Edit this product'}">{$TITLE}</a></td>
|
||||
<td class="object-title"><a href="{url path='/admin/products/update' product_id=$ID}" title="{intl l='Edit this product'}">{$TITLE}</a></td>
|
||||
|
||||
{module_include location='product_list_row'}
|
||||
|
||||
@@ -305,7 +305,7 @@
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.product.edit"}
|
||||
<a class="btn btn-default btn-xs" title="{intl l='Edit this product'}" href="{url path="admin/product/update/$ID"}"><i class="glyphicon glyphicon-edit"></i></a>
|
||||
<a class="btn btn-default btn-xs" title="{intl l='Edit this product'}" href="{url path='/admin/products/update' product_id=$ID}"><i class="glyphicon glyphicon-edit"></i></a>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.product.delete"}
|
||||
|
||||
@@ -40,24 +40,23 @@
|
||||
<div class="col-md-12">
|
||||
|
||||
<ul class="nav nav-tabs" id="tabbed-menu">
|
||||
<li class="active"><a href="#general" data-toggle="tab">{intl l="General description"}</a></li>
|
||||
|
||||
<li><a href="#details" data-toggle="tab">{intl l="Details"}</a></li>
|
||||
<li><a href="#images" data-toggle="tab">{intl l="Images"}</a></li>
|
||||
<li><a href="#documents" data-toggle="tab">{intl l="Documents"}</a></li>
|
||||
<li><a href="#modules" data-toggle="tab">{intl l="Modules"}</a></li>
|
||||
<li {if $current_tab == 'general'}class="active"{/if}><a href="#general" data-toggle="tab">{intl l="General description"}</a></li>
|
||||
<li {if $current_tab == 'details'}class="active"{/if}><a href="#details" data-toggle="tab">{intl l="Details"}</a></li>
|
||||
<li {if $current_tab == 'images'}class="active"{/if}><a href="#images" data-toggle="tab">{intl l="Images"}</a></li>
|
||||
<li {if $current_tab == 'documents'}class="active"{/if}><a href="#documents" data-toggle="tab">{intl l="Documents"}</a></li>
|
||||
<li {if $current_tab == 'modules'}class="active"{/if}><a href="#modules" data-toggle="tab">{intl l="Modules"}</a></li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
|
||||
<div class="tab-pane fade active in" id="general">
|
||||
<div class="tab-pane fade {if $current_tab == 'general'}active in{/if}" id="general">
|
||||
|
||||
<div class="form-container">
|
||||
|
||||
{form name="thelia.admin.category.modification"}
|
||||
<form method="POST" action="{url path='/admin/categories/save'}" {form_enctype form=$form} class="clearfix">
|
||||
|
||||
{include file="includes/inner-form-toolbar.html" close_url="{url path='/admin/categories' category_id=$category_id}"}
|
||||
{include file="includes/inner-form-toolbar.html" close_url="{url path='/admin/categories' category_id=$PARENT}"}
|
||||
|
||||
{* Be sure to get the category ID, even if the form could not be validated *}
|
||||
<input type="hidden" name="category_id" value="{$category_id}" />
|
||||
@@ -141,7 +140,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="details">
|
||||
<div class="tab-pane fade {if $current_tab == 'details'}active in{/if}" id="details">
|
||||
<div class="form-container">
|
||||
<div class="form-group">
|
||||
<form action="{url path='/admin/categories/related-content/add'}" id="related_content_form">
|
||||
@@ -149,9 +148,12 @@
|
||||
{include
|
||||
file="includes/inner-form-toolbar.html"
|
||||
hide_submit_buttons=true
|
||||
close_url="{url path='/admin/categories' category_id=$category_id}"
|
||||
close_url="{url path='/admin/categories' category_id=$PARENT}"
|
||||
}
|
||||
|
||||
<p class="title title-without-tabs">{intl l='Related content'}</p>
|
||||
<p>{intl l='You can attach here some content to this product'}</p>
|
||||
|
||||
<input type="hidden" name="category_id" value="{$category_id}" />
|
||||
<input type="hidden" name="current_tab" value="details" />
|
||||
|
||||
@@ -162,8 +164,8 @@
|
||||
<div class="form-group">
|
||||
<select name="folder_id" id="folder_id" class="form-control">
|
||||
<option value="">Select a folder...</option>
|
||||
{loop name="folders" type="folder" backend_context="1" lang="$edit_language_id"}
|
||||
<option value="{$ID}">{$TITLE}</option>
|
||||
{loop name="folders" type="folder-tree" folder="0" backend_context="1" lang="$edit_language_id"}
|
||||
<option value="{$ID}" style="padding-left: {3 + $LEVEL * 20}px">{$TITLE}</option>
|
||||
{/loop}
|
||||
</select>
|
||||
</div>
|
||||
@@ -183,6 +185,12 @@
|
||||
|
||||
<span class="help-block">{intl l='Select a content and click (+) to add it to this category'}</span>
|
||||
</div>
|
||||
|
||||
<div id="content_selector_empty" class="hide">
|
||||
<div class="alert alert-info">
|
||||
{intl l="No available content in this folder"}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -200,7 +208,7 @@
|
||||
<tr>
|
||||
<th>{intl l='ID'}</th>
|
||||
|
||||
<th>{intl l='Attribute title'}</th>
|
||||
<th>{intl l='Content title'}</th>
|
||||
|
||||
{module_include location='category_contents_table_header'}
|
||||
|
||||
@@ -245,13 +253,13 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="images">
|
||||
<div class="tab-pane fade {if $current_tab == 'images'}active in{/if}" id="images">
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="documents">
|
||||
<div class="tab-pane fade {if $current_tab == 'documents'}active in{/if}" id="documents">
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="modules">
|
||||
<div class="tab-pane fade {if $current_tab == 'modules'}active in{/if}" id="modules">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -287,7 +295,7 @@
|
||||
|
||||
{block name="javascript-initialization"}
|
||||
|
||||
<script src="/web/tinymce/tinymce.min.js"></script>
|
||||
<script src="{url file='/tinymce/tinymce.min.js'}"></script>
|
||||
<script>
|
||||
tinymce.init({
|
||||
selector: ".wysiwyg",
|
||||
@@ -301,9 +309,9 @@
|
||||
],
|
||||
toolbar1: "undo redo | bold italic underline | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | styleselect | filemanager | link unlink anchor | image media | forecolor backcolor | print preview code ",
|
||||
image_advtab: true ,
|
||||
external_filemanager_path:"/web/tinymce/plugins/filemanager/",
|
||||
external_filemanager_path:"{url file='/tinymce/plugins/filemanager/'}'",
|
||||
filemanager_title:"{intl l='Files manager'}" ,
|
||||
external_plugins: { "filemanager" : "/web/tinymce/plugins/filemanager/plugin.min.js"}
|
||||
external_plugins: { "filemanager" : "{url file='/tinymce/plugins/filemanager/plugin.min.js'}"}
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -317,12 +325,6 @@ $(function() {
|
||||
ev.preventDefault();
|
||||
});
|
||||
|
||||
// Show proper tab, if defined
|
||||
{if ! empty($current_tab)}
|
||||
$('#tabbed-menu a[href="#{$current_tab}"]').tab('show')
|
||||
{/if}
|
||||
|
||||
|
||||
// Set proper content ID in delete content from
|
||||
$('a.delete-content').click(function(ev) {
|
||||
$('#content_delete_id').val($(this).data('id'));
|
||||
@@ -331,28 +333,41 @@ $(function() {
|
||||
|
||||
// Load content on folder selection
|
||||
$('#folder_id').change(function(event) {
|
||||
$.ajax({
|
||||
url : '{url path="/admin/category/$category_id/available-related-content/"}' + $(this).val() + '.xml',
|
||||
type : 'get',
|
||||
dataType : 'json',
|
||||
success : function(json) {
|
||||
$('#content_id :not(:first-child)').remove();
|
||||
|
||||
var have_content = false;
|
||||
var val = $(this).val();
|
||||
|
||||
$.each(json, function(idx, value) {
|
||||
$('#content_id').append($('<option>').text(value.title).attr('value', value.id));
|
||||
if (val != "") {
|
||||
$.ajax({
|
||||
url : '{url path="/admin/category/$category_id/available-related-content/"}' + val + '.xml',
|
||||
type : 'get',
|
||||
dataType : 'json',
|
||||
success : function(json) {
|
||||
$('#content_id :not(:first-child)').remove();
|
||||
|
||||
have_content = true; // Lame...
|
||||
});
|
||||
var have_content = false;
|
||||
|
||||
if (have_content)
|
||||
$('#content_selector').removeClass('hide');
|
||||
else
|
||||
$('#content_selector').addClass('hide');
|
||||
$.each(json, function(idx, value) {
|
||||
$('#content_id').append($('<option>').text(value.title).attr('value', value.id));
|
||||
|
||||
}
|
||||
});
|
||||
have_content = true; // Lame...
|
||||
});
|
||||
|
||||
if (have_content) {
|
||||
$('#content_selector_empty').addClass('hide');
|
||||
$('#content_selector').removeClass('hide');
|
||||
}
|
||||
else {
|
||||
$('#content_selector_empty').removeClass('hide');
|
||||
$('#content_selector').addClass('hide');
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
$('#content_selector_empty').addClass('hide');
|
||||
$('#content_selector').addClass('hide');
|
||||
}
|
||||
});
|
||||
|
||||
// Initialize folder (id={$folder_id}) select value
|
||||
|
||||
Reference in New Issue
Block a user