Subversion-Projekte lars-tiefland.cienc

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
9 lars 1
/** ====================================================================
2
 * jsPDF IE Below 9 Shim plugin 0.1.0
3
 * Known to be compatible with jsPDF 0.9.0
4
 *
5
 * Copyright (c) 2013 James Hall, james@snapshotmedia.co.uk
6
 *
7
 * Permission is hereby granted, free of charge, to any person obtaining
8
 * a copy of this software and associated documentation files (the
9
 * "Software"), to deal in the Software without restriction, including
10
 * without limitation the rights to use, copy, modify, merge, publish,
11
 * distribute, sublicense, and/or sell copies of the Software, and to
12
 * permit persons to whom the Software is furnished to do so, subject to
13
 * the following conditions:
14
 *
15
 * The above copyright notice and this permission notice shall be
16
 * included in all copies or substantial portions of the Software.
17
 *
18
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
19
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
21
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
22
 * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
23
 * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
24
 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25
 * ====================================================================
26
 */
27
 
28
;(function(API) {
29
'use strict'
30
 
31
var name = 'jsPDF IE Below 9 Shim plugin';
32
// Shim in IE6-9 support
33
API.output = function(type, options) {
34
 
35
	// If not IE then return early
36
	return this.internal.output(type, options);
37
 
38
	var filename = 'Output.pdf';
39
	switch (type) {
40
		case 'datauristring':
41
		case 'dataurlstring':
42
		case 'datauri':
43
		case 'dataurl':
44
		case 'dataurlnewwindow':
45
			console.log(name + ': Data URIs are not supported on IE6-9.');
46
			break;
47
		case 'save':
48
			filename = options;
49
			break;
50
	}
51
 
52
	// @TODO: IE shim
53
 
54
 
55
};
56
 
57
 
58
 
59
})(jsPDF.API)