/* * debouncedresize: special jQuery event that happens once after a window resize * * latest version and complete README available on Github: * https://github.com/louisremi/jquery-smartresize * * Copyright 2012 @louis_remi * Licensed under the MIT license. * * This saved you an hour of work? * Send me music http://www.amazon.co.uk/wishlist/HNTU0468LQON */ ;(function(a){var d=a.event,b,c;b=d.special.debouncedresize={setup:function(){a(this).on("resize",b.handler)},teardown:function(){a(this).off("resize",b.handler)},handler:function(a,f){var g=this,h=arguments,e=function(){a.type="debouncedresize";d.dispatch.apply(g,h)};c&&clearTimeout(c);f?e():c=setTimeout(e,b.threshold)},threshold:150}})(jQuery); /*! * jQuery Cookie Plugin * https://github.com/carhartl/jquery-cookie * * Copyright 2011, Klaus Hartl * Dual licensed under the MIT or GPL Version 2 licenses. * http://www.opensource.org/licenses/mit-license.php * http://www.opensource.org/licenses/GPL-2.0 */ ;(function(g){g.cookie=function(h,b,a){if(1 The jQuery method "'+b+'" you called does not exist';}h=a.extend({absolute:false,clone:false,includeMargin:undefined},k);d=this;if(h.clone===true){e=function(){d=d.filter(":first").clone().css({position:"absolute",top:-1000}).appendTo("body");};i=function(){d.remove();};}else{e=function(){c=d.parents().andSelf().filter(":hidden");g=h.absolute===true?{position:"absolute",visibility:"hidden",display:"block"}:{visibility:"hidden",display:"block"};f=[];c.each(function(){var m={},l;for(l in g){m[l]=this.style[l];this.style[l]=g[l];}f.push(m);});};i=function(){c.each(function(m){var n=f[m],l;for(l in g){this.style[l]=n[l];}});};}e();j=/(outer)/g.test(b)?d[b](h.includeMargin):d[b]();i();return j;}});})(jQuery); /*! A fix for the iOS orientationchange zoom bug. Script by @scottjehl, rebound by @wilto. MIT License. */ /*! A fix for the iOS orientationchange zoom bug. Script by @scottjehl, rebound by @wilto.MIT License.*/(function(a){function l(){c.setAttribute("content",f),g=!0}function m(){c.setAttribute("content",e),g=!1}function n(b){k=b.accelerationIncludingGravity,h=Math.abs(k.x),i=Math.abs(k.y),j=Math.abs(k.z),(!a.orientation||a.orientation===180)&&(h>7||(j>6&&i<8||j<8&&i>6)&&h>5)?g&&m():g||l()}if(!(/iPhone|iPad|iPod/.test(navigator.platform)&&navigator.userAgent.indexOf("AppleWebKit")>-1))return;var b=a.document;if(!b.querySelector)return;var c=b.querySelector("meta[name=viewport]"),d=c&&c.getAttribute("content"),e=d+",maximum-scale=1",f=d+",maximum-scale=10",g=!0,h,i,j,k;if(!c)return;a.addEventListener("orientationchange",l,!1),a.addEventListener("devicemotion",n,!1)})(this); /* [ ---- Panel - datatables ---- ] */ $(document).ready(function() { //* basic icd_datatbles.dt_a(); // horizontal scroll icd_datatbles.dt_b(); //* large table icd_datatbles.dt_c(); //* hideable columns icd_datatbles.dt_d(); //* server side proccessing with hiden row icd_datatbles.dt_e(); }); //* calendar icd_datatbles = { dt_a: function() { $('#dt_a').dataTable({ "sDom": "<'row'<'span6'l><'span6'f>r>t<'row'<'span6'i><'span6'p>>", "sPaginationType": "bootstrap", "oLanguage": { "sLengthMenu": "_MENU_ records per page" } }); }, dt_b: function() { $('#dt_b').dataTable({ "sDom": "<'row'<'span6'l><'span6'f>r>t<'row'<'span6'i><'span6'p>>", "sScrollX": "100%", "sScrollXInner": "110%", "sPaginationType": "bootstrap", "bScrollCollapse": true }); }, dt_c: function() { var aaData = []; for ( var i=1, len=1000 ; i<=len ; i++ ) { aaData.push( [ i, i, i, i, i ] ); } $('#dt_c').dataTable({ "sDom": "<'row'<'span6'><'span6'f>r>t<'row'<'span6'i><'span6'>S>", "sScrollY": "200px", "aaData": aaData, "bDeferRender": true }); $('#fill_table').click(function(){ var aaData = []; for ( var i=1, len=50000; i <= len; i++){ aaData.push( [ i, i, i, i, i ] ); } $('#dt_c').dataTable({ "sDom": "<'row'<'span6'><'span6'f>r>t<'row'<'span6'i><'span6'>S>", "sScrollY": "200px", "aaData": aaData, "bDestroy": true, "bDeferRender": true }); $(this).remove(); $('#entries').html('50 000'); $('.dataTables_scrollHeadInner').css({'height':'34px','top':'0'}); }); }, dt_d: function() { function fnShowHide( iCol ) { /* Get the DataTables object again - this is not a recreation, just a get of the object */ var oTable = $('#dt_d').dataTable(); var bVis = oTable.fnSettings().aoColumns[iCol].bVisible; oTable.fnSetColumnVis( iCol, bVis ? false : true ); } var oTable = $('#dt_d').dataTable({ "sDom": "<'row'<'span6'l><'span6'f>r>t<'row'<'span6'i><'span6'p>>", "sPaginationType": "bootstrap" }); $('#dt_d_nav').on('click','li input',function(){ fnShowHide( $(this).val() ); }); }, dt_e: function(){ if($('#dt_e').length) { var oTable; /* Formating function for row details */ function fnFormatDetails ( nTr ) { var aData = oTable.fnGetData( nTr ); var sOut = ''; sOut += ''; sOut += ''; sOut += ''; sOut += '
Rendering engine:'+aData[2]+' '+aData[5]+'
Link to source:Could provide a link here
Extra info:And any further details here (images etc)
'; return sOut; } oTable = $('#dt_e').dataTable( { "bProcessing": true, "bServerSide": true, "sPaginationType": "bootstrap", "sDom": "<'row'<'span6'l><'span6'f>r>t<'row'<'span6'i><'span6'p>>", "sAjaxSource": "lib/datatables/server_side.php", "aoColumns": [ { "sClass": "center", "bSortable": false }, null, null, null, { "sClass": "center" }, { "sClass": "center" } ], "aaSorting": [[1, 'asc']] } ); $('#dt_e').on('click','tbody td img', function () { var nTr = $(this).parents('tr')[0]; if ( oTable.fnIsOpen(nTr) ) { /* This row is already open - close it */ this.src = "img/details_open.png"; oTable.fnClose( nTr ); } else { /* Open this row */ this.src = "img/details_close.png"; oTable.fnOpen( nTr, fnFormatDetails(nTr), 'details' ); } } ); } } };