$3.85

Download Now
Sold by plrmrrshop on Tradebit
The world's largest download marketplace
3,246,595 satisfied buyers
Shopper Award

Facebook Coupon App-Quality Product With Resale Rights

Facebook Coupon App-Quality Product With Resale Rights

1 /* 2 * File: https://www.tradebit.com 3 * Version: 2.0.1 4 * Description: Tools and buttons for DataTables 5 * Author: Allan Jardine (https://www.tradebit.com) 6 * Language: Javascript 7 * License: LGPL / 3 point BSD 8 * Project: DataTables 9 * 10 * Copyright 2012-2012 Allan Jardine, all rights reserved. 11 */ 12 13 /* Global scope for TableTools */ 14 var TableTools; 15 16 (function($, window, document) { 17 18 /** 19 * TableTools provides flexible buttons and other tools for a DataTables enhanced table 20 * @class TableTools 21 * @constructor 22 * @param {Object} oDT DataTables instance 23 * @param {Object} oOpts TableTools options 24 * @param {String} https://www.tradebit.comfPath ZeroClipboard SWF path 25 * @param {String} https://www.tradebit.comwSelect Row selection options - 'none', 'single' or 'multi' 26 * @param {Function} https://www.tradebit.comreRowSelect Callback function just prior to row selection 27 * @param {Function} https://www.tradebit.comowSelected Callback function just after row selection 28 * @param {Function} https://www.tradebit.comowDeselected Callback function when row is deselected 29 * @param {Array} https://www.tradebit.comttons List of buttons to be used 30 */ 31 TableTools = function( oDT, oOpts ) 32 { 33 /* Santiy check that we are a new instance */ 34 if ( !this.CLASS || this.CLASS != "TableTools" ) 35 { 36 alert( "Warning: TableTools must be initialised with the keyword 'new'" ); 37 } 38 39 40 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 41 * Public class variables 42 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 43 44 /** 45 * @namespace Settings object which contains customisable information for TableTools instance 46 */ 47 this.s = { 48 /** 49 * Store 'this' so the instance can be retreieved from the settings object 50 * @property that 51 * @type object 52 * @default this 53 */ 54 that: this, 55 56 /** 57 * DataTables settings objects 58 * @property dt 59 * @type object 60 * @default null 61 */ 62 dt: null, 63 64 /** 65 * @namespace Print specific information 66 */ 67 print: { 68 /** 69 * DataTables draw 'start' point before the printing display was shown 70 * @property saveStart 71 * @type int 72 * @default -1 73 */ 74 saveStart: -1, 75 76 /** 77 * DataTables draw 'length' point before the printing display was shown 78 * @property saveLength 79 * @type int 80 * @default -1 81 */ 82 saveLength: -1, 83 84 /** 85 * Page scrolling point before the printing display was shown so it can be restored 86 * @property saveScroll 87 * @type int 88 * @default -1 89 */ 90 saveScroll: -1, 91 92 /** 93 * Wrapped function to end the print display (to maintain scope) 94 * @property funcEnd 95 * @type Function 96 * @default function () {} 97 */ 98 funcEnd: function () {} 99 }, 100 101 /** 102 * A unique ID is assigned to each button in each instance 103 * @property buttonCounter 104 * @type int 105 * @default 0 106 */ 107 buttonCounter: 0, 108 109 /** 110 * @namespace Select rows specific information 111 */ 112 select: { 113 /** 114 * Select type - can be 'none', 'single' or 'multi' 115 * @property type 116 * @type string 117 * @default "" 118 */ 119 type: "", 120 121 /** 122 * Array of nodes which are currently selected 123 * @property selected 124 * @type array 125 * @default [] 126 */ 127 selected: [], 128 129 /** 130 * Function to run before the selection can take place. Will cancel the select if the 131 * function returns false 132 * @property preRowSelect 133 * @type Function 134 * @default null 135 */ 136 preRowSelect: null, 137 138 /** 139 * Function to run when a row is selected 140 * @property postSelected 141 * @type Function 142 * @default null 143 */ 144 postSelected: null, 145 146 /** 147 * Function to run when a row is deselected 148 * @property postDeselected 149 * @type Function 150 * @default null 151 */ 152 postDeselected: null, 153 154 /** 155 * Indicate if all rows are selected (needed for server-side processing) 156 * @property all 157 * @type boolean 158 * @default false 159 */ 160 all: false, 161 162 /** 163 * Class name to add to selected TR nodes 164 * @property selectedClass 165 * @type String 166 * @default "" 167 */ 168 selectedClass: "" 169 }, 170 171 /** 172 * Store of the user input customisation object 173 * @property custom 174 * @type object 175 * @default {} 176 */ 177 custom: {}, 178 179 /** 180 * SWF movie path 181 * @property swfPath 182 * @type string 183 * @default "" 184 */ 185 swfPath: "", 186 187 /** 188 * Default button set 189 * @property buttonSet 190 * @type array 191 * @default [] 192 */ 193 buttonSet: [], 194 195 /** 196 * When there is more than one TableTools instance for a DataTable, there must be a 197 * master which controls events (row selection etc) 198 * @property master 199 * @type boolean 200 * @default false 201 */ 202 master: false 203 }; 204 205 206 /** 207 * @namespace Common and useful DOM elements for the class instance 208 */ 209 https://www.tradebit.com = { 210 /** 211 * DIV element that is create and all TableTools buttons (and their children) put into 212 * @property container 213 * @type node 214 * @default null 215 */ 216 container: null, 217 218 /** 219 * The table node to which TableTools will be applied 220 * @property table 221 * @type node 222 * @default null 223 */ 224 table: null, 225 226 /** 227 * @namespace Nodes used for the print display 228 */ 229 print: { 230 /** 231 * Nodes which have been removed from the display by setting them to display none 232 * @property hidden 233 * @type array 234 * @default [] 235 */ 236 hidden: [], 237 238 /** 239 * The information display saying tellng the user about the print display 240 * @property message 241 * @type node 242 * @default null 243 */ 244 message: null 245 }, 246 247 /** 248 * @namespace Nodes used for a collection display. This contains the currently used collection 249 */ 250 collection: { 251 /** 252 * The div wrapper containing the buttons in the collection (i.e. the menu) 253 * @property collection 254 * @type node 255 * @default null 256 */ 257 collection: null, 258 259 /** 260 * Background display to provide focus and capture events 261 * @property background 262 * @type node 263 * @default null 264 */ 265 background: null 266 } 267 }; 268 269 270 271 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 272 * Public class methods 273 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 274 275 /** 276 * Retreieve the settings object from an instance 277 * @method fnSettings 278 * @returns {object} TableTools settings object 279 */ 280 https://www.tradebit.comettings = function () { 281 return this.s; 282 }; 283 284 285 /* Constructor logic */ 286 if ( typeof oOpts == '' ) 287 { 288 oOpts = {}; 289 } 290 291 https://www.tradebit.com = https://www.tradebit.comettings(); 292 this._fnConstruct( oOpts ); 293 294 return this; 295 }; 296 297 298 299 https://www.tradebit.comtotype = { 300 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 301 * Public methods 302 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 303 304 /** 305 * Retreieve the settings object from an instance 306 * @method fnGetSelected 307 * @returns {array} List of TR nodes which are currently selected 308 */ 309 fnGetSelected: function () 310 { 311 var masterS = this._fnGetMasterSettings(); 312 return https://www.tradebit.comected; 313 }, 314 315 /** 316 * Check to see if a current row is selected or not 317 * @method fnGetSelected 318 * @param {Node} n TR node to check if it is currently selected or not 319 * @returns {Boolean} true if select, false otherwise 320 */ 321 fnIsSelected: function ( n ) 322 { 323 var selected = https://www.tradebit.cometSelected(); 324 for ( var i=0, iLen=https://www.tradebit.comgth ; i iDocWidth ) 773 { 774 https://www.tradebit.comt = (iDocWidth-iDivWidth)+"px"; 775 } 776 777 if ( iDivY + iDivHeight > iDocHeight ) 778 { 779 https://www.tradebit.com = (iDivY-iDivHeight-$(nButton).outerHeight())+"px"; 780 } 781 782 https://www.tradebit.comlection = nHidden; 783 https://www.tradebit.comkground = nBackground; 784 785 /* This results in a very small delay for the end user but it allows the animation to be 786 * much smoother. If you don't want the animation, then the setTimeout can be removed 787 */ 788 setTimeout( function () { 789 $(nHidden).animate({opacity: 1}, 500); 790 $(nBackground).animate({opacity: 0.25}, 500); 791 }, 10 ); 792 793 /* Event handler to remove the collection display */ 794 $(nBackground).click( function () { 795 that._https://www.tradebit.coml( that, null, null ); 796 } ); 797 }, 798 799 800 /** 801 * Hide a button collection 802 * @param {Node} nButton Button to use for the collection 803 * @param {Object} oConfig Button configuration object 804 * @returns void 805 * @private 806 */ 807 _fnCollectionHide: function ( nButton, oConfig ) 808 { 809 if ( oConfig !== null && https://www.tradebit.comxtends == 'collection' ) 810 { 811 return; 812 } 813 814 if ( https://www.tradebit.comlection !== null ) 815 { 816 $(https://www.tradebit.comlection).animate({opacity: 0}, 500, function (e) { 817 https://www.tradebit.complay = "none"; 818 } ); 819 820 $(https://www.tradebit.comkground).animate({opacity: 0}, 500, function (e) { 821 https://www.tradebit.comoveChild( this ); 822 } ); 823 824 https://www.tradebit.comlection = null; 825 https://www.tradebit.comkground = null; 826 } 827 }, 828 829 830 831 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 832 * Row selection functions 833 */ 834 835 /** 836 * Add event handlers to a table to allow for row selection 837 * @method _fnRowSelectConfig 838 * @returns void 839 * @private 840 */ 841 _fnRowSelectConfig: function () 842 { 843 if ( https://www.tradebit.comter ) 844 { 845 var 846 that = this, 847 i, iLen, 848 aoOpenRows = https://www.tradebit.compenRows; 849 850 $(https://www.tradebit.comble).addClass( 'DTTT_selectable' ); 851 852 $('tr', https://www.tradebit.comody).live( 'click', function(e) { 853 /* Sub-table must be ignored (odd that the selector won't do this with >) */ 854 if ( https://www.tradebit.comentNode != https://www.tradebit.comody ) 855 { 856 return; 857 } 858 859 /* Not interested in selecting 'opened' rows */ 860 for ( i=0, iLen=https://www.tradebit.comgth ; i
File Data

This file is sold by plrmrrshop, an independent seller on Tradebit.

File Size 77 megabytes
File Type ZIP
Our Reviews
© Tradebit 2004-2024
All files are property of their respective owners
Questions about this file? Contact plrmrrshop
DMCA/Copyright or marketplace issues? Contact Tradebit