function allowmodules(){ jQuery(document).ready(function(){ if(jQuery("#leftmodules")) jQuery("#leftmodules").sortable({ accept : 'module-left', floats: true, opacity : 0.7, update : function () { jQuery('#leftsort').val(jQuery('#leftmodules').sortable('serialize')) } }); if(jQuery("#rightmodules")) jQuery("#rightmodules").sortable({ accept : 'module-right', floats: true, opacity : 0.7, update : function () { jQuery('#rightsort').val(jQuery('#rightmodules').sortable('serialize')) } }); if(jQuery("#topmodules")) jQuery("#topmodules").sortable({ accept : 'module-top', floats: true, opacity : 0.7, update : function () { jQuery('#topsort').val(jQuery('#topmodules').sortable('serialize')) } }); }); } /*jQuery(document).ready(function(){ jQuery('.fancy').tooltip({ track: true, delay: 0, showURL: false, opacity: 1, fixPNG: true, showBody: " - ", extraClass: "pretty fancy", top: -15, left: 5 }); });*/ jQuery(document).ready(function(){ jQuery('.fancy').tooltip({ track: true, delay: 0, showURL: false, showBody: " - ", extraClass: "pretty", fixPNG: true, opacity: 0.95, left: -120 }); /* autocompeae */ jQuery("#searchtext").autocomplete("search.php", { extraParams : {action: "quickfront"}, width: 148, delay:10, minChars:4, matchSubset:1, matchContains:1, cacheLength:10, formatItem:formatItem, formatResult:formatResult, autoFill:true }); function findValueCallback(event, data, formatted) { if(!data) alert('Brak podanego produktu'); else { // alert('Jeśli strona z produktem się nie wyświetli proszę zapisać ten numer, żebym wiedział jakie produkty się nie wyświetlają -- numer to : '+data[2]+' dzięki'); window.location.href="/product.php?action=show&id="+data[2]+"&page=1"; } } jQuery("#searchtext").result(findValueCallback).next().click(function() { jQuery(this).prev().search(); }); /* end autocomplete */ }); /* more autocomplete */ function formatItem(row) { return "
" + row[0] + ""; } function formatResult(row) { return row[0].replace(/(<.+?>)/gi, ''); } function lookupSearchProducts(){ jQuery("#searchtext").search(); } /* end more autocomplete */