Table copied'+
+ 'Copied '+len+' row'+plural+' to the clipboard.
',
+ 1500
+ );
+ }
+ } ),
+
+ "pdf": $.extend( {}, TableTools.buttonBase, {
+ "sAction": "flash_pdf",
+ "sNewLine": "\n",
+ "sFileName": "*.pdf",
+ "sButtonClass": "DTTT_button_pdf",
+ "sButtonText": "PDF",
+ "sPdfOrientation": "portrait",
+ "sPdfSize": "A4",
+ "sPdfMessage": "",
+ "fnClick": function( nButton, oConfig, flash ) {
+ this.fnSetText( flash,
+ "title:"+ this.fnGetTitle(oConfig) +"\n"+
+ "message:"+ oConfig.sPdfMessage +"\n"+
+ "colWidth:"+ this.fnCalcColRatios(oConfig) +"\n"+
+ "orientation:"+ oConfig.sPdfOrientation +"\n"+
+ "size:"+ oConfig.sPdfSize +"\n"+
+ "--/TableToolsOpts--\n" +
+ this.fnGetTableData(oConfig)
+ );
+ }
+ } ),
+
+ "print": $.extend( {}, TableTools.buttonBase, {
+ "sInfo": "Print view
Please use your browser's print function to "+
+ "print this table. Press escape when finished.",
+ "sMessage": null,
+ "bShowAll": true,
+ "sToolTip": "View print view",
+ "sButtonClass": "DTTT_button_print",
+ "sButtonText": "Print",
+ "fnClick": function ( nButton, oConfig ) {
+ this.fnPrint( true, oConfig );
+ }
+ } ),
+
+ "text": $.extend( {}, TableTools.buttonBase ),
+
+ "select": $.extend( {}, TableTools.buttonBase, {
+ "sButtonText": "Select button",
+ "fnSelect": function( nButton, oConfig ) {
+ if ( this.fnGetSelected().length !== 0 ) {
+ $(nButton).removeClass( this.classes.buttons.disabled );
+ } else {
+ $(nButton).addClass( this.classes.buttons.disabled );
+ }
+ },
+ "fnInit": function( nButton, oConfig ) {
+ $(nButton).addClass( this.classes.buttons.disabled );
+ }
+ } ),
+
+ "select_single": $.extend( {}, TableTools.buttonBase, {
+ "sButtonText": "Select button",
+ "fnSelect": function( nButton, oConfig ) {
+ var iSelected = this.fnGetSelected().length;
+ if ( iSelected == 1 ) {
+ $(nButton).removeClass( this.classes.buttons.disabled );
+ } else {
+ $(nButton).addClass( this.classes.buttons.disabled );
+ }
+ },
+ "fnInit": function( nButton, oConfig ) {
+ $(nButton).addClass( this.classes.buttons.disabled );
+ }
+ } ),
+
+ "select_all": $.extend( {}, TableTools.buttonBase, {
+ "sButtonText": "Select all",
+ "fnClick": function( nButton, oConfig ) {
+ this.fnSelectAll();
+ },
+ "fnSelect": function( nButton, oConfig ) {
+ if ( this.fnGetSelected().length == this.s.dt.fnRecordsDisplay() ) {
+ $(nButton).addClass( this.classes.buttons.disabled );
+ } else {
+ $(nButton).removeClass( this.classes.buttons.disabled );
+ }
+ }
+ } ),
+
+ "select_none": $.extend( {}, TableTools.buttonBase, {
+ "sButtonText": "Deselect all",
+ "fnClick": function( nButton, oConfig ) {
+ this.fnSelectNone();
+ },
+ "fnSelect": function( nButton, oConfig ) {
+ if ( this.fnGetSelected().length !== 0 ) {
+ $(nButton).removeClass( this.classes.buttons.disabled );
+ } else {
+ $(nButton).addClass( this.classes.buttons.disabled );
+ }
+ },
+ "fnInit": function( nButton, oConfig ) {
+ $(nButton).addClass( this.classes.buttons.disabled );
+ }
+ } ),
+
+ "ajax": $.extend( {}, TableTools.buttonBase, {
+ "sAjaxUrl": "/xhr.php",
+ "sButtonText": "Ajax button",
+ "fnClick": function( nButton, oConfig ) {
+ var sData = this.fnGetTableData(oConfig);
+ $.ajax( {
+ "url": oConfig.sAjaxUrl,
+ "data": [
+ { "name": "tableData", "value": sData }
+ ],
+ "success": oConfig.fnAjaxComplete,
+ "dataType": "json",
+ "type": "POST",
+ "cache": false,
+ "error": function () {
+ alert( "Error detected when sending table data to server" );
+ }
+ } );
+ },
+ "fnAjaxComplete": function( json ) {
+ alert( 'Ajax complete' );
+ }
+ } ),
+
+ "div": $.extend( {}, TableTools.buttonBase, {
+ "sAction": "div",
+ "sTag": "div",
+ "sButtonClass": "DTTT_nonbutton",
+ "sButtonText": "Text button"
+ } ),
+
+ "collection": $.extend( {}, TableTools.buttonBase, {
+ "sAction": "collection",
+ "sButtonClass": "DTTT_button_collection",
+ "sButtonText": "Collection",
+ "fnClick": function( nButton, oConfig ) {
+ this._fnCollectionShow(nButton, oConfig);
+ }
+ } )
+};
+/*
+ * on* callback parameters:
+ * 1. node - button element
+ * 2. object - configuration object for this button
+ * 3. object - ZeroClipboard reference (flash button only)
+ * 4. string - Returned string from Flash (flash button only - and only on 'complete')
+ */
+
+
+
+/**
+ * @namespace Classes used by TableTools - allows the styles to be override easily.
+ * Note that when TableTools initialises it will take a copy of the classes object
+ * and will use its internal copy for the remainder of its run time.
+ */
+TableTools.classes = {
+ "container": "DTTT_container",
+ "buttons": {
+ "normal": "DTTT_button",
+ "disabled": "DTTT_disabled"
+ },
+ "collection": {
+ "container": "DTTT_collection",
+ "background": "DTTT_collection_background",
+ "buttons": {
+ "normal": "DTTT_button",
+ "disabled": "DTTT_disabled"
+ }
+ },
+ "select": {
+ "table": "DTTT_selectable",
+ "row": "DTTT_selected"
+ },
+ "print": {
+ "body": "DTTT_Print",
+ "info": "DTTT_print_info",
+ "message": "DTTT_PrintMessage"
+ }
+};
+
+
+/**
+ * @namespace ThemeRoller classes - built in for compatibility with DataTables'
+ * bJQueryUI option.
+ */
+TableTools.classes_themeroller = {
+ "container": "DTTT_container ui-buttonset ui-buttonset-multi",
+ "buttons": {
+ "normal": "DTTT_button ui-button ui-state-default"
+ },
+ "collection": {
+ "container": "DTTT_collection ui-buttonset ui-buttonset-multi"
+ }
+};
+
+
+/**
+ * @namespace TableTools default settings for initialisation
+ */
+TableTools.DEFAULTS = {
+ "sSwfPath": "media/swf/copy_csv_xls_pdf.swf",
+ "sRowSelect": "none",
+ "sSelectedClass": null,
+ "fnPreRowSelect": null,
+ "fnRowSelected": null,
+ "fnRowDeselected": null,
+ "aButtons": [ "copy", "csv", "xls", "pdf", "print" ],
+ "oTags": {
+ "container": "div",
+ "button": "a", // We really want to use buttons here, but Firefox and IE ignore the
+ // click on the Flash element in the button (but not mouse[in|out]).
+ "liner": "span",
+ "collection": {
+ "container": "div",
+ "button": "a",
+ "liner": "span"
+ }
+ }
+};
+
+
+/**
+ * Name of this class
+ * @constant CLASS
+ * @type String
+ * @default TableTools
+ */
+TableTools.prototype.CLASS = "TableTools";
+
+
+/**
+ * TableTools version
+ * @constant VERSION
+ * @type String
+ * @default See code
+ */
+TableTools.VERSION = "2.1.5";
+TableTools.prototype.VERSION = TableTools.VERSION;
+
+
+
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Initialisation
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+ * Register a new feature with DataTables
+ */
+if ( typeof $.fn.dataTable == "function" &&
+ typeof $.fn.dataTableExt.fnVersionCheck == "function" &&
+ $.fn.dataTableExt.fnVersionCheck('1.9.0') )
+{
+ $.fn.dataTableExt.aoFeatures.push( {
+ "fnInit": function( oDTSettings ) {
+ var oOpts = typeof oDTSettings.oInit.oTableTools != 'undefined' ?
+ oDTSettings.oInit.oTableTools : {};
+
+ var oTT = new TableTools( oDTSettings.oInstance, oOpts );
+ TableTools._aInstances.push( oTT );
+
+ return oTT.dom.container;
+ },
+ "cFeature": "T",
+ "sFeature": "TableTools"
+ } );
+}
+else
+{
+ alert( "Warning: TableTools 2 requires DataTables 1.9.0 or newer - www.datatables.net/download");
+}
+
+$.fn.DataTable.TableTools = TableTools;
+
+})(jQuery, window, document);
diff --git a/wqflask/wqflask/static/packages/TableTools/media/js/TableTools.min.js b/wqflask/wqflask/static/packages/TableTools/media/js/TableTools.min.js
new file mode 100644
index 00000000..e580c993
--- /dev/null
+++ b/wqflask/wqflask/static/packages/TableTools/media/js/TableTools.min.js
@@ -0,0 +1,77 @@
+// Simple Set Clipboard System
+// Author: Joseph Huckaby
+var ZeroClipboard_TableTools={version:"1.0.4-TableTools2",clients:{},moviePath:"",nextId:1,$:function(a){"string"==typeof a&&(a=document.getElementById(a));a.addClass||(a.hide=function(){this.style.display="none"},a.show=function(){this.style.display=""},a.addClass=function(a){this.removeClass(a);this.className+=" "+a},a.removeClass=function(a){this.className=this.className.replace(RegExp("\\s*"+a+"\\s*")," ").replace(/^\s+/,"").replace(/\s+$/,"")},a.hasClass=function(a){return!!this.className.match(RegExp("\\s*"+
+a+"\\s*"))});return a},setMoviePath:function(a){this.moviePath=a},dispatch:function(a,b,c){(a=this.clients[a])&&a.receiveEvent(b,c)},register:function(a,b){this.clients[a]=b},getDOMObjectPosition:function(a){var b={left:0,top:0,width:a.width?a.width:a.offsetWidth,height:a.height?a.height:a.offsetHeight};""!=a.style.width&&(b.width=a.style.width.replace("px",""));""!=a.style.height&&(b.height=a.style.height.replace("px",""));for(;a;)b.left+=a.offsetLeft,b.top+=a.offsetTop,a=a.offsetParent;return b},
+Client:function(a){this.handlers={};this.id=ZeroClipboard_TableTools.nextId++;this.movieId="ZeroClipboard_TableToolsMovie_"+this.id;ZeroClipboard_TableTools.register(this.id,this);a&&this.glue(a)}};
+ZeroClipboard_TableTools.Client.prototype={id:0,ready:!1,movie:null,clipText:"",fileName:"",action:"copy",handCursorEnabled:!0,cssEffects:!0,handlers:null,sized:!1,glue:function(a,b){this.domElement=ZeroClipboard_TableTools.$(a);var c=99;this.domElement.style.zIndex&&(c=parseInt(this.domElement.style.zIndex)+1);var d=ZeroClipboard_TableTools.getDOMObjectPosition(this.domElement);this.div=document.createElement("div");var e=this.div.style;e.position="absolute";e.left="0px";e.top="0px";e.width=d.width+
+"px";e.height=d.height+"px";e.zIndex=c;"undefined"!=typeof b&&""!=b&&(this.div.title=b);0!=d.width&&0!=d.height&&(this.sized=!0);this.domElement&&(this.domElement.appendChild(this.div),this.div.innerHTML=this.getHTML(d.width,d.height))},positionElement:function(){var a=ZeroClipboard_TableTools.getDOMObjectPosition(this.domElement),b=this.div.style;b.position="absolute";b.width=a.width+"px";b.height=a.height+"px";0!=a.width&&0!=a.height&&(this.sized=!0,b=this.div.childNodes[0],b.width=a.width,b.height=
+a.height)},getHTML:function(a,b){var c="",d="id="+this.id+"&width="+a+"&height="+b;if(navigator.userAgent.match(/MSIE/))var e=location.href.match(/^https/i)?"https://":"http://",c=c+('');else c+='';return c},hide:function(){this.div&&(this.div.style.left="-2000px")},show:function(){this.reposition()},destroy:function(){if(this.domElement&&this.div){this.hide();this.div.innerHTML="";var a=document.getElementsByTagName("body")[0];try{a.removeChild(this.div)}catch(b){}this.div=this.domElement=null}},reposition:function(a){a&&((this.domElement=ZeroClipboard_TableTools.$(a))||this.hide());if(this.domElement&&this.div){var a=ZeroClipboard_TableTools.getDOMObjectPosition(this.domElement),
+b=this.div.style;b.left=""+a.left+"px";b.top=""+a.top+"px"}},clearText:function(){this.clipText="";this.ready&&this.movie.clearText()},appendText:function(a){this.clipText+=a;this.ready&&this.movie.appendText(a)},setText:function(a){this.clipText=a;this.ready&&this.movie.setText(a)},setCharSet:function(a){this.charSet=a;this.ready&&this.movie.setCharSet(a)},setBomInc:function(a){this.incBom=a;this.ready&&this.movie.setBomInc(a)},setFileName:function(a){this.fileName=a;this.ready&&this.movie.setFileName(a)},
+setAction:function(a){this.action=a;this.ready&&this.movie.setAction(a)},addEventListener:function(a,b){a=a.toString().toLowerCase().replace(/^on/,"");this.handlers[a]||(this.handlers[a]=[]);this.handlers[a].push(b)},setHandCursor:function(a){this.handCursorEnabled=a;this.ready&&this.movie.setHandCursor(a)},setCSSEffects:function(a){this.cssEffects=!!a},receiveEvent:function(a,b){a=a.toString().toLowerCase().replace(/^on/,"");switch(a){case "load":this.movie=document.getElementById(this.movieId);
+if(!this.movie){var c=this;setTimeout(function(){c.receiveEvent("load",null)},1);return}if(!this.ready&&navigator.userAgent.match(/Firefox/)&&navigator.userAgent.match(/Windows/)){c=this;setTimeout(function(){c.receiveEvent("load",null)},100);this.ready=!0;return}this.ready=!0;this.movie.clearText();this.movie.appendText(this.clipText);this.movie.setFileName(this.fileName);this.movie.setAction(this.action);this.movie.setCharSet(this.charSet);this.movie.setBomInc(this.incBom);this.movie.setHandCursor(this.handCursorEnabled);
+break;case "mouseover":this.domElement&&this.cssEffects&&this.recoverActive&&this.domElement.addClass("active");break;case "mouseout":this.domElement&&this.cssEffects&&(this.recoverActive=!1,this.domElement.hasClass("active")&&(this.domElement.removeClass("active"),this.recoverActive=!0));break;case "mousedown":this.domElement&&this.cssEffects&&this.domElement.addClass("active");break;case "mouseup":this.domElement&&this.cssEffects&&(this.domElement.removeClass("active"),this.recoverActive=!1)}if(this.handlers[a])for(var d=
+0,e=this.handlers[a].length;d"\u00a1".toString().length?b.replace(/[^a-zA-Z0-9_\u00A1-\uFFFF\.,\-_ !\(\)]/g,""):b.replace(/[^a-zA-Z0-9_\.,\-_ !\(\)]/g,"")},fnCalcColRatios:function(a){var b=this.s.dt.aoColumns,
+a=this._fnColumnTargets(a.mColumns),c=[],d=0,f=0,e,g;e=0;for(g=a.length;eh?m:h)+"px";l.style.width=(k>o?k:o)+"px";l.className=this.classes.collection.background;e(l).css("opacity",0);g.body.appendChild(l);g.body.appendChild(f);m=e(f).outerWidth();k=e(f).outerHeight();
+j+m>o&&(f.style.left=o-m+"px");d+k>h&&(f.style.top=d-k-e(a).outerHeight()+"px");this.dom.collection.collection=f;this.dom.collection.background=l;setTimeout(function(){e(f).animate({opacity:1},500);e(l).animate({opacity:0.25},500)},10);this.fnResizeButtons();e(l).click(function(){c._fnCollectionHide.call(c,null,null)})},_fnCollectionHide:function(a,b){!(null!==b&&"collection"==b.sExtends)&&null!==this.dom.collection.collection&&(e(this.dom.collection.collection).animate({opacity:0},500,function(){this.style.display=
+"none"}),e(this.dom.collection.background).animate({opacity:0},500,function(){this.parentNode.removeChild(this)}),this.dom.collection.collection=null,this.dom.collection.background=null)},_fnRowSelectConfig:function(){if(this.s.master){var a=this,b=this.s.dt;e(b.nTable).addClass(this.classes.select.table);e(b.nTBody).on("click.DTTT_Select","tr",function(c){this.parentNode==b.nTBody&&null!==b.oInstance.fnGetData(this)&&(a.fnIsSelected(this)?a._fnRowDeselect(this,c):"single"==a.s.select.type?(a.fnSelectNone(),
+a._fnRowSelect(this,c)):"multi"==a.s.select.type&&a._fnRowSelect(this,c))});b.oApi._fnCallbackReg(b,"aoRowCreatedCallback",function(c,d,f){b.aoData[f]._DTTT_selected&&e(c).addClass(a.classes.select.row)},"TableTools-SelectAll")}},_fnRowSelect:function(a,b){var c=this._fnSelectData(a),d=[],f,j;f=0;for(j=c.length;f/g,
+"").replace(/^\s+|\s+$/g,""),h=this._fnHtmlDecode(h),j.push(this._fnBoundData(h,a.sFieldBoundary,l)));g.push(j.join(a.sFieldSeperator))}var p=k.aiDisplay;f=this.fnGetSelected();if("none"!==this.s.select.type&&d&&0!==f.length){p=[];b=0;for(c=f.length;b]+)).*?>/gi,"$1$2$3"),h=h.replace(/<.*?>/g,"")):h+="",h=h.replace(/^\s+/,"").replace(/\s+$/,""),h=this._fnHtmlDecode(h),j.push(this._fnBoundData(h,a.sFieldBoundary,l)));g.push(j.join(a.sFieldSeperator));a.bOpenRows&&(b=e.grep(k.aoOpenRows,function(a){return a.nParent===o}),1===b.length&&(h=this._fnBoundData(e("td",b[0].nTr).html(),a.sFieldBoundary,l),g.push(h)))}if(a.bFooter&&null!==k.nTFoot){j=[];b=0;for(c=k.aoColumns.length;b<
+c;b++)n[b]&&null!==k.aoColumns[b].nTf&&(h=k.aoColumns[b].nTf.innerHTML.replace(/\n/g," ").replace(/<.*?>/g,""),h=this._fnHtmlDecode(h),j.push(this._fnBoundData(h,a.sFieldBoundary,l)));g.push(j.join(a.sFieldSeperator))}return _sLastData=g.join(this._fnNewline(a))},_fnBoundData:function(a,b,c){return""===b?a:b+a.replace(c,b+b)+b},_fnChunkData:function(a,b){for(var c=[],d=a.length,f=0;fTable copiedCopied "+a+" row"+(1==a?"":"s")+
+" to the clipboard.
",1500)}}),pdf:e.extend({},TableTools.buttonBase,{sAction:"flash_pdf",sNewLine:"\n",sFileName:"*.pdf",sButtonClass:"DTTT_button_pdf",sButtonText:"PDF",sPdfOrientation:"portrait",sPdfSize:"A4",sPdfMessage:"",fnClick:function(a,b,c){this.fnSetText(c,"title:"+this.fnGetTitle(b)+"\nmessage:"+b.sPdfMessage+"\ncolWidth:"+this.fnCalcColRatios(b)+"\norientation:"+b.sPdfOrientation+"\nsize:"+b.sPdfSize+"\n--/TableToolsOpts--\n"+this.fnGetTableData(b))}}),print:e.extend({},TableTools.buttonBase,
+{sInfo:"Print view
Please use your browser's print function to print this table. Press escape when finished.",sMessage:null,bShowAll:!0,sToolTip:"View print view",sButtonClass:"DTTT_button_print",sButtonText:"Print",fnClick:function(a,b){this.fnPrint(!0,b)}}),text:e.extend({},TableTools.buttonBase),select:e.extend({},TableTools.buttonBase,{sButtonText:"Select button",fnSelect:function(a){0!==this.fnGetSelected().length?e(a).removeClass(this.classes.buttons.disabled):e(a).addClass(this.classes.buttons.disabled)},
+fnInit:function(a){e(a).addClass(this.classes.buttons.disabled)}}),select_single:e.extend({},TableTools.buttonBase,{sButtonText:"Select button",fnSelect:function(a){1==this.fnGetSelected().length?e(a).removeClass(this.classes.buttons.disabled):e(a).addClass(this.classes.buttons.disabled)},fnInit:function(a){e(a).addClass(this.classes.buttons.disabled)}}),select_all:e.extend({},TableTools.buttonBase,{sButtonText:"Select all",fnClick:function(){this.fnSelectAll()},fnSelect:function(a){this.fnGetSelected().length==
+this.s.dt.fnRecordsDisplay()?e(a).addClass(this.classes.buttons.disabled):e(a).removeClass(this.classes.buttons.disabled)}}),select_none:e.extend({},TableTools.buttonBase,{sButtonText:"Deselect all",fnClick:function(){this.fnSelectNone()},fnSelect:function(a){0!==this.fnGetSelected().length?e(a).removeClass(this.classes.buttons.disabled):e(a).addClass(this.classes.buttons.disabled)},fnInit:function(a){e(a).addClass(this.classes.buttons.disabled)}}),ajax:e.extend({},TableTools.buttonBase,{sAjaxUrl:"/xhr.php",
+sButtonText:"Ajax button",fnClick:function(a,b){var c=this.fnGetTableData(b);e.ajax({url:b.sAjaxUrl,data:[{name:"tableData",value:c}],success:b.fnAjaxComplete,dataType:"json",type:"POST",cache:!1,error:function(){alert("Error detected when sending table data to server")}})},fnAjaxComplete:function(){alert("Ajax complete")}}),div:e.extend({},TableTools.buttonBase,{sAction:"div",sTag:"div",sButtonClass:"DTTT_nonbutton",sButtonText:"Text button"}),collection:e.extend({},TableTools.buttonBase,{sAction:"collection",
+sButtonClass:"DTTT_button_collection",sButtonText:"Collection",fnClick:function(a,b){this._fnCollectionShow(a,b)}})};TableTools.classes={container:"DTTT_container",buttons:{normal:"DTTT_button",disabled:"DTTT_disabled"},collection:{container:"DTTT_collection",background:"DTTT_collection_background",buttons:{normal:"DTTT_button",disabled:"DTTT_disabled"}},select:{table:"DTTT_selectable",row:"DTTT_selected"},print:{body:"DTTT_Print",info:"DTTT_print_info",message:"DTTT_PrintMessage"}};TableTools.classes_themeroller=
+{container:"DTTT_container ui-buttonset ui-buttonset-multi",buttons:{normal:"DTTT_button ui-button ui-state-default"},collection:{container:"DTTT_collection ui-buttonset ui-buttonset-multi"}};TableTools.DEFAULTS={sSwfPath:"media/swf/copy_csv_xls_pdf.swf",sRowSelect:"none",sSelectedClass:null,fnPreRowSelect:null,fnRowSelected:null,fnRowDeselected:null,aButtons:["copy","csv","xls","pdf","print"],oTags:{container:"div",button:"a",liner:"span",collection:{container:"div",button:"a",liner:"span"}}};TableTools.prototype.CLASS=
+"TableTools";TableTools.VERSION="2.1.5";TableTools.prototype.VERSION=TableTools.VERSION;"function"==typeof e.fn.dataTable&&"function"==typeof e.fn.dataTableExt.fnVersionCheck&&e.fn.dataTableExt.fnVersionCheck("1.9.0")?e.fn.dataTableExt.aoFeatures.push({fnInit:function(a){a=new TableTools(a.oInstance,"undefined"!=typeof a.oInit.oTableTools?a.oInit.oTableTools:{});TableTools._aInstances.push(a);return a.dom.container},cFeature:"T",sFeature:"TableTools"}):alert("Warning: TableTools 2 requires DataTables 1.9.0 or newer - www.datatables.net/download");
+e.fn.DataTable.TableTools=TableTools})(jQuery,window,document);
diff --git a/wqflask/wqflask/static/packages/TableTools/media/js/TableTools.min.js.gz b/wqflask/wqflask/static/packages/TableTools/media/js/TableTools.min.js.gz
new file mode 100644
index 00000000..01ce7c04
Binary files /dev/null and b/wqflask/wqflask/static/packages/TableTools/media/js/TableTools.min.js.gz differ
diff --git a/wqflask/wqflask/static/packages/TableTools/media/js/ZeroClipboard.js b/wqflask/wqflask/static/packages/TableTools/media/js/ZeroClipboard.js
new file mode 100755
index 00000000..de0f6b67
--- /dev/null
+++ b/wqflask/wqflask/static/packages/TableTools/media/js/ZeroClipboard.js
@@ -0,0 +1,367 @@
+// Simple Set Clipboard System
+// Author: Joseph Huckaby
+
+var ZeroClipboard_TableTools = {
+
+ version: "1.0.4-TableTools2",
+ clients: {}, // registered upload clients on page, indexed by id
+ moviePath: '', // URL to movie
+ nextId: 1, // ID of next movie
+
+ $: function(thingy) {
+ // simple DOM lookup utility function
+ if (typeof(thingy) == 'string') thingy = document.getElementById(thingy);
+ if (!thingy.addClass) {
+ // extend element with a few useful methods
+ thingy.hide = function() { this.style.display = 'none'; };
+ thingy.show = function() { this.style.display = ''; };
+ thingy.addClass = function(name) { this.removeClass(name); this.className += ' ' + name; };
+ thingy.removeClass = function(name) {
+ this.className = this.className.replace( new RegExp("\\s*" + name + "\\s*"), " ").replace(/^\s+/, '').replace(/\s+$/, '');
+ };
+ thingy.hasClass = function(name) {
+ return !!this.className.match( new RegExp("\\s*" + name + "\\s*") );
+ }
+ }
+ return thingy;
+ },
+
+ setMoviePath: function(path) {
+ // set path to ZeroClipboard.swf
+ this.moviePath = path;
+ },
+
+ dispatch: function(id, eventName, args) {
+ // receive event from flash movie, send to client
+ var client = this.clients[id];
+ if (client) {
+ client.receiveEvent(eventName, args);
+ }
+ },
+
+ register: function(id, client) {
+ // register new client to receive events
+ this.clients[id] = client;
+ },
+
+ getDOMObjectPosition: function(obj) {
+ // get absolute coordinates for dom element
+ var info = {
+ left: 0,
+ top: 0,
+ width: obj.width ? obj.width : obj.offsetWidth,
+ height: obj.height ? obj.height : obj.offsetHeight
+ };
+
+ if ( obj.style.width != "" )
+ info.width = obj.style.width.replace("px","");
+
+ if ( obj.style.height != "" )
+ info.height = obj.style.height.replace("px","");
+
+ while (obj) {
+ info.left += obj.offsetLeft;
+ info.top += obj.offsetTop;
+ obj = obj.offsetParent;
+ }
+
+ return info;
+ },
+
+ Client: function(elem) {
+ // constructor for new simple upload client
+ this.handlers = {};
+
+ // unique ID
+ this.id = ZeroClipboard_TableTools.nextId++;
+ this.movieId = 'ZeroClipboard_TableToolsMovie_' + this.id;
+
+ // register client with singleton to receive flash events
+ ZeroClipboard_TableTools.register(this.id, this);
+
+ // create movie
+ if (elem) this.glue(elem);
+ }
+};
+
+ZeroClipboard_TableTools.Client.prototype = {
+
+ id: 0, // unique ID for us
+ ready: false, // whether movie is ready to receive events or not
+ movie: null, // reference to movie object
+ clipText: '', // text to copy to clipboard
+ fileName: '', // default file save name
+ action: 'copy', // action to perform
+ handCursorEnabled: true, // whether to show hand cursor, or default pointer cursor
+ cssEffects: true, // enable CSS mouse effects on dom container
+ handlers: null, // user event handlers
+ sized: false,
+
+ glue: function(elem, title) {
+ // glue to DOM element
+ // elem can be ID or actual DOM element object
+ this.domElement = ZeroClipboard_TableTools.$(elem);
+
+ // float just above object, or zIndex 99 if dom element isn't set
+ var zIndex = 99;
+ if (this.domElement.style.zIndex) {
+ zIndex = parseInt(this.domElement.style.zIndex) + 1;
+ }
+
+ // find X/Y position of domElement
+ var box = ZeroClipboard_TableTools.getDOMObjectPosition(this.domElement);
+
+ // create floating DIV above element
+ this.div = document.createElement('div');
+ var style = this.div.style;
+ style.position = 'absolute';
+ style.left = '0px';
+ style.top = '0px';
+ style.width = (box.width) + 'px';
+ style.height = box.height + 'px';
+ style.zIndex = zIndex;
+
+ if ( typeof title != "undefined" && title != "" ) {
+ this.div.title = title;
+ }
+ if ( box.width != 0 && box.height != 0 ) {
+ this.sized = true;
+ }
+
+ // style.backgroundColor = '#f00'; // debug
+ if ( this.domElement ) {
+ this.domElement.appendChild(this.div);
+ this.div.innerHTML = this.getHTML( box.width, box.height );
+ }
+ },
+
+ positionElement: function() {
+ var box = ZeroClipboard_TableTools.getDOMObjectPosition(this.domElement);
+ var style = this.div.style;
+
+ style.position = 'absolute';
+ //style.left = (this.domElement.offsetLeft)+'px';
+ //style.top = this.domElement.offsetTop+'px';
+ style.width = box.width + 'px';
+ style.height = box.height + 'px';
+
+ if ( box.width != 0 && box.height != 0 ) {
+ this.sized = true;
+ } else {
+ return;
+ }
+
+ var flash = this.div.childNodes[0];
+ flash.width = box.width;
+ flash.height = box.height;
+ },
+
+ getHTML: function(width, height) {
+ // return HTML for movie
+ var html = '';
+ var flashvars = 'id=' + this.id +
+ '&width=' + width +
+ '&height=' + height;
+
+ if (navigator.userAgent.match(/MSIE/)) {
+ // IE gets an OBJECT tag
+ var protocol = location.href.match(/^https/i) ? 'https://' : 'http://';
+ html += '';
+ }
+ else {
+ // all other browsers get an EMBED tag
+ html += '';
+ }
+ return html;
+ },
+
+ hide: function() {
+ // temporarily hide floater offscreen
+ if (this.div) {
+ this.div.style.left = '-2000px';
+ }
+ },
+
+ show: function() {
+ // show ourselves after a call to hide()
+ this.reposition();
+ },
+
+ destroy: function() {
+ // destroy control and floater
+ if (this.domElement && this.div) {
+ this.hide();
+ this.div.innerHTML = '';
+
+ var body = document.getElementsByTagName('body')[0];
+ try { body.removeChild( this.div ); } catch(e) {;}
+
+ this.domElement = null;
+ this.div = null;
+ }
+ },
+
+ reposition: function(elem) {
+ // reposition our floating div, optionally to new container
+ // warning: container CANNOT change size, only position
+ if (elem) {
+ this.domElement = ZeroClipboard_TableTools.$(elem);
+ if (!this.domElement) this.hide();
+ }
+
+ if (this.domElement && this.div) {
+ var box = ZeroClipboard_TableTools.getDOMObjectPosition(this.domElement);
+ var style = this.div.style;
+ style.left = '' + box.left + 'px';
+ style.top = '' + box.top + 'px';
+ }
+ },
+
+ clearText: function() {
+ // clear the text to be copy / saved
+ this.clipText = '';
+ if (this.ready) this.movie.clearText();
+ },
+
+ appendText: function(newText) {
+ // append text to that which is to be copied / saved
+ this.clipText += newText;
+ if (this.ready) { this.movie.appendText(newText) ;}
+ },
+
+ setText: function(newText) {
+ // set text to be copied to be copied / saved
+ this.clipText = newText;
+ if (this.ready) { this.movie.setText(newText) ;}
+ },
+
+ setCharSet: function(charSet) {
+ // set the character set (UTF16LE or UTF8)
+ this.charSet = charSet;
+ if (this.ready) { this.movie.setCharSet(charSet) ;}
+ },
+
+ setBomInc: function(bomInc) {
+ // set if the BOM should be included or not
+ this.incBom = bomInc;
+ if (this.ready) { this.movie.setBomInc(bomInc) ;}
+ },
+
+ setFileName: function(newText) {
+ // set the file name
+ this.fileName = newText;
+ if (this.ready) this.movie.setFileName(newText);
+ },
+
+ setAction: function(newText) {
+ // set action (save or copy)
+ this.action = newText;
+ if (this.ready) this.movie.setAction(newText);
+ },
+
+ addEventListener: function(eventName, func) {
+ // add user event listener for event
+ // event types: load, queueStart, fileStart, fileComplete, queueComplete, progress, error, cancel
+ eventName = eventName.toString().toLowerCase().replace(/^on/, '');
+ if (!this.handlers[eventName]) this.handlers[eventName] = [];
+ this.handlers[eventName].push(func);
+ },
+
+ setHandCursor: function(enabled) {
+ // enable hand cursor (true), or default arrow cursor (false)
+ this.handCursorEnabled = enabled;
+ if (this.ready) this.movie.setHandCursor(enabled);
+ },
+
+ setCSSEffects: function(enabled) {
+ // enable or disable CSS effects on DOM container
+ this.cssEffects = !!enabled;
+ },
+
+ receiveEvent: function(eventName, args) {
+ // receive event from flash
+ eventName = eventName.toString().toLowerCase().replace(/^on/, '');
+
+ // special behavior for certain events
+ switch (eventName) {
+ case 'load':
+ // movie claims it is ready, but in IE this isn't always the case...
+ // bug fix: Cannot extend EMBED DOM elements in Firefox, must use traditional function
+ this.movie = document.getElementById(this.movieId);
+ if (!this.movie) {
+ var self = this;
+ setTimeout( function() { self.receiveEvent('load', null); }, 1 );
+ return;
+ }
+
+ // firefox on pc needs a "kick" in order to set these in certain cases
+ if (!this.ready && navigator.userAgent.match(/Firefox/) && navigator.userAgent.match(/Windows/)) {
+ var self = this;
+ setTimeout( function() { self.receiveEvent('load', null); }, 100 );
+ this.ready = true;
+ return;
+ }
+
+ this.ready = true;
+ this.movie.clearText();
+ this.movie.appendText( this.clipText );
+ this.movie.setFileName( this.fileName );
+ this.movie.setAction( this.action );
+ this.movie.setCharSet( this.charSet );
+ this.movie.setBomInc( this.incBom );
+ this.movie.setHandCursor( this.handCursorEnabled );
+ break;
+
+ case 'mouseover':
+ if (this.domElement && this.cssEffects) {
+ //this.domElement.addClass('hover');
+ if (this.recoverActive) this.domElement.addClass('active');
+ }
+ break;
+
+ case 'mouseout':
+ if (this.domElement && this.cssEffects) {
+ this.recoverActive = false;
+ if (this.domElement.hasClass('active')) {
+ this.domElement.removeClass('active');
+ this.recoverActive = true;
+ }
+ //this.domElement.removeClass('hover');
+ }
+ break;
+
+ case 'mousedown':
+ if (this.domElement && this.cssEffects) {
+ this.domElement.addClass('active');
+ }
+ break;
+
+ case 'mouseup':
+ if (this.domElement && this.cssEffects) {
+ this.domElement.removeClass('active');
+ this.recoverActive = false;
+ }
+ break;
+ } // switch eventName
+
+ if (this.handlers[eventName]) {
+ for (var idx = 0, len = this.handlers[eventName].length; idx < len; idx++) {
+ var func = this.handlers[eventName][idx];
+
+ if (typeof(func) == 'function') {
+ // actual function reference
+ func(this, args);
+ }
+ else if ((typeof(func) == 'object') && (func.length == 2)) {
+ // PHP style object + method, i.e. [myObject, 'myMethod']
+ func[0][ func[1] ](this, args);
+ }
+ else if (typeof(func) == 'string') {
+ // name of function
+ window[func](this, args);
+ }
+ } // foreach event handler defined
+ } // user defined handler for event
+ }
+
+};
diff --git a/wqflask/wqflask/static/packages/TableTools/media/swf/copy_csv_xls.swf b/wqflask/wqflask/static/packages/TableTools/media/swf/copy_csv_xls.swf
new file mode 100644
index 00000000..082c7acb
Binary files /dev/null and b/wqflask/wqflask/static/packages/TableTools/media/swf/copy_csv_xls.swf differ
diff --git a/wqflask/wqflask/static/packages/TableTools/media/swf/copy_csv_xls_pdf.swf b/wqflask/wqflask/static/packages/TableTools/media/swf/copy_csv_xls_pdf.swf
new file mode 100644
index 00000000..063131df
Binary files /dev/null and b/wqflask/wqflask/static/packages/TableTools/media/swf/copy_csv_xls_pdf.swf differ
diff --git a/wqflask/wqflask/static/packages/TableTools/multi_instance.html b/wqflask/wqflask/static/packages/TableTools/multi_instance.html
new file mode 100755
index 00000000..14e1e63e
--- /dev/null
+++ b/wqflask/wqflask/static/packages/TableTools/multi_instance.html
@@ -0,0 +1,499 @@
+
+
+
+
+
+
+ TableTools example
+
+
+
+
+
+
+
+
+
+
+ TableTools example - multiple toolbars
+
+
+
Preamble
+
Like all DataTables control elements, TableTools can have multiple instances specified in the sDom parameter of DataTables. This will create two TableTools toolbars next to the table, providing the same functions. An example of when this might be useful is to show the toolbar both above and below the table - as is done in this example.
+
+
+
Live example
+
+
+
+
+ Rendering engine |
+ Browser |
+ Platform(s) |
+ Engine version |
+ CSS grade |
+
+
+
+
+ Rendering engine |
+ Browser |
+ Platform(s) |
+ Engine version |
+ CSS grade |
+
+
+
+
+ Trident |
+ Internet Explorer 4.0 |
+ Win 95+ (Entity: &) |
+ 4 |
+ X |
+
+
+ Trident |
+ Internet Explorer 5.0 |
+ Win 95+ |
+ 5 |
+ C |
+
+
+ Trident |
+ Internet Explorer 5.5 |
+ Win 95+ |
+ 5.5 |
+ A |
+
+
+ Trident |
+ Internet Explorer 6 |
+ Win 98+ |
+ 6 |
+ A |
+
+
+ Trident |
+ Internet Explorer 7 |
+ Win XP SP2+ |
+ 7 |
+ A |
+
+
+ Trident |
+ AOL browser (AOL desktop) |
+ Win XP |
+ 6 |
+ A |
+
+
+ Gecko (UTF-8: $¢€) |
+ Firefox 1.0 |
+ Win 98+ / OSX.2+ |
+ 1.7 |
+ A |
+
+
+ Gecko |
+ Firefox 1.5 |
+ Win 98+ / OSX.2+ |
+ 1.8 |
+ A |
+
+
+ Gecko |
+ Firefox 2.0 |
+ Win 98+ / OSX.2+ |
+ 1.8 |
+ A |
+
+
+ Gecko |
+ Firefox 3.0 |
+ Win 2k+ / OSX.3+ |
+ 1.9 |
+ A |
+
+
+ Gecko |
+ Camino 1.0 |
+ OSX.2+ |
+ 1.8 |
+ A |
+
+
+ Gecko |
+ Camino 1.5 |
+ OSX.3+ |
+ 1.8 |
+ A |
+
+
+ Gecko |
+ Netscape 7.2 |
+ Win 95+ / Mac OS 8.6-9.2 |
+ 1.7 |
+ A |
+
+
+ Gecko |
+ Netscape Browser 8 |
+ Win 98SE+ |
+ 1.7 |
+ A |
+
+
+ Gecko |
+ Netscape Navigator 9 |
+ Win 98+ / OSX.2+ |
+ 1.8 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.0 |
+ Win 95+ / OSX.1+ |
+ 1 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.1 |
+ Win 95+ / OSX.1+ |
+ 1.1 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.2 |
+ Win 95+ / OSX.1+ |
+ 1.2 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.3 |
+ Win 95+ / OSX.1+ |
+ 1.3 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.4 |
+ Win 95+ / OSX.1+ |
+ 1.4 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.5 |
+ Win 95+ / OSX.1+ |
+ 1.5 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.6 |
+ Win 95+ / OSX.1+ |
+ 1.6 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.7 |
+ Win 98+ / OSX.1+ |
+ 1.7 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.8 |
+ Win 98+ / OSX.1+ |
+ 1.8 |
+ A |
+
+
+ Gecko |
+ Seamonkey 1.1 |
+ Win 98+ / OSX.2+ |
+ 1.8 |
+ A |
+
+
+ Gecko |
+ Epiphany 2.20 |
+ Gnome |
+ 1.8 |
+ A |
+
+
+ Webkit |
+ Safari 1.2 |
+ OSX.3 |
+ 125.5 |
+ A |
+
+
+ Webkit |
+ Safari 1.3 |
+ OSX.3 |
+ 312.8 |
+ A |
+
+
+ Webkit |
+ Safari 2.0 |
+ OSX.4+ |
+ 419.3 |
+ A |
+
+
+ Webkit |
+ Safari 3.0 |
+ OSX.4+ |
+ 522.1 |
+ A |
+
+
+ Webkit |
+ OmniWeb 5.5 |
+ OSX.4+ |
+ 420 |
+ A |
+
+
+ Webkit |
+ iPod Touch / iPhone |
+ iPod |
+ 420.1 |
+ A |
+
+
+ Webkit |
+ S60 |
+ S60 |
+ 413 |
+ A |
+
+
+ Presto |
+ Opera 7.0 |
+ Win 95+ / OSX.1+ |
+ - |
+ A |
+
+
+ Presto |
+ Opera 7.5 |
+ Win 95+ / OSX.2+ |
+ - |
+ A |
+
+
+ Presto |
+ Opera 8.0 |
+ Win 95+ / OSX.2+ |
+ - |
+ A |
+
+
+ Presto |
+ Opera 8.5 |
+ Win 95+ / OSX.2+ |
+ - |
+ A |
+
+
+ Presto |
+ Opera 9.0 |
+ Win 95+ / OSX.3+ |
+ - |
+ A |
+
+
+ Presto |
+ Opera 9.2 |
+ Win 88+ / OSX.3+ |
+ - |
+ A |
+
+
+ Presto |
+ Opera 9.5 |
+ Win 88+ / OSX.3+ |
+ - |
+ A |
+
+
+ Presto |
+ Opera for Wii |
+ Wii |
+ - |
+ A |
+
+
+ Presto |
+ Nokia N800 |
+ N800 |
+ - |
+ A |
+
+
+ Presto |
+ Nintendo DS browser |
+ Nintendo DS |
+ 8.5 |
+ C/A1 |
+
+
+ KHTML |
+ Konqureror 3.1 |
+ KDE 3.1 |
+ 3.1 |
+ C |
+
+
+ KHTML |
+ Konqureror 3.3 |
+ KDE 3.3 |
+ 3.3 |
+ A |
+
+
+ KHTML |
+ Konqureror 3.5 |
+ KDE 3.5 |
+ 3.5 |
+ A |
+
+
+ Tasman |
+ Internet Explorer 4.5 |
+ Mac OS 8-9 |
+ - |
+ X |
+
+
+ Tasman |
+ Internet Explorer 5.1 |
+ Mac OS 7.6-9 |
+ 1 |
+ C |
+
+
+ Tasman |
+ Internet Explorer 5.2 |
+ Mac OS 8-X |
+ 1 |
+ C |
+
+
+ Misc |
+ NetFront 3.1 |
+ Embedded devices |
+ - |
+ C |
+
+
+ Misc |
+ NetFront 3.4 |
+ Embedded devices |
+ - |
+ A |
+
+
+ Misc |
+ Dillo 0.8 |
+ Embedded devices |
+ - |
+ X |
+
+
+ Misc |
+ Links |
+ Text only |
+ - |
+ X |
+
+
+ Misc |
+ Lynx |
+ Text only |
+ - |
+ X |
+
+
+ Misc |
+ IE Mobile |
+ Windows Mobile 6 |
+ - |
+ C |
+
+
+ Misc |
+ PSP browser |
+ PSP |
+ - |
+ C |
+
+
+ Other browsers |
+ All others |
+ - |
+ - |
+ U |
+
+
+
+
+
+
+
+
Initialisation code
+
$(document).ready( function () {
+ $('#example').dataTable( {
+ "sDom": 'T<"clear">lfrtip<"clear spacer">T'
+ } );
+} );
+
+
+
Other examples
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/wqflask/wqflask/static/packages/TableTools/multiple_tables.html b/wqflask/wqflask/static/packages/TableTools/multiple_tables.html
new file mode 100755
index 00000000..8cd8aef9
--- /dev/null
+++ b/wqflask/wqflask/static/packages/TableTools/multiple_tables.html
@@ -0,0 +1,296 @@
+
+
+
+
+
+
+ TableTools example
+
+
+
+
+
+
+
+
+
+
+ TableTools example - multiple tables
+
+
+
Preamble
+
This example shows how multiple tables can be initialised with DataTables and TableTools in a single call to the $().dataTable() function. Basically it works as you would expect - no special considerations need be made!
+
+
Live example
+
+
+
+
+ Rendering engine |
+ Browser |
+ Platform(s) |
+ Engine version |
+ CSS grade |
+
+
+
+
+ Trident |
+ Internet Explorer 4.0 |
+ Win 95+ (Entity: &) |
+ 4 |
+ X |
+
+
+ Trident |
+ Internet Explorer 5.0 |
+ Win 95+ |
+ 5 |
+ C |
+
+
+ Trident |
+ Internet Explorer 5.5 |
+ Win 95+ |
+ 5.5 |
+ A |
+
+
+ Trident |
+ Internet Explorer 6 |
+ Win 98+ |
+ 6 |
+ A |
+
+
+ Trident |
+ Internet Explorer 7 |
+ Win XP SP2+ |
+ 7 |
+ A |
+
+
+ Trident |
+ AOL browser (AOL desktop) |
+ Win XP |
+ 6 |
+ A |
+
+
+
+
+
+
+
+
+ Rendering engine |
+ Browser |
+ Platform(s) |
+ Engine version |
+ CSS grade |
+
+
+
+
+ Rendering engine |
+ Browser |
+ Platform(s) |
+ Engine version |
+ CSS grade |
+
+
+
+
+ Gecko (UTF-8: $¢€) |
+ Firefox 1.0 |
+ Win 98+ / OSX.2+ |
+ 1.7 |
+ A |
+
+
+ Gecko |
+ Firefox 1.5 |
+ Win 98+ / OSX.2+ |
+ 1.8 |
+ A |
+
+
+ Gecko |
+ Firefox 2.0 |
+ Win 98+ / OSX.2+ |
+ 1.8 |
+ A |
+
+
+ Gecko |
+ Firefox 3.0 |
+ Win 2k+ / OSX.3+ |
+ 1.9 |
+ A |
+
+
+ Gecko |
+ Camino 1.0 |
+ OSX.2+ |
+ 1.8 |
+ A |
+
+
+ Gecko |
+ Camino 1.5 |
+ OSX.3+ |
+ 1.8 |
+ A |
+
+
+ Gecko |
+ Netscape 7.2 |
+ Win 95+ / Mac OS 8.6-9.2 |
+ 1.7 |
+ A |
+
+
+ Gecko |
+ Netscape Browser 8 |
+ Win 98SE+ |
+ 1.7 |
+ A |
+
+
+ Gecko |
+ Netscape Navigator 9 |
+ Win 98+ / OSX.2+ |
+ 1.8 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.0 |
+ Win 95+ / OSX.1+ |
+ 1 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.1 |
+ Win 95+ / OSX.1+ |
+ 1.1 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.2 |
+ Win 95+ / OSX.1+ |
+ 1.2 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.3 |
+ Win 95+ / OSX.1+ |
+ 1.3 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.4 |
+ Win 95+ / OSX.1+ |
+ 1.4 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.5 |
+ Win 95+ / OSX.1+ |
+ 1.5 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.6 |
+ Win 95+ / OSX.1+ |
+ 1.6 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.7 |
+ Win 98+ / OSX.1+ |
+ 1.7 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.8 |
+ Win 98+ / OSX.1+ |
+ 1.8 |
+ A |
+
+
+ Gecko |
+ Seamonkey 1.1 |
+ Win 98+ / OSX.2+ |
+ 1.8 |
+ A |
+
+
+ Gecko |
+ Epiphany 2.20 |
+ Gnome |
+ 1.8 |
+ A |
+
+
+
+
+
+
+
+
Initialisation code
+
$(document).ready( function () {
+ $('#example').dataTable( {
+ "sDom": 'T<"clear">lfrtip'
+ } );
+} );
+
+
+
Other examples
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/wqflask/wqflask/static/packages/TableTools/pdf_message.html b/wqflask/wqflask/static/packages/TableTools/pdf_message.html
new file mode 100755
index 00000000..e8f66e12
--- /dev/null
+++ b/wqflask/wqflask/static/packages/TableTools/pdf_message.html
@@ -0,0 +1,524 @@
+
+
+
+
+
+
+ TableTools example
+
+
+
+
+
+
+
+
+
+
+ TableTools example
+
+
+
Preamble
+
This example shows how you can add a message to the saved PDF using the 'sPdfMessage' parameter. It also shows that the orientation of the output PDF can be changed to landscape which is useful if you have a lot of columns.
+
+
Live example
+
+
+
+
+ Rendering engine |
+ Browser |
+ Platform(s) |
+ Engine version |
+ CSS grade |
+
+
+
+
+ Rendering engine |
+ Browser |
+ Platform(s) |
+ Engine version |
+ CSS grade |
+
+
+
+
+ Trident |
+ Internet Explorer 4.0 |
+ Win 95+ (Entity: &) |
+ 4 |
+ X |
+
+
+ Trident |
+ Internet Explorer 5.0 |
+ Win 95+ |
+ 5 |
+ C |
+
+
+ Trident |
+ Internet Explorer 5.5 |
+ Win 95+ |
+ 5.5 |
+ A |
+
+
+ Trident |
+ Internet Explorer 6 |
+ Win 98+ |
+ 6 |
+ A |
+
+
+ Trident |
+ Internet Explorer 7 |
+ Win XP SP2+ |
+ 7 |
+ A |
+
+
+ Trident |
+ AOL browser (AOL desktop) |
+ Win XP |
+ 6 |
+ A |
+
+
+ Gecko (UTF-8: $¢€) |
+ Firefox 1.0 |
+ Win 98+ / OSX.2+ |
+ 1.7 |
+ A |
+
+
+ Gecko |
+ Firefox 1.5 |
+ Win 98+ / OSX.2+ |
+ 1.8 |
+ A |
+
+
+ Gecko |
+ Firefox 2.0 |
+ Win 98+ / OSX.2+ |
+ 1.8 |
+ A |
+
+
+ Gecko |
+ Firefox 3.0 |
+ Win 2k+ / OSX.3+ |
+ 1.9 |
+ A |
+
+
+ Gecko |
+ Camino 1.0 |
+ OSX.2+ |
+ 1.8 |
+ A |
+
+
+ Gecko |
+ Camino 1.5 |
+ OSX.3+ |
+ 1.8 |
+ A |
+
+
+ Gecko |
+ Netscape 7.2 |
+ Win 95+ / Mac OS 8.6-9.2 |
+ 1.7 |
+ A |
+
+
+ Gecko |
+ Netscape Browser 8 |
+ Win 98SE+ |
+ 1.7 |
+ A |
+
+
+ Gecko |
+ Netscape Navigator 9 |
+ Win 98+ / OSX.2+ |
+ 1.8 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.0 |
+ Win 95+ / OSX.1+ |
+ 1 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.1 |
+ Win 95+ / OSX.1+ |
+ 1.1 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.2 |
+ Win 95+ / OSX.1+ |
+ 1.2 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.3 |
+ Win 95+ / OSX.1+ |
+ 1.3 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.4 |
+ Win 95+ / OSX.1+ |
+ 1.4 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.5 |
+ Win 95+ / OSX.1+ |
+ 1.5 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.6 |
+ Win 95+ / OSX.1+ |
+ 1.6 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.7 |
+ Win 98+ / OSX.1+ |
+ 1.7 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.8 |
+ Win 98+ / OSX.1+ |
+ 1.8 |
+ A |
+
+
+ Gecko |
+ Seamonkey 1.1 |
+ Win 98+ / OSX.2+ |
+ 1.8 |
+ A |
+
+
+ Gecko |
+ Epiphany 2.20 |
+ Gnome |
+ 1.8 |
+ A |
+
+
+ Webkit |
+ Safari 1.2 |
+ OSX.3 |
+ 125.5 |
+ A |
+
+
+ Webkit |
+ Safari 1.3 |
+ OSX.3 |
+ 312.8 |
+ A |
+
+
+ Webkit |
+ Safari 2.0 |
+ OSX.4+ |
+ 419.3 |
+ A |
+
+
+ Webkit |
+ Safari 3.0 |
+ OSX.4+ |
+ 522.1 |
+ A |
+
+
+ Webkit |
+ OmniWeb 5.5 |
+ OSX.4+ |
+ 420 |
+ A |
+
+
+ Webkit |
+ iPod Touch / iPhone |
+ iPod |
+ 420.1 |
+ A |
+
+
+ Webkit |
+ S60 |
+ S60 |
+ 413 |
+ A |
+
+
+ Presto |
+ Opera 7.0 |
+ Win 95+ / OSX.1+ |
+ - |
+ A |
+
+
+ Presto |
+ Opera 7.5 |
+ Win 95+ / OSX.2+ |
+ - |
+ A |
+
+
+ Presto |
+ Opera 8.0 |
+ Win 95+ / OSX.2+ |
+ - |
+ A |
+
+
+ Presto |
+ Opera 8.5 |
+ Win 95+ / OSX.2+ |
+ - |
+ A |
+
+
+ Presto |
+ Opera 9.0 |
+ Win 95+ / OSX.3+ |
+ - |
+ A |
+
+
+ Presto |
+ Opera 9.2 |
+ Win 88+ / OSX.3+ |
+ - |
+ A |
+
+
+ Presto |
+ Opera 9.5 |
+ Win 88+ / OSX.3+ |
+ - |
+ A |
+
+
+ Presto |
+ Opera for Wii |
+ Wii |
+ - |
+ A |
+
+
+ Presto |
+ Nokia N800 |
+ N800 |
+ - |
+ A |
+
+
+ Presto |
+ Nintendo DS browser |
+ Nintendo DS |
+ 8.5 |
+ C/A1 |
+
+
+ KHTML |
+ Konqureror 3.1 |
+ KDE 3.1 |
+ 3.1 |
+ C |
+
+
+ KHTML |
+ Konqureror 3.3 |
+ KDE 3.3 |
+ 3.3 |
+ A |
+
+
+ KHTML |
+ Konqureror 3.5 |
+ KDE 3.5 |
+ 3.5 |
+ A |
+
+
+ Tasman |
+ Internet Explorer 4.5 |
+ Mac OS 8-9 |
+ - |
+ X |
+
+
+ Tasman |
+ Internet Explorer 5.1 |
+ Mac OS 7.6-9 |
+ 1 |
+ C |
+
+
+ Tasman |
+ Internet Explorer 5.2 |
+ Mac OS 8-X |
+ 1 |
+ C |
+
+
+ Misc |
+ NetFront 3.1 |
+ Embedded devices |
+ - |
+ C |
+
+
+ Misc |
+ NetFront 3.4 |
+ Embedded devices |
+ - |
+ A |
+
+
+ Misc |
+ Dillo 0.8 |
+ Embedded devices |
+ - |
+ X |
+
+
+ Misc |
+ Links |
+ Text only |
+ - |
+ X |
+
+
+ Misc |
+ Lynx |
+ Text only |
+ - |
+ X |
+
+
+ Misc |
+ IE Mobile |
+ Windows Mobile 6 |
+ - |
+ C |
+
+
+ Misc |
+ PSP browser |
+ PSP |
+ - |
+ C |
+
+
+ Other browsers |
+ All others |
+ - |
+ - |
+ U |
+
+
+
+
+
+
+
+
Initialisation code
+
$(document).ready( function () {
+ $('#example').dataTable( {
+ "sDom": 'T<"clear">lfrtip',
+ "oTableTools": {
+ "aButtons": [
+ "copy",
+ "csv",
+ "xls",
+ {
+ "sExtends": "pdf",
+ "sPdfOrientation": "landscape",
+ "sPdfMessage": "Your custom message would go here."
+ }
+ "print"
+ ]
+ }
+ } );
+} );
+
+
+
Other examples
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/wqflask/wqflask/static/packages/TableTools/plug-in.html b/wqflask/wqflask/static/packages/TableTools/plug-in.html
new file mode 100755
index 00000000..08a055bf
--- /dev/null
+++ b/wqflask/wqflask/static/packages/TableTools/plug-in.html
@@ -0,0 +1,539 @@
+
+
+
+
+
+
+ TableTools example
+
+
+
+
+
+
+
+
+
+
+ TableTools example - plug-ins
+
+
+
Preamble
+
Plug-ins in TableTools take the form of additional buttons types, which provide extra options and flexibility for TableTools. This example shows how a plug-in button type can be defined and then used in the TableTools initialisation. Note that the TableTools.buttonBase object is extended with our required parameters - this base object provides default values for all of the options TableTools can work with, so they don't all have to be defined in our button.
+
Additional plug-ins for TableTools can be found on the DataTables.net site. The example plug-in here shows a button which is used to insert the data from the table into a given element.
+
+
Live example
+
+
+
+
+
+
+ Rendering engine |
+ Browser |
+ Platform(s) |
+ Engine version |
+ CSS grade |
+
+
+
+
+ Rendering engine |
+ Browser |
+ Platform(s) |
+ Engine version |
+ CSS grade |
+
+
+
+
+ Trident |
+ Internet Explorer 4.0 |
+ Win 95+ (Entity: &) |
+ 4 |
+ X |
+
+
+ Trident |
+ Internet Explorer 5.0 |
+ Win 95+ |
+ 5 |
+ C |
+
+
+ Trident |
+ Internet Explorer 5.5 |
+ Win 95+ |
+ 5.5 |
+ A |
+
+
+ Trident |
+ Internet Explorer 6 |
+ Win 98+ |
+ 6 |
+ A |
+
+
+ Trident |
+ Internet Explorer 7 |
+ Win XP SP2+ |
+ 7 |
+ A |
+
+
+ Trident |
+ AOL browser (AOL desktop) |
+ Win XP |
+ 6 |
+ A |
+
+
+ Gecko (UTF-8: $¢€) |
+ Firefox 1.0 |
+ Win 98+ / OSX.2+ |
+ 1.7 |
+ A |
+
+
+ Gecko |
+ Firefox 1.5 |
+ Win 98+ / OSX.2+ |
+ 1.8 |
+ A |
+
+
+ Gecko |
+ Firefox 2.0 |
+ Win 98+ / OSX.2+ |
+ 1.8 |
+ A |
+
+
+ Gecko |
+ Firefox 3.0 |
+ Win 2k+ / OSX.3+ |
+ 1.9 |
+ A |
+
+
+ Gecko |
+ Camino 1.0 |
+ OSX.2+ |
+ 1.8 |
+ A |
+
+
+ Gecko |
+ Camino 1.5 |
+ OSX.3+ |
+ 1.8 |
+ A |
+
+
+ Gecko |
+ Netscape 7.2 |
+ Win 95+ / Mac OS 8.6-9.2 |
+ 1.7 |
+ A |
+
+
+ Gecko |
+ Netscape Browser 8 |
+ Win 98SE+ |
+ 1.7 |
+ A |
+
+
+ Gecko |
+ Netscape Navigator 9 |
+ Win 98+ / OSX.2+ |
+ 1.8 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.0 |
+ Win 95+ / OSX.1+ |
+ 1 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.1 |
+ Win 95+ / OSX.1+ |
+ 1.1 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.2 |
+ Win 95+ / OSX.1+ |
+ 1.2 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.3 |
+ Win 95+ / OSX.1+ |
+ 1.3 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.4 |
+ Win 95+ / OSX.1+ |
+ 1.4 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.5 |
+ Win 95+ / OSX.1+ |
+ 1.5 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.6 |
+ Win 95+ / OSX.1+ |
+ 1.6 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.7 |
+ Win 98+ / OSX.1+ |
+ 1.7 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.8 |
+ Win 98+ / OSX.1+ |
+ 1.8 |
+ A |
+
+
+ Gecko |
+ Seamonkey 1.1 |
+ Win 98+ / OSX.2+ |
+ 1.8 |
+ A |
+
+
+ Gecko |
+ Epiphany 2.20 |
+ Gnome |
+ 1.8 |
+ A |
+
+
+ Webkit |
+ Safari 1.2 |
+ OSX.3 |
+ 125.5 |
+ A |
+
+
+ Webkit |
+ Safari 1.3 |
+ OSX.3 |
+ 312.8 |
+ A |
+
+
+ Webkit |
+ Safari 2.0 |
+ OSX.4+ |
+ 419.3 |
+ A |
+
+
+ Webkit |
+ Safari 3.0 |
+ OSX.4+ |
+ 522.1 |
+ A |
+
+
+ Webkit |
+ OmniWeb 5.5 |
+ OSX.4+ |
+ 420 |
+ A |
+
+
+ Webkit |
+ iPod Touch / iPhone |
+ iPod |
+ 420.1 |
+ A |
+
+
+ Webkit |
+ S60 |
+ S60 |
+ 413 |
+ A |
+
+
+ Presto |
+ Opera 7.0 |
+ Win 95+ / OSX.1+ |
+ - |
+ A |
+
+
+ Presto |
+ Opera 7.5 |
+ Win 95+ / OSX.2+ |
+ - |
+ A |
+
+
+ Presto |
+ Opera 8.0 |
+ Win 95+ / OSX.2+ |
+ - |
+ A |
+
+
+ Presto |
+ Opera 8.5 |
+ Win 95+ / OSX.2+ |
+ - |
+ A |
+
+
+ Presto |
+ Opera 9.0 |
+ Win 95+ / OSX.3+ |
+ - |
+ A |
+
+
+ Presto |
+ Opera 9.2 |
+ Win 88+ / OSX.3+ |
+ - |
+ A |
+
+
+ Presto |
+ Opera 9.5 |
+ Win 88+ / OSX.3+ |
+ - |
+ A |
+
+
+ Presto |
+ Opera for Wii |
+ Wii |
+ - |
+ A |
+
+
+ Presto |
+ Nokia N800 |
+ N800 |
+ - |
+ A |
+
+
+ Presto |
+ Nintendo DS browser |
+ Nintendo DS |
+ 8.5 |
+ C/A1 |
+
+
+ KHTML |
+ Konqureror 3.1 |
+ KDE 3.1 |
+ 3.1 |
+ C |
+
+
+ KHTML |
+ Konqureror 3.3 |
+ KDE 3.3 |
+ 3.3 |
+ A |
+
+
+ KHTML |
+ Konqureror 3.5 |
+ KDE 3.5 |
+ 3.5 |
+ A |
+
+
+ Tasman |
+ Internet Explorer 4.5 |
+ Mac OS 8-9 |
+ - |
+ X |
+
+
+ Tasman |
+ Internet Explorer 5.1 |
+ Mac OS 7.6-9 |
+ 1 |
+ C |
+
+
+ Tasman |
+ Internet Explorer 5.2 |
+ Mac OS 8-X |
+ 1 |
+ C |
+
+
+ Misc |
+ NetFront 3.1 |
+ Embedded devices |
+ - |
+ C |
+
+
+ Misc |
+ NetFront 3.4 |
+ Embedded devices |
+ - |
+ A |
+
+
+ Misc |
+ Dillo 0.8 |
+ Embedded devices |
+ - |
+ X |
+
+
+ Misc |
+ Links |
+ Text only |
+ - |
+ X |
+
+
+ Misc |
+ Lynx |
+ Text only |
+ - |
+ X |
+
+
+ Misc |
+ IE Mobile |
+ Windows Mobile 6 |
+ - |
+ C |
+
+
+ Misc |
+ PSP browser |
+ PSP |
+ - |
+ C |
+
+
+ Other browsers |
+ All others |
+ - |
+ - |
+ U |
+
+
+
+
+
+
+
+
Initialisation code
+
TableTools.BUTTONS.copy_to_div = $.extend( true, TableTools.buttonBase, {
+ "sNewLine": "<br>",
+ "sButtonText": "Copy to element",
+ "sDiv": "",
+ "fnClick": function( nButton, oConfig ) {
+ document.getElementById(oConfig.sDiv).innerHTML =
+ this.fnGetTableData(oConfig);
+ }
+} );
+
+$(document).ready( function () {
+ $('#example').dataTable( {
+ "sDom": 'T<"clear">lfrtip',
+ "oTableTools": {
+ "aButtons": [
+ {
+ "sExtends": "copy_to_div",
+ "sButtonText": "Copy to div",
+ "sDiv": "copy",
+ }
+ ]
+ }
+ } );
+} );
+
+
+
Other examples
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/wqflask/wqflask/static/packages/TableTools/select_multi.html b/wqflask/wqflask/static/packages/TableTools/select_multi.html
new file mode 100755
index 00000000..ee94789c
--- /dev/null
+++ b/wqflask/wqflask/static/packages/TableTools/select_multi.html
@@ -0,0 +1,507 @@
+
+
+
+
+
+
+ TableTools example
+
+
+
+
+
+
+
+
+
+
+ TableTools example - multi-row select
+
+
+
Preamble
+
As well as providing a button toolbar, TableTools provides everything needed to have selectable rows in the table. Row selection is turned off by default in TableTools, but can be enabled using the sRowSelect parameter, set to either 'multi' or 'single'. When set the end user can select rows by simply clicking on them. TableTools provides a set of API methods and callbacks for controlling and monitoring the row selection in TableTools. There are also a number of pre-defined buttons to provide functions such as select-all and select-none, as shown in this example.
+
+
+
Live example
+
+
+
+
+ Rendering engine |
+ Browser |
+ Platform(s) |
+ Engine version |
+ CSS grade |
+
+
+
+
+ Rendering engine |
+ Browser |
+ Platform(s) |
+ Engine version |
+ CSS grade |
+
+
+
+
+ Trident |
+ Internet Explorer 4.0 |
+ Win 95+ (Entity: &) |
+ 4 |
+ X |
+
+
+ Trident |
+ Internet Explorer 5.0 |
+ Win 95+ |
+ 5 |
+ C |
+
+
+ Trident |
+ Internet Explorer 5.5 |
+ Win 95+ |
+ 5.5 |
+ A |
+
+
+ Trident |
+ Internet Explorer 6 |
+ Win 98+ |
+ 6 |
+ A |
+
+
+ Trident |
+ Internet Explorer 7 |
+ Win XP SP2+ |
+ 7 |
+ A |
+
+
+ Trident |
+ AOL browser (AOL desktop) |
+ Win XP |
+ 6 |
+ A |
+
+
+ Gecko (UTF-8: $¢€) |
+ Firefox 1.0 |
+ Win 98+ / OSX.2+ |
+ 1.7 |
+ A |
+
+
+ Gecko |
+ Firefox 1.5 |
+ Win 98+ / OSX.2+ |
+ 1.8 |
+ A |
+
+
+ Gecko |
+ Firefox 2.0 |
+ Win 98+ / OSX.2+ |
+ 1.8 |
+ A |
+
+
+ Gecko |
+ Firefox 3.0 |
+ Win 2k+ / OSX.3+ |
+ 1.9 |
+ A |
+
+
+ Gecko |
+ Camino 1.0 |
+ OSX.2+ |
+ 1.8 |
+ A |
+
+
+ Gecko |
+ Camino 1.5 |
+ OSX.3+ |
+ 1.8 |
+ A |
+
+
+ Gecko |
+ Netscape 7.2 |
+ Win 95+ / Mac OS 8.6-9.2 |
+ 1.7 |
+ A |
+
+
+ Gecko |
+ Netscape Browser 8 |
+ Win 98SE+ |
+ 1.7 |
+ A |
+
+
+ Gecko |
+ Netscape Navigator 9 |
+ Win 98+ / OSX.2+ |
+ 1.8 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.0 |
+ Win 95+ / OSX.1+ |
+ 1 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.1 |
+ Win 95+ / OSX.1+ |
+ 1.1 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.2 |
+ Win 95+ / OSX.1+ |
+ 1.2 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.3 |
+ Win 95+ / OSX.1+ |
+ 1.3 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.4 |
+ Win 95+ / OSX.1+ |
+ 1.4 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.5 |
+ Win 95+ / OSX.1+ |
+ 1.5 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.6 |
+ Win 95+ / OSX.1+ |
+ 1.6 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.7 |
+ Win 98+ / OSX.1+ |
+ 1.7 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.8 |
+ Win 98+ / OSX.1+ |
+ 1.8 |
+ A |
+
+
+ Gecko |
+ Seamonkey 1.1 |
+ Win 98+ / OSX.2+ |
+ 1.8 |
+ A |
+
+
+ Gecko |
+ Epiphany 2.20 |
+ Gnome |
+ 1.8 |
+ A |
+
+
+ Webkit |
+ Safari 1.2 |
+ OSX.3 |
+ 125.5 |
+ A |
+
+
+ Webkit |
+ Safari 1.3 |
+ OSX.3 |
+ 312.8 |
+ A |
+
+
+ Webkit |
+ Safari 2.0 |
+ OSX.4+ |
+ 419.3 |
+ A |
+
+
+ Webkit |
+ Safari 3.0 |
+ OSX.4+ |
+ 522.1 |
+ A |
+
+
+ Webkit |
+ OmniWeb 5.5 |
+ OSX.4+ |
+ 420 |
+ A |
+
+
+ Webkit |
+ iPod Touch / iPhone |
+ iPod |
+ 420.1 |
+ A |
+
+
+ Webkit |
+ S60 |
+ S60 |
+ 413 |
+ A |
+
+
+ Presto |
+ Opera 7.0 |
+ Win 95+ / OSX.1+ |
+ - |
+ A |
+
+
+ Presto |
+ Opera 7.5 |
+ Win 95+ / OSX.2+ |
+ - |
+ A |
+
+
+ Presto |
+ Opera 8.0 |
+ Win 95+ / OSX.2+ |
+ - |
+ A |
+
+
+ Presto |
+ Opera 8.5 |
+ Win 95+ / OSX.2+ |
+ - |
+ A |
+
+
+ Presto |
+ Opera 9.0 |
+ Win 95+ / OSX.3+ |
+ - |
+ A |
+
+
+ Presto |
+ Opera 9.2 |
+ Win 88+ / OSX.3+ |
+ - |
+ A |
+
+
+ Presto |
+ Opera 9.5 |
+ Win 88+ / OSX.3+ |
+ - |
+ A |
+
+
+ Presto |
+ Opera for Wii |
+ Wii |
+ - |
+ A |
+
+
+ Presto |
+ Nokia N800 |
+ N800 |
+ - |
+ A |
+
+
+ Presto |
+ Nintendo DS browser |
+ Nintendo DS |
+ 8.5 |
+ C/A1 |
+
+
+ KHTML |
+ Konqureror 3.1 |
+ KDE 3.1 |
+ 3.1 |
+ C |
+
+
+ KHTML |
+ Konqureror 3.3 |
+ KDE 3.3 |
+ 3.3 |
+ A |
+
+
+ KHTML |
+ Konqureror 3.5 |
+ KDE 3.5 |
+ 3.5 |
+ A |
+
+
+ Tasman |
+ Internet Explorer 4.5 |
+ Mac OS 8-9 |
+ - |
+ X |
+
+
+ Tasman |
+ Internet Explorer 5.1 |
+ Mac OS 7.6-9 |
+ 1 |
+ C |
+
+
+ Tasman |
+ Internet Explorer 5.2 |
+ Mac OS 8-X |
+ 1 |
+ C |
+
+
+ Misc |
+ NetFront 3.1 |
+ Embedded devices |
+ - |
+ C |
+
+
+ Misc |
+ NetFront 3.4 |
+ Embedded devices |
+ - |
+ A |
+
+
+ Misc |
+ Dillo 0.8 |
+ Embedded devices |
+ - |
+ X |
+
+
+ Misc |
+ Links |
+ Text only |
+ - |
+ X |
+
+
+ Misc |
+ Lynx |
+ Text only |
+ - |
+ X |
+
+
+ Misc |
+ IE Mobile |
+ Windows Mobile 6 |
+ - |
+ C |
+
+
+ Misc |
+ PSP browser |
+ PSP |
+ - |
+ C |
+
+
+ Other browsers |
+ All others |
+ - |
+ - |
+ U |
+
+
+
+
+
+
+
+
Initialisation code
+
$(document).ready( function () {
+ $('#example').dataTable( {
+ "sDom": 'T<"clear">lfrtip',
+ "oTableTools": {
+ "sRowSelect": "multi",
+ "aButtons": [ "select_all", "select_none" ]
+ }
+ } );
+} );
+
+
+
Other examples
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/wqflask/wqflask/static/packages/TableTools/select_single.html b/wqflask/wqflask/static/packages/TableTools/select_single.html
new file mode 100755
index 00000000..94a47893
--- /dev/null
+++ b/wqflask/wqflask/static/packages/TableTools/select_single.html
@@ -0,0 +1,505 @@
+
+
+
+
+
+
+ TableTools example
+
+
+
+
+
+
+
+
+
+
+ TableTools example - single row selection
+
+
+
Preamble
+
As well as providing a button toolbar, TableTools provides everything needed to have selectable rows in the table. Row selection is turned off by default in TableTools, but can be enabled using the sRowSelect parameter, set to either 'multi' or 'single'. When set the end user can select rows by simply clicking on them. TableTools provides a set of API methods and callbacks for controlling and monitoring the row selection in TableTools. This example shows single row selection enabled.
+
+
+
Live example
+
+
+
+
+ Rendering engine |
+ Browser |
+ Platform(s) |
+ Engine version |
+ CSS grade |
+
+
+
+
+ Rendering engine |
+ Browser |
+ Platform(s) |
+ Engine version |
+ CSS grade |
+
+
+
+
+ Trident |
+ Internet Explorer 4.0 |
+ Win 95+ (Entity: &) |
+ 4 |
+ X |
+
+
+ Trident |
+ Internet Explorer 5.0 |
+ Win 95+ |
+ 5 |
+ C |
+
+
+ Trident |
+ Internet Explorer 5.5 |
+ Win 95+ |
+ 5.5 |
+ A |
+
+
+ Trident |
+ Internet Explorer 6 |
+ Win 98+ |
+ 6 |
+ A |
+
+
+ Trident |
+ Internet Explorer 7 |
+ Win XP SP2+ |
+ 7 |
+ A |
+
+
+ Trident |
+ AOL browser (AOL desktop) |
+ Win XP |
+ 6 |
+ A |
+
+
+ Gecko (UTF-8: $¢€) |
+ Firefox 1.0 |
+ Win 98+ / OSX.2+ |
+ 1.7 |
+ A |
+
+
+ Gecko |
+ Firefox 1.5 |
+ Win 98+ / OSX.2+ |
+ 1.8 |
+ A |
+
+
+ Gecko |
+ Firefox 2.0 |
+ Win 98+ / OSX.2+ |
+ 1.8 |
+ A |
+
+
+ Gecko |
+ Firefox 3.0 |
+ Win 2k+ / OSX.3+ |
+ 1.9 |
+ A |
+
+
+ Gecko |
+ Camino 1.0 |
+ OSX.2+ |
+ 1.8 |
+ A |
+
+
+ Gecko |
+ Camino 1.5 |
+ OSX.3+ |
+ 1.8 |
+ A |
+
+
+ Gecko |
+ Netscape 7.2 |
+ Win 95+ / Mac OS 8.6-9.2 |
+ 1.7 |
+ A |
+
+
+ Gecko |
+ Netscape Browser 8 |
+ Win 98SE+ |
+ 1.7 |
+ A |
+
+
+ Gecko |
+ Netscape Navigator 9 |
+ Win 98+ / OSX.2+ |
+ 1.8 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.0 |
+ Win 95+ / OSX.1+ |
+ 1 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.1 |
+ Win 95+ / OSX.1+ |
+ 1.1 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.2 |
+ Win 95+ / OSX.1+ |
+ 1.2 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.3 |
+ Win 95+ / OSX.1+ |
+ 1.3 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.4 |
+ Win 95+ / OSX.1+ |
+ 1.4 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.5 |
+ Win 95+ / OSX.1+ |
+ 1.5 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.6 |
+ Win 95+ / OSX.1+ |
+ 1.6 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.7 |
+ Win 98+ / OSX.1+ |
+ 1.7 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.8 |
+ Win 98+ / OSX.1+ |
+ 1.8 |
+ A |
+
+
+ Gecko |
+ Seamonkey 1.1 |
+ Win 98+ / OSX.2+ |
+ 1.8 |
+ A |
+
+
+ Gecko |
+ Epiphany 2.20 |
+ Gnome |
+ 1.8 |
+ A |
+
+
+ Webkit |
+ Safari 1.2 |
+ OSX.3 |
+ 125.5 |
+ A |
+
+
+ Webkit |
+ Safari 1.3 |
+ OSX.3 |
+ 312.8 |
+ A |
+
+
+ Webkit |
+ Safari 2.0 |
+ OSX.4+ |
+ 419.3 |
+ A |
+
+
+ Webkit |
+ Safari 3.0 |
+ OSX.4+ |
+ 522.1 |
+ A |
+
+
+ Webkit |
+ OmniWeb 5.5 |
+ OSX.4+ |
+ 420 |
+ A |
+
+
+ Webkit |
+ iPod Touch / iPhone |
+ iPod |
+ 420.1 |
+ A |
+
+
+ Webkit |
+ S60 |
+ S60 |
+ 413 |
+ A |
+
+
+ Presto |
+ Opera 7.0 |
+ Win 95+ / OSX.1+ |
+ - |
+ A |
+
+
+ Presto |
+ Opera 7.5 |
+ Win 95+ / OSX.2+ |
+ - |
+ A |
+
+
+ Presto |
+ Opera 8.0 |
+ Win 95+ / OSX.2+ |
+ - |
+ A |
+
+
+ Presto |
+ Opera 8.5 |
+ Win 95+ / OSX.2+ |
+ - |
+ A |
+
+
+ Presto |
+ Opera 9.0 |
+ Win 95+ / OSX.3+ |
+ - |
+ A |
+
+
+ Presto |
+ Opera 9.2 |
+ Win 88+ / OSX.3+ |
+ - |
+ A |
+
+
+ Presto |
+ Opera 9.5 |
+ Win 88+ / OSX.3+ |
+ - |
+ A |
+
+
+ Presto |
+ Opera for Wii |
+ Wii |
+ - |
+ A |
+
+
+ Presto |
+ Nokia N800 |
+ N800 |
+ - |
+ A |
+
+
+ Presto |
+ Nintendo DS browser |
+ Nintendo DS |
+ 8.5 |
+ C/A1 |
+
+
+ KHTML |
+ Konqureror 3.1 |
+ KDE 3.1 |
+ 3.1 |
+ C |
+
+
+ KHTML |
+ Konqureror 3.3 |
+ KDE 3.3 |
+ 3.3 |
+ A |
+
+
+ KHTML |
+ Konqureror 3.5 |
+ KDE 3.5 |
+ 3.5 |
+ A |
+
+
+ Tasman |
+ Internet Explorer 4.5 |
+ Mac OS 8-9 |
+ - |
+ X |
+
+
+ Tasman |
+ Internet Explorer 5.1 |
+ Mac OS 7.6-9 |
+ 1 |
+ C |
+
+
+ Tasman |
+ Internet Explorer 5.2 |
+ Mac OS 8-X |
+ 1 |
+ C |
+
+
+ Misc |
+ NetFront 3.1 |
+ Embedded devices |
+ - |
+ C |
+
+
+ Misc |
+ NetFront 3.4 |
+ Embedded devices |
+ - |
+ A |
+
+
+ Misc |
+ Dillo 0.8 |
+ Embedded devices |
+ - |
+ X |
+
+
+ Misc |
+ Links |
+ Text only |
+ - |
+ X |
+
+
+ Misc |
+ Lynx |
+ Text only |
+ - |
+ X |
+
+
+ Misc |
+ IE Mobile |
+ Windows Mobile 6 |
+ - |
+ C |
+
+
+ Misc |
+ PSP browser |
+ PSP |
+ - |
+ C |
+
+
+ Other browsers |
+ All others |
+ - |
+ - |
+ U |
+
+
+
+
+
+
+
+
Initialisation code
+
$(document).ready( function () {
+ $('#example').dataTable( {
+ "sDom": 'T<"clear">lfrtip',
+ "oTableTools": {
+ "sRowSelect": "single"
+ }
+ } );
+} );
+
+
+
Other examples
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/wqflask/wqflask/static/packages/TableTools/swf_path.html b/wqflask/wqflask/static/packages/TableTools/swf_path.html
new file mode 100755
index 00000000..c82633b4
--- /dev/null
+++ b/wqflask/wqflask/static/packages/TableTools/swf_path.html
@@ -0,0 +1,505 @@
+
+
+
+
+
+
+ TableTools example
+
+
+
+
+
+
+
+
+
+
+ TableTools example - setting SWF path
+
+
+
Preamble
+
TableTools uses a Flash SWF file to provide the ability to copy text to the system clipboard and save files locally. TableTools must be able to load the SWF file in order to provide these facilities. If you aren't using the same directory structure as the TableTools package, you will need to set this parameter.
+
Note that TableTools ships with two different SWF files - the only difference between them is that one of them provides the ability to save PDF files while the other doesn't. The trade off is that the PDF capable file is significantly larger in size (56K v 2K).
+
+
Live example
+
+
+
+
+ Rendering engine |
+ Browser |
+ Platform(s) |
+ Engine version |
+ CSS grade |
+
+
+
+
+ Rendering engine |
+ Browser |
+ Platform(s) |
+ Engine version |
+ CSS grade |
+
+
+
+
+ Trident |
+ Internet Explorer 4.0 |
+ Win 95+ (Entity: &) |
+ 4 |
+ X |
+
+
+ Trident |
+ Internet Explorer 5.0 |
+ Win 95+ |
+ 5 |
+ C |
+
+
+ Trident |
+ Internet Explorer 5.5 |
+ Win 95+ |
+ 5.5 |
+ A |
+
+
+ Trident |
+ Internet Explorer 6 |
+ Win 98+ |
+ 6 |
+ A |
+
+
+ Trident |
+ Internet Explorer 7 |
+ Win XP SP2+ |
+ 7 |
+ A |
+
+
+ Trident |
+ AOL browser (AOL desktop) |
+ Win XP |
+ 6 |
+ A |
+
+
+ Gecko (UTF-8: $¢€) |
+ Firefox 1.0 |
+ Win 98+ / OSX.2+ |
+ 1.7 |
+ A |
+
+
+ Gecko |
+ Firefox 1.5 |
+ Win 98+ / OSX.2+ |
+ 1.8 |
+ A |
+
+
+ Gecko |
+ Firefox 2.0 |
+ Win 98+ / OSX.2+ |
+ 1.8 |
+ A |
+
+
+ Gecko |
+ Firefox 3.0 |
+ Win 2k+ / OSX.3+ |
+ 1.9 |
+ A |
+
+
+ Gecko |
+ Camino 1.0 |
+ OSX.2+ |
+ 1.8 |
+ A |
+
+
+ Gecko |
+ Camino 1.5 |
+ OSX.3+ |
+ 1.8 |
+ A |
+
+
+ Gecko |
+ Netscape 7.2 |
+ Win 95+ / Mac OS 8.6-9.2 |
+ 1.7 |
+ A |
+
+
+ Gecko |
+ Netscape Browser 8 |
+ Win 98SE+ |
+ 1.7 |
+ A |
+
+
+ Gecko |
+ Netscape Navigator 9 |
+ Win 98+ / OSX.2+ |
+ 1.8 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.0 |
+ Win 95+ / OSX.1+ |
+ 1 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.1 |
+ Win 95+ / OSX.1+ |
+ 1.1 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.2 |
+ Win 95+ / OSX.1+ |
+ 1.2 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.3 |
+ Win 95+ / OSX.1+ |
+ 1.3 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.4 |
+ Win 95+ / OSX.1+ |
+ 1.4 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.5 |
+ Win 95+ / OSX.1+ |
+ 1.5 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.6 |
+ Win 95+ / OSX.1+ |
+ 1.6 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.7 |
+ Win 98+ / OSX.1+ |
+ 1.7 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.8 |
+ Win 98+ / OSX.1+ |
+ 1.8 |
+ A |
+
+
+ Gecko |
+ Seamonkey 1.1 |
+ Win 98+ / OSX.2+ |
+ 1.8 |
+ A |
+
+
+ Gecko |
+ Epiphany 2.20 |
+ Gnome |
+ 1.8 |
+ A |
+
+
+ Webkit |
+ Safari 1.2 |
+ OSX.3 |
+ 125.5 |
+ A |
+
+
+ Webkit |
+ Safari 1.3 |
+ OSX.3 |
+ 312.8 |
+ A |
+
+
+ Webkit |
+ Safari 2.0 |
+ OSX.4+ |
+ 419.3 |
+ A |
+
+
+ Webkit |
+ Safari 3.0 |
+ OSX.4+ |
+ 522.1 |
+ A |
+
+
+ Webkit |
+ OmniWeb 5.5 |
+ OSX.4+ |
+ 420 |
+ A |
+
+
+ Webkit |
+ iPod Touch / iPhone |
+ iPod |
+ 420.1 |
+ A |
+
+
+ Webkit |
+ S60 |
+ S60 |
+ 413 |
+ A |
+
+
+ Presto |
+ Opera 7.0 |
+ Win 95+ / OSX.1+ |
+ - |
+ A |
+
+
+ Presto |
+ Opera 7.5 |
+ Win 95+ / OSX.2+ |
+ - |
+ A |
+
+
+ Presto |
+ Opera 8.0 |
+ Win 95+ / OSX.2+ |
+ - |
+ A |
+
+
+ Presto |
+ Opera 8.5 |
+ Win 95+ / OSX.2+ |
+ - |
+ A |
+
+
+ Presto |
+ Opera 9.0 |
+ Win 95+ / OSX.3+ |
+ - |
+ A |
+
+
+ Presto |
+ Opera 9.2 |
+ Win 88+ / OSX.3+ |
+ - |
+ A |
+
+
+ Presto |
+ Opera 9.5 |
+ Win 88+ / OSX.3+ |
+ - |
+ A |
+
+
+ Presto |
+ Opera for Wii |
+ Wii |
+ - |
+ A |
+
+
+ Presto |
+ Nokia N800 |
+ N800 |
+ - |
+ A |
+
+
+ Presto |
+ Nintendo DS browser |
+ Nintendo DS |
+ 8.5 |
+ C/A1 |
+
+
+ KHTML |
+ Konqureror 3.1 |
+ KDE 3.1 |
+ 3.1 |
+ C |
+
+
+ KHTML |
+ Konqureror 3.3 |
+ KDE 3.3 |
+ 3.3 |
+ A |
+
+
+ KHTML |
+ Konqureror 3.5 |
+ KDE 3.5 |
+ 3.5 |
+ A |
+
+
+ Tasman |
+ Internet Explorer 4.5 |
+ Mac OS 8-9 |
+ - |
+ X |
+
+
+ Tasman |
+ Internet Explorer 5.1 |
+ Mac OS 7.6-9 |
+ 1 |
+ C |
+
+
+ Tasman |
+ Internet Explorer 5.2 |
+ Mac OS 8-X |
+ 1 |
+ C |
+
+
+ Misc |
+ NetFront 3.1 |
+ Embedded devices |
+ - |
+ C |
+
+
+ Misc |
+ NetFront 3.4 |
+ Embedded devices |
+ - |
+ A |
+
+
+ Misc |
+ Dillo 0.8 |
+ Embedded devices |
+ - |
+ X |
+
+
+ Misc |
+ Links |
+ Text only |
+ - |
+ X |
+
+
+ Misc |
+ Lynx |
+ Text only |
+ - |
+ X |
+
+
+ Misc |
+ IE Mobile |
+ Windows Mobile 6 |
+ - |
+ C |
+
+
+ Misc |
+ PSP browser |
+ PSP |
+ - |
+ C |
+
+
+ Other browsers |
+ All others |
+ - |
+ - |
+ U |
+
+
+
+
+
+
+
+
Initialisation code
+
$(document).ready( function () {
+ $('#example').dataTable( {
+ "sDom": 'T<"clear">lfrtip',
+ "oTableTools": {
+ "sSwfPath": "media/swf/copy_csv_xls_pdf.swf"
+ }
+ } );
+} );
+
+
+
Other examples
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/wqflask/wqflask/static/packages/TableTools/tabs.html b/wqflask/wqflask/static/packages/TableTools/tabs.html
new file mode 100755
index 00000000..915cc821
--- /dev/null
+++ b/wqflask/wqflask/static/packages/TableTools/tabs.html
@@ -0,0 +1,348 @@
+
+
+
+
+
+
+ TableTools example
+
+
+
+
+
+
+
+
+
+
+
+ TableTools example
+
+
+
Preamble
+
This example shows the basic initialisation of TableTools by simply including the 'T' marker in DataTables' sDom parameter. This tell DataTables to insert the TableTools toolbar in that location. Remember to include the Javascript and CSS source files as well!
+
It is worth noting that you might need to set the sSwfPath parameter to tell TableTools where to find the SWF file for copy and file save.
+
+
Live example
+
+
+
+
+
+
+
+
+ Rendering engine |
+ Browser |
+ Platform(s) |
+ Engine version |
+ Grade |
+
+
+
+
+ Rendering engine |
+ Browser |
+ Platform(s) |
+ Engine version |
+ Grade |
+
+
+
+
+ Trident |
+ Internet
+ Explorer 4.0 |
+ Win 95+ |
+ 4 |
+ X |
+
+
+ Trident |
+ Internet
+ Explorer 5.0 |
+ Win 95+ |
+ 5 |
+ C |
+
+
+ Trident |
+ Internet
+ Explorer 5.5 |
+ Win 95+ |
+ 5.5 |
+ A |
+
+
+ Trident |
+ Internet
+ Explorer 6 |
+ Win 98+ |
+ 6 |
+ A |
+
+
+ Trident |
+ Internet Explorer 7 |
+ Win XP SP2+ |
+ 7 |
+ A |
+
+
+ Trident |
+ AOL browser (AOL desktop) |
+ Win XP |
+ 6 |
+ A |
+
+
+
+
+
+
+
+
+
+
+ Rendering engine |
+ Browser |
+ Platform(s) |
+ Engine version |
+ Grade |
+
+
+
+
+ Rendering engine |
+ Browser |
+ Platform(s) |
+ Engine version |
+ Grade |
+
+
+
+
+ Gecko |
+ Firefox 1.0 |
+ Win 98+ / OSX.2+ |
+ 1.7 |
+ A |
+
+
+ Gecko |
+ Firefox 1.5 |
+ Win 98+ / OSX.2+ |
+ 1.8 |
+ A |
+
+
+ Gecko |
+ Firefox 2.0 |
+ Win 98+ / OSX.2+ |
+ 1.8 |
+ A |
+
+
+ Gecko |
+ Firefox 3.0 |
+ Win 2k+ / OSX.3+ |
+ 1.9 |
+ A |
+
+
+ Gecko |
+ Camino 1.0 |
+ OSX.2+ |
+ 1.8 |
+ A |
+
+
+ Gecko |
+ Camino 1.5 |
+ OSX.3+ |
+ 1.8 |
+ A |
+
+
+ Gecko |
+ Netscape 7.2 |
+ Win 95+ / Mac OS 8.6-9.2 |
+ 1.7 |
+ A |
+
+
+ Gecko |
+ Netscape Browser 8 |
+ Win 98SE+ |
+ 1.7 |
+ A |
+
+
+ Gecko |
+ Netscape Navigator 9 |
+ Win 98+ / OSX.2+ |
+ 1.8 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.0 |
+ Win 95+ / OSX.1+ |
+ 1 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.1 |
+ Win 95+ / OSX.1+ |
+ 1.1 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.2 |
+ Win 95+ / OSX.1+ |
+ 1.2 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.3 |
+ Win 95+ / OSX.1+ |
+ 1.3 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.4 |
+ Win 95+ / OSX.1+ |
+ 1.4 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.5 |
+ Win 95+ / OSX.1+ |
+ 1.5 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.6 |
+ Win 95+ / OSX.1+ |
+ 1.6 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.7 |
+ Win 98+ / OSX.1+ |
+ 1.7 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.8 |
+ Win 98+ / OSX.1+ |
+ 1.8 |
+ A |
+
+
+ Gecko |
+ Seamonkey 1.1 |
+ Win 98+ / OSX.2+ |
+ 1.8 |
+ A |
+
+
+ Gecko |
+ Epiphany 2.20 |
+ Gnome |
+ 1.8 |
+ A |
+
+
+
+
+
+
+
+
+
Initialisation code
+
$(document).ready( function () {
+ $('#example').dataTable( {
+ "sDom": 'T<"clear">lfrtip'
+ } );
+} );
+
+
+
Other examples
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/wqflask/wqflask/static/packages/TableTools/theme.html b/wqflask/wqflask/static/packages/TableTools/theme.html
new file mode 100755
index 00000000..fcda07a0
--- /dev/null
+++ b/wqflask/wqflask/static/packages/TableTools/theme.html
@@ -0,0 +1,524 @@
+
+
+
+
+
+
+ TableTools example
+
+
+
+
+
+
+
+
+
+
+ TableTools example - jQuery UI theming
+
+
+
Preamble
+
Like DataTables, TableTools can be styled by a jQuery UI theme. The required classes for the theming with TableTools are added automatically when the bJQueryUI option is detected from DataTables. This example shows that in action, and also defines a button collection to show the themeing there.
+
+
+
Live example
+
+
+
+
+ Rendering engine |
+ Browser |
+ Platform(s) |
+ Engine version |
+ CSS grade |
+
+
+
+
+ Rendering engine |
+ Browser |
+ Platform(s) |
+ Engine version |
+ CSS grade |
+
+
+
+
+ Trident |
+ Internet Explorer 4.0 |
+ Win 95+ (Entity: &) |
+ 4 |
+ X |
+
+
+ Trident |
+ Internet Explorer 5.0 |
+ Win 95+ |
+ 5 |
+ C |
+
+
+ Trident |
+ Internet Explorer 5.5 |
+ Win 95+ |
+ 5.5 |
+ A |
+
+
+ Trident |
+ Internet Explorer 6 |
+ Win 98+ |
+ 6 |
+ A |
+
+
+ Trident |
+ Internet Explorer 7 |
+ Win XP SP2+ |
+ 7 |
+ A |
+
+
+ Trident |
+ AOL browser (AOL desktop) |
+ Win XP |
+ 6 |
+ A |
+
+
+ Gecko (UTF-8: $¢€) |
+ Firefox 1.0 |
+ Win 98+ / OSX.2+ |
+ 1.7 |
+ A |
+
+
+ Gecko |
+ Firefox 1.5 |
+ Win 98+ / OSX.2+ |
+ 1.8 |
+ A |
+
+
+ Gecko |
+ Firefox 2.0 |
+ Win 98+ / OSX.2+ |
+ 1.8 |
+ A |
+
+
+ Gecko |
+ Firefox 3.0 |
+ Win 2k+ / OSX.3+ |
+ 1.9 |
+ A |
+
+
+ Gecko |
+ Camino 1.0 |
+ OSX.2+ |
+ 1.8 |
+ A |
+
+
+ Gecko |
+ Camino 1.5 |
+ OSX.3+ |
+ 1.8 |
+ A |
+
+
+ Gecko |
+ Netscape 7.2 |
+ Win 95+ / Mac OS 8.6-9.2 |
+ 1.7 |
+ A |
+
+
+ Gecko |
+ Netscape Browser 8 |
+ Win 98SE+ |
+ 1.7 |
+ A |
+
+
+ Gecko |
+ Netscape Navigator 9 |
+ Win 98+ / OSX.2+ |
+ 1.8 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.0 |
+ Win 95+ / OSX.1+ |
+ 1 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.1 |
+ Win 95+ / OSX.1+ |
+ 1.1 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.2 |
+ Win 95+ / OSX.1+ |
+ 1.2 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.3 |
+ Win 95+ / OSX.1+ |
+ 1.3 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.4 |
+ Win 95+ / OSX.1+ |
+ 1.4 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.5 |
+ Win 95+ / OSX.1+ |
+ 1.5 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.6 |
+ Win 95+ / OSX.1+ |
+ 1.6 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.7 |
+ Win 98+ / OSX.1+ |
+ 1.7 |
+ A |
+
+
+ Gecko |
+ Mozilla 1.8 |
+ Win 98+ / OSX.1+ |
+ 1.8 |
+ A |
+
+
+ Gecko |
+ Seamonkey 1.1 |
+ Win 98+ / OSX.2+ |
+ 1.8 |
+ A |
+
+
+ Gecko |
+ Epiphany 2.20 |
+ Gnome |
+ 1.8 |
+ A |
+
+
+ Webkit |
+ Safari 1.2 |
+ OSX.3 |
+ 125.5 |
+ A |
+
+
+ Webkit |
+ Safari 1.3 |
+ OSX.3 |
+ 312.8 |
+ A |
+
+
+ Webkit |
+ Safari 2.0 |
+ OSX.4+ |
+ 419.3 |
+ A |
+
+
+ Webkit |
+ Safari 3.0 |
+ OSX.4+ |
+ 522.1 |
+ A |
+
+
+ Webkit |
+ OmniWeb 5.5 |
+ OSX.4+ |
+ 420 |
+ A |
+
+
+ Webkit |
+ iPod Touch / iPhone |
+ iPod |
+ 420.1 |
+ A |
+
+
+ Webkit |
+ S60 |
+ S60 |
+ 413 |
+ A |
+
+
+ Presto |
+ Opera 7.0 |
+ Win 95+ / OSX.1+ |
+ - |
+ A |
+
+
+ Presto |
+ Opera 7.5 |
+ Win 95+ / OSX.2+ |
+ - |
+ A |
+
+
+ Presto |
+ Opera 8.0 |
+ Win 95+ / OSX.2+ |
+ - |
+ A |
+
+
+ Presto |
+ Opera 8.5 |
+ Win 95+ / OSX.2+ |
+ - |
+ A |
+
+
+ Presto |
+ Opera 9.0 |
+ Win 95+ / OSX.3+ |
+ - |
+ A |
+
+
+ Presto |
+ Opera 9.2 |
+ Win 88+ / OSX.3+ |
+ - |
+ A |
+
+
+ Presto |
+ Opera 9.5 |
+ Win 88+ / OSX.3+ |
+ - |
+ A |
+
+
+ Presto |
+ Opera for Wii |
+ Wii |
+ - |
+ A |
+
+
+ Presto |
+ Nokia N800 |
+ N800 |
+ - |
+ A |
+
+
+ Presto |
+ Nintendo DS browser |
+ Nintendo DS |
+ 8.5 |
+ C/A1 |
+
+
+ KHTML |
+ Konqureror 3.1 |
+ KDE 3.1 |
+ 3.1 |
+ C |
+
+
+ KHTML |
+ Konqureror 3.3 |
+ KDE 3.3 |
+ 3.3 |
+ A |
+
+
+ KHTML |
+ Konqureror 3.5 |
+ KDE 3.5 |
+ 3.5 |
+ A |
+
+
+ Tasman |
+ Internet Explorer 4.5 |
+ Mac OS 8-9 |
+ - |
+ X |
+
+
+ Tasman |
+ Internet Explorer 5.1 |
+ Mac OS 7.6-9 |
+ 1 |
+ C |
+
+
+ Tasman |
+ Internet Explorer 5.2 |
+ Mac OS 8-X |
+ 1 |
+ C |
+
+
+ Misc |
+ NetFront 3.1 |
+ Embedded devices |
+ - |
+ C |
+
+
+ Misc |
+ NetFront 3.4 |
+ Embedded devices |
+ - |
+ A |
+
+
+ Misc |
+ Dillo 0.8 |
+ Embedded devices |
+ - |
+ X |
+
+
+ Misc |
+ Links |
+ Text only |
+ - |
+ X |
+
+
+ Misc |
+ Lynx |
+ Text only |
+ - |
+ X |
+
+
+ Misc |
+ IE Mobile |
+ Windows Mobile 6 |
+ - |
+ C |
+
+
+ Misc |
+ PSP browser |
+ PSP |
+ - |
+ C |
+
+
+ Other browsers |
+ All others |
+ - |
+ - |
+ U |
+
+
+
+
+
+
+
+
Initialisation code
+
$(document).ready( function () {
+ $('#example').dataTable( {
+ "bJQueryUI": true,
+ "sPaginationType": "full_numbers",
+ "sDom": '<"H"Tfr>t<"F"ip>',
+ "oTableTools": {
+ "aButtons": [
+ "copy", "csv", "xls", "pdf",
+ {
+ "sExtends": "collection",
+ "sButtonText": "Save",
+ "aButtons": [ "csv", "xls", "pdf" ]
+ }
+ ]
+ }
+ } );
+} );
+
+
+
Other examples
+
+
+
+
+
+
+
\ No newline at end of file
--
cgit v1.2.3
From 9173f1e03f51cb141b0efa35b5e81c632b9a2689 Mon Sep 17 00:00:00 2001
From: Lei Yan
Date: Tue, 8 Oct 2013 17:50:08 -0500
Subject: Literature correlation works when it is selected as the sorted
correlation type (that is, when it is run again all traits in a database)
Added a function to data_set.py that gets all the gene_ids in the
data set. Not sure if having a separate function for getting
the gene_ids and another for getting the gene symbols makes sense.
---
wqflask/base/data_set.py | 15 +++++-
wqflask/wqflask/correlation/show_corr_results.py | 65 +++++++++++++++++++-----
2 files changed, 67 insertions(+), 13 deletions(-)
diff --git a/wqflask/base/data_set.py b/wqflask/base/data_set.py
index 5d21c901..16f9da5d 100755
--- a/wqflask/base/data_set.py
+++ b/wqflask/base/data_set.py
@@ -1078,7 +1078,20 @@ class MrnaAssayDataSet(DataSet):
def retrieve_gene_symbols(self):
query = """
- select ProbeSet.Name, ProbeSet.Symbol
+ select ProbeSet.Name, ProbeSet.Symbol, ProbeSet.GeneId
+ from ProbeSet,ProbeSetXRef
+ where ProbeSetXRef.ProbeSetFreezeId = %s and
+ ProbeSetXRef.ProbeSetId=ProbeSet.Id;
+ """ % (self.id)
+ results = g.db.execute(query).fetchall()
+ symbol_dict = {}
+ for item in results:
+ symbol_dict[item[0]] = item[1]
+ return symbol_dict
+
+ def retrieve_gene_ids(self):
+ query = """
+ select ProbeSet.Name, ProbeSet.GeneId
from ProbeSet,ProbeSetXRef
where ProbeSetXRef.ProbeSetFreezeId = %s and
ProbeSetXRef.ProbeSetId=ProbeSet.Id;
diff --git a/wqflask/wqflask/correlation/show_corr_results.py b/wqflask/wqflask/correlation/show_corr_results.py
index 42d5acd6..5df2f316 100644
--- a/wqflask/wqflask/correlation/show_corr_results.py
+++ b/wqflask/wqflask/correlation/show_corr_results.py
@@ -133,7 +133,7 @@ class CorrelationResults(object):
if self.corr_type == "tissue":
trait_symbol_dict = self.dataset.retrieve_gene_symbols()
- tissue_corr_data = self.do_tissue_corr_for_all_traits(trait_gene_symbols = trait_symbol_dict)
+ tissue_corr_data = self.do_tissue_correlation_for_all_traits(trait_gene_symbols = trait_symbol_dict)
#print("tissue_corr_data: ", pf(tissue_corr_data))
for trait in tissue_corr_data.keys()[:self.return_number]:
@@ -158,8 +158,12 @@ class CorrelationResults(object):
#self.correlation_data[trait] = [sample_r, sample_p, num_overlap]
elif self.corr_type == "lit":
- trait_symbol_dict = self.dataset.retrieve_gene_symbols()
+ trait_geneid_dict = self.dataset.retrieve_gene_ids()
+ lit_corr_data = self.do_lit_correlation_for_all_traits(trait_gene_ids = trait_geneid_dict)
+ for trait in lit_corr_data.keys()[:self.return_number]:
+ self.get_sample_r_and_p_values(trait = trait, target_samples = self.target_dataset.trait_data[trait])
+
elif self.corr_type == "sample":
for trait, values in self.target_dataset.trait_data.iteritems():
self.get_sample_r_and_p_values(trait = trait, target_samples = values)
@@ -181,13 +185,15 @@ class CorrelationResults(object):
#Get symbol for trait and call function that gets each tissue value from the database (tables TissueProbeSetXRef,
#TissueProbeSetData, etc) and calculates the correlation (cal_zero_order_corr_for_tissue in correlation_functions)
+ # Set some sane defaults
+ trait_object.tissue_corr = 0
+ trait_object.tissue_pvalue = 0
+ trait_object.lit_corr = 0
if self.corr_type == "tissue":
trait_object.tissue_corr = tissue_corr_data[trait][1]
trait_object.tissue_pvalue = tissue_corr_data[trait][2]
- else:
- # Set some sane defaults
- trait_object.tissue_corr = 0
- trait_object.tissue_pvalue = 0
+ elif self.corr_type == "lit":
+ trait_object.lit_corr = lit_corr_data[trait][1]
self.correlation_results.append(trait_object)
@@ -299,7 +305,7 @@ class CorrelationResults(object):
#return self.correlation_results
- def do_tissue_corr_for_all_traits(self, trait_gene_symbols, tissue_dataset_id=1):
+ def do_tissue_correlation_for_all_traits(self, trait_gene_symbols, tissue_dataset_id=1):
#Gets tissue expression values for the primary trait
primary_trait_tissue_vals_dict = correlation_functions.get_trait_symbol_and_tissue_values(
symbol_list = [self.this_trait.symbol])
@@ -336,7 +342,7 @@ class CorrelationResults(object):
def do_lit_correlation_for_trait_list(self):
input_trait_mouse_gene_id = self.convert_to_mouse_gene_id(self.dataset.group.species.lower(), self.this_trait.geneid)
-
+
for trait in self.correlation_results:
if trait.geneid:
@@ -350,7 +356,7 @@ class CorrelationResults(object):
FROM LCorrRamin3
WHERE GeneId1='%s' and
GeneId2='%s'
- """ % (escape(trait.mouse_gene_id), escape(self.this_trait.geneid))
+ """ % (escape(trait.mouse_gene_id), escape(input_trait_mouse_gene_id))
).fetchone()
if not result:
result = g.db.execute("""SELECT value
@@ -361,9 +367,7 @@ class CorrelationResults(object):
).fetchone()
if result:
- lit_corr = result.value
-
- if lit_corr:
+ lit_corr = result.value
trait.lit_corr = lit_corr
else:
trait.lit_corr = 0
@@ -371,6 +375,43 @@ class CorrelationResults(object):
trait.lit_corr = 0
+ def do_lit_correlation_for_all_traits(self, trait_gene_ids):
+ input_trait_mouse_gene_id = self.convert_to_mouse_gene_id(self.dataset.group.species.lower(), self.this_trait.geneid)
+
+ lit_corr_data = {}
+ for trait, gene_id in trait_gene_ids.iteritems():
+ mouse_gene_id = self.convert_to_mouse_gene_id(self.dataset.group.species.lower(), gene_id)
+
+ if mouse_gene_id and str(mouse_gene_id).find(";") == -1:
+ print("gene_symbols:", input_trait_mouse_gene_id + " / " + mouse_gene_id)
+ result = g.db.execute(
+ """SELECT value
+ FROM LCorrRamin3
+ WHERE GeneId1='%s' and
+ GeneId2='%s'
+ """ % (escape(mouse_gene_id), escape(input_trait_mouse_gene_id))
+ ).fetchone()
+ if not result:
+ result = g.db.execute("""SELECT value
+ FROM LCorrRamin3
+ WHERE GeneId2='%s' and
+ GeneId1='%s'
+ """ % (escape(mouse_gene_id), escape(input_trait_mouse_gene_id))
+ ).fetchone()
+ if result:
+ print("result:", result)
+ lit_corr = result.value
+ lit_corr_data[trait] = [gene_id, lit_corr]
+ else:
+ lit_corr_data[trait] = [gene_id, 0]
+ else:
+ lit_corr_data[trait] = [gene_id, 0]
+
+ lit_corr_data = collections.OrderedDict(sorted(lit_corr_data.items(),
+ key=lambda t: -abs(t[1][1])))
+
+ return lit_corr_data
+
def convert_to_mouse_gene_id(self, species=None, gene_id=None):
"""If the species is rat or human, translate the gene_id to the mouse geneid
--
cgit v1.2.3
From 5daef1bd5e6e494b477797993bb72488b24dd8b3 Mon Sep 17 00:00:00 2001
From: Lei Yan
Date: Wed, 9 Oct 2013 17:50:48 -0500
Subject: Improved some of the code related to the correlation page
For example, changed the two functions getting gene symbols and ids
for a dataset into one function that can take a column name as a
parameter
---
wqflask/base/data_set.py | 63 +++++++++++++------
wqflask/wqflask/correlation/show_corr_results.py | 79 ++++++++++--------------
2 files changed, 74 insertions(+), 68 deletions(-)
diff --git a/wqflask/base/data_set.py b/wqflask/base/data_set.py
index 16f9da5d..20c9a24f 100755
--- a/wqflask/base/data_set.py
+++ b/wqflask/base/data_set.py
@@ -1075,32 +1075,55 @@ class MrnaAssayDataSet(DataSet):
""" % (escape(trait), escape(self.name))
results = g.db.execute(query).fetchall()
return results
-
- def retrieve_gene_symbols(self):
- query = """
- select ProbeSet.Name, ProbeSet.Symbol, ProbeSet.GeneId
- from ProbeSet,ProbeSetXRef
- where ProbeSetXRef.ProbeSetFreezeId = %s and
- ProbeSetXRef.ProbeSetId=ProbeSet.Id;
- """ % (self.id)
- results = g.db.execute(query).fetchall()
- symbol_dict = {}
- for item in results:
- symbol_dict[item[0]] = item[1]
- return symbol_dict
- def retrieve_gene_ids(self):
+
+ def retrieve_genes(self, column_name):
query = """
- select ProbeSet.Name, ProbeSet.GeneId
+ select ProbeSet.Name, ProbeSet.%s
from ProbeSet,ProbeSetXRef
where ProbeSetXRef.ProbeSetFreezeId = %s and
ProbeSetXRef.ProbeSetId=ProbeSet.Id;
- """ % (self.id)
+ """ % (column_name, escape(str(self.id)))
results = g.db.execute(query).fetchall()
- symbol_dict = {}
- for item in results:
- symbol_dict[item[0]] = item[1]
- return symbol_dict
+ print("in retrieve_genes results {}: {}".format(type(results), results))
+
+ return dict(results)
+
+ #return {item[0]: item[1] for item in results}
+
+ #symbol_dict = {}
+ #for item in results:
+ # symbol_dict[item[0]] = item[1]
+ #return symbol_dict
+
+ #def retrieve_gene_symbols(self):
+ # query = """
+ # select ProbeSet.Name, ProbeSet.Symbol, ProbeSet.GeneId
+ # from ProbeSet,ProbeSetXRef
+ # where ProbeSetXRef.ProbeSetFreezeId = %s and
+ # ProbeSetXRef.ProbeSetId=ProbeSet.Id;
+ # """ % (self.id)
+ # results = g.db.execute(query).fetchall()
+ # symbol_dict = {}
+ # for item in results:
+ # symbol_dict[item[0]] = item[1]
+ # return symbol_dict
+ #
+ #def retrieve_gene_ids(self):
+ # query = """
+ # select ProbeSet.Name, ProbeSet.GeneId
+ # from ProbeSet,ProbeSetXRef
+ # where ProbeSetXRef.ProbeSetFreezeId = %s and
+ # ProbeSetXRef.ProbeSetId=ProbeSet.Id;
+ # """ % (self.id)
+ # return process_and_run_query(query)
+ # results = g.db.execute(query).fetchall()
+ # symbol_dict = {}
+ # for item in results:
+ # symbol_dict[item[0]] = item[1]
+ # return symbol_dict
+
+
class TempDataSet(DataSet):
diff --git a/wqflask/wqflask/correlation/show_corr_results.py b/wqflask/wqflask/correlation/show_corr_results.py
index 5df2f316..258dcfa4 100644
--- a/wqflask/wqflask/correlation/show_corr_results.py
+++ b/wqflask/wqflask/correlation/show_corr_results.py
@@ -93,9 +93,6 @@ class CorrelationResults(object):
# get trait list from db (database name)
# calculate correlation with Base vector and targets
- #self.this_trait = GeneralTrait(dataset=self.dataset.name,
- # name=start_vars['trait_id'],
- # cellid=None)
with Bench("Doing correlations"):
helper_functions.get_species_dataset_trait(self, start_vars)
self.dataset.group.read_genotype_file()
@@ -114,9 +111,9 @@ class CorrelationResults(object):
self.dataset.group.f1list +
self.dataset.group.samplelist)
- #If either BXD/whatever Only or All Samples, append all of that group's samplelist
+ #If either BXD/whatever Only or All Samples, append all of that group's samplelist
if corr_samples_group != 'samples_other':
- self.process_samples(start_vars, primary_samples, ())
+ self.process_samples(start_vars, primary_samples)
#If either Non-BXD/whatever or All Samples, get all samples from this_trait.data and
#exclude the primary samples (because they would have been added in the previous
@@ -132,55 +129,36 @@ class CorrelationResults(object):
self.correlation_data = {}
if self.corr_type == "tissue":
- trait_symbol_dict = self.dataset.retrieve_gene_symbols()
- tissue_corr_data = self.do_tissue_correlation_for_all_traits(trait_gene_symbols = trait_symbol_dict)
- #print("tissue_corr_data: ", pf(tissue_corr_data))
+ self.trait_symbol_dict = self.dataset.retrieve_genes("Symbol")
+ tissue_corr_data = self.do_tissue_correlation_for_all_traits()
for trait in tissue_corr_data.keys()[:self.return_number]:
- self.get_sample_r_and_p_values(trait = trait, target_samples = self.target_dataset.trait_data[trait])
- #this_trait_vals = []
- #target_vals = []
- #for index, sample in enumerate(self.target_dataset.samplelist):
- # if sample in self.sample_data:
- # sample_value = self.sample_data[sample]
- # target_sample_value = self.target_dataset.trait_data[trait][index]
- # this_trait_vals.append(sample_value)
- # target_vals.append(target_sample_value)
- #
- #this_trait_vals, target_vals, num_overlap = corr_result_helpers.normalize_values(
- # this_trait_vals, target_vals)
- #
- #if self.corr_method == 'pearson':
- # sample_r, sample_p = scipy.stats.pearsonr(this_trait_vals, target_vals)
- #else:
- # sample_r, sample_p = scipy.stats.spearmanr(this_trait_vals, target_vals)
- #
- #self.correlation_data[trait] = [sample_r, sample_p, num_overlap]
-
+ self.get_sample_r_and_p_values(trait, self.target_dataset.trait_data[trait])
+
elif self.corr_type == "lit":
- trait_geneid_dict = self.dataset.retrieve_gene_ids()
- lit_corr_data = self.do_lit_correlation_for_all_traits(trait_gene_ids = trait_geneid_dict)
+ self.trait_geneid_dict = self.dataset.retrieve_genes("GeneId")
+ lit_corr_data = self.do_lit_correlation_for_all_traits()
for trait in lit_corr_data.keys()[:self.return_number]:
- self.get_sample_r_and_p_values(trait = trait, target_samples = self.target_dataset.trait_data[trait])
+ self.get_sample_r_and_p_values(trait, self.target_dataset.trait_data[trait])
elif self.corr_type == "sample":
for trait, values in self.target_dataset.trait_data.iteritems():
- self.get_sample_r_and_p_values(trait = trait, target_samples = values)
+ self.get_sample_r_and_p_values(trait, values)
self.correlation_data = collections.OrderedDict(sorted(self.correlation_data.items(),
key=lambda t: -abs(t[1][0])))
- #print("correlation_data: ", pf(self.correlation_data))
for _trait_counter, trait in enumerate(self.correlation_data.keys()[:self.return_number]):
trait_object = GeneralTrait(dataset=self.dataset, name=trait, get_qtl_info=True)
-
- #print("gene symbol: ", trait_object.symbol)
- trait_object.sample_r = self.correlation_data[trait][0]
- trait_object.sample_p = self.correlation_data[trait][1]
- trait_object.num_overlap = self.correlation_data[trait][2]
+ (trait_object.sample_r,
+ trait_object.sample_p,
+ trait_object.num_overlap) = self.correlation_data[trait]
+
+ #trait_object.sample_p = self.correlation_data[trait][1]
+ #trait_object.num_overlap = self.correlation_data[trait][2]
#Get symbol for trait and call function that gets each tissue value from the database (tables TissueProbeSetXRef,
#TissueProbeSetData, etc) and calculates the correlation (cal_zero_order_corr_for_tissue in correlation_functions)
@@ -194,7 +172,6 @@ class CorrelationResults(object):
trait_object.tissue_pvalue = tissue_corr_data[trait][2]
elif self.corr_type == "lit":
trait_object.lit_corr = lit_corr_data[trait][1]
-
self.correlation_results.append(trait_object)
if self.corr_type != "lit":
@@ -305,7 +282,7 @@ class CorrelationResults(object):
#return self.correlation_results
- def do_tissue_correlation_for_all_traits(self, trait_gene_symbols, tissue_dataset_id=1):
+ def do_tissue_correlation_for_all_traits(self, tissue_dataset_id=1):
#Gets tissue expression values for the primary trait
primary_trait_tissue_vals_dict = correlation_functions.get_trait_symbol_and_tissue_values(
symbol_list = [self.this_trait.symbol])
@@ -315,14 +292,14 @@ class CorrelationResults(object):
#print("trait_gene_symbols: ", pf(trait_gene_symbols.values()))
corr_result_tissue_vals_dict= correlation_functions.get_trait_symbol_and_tissue_values(
- symbol_list=trait_gene_symbols.values())
+ symbol_list=self.trait_symbol_dict.values())
#print("corr_result_tissue_vals: ", pf(corr_result_tissue_vals_dict))
#print("trait_gene_symbols: ", pf(trait_gene_symbols))
tissue_corr_data = {}
- for trait, symbol in trait_gene_symbols.iteritems():
+ for trait, symbol in self.trait_symbol_dict.iteritems():
if symbol and symbol.lower() in corr_result_tissue_vals_dict:
this_trait_tissue_values = corr_result_tissue_vals_dict[symbol.lower()]
#print("this_trait_tissue_values: ", pf(this_trait_tissue_values))
@@ -375,15 +352,15 @@ class CorrelationResults(object):
trait.lit_corr = 0
- def do_lit_correlation_for_all_traits(self, trait_gene_ids):
+ def do_lit_correlation_for_all_traits(self):
input_trait_mouse_gene_id = self.convert_to_mouse_gene_id(self.dataset.group.species.lower(), self.this_trait.geneid)
lit_corr_data = {}
- for trait, gene_id in trait_gene_ids.iteritems():
+ for trait, gene_id in self.trait_geneid_dict.iteritems():
mouse_gene_id = self.convert_to_mouse_gene_id(self.dataset.group.species.lower(), gene_id)
if mouse_gene_id and str(mouse_gene_id).find(";") == -1:
- print("gene_symbols:", input_trait_mouse_gene_id + " / " + mouse_gene_id)
+ #print("gene_symbols:", input_trait_mouse_gene_id + " / " + mouse_gene_id)
result = g.db.execute(
"""SELECT value
FROM LCorrRamin3
@@ -399,7 +376,7 @@ class CorrelationResults(object):
""" % (escape(mouse_gene_id), escape(input_trait_mouse_gene_id))
).fetchone()
if result:
- print("result:", result)
+ #print("result:", result)
lit_corr = result.value
lit_corr_data[trait] = [gene_id, lit_corr]
else:
@@ -458,7 +435,9 @@ class CorrelationResults(object):
for index, sample in enumerate(self.target_dataset.samplelist):
if sample in self.sample_data:
sample_value = self.sample_data[sample]
+ print("sample_value:", sample_value)
target_sample_value = target_samples[index]
+ print("target_sample_value:", target_sample_value)
this_trait_vals.append(sample_value)
target_vals.append(target_sample_value)
@@ -470,7 +449,8 @@ class CorrelationResults(object):
else:
sample_r, sample_p = scipy.stats.spearmanr(this_trait_vals, target_vals)
- self.correlation_data[trait] = [sample_r, sample_p, num_overlap]
+ self.correlation_data[trait] = [sample_r, sample_p, num_overlap]
+
def do_tissue_corr_for_all_traits_2(self):
@@ -632,7 +612,10 @@ class CorrelationResults(object):
ProbeSet.Id = ProbeSetXRef.ProbeSetId order by ProbeSet.Id
"""
- def process_samples(self, start_vars, sample_names, excluded_samples):
+ def process_samples(self, start_vars, sample_names, excluded_samples=None):
+ if not excluded_samples:
+ excluded_samples = ()
+
for sample in sample_names:
if sample not in excluded_samples:
value = start_vars['value:' + sample]
--
cgit v1.2.3
From 8a09358e98dbf88deb101d13107a40bac371de5c Mon Sep 17 00:00:00 2001
From: Lei Yan
Date: Thu, 10 Oct 2013 17:09:21 -0500
Subject: Almost have correlation working for non-primary strain/group
There's just some issue with parents/f1s not being included if
you select non-BXD (or whatever the group is). All Samples, however
does work.
---
wqflask/base/data_set.py | 17 +++++++----------
wqflask/wqflask/correlation/show_corr_results.py | 19 +++++++++----------
2 files changed, 16 insertions(+), 20 deletions(-)
diff --git a/wqflask/base/data_set.py b/wqflask/base/data_set.py
index 20c9a24f..beb62bd7 100755
--- a/wqflask/base/data_set.py
+++ b/wqflask/base/data_set.py
@@ -436,8 +436,13 @@ class DataSet(object):
print("Dataset {} is not yet available in GeneNetwork.".format(self.name))
pass
- def get_trait_data(self):
- self.samplelist = self.group.samplelist + self.group.parlist + self.group.f1list
+ def get_trait_data(self, sample_list=None):
+ if sample_list:
+ self.samplelist = sample_list + self.group.parlist + self.group.f1list
+ else:
+ self.samplelist = self.group.samplelist + self.group.parlist + self.group.f1list
+
+
query = """
SELECT Strain.Name, Strain.Id FROM Strain, Species
WHERE Strain.Name IN {}
@@ -1085,16 +1090,8 @@ class MrnaAssayDataSet(DataSet):
ProbeSetXRef.ProbeSetId=ProbeSet.Id;
""" % (column_name, escape(str(self.id)))
results = g.db.execute(query).fetchall()
- print("in retrieve_genes results {}: {}".format(type(results), results))
return dict(results)
-
- #return {item[0]: item[1] for item in results}
-
- #symbol_dict = {}
- #for item in results:
- # symbol_dict[item[0]] = item[1]
- #return symbol_dict
#def retrieve_gene_symbols(self):
# query = """
diff --git a/wqflask/wqflask/correlation/show_corr_results.py b/wqflask/wqflask/correlation/show_corr_results.py
index 258dcfa4..a5c80674 100644
--- a/wqflask/wqflask/correlation/show_corr_results.py
+++ b/wqflask/wqflask/correlation/show_corr_results.py
@@ -70,7 +70,7 @@ TISSUE_MOUSE_DB = 1
def print_mem(stage=""):
mem = resource.getrusage(resource.RUSAGE_SELF).ru_maxrss
- print("{}: {}".format(stage, mem/1024))
+ #print("{}: {}".format(stage, mem/1024))
class AuthException(Exception):
@@ -119,10 +119,14 @@ class CorrelationResults(object):
#exclude the primary samples (because they would have been added in the previous
#if statement if the user selected All Samples)
if corr_samples_group != 'samples_primary':
+ if corr_samples_group == 'samples_other':
+ primary_samples = [x for x in primary_samples if x not in (
+ self.dataset.group.parlist + self.dataset.group.f1list)]
+ print("primary_samples:", primary_samples)
self.process_samples(start_vars, self.this_trait.data.keys(), primary_samples)
self.target_dataset = data_set.create_dataset(start_vars['corr_dataset'])
- self.target_dataset.get_trait_data()
+ self.target_dataset.get_trait_data(self.sample_data.keys())
self.correlation_results = []
@@ -180,7 +184,7 @@ class CorrelationResults(object):
if self.corr_type != "tissue":
self.do_tissue_correlation_for_trait_list()
- print("self.correlation_results: ", pf(self.correlation_results))
+ #print("self.correlation_results: ", pf(self.correlation_results))
#XZ, 09/18/2008: get all information about the user selected database.
@@ -241,8 +245,6 @@ class CorrelationResults(object):
#Gets tissue expression values for the primary trait
primary_trait_tissue_vals_dict = correlation_functions.get_trait_symbol_and_tissue_values(
symbol_list = [self.this_trait.symbol])
-
- print("primary_trait_tissue_vals: ", pf(primary_trait_tissue_vals_dict))
if self.this_trait.symbol.lower() in primary_trait_tissue_vals_dict:
primary_trait_tissue_values = primary_trait_tissue_vals_dict[self.this_trait.symbol.lower()]
@@ -258,8 +260,6 @@ class CorrelationResults(object):
corr_result_tissue_vals_dict= correlation_functions.get_trait_symbol_and_tissue_values(
symbol_list=gene_symbol_list)
- print("corr_result_tissue_vals: ", pf(corr_result_tissue_vals_dict))
-
for trait in self.correlation_results:
if trait.symbol and trait.symbol.lower() in corr_result_tissue_vals_dict:
this_trait_tissue_values = corr_result_tissue_vals_dict[trait.symbol.lower()]
@@ -430,14 +430,14 @@ class CorrelationResults(object):
"""
+ print("len(self.sample_data):", len(self.sample_data))
+
this_trait_vals = []
target_vals = []
for index, sample in enumerate(self.target_dataset.samplelist):
if sample in self.sample_data:
sample_value = self.sample_data[sample]
- print("sample_value:", sample_value)
target_sample_value = target_samples[index]
- print("target_sample_value:", target_sample_value)
this_trait_vals.append(sample_value)
target_vals.append(target_sample_value)
@@ -995,7 +995,6 @@ class CorrelationResults(object):
values_2.append(target_value)
correlation = calCorrelation(values_1, values_2)
self.correlation_data[trait] = correlation
- print ('correlation result: %s %s' % (trait, correlation))
"""
correlations = []
--
cgit v1.2.3