Aded feature_template and category_template position management
This commit is contained in:
@@ -33,6 +33,8 @@
|
||||
|
||||
<th>{intl l='Attribute title'}</th>
|
||||
|
||||
<th class="text-center">{intl l='Position'}</th>
|
||||
|
||||
{module_include location='template_attributes_table_header'}
|
||||
|
||||
<th class="actions">{intl l="Actions"}</th>
|
||||
@@ -44,8 +46,17 @@
|
||||
<tr>
|
||||
<td>{$ID}</td>
|
||||
|
||||
<td>
|
||||
{$TITLE}
|
||||
<td>{$TITLE}</td>
|
||||
|
||||
<td class="text-center">
|
||||
{admin_position_block
|
||||
permission="admin.templates.edit"
|
||||
path={url path="admin/template/update-attribute-position" template_id=$template_id}
|
||||
url_parameter="attribute_id"
|
||||
in_place_edit_class="attributePositionChange"
|
||||
position=$POSITION
|
||||
id=$ID
|
||||
}
|
||||
</td>
|
||||
|
||||
{module_include location='template_attributes_table_row'}
|
||||
@@ -64,7 +75,7 @@
|
||||
|
||||
{elseloop rel="assigned_attributes"}
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<td colspan="4">
|
||||
<div class="alert alert-info">
|
||||
{intl l="This template contains no attributes"}
|
||||
</div>
|
||||
@@ -93,11 +104,33 @@
|
||||
}
|
||||
|
||||
<script>
|
||||
|
||||
$(function() {
|
||||
|
||||
// Set proper attribute ID in delete attribute from
|
||||
$('a.delete-attribute').click(function(ev) {
|
||||
$('#attribute_delete_id').val($(this).data('id'));
|
||||
});
|
||||
|
||||
{* Inline editing of object position using bootstrap-editable *}
|
||||
|
||||
$('.attributePositionChange').editable({
|
||||
type : 'text',
|
||||
title : '{intl l="Enter new category position"}',
|
||||
mode : 'popup',
|
||||
inputclass : 'input-mini',
|
||||
placement : 'left',
|
||||
success : function(response, newValue) {
|
||||
// The URL template
|
||||
var url = "{url noamp='1' path="admin/template/update-attribute-position" template_id=$template_id attribute_id='__ID__' position='__POS__'}";
|
||||
|
||||
// Perform subtitutions
|
||||
url = url.replace('__ID__', $(this).data('id')).replace('__POS__', newValue);
|
||||
|
||||
// Reload the page
|
||||
location.href = url;
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -33,6 +33,8 @@
|
||||
|
||||
<th>{intl l='Feature title'}</th>
|
||||
|
||||
<th class="text-center">{intl l='Position'}</th>
|
||||
|
||||
{module_include location='template_features_table_header'}
|
||||
|
||||
<th class="actions">{intl l="Actions"}</th>
|
||||
@@ -48,6 +50,17 @@
|
||||
{$TITLE}
|
||||
</td>
|
||||
|
||||
<td class="text-center">
|
||||
{admin_position_block
|
||||
permission="admin.templates.edit"
|
||||
path={url path="/admin/template/update-feature-position" template_id=$template_id}
|
||||
url_parameter="feature_id"
|
||||
in_place_edit_class="featurePositionChange"
|
||||
position=$POSITION
|
||||
id=$ID
|
||||
}
|
||||
</td>
|
||||
|
||||
{module_include location='template_features_table_row'}
|
||||
|
||||
<td class="actions">
|
||||
@@ -64,7 +77,7 @@
|
||||
|
||||
{elseloop rel="assigned_features"}
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<td colspan="4">
|
||||
<div class="alert alert-info">
|
||||
{intl l="This template contains no features"}
|
||||
</div>
|
||||
@@ -100,5 +113,26 @@
|
||||
$('a.delete-feature').click(function(ev) {
|
||||
$('#feature_delete_id').val($(this).data('id'));
|
||||
});
|
||||
|
||||
{* Inline editing of object position using bootstrap-editable *}
|
||||
|
||||
$('.featurePositionChange').editable({
|
||||
type : 'text',
|
||||
title : '{intl l="Enter new category position"}',
|
||||
mode : 'popup',
|
||||
inputclass : 'input-mini',
|
||||
placement : 'left',
|
||||
success : function(response, newValue) {
|
||||
// The URL template
|
||||
var url = "{url noamp='1' path='/admin/template/update-feature-position' template_id=$template_id feature_id='__ID__' position='__POS__'}";
|
||||
|
||||
// Perform subtitutions
|
||||
url = url.replace('__ID__', $(this).data('id')).replace('__POS__', newValue);
|
||||
|
||||
// Reload the page
|
||||
location.href = url;
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -303,7 +303,7 @@
|
||||
placement : 'left',
|
||||
success : function(response, newValue) {
|
||||
// The URL template
|
||||
var url = "{url path='/admin/configuration/attributes-av/update-position' attributeav_id='__ID__' position='__POS__' attribute_id=$attribute_id}";
|
||||
var url = "{url noamp='1' path='/admin/configuration/attributes-av/update-position' attributeav_id='__ID__' position='__POS__' attribute_id=$attribute_id}";
|
||||
|
||||
// Perform subtitutions
|
||||
url = url.replace('__ID__', $(this).data('id')).replace('__POS__', newValue);
|
||||
|
||||
@@ -312,7 +312,7 @@
|
||||
placement : 'left',
|
||||
success : function(response, newValue) {
|
||||
// The URL template
|
||||
var url = "{url path='/admin/configuration/attributes/update-position' attribute_id='__ID__' position='__POS__'}";
|
||||
var url = "{url noamp='1' path='/admin/configuration/attributes/update-position' attribute_id='__ID__' position='__POS__'}";
|
||||
|
||||
// Perform subtitutions
|
||||
url = url.replace('__ID__', $(this).data('id'))
|
||||
|
||||
@@ -604,7 +604,7 @@
|
||||
placement : 'left',
|
||||
success : function(response, newValue) {
|
||||
// The URL template
|
||||
var url = "{url path='/admin/categories/update-position' category_id='__ID__' position='__POS__'}";
|
||||
var url = "{url noamp='1' path='/admin/categories/update-position' category_id='__ID__' position='__POS__'}";
|
||||
|
||||
// Perform subtitutions
|
||||
url = url.replace('__ID__', $(this).data('id'))
|
||||
@@ -623,7 +623,7 @@
|
||||
placement : 'left',
|
||||
success : function(response, newValue) {
|
||||
// The URL template
|
||||
var url = "{url path='/admin/products/update-position' product_id='__ID__' position='__POS__'}";
|
||||
var url = "{url noamp='1' path='/admin/products/update-position' product_id='__ID__' position='__POS__'}";
|
||||
|
||||
// Perform subtitutions
|
||||
url = url.replace('__ID__', $(this).data('id'))
|
||||
|
||||
@@ -331,7 +331,7 @@
|
||||
placement : 'left',
|
||||
success : function(response, newValue) {
|
||||
// The URL template
|
||||
var url = "{url path='/admin/configuration/currencies/update-position' currency_id='__ID__' position='__POS__'}";
|
||||
var url = "{url noamp='1' path='/admin/configuration/currencies/update-position' currency_id='__ID__' position='__POS__'}";
|
||||
|
||||
// Perform subtitutions
|
||||
url = url.replace('__ID__', $(this).data('id'))
|
||||
|
||||
@@ -303,7 +303,7 @@
|
||||
placement : 'left',
|
||||
success : function(response, newValue) {
|
||||
// The URL template
|
||||
var url = "{url path='/admin/configuration/features-av/update-position' featureav_id='__ID__' position='__POS__' feature_id=$feature_id}";
|
||||
var url = "{url noamp='1' path='/admin/configuration/features-av/update-position' featureav_id='__ID__' position='__POS__' feature_id=$feature_id}";
|
||||
|
||||
// Perform subtitutions
|
||||
url = url.replace('__ID__', $(this).data('id')).replace('__POS__', newValue);
|
||||
|
||||
@@ -312,7 +312,7 @@
|
||||
placement : 'left',
|
||||
success : function(response, newValue) {
|
||||
// The URL template
|
||||
var url = "{url path='/admin/configuration/features/update-position' feature_id='__ID__' position='__POS__'}";
|
||||
var url = "{url noamp='1' path='/admin/configuration/features/update-position' feature_id='__ID__' position='__POS__'}";
|
||||
|
||||
// Perform subtitutions
|
||||
url = url.replace('__ID__', $(this).data('id'))
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
{block name="main-content"}
|
||||
<div class="folders">
|
||||
|
||||
<div id="wrapper" class="container">
|
||||
|
||||
<div id="wrapper" class="container">
|
||||
|
||||
{* include file="includes/folder-breadcrumb.html" *}
|
||||
|
||||
{module_include location='folders_top'}
|
||||
@@ -213,7 +213,7 @@
|
||||
label="{intl l='ID'}"
|
||||
}
|
||||
|
||||
<th> </th>
|
||||
<th> </th>
|
||||
|
||||
<th class="object-title">
|
||||
{admin_sortable_header
|
||||
@@ -416,7 +416,7 @@
|
||||
|
||||
{form_field form=$form field='default_folder'}
|
||||
<input type="hidden" name="{$name}" value="{$folder_id}" />
|
||||
{/form_field}
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='title'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
@@ -580,7 +580,7 @@
|
||||
placement : 'left',
|
||||
success : function(response, newValue) {
|
||||
// The URL template
|
||||
var url = "{url path='/admin/folders/update-position' folder_id='__ID__' position='__POS__'}";
|
||||
var url = "{url noamp='1' path='/admin/folders/update-position' folder_id='__ID__' position='__POS__'}";
|
||||
|
||||
// Perform subtitutions
|
||||
url = url.replace('__ID__', $(this).data('id'))
|
||||
@@ -599,7 +599,7 @@
|
||||
placement : 'left',
|
||||
success : function(response, newValue) {
|
||||
// The URL template
|
||||
var url = "{url path='/admin/contents/update-position' content_id='__ID__' position='__POS__'}";
|
||||
var url = "{url noamp='1' path='/admin/contents/update-position' content_id='__ID__' position='__POS__'}";
|
||||
|
||||
// Perform subtitutions
|
||||
url = url.replace('__ID__', $(this).data('id'))
|
||||
|
||||
@@ -221,7 +221,7 @@ $(function() {
|
||||
placement : 'left',
|
||||
success : function(response, newValue) {
|
||||
// The URL template
|
||||
var url = "{url path='admin/product/update-accessory-position/' accessory_id='__ID__' product_id=$product_id position='__POS__'}";
|
||||
var url = "{url noamp='1' path='admin/product/update-accessory-position/' accessory_id='__ID__' product_id=$product_id position='__POS__'}";
|
||||
|
||||
// Perform subtitutions
|
||||
url = url.replace('__ID__', $(this).data('id')).replace('__POS__', newValue);
|
||||
|
||||
@@ -106,10 +106,14 @@
|
||||
|
||||
{block name="javascript-initialization"}
|
||||
|
||||
{javascripts file='assets/js/bootstrap-editable/bootstrap-editable.js'}
|
||||
<script src="{$asset_url}"></script>
|
||||
{/javascripts}
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
$('#feature_list_management').load("{url path='/admin/configuration/templates/features/list' template_id=$template_id}");
|
||||
$('#attribute_list_management').load("{url path='/admin/configuration/templates/attributes/list' template_id=$template_id}");
|
||||
$('#feature_list_management').load("{url noamp='1' path='/admin/configuration/templates/features/list' template_id=$template_id}");
|
||||
$('#attribute_list_management').load("{url noamp='1' path='/admin/configuration/templates/attributes/list' template_id=$template_id}");
|
||||
});
|
||||
</script>
|
||||
{/block}
|
||||
@@ -25,7 +25,7 @@
|
||||
{if ! empty($general_error) }
|
||||
<div class="alert alert-danger">{$general_error}</div>
|
||||
{/if}
|
||||
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-condensed table-left-aligned">
|
||||
<caption>
|
||||
@@ -194,10 +194,6 @@
|
||||
|
||||
{block name="javascript-initialization"}
|
||||
|
||||
{javascripts file='assets/js/bootstrap-editable/bootstrap-editable.js'}
|
||||
<script src="{$asset_url}"></script>
|
||||
{/javascripts}
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user