h2ocube_rails_assets 0.0.25 → 0.0.26
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +0 -2
- data/Vendorfile +9 -30
- data/h2ocube_rails_assets.gemspec +2 -2
- data/vendor/assets/images/bootstrap3/glyphicons-halflings-regular.eot +0 -0
- data/vendor/assets/images/bootstrap3/glyphicons-halflings-regular.svg +200 -199
- data/vendor/assets/images/bootstrap3/glyphicons-halflings-regular.ttf +0 -0
- data/vendor/assets/images/bootstrap3/glyphicons-halflings-regular.woff +0 -0
- data/vendor/assets/javascripts/bootstrap3.js +9 -6
- data/vendor/assets/javascripts/highcharts.js +270 -268
- data/vendor/assets/javascripts/jquery.cookie.js +7 -11
- data/vendor/assets/javascripts/jquery.fileupload.js +131 -43
- data/vendor/assets/javascripts/jquery.iframe-transport.js +14 -9
- data/vendor/assets/javascripts/jquery.lazyload.js +2 -15
- data/vendor/assets/javascripts/modernizr.js +230 -217
- data/vendor/assets/javascripts/semantic.js +7 -6
- data/vendor/assets/stylesheets/bootstrap3.scss +6 -6
- data/vendor/assets/stylesheets/semantic.scss +3 -18
- metadata +35 -39
- data/vendor/assets/images/jasny-bootstrap/glyphicons-halflings-white.png +0 -0
- data/vendor/assets/images/jasny-bootstrap/glyphicons-halflings.png +0 -0
- data/vendor/assets/javascripts/jasny-bootstrap.js +0 -7
- data/vendor/assets/stylesheets/jasny-bootstrap.responsive.css +0 -18
- data/vendor/assets/stylesheets/jasny-bootstrap.scss +0 -18
@@ -38,13 +38,8 @@
|
|
38
38
|
try {
|
39
39
|
// Replace server-side written pluses with spaces.
|
40
40
|
// If we can't decode the cookie, ignore it, it's unusable.
|
41
|
-
s = decodeURIComponent(s.replace(pluses, ' '));
|
42
|
-
} catch(e) {
|
43
|
-
return;
|
44
|
-
}
|
45
|
-
|
46
|
-
try {
|
47
41
|
// If we can't parse the cookie, ignore it, it's unusable.
|
42
|
+
s = decodeURIComponent(s.replace(pluses, ' '));
|
48
43
|
return config.json ? JSON.parse(s) : s;
|
49
44
|
} catch(e) {}
|
50
45
|
}
|
@@ -106,12 +101,13 @@
|
|
106
101
|
config.defaults = {};
|
107
102
|
|
108
103
|
$.removeCookie = function (key, options) {
|
109
|
-
if ($.cookie(key)
|
110
|
-
|
111
|
-
$.cookie(key, '', $.extend({}, options, { expires: -1 }));
|
112
|
-
return true;
|
104
|
+
if ($.cookie(key) === undefined) {
|
105
|
+
return false;
|
113
106
|
}
|
114
|
-
|
107
|
+
|
108
|
+
// Must not alter options, thus extending a fresh object...
|
109
|
+
$.cookie(key, '', $.extend({}, options, { expires: -1 }));
|
110
|
+
return !$.cookie(key);
|
115
111
|
};
|
116
112
|
|
117
113
|
}));
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*
|
2
|
-
* jQuery File Upload Plugin 5.
|
2
|
+
* jQuery File Upload Plugin 5.39.0
|
3
3
|
* https://github.com/blueimp/jQuery-File-Upload
|
4
4
|
*
|
5
5
|
* Copyright 2010, Sebastian Tschan
|
@@ -32,7 +32,7 @@
|
|
32
32
|
$.support.fileInput = !(new RegExp(
|
33
33
|
// Handle devices which give false positives for the feature detection:
|
34
34
|
'(Android (1\\.[0156]|2\\.[01]))' +
|
35
|
-
'|(Windows Phone (OS 7|8\\.0))|(XBLWP)|(ZuneWP)' +
|
35
|
+
'|(Windows Phone (OS 7|8\\.0))|(XBLWP)|(ZuneWP)|(WPDesktop)' +
|
36
36
|
'|(w(eb)?OSBrowser)|(webOS)' +
|
37
37
|
'|(Kindle/(1\\.0|2\\.[05]|3\\.0))'
|
38
38
|
).test(window.navigator.userAgent) ||
|
@@ -40,9 +40,11 @@
|
|
40
40
|
$('<input type="file">').prop('disabled'));
|
41
41
|
|
42
42
|
// The FileReader API is not actually used, but works as feature detection,
|
43
|
-
// as
|
44
|
-
// but not non-multipart XHR file uploads
|
45
|
-
|
43
|
+
// as some Safari versions (5?) support XHR file uploads via the FormData API,
|
44
|
+
// but not non-multipart XHR file uploads.
|
45
|
+
// window.XMLHttpRequestUpload is not available on IE10, so we check for
|
46
|
+
// window.ProgressEvent instead to detect XHR2 file upload capability:
|
47
|
+
$.support.xhrFileUpload = !!(window.ProgressEvent && window.FileReader);
|
46
48
|
$.support.xhrFormDataFileUpload = !!window.FormData;
|
47
49
|
|
48
50
|
// Detect support for Blob slicing (required for chunked uploads):
|
@@ -88,6 +90,14 @@
|
|
88
90
|
// To limit the number of files uploaded with one XHR request,
|
89
91
|
// set the following option to an integer greater than 0:
|
90
92
|
limitMultiFileUploads: undefined,
|
93
|
+
// The following option limits the number of files uploaded with one
|
94
|
+
// XHR request to keep the request size under or equal to the defined
|
95
|
+
// limit in bytes:
|
96
|
+
limitMultiFileUploadSize: undefined,
|
97
|
+
// Multipart file uploads add a number of bytes to each uploaded file,
|
98
|
+
// therefore the following option adds an overhead for each file used
|
99
|
+
// in the limitMultiFileUploadSize configuration:
|
100
|
+
limitMultiFileUploadSizeOverhead: 512,
|
91
101
|
// Set the following option to true to issue all file upload requests
|
92
102
|
// in a sequential order:
|
93
103
|
sequentialUploads: false,
|
@@ -174,6 +184,9 @@
|
|
174
184
|
// handlers using jQuery's Deferred callbacks:
|
175
185
|
// data.submit().done(func).fail(func).always(func);
|
176
186
|
add: function (e, data) {
|
187
|
+
if (e.isDefaultPrevented()) {
|
188
|
+
return false;
|
189
|
+
}
|
177
190
|
if (data.autoUpload || (data.autoUpload !== false &&
|
178
191
|
$(this).fileupload('option', 'autoUpload'))) {
|
179
192
|
data.process().done(function () {
|
@@ -280,7 +293,7 @@
|
|
280
293
|
|
281
294
|
_getFormData: function (options) {
|
282
295
|
var formData;
|
283
|
-
if (
|
296
|
+
if ($.type(options.formData) === 'function') {
|
284
297
|
return options.formData(options.form);
|
285
298
|
}
|
286
299
|
if ($.isArray(options.formData)) {
|
@@ -360,10 +373,18 @@
|
|
360
373
|
// Trigger a custom progress event with a total data property set
|
361
374
|
// to the file size(s) of the current upload and a loaded data
|
362
375
|
// property calculated accordingly:
|
363
|
-
this._trigger(
|
376
|
+
this._trigger(
|
377
|
+
'progress',
|
378
|
+
$.Event('progress', {delegatedEvent: e}),
|
379
|
+
data
|
380
|
+
);
|
364
381
|
// Trigger a global progress event for all current file uploads,
|
365
382
|
// including ajax calls queued for sequential file uploads:
|
366
|
-
this._trigger(
|
383
|
+
this._trigger(
|
384
|
+
'progressall',
|
385
|
+
$.Event('progressall', {delegatedEvent: e}),
|
386
|
+
this._progress
|
387
|
+
);
|
367
388
|
}
|
368
389
|
},
|
369
390
|
|
@@ -399,7 +420,7 @@
|
|
399
420
|
// Ignore non-multipart setting if not supported:
|
400
421
|
multipart = options.multipart || !$.support.xhrFileUpload,
|
401
422
|
paramName = options.paramName[0];
|
402
|
-
options.headers = options.headers
|
423
|
+
options.headers = $.extend({}, options.headers);
|
403
424
|
if (options.contentRange) {
|
404
425
|
options.headers['Content-Range'] = options.contentRange;
|
405
426
|
}
|
@@ -450,7 +471,7 @@
|
|
450
471
|
formData.append(
|
451
472
|
options.paramName[index] || paramName,
|
452
473
|
file,
|
453
|
-
file.name
|
474
|
+
file.uploadName || file.name
|
454
475
|
);
|
455
476
|
}
|
456
477
|
});
|
@@ -534,8 +555,10 @@
|
|
534
555
|
options.url = options.form.prop('action') || location.href;
|
535
556
|
}
|
536
557
|
// The HTTP request method must be "POST" or "PUT":
|
537
|
-
options.type = (options.type ||
|
538
|
-
.
|
558
|
+
options.type = (options.type ||
|
559
|
+
($.type(options.form.prop('method')) === 'string' &&
|
560
|
+
options.form.prop('method')) || ''
|
561
|
+
).toUpperCase();
|
539
562
|
if (options.type !== 'POST' && options.type !== 'PUT' &&
|
540
563
|
options.type !== 'PATCH') {
|
541
564
|
options.type = 'POST';
|
@@ -594,22 +617,32 @@
|
|
594
617
|
// Adds convenience methods to the data callback argument:
|
595
618
|
_addConvenienceMethods: function (e, data) {
|
596
619
|
var that = this,
|
597
|
-
getPromise = function (
|
598
|
-
return $.Deferred().resolveWith(that,
|
620
|
+
getPromise = function (args) {
|
621
|
+
return $.Deferred().resolveWith(that, args).promise();
|
599
622
|
};
|
600
623
|
data.process = function (resolveFunc, rejectFunc) {
|
601
624
|
if (resolveFunc || rejectFunc) {
|
602
625
|
data._processQueue = this._processQueue =
|
603
|
-
(this._processQueue || getPromise(this))
|
604
|
-
|
626
|
+
(this._processQueue || getPromise([this])).pipe(
|
627
|
+
function () {
|
628
|
+
if (data.errorThrown) {
|
629
|
+
return $.Deferred()
|
630
|
+
.rejectWith(that, [data]).promise();
|
631
|
+
}
|
632
|
+
return getPromise(arguments);
|
633
|
+
}
|
634
|
+
).pipe(resolveFunc, rejectFunc);
|
605
635
|
}
|
606
|
-
return this._processQueue || getPromise(this);
|
636
|
+
return this._processQueue || getPromise([this]);
|
607
637
|
};
|
608
638
|
data.submit = function () {
|
609
639
|
if (this.state() !== 'pending') {
|
610
640
|
data.jqXHR = this.jqXHR =
|
611
|
-
(that._trigger(
|
612
|
-
|
641
|
+
(that._trigger(
|
642
|
+
'submit',
|
643
|
+
$.Event('submit', {delegatedEvent: e}),
|
644
|
+
this
|
645
|
+
) !== false) && that._onSend(e, this);
|
613
646
|
}
|
614
647
|
return this.jqXHR || that._getXHRPromise();
|
615
648
|
};
|
@@ -617,7 +650,9 @@
|
|
617
650
|
if (this.jqXHR) {
|
618
651
|
return this.jqXHR.abort();
|
619
652
|
}
|
620
|
-
|
653
|
+
this.errorThrown = 'abort';
|
654
|
+
that._trigger('fail', null, this);
|
655
|
+
return that._getXHRPromise(false);
|
621
656
|
};
|
622
657
|
data.state = function () {
|
623
658
|
if (this.jqXHR) {
|
@@ -627,6 +662,10 @@
|
|
627
662
|
return that._getDeferredState(this._processQueue);
|
628
663
|
}
|
629
664
|
};
|
665
|
+
data.processing = function () {
|
666
|
+
return !this.jqXHR && this._processQueue && that
|
667
|
+
._getDeferredState(this._processQueue) === 'pending';
|
668
|
+
};
|
630
669
|
data.progress = function () {
|
631
670
|
return this._progress;
|
632
671
|
};
|
@@ -829,7 +868,11 @@
|
|
829
868
|
// Set timer for bitrate progress calculation:
|
830
869
|
options._bitrateTimer = new that._BitrateTimer();
|
831
870
|
jqXHR = jqXHR || (
|
832
|
-
((aborted || that._trigger(
|
871
|
+
((aborted || that._trigger(
|
872
|
+
'send',
|
873
|
+
$.Event('send', {delegatedEvent: e}),
|
874
|
+
options
|
875
|
+
) === false) &&
|
833
876
|
that._getXHRPromise(false, options.context, aborted)) ||
|
834
877
|
that._chunkedUpload(options) || $.ajax(options)
|
835
878
|
).done(function (result, textStatus, jqXHR) {
|
@@ -900,39 +943,70 @@
|
|
900
943
|
var that = this,
|
901
944
|
result = true,
|
902
945
|
options = $.extend({}, this.options, data),
|
946
|
+
files = data.files,
|
947
|
+
filesLength = files.length,
|
903
948
|
limit = options.limitMultiFileUploads,
|
949
|
+
limitSize = options.limitMultiFileUploadSize,
|
950
|
+
overhead = options.limitMultiFileUploadSizeOverhead,
|
951
|
+
batchSize = 0,
|
904
952
|
paramName = this._getParamName(options),
|
905
953
|
paramNameSet,
|
906
954
|
paramNameSlice,
|
907
955
|
fileSet,
|
908
|
-
i
|
909
|
-
|
956
|
+
i,
|
957
|
+
j = 0;
|
958
|
+
if (limitSize && (!filesLength || files[0].size === undefined)) {
|
959
|
+
limitSize = undefined;
|
960
|
+
}
|
961
|
+
if (!(options.singleFileUploads || limit || limitSize) ||
|
910
962
|
!this._isXHRUpload(options)) {
|
911
|
-
fileSet = [
|
963
|
+
fileSet = [files];
|
912
964
|
paramNameSet = [paramName];
|
913
|
-
} else if (!options.singleFileUploads && limit) {
|
965
|
+
} else if (!(options.singleFileUploads || limitSize) && limit) {
|
914
966
|
fileSet = [];
|
915
967
|
paramNameSet = [];
|
916
|
-
for (i = 0; i <
|
917
|
-
fileSet.push(
|
968
|
+
for (i = 0; i < filesLength; i += limit) {
|
969
|
+
fileSet.push(files.slice(i, i + limit));
|
918
970
|
paramNameSlice = paramName.slice(i, i + limit);
|
919
971
|
if (!paramNameSlice.length) {
|
920
972
|
paramNameSlice = paramName;
|
921
973
|
}
|
922
974
|
paramNameSet.push(paramNameSlice);
|
923
975
|
}
|
976
|
+
} else if (!options.singleFileUploads && limitSize) {
|
977
|
+
fileSet = [];
|
978
|
+
paramNameSet = [];
|
979
|
+
for (i = 0; i < filesLength; i = i + 1) {
|
980
|
+
batchSize += files[i].size + overhead;
|
981
|
+
if (i + 1 === filesLength ||
|
982
|
+
(batchSize + files[i + 1].size + overhead) >
|
983
|
+
limitSize) {
|
984
|
+
fileSet.push(files.slice(j, i + 1));
|
985
|
+
paramNameSlice = paramName.slice(j, i + 1);
|
986
|
+
if (!paramNameSlice.length) {
|
987
|
+
paramNameSlice = paramName;
|
988
|
+
}
|
989
|
+
paramNameSet.push(paramNameSlice);
|
990
|
+
j = i + 1;
|
991
|
+
batchSize = 0;
|
992
|
+
}
|
993
|
+
}
|
924
994
|
} else {
|
925
995
|
paramNameSet = paramName;
|
926
996
|
}
|
927
|
-
data.originalFiles =
|
928
|
-
$.each(fileSet ||
|
997
|
+
data.originalFiles = files;
|
998
|
+
$.each(fileSet || files, function (index, element) {
|
929
999
|
var newData = $.extend({}, data);
|
930
1000
|
newData.files = fileSet ? element : [element];
|
931
1001
|
newData.paramName = paramNameSet[index];
|
932
1002
|
that._initResponseObject(newData);
|
933
1003
|
that._initProgressObject(newData);
|
934
1004
|
that._addConvenienceMethods(e, newData);
|
935
|
-
result = that._trigger(
|
1005
|
+
result = that._trigger(
|
1006
|
+
'add',
|
1007
|
+
$.Event('add', {delegatedEvent: e}),
|
1008
|
+
newData
|
1009
|
+
);
|
936
1010
|
return result;
|
937
1011
|
});
|
938
1012
|
return result;
|
@@ -1101,7 +1175,11 @@
|
|
1101
1175
|
if (that.options.replaceFileInput) {
|
1102
1176
|
that._replaceFileInput(data.fileInput);
|
1103
1177
|
}
|
1104
|
-
if (that._trigger(
|
1178
|
+
if (that._trigger(
|
1179
|
+
'change',
|
1180
|
+
$.Event('change', {delegatedEvent: e}),
|
1181
|
+
data
|
1182
|
+
) !== false) {
|
1105
1183
|
that._onAdd(e, data);
|
1106
1184
|
}
|
1107
1185
|
});
|
@@ -1118,9 +1196,12 @@
|
|
1118
1196
|
data.files.push(file);
|
1119
1197
|
}
|
1120
1198
|
});
|
1121
|
-
if (this._trigger(
|
1122
|
-
|
1123
|
-
|
1199
|
+
if (this._trigger(
|
1200
|
+
'paste',
|
1201
|
+
$.Event('paste', {delegatedEvent: e}),
|
1202
|
+
data
|
1203
|
+
) !== false) {
|
1204
|
+
this._onAdd(e, data);
|
1124
1205
|
}
|
1125
1206
|
}
|
1126
1207
|
},
|
@@ -1134,7 +1215,11 @@
|
|
1134
1215
|
e.preventDefault();
|
1135
1216
|
this._getDroppedFiles(dataTransfer).always(function (files) {
|
1136
1217
|
data.files = files;
|
1137
|
-
if (that._trigger(
|
1218
|
+
if (that._trigger(
|
1219
|
+
'drop',
|
1220
|
+
$.Event('drop', {delegatedEvent: e}),
|
1221
|
+
data
|
1222
|
+
) !== false) {
|
1138
1223
|
that._onAdd(e, data);
|
1139
1224
|
}
|
1140
1225
|
});
|
@@ -1144,14 +1229,13 @@
|
|
1144
1229
|
_onDragOver: function (e) {
|
1145
1230
|
e.dataTransfer = e.originalEvent && e.originalEvent.dataTransfer;
|
1146
1231
|
var dataTransfer = e.dataTransfer;
|
1147
|
-
if (dataTransfer)
|
1148
|
-
|
1149
|
-
|
1150
|
-
|
1151
|
-
|
1152
|
-
|
1153
|
-
|
1154
|
-
}
|
1232
|
+
if (dataTransfer && $.inArray('Files', dataTransfer.types) !== -1 &&
|
1233
|
+
this._trigger(
|
1234
|
+
'dragover',
|
1235
|
+
$.Event('dragover', {delegatedEvent: e})
|
1236
|
+
) !== false) {
|
1237
|
+
e.preventDefault();
|
1238
|
+
dataTransfer.dropEffect = 'copy';
|
1155
1239
|
}
|
1156
1240
|
},
|
1157
1241
|
|
@@ -1303,6 +1387,10 @@
|
|
1303
1387
|
if (aborted) {
|
1304
1388
|
return;
|
1305
1389
|
}
|
1390
|
+
if (!files.length) {
|
1391
|
+
dfd.reject();
|
1392
|
+
return;
|
1393
|
+
}
|
1306
1394
|
data.files = files;
|
1307
1395
|
jqXHR = that._onSend(null, data).then(
|
1308
1396
|
function (result, textStatus, jqXHR) {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*
|
2
|
-
* jQuery Iframe Transport Plugin 1.
|
2
|
+
* jQuery Iframe Transport Plugin 1.8.1
|
3
3
|
* https://github.com/blueimp/jQuery-File-Upload
|
4
4
|
*
|
5
5
|
* Copyright 2011, Sebastian Tschan
|
@@ -27,7 +27,7 @@
|
|
27
27
|
// Helper variable to create unique names for the transport iframes:
|
28
28
|
var counter = 0;
|
29
29
|
|
30
|
-
// The iframe transport accepts
|
30
|
+
// The iframe transport accepts four additional options:
|
31
31
|
// options.fileInput: a jQuery collection of file input fields
|
32
32
|
// options.paramName: the parameter name for the file form data,
|
33
33
|
// overrides the name property of the file input field(s),
|
@@ -35,9 +35,16 @@
|
|
35
35
|
// options.formData: an array of objects with name and value properties,
|
36
36
|
// equivalent to the return data of .serializeArray(), e.g.:
|
37
37
|
// [{name: 'a', value: 1}, {name: 'b', value: 2}]
|
38
|
+
// options.initialIframeSrc: the URL of the initial iframe src,
|
39
|
+
// by default set to "javascript:false;"
|
38
40
|
$.ajaxTransport('iframe', function (options) {
|
39
41
|
if (options.async) {
|
40
|
-
|
42
|
+
// javascript:false as initial iframe src
|
43
|
+
// prevents warning popups on HTTPS in IE6:
|
44
|
+
/*jshint scripturl: true */
|
45
|
+
var initialIframeSrc = options.initialIframeSrc || 'javascript:false;',
|
46
|
+
/*jshint scripturl: false */
|
47
|
+
form,
|
41
48
|
iframe,
|
42
49
|
addParamChar;
|
43
50
|
return {
|
@@ -56,15 +63,13 @@
|
|
56
63
|
options.url = options.url + addParamChar + '_method=PATCH';
|
57
64
|
options.type = 'POST';
|
58
65
|
}
|
59
|
-
// javascript:false as initial iframe src
|
60
|
-
// prevents warning popups on HTTPS in IE6.
|
61
66
|
// IE versions below IE8 cannot set the name property of
|
62
67
|
// elements that have already been added to the DOM,
|
63
68
|
// so we set the name along with the iframe HTML markup:
|
64
69
|
counter += 1;
|
65
70
|
iframe = $(
|
66
|
-
'<iframe src="
|
67
|
-
counter + '"></iframe>'
|
71
|
+
'<iframe src="' + initialIframeSrc +
|
72
|
+
'" name="iframe-transport-' + counter + '"></iframe>'
|
68
73
|
).bind('load', function () {
|
69
74
|
var fileInputClones,
|
70
75
|
paramNames = $.isArray(options.paramName) ?
|
@@ -95,7 +100,7 @@
|
|
95
100
|
);
|
96
101
|
// Fix for IE endless progress bar activity bug
|
97
102
|
// (happens on form submits to iframe targets):
|
98
|
-
$('<iframe src="
|
103
|
+
$('<iframe src="' + initialIframeSrc + '"></iframe>')
|
99
104
|
.appendTo(form);
|
100
105
|
window.setTimeout(function () {
|
101
106
|
// Removing the form in a setTimeout call
|
@@ -159,7 +164,7 @@
|
|
159
164
|
// concat is used to avoid the "Script URL" JSLint error:
|
160
165
|
iframe
|
161
166
|
.unbind('load')
|
162
|
-
.prop('src',
|
167
|
+
.prop('src', initialIframeSrc);
|
163
168
|
}
|
164
169
|
if (form) {
|
165
170
|
form.remove();
|
@@ -1,15 +1,2 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
*
|
4
|
-
* Copyright (c) 2007-2013 Mika Tuupola
|
5
|
-
*
|
6
|
-
* Licensed under the MIT license:
|
7
|
-
* http://www.opensource.org/licenses/mit-license.php
|
8
|
-
*
|
9
|
-
* Project home:
|
10
|
-
* http://www.appelsiini.net/projects/lazyload
|
11
|
-
*
|
12
|
-
* Version: 1.9.0
|
13
|
-
*
|
14
|
-
*/
|
15
|
-
!function(a,b,c,d){var e=a(b);a.fn.lazyload=function(f){function g(){var b=0;i.each(function(){var c=a(this);if(!j.skip_invisible||c.is(":visible"))if(a.abovethetop(this,j)||a.leftofbegin(this,j));else if(a.belowthefold(this,j)||a.rightoffold(this,j)){if(++b>j.failure_limit)return!1}else c.trigger("appear"),b=0})}var h,i=this,j={threshold:0,failure_limit:0,event:"scroll",effect:"show",container:b,data_attribute:"original",skip_invisible:!0,appear:null,load:null,placeholder:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB/AAffA0nNPuCLAAAAAElFTkSuQmCC"};return f&&(d!==f.failurelimit&&(f.failure_limit=f.failurelimit,delete f.failurelimit),d!==f.effectspeed&&(f.effect_speed=f.effectspeed,delete f.effectspeed),a.extend(j,f)),h=j.container===d||j.container===b?e:a(j.container),0===j.event.indexOf("scroll")&&h.bind(j.event,function(){return g()}),this.each(function(){var b=this,c=a(b);b.loaded=!1,(c.attr("src")===d||c.attr("src")===!1)&&c.attr("src",j.placeholder),c.one("appear",function(){if(!this.loaded){if(j.appear){var d=i.length;j.appear.call(b,d,j)}a("<img />").bind("load",function(){var d=c.data(j.data_attribute);c.hide(),c.is("img")?c.attr("src",d):c.css("background-image","url('"+d+"')"),c[j.effect](j.effect_speed),b.loaded=!0;var e=a.grep(i,function(a){return!a.loaded});if(i=a(e),j.load){var f=i.length;j.load.call(b,f,j)}}).attr("src",c.data(j.data_attribute))}}),0!==j.event.indexOf("scroll")&&c.bind(j.event,function(){b.loaded||c.trigger("appear")})}),e.bind("resize",function(){g()}),/iphone|ipod|ipad.*os 5/gi.test(navigator.appVersion)&&e.bind("pageshow",function(b){b.originalEvent&&b.originalEvent.persisted&&i.each(function(){a(this).trigger("appear")})}),a(c).ready(function(){g()}),this},a.belowthefold=function(c,f){var g;return g=f.container===d||f.container===b?(b.innerHeight?b.innerHeight:e.height())+e.scrollTop():a(f.container).offset().top+a(f.container).height(),g<=a(c).offset().top-f.threshold},a.rightoffold=function(c,f){var g;return g=f.container===d||f.container===b?e.width()+e.scrollLeft():a(f.container).offset().left+a(f.container).width(),g<=a(c).offset().left-f.threshold},a.abovethetop=function(c,f){var g;return g=f.container===d||f.container===b?e.scrollTop():a(f.container).offset().top,g>=a(c).offset().top+f.threshold+a(c).height()},a.leftofbegin=function(c,f){var g;return g=f.container===d||f.container===b?e.scrollLeft():a(f.container).offset().left,g>=a(c).offset().left+f.threshold+a(c).width()},a.inviewport=function(b,c){return!(a.rightoffold(b,c)||a.leftofbegin(b,c)||a.belowthefold(b,c)||a.abovethetop(b,c))},a.extend(a.expr[":"],{"below-the-fold":function(b){return a.belowthefold(b,{threshold:0})},"above-the-top":function(b){return!a.belowthefold(b,{threshold:0})},"right-of-screen":function(b){return a.rightoffold(b,{threshold:0})},"left-of-screen":function(b){return!a.rightoffold(b,{threshold:0})},"in-viewport":function(b){return a.inviewport(b,{threshold:0})},"above-the-fold":function(b){return!a.belowthefold(b,{threshold:0})},"right-of-fold":function(b){return a.rightoffold(b,{threshold:0})},"left-of-fold":function(b){return!a.rightoffold(b,{threshold:0})}})}(jQuery,window,document);
|
1
|
+
/*! Lazy Load 1.9.1 - MIT license - Copyright 2010-2013 Mika Tuupola */
|
2
|
+
!function(a,b,c,d){var e=a(b);a.fn.lazyload=function(f){function g(){var b=0;i.each(function(){var c=a(this);if(!j.skip_invisible||c.is(":visible"))if(a.abovethetop(this,j)||a.leftofbegin(this,j));else if(a.belowthefold(this,j)||a.rightoffold(this,j)){if(++b>j.failure_limit)return!1}else c.trigger("appear"),b=0})}var h,i=this,j={threshold:0,failure_limit:0,event:"scroll",effect:"show",container:b,data_attribute:"original",skip_invisible:!0,appear:null,load:null,placeholder:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB/AAffA0nNPuCLAAAAAElFTkSuQmCC"};return f&&(d!==f.failurelimit&&(f.failure_limit=f.failurelimit,delete f.failurelimit),d!==f.effectspeed&&(f.effect_speed=f.effectspeed,delete f.effectspeed),a.extend(j,f)),h=j.container===d||j.container===b?e:a(j.container),0===j.event.indexOf("scroll")&&h.bind(j.event,function(){return g()}),this.each(function(){var b=this,c=a(b);b.loaded=!1,(c.attr("src")===d||c.attr("src")===!1)&&c.is("img")&&c.attr("src",j.placeholder),c.one("appear",function(){if(!this.loaded){if(j.appear){var d=i.length;j.appear.call(b,d,j)}a("<img />").bind("load",function(){var d=c.attr("data-"+j.data_attribute);c.hide(),c.is("img")?c.attr("src",d):c.css("background-image","url('"+d+"')"),c[j.effect](j.effect_speed),b.loaded=!0;var e=a.grep(i,function(a){return!a.loaded});if(i=a(e),j.load){var f=i.length;j.load.call(b,f,j)}}).attr("src",c.attr("data-"+j.data_attribute))}}),0!==j.event.indexOf("scroll")&&c.bind(j.event,function(){b.loaded||c.trigger("appear")})}),e.bind("resize",function(){g()}),/(?:iphone|ipod|ipad).*os 5/gi.test(navigator.appVersion)&&e.bind("pageshow",function(b){b.originalEvent&&b.originalEvent.persisted&&i.each(function(){a(this).trigger("appear")})}),a(c).ready(function(){g()}),this},a.belowthefold=function(c,f){var g;return g=f.container===d||f.container===b?(b.innerHeight?b.innerHeight:e.height())+e.scrollTop():a(f.container).offset().top+a(f.container).height(),g<=a(c).offset().top-f.threshold},a.rightoffold=function(c,f){var g;return g=f.container===d||f.container===b?e.width()+e.scrollLeft():a(f.container).offset().left+a(f.container).width(),g<=a(c).offset().left-f.threshold},a.abovethetop=function(c,f){var g;return g=f.container===d||f.container===b?e.scrollTop():a(f.container).offset().top,g>=a(c).offset().top+f.threshold+a(c).height()},a.leftofbegin=function(c,f){var g;return g=f.container===d||f.container===b?e.scrollLeft():a(f.container).offset().left,g>=a(c).offset().left+f.threshold+a(c).width()},a.inviewport=function(b,c){return!(a.rightoffold(b,c)||a.leftofbegin(b,c)||a.belowthefold(b,c)||a.abovethetop(b,c))},a.extend(a.expr[":"],{"below-the-fold":function(b){return a.belowthefold(b,{threshold:0})},"above-the-top":function(b){return!a.belowthefold(b,{threshold:0})},"right-of-screen":function(b){return a.rightoffold(b,{threshold:0})},"left-of-screen":function(b){return!a.rightoffold(b,{threshold:0})},"in-viewport":function(b){return a.inviewport(b,{threshold:0})},"above-the-fold":function(b){return!a.belowthefold(b,{threshold:0})},"right-of-fold":function(b){return a.rightoffold(b,{threshold:0})},"left-of-fold":function(b){return!a.rightoffold(b,{threshold:0})}})}(jQuery,window,document);
|