Update assets

pull/2487/head
jmontoyaa 8 years ago
parent 4116edc8a7
commit 52010b46d2
  1. 8
      app/Resources/public/assets/blueimp-load-image/.bower.json
  2. 11
      app/Resources/public/assets/blueimp-load-image/README.md
  3. 2
      app/Resources/public/assets/blueimp-load-image/index.html
  4. 4
      app/Resources/public/assets/blueimp-load-image/js/load-image-meta.js
  5. 10
      app/Resources/public/assets/blueimp-load-image/js/load-image-orientation.js
  6. 2
      app/Resources/public/assets/blueimp-load-image/js/load-image.all.min.js
  7. 2
      app/Resources/public/assets/blueimp-load-image/js/load-image.all.min.js.map
  8. 302
      app/Resources/public/assets/blueimp-load-image/js/load-image.js
  9. 4
      app/Resources/public/assets/blueimp-load-image/package.json
  10. 2
      app/Resources/public/assets/blueimp-load-image/test/index.html
  11. 26
      app/Resources/public/assets/blueimp-load-image/test/test.js
  12. 8
      app/Resources/public/assets/pwstrength-bootstrap/.bower.json
  13. 22
      app/Resources/public/assets/pwstrength-bootstrap/OPTIONS.md
  14. 2
      app/Resources/public/assets/pwstrength-bootstrap/bower.json
  15. 5
      app/Resources/public/assets/pwstrength-bootstrap/dist/pwstrength-bootstrap.js
  16. 4
      app/Resources/public/assets/pwstrength-bootstrap/dist/pwstrength-bootstrap.min.js
  17. 2
      app/Resources/public/assets/pwstrength-bootstrap/dist/pwstrength-bootstrap.min.map
  18. 1
      app/Resources/public/assets/pwstrength-bootstrap/src/options.js
  19. 2
      app/Resources/public/assets/pwstrength-bootstrap/src/ui.js

@ -1,12 +1,12 @@
{
"name": "blueimp-load-image",
"homepage": "https://github.com/blueimp/JavaScript-Load-Image",
"version": "2.11.0",
"_release": "2.11.0",
"version": "2.12.1",
"_release": "2.12.1",
"_resolution": {
"type": "version",
"tag": "v2.11.0",
"commit": "832785cb8b58c57b38fb16b124053794cc97ca34"
"tag": "v2.12.1",
"commit": "030a229b9cd1fb59ac37b1cf43e79e298aa8ad42"
},
"_source": "https://github.com/blueimp/JavaScript-Load-Image.git",
"_target": ">=1.13.0",

@ -41,10 +41,12 @@ Or alternatively, choose which components you want to include:
```html
<script src="js/load-image.js"></script>
<script src="js/load-image-orientation.js"></script>
<script src="js/load-image-scale.js"></script>
<script src="js/load-image-meta.js"></script>
<script src="js/load-image-fetch.js"></script>
<script src="js/load-image-exif.js"></script>
<script src="js/load-image-exif-map.js"></script>
<script src="js/load-image-orientation.js"></script>
```
## Usage
@ -200,9 +202,12 @@ value `true`.
When set to `true`, it will set the orientation value based on the EXIF data of
the image, which will be parsed automatically if the exif library is available.
Setting the `orientation` also enables the `canvas` option.
Setting `orientation` to `true` alsoe enables the `meta` option.
Setting `orientation` to `true` also enables the `meta` option.
* **meta**: Automatically parses the image meta data if set to `true`.
The meta data is passed to the callback as second argument.
The meta data is passed to the callback as second argument.
If the file is given as URL and the browser supports the
[fetch API](https://developer.mozilla.org/en/docs/Web/API/Fetch_API), fetches
the file as Blob to be able to parse the meta data.
* **canvas**: Returns the image as
[canvas](https://developer.mozilla.org/en/HTML/Canvas) element if set to `true`.
* **crossOrigin**: Sets the crossOrigin property on the img element for loading

@ -57,7 +57,9 @@ It also provides a method to parse image meta data to extract <a href="https://e
</div>
<br>
<script src="js/load-image.js"></script>
<script src="js/load-image-scale.js"></script>
<script src="js/load-image-meta.js"></script>
<script src="js/load-image-fetch.js"></script>
<script src="js/load-image-exif.js"></script>
<script src="js/load-image-exif-map.js"></script>
<script src="js/load-image-orientation.js"></script>

@ -143,12 +143,12 @@
// Determines if meta data should be loaded automatically:
loadImage.hasMetaOption = function (options) {
return options.meta
return options && options.meta
}
var originalTransform = loadImage.transform
loadImage.transform = function (img, options, callback, file, data) {
if (loadImage.hasMetaOption(options || {})) {
if (loadImage.hasMetaOption(options)) {
loadImage.parseMetaData(file, function (data) {
originalTransform.call(loadImage, img, options, callback, file, data)
}, options, data)

@ -15,9 +15,13 @@
'use strict'
if (typeof define === 'function' && define.amd) {
// Register as an anonymous AMD module:
define(['./load-image'], factory)
define(['./load-image', './load-image-scale', './load-image-meta'], factory)
} else if (typeof module === 'object' && module.exports) {
factory(require('./load-image'))
factory(
require('./load-image'),
require('./load-image-scale'),
require('./load-image-meta')
)
} else {
// Browser globals:
factory(window.loadImage)
@ -38,7 +42,7 @@
// Determines if meta data should be loaded automatically:
loadImage.hasMetaOption = function (options) {
return options.orientation === true ||
return options && options.orientation === true ||
originalHasMetaOption.call(loadImage, options)
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -26,31 +26,38 @@
img.onload = function (event) {
return loadImage.onload(img, event, file, callback, options)
}
if (loadImage.isInstanceOf('Blob', file) ||
// Files are also Blob instances, but some browsers
// (Firefox 3.6) support the File API but not Blobs:
loadImage.isInstanceOf('File', file)) {
if (typeof file === 'string') {
loadImage.fetchBlob(file, function (blob) {
if (blob) {
file = blob
url = loadImage.createObjectURL(file)
} else {
url = file
if (options && options.crossOrigin) {
img.crossOrigin = options.crossOrigin
}
}
img.src = url
}, options)
return img
} else if (loadImage.isInstanceOf('Blob', file) ||
// Files are also Blob instances, but some browsers
// (Firefox 3.6) support the File API but not Blobs:
loadImage.isInstanceOf('File', file)) {
url = img._objectURL = loadImage.createObjectURL(file)
} else if (typeof file === 'string') {
url = file
if (options && options.crossOrigin) {
img.crossOrigin = options.crossOrigin
if (url) {
img.src = url
return img
}
} else {
return false
}
if (url) {
img.src = url
return img
return loadImage.readFile(file, function (e) {
var target = e.target
if (target && target.result) {
img.src = target.result
} else if (callback) {
callback(e)
}
})
}
return loadImage.readFile(file, function (e) {
var target = e.target
if (target && target.result) {
img.src = target.result
} else if (callback) {
callback(e)
}
})
}
// The check for URL.revokeObjectURL fixes an issue with Opera 12,
// which provides URL.createObjectURL but doesn't properly implement it:
@ -65,13 +72,20 @@
}
}
// If the callback given to this function returns a blob, it is used as image
// source instead of the original url and overrides the file argument used in
// the onload and onerror event callbacks:
loadImage.fetchBlob = function (url, callback, options) {
callback()
}
loadImage.isInstanceOf = function (type, obj) {
// Cross-frame instanceof check
return Object.prototype.toString.call(obj) === '[object ' + type + ']'
}
loadImage.transform = function (img, options, callback, file, data) {
callback(loadImage.scale(img, options, data), data)
callback(img, data)
}
loadImage.onerror = function (img, event, file, callback, options) {
@ -88,248 +102,6 @@
}
}
// Transform image coordinates, allows to override e.g.
// the canvas orientation based on the orientation option,
// gets canvas, options passed as arguments:
loadImage.transformCoordinates = function () {
return
}
// Returns transformed options, allows to override e.g.
// maxWidth, maxHeight and crop options based on the aspectRatio.
// gets img, options passed as arguments:
loadImage.getTransformedOptions = function (img, options) {
var aspectRatio = options.aspectRatio
var newOptions
var i
var width
var height
if (!aspectRatio) {
return options
}
newOptions = {}
for (i in options) {
if (options.hasOwnProperty(i)) {
newOptions[i] = options[i]
}
}
newOptions.crop = true
width = img.naturalWidth || img.width
height = img.naturalHeight || img.height
if (width / height > aspectRatio) {
newOptions.maxWidth = height * aspectRatio
newOptions.maxHeight = height
} else {
newOptions.maxWidth = width
newOptions.maxHeight = width / aspectRatio
}
return newOptions
}
// Canvas render method, allows to implement a different rendering algorithm:
loadImage.renderImageToCanvas = function (
canvas,
img,
sourceX,
sourceY,
sourceWidth,
sourceHeight,
destX,
destY,
destWidth,
destHeight
) {
canvas.getContext('2d').drawImage(
img,
sourceX,
sourceY,
sourceWidth,
sourceHeight,
destX,
destY,
destWidth,
destHeight
)
return canvas
}
// Determines if the target image should be a canvas element:
loadImage.hasCanvasOption = function (options) {
return options.canvas || options.crop || !!options.aspectRatio
}
// Scales and/or crops the given image (img or canvas HTML element)
// using the given options.
// Returns a canvas object if the browser supports canvas
// and the hasCanvasOption method returns true or a canvas
// object is passed as image, else the scaled image:
loadImage.scale = function (img, options, data) {
options = options || {}
var canvas = document.createElement('canvas')
var useCanvas = img.getContext ||
(loadImage.hasCanvasOption(options) && canvas.getContext)
var width = img.naturalWidth || img.width
var height = img.naturalHeight || img.height
var destWidth = width
var destHeight = height
var maxWidth
var maxHeight
var minWidth
var minHeight
var sourceWidth
var sourceHeight
var sourceX
var sourceY
var pixelRatio
var downsamplingRatio
var tmp
function scaleUp () {
var scale = Math.max(
(minWidth || destWidth) / destWidth,
(minHeight || destHeight) / destHeight
)
if (scale > 1) {
destWidth *= scale
destHeight *= scale
}
}
function scaleDown () {
var scale = Math.min(
(maxWidth || destWidth) / destWidth,
(maxHeight || destHeight) / destHeight
)
if (scale < 1) {
destWidth *= scale
destHeight *= scale
}
}
if (useCanvas) {
options = loadImage.getTransformedOptions(img, options, data)
sourceX = options.left || 0
sourceY = options.top || 0
if (options.sourceWidth) {
sourceWidth = options.sourceWidth
if (options.right !== undefined && options.left === undefined) {
sourceX = width - sourceWidth - options.right
}
} else {
sourceWidth = width - sourceX - (options.right || 0)
}
if (options.sourceHeight) {
sourceHeight = options.sourceHeight
if (options.bottom !== undefined && options.top === undefined) {
sourceY = height - sourceHeight - options.bottom
}
} else {
sourceHeight = height - sourceY - (options.bottom || 0)
}
destWidth = sourceWidth
destHeight = sourceHeight
}
maxWidth = options.maxWidth
maxHeight = options.maxHeight
minWidth = options.minWidth
minHeight = options.minHeight
if (useCanvas && maxWidth && maxHeight && options.crop) {
destWidth = maxWidth
destHeight = maxHeight
tmp = sourceWidth / sourceHeight - maxWidth / maxHeight
if (tmp < 0) {
sourceHeight = maxHeight * sourceWidth / maxWidth
if (options.top === undefined && options.bottom === undefined) {
sourceY = (height - sourceHeight) / 2
}
} else if (tmp > 0) {
sourceWidth = maxWidth * sourceHeight / maxHeight
if (options.left === undefined && options.right === undefined) {
sourceX = (width - sourceWidth) / 2
}
}
} else {
if (options.contain || options.cover) {
minWidth = maxWidth = maxWidth || minWidth
minHeight = maxHeight = maxHeight || minHeight
}
if (options.cover) {
scaleDown()
scaleUp()
} else {
scaleUp()
scaleDown()
}
}
if (useCanvas) {
pixelRatio = options.pixelRatio
if (pixelRatio > 1) {
canvas.style.width = destWidth + 'px'
canvas.style.height = destHeight + 'px'
destWidth *= pixelRatio
destHeight *= pixelRatio
canvas.getContext('2d').scale(pixelRatio, pixelRatio)
}
downsamplingRatio = options.downsamplingRatio
if (downsamplingRatio > 0 && downsamplingRatio < 1 &&
destWidth < sourceWidth && destHeight < sourceHeight) {
while (sourceWidth * downsamplingRatio > destWidth) {
canvas.width = sourceWidth * downsamplingRatio
canvas.height = sourceHeight * downsamplingRatio
loadImage.renderImageToCanvas(
canvas,
img,
sourceX,
sourceY,
sourceWidth,
sourceHeight,
0,
0,
canvas.width,
canvas.height
)
sourceX = 0
sourceY = 0
sourceWidth = canvas.width
sourceHeight = canvas.height
img = document.createElement('canvas')
img.width = sourceWidth
img.height = sourceHeight
loadImage.renderImageToCanvas(
img,
canvas,
0,
0,
sourceWidth,
sourceHeight,
0,
0,
sourceWidth,
sourceHeight
)
}
}
canvas.width = destWidth
canvas.height = destHeight
loadImage.transformCoordinates(
canvas,
options
)
return loadImage.renderImageToCanvas(
canvas,
img,
sourceX,
sourceY,
sourceWidth,
sourceHeight,
0,
0,
destWidth,
destHeight
)
}
img.width = destWidth
img.height = destHeight
return img
}
loadImage.createObjectURL = function (file) {
return urlAPI ? urlAPI.createObjectURL(file) : false
}

@ -1,6 +1,6 @@
{
"name": "blueimp-load-image",
"version": "2.11.0",
"version": "2.12.1",
"title": "JavaScript Load Image",
"description": "JavaScript Load Image is a library to load images provided as File or Blob objects or via URL. It returns an optionally scaled and/or cropped HTML img or canvas element. It also provides a method to parse image meta data to extract Exif tags and thumbnails and to restore the complete image header after resizing.",
"keywords": [
@ -40,7 +40,7 @@
"lint": "standard *.js js/*.js test/*.js",
"unit": "phantomjs node_modules/mocha-phantomjs-core/mocha-phantomjs-core.js test/index.html",
"test": "npm run lint && npm run unit",
"build": "cd js && uglifyjs load-image.js load-image-meta.js load-image-exif.js load-image-exif-map.js load-image-orientation.js -c -m -o load-image.all.min.js --source-map load-image.all.min.js.map",
"build": "cd js && uglifyjs load-image.js load-image-scale.js load-image-meta.js load-image-fetch.js load-image-exif.js load-image-exif-map.js load-image-orientation.js -c -m -o load-image.all.min.js --source-map load-image.all.min.js.map",
"preversion": "npm test",
"version": "npm run build && git add -A js",
"postversion": "git push --tags origin master master:gh-pages && npm publish"

@ -31,7 +31,9 @@ mocha.setup('bdd');
</script>
<script src="vendor/canvas-to-blob.js"></script>
<script src="../js/load-image.js"></script>
<script src="../js/load-image-scale.js"></script>
<script src="../js/load-image-meta.js"></script>
<script src="../js/load-image-fetch.js"></script>
<script src="../js/load-image-exif.js"></script>
<script src="../js/load-image-exif-map.js"></script>
<script src="../js/load-image-orientation.js"></script>

@ -479,7 +479,7 @@
describe('Canvas', function () {
it('Return img element to callback if canvas is not true', function (done) {
expect(loadImage(blobGIF, function (img) {
expect(img.getContext).to.not.be.ok
expect(img.getContext).to.be.falsy
expect(img.nodeName.toLowerCase()).to.equal('img')
done()
})).to.be.ok
@ -550,6 +550,30 @@
}, {meta: true})).to.be.ok
})
})
if ('fetch' in window && 'Request' in window) {
describe('Fetch', function () {
it('Should fetch blob from URL if meta is true', function (done) {
expect(loadImage(imageUrlJPEG, function (img, data) {
expect(data).to.be.ok
expect(data.imageHead).to.be.ok
expect(data.exif).to.be.ok
expect(data.exif.get('Orientation')).to.equal(6)
done()
}, {meta: true})).to.be.ok
})
it('Should not fetch blob from URL if meta is false', function (done) {
expect(loadImage(imageUrlJPEG, function (img, data) {
expect(data.imageHead).to.be.falsy
expect(data.exif).to.be.falsy
expect(img.width).to.equal(2)
expect(img.height).to.equal(1)
done()
})).to.be.ok
})
})
}
}(
this.chai.expect,
this.loadImage

@ -1,6 +1,6 @@
{
"name": "pwstrength-bootstrap",
"version": "2.0.6",
"version": "2.0.7",
"homepage": "https://github.com/ablanco/jquery.pwstrength.bootstrap",
"authors": [
"Alejandro Blanco <alejandro.b.e@gmail.com>"
@ -35,11 +35,11 @@
"Gruntfile.js",
"package.json"
],
"_release": "2.0.6",
"_release": "2.0.7",
"_resolution": {
"type": "version",
"tag": "2.0.6",
"commit": "c44322209fa86f1c510f7a4b7b883f1e476e9dcc"
"tag": "2.0.7",
"commit": "75c53fd66ef624e37f6de743cc8694b7f5afd218"
},
"_source": "https://github.com/ablanco/jquery.pwstrength.bootstrap.git",
"_target": "*",

@ -204,6 +204,28 @@ Let's see the options of each section.
Displays the password strength in a progress bar.
* __progressExtraCssClasses__: (Bootstrap 3&4 only)
Default: `""` (String)
CSS classes to be added to the generated progress wrapper of the progress-bar. It is meant to make
use of the extra classes provided by Bootstrap. The classes will be added to
the proper DOM element depending of which version of Bootstrap is being
used.
E.g.
```css
div.progress.custom-class {
height: 4px;
border-radius: 0px;
background-color: transparent;
}
div.progress.custom-class > .progress-bar {
line-height: 4px;
font-size: 2px;
}
```
* __progressBarEmptyPercentage__:
Default: `1` (Integer)

@ -1,6 +1,6 @@
{
"name": "pwstrength-bootstrap",
"version": "2.0.6",
"version": "2.0.7",
"homepage": "https://github.com/ablanco/jquery.pwstrength.bootstrap",
"authors": [
"Alejandro Blanco <alejandro.b.e@gmail.com>"

@ -1,6 +1,6 @@
/*!
* jQuery Password Strength plugin for Twitter Bootstrap
* Version: 2.0.6
* Version: 2.0.7
*
* Copyright (c) 2008-2013 Tane Piper
* Copyright (c) 2013 Alejandro Blanco
@ -282,6 +282,7 @@ defaultOptions.ui.colorClasses = [
defaultOptions.ui.showProgressBar = true;
defaultOptions.ui.progressBarEmptyPercentage = 1;
defaultOptions.ui.progressBarMinPercentage = 1;
defaultOptions.ui.progressExtraCssClasses = '';
defaultOptions.ui.progressBarExtraCssClasses = '';
defaultOptions.ui.showPopover = false;
defaultOptions.ui.popoverPlacement = "bottom";
@ -391,7 +392,7 @@ var ui = {};
"'><div class='";
} else {
// Bootstrap 3 & 4
progressbar += "'><div class='" +
progressbar += options.ui.progressExtraCssClasses + "'><div class='" +
options.ui.progressBarExtraCssClasses + " progress-";
}
progressbar += "bar'>";

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -74,6 +74,7 @@ defaultOptions.ui.colorClasses = [
defaultOptions.ui.showProgressBar = true;
defaultOptions.ui.progressBarEmptyPercentage = 1;
defaultOptions.ui.progressBarMinPercentage = 1;
defaultOptions.ui.progressExtraCssClasses = '';
defaultOptions.ui.progressBarExtraCssClasses = '';
defaultOptions.ui.showPopover = false;
defaultOptions.ui.popoverPlacement = "bottom";

@ -74,7 +74,7 @@ var ui = {};
"'><div class='";
} else {
// Bootstrap 3 & 4
progressbar += "'><div class='" +
progressbar += options.ui.progressExtraCssClasses + "'><div class='" +
options.ui.progressBarExtraCssClasses + " progress-";
}
progressbar += "bar'>";

Loading…
Cancel
Save