Skip to content

Commit

Permalink
Reorderable drag-and-drop lists for featured products, articles
Browse files Browse the repository at this point in the history
  • Loading branch information
dinoxtech committed Jun 12, 2021
1 parent 6609653 commit 8697f47
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions upload/admin/controller/extension/module/blog_featured.php
Expand Up @@ -8,6 +8,9 @@ class ControllerExtensionModuleBlogFeatured extends Controller {
public function index() {
$this->load->language('extension/module/blog_featured');

$this->document->addScript('view/javascript/jquery/Sortable.js');
$this->document->addScript('view/javascript/jquery/jquery-sortable.js');

$this->document->setTitle($this->language->get('heading_title'));

$this->load->model('setting/module');
Expand Down
3 changes: 3 additions & 0 deletions upload/admin/controller/extension/module/featured.php
Expand Up @@ -5,6 +5,9 @@ class ControllerExtensionModuleFeatured extends Controller {
public function index() {
$this->load->language('extension/module/featured');

$this->document->addScript('view/javascript/jquery/Sortable.js');
$this->document->addScript('view/javascript/jquery/jquery-sortable.js');

$this->document->setTitle($this->language->get('heading_title'));

$this->load->model('setting/module');
Expand Down
Expand Up @@ -90,6 +90,12 @@
</div>
</div>
<script type="text/javascript"><!--
// Reorderable drag-and-drop lists
$('#blog_featured-article div input').before(' <i class="fa fa-hand-grab-o handle"></i> ');
$('#blog_featured-article').sortable({
handle: '.handle',
chosenClass: 'handle-active',
});
$('input[name=\'article_name\']').autocomplete({
source: function(request, response) {
$.ajax({
Expand Down
6 changes: 6 additions & 0 deletions upload/admin/view/template/extension/module/featured.twig
Expand Up @@ -90,6 +90,12 @@
</div>
</div>
<script type="text/javascript"><!--
// Reorderable drag-and-drop lists
$('#featured-product div input').before(' <i class="fa fa-hand-grab-o handle"></i> ');
$('#featured-product').sortable({
handle: '.handle',
chosenClass: 'handle-active',
});
$('input[name=\'product_name\']').autocomplete({
source: function(request, response) {
$.ajax({
Expand Down

0 comments on commit 8697f47

Please sign in to comment.