Skip to content

Commit

Permalink
Updates to release 5.2.6 fix #1756
Browse files Browse the repository at this point in the history
  • Loading branch information
kartik-v committed Sep 19, 2021
1 parent b2526e4 commit e5afc63
Show file tree
Hide file tree
Showing 38 changed files with 63 additions and 51 deletions.
6 changes: 6 additions & 0 deletions CHANGE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
Change Log: `bootstrap-fileinput`
=================================

## version 5.2.6

**Date**: _under development_

- (enh #1756): Replace `getLoadingUrl` to a new `$h.getZoomPlaceholder` method.

## version 5.2.5

**Date**: 19-Sep-2021
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bootstrap-fileinput",
"version": "5.2.5",
"version": "5.2.6",
"homepage": "https://github.com/kartik-v/bootstrap-fileinput",
"authors": [
"Kartik Visweswaran <[email protected]>"
Expand Down
2 changes: 1 addition & 1 deletion css/fileinput-rtl.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* bootstrap-fileinput v5.2.5
* bootstrap-fileinput v5.2.6
* http://plugins.krajee.com/file-input
*
* Krajee RTL (Right To Left) default styling for bootstrap-fileinput.
Expand Down
2 changes: 1 addition & 1 deletion css/fileinput-rtl.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion css/fileinput.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* bootstrap-fileinput v5.2.5
* bootstrap-fileinput v5.2.6
* http://plugins.krajee.com/file-input
*
* Krajee default styling for bootstrap-fileinput.
Expand Down
2 changes: 1 addition & 1 deletion css/fileinput.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/index-bs3.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<!-- release v5.2.5, copyright 2014 - 2021 Kartik Visweswaran -->
<!-- release v5.2.6, copyright 2014 - 2021 Kartik Visweswaran -->
<!--suppress JSUnresolvedLibraryURL -->
<html lang="en">
<head>
Expand Down
2 changes: 1 addition & 1 deletion examples/index-bs4.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<!-- release v5.2.5, copyright 2014 - 2021 Kartik Visweswaran -->
<!-- release v5.2.6, copyright 2014 - 2021 Kartik Visweswaran -->
<!--suppress JSUnresolvedLibraryURL -->
<html lang="en">
<head>
Expand Down
2 changes: 1 addition & 1 deletion examples/index-bs5.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<!-- release v5.2.5, copyright 2014 - 2021 Kartik Visweswaran -->
<!-- release v5.2.6, copyright 2014 - 2021 Kartik Visweswaran -->
<!--suppress JSUnresolvedLibraryURL -->
<html lang="en">
<head>
Expand Down
26 changes: 16 additions & 10 deletions js/fileinput.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* bootstrap-fileinput v5.2.5
* bootstrap-fileinput v5.2.6
* http://plugins.krajee.com/file-input
*
* Author: Kartik Visweswaran
Expand All @@ -24,8 +24,8 @@
$.fn.fileinputThemes = {};

if (!$.fn.fileinputBsVersion) {
$.fn.fileinputBsVersion = (window.Alert && window.Alert.VERSION) ||
(window.bootstrap && window.bootstrap.Alert && bootstrap.Alert.VERSION) || '3.x.x';
var v = (bootstrap && bootstrap.Alert && bootstrap.Alert.VERSION) || (Alert && Alert.VERSION) || '3.x.x';
$.fn.fileinputBsVersion = v;
}

String.prototype.setTokens = function (replacePairs) {
Expand All @@ -45,17 +45,13 @@
};
}

var $h, FileInput, getLoadingUrl = function () {
var src = document.currentScript.src, srcPath = src.substring(0, src.lastIndexOf("/"));
return srcPath.substring(0, srcPath.lastIndexOf("/") + 1) + 'img/loading.gif'
};
var $h, FileInput;

// fileinput helper object for all global variables and internal helper methods
$h = {
FRAMES: '.kv-preview-thumb',
SORT_CSS: 'file-sortable',
INIT_FLAG: 'init-',
ZOOM_VAR: getLoadingUrl() + '?kvTemp__2873389129__=', // used to prevent 404 errors in URL parsing
OBJECT_PARAMS: '<param name="controller" value="true" />\n' +
'<param name="allowFullScreen" value="true" />\n' +
'<param name="allowScriptAccess" value="always" />\n' +
Expand Down Expand Up @@ -87,6 +83,15 @@

},
objUrl: window.URL || window.webkitURL,
getZoomPlaceholder: function () { // used to prevent 404 errors in URL parsing
var src = document && document.currentScript && document.currentScript.src || null, srcPath,
zoomVar = '?kvTemp__2873389129__=';
if (!src) {
return zoomVar;
}
srcPath = src.substring(0, src.lastIndexOf("/"));
return srcPath.substring(0, srcPath.lastIndexOf("/") + 1) + 'img/loading.gif' + zoomVar;
},
isBs: function (ver) {
var chk = $.trim(($.fn.fileinputBsVersion || '') + '');
ver = parseInt(ver, 10);
Expand Down Expand Up @@ -892,6 +897,7 @@
_init: function (options, refreshMode) {
var self = this, f, $el = self.$element, $cont, t, tmp;
self.options = options;
self.zoomPlaceholder = $h.getZoomPlaceholder();
self.canOrientImage = $h.canOrientImage($el);
$.each(options, function (key, value) {
switch (key) {
Expand Down Expand Up @@ -2976,7 +2982,7 @@
slideIn = 'slideIn' + dir, slideOut = 'slideOut' + dir, parsed, zoomData = $frame.data('zoom');
if (zoomData) {
zoomData = decodeURIComponent(zoomData);
parsed = $zoomPreview.html().replace($h.ZOOM_VAR, '').setTokens({zoomData: zoomData});
parsed = $zoomPreview.html().replace(self.zoomPlaceholder, '').setTokens({zoomData: zoomData});
$zoomPreview.html(parsed);
$frame.data('zoom', '');
$zoomPreview.attr('data-zoom', zoomData);
Expand Down Expand Up @@ -4235,7 +4241,7 @@
'fileid': fileId || '',
'typeCss': typeCss,
'footer': footer,
'data': zoom && vZoomData ? $h.ZOOM_VAR + '{zoomData}' : vData,
'data': zoom && vZoomData ? self.zoomPlaceholder + '{zoomData}' : vData,
'template': templ || cat,
'style': styleAttribs ? 'style="' + styleAttribs + '"' : '',
'zoomData': vZoomData ? encodeURIComponent(vZoomData) : ''
Expand Down
12 changes: 6 additions & 6 deletions js/fileinput.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion nuget/Package.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<metadata>
<id>bootstrap-fileinput</id>
<title>bootstrap-fileinput</title>
<version>5.2.5</version>
<version>5.2.6</version>
<authors>Kartik Visweswaran</authors>
<owners>Kartik Visweswaran</owners>
<licenseUrl>https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md</licenseUrl>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bootstrap-fileinput",
"version": "5.2.5",
"version": "5.2.6",
"homepage": "https://github.com/kartik-v/bootstrap-fileinput",
"authors": [
"Kartik Visweswaran <[email protected]>"
Expand Down
2 changes: 1 addition & 1 deletion scss/fileinput-rtl.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* bootstrap-fileinput v5.2.5
* bootstrap-fileinput v5.2.6
* http://plugins.krajee.com/file-input
*
* Krajee RTL (Right To Left) default styling for bootstrap-fileinput.
Expand Down
2 changes: 1 addition & 1 deletion scss/fileinput.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* bootstrap-fileinput v5.2.5
* bootstrap-fileinput v5.2.6
* http://plugins.krajee.com/file-input
*
* Krajee default styling for bootstrap-fileinput.
Expand Down
2 changes: 1 addition & 1 deletion scss/themes/explorer-fa/theme.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* bootstrap-fileinput v5.2.5
* bootstrap-fileinput v5.2.6
* http://plugins.krajee.com/file-input
*
* Krajee Explorer Font Awesome 4.x theme style for bootstrap-fileinput. Load this theme file after loading
Expand Down
2 changes: 1 addition & 1 deletion scss/themes/explorer-fas/theme.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* bootstrap-fileinput v5.2.5
* bootstrap-fileinput v5.2.6
* http://plugins.krajee.com/file-input
*
* Krajee Explorer Font Awesome 5.x theme style for bootstrap-fileinput. Load this theme file after loading
Expand Down
2 changes: 1 addition & 1 deletion scss/themes/explorer/theme.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* bootstrap-fileinput v5.2.5
* bootstrap-fileinput v5.2.6
* http://plugins.krajee.com/file-input
*
* Krajee Explorer theme style for bootstrap-fileinput. Load this theme file after loading `fileinput.css`.
Expand Down
2 changes: 1 addition & 1 deletion themes/bs5/theme.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* bootstrap-fileinput v5.2.5
* bootstrap-fileinput v5.2.6
* http://plugins.krajee.com/file-input
*
* Bootstrap 5.x icon theme configuration for bootstrap-fileinput. Requires bootstrap 5.x icons CSS to be loaded.
Expand Down
2 changes: 1 addition & 1 deletion themes/bs5/theme.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion themes/explorer-fa/theme.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* bootstrap-fileinput v5.2.5
* bootstrap-fileinput v5.2.6
* http://plugins.krajee.com/file-input
*
* Krajee Explorer Font Awesome 5.x theme style for bootstrap-fileinput. Load this theme file after loading
Expand Down
2 changes: 1 addition & 1 deletion themes/explorer-fa/theme.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* bootstrap-fileinput v5.2.5
* bootstrap-fileinput v5.2.6
* http://plugins.krajee.com/file-input
*
* Krajee Explorer Font Awesome theme configuration for bootstrap-fileinput.
Expand Down
2 changes: 1 addition & 1 deletion themes/explorer-fa/theme.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion themes/explorer-fa/theme.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion themes/explorer-fas/theme.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* bootstrap-fileinput v5.2.5
* bootstrap-fileinput v5.2.6
* http://plugins.krajee.com/file-input
*
* Krajee Explorer Font Awesome 5.x theme style for bootstrap-fileinput. Load this theme file after loading
Expand Down
2 changes: 1 addition & 1 deletion themes/explorer-fas/theme.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* bootstrap-fileinput v5.2.5
* bootstrap-fileinput v5.2.6
* http://plugins.krajee.com/file-input
*
* Krajee Explorer Font Awesome theme configuration for bootstrap-fileinput.
Expand Down
2 changes: 1 addition & 1 deletion themes/explorer-fas/theme.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion themes/explorer-fas/theme.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion themes/explorer/theme.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* bootstrap-fileinput v5.2.5
* bootstrap-fileinput v5.2.6
* http://plugins.krajee.com/file-input
*
* Krajee Explorer theme style for bootstrap-fileinput. Load this theme file after loading `fileinput.css`.
Expand Down
2 changes: 1 addition & 1 deletion themes/explorer/theme.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* bootstrap-fileinput v5.2.5
* bootstrap-fileinput v5.2.6
* http://plugins.krajee.com/file-input
*
* Krajee Explorer theme configuration for bootstrap-fileinput. Load this theme file after loading `fileinput.js`.
Expand Down
2 changes: 1 addition & 1 deletion themes/explorer/theme.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion themes/explorer/theme.min.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* bootstrap-fileinput v5.2.5
* bootstrap-fileinput v5.2.6
* http://plugins.krajee.com/file-input
*
* Krajee Explorer theme configuration for bootstrap-fileinput. Load this theme file after loading `fileinput.js`.
Expand Down
2 changes: 1 addition & 1 deletion themes/fa/theme.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* bootstrap-fileinput v5.2.5
* bootstrap-fileinput v5.2.6
* http://plugins.krajee.com/file-input
*
* Font Awesome icon theme configuration for bootstrap-fileinput. Requires font awesome assets to be loaded.
Expand Down
2 changes: 1 addition & 1 deletion themes/fa/theme.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion themes/fas/theme.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* bootstrap-fileinput v5.2.5
* bootstrap-fileinput v5.2.6
* http://plugins.krajee.com/file-input
*
* Font Awesome 5 icon theme configuration for bootstrap-fileinput. Requires font awesome 5 assets to be loaded.
Expand Down
2 changes: 1 addition & 1 deletion themes/fas/theme.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion themes/gly/theme.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* bootstrap-fileinput v5.2.5
* bootstrap-fileinput v5.2.6
* http://plugins.krajee.com/file-input
*
* Glyphicon (default) theme configuration for bootstrap-fileinput.
Expand Down
2 changes: 1 addition & 1 deletion themes/gly/theme.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e5afc63

Please sign in to comment.