PHP Classes

File: assets/js/sortable.js

Recommend this page to a friend!
  Classes of Goffy G   wgGallery   assets/js/sortable.js   Download  
File: assets/js/sortable.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: wgGallery
Image gallery module for XOOPS CMS
Author: By
Last change:
Date: 3 years ago
Size: 1,259 bytes
 

Contents

Class file image Download
// Jquery function for order fields // When the page is loaded define the current order and items to reorder $(document).ready( function(){ /* script for sortable list */ var ns = $('ol.sortable').nestedSortable({ forcePlaceholderSize: true, handle: 'div', helper: 'clone', items: 'li', opacity: .6, placeholder: 'placeholder', revert: 250, tabSize: 25, tolerance: 'pointer', toleranceElement: '> div', maxLevels: 10, isTree: true, expandOnHover: 700, startCollapsed: false, excludeRoot: true, rootID:"0" }); $('.disclose').on('click', function() { $(this).closest('li').toggleClass('mjs-nestedSortable-collapsed').toggleClass('mjs-nestedSortable-expanded'); $(this).toggleClass('ui-icon-plusthick').toggleClass('ui-icon-minusthick'); }); /* Call the container items to reorder fields */ $( function() { $( "ol.sortable" ).nestedSortable({ update: function(event, ui) { var list = $(this).nestedSortable( 'serialize'); $.post( 'albums.php?op=order', list ); }, receive: function(event, ui) { var list = $(this).nestedSortable( 'serialize'); $.post( 'albums.php?op=order', list ); } }); $( "ol.sortable" ).disableSelection(); } ); });