[Pkg-javascript-commits] [datatables-extensions] 04/17: New upstream version 0.0+20150910+dfsg
Andreas Tille
tille at debian.org
Wed Jan 3 07:44:01 UTC 2018
This is an automated email from the git hooks/post-receive script.
tille pushed a commit to branch master
in repository datatables-extensions.
commit 62ac2db61b122b0b498cf042bee0c302d1a215c2
Author: Andreas Tille <tille at debian.org>
Date: Tue Jan 2 15:11:12 2018 +0100
New upstream version 0.0+20150910+dfsg
---
Buttons/js/buttons.flash.js | 770 ----------------------------------------
Buttons/js/buttons.flash.min.js | 19 -
Buttons/swf/flashExport.swf | Bin 65228 -> 0 bytes
3 files changed, 789 deletions(-)
diff --git a/Buttons/js/buttons.flash.js b/Buttons/js/buttons.flash.js
deleted file mode 100755
index a0d7746..0000000
--- a/Buttons/js/buttons.flash.js
+++ /dev/null
@@ -1,770 +0,0 @@
-/*!
- * Flash export buttons for Buttons and DataTables.
- * 2015 SpryMedia Ltd - datatables.net/license
- *
- * ZeroClipbaord - MIT license
- * Copyright (c) 2012 Joseph Huckaby
- */
-
-(function($, DataTable) {
-"use strict";
-
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * ZeroClipboard dependency
- */
-
-/*
- * ZeroClipboard 1.0.4 with modifications
- * Author: Joseph Huckaby
- * License: MIT
- *
- * Copyright (c) 2012 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, 10) + 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 ).replace(/&/g, '&');
- }
- },
-
- 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 += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="'+protocol+'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="'+width+'" height="'+height+'" id="'+this.movieId+'" align="middle"><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="false" /><param name="movie" value="'+ZeroClipboard_TableTools.moviePath+'" /><param name="loop" value="false" /><param name="menu" value="false" /><param na [...]
- }
- else {
- // all other browsers get an EMBED tag
- html += '<embed id="'+this.movieId+'" src="'+ZeroClipboard_TableTools.moviePath+'" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="'+width+'" height="'+height+'" name="'+this.movieId+'" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="'+flashvars+'" wmode="transparent" />';
- }
- 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
- var that = this;
-
- if (this.domElement && this.div) {
- $(this.div).remove();
-
- this.domElement = null;
- this.div = null;
-
- $.each( ZeroClipboard_TableTools.clients, function ( id, client ) {
- if ( client === that ) {
- delete ZeroClipboard_TableTools.clients[ id ];
- }
- } );
- }
- },
-
- 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) ;}
- },
-
- 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) {
- var self;
-
- // 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) {
- 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/)) {
- 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.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
- }
-};
-
-ZeroClipboard_TableTools.hasFlash = function ()
-{
- try {
- var fo = new ActiveXObject('ShockwaveFlash.ShockwaveFlash');
- if (fo) {
- return true;
- }
- }
- catch (e) {
- if (
- navigator.mimeTypes &&
- navigator.mimeTypes['application/x-shockwave-flash'] !== undefined &&
- navigator.mimeTypes['application/x-shockwave-flash'].enabledPlugin
- ) {
- return true;
- }
- }
-
- return false;
-};
-
-// For the Flash binding to work, ZeroClipboard_TableTools must be on the global
-// object list
-window.ZeroClipboard_TableTools = ZeroClipboard_TableTools;
-
-
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Local (private) functions
- */
-
-/**
- * If a Buttons instance is initlaised before it is placed into the DOM, Flash
- * won't be able to bind to it, so we need to wait until it is available, this
- * method abstracts that out.
- *
- * @param {ZeroClipboard} flash ZeroClipboard instance
- * @param {jQuery} node Button
- */
-var _glue = function ( flash, node )
-{
- var id = node.attr('id');
-
- if ( node.parents('html').length ) {
- flash.glue( node[0], '' );
- }
- else {
- setTimeout( function () {
- _glue( flash, node );
- }, 500 );
- }
-};
-
-/**
- * Get the title / file name for an exported file.
- *
- * @param {object} config Button configuration
- * @param {boolean} incExtension Include the file name extension
- */
-var _filename = function ( config, incExtension )
-{
- var title = config.title;
-
- if ( title.indexOf( '*' ) !== -1 ) {
- title = title.replace( '*', $('title').text() );
- }
-
- // Strip characters which the OS will object to
- title = title.replace(/[^a-zA-Z0-9_\u00A1-\uFFFF\.,\-_ !\(\)]/g, "");
-
- return incExtension === undefined || incExtension === true ?
- title+config.extension :
- title;
-};
-
-/**
- * Set the flash text. This has to be broken up into chunks as the Javascript /
- * Flash bridge has a size limit. There is no indication in the Flash
- * documentation what this is, and it probably depends upon the browser.
- * Experimentation shows that the point is around 50k when data starts to get
- * lost, so an 8K limit used here is safe.
- *
- * @param {ZeroClipboard} flash ZeroClipboard instance
- * @param {string} data Data to send to Flash
- */
-var _setText = function ( flash, data )
-{
- var parts = data.match(/[\s\S]{1,8192}/g) || [];
-
- flash.clearText();
- for ( var i=0, len=parts.length ; i<len ; i++ )
- {
- flash.appendText( parts[i] );
- }
-};
-
-/**
- * Get the newline character(s)
- *
- * @param {object} config Button configuration
- * @return {string} Newline character
- */
-var _newLine = function ( config )
-{
- return config.newline ?
- config.newline :
- navigator.userAgent.match(/Windows/) ?
- '\r\n' :
- '\n';
-};
-
-/**
- * Combine the data from the `buttons.exportData` method into a string that
- * will be used in the export file.
- *
- * @param {DataTable.Api} dt DataTables API instance
- * @param {object} config Button configuration
- * @return {object} The data to export
- */
-var _exportData = function ( dt, config )
-{
- var newLine = _newLine( config );
- var data = dt.buttons.exportData( config.exportOptions );
- var join = function ( a ) {
- var s = '';
- var boundary = config.fieldBoundary;
- var separator = config.fieldSeparator;
-
- // If there is a field boundary, then we might need to escape it in
- // the source data
- for ( var i=0, ien=a.length ; i<ien ; i++ ) {
- if ( i > 0 ) {
- s += separator;
- }
-
- s += boundary ?
- boundary + a[i].replace( boundary, '\\'+boundary ) + boundary :
- a[i];
- }
-
- return s;
- };
-
- var header = config.header ? join( data.header )+newLine : '';
- var footer = config.footer ? newLine+join( data.footer ) : '';
- var body = [];
-
- for ( var i=0, ien=data.body.length ; i<ien ; i++ ) {
- body.push( join( data.body[i] ) );
- }
-
- return {
- str: header + body.join( newLine ) + footer,
- rows: body.length
- };
-};
-
-
-// Basic initialisation for the buttons is common between them
-var flashButton = {
- available: function () {
- return ZeroClipboard_TableTools.hasFlash();
- },
-
- init: function ( dt, button, config ) {
- // Insert the Flash movie
- ZeroClipboard_TableTools.moviePath = DataTable.Buttons.swfPath;
- var flash = new ZeroClipboard_TableTools.Client();
-
- flash.setHandCursor( true );
- flash.addEventListener('mouseDown', function(client) {
- config._fromFlash = true;
- dt.button( button[0] ).trigger();
- config._fromFlash = false;
- } );
-
- _glue( flash, button );
-
- config._flash = flash;
- },
-
- destroy: function ( dt, button, config ) {
- config._flash.destroy();
- },
-
- fieldSeparator: ',',
-
- fieldBoundary: '"',
-
- exportOptions: {},
-
- title: '*',
-
- extension: '.csv',
-
- header: true,
-
- footer: false
-};
-
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * DataTables options and methods
- */
-
-// Set the default SWF path
-DataTable.Buttons.swfPath = '//cdn.datatables.net/buttons/1.0.0/swf/flashExport.swf';
-
-// Method to allow Flash buttons to be resized when made visible - as they are
-// of zero height and width if initialised hidden
-DataTable.Api.register( 'buttons.resize()', function () {
- $.each( ZeroClipboard_TableTools.clients, function ( i, client ) {
- if ( client.domElement !== undefined && client.domElement.parentNode ) {
- client.positionElement();
- }
- } );
-} );
-
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Button definitions
- */
-
-// Copy to clipboard
-DataTable.ext.buttons.copyFlash = $.extend( {}, flashButton, {
- className: 'buttons-copy buttons-flash',
-
- text: function ( dt ) {
- return dt.i18n( 'buttons.copy', 'Copy' );
- },
-
- action: function ( e, dt, button, config ) {
- // Check that the trigger did actually occur due to a Flash activation
- if ( ! config._fromFlash ) {
- return;
- }
-
- var flash = config._flash;
- var data = _exportData( dt, config );
-
- flash.setAction( 'copy' );
- _setText( flash, data.str );
-
- dt.buttons.info(
- dt.i18n( 'buttons.copyTitle', 'Copy to clipboard' ),
- dt.i18n( 'buttons.copyInfo', {
- _: 'Copied %d rows to clipboard',
- 1: 'Copied 1 row to clipboard'
- }, data.rows ),
- 3000
- );
- },
-
- fieldSeparator: '\t',
-
- fieldBoundary: ''
-} );
-
-// CSV save file
-DataTable.ext.buttons.csvFlash = $.extend( {}, flashButton, {
- className: 'buttons-csv buttons-flash',
-
- text: function ( dt ) {
- return dt.i18n( 'buttons.csv', 'CSV' );
- },
-
- action: function ( e, dt, button, config ) {
- // Set the text
- var flash = config._flash;
- var data = _exportData( dt, config );
-
- flash.setAction( 'csv' );
- flash.setFileName( _filename( config ) );
- _setText( flash, data.str );
- }
-} );
-
-// Excel save file - this is really a CSV file using UTF-8 that Excel can read
-DataTable.ext.buttons.excelFlash = $.extend( {}, flashButton, {
- className: 'buttons-excel buttons-flash',
-
- text: function ( dt ) {
- return dt.i18n( 'buttons.excel', 'Excel' );
- },
-
- action: function ( e, dt, button, config ) {
- // Set the text
- var xml = '';
- var flash = config._flash;
- var data = dt.buttons.exportData( config.exportOptions );
- var addRow = function ( row ) {
- var cells = [];
-
- for ( var i=0, ien=row.length ; i<ien ; i++ ) {
- cells.push( $.isNumeric( row[i] ) ?
- '<c t="n"><v>'+row[i]+'</v></c>' :
- '<c t="inlineStr"><is><t>'+
- row[i].replace(/&(?!amp;)/g, '&')+
- '</t></is></c>'
- );
- }
-
- return '<row>'+cells.join('')+'</row>';
- };
-
- if ( config.header ) {
- xml += addRow( data.header );
- }
-
- for ( var i=0, ien=data.body.length ; i<ien ; i++ ) {
- xml += addRow( data.body[i] );
- }
-
- if ( config.footer ) {
- xml += addRow( data.footer );
- }
-
- flash.setAction( 'excel' );
- flash.setFileName( _filename( config ) );
- _setText( flash, xml );
- },
-
- extension: '.xlsx'
-} );
-
-// PDF export
-DataTable.ext.buttons.pdfFlash = $.extend( {}, flashButton, {
- className: 'buttons-pdf buttons-flash',
-
- text: function ( dt ) {
- return dt.i18n( 'buttons.pdf', 'PDF' );
- },
-
- action: function ( e, dt, button, config ) {
- // Set the text
- var flash = config._flash;
- var data = dt.buttons.exportData( config.exportOptions );
- var totalWidth = dt.table().node().offsetWidth;
-
- // Calculate the column width ratios for layout of the table in the PDF
- var ratios = dt.columns( config.columns ).indexes().map( function ( idx ) {
- return dt.column( idx ).header().offsetWidth / totalWidth;
- } );
-
- flash.setAction( 'pdf' );
- flash.setFileName( _filename( config ) );
-
- _setText( flash, JSON.stringify( {
- title: _filename(config, false),
- message: config.message,
- colWidth: ratios.toArray(),
- orientation: config.orientation,
- size: config.pageSize,
- header: config.header ? data.header : null,
- footer: config.footer ? data.footer : null,
- body: data.body
- } ) );
- },
-
- extension: '.pdf',
-
- orientation: 'portrait',
-
- pageSize: 'A4',
-
- message: '',
-
- newline: '\n'
-} );
-
-
-})(jQuery, jQuery.fn.dataTable);
diff --git a/Buttons/js/buttons.flash.min.js b/Buttons/js/buttons.flash.min.js
deleted file mode 100755
index d7263bc..0000000
--- a/Buttons/js/buttons.flash.min.js
+++ /dev/null
@@ -1,19 +0,0 @@
-(function(g,h){var e={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.m [...]
-a+"\\s*"))});return a},setMoviePath:function(a){this.moviePath=a},dispatch:function(a,b,d){(a=this.clients[a])&&a.receiveEvent(b,d)},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.offsetPare [...]
-Client:function(a){this.handlers={};this.id=e.nextId++;this.movieId="ZeroClipboard_TableToolsMovie_"+this.id;e.register(this.id,this);a&&this.glue(a)}};e.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=e.$(a);var d=99;this.domElement.style.zIndex&&(d=parseInt(this.domElement.style.zIndex,10)+1);var c=e.getDOMObjectPosition(this.domElement);this.div=document.create [...]
-var f=this.div.style;f.position="absolute";f.left="0px";f.top="0px";f.width=c.width+"px";f.height=c.height+"px";f.zIndex=d;"undefined"!=typeof b&&""!==b&&(this.div.title=b);0!==c.width&&0!==c.height&&(this.sized=!0);this.domElement&&(this.domElement.appendChild(this.div),this.div.innerHTML=this.getHTML(c.width,c.height).replace(/&/g,"&"))},positionElement:function(){var a=e.getDOMObjectPosition(this.domElement),b=this.div.style;b.position="absolute";b.width=a.width+"px";b.height=a.he [...]
-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 d="",c="id="+this.id+"&width="+a+"&height="+b;if(navigator.userAgent.match(/MSIE/))var f=location.href.match(/^https/i)?"https://":"http://",d=d+('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="'+f+'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="'+a+'" height="'+b+'" id="'+this.movieId+'" align="mid [...]
-e.moviePath+'" /><param name="loop" value="false" /><param name="menu" value="false" /><param name="quality" value="best" /><param name="bgcolor" value="#ffffff" /><param name="flashvars" value="'+c+'"/><param name="wmode" value="transparent"/></object>');else d+='<embed id="'+this.movieId+'" src="'+e.moviePath+'" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="'+a+'" height="'+b+'" name="'+this.movieId+'" align="middle" allowScriptAccess="always" allowFullScreen="false [...]
-c+'" wmode="transparent" />';return d},hide:function(){this.div&&(this.div.style.left="-2000px")},show:function(){this.reposition()},destroy:function(){var a=this;this.domElement&&this.div&&(g(this.div).remove(),this.div=this.domElement=null,g.each(e.clients,function(b,d){d===a&&delete e.clients[b]}))},reposition:function(a){a&&((this.domElement=e.$(a))||this.hide());if(this.domElement&&this.div){var a=e.getDOMObjectPosition(this.domElement),b=this.div.style;b.left=""+a.left+"px";b.top=" [...]
-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)},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]=[]) [...]
-setHandCursor:function(a){this.handCursorEnabled=a;this.ready&&this.movie.setHandCursor(a)},setCSSEffects:function(a){this.cssEffects=!!a},receiveEvent:function(a,b){var d,a=a.toString().toLowerCase().replace(/^on/,"");switch(a){case "load":this.movie=document.getElementById(this.movieId);if(!this.movie){d=this;setTimeout(function(){d.receiveEvent("load",null)},1);return}if(!this.ready&&navigator.userAgent.match(/Firefox/)&&navigator.userAgent.match(/Windows/)){d=this;setTimeout(function [...]
-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.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" [...]
-!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 c=0,f=this.handlers[a].length;c<f;c++){var e=this.handlers[a][c];if("function"==typeof e)e(this,b);else if("object"==typeof e&&2==e.length)e[0][e[1]](this,b);else if("string"==typeof e)window[e](this,b)}}};e.hasFlash=function(){try{if(new ActiveXObje [...]
-void 0!==navigator.mimeTypes["application/x-shockwave-flash"]&&navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin)return!0}return!1};window.ZeroClipboard_TableTools=e;var n=function(a,b){b.attr("id");b.parents("html").length?a.glue(b[0],""):setTimeout(function(){n(a,b)},500)},j=function(a,b){var d=a.title;-1!==d.indexOf("*")&&(d=d.replace("*",g("title").text()));d=d.replace(/[^a-zA-Z0-9_\u00A1-\uFFFF\.,\-_ !\(\)]/g,"");return void 0===b||!0===b?d+a.extension:d},k=function [...]
-b.match(/[\s\S]{1,8192}/g)||[];a.clearText();for(var c=0,e=d.length;c<e;c++)a.appendText(d[c])},o=function(a,b){for(var d=b.newline?b.newline:navigator.userAgent.match(/Windows/)?"\r\n":"\n",c=a.buttons.exportData(b.exportOptions),e=function(a){for(var c="",d=b.fieldBoundary,e=b.fieldSeparator,f=0,g=a.length;f<g;f++)0<f&&(c+=e),c+=d?d+a[f].replace(d,"\\"+d)+d:a[f];return c},g=b.header?e(c.header)+d:"",h=b.footer?d+e(c.footer):"",l=[],m=0,p=c.body.length;m<p;m++)l.push(e(c.body[m]));retur [...]
-h,rows:l.length}},i={available:function(){return e.hasFlash()},init:function(a,b,d){e.moviePath=h.Buttons.swfPath;var c=new e.Client;c.setHandCursor(!0);c.addEventListener("mouseDown",function(){d._fromFlash=!0;a.button(b[0]).trigger();d._fromFlash=!1});n(c,b);d._flash=c},destroy:function(a,b,d){d._flash.destroy()},fieldSeparator:",",fieldBoundary:'"',exportOptions:{},title:"*",extension:".csv",header:!0,footer:!1};h.Buttons.swfPath="//cdn.datatables.net/buttons/1.0.0/swf/flashExport.swf [...]
-function(){g.each(e.clients,function(a,b){void 0!==b.domElement&&b.domElement.parentNode&&b.positionElement()})});h.ext.buttons.copyFlash=g.extend({},i,{className:"buttons-copy buttons-flash",text:function(a){return a.i18n("buttons.copy","Copy")},action:function(a,b,d,c){c._fromFlash&&(a=c._flash,c=o(b,c),a.setAction("copy"),k(a,c.str),b.buttons.info(b.i18n("buttons.copyTitle","Copy to clipboard"),b.i18n("buttons.copyInfo",{_:"Copied %d rows to clipboard",1:"Copied 1 row to clipboard"},c [...]
-fieldSeparator:"\t",fieldBoundary:""});h.ext.buttons.csvFlash=g.extend({},i,{className:"buttons-csv buttons-flash",text:function(a){return a.i18n("buttons.csv","CSV")},action:function(a,b,d,c){a=c._flash;b=o(b,c);a.setAction("csv");a.setFileName(j(c));k(a,b.str)}});h.ext.buttons.excelFlash=g.extend({},i,{className:"buttons-excel buttons-flash",text:function(a){return a.i18n("buttons.excel","Excel")},action:function(a,b,d,c){var a="",d=c._flash,b=b.buttons.exportData(c.exportOptions),e=fu [...]
-[],c=0,d=a.length;c<d;c++)b.push(g.isNumeric(a[c])?'<c t="n"><v>'+a[c]+"</v></c>":'<c t="inlineStr"><is><t>'+a[c].replace(/&(?!amp;)/g,"&")+"</t></is></c>");return"<row>"+b.join("")+"</row>"};c.header&&(a+=e(b.header));for(var h=0,i=b.body.length;h<i;h++)a+=e(b.body[h]);c.footer&&(a+=e(b.footer));d.setAction("excel");d.setFileName(j(c));k(d,a)},extension:".xlsx"});h.ext.buttons.pdfFlash=g.extend({},i,{className:"buttons-pdf buttons-flash",text:function(a){return a.i18n("buttons.pdf", [...]
-b,d,c){var a=c._flash,d=b.buttons.exportData(c.exportOptions),e=b.table().node().offsetWidth,g=b.columns(c.columns).indexes().map(function(a){return b.column(a).header().offsetWidth/e});a.setAction("pdf");a.setFileName(j(c));k(a,JSON.stringify({title:j(c,!1),message:c.message,colWidth:g.toArray(),orientation:c.orientation,size:c.pageSize,header:c.header?d.header:null,footer:c.footer?d.footer:null,body:d.body}))},extension:".pdf",orientation:"portrait",pageSize:"A4",message:"",newline:"\n [...]
-jQuery.fn.dataTable);
diff --git a/Buttons/swf/flashExport.swf b/Buttons/swf/flashExport.swf
deleted file mode 100755
index c93c2f8..0000000
Binary files a/Buttons/swf/flashExport.swf and /dev/null differ
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/datatables-extensions.git
More information about the Pkg-javascript-commits
mailing list