webshims-rails 1.11.6.1 → 1.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/webshims-rails/version.rb +2 -2
- data/vendor/assets/javascripts/webshims/polyfiller.js +126 -72
- data/vendor/assets/javascripts/webshims/shims/FlashCanvas/canvas2png.js +9 -4
- data/vendor/assets/javascripts/webshims/shims/FlashCanvas/flashcanvas.js +32 -26
- data/vendor/assets/javascripts/webshims/shims/FlashCanvas/flashcanvas.swf +0 -0
- data/vendor/assets/javascripts/webshims/shims/FlashCanvas/proxy.php +25 -4
- data/vendor/assets/javascripts/webshims/shims/FlashCanvas/save.php +9 -3
- data/vendor/assets/javascripts/webshims/shims/FlashCanvasPro/canvas2png.js +9 -4
- data/vendor/assets/javascripts/webshims/shims/FlashCanvasPro/flash10canvas.swf +0 -0
- data/vendor/assets/javascripts/webshims/shims/FlashCanvasPro/flash9canvas.swf +0 -0
- data/vendor/assets/javascripts/webshims/shims/FlashCanvasPro/flashcanvas.js +36 -30
- data/vendor/assets/javascripts/webshims/shims/FlashCanvasPro/proxy.php +25 -4
- data/vendor/assets/javascripts/webshims/shims/FlashCanvasPro/save.php +9 -3
- data/vendor/assets/javascripts/webshims/shims/combos/1.js +13 -6
- data/vendor/assets/javascripts/webshims/shims/combos/10.js +156 -143
- data/vendor/assets/javascripts/webshims/shims/combos/11.js +97 -84
- data/vendor/assets/javascripts/webshims/shims/combos/12.js +2 -4
- data/vendor/assets/javascripts/webshims/shims/combos/13.js +1 -2
- data/vendor/assets/javascripts/webshims/shims/combos/14.js +956 -2819
- data/vendor/assets/javascripts/webshims/shims/combos/15.js +73 -67
- data/vendor/assets/javascripts/webshims/shims/combos/16.js +75 -71
- data/vendor/assets/javascripts/webshims/shims/combos/17.js +118 -89
- data/vendor/assets/javascripts/webshims/shims/combos/18.js +119 -91
- data/vendor/assets/javascripts/webshims/shims/combos/19.js +62 -65
- data/vendor/assets/javascripts/webshims/shims/combos/2.js +73 -67
- data/vendor/assets/javascripts/webshims/shims/combos/20.js +61 -63
- data/vendor/assets/javascripts/webshims/shims/combos/21.js +3 -6
- data/vendor/assets/javascripts/webshims/shims/combos/22.js +1 -2
- data/vendor/assets/javascripts/webshims/shims/combos/23.js +1 -2
- data/vendor/assets/javascripts/webshims/shims/combos/24.js +22 -12
- data/vendor/assets/javascripts/webshims/shims/combos/25.js +63 -67
- data/vendor/assets/javascripts/webshims/shims/combos/26.js +59 -59
- data/vendor/assets/javascripts/webshims/shims/combos/27.js +1 -2
- data/vendor/assets/javascripts/webshims/shims/combos/28.js +1915 -0
- data/vendor/assets/javascripts/webshims/shims/combos/29.js +817 -0
- data/vendor/assets/javascripts/webshims/shims/combos/3.js +71 -63
- data/vendor/assets/javascripts/webshims/shims/combos/30.js +72 -65
- data/vendor/assets/javascripts/webshims/shims/combos/31.js +71 -63
- data/vendor/assets/javascripts/webshims/shims/combos/32.js +2343 -0
- data/vendor/assets/javascripts/webshims/shims/combos/33.js +897 -0
- data/vendor/assets/javascripts/webshims/shims/combos/4.js +59 -59
- data/vendor/assets/javascripts/webshims/shims/combos/5.js +119 -91
- data/vendor/assets/javascripts/webshims/shims/combos/6.js +120 -93
- data/vendor/assets/javascripts/webshims/shims/combos/7.js +74 -69
- data/vendor/assets/javascripts/webshims/shims/combos/8.js +73 -67
- data/vendor/assets/javascripts/webshims/shims/combos/9.js +157 -145
- data/vendor/assets/javascripts/webshims/shims/dom-extend.js +58 -57
- data/vendor/assets/javascripts/webshims/shims/form-combat.js +0 -1
- data/vendor/assets/javascripts/webshims/shims/form-core.js +12 -3
- data/vendor/assets/javascripts/webshims/shims/form-datalist-lazy.js +4 -3
- data/vendor/assets/javascripts/webshims/shims/form-number-date-api.js +20 -3
- data/vendor/assets/javascripts/webshims/shims/form-number-date-ui.js +78 -71
- data/vendor/assets/javascripts/webshims/shims/form-shim-extend2.js +21 -10
- data/vendor/assets/javascripts/webshims/shims/form-validation.js +39 -27
- data/vendor/assets/javascripts/webshims/shims/forms-picker.js +173 -128
- data/vendor/assets/javascripts/webshims/shims/i18n/{formcfg-ch-ZN.js → formcfg-ch-CN.js} +0 -0
- data/vendor/assets/javascripts/webshims/shims/i18n/formcfg-en.js +0 -2
- data/vendor/assets/javascripts/webshims/shims/i18n/formcfg-zh-CN.js +65 -0
- data/vendor/assets/javascripts/webshims/shims/plugins/jquery.ui.position.js +1 -1
- data/vendor/assets/javascripts/webshims/shims/range-ui.js +18 -11
- data/vendor/assets/javascripts/webshims/shims/styles/forms-ext.css +221 -153
- data/vendor/assets/javascripts/webshims/shims/styles/progress.gif +0 -0
- data/vendor/assets/javascripts/webshims/shims/styles/progress.png +0 -0
- data/vendor/assets/javascripts/webshims/shims/styles/scss/_extends.scss +5 -0
- data/vendor/assets/javascripts/webshims/shims/styles/scss/forms-ext.scss +273 -177
- data/vendor/assets/javascripts/webshims/shims/styles/scss/shim.scss +113 -98
- data/vendor/assets/javascripts/webshims/shims/styles/shim.css +114 -88
- data/vendor/assets/javascripts/webshims/shims/track-ui.js +2 -2
- metadata +10 -7
- data/vendor/assets/javascripts/webshims/extras/mousepress.js +0 -60
- data/vendor/assets/javascripts/webshims/shims/jpicker/images/Thumbs.db +0 -0
- data/vendor/assets/javascripts/webshims/shims/json-storage.js +0 -316
- data/vendor/assets/javascripts/webshims/shims/mediagroup.js +0 -29
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 12271af5bfd9854dca82fe6a908b601a868e34c4
|
4
|
+
data.tar.gz: e7b960a94efab5c9f1bb5bb938fcfadc25bdb3f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 594d98543dfbf31bdc6833188172486e427e7517f1501117015b4bc4177a4dc84902baffa7896d008a689513d8360656bb2249197fc1a3c6e8ee9b9152473e6e
|
7
|
+
data.tar.gz: 31328922dcf77b9b72439395874c99715804044993e34fe2b8239c6e4f95ac8b33e1611a31b1ba3242ea66c341db5b9b2ec034a502f57e88bcc2dc6cebd08f50
|
@@ -1,12 +1,50 @@
|
|
1
1
|
(function (factory) {
|
2
|
+
var timer;
|
3
|
+
var addAsync = function(){
|
4
|
+
if(!window.asyncWebshims){
|
5
|
+
if(!window.asyncWebshims){
|
6
|
+
window.asyncWebshims = {
|
7
|
+
cfg: [],
|
8
|
+
ready: []
|
9
|
+
};
|
10
|
+
}
|
11
|
+
}
|
12
|
+
};
|
13
|
+
var start = function(){
|
14
|
+
if(window.jQuery){
|
15
|
+
factory(jQuery);
|
16
|
+
factory = jQuery.noop;
|
17
|
+
clearInterval(timer);
|
18
|
+
}
|
19
|
+
if (typeof define === 'function' && define.amd && define.amd.jQuery) {
|
20
|
+
define('polyfiller', ['jquery'], factory);
|
21
|
+
clearInterval(timer);
|
22
|
+
}
|
23
|
+
|
24
|
+
};
|
25
|
+
var timer = setInterval(start, 1);
|
2
26
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
27
|
+
window.webshims = {
|
28
|
+
setOptions: function(){
|
29
|
+
addAsync();
|
30
|
+
window.asyncWebshims.cfg.push(arguments);
|
31
|
+
},
|
32
|
+
ready: function(){
|
33
|
+
addAsync();
|
34
|
+
window.asyncWebshims.ready.push(arguments);
|
35
|
+
},
|
36
|
+
activeLang: function(lang){
|
37
|
+
addAsync();
|
38
|
+
window.asyncWebshims.lang = lang;
|
39
|
+
},
|
40
|
+
polyfill: function(features){
|
41
|
+
addAsync();
|
42
|
+
window.asyncWebshims.polyfill = features;
|
43
|
+
}
|
44
|
+
};
|
45
|
+
window.webshim = window.webshims;
|
46
|
+
|
47
|
+
start();
|
10
48
|
}(function($){
|
11
49
|
"use strict";
|
12
50
|
if (typeof WSDEBUG === 'undefined') {
|
@@ -22,7 +60,10 @@
|
|
22
60
|
var Object = window.Object;
|
23
61
|
var html5 = window.html5 || {};
|
24
62
|
var firstRun;
|
25
|
-
|
63
|
+
var webshims = window.webshims;
|
64
|
+
var addSource = function(text){
|
65
|
+
return text +"\n//# sourceURL="+this.url;
|
66
|
+
};
|
26
67
|
Modernizr.advancedObjectProperties = Modernizr.objectAccessor = Modernizr.ES5 = !!('create' in Object && 'seal' in Object);
|
27
68
|
|
28
69
|
if(Modernizr.ES5 && !('toJSON' in Date.prototype)){
|
@@ -30,8 +71,8 @@
|
|
30
71
|
}
|
31
72
|
|
32
73
|
|
33
|
-
|
34
|
-
version: '1.
|
74
|
+
$.extend(webshims, {
|
75
|
+
version: '1.12.0',
|
35
76
|
cfg: {
|
36
77
|
|
37
78
|
//addCacheBuster: false,
|
@@ -40,11 +81,18 @@
|
|
40
81
|
loadStyles: true,
|
41
82
|
disableShivMethods: true,
|
42
83
|
wspopover: {appendTo: 'auto', hideOnBlur: true},
|
43
|
-
ajax: {
|
84
|
+
ajax: {},
|
85
|
+
loadScript: function(src, success, fail){
|
86
|
+
$.ajax($.extend({}, webCFG.ajax, {url: src, success: success, dataType: 'script', cache: true, global: false, dataFilter: addSource}));
|
87
|
+
},
|
88
|
+
|
44
89
|
basePath: (function(){
|
45
90
|
var script = jScripts.filter('[src*="polyfiller.js"]');
|
46
91
|
var path;
|
47
92
|
script = script[0] || script.end()[script.end().length - 1];
|
93
|
+
if(WSDEBUG && document.currentScript && script != document.currentScript && document.currentScript.src){
|
94
|
+
webshims.warn("It seems you need to set webshims.setOptions('basePath', 'pathTo/shims/'); manually.");
|
95
|
+
}
|
48
96
|
path = ( ( !('hrefNormalized' in $.support) || $.support.hrefNormalized ) ? script.src : script.getAttribute("src", 4) ).split('?')[0];
|
49
97
|
path = path.slice(0, path.lastIndexOf("/") + 1) + 'shims/';
|
50
98
|
return path;
|
@@ -269,17 +317,17 @@
|
|
269
317
|
webshims.error("can't find module: " + name);
|
270
318
|
return;
|
271
319
|
}
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
}
|
320
|
+
module.loaded = true;
|
321
|
+
var ready = function(){
|
322
|
+
fn($, webshims, window, document, undefined, module.options);
|
323
|
+
isReady(name, true);
|
324
|
+
};
|
325
|
+
if (module.d && module.d.length) {
|
326
|
+
onReady(module.d, ready);
|
327
|
+
} else {
|
328
|
+
ready();
|
282
329
|
}
|
330
|
+
|
283
331
|
},
|
284
332
|
c: {},
|
285
333
|
/*
|
@@ -339,7 +387,9 @@
|
|
339
387
|
};
|
340
388
|
$.each(module.d, function(i, dependency){
|
341
389
|
if (modules[dependency]) {
|
342
|
-
|
390
|
+
if(!modules[dependency].loaded){
|
391
|
+
addDependency(i, dependency);
|
392
|
+
}
|
343
393
|
}
|
344
394
|
else
|
345
395
|
if (webshimsFeatures[dependency]) {
|
@@ -392,9 +442,12 @@
|
|
392
442
|
module.loadInit();
|
393
443
|
}
|
394
444
|
|
395
|
-
|
445
|
+
|
396
446
|
setDependencies(module, list);
|
397
|
-
|
447
|
+
if(!module.loaded){
|
448
|
+
loadCombos.push(module.name);
|
449
|
+
}
|
450
|
+
module.loaded = true;
|
398
451
|
}
|
399
452
|
|
400
453
|
for(i = 0, len = loadCombos.length; i < len; i++){
|
@@ -474,20 +527,11 @@
|
|
474
527
|
};
|
475
528
|
|
476
529
|
loadedSrcs[src] = 1;
|
477
|
-
|
478
|
-
if(window.require && window.define && window.define.amd){
|
479
|
-
require([src], complete);
|
480
|
-
} else if (window.sssl) {
|
481
|
-
sssl(src, complete);
|
482
|
-
} else if (window.yepnope) {
|
483
|
-
yepnope.injectJs(src, complete);
|
484
|
-
} else {
|
485
|
-
$.ajax($.extend({}, webCFG.ajax, {url: src, success: complete, dataType: 'script'}));
|
486
|
-
}
|
530
|
+
webCFG.loadScript(src, complete, $.noop);
|
487
531
|
};
|
488
532
|
})()
|
489
533
|
}
|
490
|
-
};
|
534
|
+
});
|
491
535
|
|
492
536
|
/*
|
493
537
|
* shortcuts
|
@@ -510,6 +554,9 @@
|
|
510
554
|
error: 1
|
511
555
|
};
|
512
556
|
|
557
|
+
if(webCFG.debug || (!('crossDomain' in webCFG.ajax) && location.protocol.indexOf('http'))){
|
558
|
+
webCFG.ajax.crossDomain = true;
|
559
|
+
}
|
513
560
|
|
514
561
|
webshims.addMethodName = function(name){
|
515
562
|
name = name.split(':');
|
@@ -822,27 +869,15 @@
|
|
822
869
|
// webshims lib uses a of http://github.com/kriskowal/es5-shim/ to implement
|
823
870
|
addPolyfill('es5', {
|
824
871
|
test: !!(Modernizr.ES5 && Function.prototype.bind),
|
825
|
-
c: [
|
872
|
+
c: [18, 19, 25, 20, 32]
|
826
873
|
});
|
827
874
|
|
828
875
|
addPolyfill('dom-extend', {
|
829
876
|
f: DOMSUPPORT,
|
830
877
|
noAutoCallback: true,
|
831
878
|
d: ['es5'],
|
832
|
-
c: [16, 7, 2, 15, 30, 3, 8, 4, 9, 10,
|
833
|
-
});
|
834
|
-
|
835
|
-
|
836
|
-
//<json-storage
|
837
|
-
|
838
|
-
addPolyfill('json-storage', {
|
839
|
-
test: Modernizr.localstorage && 'sessionStorage' in window && 'JSON' in window,
|
840
|
-
d: ['swfmini'],
|
841
|
-
noAutoCallback: true,
|
842
|
-
c: [14],
|
843
|
-
nM: 'localstorage'
|
879
|
+
c: [16, 7, 2, 15, 30, 3, 8, 4, 9, 10, 25, 19, 20, 26, 31]
|
844
880
|
});
|
845
|
-
//>json-storage
|
846
881
|
|
847
882
|
|
848
883
|
//<geolocation
|
@@ -893,22 +928,32 @@
|
|
893
928
|
var bustedWidgetUi = false;
|
894
929
|
|
895
930
|
var initialFormTest = function(){
|
896
|
-
var range,
|
931
|
+
var range, tmp, fieldset;
|
897
932
|
if(!initialFormTest.run){
|
898
|
-
fieldset = $('<fieldset
|
933
|
+
fieldset = $('<fieldset><textarea required="" /></fieldset>')[0];
|
899
934
|
addTest(formvalidation, !!(modernizrInputAttrs.required && modernizrInputAttrs.pattern));
|
900
935
|
|
901
|
-
addTest('
|
902
|
-
addTest('fieldsetelements', 'elements' in fieldset);
|
936
|
+
addTest('fieldsetelements', (tmp = 'elements' in fieldset));
|
903
937
|
|
938
|
+
if(('disabled' in fieldset)){
|
939
|
+
if(!tmp) {
|
940
|
+
try {
|
941
|
+
if($('textarea', fieldset).is(':invalid')){
|
942
|
+
fieldset.disabled = true;
|
943
|
+
tmp = $('textarea', fieldset).is(':valid');
|
944
|
+
}
|
945
|
+
} catch(er){}
|
946
|
+
}
|
947
|
+
addTest('fieldsetdisabled', tmp);
|
948
|
+
}
|
904
949
|
if(modernizrInputTypes && modernizrInputTypes.range && !window.opera){
|
905
950
|
range = $('<input type="range" style="-webkit-appearance: slider-horizontal; -moz-appearance: range;" />').appendTo('html');
|
906
|
-
|
951
|
+
tmp = range.css('appearance');
|
907
952
|
range.remove();
|
908
953
|
|
909
|
-
addTest('csstrackrange',
|
954
|
+
addTest('csstrackrange', tmp == null || tmp == 'range');
|
910
955
|
|
911
|
-
addTest('cssrangeinput',
|
956
|
+
addTest('cssrangeinput', tmp == 'slider-horizontal' || tmp == 'range');
|
912
957
|
|
913
958
|
addTest('styleableinputrange', Modernizr.csstrackrange || Modernizr.cssrangeinput);
|
914
959
|
}
|
@@ -933,7 +978,7 @@
|
|
933
978
|
|
934
979
|
webshims.validationMessages = webshims.validityMessages = {
|
935
980
|
langSrc: 'i18n/formcfg-',
|
936
|
-
availableLangs: ['ar', '
|
981
|
+
availableLangs: ['ar', 'cs', 'el', 'es', 'fr', 'he', 'hi', 'hu', 'it', 'ja', 'lt', 'nl', 'pl', 'pt', 'pt-BR', 'pt-PT', 'ru', 'sv', 'zh-CN']
|
937
982
|
};
|
938
983
|
webshims.formcfg = $.extend({}, webshims.validationMessages);
|
939
984
|
|
@@ -952,11 +997,9 @@
|
|
952
997
|
}
|
953
998
|
},
|
954
999
|
iVal: {
|
955
|
-
|
956
|
-
|
1000
|
+
sel: '.ws-validate',
|
1001
|
+
handleBubble: 'hide',
|
957
1002
|
recheckDelay: 400
|
958
|
-
// ,hideBubble: undefined,
|
959
|
-
// ,fieldWrapper: undefined
|
960
1003
|
// ,fx: 'slide'
|
961
1004
|
}
|
962
1005
|
// ,customMessages: false,
|
@@ -976,7 +1019,7 @@
|
|
976
1019
|
return !Modernizr[formvalidation] || bustedValidity || $.inArray(fNuAPI, toLoad || []) == -1 || modules[fNuAPI].test();
|
977
1020
|
},
|
978
1021
|
d: ['form-core', DOMSUPPORT, 'form-message'],
|
979
|
-
c: [6, 5]
|
1022
|
+
c: [6, 5, 14, 29]
|
980
1023
|
});
|
981
1024
|
|
982
1025
|
addPolyfill(fShim, {
|
@@ -985,7 +1028,7 @@
|
|
985
1028
|
return Modernizr[formvalidation] && !bustedValidity;
|
986
1029
|
},
|
987
1030
|
d: ['form-core', DOMSUPPORT, 'sizzle'],
|
988
|
-
c: [16, 15, 24]
|
1031
|
+
c: [16, 15, 24, 28]
|
989
1032
|
});
|
990
1033
|
|
991
1034
|
addPolyfill(fShim+'2', {
|
@@ -1003,7 +1046,7 @@
|
|
1003
1046
|
return !( formOptions.customMessages || !Modernizr[formvalidation] || bustedValidity || !modules[formExtend].test(toLoad) );
|
1004
1047
|
},
|
1005
1048
|
d: [DOMSUPPORT],
|
1006
|
-
c: [16, 7, 15, 30, 3, 8, 4]
|
1049
|
+
c: [16, 7, 15, 30, 3, 8, 4, 14, 28]
|
1007
1050
|
});
|
1008
1051
|
|
1009
1052
|
formExtras = {
|
@@ -1017,7 +1060,7 @@
|
|
1017
1060
|
addPolyfill(fNuAPI, {
|
1018
1061
|
f: 'forms-ext',
|
1019
1062
|
options: {
|
1020
|
-
types: '
|
1063
|
+
types: 'date time range number'
|
1021
1064
|
},
|
1022
1065
|
test: function(){
|
1023
1066
|
var ret = true;
|
@@ -1038,7 +1081,7 @@
|
|
1038
1081
|
},
|
1039
1082
|
methodNames: ['stepUp', 'stepDown'],
|
1040
1083
|
d: ['forms', DOMSUPPORT],
|
1041
|
-
c: [6, 5, 18, 17],
|
1084
|
+
c: [6, 5, 18, 17, 14, 28, 29, 32, 33],
|
1042
1085
|
nM: 'input inputtypes'
|
1043
1086
|
});
|
1044
1087
|
|
@@ -1057,6 +1100,9 @@
|
|
1057
1100
|
test: function(){
|
1058
1101
|
var o = this.options;
|
1059
1102
|
initialFormTest();
|
1103
|
+
if(o.replaceUI){
|
1104
|
+
$('html').addClass('ws-replaceui');
|
1105
|
+
}
|
1060
1106
|
//input widgets on old androids can't be trusted
|
1061
1107
|
if(bustedWidgetUi && !o.replaceUI && (/Android/i).test(navigator.userAgent)){
|
1062
1108
|
o.replaceUI = true;
|
@@ -1066,11 +1112,9 @@
|
|
1066
1112
|
d: ['forms', DOMSUPPORT, fNuAPI, 'range-ui'],
|
1067
1113
|
css: 'styles/forms-ext.css',
|
1068
1114
|
options: {
|
1069
|
-
|
1070
1115
|
widgets: {
|
1071
1116
|
calculateWidth: true,
|
1072
|
-
|
1073
|
-
monthNamesHead: 'monthNames'
|
1117
|
+
animate: true
|
1074
1118
|
}
|
1075
1119
|
// ,replaceUI: false
|
1076
1120
|
},
|
@@ -1084,7 +1128,7 @@
|
|
1084
1128
|
return modernizrInputAttrs.list && !formOptions.fD;
|
1085
1129
|
},
|
1086
1130
|
d: ['form-core', DOMSUPPORT],
|
1087
|
-
c: [16, 7, 6, 2, 9, 15, 30, 31]
|
1131
|
+
c: [16, 7, 6, 2, 9, 15, 30, 31, 28, 32, 33]
|
1088
1132
|
});
|
1089
1133
|
})();
|
1090
1134
|
//>
|
@@ -1206,7 +1250,17 @@
|
|
1206
1250
|
;
|
1207
1251
|
if(asyncWebshims){
|
1208
1252
|
if(asyncWebshims.cfg){
|
1209
|
-
|
1253
|
+
if(!asyncWebshims.cfg.length){
|
1254
|
+
asyncWebshims.cfg = [asyncWebshims.cfg];
|
1255
|
+
}
|
1256
|
+
$.each(asyncWebshims.cfg, function(i, cfg){
|
1257
|
+
webshims.setOptions.call(webshims, cfg);
|
1258
|
+
});
|
1259
|
+
}
|
1260
|
+
if(asyncWebshims.ready){
|
1261
|
+
$.each(asyncWebshims.ready, function(i, ready){
|
1262
|
+
webshims.ready.apply(webshims, ready);
|
1263
|
+
});
|
1210
1264
|
}
|
1211
1265
|
if(asyncWebshims.lang){
|
1212
1266
|
webshims.activeLang(asyncWebshims.lang);
|
@@ -1215,6 +1269,6 @@
|
|
1215
1269
|
webshims.polyfill(asyncWebshims.polyfill);
|
1216
1270
|
}
|
1217
1271
|
}
|
1218
|
-
|
1272
|
+
webshims.isReady('jquery', true);
|
1219
1273
|
return webshims;
|
1220
1274
|
}));
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/*
|
2
2
|
* canvas2png.js
|
3
3
|
*
|
4
|
-
* Copyright (c) 2010-
|
4
|
+
* Copyright (c) 2010-2013 Shinya Muramatsu
|
5
5
|
* Released under the MIT License
|
6
6
|
* http://flashcanvas.net/
|
7
7
|
*/
|
@@ -12,19 +12,24 @@ var scripts = doc.getElementsByTagName("script");
|
|
12
12
|
var script = scripts[scripts.length - 1];
|
13
13
|
var url = script.getAttribute("src").replace(/[^\/]+$/, "save.php");
|
14
14
|
|
15
|
-
window.canvas2png = function(canvas) {
|
15
|
+
window.canvas2png = function(canvas, filename) {
|
16
16
|
var tagName = canvas.tagName.toLowerCase();
|
17
17
|
if (tagName !== "canvas") {
|
18
18
|
return;
|
19
19
|
}
|
20
20
|
|
21
21
|
if (typeof FlashCanvas !== "undefined") {
|
22
|
-
FlashCanvas.saveImage(canvas);
|
22
|
+
FlashCanvas.saveImage(canvas, filename);
|
23
23
|
} else {
|
24
|
+
var action = url;
|
25
|
+
if (filename) {
|
26
|
+
action += "?filename=" + filename;
|
27
|
+
}
|
28
|
+
|
24
29
|
var form = doc.createElement("form");
|
25
30
|
var input = doc.createElement("input");
|
26
31
|
|
27
|
-
form.setAttribute("action",
|
32
|
+
form.setAttribute("action", action);
|
28
33
|
form.setAttribute("method", "post");
|
29
34
|
|
30
35
|
input.setAttribute("type", "hidden");
|
@@ -1,35 +1,41 @@
|
|
1
|
+
|
2
|
+
window.FlashCanvasOptions = window.FlashCanvasOptions || {};
|
3
|
+
webshims.$.extend(FlashCanvasOptions, {
|
4
|
+
swfPath: webshims.cfg.basePath + 'FlashCanvas/'
|
5
|
+
});
|
6
|
+
|
1
7
|
/*
|
2
8
|
* FlashCanvas
|
3
9
|
*
|
4
10
|
* Copyright (c) 2009 Tim Cameron Ryan
|
5
|
-
* Copyright (c) 2009-
|
11
|
+
* Copyright (c) 2009-2013 FlashCanvas Project
|
6
12
|
* Released under the MIT/X License
|
7
13
|
*/
|
8
|
-
window.
|
9
|
-
|
10
|
-
|
11
|
-
});
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
"
|
17
|
-
|
18
|
-
this.
|
19
|
-
a
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
14
|
+
window.ActiveXObject&&!window.CanvasRenderingContext2D&&function(i,j,z){function D(a){this.code=a;this.message=R[a]}function S(a){this.width=a}function v(a){this.id=a.C++}function k(a){this.G=a;this.id=a.C++}function m(a,b){this.canvas=a;this.B=b;this.d=b.id.slice(8);this.D();this.C=0;this.f=this.u="";var c=this;setInterval(function(){o[c.d]===0&&c.e()},30)}function A(){if(j.readyState==="complete"){j.detachEvent(E,A);for(var a=j.getElementsByTagName(r),b=0,c=a.length;b<c;++b)B.initElement(a[b])}}
|
15
|
+
function F(){var a=event.srcElement,b=a.parentNode;a.blur();b.focus()}function G(){var a=event.propertyName;if(a==="width"||a==="height"){var b=event.srcElement,c=b[a],d=parseInt(c,10);if(isNaN(d)||d<0)d=a==="width"?300:150;c===d?(b.style[a]=d+"px",b.getContext("2d").I(b.width,b.height)):b[a]=d}}function H(){i.detachEvent(I,H);for(var a in s){var b=s[a],c=b.firstChild,d;for(d in c)typeof c[d]==="function"&&(c[d]=l);for(d in b)typeof b[d]==="function"&&(b[d]=l);c.detachEvent(J,F);b.detachEvent(K,G)}i[L]=
|
16
|
+
l;i[M]=l;i[N]=l;i[C]=l;i[O]=l}function T(){var a=j.getElementsByTagName("script"),a=a[a.length-1];return j.documentMode>=8?a.src:a.getAttribute("src",4)}function t(a){return(""+a).replace(/&/g,"&").replace(/</g,"<")}function U(a){return a.toLowerCase()}function h(a){throw new D(a);}function P(a){var b=parseInt(a.width,10),c=parseInt(a.height,10);if(isNaN(b)||b<0)b=300;if(isNaN(c)||c<0)c=150;a.width=b;a.height=c}var l=null,r="canvas",L="CanvasRenderingContext2D",M="CanvasGradient",N="CanvasPattern",
|
17
|
+
C="FlashCanvas",O="G_vmlCanvasManager",J="onfocus",K="onpropertychange",E="onreadystatechange",I="onunload",w=((i[C+"Options"]||{}).swfPath||T().replace(/[^\/]+$/,""))+"flashcanvas.swf",e=new function(a){for(var b=0,c=a.length;b<c;b++)this[a[b]]=b}("toDataURL,save,restore,scale,rotate,translate,transform,setTransform,globalAlpha,globalCompositeOperation,strokeStyle,fillStyle,createLinearGradient,createRadialGradient,createPattern,lineWidth,lineCap,lineJoin,miterLimit,shadowOffsetX,shadowOffsetY,shadowBlur,shadowColor,clearRect,fillRect,strokeRect,beginPath,closePath,moveTo,lineTo,quadraticCurveTo,bezierCurveTo,arcTo,rect,arc,fill,stroke,clip,isPointInPath,font,textAlign,textBaseline,fillText,strokeText,measureText,drawImage,createImageData,getImageData,putImageData,addColorStop,direction,resize".split(",")),
|
18
|
+
u={},p={},o={},x={},s={},y={};m.prototype={save:function(){this.b();this.c();this.n();this.m();this.z();this.w();this.F.push([this.g,this.h,this.A,this.v,this.k,this.i,this.j,this.l,this.q,this.r,this.o,this.p,this.f,this.s,this.t]);this.a.push(e.save)},restore:function(){var a=this.F;if(a.length)a=a.pop(),this.globalAlpha=a[0],this.globalCompositeOperation=a[1],this.strokeStyle=a[2],this.fillStyle=a[3],this.lineWidth=a[4],this.lineCap=a[5],this.lineJoin=a[6],this.miterLimit=a[7],this.shadowOffsetX=
|
19
|
+
a[8],this.shadowOffsetY=a[9],this.shadowBlur=a[10],this.shadowColor=a[11],this.font=a[12],this.textAlign=a[13],this.textBaseline=a[14];this.a.push(e.restore)},scale:function(a,b){this.a.push(e.scale,a,b)},rotate:function(a){this.a.push(e.rotate,a)},translate:function(a,b){this.a.push(e.translate,a,b)},transform:function(a,b,c,d,f,g){this.a.push(e.transform,a,b,c,d,f,g)},setTransform:function(a,b,c,d,f,g){this.a.push(e.setTransform,a,b,c,d,f,g)},b:function(){var a=this.a;if(this.g!==this.globalAlpha)this.g=
|
20
|
+
this.globalAlpha,a.push(e.globalAlpha,this.g);if(this.h!==this.globalCompositeOperation)this.h=this.globalCompositeOperation,a.push(e.globalCompositeOperation,this.h)},n:function(){if(this.A!==this.strokeStyle){var a=this.A=this.strokeStyle;if(typeof a!=="string")if(a instanceof k||a instanceof v)a=a.id;else return;this.a.push(e.strokeStyle,a)}},m:function(){if(this.v!==this.fillStyle){var a=this.v=this.fillStyle;if(typeof a!=="string")if(a instanceof k||a instanceof v)a=a.id;else return;this.a.push(e.fillStyle,
|
21
|
+
a)}},createLinearGradient:function(a,b,c,d){(!isFinite(a)||!isFinite(b)||!isFinite(c)||!isFinite(d))&&h(9);this.a.push(e.createLinearGradient,a,b,c,d);return new k(this)},createRadialGradient:function(a,b,c,d,f,g){(!isFinite(a)||!isFinite(b)||!isFinite(c)||!isFinite(d)||!isFinite(f)||!isFinite(g))&&h(9);(c<0||g<0)&&h(1);this.a.push(e.createRadialGradient,a,b,c,d,f,g);return new k(this)},createPattern:function(a,b){a||h(17);var c=a.tagName,d,f=this.d;if(c)if(c=c.toLowerCase(),c==="img")d=a.getAttribute("src",
|
22
|
+
2);else if(c===r||c==="video")return;else h(17);else a.src?d=a.src:h(17);b==="repeat"||b==="no-repeat"||b==="repeat-x"||b==="repeat-y"||b===""||b===l||h(12);this.a.push(e.createPattern,t(d),b);!p[f][d]&&u[f]&&(this.e(),++o[f],p[f][d]=!0);return new v(this)},z:function(){var a=this.a;if(this.k!==this.lineWidth)this.k=this.lineWidth,a.push(e.lineWidth,this.k);if(this.i!==this.lineCap)this.i=this.lineCap,a.push(e.lineCap,this.i);if(this.j!==this.lineJoin)this.j=this.lineJoin,a.push(e.lineJoin,this.j);
|
23
|
+
if(this.l!==this.miterLimit)this.l=this.miterLimit,a.push(e.miterLimit,this.l)},c:function(){var a=this.a;if(this.q!==this.shadowOffsetX)this.q=this.shadowOffsetX,a.push(e.shadowOffsetX,this.q);if(this.r!==this.shadowOffsetY)this.r=this.shadowOffsetY,a.push(e.shadowOffsetY,this.r);if(this.o!==this.shadowBlur)this.o=this.shadowBlur,a.push(e.shadowBlur,this.o);if(this.p!==this.shadowColor)this.p=this.shadowColor,a.push(e.shadowColor,this.p)},clearRect:function(a,b,c,d){this.a.push(e.clearRect,a,b,c,
|
24
|
+
d)},fillRect:function(a,b,c,d){this.b();this.c();this.m();this.a.push(e.fillRect,a,b,c,d)},strokeRect:function(a,b,c,d){this.b();this.c();this.n();this.z();this.a.push(e.strokeRect,a,b,c,d)},beginPath:function(){this.a.push(e.beginPath)},closePath:function(){this.a.push(e.closePath)},moveTo:function(a,b){this.a.push(e.moveTo,a,b)},lineTo:function(a,b){this.a.push(e.lineTo,a,b)},quadraticCurveTo:function(a,b,c,d){this.a.push(e.quadraticCurveTo,a,b,c,d)},bezierCurveTo:function(a,b,c,d,f,g){this.a.push(e.bezierCurveTo,
|
25
|
+
a,b,c,d,f,g)},arcTo:function(a,b,c,d,f){f<0&&isFinite(f)&&h(1);this.a.push(e.arcTo,a,b,c,d,f)},rect:function(a,b,c,d){this.a.push(e.rect,a,b,c,d)},arc:function(a,b,c,d,f,g){c<0&&isFinite(c)&&h(1);this.a.push(e.arc,a,b,c,d,f,g?1:0)},fill:function(){this.b();this.c();this.m();this.a.push(e.fill)},stroke:function(){this.b();this.c();this.n();this.z();this.a.push(e.stroke)},clip:function(){this.a.push(e.clip)},w:function(){var a=this.a;if(this.f!==this.font)try{var b=y[this.d];b.style.font=this.f=this.font;
|
26
|
+
var c=b.currentStyle;a.push(e.font,[c.fontStyle,c.fontWeight,b.offsetHeight,c.fontFamily].join(" "))}catch(d){}if(this.s!==this.textAlign)this.s=this.textAlign,a.push(e.textAlign,this.s);if(this.t!==this.textBaseline)this.t=this.textBaseline,a.push(e.textBaseline,this.t);if(this.u!==this.canvas.currentStyle.direction)this.u=this.canvas.currentStyle.direction,a.push(e.direction,this.u)},fillText:function(a,b,c,d){this.b();this.m();this.c();this.w();this.a.push(e.fillText,t(a),b,c,d===z?Infinity:d)},
|
27
|
+
strokeText:function(a,b,c,d){this.b();this.n();this.c();this.w();this.a.push(e.strokeText,t(a),b,c,d===z?Infinity:d)},measureText:function(a){var b=y[this.d];try{b.style.font=this.font}catch(c){}b.innerText=(""+a).replace(/[ \n\f\r]/g,"\t");return new S(b.offsetWidth)},drawImage:function(a,b,c,d,f,g,i,j,l){a||h(17);var k=a.tagName,n,q=arguments.length,m=this.d;if(k)if(k=k.toLowerCase(),k==="img")n=a.getAttribute("src",2);else if(k===r||k==="video")return;else h(17);else a.src?n=a.src:h(17);this.b();
|
28
|
+
this.c();n=t(n);if(q===3)this.a.push(e.drawImage,q,n,b,c);else if(q===5)this.a.push(e.drawImage,q,n,b,c,d,f);else if(q===9)(d===0||f===0)&&h(1),this.a.push(e.drawImage,q,n,b,c,d,f,g,i,j,l);else return;!p[m][n]&&u[m]&&(this.e(),++o[m],p[m][n]=!0)},loadImage:function(a,b,c){var d=a.tagName,f,g=this.d;if(d)d.toLowerCase()==="img"&&(f=a.getAttribute("src",2));else if(a.src)f=a.src;if(f&&!p[g][f]){if(b||c)x[g][f]=[a,b,c];this.a.push(e.drawImage,1,t(f));u[g]&&(this.e(),++o[g],p[g][f]=!0)}},D:function(){this.globalAlpha=
|
29
|
+
this.g=1;this.globalCompositeOperation=this.h="source-over";this.fillStyle=this.v=this.strokeStyle=this.A="#000000";this.lineWidth=this.k=1;this.lineCap=this.i="butt";this.lineJoin=this.j="miter";this.miterLimit=this.l=10;this.shadowBlur=this.o=this.shadowOffsetY=this.r=this.shadowOffsetX=this.q=0;this.shadowColor=this.p="rgba(0, 0, 0, 0.0)";this.font=this.f="10px sans-serif";this.textAlign=this.s="start";this.textBaseline=this.t="alphabetic";this.a=[];this.F=[]},H:function(){var a=this.a;this.a=
|
30
|
+
[];return a},e:function(){var a=this.H();if(a.length>0)return eval(this.B.CallFunction('<invoke name="executeCommand" returntype="javascript"><arguments><string>'+a.join("�")+"</string></arguments></invoke>"))},I:function(a,b){this.e();this.D();if(a>0)this.B.width=a;if(b>0)this.B.height=b;this.a.push(e.resize,a,b)}};k.prototype={addColorStop:function(a,b){(isNaN(a)||a<0||a>1)&&h(1);this.G.a.push(e.addColorStop,this.id,a,b)}};D.prototype=Error();var R={1:"INDEX_SIZE_ERR",9:"NOT_SUPPORTED_ERR",11:"INVALID_STATE_ERR",
|
31
|
+
12:"SYNTAX_ERR",17:"TYPE_MISMATCH_ERR",18:"SECURITY_ERR"},B={initElement:function(a){if(a.getContext)return a;var b=Math.random().toString(36).slice(2)||"0",c="external"+b;u[b]=!1;p[b]={};o[b]=1;x[b]={};P(a);a.innerHTML='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="'+location.protocol+'//fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="100%" height="100%" id="'+c+'"><param name="allowScriptAccess" value="always"><param name="flashvars" value="id='+
|
32
|
+
c+'"><param name="wmode" value="transparent"></object><span style="margin:0;padding:0;border:0;display:inline-block;position:static;height:1em;overflow:visible;white-space:nowrap"></span>';s[b]=a;var d=a.firstChild;y[b]=a.lastChild;var f=j.body.contains;if(f(a))d.movie=w;else var g=setInterval(function(){if(f(a))clearInterval(g),d.movie=w},0);if(j.compatMode==="BackCompat"||!i.XMLHttpRequest)y[b].style.overflow="hidden";var h=new m(a,d);a.getContext=function(a){return a==="2d"?h:l};a.toDataURL=function(a,
|
33
|
+
b){(""+a).replace(/[A-Z]+/g,U)==="image/jpeg"?h.a.push(e.toDataURL,a,typeof b==="number"?b:""):h.a.push(e.toDataURL,a);return h.e()};d.attachEvent(J,F);return a},saveImage:function(a,b){a.firstChild.saveImage(b)},setOptions:function(){},trigger:function(a,b){s[a].fireEvent("on"+b)},unlock:function(a,b,c){var d,e,g;o[a]&&--o[a];if(b===z){d=s[a];b=d.firstChild;P(d);e=d.width;c=d.height;d.style.width=e+"px";d.style.height=c+"px";if(e>0)b.width=e;if(c>0)b.height=c;b.resize(e,c);d.attachEvent(K,G);u[a]=
|
34
|
+
!0;typeof d.onload==="function"&&setTimeout(function(){d.onload()},0)}else if(g=x[a][b])e=g[0],c=g[1+c],delete x[a][b],typeof c==="function"&&c.call(e)}};j.createElement(r);j.createStyleSheet().cssText=r+"{display:inline-block;overflow:hidden;width:300px;height:150px}";j.readyState==="complete"?A():j.attachEvent(E,A);i.attachEvent(I,H);if(w.indexOf(location.protocol+"//"+location.host+"/")===0){var Q=new ActiveXObject("Microsoft.XMLHTTP");Q.open("GET",w,!1);Q.send(l)}i[L]=m;i[M]=k;i[N]=v;i[C]=B;i[O]=
|
35
|
+
{init:function(){},init_:function(){},initElement:B.initElement};keep=[m.measureText,m.loadImage]}(window,document);
|
36
|
+
|
37
|
+
|
38
|
+
|
33
39
|
(function(document){
|
34
40
|
webshims.addReady(function(context, elem){
|
35
41
|
if(context == document){
|