diff --git a/dashboard-ui/bower_components/doc-ready/.bower.json b/dashboard-ui/bower_components/doc-ready/.bower.json deleted file mode 100644 index d4d75eca65..0000000000 --- a/dashboard-ui/bower_components/doc-ready/.bower.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "name": "doc-ready", - "version": "1.0.4", - "description": "Let's get this party started... on document ready", - "main": "doc-ready.js", - "dependencies": { - "eventie": "^1" - }, - "homepage": "https://github.com/desandro/doc-ready", - "authors": [ - "David DeSandro" - ], - "moduleType": [ - "amd", - "globals", - "node" - ], - "keywords": [ - "DOM", - "document", - "ready" - ], - "license": "MIT", - "ignore": [ - "**/.*", - "node_modules", - "bower_components", - "test", - "tests", - "examples", - "package.json", - "component.json", - "index.html" - ], - "_release": "1.0.4", - "_resolution": { - "type": "version", - "tag": "v1.0.4", - "commit": "cec8e49744a1e18b14a711eea77e201bb70de544" - }, - "_source": "git://github.com/desandro/doc-ready.git", - "_target": "~1.0.4", - "_originalSource": "doc-ready" -} \ No newline at end of file diff --git a/dashboard-ui/bower_components/doc-ready/bower.json b/dashboard-ui/bower_components/doc-ready/bower.json deleted file mode 100644 index 726600ba93..0000000000 --- a/dashboard-ui/bower_components/doc-ready/bower.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "doc-ready", - "version": "1.0.4", - "description": "Let's get this party started... on document ready", - "main": "doc-ready.js", - "dependencies": { - "eventie": "^1" - }, - "homepage": "https://github.com/desandro/doc-ready", - "authors": [ - "David DeSandro" - ], - "moduleType": [ - "amd", - "globals", - "node" - ], - "keywords": [ - "DOM", - "document", - "ready" - ], - "license": "MIT", - "ignore": [ - "**/.*", - "node_modules", - "bower_components", - "test", - "tests", - "examples", - "package.json", - "component.json", - "index.html" - ] -} diff --git a/dashboard-ui/bower_components/doc-ready/doc-ready.js b/dashboard-ui/bower_components/doc-ready/doc-ready.js deleted file mode 100644 index bc5e40e1ec..0000000000 --- a/dashboard-ui/bower_components/doc-ready/doc-ready.js +++ /dev/null @@ -1,80 +0,0 @@ -/*! - * docReady v1.0.4 - * Cross browser DOMContentLoaded event emitter - * MIT license - */ - -/*jshint browser: true, strict: true, undef: true, unused: true*/ -/*global define: false, require: false, module: false */ - -( function( window ) { - -'use strict'; - -var document = window.document; -// collection of functions to be triggered on ready -var queue = []; - -function docReady( fn ) { - // throw out non-functions - if ( typeof fn !== 'function' ) { - return; - } - - if ( docReady.isReady ) { - // ready now, hit it - fn(); - } else { - // queue function when ready - queue.push( fn ); - } -} - -docReady.isReady = false; - -// triggered on various doc ready events -function onReady( event ) { - // bail if already triggered or IE8 document is not ready just yet - var isIE8NotReady = event.type === 'readystatechange' && document.readyState !== 'complete'; - if ( docReady.isReady || isIE8NotReady ) { - return; - } - - trigger(); -} - -function trigger() { - docReady.isReady = true; - // process queue - for ( var i=0, len = queue.length; i < len; i++ ) { - var fn = queue[i]; - fn(); - } -} - -function defineDocReady( eventie ) { - // trigger ready if page is ready - if ( document.readyState === 'complete' ) { - trigger(); - } else { - // listen for events - eventie.bind( document, 'DOMContentLoaded', onReady ); - eventie.bind( document, 'readystatechange', onReady ); - eventie.bind( window, 'load', onReady ); - } - - return docReady; -} - -// transport -if ( typeof define === 'function' && define.amd ) { - // AMD - define( [ 'eventie/eventie' ], defineDocReady ); -} else if ( typeof exports === 'object' ) { - module.exports = defineDocReady( require('eventie') ); -} else { - // browser global - window.docReady = defineDocReady( window.eventie ); -} - -})( window ); diff --git a/dashboard-ui/bower_components/eventEmitter/.bower.json b/dashboard-ui/bower_components/eventEmitter/.bower.json deleted file mode 100644 index 46dc12a4ac..0000000000 --- a/dashboard-ui/bower_components/eventEmitter/.bower.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "eventEmitter", - "description": "Event based JavaScript for the browser", - "version": "4.3.0", - "main": [ - "./EventEmitter.js" - ], - "author": { - "name": "Oliver Caldwell", - "web": "http://oli.me.uk/" - }, - "license": "Unlicense", - "keywords": [ - "events", - "structure" - ], - "ignore": [ - "docs", - "tests", - "tools", - ".gitignore", - "package.json" - ], - "homepage": "https://github.com/Olical/EventEmitter", - "_release": "4.3.0", - "_resolution": { - "type": "version", - "tag": "v4.3.0", - "commit": "34545d1b761fca48d7e4d9c71efc868a8d101419" - }, - "_source": "git://github.com/Olical/EventEmitter.git", - "_target": ">=4.2 <5", - "_originalSource": "eventEmitter" -} \ No newline at end of file diff --git a/dashboard-ui/bower_components/eventEmitter/EventEmitter.js b/dashboard-ui/bower_components/eventEmitter/EventEmitter.js deleted file mode 100644 index 5211bae912..0000000000 --- a/dashboard-ui/bower_components/eventEmitter/EventEmitter.js +++ /dev/null @@ -1,474 +0,0 @@ -/*! - * EventEmitter v4.2.11 - git.io/ee - * Unlicense - http://unlicense.org/ - * Oliver Caldwell - http://oli.me.uk/ - * @preserve - */ - -;(function () { - 'use strict'; - - /** - * Class for managing events. - * Can be extended to provide event functionality in other classes. - * - * @class EventEmitter Manages event registering and emitting. - */ - function EventEmitter() {} - - // Shortcuts to improve speed and size - var proto = EventEmitter.prototype; - var exports = this; - var originalGlobalValue = exports.EventEmitter; - - /** - * Finds the index of the listener for the event in its storage array. - * - * @param {Function[]} listeners Array of listeners to search through. - * @param {Function} listener Method to look for. - * @return {Number} Index of the specified listener, -1 if not found - * @api private - */ - function indexOfListener(listeners, listener) { - var i = listeners.length; - while (i--) { - if (listeners[i].listener === listener) { - return i; - } - } - - return -1; - } - - /** - * Alias a method while keeping the context correct, to allow for overwriting of target method. - * - * @param {String} name The name of the target method. - * @return {Function} The aliased method - * @api private - */ - function alias(name) { - return function aliasClosure() { - return this[name].apply(this, arguments); - }; - } - - /** - * Returns the listener array for the specified event. - * Will initialise the event object and listener arrays if required. - * Will return an object if you use a regex search. The object contains keys for each matched event. So /ba[rz]/ might return an object containing bar and baz. But only if you have either defined them with defineEvent or added some listeners to them. - * Each property in the object response is an array of listener functions. - * - * @param {String|RegExp} evt Name of the event to return the listeners from. - * @return {Function[]|Object} All listener functions for the event. - */ - proto.getListeners = function getListeners(evt) { - var events = this._getEvents(); - var response; - var key; - - // Return a concatenated array of all matching events if - // the selector is a regular expression. - if (evt instanceof RegExp) { - response = {}; - for (key in events) { - if (events.hasOwnProperty(key) && evt.test(key)) { - response[key] = events[key]; - } - } - } - else { - response = events[evt] || (events[evt] = []); - } - - return response; - }; - - /** - * Takes a list of listener objects and flattens it into a list of listener functions. - * - * @param {Object[]} listeners Raw listener objects. - * @return {Function[]} Just the listener functions. - */ - proto.flattenListeners = function flattenListeners(listeners) { - var flatListeners = []; - var i; - - for (i = 0; i < listeners.length; i += 1) { - flatListeners.push(listeners[i].listener); - } - - return flatListeners; - }; - - /** - * Fetches the requested listeners via getListeners but will always return the results inside an object. This is mainly for internal use but others may find it useful. - * - * @param {String|RegExp} evt Name of the event to return the listeners from. - * @return {Object} All listener functions for an event in an object. - */ - proto.getListenersAsObject = function getListenersAsObject(evt) { - var listeners = this.getListeners(evt); - var response; - - if (listeners instanceof Array) { - response = {}; - response[evt] = listeners; - } - - return response || listeners; - }; - - /** - * Adds a listener function to the specified event. - * The listener will not be added if it is a duplicate. - * If the listener returns true then it will be removed after it is called. - * If you pass a regular expression as the event name then the listener will be added to all events that match it. - * - * @param {String|RegExp} evt Name of the event to attach the listener to. - * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling. - * @return {Object} Current instance of EventEmitter for chaining. - */ - proto.addListener = function addListener(evt, listener) { - var listeners = this.getListenersAsObject(evt); - var listenerIsWrapped = typeof listener === 'object'; - var key; - - for (key in listeners) { - if (listeners.hasOwnProperty(key) && indexOfListener(listeners[key], listener) === -1) { - listeners[key].push(listenerIsWrapped ? listener : { - listener: listener, - once: false - }); - } - } - - return this; - }; - - /** - * Alias of addListener - */ - proto.on = alias('addListener'); - - /** - * Semi-alias of addListener. It will add a listener that will be - * automatically removed after its first execution. - * - * @param {String|RegExp} evt Name of the event to attach the listener to. - * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling. - * @return {Object} Current instance of EventEmitter for chaining. - */ - proto.addOnceListener = function addOnceListener(evt, listener) { - return this.addListener(evt, { - listener: listener, - once: true - }); - }; - - /** - * Alias of addOnceListener. - */ - proto.once = alias('addOnceListener'); - - /** - * Defines an event name. This is required if you want to use a regex to add a listener to multiple events at once. If you don't do this then how do you expect it to know what event to add to? Should it just add to every possible match for a regex? No. That is scary and bad. - * You need to tell it what event names should be matched by a regex. - * - * @param {String} evt Name of the event to create. - * @return {Object} Current instance of EventEmitter for chaining. - */ - proto.defineEvent = function defineEvent(evt) { - this.getListeners(evt); - return this; - }; - - /** - * Uses defineEvent to define multiple events. - * - * @param {String[]} evts An array of event names to define. - * @return {Object} Current instance of EventEmitter for chaining. - */ - proto.defineEvents = function defineEvents(evts) { - for (var i = 0; i < evts.length; i += 1) { - this.defineEvent(evts[i]); - } - return this; - }; - - /** - * Removes a listener function from the specified event. - * When passed a regular expression as the event name, it will remove the listener from all events that match it. - * - * @param {String|RegExp} evt Name of the event to remove the listener from. - * @param {Function} listener Method to remove from the event. - * @return {Object} Current instance of EventEmitter for chaining. - */ - proto.removeListener = function removeListener(evt, listener) { - var listeners = this.getListenersAsObject(evt); - var index; - var key; - - for (key in listeners) { - if (listeners.hasOwnProperty(key)) { - index = indexOfListener(listeners[key], listener); - - if (index !== -1) { - listeners[key].splice(index, 1); - } - } - } - - return this; - }; - - /** - * Alias of removeListener - */ - proto.off = alias('removeListener'); - - /** - * Adds listeners in bulk using the manipulateListeners method. - * If you pass an object as the second argument you can add to multiple events at once. The object should contain key value pairs of events and listeners or listener arrays. You can also pass it an event name and an array of listeners to be added. - * You can also pass it a regular expression to add the array of listeners to all events that match it. - * Yeah, this function does quite a bit. That's probably a bad thing. - * - * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add to multiple events at once. - * @param {Function[]} [listeners] An optional array of listener functions to add. - * @return {Object} Current instance of EventEmitter for chaining. - */ - proto.addListeners = function addListeners(evt, listeners) { - // Pass through to manipulateListeners - return this.manipulateListeners(false, evt, listeners); - }; - - /** - * Removes listeners in bulk using the manipulateListeners method. - * If you pass an object as the second argument you can remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays. - * You can also pass it an event name and an array of listeners to be removed. - * You can also pass it a regular expression to remove the listeners from all events that match it. - * - * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to remove from multiple events at once. - * @param {Function[]} [listeners] An optional array of listener functions to remove. - * @return {Object} Current instance of EventEmitter for chaining. - */ - proto.removeListeners = function removeListeners(evt, listeners) { - // Pass through to manipulateListeners - return this.manipulateListeners(true, evt, listeners); - }; - - /** - * Edits listeners in bulk. The addListeners and removeListeners methods both use this to do their job. You should really use those instead, this is a little lower level. - * The first argument will determine if the listeners are removed (true) or added (false). - * If you pass an object as the second argument you can add/remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays. - * You can also pass it an event name and an array of listeners to be added/removed. - * You can also pass it a regular expression to manipulate the listeners of all events that match it. - * - * @param {Boolean} remove True if you want to remove listeners, false if you want to add. - * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add/remove from multiple events at once. - * @param {Function[]} [listeners] An optional array of listener functions to add/remove. - * @return {Object} Current instance of EventEmitter for chaining. - */ - proto.manipulateListeners = function manipulateListeners(remove, evt, listeners) { - var i; - var value; - var single = remove ? this.removeListener : this.addListener; - var multiple = remove ? this.removeListeners : this.addListeners; - - // If evt is an object then pass each of its properties to this method - if (typeof evt === 'object' && !(evt instanceof RegExp)) { - for (i in evt) { - if (evt.hasOwnProperty(i) && (value = evt[i])) { - // Pass the single listener straight through to the singular method - if (typeof value === 'function') { - single.call(this, i, value); - } - else { - // Otherwise pass back to the multiple function - multiple.call(this, i, value); - } - } - } - } - else { - // So evt must be a string - // And listeners must be an array of listeners - // Loop over it and pass each one to the multiple method - i = listeners.length; - while (i--) { - single.call(this, evt, listeners[i]); - } - } - - return this; - }; - - /** - * Removes all listeners from a specified event. - * If you do not specify an event then all listeners will be removed. - * That means every event will be emptied. - * You can also pass a regex to remove all events that match it. - * - * @param {String|RegExp} [evt] Optional name of the event to remove all listeners for. Will remove from every event if not passed. - * @return {Object} Current instance of EventEmitter for chaining. - */ - proto.removeEvent = function removeEvent(evt) { - var type = typeof evt; - var events = this._getEvents(); - var key; - - // Remove different things depending on the state of evt - if (type === 'string') { - // Remove all listeners for the specified event - delete events[evt]; - } - else if (evt instanceof RegExp) { - // Remove all events matching the regex. - for (key in events) { - if (events.hasOwnProperty(key) && evt.test(key)) { - delete events[key]; - } - } - } - else { - // Remove all listeners in all events - delete this._events; - } - - return this; - }; - - /** - * Alias of removeEvent. - * - * Added to mirror the node API. - */ - proto.removeAllListeners = alias('removeEvent'); - - /** - * Emits an event of your choice. - * When emitted, every listener attached to that event will be executed. - * If you pass the optional argument array then those arguments will be passed to every listener upon execution. - * Because it uses `apply`, your array of arguments will be passed as if you wrote them out separately. - * So they will not arrive within the array on the other side, they will be separate. - * You can also pass a regular expression to emit to all events that match it. - * - * @param {String|RegExp} evt Name of the event to emit and execute listeners for. - * @param {Array} [args] Optional array of arguments to be passed to each listener. - * @return {Object} Current instance of EventEmitter for chaining. - */ - proto.emitEvent = function emitEvent(evt, args) { - var listenersMap = this.getListenersAsObject(evt); - var listeners; - var listener; - var i; - var key; - var response; - - for (key in listenersMap) { - if (listenersMap.hasOwnProperty(key)) { - listeners = listenersMap[key].slice(0); - i = listeners.length; - - while (i--) { - // If the listener returns true then it shall be removed from the event - // The function is executed either with a basic call or an apply if there is an args array - listener = listeners[i]; - - if (listener.once === true) { - this.removeListener(evt, listener.listener); - } - - response = listener.listener.apply(this, args || []); - - if (response === this._getOnceReturnValue()) { - this.removeListener(evt, listener.listener); - } - } - } - } - - return this; - }; - - /** - * Alias of emitEvent - */ - proto.trigger = alias('emitEvent'); - - /** - * Subtly different from emitEvent in that it will pass its arguments on to the listeners, as opposed to taking a single array of arguments to pass on. - * As with emitEvent, you can pass a regex in place of the event name to emit to all events that match it. - * - * @param {String|RegExp} evt Name of the event to emit and execute listeners for. - * @param {...*} Optional additional arguments to be passed to each listener. - * @return {Object} Current instance of EventEmitter for chaining. - */ - proto.emit = function emit(evt) { - var args = Array.prototype.slice.call(arguments, 1); - return this.emitEvent(evt, args); - }; - - /** - * Sets the current value to check against when executing listeners. If a - * listeners return value matches the one set here then it will be removed - * after execution. This value defaults to true. - * - * @param {*} value The new value to check for when executing listeners. - * @return {Object} Current instance of EventEmitter for chaining. - */ - proto.setOnceReturnValue = function setOnceReturnValue(value) { - this._onceReturnValue = value; - return this; - }; - - /** - * Fetches the current value to check against when executing listeners. If - * the listeners return value matches this one then it should be removed - * automatically. It will return true by default. - * - * @return {*|Boolean} The current value to check for or the default, true. - * @api private - */ - proto._getOnceReturnValue = function _getOnceReturnValue() { - if (this.hasOwnProperty('_onceReturnValue')) { - return this._onceReturnValue; - } - else { - return true; - } - }; - - /** - * Fetches the events object and creates one if required. - * - * @return {Object} The events storage object. - * @api private - */ - proto._getEvents = function _getEvents() { - return this._events || (this._events = {}); - }; - - /** - * Reverts the global {@link EventEmitter} to its previous value and returns a reference to this version. - * - * @return {Function} Non conflicting EventEmitter class. - */ - EventEmitter.noConflict = function noConflict() { - exports.EventEmitter = originalGlobalValue; - return EventEmitter; - }; - - // Expose the class either via AMD, CommonJS or the global object - if (typeof define === 'function' && define.amd) { - define(function () { - return EventEmitter; - }); - } - else if (typeof module === 'object' && module.exports){ - module.exports = EventEmitter; - } - else { - exports.EventEmitter = EventEmitter; - } -}.call(this)); diff --git a/dashboard-ui/bower_components/eventEmitter/EventEmitter.min.js b/dashboard-ui/bower_components/eventEmitter/EventEmitter.min.js deleted file mode 100644 index f85b5e371c..0000000000 --- a/dashboard-ui/bower_components/eventEmitter/EventEmitter.min.js +++ /dev/null @@ -1,7 +0,0 @@ -/*! - * EventEmitter v4.2.11 - git.io/ee - * Unlicense - http://unlicense.org/ - * Oliver Caldwell - http://oli.me.uk/ - * @preserve - */ -(function(){"use strict";function t(){}function i(t,n){for(var e=t.length;e--;)if(t[e].listener===n)return e;return-1}function n(e){return function(){return this[e].apply(this,arguments)}}var e=t.prototype,r=this,s=r.EventEmitter;e.getListeners=function(n){var r,e,t=this._getEvents();if(n instanceof RegExp){r={};for(e in t)t.hasOwnProperty(e)&&n.test(e)&&(r[e]=t[e])}else r=t[n]||(t[n]=[]);return r},e.flattenListeners=function(t){var e,n=[];for(e=0;e diff --git a/dashboard-ui/bower_components/eventEmitter/bower.json b/dashboard-ui/bower_components/eventEmitter/bower.json deleted file mode 100644 index 39b9803a0c..0000000000 --- a/dashboard-ui/bower_components/eventEmitter/bower.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "eventEmitter", - "description": "Event based JavaScript for the browser", - "version": "4.3.0", - "main": [ - "./EventEmitter.js" - ], - "author": { - "name": "Oliver Caldwell", - "web": "http://oli.me.uk/" - }, - "license": "Unlicense", - "keywords": [ - "events", - "structure" - ], - "ignore": [ - "docs", - "tests", - "tools", - ".gitignore", - "package.json" - ] -} diff --git a/dashboard-ui/bower_components/eventEmitter/component.json b/dashboard-ui/bower_components/eventEmitter/component.json deleted file mode 100644 index 34e0670c60..0000000000 --- a/dashboard-ui/bower_components/eventEmitter/component.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "eventEmitter", - "repo": "Olical/EventEmitter", - "description": "Event based JavaScript for the browser.", - "version": "4.3.0", - "scripts": ["EventEmitter.js"], - "main": "EventEmitter.js", - "license": "Unlicense" -} diff --git a/dashboard-ui/bower_components/eventie/.bower.json b/dashboard-ui/bower_components/eventie/.bower.json deleted file mode 100644 index 917d217ea8..0000000000 --- a/dashboard-ui/bower_components/eventie/.bower.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "eventie", - "version": "1.0.6", - "main": "eventie.js", - "description": "event binding helper", - "ignore": [ - "component.json", - "test.html", - "**/.*", - "node_modules", - "bower_components" - ], - "homepage": "https://github.com/desandro/eventie", - "authors": [ - "David DeSandro" - ], - "moduleType": [ - "amd", - "globals", - "node" - ], - "keywords": [ - "event" - ], - "license": "MIT", - "_release": "1.0.6", - "_resolution": { - "type": "version", - "tag": "v1.0.6", - "commit": "14d2ca3df97da64c820829a8310f9198fbafbcfa" - }, - "_source": "git://github.com/desandro/eventie.git", - "_target": "^1", - "_originalSource": "eventie" -} \ No newline at end of file diff --git a/dashboard-ui/bower_components/eventie/bower.json b/dashboard-ui/bower_components/eventie/bower.json deleted file mode 100644 index 96092a6db1..0000000000 --- a/dashboard-ui/bower_components/eventie/bower.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "eventie", - "version": "1.0.6", - "main": "eventie.js", - "description": "event binding helper", - "ignore": [ - "component.json", - "test.html", - "**/.*", - "node_modules", - "bower_components" - ], - "homepage": "https://github.com/desandro/eventie", - "authors": [ - "David DeSandro" - ], - "moduleType": [ - "amd", - "globals", - "node" - ], - "keywords": [ - "event" - ], - "license": "MIT" -} diff --git a/dashboard-ui/bower_components/eventie/eventie.js b/dashboard-ui/bower_components/eventie/eventie.js deleted file mode 100644 index 2bf9929071..0000000000 --- a/dashboard-ui/bower_components/eventie/eventie.js +++ /dev/null @@ -1,82 +0,0 @@ -/*! - * eventie v1.0.6 - * event binding helper - * eventie.bind( elem, 'click', myFn ) - * eventie.unbind( elem, 'click', myFn ) - * MIT license - */ - -/*jshint browser: true, undef: true, unused: true */ -/*global define: false, module: false */ - -( function( window ) { - -'use strict'; - -var docElem = document.documentElement; - -var bind = function() {}; - -function getIEEvent( obj ) { - var event = window.event; - // add event.target - event.target = event.target || event.srcElement || obj; - return event; -} - -if ( docElem.addEventListener ) { - bind = function( obj, type, fn ) { - obj.addEventListener( type, fn, false ); - }; -} else if ( docElem.attachEvent ) { - bind = function( obj, type, fn ) { - obj[ type + fn ] = fn.handleEvent ? - function() { - var event = getIEEvent( obj ); - fn.handleEvent.call( fn, event ); - } : - function() { - var event = getIEEvent( obj ); - fn.call( obj, event ); - }; - obj.attachEvent( "on" + type, obj[ type + fn ] ); - }; -} - -var unbind = function() {}; - -if ( docElem.removeEventListener ) { - unbind = function( obj, type, fn ) { - obj.removeEventListener( type, fn, false ); - }; -} else if ( docElem.detachEvent ) { - unbind = function( obj, type, fn ) { - obj.detachEvent( "on" + type, obj[ type + fn ] ); - try { - delete obj[ type + fn ]; - } catch ( err ) { - // can't delete window object properties - obj[ type + fn ] = undefined; - } - }; -} - -var eventie = { - bind: bind, - unbind: unbind -}; - -// ----- module definition ----- // - -if ( typeof define === 'function' && define.amd ) { - // AMD - define( eventie ); -} else if ( typeof exports === 'object' ) { - // CommonJS - module.exports = eventie; -} else { - // browser global - window.eventie = eventie; -} - -})( window ); diff --git a/dashboard-ui/bower_components/eventie/package.json b/dashboard-ui/bower_components/eventie/package.json deleted file mode 100644 index 5ce57406fc..0000000000 --- a/dashboard-ui/bower_components/eventie/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "eventie", - "version": "1.0.6", - "description": "Event binding helper", - "main": "eventie.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "repository": { - "type": "git", - "url": "git://github.com/desandro/eventie.git" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/desandro/eventie/issues" - }, - "homepage": "https://github.com/desandro/eventie", - "keywords": [ - "DOM", - "event" - ], - "author": "David DeSandro" -} diff --git a/dashboard-ui/bower_components/fizzy-ui-utils/.bower.json b/dashboard-ui/bower_components/fizzy-ui-utils/.bower.json deleted file mode 100644 index 1f625f15c9..0000000000 --- a/dashboard-ui/bower_components/fizzy-ui-utils/.bower.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "fizzy-ui-utils", - "version": "1.0.1", - "authors": [ - "David DeSandro" - ], - "description": "UI utilities", - "main": "utils.js", - "dependencies": { - "doc-ready": "~1.0.4", - "matches-selector": "~1.0.2" - }, - "moduleType": [ - "amd", - "globals", - "node" - ], - "keywords": [ - "utility", - "ui" - ], - "license": "MIT", - "ignore": [ - "**/.*", - "node_modules", - "bower_components", - "test", - "tests", - "package.json" - ], - "homepage": "https://github.com/metafizzy/fizzy-ui-utils", - "_release": "1.0.1", - "_resolution": { - "type": "version", - "tag": "v1.0.1", - "commit": "823b543b583f4831d25aadf94c26fc6018e62172" - }, - "_source": "git://github.com/metafizzy/fizzy-ui-utils.git", - "_target": "~1.0.1", - "_originalSource": "fizzy-ui-utils" -} \ No newline at end of file diff --git a/dashboard-ui/bower_components/fizzy-ui-utils/bower.json b/dashboard-ui/bower_components/fizzy-ui-utils/bower.json deleted file mode 100644 index b7caf63c5e..0000000000 --- a/dashboard-ui/bower_components/fizzy-ui-utils/bower.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "name": "fizzy-ui-utils", - "version": "1.0.1", - "authors": [ - "David DeSandro" - ], - "description": "UI utilities", - "main": "utils.js", - "dependencies": { - "doc-ready": "~1.0.4", - "matches-selector": "~1.0.2" - }, - "moduleType": [ - "amd", - "globals", - "node" - ], - "keywords": [ - "utility", - "ui" - ], - "license": "MIT", - "ignore": [ - "**/.*", - "node_modules", - "bower_components", - "test", - "tests", - "package.json" - ] -} diff --git a/dashboard-ui/bower_components/fizzy-ui-utils/utils.js b/dashboard-ui/bower_components/fizzy-ui-utils/utils.js deleted file mode 100644 index ebac88264d..0000000000 --- a/dashboard-ui/bower_components/fizzy-ui-utils/utils.js +++ /dev/null @@ -1,270 +0,0 @@ -/** - * Fizzy UI utils v1.0.1 - * MIT license - */ - -/*jshint browser: true, undef: true, unused: true, strict: true */ - -( function( window, factory ) { - /*global define: false, module: false, require: false */ - 'use strict'; - // universal module definition - - if ( typeof define == 'function' && define.amd ) { - // AMD - define( [ - 'doc-ready/doc-ready', - 'matches-selector/matches-selector' - ], function( docReady, matchesSelector ) { - return factory( window, docReady, matchesSelector ); - }); - } else if ( typeof exports == 'object' ) { - // CommonJS - module.exports = factory( - window, - require('doc-ready'), - require('desandro-matches-selector') - ); - } else { - // browser global - window.fizzyUIUtils = factory( - window, - window.docReady, - window.matchesSelector - ); - } - -}( window, function factory( window, docReady, matchesSelector ) { - -'use strict'; - -var utils = {}; - -// ----- extend ----- // - -// extends objects -utils.extend = function( a, b ) { - for ( var prop in b ) { - a[ prop ] = b[ prop ]; - } - return a; -}; - -// ----- modulo ----- // - -utils.modulo = function( num, div ) { - return ( ( num % div ) + div ) % div; -}; - -// ----- isArray ----- // - -var objToString = Object.prototype.toString; -utils.isArray = function( obj ) { - return objToString.call( obj ) == '[object Array]'; -}; - -// ----- makeArray ----- // - -// turn element or nodeList into an array -utils.makeArray = function( obj ) { - var ary = []; - if ( utils.isArray( obj ) ) { - // use object if already an array - ary = obj; - } else if ( obj && typeof obj.length == 'number' ) { - // convert nodeList to array - for ( var i=0, len = obj.length; i < len; i++ ) { - ary.push( obj[i] ); - } - } else { - // array of single index - ary.push( obj ); - } - return ary; -}; - -// ----- indexOf ----- // - -// index of helper cause IE8 -utils.indexOf = Array.prototype.indexOf ? function( ary, obj ) { - return ary.indexOf( obj ); - } : function( ary, obj ) { - for ( var i=0, len = ary.length; i < len; i++ ) { - if ( ary[i] === obj ) { - return i; - } - } - return -1; - }; - -// ----- removeFrom ----- // - -utils.removeFrom = function( ary, obj ) { - var index = utils.indexOf( ary, obj ); - if ( index != -1 ) { - ary.splice( index, 1 ); - } -}; - -// ----- isElement ----- // - -// http://stackoverflow.com/a/384380/182183 -utils.isElement = ( typeof HTMLElement == 'function' || typeof HTMLElement == 'object' ) ? - function isElementDOM2( obj ) { - return obj instanceof HTMLElement; - } : - function isElementQuirky( obj ) { - return obj && typeof obj == 'object' && - obj.nodeType == 1 && typeof obj.nodeName == 'string'; - }; - -// ----- setText ----- // - -utils.setText = ( function() { - var setTextProperty; - function setText( elem, text ) { - // only check setTextProperty once - setTextProperty = setTextProperty || ( document.documentElement.textContent !== undefined ? 'textContent' : 'innerText' ); - elem[ setTextProperty ] = text; - } - return setText; -})(); - -// ----- getParent ----- // - -utils.getParent = function( elem, selector ) { - while ( elem != document.body ) { - elem = elem.parentNode; - if ( matchesSelector( elem, selector ) ) { - return elem; - } - } -}; - -// ----- getQueryElement ----- // - -// use element as selector string -utils.getQueryElement = function( elem ) { - if ( typeof elem == 'string' ) { - return document.querySelector( elem ); - } - return elem; -}; - -// ----- handleEvent ----- // - -// enable .ontype to trigger from .addEventListener( elem, 'type' ) -utils.handleEvent = function( event ) { - var method = 'on' + event.type; - if ( this[ method ] ) { - this[ method ]( event ); - } -}; - -// ----- filterFindElements ----- // - -utils.filterFindElements = function( elems, selector ) { - // make array of elems - elems = utils.makeArray( elems ); - var ffElems = []; - - for ( var i=0, len = elems.length; i < len; i++ ) { - var elem = elems[i]; - // check that elem is an actual element - if ( !utils.isElement( elem ) ) { - continue; - } - // filter & find items if we have a selector - if ( selector ) { - // filter siblings - if ( matchesSelector( elem, selector ) ) { - ffElems.push( elem ); - } - // find children - var childElems = elem.querySelectorAll( selector ); - // concat childElems to filterFound array - for ( var j=0, jLen = childElems.length; j < jLen; j++ ) { - ffElems.push( childElems[j] ); - } - } else { - ffElems.push( elem ); - } - } - - return ffElems; -}; - -// ----- debounceMethod ----- // - -utils.debounceMethod = function( _class, methodName, threshold ) { - // original method - var method = _class.prototype[ methodName ]; - var timeoutName = methodName + 'Timeout'; - - _class.prototype[ methodName ] = function() { - var timeout = this[ timeoutName ]; - if ( timeout ) { - clearTimeout( timeout ); - } - var args = arguments; - - var _this = this; - this[ timeoutName ] = setTimeout( function() { - method.apply( _this, args ); - delete _this[ timeoutName ]; - }, threshold || 100 ); - }; -}; - -// ----- htmlInit ----- // - -// http://jamesroberts.name/blog/2010/02/22/string-functions-for-javascript-trim-to-camel-case-to-dashed-and-to-underscore/ -utils.toDashed = function( str ) { - return str.replace( /(.)([A-Z])/g, function( match, $1, $2 ) { - return $1 + '-' + $2; - }).toLowerCase(); -}; - -var console = window.console; -/** - * allow user to initialize classes via .js-namespace class - * htmlInit( Widget, 'widgetName' ) - * options are parsed from data-namespace-option attribute - */ -utils.htmlInit = function( WidgetClass, namespace ) { - docReady( function() { - var dashedNamespace = utils.toDashed( namespace ); - var elems = document.querySelectorAll( '.js-' + dashedNamespace ); - var dataAttr = 'data-' + dashedNamespace + '-options'; - - for ( var i=0, len = elems.length; i < len; i++ ) { - var elem = elems[i]; - var attr = elem.getAttribute( dataAttr ); - var options; - try { - options = attr && JSON.parse( attr ); - } catch ( error ) { - // log error, do not initialize - if ( console ) { - console.error( 'Error parsing ' + dataAttr + ' on ' + - elem.nodeName.toLowerCase() + ( elem.id ? '#' + elem.id : '' ) + ': ' + - error ); - } - continue; - } - // initialize - var instance = new WidgetClass( elem, options ); - // make available via $().data('layoutname') - var jQuery = window.jQuery; - if ( jQuery ) { - jQuery.data( elem, namespace, instance ); - } - } - }); -}; - -// ----- ----- // - -return utils; - -})); diff --git a/dashboard-ui/bower_components/get-size/.bower.json b/dashboard-ui/bower_components/get-size/.bower.json deleted file mode 100644 index 4064d0bff5..0000000000 --- a/dashboard-ui/bower_components/get-size/.bower.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "get-size", - "version": "1.2.2", - "main": "get-size.js", - "description": "measures element size", - "dependencies": { - "get-style-property": "1.x" - }, - "devDependencies": { - "qunit": "~1.10" - }, - "ignore": [ - "test/", - "**/.*", - "package.json", - "component.json", - "node_modules", - "bower_components", - "test", - "tests" - ], - "homepage": "https://github.com/desandro/get-size", - "authors": [ - "David DeSandro " - ], - "moduleType": [ - "amd", - "globals", - "node" - ], - "keywords": [ - "size", - "dom", - "width", - "height" - ], - "license": "MIT", - "_release": "1.2.2", - "_resolution": { - "type": "version", - "tag": "v1.2.2", - "commit": "059bbf3aa78997e4ca761e6d742b2e9efe674e08" - }, - "_source": "git://github.com/desandro/get-size.git", - "_target": "~1.2.2", - "_originalSource": "get-size" -} \ No newline at end of file diff --git a/dashboard-ui/bower_components/get-size/bower.json b/dashboard-ui/bower_components/get-size/bower.json deleted file mode 100644 index 96563a7ea6..0000000000 --- a/dashboard-ui/bower_components/get-size/bower.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "get-size", - "version": "1.2.2", - "main": "get-size.js", - "description": "measures element size", - "dependencies": { - "get-style-property": "1.x" - }, - "devDependencies": { - "qunit": "~1.10" - }, - "ignore": [ - "test/", - "**/.*", - "package.json", - "component.json", - "node_modules", - "bower_components", - "test", - "tests" - ], - "homepage": "https://github.com/desandro/get-size", - "authors": [ - "David DeSandro " - ], - "moduleType": [ - "amd", - "globals", - "node" - ], - "keywords": [ - "size", - "dom", - "width", - "height" - ], - "license": "MIT" -} diff --git a/dashboard-ui/bower_components/get-size/get-size.js b/dashboard-ui/bower_components/get-size/get-size.js deleted file mode 100644 index e0df175be4..0000000000 --- a/dashboard-ui/bower_components/get-size/get-size.js +++ /dev/null @@ -1,250 +0,0 @@ -/*! - * getSize v1.2.2 - * measure size of elements - * MIT license - */ - -/*jshint browser: true, strict: true, undef: true, unused: true */ -/*global define: false, exports: false, require: false, module: false, console: false */ - -( function( window, undefined ) { - -'use strict'; - -// -------------------------- helpers -------------------------- // - -// get a number from a string, not a percentage -function getStyleSize( value ) { - var num = parseFloat( value ); - // not a percent like '100%', and a number - var isValid = value.indexOf('%') === -1 && !isNaN( num ); - return isValid && num; -} - -function noop() {} - -var logError = typeof console === 'undefined' ? noop : - function( message ) { - console.error( message ); - }; - -// -------------------------- measurements -------------------------- // - -var measurements = [ - 'paddingLeft', - 'paddingRight', - 'paddingTop', - 'paddingBottom', - 'marginLeft', - 'marginRight', - 'marginTop', - 'marginBottom', - 'borderLeftWidth', - 'borderRightWidth', - 'borderTopWidth', - 'borderBottomWidth' -]; - -function getZeroSize() { - var size = { - width: 0, - height: 0, - innerWidth: 0, - innerHeight: 0, - outerWidth: 0, - outerHeight: 0 - }; - for ( var i=0, len = measurements.length; i < len; i++ ) { - var measurement = measurements[i]; - size[ measurement ] = 0; - } - return size; -} - - - -function defineGetSize( getStyleProperty ) { - -// -------------------------- setup -------------------------- // - -var isSetup = false; - -var getStyle, boxSizingProp, isBoxSizeOuter; - -/** - * setup vars and functions - * do it on initial getSize(), rather than on script load - * For Firefox bug https://bugzilla.mozilla.org/show_bug.cgi?id=548397 - */ -function setup() { - // setup once - if ( isSetup ) { - return; - } - isSetup = true; - - var getComputedStyle = window.getComputedStyle; - getStyle = ( function() { - var getStyleFn = getComputedStyle ? - function( elem ) { - return getComputedStyle( elem, null ); - } : - function( elem ) { - return elem.currentStyle; - }; - - return function getStyle( elem ) { - var style = getStyleFn( elem ); - if ( !style ) { - logError( 'Style returned ' + style + - '. Are you running this code in a hidden iframe on Firefox? ' + - 'See http://bit.ly/getsizebug1' ); - } - return style; - }; - })(); - - // -------------------------- box sizing -------------------------- // - - boxSizingProp = getStyleProperty('boxSizing'); - - /** - * WebKit measures the outer-width on style.width on border-box elems - * IE & Firefox measures the inner-width - */ - if ( boxSizingProp ) { - var div = document.createElement('div'); - div.style.width = '200px'; - div.style.padding = '1px 2px 3px 4px'; - div.style.borderStyle = 'solid'; - div.style.borderWidth = '1px 2px 3px 4px'; - div.style[ boxSizingProp ] = 'border-box'; - - var body = document.body || document.documentElement; - body.appendChild( div ); - var style = getStyle( div ); - - isBoxSizeOuter = getStyleSize( style.width ) === 200; - body.removeChild( div ); - } - -} - -// -------------------------- getSize -------------------------- // - -function getSize( elem ) { - setup(); - - // use querySeletor if elem is string - if ( typeof elem === 'string' ) { - elem = document.querySelector( elem ); - } - - // do not proceed on non-objects - if ( !elem || typeof elem !== 'object' || !elem.nodeType ) { - return; - } - - var style = getStyle( elem ); - - // if hidden, everything is 0 - if ( style.display === 'none' ) { - return getZeroSize(); - } - - var size = {}; - size.width = elem.offsetWidth; - size.height = elem.offsetHeight; - - var isBorderBox = size.isBorderBox = !!( boxSizingProp && - style[ boxSizingProp ] && style[ boxSizingProp ] === 'border-box' ); - - // get all measurements - for ( var i=0, len = measurements.length; i < len; i++ ) { - var measurement = measurements[i]; - var value = style[ measurement ]; - value = mungeNonPixel( elem, value ); - var num = parseFloat( value ); - // any 'auto', 'medium' value will be 0 - size[ measurement ] = !isNaN( num ) ? num : 0; - } - - var paddingWidth = size.paddingLeft + size.paddingRight; - var paddingHeight = size.paddingTop + size.paddingBottom; - var marginWidth = size.marginLeft + size.marginRight; - var marginHeight = size.marginTop + size.marginBottom; - var borderWidth = size.borderLeftWidth + size.borderRightWidth; - var borderHeight = size.borderTopWidth + size.borderBottomWidth; - - var isBorderBoxSizeOuter = isBorderBox && isBoxSizeOuter; - - // overwrite width and height if we can get it from style - var styleWidth = getStyleSize( style.width ); - if ( styleWidth !== false ) { - size.width = styleWidth + - // add padding and border unless it's already including it - ( isBorderBoxSizeOuter ? 0 : paddingWidth + borderWidth ); - } - - var styleHeight = getStyleSize( style.height ); - if ( styleHeight !== false ) { - size.height = styleHeight + - // add padding and border unless it's already including it - ( isBorderBoxSizeOuter ? 0 : paddingHeight + borderHeight ); - } - - size.innerWidth = size.width - ( paddingWidth + borderWidth ); - size.innerHeight = size.height - ( paddingHeight + borderHeight ); - - size.outerWidth = size.width + marginWidth; - size.outerHeight = size.height + marginHeight; - - return size; -} - -// IE8 returns percent values, not pixels -// taken from jQuery's curCSS -function mungeNonPixel( elem, value ) { - // IE8 and has percent value - if ( window.getComputedStyle || value.indexOf('%') === -1 ) { - return value; - } - var style = elem.style; - // Remember the original values - var left = style.left; - var rs = elem.runtimeStyle; - var rsLeft = rs && rs.left; - - // Put in the new values to get a computed value out - if ( rsLeft ) { - rs.left = elem.currentStyle.left; - } - style.left = value; - value = style.pixelLeft; - - // Revert the changed values - style.left = left; - if ( rsLeft ) { - rs.left = rsLeft; - } - - return value; -} - -return getSize; - -} - -// transport -if ( typeof define === 'function' && define.amd ) { - // AMD for RequireJS - define( [ 'get-style-property/get-style-property' ], defineGetSize ); -} else if ( typeof exports === 'object' ) { - // CommonJS for Component - module.exports = defineGetSize( require('desandro-get-style-property') ); -} else { - // browser global - window.getSize = defineGetSize( window.getStyleProperty ); -} - -})( window ); diff --git a/dashboard-ui/bower_components/get-size/index.html b/dashboard-ui/bower_components/get-size/index.html deleted file mode 100644 index 19811d0f0d..0000000000 --- a/dashboard-ui/bower_components/get-size/index.html +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - getSize - - - - - - -

getSize

- -
-
box1
-
- -
-
box2
-
- -
-
box3
-
- -
-
box4
-
- -
-
box5
-
- -
-
box6
-
- - - - - diff --git a/dashboard-ui/bower_components/get-style-property/.bower.json b/dashboard-ui/bower_components/get-style-property/.bower.json deleted file mode 100644 index 973f1966c0..0000000000 --- a/dashboard-ui/bower_components/get-style-property/.bower.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "get-style-property", - "main": "get-style-property.js", - "version": "1.0.4", - "homepage": "https://github.com/desandro/get-style-property", - "authors": [ - "David DeSandro " - ], - "description": "quick & dirty CSS property testing", - "moduleType": [ - "amd", - "globals", - "node" - ], - "keywords": [ - "CSS", - "DOM" - ], - "license": "MIT", - "ignore": [ - "**/.*", - "node_modules", - "bower_components", - "test", - "tests" - ], - "_release": "1.0.4", - "_resolution": { - "type": "version", - "tag": "v1.0.4", - "commit": "34fc5e4a0f252964ed2790138b8d7d30d04b55c1" - }, - "_source": "git://github.com/desandro/get-style-property.git", - "_target": "1.x", - "_originalSource": "get-style-property" -} \ No newline at end of file diff --git a/dashboard-ui/bower_components/get-style-property/bower.json b/dashboard-ui/bower_components/get-style-property/bower.json deleted file mode 100644 index 9801272227..0000000000 --- a/dashboard-ui/bower_components/get-style-property/bower.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "get-style-property", - "main": "get-style-property.js", - "version": "1.0.4", - "homepage": "https://github.com/desandro/get-style-property", - "authors": [ - "David DeSandro " - ], - "description": "quick & dirty CSS property testing", - "moduleType": [ - "amd", - "globals", - "node" - ], - "keywords": [ - "CSS", - "DOM" - ], - "license": "MIT", - "ignore": [ - "**/.*", - "node_modules", - "bower_components", - "test", - "tests" - ] -} diff --git a/dashboard-ui/bower_components/get-style-property/component.json b/dashboard-ui/bower_components/get-style-property/component.json deleted file mode 100644 index e4ca369bd4..0000000000 --- a/dashboard-ui/bower_components/get-style-property/component.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "get-style-property", - "repo": "desandro/get-style-property", - "description": "Quick and dirty CSS property testing", - "version": "1.0.4", - "scripts": ["get-style-property.js"], - "main": "get-style-property.js" -} diff --git a/dashboard-ui/bower_components/get-style-property/get-style-property.js b/dashboard-ui/bower_components/get-style-property/get-style-property.js deleted file mode 100644 index b48064a970..0000000000 --- a/dashboard-ui/bower_components/get-style-property/get-style-property.js +++ /dev/null @@ -1,55 +0,0 @@ -/*! - * getStyleProperty v1.0.4 - * original by kangax - * http://perfectionkills.com/feature-testing-css-properties/ - * MIT license - */ - -/*jshint browser: true, strict: true, undef: true */ -/*global define: false, exports: false, module: false */ - -( function( window ) { - -'use strict'; - -var prefixes = 'Webkit Moz ms Ms O'.split(' '); -var docElemStyle = document.documentElement.style; - -function getStyleProperty( propName ) { - if ( !propName ) { - return; - } - - // test standard property first - if ( typeof docElemStyle[ propName ] === 'string' ) { - return propName; - } - - // capitalize - propName = propName.charAt(0).toUpperCase() + propName.slice(1); - - // test vendor specific properties - var prefixed; - for ( var i=0, len = prefixes.length; i < len; i++ ) { - prefixed = prefixes[i] + propName; - if ( typeof docElemStyle[ prefixed ] === 'string' ) { - return prefixed; - } - } -} - -// transport -if ( typeof define === 'function' && define.amd ) { - // AMD - define( function() { - return getStyleProperty; - }); -} else if ( typeof exports === 'object' ) { - // CommonJS for Component - module.exports = getStyleProperty; -} else { - // browser global - window.getStyleProperty = getStyleProperty; -} - -})( window ); diff --git a/dashboard-ui/bower_components/get-style-property/package.json b/dashboard-ui/bower_components/get-style-property/package.json deleted file mode 100644 index c32819f25c..0000000000 --- a/dashboard-ui/bower_components/get-style-property/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "desandro-get-style-property", - "version": "1.0.4", - "description": "Quick and dirty CSS property testing", - "main": "get-style-property.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "repository": { - "type": "git", - "url": "https://github.com/desandro/get-style-property.git" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/desandro/get-style-property/issues" - }, - "homepage": "https://github.com/desandro/get-style-property", - "keywords": [ - "CSS", - "DOM" - ], - "author": "David DeSandro" -} diff --git a/dashboard-ui/bower_components/iron-icon/.bower.json b/dashboard-ui/bower_components/iron-icon/.bower.json index 75ac273a15..1dd6bd32f0 100644 --- a/dashboard-ui/bower_components/iron-icon/.bower.json +++ b/dashboard-ui/bower_components/iron-icon/.bower.json @@ -31,14 +31,14 @@ "web-component-tester": "*", "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" }, - "homepage": "https://github.com/PolymerElements/iron-icon", + "homepage": "https://github.com/polymerelements/iron-icon", "_release": "1.0.7", "_resolution": { "type": "version", "tag": "v1.0.7", "commit": "6f4d152dc3998a6cc12a5a585a654f893dc99381" }, - "_source": "git://github.com/PolymerElements/iron-icon.git", + "_source": "git://github.com/polymerelements/iron-icon.git", "_target": "^1.0.0", - "_originalSource": "PolymerElements/iron-icon" + "_originalSource": "polymerelements/iron-icon" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/iron-icons/.bower.json b/dashboard-ui/bower_components/iron-icons/.bower.json index 93533ec1bd..1fbaa11e5c 100644 --- a/dashboard-ui/bower_components/iron-icons/.bower.json +++ b/dashboard-ui/bower_components/iron-icons/.bower.json @@ -40,7 +40,7 @@ "tag": "v1.0.5", "commit": "39da54afbc17af343d1f95e62c5c0c477492677a" }, - "_source": "git://github.com/PolymerElements/iron-icons.git", + "_source": "git://github.com/polymerelements/iron-icons.git", "_target": "^1.0.0", - "_originalSource": "PolymerElements/iron-icons" + "_originalSource": "polymerelements/iron-icons" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/iron-selector/.bower.json b/dashboard-ui/bower_components/iron-selector/.bower.json index ebb18c5b7b..52d44c1907 100644 --- a/dashboard-ui/bower_components/iron-selector/.bower.json +++ b/dashboard-ui/bower_components/iron-selector/.bower.json @@ -36,7 +36,7 @@ "tag": "v1.0.8", "commit": "e9a66727f3da0446f04956d4e4f1dcd51cdec2ff" }, - "_source": "git://github.com/polymerelements/iron-selector.git", + "_source": "git://github.com/PolymerElements/iron-selector.git", "_target": "^1.0.0", - "_originalSource": "polymerelements/iron-selector" + "_originalSource": "PolymerElements/iron-selector" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/masonry/.bower.json b/dashboard-ui/bower_components/masonry/.bower.json deleted file mode 100644 index 837a17dec9..0000000000 --- a/dashboard-ui/bower_components/masonry/.bower.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "masonry", - "version": "3.3.2", - "description": "Cascading grid layout library", - "main": "masonry.js", - "dependencies": { - "get-size": "~1.2.2", - "outlayer": "~1.4.0", - "fizzy-ui-utils": "~1.0.1" - }, - "devDependencies": { - "jquery-bridget": "1.1.x", - "doc-ready": "1.x", - "qunit": "^1.12", - "jquery": ">=1.4.3 <2" - }, - "ignore": [ - "examples/", - "test/", - "CONTRIBUTING.mdown", - "Gruntfile.js", - "package.json", - "**/.*", - "node_modules", - "bower_components", - "test", - "tests" - ], - "homepage": "http://masonry.desandro.com", - "authors": [ - "David DeSandro" - ], - "keywords": [ - "masonry", - "layout", - "outlayer" - ], - "license": "MIT", - "moduleType": [ - "amd", - "globals", - "node" - ], - "_release": "3.3.2", - "_resolution": { - "type": "version", - "tag": "v3.3.2", - "commit": "48ed97fd2ebf0c126833bef6b29aff51781701e2" - }, - "_source": "git://github.com/desandro/masonry.git", - "_target": "~3.3.2", - "_originalSource": "masonry", - "_direct": true -} \ No newline at end of file diff --git a/dashboard-ui/bower_components/masonry/README.mdown b/dashboard-ui/bower_components/masonry/README.mdown deleted file mode 100644 index 9b7579e008..0000000000 --- a/dashboard-ui/bower_components/masonry/README.mdown +++ /dev/null @@ -1,76 +0,0 @@ -# Masonry - -_Cascading grid layout library_ - -Masonry works by placing elements in optimal position based on available vertical space, sort of like a mason fitting stones in a wall. You’ve probably seen it in use all over the Internet. - -See [masonry.desandro.com](http://masonry.desandro.com) for complete docs and demos. - -## Install - -### Download - -+ [masonry.pkgd.js](https://github.com/desandro/masonry/raw/master/dist/masonry.pkgd.js) un-minified, or -+ [masonry.pkgd.min.js](https://github.com/desandro/masonry/raw/master/dist/masonry.pkgd.min.js) minified - -### CDN - -Link directly to [Masonry files on cdnjs](https://cdnjs.com/libraries/masonry). - -``` html - - - -``` - -### Package managers - -Bower: `bower install masonry --save` - -[npm](https://www.npmjs.com/package/masonry-layout): `npm install masonry-layout --save` - - -## Initialize - -With jQuery - -``` js -$('.grid').masonry({ - // options... - itemSelector: '.grid-item', - columnWidth: 200 -}); -``` - -With vanilla JavaScript - -``` js -// vanilla JS -var grid = document.querySelector('.grid'); -var msnry = new Masonry( grid, { - // options... - itemSelector: '.grid-item', - columnWidth: 200 -}); -``` - -With HTML - -Add a class of `js-masonry` to your element. Options can be set in JSON in `data-masonry-options`. - -``` html -
-
-
- ... -
-``` - -## License - -Masonry is released under the [MIT license](http://desandro.mit-license.org). Have at it. - -* * * - -Copyright 2015 David DeSandro diff --git a/dashboard-ui/bower_components/masonry/bower.json b/dashboard-ui/bower_components/masonry/bower.json deleted file mode 100644 index 04075bbbfe..0000000000 --- a/dashboard-ui/bower_components/masonry/bower.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "name": "masonry", - "version": "3.3.2", - "description": "Cascading grid layout library", - "main": "masonry.js", - "dependencies": { - "get-size": "~1.2.2", - "outlayer": "~1.4.0", - "fizzy-ui-utils": "~1.0.1" - }, - "devDependencies": { - "jquery-bridget": "1.1.x", - "doc-ready": "1.x", - "qunit": "^1.12", - "jquery": ">=1.4.3 <2" - }, - "ignore": [ - "examples/", - "test/", - "CONTRIBUTING.mdown", - "Gruntfile.js", - "package.json", - "**/.*", - "node_modules", - "bower_components", - "test", - "tests" - ], - "homepage": "http://masonry.desandro.com", - "authors": [ - "David DeSandro" - ], - "keywords": [ - "masonry", - "layout", - "outlayer" - ], - "license": "MIT", - "moduleType": [ - "amd", - "globals", - "node" - ] -} diff --git a/dashboard-ui/bower_components/masonry/changelog.md b/dashboard-ui/bower_components/masonry/changelog.md deleted file mode 100644 index 43e95fcfed..0000000000 --- a/dashboard-ui/bower_components/masonry/changelog.md +++ /dev/null @@ -1,83 +0,0 @@ -# Changelog - -### v3.3.1 - -+ Updated Outlayer v1.4.1 - + Added jQuery events - + Fixed Safari layout and transition bugs. Fixed [#698](https://github.com/desandro/masonry/issues/698) - -## v3.3.0 - -+ Added `percentPosition` option. Fixed [#574](https://github.com/desandro/masonry/issues/574) -+ Removed first `instance` argument from `layoutComplete` and `removeComplete` events -+ Added use of [fizzy-ui-utils](https://github.com/metafizzy/fizzy-ui-utils) - -### v3.2.3 - -+ Fixed pixel rounding errors related to Firefox, gutters. Fixed [#580](https://github.com/desandro/masonry/pull/580) -+ Moved poorly named `examples/` to better named `sandbox/`. Fixed [#539](https://github.com/desandro/masonry/issues/539) -+ Moved [`masonry-v2-shim.js` shim to its own repo](https://github.com/desandro/masonry-v2-3-shim) - -### v3.2.2 - -+ Update [getSize](https://github.com/desandro/get-size) to v1.2.1 to fix IE8 bug - -### v3.2.1 - -+ Fix missing dependencies in `package.json` - -## v3.2.0 - -+ Add CommonJS support [#480](https://github.com/desandro/masonry/issues/480) -+ jQuery Bridget no longer in explicit dependency tree - -### v3.1.5 - -+ Add dist/pkgd files -+ Upgrade to Outlayer v1.2 - -### v3.1.4 - -Fix stamp bug if multiple of columnWidth - -### v3.1.3 - -Round if off by 1px - -### v3.1.2 - -Fix IE8 bugs w/ hidden items - -### v3.1.1 - -update Outlayer v1.1.2 - -## v3.1.0 - -Add better RequireJS support - -### v3.0.3 - -Fix bug with `isFitWidth` and resizing - -### v3.0.2 - -Add back `isFitWidth` - -### v3.0.1 - -fixed empty container - -## v3.0.0 - -+ Complete rewrite -+ Componentize with Bower -+ Remove jQuery as strict dependency -+ Remove smartresize jQuery plugin -+ imagesLoaded no longer included -+ jQuery animation has been removed. animationOptions has been removed. This means no animation for in IE8 and IE9. -+ Corner stamp is now integrated as `stamp` option and `stamp` method -+ `isRTL` option removed, use `isOriginLeft: false` instead -+ `isResizable` option renamed to `isResizeBound` -+ `layout` method renamed to `layoutItems` -+ `gutterWidth` option renamed to `gutter` diff --git a/dashboard-ui/bower_components/masonry/dist/masonry.pkgd.js b/dashboard-ui/bower_components/masonry/dist/masonry.pkgd.js deleted file mode 100644 index a2c6fb3cab..0000000000 --- a/dashboard-ui/bower_components/masonry/dist/masonry.pkgd.js +++ /dev/null @@ -1,3187 +0,0 @@ -/*! - * Masonry PACKAGED v3.3.2 - * Cascading grid layout library - * http://masonry.desandro.com - * MIT License - * by David DeSandro - */ - -/** - * Bridget makes jQuery widgets - * v1.1.0 - * MIT license - */ - -( function( window ) { - - - -// -------------------------- utils -------------------------- // - -var slice = Array.prototype.slice; - -function noop() {} - -// -------------------------- definition -------------------------- // - -function defineBridget( $ ) { - -// bail if no jQuery -if ( !$ ) { - return; -} - -// -------------------------- addOptionMethod -------------------------- // - -/** - * adds option method -> $().plugin('option', {...}) - * @param {Function} PluginClass - constructor class - */ -function addOptionMethod( PluginClass ) { - // don't overwrite original option method - if ( PluginClass.prototype.option ) { - return; - } - - // option setter - PluginClass.prototype.option = function( opts ) { - // bail out if not an object - if ( !$.isPlainObject( opts ) ){ - return; - } - this.options = $.extend( true, this.options, opts ); - }; -} - -// -------------------------- plugin bridge -------------------------- // - -// helper function for logging errors -// $.error breaks jQuery chaining -var logError = typeof console === 'undefined' ? noop : - function( message ) { - console.error( message ); - }; - -/** - * jQuery plugin bridge, access methods like $elem.plugin('method') - * @param {String} namespace - plugin name - * @param {Function} PluginClass - constructor class - */ -function bridge( namespace, PluginClass ) { - // add to jQuery fn namespace - $.fn[ namespace ] = function( options ) { - if ( typeof options === 'string' ) { - // call plugin method when first argument is a string - // get arguments for method - var args = slice.call( arguments, 1 ); - - for ( var i=0, len = this.length; i < len; i++ ) { - var elem = this[i]; - var instance = $.data( elem, namespace ); - if ( !instance ) { - logError( "cannot call methods on " + namespace + " prior to initialization; " + - "attempted to call '" + options + "'" ); - continue; - } - if ( !$.isFunction( instance[options] ) || options.charAt(0) === '_' ) { - logError( "no such method '" + options + "' for " + namespace + " instance" ); - continue; - } - - // trigger method with arguments - var returnValue = instance[ options ].apply( instance, args ); - - // break look and return first value if provided - if ( returnValue !== undefined ) { - return returnValue; - } - } - // return this if no return value - return this; - } else { - return this.each( function() { - var instance = $.data( this, namespace ); - if ( instance ) { - // apply options & init - instance.option( options ); - instance._init(); - } else { - // initialize new instance - instance = new PluginClass( this, options ); - $.data( this, namespace, instance ); - } - }); - } - }; - -} - -// -------------------------- bridget -------------------------- // - -/** - * converts a Prototypical class into a proper jQuery plugin - * the class must have a ._init method - * @param {String} namespace - plugin name, used in $().pluginName - * @param {Function} PluginClass - constructor class - */ -$.bridget = function( namespace, PluginClass ) { - addOptionMethod( PluginClass ); - bridge( namespace, PluginClass ); -}; - -return $.bridget; - -} - -// transport -if ( typeof define === 'function' && define.amd ) { - // AMD - define( 'jquery-bridget/jquery.bridget',[ 'jquery' ], defineBridget ); -} else if ( typeof exports === 'object' ) { - defineBridget( require('jquery') ); -} else { - // get jquery from browser global - defineBridget( window.jQuery ); -} - -})( window ); - -/*! - * eventie v1.0.6 - * event binding helper - * eventie.bind( elem, 'click', myFn ) - * eventie.unbind( elem, 'click', myFn ) - * MIT license - */ - -/*jshint browser: true, undef: true, unused: true */ -/*global define: false, module: false */ - -( function( window ) { - - - -var docElem = document.documentElement; - -var bind = function() {}; - -function getIEEvent( obj ) { - var event = window.event; - // add event.target - event.target = event.target || event.srcElement || obj; - return event; -} - -if ( docElem.addEventListener ) { - bind = function( obj, type, fn ) { - obj.addEventListener( type, fn, false ); - }; -} else if ( docElem.attachEvent ) { - bind = function( obj, type, fn ) { - obj[ type + fn ] = fn.handleEvent ? - function() { - var event = getIEEvent( obj ); - fn.handleEvent.call( fn, event ); - } : - function() { - var event = getIEEvent( obj ); - fn.call( obj, event ); - }; - obj.attachEvent( "on" + type, obj[ type + fn ] ); - }; -} - -var unbind = function() {}; - -if ( docElem.removeEventListener ) { - unbind = function( obj, type, fn ) { - obj.removeEventListener( type, fn, false ); - }; -} else if ( docElem.detachEvent ) { - unbind = function( obj, type, fn ) { - obj.detachEvent( "on" + type, obj[ type + fn ] ); - try { - delete obj[ type + fn ]; - } catch ( err ) { - // can't delete window object properties - obj[ type + fn ] = undefined; - } - }; -} - -var eventie = { - bind: bind, - unbind: unbind -}; - -// ----- module definition ----- // - -if ( typeof define === 'function' && define.amd ) { - // AMD - define( 'eventie/eventie',eventie ); -} else if ( typeof exports === 'object' ) { - // CommonJS - module.exports = eventie; -} else { - // browser global - window.eventie = eventie; -} - -})( window ); - -/*! - * EventEmitter v4.2.11 - git.io/ee - * Unlicense - http://unlicense.org/ - * Oliver Caldwell - http://oli.me.uk/ - * @preserve - */ - -;(function () { - - - /** - * Class for managing events. - * Can be extended to provide event functionality in other classes. - * - * @class EventEmitter Manages event registering and emitting. - */ - function EventEmitter() {} - - // Shortcuts to improve speed and size - var proto = EventEmitter.prototype; - var exports = this; - var originalGlobalValue = exports.EventEmitter; - - /** - * Finds the index of the listener for the event in its storage array. - * - * @param {Function[]} listeners Array of listeners to search through. - * @param {Function} listener Method to look for. - * @return {Number} Index of the specified listener, -1 if not found - * @api private - */ - function indexOfListener(listeners, listener) { - var i = listeners.length; - while (i--) { - if (listeners[i].listener === listener) { - return i; - } - } - - return -1; - } - - /** - * Alias a method while keeping the context correct, to allow for overwriting of target method. - * - * @param {String} name The name of the target method. - * @return {Function} The aliased method - * @api private - */ - function alias(name) { - return function aliasClosure() { - return this[name].apply(this, arguments); - }; - } - - /** - * Returns the listener array for the specified event. - * Will initialise the event object and listener arrays if required. - * Will return an object if you use a regex search. The object contains keys for each matched event. So /ba[rz]/ might return an object containing bar and baz. But only if you have either defined them with defineEvent or added some listeners to them. - * Each property in the object response is an array of listener functions. - * - * @param {String|RegExp} evt Name of the event to return the listeners from. - * @return {Function[]|Object} All listener functions for the event. - */ - proto.getListeners = function getListeners(evt) { - var events = this._getEvents(); - var response; - var key; - - // Return a concatenated array of all matching events if - // the selector is a regular expression. - if (evt instanceof RegExp) { - response = {}; - for (key in events) { - if (events.hasOwnProperty(key) && evt.test(key)) { - response[key] = events[key]; - } - } - } - else { - response = events[evt] || (events[evt] = []); - } - - return response; - }; - - /** - * Takes a list of listener objects and flattens it into a list of listener functions. - * - * @param {Object[]} listeners Raw listener objects. - * @return {Function[]} Just the listener functions. - */ - proto.flattenListeners = function flattenListeners(listeners) { - var flatListeners = []; - var i; - - for (i = 0; i < listeners.length; i += 1) { - flatListeners.push(listeners[i].listener); - } - - return flatListeners; - }; - - /** - * Fetches the requested listeners via getListeners but will always return the results inside an object. This is mainly for internal use but others may find it useful. - * - * @param {String|RegExp} evt Name of the event to return the listeners from. - * @return {Object} All listener functions for an event in an object. - */ - proto.getListenersAsObject = function getListenersAsObject(evt) { - var listeners = this.getListeners(evt); - var response; - - if (listeners instanceof Array) { - response = {}; - response[evt] = listeners; - } - - return response || listeners; - }; - - /** - * Adds a listener function to the specified event. - * The listener will not be added if it is a duplicate. - * If the listener returns true then it will be removed after it is called. - * If you pass a regular expression as the event name then the listener will be added to all events that match it. - * - * @param {String|RegExp} evt Name of the event to attach the listener to. - * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling. - * @return {Object} Current instance of EventEmitter for chaining. - */ - proto.addListener = function addListener(evt, listener) { - var listeners = this.getListenersAsObject(evt); - var listenerIsWrapped = typeof listener === 'object'; - var key; - - for (key in listeners) { - if (listeners.hasOwnProperty(key) && indexOfListener(listeners[key], listener) === -1) { - listeners[key].push(listenerIsWrapped ? listener : { - listener: listener, - once: false - }); - } - } - - return this; - }; - - /** - * Alias of addListener - */ - proto.on = alias('addListener'); - - /** - * Semi-alias of addListener. It will add a listener that will be - * automatically removed after its first execution. - * - * @param {String|RegExp} evt Name of the event to attach the listener to. - * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling. - * @return {Object} Current instance of EventEmitter for chaining. - */ - proto.addOnceListener = function addOnceListener(evt, listener) { - return this.addListener(evt, { - listener: listener, - once: true - }); - }; - - /** - * Alias of addOnceListener. - */ - proto.once = alias('addOnceListener'); - - /** - * Defines an event name. This is required if you want to use a regex to add a listener to multiple events at once. If you don't do this then how do you expect it to know what event to add to? Should it just add to every possible match for a regex? No. That is scary and bad. - * You need to tell it what event names should be matched by a regex. - * - * @param {String} evt Name of the event to create. - * @return {Object} Current instance of EventEmitter for chaining. - */ - proto.defineEvent = function defineEvent(evt) { - this.getListeners(evt); - return this; - }; - - /** - * Uses defineEvent to define multiple events. - * - * @param {String[]} evts An array of event names to define. - * @return {Object} Current instance of EventEmitter for chaining. - */ - proto.defineEvents = function defineEvents(evts) { - for (var i = 0; i < evts.length; i += 1) { - this.defineEvent(evts[i]); - } - return this; - }; - - /** - * Removes a listener function from the specified event. - * When passed a regular expression as the event name, it will remove the listener from all events that match it. - * - * @param {String|RegExp} evt Name of the event to remove the listener from. - * @param {Function} listener Method to remove from the event. - * @return {Object} Current instance of EventEmitter for chaining. - */ - proto.removeListener = function removeListener(evt, listener) { - var listeners = this.getListenersAsObject(evt); - var index; - var key; - - for (key in listeners) { - if (listeners.hasOwnProperty(key)) { - index = indexOfListener(listeners[key], listener); - - if (index !== -1) { - listeners[key].splice(index, 1); - } - } - } - - return this; - }; - - /** - * Alias of removeListener - */ - proto.off = alias('removeListener'); - - /** - * Adds listeners in bulk using the manipulateListeners method. - * If you pass an object as the second argument you can add to multiple events at once. The object should contain key value pairs of events and listeners or listener arrays. You can also pass it an event name and an array of listeners to be added. - * You can also pass it a regular expression to add the array of listeners to all events that match it. - * Yeah, this function does quite a bit. That's probably a bad thing. - * - * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add to multiple events at once. - * @param {Function[]} [listeners] An optional array of listener functions to add. - * @return {Object} Current instance of EventEmitter for chaining. - */ - proto.addListeners = function addListeners(evt, listeners) { - // Pass through to manipulateListeners - return this.manipulateListeners(false, evt, listeners); - }; - - /** - * Removes listeners in bulk using the manipulateListeners method. - * If you pass an object as the second argument you can remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays. - * You can also pass it an event name and an array of listeners to be removed. - * You can also pass it a regular expression to remove the listeners from all events that match it. - * - * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to remove from multiple events at once. - * @param {Function[]} [listeners] An optional array of listener functions to remove. - * @return {Object} Current instance of EventEmitter for chaining. - */ - proto.removeListeners = function removeListeners(evt, listeners) { - // Pass through to manipulateListeners - return this.manipulateListeners(true, evt, listeners); - }; - - /** - * Edits listeners in bulk. The addListeners and removeListeners methods both use this to do their job. You should really use those instead, this is a little lower level. - * The first argument will determine if the listeners are removed (true) or added (false). - * If you pass an object as the second argument you can add/remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays. - * You can also pass it an event name and an array of listeners to be added/removed. - * You can also pass it a regular expression to manipulate the listeners of all events that match it. - * - * @param {Boolean} remove True if you want to remove listeners, false if you want to add. - * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add/remove from multiple events at once. - * @param {Function[]} [listeners] An optional array of listener functions to add/remove. - * @return {Object} Current instance of EventEmitter for chaining. - */ - proto.manipulateListeners = function manipulateListeners(remove, evt, listeners) { - var i; - var value; - var single = remove ? this.removeListener : this.addListener; - var multiple = remove ? this.removeListeners : this.addListeners; - - // If evt is an object then pass each of its properties to this method - if (typeof evt === 'object' && !(evt instanceof RegExp)) { - for (i in evt) { - if (evt.hasOwnProperty(i) && (value = evt[i])) { - // Pass the single listener straight through to the singular method - if (typeof value === 'function') { - single.call(this, i, value); - } - else { - // Otherwise pass back to the multiple function - multiple.call(this, i, value); - } - } - } - } - else { - // So evt must be a string - // And listeners must be an array of listeners - // Loop over it and pass each one to the multiple method - i = listeners.length; - while (i--) { - single.call(this, evt, listeners[i]); - } - } - - return this; - }; - - /** - * Removes all listeners from a specified event. - * If you do not specify an event then all listeners will be removed. - * That means every event will be emptied. - * You can also pass a regex to remove all events that match it. - * - * @param {String|RegExp} [evt] Optional name of the event to remove all listeners for. Will remove from every event if not passed. - * @return {Object} Current instance of EventEmitter for chaining. - */ - proto.removeEvent = function removeEvent(evt) { - var type = typeof evt; - var events = this._getEvents(); - var key; - - // Remove different things depending on the state of evt - if (type === 'string') { - // Remove all listeners for the specified event - delete events[evt]; - } - else if (evt instanceof RegExp) { - // Remove all events matching the regex. - for (key in events) { - if (events.hasOwnProperty(key) && evt.test(key)) { - delete events[key]; - } - } - } - else { - // Remove all listeners in all events - delete this._events; - } - - return this; - }; - - /** - * Alias of removeEvent. - * - * Added to mirror the node API. - */ - proto.removeAllListeners = alias('removeEvent'); - - /** - * Emits an event of your choice. - * When emitted, every listener attached to that event will be executed. - * If you pass the optional argument array then those arguments will be passed to every listener upon execution. - * Because it uses `apply`, your array of arguments will be passed as if you wrote them out separately. - * So they will not arrive within the array on the other side, they will be separate. - * You can also pass a regular expression to emit to all events that match it. - * - * @param {String|RegExp} evt Name of the event to emit and execute listeners for. - * @param {Array} [args] Optional array of arguments to be passed to each listener. - * @return {Object} Current instance of EventEmitter for chaining. - */ - proto.emitEvent = function emitEvent(evt, args) { - var listeners = this.getListenersAsObject(evt); - var listener; - var i; - var key; - var response; - - for (key in listeners) { - if (listeners.hasOwnProperty(key)) { - i = listeners[key].length; - - while (i--) { - // If the listener returns true then it shall be removed from the event - // The function is executed either with a basic call or an apply if there is an args array - listener = listeners[key][i]; - - if (listener.once === true) { - this.removeListener(evt, listener.listener); - } - - response = listener.listener.apply(this, args || []); - - if (response === this._getOnceReturnValue()) { - this.removeListener(evt, listener.listener); - } - } - } - } - - return this; - }; - - /** - * Alias of emitEvent - */ - proto.trigger = alias('emitEvent'); - - /** - * Subtly different from emitEvent in that it will pass its arguments on to the listeners, as opposed to taking a single array of arguments to pass on. - * As with emitEvent, you can pass a regex in place of the event name to emit to all events that match it. - * - * @param {String|RegExp} evt Name of the event to emit and execute listeners for. - * @param {...*} Optional additional arguments to be passed to each listener. - * @return {Object} Current instance of EventEmitter for chaining. - */ - proto.emit = function emit(evt) { - var args = Array.prototype.slice.call(arguments, 1); - return this.emitEvent(evt, args); - }; - - /** - * Sets the current value to check against when executing listeners. If a - * listeners return value matches the one set here then it will be removed - * after execution. This value defaults to true. - * - * @param {*} value The new value to check for when executing listeners. - * @return {Object} Current instance of EventEmitter for chaining. - */ - proto.setOnceReturnValue = function setOnceReturnValue(value) { - this._onceReturnValue = value; - return this; - }; - - /** - * Fetches the current value to check against when executing listeners. If - * the listeners return value matches this one then it should be removed - * automatically. It will return true by default. - * - * @return {*|Boolean} The current value to check for or the default, true. - * @api private - */ - proto._getOnceReturnValue = function _getOnceReturnValue() { - if (this.hasOwnProperty('_onceReturnValue')) { - return this._onceReturnValue; - } - else { - return true; - } - }; - - /** - * Fetches the events object and creates one if required. - * - * @return {Object} The events storage object. - * @api private - */ - proto._getEvents = function _getEvents() { - return this._events || (this._events = {}); - }; - - /** - * Reverts the global {@link EventEmitter} to its previous value and returns a reference to this version. - * - * @return {Function} Non conflicting EventEmitter class. - */ - EventEmitter.noConflict = function noConflict() { - exports.EventEmitter = originalGlobalValue; - return EventEmitter; - }; - - // Expose the class either via AMD, CommonJS or the global object - if (typeof define === 'function' && define.amd) { - define('eventEmitter/EventEmitter',[],function () { - return EventEmitter; - }); - } - else if (typeof module === 'object' && module.exports){ - module.exports = EventEmitter; - } - else { - exports.EventEmitter = EventEmitter; - } -}.call(this)); - -/*! - * getStyleProperty v1.0.4 - * original by kangax - * http://perfectionkills.com/feature-testing-css-properties/ - * MIT license - */ - -/*jshint browser: true, strict: true, undef: true */ -/*global define: false, exports: false, module: false */ - -( function( window ) { - - - -var prefixes = 'Webkit Moz ms Ms O'.split(' '); -var docElemStyle = document.documentElement.style; - -function getStyleProperty( propName ) { - if ( !propName ) { - return; - } - - // test standard property first - if ( typeof docElemStyle[ propName ] === 'string' ) { - return propName; - } - - // capitalize - propName = propName.charAt(0).toUpperCase() + propName.slice(1); - - // test vendor specific properties - var prefixed; - for ( var i=0, len = prefixes.length; i < len; i++ ) { - prefixed = prefixes[i] + propName; - if ( typeof docElemStyle[ prefixed ] === 'string' ) { - return prefixed; - } - } -} - -// transport -if ( typeof define === 'function' && define.amd ) { - // AMD - define( 'get-style-property/get-style-property',[],function() { - return getStyleProperty; - }); -} else if ( typeof exports === 'object' ) { - // CommonJS for Component - module.exports = getStyleProperty; -} else { - // browser global - window.getStyleProperty = getStyleProperty; -} - -})( window ); - -/*! - * getSize v1.2.2 - * measure size of elements - * MIT license - */ - -/*jshint browser: true, strict: true, undef: true, unused: true */ -/*global define: false, exports: false, require: false, module: false, console: false */ - -( function( window, undefined ) { - - - -// -------------------------- helpers -------------------------- // - -// get a number from a string, not a percentage -function getStyleSize( value ) { - var num = parseFloat( value ); - // not a percent like '100%', and a number - var isValid = value.indexOf('%') === -1 && !isNaN( num ); - return isValid && num; -} - -function noop() {} - -var logError = typeof console === 'undefined' ? noop : - function( message ) { - console.error( message ); - }; - -// -------------------------- measurements -------------------------- // - -var measurements = [ - 'paddingLeft', - 'paddingRight', - 'paddingTop', - 'paddingBottom', - 'marginLeft', - 'marginRight', - 'marginTop', - 'marginBottom', - 'borderLeftWidth', - 'borderRightWidth', - 'borderTopWidth', - 'borderBottomWidth' -]; - -function getZeroSize() { - var size = { - width: 0, - height: 0, - innerWidth: 0, - innerHeight: 0, - outerWidth: 0, - outerHeight: 0 - }; - for ( var i=0, len = measurements.length; i < len; i++ ) { - var measurement = measurements[i]; - size[ measurement ] = 0; - } - return size; -} - - - -function defineGetSize( getStyleProperty ) { - -// -------------------------- setup -------------------------- // - -var isSetup = false; - -var getStyle, boxSizingProp, isBoxSizeOuter; - -/** - * setup vars and functions - * do it on initial getSize(), rather than on script load - * For Firefox bug https://bugzilla.mozilla.org/show_bug.cgi?id=548397 - */ -function setup() { - // setup once - if ( isSetup ) { - return; - } - isSetup = true; - - var getComputedStyle = window.getComputedStyle; - getStyle = ( function() { - var getStyleFn = getComputedStyle ? - function( elem ) { - return getComputedStyle( elem, null ); - } : - function( elem ) { - return elem.currentStyle; - }; - - return function getStyle( elem ) { - var style = getStyleFn( elem ); - if ( !style ) { - logError( 'Style returned ' + style + - '. Are you running this code in a hidden iframe on Firefox? ' + - 'See http://bit.ly/getsizebug1' ); - } - return style; - }; - })(); - - // -------------------------- box sizing -------------------------- // - - boxSizingProp = getStyleProperty('boxSizing'); - - /** - * WebKit measures the outer-width on style.width on border-box elems - * IE & Firefox measures the inner-width - */ - if ( boxSizingProp ) { - var div = document.createElement('div'); - div.style.width = '200px'; - div.style.padding = '1px 2px 3px 4px'; - div.style.borderStyle = 'solid'; - div.style.borderWidth = '1px 2px 3px 4px'; - div.style[ boxSizingProp ] = 'border-box'; - - var body = document.body || document.documentElement; - body.appendChild( div ); - var style = getStyle( div ); - - isBoxSizeOuter = getStyleSize( style.width ) === 200; - body.removeChild( div ); - } - -} - -// -------------------------- getSize -------------------------- // - -function getSize( elem ) { - setup(); - - // use querySeletor if elem is string - if ( typeof elem === 'string' ) { - elem = document.querySelector( elem ); - } - - // do not proceed on non-objects - if ( !elem || typeof elem !== 'object' || !elem.nodeType ) { - return; - } - - var style = getStyle( elem ); - - // if hidden, everything is 0 - if ( style.display === 'none' ) { - return getZeroSize(); - } - - var size = {}; - size.width = elem.offsetWidth; - size.height = elem.offsetHeight; - - var isBorderBox = size.isBorderBox = !!( boxSizingProp && - style[ boxSizingProp ] && style[ boxSizingProp ] === 'border-box' ); - - // get all measurements - for ( var i=0, len = measurements.length; i < len; i++ ) { - var measurement = measurements[i]; - var value = style[ measurement ]; - value = mungeNonPixel( elem, value ); - var num = parseFloat( value ); - // any 'auto', 'medium' value will be 0 - size[ measurement ] = !isNaN( num ) ? num : 0; - } - - var paddingWidth = size.paddingLeft + size.paddingRight; - var paddingHeight = size.paddingTop + size.paddingBottom; - var marginWidth = size.marginLeft + size.marginRight; - var marginHeight = size.marginTop + size.marginBottom; - var borderWidth = size.borderLeftWidth + size.borderRightWidth; - var borderHeight = size.borderTopWidth + size.borderBottomWidth; - - var isBorderBoxSizeOuter = isBorderBox && isBoxSizeOuter; - - // overwrite width and height if we can get it from style - var styleWidth = getStyleSize( style.width ); - if ( styleWidth !== false ) { - size.width = styleWidth + - // add padding and border unless it's already including it - ( isBorderBoxSizeOuter ? 0 : paddingWidth + borderWidth ); - } - - var styleHeight = getStyleSize( style.height ); - if ( styleHeight !== false ) { - size.height = styleHeight + - // add padding and border unless it's already including it - ( isBorderBoxSizeOuter ? 0 : paddingHeight + borderHeight ); - } - - size.innerWidth = size.width - ( paddingWidth + borderWidth ); - size.innerHeight = size.height - ( paddingHeight + borderHeight ); - - size.outerWidth = size.width + marginWidth; - size.outerHeight = size.height + marginHeight; - - return size; -} - -// IE8 returns percent values, not pixels -// taken from jQuery's curCSS -function mungeNonPixel( elem, value ) { - // IE8 and has percent value - if ( window.getComputedStyle || value.indexOf('%') === -1 ) { - return value; - } - var style = elem.style; - // Remember the original values - var left = style.left; - var rs = elem.runtimeStyle; - var rsLeft = rs && rs.left; - - // Put in the new values to get a computed value out - if ( rsLeft ) { - rs.left = elem.currentStyle.left; - } - style.left = value; - value = style.pixelLeft; - - // Revert the changed values - style.left = left; - if ( rsLeft ) { - rs.left = rsLeft; - } - - return value; -} - -return getSize; - -} - -// transport -if ( typeof define === 'function' && define.amd ) { - // AMD for RequireJS - define( 'get-size/get-size',[ 'get-style-property/get-style-property' ], defineGetSize ); -} else if ( typeof exports === 'object' ) { - // CommonJS for Component - module.exports = defineGetSize( require('desandro-get-style-property') ); -} else { - // browser global - window.getSize = defineGetSize( window.getStyleProperty ); -} - -})( window ); - -/*! - * docReady v1.0.4 - * Cross browser DOMContentLoaded event emitter - * MIT license - */ - -/*jshint browser: true, strict: true, undef: true, unused: true*/ -/*global define: false, require: false, module: false */ - -( function( window ) { - - - -var document = window.document; -// collection of functions to be triggered on ready -var queue = []; - -function docReady( fn ) { - // throw out non-functions - if ( typeof fn !== 'function' ) { - return; - } - - if ( docReady.isReady ) { - // ready now, hit it - fn(); - } else { - // queue function when ready - queue.push( fn ); - } -} - -docReady.isReady = false; - -// triggered on various doc ready events -function onReady( event ) { - // bail if already triggered or IE8 document is not ready just yet - var isIE8NotReady = event.type === 'readystatechange' && document.readyState !== 'complete'; - if ( docReady.isReady || isIE8NotReady ) { - return; - } - - trigger(); -} - -function trigger() { - docReady.isReady = true; - // process queue - for ( var i=0, len = queue.length; i < len; i++ ) { - var fn = queue[i]; - fn(); - } -} - -function defineDocReady( eventie ) { - // trigger ready if page is ready - if ( document.readyState === 'complete' ) { - trigger(); - } else { - // listen for events - eventie.bind( document, 'DOMContentLoaded', onReady ); - eventie.bind( document, 'readystatechange', onReady ); - eventie.bind( window, 'load', onReady ); - } - - return docReady; -} - -// transport -if ( typeof define === 'function' && define.amd ) { - // AMD - define( 'doc-ready/doc-ready',[ 'eventie/eventie' ], defineDocReady ); -} else if ( typeof exports === 'object' ) { - module.exports = defineDocReady( require('eventie') ); -} else { - // browser global - window.docReady = defineDocReady( window.eventie ); -} - -})( window ); - -/** - * matchesSelector v1.0.3 - * matchesSelector( element, '.selector' ) - * MIT license - */ - -/*jshint browser: true, strict: true, undef: true, unused: true */ -/*global define: false, module: false */ - -( function( ElemProto ) { - - - - var matchesMethod = ( function() { - // check for the standard method name first - if ( ElemProto.matches ) { - return 'matches'; - } - // check un-prefixed - if ( ElemProto.matchesSelector ) { - return 'matchesSelector'; - } - // check vendor prefixes - var prefixes = [ 'webkit', 'moz', 'ms', 'o' ]; - - for ( var i=0, len = prefixes.length; i < len; i++ ) { - var prefix = prefixes[i]; - var method = prefix + 'MatchesSelector'; - if ( ElemProto[ method ] ) { - return method; - } - } - })(); - - // ----- match ----- // - - function match( elem, selector ) { - return elem[ matchesMethod ]( selector ); - } - - // ----- appendToFragment ----- // - - function checkParent( elem ) { - // not needed if already has parent - if ( elem.parentNode ) { - return; - } - var fragment = document.createDocumentFragment(); - fragment.appendChild( elem ); - } - - // ----- query ----- // - - // fall back to using QSA - // thx @jonathantneal https://gist.github.com/3062955 - function query( elem, selector ) { - // append to fragment if no parent - checkParent( elem ); - - // match elem with all selected elems of parent - var elems = elem.parentNode.querySelectorAll( selector ); - for ( var i=0, len = elems.length; i < len; i++ ) { - // return true if match - if ( elems[i] === elem ) { - return true; - } - } - // otherwise return false - return false; - } - - // ----- matchChild ----- // - - function matchChild( elem, selector ) { - checkParent( elem ); - return match( elem, selector ); - } - - // ----- matchesSelector ----- // - - var matchesSelector; - - if ( matchesMethod ) { - // IE9 supports matchesSelector, but doesn't work on orphaned elems - // check for that - var div = document.createElement('div'); - var supportsOrphans = match( div, 'div' ); - matchesSelector = supportsOrphans ? match : matchChild; - } else { - matchesSelector = query; - } - - // transport - if ( typeof define === 'function' && define.amd ) { - // AMD - define( 'matches-selector/matches-selector',[],function() { - return matchesSelector; - }); - } else if ( typeof exports === 'object' ) { - module.exports = matchesSelector; - } - else { - // browser global - window.matchesSelector = matchesSelector; - } - -})( Element.prototype ); - -/** - * Fizzy UI utils v1.0.1 - * MIT license - */ - -/*jshint browser: true, undef: true, unused: true, strict: true */ - -( function( window, factory ) { - /*global define: false, module: false, require: false */ - - // universal module definition - - if ( typeof define == 'function' && define.amd ) { - // AMD - define( 'fizzy-ui-utils/utils',[ - 'doc-ready/doc-ready', - 'matches-selector/matches-selector' - ], function( docReady, matchesSelector ) { - return factory( window, docReady, matchesSelector ); - }); - } else if ( typeof exports == 'object' ) { - // CommonJS - module.exports = factory( - window, - require('doc-ready'), - require('desandro-matches-selector') - ); - } else { - // browser global - window.fizzyUIUtils = factory( - window, - window.docReady, - window.matchesSelector - ); - } - -}( window, function factory( window, docReady, matchesSelector ) { - - - -var utils = {}; - -// ----- extend ----- // - -// extends objects -utils.extend = function( a, b ) { - for ( var prop in b ) { - a[ prop ] = b[ prop ]; - } - return a; -}; - -// ----- modulo ----- // - -utils.modulo = function( num, div ) { - return ( ( num % div ) + div ) % div; -}; - -// ----- isArray ----- // - -var objToString = Object.prototype.toString; -utils.isArray = function( obj ) { - return objToString.call( obj ) == '[object Array]'; -}; - -// ----- makeArray ----- // - -// turn element or nodeList into an array -utils.makeArray = function( obj ) { - var ary = []; - if ( utils.isArray( obj ) ) { - // use object if already an array - ary = obj; - } else if ( obj && typeof obj.length == 'number' ) { - // convert nodeList to array - for ( var i=0, len = obj.length; i < len; i++ ) { - ary.push( obj[i] ); - } - } else { - // array of single index - ary.push( obj ); - } - return ary; -}; - -// ----- indexOf ----- // - -// index of helper cause IE8 -utils.indexOf = Array.prototype.indexOf ? function( ary, obj ) { - return ary.indexOf( obj ); - } : function( ary, obj ) { - for ( var i=0, len = ary.length; i < len; i++ ) { - if ( ary[i] === obj ) { - return i; - } - } - return -1; - }; - -// ----- removeFrom ----- // - -utils.removeFrom = function( ary, obj ) { - var index = utils.indexOf( ary, obj ); - if ( index != -1 ) { - ary.splice( index, 1 ); - } -}; - -// ----- isElement ----- // - -// http://stackoverflow.com/a/384380/182183 -utils.isElement = ( typeof HTMLElement == 'function' || typeof HTMLElement == 'object' ) ? - function isElementDOM2( obj ) { - return obj instanceof HTMLElement; - } : - function isElementQuirky( obj ) { - return obj && typeof obj == 'object' && - obj.nodeType == 1 && typeof obj.nodeName == 'string'; - }; - -// ----- setText ----- // - -utils.setText = ( function() { - var setTextProperty; - function setText( elem, text ) { - // only check setTextProperty once - setTextProperty = setTextProperty || ( document.documentElement.textContent !== undefined ? 'textContent' : 'innerText' ); - elem[ setTextProperty ] = text; - } - return setText; -})(); - -// ----- getParent ----- // - -utils.getParent = function( elem, selector ) { - while ( elem != document.body ) { - elem = elem.parentNode; - if ( matchesSelector( elem, selector ) ) { - return elem; - } - } -}; - -// ----- getQueryElement ----- // - -// use element as selector string -utils.getQueryElement = function( elem ) { - if ( typeof elem == 'string' ) { - return document.querySelector( elem ); - } - return elem; -}; - -// ----- handleEvent ----- // - -// enable .ontype to trigger from .addEventListener( elem, 'type' ) -utils.handleEvent = function( event ) { - var method = 'on' + event.type; - if ( this[ method ] ) { - this[ method ]( event ); - } -}; - -// ----- filterFindElements ----- // - -utils.filterFindElements = function( elems, selector ) { - // make array of elems - elems = utils.makeArray( elems ); - var ffElems = []; - - for ( var i=0, len = elems.length; i < len; i++ ) { - var elem = elems[i]; - // check that elem is an actual element - if ( !utils.isElement( elem ) ) { - continue; - } - // filter & find items if we have a selector - if ( selector ) { - // filter siblings - if ( matchesSelector( elem, selector ) ) { - ffElems.push( elem ); - } - // find children - var childElems = elem.querySelectorAll( selector ); - // concat childElems to filterFound array - for ( var j=0, jLen = childElems.length; j < jLen; j++ ) { - ffElems.push( childElems[j] ); - } - } else { - ffElems.push( elem ); - } - } - - return ffElems; -}; - -// ----- debounceMethod ----- // - -utils.debounceMethod = function( _class, methodName, threshold ) { - // original method - var method = _class.prototype[ methodName ]; - var timeoutName = methodName + 'Timeout'; - - _class.prototype[ methodName ] = function() { - var timeout = this[ timeoutName ]; - if ( timeout ) { - clearTimeout( timeout ); - } - var args = arguments; - - var _this = this; - this[ timeoutName ] = setTimeout( function() { - method.apply( _this, args ); - delete _this[ timeoutName ]; - }, threshold || 100 ); - }; -}; - -// ----- htmlInit ----- // - -// http://jamesroberts.name/blog/2010/02/22/string-functions-for-javascript-trim-to-camel-case-to-dashed-and-to-underscore/ -utils.toDashed = function( str ) { - return str.replace( /(.)([A-Z])/g, function( match, $1, $2 ) { - return $1 + '-' + $2; - }).toLowerCase(); -}; - -var console = window.console; -/** - * allow user to initialize classes via .js-namespace class - * htmlInit( Widget, 'widgetName' ) - * options are parsed from data-namespace-option attribute - */ -utils.htmlInit = function( WidgetClass, namespace ) { - docReady( function() { - var dashedNamespace = utils.toDashed( namespace ); - var elems = document.querySelectorAll( '.js-' + dashedNamespace ); - var dataAttr = 'data-' + dashedNamespace + '-options'; - - for ( var i=0, len = elems.length; i < len; i++ ) { - var elem = elems[i]; - var attr = elem.getAttribute( dataAttr ); - var options; - try { - options = attr && JSON.parse( attr ); - } catch ( error ) { - // log error, do not initialize - if ( console ) { - console.error( 'Error parsing ' + dataAttr + ' on ' + - elem.nodeName.toLowerCase() + ( elem.id ? '#' + elem.id : '' ) + ': ' + - error ); - } - continue; - } - // initialize - var instance = new WidgetClass( elem, options ); - // make available via $().data('layoutname') - var jQuery = window.jQuery; - if ( jQuery ) { - jQuery.data( elem, namespace, instance ); - } - } - }); -}; - -// ----- ----- // - -return utils; - -})); - -/** - * Outlayer Item - */ - -( function( window, factory ) { - - // universal module definition - if ( typeof define === 'function' && define.amd ) { - // AMD - define( 'outlayer/item',[ - 'eventEmitter/EventEmitter', - 'get-size/get-size', - 'get-style-property/get-style-property', - 'fizzy-ui-utils/utils' - ], - function( EventEmitter, getSize, getStyleProperty, utils ) { - return factory( window, EventEmitter, getSize, getStyleProperty, utils ); - } - ); - } else if (typeof exports === 'object') { - // CommonJS - module.exports = factory( - window, - require('wolfy87-eventemitter'), - require('get-size'), - require('desandro-get-style-property'), - require('fizzy-ui-utils') - ); - } else { - // browser global - window.Outlayer = {}; - window.Outlayer.Item = factory( - window, - window.EventEmitter, - window.getSize, - window.getStyleProperty, - window.fizzyUIUtils - ); - } - -}( window, function factory( window, EventEmitter, getSize, getStyleProperty, utils ) { - - -// ----- helpers ----- // - -var getComputedStyle = window.getComputedStyle; -var getStyle = getComputedStyle ? - function( elem ) { - return getComputedStyle( elem, null ); - } : - function( elem ) { - return elem.currentStyle; - }; - - -function isEmptyObj( obj ) { - for ( var prop in obj ) { - return false; - } - prop = null; - return true; -} - -// -------------------------- CSS3 support -------------------------- // - -var transitionProperty = getStyleProperty('transition'); -var transformProperty = getStyleProperty('transform'); -var supportsCSS3 = transitionProperty && transformProperty; -var is3d = !!getStyleProperty('perspective'); - -var transitionEndEvent = { - WebkitTransition: 'webkitTransitionEnd', - MozTransition: 'transitionend', - OTransition: 'otransitionend', - transition: 'transitionend' -}[ transitionProperty ]; - -// properties that could have vendor prefix -var prefixableProperties = [ - 'transform', - 'transition', - 'transitionDuration', - 'transitionProperty' -]; - -// cache all vendor properties -var vendorProperties = ( function() { - var cache = {}; - for ( var i=0, len = prefixableProperties.length; i < len; i++ ) { - var prop = prefixableProperties[i]; - var supportedProp = getStyleProperty( prop ); - if ( supportedProp && supportedProp !== prop ) { - cache[ prop ] = supportedProp; - } - } - return cache; -})(); - -// -------------------------- Item -------------------------- // - -function Item( element, layout ) { - if ( !element ) { - return; - } - - this.element = element; - // parent layout class, i.e. Masonry, Isotope, or Packery - this.layout = layout; - this.position = { - x: 0, - y: 0 - }; - - this._create(); -} - -// inherit EventEmitter -utils.extend( Item.prototype, EventEmitter.prototype ); - -Item.prototype._create = function() { - // transition objects - this._transn = { - ingProperties: {}, - clean: {}, - onEnd: {} - }; - - this.css({ - position: 'absolute' - }); -}; - -// trigger specified handler for event type -Item.prototype.handleEvent = function( event ) { - var method = 'on' + event.type; - if ( this[ method ] ) { - this[ method ]( event ); - } -}; - -Item.prototype.getSize = function() { - this.size = getSize( this.element ); -}; - -/** - * apply CSS styles to element - * @param {Object} style - */ -Item.prototype.css = function( style ) { - var elemStyle = this.element.style; - - for ( var prop in style ) { - // use vendor property if available - var supportedProp = vendorProperties[ prop ] || prop; - elemStyle[ supportedProp ] = style[ prop ]; - } -}; - - // measure position, and sets it -Item.prototype.getPosition = function() { - var style = getStyle( this.element ); - var layoutOptions = this.layout.options; - var isOriginLeft = layoutOptions.isOriginLeft; - var isOriginTop = layoutOptions.isOriginTop; - var xValue = style[ isOriginLeft ? 'left' : 'right' ]; - var yValue = style[ isOriginTop ? 'top' : 'bottom' ]; - // convert percent to pixels - var layoutSize = this.layout.size; - var x = xValue.indexOf('%') != -1 ? - ( parseFloat( xValue ) / 100 ) * layoutSize.width : parseInt( xValue, 10 ); - var y = yValue.indexOf('%') != -1 ? - ( parseFloat( yValue ) / 100 ) * layoutSize.height : parseInt( yValue, 10 ); - - // clean up 'auto' or other non-integer values - x = isNaN( x ) ? 0 : x; - y = isNaN( y ) ? 0 : y; - // remove padding from measurement - x -= isOriginLeft ? layoutSize.paddingLeft : layoutSize.paddingRight; - y -= isOriginTop ? layoutSize.paddingTop : layoutSize.paddingBottom; - - this.position.x = x; - this.position.y = y; -}; - -// set settled position, apply padding -Item.prototype.layoutPosition = function() { - var layoutSize = this.layout.size; - var layoutOptions = this.layout.options; - var style = {}; - - // x - var xPadding = layoutOptions.isOriginLeft ? 'paddingLeft' : 'paddingRight'; - var xProperty = layoutOptions.isOriginLeft ? 'left' : 'right'; - var xResetProperty = layoutOptions.isOriginLeft ? 'right' : 'left'; - - var x = this.position.x + layoutSize[ xPadding ]; - // set in percentage or pixels - style[ xProperty ] = this.getXValue( x ); - // reset other property - style[ xResetProperty ] = ''; - - // y - var yPadding = layoutOptions.isOriginTop ? 'paddingTop' : 'paddingBottom'; - var yProperty = layoutOptions.isOriginTop ? 'top' : 'bottom'; - var yResetProperty = layoutOptions.isOriginTop ? 'bottom' : 'top'; - - var y = this.position.y + layoutSize[ yPadding ]; - // set in percentage or pixels - style[ yProperty ] = this.getYValue( y ); - // reset other property - style[ yResetProperty ] = ''; - - this.css( style ); - this.emitEvent( 'layout', [ this ] ); -}; - -Item.prototype.getXValue = function( x ) { - var layoutOptions = this.layout.options; - return layoutOptions.percentPosition && !layoutOptions.isHorizontal ? - ( ( x / this.layout.size.width ) * 100 ) + '%' : x + 'px'; -}; - -Item.prototype.getYValue = function( y ) { - var layoutOptions = this.layout.options; - return layoutOptions.percentPosition && layoutOptions.isHorizontal ? - ( ( y / this.layout.size.height ) * 100 ) + '%' : y + 'px'; -}; - - -Item.prototype._transitionTo = function( x, y ) { - this.getPosition(); - // get current x & y from top/left - var curX = this.position.x; - var curY = this.position.y; - - var compareX = parseInt( x, 10 ); - var compareY = parseInt( y, 10 ); - var didNotMove = compareX === this.position.x && compareY === this.position.y; - - // save end position - this.setPosition( x, y ); - - // if did not move and not transitioning, just go to layout - if ( didNotMove && !this.isTransitioning ) { - this.layoutPosition(); - return; - } - - var transX = x - curX; - var transY = y - curY; - var transitionStyle = {}; - transitionStyle.transform = this.getTranslate( transX, transY ); - - this.transition({ - to: transitionStyle, - onTransitionEnd: { - transform: this.layoutPosition - }, - isCleaning: true - }); -}; - -Item.prototype.getTranslate = function( x, y ) { - // flip cooridinates if origin on right or bottom - var layoutOptions = this.layout.options; - x = layoutOptions.isOriginLeft ? x : -x; - y = layoutOptions.isOriginTop ? y : -y; - - if ( is3d ) { - return 'translate3d(' + x + 'px, ' + y + 'px, 0)'; - } - - return 'translate(' + x + 'px, ' + y + 'px)'; -}; - -// non transition + transform support -Item.prototype.goTo = function( x, y ) { - this.setPosition( x, y ); - this.layoutPosition(); -}; - -// use transition and transforms if supported -Item.prototype.moveTo = supportsCSS3 ? - Item.prototype._transitionTo : Item.prototype.goTo; - -Item.prototype.setPosition = function( x, y ) { - this.position.x = parseInt( x, 10 ); - this.position.y = parseInt( y, 10 ); -}; - -// ----- transition ----- // - -/** - * @param {Object} style - CSS - * @param {Function} onTransitionEnd - */ - -// non transition, just trigger callback -Item.prototype._nonTransition = function( args ) { - this.css( args.to ); - if ( args.isCleaning ) { - this._removeStyles( args.to ); - } - for ( var prop in args.onTransitionEnd ) { - args.onTransitionEnd[ prop ].call( this ); - } -}; - -/** - * proper transition - * @param {Object} args - arguments - * @param {Object} to - style to transition to - * @param {Object} from - style to start transition from - * @param {Boolean} isCleaning - removes transition styles after transition - * @param {Function} onTransitionEnd - callback - */ -Item.prototype._transition = function( args ) { - // redirect to nonTransition if no transition duration - if ( !parseFloat( this.layout.options.transitionDuration ) ) { - this._nonTransition( args ); - return; - } - - var _transition = this._transn; - // keep track of onTransitionEnd callback by css property - for ( var prop in args.onTransitionEnd ) { - _transition.onEnd[ prop ] = args.onTransitionEnd[ prop ]; - } - // keep track of properties that are transitioning - for ( prop in args.to ) { - _transition.ingProperties[ prop ] = true; - // keep track of properties to clean up when transition is done - if ( args.isCleaning ) { - _transition.clean[ prop ] = true; - } - } - - // set from styles - if ( args.from ) { - this.css( args.from ); - // force redraw. http://blog.alexmaccaw.com/css-transitions - var h = this.element.offsetHeight; - // hack for JSHint to hush about unused var - h = null; - } - // enable transition - this.enableTransition( args.to ); - // set styles that are transitioning - this.css( args.to ); - - this.isTransitioning = true; - -}; - -// dash before all cap letters, including first for -// WebkitTransform => -webkit-transform -function toDashedAll( str ) { - return str.replace( /([A-Z])/g, function( $1 ) { - return '-' + $1.toLowerCase(); - }); -} - -var transitionProps = 'opacity,' + - toDashedAll( vendorProperties.transform || 'transform' ); - -Item.prototype.enableTransition = function(/* style */) { - // HACK changing transitionProperty during a transition - // will cause transition to jump - if ( this.isTransitioning ) { - return; - } - - // make `transition: foo, bar, baz` from style object - // HACK un-comment this when enableTransition can work - // while a transition is happening - // var transitionValues = []; - // for ( var prop in style ) { - // // dash-ify camelCased properties like WebkitTransition - // prop = vendorProperties[ prop ] || prop; - // transitionValues.push( toDashedAll( prop ) ); - // } - // enable transition styles - this.css({ - transitionProperty: transitionProps, - transitionDuration: this.layout.options.transitionDuration - }); - // listen for transition end event - this.element.addEventListener( transitionEndEvent, this, false ); -}; - -Item.prototype.transition = Item.prototype[ transitionProperty ? '_transition' : '_nonTransition' ]; - -// ----- events ----- // - -Item.prototype.onwebkitTransitionEnd = function( event ) { - this.ontransitionend( event ); -}; - -Item.prototype.onotransitionend = function( event ) { - this.ontransitionend( event ); -}; - -// properties that I munge to make my life easier -var dashedVendorProperties = { - '-webkit-transform': 'transform', - '-moz-transform': 'transform', - '-o-transform': 'transform' -}; - -Item.prototype.ontransitionend = function( event ) { - // disregard bubbled events from children - if ( event.target !== this.element ) { - return; - } - var _transition = this._transn; - // get property name of transitioned property, convert to prefix-free - var propertyName = dashedVendorProperties[ event.propertyName ] || event.propertyName; - - // remove property that has completed transitioning - delete _transition.ingProperties[ propertyName ]; - // check if any properties are still transitioning - if ( isEmptyObj( _transition.ingProperties ) ) { - // all properties have completed transitioning - this.disableTransition(); - } - // clean style - if ( propertyName in _transition.clean ) { - // clean up style - this.element.style[ event.propertyName ] = ''; - delete _transition.clean[ propertyName ]; - } - // trigger onTransitionEnd callback - if ( propertyName in _transition.onEnd ) { - var onTransitionEnd = _transition.onEnd[ propertyName ]; - onTransitionEnd.call( this ); - delete _transition.onEnd[ propertyName ]; - } - - this.emitEvent( 'transitionEnd', [ this ] ); -}; - -Item.prototype.disableTransition = function() { - this.removeTransitionStyles(); - this.element.removeEventListener( transitionEndEvent, this, false ); - this.isTransitioning = false; -}; - -/** - * removes style property from element - * @param {Object} style -**/ -Item.prototype._removeStyles = function( style ) { - // clean up transition styles - var cleanStyle = {}; - for ( var prop in style ) { - cleanStyle[ prop ] = ''; - } - this.css( cleanStyle ); -}; - -var cleanTransitionStyle = { - transitionProperty: '', - transitionDuration: '' -}; - -Item.prototype.removeTransitionStyles = function() { - // remove transition - this.css( cleanTransitionStyle ); -}; - -// ----- show/hide/remove ----- // - -// remove element from DOM -Item.prototype.removeElem = function() { - this.element.parentNode.removeChild( this.element ); - // remove display: none - this.css({ display: '' }); - this.emitEvent( 'remove', [ this ] ); -}; - -Item.prototype.remove = function() { - // just remove element if no transition support or no transition - if ( !transitionProperty || !parseFloat( this.layout.options.transitionDuration ) ) { - this.removeElem(); - return; - } - - // start transition - var _this = this; - this.once( 'transitionEnd', function() { - _this.removeElem(); - }); - this.hide(); -}; - -Item.prototype.reveal = function() { - delete this.isHidden; - // remove display: none - this.css({ display: '' }); - - var options = this.layout.options; - - var onTransitionEnd = {}; - var transitionEndProperty = this.getHideRevealTransitionEndProperty('visibleStyle'); - onTransitionEnd[ transitionEndProperty ] = this.onRevealTransitionEnd; - - this.transition({ - from: options.hiddenStyle, - to: options.visibleStyle, - isCleaning: true, - onTransitionEnd: onTransitionEnd - }); -}; - -Item.prototype.onRevealTransitionEnd = function() { - // check if still visible - // during transition, item may have been hidden - if ( !this.isHidden ) { - this.emitEvent('reveal'); - } -}; - -/** - * get style property use for hide/reveal transition end - * @param {String} styleProperty - hiddenStyle/visibleStyle - * @returns {String} - */ -Item.prototype.getHideRevealTransitionEndProperty = function( styleProperty ) { - var optionStyle = this.layout.options[ styleProperty ]; - // use opacity - if ( optionStyle.opacity ) { - return 'opacity'; - } - // get first property - for ( var prop in optionStyle ) { - return prop; - } -}; - -Item.prototype.hide = function() { - // set flag - this.isHidden = true; - // remove display: none - this.css({ display: '' }); - - var options = this.layout.options; - - var onTransitionEnd = {}; - var transitionEndProperty = this.getHideRevealTransitionEndProperty('hiddenStyle'); - onTransitionEnd[ transitionEndProperty ] = this.onHideTransitionEnd; - - this.transition({ - from: options.visibleStyle, - to: options.hiddenStyle, - // keep hidden stuff hidden - isCleaning: true, - onTransitionEnd: onTransitionEnd - }); -}; - -Item.prototype.onHideTransitionEnd = function() { - // check if still hidden - // during transition, item may have been un-hidden - if ( this.isHidden ) { - this.css({ display: 'none' }); - this.emitEvent('hide'); - } -}; - -Item.prototype.destroy = function() { - this.css({ - position: '', - left: '', - right: '', - top: '', - bottom: '', - transition: '', - transform: '' - }); -}; - -return Item; - -})); - -/*! - * Outlayer v1.4.2 - * the brains and guts of a layout library - * MIT license - */ - -( function( window, factory ) { - - // universal module definition - - if ( typeof define == 'function' && define.amd ) { - // AMD - define( 'outlayer/outlayer',[ - 'eventie/eventie', - 'eventEmitter/EventEmitter', - 'get-size/get-size', - 'fizzy-ui-utils/utils', - './item' - ], - function( eventie, EventEmitter, getSize, utils, Item ) { - return factory( window, eventie, EventEmitter, getSize, utils, Item); - } - ); - } else if ( typeof exports == 'object' ) { - // CommonJS - module.exports = factory( - window, - require('eventie'), - require('wolfy87-eventemitter'), - require('get-size'), - require('fizzy-ui-utils'), - require('./item') - ); - } else { - // browser global - window.Outlayer = factory( - window, - window.eventie, - window.EventEmitter, - window.getSize, - window.fizzyUIUtils, - window.Outlayer.Item - ); - } - -}( window, function factory( window, eventie, EventEmitter, getSize, utils, Item ) { - - -// ----- vars ----- // - -var console = window.console; -var jQuery = window.jQuery; -var noop = function() {}; - -// -------------------------- Outlayer -------------------------- // - -// globally unique identifiers -var GUID = 0; -// internal store of all Outlayer intances -var instances = {}; - - -/** - * @param {Element, String} element - * @param {Object} options - * @constructor - */ -function Outlayer( element, options ) { - var queryElement = utils.getQueryElement( element ); - if ( !queryElement ) { - if ( console ) { - console.error( 'Bad element for ' + this.constructor.namespace + - ': ' + ( queryElement || element ) ); - } - return; - } - this.element = queryElement; - // add jQuery - if ( jQuery ) { - this.$element = jQuery( this.element ); - } - - // options - this.options = utils.extend( {}, this.constructor.defaults ); - this.option( options ); - - // add id for Outlayer.getFromElement - var id = ++GUID; - this.element.outlayerGUID = id; // expando - instances[ id ] = this; // associate via id - - // kick it off - this._create(); - - if ( this.options.isInitLayout ) { - this.layout(); - } -} - -// settings are for internal use only -Outlayer.namespace = 'outlayer'; -Outlayer.Item = Item; - -// default options -Outlayer.defaults = { - containerStyle: { - position: 'relative' - }, - isInitLayout: true, - isOriginLeft: true, - isOriginTop: true, - isResizeBound: true, - isResizingContainer: true, - // item options - transitionDuration: '0.4s', - hiddenStyle: { - opacity: 0, - transform: 'scale(0.001)' - }, - visibleStyle: { - opacity: 1, - transform: 'scale(1)' - } -}; - -// inherit EventEmitter -utils.extend( Outlayer.prototype, EventEmitter.prototype ); - -/** - * set options - * @param {Object} opts - */ -Outlayer.prototype.option = function( opts ) { - utils.extend( this.options, opts ); -}; - -Outlayer.prototype._create = function() { - // get items from children - this.reloadItems(); - // elements that affect layout, but are not laid out - this.stamps = []; - this.stamp( this.options.stamp ); - // set container style - utils.extend( this.element.style, this.options.containerStyle ); - - // bind resize method - if ( this.options.isResizeBound ) { - this.bindResize(); - } -}; - -// goes through all children again and gets bricks in proper order -Outlayer.prototype.reloadItems = function() { - // collection of item elements - this.items = this._itemize( this.element.children ); -}; - - -/** - * turn elements into Outlayer.Items to be used in layout - * @param {Array or NodeList or HTMLElement} elems - * @returns {Array} items - collection of new Outlayer Items - */ -Outlayer.prototype._itemize = function( elems ) { - - var itemElems = this._filterFindItemElements( elems ); - var Item = this.constructor.Item; - - // create new Outlayer Items for collection - var items = []; - for ( var i=0, len = itemElems.length; i < len; i++ ) { - var elem = itemElems[i]; - var item = new Item( elem, this ); - items.push( item ); - } - - return items; -}; - -/** - * get item elements to be used in layout - * @param {Array or NodeList or HTMLElement} elems - * @returns {Array} items - item elements - */ -Outlayer.prototype._filterFindItemElements = function( elems ) { - return utils.filterFindElements( elems, this.options.itemSelector ); -}; - -/** - * getter method for getting item elements - * @returns {Array} elems - collection of item elements - */ -Outlayer.prototype.getItemElements = function() { - var elems = []; - for ( var i=0, len = this.items.length; i < len; i++ ) { - elems.push( this.items[i].element ); - } - return elems; -}; - -// ----- init & layout ----- // - -/** - * lays out all items - */ -Outlayer.prototype.layout = function() { - this._resetLayout(); - this._manageStamps(); - - // don't animate first layout - var isInstant = this.options.isLayoutInstant !== undefined ? - this.options.isLayoutInstant : !this._isLayoutInited; - this.layoutItems( this.items, isInstant ); - - // flag for initalized - this._isLayoutInited = true; -}; - -// _init is alias for layout -Outlayer.prototype._init = Outlayer.prototype.layout; - -/** - * logic before any new layout - */ -Outlayer.prototype._resetLayout = function() { - this.getSize(); -}; - - -Outlayer.prototype.getSize = function() { - this.size = getSize( this.element ); -}; - -/** - * get measurement from option, for columnWidth, rowHeight, gutter - * if option is String -> get element from selector string, & get size of element - * if option is Element -> get size of element - * else use option as a number - * - * @param {String} measurement - * @param {String} size - width or height - * @private - */ -Outlayer.prototype._getMeasurement = function( measurement, size ) { - var option = this.options[ measurement ]; - var elem; - if ( !option ) { - // default to 0 - this[ measurement ] = 0; - } else { - // use option as an element - if ( typeof option === 'string' ) { - elem = this.element.querySelector( option ); - } else if ( utils.isElement( option ) ) { - elem = option; - } - // use size of element, if element - this[ measurement ] = elem ? getSize( elem )[ size ] : option; - } -}; - -/** - * layout a collection of item elements - * @api public - */ -Outlayer.prototype.layoutItems = function( items, isInstant ) { - items = this._getItemsForLayout( items ); - - this._layoutItems( items, isInstant ); - - this._postLayout(); -}; - -/** - * get the items to be laid out - * you may want to skip over some items - * @param {Array} items - * @returns {Array} items - */ -Outlayer.prototype._getItemsForLayout = function( items ) { - var layoutItems = []; - for ( var i=0, len = items.length; i < len; i++ ) { - var item = items[i]; - if ( !item.isIgnored ) { - layoutItems.push( item ); - } - } - return layoutItems; -}; - -/** - * layout items - * @param {Array} items - * @param {Boolean} isInstant - */ -Outlayer.prototype._layoutItems = function( items, isInstant ) { - this._emitCompleteOnItems( 'layout', items ); - - if ( !items || !items.length ) { - // no items, emit event with empty array - return; - } - - var queue = []; - - for ( var i=0, len = items.length; i < len; i++ ) { - var item = items[i]; - // get x/y object from method - var position = this._getItemLayoutPosition( item ); - // enqueue - position.item = item; - position.isInstant = isInstant || item.isLayoutInstant; - queue.push( position ); - } - - this._processLayoutQueue( queue ); -}; - -/** - * get item layout position - * @param {Outlayer.Item} item - * @returns {Object} x and y position - */ -Outlayer.prototype._getItemLayoutPosition = function( /* item */ ) { - return { - x: 0, - y: 0 - }; -}; - -/** - * iterate over array and position each item - * Reason being - separating this logic prevents 'layout invalidation' - * thx @paul_irish - * @param {Array} queue - */ -Outlayer.prototype._processLayoutQueue = function( queue ) { - for ( var i=0, len = queue.length; i < len; i++ ) { - var obj = queue[i]; - this._positionItem( obj.item, obj.x, obj.y, obj.isInstant ); - } -}; - -/** - * Sets position of item in DOM - * @param {Outlayer.Item} item - * @param {Number} x - horizontal position - * @param {Number} y - vertical position - * @param {Boolean} isInstant - disables transitions - */ -Outlayer.prototype._positionItem = function( item, x, y, isInstant ) { - if ( isInstant ) { - // if not transition, just set CSS - item.goTo( x, y ); - } else { - item.moveTo( x, y ); - } -}; - -/** - * Any logic you want to do after each layout, - * i.e. size the container - */ -Outlayer.prototype._postLayout = function() { - this.resizeContainer(); -}; - -Outlayer.prototype.resizeContainer = function() { - if ( !this.options.isResizingContainer ) { - return; - } - var size = this._getContainerSize(); - if ( size ) { - this._setContainerMeasure( size.width, true ); - this._setContainerMeasure( size.height, false ); - } -}; - -/** - * Sets width or height of container if returned - * @returns {Object} size - * @param {Number} width - * @param {Number} height - */ -Outlayer.prototype._getContainerSize = noop; - -/** - * @param {Number} measure - size of width or height - * @param {Boolean} isWidth - */ -Outlayer.prototype._setContainerMeasure = function( measure, isWidth ) { - if ( measure === undefined ) { - return; - } - - var elemSize = this.size; - // add padding and border width if border box - if ( elemSize.isBorderBox ) { - measure += isWidth ? elemSize.paddingLeft + elemSize.paddingRight + - elemSize.borderLeftWidth + elemSize.borderRightWidth : - elemSize.paddingBottom + elemSize.paddingTop + - elemSize.borderTopWidth + elemSize.borderBottomWidth; - } - - measure = Math.max( measure, 0 ); - this.element.style[ isWidth ? 'width' : 'height' ] = measure + 'px'; -}; - -/** - * emit eventComplete on a collection of items events - * @param {String} eventName - * @param {Array} items - Outlayer.Items - */ -Outlayer.prototype._emitCompleteOnItems = function( eventName, items ) { - var _this = this; - function onComplete() { - _this.dispatchEvent( eventName + 'Complete', null, [ items ] ); - } - - var count = items.length; - if ( !items || !count ) { - onComplete(); - return; - } - - var doneCount = 0; - function tick() { - doneCount++; - if ( doneCount === count ) { - onComplete(); - } - } - - // bind callback - for ( var i=0, len = items.length; i < len; i++ ) { - var item = items[i]; - item.once( eventName, tick ); - } -}; - -/** - * emits events via eventEmitter and jQuery events - * @param {String} type - name of event - * @param {Event} event - original event - * @param {Array} args - extra arguments - */ -Outlayer.prototype.dispatchEvent = function( type, event, args ) { - // add original event to arguments - var emitArgs = event ? [ event ].concat( args ) : args; - this.emitEvent( type, emitArgs ); - - if ( jQuery ) { - // set this.$element - this.$element = this.$element || jQuery( this.element ); - if ( event ) { - // create jQuery event - var $event = jQuery.Event( event ); - $event.type = type; - this.$element.trigger( $event, args ); - } else { - // just trigger with type if no event available - this.$element.trigger( type, args ); - } - } -}; - -// -------------------------- ignore & stamps -------------------------- // - - -/** - * keep item in collection, but do not lay it out - * ignored items do not get skipped in layout - * @param {Element} elem - */ -Outlayer.prototype.ignore = function( elem ) { - var item = this.getItem( elem ); - if ( item ) { - item.isIgnored = true; - } -}; - -/** - * return item to layout collection - * @param {Element} elem - */ -Outlayer.prototype.unignore = function( elem ) { - var item = this.getItem( elem ); - if ( item ) { - delete item.isIgnored; - } -}; - -/** - * adds elements to stamps - * @param {NodeList, Array, Element, or String} elems - */ -Outlayer.prototype.stamp = function( elems ) { - elems = this._find( elems ); - if ( !elems ) { - return; - } - - this.stamps = this.stamps.concat( elems ); - // ignore - for ( var i=0, len = elems.length; i < len; i++ ) { - var elem = elems[i]; - this.ignore( elem ); - } -}; - -/** - * removes elements to stamps - * @param {NodeList, Array, or Element} elems - */ -Outlayer.prototype.unstamp = function( elems ) { - elems = this._find( elems ); - if ( !elems ){ - return; - } - - for ( var i=0, len = elems.length; i < len; i++ ) { - var elem = elems[i]; - // filter out removed stamp elements - utils.removeFrom( this.stamps, elem ); - this.unignore( elem ); - } - -}; - -/** - * finds child elements - * @param {NodeList, Array, Element, or String} elems - * @returns {Array} elems - */ -Outlayer.prototype._find = function( elems ) { - if ( !elems ) { - return; - } - // if string, use argument as selector string - if ( typeof elems === 'string' ) { - elems = this.element.querySelectorAll( elems ); - } - elems = utils.makeArray( elems ); - return elems; -}; - -Outlayer.prototype._manageStamps = function() { - if ( !this.stamps || !this.stamps.length ) { - return; - } - - this._getBoundingRect(); - - for ( var i=0, len = this.stamps.length; i < len; i++ ) { - var stamp = this.stamps[i]; - this._manageStamp( stamp ); - } -}; - -// update boundingLeft / Top -Outlayer.prototype._getBoundingRect = function() { - // get bounding rect for container element - var boundingRect = this.element.getBoundingClientRect(); - var size = this.size; - this._boundingRect = { - left: boundingRect.left + size.paddingLeft + size.borderLeftWidth, - top: boundingRect.top + size.paddingTop + size.borderTopWidth, - right: boundingRect.right - ( size.paddingRight + size.borderRightWidth ), - bottom: boundingRect.bottom - ( size.paddingBottom + size.borderBottomWidth ) - }; -}; - -/** - * @param {Element} stamp -**/ -Outlayer.prototype._manageStamp = noop; - -/** - * get x/y position of element relative to container element - * @param {Element} elem - * @returns {Object} offset - has left, top, right, bottom - */ -Outlayer.prototype._getElementOffset = function( elem ) { - var boundingRect = elem.getBoundingClientRect(); - var thisRect = this._boundingRect; - var size = getSize( elem ); - var offset = { - left: boundingRect.left - thisRect.left - size.marginLeft, - top: boundingRect.top - thisRect.top - size.marginTop, - right: thisRect.right - boundingRect.right - size.marginRight, - bottom: thisRect.bottom - boundingRect.bottom - size.marginBottom - }; - return offset; -}; - -// -------------------------- resize -------------------------- // - -// enable event handlers for listeners -// i.e. resize -> onresize -Outlayer.prototype.handleEvent = function( event ) { - var method = 'on' + event.type; - if ( this[ method ] ) { - this[ method ]( event ); - } -}; - -/** - * Bind layout to window resizing - */ -Outlayer.prototype.bindResize = function() { - // bind just one listener - if ( this.isResizeBound ) { - return; - } - eventie.bind( window, 'resize', this ); - this.isResizeBound = true; -}; - -/** - * Unbind layout to window resizing - */ -Outlayer.prototype.unbindResize = function() { - if ( this.isResizeBound ) { - eventie.unbind( window, 'resize', this ); - } - this.isResizeBound = false; -}; - -// original debounce by John Hann -// http://unscriptable.com/index.php/2009/03/20/debouncing-javascript-methods/ - -// this fires every resize -Outlayer.prototype.onresize = function() { - if ( this.resizeTimeout ) { - clearTimeout( this.resizeTimeout ); - } - - var _this = this; - function delayed() { - _this.resize(); - delete _this.resizeTimeout; - } - - this.resizeTimeout = setTimeout( delayed, 100 ); -}; - -// debounced, layout on resize -Outlayer.prototype.resize = function() { - // don't trigger if size did not change - // or if resize was unbound. See #9 - if ( !this.isResizeBound || !this.needsResizeLayout() ) { - return; - } - - this.layout(); -}; - -/** - * check if layout is needed post layout - * @returns Boolean - */ -Outlayer.prototype.needsResizeLayout = function() { - var size = getSize( this.element ); - // check that this.size and size are there - // IE8 triggers resize on body size change, so they might not be - var hasSizes = this.size && size; - return hasSizes && size.innerWidth !== this.size.innerWidth; -}; - -// -------------------------- methods -------------------------- // - -/** - * add items to Outlayer instance - * @param {Array or NodeList or Element} elems - * @returns {Array} items - Outlayer.Items -**/ -Outlayer.prototype.addItems = function( elems ) { - var items = this._itemize( elems ); - // add items to collection - if ( items.length ) { - this.items = this.items.concat( items ); - } - return items; -}; - -/** - * Layout newly-appended item elements - * @param {Array or NodeList or Element} elems - */ -Outlayer.prototype.appended = function( elems ) { - var items = this.addItems( elems ); - if ( !items.length ) { - return; - } - // layout and reveal just the new items - this.layoutItems( items, true ); - this.reveal( items ); -}; - -/** - * Layout prepended elements - * @param {Array or NodeList or Element} elems - */ -Outlayer.prototype.prepended = function( elems ) { - var items = this._itemize( elems ); - if ( !items.length ) { - return; - } - // add items to beginning of collection - var previousItems = this.items.slice(0); - this.items = items.concat( previousItems ); - // start new layout - this._resetLayout(); - this._manageStamps(); - // layout new stuff without transition - this.layoutItems( items, true ); - this.reveal( items ); - // layout previous items - this.layoutItems( previousItems ); -}; - -/** - * reveal a collection of items - * @param {Array of Outlayer.Items} items - */ -Outlayer.prototype.reveal = function( items ) { - this._emitCompleteOnItems( 'reveal', items ); - - var len = items && items.length; - for ( var i=0; len && i < len; i++ ) { - var item = items[i]; - item.reveal(); - } -}; - -/** - * hide a collection of items - * @param {Array of Outlayer.Items} items - */ -Outlayer.prototype.hide = function( items ) { - this._emitCompleteOnItems( 'hide', items ); - - var len = items && items.length; - for ( var i=0; len && i < len; i++ ) { - var item = items[i]; - item.hide(); - } -}; - -/** - * reveal item elements - * @param {Array}, {Element}, {NodeList} items - */ -Outlayer.prototype.revealItemElements = function( elems ) { - var items = this.getItems( elems ); - this.reveal( items ); -}; - -/** - * hide item elements - * @param {Array}, {Element}, {NodeList} items - */ -Outlayer.prototype.hideItemElements = function( elems ) { - var items = this.getItems( elems ); - this.hide( items ); -}; - -/** - * get Outlayer.Item, given an Element - * @param {Element} elem - * @param {Function} callback - * @returns {Outlayer.Item} item - */ -Outlayer.prototype.getItem = function( elem ) { - // loop through items to get the one that matches - for ( var i=0, len = this.items.length; i < len; i++ ) { - var item = this.items[i]; - if ( item.element === elem ) { - // return item - return item; - } - } -}; - -/** - * get collection of Outlayer.Items, given Elements - * @param {Array} elems - * @returns {Array} items - Outlayer.Items - */ -Outlayer.prototype.getItems = function( elems ) { - elems = utils.makeArray( elems ); - var items = []; - for ( var i=0, len = elems.length; i < len; i++ ) { - var elem = elems[i]; - var item = this.getItem( elem ); - if ( item ) { - items.push( item ); - } - } - - return items; -}; - -/** - * remove element(s) from instance and DOM - * @param {Array or NodeList or Element} elems - */ -Outlayer.prototype.remove = function( elems ) { - var removeItems = this.getItems( elems ); - - this._emitCompleteOnItems( 'remove', removeItems ); - - // bail if no items to remove - if ( !removeItems || !removeItems.length ) { - return; - } - - for ( var i=0, len = removeItems.length; i < len; i++ ) { - var item = removeItems[i]; - item.remove(); - // remove item from collection - utils.removeFrom( this.items, item ); - } -}; - -// ----- destroy ----- // - -// remove and disable Outlayer instance -Outlayer.prototype.destroy = function() { - // clean up dynamic styles - var style = this.element.style; - style.height = ''; - style.position = ''; - style.width = ''; - // destroy items - for ( var i=0, len = this.items.length; i < len; i++ ) { - var item = this.items[i]; - item.destroy(); - } - - this.unbindResize(); - - var id = this.element.outlayerGUID; - delete instances[ id ]; // remove reference to instance by id - delete this.element.outlayerGUID; - // remove data for jQuery - if ( jQuery ) { - jQuery.removeData( this.element, this.constructor.namespace ); - } - -}; - -// -------------------------- data -------------------------- // - -/** - * get Outlayer instance from element - * @param {Element} elem - * @returns {Outlayer} - */ -Outlayer.data = function( elem ) { - elem = utils.getQueryElement( elem ); - var id = elem && elem.outlayerGUID; - return id && instances[ id ]; -}; - - -// -------------------------- create Outlayer class -------------------------- // - -/** - * create a layout class - * @param {String} namespace - */ -Outlayer.create = function( namespace, options ) { - // sub-class Outlayer - function Layout() { - Outlayer.apply( this, arguments ); - } - // inherit Outlayer prototype, use Object.create if there - if ( Object.create ) { - Layout.prototype = Object.create( Outlayer.prototype ); - } else { - utils.extend( Layout.prototype, Outlayer.prototype ); - } - // set contructor, used for namespace and Item - Layout.prototype.constructor = Layout; - - Layout.defaults = utils.extend( {}, Outlayer.defaults ); - // apply new options - utils.extend( Layout.defaults, options ); - // keep prototype.settings for backwards compatibility (Packery v1.2.0) - Layout.prototype.settings = {}; - - Layout.namespace = namespace; - - Layout.data = Outlayer.data; - - // sub-class Item - Layout.Item = function LayoutItem() { - Item.apply( this, arguments ); - }; - - Layout.Item.prototype = new Item(); - - // -------------------------- declarative -------------------------- // - - utils.htmlInit( Layout, namespace ); - - // -------------------------- jQuery bridge -------------------------- // - - // make into jQuery plugin - if ( jQuery && jQuery.bridget ) { - jQuery.bridget( namespace, Layout ); - } - - return Layout; -}; - -// ----- fin ----- // - -// back in global -Outlayer.Item = Item; - -return Outlayer; - -})); - - -/*! - * Masonry v3.3.2 - * Cascading grid layout library - * http://masonry.desandro.com - * MIT License - * by David DeSandro - */ - -( function( window, factory ) { - - // universal module definition - if ( typeof define === 'function' && define.amd ) { - // AMD - define( [ - 'outlayer/outlayer', - 'get-size/get-size', - 'fizzy-ui-utils/utils' - ], - factory ); - } else if ( typeof exports === 'object' ) { - // CommonJS - module.exports = factory( - require('outlayer'), - require('get-size'), - require('fizzy-ui-utils') - ); - } else { - // browser global - window.Masonry = factory( - window.Outlayer, - window.getSize, - window.fizzyUIUtils - ); - } - -}( window, function factory( Outlayer, getSize, utils ) { - - - -// -------------------------- masonryDefinition -------------------------- // - - // create an Outlayer layout class - var Masonry = Outlayer.create('masonry'); - - Masonry.prototype._resetLayout = function() { - this.getSize(); - this._getMeasurement( 'columnWidth', 'outerWidth' ); - this._getMeasurement( 'gutter', 'outerWidth' ); - this.measureColumns(); - - // reset column Y - var i = this.cols; - this.colYs = []; - while (i--) { - this.colYs.push( 0 ); - } - - this.maxY = 0; - }; - - Masonry.prototype.measureColumns = function() { - this.getContainerWidth(); - // if columnWidth is 0, default to outerWidth of first item - if ( !this.columnWidth ) { - var firstItem = this.items[0]; - var firstItemElem = firstItem && firstItem.element; - // columnWidth fall back to item of first element - this.columnWidth = firstItemElem && getSize( firstItemElem ).outerWidth || - // if first elem has no width, default to size of container - this.containerWidth; - } - - var columnWidth = this.columnWidth += this.gutter; - - // calculate columns - var containerWidth = this.containerWidth + this.gutter; - var cols = containerWidth / columnWidth; - // fix rounding errors, typically with gutters - var excess = columnWidth - containerWidth % columnWidth; - // if overshoot is less than a pixel, round up, otherwise floor it - var mathMethod = excess && excess < 1 ? 'round' : 'floor'; - cols = Math[ mathMethod ]( cols ); - this.cols = Math.max( cols, 1 ); - }; - - Masonry.prototype.getContainerWidth = function() { - // container is parent if fit width - var container = this.options.isFitWidth ? this.element.parentNode : this.element; - // check that this.size and size are there - // IE8 triggers resize on body size change, so they might not be - var size = getSize( container ); - this.containerWidth = size && size.innerWidth; - }; - - Masonry.prototype._getItemLayoutPosition = function( item ) { - item.getSize(); - // how many columns does this brick span - var remainder = item.size.outerWidth % this.columnWidth; - var mathMethod = remainder && remainder < 1 ? 'round' : 'ceil'; - // round if off by 1 pixel, otherwise use ceil - var colSpan = Math[ mathMethod ]( item.size.outerWidth / this.columnWidth ); - colSpan = Math.min( colSpan, this.cols ); - - var colGroup = this._getColGroup( colSpan ); - // get the minimum Y value from the columns - var minimumY = Math.min.apply( Math, colGroup ); - var shortColIndex = utils.indexOf( colGroup, minimumY ); - - // position the brick - var position = { - x: this.columnWidth * shortColIndex, - y: minimumY - }; - - // apply setHeight to necessary columns - var setHeight = minimumY + item.size.outerHeight; - var setSpan = this.cols + 1 - colGroup.length; - for ( var i = 0; i < setSpan; i++ ) { - this.colYs[ shortColIndex + i ] = setHeight; - } - - return position; - }; - - /** - * @param {Number} colSpan - number of columns the element spans - * @returns {Array} colGroup - */ - Masonry.prototype._getColGroup = function( colSpan ) { - if ( colSpan < 2 ) { - // if brick spans only one column, use all the column Ys - return this.colYs; - } - - var colGroup = []; - // how many different places could this brick fit horizontally - var groupCount = this.cols + 1 - colSpan; - // for each group potential horizontal position - for ( var i = 0; i < groupCount; i++ ) { - // make an array of colY values for that one group - var groupColYs = this.colYs.slice( i, i + colSpan ); - // and get the max value of the array - colGroup[i] = Math.max.apply( Math, groupColYs ); - } - return colGroup; - }; - - Masonry.prototype._manageStamp = function( stamp ) { - var stampSize = getSize( stamp ); - var offset = this._getElementOffset( stamp ); - // get the columns that this stamp affects - var firstX = this.options.isOriginLeft ? offset.left : offset.right; - var lastX = firstX + stampSize.outerWidth; - var firstCol = Math.floor( firstX / this.columnWidth ); - firstCol = Math.max( 0, firstCol ); - var lastCol = Math.floor( lastX / this.columnWidth ); - // lastCol should not go over if multiple of columnWidth #425 - lastCol -= lastX % this.columnWidth ? 0 : 1; - lastCol = Math.min( this.cols - 1, lastCol ); - // set colYs to bottom of the stamp - var stampMaxY = ( this.options.isOriginTop ? offset.top : offset.bottom ) + - stampSize.outerHeight; - for ( var i = firstCol; i <= lastCol; i++ ) { - this.colYs[i] = Math.max( stampMaxY, this.colYs[i] ); - } - }; - - Masonry.prototype._getContainerSize = function() { - this.maxY = Math.max.apply( Math, this.colYs ); - var size = { - height: this.maxY - }; - - if ( this.options.isFitWidth ) { - size.width = this._getContainerFitWidth(); - } - - return size; - }; - - Masonry.prototype._getContainerFitWidth = function() { - var unusedCols = 0; - // count unused columns - var i = this.cols; - while ( --i ) { - if ( this.colYs[i] !== 0 ) { - break; - } - unusedCols++; - } - // fit container to columns that have been used - return ( this.cols - unusedCols ) * this.columnWidth - this.gutter; - }; - - Masonry.prototype.needsResizeLayout = function() { - var previousWidth = this.containerWidth; - this.getContainerWidth(); - return previousWidth !== this.containerWidth; - }; - - return Masonry; - -})); - diff --git a/dashboard-ui/bower_components/masonry/dist/masonry.pkgd.min.js b/dashboard-ui/bower_components/masonry/dist/masonry.pkgd.min.js deleted file mode 100644 index f3328c5e99..0000000000 --- a/dashboard-ui/bower_components/masonry/dist/masonry.pkgd.min.js +++ /dev/null @@ -1,9 +0,0 @@ -/*! - * Masonry PACKAGED v3.3.2 - * Cascading grid layout library - * http://masonry.desandro.com - * MIT License - * by David DeSandro - */ - -!function(a){function b(){}function c(a){function c(b){b.prototype.option||(b.prototype.option=function(b){a.isPlainObject(b)&&(this.options=a.extend(!0,this.options,b))})}function e(b,c){a.fn[b]=function(e){if("string"==typeof e){for(var g=d.call(arguments,1),h=0,i=this.length;i>h;h++){var j=this[h],k=a.data(j,b);if(k)if(a.isFunction(k[e])&&"_"!==e.charAt(0)){var l=k[e].apply(k,g);if(void 0!==l)return l}else f("no such method '"+e+"' for "+b+" instance");else f("cannot call methods on "+b+" prior to initialization; attempted to call '"+e+"'")}return this}return this.each(function(){var d=a.data(this,b);d?(d.option(e),d._init()):(d=new c(this,e),a.data(this,b,d))})}}if(a){var f="undefined"==typeof console?b:function(a){console.error(a)};return a.bridget=function(a,b){c(b),e(a,b)},a.bridget}}var d=Array.prototype.slice;"function"==typeof define&&define.amd?define("jquery-bridget/jquery.bridget",["jquery"],c):c("object"==typeof exports?require("jquery"):a.jQuery)}(window),function(a){function b(b){var c=a.event;return c.target=c.target||c.srcElement||b,c}var c=document.documentElement,d=function(){};c.addEventListener?d=function(a,b,c){a.addEventListener(b,c,!1)}:c.attachEvent&&(d=function(a,c,d){a[c+d]=d.handleEvent?function(){var c=b(a);d.handleEvent.call(d,c)}:function(){var c=b(a);d.call(a,c)},a.attachEvent("on"+c,a[c+d])});var e=function(){};c.removeEventListener?e=function(a,b,c){a.removeEventListener(b,c,!1)}:c.detachEvent&&(e=function(a,b,c){a.detachEvent("on"+b,a[b+c]);try{delete a[b+c]}catch(d){a[b+c]=void 0}});var f={bind:d,unbind:e};"function"==typeof define&&define.amd?define("eventie/eventie",f):"object"==typeof exports?module.exports=f:a.eventie=f}(window),function(){function a(){}function b(a,b){for(var c=a.length;c--;)if(a[c].listener===b)return c;return-1}function c(a){return function(){return this[a].apply(this,arguments)}}var d=a.prototype,e=this,f=e.EventEmitter;d.getListeners=function(a){var b,c,d=this._getEvents();if(a instanceof RegExp){b={};for(c in d)d.hasOwnProperty(c)&&a.test(c)&&(b[c]=d[c])}else b=d[a]||(d[a]=[]);return b},d.flattenListeners=function(a){var b,c=[];for(b=0;be;e++)if(b=c[e]+a,"string"==typeof d[b])return b}}var c="Webkit Moz ms Ms O".split(" "),d=document.documentElement.style;"function"==typeof define&&define.amd?define("get-style-property/get-style-property",[],function(){return b}):"object"==typeof exports?module.exports=b:a.getStyleProperty=b}(window),function(a){function b(a){var b=parseFloat(a),c=-1===a.indexOf("%")&&!isNaN(b);return c&&b}function c(){}function d(){for(var a={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},b=0,c=g.length;c>b;b++){var d=g[b];a[d]=0}return a}function e(c){function e(){if(!m){m=!0;var d=a.getComputedStyle;if(j=function(){var a=d?function(a){return d(a,null)}:function(a){return a.currentStyle};return function(b){var c=a(b);return c||f("Style returned "+c+". Are you running this code in a hidden iframe on Firefox? See http://bit.ly/getsizebug1"),c}}(),k=c("boxSizing")){var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style[k]="border-box";var g=document.body||document.documentElement;g.appendChild(e);var h=j(e);l=200===b(h.width),g.removeChild(e)}}}function h(a){if(e(),"string"==typeof a&&(a=document.querySelector(a)),a&&"object"==typeof a&&a.nodeType){var c=j(a);if("none"===c.display)return d();var f={};f.width=a.offsetWidth,f.height=a.offsetHeight;for(var h=f.isBorderBox=!(!k||!c[k]||"border-box"!==c[k]),m=0,n=g.length;n>m;m++){var o=g[m],p=c[o];p=i(a,p);var q=parseFloat(p);f[o]=isNaN(q)?0:q}var r=f.paddingLeft+f.paddingRight,s=f.paddingTop+f.paddingBottom,t=f.marginLeft+f.marginRight,u=f.marginTop+f.marginBottom,v=f.borderLeftWidth+f.borderRightWidth,w=f.borderTopWidth+f.borderBottomWidth,x=h&&l,y=b(c.width);y!==!1&&(f.width=y+(x?0:r+v));var z=b(c.height);return z!==!1&&(f.height=z+(x?0:s+w)),f.innerWidth=f.width-(r+v),f.innerHeight=f.height-(s+w),f.outerWidth=f.width+t,f.outerHeight=f.height+u,f}}function i(b,c){if(a.getComputedStyle||-1===c.indexOf("%"))return c;var d=b.style,e=d.left,f=b.runtimeStyle,g=f&&f.left;return g&&(f.left=b.currentStyle.left),d.left=c,c=d.pixelLeft,d.left=e,g&&(f.left=g),c}var j,k,l,m=!1;return h}var f="undefined"==typeof console?c:function(a){console.error(a)},g=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"];"function"==typeof define&&define.amd?define("get-size/get-size",["get-style-property/get-style-property"],e):"object"==typeof exports?module.exports=e(require("desandro-get-style-property")):a.getSize=e(a.getStyleProperty)}(window),function(a){function b(a){"function"==typeof a&&(b.isReady?a():g.push(a))}function c(a){var c="readystatechange"===a.type&&"complete"!==f.readyState;b.isReady||c||d()}function d(){b.isReady=!0;for(var a=0,c=g.length;c>a;a++){var d=g[a];d()}}function e(e){return"complete"===f.readyState?d():(e.bind(f,"DOMContentLoaded",c),e.bind(f,"readystatechange",c),e.bind(a,"load",c)),b}var f=a.document,g=[];b.isReady=!1,"function"==typeof define&&define.amd?define("doc-ready/doc-ready",["eventie/eventie"],e):"object"==typeof exports?module.exports=e(require("eventie")):a.docReady=e(a.eventie)}(window),function(a){function b(a,b){return a[g](b)}function c(a){if(!a.parentNode){var b=document.createDocumentFragment();b.appendChild(a)}}function d(a,b){c(a);for(var d=a.parentNode.querySelectorAll(b),e=0,f=d.length;f>e;e++)if(d[e]===a)return!0;return!1}function e(a,d){return c(a),b(a,d)}var f,g=function(){if(a.matches)return"matches";if(a.matchesSelector)return"matchesSelector";for(var b=["webkit","moz","ms","o"],c=0,d=b.length;d>c;c++){var e=b[c],f=e+"MatchesSelector";if(a[f])return f}}();if(g){var h=document.createElement("div"),i=b(h,"div");f=i?b:e}else f=d;"function"==typeof define&&define.amd?define("matches-selector/matches-selector",[],function(){return f}):"object"==typeof exports?module.exports=f:window.matchesSelector=f}(Element.prototype),function(a,b){"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["doc-ready/doc-ready","matches-selector/matches-selector"],function(c,d){return b(a,c,d)}):"object"==typeof exports?module.exports=b(a,require("doc-ready"),require("desandro-matches-selector")):a.fizzyUIUtils=b(a,a.docReady,a.matchesSelector)}(window,function(a,b,c){var d={};d.extend=function(a,b){for(var c in b)a[c]=b[c];return a},d.modulo=function(a,b){return(a%b+b)%b};var e=Object.prototype.toString;d.isArray=function(a){return"[object Array]"==e.call(a)},d.makeArray=function(a){var b=[];if(d.isArray(a))b=a;else if(a&&"number"==typeof a.length)for(var c=0,e=a.length;e>c;c++)b.push(a[c]);else b.push(a);return b},d.indexOf=Array.prototype.indexOf?function(a,b){return a.indexOf(b)}:function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},d.removeFrom=function(a,b){var c=d.indexOf(a,b);-1!=c&&a.splice(c,1)},d.isElement="function"==typeof HTMLElement||"object"==typeof HTMLElement?function(a){return a instanceof HTMLElement}:function(a){return a&&"object"==typeof a&&1==a.nodeType&&"string"==typeof a.nodeName},d.setText=function(){function a(a,c){b=b||(void 0!==document.documentElement.textContent?"textContent":"innerText"),a[b]=c}var b;return a}(),d.getParent=function(a,b){for(;a!=document.body;)if(a=a.parentNode,c(a,b))return a},d.getQueryElement=function(a){return"string"==typeof a?document.querySelector(a):a},d.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},d.filterFindElements=function(a,b){a=d.makeArray(a);for(var e=[],f=0,g=a.length;g>f;f++){var h=a[f];if(d.isElement(h))if(b){c(h,b)&&e.push(h);for(var i=h.querySelectorAll(b),j=0,k=i.length;k>j;j++)e.push(i[j])}else e.push(h)}return e},d.debounceMethod=function(a,b,c){var d=a.prototype[b],e=b+"Timeout";a.prototype[b]=function(){var a=this[e];a&&clearTimeout(a);var b=arguments,f=this;this[e]=setTimeout(function(){d.apply(f,b),delete f[e]},c||100)}},d.toDashed=function(a){return a.replace(/(.)([A-Z])/g,function(a,b,c){return b+"-"+c}).toLowerCase()};var f=a.console;return d.htmlInit=function(c,e){b(function(){for(var b=d.toDashed(e),g=document.querySelectorAll(".js-"+b),h="data-"+b+"-options",i=0,j=g.length;j>i;i++){var k,l=g[i],m=l.getAttribute(h);try{k=m&&JSON.parse(m)}catch(n){f&&f.error("Error parsing "+h+" on "+l.nodeName.toLowerCase()+(l.id?"#"+l.id:"")+": "+n);continue}var o=new c(l,k),p=a.jQuery;p&&p.data(l,e,o)}})},d}),function(a,b){"function"==typeof define&&define.amd?define("outlayer/item",["eventEmitter/EventEmitter","get-size/get-size","get-style-property/get-style-property","fizzy-ui-utils/utils"],function(c,d,e,f){return b(a,c,d,e,f)}):"object"==typeof exports?module.exports=b(a,require("wolfy87-eventemitter"),require("get-size"),require("desandro-get-style-property"),require("fizzy-ui-utils")):(a.Outlayer={},a.Outlayer.Item=b(a,a.EventEmitter,a.getSize,a.getStyleProperty,a.fizzyUIUtils))}(window,function(a,b,c,d,e){function f(a){for(var b in a)return!1;return b=null,!0}function g(a,b){a&&(this.element=a,this.layout=b,this.position={x:0,y:0},this._create())}function h(a){return a.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()})}var i=a.getComputedStyle,j=i?function(a){return i(a,null)}:function(a){return a.currentStyle},k=d("transition"),l=d("transform"),m=k&&l,n=!!d("perspective"),o={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend",transition:"transitionend"}[k],p=["transform","transition","transitionDuration","transitionProperty"],q=function(){for(var a={},b=0,c=p.length;c>b;b++){var e=p[b],f=d(e);f&&f!==e&&(a[e]=f)}return a}();e.extend(g.prototype,b.prototype),g.prototype._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},g.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},g.prototype.getSize=function(){this.size=c(this.element)},g.prototype.css=function(a){var b=this.element.style;for(var c in a){var d=q[c]||c;b[d]=a[c]}},g.prototype.getPosition=function(){var a=j(this.element),b=this.layout.options,c=b.isOriginLeft,d=b.isOriginTop,e=a[c?"left":"right"],f=a[d?"top":"bottom"],g=this.layout.size,h=-1!=e.indexOf("%")?parseFloat(e)/100*g.width:parseInt(e,10),i=-1!=f.indexOf("%")?parseFloat(f)/100*g.height:parseInt(f,10);h=isNaN(h)?0:h,i=isNaN(i)?0:i,h-=c?g.paddingLeft:g.paddingRight,i-=d?g.paddingTop:g.paddingBottom,this.position.x=h,this.position.y=i},g.prototype.layoutPosition=function(){var a=this.layout.size,b=this.layout.options,c={},d=b.isOriginLeft?"paddingLeft":"paddingRight",e=b.isOriginLeft?"left":"right",f=b.isOriginLeft?"right":"left",g=this.position.x+a[d];c[e]=this.getXValue(g),c[f]="";var h=b.isOriginTop?"paddingTop":"paddingBottom",i=b.isOriginTop?"top":"bottom",j=b.isOriginTop?"bottom":"top",k=this.position.y+a[h];c[i]=this.getYValue(k),c[j]="",this.css(c),this.emitEvent("layout",[this])},g.prototype.getXValue=function(a){var b=this.layout.options;return b.percentPosition&&!b.isHorizontal?a/this.layout.size.width*100+"%":a+"px"},g.prototype.getYValue=function(a){var b=this.layout.options;return b.percentPosition&&b.isHorizontal?a/this.layout.size.height*100+"%":a+"px"},g.prototype._transitionTo=function(a,b){this.getPosition();var c=this.position.x,d=this.position.y,e=parseInt(a,10),f=parseInt(b,10),g=e===this.position.x&&f===this.position.y;if(this.setPosition(a,b),g&&!this.isTransitioning)return void this.layoutPosition();var h=a-c,i=b-d,j={};j.transform=this.getTranslate(h,i),this.transition({to:j,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},g.prototype.getTranslate=function(a,b){var c=this.layout.options;return a=c.isOriginLeft?a:-a,b=c.isOriginTop?b:-b,n?"translate3d("+a+"px, "+b+"px, 0)":"translate("+a+"px, "+b+"px)"},g.prototype.goTo=function(a,b){this.setPosition(a,b),this.layoutPosition()},g.prototype.moveTo=m?g.prototype._transitionTo:g.prototype.goTo,g.prototype.setPosition=function(a,b){this.position.x=parseInt(a,10),this.position.y=parseInt(b,10)},g.prototype._nonTransition=function(a){this.css(a.to),a.isCleaning&&this._removeStyles(a.to);for(var b in a.onTransitionEnd)a.onTransitionEnd[b].call(this)},g.prototype._transition=function(a){if(!parseFloat(this.layout.options.transitionDuration))return void this._nonTransition(a);var b=this._transn;for(var c in a.onTransitionEnd)b.onEnd[c]=a.onTransitionEnd[c];for(c in a.to)b.ingProperties[c]=!0,a.isCleaning&&(b.clean[c]=!0);if(a.from){this.css(a.from);var d=this.element.offsetHeight;d=null}this.enableTransition(a.to),this.css(a.to),this.isTransitioning=!0};var r="opacity,"+h(q.transform||"transform");g.prototype.enableTransition=function(){this.isTransitioning||(this.css({transitionProperty:r,transitionDuration:this.layout.options.transitionDuration}),this.element.addEventListener(o,this,!1))},g.prototype.transition=g.prototype[k?"_transition":"_nonTransition"],g.prototype.onwebkitTransitionEnd=function(a){this.ontransitionend(a)},g.prototype.onotransitionend=function(a){this.ontransitionend(a)};var s={"-webkit-transform":"transform","-moz-transform":"transform","-o-transform":"transform"};g.prototype.ontransitionend=function(a){if(a.target===this.element){var b=this._transn,c=s[a.propertyName]||a.propertyName;if(delete b.ingProperties[c],f(b.ingProperties)&&this.disableTransition(),c in b.clean&&(this.element.style[a.propertyName]="",delete b.clean[c]),c in b.onEnd){var d=b.onEnd[c];d.call(this),delete b.onEnd[c]}this.emitEvent("transitionEnd",[this])}},g.prototype.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(o,this,!1),this.isTransitioning=!1},g.prototype._removeStyles=function(a){var b={};for(var c in a)b[c]="";this.css(b)};var t={transitionProperty:"",transitionDuration:""};return g.prototype.removeTransitionStyles=function(){this.css(t)},g.prototype.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},g.prototype.remove=function(){if(!k||!parseFloat(this.layout.options.transitionDuration))return void this.removeElem();var a=this;this.once("transitionEnd",function(){a.removeElem()}),this.hide()},g.prototype.reveal=function(){delete this.isHidden,this.css({display:""});var a=this.layout.options,b={},c=this.getHideRevealTransitionEndProperty("visibleStyle");b[c]=this.onRevealTransitionEnd,this.transition({from:a.hiddenStyle,to:a.visibleStyle,isCleaning:!0,onTransitionEnd:b})},g.prototype.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},g.prototype.getHideRevealTransitionEndProperty=function(a){var b=this.layout.options[a];if(b.opacity)return"opacity";for(var c in b)return c},g.prototype.hide=function(){this.isHidden=!0,this.css({display:""});var a=this.layout.options,b={},c=this.getHideRevealTransitionEndProperty("hiddenStyle");b[c]=this.onHideTransitionEnd,this.transition({from:a.visibleStyle,to:a.hiddenStyle,isCleaning:!0,onTransitionEnd:b})},g.prototype.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},g.prototype.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},g}),function(a,b){"function"==typeof define&&define.amd?define("outlayer/outlayer",["eventie/eventie","eventEmitter/EventEmitter","get-size/get-size","fizzy-ui-utils/utils","./item"],function(c,d,e,f,g){return b(a,c,d,e,f,g)}):"object"==typeof exports?module.exports=b(a,require("eventie"),require("wolfy87-eventemitter"),require("get-size"),require("fizzy-ui-utils"),require("./item")):a.Outlayer=b(a,a.eventie,a.EventEmitter,a.getSize,a.fizzyUIUtils,a.Outlayer.Item)}(window,function(a,b,c,d,e,f){function g(a,b){var c=e.getQueryElement(a);if(!c)return void(h&&h.error("Bad element for "+this.constructor.namespace+": "+(c||a)));this.element=c,i&&(this.$element=i(this.element)),this.options=e.extend({},this.constructor.defaults),this.option(b);var d=++k;this.element.outlayerGUID=d,l[d]=this,this._create(),this.options.isInitLayout&&this.layout()}var h=a.console,i=a.jQuery,j=function(){},k=0,l={};return g.namespace="outlayer",g.Item=f,g.defaults={containerStyle:{position:"relative"},isInitLayout:!0,isOriginLeft:!0,isOriginTop:!0,isResizeBound:!0,isResizingContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}},e.extend(g.prototype,c.prototype),g.prototype.option=function(a){e.extend(this.options,a)},g.prototype._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),e.extend(this.element.style,this.options.containerStyle),this.options.isResizeBound&&this.bindResize()},g.prototype.reloadItems=function(){this.items=this._itemize(this.element.children)},g.prototype._itemize=function(a){for(var b=this._filterFindItemElements(a),c=this.constructor.Item,d=[],e=0,f=b.length;f>e;e++){var g=b[e],h=new c(g,this);d.push(h)}return d},g.prototype._filterFindItemElements=function(a){return e.filterFindElements(a,this.options.itemSelector)},g.prototype.getItemElements=function(){for(var a=[],b=0,c=this.items.length;c>b;b++)a.push(this.items[b].element);return a},g.prototype.layout=function(){this._resetLayout(),this._manageStamps();var a=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;this.layoutItems(this.items,a),this._isLayoutInited=!0},g.prototype._init=g.prototype.layout,g.prototype._resetLayout=function(){this.getSize()},g.prototype.getSize=function(){this.size=d(this.element)},g.prototype._getMeasurement=function(a,b){var c,f=this.options[a];f?("string"==typeof f?c=this.element.querySelector(f):e.isElement(f)&&(c=f),this[a]=c?d(c)[b]:f):this[a]=0},g.prototype.layoutItems=function(a,b){a=this._getItemsForLayout(a),this._layoutItems(a,b),this._postLayout()},g.prototype._getItemsForLayout=function(a){for(var b=[],c=0,d=a.length;d>c;c++){var e=a[c];e.isIgnored||b.push(e)}return b},g.prototype._layoutItems=function(a,b){if(this._emitCompleteOnItems("layout",a),a&&a.length){for(var c=[],d=0,e=a.length;e>d;d++){var f=a[d],g=this._getItemLayoutPosition(f);g.item=f,g.isInstant=b||f.isLayoutInstant,c.push(g)}this._processLayoutQueue(c)}},g.prototype._getItemLayoutPosition=function(){return{x:0,y:0}},g.prototype._processLayoutQueue=function(a){for(var b=0,c=a.length;c>b;b++){var d=a[b];this._positionItem(d.item,d.x,d.y,d.isInstant)}},g.prototype._positionItem=function(a,b,c,d){d?a.goTo(b,c):a.moveTo(b,c)},g.prototype._postLayout=function(){this.resizeContainer()},g.prototype.resizeContainer=function(){if(this.options.isResizingContainer){var a=this._getContainerSize();a&&(this._setContainerMeasure(a.width,!0),this._setContainerMeasure(a.height,!1))}},g.prototype._getContainerSize=j,g.prototype._setContainerMeasure=function(a,b){if(void 0!==a){var c=this.size;c.isBorderBox&&(a+=b?c.paddingLeft+c.paddingRight+c.borderLeftWidth+c.borderRightWidth:c.paddingBottom+c.paddingTop+c.borderTopWidth+c.borderBottomWidth),a=Math.max(a,0),this.element.style[b?"width":"height"]=a+"px"}},g.prototype._emitCompleteOnItems=function(a,b){function c(){e.dispatchEvent(a+"Complete",null,[b])}function d(){g++,g===f&&c()}var e=this,f=b.length;if(!b||!f)return void c();for(var g=0,h=0,i=b.length;i>h;h++){var j=b[h];j.once(a,d)}},g.prototype.dispatchEvent=function(a,b,c){var d=b?[b].concat(c):c;if(this.emitEvent(a,d),i)if(this.$element=this.$element||i(this.element),b){var e=i.Event(b);e.type=a,this.$element.trigger(e,c)}else this.$element.trigger(a,c)},g.prototype.ignore=function(a){var b=this.getItem(a);b&&(b.isIgnored=!0)},g.prototype.unignore=function(a){var b=this.getItem(a);b&&delete b.isIgnored},g.prototype.stamp=function(a){if(a=this._find(a)){this.stamps=this.stamps.concat(a);for(var b=0,c=a.length;c>b;b++){var d=a[b];this.ignore(d)}}},g.prototype.unstamp=function(a){if(a=this._find(a))for(var b=0,c=a.length;c>b;b++){var d=a[b];e.removeFrom(this.stamps,d),this.unignore(d)}},g.prototype._find=function(a){return a?("string"==typeof a&&(a=this.element.querySelectorAll(a)),a=e.makeArray(a)):void 0},g.prototype._manageStamps=function(){if(this.stamps&&this.stamps.length){this._getBoundingRect();for(var a=0,b=this.stamps.length;b>a;a++){var c=this.stamps[a];this._manageStamp(c)}}},g.prototype._getBoundingRect=function(){var a=this.element.getBoundingClientRect(),b=this.size;this._boundingRect={left:a.left+b.paddingLeft+b.borderLeftWidth,top:a.top+b.paddingTop+b.borderTopWidth,right:a.right-(b.paddingRight+b.borderRightWidth),bottom:a.bottom-(b.paddingBottom+b.borderBottomWidth)}},g.prototype._manageStamp=j,g.prototype._getElementOffset=function(a){var b=a.getBoundingClientRect(),c=this._boundingRect,e=d(a),f={left:b.left-c.left-e.marginLeft,top:b.top-c.top-e.marginTop,right:c.right-b.right-e.marginRight,bottom:c.bottom-b.bottom-e.marginBottom};return f},g.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},g.prototype.bindResize=function(){this.isResizeBound||(b.bind(a,"resize",this),this.isResizeBound=!0)},g.prototype.unbindResize=function(){this.isResizeBound&&b.unbind(a,"resize",this),this.isResizeBound=!1},g.prototype.onresize=function(){function a(){b.resize(),delete b.resizeTimeout}this.resizeTimeout&&clearTimeout(this.resizeTimeout);var b=this;this.resizeTimeout=setTimeout(a,100)},g.prototype.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},g.prototype.needsResizeLayout=function(){var a=d(this.element),b=this.size&&a;return b&&a.innerWidth!==this.size.innerWidth},g.prototype.addItems=function(a){var b=this._itemize(a);return b.length&&(this.items=this.items.concat(b)),b},g.prototype.appended=function(a){var b=this.addItems(a);b.length&&(this.layoutItems(b,!0),this.reveal(b))},g.prototype.prepended=function(a){var b=this._itemize(a);if(b.length){var c=this.items.slice(0);this.items=b.concat(c),this._resetLayout(),this._manageStamps(),this.layoutItems(b,!0),this.reveal(b),this.layoutItems(c)}},g.prototype.reveal=function(a){this._emitCompleteOnItems("reveal",a);for(var b=a&&a.length,c=0;b&&b>c;c++){var d=a[c];d.reveal()}},g.prototype.hide=function(a){this._emitCompleteOnItems("hide",a);for(var b=a&&a.length,c=0;b&&b>c;c++){var d=a[c];d.hide()}},g.prototype.revealItemElements=function(a){var b=this.getItems(a);this.reveal(b)},g.prototype.hideItemElements=function(a){var b=this.getItems(a);this.hide(b)},g.prototype.getItem=function(a){for(var b=0,c=this.items.length;c>b;b++){var d=this.items[b];if(d.element===a)return d}},g.prototype.getItems=function(a){a=e.makeArray(a);for(var b=[],c=0,d=a.length;d>c;c++){var f=a[c],g=this.getItem(f);g&&b.push(g)}return b},g.prototype.remove=function(a){var b=this.getItems(a);if(this._emitCompleteOnItems("remove",b),b&&b.length)for(var c=0,d=b.length;d>c;c++){var f=b[c];f.remove(),e.removeFrom(this.items,f)}},g.prototype.destroy=function(){var a=this.element.style;a.height="",a.position="",a.width="";for(var b=0,c=this.items.length;c>b;b++){var d=this.items[b];d.destroy()}this.unbindResize();var e=this.element.outlayerGUID;delete l[e],delete this.element.outlayerGUID,i&&i.removeData(this.element,this.constructor.namespace)},g.data=function(a){a=e.getQueryElement(a);var b=a&&a.outlayerGUID;return b&&l[b]},g.create=function(a,b){function c(){g.apply(this,arguments)}return Object.create?c.prototype=Object.create(g.prototype):e.extend(c.prototype,g.prototype),c.prototype.constructor=c,c.defaults=e.extend({},g.defaults),e.extend(c.defaults,b),c.prototype.settings={},c.namespace=a,c.data=g.data,c.Item=function(){f.apply(this,arguments)},c.Item.prototype=new f,e.htmlInit(c,a),i&&i.bridget&&i.bridget(a,c),c},g.Item=f,g}),function(a,b){"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size","fizzy-ui-utils/utils"],b):"object"==typeof exports?module.exports=b(require("outlayer"),require("get-size"),require("fizzy-ui-utils")):a.Masonry=b(a.Outlayer,a.getSize,a.fizzyUIUtils)}(window,function(a,b,c){var d=a.create("masonry");return d.prototype._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns();var a=this.cols;for(this.colYs=[];a--;)this.colYs.push(0);this.maxY=0},d.prototype.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var a=this.items[0],c=a&&a.element;this.columnWidth=c&&b(c).outerWidth||this.containerWidth}var d=this.columnWidth+=this.gutter,e=this.containerWidth+this.gutter,f=e/d,g=d-e%d,h=g&&1>g?"round":"floor";f=Math[h](f),this.cols=Math.max(f,1)},d.prototype.getContainerWidth=function(){var a=this.options.isFitWidth?this.element.parentNode:this.element,c=b(a);this.containerWidth=c&&c.innerWidth},d.prototype._getItemLayoutPosition=function(a){a.getSize();var b=a.size.outerWidth%this.columnWidth,d=b&&1>b?"round":"ceil",e=Math[d](a.size.outerWidth/this.columnWidth);e=Math.min(e,this.cols);for(var f=this._getColGroup(e),g=Math.min.apply(Math,f),h=c.indexOf(f,g),i={x:this.columnWidth*h,y:g},j=g+a.size.outerHeight,k=this.cols+1-f.length,l=0;k>l;l++)this.colYs[h+l]=j;return i},d.prototype._getColGroup=function(a){if(2>a)return this.colYs;for(var b=[],c=this.cols+1-a,d=0;c>d;d++){var e=this.colYs.slice(d,d+a);b[d]=Math.max.apply(Math,e)}return b},d.prototype._manageStamp=function(a){var c=b(a),d=this._getElementOffset(a),e=this.options.isOriginLeft?d.left:d.right,f=e+c.outerWidth,g=Math.floor(e/this.columnWidth);g=Math.max(0,g);var h=Math.floor(f/this.columnWidth);h-=f%this.columnWidth?0:1,h=Math.min(this.cols-1,h);for(var i=(this.options.isOriginTop?d.top:d.bottom)+c.outerHeight,j=g;h>=j;j++)this.colYs[j]=Math.max(i,this.colYs[j])},d.prototype._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var a={height:this.maxY};return this.options.isFitWidth&&(a.width=this._getContainerFitWidth()),a},d.prototype._getContainerFitWidth=function(){for(var a=0,b=this.cols;--b&&0===this.colYs[b];)a++;return(this.cols-a)*this.columnWidth-this.gutter},d.prototype.needsResizeLayout=function(){var a=this.containerWidth;return this.getContainerWidth(),a!==this.containerWidth},d}); \ No newline at end of file diff --git a/dashboard-ui/bower_components/masonry/masonry.js b/dashboard-ui/bower_components/masonry/masonry.js deleted file mode 100644 index 0b15a67d4e..0000000000 --- a/dashboard-ui/bower_components/masonry/masonry.js +++ /dev/null @@ -1,203 +0,0 @@ -/*! - * Masonry v3.3.2 - * Cascading grid layout library - * http://masonry.desandro.com - * MIT License - * by David DeSandro - */ - -( function( window, factory ) { - 'use strict'; - // universal module definition - if ( typeof define === 'function' && define.amd ) { - // AMD - define( [ - 'outlayer/outlayer', - 'get-size/get-size', - 'fizzy-ui-utils/utils' - ], - factory ); - } else if ( typeof exports === 'object' ) { - // CommonJS - module.exports = factory( - require('outlayer'), - require('get-size'), - require('fizzy-ui-utils') - ); - } else { - // browser global - window.Masonry = factory( - window.Outlayer, - window.getSize, - window.fizzyUIUtils - ); - } - -}( window, function factory( Outlayer, getSize, utils ) { - -'use strict'; - -// -------------------------- masonryDefinition -------------------------- // - - // create an Outlayer layout class - var Masonry = Outlayer.create('masonry'); - - Masonry.prototype._resetLayout = function() { - this.getSize(); - this._getMeasurement( 'columnWidth', 'outerWidth' ); - this._getMeasurement( 'gutter', 'outerWidth' ); - this.measureColumns(); - - // reset column Y - var i = this.cols; - this.colYs = []; - while (i--) { - this.colYs.push( 0 ); - } - - this.maxY = 0; - }; - - Masonry.prototype.measureColumns = function() { - this.getContainerWidth(); - // if columnWidth is 0, default to outerWidth of first item - if ( !this.columnWidth ) { - var firstItem = this.items[0]; - var firstItemElem = firstItem && firstItem.element; - // columnWidth fall back to item of first element - this.columnWidth = firstItemElem && getSize( firstItemElem ).outerWidth || - // if first elem has no width, default to size of container - this.containerWidth; - } - - var columnWidth = this.columnWidth += this.gutter; - - // calculate columns - var containerWidth = this.containerWidth + this.gutter; - var cols = containerWidth / columnWidth; - // fix rounding errors, typically with gutters - var excess = columnWidth - containerWidth % columnWidth; - // if overshoot is less than a pixel, round up, otherwise floor it - var mathMethod = excess && excess < 1 ? 'round' : 'floor'; - cols = Math[ mathMethod ]( cols ); - this.cols = Math.max( cols, 1 ); - }; - - Masonry.prototype.getContainerWidth = function() { - // container is parent if fit width - var container = this.options.isFitWidth ? this.element.parentNode : this.element; - // check that this.size and size are there - // IE8 triggers resize on body size change, so they might not be - var size = getSize( container ); - this.containerWidth = size && size.innerWidth; - }; - - Masonry.prototype._getItemLayoutPosition = function( item ) { - item.getSize(); - // how many columns does this brick span - var remainder = item.size.outerWidth % this.columnWidth; - var mathMethod = remainder && remainder < 1 ? 'round' : 'ceil'; - // round if off by 1 pixel, otherwise use ceil - var colSpan = Math[ mathMethod ]( item.size.outerWidth / this.columnWidth ); - colSpan = Math.min( colSpan, this.cols ); - - var colGroup = this._getColGroup( colSpan ); - // get the minimum Y value from the columns - var minimumY = Math.min.apply( Math, colGroup ); - var shortColIndex = utils.indexOf( colGroup, minimumY ); - - // position the brick - var position = { - x: this.columnWidth * shortColIndex, - y: minimumY - }; - - // apply setHeight to necessary columns - var setHeight = minimumY + item.size.outerHeight; - var setSpan = this.cols + 1 - colGroup.length; - for ( var i = 0; i < setSpan; i++ ) { - this.colYs[ shortColIndex + i ] = setHeight; - } - - return position; - }; - - /** - * @param {Number} colSpan - number of columns the element spans - * @returns {Array} colGroup - */ - Masonry.prototype._getColGroup = function( colSpan ) { - if ( colSpan < 2 ) { - // if brick spans only one column, use all the column Ys - return this.colYs; - } - - var colGroup = []; - // how many different places could this brick fit horizontally - var groupCount = this.cols + 1 - colSpan; - // for each group potential horizontal position - for ( var i = 0; i < groupCount; i++ ) { - // make an array of colY values for that one group - var groupColYs = this.colYs.slice( i, i + colSpan ); - // and get the max value of the array - colGroup[i] = Math.max.apply( Math, groupColYs ); - } - return colGroup; - }; - - Masonry.prototype._manageStamp = function( stamp ) { - var stampSize = getSize( stamp ); - var offset = this._getElementOffset( stamp ); - // get the columns that this stamp affects - var firstX = this.options.isOriginLeft ? offset.left : offset.right; - var lastX = firstX + stampSize.outerWidth; - var firstCol = Math.floor( firstX / this.columnWidth ); - firstCol = Math.max( 0, firstCol ); - var lastCol = Math.floor( lastX / this.columnWidth ); - // lastCol should not go over if multiple of columnWidth #425 - lastCol -= lastX % this.columnWidth ? 0 : 1; - lastCol = Math.min( this.cols - 1, lastCol ); - // set colYs to bottom of the stamp - var stampMaxY = ( this.options.isOriginTop ? offset.top : offset.bottom ) + - stampSize.outerHeight; - for ( var i = firstCol; i <= lastCol; i++ ) { - this.colYs[i] = Math.max( stampMaxY, this.colYs[i] ); - } - }; - - Masonry.prototype._getContainerSize = function() { - this.maxY = Math.max.apply( Math, this.colYs ); - var size = { - height: this.maxY - }; - - if ( this.options.isFitWidth ) { - size.width = this._getContainerFitWidth(); - } - - return size; - }; - - Masonry.prototype._getContainerFitWidth = function() { - var unusedCols = 0; - // count unused columns - var i = this.cols; - while ( --i ) { - if ( this.colYs[i] !== 0 ) { - break; - } - unusedCols++; - } - // fit container to columns that have been used - return ( this.cols - unusedCols ) * this.columnWidth - this.gutter; - }; - - Masonry.prototype.needsResizeLayout = function() { - var previousWidth = this.containerWidth; - this.getContainerWidth(); - return previousWidth !== this.containerWidth; - }; - - return Masonry; - -})); diff --git a/dashboard-ui/bower_components/masonry/sandbox/add-items.html b/dashboard-ui/bower_components/masonry/sandbox/add-items.html deleted file mode 100644 index 17c1ffbafe..0000000000 --- a/dashboard-ui/bower_components/masonry/sandbox/add-items.html +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - add items - - - - - - -

add items

- -

- - -

- -
-
-
-
-
- - - - - - - - - - - - - - - - - - - diff --git a/dashboard-ui/bower_components/masonry/sandbox/basic.html b/dashboard-ui/bower_components/masonry/sandbox/basic.html deleted file mode 100644 index 55f9c5c20b..0000000000 --- a/dashboard-ui/bower_components/masonry/sandbox/basic.html +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - basic - - - - - - -

basic

- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - diff --git a/dashboard-ui/bower_components/masonry/sandbox/bottom-up.html b/dashboard-ui/bower_components/masonry/sandbox/bottom-up.html deleted file mode 100644 index 5ee641ab5f..0000000000 --- a/dashboard-ui/bower_components/masonry/sandbox/bottom-up.html +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - bottom up - - - - - - - - -

bottom up

- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - diff --git a/dashboard-ui/bower_components/masonry/sandbox/browserify/index.html b/dashboard-ui/bower_components/masonry/sandbox/browserify/index.html deleted file mode 100644 index a3aa64c19c..0000000000 --- a/dashboard-ui/bower_components/masonry/sandbox/browserify/index.html +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - browserify - - - - - - -

browserify

- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - - - - diff --git a/dashboard-ui/bower_components/masonry/sandbox/browserify/main.js b/dashboard-ui/bower_components/masonry/sandbox/browserify/main.js deleted file mode 100644 index 2baca7d560..0000000000 --- a/dashboard-ui/bower_components/masonry/sandbox/browserify/main.js +++ /dev/null @@ -1,19 +0,0 @@ -// vanilla js - -var Masonry = require('../../masonry'); - -new Masonry( '#basic', { - columnWidth: 60 -}); - -// jquery - -// var $ = require('jquery'); -// var jQBridget = require('jquery-bridget'); -// var Masonry = require('../../masonry'); -// -// $.bridget( 'masonry', Masonry ); -// -// $('#basic').masonry({ -// columnWidth: 60 -// }); diff --git a/dashboard-ui/bower_components/masonry/sandbox/element-sizing.html b/dashboard-ui/bower_components/masonry/sandbox/element-sizing.html deleted file mode 100644 index acbce9947b..0000000000 --- a/dashboard-ui/bower_components/masonry/sandbox/element-sizing.html +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - element sizing - - - - - - -

element sizing

- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - diff --git a/dashboard-ui/bower_components/masonry/sandbox/fit-width.html b/dashboard-ui/bower_components/masonry/sandbox/fit-width.html deleted file mode 100644 index fc74f578f2..0000000000 --- a/dashboard-ui/bower_components/masonry/sandbox/fit-width.html +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - fit width - - - - - - - - -

fit width

- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - diff --git a/dashboard-ui/bower_components/masonry/sandbox/fluid.html b/dashboard-ui/bower_components/masonry/sandbox/fluid.html deleted file mode 100644 index f3ec605ece..0000000000 --- a/dashboard-ui/bower_components/masonry/sandbox/fluid.html +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - fluid - - - - - - -

fluid

- -
-
-
-
-
-
-
-
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - diff --git a/dashboard-ui/bower_components/masonry/sandbox/jquery.html b/dashboard-ui/bower_components/masonry/sandbox/jquery.html deleted file mode 100644 index 82fbaf61a2..0000000000 --- a/dashboard-ui/bower_components/masonry/sandbox/jquery.html +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - jQuery - - - - - - -

jQuery

- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - diff --git a/dashboard-ui/bower_components/masonry/sandbox/require-js/index.html b/dashboard-ui/bower_components/masonry/sandbox/require-js/index.html deleted file mode 100644 index 3246194910..0000000000 --- a/dashboard-ui/bower_components/masonry/sandbox/require-js/index.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - require js - - - - - - - -

require js

- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - - diff --git a/dashboard-ui/bower_components/masonry/sandbox/require-js/main.js b/dashboard-ui/bower_components/masonry/sandbox/require-js/main.js deleted file mode 100644 index b329acff24..0000000000 --- a/dashboard-ui/bower_components/masonry/sandbox/require-js/main.js +++ /dev/null @@ -1,69 +0,0 @@ -/*global requirejs: false*/ - -// -------------------------- pkgd -------------------------- // - -/* -requirejs( [ '../../dist/masonry.pkgd' ], function( Masonry ) { - new Masonry( document.querySelector('#basic') ); -}); -// */ - -// -------------------------- bower -------------------------- // - -/* -requirejs.config({ - baseUrl: '../bower_components' -}); - -requirejs( [ '../masonry' ], function( Masonry ) { - new Masonry( document.querySelector('#basic') ); -}); -// */ - -// -------------------------- pkgd & jQuery -------------------------- // - -// /* -requirejs.config({ - paths: { - jquery: '../../bower_components/jquery/dist/jquery' - } -}); - -requirejs( [ 'require', 'jquery', '../../dist/masonry.pkgd' ], - function( require, $, Masonry ) { - require( [ - 'jquery-bridget/jquery.bridget' - ], - function() { - $.bridget( 'masonry', Masonry ); - $('#basic').masonry({ - columnWidth: 60 - }); - } - ); -}); -// */ - -// -------------------------- bower & jQuery -------------------------- // - -/* -requirejs.config({ - baseUrl: '../bower_components', - paths: { - jquery: 'jquery/dist/jquery' - } -}); - -requirejs( [ - 'jquery', - '../masonry', - 'jquery-bridget/jquery.bridget' - ], - function( $, Masonry ) { - $.bridget( 'masonry', Masonry ); - $('#basic').masonry({ - columnWidth: 60 - }); - } -); -// */ \ No newline at end of file diff --git a/dashboard-ui/bower_components/masonry/sandbox/right-to-left.html b/dashboard-ui/bower_components/masonry/sandbox/right-to-left.html deleted file mode 100644 index 8dd6a4f8db..0000000000 --- a/dashboard-ui/bower_components/masonry/sandbox/right-to-left.html +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - right to left - - - - - - - - -

right to left

- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - diff --git a/dashboard-ui/bower_components/masonry/sandbox/sandbox.css b/dashboard-ui/bower_components/masonry/sandbox/sandbox.css deleted file mode 100644 index 2d88f22f9a..0000000000 --- a/dashboard-ui/bower_components/masonry/sandbox/sandbox.css +++ /dev/null @@ -1,33 +0,0 @@ -* { - box-sizing: border-box; -} - -.container { - background: #EEE; - width: 50%; - margin-bottom: 20px; -} - -.item { - width: 60px; - height: 60px; - float: left; - border: 1px solid; - background: #09F; -} - -.item.w2 { width: 120px; } -.item.w3 { width: 180px; } -.item.w4 { width: 240px; } - -.item.h2 { height: 100px; } -.item.h3 { height: 160px; } -.item.h4 { height: 220px; } -.item.h5 { height: 280px; } - -.stamp { - background: red; - opacity: 0.75; - position: absolute; - border: 1px solid; -} diff --git a/dashboard-ui/bower_components/masonry/sandbox/stamps.html b/dashboard-ui/bower_components/masonry/sandbox/stamps.html deleted file mode 100644 index 3a9a328c70..0000000000 --- a/dashboard-ui/bower_components/masonry/sandbox/stamps.html +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - stamps - - - - - - - - - -

stamps

- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - diff --git a/dashboard-ui/bower_components/matches-selector/.bower.json b/dashboard-ui/bower_components/matches-selector/.bower.json deleted file mode 100644 index 98be80094b..0000000000 --- a/dashboard-ui/bower_components/matches-selector/.bower.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "matches-selector", - "version": "1.0.3", - "description": "matches/matchesSelector helper", - "main": "matches-selector.js", - "devDependencies": { - "qunit": "1.x" - }, - "homepage": "https://github.com/desandro/matches-selector", - "authors": [ - "David DeSandro" - ], - "moduleType": [ - "amd", - "globals", - "node" - ], - "keywords": [ - "DOM", - "matchesSelector", - "matches" - ], - "license": "MIT", - "ignore": [ - "**/.*", - "node_modules", - "bower_components", - "test", - "tests", - "tests.*", - "component.json", - "package.json" - ], - "_release": "1.0.3", - "_resolution": { - "type": "version", - "tag": "v1.0.3", - "commit": "95e78d3f36e19066e89b0ed767ca36bd2f0b0cfb" - }, - "_source": "git://github.com/desandro/matches-selector.git", - "_target": "~1.0.2", - "_originalSource": "matches-selector" -} \ No newline at end of file diff --git a/dashboard-ui/bower_components/matches-selector/bower.json b/dashboard-ui/bower_components/matches-selector/bower.json deleted file mode 100644 index 397f30b637..0000000000 --- a/dashboard-ui/bower_components/matches-selector/bower.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "matches-selector", - "version": "1.0.3", - "description": "matches/matchesSelector helper", - "main": "matches-selector.js", - "devDependencies": { - "qunit": "1.x" - }, - "homepage": "https://github.com/desandro/matches-selector", - "authors": [ - "David DeSandro" - ], - "moduleType": [ - "amd", - "globals", - "node" - ], - "keywords": [ - "DOM", - "matchesSelector", - "matches" - ], - "license": "MIT", - "ignore": [ - "**/.*", - "node_modules", - "bower_components", - "test", - "tests", - "tests.*", - "component.json", - "package.json" - ] -} diff --git a/dashboard-ui/bower_components/matches-selector/matches-selector.js b/dashboard-ui/bower_components/matches-selector/matches-selector.js deleted file mode 100644 index 862498233e..0000000000 --- a/dashboard-ui/bower_components/matches-selector/matches-selector.js +++ /dev/null @@ -1,107 +0,0 @@ -/** - * matchesSelector v1.0.3 - * matchesSelector( element, '.selector' ) - * MIT license - */ - -/*jshint browser: true, strict: true, undef: true, unused: true */ -/*global define: false, module: false */ - -( function( ElemProto ) { - - 'use strict'; - - var matchesMethod = ( function() { - // check for the standard method name first - if ( ElemProto.matches ) { - return 'matches'; - } - // check un-prefixed - if ( ElemProto.matchesSelector ) { - return 'matchesSelector'; - } - // check vendor prefixes - var prefixes = [ 'webkit', 'moz', 'ms', 'o' ]; - - for ( var i=0, len = prefixes.length; i < len; i++ ) { - var prefix = prefixes[i]; - var method = prefix + 'MatchesSelector'; - if ( ElemProto[ method ] ) { - return method; - } - } - })(); - - // ----- match ----- // - - function match( elem, selector ) { - return elem[ matchesMethod ]( selector ); - } - - // ----- appendToFragment ----- // - - function checkParent( elem ) { - // not needed if already has parent - if ( elem.parentNode ) { - return; - } - var fragment = document.createDocumentFragment(); - fragment.appendChild( elem ); - } - - // ----- query ----- // - - // fall back to using QSA - // thx @jonathantneal https://gist.github.com/3062955 - function query( elem, selector ) { - // append to fragment if no parent - checkParent( elem ); - - // match elem with all selected elems of parent - var elems = elem.parentNode.querySelectorAll( selector ); - for ( var i=0, len = elems.length; i < len; i++ ) { - // return true if match - if ( elems[i] === elem ) { - return true; - } - } - // otherwise return false - return false; - } - - // ----- matchChild ----- // - - function matchChild( elem, selector ) { - checkParent( elem ); - return match( elem, selector ); - } - - // ----- matchesSelector ----- // - - var matchesSelector; - - if ( matchesMethod ) { - // IE9 supports matchesSelector, but doesn't work on orphaned elems - // check for that - var div = document.createElement('div'); - var supportsOrphans = match( div, 'div' ); - matchesSelector = supportsOrphans ? match : matchChild; - } else { - matchesSelector = query; - } - - // transport - if ( typeof define === 'function' && define.amd ) { - // AMD - define( function() { - return matchesSelector; - }); - } else if ( typeof exports === 'object' ) { - module.exports = matchesSelector; - } - else { - // browser global - window.matchesSelector = matchesSelector; - } - -})( Element.prototype ); diff --git a/dashboard-ui/bower_components/outlayer/.bower.json b/dashboard-ui/bower_components/outlayer/.bower.json deleted file mode 100644 index abc879a8b7..0000000000 --- a/dashboard-ui/bower_components/outlayer/.bower.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "name": "outlayer", - "version": "1.4.2", - "description": "the brains and guts of a layout library", - "main": "outlayer.js", - "dependencies": { - "doc-ready": "1.0.x", - "eventEmitter": ">=4.2 <5", - "eventie": "~1.0.3", - "get-size": "~1.2.2", - "get-style-property": "~1.0.4", - "matches-selector": "~1.0.2", - "fizzy-ui-utils": "~1.0.1" - }, - "devDependencies": { - "jquery-bridget": "1.x", - "jquery": ">=1.4.3 <2", - "qunit": "^1.12.0" - }, - "ignore": [ - "test/", - "docs/", - "examples", - ".*", - "notes.md", - "**/.*", - "node_modules", - "bower_components", - "test", - "tests", - "package.json" - ], - "homepage": "https://github.com/metafizzy/outlayer", - "authors": [ - "Metafizzy" - ], - "moduleType": [ - "amd", - "globals", - "node" - ], - "keywords": [ - "layout", - "masonry", - "isotope" - ], - "license": "MIT", - "_release": "1.4.2", - "_resolution": { - "type": "version", - "tag": "v1.4.2", - "commit": "c2d5e67fa6b4e716591ac11fa2d27494bdfc1733" - }, - "_source": "git://github.com/metafizzy/outlayer.git", - "_target": "~1.4.0", - "_originalSource": "outlayer" -} \ No newline at end of file diff --git a/dashboard-ui/bower_components/outlayer/bower.json b/dashboard-ui/bower_components/outlayer/bower.json deleted file mode 100644 index 3638aeedd6..0000000000 --- a/dashboard-ui/bower_components/outlayer/bower.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "name": "outlayer", - "version": "1.4.2", - "description": "the brains and guts of a layout library", - "main": "outlayer.js", - "dependencies": { - "doc-ready": "1.0.x", - "eventEmitter": ">=4.2 <5", - "eventie": "~1.0.3", - "get-size": "~1.2.2", - "get-style-property": "~1.0.4", - "matches-selector": "~1.0.2", - "fizzy-ui-utils": "~1.0.1" - }, - "devDependencies": { - "jquery-bridget": "1.x", - "jquery": ">=1.4.3 <2", - "qunit": "^1.12.0" - }, - "ignore": [ - "test/", - "docs/", - "examples", - ".*", - "notes.md", - "**/.*", - "node_modules", - "bower_components", - "test", - "tests", - "package.json" - ], - "homepage": "https://github.com/metafizzy/outlayer", - "authors": [ - "Metafizzy" - ], - "moduleType": [ - "amd", - "globals", - "node" - ], - "keywords": [ - "layout", - "masonry", - "isotope" - ], - "license": "MIT" -} diff --git a/dashboard-ui/bower_components/outlayer/item.js b/dashboard-ui/bower_components/outlayer/item.js deleted file mode 100644 index b13ef68807..0000000000 --- a/dashboard-ui/bower_components/outlayer/item.js +++ /dev/null @@ -1,584 +0,0 @@ -/** - * Outlayer Item - */ - -( function( window, factory ) { - 'use strict'; - // universal module definition - if ( typeof define === 'function' && define.amd ) { - // AMD - define( [ - 'eventEmitter/EventEmitter', - 'get-size/get-size', - 'get-style-property/get-style-property', - 'fizzy-ui-utils/utils' - ], - function( EventEmitter, getSize, getStyleProperty, utils ) { - return factory( window, EventEmitter, getSize, getStyleProperty, utils ); - } - ); - } else if (typeof exports === 'object') { - // CommonJS - module.exports = factory( - window, - require('wolfy87-eventemitter'), - require('get-size'), - require('desandro-get-style-property'), - require('fizzy-ui-utils') - ); - } else { - // browser global - window.Outlayer = {}; - window.Outlayer.Item = factory( - window, - window.EventEmitter, - window.getSize, - window.getStyleProperty, - window.fizzyUIUtils - ); - } - -}( window, function factory( window, EventEmitter, getSize, getStyleProperty, utils ) { -'use strict'; - -// ----- helpers ----- // - -var getComputedStyle = window.getComputedStyle; -var getStyle = getComputedStyle ? - function( elem ) { - return getComputedStyle( elem, null ); - } : - function( elem ) { - return elem.currentStyle; - }; - - -function isEmptyObj( obj ) { - for ( var prop in obj ) { - return false; - } - prop = null; - return true; -} - -// -------------------------- CSS3 support -------------------------- // - -var transitionProperty = getStyleProperty('transition'); -var transformProperty = getStyleProperty('transform'); -var supportsCSS3 = transitionProperty && transformProperty; -var is3d = !!getStyleProperty('perspective'); - -var transitionEndEvent = { - WebkitTransition: 'webkitTransitionEnd', - MozTransition: 'transitionend', - OTransition: 'otransitionend', - transition: 'transitionend' -}[ transitionProperty ]; - -// properties that could have vendor prefix -var prefixableProperties = [ - 'transform', - 'transition', - 'transitionDuration', - 'transitionProperty' -]; - -// cache all vendor properties -var vendorProperties = ( function() { - var cache = {}; - for ( var i=0, len = prefixableProperties.length; i < len; i++ ) { - var prop = prefixableProperties[i]; - var supportedProp = getStyleProperty( prop ); - if ( supportedProp && supportedProp !== prop ) { - cache[ prop ] = supportedProp; - } - } - return cache; -})(); - -// -------------------------- Item -------------------------- // - -function Item( element, layout ) { - if ( !element ) { - return; - } - - this.element = element; - // parent layout class, i.e. Masonry, Isotope, or Packery - this.layout = layout; - this.position = { - x: 0, - y: 0 - }; - - this._create(); -} - -// inherit EventEmitter -utils.extend( Item.prototype, EventEmitter.prototype ); - -Item.prototype._create = function() { - // transition objects - this._transn = { - ingProperties: {}, - clean: {}, - onEnd: {} - }; - - this.css({ - position: 'absolute' - }); -}; - -// trigger specified handler for event type -Item.prototype.handleEvent = function( event ) { - var method = 'on' + event.type; - if ( this[ method ] ) { - this[ method ]( event ); - } -}; - -Item.prototype.getSize = function() { - this.size = getSize( this.element ); -}; - -/** - * apply CSS styles to element - * @param {Object} style - */ -Item.prototype.css = function( style ) { - var elemStyle = this.element.style; - - for ( var prop in style ) { - // use vendor property if available - var supportedProp = vendorProperties[ prop ] || prop; - elemStyle[ supportedProp ] = style[ prop ]; - } -}; - - // measure position, and sets it -Item.prototype.getPosition = function() { - var style = getStyle( this.element ); - var layoutOptions = this.layout.options; - var isOriginLeft = layoutOptions.isOriginLeft; - var isOriginTop = layoutOptions.isOriginTop; - var xValue = style[ isOriginLeft ? 'left' : 'right' ]; - var yValue = style[ isOriginTop ? 'top' : 'bottom' ]; - // convert percent to pixels - var layoutSize = this.layout.size; - var x = xValue.indexOf('%') != -1 ? - ( parseFloat( xValue ) / 100 ) * layoutSize.width : parseInt( xValue, 10 ); - var y = yValue.indexOf('%') != -1 ? - ( parseFloat( yValue ) / 100 ) * layoutSize.height : parseInt( yValue, 10 ); - - // clean up 'auto' or other non-integer values - x = isNaN( x ) ? 0 : x; - y = isNaN( y ) ? 0 : y; - // remove padding from measurement - x -= isOriginLeft ? layoutSize.paddingLeft : layoutSize.paddingRight; - y -= isOriginTop ? layoutSize.paddingTop : layoutSize.paddingBottom; - - this.position.x = x; - this.position.y = y; -}; - -// set settled position, apply padding -Item.prototype.layoutPosition = function() { - var layoutSize = this.layout.size; - var layoutOptions = this.layout.options; - var style = {}; - - // x - var xPadding = layoutOptions.isOriginLeft ? 'paddingLeft' : 'paddingRight'; - var xProperty = layoutOptions.isOriginLeft ? 'left' : 'right'; - var xResetProperty = layoutOptions.isOriginLeft ? 'right' : 'left'; - - var x = this.position.x + layoutSize[ xPadding ]; - // set in percentage or pixels - style[ xProperty ] = this.getXValue( x ); - // reset other property - style[ xResetProperty ] = ''; - - // y - var yPadding = layoutOptions.isOriginTop ? 'paddingTop' : 'paddingBottom'; - var yProperty = layoutOptions.isOriginTop ? 'top' : 'bottom'; - var yResetProperty = layoutOptions.isOriginTop ? 'bottom' : 'top'; - - var y = this.position.y + layoutSize[ yPadding ]; - // set in percentage or pixels - style[ yProperty ] = this.getYValue( y ); - // reset other property - style[ yResetProperty ] = ''; - - this.css( style ); - this.emitEvent( 'layout', [ this ] ); -}; - -Item.prototype.getXValue = function( x ) { - var layoutOptions = this.layout.options; - return layoutOptions.percentPosition && !layoutOptions.isHorizontal ? - ( ( x / this.layout.size.width ) * 100 ) + '%' : x + 'px'; -}; - -Item.prototype.getYValue = function( y ) { - var layoutOptions = this.layout.options; - return layoutOptions.percentPosition && layoutOptions.isHorizontal ? - ( ( y / this.layout.size.height ) * 100 ) + '%' : y + 'px'; -}; - - -Item.prototype._transitionTo = function( x, y ) { - this.getPosition(); - // get current x & y from top/left - var curX = this.position.x; - var curY = this.position.y; - - var compareX = parseInt( x, 10 ); - var compareY = parseInt( y, 10 ); - var didNotMove = compareX === this.position.x && compareY === this.position.y; - - // save end position - this.setPosition( x, y ); - - // if did not move and not transitioning, just go to layout - if ( didNotMove && !this.isTransitioning ) { - this.layoutPosition(); - return; - } - - var transX = x - curX; - var transY = y - curY; - var transitionStyle = {}; - transitionStyle.transform = this.getTranslate( transX, transY ); - - this.transition({ - to: transitionStyle, - onTransitionEnd: { - transform: this.layoutPosition - }, - isCleaning: true - }); -}; - -Item.prototype.getTranslate = function( x, y ) { - // flip cooridinates if origin on right or bottom - var layoutOptions = this.layout.options; - x = layoutOptions.isOriginLeft ? x : -x; - y = layoutOptions.isOriginTop ? y : -y; - - if ( is3d ) { - return 'translate3d(' + x + 'px, ' + y + 'px, 0)'; - } - - return 'translate(' + x + 'px, ' + y + 'px)'; -}; - -// non transition + transform support -Item.prototype.goTo = function( x, y ) { - this.setPosition( x, y ); - this.layoutPosition(); -}; - -// use transition and transforms if supported -Item.prototype.moveTo = supportsCSS3 ? - Item.prototype._transitionTo : Item.prototype.goTo; - -Item.prototype.setPosition = function( x, y ) { - this.position.x = parseInt( x, 10 ); - this.position.y = parseInt( y, 10 ); -}; - -// ----- transition ----- // - -/** - * @param {Object} style - CSS - * @param {Function} onTransitionEnd - */ - -// non transition, just trigger callback -Item.prototype._nonTransition = function( args ) { - this.css( args.to ); - if ( args.isCleaning ) { - this._removeStyles( args.to ); - } - for ( var prop in args.onTransitionEnd ) { - args.onTransitionEnd[ prop ].call( this ); - } -}; - -/** - * proper transition - * @param {Object} args - arguments - * @param {Object} to - style to transition to - * @param {Object} from - style to start transition from - * @param {Boolean} isCleaning - removes transition styles after transition - * @param {Function} onTransitionEnd - callback - */ -Item.prototype._transition = function( args ) { - // redirect to nonTransition if no transition duration - if ( !parseFloat( this.layout.options.transitionDuration ) ) { - this._nonTransition( args ); - return; - } - - var _transition = this._transn; - // keep track of onTransitionEnd callback by css property - for ( var prop in args.onTransitionEnd ) { - _transition.onEnd[ prop ] = args.onTransitionEnd[ prop ]; - } - // keep track of properties that are transitioning - for ( prop in args.to ) { - _transition.ingProperties[ prop ] = true; - // keep track of properties to clean up when transition is done - if ( args.isCleaning ) { - _transition.clean[ prop ] = true; - } - } - - // set from styles - if ( args.from ) { - this.css( args.from ); - // force redraw. http://blog.alexmaccaw.com/css-transitions - var h = this.element.offsetHeight; - // hack for JSHint to hush about unused var - h = null; - } - // enable transition - this.enableTransition( args.to ); - // set styles that are transitioning - this.css( args.to ); - - this.isTransitioning = true; - -}; - -// dash before all cap letters, including first for -// WebkitTransform => -webkit-transform -function toDashedAll( str ) { - return str.replace( /([A-Z])/g, function( $1 ) { - return '-' + $1.toLowerCase(); - }); -} - -var transitionProps = 'opacity,' + - toDashedAll( vendorProperties.transform || 'transform' ); - -Item.prototype.enableTransition = function(/* style */) { - // HACK changing transitionProperty during a transition - // will cause transition to jump - if ( this.isTransitioning ) { - return; - } - - // make `transition: foo, bar, baz` from style object - // HACK un-comment this when enableTransition can work - // while a transition is happening - // var transitionValues = []; - // for ( var prop in style ) { - // // dash-ify camelCased properties like WebkitTransition - // prop = vendorProperties[ prop ] || prop; - // transitionValues.push( toDashedAll( prop ) ); - // } - // enable transition styles - this.css({ - transitionProperty: transitionProps, - transitionDuration: this.layout.options.transitionDuration - }); - // listen for transition end event - this.element.addEventListener( transitionEndEvent, this, false ); -}; - -Item.prototype.transition = Item.prototype[ transitionProperty ? '_transition' : '_nonTransition' ]; - -// ----- events ----- // - -Item.prototype.onwebkitTransitionEnd = function( event ) { - this.ontransitionend( event ); -}; - -Item.prototype.onotransitionend = function( event ) { - this.ontransitionend( event ); -}; - -// properties that I munge to make my life easier -var dashedVendorProperties = { - '-webkit-transform': 'transform', - '-moz-transform': 'transform', - '-o-transform': 'transform' -}; - -Item.prototype.ontransitionend = function( event ) { - // disregard bubbled events from children - if ( event.target !== this.element ) { - return; - } - var _transition = this._transn; - // get property name of transitioned property, convert to prefix-free - var propertyName = dashedVendorProperties[ event.propertyName ] || event.propertyName; - - // remove property that has completed transitioning - delete _transition.ingProperties[ propertyName ]; - // check if any properties are still transitioning - if ( isEmptyObj( _transition.ingProperties ) ) { - // all properties have completed transitioning - this.disableTransition(); - } - // clean style - if ( propertyName in _transition.clean ) { - // clean up style - this.element.style[ event.propertyName ] = ''; - delete _transition.clean[ propertyName ]; - } - // trigger onTransitionEnd callback - if ( propertyName in _transition.onEnd ) { - var onTransitionEnd = _transition.onEnd[ propertyName ]; - onTransitionEnd.call( this ); - delete _transition.onEnd[ propertyName ]; - } - - this.emitEvent( 'transitionEnd', [ this ] ); -}; - -Item.prototype.disableTransition = function() { - this.removeTransitionStyles(); - this.element.removeEventListener( transitionEndEvent, this, false ); - this.isTransitioning = false; -}; - -/** - * removes style property from element - * @param {Object} style -**/ -Item.prototype._removeStyles = function( style ) { - // clean up transition styles - var cleanStyle = {}; - for ( var prop in style ) { - cleanStyle[ prop ] = ''; - } - this.css( cleanStyle ); -}; - -var cleanTransitionStyle = { - transitionProperty: '', - transitionDuration: '' -}; - -Item.prototype.removeTransitionStyles = function() { - // remove transition - this.css( cleanTransitionStyle ); -}; - -// ----- show/hide/remove ----- // - -// remove element from DOM -Item.prototype.removeElem = function() { - this.element.parentNode.removeChild( this.element ); - // remove display: none - this.css({ display: '' }); - this.emitEvent( 'remove', [ this ] ); -}; - -Item.prototype.remove = function() { - // just remove element if no transition support or no transition - if ( !transitionProperty || !parseFloat( this.layout.options.transitionDuration ) ) { - this.removeElem(); - return; - } - - // start transition - var _this = this; - this.once( 'transitionEnd', function() { - _this.removeElem(); - }); - this.hide(); -}; - -Item.prototype.reveal = function() { - delete this.isHidden; - // remove display: none - this.css({ display: '' }); - - var options = this.layout.options; - - var onTransitionEnd = {}; - var transitionEndProperty = this.getHideRevealTransitionEndProperty('visibleStyle'); - onTransitionEnd[ transitionEndProperty ] = this.onRevealTransitionEnd; - - this.transition({ - from: options.hiddenStyle, - to: options.visibleStyle, - isCleaning: true, - onTransitionEnd: onTransitionEnd - }); -}; - -Item.prototype.onRevealTransitionEnd = function() { - // check if still visible - // during transition, item may have been hidden - if ( !this.isHidden ) { - this.emitEvent('reveal'); - } -}; - -/** - * get style property use for hide/reveal transition end - * @param {String} styleProperty - hiddenStyle/visibleStyle - * @returns {String} - */ -Item.prototype.getHideRevealTransitionEndProperty = function( styleProperty ) { - var optionStyle = this.layout.options[ styleProperty ]; - // use opacity - if ( optionStyle.opacity ) { - return 'opacity'; - } - // get first property - for ( var prop in optionStyle ) { - return prop; - } -}; - -Item.prototype.hide = function() { - // set flag - this.isHidden = true; - // remove display: none - this.css({ display: '' }); - - var options = this.layout.options; - - var onTransitionEnd = {}; - var transitionEndProperty = this.getHideRevealTransitionEndProperty('hiddenStyle'); - onTransitionEnd[ transitionEndProperty ] = this.onHideTransitionEnd; - - this.transition({ - from: options.visibleStyle, - to: options.hiddenStyle, - // keep hidden stuff hidden - isCleaning: true, - onTransitionEnd: onTransitionEnd - }); -}; - -Item.prototype.onHideTransitionEnd = function() { - // check if still hidden - // during transition, item may have been un-hidden - if ( this.isHidden ) { - this.css({ display: 'none' }); - this.emitEvent('hide'); - } -}; - -Item.prototype.destroy = function() { - this.css({ - position: '', - left: '', - right: '', - top: '', - bottom: '', - transition: '', - transform: '' - }); -}; - -return Item; - -})); diff --git a/dashboard-ui/bower_components/outlayer/outlayer.js b/dashboard-ui/bower_components/outlayer/outlayer.js deleted file mode 100644 index a202cd0c85..0000000000 --- a/dashboard-ui/bower_components/outlayer/outlayer.js +++ /dev/null @@ -1,926 +0,0 @@ -/*! - * Outlayer v1.4.2 - * the brains and guts of a layout library - * MIT license - */ - -( function( window, factory ) { - 'use strict'; - // universal module definition - - if ( typeof define == 'function' && define.amd ) { - // AMD - define( [ - 'eventie/eventie', - 'eventEmitter/EventEmitter', - 'get-size/get-size', - 'fizzy-ui-utils/utils', - './item' - ], - function( eventie, EventEmitter, getSize, utils, Item ) { - return factory( window, eventie, EventEmitter, getSize, utils, Item); - } - ); - } else if ( typeof exports == 'object' ) { - // CommonJS - module.exports = factory( - window, - require('eventie'), - require('wolfy87-eventemitter'), - require('get-size'), - require('fizzy-ui-utils'), - require('./item') - ); - } else { - // browser global - window.Outlayer = factory( - window, - window.eventie, - window.EventEmitter, - window.getSize, - window.fizzyUIUtils, - window.Outlayer.Item - ); - } - -}( window, function factory( window, eventie, EventEmitter, getSize, utils, Item ) { -'use strict'; - -// ----- vars ----- // - -var console = window.console; -var jQuery = window.jQuery; -var noop = function() {}; - -// -------------------------- Outlayer -------------------------- // - -// globally unique identifiers -var GUID = 0; -// internal store of all Outlayer intances -var instances = {}; - - -/** - * @param {Element, String} element - * @param {Object} options - * @constructor - */ -function Outlayer( element, options ) { - var queryElement = utils.getQueryElement( element ); - if ( !queryElement ) { - if ( console ) { - console.error( 'Bad element for ' + this.constructor.namespace + - ': ' + ( queryElement || element ) ); - } - return; - } - this.element = queryElement; - // add jQuery - if ( jQuery ) { - this.$element = jQuery( this.element ); - } - - // options - this.options = utils.extend( {}, this.constructor.defaults ); - this.option( options ); - - // add id for Outlayer.getFromElement - var id = ++GUID; - this.element.outlayerGUID = id; // expando - instances[ id ] = this; // associate via id - - // kick it off - this._create(); - - if ( this.options.isInitLayout ) { - this.layout(); - } -} - -// settings are for internal use only -Outlayer.namespace = 'outlayer'; -Outlayer.Item = Item; - -// default options -Outlayer.defaults = { - containerStyle: { - position: 'relative' - }, - isInitLayout: true, - isOriginLeft: true, - isOriginTop: true, - isResizeBound: true, - isResizingContainer: true, - // item options - transitionDuration: '0.4s', - hiddenStyle: { - opacity: 0, - transform: 'scale(0.001)' - }, - visibleStyle: { - opacity: 1, - transform: 'scale(1)' - } -}; - -// inherit EventEmitter -utils.extend( Outlayer.prototype, EventEmitter.prototype ); - -/** - * set options - * @param {Object} opts - */ -Outlayer.prototype.option = function( opts ) { - utils.extend( this.options, opts ); -}; - -Outlayer.prototype._create = function() { - // get items from children - this.reloadItems(); - // elements that affect layout, but are not laid out - this.stamps = []; - this.stamp( this.options.stamp ); - // set container style - utils.extend( this.element.style, this.options.containerStyle ); - - // bind resize method - if ( this.options.isResizeBound ) { - this.bindResize(); - } -}; - -// goes through all children again and gets bricks in proper order -Outlayer.prototype.reloadItems = function() { - // collection of item elements - this.items = this._itemize( this.element.children ); -}; - - -/** - * turn elements into Outlayer.Items to be used in layout - * @param {Array or NodeList or HTMLElement} elems - * @returns {Array} items - collection of new Outlayer Items - */ -Outlayer.prototype._itemize = function( elems ) { - - var itemElems = this._filterFindItemElements( elems ); - var Item = this.constructor.Item; - - // create new Outlayer Items for collection - var items = []; - for ( var i=0, len = itemElems.length; i < len; i++ ) { - var elem = itemElems[i]; - var item = new Item( elem, this ); - items.push( item ); - } - - return items; -}; - -/** - * get item elements to be used in layout - * @param {Array or NodeList or HTMLElement} elems - * @returns {Array} items - item elements - */ -Outlayer.prototype._filterFindItemElements = function( elems ) { - return utils.filterFindElements( elems, this.options.itemSelector ); -}; - -/** - * getter method for getting item elements - * @returns {Array} elems - collection of item elements - */ -Outlayer.prototype.getItemElements = function() { - var elems = []; - for ( var i=0, len = this.items.length; i < len; i++ ) { - elems.push( this.items[i].element ); - } - return elems; -}; - -// ----- init & layout ----- // - -/** - * lays out all items - */ -Outlayer.prototype.layout = function() { - this._resetLayout(); - this._manageStamps(); - - // don't animate first layout - var isInstant = this.options.isLayoutInstant !== undefined ? - this.options.isLayoutInstant : !this._isLayoutInited; - this.layoutItems( this.items, isInstant ); - - // flag for initalized - this._isLayoutInited = true; -}; - -// _init is alias for layout -Outlayer.prototype._init = Outlayer.prototype.layout; - -/** - * logic before any new layout - */ -Outlayer.prototype._resetLayout = function() { - this.getSize(); -}; - - -Outlayer.prototype.getSize = function() { - this.size = getSize( this.element ); -}; - -/** - * get measurement from option, for columnWidth, rowHeight, gutter - * if option is String -> get element from selector string, & get size of element - * if option is Element -> get size of element - * else use option as a number - * - * @param {String} measurement - * @param {String} size - width or height - * @private - */ -Outlayer.prototype._getMeasurement = function( measurement, size ) { - var option = this.options[ measurement ]; - var elem; - if ( !option ) { - // default to 0 - this[ measurement ] = 0; - } else { - // use option as an element - if ( typeof option === 'string' ) { - elem = this.element.querySelector( option ); - } else if ( utils.isElement( option ) ) { - elem = option; - } - // use size of element, if element - this[ measurement ] = elem ? getSize( elem )[ size ] : option; - } -}; - -/** - * layout a collection of item elements - * @api public - */ -Outlayer.prototype.layoutItems = function( items, isInstant ) { - items = this._getItemsForLayout( items ); - - this._layoutItems( items, isInstant ); - - this._postLayout(); -}; - -/** - * get the items to be laid out - * you may want to skip over some items - * @param {Array} items - * @returns {Array} items - */ -Outlayer.prototype._getItemsForLayout = function( items ) { - var layoutItems = []; - for ( var i=0, len = items.length; i < len; i++ ) { - var item = items[i]; - if ( !item.isIgnored ) { - layoutItems.push( item ); - } - } - return layoutItems; -}; - -/** - * layout items - * @param {Array} items - * @param {Boolean} isInstant - */ -Outlayer.prototype._layoutItems = function( items, isInstant ) { - this._emitCompleteOnItems( 'layout', items ); - - if ( !items || !items.length ) { - // no items, emit event with empty array - return; - } - - var queue = []; - - for ( var i=0, len = items.length; i < len; i++ ) { - var item = items[i]; - // get x/y object from method - var position = this._getItemLayoutPosition( item ); - // enqueue - position.item = item; - position.isInstant = isInstant || item.isLayoutInstant; - queue.push( position ); - } - - this._processLayoutQueue( queue ); -}; - -/** - * get item layout position - * @param {Outlayer.Item} item - * @returns {Object} x and y position - */ -Outlayer.prototype._getItemLayoutPosition = function( /* item */ ) { - return { - x: 0, - y: 0 - }; -}; - -/** - * iterate over array and position each item - * Reason being - separating this logic prevents 'layout invalidation' - * thx @paul_irish - * @param {Array} queue - */ -Outlayer.prototype._processLayoutQueue = function( queue ) { - for ( var i=0, len = queue.length; i < len; i++ ) { - var obj = queue[i]; - this._positionItem( obj.item, obj.x, obj.y, obj.isInstant ); - } -}; - -/** - * Sets position of item in DOM - * @param {Outlayer.Item} item - * @param {Number} x - horizontal position - * @param {Number} y - vertical position - * @param {Boolean} isInstant - disables transitions - */ -Outlayer.prototype._positionItem = function( item, x, y, isInstant ) { - if ( isInstant ) { - // if not transition, just set CSS - item.goTo( x, y ); - } else { - item.moveTo( x, y ); - } -}; - -/** - * Any logic you want to do after each layout, - * i.e. size the container - */ -Outlayer.prototype._postLayout = function() { - this.resizeContainer(); -}; - -Outlayer.prototype.resizeContainer = function() { - if ( !this.options.isResizingContainer ) { - return; - } - var size = this._getContainerSize(); - if ( size ) { - this._setContainerMeasure( size.width, true ); - this._setContainerMeasure( size.height, false ); - } -}; - -/** - * Sets width or height of container if returned - * @returns {Object} size - * @param {Number} width - * @param {Number} height - */ -Outlayer.prototype._getContainerSize = noop; - -/** - * @param {Number} measure - size of width or height - * @param {Boolean} isWidth - */ -Outlayer.prototype._setContainerMeasure = function( measure, isWidth ) { - if ( measure === undefined ) { - return; - } - - var elemSize = this.size; - // add padding and border width if border box - if ( elemSize.isBorderBox ) { - measure += isWidth ? elemSize.paddingLeft + elemSize.paddingRight + - elemSize.borderLeftWidth + elemSize.borderRightWidth : - elemSize.paddingBottom + elemSize.paddingTop + - elemSize.borderTopWidth + elemSize.borderBottomWidth; - } - - measure = Math.max( measure, 0 ); - this.element.style[ isWidth ? 'width' : 'height' ] = measure + 'px'; -}; - -/** - * emit eventComplete on a collection of items events - * @param {String} eventName - * @param {Array} items - Outlayer.Items - */ -Outlayer.prototype._emitCompleteOnItems = function( eventName, items ) { - var _this = this; - function onComplete() { - _this.dispatchEvent( eventName + 'Complete', null, [ items ] ); - } - - var count = items.length; - if ( !items || !count ) { - onComplete(); - return; - } - - var doneCount = 0; - function tick() { - doneCount++; - if ( doneCount === count ) { - onComplete(); - } - } - - // bind callback - for ( var i=0, len = items.length; i < len; i++ ) { - var item = items[i]; - item.once( eventName, tick ); - } -}; - -/** - * emits events via eventEmitter and jQuery events - * @param {String} type - name of event - * @param {Event} event - original event - * @param {Array} args - extra arguments - */ -Outlayer.prototype.dispatchEvent = function( type, event, args ) { - // add original event to arguments - var emitArgs = event ? [ event ].concat( args ) : args; - this.emitEvent( type, emitArgs ); - - if ( jQuery ) { - // set this.$element - this.$element = this.$element || jQuery( this.element ); - if ( event ) { - // create jQuery event - var $event = jQuery.Event( event ); - $event.type = type; - this.$element.trigger( $event, args ); - } else { - // just trigger with type if no event available - this.$element.trigger( type, args ); - } - } -}; - -// -------------------------- ignore & stamps -------------------------- // - - -/** - * keep item in collection, but do not lay it out - * ignored items do not get skipped in layout - * @param {Element} elem - */ -Outlayer.prototype.ignore = function( elem ) { - var item = this.getItem( elem ); - if ( item ) { - item.isIgnored = true; - } -}; - -/** - * return item to layout collection - * @param {Element} elem - */ -Outlayer.prototype.unignore = function( elem ) { - var item = this.getItem( elem ); - if ( item ) { - delete item.isIgnored; - } -}; - -/** - * adds elements to stamps - * @param {NodeList, Array, Element, or String} elems - */ -Outlayer.prototype.stamp = function( elems ) { - elems = this._find( elems ); - if ( !elems ) { - return; - } - - this.stamps = this.stamps.concat( elems ); - // ignore - for ( var i=0, len = elems.length; i < len; i++ ) { - var elem = elems[i]; - this.ignore( elem ); - } -}; - -/** - * removes elements to stamps - * @param {NodeList, Array, or Element} elems - */ -Outlayer.prototype.unstamp = function( elems ) { - elems = this._find( elems ); - if ( !elems ){ - return; - } - - for ( var i=0, len = elems.length; i < len; i++ ) { - var elem = elems[i]; - // filter out removed stamp elements - utils.removeFrom( this.stamps, elem ); - this.unignore( elem ); - } - -}; - -/** - * finds child elements - * @param {NodeList, Array, Element, or String} elems - * @returns {Array} elems - */ -Outlayer.prototype._find = function( elems ) { - if ( !elems ) { - return; - } - // if string, use argument as selector string - if ( typeof elems === 'string' ) { - elems = this.element.querySelectorAll( elems ); - } - elems = utils.makeArray( elems ); - return elems; -}; - -Outlayer.prototype._manageStamps = function() { - if ( !this.stamps || !this.stamps.length ) { - return; - } - - this._getBoundingRect(); - - for ( var i=0, len = this.stamps.length; i < len; i++ ) { - var stamp = this.stamps[i]; - this._manageStamp( stamp ); - } -}; - -// update boundingLeft / Top -Outlayer.prototype._getBoundingRect = function() { - // get bounding rect for container element - var boundingRect = this.element.getBoundingClientRect(); - var size = this.size; - this._boundingRect = { - left: boundingRect.left + size.paddingLeft + size.borderLeftWidth, - top: boundingRect.top + size.paddingTop + size.borderTopWidth, - right: boundingRect.right - ( size.paddingRight + size.borderRightWidth ), - bottom: boundingRect.bottom - ( size.paddingBottom + size.borderBottomWidth ) - }; -}; - -/** - * @param {Element} stamp -**/ -Outlayer.prototype._manageStamp = noop; - -/** - * get x/y position of element relative to container element - * @param {Element} elem - * @returns {Object} offset - has left, top, right, bottom - */ -Outlayer.prototype._getElementOffset = function( elem ) { - var boundingRect = elem.getBoundingClientRect(); - var thisRect = this._boundingRect; - var size = getSize( elem ); - var offset = { - left: boundingRect.left - thisRect.left - size.marginLeft, - top: boundingRect.top - thisRect.top - size.marginTop, - right: thisRect.right - boundingRect.right - size.marginRight, - bottom: thisRect.bottom - boundingRect.bottom - size.marginBottom - }; - return offset; -}; - -// -------------------------- resize -------------------------- // - -// enable event handlers for listeners -// i.e. resize -> onresize -Outlayer.prototype.handleEvent = function( event ) { - var method = 'on' + event.type; - if ( this[ method ] ) { - this[ method ]( event ); - } -}; - -/** - * Bind layout to window resizing - */ -Outlayer.prototype.bindResize = function() { - // bind just one listener - if ( this.isResizeBound ) { - return; - } - eventie.bind( window, 'resize', this ); - this.isResizeBound = true; -}; - -/** - * Unbind layout to window resizing - */ -Outlayer.prototype.unbindResize = function() { - if ( this.isResizeBound ) { - eventie.unbind( window, 'resize', this ); - } - this.isResizeBound = false; -}; - -// original debounce by John Hann -// http://unscriptable.com/index.php/2009/03/20/debouncing-javascript-methods/ - -// this fires every resize -Outlayer.prototype.onresize = function() { - if ( this.resizeTimeout ) { - clearTimeout( this.resizeTimeout ); - } - - var _this = this; - function delayed() { - _this.resize(); - delete _this.resizeTimeout; - } - - this.resizeTimeout = setTimeout( delayed, 100 ); -}; - -// debounced, layout on resize -Outlayer.prototype.resize = function() { - // don't trigger if size did not change - // or if resize was unbound. See #9 - if ( !this.isResizeBound || !this.needsResizeLayout() ) { - return; - } - - this.layout(); -}; - -/** - * check if layout is needed post layout - * @returns Boolean - */ -Outlayer.prototype.needsResizeLayout = function() { - var size = getSize( this.element ); - // check that this.size and size are there - // IE8 triggers resize on body size change, so they might not be - var hasSizes = this.size && size; - return hasSizes && size.innerWidth !== this.size.innerWidth; -}; - -// -------------------------- methods -------------------------- // - -/** - * add items to Outlayer instance - * @param {Array or NodeList or Element} elems - * @returns {Array} items - Outlayer.Items -**/ -Outlayer.prototype.addItems = function( elems ) { - var items = this._itemize( elems ); - // add items to collection - if ( items.length ) { - this.items = this.items.concat( items ); - } - return items; -}; - -/** - * Layout newly-appended item elements - * @param {Array or NodeList or Element} elems - */ -Outlayer.prototype.appended = function( elems ) { - var items = this.addItems( elems ); - if ( !items.length ) { - return; - } - // layout and reveal just the new items - this.layoutItems( items, true ); - this.reveal( items ); -}; - -/** - * Layout prepended elements - * @param {Array or NodeList or Element} elems - */ -Outlayer.prototype.prepended = function( elems ) { - var items = this._itemize( elems ); - if ( !items.length ) { - return; - } - // add items to beginning of collection - var previousItems = this.items.slice(0); - this.items = items.concat( previousItems ); - // start new layout - this._resetLayout(); - this._manageStamps(); - // layout new stuff without transition - this.layoutItems( items, true ); - this.reveal( items ); - // layout previous items - this.layoutItems( previousItems ); -}; - -/** - * reveal a collection of items - * @param {Array of Outlayer.Items} items - */ -Outlayer.prototype.reveal = function( items ) { - this._emitCompleteOnItems( 'reveal', items ); - - var len = items && items.length; - for ( var i=0; len && i < len; i++ ) { - var item = items[i]; - item.reveal(); - } -}; - -/** - * hide a collection of items - * @param {Array of Outlayer.Items} items - */ -Outlayer.prototype.hide = function( items ) { - this._emitCompleteOnItems( 'hide', items ); - - var len = items && items.length; - for ( var i=0; len && i < len; i++ ) { - var item = items[i]; - item.hide(); - } -}; - -/** - * reveal item elements - * @param {Array}, {Element}, {NodeList} items - */ -Outlayer.prototype.revealItemElements = function( elems ) { - var items = this.getItems( elems ); - this.reveal( items ); -}; - -/** - * hide item elements - * @param {Array}, {Element}, {NodeList} items - */ -Outlayer.prototype.hideItemElements = function( elems ) { - var items = this.getItems( elems ); - this.hide( items ); -}; - -/** - * get Outlayer.Item, given an Element - * @param {Element} elem - * @param {Function} callback - * @returns {Outlayer.Item} item - */ -Outlayer.prototype.getItem = function( elem ) { - // loop through items to get the one that matches - for ( var i=0, len = this.items.length; i < len; i++ ) { - var item = this.items[i]; - if ( item.element === elem ) { - // return item - return item; - } - } -}; - -/** - * get collection of Outlayer.Items, given Elements - * @param {Array} elems - * @returns {Array} items - Outlayer.Items - */ -Outlayer.prototype.getItems = function( elems ) { - elems = utils.makeArray( elems ); - var items = []; - for ( var i=0, len = elems.length; i < len; i++ ) { - var elem = elems[i]; - var item = this.getItem( elem ); - if ( item ) { - items.push( item ); - } - } - - return items; -}; - -/** - * remove element(s) from instance and DOM - * @param {Array or NodeList or Element} elems - */ -Outlayer.prototype.remove = function( elems ) { - var removeItems = this.getItems( elems ); - - this._emitCompleteOnItems( 'remove', removeItems ); - - // bail if no items to remove - if ( !removeItems || !removeItems.length ) { - return; - } - - for ( var i=0, len = removeItems.length; i < len; i++ ) { - var item = removeItems[i]; - item.remove(); - // remove item from collection - utils.removeFrom( this.items, item ); - } -}; - -// ----- destroy ----- // - -// remove and disable Outlayer instance -Outlayer.prototype.destroy = function() { - // clean up dynamic styles - var style = this.element.style; - style.height = ''; - style.position = ''; - style.width = ''; - // destroy items - for ( var i=0, len = this.items.length; i < len; i++ ) { - var item = this.items[i]; - item.destroy(); - } - - this.unbindResize(); - - var id = this.element.outlayerGUID; - delete instances[ id ]; // remove reference to instance by id - delete this.element.outlayerGUID; - // remove data for jQuery - if ( jQuery ) { - jQuery.removeData( this.element, this.constructor.namespace ); - } - -}; - -// -------------------------- data -------------------------- // - -/** - * get Outlayer instance from element - * @param {Element} elem - * @returns {Outlayer} - */ -Outlayer.data = function( elem ) { - elem = utils.getQueryElement( elem ); - var id = elem && elem.outlayerGUID; - return id && instances[ id ]; -}; - - -// -------------------------- create Outlayer class -------------------------- // - -/** - * create a layout class - * @param {String} namespace - */ -Outlayer.create = function( namespace, options ) { - // sub-class Outlayer - function Layout() { - Outlayer.apply( this, arguments ); - } - // inherit Outlayer prototype, use Object.create if there - if ( Object.create ) { - Layout.prototype = Object.create( Outlayer.prototype ); - } else { - utils.extend( Layout.prototype, Outlayer.prototype ); - } - // set contructor, used for namespace and Item - Layout.prototype.constructor = Layout; - - Layout.defaults = utils.extend( {}, Outlayer.defaults ); - // apply new options - utils.extend( Layout.defaults, options ); - // keep prototype.settings for backwards compatibility (Packery v1.2.0) - Layout.prototype.settings = {}; - - Layout.namespace = namespace; - - Layout.data = Outlayer.data; - - // sub-class Item - Layout.Item = function LayoutItem() { - Item.apply( this, arguments ); - }; - - Layout.Item.prototype = new Item(); - - // -------------------------- declarative -------------------------- // - - utils.htmlInit( Layout, namespace ); - - // -------------------------- jQuery bridge -------------------------- // - - // make into jQuery plugin - if ( jQuery && jQuery.bridget ) { - jQuery.bridget( namespace, Layout ); - } - - return Layout; -}; - -// ----- fin ----- // - -// back in global -Outlayer.Item = Item; - -return Outlayer; - -})); - diff --git a/dashboard-ui/bower_components/paper-behaviors/.bower.json b/dashboard-ui/bower_components/paper-behaviors/.bower.json index a76af97568..713d584e4f 100644 --- a/dashboard-ui/bower_components/paper-behaviors/.bower.json +++ b/dashboard-ui/bower_components/paper-behaviors/.bower.json @@ -45,7 +45,7 @@ "tag": "v1.0.10", "commit": "4b244a542af2c6c271498dfb98b00ed284df1d6a" }, - "_source": "git://github.com/polymerelements/paper-behaviors.git", + "_source": "git://github.com/PolymerElements/paper-behaviors.git", "_target": "^1.0.0", - "_originalSource": "polymerelements/paper-behaviors" + "_originalSource": "PolymerElements/paper-behaviors" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/paper-ripple/.bower.json b/dashboard-ui/bower_components/paper-ripple/.bower.json index 2f654d71c6..157225ee71 100644 --- a/dashboard-ui/bower_components/paper-ripple/.bower.json +++ b/dashboard-ui/bower_components/paper-ripple/.bower.json @@ -32,14 +32,14 @@ "iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0" }, "ignore": [], - "homepage": "https://github.com/polymerelements/paper-ripple", + "homepage": "https://github.com/PolymerElements/paper-ripple", "_release": "1.0.5", "_resolution": { "type": "version", "tag": "v1.0.5", "commit": "d72e7a9a8ab518b901ed18dde492df3b87a93be5" }, - "_source": "git://github.com/polymerelements/paper-ripple.git", + "_source": "git://github.com/PolymerElements/paper-ripple.git", "_target": "^1.0.0", - "_originalSource": "polymerelements/paper-ripple" + "_originalSource": "PolymerElements/paper-ripple" } \ No newline at end of file diff --git a/dashboard-ui/channelitems.html b/dashboard-ui/channelitems.html index 8fc190d04e..4f90e05667 100644 --- a/dashboard-ui/channelitems.html +++ b/dashboard-ui/channelitems.html @@ -4,7 +4,7 @@ Emby -
+
diff --git a/dashboard-ui/channels.html b/dashboard-ui/channels.html index 5338639385..98831c3a3a 100644 --- a/dashboard-ui/channels.html +++ b/dashboard-ui/channels.html @@ -4,7 +4,7 @@ Emby -
+
diff --git a/dashboard-ui/cinemamodeconfiguration.html b/dashboard-ui/cinemamodeconfiguration.html index 2286bb9718..5e13c2518e 100644 --- a/dashboard-ui/cinemamodeconfiguration.html +++ b/dashboard-ui/cinemamodeconfiguration.html @@ -4,7 +4,7 @@ ${TitlePlayback} -
+
diff --git a/dashboard-ui/components/collectioneditor/collectioneditor.js b/dashboard-ui/components/collectioneditor/collectioneditor.js index a5de2a6b46..99db7de03b 100644 --- a/dashboard-ui/components/collectioneditor/collectioneditor.js +++ b/dashboard-ui/components/collectioneditor/collectioneditor.js @@ -1,4 +1,4 @@ -define([], function () { +define(['components/paperdialoghelper', 'paper-checkbox', 'paper-dialog'], function () { function onSubmit() { Dashboard.showLoadingMsg(); @@ -192,39 +192,36 @@ items = items || []; - require(['components/paperdialoghelper'], function () { + var dlg = PaperDialogHelper.createDialog({ + size: 'small' + }); - var dlg = PaperDialogHelper.createDialog({ - size: 'small' - }); + var html = ''; + html += '

'; + html += ''; - var html = ''; - html += '

'; - html += ''; + var title = items.length ? Globalize.translate('HeaderAddToCollection') : Globalize.translate('HeaderNewCollection'); - var title = items.length ? Globalize.translate('HeaderAddToCollection') : Globalize.translate('HeaderNewCollection'); + html += '
' + title + '
'; + html += '

'; - html += '
' + title + '
'; - html += ''; + html += '
'; + html += getEditorHtml(); + html += '
'; - html += '
'; - html += getEditorHtml(); - html += '
'; + dlg.innerHTML = html; + document.body.appendChild(dlg); - dlg.innerHTML = html; - document.body.appendChild(dlg); + var editorContent = dlg.querySelector('.editorContent'); + initEditor(editorContent, items); - var editorContent = dlg.querySelector('.editorContent'); - initEditor(editorContent, items); + $(dlg).on('iron-overlay-closed', onDialogClosed); - $(dlg).on('iron-overlay-closed', onDialogClosed); + PaperDialogHelper.openWithHash(dlg, 'collectioneditor'); - PaperDialogHelper.openWithHash(dlg, 'collectioneditor'); + $('.btnCloseDialog', dlg).on('click', function () { - $('.btnCloseDialog', dlg).on('click', function () { - - PaperDialogHelper.close(dlg); - }); + PaperDialogHelper.close(dlg); }); }; } diff --git a/dashboard-ui/components/dialog.js b/dashboard-ui/components/dialog.js new file mode 100644 index 0000000000..57e7b22b0c --- /dev/null +++ b/dashboard-ui/components/dialog.js @@ -0,0 +1,55 @@ +define(['fade-in-animation', 'fade-out-animation', 'paper-dialog'], function () { + + return function (options) { + + var title = options.title; + var message = options.message; + var buttons = options.buttons; + var callback = options.callback; + + var id = 'paperdlg' + new Date().getTime(); + + var html = ''; + html += '

' + title + '

'; + html += '
' + message + '
'; + html += '
'; + + var index = 0; + html += buttons.map(function (b) { + + var dataIndex = ' data-index="' + index + '"'; + index++; + return '' + b + ''; + + }).join(''); + + html += '
'; + html += '
'; + + $(document.body).append(html); + + // This timeout is obviously messy but it's unclear how to determine when the webcomponent is ready for use + // element onload never fires + setTimeout(function () { + + var dlg = document.getElementById(id); + + $('.dialogButton', dlg).on('click', function () { + + if (callback) { + callback(parseInt(this.getAttribute('data-index'))); + } + + }); + + // Has to be assigned a z-index after the call to .open() + dlg.addEventListener('iron-overlay-closed', function (e) { + + dlg.parentNode.removeChild(dlg); + }); + + dlg.open(); + + }, 300); + }; +}); \ No newline at end of file diff --git a/dashboard-ui/components/directorybrowser/directorybrowser.js b/dashboard-ui/components/directorybrowser/directorybrowser.js index e71fadb888..bda7735026 100644 --- a/dashboard-ui/components/directorybrowser/directorybrowser.js +++ b/dashboard-ui/components/directorybrowser/directorybrowser.js @@ -1,4 +1,4 @@ -define([], function () { +define(['components/paperdialoghelper', 'paper-item'], function () { var systemInfo; function getSystemInfo() { @@ -213,55 +213,52 @@ getSystemInfo().then(function (systemInfo) { - require(['components/paperdialoghelper'], function () { - - var dlg = PaperDialogHelper.createDialog({ - theme: 'a', - size: 'medium' - }); - - dlg.classList.add('directoryPicker'); - - var html = ''; - html += '

'; - html += ''; - html += '
' + (options.header || Globalize.translate('HeaderSelectPath')) + '
'; - html += '

'; - - html += '
'; - html += getEditorHtml(options, systemInfo); - html += '
'; - - dlg.innerHTML = html; - document.body.appendChild(dlg); - - var editorContent = dlg.querySelector('.editorContent'); - initEditor(editorContent, options, fileOptions); - - // Has to be assigned a z-index after the call to .open() - $(dlg).on('iron-overlay-opened', function () { - this.querySelector('#txtDirectoryPickerPath input').focus(); - }); - $(dlg).on('iron-overlay-closed', onDialogClosed); - - PaperDialogHelper.openWithHash(dlg, 'directorybrowser'); - - $('.btnCloseDialog', dlg).on('click', function () { - - PaperDialogHelper.close(dlg); - }); - - currentDialog = dlg; - - var txtCurrentPath = $('#txtDirectoryPickerPath', editorContent); - - if (options.path) { - txtCurrentPath.val(options.path); - } - - refreshDirectoryBrowser(editorContent, txtCurrentPath.val()); + var dlg = PaperDialogHelper.createDialog({ + theme: 'a', + size: 'medium' }); + dlg.classList.add('directoryPicker'); + + var html = ''; + html += '

'; + html += ''; + html += '
' + (options.header || Globalize.translate('HeaderSelectPath')) + '
'; + html += '

'; + + html += '
'; + html += getEditorHtml(options, systemInfo); + html += '
'; + + dlg.innerHTML = html; + document.body.appendChild(dlg); + + var editorContent = dlg.querySelector('.editorContent'); + initEditor(editorContent, options, fileOptions); + + // Has to be assigned a z-index after the call to .open() + $(dlg).on('iron-overlay-opened', function () { + this.querySelector('#txtDirectoryPickerPath input').focus(); + }); + $(dlg).on('iron-overlay-closed', onDialogClosed); + + PaperDialogHelper.openWithHash(dlg, 'directorybrowser'); + + $('.btnCloseDialog', dlg).on('click', function () { + + PaperDialogHelper.close(dlg); + }); + + currentDialog = dlg; + + var txtCurrentPath = $('#txtDirectoryPickerPath', editorContent); + + if (options.path) { + txtCurrentPath.val(options.path); + } + + refreshDirectoryBrowser(editorContent, txtCurrentPath.val()); + }); }; diff --git a/dashboard-ui/components/imagedownloader/imagedownloader.js b/dashboard-ui/components/imagedownloader/imagedownloader.js index 4bafbf5a26..600b756995 100644 --- a/dashboard-ui/components/imagedownloader/imagedownloader.js +++ b/dashboard-ui/components/imagedownloader/imagedownloader.js @@ -1,4 +1,4 @@ -(function ($, window, document) { +define(['components/paperdialoghelper', 'paper-checkbox', 'paper-dialog'], function () { var currentItemId; var currentItemType; @@ -312,7 +312,7 @@ currentDeferred.resolveWith(null, [hasChanges]); } - window.ImageDownloader = { + return { show: function (itemId, itemType, imageType) { var deferred = DeferredBuilder.Deferred(); @@ -323,12 +323,8 @@ browsableImageType = imageType || 'Primary'; selectedProvider = null; - require(['components/paperdialoghelper'], function () { - - showEditor(itemId, itemType); - }); + showEditor(itemId, itemType); return deferred.promise(); } }; - -})(jQuery, window, document); \ No newline at end of file +}); \ No newline at end of file diff --git a/dashboard-ui/components/imageeditor/imageeditor.js b/dashboard-ui/components/imageeditor/imageeditor.js index 7440601dd2..891ead37d6 100644 --- a/dashboard-ui/components/imageeditor/imageeditor.js +++ b/dashboard-ui/components/imageeditor/imageeditor.js @@ -1,4 +1,4 @@ -(function ($, document, window, FileReader, escape) { +define(['components/paperdialoghelper', 'css!css/metadataeditor.css'], function () { var currentItem; var currentDeferred; @@ -190,7 +190,7 @@ } function showImageDownloader(page, imageType) { - require(['components/imagedownloader/imagedownloader'], function () { + require(['components/imagedownloader/imagedownloader'], function (ImageDownloader) { ImageDownloader.show(currentItem.Id, currentItem.Type, imageType).then(function (hasChanged) { @@ -209,7 +209,7 @@ require(['components/imageuploader/imageuploader'], function () { ImageUploader.show(currentItem.Id, { - + theme: options.theme }).then(function (hasChanged) { @@ -285,7 +285,7 @@ currentDeferred.resolveWith(null, [hasChanges]); } - window.ImageEditor = { + return { show: function (itemId, options) { var deferred = DeferredBuilder.Deferred(); @@ -293,13 +293,8 @@ currentDeferred = deferred; hasChanges = false; - require(['components/paperdialoghelper'], function () { - - Dashboard.importCss('css/metadataeditor.css'); - showEditor(itemId, options); - }); + showEditor(itemId, options); return deferred.promise(); } }; - -})(jQuery, document, window, window.FileReader, escape); \ No newline at end of file +}); \ No newline at end of file diff --git a/dashboard-ui/components/imageuploader/imageuploader.js b/dashboard-ui/components/imageuploader/imageuploader.js index 24d47f6693..29336ff284 100644 --- a/dashboard-ui/components/imageuploader/imageuploader.js +++ b/dashboard-ui/components/imageuploader/imageuploader.js @@ -182,7 +182,7 @@ currentDeferred = deferred; hasChanges = false; - require(['components/paperdialoghelper'], function () { + require(['components/paperdialoghelper', 'paper-dialog'], function () { showEditor(itemId, options); }); diff --git a/dashboard-ui/components/medialibrarycreator/medialibrarycreator.js b/dashboard-ui/components/medialibrarycreator/medialibrarycreator.js index 93e28b3417..05f9d929cb 100644 --- a/dashboard-ui/components/medialibrarycreator/medialibrarycreator.js +++ b/dashboard-ui/components/medialibrarycreator/medialibrarycreator.js @@ -1,4 +1,4 @@ -define([], function () { +define(['components/paperdialoghelper', 'paper-dialog'], function () { var currentDeferred; var hasChanges; @@ -186,57 +186,53 @@ currentDeferred = deferred; hasChanges = false; - require(['components/paperdialoghelper'], function () { + var xhr = new XMLHttpRequest(); + xhr.open('GET', 'components/medialibrarycreator/medialibrarycreator.template.html', true); - var xhr = new XMLHttpRequest(); - xhr.open('GET', 'components/medialibrarycreator/medialibrarycreator.template.html', true); + xhr.onload = function (e) { - xhr.onload = function (e) { + var template = this.response; + var dlg = PaperDialogHelper.createDialog({ + size: 'small', + theme: 'a', - var template = this.response; - var dlg = PaperDialogHelper.createDialog({ - size: 'small', - theme: 'a', + // In (at least) chrome this is causing the text field to not be editable + modal: false + }); - // In (at least) chrome this is causing the text field to not be editable - modal: false - }); + var html = ''; + html += '

'; + html += ''; - var html = ''; - html += '

'; - html += ''; + var title = Globalize.translate('ButtonAddMediaLibrary'); - var title = Globalize.translate('ButtonAddMediaLibrary'); + html += '
' + title + '
'; + html += '

'; - html += '
' + title + '
'; - html += ''; + html += '
'; + html += Globalize.translateDocument(template); + html += '
'; - html += '
'; - html += Globalize.translateDocument(template); - html += '
'; + dlg.innerHTML = html; + document.body.appendChild(dlg); - dlg.innerHTML = html; - document.body.appendChild(dlg); + var editorContent = dlg.querySelector('.editorContent'); + initEditor(editorContent, options.collectionTypeOptions); - var editorContent = dlg.querySelector('.editorContent'); - initEditor(editorContent, options.collectionTypeOptions); + $(dlg).on('iron-overlay-closed', onDialogClosed); - $(dlg).on('iron-overlay-closed', onDialogClosed); + PaperDialogHelper.openWithHash(dlg, 'medialibrarycreator'); - PaperDialogHelper.openWithHash(dlg, 'medialibrarycreator'); + $('.btnCloseDialog', dlg).on('click', function () { - $('.btnCloseDialog', dlg).on('click', function () { + PaperDialogHelper.close(dlg); + }); - PaperDialogHelper.close(dlg); - }); + paths = []; + renderPaths(editorContent); + } - paths = []; - renderPaths(editorContent); - } - - xhr.send(); - - }); + xhr.send(); return deferred.promise(); }; diff --git a/dashboard-ui/components/medialibraryeditor/medialibraryeditor.js b/dashboard-ui/components/medialibraryeditor/medialibraryeditor.js index 60b8a08b05..6038ee7eac 100644 --- a/dashboard-ui/components/medialibraryeditor/medialibraryeditor.js +++ b/dashboard-ui/components/medialibraryeditor/medialibraryeditor.js @@ -1,4 +1,4 @@ -define([], function () { +define(['components/paperdialoghelper'], function () { var currentDeferred; var hasChanges; @@ -140,54 +140,50 @@ currentDeferred = deferred; hasChanges = false; - require(['components/paperdialoghelper'], function () { + var xhr = new XMLHttpRequest(); + xhr.open('GET', 'components/medialibraryeditor/medialibraryeditor.template.html', true); - var xhr = new XMLHttpRequest(); - xhr.open('GET', 'components/medialibraryeditor/medialibraryeditor.template.html', true); + xhr.onload = function (e) { - xhr.onload = function (e) { + var template = this.response; + var dlg = PaperDialogHelper.createDialog({ + size: 'small', + theme: 'a', - var template = this.response; - var dlg = PaperDialogHelper.createDialog({ - size: 'small', - theme: 'a', + // In (at least) chrome this is causing the text field to not be editable + modal: false + }); - // In (at least) chrome this is causing the text field to not be editable - modal: false - }); + var html = ''; + html += '

'; + html += ''; - var html = ''; - html += '

'; - html += ''; + html += '
' + options.library.Name + '
'; + html += '

'; - html += '
' + options.library.Name + '
'; - html += ''; + html += '
'; + html += Globalize.translateDocument(template); + html += '
'; - html += '
'; - html += Globalize.translateDocument(template); - html += '
'; + dlg.innerHTML = html; + document.body.appendChild(dlg); - dlg.innerHTML = html; - document.body.appendChild(dlg); + var editorContent = dlg.querySelector('.editorContent'); + initEditor(editorContent, options); - var editorContent = dlg.querySelector('.editorContent'); - initEditor(editorContent, options); + $(dlg).on('iron-overlay-closed', onDialogClosed); - $(dlg).on('iron-overlay-closed', onDialogClosed); + PaperDialogHelper.openWithHash(dlg, 'medialibraryeditor'); - PaperDialogHelper.openWithHash(dlg, 'medialibraryeditor'); + $('.btnCloseDialog', dlg).on('click', function () { - $('.btnCloseDialog', dlg).on('click', function () { + PaperDialogHelper.close(dlg); + }); - PaperDialogHelper.close(dlg); - }); + refreshLibraryFromServer(editorContent); + } - refreshLibraryFromServer(editorContent); - } - - xhr.send(); - - }); + xhr.send(); return deferred.promise(); }; diff --git a/dashboard-ui/components/metadataeditor/metadataeditor.js b/dashboard-ui/components/metadataeditor/metadataeditor.js index d9f135cb4c..5f282702bb 100644 --- a/dashboard-ui/components/metadataeditor/metadataeditor.js +++ b/dashboard-ui/components/metadataeditor/metadataeditor.js @@ -1,112 +1 @@ -(function ($, document, window, FileReader, escape) { - - var currentItem; - - function getBaseRemoteOptions() { - - var options = {}; - - options.itemId = currentItem.Id; - - return options; - } - - function reload(page, item) { - - Dashboard.showLoadingMsg(); - - if (item) { - reloadItem(page, item); - } - else { - ApiClient.getItem(Dashboard.getCurrentUserId(), currentItem.Id).then(function (item) { - reloadItem(page, item); - }); - } - } - - function reloadItem(page, item) { - - currentItem = item; - - } - - function initEditor(page) { - - } - - function showEditor(itemId) { - - Dashboard.showLoadingMsg(); - - var xhr = new XMLHttpRequest(); - xhr.open('GET', 'components/metadataeditor/metadataeditor.template.html', true); - - xhr.onload = function (e) { - - var template = this.response; - ApiClient.getItem(Dashboard.getCurrentUserId(), itemId).then(function (item) { - - var dlg = document.createElement('paper-dialog'); - - dlg.setAttribute('with-backdrop', 'with-backdrop'); - dlg.setAttribute('role', 'alertdialog'); - // without this safari will scroll the background instead of the dialog contents - dlg.setAttribute('modal', 'modal'); - // seeing max call stack size exceeded in the debugger with this - dlg.setAttribute('noAutoFocus', 'noAutoFocus'); - dlg.entryAnimation = 'scale-up-animation'; - dlg.exitAnimation = 'fade-out-animation'; - dlg.classList.add('smoothScrollY'); - - var html = ''; - html += '

'; - html += ''; - html += '
' + Globalize.translate('ButtonEdit') + '
'; - html += '

'; - - html += '
'; - html += Globalize.translateDocument(template); - html += '
'; - - dlg.innerHTML = html; - document.body.appendChild(dlg); - - initEditor(dlg); - - // Has to be assigned a z-index after the call to .open() - $(dlg).on('iron-overlay-closed', onDialogClosed); - - PaperDialogHelper.openWithHash(dlg, 'metadataeditor'); - - var editorContent = dlg.querySelector('.editorContent'); - reload(editorContent, item); - - $('.btnCloseDialog', dlg).on('click', function () { - - PaperDialogHelper.close(dlg); - }); - }); - } - - xhr.send(); - } - - function onDialogClosed() { - - $(this).remove(); - Dashboard.hideLoadingMsg(); - } - - window.MetadataEditor = { - show: function (itemId) { - - require(['components/paperdialoghelper'], function () { - - Dashboard.importCss('css/metadataeditor.css'); - showEditor(itemId); - }); - } - }; - -})(jQuery, document, window, window.FileReader, escape); \ No newline at end of file + \ No newline at end of file diff --git a/dashboard-ui/components/playlisteditor/playlisteditor.js b/dashboard-ui/components/playlisteditor/playlisteditor.js index 07d895f602..2c30213a74 100644 --- a/dashboard-ui/components/playlisteditor/playlisteditor.js +++ b/dashboard-ui/components/playlisteditor/playlisteditor.js @@ -1,4 +1,4 @@ -define([], function () { +define(['components/paperdialoghelper', 'paper-dialog'], function () { var lastPlaylistId = ''; @@ -197,39 +197,36 @@ items = items || []; - require(['components/paperdialoghelper'], function () { + var dlg = PaperDialogHelper.createDialog({ + size: 'small' + }); - var dlg = PaperDialogHelper.createDialog({ - size: 'small' - }); + var html = ''; + html += '

'; + html += ''; - var html = ''; - html += '

'; - html += ''; + var title = Globalize.translate('HeaderAddToPlaylist'); - var title = Globalize.translate('HeaderAddToPlaylist'); + html += '
' + title + '
'; + html += '

'; - html += '
' + title + '
'; - html += ''; + html += '
'; + html += getEditorHtml(); + html += '
'; - html += '
'; - html += getEditorHtml(); - html += '
'; + dlg.innerHTML = html; + document.body.appendChild(dlg); - dlg.innerHTML = html; - document.body.appendChild(dlg); + var editorContent = dlg.querySelector('.editorContent'); + initEditor(editorContent, items); - var editorContent = dlg.querySelector('.editorContent'); - initEditor(editorContent, items); + $(dlg).on('iron-overlay-closed', onDialogClosed); - $(dlg).on('iron-overlay-closed', onDialogClosed); + PaperDialogHelper.openWithHash(dlg, 'playlisteditor'); - PaperDialogHelper.openWithHash(dlg, 'playlisteditor'); + $('.btnCloseDialog', dlg).on('click', function () { - $('.btnCloseDialog', dlg).on('click', function () { - - PaperDialogHelper.close(dlg); - }); + PaperDialogHelper.close(dlg); }); }; } diff --git a/dashboard-ui/components/sharingwidget.js b/dashboard-ui/components/sharingwidget.js new file mode 100644 index 0000000000..4601cf10bf --- /dev/null +++ b/dashboard-ui/components/sharingwidget.js @@ -0,0 +1,78 @@ +define(['thirdparty/social-share-kit-1.0.4/dist/js/social-share-kit.min', 'css!thirdparty/social-share-kit-1.0.4/dist/css/social-share-kit.css', 'fade-in-animation', 'fade-out-animation', 'paper-dialog'], function () { + + function showMenu(options, successCallback, cancelCallback) { + + var id = 'dlg' + new Date().getTime(); + var html = ''; + + html += ''; + + html += '

' + Globalize.translate('HeaderShare') + '

'; + + html += '
'; + html += '
'; + + // We can only do facebook if we can guarantee that the current page is available over the internet, since FB will try to probe it. + if (Dashboard.isConnectMode()) { + html += ''; + } + + html += '
'; + html += '
'; + + html += '
'; + html += Globalize.translate('ButtonShareHelp'); + html += '
'; + + html += '
'; + html += '' + Globalize.translate('ButtonCancel') + ''; + html += '
'; + + html += '
'; + + $(document.body).append(html); + + var isShared = false; + + setTimeout(function () { + + var dlg = document.getElementById(id); + + dlg.open(); + + var shareInfo = options.share; + + SocialShareKit.init({ + selector: '#' + id + ' .ssk', + url: shareInfo.Url, + title: shareInfo.Name, + text: shareInfo.Overview, + image: shareInfo.ImageUrl, + via: 'Emby' + }); + + // Has to be assigned a z-index after the call to .open() + $(dlg).on('iron-overlay-closed', function () { + $(this).remove(); + + if (isShared) { + successCallback(options); + } else { + cancelCallback(options); + } + }); + + // Has to be assigned a z-index after the call to .open() + $('.ssk', dlg).on('click', function () { + isShared = true; + dlg.close(); + }); + + }, 100); + + } + + return { + showMenu: showMenu + }; +}); \ No newline at end of file diff --git a/dashboard-ui/components/subtitleeditor/subtitleeditor.js b/dashboard-ui/components/subtitleeditor/subtitleeditor.js index 381bd2c88c..18859d8955 100644 --- a/dashboard-ui/components/subtitleeditor/subtitleeditor.js +++ b/dashboard-ui/components/subtitleeditor/subtitleeditor.js @@ -1,4 +1,4 @@ -(function ($, window, document) { +define(['components/paperdialoghelper'], function () { var currentItem; @@ -12,7 +12,7 @@ var url = 'Videos/' + currentItem.Id + '/Subtitles/' + index; ApiClient.ajax({ - + type: 'GET', url: url @@ -385,14 +385,7 @@ Dashboard.hideLoadingMsg(); } - window.SubtitleEditor = { - show: function (itemId) { - - require(['components/paperdialoghelper'], function () { - - showEditor(itemId); - }); - } + return { + show: showEditor }; - -})(jQuery, window, document); \ No newline at end of file +}); \ No newline at end of file diff --git a/dashboard-ui/components/testermessage.js b/dashboard-ui/components/testermessage.js new file mode 100644 index 0000000000..467e753cf7 --- /dev/null +++ b/dashboard-ui/components/testermessage.js @@ -0,0 +1,29 @@ +(function () { + + function onPageShow() { + + var msg; + + var settingsKey = "betatester"; + + var expectedValue = new Date().toDateString() + "3"; + if (appStorage.getItem(settingsKey) == expectedValue) { + return; + } + + msg = 'At your convenience, please take a moment to visit the Emby Community and leave testing feedback related to this beta build. Your feedback will help us improve the release before it goes public. Thank you for being a part of the Emby beta test team.'; + + msg += "

"; + msg += 'Visit Emby community'; + + Dashboard.alert({ + message: msg, + title: 'Hello Emby Beta Tester!' + }); + + appStorage.setItem(settingsKey, expectedValue); + } + + pageClassOn('pageshow', "homePage", onPageShow); + +})(); \ No newline at end of file diff --git a/dashboard-ui/components/tvproviders/schedulesdirect.js b/dashboard-ui/components/tvproviders/schedulesdirect.js index b5a7bf4e63..30697c8708 100644 --- a/dashboard-ui/components/tvproviders/schedulesdirect.js +++ b/dashboard-ui/components/tvproviders/schedulesdirect.js @@ -1,4 +1,4 @@ -define([], function () { +define(['paper-checkbox'], function () { return function (page, providerId, options) { diff --git a/dashboard-ui/css/librarymenu.css b/dashboard-ui/css/librarymenu.css index 2018fbdb6e..606e8b10ab 100644 --- a/dashboard-ui/css/librarymenu.css +++ b/dashboard-ui/css/librarymenu.css @@ -312,6 +312,19 @@ display: none; } +.minimumSizeTabs .libraryViewNav .tab-content { + display: block !important; +} + +.minimumSizeTabs .libraryViewNav paper-tab { + height: auto !important; + flex-grow: 0 !important; +} + +.minimumSizeTabs .libraryViewNav #tabsContainer { + flex-grow: 0 !important; +} + @media all and (max-width: 400px) { .libraryMenuButtonText { diff --git a/dashboard-ui/dashboard.html b/dashboard-ui/dashboard.html index 926531bf9c..dcf04f32d0 100644 --- a/dashboard-ui/dashboard.html +++ b/dashboard-ui/dashboard.html @@ -4,7 +4,7 @@ ${TitleServer} -
+
diff --git a/dashboard-ui/dashboardgeneral.html b/dashboard-ui/dashboardgeneral.html index 47db5547f4..ddca71a959 100644 --- a/dashboard-ui/dashboardgeneral.html +++ b/dashboard-ui/dashboardgeneral.html @@ -4,7 +4,7 @@ ${TitleServer} -
+
@@ -21,7 +21,7 @@
${LabelFriendlyServerNameHelp}
-

+

diff --git a/dashboard-ui/dashboardhosting.html b/dashboard-ui/dashboardhosting.html index 37cd8a6704..6b0c61a8fa 100644 --- a/dashboard-ui/dashboardhosting.html +++ b/dashboard-ui/dashboardhosting.html @@ -4,7 +4,7 @@ ${TitleAdvanced} -
+
diff --git a/dashboard-ui/edititemmetadata.html b/dashboard-ui/edititemmetadata.html index edd721c7e2..0e2b1db66a 100644 --- a/dashboard-ui/edititemmetadata.html +++ b/dashboard-ui/edititemmetadata.html @@ -4,7 +4,7 @@ Emby -
+
    diff --git a/dashboard-ui/index.html b/dashboard-ui/index.html index bf406f97a4..cc1367346f 100644 --- a/dashboard-ui/index.html +++ b/dashboard-ui/index.html @@ -4,7 +4,7 @@ Emby -
    +
    diff --git a/dashboard-ui/itemlist.html b/dashboard-ui/itemlist.html index 63d8aebae0..9357d19e17 100644 --- a/dashboard-ui/itemlist.html +++ b/dashboard-ui/itemlist.html @@ -4,7 +4,7 @@ -
    +
    diff --git a/dashboard-ui/livetv.html b/dashboard-ui/livetv.html index 473f8a7698..2008038556 100644 --- a/dashboard-ui/livetv.html +++ b/dashboard-ui/livetv.html @@ -4,7 +4,7 @@ Emby -
    +
    diff --git a/dashboard-ui/livetvnewrecording.html b/dashboard-ui/livetvnewrecording.html index 5077de8634..f51c338af5 100644 --- a/dashboard-ui/livetvnewrecording.html +++ b/dashboard-ui/livetvnewrecording.html @@ -4,7 +4,7 @@ Emby -
    +
    diff --git a/dashboard-ui/livetvseriestimer.html b/dashboard-ui/livetvseriestimer.html index 4abe5acfd2..071edf8aec 100644 --- a/dashboard-ui/livetvseriestimer.html +++ b/dashboard-ui/livetvseriestimer.html @@ -4,7 +4,7 @@ Emby -
    +
    diff --git a/dashboard-ui/livetvsettings.html b/dashboard-ui/livetvsettings.html index 7ce4804094..6663546de0 100644 --- a/dashboard-ui/livetvsettings.html +++ b/dashboard-ui/livetvsettings.html @@ -4,7 +4,7 @@ ${TitleLiveTV} -
    +
    diff --git a/dashboard-ui/metadataadvanced.html b/dashboard-ui/metadataadvanced.html index bcdc084b5d..73f39f8887 100644 --- a/dashboard-ui/metadataadvanced.html +++ b/dashboard-ui/metadataadvanced.html @@ -4,7 +4,7 @@ ${TitleMetadata} -
    +
    diff --git a/dashboard-ui/movies.html b/dashboard-ui/movies.html index 8a5aa823b9..c6aa2dfb36 100644 --- a/dashboard-ui/movies.html +++ b/dashboard-ui/movies.html @@ -4,7 +4,7 @@ Emby -
    +
    diff --git a/dashboard-ui/music.html b/dashboard-ui/music.html index 47413a6304..fb020e470c 100644 --- a/dashboard-ui/music.html +++ b/dashboard-ui/music.html @@ -4,7 +4,7 @@ Emby -
    +
    ${TabSuggestions} diff --git a/dashboard-ui/mypreferencesdisplay.html b/dashboard-ui/mypreferencesdisplay.html index e71d65cfb4..3818e38962 100644 --- a/dashboard-ui/mypreferencesdisplay.html +++ b/dashboard-ui/mypreferencesdisplay.html @@ -5,7 +5,7 @@ Emby -
    +
    diff --git a/dashboard-ui/mypreferenceshome.html b/dashboard-ui/mypreferenceshome.html index 8bd4bb4869..4e9cc41850 100644 --- a/dashboard-ui/mypreferenceshome.html +++ b/dashboard-ui/mypreferenceshome.html @@ -5,7 +5,7 @@ Emby -
    +
    diff --git a/dashboard-ui/mypreferenceslanguages.html b/dashboard-ui/mypreferenceslanguages.html index e79570e541..99160380b8 100644 --- a/dashboard-ui/mypreferenceslanguages.html +++ b/dashboard-ui/mypreferenceslanguages.html @@ -5,7 +5,7 @@ Emby -
    +
    diff --git a/dashboard-ui/myprofile.html b/dashboard-ui/myprofile.html index 96a7a46ef0..308b32e835 100644 --- a/dashboard-ui/myprofile.html +++ b/dashboard-ui/myprofile.html @@ -4,7 +4,7 @@ Emby -
    +

    diff --git a/dashboard-ui/mysyncsettings.html b/dashboard-ui/mysyncsettings.html index aa77c4355f..e09a9f6761 100644 --- a/dashboard-ui/mysyncsettings.html +++ b/dashboard-ui/mysyncsettings.html @@ -5,7 +5,7 @@ Emby -
    +
    diff --git a/dashboard-ui/nowplaying.html b/dashboard-ui/nowplaying.html index fbbbc71f54..16a3e96429 100644 --- a/dashboard-ui/nowplaying.html +++ b/dashboard-ui/nowplaying.html @@ -4,7 +4,7 @@ Emby -
    +
    diff --git a/dashboard-ui/photos.html b/dashboard-ui/photos.html index 90547cb25a..890d835ad5 100644 --- a/dashboard-ui/photos.html +++ b/dashboard-ui/photos.html @@ -4,7 +4,7 @@ Emby -
    +
    diff --git a/dashboard-ui/scripts/actionsheet.js b/dashboard-ui/scripts/actionsheet.js index 3f41fe99f5..09a49b2c93 100644 --- a/dashboard-ui/scripts/actionsheet.js +++ b/dashboard-ui/scripts/actionsheet.js @@ -2,6 +2,13 @@ function show(options) { + require(['paper-menu', 'paper-dialog', 'paper-dialog-scrollable', 'scale-up-animation', 'fade-out-animation'], function () { + showInternal(options); + }); + } + + function showInternal(options) { + // items // positionTo // showCancel diff --git a/dashboard-ui/scripts/chromecast.js b/dashboard-ui/scripts/chromecast.js index 7fc46ff7c9..b612b2442b 100644 --- a/dashboard-ui/scripts/chromecast.js +++ b/dashboard-ui/scripts/chromecast.js @@ -318,14 +318,16 @@ if (endpointInfo) { - var deferred = $.Deferred(); - deferred.resolveWith(null, [endpointInfo]); - return deferred.promise(); + return new Promise(function (resolve, reject) { + + resolve(endpointInfo); + }); } return ApiClient.getJSON(ApiClient.getUrl('System/Endpoint')).then(function (info) { endpointInfo = info; + return info; }); } diff --git a/dashboard-ui/scripts/librarybrowser.js b/dashboard-ui/scripts/librarybrowser.js index b1f70da6e4..67c7ab1f5d 100644 --- a/dashboard-ui/scripts/librarybrowser.js +++ b/dashboard-ui/scripts/librarybrowser.js @@ -153,6 +153,11 @@ }, enableFullPaperTabs: function () { + + if (browserInfo.animate && !browserInfo.mobile) { + return true; + } + return AppInfo.isNativeApp; }, @@ -162,11 +167,15 @@ return false; } - if (browserInfo.safari) { + if (!browserInfo.animate) { return false; } - return false; + if (browserInfo.mobile) { + return false; + } + + return true; }, allowSwipe: function (target) { @@ -195,12 +204,45 @@ return true; }, + getTabsAnimationConfig: function (elem, reverse) { + + if (browserInfo.mobile) { + + } + + return { + // scale up + 'entry': { + name: 'fade-in-animation', + node: elem, + timing: { duration: 160, easing: 'ease-out' } + }, + // fade out + 'exit': { + name: 'fade-out-animation', + node: elem, + timing: { duration: 200, easing: 'ease-out' } + } + }; + + }, + configureSwipeTabs: function (ownerpage, tabs, pages) { if (LibraryBrowser.animatePaperTabs()) { - // Safari doesn't handle the horizontal swiping very well - pages.entryAnimation = 'slide-from-right-animation'; - pages.exitAnimation = 'slide-left-animation'; + if (browserInfo.mobile) { + + require(['slide-left-animation', 'slide-from-right-animation'], function () { + pages.entryAnimation = 'slide-from-right-animation'; + pages.exitAnimation = 'slide-left-animation'; + }); + } else { + + require(['fade-in-animation', 'fade-out-animation'], function () { + pages.entryAnimation = 'fade-in-animation'; + pages.exitAnimation = 'fade-out-animation'; + }); + } } var pageCount = pages.querySelectorAll('neon-animatable').length; @@ -282,7 +324,7 @@ // When transition animations are used, add a content loading delay to allow the animations to finish // Otherwise with both operations happening at the same time, it can cause the animation to not run at full speed. var pgs = this; - var delay = LibraryBrowser.animatePaperTabs() || !tabs.noSlide ? 500 : 0; + var delay = LibraryBrowser.animatePaperTabs() || !tabs.noSlide ? 300 : 0; setTimeout(function () { pgs.dispatchEvent(new CustomEvent("tabchange", {})); @@ -811,7 +853,7 @@ editImages: function (itemId) { - require(['components/imageeditor/imageeditor'], function () { + require(['components/imageeditor/imageeditor'], function (ImageEditor) { ImageEditor.show(itemId); }); @@ -819,7 +861,7 @@ editSubtitles: function (itemId) { - require(['components/subtitleeditor/subtitleeditor'], function () { + require(['components/subtitleeditor/subtitleeditor'], function (SubtitleEditor) { SubtitleEditor.show(itemId); }); @@ -2785,82 +2827,82 @@ showSortMenu: function (options) { - var dlg = document.createElement('paper-dialog'); + require(['paper-dialog', 'components/paperdialoghelper', 'paper-radio-button', 'paper-radio-group', 'scale-up-animation', 'fade-in-animation', 'fade-out-animation'], function () { - dlg.setAttribute('with-backdrop', 'with-backdrop'); - dlg.setAttribute('role', 'alertdialog'); + var dlg = document.createElement('paper-dialog'); - dlg.entryAnimation = 'fade-in-animation'; - dlg.exitAnimation = 'fade-out-animation'; + dlg.setAttribute('with-backdrop', 'with-backdrop'); + dlg.setAttribute('role', 'alertdialog'); - // The animations flicker in IE and Firefox (probably wherever the polyfill is used) - if (browserInfo.animate) { - dlg.animationConfig = { - // scale up - 'entry': { - name: 'scale-up-animation', - node: dlg, - timing: { duration: 160, easing: 'ease-out' } - }, - // fade out - 'exit': { - name: 'fade-out-animation', - node: dlg, - timing: { duration: 200, easing: 'ease-in' } - } - }; - } + dlg.entryAnimation = 'fade-in-animation'; + dlg.exitAnimation = 'fade-out-animation'; - var html = ''; + // The animations flicker in IE and Firefox (probably wherever the polyfill is used) + if (browserInfo.animate) { + dlg.animationConfig = { + // scale up + 'entry': { + name: 'scale-up-animation', + node: dlg, + timing: { duration: 160, easing: 'ease-out' } + }, + // fade out + 'exit': { + name: 'fade-out-animation', + node: dlg, + timing: { duration: 200, easing: 'ease-in' } + } + }; + } - // There seems to be a bug with this in safari causing it to immediately roll up to 0 height - // Have to disable this right now because it's causing the radio buttons to not function properly in other browsers besides chrome - var isScrollable = false; - if (browserInfo.android) { - isScrollable = true; - } + var html = ''; - html += '

    '; - html += Globalize.translate('HeaderSortBy'); - html += '

    '; + // There seems to be a bug with this in safari causing it to immediately roll up to 0 height + // Have to disable this right now because it's causing the radio buttons to not function properly in other browsers besides chrome + var isScrollable = false; + if (browserInfo.android) { + isScrollable = true; + } - if (isScrollable) { - html += ''; - } + html += '

    '; + html += Globalize.translate('HeaderSortBy'); + html += '

    '; - html += ''; - for (var i = 0, length = options.items.length; i < length; i++) { + if (isScrollable) { + html += ''; + } - var option = options.items[i]; + html += ''; + for (var i = 0, length = options.items.length; i < length; i++) { - html += '' + option.name + ''; - } - html += ''; + var option = options.items[i]; - html += '

    '; - html += Globalize.translate('HeaderSortOrder'); - html += '

    '; - html += ''; - html += '' + Globalize.translate('OptionAscending') + ''; - html += '' + Globalize.translate('OptionDescending') + ''; - html += ''; + html += '' + option.name + ''; + } + html += '
    '; - if (isScrollable) { - html += '
    '; - } + html += '

    '; + html += Globalize.translate('HeaderSortOrder'); + html += '

    '; + html += ''; + html += '' + Globalize.translate('OptionAscending') + ''; + html += '' + Globalize.translate('OptionDescending') + ''; + html += ''; - html += '
    '; - html += '' + Globalize.translate('ButtonClose') + ''; - html += '
    '; + if (isScrollable) { + html += ''; + } - dlg.innerHTML = html; - document.body.appendChild(dlg); + html += '
    '; + html += '' + Globalize.translate('ButtonClose') + ''; + html += '
    '; - dlg.addEventListener('iron-overlay-closed', function () { - dlg.parentNode.removeChild(dlg); - }); + dlg.innerHTML = html; + document.body.appendChild(dlg); - require(['components/paperdialoghelper'], function () { + dlg.addEventListener('iron-overlay-closed', function () { + dlg.parentNode.removeChild(dlg); + }); PaperDialogHelper.openWithHash(dlg, 'sortmenu'); diff --git a/dashboard-ui/scripts/librarylist.js b/dashboard-ui/scripts/librarylist.js index 9784395224..9ef1a66969 100644 --- a/dashboard-ui/scripts/librarylist.js +++ b/dashboard-ui/scripts/librarylist.js @@ -913,17 +913,19 @@ if (!itemSelectionPanel) { - itemSelectionPanel = document.createElement('div'); - itemSelectionPanel.classList.add('itemSelectionPanel'); + require(['paper-checkbox'], function() { + itemSelectionPanel = document.createElement('div'); + itemSelectionPanel.classList.add('itemSelectionPanel'); - item.querySelector('.cardContent').appendChild(itemSelectionPanel); + item.querySelector('.cardContent').appendChild(itemSelectionPanel); - var chkItemSelect = document.createElement('paper-checkbox'); - chkItemSelect.classList.add('chkItemSelect'); + var chkItemSelect = document.createElement('paper-checkbox'); + chkItemSelect.classList.add('chkItemSelect'); - $(chkItemSelect).on('change', onSelectionChange); + $(chkItemSelect).on('change', onSelectionChange); - itemSelectionPanel.appendChild(chkItemSelect); + itemSelectionPanel.appendChild(chkItemSelect); + }); } } diff --git a/dashboard-ui/scripts/livetvcomponents.js b/dashboard-ui/scripts/livetvcomponents.js index f54243d153..410c910600 100644 --- a/dashboard-ui/scripts/livetvcomponents.js +++ b/dashboard-ui/scripts/livetvcomponents.js @@ -244,7 +244,7 @@ function showOverlay(elem, item) { - require(['components/paperdialoghelper'], function () { + require(['components/paperdialoghelper', 'scale-up-animation', 'fade-out-animation'], function () { var dlg = document.createElement('paper-dialog'); diff --git a/dashboard-ui/scripts/mediacontroller.js b/dashboard-ui/scripts/mediacontroller.js index cc54203b9a..01b173c20b 100644 --- a/dashboard-ui/scripts/mediacontroller.js +++ b/dashboard-ui/scripts/mediacontroller.js @@ -118,6 +118,13 @@ function showActivePlayerMenu(playerInfo) { + require(['paper-checkbox', 'fade-in-animation', 'fade-out-animation', 'paper-dialog'], function () { + showActivePlayerMenuInternal(playerInfo); + }); + } + + function showActivePlayerMenuInternal(playerInfo) { + var id = 'dlg' + new Date().getTime(); var html = ''; @@ -401,7 +408,9 @@ buttons: [Globalize.translate('ButtonYes'), Globalize.translate('ButtonNo'), Globalize.translate('ButtonCancel')] }; - Dashboard.dialog(options); + require(['dialog'], function (dialog) { + dialog(options); + }); } else { diff --git a/dashboard-ui/scripts/medialibrarypage.js b/dashboard-ui/scripts/medialibrarypage.js index 9543266fcb..027e6e35f4 100644 --- a/dashboard-ui/scripts/medialibrarypage.js +++ b/dashboard-ui/scripts/medialibrarypage.js @@ -207,7 +207,7 @@ return; } - require(['components/imageeditor/imageeditor'], function () { + require(['components/imageeditor/imageeditor'], function (ImageEditor) { ImageEditor.show(virtualFolder.ItemId, { theme: 'a' diff --git a/dashboard-ui/scripts/mediaplayer-video.js b/dashboard-ui/scripts/mediaplayer-video.js index 9f90432f9f..32b22819b0 100644 --- a/dashboard-ui/scripts/mediaplayer-video.js +++ b/dashboard-ui/scripts/mediaplayer-video.js @@ -940,7 +940,7 @@ self.playVideo = function (item, mediaSource, startPosition, callback) { // TODO: remove dependency on nowplayingbar - requirejs(['videorenderer', 'css!css/nowplayingbar.css', 'css!css/mediaplayer-video.css'], function () { + requirejs(['videorenderer', 'css!css/nowplayingbar.css', 'css!css/mediaplayer-video.css', 'paper-slider'], function () { initVideoElements(); diff --git a/dashboard-ui/scripts/nowplayingbar.js b/dashboard-ui/scripts/nowplayingbar.js index f76fd22d60..fba777e68e 100644 --- a/dashboard-ui/scripts/nowplayingbar.js +++ b/dashboard-ui/scripts/nowplayingbar.js @@ -88,11 +88,11 @@ return; } - var onfinish = function() { + var onfinish = function () { elem.classList.add('hide'); }; - if (!browserInfo.animate) { + if (!browserInfo.animate || browserInfo.mobile) { onfinish(); return; } @@ -114,7 +114,7 @@ elem.classList.remove('hide'); - if (!browserInfo.animate) { + if (!browserInfo.animate || browserInfo.mobile) { return; } @@ -260,7 +260,7 @@ return; } - require(['css!css/nowplayingbar.css'], function () { + require(['css!css/nowplayingbar.css', 'paper-slider'], function () { nowPlayingBarElement = document.querySelector('.nowPlayingBar'); diff --git a/dashboard-ui/scripts/sharingmanager.js b/dashboard-ui/scripts/sharingmanager.js index 40a4176b1f..de553d6fe6 100644 --- a/dashboard-ui/scripts/sharingmanager.js +++ b/dashboard-ui/scripts/sharingmanager.js @@ -25,7 +25,7 @@ Dashboard.showLoadingMsg(); - require(['sharingwidget'], function () { + require(['sharingwidget'], function (SharingWidget) { ApiClient.ajax({ type: 'POST', diff --git a/dashboard-ui/scripts/sharingwidget.js b/dashboard-ui/scripts/sharingwidget.js deleted file mode 100644 index 093b2a7f96..0000000000 --- a/dashboard-ui/scripts/sharingwidget.js +++ /dev/null @@ -1,83 +0,0 @@ -(function () { - - function showMenu(options, successCallback, cancelCallback) { - - require(['thirdparty/social-share-kit-1.0.4/dist/js/social-share-kit.min', 'css!thirdparty/social-share-kit-1.0.4/dist/css/social-share-kit.css'], function () { - - var id = 'dlg' + new Date().getTime(); - var html = ''; - - html += ''; - - html += '

    ' + Globalize.translate('HeaderShare') + '

    '; - - html += '
    '; - html += '
    '; - - // We can only do facebook if we can guarantee that the current page is available over the internet, since FB will try to probe it. - if (Dashboard.isConnectMode()) { - html += ''; - } - - html += '
    '; - html += '
    '; - - html += '
    '; - html += Globalize.translate('ButtonShareHelp'); - html += '
    '; - - html += '
    '; - html += '' + Globalize.translate('ButtonCancel') + ''; - html += '
    '; - - html += '
    '; - - $(document.body).append(html); - - var isShared = false; - - setTimeout(function () { - - var dlg = document.getElementById(id); - - dlg.open(); - - var shareInfo = options.share; - - SocialShareKit.init({ - selector: '#' + id + ' .ssk', - url: shareInfo.Url, - title: shareInfo.Name, - text: shareInfo.Overview, - image: shareInfo.ImageUrl, - via: 'Emby' - }); - - // Has to be assigned a z-index after the call to .open() - $(dlg).on('iron-overlay-closed', function () { - $(this).remove(); - - if (isShared) { - successCallback(options); - } else { - cancelCallback(options); - } - }); - - // Has to be assigned a z-index after the call to .open() - $('.ssk', dlg).on('click', function () { - isShared = true; - dlg.close(); - }); - - }, 100); - }); - - } - - window.SharingWidget = { - showMenu: showMenu - }; - - -})(); \ No newline at end of file diff --git a/dashboard-ui/scripts/site.js b/dashboard-ui/scripts/site.js index 88490fd379..284716d5da 100644 --- a/dashboard-ui/scripts/site.js +++ b/dashboard-ui/scripts/site.js @@ -450,6 +450,7 @@ var Dashboard = { showLoadingMsg: function () { + Dashboard.loadingVisible = true; var elem = document.querySelector('.docspinner'); if (elem) { @@ -464,13 +465,15 @@ var Dashboard = { elem.classList.add('docspinner'); document.body.appendChild(elem); - elem.active = true; + elem.active = Dashboard.loadingVisible == true; }); } }, hideLoadingMsg: function () { + Dashboard.loadingVisible = false; + var elem = document.querySelector('.docspinner'); if (elem) { @@ -523,27 +526,30 @@ var Dashboard = { if (typeof options == "string") { - var message = options; + require(['paper-toast'], function () { + var message = options; - Dashboard.toastId = Dashboard.toastId || 0; + Dashboard.toastId = Dashboard.toastId || 0; - var id = 'toast' + (Dashboard.toastId++); + var id = 'toast' + (Dashboard.toastId++); - var elem = document.createElement("paper-toast"); - elem.setAttribute('text', message); - elem.id = id; + var elem = document.createElement("paper-toast"); + elem.setAttribute('text', message); + elem.id = id; - document.body.appendChild(elem); + document.body.appendChild(elem); - // This timeout is obviously messy but it's unclear how to determine when the webcomponent is ready for use - // element onload never fires - setTimeout(function () { - elem.show(); + // This timeout is obviously messy but it's unclear how to determine when the webcomponent is ready for use + // element onload never fires + setTimeout(function () { + elem.show(); + }, 300); setTimeout(function () { elem.parentNode.removeChild(elem); - }, 5000); - }, 300); + }, 5300); + + }); return; } @@ -558,75 +564,6 @@ var Dashboard = { } }, - dialog: function (options) { - - var title = options.title; - var message = options.message; - var buttons = options.buttons; - var callback = options.callback; - - // Cordova - if (navigator.notification && navigator.notification.confirm && message.indexOf('<') == -1) { - - navigator.notification.confirm(message, function (index) { - - callback(index); - - }, title, buttons.join(',')); - - } else { - Dashboard.dialogInternal(message, title, buttons, callback); - } - }, - - dialogInternal: function (message, title, buttons, callback) { - - var id = 'paperdlg' + new Date().getTime(); - - var html = ''; - html += '

    ' + title + '

    '; - html += '
    ' + message + '
    '; - html += '
    '; - - var index = 0; - html += buttons.map(function (b) { - - var dataIndex = ' data-index="' + index + '"'; - index++; - return '' + b + ''; - - }).join(''); - - html += '
    '; - html += '
    '; - - $(document.body).append(html); - - // This timeout is obviously messy but it's unclear how to determine when the webcomponent is ready for use - // element onload never fires - setTimeout(function () { - - var dlg = document.getElementById(id); - - $('.dialogButton', dlg).on('click', function () { - - if (callback) { - callback(parseInt(this.getAttribute('data-index'))); - } - - }); - - // Has to be assigned a z-index after the call to .open() - dlg.addEventListener('iron-overlay-closed', function (e) { - - dlg.parentNode.removeChild(dlg); - }); - - dlg.open(); - - }, 300); - }, - confirm: function (message, title, callback) { // Cordova @@ -641,7 +578,10 @@ var Dashboard = { }, title || Globalize.translate('HeaderConfirm'), buttonLabels.join(',')); } else { - Dashboard.confirmInternal(message, title, true, callback); + + require(['paper-dialog', 'fade-in-animation', 'fade-out-animation'], function () { + Dashboard.confirmInternal(message, title, true, callback); + }); } }, @@ -1836,9 +1776,13 @@ var AppInfo = {}; }; if (Dashboard.isRunningInCordova()) { + paths.dialog = "cordova/dialog"; paths.prompt = "cordova/prompt"; + paths.sharingwidget = "cordova/sharingwidget"; } else { + paths.dialog = "components/dialog"; paths.prompt = "components/prompt"; + paths.sharingwidget = "components/sharingwidget"; } requirejs.config({ @@ -1856,7 +1800,39 @@ var AppInfo = {}; define("cryptojs-sha1", ["apiclient/sha1"]); define("cryptojs-md5", ["apiclient/md5"]); - define("paper-spinner", []); + // Done + define("paper-spinner", ["html!bower_components/paper-spinner/paper-spinner.html"]); + define("paper-toast", ["html!bower_components/paper-toast/paper-toast.html"]); + define("paper-slider", ["html!bower_components/paper-slider/paper-slider.html"]); + define("paper-tabs", ["html!bower_components/paper-tabs/paper-tabs.html"]); + define("paper-menu", ["html!bower_components/paper-menu/paper-menu.html"]); + define("paper-dialog-scrollable", ["html!bower_components/paper-dialog-scrollable/paper-dialog-scrollable.html"]); + define("paper-button", ["html!bower_components/paper-button/paper-button.html"]); + define("paper-icon-button", ["html!bower_components/paper-icon-button/paper-icon-button.html"]); + define("paper-drawer-panel", ["html!bower_components/paper-drawer-panel/paper-drawer-panel.html"]); + define("paper-radio-group", ["html!bower_components/paper-radio-group/paper-radio-group.html"]); + define("paper-radio-button", ["html!bower_components/paper-radio-button/paper-radio-button.html"]); + define("neon-animated-pages", ["html!bower_components/neon-animation/neon-animated-pages.html"]); + + define("slide-right-animation", ["html!bower_components/neon-animation/animations/slide-right-animation.html"]); + define("slide-left-animation", ["html!bower_components/neon-animation/animations/slide-left-animation.html"]); + define("slide-from-right-animation", ["html!bower_components/neon-animation/animations/slide-from-right-animation.html"]); + define("slide-from-left-animation", ["html!bower_components/neon-animation/animations/slide-from-left-animation.html"]); + define("paper-textarea", ["html!bower_components/paper-input/paper-textarea.html"]); + define("paper-item", ["html!bower_components/paper-item/paper-item.html"]); + define("paper-checkbox", ["html!bower_components/paper-checkbox/paper-checkbox.html"]); + define("fade-in-animation", ["html!bower_components/neon-animation/animations/fade-in-animation.html"]); + define("fade-out-animation", ["html!bower_components/neon-animation/animations/fade-out-animation.html"]); + define("scale-up-animation", ["html!bower_components/neon-animation/animations/scale-up-animation.html"]); + define("paper-dialog", ["html!bower_components/paper-dialog/paper-dialog.html"]); + + // Not done + + define("paper-fab", ["html!bower_components/paper-fab/paper-fab.html"]); + define("paper-input", ["html!bower_components/paper-input/paper-input.html"]); + + define("paper-icon-item", ["html!bower_components/paper-item/paper-icon-item.html"]); + define("paper-item-body", ["html!bower_components/paper-item/paper-item-body.html"]); } function init(promiseResolve, hostingAppInfo) { @@ -1926,12 +1902,6 @@ var AppInfo = {}; define("sharingmanager", ["scripts/sharingmanager"]); - if (Dashboard.isRunningInCordova()) { - define("sharingwidget", ["cordova/sharingwidget"]); - } else { - define("sharingwidget", ["scripts/sharingwidget"]); - } - if (Dashboard.isRunningInCordova() && browserInfo.safari) { define("searchmenu", ["cordova/searchmenu"]); } else { @@ -1989,6 +1959,8 @@ var AppInfo = {}; deps.push('jQuery'); + deps.push('paper-drawer-panel'); + require(deps, function () { for (var i in hostingAppInfo) { @@ -2033,6 +2005,15 @@ var AppInfo = {}; deps.push('thirdparty/jquerymobile-1.4.5/jquery.mobile.custom.js'); + deps.push('paper-button'); + deps.push('paper-icon-button'); + + // TODO: These need to be removed + deps.push('paper-fab'); + deps.push('paper-input'); + deps.push('paper-icon-item'); + deps.push('paper-item-body'); + require(deps, function () { // TODO: This needs to be deprecated, but it's used heavily @@ -2072,9 +2053,11 @@ var AppInfo = {}; capabilities.DeviceProfile = MediaPlayer.getDeviceProfile(Math.max(screen.height, screen.width)); - var connectionManagerPromise = createConnectionManager(capabilities); + deps = []; + deps.push(Globalize.ensure()); + deps.push(createConnectionManager(capabilities)); - Promise.all([Globalize.ensure(), connectionManagerPromise]).then(function () { + Promise.all(deps).then(function () { document.title = Globalize.translateDocument(document.title, 'html'); @@ -2126,6 +2109,10 @@ var AppInfo = {}; var deps = []; + if (!(AppInfo.isNativeApp && browserInfo.android)) { + document.documentElement.classList.add('minimumSizeTabs'); + } + // Do these now to prevent a flash of content if (AppInfo.isNativeApp && browserInfo.android) { deps.push('css!devices/android/android.css'); @@ -2219,6 +2206,8 @@ var AppInfo = {}; postInitDependencies.push('scripts/nowplayingbar'); } + //postInitDependencies.push('components/testermessage'); + require(postInitDependencies); }); } @@ -2406,7 +2395,11 @@ var AppInfo = {}; function onWebComponentsReady() { - require(['html!vulcanize-out.html'], function () { + var polymerDependencies = []; + polymerDependencies.push('html!thirdparty/emby-icons.html'); + + require(polymerDependencies, function () { + getHostingAppInfo().then(function (hostingAppInfo) { init(resolve, hostingAppInfo); }); diff --git a/dashboard-ui/scripts/sync.js b/dashboard-ui/scripts/sync.js index 1c87cd7306..312b85c963 100644 --- a/dashboard-ui/scripts/sync.js +++ b/dashboard-ui/scripts/sync.js @@ -76,6 +76,13 @@ function renderForm(options) { + require(['paper-checkbox'], function () { + renderFormInternal(options); + }); + } + + function renderFormInternal(options) { + var elem = options.elem; var dialogOptions = options.dialogOptions; diff --git a/dashboard-ui/syncsettings.html b/dashboard-ui/syncsettings.html index 8136ba892e..8bdd920dc8 100644 --- a/dashboard-ui/syncsettings.html +++ b/dashboard-ui/syncsettings.html @@ -4,7 +4,7 @@ ${TitleSync} -
    +
    diff --git a/dashboard-ui/themes/halloween/theme.js b/dashboard-ui/themes/halloween/theme.js index bf9235c9b0..4121e62efd 100644 --- a/dashboard-ui/themes/halloween/theme.js +++ b/dashboard-ui/themes/halloween/theme.js @@ -59,18 +59,20 @@ function onIconClick() { - Dashboard.dialog({ + require(['dialog'], function (dialog) { + dialog({ - title: "Happy Halloween", - message: "Happy Halloween from the Emby Team. We hope your Halloween is spooktacular! Would you like to allow the Halloween theme to continue?", - callback: function (result) { + title: "Happy Halloween", + message: "Happy Halloween from the Emby Team. We hope your Halloween is spooktacular! Would you like to allow the Halloween theme to continue?", + callback: function (result) { - if (result == 1) { - destroyTheme(); - } - }, + if (result == 1) { + destroyTheme(); + } + }, - buttons: [Globalize.translate('ButtonYes'), Globalize.translate('ButtonNo')] + buttons: [Globalize.translate('ButtonYes'), Globalize.translate('ButtonNo')] + }); }); } diff --git a/dashboard-ui/tv.html b/dashboard-ui/tv.html index f1aebec9eb..1531463d51 100644 --- a/dashboard-ui/tv.html +++ b/dashboard-ui/tv.html @@ -4,7 +4,7 @@ Emby -
    +
    diff --git a/dashboard-ui/userpassword.html b/dashboard-ui/userpassword.html index 2b3fd19649..c3320313e8 100644 --- a/dashboard-ui/userpassword.html +++ b/dashboard-ui/userpassword.html @@ -4,7 +4,7 @@ -
    +
    diff --git a/dashboard-ui/vulcanize-in.html b/dashboard-ui/vulcanize-in.html deleted file mode 100644 index 6004d2591e..0000000000 --- a/dashboard-ui/vulcanize-in.html +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/dashboard-ui/vulcanize-out.html b/dashboard-ui/vulcanize-out.html deleted file mode 100644 index 55f2361f8d..0000000000 --- a/dashboard-ui/vulcanize-out.html +++ /dev/null @@ -1,20733 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dashboard-ui/wizardagreement.html b/dashboard-ui/wizardagreement.html index a6cfd4575f..8749e40e30 100644 --- a/dashboard-ui/wizardagreement.html +++ b/dashboard-ui/wizardagreement.html @@ -4,7 +4,7 @@ Emby -
    +
    diff --git a/dashboard-ui/wizardsettings.html b/dashboard-ui/wizardsettings.html index 58a270895d..343ce2fe44 100644 --- a/dashboard-ui/wizardsettings.html +++ b/dashboard-ui/wizardsettings.html @@ -4,7 +4,7 @@ Emby -
    +