diff --git a/profiles/wcm_base/CHANGELOG.txt b/profiles/wcm_base/CHANGELOG.txt new file mode 100644 index 0000000000000000000000000000000000000000..ba45027ba5f2f0b58bc591ee3318554a50fd4ad3 --- /dev/null +++ b/profiles/wcm_base/CHANGELOG.txt @@ -0,0 +1,15 @@ + +WCM Base 7.x-1.x, 2015-07-06 +---------------------------- +- Created changelog. +- OCIO Aggregator: Added custom module to provide feed aggregation and enhancements + to Drupal core aggregator module. +- All OCIO Omega Themes: Added maximum width to content containers. +- OCIO Panels Settings: Re-enabled accordion style for Panels regions. + +WCM Base 7.x-1.x, 2015-06-30 +---------------------------- +- OCIO Admin Menu: Added Clear Cache link to Advanced menu. +- OCIO Landing Page: Fixed site builder/manager access to landing page panelizer. +- OCIO Panels Settings: Removed unwanted layouts. +- Special Menu Items: Added contrib module to allow unlinked menu items. diff --git a/profiles/wcm_base/build-wcm_base-dev.make b/profiles/wcm_base/build-wcm_base-dev.make index 95ae78818f395c7be13e3897beebeceac69fda3f..a5b9097d7ce5c0f34dacdf26623f5a47e9567801 100644 --- a/profiles/wcm_base/build-wcm_base-dev.make +++ b/profiles/wcm_base/build-wcm_base-dev.make @@ -10,6 +10,7 @@ includes[wcm_base] = wcm_base.make ;custom projects[ocio_accessibility][options][working-copy] = TRUE projects[ocio_admin_menu][options][working-copy] = TRUE +projects[ocio_aggregator][options][working-copy] = TRUE projects[ocio_basic_page][options][working-copy] = TRUE projects[ocio_book][options][working-copy] = TRUE projects[ocio_buckeye_alert][options][working-copy] = TRUE diff --git a/profiles/wcm_base/libraries/jquery.isotope/.gitignore b/profiles/wcm_base/libraries/jquery.isotope/.gitignore deleted file mode 100644 index 0402acd74acca42db9796eeba5d81ef02290757e..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/libraries/jquery.isotope/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -_site -isotope-site.zip -components/ -bower_components/ -node_modules/ -sandbox/**/bundle.js diff --git a/profiles/wcm_base/libraries/jquery.isotope/.jshintrc b/profiles/wcm_base/libraries/jquery.isotope/.jshintrc deleted file mode 100644 index d011e9628a71d43a2c18d17153c0752c538dcb9a..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/libraries/jquery.isotope/.jshintrc +++ /dev/null @@ -1,12 +0,0 @@ -{ - "browser": true, - "devel": false, - "strict": true, - "undef": true, - "unused": true, - "globals": { - "define": false, - "module": false, - "require": false - } -} diff --git a/profiles/wcm_base/libraries/jquery.isotope/CONTRIBUTING.mdown b/profiles/wcm_base/libraries/jquery.isotope/CONTRIBUTING.mdown deleted file mode 100644 index 2251f726c67dfa9631dfd922c61660e7565bcfdd..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/libraries/jquery.isotope/CONTRIBUTING.mdown +++ /dev/null @@ -1,24 +0,0 @@ -## Submitting issues - -### Reduced test case required - -All bug reports and problem issues require a [**reduced test case**](http://css-tricks.com/reduced-test-cases/). Create one by forking any one of the [CodePen examples](http://codepen.io/desandro/tag/isotope-docs) from [the docs](http://isotope.metafizzy.co). - -+ A reduced test case clearly demonstrates the bug or issue. -+ It contains the bare minimum HTML, CSS, and JavaScript required to demonstrate the bug. -+ A link to your production site is **not** a reduced test case. - -Providing a reduced test case is the best way to get your issue addressed. Without a reduced test case, your issue may be closed. - -## Support - -+ Having trouble setting up Isotope? -+ Running into a time-consuming problem? - -[CodersClan has a dedicated support forum for Isotope](https://www.codersclan.net/?repo_id=1), where you can get personal support from experienced developers. - -#### [Get support on CodersClan](https://www.codersclan.net/?repo_id=1) - -## Pull requests - -Contributions are welcome! Please note: your code may be used as part of a commercial product if merged. Be clear about what license applies to your patch. [The MIT license](http://choosealicense.com/licenses/mit/) or [public domain unlicense](http://choosealicense.com/licenses/unlicense/) are permissive, and allow integration of your patch into Isotope as part of a commercial product. diff --git a/profiles/wcm_base/libraries/jquery.isotope/Gruntfile.js b/profiles/wcm_base/libraries/jquery.isotope/Gruntfile.js deleted file mode 100644 index e10e2684b956e4904285adf52235baf7724f81d7..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/libraries/jquery.isotope/Gruntfile.js +++ /dev/null @@ -1,87 +0,0 @@ -/*jshint node: true, strict: false */ - -// -------------------------- grunt -------------------------- // - -module.exports = function( grunt ) { - - var banner = ( function() { - var src = grunt.file.read('js/isotope.js'); - var re = new RegExp('^\\s*(?:\\/\\*[\\s\\S]*?\\*\\/)\\s*'); - var matches = src.match( re ); - var banner = matches[0].replace( 'Isotope', 'Isotope PACKAGED' ); - return banner; - })(); - - grunt.initConfig({ - // ----- global settings ----- // - namespace: 'isotope', - dataDir: 'tasks/data', - - // ----- tasks settings ----- // - - jshint: { - docs: [ 'js/**/*.js' ], - options: grunt.file.readJSON('.jshintrc') - }, - - requirejs: { - pkgd: { - options: { - baseUrl: 'bower_components', - include: [ - 'jquery-bridget/jquery.bridget', - 'isotope/js/isotope' - ], - out: 'dist/isotope.pkgd.js', - optimize: 'none', - paths: { - isotope: '../', - jquery: 'empty:' - }, - wrap: { - start: banner - } - } - } - }, - - uglify: { - pkgd: { - files: { - 'dist/isotope.pkgd.min.js': [ 'dist/isotope.pkgd.js' ] - }, - options: { - banner: banner - } - } - } - - }); - - grunt.loadNpmTasks('grunt-contrib-jshint'); - grunt.loadNpmTasks('grunt-contrib-uglify'); - grunt.loadNpmTasks('grunt-requirejs'); - - grunt.registerTask( 'pkgd-edit', function() { - var outFile = grunt.config.get('requirejs.pkgd.options.out'); - var contents = grunt.file.read( outFile ); - // get requireJS definition code - var definitionRE = /define\(\s*'isotope\/js\/isotope'(.|\n)+function\( Outlayer/; - var definition = contents.match( definitionRE )[0]; - // remove name module - var fixDefinition = definition.replace( "'isotope/js/isotope',", '' ) - // ./item -> isotope/js/item - .replace( /'.\//g, "'isotope/js/" ); - contents = contents.replace( definition, fixDefinition ); - grunt.file.write( outFile, contents ); - grunt.log.writeln( 'Edited ' + outFile ); - }); - - grunt.registerTask( 'default', [ - 'jshint', - 'requirejs', - 'pkgd-edit', - 'uglify' - ]); - -}; diff --git a/profiles/wcm_base/libraries/jquery.isotope/README.mdown b/profiles/wcm_base/libraries/jquery.isotope/README.mdown deleted file mode 100644 index 2b0385c5848e3908d3e9626e66a958259107b32d..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/libraries/jquery.isotope/README.mdown +++ /dev/null @@ -1,91 +0,0 @@ -# Isotope - -_Filter & sort magical layouts_ - -See [isotope.metafizzy.co](http://isotope.metafizzy.co) for complete docs and demos. - -## Install - -### Download - -+ [isotope.pkgd.js](https://github.com/metafizzy/isotope/raw/master/dist/isotope.pkgd.js) un-minified, or -+ [isotope.pkgd.min.js](https://github.com/metafizzy/isotope/raw/master/dist/isotope.pkgd.min.js) minified - -### CDN - -Link directly to [Isotope files on cdnjs](https://cdnjs.com/libraries/jquery.isotope). - -``` html -<script src="//cdnjs.cloudflare.com/ajax/libs/jquery.isotope/2.2.0/isotope.pkgd.js"></script> -<!-- or --> -<script src="//cdnjs.cloudflare.com/ajax/libs/jquery.isotope/2.2.0/isotope.pkgd.min.js"></script> -``` - -### Package managers - -Bower: `bower install isotope --save` - -npm: `npm install isotope-layout --save` - -## License - -### Commerical license - -If you want to use Isotope to develop commercial sites, themes, projects, and applications, the Commercial license is the appropriate license. With this option, your source code is kept proprietary. Purchase a Isotope Commercial License at [isotope.metafizzy.co](http://isotope.metafizzy.co/#commerical-license) - -### Open source license - -If you are creating an open source application under a license compatible with the [GNU GPL license v3](https://www.gnu.org/licenses/gpl-3.0.html), you may use Isotope under the terms of the GPLv3. - -[Read more about Isotope's license](http://isotope.metafizzy.co/license.html). - -## Initialize - -With jQuery - -``` js -$('.grid').isotope({ - // options... - itemSelector: '.grid-item', - masonry: { - columnWidth: 200 - } -}); -``` - -With vanilla JavaScript - -``` js -// vanilla JS -var grid = document.querySelector('.grid'); -var iso = new Isotope( grid, { - // options... - itemSelector: '.grid-item', - masonry: { - columnWidth: 200 - } -}); -``` - -With HTML - -Add a class of `js-isotope` to your element. Options can be set in JSON in `data-isotope-options`. - -``` html -<div class="grid js-isotope" - data-isotope-options='{ "itemSelector": ".grid-item", "masonry": { "columnWidth": 200 } }'> - <div class="grid-item"></div> - <div class="grid-item"></div> - ... -</div> -``` - -## Support - -[CodersClan has a dedicated support forum for Isotope](https://www.codersclan.net/?repo_id=1), where you can get personal support from experienced developers. - -#### [Get support on CodersClan](https://www.codersclan.net/?repo_id=1) - -* * * - -By [Metafizzy](http://metafizzy.co) diff --git a/profiles/wcm_base/libraries/jquery.isotope/bower.json b/profiles/wcm_base/libraries/jquery.isotope/bower.json deleted file mode 100644 index f8ba3c38d3243baffc7dc7d3682d6ddaf23fedd3..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/libraries/jquery.isotope/bower.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "isotope", - "version": "2.2.0", - "description": "Filter and sort magical layouts", - "main": "js/isotope.js", - "dependencies": { - "get-size": "~1.2.2", - "matches-selector": ">=1 <2", - "outlayer": "~1.4.0", - "masonry": "~3.3.0", - "fizzy-ui-utils": "~1.0.1" - }, - "devDependencies": { - "doc-ready": "1.x", - "isotope-cells-by-column": "1.x", - "isotope-cells-by-row": "1.x", - "isotope-fit-columns": "1.x", - "isotope-horizontal": "1.x", - "isotope-masonry-horizontal": "1.x", - "jquery": ">=1.4.3 <2", - "jquery-bridget": "1.1.x", - "qunit": "^1.15" - }, - "ignore": [ - "test/", - "examples/", - "sandbox/", - "**/.*", - "Gruntfile.js", - "package.json", - "notes.md", - "CONTRIBUTING.mdown", - "changelog.md" - ] -} diff --git a/profiles/wcm_base/libraries/jquery.isotope/changelog.md b/profiles/wcm_base/libraries/jquery.isotope/changelog.md deleted file mode 100644 index 63cb144b899c4ec249009066eae0bde1c4a687dd..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/libraries/jquery.isotope/changelog.md +++ /dev/null @@ -1,26 +0,0 @@ -# Changelog - -## v2.2.0 - -+ Revised license model. Isotope is licensed GPL by default. Purchasing a commercial license allows use outside of the GPL, under the Commercial License terms. Read details at: [isotope.metafizzy.co/license.html](http://isotope.metafizzy.co/license.html) -+ Added [`arrangeComplete` event](http://isotope.metafizzy.co/events.html#arrangecomplete). Fixed [#732](https://github.com/metafizzy/isotope/issues/732) -+ Changed `bower.json` `main` to just `js/isotope.js`. Resolved [#879](https://github.com/metafizzy/isotope/issues/879) -+ Added [fizzy-ui-utils](https://github.com/metafizzy/fizzy-ui-utils) -+ Removed `isoInstance` argument from `layoutComplete` and `removeComplete` events - -### v2.1.1 - -+ Refactored hide/reveal logic with filtering -+ Required [getSize](https://github.com/desandro/getsize) v1.2.2. Fixed [#860](https://github.com/metafizzy/isotope/issues/580) - -## v2.1.0 - -+ Add CommonJS support for npm/Browserify -+ Add gutter option for fitRows [#580](https://github.com/metafizzy/isotope/issues/580) -+ Fix `updateSortData` with empty Array or jQuery object - -## v2.0.1 - -+ added `getFilteredItemElements` method [#768](https://github.com/metafizzy/isotope/issues/768) -+ added `shuffle` method -+ Fix display on `destroy` [#741](https://github.com/metafizzy/isotope/issues/741) \ No newline at end of file diff --git a/profiles/wcm_base/libraries/jquery.isotope/dist/isotope.pkgd.js b/profiles/wcm_base/libraries/jquery.isotope/dist/isotope.pkgd.js deleted file mode 100644 index 14cd071cb19e153b3bd6cfc3d1f1689ee75da519..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/libraries/jquery.isotope/dist/isotope.pkgd.js +++ /dev/null @@ -1,4211 +0,0 @@ -/*! - * Isotope PACKAGED v2.2.0 - * - * Licensed GPLv3 for open source use - * or Isotope Commercial License for commercial use - * - * http://isotope.metafizzy.co - * Copyright 2015 Metafizzy - */ - -/** - * 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 x = parseInt( style[ isOriginLeft ? 'left' : 'right' ], 10 ); - var y = parseInt( style[ isOriginTop ? 'top' : 'bottom' ], 10 ); - - // clean up 'auto' or other non-integer values - x = isNaN( x ) ? 0 : x; - y = isNaN( y ) ? 0 : y; - // remove padding from measurement - var layoutSize = this.layout.size; - 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 - x = layoutOptions.percentPosition && !layoutOptions.isHorizontal ? - ( ( x / layoutSize.width ) * 100 ) + '%' : x + 'px'; - style[ xProperty ] = 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 - y = layoutOptions.percentPosition && layoutOptions.isHorizontal ? - ( ( y / layoutSize.height ) * 100 ) + '%' : y + 'px'; - style[ yProperty ] = y; - // reset other property - style[ yResetProperty ] = ''; - - this.css( style ); - this.emitEvent( 'layout', [ this ] ); -}; - - -// transform translate function -var translate = is3d ? - function( x, y ) { - return 'translate3d(' + x + 'px, ' + y + 'px, 0)'; - } : - function( x, y ) { - return 'translate(' + x + 'px, ' + 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 = {}; - // flip cooridinates if origin on right or bottom - var layoutOptions = this.layout.options; - transX = layoutOptions.isOriginLeft ? transX : -transX; - transY = layoutOptions.isOriginTop ? transY : -transY; - transitionStyle.transform = translate( transX, transY ); - - this.transition({ - to: transitionStyle, - onTransitionEnd: { - transform: this.layoutPosition - }, - isCleaning: true - }); -}; - -// 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; - -}; - -var itemTransitionProperties = transformProperty && ( utils.toDashed( transformProperty ) + - ',opacity' ); - -Item.prototype.enableTransition = function(/* style */) { - // only enable if not already transitioning - // bug in IE10 were re-setting transition style will prevent - // transitionend event from triggering - if ( this.isTransitioning ) { - return; - } - - // make transition: foo, bar, baz from style object - // TODO uncomment this bit when IE10 bug is resolved - // var transitionValue = []; - // for ( var prop in style ) { - // // dash-ify camelCased properties like WebkitTransition - // transitionValue.push( toDash( prop ) ); - // } - // enable transition styles - // HACK always enable transform,opacity for IE10 - this.css({ - transitionProperty: itemTransitionProperties, - 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.0 - * 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.emitEvent( eventName + 'Complete', [ 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 ); - } -}; - -// -------------------------- 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; - -})); - - -/** - * Isotope Item -**/ - -( function( window, factory ) { - - // universal module definition - if ( typeof define == 'function' && define.amd ) { - // AMD - define( 'isotope/js/item',[ - 'outlayer/outlayer' - ], - factory ); - } else if ( typeof exports == 'object' ) { - // CommonJS - module.exports = factory( - require('outlayer') - ); - } else { - // browser global - window.Isotope = window.Isotope || {}; - window.Isotope.Item = factory( - window.Outlayer - ); - } - -}( window, function factory( Outlayer ) { - - -// -------------------------- Item -------------------------- // - -// sub-class Outlayer Item -function Item() { - Outlayer.Item.apply( this, arguments ); -} - -Item.prototype = new Outlayer.Item(); - -Item.prototype._create = function() { - // assign id, used for original-order sorting - this.id = this.layout.itemGUID++; - Outlayer.Item.prototype._create.call( this ); - this.sortData = {}; -}; - -Item.prototype.updateSortData = function() { - if ( this.isIgnored ) { - return; - } - // default sorters - this.sortData.id = this.id; - // for backward compatibility - this.sortData['original-order'] = this.id; - this.sortData.random = Math.random(); - // go thru getSortData obj and apply the sorters - var getSortData = this.layout.options.getSortData; - var sorters = this.layout._sorters; - for ( var key in getSortData ) { - var sorter = sorters[ key ]; - this.sortData[ key ] = sorter( this.element, this ); - } -}; - -var _destroy = Item.prototype.destroy; -Item.prototype.destroy = function() { - // call super - _destroy.apply( this, arguments ); - // reset display, #741 - this.css({ - display: '' - }); -}; - -return Item; - -})); - -/** - * Isotope LayoutMode - */ - -( function( window, factory ) { - - // universal module definition - - if ( typeof define == 'function' && define.amd ) { - // AMD - define( 'isotope/js/layout-mode',[ - 'get-size/get-size', - 'outlayer/outlayer' - ], - factory ); - } else if ( typeof exports == 'object' ) { - // CommonJS - module.exports = factory( - require('get-size'), - require('outlayer') - ); - } else { - // browser global - window.Isotope = window.Isotope || {}; - window.Isotope.LayoutMode = factory( - window.getSize, - window.Outlayer - ); - } - -}( window, function factory( getSize, Outlayer ) { - - - // layout mode class - function LayoutMode( isotope ) { - this.isotope = isotope; - // link properties - if ( isotope ) { - this.options = isotope.options[ this.namespace ]; - this.element = isotope.element; - this.items = isotope.filteredItems; - this.size = isotope.size; - } - } - - /** - * some methods should just defer to default Outlayer method - * and reference the Isotope instance as `this` - **/ - ( function() { - var facadeMethods = [ - '_resetLayout', - '_getItemLayoutPosition', - '_manageStamp', - '_getContainerSize', - '_getElementOffset', - 'needsResizeLayout' - ]; - - for ( var i=0, len = facadeMethods.length; i < len; i++ ) { - var methodName = facadeMethods[i]; - LayoutMode.prototype[ methodName ] = getOutlayerMethod( methodName ); - } - - function getOutlayerMethod( methodName ) { - return function() { - return Outlayer.prototype[ methodName ].apply( this.isotope, arguments ); - }; - } - })(); - - // ----- ----- // - - // for horizontal layout modes, check vertical size - LayoutMode.prototype.needsVerticalResizeLayout = function() { - // don't trigger if size did not change - var size = getSize( this.isotope.element ); - // check that this.size and size are there - // IE8 triggers resize on body size change, so they might not be - var hasSizes = this.isotope.size && size; - return hasSizes && size.innerHeight != this.isotope.size.innerHeight; - }; - - // ----- measurements ----- // - - LayoutMode.prototype._getMeasurement = function() { - this.isotope._getMeasurement.apply( this, arguments ); - }; - - LayoutMode.prototype.getColumnWidth = function() { - this.getSegmentSize( 'column', 'Width' ); - }; - - LayoutMode.prototype.getRowHeight = function() { - this.getSegmentSize( 'row', 'Height' ); - }; - - /** - * get columnWidth or rowHeight - * segment: 'column' or 'row' - * size 'Width' or 'Height' - **/ - LayoutMode.prototype.getSegmentSize = function( segment, size ) { - var segmentName = segment + size; - var outerSize = 'outer' + size; - // columnWidth / outerWidth // rowHeight / outerHeight - this._getMeasurement( segmentName, outerSize ); - // got rowHeight or columnWidth, we can chill - if ( this[ segmentName ] ) { - return; - } - // fall back to item of first element - var firstItemSize = this.getFirstItemSize(); - this[ segmentName ] = firstItemSize && firstItemSize[ outerSize ] || - // or size of container - this.isotope.size[ 'inner' + size ]; - }; - - LayoutMode.prototype.getFirstItemSize = function() { - var firstItem = this.isotope.filteredItems[0]; - return firstItem && firstItem.element && getSize( firstItem.element ); - }; - - // ----- methods that should reference isotope ----- // - - LayoutMode.prototype.layout = function() { - this.isotope.layout.apply( this.isotope, arguments ); - }; - - LayoutMode.prototype.getSize = function() { - this.isotope.getSize(); - this.size = this.isotope.size; - }; - - // -------------------------- create -------------------------- // - - LayoutMode.modes = {}; - - LayoutMode.create = function( namespace, options ) { - - function Mode() { - LayoutMode.apply( this, arguments ); - } - - Mode.prototype = new LayoutMode(); - - // default options - if ( options ) { - Mode.options = options; - } - - Mode.prototype.namespace = namespace; - // register in Isotope - LayoutMode.modes[ namespace ] = Mode; - - return Mode; - }; - - return LayoutMode; - -})); - -/*! - * Masonry v3.3.0 - * 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( 'masonry/masonry',[ - '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; - -})); - -/*! - * Masonry layout mode - * sub-classes Masonry - * http://masonry.desandro.com - */ - -( function( window, factory ) { - - // universal module definition - if ( typeof define == 'function' && define.amd ) { - // AMD - define( 'isotope/js/layout-modes/masonry',[ - '../layout-mode', - 'masonry/masonry' - ], - factory ); - } else if ( typeof exports == 'object' ) { - // CommonJS - module.exports = factory( - require('../layout-mode'), - require('masonry-layout') - ); - } else { - // browser global - factory( - window.Isotope.LayoutMode, - window.Masonry - ); - } - -}( window, function factory( LayoutMode, Masonry ) { - - -// -------------------------- helpers -------------------------- // - -// extend objects -function extend( a, b ) { - for ( var prop in b ) { - a[ prop ] = b[ prop ]; - } - return a; -} - -// -------------------------- masonryDefinition -------------------------- // - - // create an Outlayer layout class - var MasonryMode = LayoutMode.create('masonry'); - - // save on to these methods - var _getElementOffset = MasonryMode.prototype._getElementOffset; - var layout = MasonryMode.prototype.layout; - var _getMeasurement = MasonryMode.prototype._getMeasurement; - - // sub-class Masonry - extend( MasonryMode.prototype, Masonry.prototype ); - - // set back, as it was overwritten by Masonry - MasonryMode.prototype._getElementOffset = _getElementOffset; - MasonryMode.prototype.layout = layout; - MasonryMode.prototype._getMeasurement = _getMeasurement; - - var measureColumns = MasonryMode.prototype.measureColumns; - MasonryMode.prototype.measureColumns = function() { - // set items, used if measuring first item - this.items = this.isotope.filteredItems; - measureColumns.call( this ); - }; - - // HACK copy over isOriginLeft/Top options - var _manageStamp = MasonryMode.prototype._manageStamp; - MasonryMode.prototype._manageStamp = function() { - this.options.isOriginLeft = this.isotope.options.isOriginLeft; - this.options.isOriginTop = this.isotope.options.isOriginTop; - _manageStamp.apply( this, arguments ); - }; - - return MasonryMode; - -})); - -/** - * fitRows layout mode - */ - -( function( window, factory ) { - - // universal module definition - if ( typeof define == 'function' && define.amd ) { - // AMD - define( 'isotope/js/layout-modes/fit-rows',[ - '../layout-mode' - ], - factory ); - } else if ( typeof exports == 'object' ) { - // CommonJS - module.exports = factory( - require('../layout-mode') - ); - } else { - // browser global - factory( - window.Isotope.LayoutMode - ); - } - -}( window, function factory( LayoutMode ) { - - -var FitRows = LayoutMode.create('fitRows'); - -FitRows.prototype._resetLayout = function() { - this.x = 0; - this.y = 0; - this.maxY = 0; - this._getMeasurement( 'gutter', 'outerWidth' ); -}; - -FitRows.prototype._getItemLayoutPosition = function( item ) { - item.getSize(); - - var itemWidth = item.size.outerWidth + this.gutter; - // if this element cannot fit in the current row - var containerWidth = this.isotope.size.innerWidth + this.gutter; - if ( this.x !== 0 && itemWidth + this.x > containerWidth ) { - this.x = 0; - this.y = this.maxY; - } - - var position = { - x: this.x, - y: this.y - }; - - this.maxY = Math.max( this.maxY, this.y + item.size.outerHeight ); - this.x += itemWidth; - - return position; -}; - -FitRows.prototype._getContainerSize = function() { - return { height: this.maxY }; -}; - -return FitRows; - -})); - -/** - * vertical layout mode - */ - -( function( window, factory ) { - - // universal module definition - if ( typeof define == 'function' && define.amd ) { - // AMD - define( 'isotope/js/layout-modes/vertical',[ - '../layout-mode' - ], - factory ); - } else if ( typeof exports == 'object' ) { - // CommonJS - module.exports = factory( - require('../layout-mode') - ); - } else { - // browser global - factory( - window.Isotope.LayoutMode - ); - } - -}( window, function factory( LayoutMode ) { - - -var Vertical = LayoutMode.create( 'vertical', { - horizontalAlignment: 0 -}); - -Vertical.prototype._resetLayout = function() { - this.y = 0; -}; - -Vertical.prototype._getItemLayoutPosition = function( item ) { - item.getSize(); - var x = ( this.isotope.size.innerWidth - item.size.outerWidth ) * - this.options.horizontalAlignment; - var y = this.y; - this.y += item.size.outerHeight; - return { x: x, y: y }; -}; - -Vertical.prototype._getContainerSize = function() { - return { height: this.y }; -}; - -return Vertical; - -})); - -/*! - * Isotope v2.2.0 - * - * Licensed GPLv3 for open source use - * or Isotope Commercial License for commercial use - * - * http://isotope.metafizzy.co - * Copyright 2015 Metafizzy - */ - -( function( window, factory ) { - - // universal module definition - - if ( typeof define == 'function' && define.amd ) { - // AMD - define( [ - 'outlayer/outlayer', - 'get-size/get-size', - 'matches-selector/matches-selector', - 'fizzy-ui-utils/utils', - 'isotope/js/item', - 'isotope/js/layout-mode', - // include default layout modes - 'isotope/js/layout-modes/masonry', - 'isotope/js/layout-modes/fit-rows', - 'isotope/js/layout-modes/vertical' - ], - function( Outlayer, getSize, matchesSelector, utils, Item, LayoutMode ) { - return factory( window, Outlayer, getSize, matchesSelector, utils, Item, LayoutMode ); - }); - } else if ( typeof exports == 'object' ) { - // CommonJS - module.exports = factory( - window, - require('outlayer'), - require('get-size'), - require('desandro-matches-selector'), - require('fizzy-ui-utils'), - require('./item'), - require('./layout-mode'), - // include default layout modes - require('./layout-modes/masonry'), - require('./layout-modes/fit-rows'), - require('./layout-modes/vertical') - ); - } else { - // browser global - window.Isotope = factory( - window, - window.Outlayer, - window.getSize, - window.matchesSelector, - window.fizzyUIUtils, - window.Isotope.Item, - window.Isotope.LayoutMode - ); - } - -}( window, function factory( window, Outlayer, getSize, matchesSelector, utils, - Item, LayoutMode ) { - - - -// -------------------------- vars -------------------------- // - -var jQuery = window.jQuery; - -// -------------------------- helpers -------------------------- // - -var trim = String.prototype.trim ? - function( str ) { - return str.trim(); - } : - function( str ) { - return str.replace( /^\s+|\s+$/g, '' ); - }; - -var docElem = document.documentElement; - -var getText = docElem.textContent ? - function( elem ) { - return elem.textContent; - } : - function( elem ) { - return elem.innerText; - }; - -// -------------------------- isotopeDefinition -------------------------- // - - // create an Outlayer layout class - var Isotope = Outlayer.create( 'isotope', { - layoutMode: "masonry", - isJQueryFiltering: true, - sortAscending: true - }); - - Isotope.Item = Item; - Isotope.LayoutMode = LayoutMode; - - Isotope.prototype._create = function() { - this.itemGUID = 0; - // functions that sort items - this._sorters = {}; - this._getSorters(); - // call super - Outlayer.prototype._create.call( this ); - - // create layout modes - this.modes = {}; - // start filteredItems with all items - this.filteredItems = this.items; - // keep of track of sortBys - this.sortHistory = [ 'original-order' ]; - // create from registered layout modes - for ( var name in LayoutMode.modes ) { - this._initLayoutMode( name ); - } - }; - - Isotope.prototype.reloadItems = function() { - // reset item ID counter - this.itemGUID = 0; - // call super - Outlayer.prototype.reloadItems.call( this ); - }; - - Isotope.prototype._itemize = function() { - var items = Outlayer.prototype._itemize.apply( this, arguments ); - // assign ID for original-order - for ( var i=0, len = items.length; i < len; i++ ) { - var item = items[i]; - item.id = this.itemGUID++; - } - this._updateItemsSortData( items ); - return items; - }; - - - // -------------------------- layout -------------------------- // - - Isotope.prototype._initLayoutMode = function( name ) { - var Mode = LayoutMode.modes[ name ]; - // set mode options - // HACK extend initial options, back-fill in default options - var initialOpts = this.options[ name ] || {}; - this.options[ name ] = Mode.options ? - utils.extend( Mode.options, initialOpts ) : initialOpts; - // init layout mode instance - this.modes[ name ] = new Mode( this ); - }; - - - Isotope.prototype.layout = function() { - // if first time doing layout, do all magic - if ( !this._isLayoutInited && this.options.isInitLayout ) { - this.arrange(); - return; - } - this._layout(); - }; - - // private method to be used in layout() & magic() - Isotope.prototype._layout = function() { - // don't animate first layout - var isInstant = this._getIsInstant(); - // layout flow - this._resetLayout(); - this._manageStamps(); - this.layoutItems( this.filteredItems, isInstant ); - - // flag for initalized - this._isLayoutInited = true; - }; - - // filter + sort + layout - Isotope.prototype.arrange = function( opts ) { - // set any options pass - this.option( opts ); - this._getIsInstant(); - // filter, sort, and layout - - // filter - var filtered = this._filter( this.items ); - this.filteredItems = filtered.matches; - - var _this = this; - function hideReveal() { - _this.reveal( filtered.needReveal ); - _this.hide( filtered.needHide ); - } - - this._bindArrangeComplete(); - - if ( this._isInstant ) { - this._noTransition( hideReveal ); - } else { - hideReveal(); - } - - this._sort(); - this._layout(); - }; - // alias to _init for main plugin method - Isotope.prototype._init = Isotope.prototype.arrange; - - // HACK - // Don't animate/transition first layout - // Or don't animate/transition other layouts - Isotope.prototype._getIsInstant = function() { - var isInstant = this.options.isLayoutInstant !== undefined ? - this.options.isLayoutInstant : !this._isLayoutInited; - this._isInstant = isInstant; - return isInstant; - }; - - // listen for layoutComplete, hideComplete and revealComplete - // to trigger arrangeComplete - Isotope.prototype._bindArrangeComplete = function() { - // listen for 3 events to trigger arrangeComplete - var isLayoutComplete, isHideComplete, isRevealComplete; - var _this = this; - function arrangeParallelCallback() { - if ( isLayoutComplete && isHideComplete && isRevealComplete ) { - _this.emitEvent( 'arrangeComplete', [ _this.filteredItems ] ); - } - } - this.once( 'layoutComplete', function() { - isLayoutComplete = true; - arrangeParallelCallback(); - }); - this.once( 'hideComplete', function() { - isHideComplete = true; - arrangeParallelCallback(); - }); - this.once( 'revealComplete', function() { - isRevealComplete = true; - arrangeParallelCallback(); - }); - }; - - // -------------------------- filter -------------------------- // - - Isotope.prototype._filter = function( items ) { - var filter = this.options.filter; - filter = filter || '*'; - var matches = []; - var hiddenMatched = []; - var visibleUnmatched = []; - - var test = this._getFilterTest( filter ); - - // test each item - for ( var i=0, len = items.length; i < len; i++ ) { - var item = items[i]; - if ( item.isIgnored ) { - continue; - } - // add item to either matched or unmatched group - var isMatched = test( item ); - // item.isFilterMatched = isMatched; - // add to matches if its a match - if ( isMatched ) { - matches.push( item ); - } - // add to additional group if item needs to be hidden or revealed - if ( isMatched && item.isHidden ) { - hiddenMatched.push( item ); - } else if ( !isMatched && !item.isHidden ) { - visibleUnmatched.push( item ); - } - } - - // return collections of items to be manipulated - return { - matches: matches, - needReveal: hiddenMatched, - needHide: visibleUnmatched - }; - }; - - // get a jQuery, function, or a matchesSelector test given the filter - Isotope.prototype._getFilterTest = function( filter ) { - if ( jQuery && this.options.isJQueryFiltering ) { - // use jQuery - return function( item ) { - return jQuery( item.element ).is( filter ); - }; - } - if ( typeof filter == 'function' ) { - // use filter as function - return function( item ) { - return filter( item.element ); - }; - } - // default, use filter as selector string - return function( item ) { - return matchesSelector( item.element, filter ); - }; - }; - - // -------------------------- sorting -------------------------- // - - /** - * @params {Array} elems - * @public - */ - Isotope.prototype.updateSortData = function( elems ) { - // get items - var items; - if ( elems ) { - elems = utils.makeArray( elems ); - items = this.getItems( elems ); - } else { - // update all items if no elems provided - items = this.items; - } - - this._getSorters(); - this._updateItemsSortData( items ); - }; - - Isotope.prototype._getSorters = function() { - var getSortData = this.options.getSortData; - for ( var key in getSortData ) { - var sorter = getSortData[ key ]; - this._sorters[ key ] = mungeSorter( sorter ); - } - }; - - /** - * @params {Array} items - of Isotope.Items - * @private - */ - Isotope.prototype._updateItemsSortData = function( items ) { - // do not update if no items - var len = items && items.length; - - for ( var i=0; len && i < len; i++ ) { - var item = items[i]; - item.updateSortData(); - } - }; - - // ----- munge sorter ----- // - - // encapsulate this, as we just need mungeSorter - // other functions in here are just for munging - var mungeSorter = ( function() { - // add a magic layer to sorters for convienent shorthands - // `.foo-bar` will use the text of .foo-bar querySelector - // `[foo-bar]` will use attribute - // you can also add parser - // `.foo-bar parseInt` will parse that as a number - function mungeSorter( sorter ) { - // if not a string, return function or whatever it is - if ( typeof sorter != 'string' ) { - return sorter; - } - // parse the sorter string - var args = trim( sorter ).split(' '); - var query = args[0]; - // check if query looks like [an-attribute] - var attrMatch = query.match( /^\[(.+)\]$/ ); - var attr = attrMatch && attrMatch[1]; - var getValue = getValueGetter( attr, query ); - // use second argument as a parser - var parser = Isotope.sortDataParsers[ args[1] ]; - // parse the value, if there was a parser - sorter = parser ? function( elem ) { - return elem && parser( getValue( elem ) ); - } : - // otherwise just return value - function( elem ) { - return elem && getValue( elem ); - }; - - return sorter; - } - - // get an attribute getter, or get text of the querySelector - function getValueGetter( attr, query ) { - var getValue; - // if query looks like [foo-bar], get attribute - if ( attr ) { - getValue = function( elem ) { - return elem.getAttribute( attr ); - }; - } else { - // otherwise, assume its a querySelector, and get its text - getValue = function( elem ) { - var child = elem.querySelector( query ); - return child && getText( child ); - }; - } - return getValue; - } - - return mungeSorter; - })(); - - // parsers used in getSortData shortcut strings - Isotope.sortDataParsers = { - 'parseInt': function( val ) { - return parseInt( val, 10 ); - }, - 'parseFloat': function( val ) { - return parseFloat( val ); - } - }; - - // ----- sort method ----- // - - // sort filteredItem order - Isotope.prototype._sort = function() { - var sortByOpt = this.options.sortBy; - if ( !sortByOpt ) { - return; - } - // concat all sortBy and sortHistory - var sortBys = [].concat.apply( sortByOpt, this.sortHistory ); - // sort magic - var itemSorter = getItemSorter( sortBys, this.options.sortAscending ); - this.filteredItems.sort( itemSorter ); - // keep track of sortBy History - if ( sortByOpt != this.sortHistory[0] ) { - // add to front, oldest goes in last - this.sortHistory.unshift( sortByOpt ); - } - }; - - // returns a function used for sorting - function getItemSorter( sortBys, sortAsc ) { - return function sorter( itemA, itemB ) { - // cycle through all sortKeys - for ( var i = 0, len = sortBys.length; i < len; i++ ) { - var sortBy = sortBys[i]; - var a = itemA.sortData[ sortBy ]; - var b = itemB.sortData[ sortBy ]; - if ( a > b || a < b ) { - // if sortAsc is an object, use the value given the sortBy key - var isAscending = sortAsc[ sortBy ] !== undefined ? sortAsc[ sortBy ] : sortAsc; - var direction = isAscending ? 1 : -1; - return ( a > b ? 1 : -1 ) * direction; - } - } - return 0; - }; - } - - // -------------------------- methods -------------------------- // - - // get layout mode - Isotope.prototype._mode = function() { - var layoutMode = this.options.layoutMode; - var mode = this.modes[ layoutMode ]; - if ( !mode ) { - // TODO console.error - throw new Error( 'No layout mode: ' + layoutMode ); - } - // HACK sync mode's options - // any options set after init for layout mode need to be synced - mode.options = this.options[ layoutMode ]; - return mode; - }; - - Isotope.prototype._resetLayout = function() { - // trigger original reset layout - Outlayer.prototype._resetLayout.call( this ); - this._mode()._resetLayout(); - }; - - Isotope.prototype._getItemLayoutPosition = function( item ) { - return this._mode()._getItemLayoutPosition( item ); - }; - - Isotope.prototype._manageStamp = function( stamp ) { - this._mode()._manageStamp( stamp ); - }; - - Isotope.prototype._getContainerSize = function() { - return this._mode()._getContainerSize(); - }; - - Isotope.prototype.needsResizeLayout = function() { - return this._mode().needsResizeLayout(); - }; - - // -------------------------- adding & removing -------------------------- // - - // HEADS UP overwrites default Outlayer appended - Isotope.prototype.appended = function( elems ) { - var items = this.addItems( elems ); - if ( !items.length ) { - return; - } - // filter, layout, reveal new items - var filteredItems = this._filterRevealAdded( items ); - // add to filteredItems - this.filteredItems = this.filteredItems.concat( filteredItems ); - }; - - // HEADS UP overwrites default Outlayer prepended - Isotope.prototype.prepended = function( elems ) { - var items = this._itemize( elems ); - if ( !items.length ) { - return; - } - // start new layout - this._resetLayout(); - this._manageStamps(); - // filter, layout, reveal new items - var filteredItems = this._filterRevealAdded( items ); - // layout previous items - this.layoutItems( this.filteredItems ); - // add to items and filteredItems - this.filteredItems = filteredItems.concat( this.filteredItems ); - this.items = items.concat( this.items ); - }; - - Isotope.prototype._filterRevealAdded = function( items ) { - var filtered = this._filter( items ); - this.hide( filtered.needHide ); - // reveal all new items - this.reveal( filtered.matches ); - // layout new items, no transition - this.layoutItems( filtered.matches, true ); - return filtered.matches; - }; - - /** - * Filter, sort, and layout newly-appended item elements - * @param {Array or NodeList or Element} elems - */ - Isotope.prototype.insert = function( elems ) { - var items = this.addItems( elems ); - if ( !items.length ) { - return; - } - // append item elements - var i, item; - var len = items.length; - for ( i=0; i < len; i++ ) { - item = items[i]; - this.element.appendChild( item.element ); - } - // filter new stuff - var filteredInsertItems = this._filter( items ).matches; - // set flag - for ( i=0; i < len; i++ ) { - items[i].isLayoutInstant = true; - } - this.arrange(); - // reset flag - for ( i=0; i < len; i++ ) { - delete items[i].isLayoutInstant; - } - this.reveal( filteredInsertItems ); - }; - - var _remove = Isotope.prototype.remove; - Isotope.prototype.remove = function( elems ) { - elems = utils.makeArray( elems ); - var removeItems = this.getItems( elems ); - // do regular thing - _remove.call( this, elems ); - // bail if no items to remove - var len = removeItems && removeItems.length; - if ( !len ) { - return; - } - // remove elems from filteredItems - for ( var i=0; i < len; i++ ) { - var item = removeItems[i]; - // remove item from collection - utils.removeFrom( this.filteredItems, item ); - } - }; - - Isotope.prototype.shuffle = function() { - // update random sortData - for ( var i=0, len = this.items.length; i < len; i++ ) { - var item = this.items[i]; - item.sortData.random = Math.random(); - } - this.options.sortBy = 'random'; - this._sort(); - this._layout(); - }; - - /** - * trigger fn without transition - * kind of hacky to have this in the first place - * @param {Function} fn - * @returns ret - * @private - */ - Isotope.prototype._noTransition = function( fn ) { - // save transitionDuration before disabling - var transitionDuration = this.options.transitionDuration; - // disable transition - this.options.transitionDuration = 0; - // do it - var returnValue = fn.call( this ); - // re-enable transition for reveal - this.options.transitionDuration = transitionDuration; - return returnValue; - }; - - // ----- helper methods ----- // - - /** - * getter method for getting filtered item elements - * @returns {Array} elems - collection of item elements - */ - Isotope.prototype.getFilteredItemElements = function() { - var elems = []; - for ( var i=0, len = this.filteredItems.length; i < len; i++ ) { - elems.push( this.filteredItems[i].element ); - } - return elems; - }; - - // ----- ----- // - - return Isotope; - -})); - diff --git a/profiles/wcm_base/libraries/jquery.isotope/dist/isotope.pkgd.min.js b/profiles/wcm_base/libraries/jquery.isotope/dist/isotope.pkgd.min.js deleted file mode 100644 index 44a2e364f9fca1fa265a24a3b40208065c64509f..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/libraries/jquery.isotope/dist/isotope.pkgd.min.js +++ /dev/null @@ -1,12 +0,0 @@ -/*! - * Isotope PACKAGED v2.2.0 - * - * Licensed GPLv3 for open source use - * or Isotope Commercial License for commercial use - * - * http://isotope.metafizzy.co - * Copyright 2015 Metafizzy - */ - -(function(t){function e(){}function i(t){function i(e){e.prototype.option||(e.prototype.option=function(e){t.isPlainObject(e)&&(this.options=t.extend(!0,this.options,e))})}function n(e,i){t.fn[e]=function(n){if("string"==typeof n){for(var s=o.call(arguments,1),a=0,u=this.length;u>a;a++){var p=this[a],h=t.data(p,e);if(h)if(t.isFunction(h[n])&&"_"!==n.charAt(0)){var f=h[n].apply(h,s);if(void 0!==f)return f}else r("no such method '"+n+"' for "+e+" instance");else r("cannot call methods on "+e+" prior to initialization; "+"attempted to call '"+n+"'")}return this}return this.each(function(){var o=t.data(this,e);o?(o.option(n),o._init()):(o=new i(this,n),t.data(this,e,o))})}}if(t){var r="undefined"==typeof console?e:function(t){console.error(t)};return t.bridget=function(t,e){i(e),n(t,e)},t.bridget}}var o=Array.prototype.slice;"function"==typeof define&&define.amd?define("jquery-bridget/jquery.bridget",["jquery"],i):"object"==typeof exports?i(require("jquery")):i(t.jQuery)})(window),function(t){function e(e){var i=t.event;return i.target=i.target||i.srcElement||e,i}var i=document.documentElement,o=function(){};i.addEventListener?o=function(t,e,i){t.addEventListener(e,i,!1)}:i.attachEvent&&(o=function(t,i,o){t[i+o]=o.handleEvent?function(){var i=e(t);o.handleEvent.call(o,i)}:function(){var i=e(t);o.call(t,i)},t.attachEvent("on"+i,t[i+o])});var n=function(){};i.removeEventListener?n=function(t,e,i){t.removeEventListener(e,i,!1)}:i.detachEvent&&(n=function(t,e,i){t.detachEvent("on"+e,t[e+i]);try{delete t[e+i]}catch(o){t[e+i]=void 0}});var r={bind:o,unbind:n};"function"==typeof define&&define.amd?define("eventie/eventie",r):"object"==typeof exports?module.exports=r:t.eventie=r}(window),function(){function t(){}function e(t,e){for(var i=t.length;i--;)if(t[i].listener===e)return i;return-1}function i(t){return function(){return this[t].apply(this,arguments)}}var o=t.prototype,n=this,r=n.EventEmitter;o.getListeners=function(t){var e,i,o=this._getEvents();if(t instanceof RegExp){e={};for(i in o)o.hasOwnProperty(i)&&t.test(i)&&(e[i]=o[i])}else e=o[t]||(o[t]=[]);return e},o.flattenListeners=function(t){var e,i=[];for(e=0;t.length>e;e+=1)i.push(t[e].listener);return i},o.getListenersAsObject=function(t){var e,i=this.getListeners(t);return i instanceof Array&&(e={},e[t]=i),e||i},o.addListener=function(t,i){var o,n=this.getListenersAsObject(t),r="object"==typeof i;for(o in n)n.hasOwnProperty(o)&&-1===e(n[o],i)&&n[o].push(r?i:{listener:i,once:!1});return this},o.on=i("addListener"),o.addOnceListener=function(t,e){return this.addListener(t,{listener:e,once:!0})},o.once=i("addOnceListener"),o.defineEvent=function(t){return this.getListeners(t),this},o.defineEvents=function(t){for(var e=0;t.length>e;e+=1)this.defineEvent(t[e]);return this},o.removeListener=function(t,i){var o,n,r=this.getListenersAsObject(t);for(n in r)r.hasOwnProperty(n)&&(o=e(r[n],i),-1!==o&&r[n].splice(o,1));return this},o.off=i("removeListener"),o.addListeners=function(t,e){return this.manipulateListeners(!1,t,e)},o.removeListeners=function(t,e){return this.manipulateListeners(!0,t,e)},o.manipulateListeners=function(t,e,i){var o,n,r=t?this.removeListener:this.addListener,s=t?this.removeListeners:this.addListeners;if("object"!=typeof e||e instanceof RegExp)for(o=i.length;o--;)r.call(this,e,i[o]);else for(o in e)e.hasOwnProperty(o)&&(n=e[o])&&("function"==typeof n?r.call(this,o,n):s.call(this,o,n));return this},o.removeEvent=function(t){var e,i=typeof t,o=this._getEvents();if("string"===i)delete o[t];else if(t instanceof RegExp)for(e in o)o.hasOwnProperty(e)&&t.test(e)&&delete o[e];else delete this._events;return this},o.removeAllListeners=i("removeEvent"),o.emitEvent=function(t,e){var i,o,n,r,s=this.getListenersAsObject(t);for(n in s)if(s.hasOwnProperty(n))for(o=s[n].length;o--;)i=s[n][o],i.once===!0&&this.removeListener(t,i.listener),r=i.listener.apply(this,e||[]),r===this._getOnceReturnValue()&&this.removeListener(t,i.listener);return this},o.trigger=i("emitEvent"),o.emit=function(t){var e=Array.prototype.slice.call(arguments,1);return this.emitEvent(t,e)},o.setOnceReturnValue=function(t){return this._onceReturnValue=t,this},o._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},o._getEvents=function(){return this._events||(this._events={})},t.noConflict=function(){return n.EventEmitter=r,t},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return t}):"object"==typeof module&&module.exports?module.exports=t:n.EventEmitter=t}.call(this),function(t){function e(t){if(t){if("string"==typeof o[t])return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var e,n=0,r=i.length;r>n;n++)if(e=i[n]+t,"string"==typeof o[e])return e}}var i="Webkit Moz ms Ms O".split(" "),o=document.documentElement.style;"function"==typeof define&&define.amd?define("get-style-property/get-style-property",[],function(){return e}):"object"==typeof exports?module.exports=e:t.getStyleProperty=e}(window),function(t){function e(t){var e=parseFloat(t),i=-1===t.indexOf("%")&&!isNaN(e);return i&&e}function i(){}function o(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0,i=s.length;i>e;e++){var o=s[e];t[o]=0}return t}function n(i){function n(){if(!d){d=!0;var o=t.getComputedStyle;if(p=function(){var t=o?function(t){return o(t,null)}:function(t){return t.currentStyle};return function(e){var i=t(e);return i||r("Style returned "+i+". Are you running this code in a hidden iframe on Firefox? "+"See http://bit.ly/getsizebug1"),i}}(),h=i("boxSizing")){var n=document.createElement("div");n.style.width="200px",n.style.padding="1px 2px 3px 4px",n.style.borderStyle="solid",n.style.borderWidth="1px 2px 3px 4px",n.style[h]="border-box";var s=document.body||document.documentElement;s.appendChild(n);var a=p(n);f=200===e(a.width),s.removeChild(n)}}}function a(t){if(n(),"string"==typeof t&&(t=document.querySelector(t)),t&&"object"==typeof t&&t.nodeType){var i=p(t);if("none"===i.display)return o();var r={};r.width=t.offsetWidth,r.height=t.offsetHeight;for(var a=r.isBorderBox=!(!h||!i[h]||"border-box"!==i[h]),d=0,l=s.length;l>d;d++){var c=s[d],m=i[c];m=u(t,m);var y=parseFloat(m);r[c]=isNaN(y)?0:y}var g=r.paddingLeft+r.paddingRight,v=r.paddingTop+r.paddingBottom,_=r.marginLeft+r.marginRight,I=r.marginTop+r.marginBottom,z=r.borderLeftWidth+r.borderRightWidth,L=r.borderTopWidth+r.borderBottomWidth,x=a&&f,E=e(i.width);E!==!1&&(r.width=E+(x?0:g+z));var b=e(i.height);return b!==!1&&(r.height=b+(x?0:v+L)),r.innerWidth=r.width-(g+z),r.innerHeight=r.height-(v+L),r.outerWidth=r.width+_,r.outerHeight=r.height+I,r}}function u(e,i){if(t.getComputedStyle||-1===i.indexOf("%"))return i;var o=e.style,n=o.left,r=e.runtimeStyle,s=r&&r.left;return s&&(r.left=e.currentStyle.left),o.left=i,i=o.pixelLeft,o.left=n,s&&(r.left=s),i}var p,h,f,d=!1;return a}var r="undefined"==typeof console?i:function(t){console.error(t)},s=["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"],n):"object"==typeof exports?module.exports=n(require("desandro-get-style-property")):t.getSize=n(t.getStyleProperty)}(window),function(t){function e(t){"function"==typeof t&&(e.isReady?t():s.push(t))}function i(t){var i="readystatechange"===t.type&&"complete"!==r.readyState;e.isReady||i||o()}function o(){e.isReady=!0;for(var t=0,i=s.length;i>t;t++){var o=s[t];o()}}function n(n){return"complete"===r.readyState?o():(n.bind(r,"DOMContentLoaded",i),n.bind(r,"readystatechange",i),n.bind(t,"load",i)),e}var r=t.document,s=[];e.isReady=!1,"function"==typeof define&&define.amd?define("doc-ready/doc-ready",["eventie/eventie"],n):"object"==typeof exports?module.exports=n(require("eventie")):t.docReady=n(t.eventie)}(window),function(t){function e(t,e){return t[s](e)}function i(t){if(!t.parentNode){var e=document.createDocumentFragment();e.appendChild(t)}}function o(t,e){i(t);for(var o=t.parentNode.querySelectorAll(e),n=0,r=o.length;r>n;n++)if(o[n]===t)return!0;return!1}function n(t,o){return i(t),e(t,o)}var r,s=function(){if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],i=0,o=e.length;o>i;i++){var n=e[i],r=n+"MatchesSelector";if(t[r])return r}}();if(s){var a=document.createElement("div"),u=e(a,"div");r=u?e:n}else r=o;"function"==typeof define&&define.amd?define("matches-selector/matches-selector",[],function(){return r}):"object"==typeof exports?module.exports=r:window.matchesSelector=r}(Element.prototype),function(t,e){"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["doc-ready/doc-ready","matches-selector/matches-selector"],function(i,o){return e(t,i,o)}):"object"==typeof exports?module.exports=e(t,require("doc-ready"),require("desandro-matches-selector")):t.fizzyUIUtils=e(t,t.docReady,t.matchesSelector)}(window,function(t,e,i){var o={};o.extend=function(t,e){for(var i in e)t[i]=e[i];return t},o.modulo=function(t,e){return(t%e+e)%e};var n=Object.prototype.toString;o.isArray=function(t){return"[object Array]"==n.call(t)},o.makeArray=function(t){var e=[];if(o.isArray(t))e=t;else if(t&&"number"==typeof t.length)for(var i=0,n=t.length;n>i;i++)e.push(t[i]);else e.push(t);return e},o.indexOf=Array.prototype.indexOf?function(t,e){return t.indexOf(e)}:function(t,e){for(var i=0,o=t.length;o>i;i++)if(t[i]===e)return i;return-1},o.removeFrom=function(t,e){var i=o.indexOf(t,e);-1!=i&&t.splice(i,1)},o.isElement="function"==typeof HTMLElement||"object"==typeof HTMLElement?function(t){return t instanceof HTMLElement}:function(t){return t&&"object"==typeof t&&1==t.nodeType&&"string"==typeof t.nodeName},o.setText=function(){function t(t,i){e=e||(void 0!==document.documentElement.textContent?"textContent":"innerText"),t[e]=i}var e;return t}(),o.getParent=function(t,e){for(;t!=document.body;)if(t=t.parentNode,i(t,e))return t},o.getQueryElement=function(t){return"string"==typeof t?document.querySelector(t):t},o.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},o.filterFindElements=function(t,e){t=o.makeArray(t);for(var n=[],r=0,s=t.length;s>r;r++){var a=t[r];if(o.isElement(a))if(e){i(a,e)&&n.push(a);for(var u=a.querySelectorAll(e),p=0,h=u.length;h>p;p++)n.push(u[p])}else n.push(a)}return n},o.debounceMethod=function(t,e,i){var o=t.prototype[e],n=e+"Timeout";t.prototype[e]=function(){var t=this[n];t&&clearTimeout(t);var e=arguments,r=this;this[n]=setTimeout(function(){o.apply(r,e),delete r[n]},i||100)}},o.toDashed=function(t){return t.replace(/(.)([A-Z])/g,function(t,e,i){return e+"-"+i}).toLowerCase()};var r=t.console;return o.htmlInit=function(i,n){e(function(){for(var e=o.toDashed(n),s=document.querySelectorAll(".js-"+e),a="data-"+e+"-options",u=0,p=s.length;p>u;u++){var h,f=s[u],d=f.getAttribute(a);try{h=d&&JSON.parse(d)}catch(l){r&&r.error("Error parsing "+a+" on "+f.nodeName.toLowerCase()+(f.id?"#"+f.id:"")+": "+l);continue}var c=new i(f,h),m=t.jQuery;m&&m.data(f,n,c)}})},o}),function(t,e){"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(i,o,n,r){return e(t,i,o,n,r)}):"object"==typeof exports?module.exports=e(t,require("wolfy87-eventemitter"),require("get-size"),require("desandro-get-style-property"),require("fizzy-ui-utils")):(t.Outlayer={},t.Outlayer.Item=e(t,t.EventEmitter,t.getSize,t.getStyleProperty,t.fizzyUIUtils))}(window,function(t,e,i,o,n){function r(t){for(var e in t)return!1;return e=null,!0}function s(t,e){t&&(this.element=t,this.layout=e,this.position={x:0,y:0},this._create())}var a=t.getComputedStyle,u=a?function(t){return a(t,null)}:function(t){return t.currentStyle},p=o("transition"),h=o("transform"),f=p&&h,d=!!o("perspective"),l={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend",transition:"transitionend"}[p],c=["transform","transition","transitionDuration","transitionProperty"],m=function(){for(var t={},e=0,i=c.length;i>e;e++){var n=c[e],r=o(n);r&&r!==n&&(t[n]=r)}return t}();n.extend(s.prototype,e.prototype),s.prototype._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},s.prototype.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},s.prototype.getSize=function(){this.size=i(this.element)},s.prototype.css=function(t){var e=this.element.style;for(var i in t){var o=m[i]||i;e[o]=t[i]}},s.prototype.getPosition=function(){var t=u(this.element),e=this.layout.options,i=e.isOriginLeft,o=e.isOriginTop,n=parseInt(t[i?"left":"right"],10),r=parseInt(t[o?"top":"bottom"],10);n=isNaN(n)?0:n,r=isNaN(r)?0:r;var s=this.layout.size;n-=i?s.paddingLeft:s.paddingRight,r-=o?s.paddingTop:s.paddingBottom,this.position.x=n,this.position.y=r},s.prototype.layoutPosition=function(){var t=this.layout.size,e=this.layout.options,i={},o=e.isOriginLeft?"paddingLeft":"paddingRight",n=e.isOriginLeft?"left":"right",r=e.isOriginLeft?"right":"left",s=this.position.x+t[o];s=e.percentPosition&&!e.isHorizontal?100*(s/t.width)+"%":s+"px",i[n]=s,i[r]="";var a=e.isOriginTop?"paddingTop":"paddingBottom",u=e.isOriginTop?"top":"bottom",p=e.isOriginTop?"bottom":"top",h=this.position.y+t[a];h=e.percentPosition&&e.isHorizontal?100*(h/t.height)+"%":h+"px",i[u]=h,i[p]="",this.css(i),this.emitEvent("layout",[this])};var y=d?function(t,e){return"translate3d("+t+"px, "+e+"px, 0)"}:function(t,e){return"translate("+t+"px, "+e+"px)"};s.prototype._transitionTo=function(t,e){this.getPosition();var i=this.position.x,o=this.position.y,n=parseInt(t,10),r=parseInt(e,10),s=n===this.position.x&&r===this.position.y;if(this.setPosition(t,e),s&&!this.isTransitioning)return this.layoutPosition(),void 0;var a=t-i,u=e-o,p={},h=this.layout.options;a=h.isOriginLeft?a:-a,u=h.isOriginTop?u:-u,p.transform=y(a,u),this.transition({to:p,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},s.prototype.goTo=function(t,e){this.setPosition(t,e),this.layoutPosition()},s.prototype.moveTo=f?s.prototype._transitionTo:s.prototype.goTo,s.prototype.setPosition=function(t,e){this.position.x=parseInt(t,10),this.position.y=parseInt(e,10)},s.prototype._nonTransition=function(t){this.css(t.to),t.isCleaning&&this._removeStyles(t.to);for(var e in t.onTransitionEnd)t.onTransitionEnd[e].call(this)},s.prototype._transition=function(t){if(!parseFloat(this.layout.options.transitionDuration))return this._nonTransition(t),void 0;var e=this._transn;for(var i in t.onTransitionEnd)e.onEnd[i]=t.onTransitionEnd[i];for(i in t.to)e.ingProperties[i]=!0,t.isCleaning&&(e.clean[i]=!0);if(t.from){this.css(t.from);var o=this.element.offsetHeight;o=null}this.enableTransition(t.to),this.css(t.to),this.isTransitioning=!0};var g=h&&n.toDashed(h)+",opacity";s.prototype.enableTransition=function(){this.isTransitioning||(this.css({transitionProperty:g,transitionDuration:this.layout.options.transitionDuration}),this.element.addEventListener(l,this,!1))},s.prototype.transition=s.prototype[p?"_transition":"_nonTransition"],s.prototype.onwebkitTransitionEnd=function(t){this.ontransitionend(t)},s.prototype.onotransitionend=function(t){this.ontransitionend(t)};var v={"-webkit-transform":"transform","-moz-transform":"transform","-o-transform":"transform"};s.prototype.ontransitionend=function(t){if(t.target===this.element){var e=this._transn,i=v[t.propertyName]||t.propertyName;if(delete e.ingProperties[i],r(e.ingProperties)&&this.disableTransition(),i in e.clean&&(this.element.style[t.propertyName]="",delete e.clean[i]),i in e.onEnd){var o=e.onEnd[i];o.call(this),delete e.onEnd[i]}this.emitEvent("transitionEnd",[this])}},s.prototype.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(l,this,!1),this.isTransitioning=!1},s.prototype._removeStyles=function(t){var e={};for(var i in t)e[i]="";this.css(e)};var _={transitionProperty:"",transitionDuration:""};return s.prototype.removeTransitionStyles=function(){this.css(_)},s.prototype.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},s.prototype.remove=function(){if(!p||!parseFloat(this.layout.options.transitionDuration))return this.removeElem(),void 0;var t=this;this.once("transitionEnd",function(){t.removeElem()}),this.hide()},s.prototype.reveal=function(){delete this.isHidden,this.css({display:""});var t=this.layout.options,e={},i=this.getHideRevealTransitionEndProperty("visibleStyle");e[i]=this.onRevealTransitionEnd,this.transition({from:t.hiddenStyle,to:t.visibleStyle,isCleaning:!0,onTransitionEnd:e})},s.prototype.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},s.prototype.getHideRevealTransitionEndProperty=function(t){var e=this.layout.options[t];if(e.opacity)return"opacity";for(var i in e)return i},s.prototype.hide=function(){this.isHidden=!0,this.css({display:""});var t=this.layout.options,e={},i=this.getHideRevealTransitionEndProperty("hiddenStyle");e[i]=this.onHideTransitionEnd,this.transition({from:t.visibleStyle,to:t.hiddenStyle,isCleaning:!0,onTransitionEnd:e})},s.prototype.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},s.prototype.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},s}),function(t,e){"function"==typeof define&&define.amd?define("outlayer/outlayer",["eventie/eventie","eventEmitter/EventEmitter","get-size/get-size","fizzy-ui-utils/utils","./item"],function(i,o,n,r,s){return e(t,i,o,n,r,s)}):"object"==typeof exports?module.exports=e(t,require("eventie"),require("wolfy87-eventemitter"),require("get-size"),require("fizzy-ui-utils"),require("./item")):t.Outlayer=e(t,t.eventie,t.EventEmitter,t.getSize,t.fizzyUIUtils,t.Outlayer.Item)}(window,function(t,e,i,o,n,r){function s(t,e){var i=n.getQueryElement(t);if(!i)return a&&a.error("Bad element for "+this.constructor.namespace+": "+(i||t)),void 0;this.element=i,u&&(this.$element=u(this.element)),this.options=n.extend({},this.constructor.defaults),this.option(e);var o=++h;this.element.outlayerGUID=o,f[o]=this,this._create(),this.options.isInitLayout&&this.layout()}var a=t.console,u=t.jQuery,p=function(){},h=0,f={};return s.namespace="outlayer",s.Item=r,s.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)"}},n.extend(s.prototype,i.prototype),s.prototype.option=function(t){n.extend(this.options,t)},s.prototype._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),n.extend(this.element.style,this.options.containerStyle),this.options.isResizeBound&&this.bindResize()},s.prototype.reloadItems=function(){this.items=this._itemize(this.element.children)},s.prototype._itemize=function(t){for(var e=this._filterFindItemElements(t),i=this.constructor.Item,o=[],n=0,r=e.length;r>n;n++){var s=e[n],a=new i(s,this);o.push(a)}return o},s.prototype._filterFindItemElements=function(t){return n.filterFindElements(t,this.options.itemSelector)},s.prototype.getItemElements=function(){for(var t=[],e=0,i=this.items.length;i>e;e++)t.push(this.items[e].element);return t},s.prototype.layout=function(){this._resetLayout(),this._manageStamps();var t=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;this.layoutItems(this.items,t),this._isLayoutInited=!0},s.prototype._init=s.prototype.layout,s.prototype._resetLayout=function(){this.getSize()},s.prototype.getSize=function(){this.size=o(this.element)},s.prototype._getMeasurement=function(t,e){var i,r=this.options[t];r?("string"==typeof r?i=this.element.querySelector(r):n.isElement(r)&&(i=r),this[t]=i?o(i)[e]:r):this[t]=0},s.prototype.layoutItems=function(t,e){t=this._getItemsForLayout(t),this._layoutItems(t,e),this._postLayout()},s.prototype._getItemsForLayout=function(t){for(var e=[],i=0,o=t.length;o>i;i++){var n=t[i];n.isIgnored||e.push(n)}return e},s.prototype._layoutItems=function(t,e){if(this._emitCompleteOnItems("layout",t),t&&t.length){for(var i=[],o=0,n=t.length;n>o;o++){var r=t[o],s=this._getItemLayoutPosition(r);s.item=r,s.isInstant=e||r.isLayoutInstant,i.push(s)}this._processLayoutQueue(i)}},s.prototype._getItemLayoutPosition=function(){return{x:0,y:0}},s.prototype._processLayoutQueue=function(t){for(var e=0,i=t.length;i>e;e++){var o=t[e];this._positionItem(o.item,o.x,o.y,o.isInstant)}},s.prototype._positionItem=function(t,e,i,o){o?t.goTo(e,i):t.moveTo(e,i)},s.prototype._postLayout=function(){this.resizeContainer()},s.prototype.resizeContainer=function(){if(this.options.isResizingContainer){var t=this._getContainerSize();t&&(this._setContainerMeasure(t.width,!0),this._setContainerMeasure(t.height,!1))}},s.prototype._getContainerSize=p,s.prototype._setContainerMeasure=function(t,e){if(void 0!==t){var i=this.size;i.isBorderBox&&(t+=e?i.paddingLeft+i.paddingRight+i.borderLeftWidth+i.borderRightWidth:i.paddingBottom+i.paddingTop+i.borderTopWidth+i.borderBottomWidth),t=Math.max(t,0),this.element.style[e?"width":"height"]=t+"px"}},s.prototype._emitCompleteOnItems=function(t,e){function i(){n.emitEvent(t+"Complete",[e])}function o(){s++,s===r&&i()}var n=this,r=e.length;if(!e||!r)return i(),void 0;for(var s=0,a=0,u=e.length;u>a;a++){var p=e[a];p.once(t,o)}},s.prototype.ignore=function(t){var e=this.getItem(t);e&&(e.isIgnored=!0)},s.prototype.unignore=function(t){var e=this.getItem(t);e&&delete e.isIgnored},s.prototype.stamp=function(t){if(t=this._find(t)){this.stamps=this.stamps.concat(t);for(var e=0,i=t.length;i>e;e++){var o=t[e];this.ignore(o)}}},s.prototype.unstamp=function(t){if(t=this._find(t))for(var e=0,i=t.length;i>e;e++){var o=t[e];n.removeFrom(this.stamps,o),this.unignore(o)}},s.prototype._find=function(t){return t?("string"==typeof t&&(t=this.element.querySelectorAll(t)),t=n.makeArray(t)):void 0},s.prototype._manageStamps=function(){if(this.stamps&&this.stamps.length){this._getBoundingRect();for(var t=0,e=this.stamps.length;e>t;t++){var i=this.stamps[t];this._manageStamp(i)}}},s.prototype._getBoundingRect=function(){var t=this.element.getBoundingClientRect(),e=this.size;this._boundingRect={left:t.left+e.paddingLeft+e.borderLeftWidth,top:t.top+e.paddingTop+e.borderTopWidth,right:t.right-(e.paddingRight+e.borderRightWidth),bottom:t.bottom-(e.paddingBottom+e.borderBottomWidth)}},s.prototype._manageStamp=p,s.prototype._getElementOffset=function(t){var e=t.getBoundingClientRect(),i=this._boundingRect,n=o(t),r={left:e.left-i.left-n.marginLeft,top:e.top-i.top-n.marginTop,right:i.right-e.right-n.marginRight,bottom:i.bottom-e.bottom-n.marginBottom};return r},s.prototype.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},s.prototype.bindResize=function(){this.isResizeBound||(e.bind(t,"resize",this),this.isResizeBound=!0)},s.prototype.unbindResize=function(){this.isResizeBound&&e.unbind(t,"resize",this),this.isResizeBound=!1},s.prototype.onresize=function(){function t(){e.resize(),delete e.resizeTimeout}this.resizeTimeout&&clearTimeout(this.resizeTimeout);var e=this;this.resizeTimeout=setTimeout(t,100)},s.prototype.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},s.prototype.needsResizeLayout=function(){var t=o(this.element),e=this.size&&t;return e&&t.innerWidth!==this.size.innerWidth},s.prototype.addItems=function(t){var e=this._itemize(t);return e.length&&(this.items=this.items.concat(e)),e},s.prototype.appended=function(t){var e=this.addItems(t);e.length&&(this.layoutItems(e,!0),this.reveal(e))},s.prototype.prepended=function(t){var e=this._itemize(t);if(e.length){var i=this.items.slice(0);this.items=e.concat(i),this._resetLayout(),this._manageStamps(),this.layoutItems(e,!0),this.reveal(e),this.layoutItems(i)}},s.prototype.reveal=function(t){this._emitCompleteOnItems("reveal",t);for(var e=t&&t.length,i=0;e&&e>i;i++){var o=t[i];o.reveal()}},s.prototype.hide=function(t){this._emitCompleteOnItems("hide",t);for(var e=t&&t.length,i=0;e&&e>i;i++){var o=t[i];o.hide()}},s.prototype.revealItemElements=function(t){var e=this.getItems(t);this.reveal(e)},s.prototype.hideItemElements=function(t){var e=this.getItems(t);this.hide(e)},s.prototype.getItem=function(t){for(var e=0,i=this.items.length;i>e;e++){var o=this.items[e];if(o.element===t)return o}},s.prototype.getItems=function(t){t=n.makeArray(t);for(var e=[],i=0,o=t.length;o>i;i++){var r=t[i],s=this.getItem(r);s&&e.push(s)}return e},s.prototype.remove=function(t){var e=this.getItems(t);if(this._emitCompleteOnItems("remove",e),e&&e.length)for(var i=0,o=e.length;o>i;i++){var r=e[i];r.remove(),n.removeFrom(this.items,r)}},s.prototype.destroy=function(){var t=this.element.style;t.height="",t.position="",t.width="";for(var e=0,i=this.items.length;i>e;e++){var o=this.items[e];o.destroy()}this.unbindResize();var n=this.element.outlayerGUID;delete f[n],delete this.element.outlayerGUID,u&&u.removeData(this.element,this.constructor.namespace)},s.data=function(t){t=n.getQueryElement(t);var e=t&&t.outlayerGUID;return e&&f[e]},s.create=function(t,e){function i(){s.apply(this,arguments)}return Object.create?i.prototype=Object.create(s.prototype):n.extend(i.prototype,s.prototype),i.prototype.constructor=i,i.defaults=n.extend({},s.defaults),n.extend(i.defaults,e),i.prototype.settings={},i.namespace=t,i.data=s.data,i.Item=function(){r.apply(this,arguments)},i.Item.prototype=new r,n.htmlInit(i,t),u&&u.bridget&&u.bridget(t,i),i},s.Item=r,s}),function(t,e){"function"==typeof define&&define.amd?define("isotope/js/item",["outlayer/outlayer"],e):"object"==typeof exports?module.exports=e(require("outlayer")):(t.Isotope=t.Isotope||{},t.Isotope.Item=e(t.Outlayer))}(window,function(t){function e(){t.Item.apply(this,arguments)}e.prototype=new t.Item,e.prototype._create=function(){this.id=this.layout.itemGUID++,t.Item.prototype._create.call(this),this.sortData={}},e.prototype.updateSortData=function(){if(!this.isIgnored){this.sortData.id=this.id,this.sortData["original-order"]=this.id,this.sortData.random=Math.random();var t=this.layout.options.getSortData,e=this.layout._sorters;for(var i in t){var o=e[i];this.sortData[i]=o(this.element,this)}}};var i=e.prototype.destroy;return e.prototype.destroy=function(){i.apply(this,arguments),this.css({display:""})},e}),function(t,e){"function"==typeof define&&define.amd?define("isotope/js/layout-mode",["get-size/get-size","outlayer/outlayer"],e):"object"==typeof exports?module.exports=e(require("get-size"),require("outlayer")):(t.Isotope=t.Isotope||{},t.Isotope.LayoutMode=e(t.getSize,t.Outlayer))}(window,function(t,e){function i(t){this.isotope=t,t&&(this.options=t.options[this.namespace],this.element=t.element,this.items=t.filteredItems,this.size=t.size)}return function(){function t(t){return function(){return e.prototype[t].apply(this.isotope,arguments)}}for(var o=["_resetLayout","_getItemLayoutPosition","_manageStamp","_getContainerSize","_getElementOffset","needsResizeLayout"],n=0,r=o.length;r>n;n++){var s=o[n];i.prototype[s]=t(s)}}(),i.prototype.needsVerticalResizeLayout=function(){var e=t(this.isotope.element),i=this.isotope.size&&e;return i&&e.innerHeight!=this.isotope.size.innerHeight},i.prototype._getMeasurement=function(){this.isotope._getMeasurement.apply(this,arguments)},i.prototype.getColumnWidth=function(){this.getSegmentSize("column","Width")},i.prototype.getRowHeight=function(){this.getSegmentSize("row","Height")},i.prototype.getSegmentSize=function(t,e){var i=t+e,o="outer"+e;if(this._getMeasurement(i,o),!this[i]){var n=this.getFirstItemSize();this[i]=n&&n[o]||this.isotope.size["inner"+e]}},i.prototype.getFirstItemSize=function(){var e=this.isotope.filteredItems[0];return e&&e.element&&t(e.element)},i.prototype.layout=function(){this.isotope.layout.apply(this.isotope,arguments)},i.prototype.getSize=function(){this.isotope.getSize(),this.size=this.isotope.size},i.modes={},i.create=function(t,e){function o(){i.apply(this,arguments)}return o.prototype=new i,e&&(o.options=e),o.prototype.namespace=t,i.modes[t]=o,o},i}),function(t,e){"function"==typeof define&&define.amd?define("masonry/masonry",["outlayer/outlayer","get-size/get-size","fizzy-ui-utils/utils"],e):"object"==typeof exports?module.exports=e(require("outlayer"),require("get-size"),require("fizzy-ui-utils")):t.Masonry=e(t.Outlayer,t.getSize,t.fizzyUIUtils)}(window,function(t,e,i){var o=t.create("masonry");return o.prototype._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns();var t=this.cols;for(this.colYs=[];t--;)this.colYs.push(0);this.maxY=0},o.prototype.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var t=this.items[0],i=t&&t.element;this.columnWidth=i&&e(i).outerWidth||this.containerWidth}var o=this.columnWidth+=this.gutter,n=this.containerWidth+this.gutter,r=n/o,s=o-n%o,a=s&&1>s?"round":"floor";r=Math[a](r),this.cols=Math.max(r,1)},o.prototype.getContainerWidth=function(){var t=this.options.isFitWidth?this.element.parentNode:this.element,i=e(t);this.containerWidth=i&&i.innerWidth},o.prototype._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth%this.columnWidth,o=e&&1>e?"round":"ceil",n=Math[o](t.size.outerWidth/this.columnWidth);n=Math.min(n,this.cols);for(var r=this._getColGroup(n),s=Math.min.apply(Math,r),a=i.indexOf(r,s),u={x:this.columnWidth*a,y:s},p=s+t.size.outerHeight,h=this.cols+1-r.length,f=0;h>f;f++)this.colYs[a+f]=p;return u},o.prototype._getColGroup=function(t){if(2>t)return this.colYs;for(var e=[],i=this.cols+1-t,o=0;i>o;o++){var n=this.colYs.slice(o,o+t);e[o]=Math.max.apply(Math,n)}return e},o.prototype._manageStamp=function(t){var i=e(t),o=this._getElementOffset(t),n=this.options.isOriginLeft?o.left:o.right,r=n+i.outerWidth,s=Math.floor(n/this.columnWidth);s=Math.max(0,s);var a=Math.floor(r/this.columnWidth);a-=r%this.columnWidth?0:1,a=Math.min(this.cols-1,a);for(var u=(this.options.isOriginTop?o.top:o.bottom)+i.outerHeight,p=s;a>=p;p++)this.colYs[p]=Math.max(u,this.colYs[p])},o.prototype._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var t={height:this.maxY};return this.options.isFitWidth&&(t.width=this._getContainerFitWidth()),t},o.prototype._getContainerFitWidth=function(){for(var t=0,e=this.cols;--e&&0===this.colYs[e];)t++;return(this.cols-t)*this.columnWidth-this.gutter},o.prototype.needsResizeLayout=function(){var t=this.containerWidth;return this.getContainerWidth(),t!==this.containerWidth},o}),function(t,e){"function"==typeof define&&define.amd?define("isotope/js/layout-modes/masonry",["../layout-mode","masonry/masonry"],e):"object"==typeof exports?module.exports=e(require("../layout-mode"),require("masonry-layout")):e(t.Isotope.LayoutMode,t.Masonry)}(window,function(t,e){function i(t,e){for(var i in e)t[i]=e[i];return t}var o=t.create("masonry"),n=o.prototype._getElementOffset,r=o.prototype.layout,s=o.prototype._getMeasurement;i(o.prototype,e.prototype),o.prototype._getElementOffset=n,o.prototype.layout=r,o.prototype._getMeasurement=s;var a=o.prototype.measureColumns;o.prototype.measureColumns=function(){this.items=this.isotope.filteredItems,a.call(this)};var u=o.prototype._manageStamp;return o.prototype._manageStamp=function(){this.options.isOriginLeft=this.isotope.options.isOriginLeft,this.options.isOriginTop=this.isotope.options.isOriginTop,u.apply(this,arguments)},o}),function(t,e){"function"==typeof define&&define.amd?define("isotope/js/layout-modes/fit-rows",["../layout-mode"],e):"object"==typeof exports?module.exports=e(require("../layout-mode")):e(t.Isotope.LayoutMode)}(window,function(t){var e=t.create("fitRows");return e.prototype._resetLayout=function(){this.x=0,this.y=0,this.maxY=0,this._getMeasurement("gutter","outerWidth") -},e.prototype._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth+this.gutter,i=this.isotope.size.innerWidth+this.gutter;0!==this.x&&e+this.x>i&&(this.x=0,this.y=this.maxY);var o={x:this.x,y:this.y};return this.maxY=Math.max(this.maxY,this.y+t.size.outerHeight),this.x+=e,o},e.prototype._getContainerSize=function(){return{height:this.maxY}},e}),function(t,e){"function"==typeof define&&define.amd?define("isotope/js/layout-modes/vertical",["../layout-mode"],e):"object"==typeof exports?module.exports=e(require("../layout-mode")):e(t.Isotope.LayoutMode)}(window,function(t){var e=t.create("vertical",{horizontalAlignment:0});return e.prototype._resetLayout=function(){this.y=0},e.prototype._getItemLayoutPosition=function(t){t.getSize();var e=(this.isotope.size.innerWidth-t.size.outerWidth)*this.options.horizontalAlignment,i=this.y;return this.y+=t.size.outerHeight,{x:e,y:i}},e.prototype._getContainerSize=function(){return{height:this.y}},e}),function(t,e){"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size","matches-selector/matches-selector","fizzy-ui-utils/utils","isotope/js/item","isotope/js/layout-mode","isotope/js/layout-modes/masonry","isotope/js/layout-modes/fit-rows","isotope/js/layout-modes/vertical"],function(i,o,n,r,s,a){return e(t,i,o,n,r,s,a)}):"object"==typeof exports?module.exports=e(t,require("outlayer"),require("get-size"),require("desandro-matches-selector"),require("fizzy-ui-utils"),require("./item"),require("./layout-mode"),require("./layout-modes/masonry"),require("./layout-modes/fit-rows"),require("./layout-modes/vertical")):t.Isotope=e(t,t.Outlayer,t.getSize,t.matchesSelector,t.fizzyUIUtils,t.Isotope.Item,t.Isotope.LayoutMode)}(window,function(t,e,i,o,n,r,s){function a(t,e){return function(i,o){for(var n=0,r=t.length;r>n;n++){var s=t[n],a=i.sortData[s],u=o.sortData[s];if(a>u||u>a){var p=void 0!==e[s]?e[s]:e,h=p?1:-1;return(a>u?1:-1)*h}}return 0}}var u=t.jQuery,p=String.prototype.trim?function(t){return t.trim()}:function(t){return t.replace(/^\s+|\s+$/g,"")},h=document.documentElement,f=h.textContent?function(t){return t.textContent}:function(t){return t.innerText},d=e.create("isotope",{layoutMode:"masonry",isJQueryFiltering:!0,sortAscending:!0});d.Item=r,d.LayoutMode=s,d.prototype._create=function(){this.itemGUID=0,this._sorters={},this._getSorters(),e.prototype._create.call(this),this.modes={},this.filteredItems=this.items,this.sortHistory=["original-order"];for(var t in s.modes)this._initLayoutMode(t)},d.prototype.reloadItems=function(){this.itemGUID=0,e.prototype.reloadItems.call(this)},d.prototype._itemize=function(){for(var t=e.prototype._itemize.apply(this,arguments),i=0,o=t.length;o>i;i++){var n=t[i];n.id=this.itemGUID++}return this._updateItemsSortData(t),t},d.prototype._initLayoutMode=function(t){var e=s.modes[t],i=this.options[t]||{};this.options[t]=e.options?n.extend(e.options,i):i,this.modes[t]=new e(this)},d.prototype.layout=function(){return!this._isLayoutInited&&this.options.isInitLayout?(this.arrange(),void 0):(this._layout(),void 0)},d.prototype._layout=function(){var t=this._getIsInstant();this._resetLayout(),this._manageStamps(),this.layoutItems(this.filteredItems,t),this._isLayoutInited=!0},d.prototype.arrange=function(t){function e(){o.reveal(i.needReveal),o.hide(i.needHide)}this.option(t),this._getIsInstant();var i=this._filter(this.items);this.filteredItems=i.matches;var o=this;this._bindArrangeComplete(),this._isInstant?this._noTransition(e):e(),this._sort(),this._layout()},d.prototype._init=d.prototype.arrange,d.prototype._getIsInstant=function(){var t=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;return this._isInstant=t,t},d.prototype._bindArrangeComplete=function(){function t(){e&&i&&o&&n.emitEvent("arrangeComplete",[n.filteredItems])}var e,i,o,n=this;this.once("layoutComplete",function(){e=!0,t()}),this.once("hideComplete",function(){i=!0,t()}),this.once("revealComplete",function(){o=!0,t()})},d.prototype._filter=function(t){var e=this.options.filter;e=e||"*";for(var i=[],o=[],n=[],r=this._getFilterTest(e),s=0,a=t.length;a>s;s++){var u=t[s];if(!u.isIgnored){var p=r(u);p&&i.push(u),p&&u.isHidden?o.push(u):p||u.isHidden||n.push(u)}}return{matches:i,needReveal:o,needHide:n}},d.prototype._getFilterTest=function(t){return u&&this.options.isJQueryFiltering?function(e){return u(e.element).is(t)}:"function"==typeof t?function(e){return t(e.element)}:function(e){return o(e.element,t)}},d.prototype.updateSortData=function(t){var e;t?(t=n.makeArray(t),e=this.getItems(t)):e=this.items,this._getSorters(),this._updateItemsSortData(e)},d.prototype._getSorters=function(){var t=this.options.getSortData;for(var e in t){var i=t[e];this._sorters[e]=l(i)}},d.prototype._updateItemsSortData=function(t){for(var e=t&&t.length,i=0;e&&e>i;i++){var o=t[i];o.updateSortData()}};var l=function(){function t(t){if("string"!=typeof t)return t;var i=p(t).split(" "),o=i[0],n=o.match(/^\[(.+)\]$/),r=n&&n[1],s=e(r,o),a=d.sortDataParsers[i[1]];return t=a?function(t){return t&&a(s(t))}:function(t){return t&&s(t)}}function e(t,e){var i;return i=t?function(e){return e.getAttribute(t)}:function(t){var i=t.querySelector(e);return i&&f(i)}}return t}();d.sortDataParsers={parseInt:function(t){return parseInt(t,10)},parseFloat:function(t){return parseFloat(t)}},d.prototype._sort=function(){var t=this.options.sortBy;if(t){var e=[].concat.apply(t,this.sortHistory),i=a(e,this.options.sortAscending);this.filteredItems.sort(i),t!=this.sortHistory[0]&&this.sortHistory.unshift(t)}},d.prototype._mode=function(){var t=this.options.layoutMode,e=this.modes[t];if(!e)throw Error("No layout mode: "+t);return e.options=this.options[t],e},d.prototype._resetLayout=function(){e.prototype._resetLayout.call(this),this._mode()._resetLayout()},d.prototype._getItemLayoutPosition=function(t){return this._mode()._getItemLayoutPosition(t)},d.prototype._manageStamp=function(t){this._mode()._manageStamp(t)},d.prototype._getContainerSize=function(){return this._mode()._getContainerSize()},d.prototype.needsResizeLayout=function(){return this._mode().needsResizeLayout()},d.prototype.appended=function(t){var e=this.addItems(t);if(e.length){var i=this._filterRevealAdded(e);this.filteredItems=this.filteredItems.concat(i)}},d.prototype.prepended=function(t){var e=this._itemize(t);if(e.length){this._resetLayout(),this._manageStamps();var i=this._filterRevealAdded(e);this.layoutItems(this.filteredItems),this.filteredItems=i.concat(this.filteredItems),this.items=e.concat(this.items)}},d.prototype._filterRevealAdded=function(t){var e=this._filter(t);return this.hide(e.needHide),this.reveal(e.matches),this.layoutItems(e.matches,!0),e.matches},d.prototype.insert=function(t){var e=this.addItems(t);if(e.length){var i,o,n=e.length;for(i=0;n>i;i++)o=e[i],this.element.appendChild(o.element);var r=this._filter(e).matches;for(i=0;n>i;i++)e[i].isLayoutInstant=!0;for(this.arrange(),i=0;n>i;i++)delete e[i].isLayoutInstant;this.reveal(r)}};var c=d.prototype.remove;return d.prototype.remove=function(t){t=n.makeArray(t);var e=this.getItems(t);c.call(this,t);var i=e&&e.length;if(i)for(var o=0;i>o;o++){var r=e[o];n.removeFrom(this.filteredItems,r)}},d.prototype.shuffle=function(){for(var t=0,e=this.items.length;e>t;t++){var i=this.items[t];i.sortData.random=Math.random()}this.options.sortBy="random",this._sort(),this._layout()},d.prototype._noTransition=function(t){var e=this.options.transitionDuration;this.options.transitionDuration=0;var i=t.call(this);return this.options.transitionDuration=e,i},d.prototype.getFilteredItemElements=function(){for(var t=[],e=0,i=this.filteredItems.length;i>e;e++)t.push(this.filteredItems[e].element);return t},d}); \ No newline at end of file diff --git a/profiles/wcm_base/libraries/jquery.isotope/js/isotope.js b/profiles/wcm_base/libraries/jquery.isotope/js/isotope.js deleted file mode 100644 index 866787f40249e085494f60290f330361c821572d..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/libraries/jquery.isotope/js/isotope.js +++ /dev/null @@ -1,628 +0,0 @@ -/*! - * Isotope v2.2.0 - * - * Licensed GPLv3 for open source use - * or Isotope Commercial License for commercial use - * - * http://isotope.metafizzy.co - * Copyright 2015 Metafizzy - */ - -( function( window, factory ) { - 'use strict'; - // universal module definition - - if ( typeof define == 'function' && define.amd ) { - // AMD - define( [ - 'outlayer/outlayer', - 'get-size/get-size', - 'matches-selector/matches-selector', - 'fizzy-ui-utils/utils', - './item', - './layout-mode', - // include default layout modes - './layout-modes/masonry', - './layout-modes/fit-rows', - './layout-modes/vertical' - ], - function( Outlayer, getSize, matchesSelector, utils, Item, LayoutMode ) { - return factory( window, Outlayer, getSize, matchesSelector, utils, Item, LayoutMode ); - }); - } else if ( typeof exports == 'object' ) { - // CommonJS - module.exports = factory( - window, - require('outlayer'), - require('get-size'), - require('desandro-matches-selector'), - require('fizzy-ui-utils'), - require('./item'), - require('./layout-mode'), - // include default layout modes - require('./layout-modes/masonry'), - require('./layout-modes/fit-rows'), - require('./layout-modes/vertical') - ); - } else { - // browser global - window.Isotope = factory( - window, - window.Outlayer, - window.getSize, - window.matchesSelector, - window.fizzyUIUtils, - window.Isotope.Item, - window.Isotope.LayoutMode - ); - } - -}( window, function factory( window, Outlayer, getSize, matchesSelector, utils, - Item, LayoutMode ) { - -'use strict'; - -// -------------------------- vars -------------------------- // - -var jQuery = window.jQuery; - -// -------------------------- helpers -------------------------- // - -var trim = String.prototype.trim ? - function( str ) { - return str.trim(); - } : - function( str ) { - return str.replace( /^\s+|\s+$/g, '' ); - }; - -var docElem = document.documentElement; - -var getText = docElem.textContent ? - function( elem ) { - return elem.textContent; - } : - function( elem ) { - return elem.innerText; - }; - -// -------------------------- isotopeDefinition -------------------------- // - - // create an Outlayer layout class - var Isotope = Outlayer.create( 'isotope', { - layoutMode: "masonry", - isJQueryFiltering: true, - sortAscending: true - }); - - Isotope.Item = Item; - Isotope.LayoutMode = LayoutMode; - - Isotope.prototype._create = function() { - this.itemGUID = 0; - // functions that sort items - this._sorters = {}; - this._getSorters(); - // call super - Outlayer.prototype._create.call( this ); - - // create layout modes - this.modes = {}; - // start filteredItems with all items - this.filteredItems = this.items; - // keep of track of sortBys - this.sortHistory = [ 'original-order' ]; - // create from registered layout modes - for ( var name in LayoutMode.modes ) { - this._initLayoutMode( name ); - } - }; - - Isotope.prototype.reloadItems = function() { - // reset item ID counter - this.itemGUID = 0; - // call super - Outlayer.prototype.reloadItems.call( this ); - }; - - Isotope.prototype._itemize = function() { - var items = Outlayer.prototype._itemize.apply( this, arguments ); - // assign ID for original-order - for ( var i=0, len = items.length; i < len; i++ ) { - var item = items[i]; - item.id = this.itemGUID++; - } - this._updateItemsSortData( items ); - return items; - }; - - - // -------------------------- layout -------------------------- // - - Isotope.prototype._initLayoutMode = function( name ) { - var Mode = LayoutMode.modes[ name ]; - // set mode options - // HACK extend initial options, back-fill in default options - var initialOpts = this.options[ name ] || {}; - this.options[ name ] = Mode.options ? - utils.extend( Mode.options, initialOpts ) : initialOpts; - // init layout mode instance - this.modes[ name ] = new Mode( this ); - }; - - - Isotope.prototype.layout = function() { - // if first time doing layout, do all magic - if ( !this._isLayoutInited && this.options.isInitLayout ) { - this.arrange(); - return; - } - this._layout(); - }; - - // private method to be used in layout() & magic() - Isotope.prototype._layout = function() { - // don't animate first layout - var isInstant = this._getIsInstant(); - // layout flow - this._resetLayout(); - this._manageStamps(); - this.layoutItems( this.filteredItems, isInstant ); - - // flag for initalized - this._isLayoutInited = true; - }; - - // filter + sort + layout - Isotope.prototype.arrange = function( opts ) { - // set any options pass - this.option( opts ); - this._getIsInstant(); - // filter, sort, and layout - - // filter - var filtered = this._filter( this.items ); - this.filteredItems = filtered.matches; - - var _this = this; - function hideReveal() { - _this.reveal( filtered.needReveal ); - _this.hide( filtered.needHide ); - } - - this._bindArrangeComplete(); - - if ( this._isInstant ) { - this._noTransition( hideReveal ); - } else { - hideReveal(); - } - - this._sort(); - this._layout(); - }; - // alias to _init for main plugin method - Isotope.prototype._init = Isotope.prototype.arrange; - - // HACK - // Don't animate/transition first layout - // Or don't animate/transition other layouts - Isotope.prototype._getIsInstant = function() { - var isInstant = this.options.isLayoutInstant !== undefined ? - this.options.isLayoutInstant : !this._isLayoutInited; - this._isInstant = isInstant; - return isInstant; - }; - - // listen for layoutComplete, hideComplete and revealComplete - // to trigger arrangeComplete - Isotope.prototype._bindArrangeComplete = function() { - // listen for 3 events to trigger arrangeComplete - var isLayoutComplete, isHideComplete, isRevealComplete; - var _this = this; - function arrangeParallelCallback() { - if ( isLayoutComplete && isHideComplete && isRevealComplete ) { - _this.emitEvent( 'arrangeComplete', [ _this.filteredItems ] ); - } - } - this.once( 'layoutComplete', function() { - isLayoutComplete = true; - arrangeParallelCallback(); - }); - this.once( 'hideComplete', function() { - isHideComplete = true; - arrangeParallelCallback(); - }); - this.once( 'revealComplete', function() { - isRevealComplete = true; - arrangeParallelCallback(); - }); - }; - - // -------------------------- filter -------------------------- // - - Isotope.prototype._filter = function( items ) { - var filter = this.options.filter; - filter = filter || '*'; - var matches = []; - var hiddenMatched = []; - var visibleUnmatched = []; - - var test = this._getFilterTest( filter ); - - // test each item - for ( var i=0, len = items.length; i < len; i++ ) { - var item = items[i]; - if ( item.isIgnored ) { - continue; - } - // add item to either matched or unmatched group - var isMatched = test( item ); - // item.isFilterMatched = isMatched; - // add to matches if its a match - if ( isMatched ) { - matches.push( item ); - } - // add to additional group if item needs to be hidden or revealed - if ( isMatched && item.isHidden ) { - hiddenMatched.push( item ); - } else if ( !isMatched && !item.isHidden ) { - visibleUnmatched.push( item ); - } - } - - // return collections of items to be manipulated - return { - matches: matches, - needReveal: hiddenMatched, - needHide: visibleUnmatched - }; - }; - - // get a jQuery, function, or a matchesSelector test given the filter - Isotope.prototype._getFilterTest = function( filter ) { - if ( jQuery && this.options.isJQueryFiltering ) { - // use jQuery - return function( item ) { - return jQuery( item.element ).is( filter ); - }; - } - if ( typeof filter == 'function' ) { - // use filter as function - return function( item ) { - return filter( item.element ); - }; - } - // default, use filter as selector string - return function( item ) { - return matchesSelector( item.element, filter ); - }; - }; - - // -------------------------- sorting -------------------------- // - - /** - * @params {Array} elems - * @public - */ - Isotope.prototype.updateSortData = function( elems ) { - // get items - var items; - if ( elems ) { - elems = utils.makeArray( elems ); - items = this.getItems( elems ); - } else { - // update all items if no elems provided - items = this.items; - } - - this._getSorters(); - this._updateItemsSortData( items ); - }; - - Isotope.prototype._getSorters = function() { - var getSortData = this.options.getSortData; - for ( var key in getSortData ) { - var sorter = getSortData[ key ]; - this._sorters[ key ] = mungeSorter( sorter ); - } - }; - - /** - * @params {Array} items - of Isotope.Items - * @private - */ - Isotope.prototype._updateItemsSortData = function( items ) { - // do not update if no items - var len = items && items.length; - - for ( var i=0; len && i < len; i++ ) { - var item = items[i]; - item.updateSortData(); - } - }; - - // ----- munge sorter ----- // - - // encapsulate this, as we just need mungeSorter - // other functions in here are just for munging - var mungeSorter = ( function() { - // add a magic layer to sorters for convienent shorthands - // `.foo-bar` will use the text of .foo-bar querySelector - // `[foo-bar]` will use attribute - // you can also add parser - // `.foo-bar parseInt` will parse that as a number - function mungeSorter( sorter ) { - // if not a string, return function or whatever it is - if ( typeof sorter != 'string' ) { - return sorter; - } - // parse the sorter string - var args = trim( sorter ).split(' '); - var query = args[0]; - // check if query looks like [an-attribute] - var attrMatch = query.match( /^\[(.+)\]$/ ); - var attr = attrMatch && attrMatch[1]; - var getValue = getValueGetter( attr, query ); - // use second argument as a parser - var parser = Isotope.sortDataParsers[ args[1] ]; - // parse the value, if there was a parser - sorter = parser ? function( elem ) { - return elem && parser( getValue( elem ) ); - } : - // otherwise just return value - function( elem ) { - return elem && getValue( elem ); - }; - - return sorter; - } - - // get an attribute getter, or get text of the querySelector - function getValueGetter( attr, query ) { - var getValue; - // if query looks like [foo-bar], get attribute - if ( attr ) { - getValue = function( elem ) { - return elem.getAttribute( attr ); - }; - } else { - // otherwise, assume its a querySelector, and get its text - getValue = function( elem ) { - var child = elem.querySelector( query ); - return child && getText( child ); - }; - } - return getValue; - } - - return mungeSorter; - })(); - - // parsers used in getSortData shortcut strings - Isotope.sortDataParsers = { - 'parseInt': function( val ) { - return parseInt( val, 10 ); - }, - 'parseFloat': function( val ) { - return parseFloat( val ); - } - }; - - // ----- sort method ----- // - - // sort filteredItem order - Isotope.prototype._sort = function() { - var sortByOpt = this.options.sortBy; - if ( !sortByOpt ) { - return; - } - // concat all sortBy and sortHistory - var sortBys = [].concat.apply( sortByOpt, this.sortHistory ); - // sort magic - var itemSorter = getItemSorter( sortBys, this.options.sortAscending ); - this.filteredItems.sort( itemSorter ); - // keep track of sortBy History - if ( sortByOpt != this.sortHistory[0] ) { - // add to front, oldest goes in last - this.sortHistory.unshift( sortByOpt ); - } - }; - - // returns a function used for sorting - function getItemSorter( sortBys, sortAsc ) { - return function sorter( itemA, itemB ) { - // cycle through all sortKeys - for ( var i = 0, len = sortBys.length; i < len; i++ ) { - var sortBy = sortBys[i]; - var a = itemA.sortData[ sortBy ]; - var b = itemB.sortData[ sortBy ]; - if ( a > b || a < b ) { - // if sortAsc is an object, use the value given the sortBy key - var isAscending = sortAsc[ sortBy ] !== undefined ? sortAsc[ sortBy ] : sortAsc; - var direction = isAscending ? 1 : -1; - return ( a > b ? 1 : -1 ) * direction; - } - } - return 0; - }; - } - - // -------------------------- methods -------------------------- // - - // get layout mode - Isotope.prototype._mode = function() { - var layoutMode = this.options.layoutMode; - var mode = this.modes[ layoutMode ]; - if ( !mode ) { - // TODO console.error - throw new Error( 'No layout mode: ' + layoutMode ); - } - // HACK sync mode's options - // any options set after init for layout mode need to be synced - mode.options = this.options[ layoutMode ]; - return mode; - }; - - Isotope.prototype._resetLayout = function() { - // trigger original reset layout - Outlayer.prototype._resetLayout.call( this ); - this._mode()._resetLayout(); - }; - - Isotope.prototype._getItemLayoutPosition = function( item ) { - return this._mode()._getItemLayoutPosition( item ); - }; - - Isotope.prototype._manageStamp = function( stamp ) { - this._mode()._manageStamp( stamp ); - }; - - Isotope.prototype._getContainerSize = function() { - return this._mode()._getContainerSize(); - }; - - Isotope.prototype.needsResizeLayout = function() { - return this._mode().needsResizeLayout(); - }; - - // -------------------------- adding & removing -------------------------- // - - // HEADS UP overwrites default Outlayer appended - Isotope.prototype.appended = function( elems ) { - var items = this.addItems( elems ); - if ( !items.length ) { - return; - } - // filter, layout, reveal new items - var filteredItems = this._filterRevealAdded( items ); - // add to filteredItems - this.filteredItems = this.filteredItems.concat( filteredItems ); - }; - - // HEADS UP overwrites default Outlayer prepended - Isotope.prototype.prepended = function( elems ) { - var items = this._itemize( elems ); - if ( !items.length ) { - return; - } - // start new layout - this._resetLayout(); - this._manageStamps(); - // filter, layout, reveal new items - var filteredItems = this._filterRevealAdded( items ); - // layout previous items - this.layoutItems( this.filteredItems ); - // add to items and filteredItems - this.filteredItems = filteredItems.concat( this.filteredItems ); - this.items = items.concat( this.items ); - }; - - Isotope.prototype._filterRevealAdded = function( items ) { - var filtered = this._filter( items ); - this.hide( filtered.needHide ); - // reveal all new items - this.reveal( filtered.matches ); - // layout new items, no transition - this.layoutItems( filtered.matches, true ); - return filtered.matches; - }; - - /** - * Filter, sort, and layout newly-appended item elements - * @param {Array or NodeList or Element} elems - */ - Isotope.prototype.insert = function( elems ) { - var items = this.addItems( elems ); - if ( !items.length ) { - return; - } - // append item elements - var i, item; - var len = items.length; - for ( i=0; i < len; i++ ) { - item = items[i]; - this.element.appendChild( item.element ); - } - // filter new stuff - var filteredInsertItems = this._filter( items ).matches; - // set flag - for ( i=0; i < len; i++ ) { - items[i].isLayoutInstant = true; - } - this.arrange(); - // reset flag - for ( i=0; i < len; i++ ) { - delete items[i].isLayoutInstant; - } - this.reveal( filteredInsertItems ); - }; - - var _remove = Isotope.prototype.remove; - Isotope.prototype.remove = function( elems ) { - elems = utils.makeArray( elems ); - var removeItems = this.getItems( elems ); - // do regular thing - _remove.call( this, elems ); - // bail if no items to remove - var len = removeItems && removeItems.length; - if ( !len ) { - return; - } - // remove elems from filteredItems - for ( var i=0; i < len; i++ ) { - var item = removeItems[i]; - // remove item from collection - utils.removeFrom( this.filteredItems, item ); - } - }; - - Isotope.prototype.shuffle = function() { - // update random sortData - for ( var i=0, len = this.items.length; i < len; i++ ) { - var item = this.items[i]; - item.sortData.random = Math.random(); - } - this.options.sortBy = 'random'; - this._sort(); - this._layout(); - }; - - /** - * trigger fn without transition - * kind of hacky to have this in the first place - * @param {Function} fn - * @returns ret - * @private - */ - Isotope.prototype._noTransition = function( fn ) { - // save transitionDuration before disabling - var transitionDuration = this.options.transitionDuration; - // disable transition - this.options.transitionDuration = 0; - // do it - var returnValue = fn.call( this ); - // re-enable transition for reveal - this.options.transitionDuration = transitionDuration; - return returnValue; - }; - - // ----- helper methods ----- // - - /** - * getter method for getting filtered item elements - * @returns {Array} elems - collection of item elements - */ - Isotope.prototype.getFilteredItemElements = function() { - var elems = []; - for ( var i=0, len = this.filteredItems.length; i < len; i++ ) { - elems.push( this.filteredItems[i].element ); - } - return elems; - }; - - // ----- ----- // - - return Isotope; - -})); diff --git a/profiles/wcm_base/libraries/jquery.isotope/js/item.js b/profiles/wcm_base/libraries/jquery.isotope/js/item.js deleted file mode 100644 index 40aa25cc88cd666056ec6768760734ccf9ba9696..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/libraries/jquery.isotope/js/item.js +++ /dev/null @@ -1,76 +0,0 @@ -/** - * Isotope Item -**/ - -( function( window, factory ) { -'use strict'; - // universal module definition - if ( typeof define == 'function' && define.amd ) { - // AMD - define( [ - 'outlayer/outlayer' - ], - factory ); - } else if ( typeof exports == 'object' ) { - // CommonJS - module.exports = factory( - require('outlayer') - ); - } else { - // browser global - window.Isotope = window.Isotope || {}; - window.Isotope.Item = factory( - window.Outlayer - ); - } - -}( window, function factory( Outlayer ) { -'use strict'; - -// -------------------------- Item -------------------------- // - -// sub-class Outlayer Item -function Item() { - Outlayer.Item.apply( this, arguments ); -} - -Item.prototype = new Outlayer.Item(); - -Item.prototype._create = function() { - // assign id, used for original-order sorting - this.id = this.layout.itemGUID++; - Outlayer.Item.prototype._create.call( this ); - this.sortData = {}; -}; - -Item.prototype.updateSortData = function() { - if ( this.isIgnored ) { - return; - } - // default sorters - this.sortData.id = this.id; - // for backward compatibility - this.sortData['original-order'] = this.id; - this.sortData.random = Math.random(); - // go thru getSortData obj and apply the sorters - var getSortData = this.layout.options.getSortData; - var sorters = this.layout._sorters; - for ( var key in getSortData ) { - var sorter = sorters[ key ]; - this.sortData[ key ] = sorter( this.element, this ); - } -}; - -var _destroy = Item.prototype.destroy; -Item.prototype.destroy = function() { - // call super - _destroy.apply( this, arguments ); - // reset display, #741 - this.css({ - display: '' - }); -}; - -return Item; - -})); diff --git a/profiles/wcm_base/libraries/jquery.isotope/js/layout-mode.js b/profiles/wcm_base/libraries/jquery.isotope/js/layout-mode.js deleted file mode 100644 index 012583f3dd41f3350364b4a1e7fb53bc84cb00d3..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/libraries/jquery.isotope/js/layout-mode.js +++ /dev/null @@ -1,161 +0,0 @@ -/** - * Isotope LayoutMode - */ - -( function( window, factory ) { - 'use strict'; - // universal module definition - - if ( typeof define == 'function' && define.amd ) { - // AMD - define( [ - 'get-size/get-size', - 'outlayer/outlayer' - ], - factory ); - } else if ( typeof exports == 'object' ) { - // CommonJS - module.exports = factory( - require('get-size'), - require('outlayer') - ); - } else { - // browser global - window.Isotope = window.Isotope || {}; - window.Isotope.LayoutMode = factory( - window.getSize, - window.Outlayer - ); - } - -}( window, function factory( getSize, Outlayer ) { - 'use strict'; - - // layout mode class - function LayoutMode( isotope ) { - this.isotope = isotope; - // link properties - if ( isotope ) { - this.options = isotope.options[ this.namespace ]; - this.element = isotope.element; - this.items = isotope.filteredItems; - this.size = isotope.size; - } - } - - /** - * some methods should just defer to default Outlayer method - * and reference the Isotope instance as `this` - **/ - ( function() { - var facadeMethods = [ - '_resetLayout', - '_getItemLayoutPosition', - '_manageStamp', - '_getContainerSize', - '_getElementOffset', - 'needsResizeLayout' - ]; - - for ( var i=0, len = facadeMethods.length; i < len; i++ ) { - var methodName = facadeMethods[i]; - LayoutMode.prototype[ methodName ] = getOutlayerMethod( methodName ); - } - - function getOutlayerMethod( methodName ) { - return function() { - return Outlayer.prototype[ methodName ].apply( this.isotope, arguments ); - }; - } - })(); - - // ----- ----- // - - // for horizontal layout modes, check vertical size - LayoutMode.prototype.needsVerticalResizeLayout = function() { - // don't trigger if size did not change - var size = getSize( this.isotope.element ); - // check that this.size and size are there - // IE8 triggers resize on body size change, so they might not be - var hasSizes = this.isotope.size && size; - return hasSizes && size.innerHeight != this.isotope.size.innerHeight; - }; - - // ----- measurements ----- // - - LayoutMode.prototype._getMeasurement = function() { - this.isotope._getMeasurement.apply( this, arguments ); - }; - - LayoutMode.prototype.getColumnWidth = function() { - this.getSegmentSize( 'column', 'Width' ); - }; - - LayoutMode.prototype.getRowHeight = function() { - this.getSegmentSize( 'row', 'Height' ); - }; - - /** - * get columnWidth or rowHeight - * segment: 'column' or 'row' - * size 'Width' or 'Height' - **/ - LayoutMode.prototype.getSegmentSize = function( segment, size ) { - var segmentName = segment + size; - var outerSize = 'outer' + size; - // columnWidth / outerWidth // rowHeight / outerHeight - this._getMeasurement( segmentName, outerSize ); - // got rowHeight or columnWidth, we can chill - if ( this[ segmentName ] ) { - return; - } - // fall back to item of first element - var firstItemSize = this.getFirstItemSize(); - this[ segmentName ] = firstItemSize && firstItemSize[ outerSize ] || - // or size of container - this.isotope.size[ 'inner' + size ]; - }; - - LayoutMode.prototype.getFirstItemSize = function() { - var firstItem = this.isotope.filteredItems[0]; - return firstItem && firstItem.element && getSize( firstItem.element ); - }; - - // ----- methods that should reference isotope ----- // - - LayoutMode.prototype.layout = function() { - this.isotope.layout.apply( this.isotope, arguments ); - }; - - LayoutMode.prototype.getSize = function() { - this.isotope.getSize(); - this.size = this.isotope.size; - }; - - // -------------------------- create -------------------------- // - - LayoutMode.modes = {}; - - LayoutMode.create = function( namespace, options ) { - - function Mode() { - LayoutMode.apply( this, arguments ); - } - - Mode.prototype = new LayoutMode(); - - // default options - if ( options ) { - Mode.options = options; - } - - Mode.prototype.namespace = namespace; - // register in Isotope - LayoutMode.modes[ namespace ] = Mode; - - return Mode; - }; - - return LayoutMode; - -})); diff --git a/profiles/wcm_base/libraries/jquery.isotope/js/layout-modes/fit-rows.js b/profiles/wcm_base/libraries/jquery.isotope/js/layout-modes/fit-rows.js deleted file mode 100644 index 582d2c5d2e57fc78f7a7861b6190f8a88e5508a3..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/libraries/jquery.isotope/js/layout-modes/fit-rows.js +++ /dev/null @@ -1,66 +0,0 @@ -/** - * fitRows layout mode - */ - -( function( window, factory ) { - 'use strict'; - // universal module definition - if ( typeof define == 'function' && define.amd ) { - // AMD - define( [ - '../layout-mode' - ], - factory ); - } else if ( typeof exports == 'object' ) { - // CommonJS - module.exports = factory( - require('../layout-mode') - ); - } else { - // browser global - factory( - window.Isotope.LayoutMode - ); - } - -}( window, function factory( LayoutMode ) { -'use strict'; - -var FitRows = LayoutMode.create('fitRows'); - -FitRows.prototype._resetLayout = function() { - this.x = 0; - this.y = 0; - this.maxY = 0; - this._getMeasurement( 'gutter', 'outerWidth' ); -}; - -FitRows.prototype._getItemLayoutPosition = function( item ) { - item.getSize(); - - var itemWidth = item.size.outerWidth + this.gutter; - // if this element cannot fit in the current row - var containerWidth = this.isotope.size.innerWidth + this.gutter; - if ( this.x !== 0 && itemWidth + this.x > containerWidth ) { - this.x = 0; - this.y = this.maxY; - } - - var position = { - x: this.x, - y: this.y - }; - - this.maxY = Math.max( this.maxY, this.y + item.size.outerHeight ); - this.x += itemWidth; - - return position; -}; - -FitRows.prototype._getContainerSize = function() { - return { height: this.maxY }; -}; - -return FitRows; - -})); diff --git a/profiles/wcm_base/libraries/jquery.isotope/js/layout-modes/masonry.js b/profiles/wcm_base/libraries/jquery.isotope/js/layout-modes/masonry.js deleted file mode 100644 index 5f720570033a126491b4e00857be279b2bcfe7b1..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/libraries/jquery.isotope/js/layout-modes/masonry.js +++ /dev/null @@ -1,79 +0,0 @@ -/*! - * Masonry layout mode - * sub-classes Masonry - * http://masonry.desandro.com - */ - -( function( window, factory ) { - 'use strict'; - // universal module definition - if ( typeof define == 'function' && define.amd ) { - // AMD - define( [ - '../layout-mode', - 'masonry/masonry' - ], - factory ); - } else if ( typeof exports == 'object' ) { - // CommonJS - module.exports = factory( - require('../layout-mode'), - require('masonry-layout') - ); - } else { - // browser global - factory( - window.Isotope.LayoutMode, - window.Masonry - ); - } - -}( window, function factory( LayoutMode, Masonry ) { -'use strict'; - -// -------------------------- helpers -------------------------- // - -// extend objects -function extend( a, b ) { - for ( var prop in b ) { - a[ prop ] = b[ prop ]; - } - return a; -} - -// -------------------------- masonryDefinition -------------------------- // - - // create an Outlayer layout class - var MasonryMode = LayoutMode.create('masonry'); - - // save on to these methods - var _getElementOffset = MasonryMode.prototype._getElementOffset; - var layout = MasonryMode.prototype.layout; - var _getMeasurement = MasonryMode.prototype._getMeasurement; - - // sub-class Masonry - extend( MasonryMode.prototype, Masonry.prototype ); - - // set back, as it was overwritten by Masonry - MasonryMode.prototype._getElementOffset = _getElementOffset; - MasonryMode.prototype.layout = layout; - MasonryMode.prototype._getMeasurement = _getMeasurement; - - var measureColumns = MasonryMode.prototype.measureColumns; - MasonryMode.prototype.measureColumns = function() { - // set items, used if measuring first item - this.items = this.isotope.filteredItems; - measureColumns.call( this ); - }; - - // HACK copy over isOriginLeft/Top options - var _manageStamp = MasonryMode.prototype._manageStamp; - MasonryMode.prototype._manageStamp = function() { - this.options.isOriginLeft = this.isotope.options.isOriginLeft; - this.options.isOriginTop = this.isotope.options.isOriginTop; - _manageStamp.apply( this, arguments ); - }; - - return MasonryMode; - -})); diff --git a/profiles/wcm_base/libraries/jquery.isotope/js/layout-modes/vertical.js b/profiles/wcm_base/libraries/jquery.isotope/js/layout-modes/vertical.js deleted file mode 100644 index 35c425ead345821b0c8f5abed6befc953b15e40e..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/libraries/jquery.isotope/js/layout-modes/vertical.js +++ /dev/null @@ -1,52 +0,0 @@ -/** - * vertical layout mode - */ - -( function( window, factory ) { - 'use strict'; - // universal module definition - if ( typeof define == 'function' && define.amd ) { - // AMD - define( [ - '../layout-mode' - ], - factory ); - } else if ( typeof exports == 'object' ) { - // CommonJS - module.exports = factory( - require('../layout-mode') - ); - } else { - // browser global - factory( - window.Isotope.LayoutMode - ); - } - -}( window, function factory( LayoutMode ) { -'use strict'; - -var Vertical = LayoutMode.create( 'vertical', { - horizontalAlignment: 0 -}); - -Vertical.prototype._resetLayout = function() { - this.y = 0; -}; - -Vertical.prototype._getItemLayoutPosition = function( item ) { - item.getSize(); - var x = ( this.isotope.size.innerWidth - item.size.outerWidth ) * - this.options.horizontalAlignment; - var y = this.y; - this.y += item.size.outerHeight; - return { x: x, y: y }; -}; - -Vertical.prototype._getContainerSize = function() { - return { height: this.y }; -}; - -return Vertical; - -})); diff --git a/profiles/wcm_base/libraries/jquery.isotope/package.json b/profiles/wcm_base/libraries/jquery.isotope/package.json deleted file mode 100644 index e792bd1d71d03ad0052c8a03e86834bd81dc87f9..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/libraries/jquery.isotope/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "isotope-layout", - "version": "2.2.0", - "description": "Filter and sort magical layouts", - "main": "js/isotope.js", - "dependencies": { - "get-size": "~1.2.2", - "desandro-matches-selector": ">=1 <2", - "outlayer": "~1.4.0", - "masonry-layout": "~3.3.0", - "fizzy-ui-utils": "~1.0.1" - }, - "devDependencies": { - "desandro-matches-selector": "^1.0.2", - "doc-ready": "1.x", - "eventie": "^1.0.5", - "isotope-fit-columns": "1.1.x", - "isotope-cells-by-row": "~1.1.1", - "isotope-cells-by-column": "1.1.x", - "isotope-horizontal": "~1.1.1", - "isotope-masonry-horizontal": "1.1.x", - "jquery": ">=1.4.3 <2", - "jquery-bridget": "1.1.x", - "qunitjs": "^1.15", - "grunt": "~0.4.0", - "grunt-contrib-jshint": "~0.4.1", - "grunt-contrib-uglify": "~0.1.1", - "grunt-requirejs": "~0.4.0" - }, - "repository": { - "type": "git", - "url": "git://github.com/metafizzy/isotope.git" - }, - "bugs": { - "url": "https://github.com/metafizzy/isotope/issues" - }, - "homepage": "http://isotope.metafizzy.co", - "directories": { - "test": "test" - }, - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "keywords": [ - "DOM", - "browser", - "masonry", - "layout", - "filter", - "sort" - ], - "author": "Metafizzy", - "license": "GPL-3.0" -} diff --git a/profiles/wcm_base/libraries/jquery.isotope/sandbox/basic.html b/profiles/wcm_base/libraries/jquery.isotope/sandbox/basic.html deleted file mode 100644 index 8c7efbdaa354f2b3d3133dc2f3f62a5ef4ec5bd7..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/libraries/jquery.isotope/sandbox/basic.html +++ /dev/null @@ -1,65 +0,0 @@ -<!doctype html> -<html> -<head> - <meta charset="utf-8"> - - <title>basic</title> - - <link rel="stylesheet" href="sandbox.css" /> - -</head> -<body> - - <h1>basic</h1> - - <div id="basic" class="container"> - <div class="item"></div> - <div class="item h4"></div> - <div class="item w2 h2"></div> - <div class="item w2"></div> - <div class="item h3"></div> - <div class="item w3"></div> - <div class="item"></div> - <div class="item h4"></div> - <div class="item"></div> - <div class="item w2 h4"></div> - <div class="item w2"></div> - <div class="item h5"></div> - <div class="item w3"></div> - <div class="item"></div> - <div class="item h4"></div> - <div class="item"></div> - <div class="item w2 h5"></div> - <div class="item w2"></div> - <div class="item h3"></div> - <div class="item w3"></div> - <div class="item"></div> - </div> - -<script src="../bower_components/eventEmitter/EventEmitter.js"></script> -<script src="../bower_components/eventie/eventie.js"></script> -<script src="../bower_components/doc-ready/doc-ready.js"></script> -<script src="../bower_components/get-style-property/get-style-property.js"></script> -<script src="../bower_components/get-size/get-size.js"></script> -<script src="../bower_components/jquery-bridget/jquery.bridget.js"></script> -<script src="../bower_components/matches-selector/matches-selector.js"></script> -<script src="../bower_components/fizzy-ui-utils/utils.js"></script> -<script src="../bower_components/outlayer/item.js"></script> -<script src="../bower_components/outlayer/outlayer.js"></script> - -<script src="../js/layout-mode.js"></script> -<script src="../js/item.js"></script> -<script src="../js/isotope.js"></script> -<script src="../js/layout-modes/fit-rows.js"></script> - -<script> -docReady( function() { - var container = document.querySelector('#basic'); - var iso = window.iso = new Isotope( container, { - layoutMode: 'fitRows' - }); -}); -</script> - -</body> -</html> diff --git a/profiles/wcm_base/libraries/jquery.isotope/sandbox/bottom-up.html b/profiles/wcm_base/libraries/jquery.isotope/sandbox/bottom-up.html deleted file mode 100644 index b03ce8ac540cdff01a2fff9213fe606423f5303a..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/libraries/jquery.isotope/sandbox/bottom-up.html +++ /dev/null @@ -1,129 +0,0 @@ -<!doctype html> -<html> -<head> - <meta charset="utf-8"> - - <title>bottom up</title> - - <link rel="stylesheet" href="sandbox.css" /> - - <style> - #stamped .stamp1 { - width: 30%; - height: 100px; - left: 30%; - bottom: 20px; - } - - #stamped .stamp2 { - width: 200px; - height: 50px; - left: 20px; - bottom: 50px; - } - </style> - -</head> -<body> - - <h1>bottom up</h1> - - <div id="basic" class="container"> - <div class="item"></div> - <div class="item h4"></div> - <div class="item w2 h2"></div> - <div class="item w2"></div> - <div class="item h3"></div> - <div class="item w3"></div> - <div class="item"></div> - <div class="item h4"></div> - <div class="item"></div> - <div class="item w2 h4"></div> - <div class="item w2"></div> - <div class="item h5"></div> - <div class="item w3"></div> - <div class="item"></div> - <div class="item h4"></div> - <div class="item"></div> - <div class="item w2 h5"></div> - <div class="item w2"></div> - <div class="item h3"></div> - <div class="item w3"></div> - <div class="item"></div> - </div> - - <div id="stamped" class="container"> - <div class="stamp stamp1"></div> - <div class="stamp stamp2"></div> - <div class="item"></div> - <div class="item h4"></div> - <div class="item w2 h2"></div> - <div class="item w2"></div> - <div class="item h3"></div> - <div class="item w3"></div> - <div class="item"></div> - <div class="item h4"></div> - <div class="item"></div> - <div class="item w2 h4"></div> - <div class="item w2"></div> - <div class="item h5"></div> - <div class="item w3"></div> - <div class="item"></div> - <div class="item h4"></div> - <div class="item"></div> - <div class="item w2 h5"></div> - <div class="item w2"></div> - <div class="item h3"></div> - <div class="item w3"></div> - <div class="item"></div> - </div> - -<script src="../bower_components/eventEmitter/EventEmitter.js"></script> -<script src="../bower_components/eventEmitter/EventEmitter.min.js"></script> -<script src="../bower_components/eventie/eventie.js"></script> -<script src="../bower_components/doc-ready/doc-ready.js"></script> -<script src="../bower_components/get-style-property/get-style-property.js"></script> -<script src="../bower_components/get-size/get-size.js"></script> -<script src="../bower_components/jquery-bridget/jquery.bridget.js"></script> -<script src="../bower_components/matches-selector/matches-selector.js"></script> -<script src="../bower_components/fizzy-ui-utils/utils.js"></script> -<script src="../bower_components/outlayer/item.js"></script> -<script src="../bower_components/outlayer/outlayer.js"></script> -<script src="../bower_components/masonry/masonry.js"></script> - -<script src="../js/item.js"></script> -<script src="../js/layout-mode.js"></script> -<script src="../js/isotope.js"></script> -<script src="../js/layout-modes/masonry.js"></script> -<script src="../js/layout-modes/fit-rows.js"></script> - -<script> -docReady( function() { - ( function() { - var container = document.querySelector('#basic'); - var iso = new Isotope( container, { - isOriginTop: false, - masonry: { - columnWidth: 60 - } - }); - })(); - - ( function() { - var container = document.querySelector('#stamped'); - var iso = new Isotope( container, { - itemSelector: '.item', - isOriginTop: false, - masonry: { - columnWidth: 60, - gutter: 10, - }, - stamp: '.stamp' - }); - })(); - -}); -</script> - -</body> -</html> diff --git a/profiles/wcm_base/libraries/jquery.isotope/sandbox/browserify/browserify.html b/profiles/wcm_base/libraries/jquery.isotope/sandbox/browserify/browserify.html deleted file mode 100644 index f3a63fed10fedb2e9380b94cdc1d1eafa25ecafb..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/libraries/jquery.isotope/sandbox/browserify/browserify.html +++ /dev/null @@ -1,152 +0,0 @@ -<!doctype html> -<html> -<head> - <meta charset="utf-8"> - - <title>Browserify</title> - - <link rel="stylesheet" href="../sandbox.css" /> - - <style> - /* for horizontal layout modes */ - #container { - /*height: 400px;*/ - } - </style> - -</head> -<body> - - <h1>Browserify</h1> - -<div id="options"> - <h2>Filter</h2> - <div class="option-set" data-isotope-key="filter"> - <button data-isotope-value="*">show all</button> - <button data-isotope-value=".metal">metal</button> - <button data-isotope-value=".post-transition">post-transition</button> - <button data-isotope-value="number-greater-than-50">number > 50</button> - </div> - <h2>Sort</h2> - <div class="option-set" data-isotope-key="sortBy"> - <button data-isotope-value="original-order">original-order</button> - <button data-isotope-value="number">number</button> - <button data-isotope-value="name">name</button> - <button data-isotope-value="symbol">symbol</button> - <button data-isotope-value="weight">weight</button> - <button data-isotope-value="category">category</button> - </div> -</div> - -<div id="container"> - - <div class="element transition metal " data-symbol="Hg" data-category="transition"> - <p class="number">80</p> - <h3 class="symbol">Hg</h3> - <h2 class="name">Mercury</h2> - <p class="weight">200.59</p> - </div> - - <div class="element metalloid " data-symbol="Te" data-category="metalloid"> - <p class="number">52</p> - <h3 class="symbol">Te</h3> - <h2 class="name">Tellurium</h2> - <p class="weight">127.6</p> - </div> - - <div class="element post-transition metal " data-symbol="Bi" data-category="post-transition"> - <p class="number">83</p> - <h3 class="symbol">Bi</h3> - <h2 class="name">Bismuth</h2> - <p class="weight">208.9804</p> - </div> - - <div class="element transition metal " data-symbol="Cd" data-category="transition"> - <p class="number">48</p> - <h3 class="symbol">Cd</h3> - <h2 class="name">Cadmium</h2> - <p class="weight">112.411</p> - </div> - - <div class="element alkaline-earth metal " data-symbol="Ca" data-category="alkaline-earth"> - <p class="number">20</p> - <h3 class="symbol">Ca</h3> - <h2 class="name">Calcium</h2> - <p class="weight">40.078</p> - </div> - - <div class="element transition metal " data-symbol="Re" data-category="transition"> - <p class="number">75</p> - <h3 class="symbol">Re</h3> - <h2 class="name">Rhenium</h2> - <p class="weight">186.207</p> - </div> - - <div class="element post-transition metal " data-symbol="Tl" data-category="post-transition"> - <p class="number">81</p> - <h3 class="symbol">Tl</h3> - <h2 class="name">Thallium</h2> - <p class="weight">204.3833</p> - </div> - - <div class="element metalloid " data-symbol="Sb" data-category="metalloid"> - <p class="number">51</p> - <h3 class="symbol">Sb</h3> - <h2 class="name">Antimony</h2> - <p class="weight">121.76</p> - </div> - - <div class="element transition metal " data-symbol="Co" data-category="transition"> - <p class="number">27</p> - <h3 class="symbol">Co</h3> - <h2 class="name">Cobalt</h2> - <p class="weight">58.933195</p> - </div> - - <div class="element lanthanoid metal inner-transition " data-symbol="Lu" data-category="lanthanoid"> - <p class="number">71</p> - <h3 class="symbol">Lu</h3> - <h2 class="name">Lutetium</h2> - <p class="weight">174.9668</p> - </div> - - <div class="element noble-gas nonmetal " data-symbol="Ar" data-category="noble-gas"> - <p class="number">18</p> - <h3 class="symbol">Ar</h3> - <h2 class="name">Argon</h2> - <p class="weight">39.948</p> - </div> - - <div class="element alkali metal " data-symbol="Rb" data-category="alkali"> - <p class="number">37</p> - <h3 class="symbol">Rb</h3> - <h2 class="name">Rubidium</h2> - <p class="weight">85.4678</p> - </div> - - <div class="element other nonmetal " data-symbol="N" data-category="other"> - <p class="number">7</p> - <h3 class="symbol">N</h3> - <h2 class="name">Nitrogen</h2> - <p class="weight">14.0067</p> - </div> - - <div class="element actinoid metal inner-transition " data-symbol="Np" data-category="actinoid"> - <p class="number">93</p> - <h3 class="symbol">Np</h3> - <h2 class="name">Neptunium</h2> - <p class="weight">(237)</p> - </div> - - <div class="element actinoid metal inner-transition " data-symbol="Ac" data-category="actinoid"> - <p class="number">89</p> - <h3 class="symbol">Ac</h3> - <h2 class="name">Actinium</h2> - <p class="weight">(227)</p> - </div> -</div> - -<script src="bundle.js"></script> - -</body> -</html> diff --git a/profiles/wcm_base/libraries/jquery.isotope/sandbox/browserify/jq-main.js b/profiles/wcm_base/libraries/jquery.isotope/sandbox/browserify/jq-main.js deleted file mode 100644 index 9f2a4aaaa3f651678b48dd4ea03a2dd439cd72a5..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/libraries/jquery.isotope/sandbox/browserify/jq-main.js +++ /dev/null @@ -1,42 +0,0 @@ -var Isotope = window.Isotope = require('../../js/isotope'); -var $ = require('jquery'); -require('jquery-bridget'); - -// enable $().isotope() plugin -$.bridget( 'isotope', Isotope ); - -var $container = $('#container').isotope({ - layoutMode: 'fitRows', - transitionDuration: '0.8s', - cellsByRow: { - columnWidth: 130, - rowHeight: 140 - }, - getSortData: { - number: '.number parseInt', - symbol: '.symbol', - name: '.name', - category: '[data-category]', - weight: function( itemElem ) { - // remove parenthesis - return parseFloat( $(itemElem).find('.weight').text().replace( /[\(\)]/g, '') ); - } - } -}); - -$('#options').on( 'click', 'button', function( event ) { - var $target = $( event.target ); - var key = $target.parent().attr('data-isotope-key'); - var value = $target.attr('data-isotope-value'); - - if ( key === 'filter' && value === 'number-greater-than-50' ) { - value = function( elem ) { - var numberText = $( elem ).find('.number').text(); - return parseInt( numberText, 10 ) > 40; - }; - } - console.log( key, value ); - var opts = {}; - opts[ key ] = value; - $container.isotope( opts ); -}); diff --git a/profiles/wcm_base/libraries/jquery.isotope/sandbox/browserify/main.js b/profiles/wcm_base/libraries/jquery.isotope/sandbox/browserify/main.js deleted file mode 100644 index 13de881684d16e899d3d8b7ffa49ee2aff2a86bc..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/libraries/jquery.isotope/sandbox/browserify/main.js +++ /dev/null @@ -1,52 +0,0 @@ -var Isotope = window.Isotope = require('../../js/isotope'); -var eventie = require('eventie'); -var matchesSelector = require('desandro-matches-selector'); - -// require('isotope-fit-columns'); -// require('isotope-cells-by-column'); -// require('isotope-horizontal'); -// require('isotope-masonry-horizontal'); - -function getText( elem ) { - return elem.textContent || elem.innerText; -} - -var iso = window.iso = new Isotope( '#container', { - layoutMode: 'fitRows', - transitionDuration: '0.8s', - cellsByRow: { - columnWidth: 130, - rowHeight: 140 - }, - getSortData: { - number: '.number parseInt', - symbol: '.symbol', - name: '.name', - category: '[data-category]', - weight: function( itemElem ) { - // remove parenthesis - return parseFloat( getText( itemElem.querySelector('.weight') ).replace( /[\(\)]/g, '') ); - } - } -}); - -var options = document.querySelector('#options'); - -eventie.bind( options, 'click', function( event ) { - if ( !matchesSelector( event.target, 'button' ) ) { - return; - } - - var key = event.target.parentNode.getAttribute('data-isotope-key'); - var value = event.target.getAttribute('data-isotope-value'); - - if ( key === 'filter' && value === 'number-greater-than-50' ) { - value = function( elem ) { - var numberText = getText( elem.querySelector('.number') ); - return parseInt( numberText, 10 ) > 40; - }; - } - console.log( key, value ); - iso.options[ key ] = value; - iso.arrange(); -}); diff --git a/profiles/wcm_base/libraries/jquery.isotope/sandbox/cells-by-row.html b/profiles/wcm_base/libraries/jquery.isotope/sandbox/cells-by-row.html deleted file mode 100644 index 7810e252e87843b8ffee068bf2554a28d67dd3ed..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/libraries/jquery.isotope/sandbox/cells-by-row.html +++ /dev/null @@ -1,221 +0,0 @@ -<!doctype html> -<html> -<head> - <meta charset="utf-8"> - - <title>cellsByRow</title> - - <link rel="stylesheet" href="sandbox.css" /> - <style> - .element.alkali { width: 170px; height: 120px; } - .element.alkaline-earth {} - .element.lanthanoid { height: 170px; } - .element.actinoid { width: 170px; } - .element.transition { height: 220px; } -/* .element.post-transition { background: #0FF; background: hsl( 180, 100%, 50%); } - .element.metalloid { background: #08F; background: hsl( 216, 100%, 50%); } - .element.other.nonmetal { background: #00F; background: hsl( 252, 100%, 50%); } - .element.halogen { background: #F0F; background: hsl( 288, 100%, 50%); } - .element.noble-gas { background: #F08; background: hsl( 324, 100%, 50%); }*/ - </style> - -</head> -<body> - - <h1>cellsByRow</h1> - -<div id="options"> - <h2>Sort</h2> - <ul class="option-set"> - <li><a href="#original-order">original-order</a></li> - <li><a href="#number">number</a></li> - <li><a href="#name">name</a></li> - <li><a href="#symbol">symbol</a></li> - <li><a href="#weight">weight</a></li> - <li><a href="#category">category</a></li> - </ul> -</div> - -<div id="container"> - - <div class="element transition metal " data-symbol="Hg" data-category="transition"> - <p class="number">80</p> - <h3 class="symbol">Hg</h3> - <h2 class="name">Mercury</h2> - <p class="weight">200.59</p> - </div> - - <div class="element metalloid " data-symbol="Te" data-category="metalloid"> - <p class="number">52</p> - <h3 class="symbol">Te</h3> - <h2 class="name">Tellurium</h2> - <p class="weight">127.6</p> - </div> - - <div class="element post-transition metal " data-symbol="Bi" data-category="post-transition"> - <p class="number">83</p> - <h3 class="symbol">Bi</h3> - <h2 class="name">Bismuth</h2> - <p class="weight">208.9804</p> - </div> - - <div class="element transition metal " data-symbol="Cd" data-category="transition"> - <p class="number">48</p> - <h3 class="symbol">Cd</h3> - <h2 class="name">Cadmium</h2> - <p class="weight">112.411</p> - </div> - - <div class="element alkaline-earth metal " data-symbol="Ca" data-category="alkaline-earth"> - <p class="number">20</p> - <h3 class="symbol">Ca</h3> - <h2 class="name">Calcium</h2> - <p class="weight">40.078</p> - </div> - - <div class="element transition metal " data-symbol="Re" data-category="transition"> - <p class="number">75</p> - <h3 class="symbol">Re</h3> - <h2 class="name">Rhenium</h2> - <p class="weight">186.207</p> - </div> - - <div class="element post-transition metal " data-symbol="Tl" data-category="post-transition"> - <p class="number">81</p> - <h3 class="symbol">Tl</h3> - <h2 class="name">Thallium</h2> - <p class="weight">204.3833</p> - </div> - - <div class="element metalloid " data-symbol="Sb" data-category="metalloid"> - <p class="number">51</p> - <h3 class="symbol">Sb</h3> - <h2 class="name">Antimony</h2> - <p class="weight">121.76</p> - </div> - - <div class="element transition metal " data-symbol="Co" data-category="transition"> - <p class="number">27</p> - <h3 class="symbol">Co</h3> - <h2 class="name">Cobalt</h2> - <p class="weight">58.933195</p> - </div> - - <div class="element lanthanoid metal inner-transition " data-symbol="Lu" data-category="lanthanoid"> - <p class="number">71</p> - <h3 class="symbol">Lu</h3> - <h2 class="name">Lutetium</h2> - <p class="weight">174.9668</p> - </div> - - <div class="element noble-gas nonmetal " data-symbol="Ar" data-category="noble-gas"> - <p class="number">18</p> - <h3 class="symbol">Ar</h3> - <h2 class="name">Argon</h2> - <p class="weight">39.948</p> - </div> - - <div class="element alkali metal " data-symbol="Rb" data-category="alkali"> - <p class="number">37</p> - <h3 class="symbol">Rb</h3> - <h2 class="name">Rubidium</h2> - <p class="weight">85.4678</p> - </div> - - <div class="element other nonmetal " data-symbol="N" data-category="other"> - <p class="number">7</p> - <h3 class="symbol">N</h3> - <h2 class="name">Nitrogen</h2> - <p class="weight">14.0067</p> - </div> - - <div class="element actinoid metal inner-transition " data-symbol="Np" data-category="actinoid"> - <p class="number">93</p> - <h3 class="symbol">Np</h3> - <h2 class="name">Neptunium</h2> - <p class="weight">(237)</p> - </div> - - <div class="element actinoid metal inner-transition " data-symbol="Ac" data-category="actinoid"> - <p class="number">89</p> - <h3 class="symbol">Ac</h3> - <h2 class="name">Actinium</h2> - <p class="weight">(227)</p> - </div> -</div> - -<script src="../bower_components/eventEmitter/EventEmitter.js"></script> -<script src="../bower_components/eventie/eventie.js"></script> -<script src="../bower_components/doc-ready/doc-ready.js"></script> -<script src="../bower_components/get-style-property/get-style-property.js"></script> -<script src="../bower_components/get-size/get-size.js"></script> -<script src="../bower_components/jquery-bridget/jquery.bridget.js"></script> -<script src="../bower_components/matches-selector/matches-selector.js"></script> -<script src="../bower_components/fizzy-ui-utils/utils.js"></script> -<script src="../bower_components/outlayer/item.js"></script> -<script src="../bower_components/outlayer/outlayer.js"></script> -<script src="../bower_components/masonry/masonry.js"></script> - -<script src="../js/item.js"></script> -<script src="../js/layout-mode.js"></script> -<script src="../js/isotope.js"></script> -<script src="../js/layout-modes/fit-rows.js"></script> -<script src="../js/layout-modes/vertical.js"></script> - -<script src="../bower_components/isotope-cells-by-row/cells-by-row.js"></script> - -<script> -docReady( function() { - var container = document.querySelector('#container'); - var iso = window.iso = new Isotope( container, { - // sortBy: 'symbol', - // filter: '.metal', - layoutMode: 'cellsByRow', - // isOriginLeft: false, - // isOriginTop: false, - cellsByRow: { - columnWidth: 200, - rowHeight: 150 - }, - vertical: { - horizontalAlignment: 0.5 - }, - getSortData: { - - number: '.number parseInt', - symbol: '.symbol', - name: '.name', - category: '[data-category]', - - weight: function( itemElem ) { - // remove parenthesis - return parseFloat( getText( itemElem.querySelector('.weight') ).replace( /[\(\)]/g, '') ); - } - - } - }); - - var options = document.querySelector('#options'); - - eventie.bind( options, 'click', function( event ) { - if ( !matchesSelector( event.target, 'a' ) ) { - return; - } - - // use link's href, remove leading hash - var sortBy = event.target.getAttribute('href').slice( 1 ); - sortBy.slice( 0, 1 ); - iso.arrange({ sortBy: sortBy }); - event.preventDefault(); - }); - -}); - -function getText( elem ) { - return elem.textContent || elem.innerText; -} - -</script> - -</body> -</html> diff --git a/profiles/wcm_base/libraries/jquery.isotope/sandbox/combination-filters-inclusive.html b/profiles/wcm_base/libraries/jquery.isotope/sandbox/combination-filters-inclusive.html deleted file mode 100644 index 8bf55ede245f92efe7b9fd305e1b0905e6e394c3..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/libraries/jquery.isotope/sandbox/combination-filters-inclusive.html +++ /dev/null @@ -1,259 +0,0 @@ -<!doctype html> -<html> -<head> - <meta charset="utf-8"> - - <title>combination filters inclusive</title> - - <link rel="stylesheet" href="sandbox.css" /> - <style> - * { - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - } - - body { - font-family: sans-serif; - } - - /* ---- button ---- */ - - .button { - display: inline-block; - padding: 0.5em 1.0em; - background: #EEE; - border: none; - border-radius: 7px; - background-image: linear-gradient( to bottom, hsla(0, 0%, 0%, 0), hsla(0, 0%, 0%, 0.2) ); - color: #222; - font-family: sans-serif; - font-size: 16px; - text-shadow: 0 1px white; - cursor: pointer; - } - - .button:hover { - background-color: #8CF; - text-shadow: 0 1px hsla(0, 0%, 100%, 0.5); - color: #222; - } - - .button:active, - .button.is-checked { - background-color: #28F; - } - - .button.is-checked { - color: white; - text-shadow: 0 -1px hsla(0, 0%, 0%, 0.8); - } - - .button:active { - box-shadow: inset 0 1px 10px hsla(0, 0%, 0%, 0.8); - } - - /* ---- button-group ---- */ - - .button-group:after { - content: ''; - display: block; - clear: both; - } - - .button-group .button { - float: left; - border-radius: 0; - margin-left: 0; - margin-right: 1px; - } - - .button-group .button:first-child { border-radius: 0.5em 0 0 0.5em; } - .button-group .button:last-child { border-radius: 0 0.5em 0.5em 0; } - - /* ---- isotope ---- */ - - .isotope { - background: #DDD; - max-width: 1200px; - } - - /* clear fix */ - .isotope:after { - content: ''; - display: block; - clear: both; - } - - /* ui group */ - - .ui-group { - display: inline-block; - } - - .ui-group h3 { - display: inline-block; - vertical-align: top; - line-height: 32px; - margin-right: 0.2em; - font-size: 16px; - } - - .ui-group .button-group { - display: inline-block; - margin-right: 20px; - } - - /* color-shape */ - - .color-shape { - width: 70px; - height: 70px; - margin: 5px; - float: left; - } - - .color-shape.round { - border-radius: 35px; - } - - .color-shape.big.round { - border-radius: 75px; - } - - .color-shape.red { background: red; } - .color-shape.blue { background: blue; } - .color-shape.yellow { background: yellow; } - - .color-shape.wide, .color-shape.big { width: 150px; } - .color-shape.tall, .color-shape.big { height: 150px; } - </style> - -</head> -<body> - - <h1>combination filters</h1> - -<div id="filters"> - - <div class="ui-group"> - <h3>Color</h3> - <div class="button-group js-radio-button-group" data-filter-group="color"> - <button class="button is-checked" data-filter="">any</button> - <button class="button" data-filter=".red">red</button> - <button class="button" data-filter=".blue">blue</button> - <button class="button" data-filter=".yellow">yellow</button> - </div> - </div> - - <div class="ui-group"> - <h3>Size</h3> - <div class="button-group js-radio-button-group" data-filter-group="size"> - <button class="button is-checked" data-filter="">any</button> - <button class="button" data-filter=".small">small</button> - <button class="button" data-filter=".wide">wide</button> - <button class="button" data-filter=".big">big</button> - <button class="button" data-filter=".tall">tall</button> - </div> - </div> - - <div class="ui-group"> - <h3>Shape</h3> - <div class="button-group js-radio-button-group" data-filter-group="shape"> - <button class="button is-checked" data-filter="">any</button> - <button class="button" data-filter=".round">round</button> - <button class="button" data-filter=".square">square</button> - </div> - </div> - -</div> - -<div class="isotope"> - <div class="color-shape small round red"></div> - <div class="color-shape small round blue"></div> - <div class="color-shape small round yellow"></div> - <div class="color-shape small square red"></div> - <div class="color-shape small square blue"></div> - <div class="color-shape small square yellow"></div> - <div class="color-shape wide round red"></div> - <div class="color-shape wide round blue"></div> - <div class="color-shape wide round yellow"></div> - <div class="color-shape wide square red"></div> - <div class="color-shape wide square blue"></div> - <div class="color-shape wide square yellow"></div> - <div class="color-shape big round red"></div> - <div class="color-shape big round blue"></div> - <div class="color-shape big round yellow"></div> - <div class="color-shape big square red"></div> - <div class="color-shape big square blue"></div> - <div class="color-shape big square yellow"></div> - <div class="color-shape tall round red"></div> - <div class="color-shape tall round blue"></div> - <div class="color-shape tall round yellow"></div> - <div class="color-shape tall square red"></div> - <div class="color-shape tall square blue"></div> - <div class="color-shape tall square yellow"></div> -</div> - - -<script src="../bower_components/jquery/dist/jquery.js"></script> - -<script src="../bower_components/eventEmitter/EventEmitter.js"></script> -<script src="../bower_components/eventie/eventie.js"></script> -<script src="../bower_components/doc-ready/doc-ready.js"></script> -<script src="../bower_components/get-style-property/get-style-property.js"></script> -<script src="../bower_components/get-size/get-size.js"></script> -<script src="../bower_components/jquery-bridget/jquery.bridget.js"></script> -<script src="../bower_components/matches-selector/matches-selector.js"></script> -<script src="../bower_components/fizzy-ui-utils/utils.js"></script> -<script src="../bower_components/outlayer/item.js"></script> -<script src="../bower_components/outlayer/outlayer.js"></script> -<script src="../bower_components/masonry/masonry.js"></script> - -<script src="../js/item.js"></script> -<script src="../js/layout-mode.js"></script> -<script src="../js/isotope.js"></script> -<script src="../js/layout-modes/masonry.js"></script> -<script src="../js/layout-modes/fit-rows.js"></script> - -<script> -$( function() { - // init Isotope - var $container = $('.isotope').isotope({ - itemSelector: '.color-shape' - }); - - // store filter for each group - var filters = {}; - - $('#filters').on( 'click', '.button', function() { - var $this = $(this); - // get group key - var $buttonGroup = $this.parents('.button-group'); - var filterGroup = $buttonGroup.attr('data-filter-group'); - // set filter for group - filters[ filterGroup ] = $this.attr('data-filter'); - // combine filters - var filterValue = ''; - for ( var prop in filters ) { - filterValue += filters[ prop ]; - } - // set filter for Isotope - $container.isotope({ filter: filterValue }); - }); - - // change is-checked class on buttons - $('.button-group').each( function( i, buttonGroup ) { - var $buttonGroup = $( buttonGroup ); - $buttonGroup.on( 'click', 'button', function() { - // $buttonGroup.find('.is-checked').removeClass('is-checked'); - $( this ).toggleClass('is-checked'); - }); - }); - -}); - -</script> - -</body> -</html> diff --git a/profiles/wcm_base/libraries/jquery.isotope/sandbox/combination-filters.html b/profiles/wcm_base/libraries/jquery.isotope/sandbox/combination-filters.html deleted file mode 100644 index 7b77210a82aa639e0fd716b6330e52623a2664a1..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/libraries/jquery.isotope/sandbox/combination-filters.html +++ /dev/null @@ -1,259 +0,0 @@ -<!doctype html> -<html> -<head> - <meta charset="utf-8"> - - <title>combination filters</title> - - <link rel="stylesheet" href="sandbox.css" /> - <style> - * { - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - } - - body { - font-family: sans-serif; - } - - /* ---- button ---- */ - - .button { - display: inline-block; - padding: 0.5em 1.0em; - background: #EEE; - border: none; - border-radius: 7px; - background-image: linear-gradient( to bottom, hsla(0, 0%, 0%, 0), hsla(0, 0%, 0%, 0.2) ); - color: #222; - font-family: sans-serif; - font-size: 16px; - text-shadow: 0 1px white; - cursor: pointer; - } - - .button:hover { - background-color: #8CF; - text-shadow: 0 1px hsla(0, 0%, 100%, 0.5); - color: #222; - } - - .button:active, - .button.is-checked { - background-color: #28F; - } - - .button.is-checked { - color: white; - text-shadow: 0 -1px hsla(0, 0%, 0%, 0.8); - } - - .button:active { - box-shadow: inset 0 1px 10px hsla(0, 0%, 0%, 0.8); - } - - /* ---- button-group ---- */ - - .button-group:after { - content: ''; - display: block; - clear: both; - } - - .button-group .button { - float: left; - border-radius: 0; - margin-left: 0; - margin-right: 1px; - } - - .button-group .button:first-child { border-radius: 0.5em 0 0 0.5em; } - .button-group .button:last-child { border-radius: 0 0.5em 0.5em 0; } - - /* ---- isotope ---- */ - - .isotope { - background: #DDD; - max-width: 1200px; - } - - /* clear fix */ - .isotope:after { - content: ''; - display: block; - clear: both; - } - - /* ui group */ - - .ui-group { - display: inline-block; - } - - .ui-group h3 { - display: inline-block; - vertical-align: top; - line-height: 32px; - margin-right: 0.2em; - font-size: 16px; - } - - .ui-group .button-group { - display: inline-block; - margin-right: 20px; - } - - /* color-shape */ - - .color-shape { - width: 70px; - height: 70px; - margin: 5px; - float: left; - } - - .color-shape.round { - border-radius: 35px; - } - - .color-shape.big.round { - border-radius: 75px; - } - - .color-shape.red { background: red; } - .color-shape.blue { background: blue; } - .color-shape.yellow { background: yellow; } - - .color-shape.wide, .color-shape.big { width: 150px; } - .color-shape.tall, .color-shape.big { height: 150px; } - </style> - -</head> -<body> - - <h1>combination filters</h1> - -<div id="filters"> - - <div class="ui-group"> - <h3>Color</h3> - <div class="button-group js-radio-button-group" data-filter-group="color"> - <button class="button is-checked" data-filter="">any</button> - <button class="button" data-filter=".red">red</button> - <button class="button" data-filter=".blue">blue</button> - <button class="button" data-filter=".yellow">yellow</button> - </div> - </div> - - <div class="ui-group"> - <h3>Size</h3> - <div class="button-group js-radio-button-group" data-filter-group="size"> - <button class="button is-checked" data-filter="">any</button> - <button class="button" data-filter=".small">small</button> - <button class="button" data-filter=".wide">wide</button> - <button class="button" data-filter=".big">big</button> - <button class="button" data-filter=".tall">tall</button> - </div> - </div> - - <div class="ui-group"> - <h3>Shape</h3> - <div class="button-group js-radio-button-group" data-filter-group="shape"> - <button class="button is-checked" data-filter="">any</button> - <button class="button" data-filter=".round">round</button> - <button class="button" data-filter=".square">square</button> - </div> - </div> - -</div> - -<div class="isotope"> - <div class="color-shape small round red"></div> - <div class="color-shape small round blue"></div> - <div class="color-shape small round yellow"></div> - <div class="color-shape small square red"></div> - <div class="color-shape small square blue"></div> - <div class="color-shape small square yellow"></div> - <div class="color-shape wide round red"></div> - <div class="color-shape wide round blue"></div> - <div class="color-shape wide round yellow"></div> - <div class="color-shape wide square red"></div> - <div class="color-shape wide square blue"></div> - <div class="color-shape wide square yellow"></div> - <div class="color-shape big round red"></div> - <div class="color-shape big round blue"></div> - <div class="color-shape big round yellow"></div> - <div class="color-shape big square red"></div> - <div class="color-shape big square blue"></div> - <div class="color-shape big square yellow"></div> - <div class="color-shape tall round red"></div> - <div class="color-shape tall round blue"></div> - <div class="color-shape tall round yellow"></div> - <div class="color-shape tall square red"></div> - <div class="color-shape tall square blue"></div> - <div class="color-shape tall square yellow"></div> -</div> - - -<script src="../bower_components/jquery/dist/jquery.js"></script> - -<script src="../bower_components/eventEmitter/EventEmitter.js"></script> -<script src="../bower_components/eventie/eventie.js"></script> -<script src="../bower_components/doc-ready/doc-ready.js"></script> -<script src="../bower_components/get-style-property/get-style-property.js"></script> -<script src="../bower_components/get-size/get-size.js"></script> -<script src="../bower_components/jquery-bridget/jquery.bridget.js"></script> -<script src="../bower_components/matches-selector/matches-selector.js"></script> -<script src="../bower_components/fizzy-ui-utils/utils.js"></script> -<script src="../bower_components/outlayer/item.js"></script> -<script src="../bower_components/outlayer/outlayer.js"></script> -<script src="../bower_components/masonry/masonry.js"></script> - -<script src="../js/item.js"></script> -<script src="../js/layout-mode.js"></script> -<script src="../js/isotope.js"></script> -<script src="../js/layout-modes/masonry.js"></script> -<script src="../js/layout-modes/fit-rows.js"></script> - -<script> -$( function() { - // init Isotope - var $container = $('.isotope').isotope({ - itemSelector: '.color-shape' - }); - - // store filter for each group - var filters = {}; - - $('#filters').on( 'click', '.button', function() { - var $this = $(this); - // get group key - var $buttonGroup = $this.parents('.button-group'); - var filterGroup = $buttonGroup.attr('data-filter-group'); - // set filter for group - filters[ filterGroup ] = $this.attr('data-filter'); - // combine filters - var filterValue = ''; - for ( var prop in filters ) { - filterValue += filters[ prop ]; - } - // set filter for Isotope - $container.isotope({ filter: filterValue }); - }); - - // change is-checked class on buttons - $('.button-group').each( function( i, buttonGroup ) { - var $buttonGroup = $( buttonGroup ); - $buttonGroup.on( 'click', 'button', function() { - $buttonGroup.find('.is-checked').removeClass('is-checked'); - $( this ).addClass('is-checked'); - }); - }); - -}); - -</script> - -</body> -</html> diff --git a/profiles/wcm_base/libraries/jquery.isotope/sandbox/filter-sort.html b/profiles/wcm_base/libraries/jquery.isotope/sandbox/filter-sort.html deleted file mode 100644 index 5479527a2cace23caca124d02f1b388a490428f9..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/libraries/jquery.isotope/sandbox/filter-sort.html +++ /dev/null @@ -1,228 +0,0 @@ -<!doctype html> -<html> -<head> - <meta charset="utf-8"> - - <title>filter sort</title> - - <link rel="stylesheet" href="sandbox.css" /> - <style> - #container { width: 100%; } - </style> -</head> -<body> - - <h1>filter sort</h1> - -<div id="options"> - <h2>Filter</h2> - <div class="option-set" data-isotope-key="filter"> - <button data-isotope-value="*">show all</button> - <button data-isotope-value=".metal">metal</button> - <button data-isotope-value=".post-transition">post-transition</button> - <button data-isotope-value="number-greater-than-50">number > 50</button> - </div> - <h2>Sort</h2> - <div class="option-set" data-isotope-key="sortBy"> - <button data-isotope-value="original-order">original-order</button> - <button data-isotope-value="number">number</button> - <button data-isotope-value="name">name</button> - <button data-isotope-value="symbol">symbol</button> - <button data-isotope-value="weight">weight</button> - <button data-isotope-value="category">category</button> - </div> -</div> - -<div id="container"> - - <div class="element transition metal " data-symbol="Hg" data-category="transition"> - <p class="number">80</p> - <h3 class="symbol">Hg</h3> - <h2 class="name">Mercury</h2> - <p class="weight">200.59</p> - </div> - - <div class="element metalloid " data-symbol="Te" data-category="metalloid"> - <p class="number">52</p> - <h3 class="symbol">Te</h3> - <h2 class="name">Tellurium</h2> - <p class="weight">127.6</p> - </div> - - <div class="element post-transition metal " data-symbol="Bi" data-category="post-transition"> - <p class="number">83</p> - <h3 class="symbol">Bi</h3> - <h2 class="name">Bismuth</h2> - <p class="weight">208.9804</p> - </div> - - <div class="element transition metal " data-symbol="Cd" data-category="transition"> - <p class="number">48</p> - <h3 class="symbol">Cd</h3> - <h2 class="name">Cadmium</h2> - <p class="weight">112.411</p> - </div> - - <div class="element alkaline-earth metal " data-symbol="Ca" data-category="alkaline-earth"> - <p class="number">20</p> - <h3 class="symbol">Ca</h3> - <h2 class="name">Calcium</h2> - <p class="weight">40.078</p> - </div> - - <div class="element transition metal " data-symbol="Re" data-category="transition"> - <p class="number">75</p> - <h3 class="symbol">Re</h3> - <h2 class="name">Rhenium</h2> - <p class="weight">186.207</p> - </div> - - <div class="element post-transition metal " data-symbol="Tl" data-category="post-transition"> - <p class="number">81</p> - <h3 class="symbol">Tl</h3> - <h2 class="name">Thallium</h2> - <p class="weight">204.3833</p> - </div> - - <div class="element metalloid " data-symbol="Sb" data-category="metalloid"> - <p class="number">51</p> - <h3 class="symbol">Sb</h3> - <h2 class="name">Antimony</h2> - <p class="weight">121.76</p> - </div> - - <div class="element transition metal " data-symbol="Co" data-category="transition"> - <p class="number">27</p> - <h3 class="symbol">Co</h3> - <h2 class="name">Cobalt</h2> - <p class="weight">58.933195</p> - </div> - - <div class="element lanthanoid metal inner-transition " data-symbol="Lu" data-category="lanthanoid"> - <p class="number">71</p> - <h3 class="symbol">Lu</h3> - <h2 class="name">Lutetium</h2> - <p class="weight">174.9668</p> - </div> - - <div class="element noble-gas nonmetal " data-symbol="Ar" data-category="noble-gas"> - <p class="number">18</p> - <h3 class="symbol">Ar</h3> - <h2 class="name">Argon</h2> - <p class="weight">39.948</p> - </div> - - <div class="element alkali metal " data-symbol="Rb" data-category="alkali"> - <p class="number">37</p> - <h3 class="symbol">Rb</h3> - <h2 class="name">Rubidium</h2> - <p class="weight">85.4678</p> - </div> - - <div class="element other nonmetal " data-symbol="N" data-category="other"> - <p class="number">7</p> - <h3 class="symbol">N</h3> - <h2 class="name">Nitrogen</h2> - <p class="weight">14.0067</p> - </div> - - <div class="element actinoid metal inner-transition " data-symbol="Np" data-category="actinoid"> - <p class="number">93</p> - <h3 class="symbol">Np</h3> - <h2 class="name">Neptunium</h2> - <p class="weight">(237)</p> - </div> - - <div class="element actinoid metal inner-transition " data-symbol="Ac" data-category="actinoid"> - <p class="number">89</p> - <h3 class="symbol">Ac</h3> - <h2 class="name">Actinium</h2> - <p class="weight">(227)</p> - </div> -</div> - -<script src="../bower_components/eventEmitter/EventEmitter.js"></script> -<script src="../bower_components/eventie/eventie.js"></script> -<script src="../bower_components/doc-ready/doc-ready.js"></script> -<script src="../bower_components/get-style-property/get-style-property.js"></script> -<script src="../bower_components/get-size/get-size.js"></script> -<script src="../bower_components/jquery-bridget/jquery.bridget.js"></script> -<script src="../bower_components/matches-selector/matches-selector.js"></script> -<script src="../bower_components/fizzy-ui-utils/utils.js"></script> -<script src="../bower_components/outlayer/item.js"></script> -<script src="../bower_components/outlayer/outlayer.js"></script> - -<script src="../js/item.js"></script> -<script src="../js/layout-mode.js"></script> -<script src="../js/isotope.js"></script> -<script src="../js/layout-modes/fit-rows.js"></script> -<script src="../js/layout-modes/vertical.js"></script> - -<script src="../bower_components/isotope-cells-by-row/cells-by-row.js"></script> - -<script> -docReady( function() { - var container = document.querySelector('#container'); - var iso = window.iso = new Isotope( container, { - layoutMode: 'fitRows', - transitionDuration: '0.8s', - cellsByRow: { - columnWidth: 130, - rowHeight: 140, - }, - getSortData: { - number: '.number parseInt', - symbol: '.symbol', - name: '.name', - category: '[data-category]', - weight: function( itemElem ) { - // remove parenthesis - return parseFloat( getText( itemElem.querySelector('.weight') ).replace( /[\(\)]/g, '') ); - } - } - }); - - var options = document.querySelector('#options'); - - eventie.bind( options, 'click', function( event ) { - if ( !matchesSelector( event.target, 'button' ) ) { - return; - } - - // var opt = {}; - var key = event.target.parentNode.getAttribute('data-isotope-key'); - var value = event.target.getAttribute('data-isotope-value'); - - if ( key === 'filter' && value === 'number-greater-than-50' ) { - value = function( elem ) { - var numberText = getText( elem.querySelector('.number') ); - return parseInt( numberText, 10 ) > 40; - }; - } - // console.log( key, value ); - iso.options[ key ] = value; - iso.arrange(); - }); - - // iso.on( 'hideComplete', function( items ) { - // console.log( 'hideComplete', items ); - // }) - - // iso.on( 'revealComplete', function( items ) { - // console.log( 'revealComplete', items ); - // }) - - // iso.on( 'arrangeComplete', function( items ) { - // console.log( 'arrangeComplete', items.length ); - // }); - -}); - -function getText( elem ) { - return elem.textContent || elem.innerText; -} - -</script> - -</body> -</html> diff --git a/profiles/wcm_base/libraries/jquery.isotope/sandbox/fitrows.html b/profiles/wcm_base/libraries/jquery.isotope/sandbox/fitrows.html deleted file mode 100644 index dd8d756e46ccf62e821a2004bd7b3c04ea91d88d..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/libraries/jquery.isotope/sandbox/fitrows.html +++ /dev/null @@ -1,136 +0,0 @@ -<!doctype html> -<html> -<head> - <meta charset="utf-8"> - - <title>fitRows</title> - - <link rel="stylesheet" href="sandbox.css" /> - - <style> - #gutter2 .gutter-sizer { width: 30px; } - </style> - -</head> -<body> - - <h1>fitRows</h1> - - <div id="basic" class="container"> - <div class="item"></div> - <div class="item h4"></div> - <div class="item w2 h2"></div> - <div class="item w2"></div> - <div class="item h3"></div> - <div class="item w3"></div> - <div class="item"></div> - <div class="item h4"></div> - <div class="item"></div> - <div class="item w2 h4"></div> - <div class="item w2"></div> - <div class="item h5"></div> - <div class="item w3"></div> - <div class="item"></div> - <div class="item h4"></div> - <div class="item"></div> - <div class="item w2 h5"></div> - <div class="item w2"></div> - <div class="item h3"></div> - <div class="item w3"></div> - <div class="item"></div> - </div> - - <div id="gutter1" class="container"> - <div class="item"></div> - <div class="item h4"></div> - <div class="item w2 h2"></div> - <div class="item w2"></div> - <div class="item h3"></div> - <div class="item w3"></div> - <div class="item"></div> - <div class="item h4"></div> - <div class="item"></div> - <div class="item w2 h4"></div> - <div class="item w2"></div> - <div class="item h5"></div> - <div class="item w3"></div> - <div class="item"></div> - <div class="item h4"></div> - <div class="item"></div> - <div class="item w2 h5"></div> - <div class="item w2"></div> - <div class="item h3"></div> - <div class="item w3"></div> - <div class="item"></div> - </div> - - <div id="gutter2" class="container"> - <div class="gutter-sizer"></div> - <div class="item"></div> - <div class="item h4"></div> - <div class="item w2 h2"></div> - <div class="item w2"></div> - <div class="item h3"></div> - <div class="item w3"></div> - <div class="item"></div> - <div class="item h4"></div> - <div class="item"></div> - <div class="item w2 h4"></div> - <div class="item w2"></div> - <div class="item h5"></div> - <div class="item w3"></div> - <div class="item"></div> - <div class="item h4"></div> - <div class="item"></div> - <div class="item w2 h5"></div> - <div class="item w2"></div> - <div class="item h3"></div> - <div class="item w3"></div> - <div class="item"></div> - </div> - -<script src="../bower_components/eventEmitter/EventEmitter.js"></script> -<script src="../bower_components/eventie/eventie.js"></script> -<script src="../bower_components/doc-ready/doc-ready.js"></script> -<script src="../bower_components/get-style-property/get-style-property.js"></script> -<script src="../bower_components/get-size/get-size.js"></script> -<script src="../bower_components/jquery-bridget/jquery.bridget.js"></script> -<script src="../bower_components/matches-selector/matches-selector.js"></script> -<script src="../bower_components/fizzy-ui-utils/utils.js"></script> -<script src="../bower_components/outlayer/item.js"></script> -<script src="../bower_components/outlayer/outlayer.js"></script> - -<script src="../js/layout-mode.js"></script> -<script src="../js/item.js"></script> -<script src="../js/isotope.js"></script> -<script src="../js/layout-modes/fit-rows.js"></script> - -<script> -docReady( function() { - var container = document.querySelector('#basic'); - var iso = window.iso = new Isotope( container, { - layoutMode: 'fitRows' - }); - - // gutter with explicit value - new Isotope( '#gutter1', { - layoutMode: 'fitRows', - fitRows: { - gutter: 20 - } - }); - - // gutter with element sizing - new Isotope( '#gutter2', { - itemSelector: '.item', - layoutMode: 'fitRows', - fitRows: { - gutter: '.gutter-sizer' - } - }); - -}); -</script> - -</body> -</html> diff --git a/profiles/wcm_base/libraries/jquery.isotope/sandbox/horizontal-layout-modes.html b/profiles/wcm_base/libraries/jquery.isotope/sandbox/horizontal-layout-modes.html deleted file mode 100644 index 26020c77d9dd5a042e5275efc06232a290f321fe..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/libraries/jquery.isotope/sandbox/horizontal-layout-modes.html +++ /dev/null @@ -1,218 +0,0 @@ -<!doctype html> -<html> -<head> - <meta charset="utf-8"> - - <title>horizontal layout modes</title> - - <link rel="stylesheet" href="sandbox.css" /> - <style> - body, html { - height: 100%; - } - #container { - position: relative; - height: 70%; - margin-bottom: 20px; - } - </style> -</head> -<body> - - <h1>horizontal layout modes</h1> - -<div id="options"> - <h2>Filter</h2> - <div class="option-set" data-isotope-key="filter"> - <button data-isotope-value="*">show all</button> - <button data-isotope-value=".metal">metal</button> - <button data-isotope-value=".post-transition">post-transition</button> - </div> - <h2>Sort</h2> - <div class="option-set" data-isotope-key="sortBy"> - <button data-isotope-value="original-order">original-order</button> - <button data-isotope-value="number">number</button> - <button data-isotope-value="name">name</button> - <button data-isotope-value="symbol">symbol</button> - <button data-isotope-value="weight">weight</button> - <button data-isotope-value="category">category</button> - </div> -</div> - -<div id="container"> - - <div class="element transition metal " data-symbol="Hg" data-category="transition"> - <p class="number">80</p> - <h3 class="symbol">Hg</h3> - <h2 class="name">Mercury</h2> - <p class="weight">200.59</p> - </div> - - <div class="element metalloid " data-symbol="Te" data-category="metalloid"> - <p class="number">52</p> - <h3 class="symbol">Te</h3> - <h2 class="name">Tellurium</h2> - <p class="weight">127.6</p> - </div> - - <div class="element post-transition metal " data-symbol="Bi" data-category="post-transition"> - <p class="number">83</p> - <h3 class="symbol">Bi</h3> - <h2 class="name">Bismuth</h2> - <p class="weight">208.9804</p> - </div> - - <div class="element transition metal " data-symbol="Cd" data-category="transition"> - <p class="number">48</p> - <h3 class="symbol">Cd</h3> - <h2 class="name">Cadmium</h2> - <p class="weight">112.411</p> - </div> - - <div class="element alkaline-earth metal " data-symbol="Ca" data-category="alkaline-earth"> - <p class="number">20</p> - <h3 class="symbol">Ca</h3> - <h2 class="name">Calcium</h2> - <p class="weight">40.078</p> - </div> - - <div class="element transition metal " data-symbol="Re" data-category="transition"> - <p class="number">75</p> - <h3 class="symbol">Re</h3> - <h2 class="name">Rhenium</h2> - <p class="weight">186.207</p> - </div> - - <div class="element post-transition metal " data-symbol="Tl" data-category="post-transition"> - <p class="number">81</p> - <h3 class="symbol">Tl</h3> - <h2 class="name">Thallium</h2> - <p class="weight">204.3833</p> - </div> - - <div class="element metalloid " data-symbol="Sb" data-category="metalloid"> - <p class="number">51</p> - <h3 class="symbol">Sb</h3> - <h2 class="name">Antimony</h2> - <p class="weight">121.76</p> - </div> - - <div class="element transition metal " data-symbol="Co" data-category="transition"> - <p class="number">27</p> - <h3 class="symbol">Co</h3> - <h2 class="name">Cobalt</h2> - <p class="weight">58.933195</p> - </div> - - <div class="element lanthanoid metal inner-transition " data-symbol="Lu" data-category="lanthanoid"> - <p class="number">71</p> - <h3 class="symbol">Lu</h3> - <h2 class="name">Lutetium</h2> - <p class="weight">174.9668</p> - </div> - - <div class="element noble-gas nonmetal " data-symbol="Ar" data-category="noble-gas"> - <p class="number">18</p> - <h3 class="symbol">Ar</h3> - <h2 class="name">Argon</h2> - <p class="weight">39.948</p> - </div> - - <div class="element alkali metal " data-symbol="Rb" data-category="alkali"> - <p class="number">37</p> - <h3 class="symbol">Rb</h3> - <h2 class="name">Rubidium</h2> - <p class="weight">85.4678</p> - </div> - - <div class="element other nonmetal " data-symbol="N" data-category="other"> - <p class="number">7</p> - <h3 class="symbol">N</h3> - <h2 class="name">Nitrogen</h2> - <p class="weight">14.0067</p> - </div> - - <div class="element actinoid metal inner-transition " data-symbol="Np" data-category="actinoid"> - <p class="number">93</p> - <h3 class="symbol">Np</h3> - <h2 class="name">Neptunium</h2> - <p class="weight">(237)</p> - </div> - - <div class="element actinoid metal inner-transition " data-symbol="Ac" data-category="actinoid"> - <p class="number">89</p> - <h3 class="symbol">Ac</h3> - <h2 class="name">Actinium</h2> - <p class="weight">(227)</p> - </div> -</div> - -<script src="../bower_components/eventEmitter/EventEmitter.js"></script> -<script src="../bower_components/eventie/eventie.js"></script> -<script src="../bower_components/doc-ready/doc-ready.js"></script> -<script src="../bower_components/get-style-property/get-style-property.js"></script> -<script src="../bower_components/get-size/get-size.js"></script> -<script src="../bower_components/jquery-bridget/jquery.bridget.js"></script> -<script src="../bower_components/matches-selector/matches-selector.js"></script> -<script src="../bower_components/fizzy-ui-utils/utils.js"></script> -<script src="../bower_components/outlayer/item.js"></script> -<script src="../bower_components/outlayer/outlayer.js"></script> - -<script src="../js/item.js"></script> -<script src="../js/layout-mode.js"></script> -<script src="../js/isotope.js"></script> - -<script src="../bower_components/isotope-fit-columns/fit-columns.js"></script> -<script src="../bower_components/isotope-cells-by-column/cells-by-column.js"></script> -<script src="../bower_components/isotope-horizontal/horizontal.js"></script> - -<script> -docReady( function() { - var container = document.querySelector('#container'); - var iso = window.iso = new Isotope( container, { - layoutMode: 'fitColumns', - transitionDuration: '0.8s', - horizontal: { - verticalAlignment: 0.5 - }, - cellsByColumn: { - columnWidth: 130, - rowHeight: 140, - }, - getSortData: { - number: '.number parseInt', - symbol: '.symbol', - name: '.name', - category: '[data-category]', - weight: function( itemElem ) { - // remove parenthesis - return parseFloat( getText( itemElem.querySelector('.weight') ).replace( /[\(\)]/g, '') ); - } - } - }); - - var options = document.querySelector('#options'); - - eventie.bind( options, 'click', function( event ) { - if ( !matchesSelector( event.target, 'button' ) ) { - return; - } - - // var opt = {}; - var key = event.target.parentNode.getAttribute('data-isotope-key'); - var value = event.target.getAttribute('data-isotope-value'); - console.log( key, value ); - iso.options[ key ] = value; - iso.arrange(); - }); - -}); - -function getText( elem ) { - return elem.textContent || elem.innerText; -} - -</script> - -</body> -</html> diff --git a/profiles/wcm_base/libraries/jquery.isotope/sandbox/insert.html b/profiles/wcm_base/libraries/jquery.isotope/sandbox/insert.html deleted file mode 100644 index f814e039e0dcbb30d2d797cfe5dbfdcc4747c878..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/libraries/jquery.isotope/sandbox/insert.html +++ /dev/null @@ -1,118 +0,0 @@ -<!doctype html> -<html> -<head> - <meta charset="utf-8"> - - <title>insert</title> - - <link rel="stylesheet" href="sandbox.css" /> - -</head> -<body> - -<h1>insert</h1> - -<p> - <button id="prepend">Prepend</button> - <button id="insert">Insert</button> - <button id="append">Append</button> -</p> - -<div id="container"> - <div class="item"><b>49</b></div> - <div class="item"><b>35</b></div> - <div class="item"><b>60</b></div> - <div class="item"><b>29</b></div> - <div class="item"><b>78</b></div> - <div class="item"><b>92</b></div> - <div class="item"><b>10</b></div> - <div class="item"><b>55</b></div> -</div> - -<script src="../bower_components/eventEmitter/EventEmitter.js"></script> -<script src="../bower_components/eventie/eventie.js"></script> -<script src="../bower_components/doc-ready/doc-ready.js"></script> -<script src="../bower_components/get-style-property/get-style-property.js"></script> -<script src="../bower_components/get-size/get-size.js"></script> -<script src="../bower_components/jquery-bridget/jquery.bridget.js"></script> -<script src="../bower_components/matches-selector/matches-selector.js"></script> -<script src="../bower_components/fizzy-ui-utils/utils.js"></script> -<script src="../bower_components/outlayer/item.js"></script> -<script src="../bower_components/outlayer/outlayer.js"></script> -<script src="../bower_components/masonry/masonry.js"></script> - -<script src="../js/item.js"></script> -<script src="../js/layout-mode.js"></script> -<script src="../js/isotope.js"></script> -<script src="../js/layout-modes/fit-rows.js"></script> -<script src="../js/layout-modes/masonry.js"></script> - -<script> - -docReady( function() { - - var container = document.querySelector('#container'); - var iso = new Isotope( container, { - layoutMode: 'masonry', - transitionDuration: '0.8s', - getSortData: { - b: 'b parseInt' - }, - sortBy: 'b', - // filter b greater than 40 - filter: function( elem ) { - return parseInt( getText( elem.querySelector('b') ), 10 ) > 40 - } - }); - - eventie.bind( document.querySelector('#prepend'), 'click', function() { - // prepend 3 new items - iso.prepended( [ prependItem(), prependItem(), prependItem() ] ); - }); - - eventie.bind( document.querySelector('#insert'), 'click', function() { - // insert 3 new items - iso.insert( [ getItem(), getItem(), getItem() ] ); - }); - - eventie.bind( document.querySelector('#append'), 'click', function() { - // append 3 new items - iso.appended( [ appendItem(), appendItem(), appendItem() ] ); - }); - - function getItem() { - var item = document.createElement('div'); - item.className = 'item'; - var num = Math.floor( Math.random() * 100 ); - item.innerHTML = '<b>' + num + '</b>'; - return item; - } - - function prependItem() { - var item = getItem(); - container.insertBefore( item, container.firstChild ); - return item; - } - - function appendItem() { - var item = getItem(); - container.appendChild( item ); - return item; - } - -}); - -var docElem = document.documentElement; - -var getText = docElem.textContent ? - function( elem ) { - return elem.textContent; - } : - function( elem ) { - return elem.innerText; - }; - -</script> - -</body> -</html> diff --git a/profiles/wcm_base/libraries/jquery.isotope/sandbox/js/require-js.js b/profiles/wcm_base/libraries/jquery.isotope/sandbox/js/require-js.js deleted file mode 100644 index 68d2918fe824f338d767dceb9b4a269e5d047939..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/libraries/jquery.isotope/sandbox/js/require-js.js +++ /dev/null @@ -1,85 +0,0 @@ -/*global requirejs: false*/ - -// -------------------------- bower -------------------------- // - -/* -// with bower components -requirejs.config({ - baseUrl: '../bower_components' -}); - -requirejs( [ '../js/isotope' ], function( Isotope ) { - new Isotope( '#basic', { - masonry: { - columnWidth: 60 - } - }); -}); -// */ - -// -------------------------- pkgd -------------------------- // - -/* -requirejs( [ '../dist/isotope.pkgd.js' ], function( Isotope ) { - new Isotope( '#basic', { - layoutMode: 'masonry', - masonry: { - columnWidth: 60 - } - }); -}); -// */ - -// -------------------------- bower & jQuery -------------------------- // - -/* -requirejs.config({ - baseUrl: '../bower_components', - paths: { - jquery: 'jquery/dist/jquery' - } -}) - -requirejs( [ - 'jquery', - 'isotope/js/isotope', - 'jquery-bridget/jquery.bridget' - ], - function( $, Isotope ) { - $.bridget( 'isotope', Isotope ); - $('#basic').isotope({ - masonry: { - columnWidth: 60 - } - }); -}); - -// */ - -// -------------------------- pkgd & jQuery -------------------------- // - -// /* -requirejs.config({ - paths: { - jquery: '../../bower_components/jquery/dist/jquery' - } -}); - -requirejs( [ 'require', 'jquery', '../dist/isotope.pkgd.js' ], - function( require, $, Isotope ) { - require( [ - 'jquery-bridget/jquery.bridget' - ], - function() { - $.bridget( 'isotope', Isotope ); - $('#basic').isotope({ - masonry: { - columnWidth: 60 - } - }); - } - ); -}); - -// */ - diff --git a/profiles/wcm_base/libraries/jquery.isotope/sandbox/masonry-horizontal.html b/profiles/wcm_base/libraries/jquery.isotope/sandbox/masonry-horizontal.html deleted file mode 100644 index ffa0052b6a4f0e79bd82a70b07dde750f43fb8c5..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/libraries/jquery.isotope/sandbox/masonry-horizontal.html +++ /dev/null @@ -1,250 +0,0 @@ -<!doctype html> -<html> -<head> - <meta charset="utf-8"> - - <title>horizontal layout modes</title> - - <link rel="stylesheet" href="sandbox.css" /> - <style> - body, html { - height: 100%; - } - #container { - position: relative; - height: 70%; - margin-bottom: 20px; - } - .element.alkali { width: 170px; height: 190px; } - .element.alkaline-earth {} - .element.lanthanoid { height: 190px; } - .element.actinoid { width: 170px; } - .element.transition { width: 220px; } - - .stamp { - background: #DDD; - border: 2px dotted; - position: absolute; - } - - .stamp1 { - height: 30%; - width: 80px; - left: 30px; - top: 10%; - } - - .stamp2 { - height: 200px; - width: 40px; - left: 15px; - top: 100px; - } - - </style> -</head> -<body> - - <h1>horizontal layout modes</h1> - -<div id="options"> - <h2>Filter</h2> - <div class="option-set" data-isotope-key="filter"> - <button data-isotope-value="*">show all</button> - <button data-isotope-value=".metal">metal</button> - <button data-isotope-value=".post-transition">post-transition</button> - </div> - <h2>Sort</h2> - <div class="option-set" data-isotope-key="sortBy"> - <button data-isotope-value="original-order">original-order</button> - <button data-isotope-value="number">number</button> - <button data-isotope-value="name">name</button> - <button data-isotope-value="symbol">symbol</button> - <button data-isotope-value="weight">weight</button> - <button data-isotope-value="category">category</button> - </div> -</div> - -<div id="container"> - <div class="stamp stamp1"></div> - <div class="stamp stamp2"></div> - - - <div class="element transition metal " data-symbol="Hg" data-category="transition"> - <p class="number">80</p> - <h3 class="symbol">Hg</h3> - <h2 class="name">Mercury</h2> - <p class="weight">200.59</p> - </div> - - <div class="element metalloid " data-symbol="Te" data-category="metalloid"> - <p class="number">52</p> - <h3 class="symbol">Te</h3> - <h2 class="name">Tellurium</h2> - <p class="weight">127.6</p> - </div> - - <div class="element post-transition metal " data-symbol="Bi" data-category="post-transition"> - <p class="number">83</p> - <h3 class="symbol">Bi</h3> - <h2 class="name">Bismuth</h2> - <p class="weight">208.9804</p> - </div> - - <div class="element transition metal " data-symbol="Cd" data-category="transition"> - <p class="number">48</p> - <h3 class="symbol">Cd</h3> - <h2 class="name">Cadmium</h2> - <p class="weight">112.411</p> - </div> - - <div class="element alkaline-earth metal " data-symbol="Ca" data-category="alkaline-earth"> - <p class="number">20</p> - <h3 class="symbol">Ca</h3> - <h2 class="name">Calcium</h2> - <p class="weight">40.078</p> - </div> - - <div class="element transition metal " data-symbol="Re" data-category="transition"> - <p class="number">75</p> - <h3 class="symbol">Re</h3> - <h2 class="name">Rhenium</h2> - <p class="weight">186.207</p> - </div> - - <div class="element post-transition metal " data-symbol="Tl" data-category="post-transition"> - <p class="number">81</p> - <h3 class="symbol">Tl</h3> - <h2 class="name">Thallium</h2> - <p class="weight">204.3833</p> - </div> - - <div class="element metalloid " data-symbol="Sb" data-category="metalloid"> - <p class="number">51</p> - <h3 class="symbol">Sb</h3> - <h2 class="name">Antimony</h2> - <p class="weight">121.76</p> - </div> - - <div class="element transition metal " data-symbol="Co" data-category="transition"> - <p class="number">27</p> - <h3 class="symbol">Co</h3> - <h2 class="name">Cobalt</h2> - <p class="weight">58.933195</p> - </div> - - <div class="element lanthanoid metal inner-transition " data-symbol="Lu" data-category="lanthanoid"> - <p class="number">71</p> - <h3 class="symbol">Lu</h3> - <h2 class="name">Lutetium</h2> - <p class="weight">174.9668</p> - </div> - - <div class="element noble-gas nonmetal " data-symbol="Ar" data-category="noble-gas"> - <p class="number">18</p> - <h3 class="symbol">Ar</h3> - <h2 class="name">Argon</h2> - <p class="weight">39.948</p> - </div> - - <div class="element alkali metal " data-symbol="Rb" data-category="alkali"> - <p class="number">37</p> - <h3 class="symbol">Rb</h3> - <h2 class="name">Rubidium</h2> - <p class="weight">85.4678</p> - </div> - - <div class="element other nonmetal " data-symbol="N" data-category="other"> - <p class="number">7</p> - <h3 class="symbol">N</h3> - <h2 class="name">Nitrogen</h2> - <p class="weight">14.0067</p> - </div> - - <div class="element actinoid metal inner-transition " data-symbol="Np" data-category="actinoid"> - <p class="number">93</p> - <h3 class="symbol">Np</h3> - <h2 class="name">Neptunium</h2> - <p class="weight">(237)</p> - </div> - - <div class="element actinoid metal inner-transition " data-symbol="Ac" data-category="actinoid"> - <p class="number">89</p> - <h3 class="symbol">Ac</h3> - <h2 class="name">Actinium</h2> - <p class="weight">(227)</p> - </div> -</div> - -<script src="../bower_components/eventEmitter/EventEmitter.js"></script> -<script src="../bower_components/eventie/eventie.js"></script> -<script src="../bower_components/doc-ready/doc-ready.js"></script> -<script src="../bower_components/get-style-property/get-style-property.js"></script> -<script src="../bower_components/get-size/get-size.js"></script> -<script src="../bower_components/jquery-bridget/jquery.bridget.js"></script> -<script src="../bower_components/matches-selector/matches-selector.js"></script> -<script src="../bower_components/fizzy-ui-utils/utils.js"></script> -<script src="../bower_components/outlayer/item.js"></script> -<script src="../bower_components/outlayer/outlayer.js"></script> - -<script src="../js/item.js"></script> -<script src="../js/layout-mode.js"></script> -<script src="../js/isotope.js"></script> - -<script src="../bower_components/isotope-fit-columns/fit-columns.js"></script> -<script src="../bower_components/isotope-cells-by-column/cells-by-column.js"></script> -<script src="../bower_components/isotope-horizontal/horizontal.js"></script> -<script src="../bower_components/isotope-masonry-horizontal/masonry-horizontal.js"></script> - -<script> -docReady( function() { - var container = document.querySelector('#container'); - var iso = window.iso = new Isotope( container, { - itemSelector: '.element', - stamp: '.stamp', - layoutMode: 'masonryHorizontal', - transitionDuration: '0.8s', - masonryHorizontal: { - rowHeight: 100 - }, - cellsByColumn: { - columnWidth: 130, - rowHeight: 140, - }, - getSortData: { - number: '.number parseInt', - symbol: '.symbol', - name: '.name', - category: '[data-category]', - weight: function( itemElem ) { - // remove parenthesis - return parseFloat( getText( itemElem.querySelector('.weight') ).replace( /[\(\)]/g, '') ); - } - } - }); - - var options = document.querySelector('#options'); - - eventie.bind( options, 'click', function( event ) { - if ( !matchesSelector( event.target, 'button' ) ) { - return; - } - - // var opt = {}; - var key = event.target.parentNode.getAttribute('data-isotope-key'); - var value = event.target.getAttribute('data-isotope-value'); - console.log( key, value ); - iso.options[ key ] = value; - iso.arrange(); - }); - -}); - -function getText( elem ) { - return elem.textContent || elem.innerText; -} - -</script> - -</body> -</html> diff --git a/profiles/wcm_base/libraries/jquery.isotope/sandbox/masonry.html b/profiles/wcm_base/libraries/jquery.isotope/sandbox/masonry.html deleted file mode 100644 index 6ba856e1a636e59e5e3c91b5428fabd5a4c1b533..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/libraries/jquery.isotope/sandbox/masonry.html +++ /dev/null @@ -1,212 +0,0 @@ -<!doctype html> -<html> -<head> - <meta charset="utf-8"> - - <title>masonry</title> - - <link rel="stylesheet" href="sandbox.css" /> - <style> - .element.alkali { width: 170px; height: 120px; } - .element.alkaline-earth {} - .element.lanthanoid { height: 170px; } - .element.actinoid { width: 170px; } - .element.transition { height: 220px; } -/* .element.post-transition { background: #0FF; background: hsl( 180, 100%, 50%); } - .element.metalloid { background: #08F; background: hsl( 216, 100%, 50%); } - .element.other.nonmetal { background: #00F; background: hsl( 252, 100%, 50%); } - .element.halogen { background: #F0F; background: hsl( 288, 100%, 50%); } - .element.noble-gas { background: #F08; background: hsl( 324, 100%, 50%); }*/ - </style> - -</head> -<body> - - <h1>sorting</h1> - -<div id="options"> - <h2>Sort</h2> - <button data-sort-by="original-order">original-order</a></li> - <button data-sort-by="number">number</button> - <button data-sort-by="name">name</button> - <button data-sort-by="symbol">symbol</button> - <button data-sort-by="weight">weight</button> - <button data-sort-by="category">category</button> -</div> - -<div id="container"> - - <div class="stamp stamp1"></div> - <div class="stamp stamp2"></div> - - <div class="element transition metal " data-symbol="Hg" data-category="transition"> - <p class="number">80</p> - <h3 class="symbol">Hg</h3> - <h2 class="name">Mercury</h2> - <p class="weight">200.59</p> - </div> - - <div class="element metalloid " data-symbol="Te" data-category="metalloid"> - <p class="number">52</p> - <h3 class="symbol">Te</h3> - <h2 class="name">Tellurium</h2> - <p class="weight">127.6</p> - </div> - - <div class="element post-transition metal " data-symbol="Bi" data-category="post-transition"> - <p class="number">83</p> - <h3 class="symbol">Bi</h3> - <h2 class="name">Bismuth</h2> - <p class="weight">208.9804</p> - </div> - - <div class="element transition metal " data-symbol="Cd" data-category="transition"> - <p class="number">48</p> - <h3 class="symbol">Cd</h3> - <h2 class="name">Cadmium</h2> - <p class="weight">112.411</p> - </div> - - <div class="element alkaline-earth metal " data-symbol="Ca" data-category="alkaline-earth"> - <p class="number">20</p> - <h3 class="symbol">Ca</h3> - <h2 class="name">Calcium</h2> - <p class="weight">40.078</p> - </div> - - <div class="element transition metal " data-symbol="Re" data-category="transition"> - <p class="number">75</p> - <h3 class="symbol">Re</h3> - <h2 class="name">Rhenium</h2> - <p class="weight">186.207</p> - </div> - - <div class="element post-transition metal " data-symbol="Tl" data-category="post-transition"> - <p class="number">81</p> - <h3 class="symbol">Tl</h3> - <h2 class="name">Thallium</h2> - <p class="weight">204.3833</p> - </div> - - <div class="element metalloid " data-symbol="Sb" data-category="metalloid"> - <p class="number">51</p> - <h3 class="symbol">Sb</h3> - <h2 class="name">Antimony</h2> - <p class="weight">121.76</p> - </div> - - <div class="element transition metal " data-symbol="Co" data-category="transition"> - <p class="number">27</p> - <h3 class="symbol">Co</h3> - <h2 class="name">Cobalt</h2> - <p class="weight">58.933195</p> - </div> - - <div class="element lanthanoid metal inner-transition " data-symbol="Lu" data-category="lanthanoid"> - <p class="number">71</p> - <h3 class="symbol">Lu</h3> - <h2 class="name">Lutetium</h2> - <p class="weight">174.9668</p> - </div> - - <div class="element noble-gas nonmetal " data-symbol="Ar" data-category="noble-gas"> - <p class="number">18</p> - <h3 class="symbol">Ar</h3> - <h2 class="name">Argon</h2> - <p class="weight">39.948</p> - </div> - - <div class="element alkali metal " data-symbol="Rb" data-category="alkali"> - <p class="number">37</p> - <h3 class="symbol">Rb</h3> - <h2 class="name">Rubidium</h2> - <p class="weight">85.4678</p> - </div> - - <div class="element other nonmetal " data-symbol="N" data-category="other"> - <p class="number">7</p> - <h3 class="symbol">N</h3> - <h2 class="name">Nitrogen</h2> - <p class="weight">14.0067</p> - </div> - - <div class="element actinoid metal inner-transition " data-symbol="Np" data-category="actinoid"> - <p class="number">93</p> - <h3 class="symbol">Np</h3> - <h2 class="name">Neptunium</h2> - <p class="weight">(237)</p> - </div> - - <div class="element actinoid metal inner-transition " data-symbol="Ac" data-category="actinoid"> - <p class="number">89</p> - <h3 class="symbol">Ac</h3> - <h2 class="name">Actinium</h2> - <p class="weight">(227)</p> - </div> -</div> - -<script src="../bower_components/eventEmitter/EventEmitter.js"></script> -<script src="../bower_components/eventie/eventie.js"></script> -<script src="../bower_components/doc-ready/doc-ready.js"></script> -<script src="../bower_components/get-style-property/get-style-property.js"></script> -<script src="../bower_components/get-size/get-size.js"></script> -<script src="../bower_components/jquery-bridget/jquery.bridget.js"></script> -<script src="../bower_components/matches-selector/matches-selector.js"></script> -<script src="../bower_components/fizzy-ui-utils/utils.js"></script> -<script src="../bower_components/outlayer/item.js"></script> -<script src="../bower_components/outlayer/outlayer.js"></script> -<script src="../bower_components/masonry/masonry.js"></script> - -<script src="../js/item.js"></script> -<script src="../js/layout-mode.js"></script> -<script src="../js/isotope.js"></script> -<script src="../js/layout-modes/masonry.js"></script> -<script src="../js/layout-modes/fit-rows.js"></script> - -<script> -docReady( function() { - var container = document.querySelector('#container'); - var iso = window.iso = new Isotope( container, { - // sortBy: 'symbol', - // filter: '.metal', - layoutMode: 'masonry', - masonry: { - columnWidth: 90 - }, - itemSelector: '.element', - stamp: '.stamp', - getSortData: { - - number: '.number parseInt', - symbol: '.symbol', - name: '.name', - category: '[data-category]', - - weight: function( itemElem ) { - // remove parenthesis - return parseFloat( getText( itemElem.querySelector('.weight') ).replace( /[\(\)]/g, '') ); - } - - } - }); - - var options = document.querySelector('#options'); - - eventie.bind( options, 'click', function( event ) { - if ( !matchesSelector( event.target, 'button' ) ) { - return; - } - var sortBy = event.target.getAttribute('data-sort-by'); - iso.arrange({ sortBy: sortBy }); - }); - -}); - -function getText( elem ) { - return elem.textContent || elem.innerText; -} - -</script> - -</body> -</html> diff --git a/profiles/wcm_base/libraries/jquery.isotope/sandbox/require-js.html b/profiles/wcm_base/libraries/jquery.isotope/sandbox/require-js.html deleted file mode 100644 index 1f26474bd629c2fd6462d66a09de5775e3574a9d..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/libraries/jquery.isotope/sandbox/require-js.html +++ /dev/null @@ -1,41 +0,0 @@ -<!doctype html> -<html> -<head> - <meta charset="utf-8"> - - <title>require js</title> - - <link rel="stylesheet" href="sandbox.css" /> - <script data-main="js/require-js" src="//cdnjs.cloudflare.com/ajax/libs/require.js/2.1.10/require.js"></script> - -</head> -<body> - - <h1>require js</h1> - - <div id="basic" class="container"> - <div class="item"></div> - <div class="item h4"></div> - <div class="item w2 h2"></div> - <div class="item w2"></div> - <div class="item h3"></div> - <div class="item w3"></div> - <div class="item"></div> - <div class="item h4"></div> - <div class="item"></div> - <div class="item w2 h4"></div> - <div class="item w2"></div> - <div class="item h5"></div> - <div class="item w3"></div> - <div class="item"></div> - <div class="item h4"></div> - <div class="item"></div> - <div class="item w2 h5"></div> - <div class="item w2"></div> - <div class="item h3"></div> - <div class="item w3"></div> - <div class="item"></div> - </div> - -</body> -</html> diff --git a/profiles/wcm_base/libraries/jquery.isotope/sandbox/right-to-left.html b/profiles/wcm_base/libraries/jquery.isotope/sandbox/right-to-left.html deleted file mode 100644 index 6dcb6797bf746c13221a56fbb47e99426ae20541..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/libraries/jquery.isotope/sandbox/right-to-left.html +++ /dev/null @@ -1,128 +0,0 @@ -<!doctype html> -<html> -<head> - <meta charset="utf-8"> - - <title>right to left</title> - - <link rel="stylesheet" href="sandbox.css" /> - - <style> - #stamped .stamp1 { - width: 30%; - height: 100px; - left: 30%; - top: 20px; - margin: 10px; - } - - #stamped .stamp2 { - width: 200px; - height: 50px; - left: 20px; - top: 50px; - } - </style> - -</head> -<body> - - <h1>right to left</h1> - - <div id="basic" class="container"> - <div class="item"></div> - <div class="item h4"></div> - <div class="item w2 h2"></div> - <div class="item w2"></div> - <div class="item h3"></div> - <div class="item w3"></div> - <div class="item"></div> - <div class="item h4"></div> - <div class="item"></div> - <div class="item w2 h4"></div> - <div class="item w2"></div> - <div class="item h5"></div> - <div class="item w3"></div> - <div class="item"></div> - <div class="item h4"></div> - <div class="item"></div> - <div class="item w2 h5"></div> - <div class="item w2"></div> - <div class="item h3"></div> - <div class="item w3"></div> - <div class="item"></div> - </div> - - <div id="stamped" class="container"> - <div class="stamp stamp1"></div> - <div class="stamp stamp2"></div> - <div class="item"></div> - <div class="item h4"></div> - <div class="item w2 h2"></div> - <div class="item w2"></div> - <div class="item h3"></div> - <div class="item w3"></div> - <div class="item"></div> - <div class="item h4"></div> - <div class="item"></div> - <div class="item w2 h4"></div> - <div class="item w2"></div> - <div class="item h5"></div> - <div class="item w3"></div> - <div class="item"></div> - <div class="item h4"></div> - <div class="item"></div> - <div class="item w2 h5"></div> - <div class="item w2"></div> - <div class="item h3"></div> - <div class="item w3"></div> - <div class="item"></div> - </div> - -<script src="../bower_components/eventEmitter/EventEmitter.js"></script> -<script src="../bower_components/eventie/eventie.js"></script> -<script src="../bower_components/doc-ready/doc-ready.js"></script> -<script src="../bower_components/get-style-property/get-style-property.js"></script> -<script src="../bower_components/get-size/get-size.js"></script> -<script src="../bower_components/jquery-bridget/jquery.bridget.js"></script> -<script src="../bower_components/matches-selector/matches-selector.js"></script> -<script src="../bower_components/fizzy-ui-utils/utils.js"></script> -<script src="../bower_components/outlayer/item.js"></script> -<script src="../bower_components/outlayer/outlayer.js"></script> -<script src="../bower_components/masonry/masonry.js"></script> - -<script src="../js/item.js"></script> -<script src="../js/layout-mode.js"></script> -<script src="../js/isotope.js"></script> -<script src="../js/layout-modes/masonry.js"></script> - -<script> -docReady( function() { - ( function() { - var container = document.querySelector('#basic'); - var iso = new Isotope( container, { - isOriginLeft: false, - masonry: { - columnWidth: 60 - } - }); - })(); - - ( function() { - var container = document.querySelector('#stamped'); - var msnry = new Isotope( container, { - itemSelector: '.item', - isOriginLeft: false, - gutter: 10, - stamp: '.stamp', - masonry: { - columnWidth: 60, - } - }); - })(); - -}); -</script> - -</body> -</html> diff --git a/profiles/wcm_base/libraries/jquery.isotope/sandbox/sandbox.css b/profiles/wcm_base/libraries/jquery.isotope/sandbox/sandbox.css deleted file mode 100644 index dd5fe3829dad3f9488cc9a34e7292091cc34bff4..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/libraries/jquery.isotope/sandbox/sandbox.css +++ /dev/null @@ -1,104 +0,0 @@ -* { - box-sizing: border-box; -} - -#container, -.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.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; -} - - -/* element */ - -.element { - width: 80px; - height: 90px; - margin: 5px; - background: #DDD; - float: left; - position: relative; - padding: 5px; -} - -.element > * { - margin: 0; -} - -.element .number { - right: 5px; - top: 5px; - position: absolute; -} - -.element .symbol { - font-size: 30px; - left: 5px; - top: 5px; - color: white; -} - -.element .name { - font-size: 14px; -} - -.element .weight { - font-size: 14px; -} - -.element.alkali { background: #F00; background: hsl( 0, 100%, 50%); } -.element.alkaline-earth { background: #F80; background: hsl( 36, 100%, 50%); } -.element.lanthanoid { background: #FF0; background: hsl( 72, 100%, 50%); } -.element.actinoid { background: #0F0; background: hsl( 108, 100%, 50%); } -.element.transition { background: #0F8; background: hsl( 144, 100%, 50%); } -.element.post-transition { background: #0FF; background: hsl( 180, 100%, 50%); } -.element.metalloid { background: #08F; background: hsl( 216, 100%, 50%); } -.element.other.nonmetal { background: #00F; background: hsl( 252, 100%, 50%); } -.element.halogen { background: #F0F; background: hsl( 288, 100%, 50%); } -.element.noble-gas { background: #F08; background: hsl( 324, 100%, 50%); } - -/* stamps */ - -.stamp { - position: absolute; - background: hsla(0, 100%, 50%, 0.8); - border: 1px solid; -} - -.stamp1 { - left: 10%; - top: 20px; - width: 20%; - height: 200px; -} - -.stamp2 { - right: 200px; - top: 100px; - width: 100px; - height: 100px; -} diff --git a/profiles/wcm_base/libraries/jquery.isotope/sandbox/sorting.html b/profiles/wcm_base/libraries/jquery.isotope/sandbox/sorting.html deleted file mode 100644 index af7490e7df08cace1d3b422074b6d3944aa5ee24..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/libraries/jquery.isotope/sandbox/sorting.html +++ /dev/null @@ -1,211 +0,0 @@ -<!doctype html> -<html> -<head> - <meta charset="utf-8"> - - <title>sorting</title> - - <link rel="stylesheet" href="sandbox.css" /> - -</head> -<body> - - <h1>sorting</h1> - -<div id="options"> - <h2>Sort</h2> - <ul class="option-set"> - <li><a href="#original-order">original-order</a></li> - <li><a href="#number">number</a></li> - <li><a href="#name">name</a></li> - <li><a href="#symbol">symbol</a></li> - <li><a href="#weight">weight</a></li> - <li><a href="#category">category</a></li> - </ul> -</div> - -<div id="container"> - - <div class="element transition metal " data-symbol="Hg" data-category="transition"> - <p class="number">80</p> - <h3 class="symbol">Hg</h3> - <h2 class="name">Mercury</h2> - <p class="weight">200.59</p> - </div> - - <div class="element metalloid " data-symbol="Te" data-category="metalloid"> - <p class="number">52</p> - <h3 class="symbol">Te</h3> - <h2 class="name">Tellurium</h2> - <p class="weight">127.6</p> - </div> - - <div class="element post-transition metal " data-symbol="Bi" data-category="post-transition"> - <p class="number">83</p> - <h3 class="symbol">Bi</h3> - <h2 class="name">Bismuth</h2> - <p class="weight">208.9804</p> - </div> - - <div class="element transition metal " data-symbol="Cd" data-category="transition"> - <p class="number">48</p> - <h3 class="symbol">Cd</h3> - <h2 class="name">Cadmium</h2> - <p class="weight">112.411</p> - </div> - - <div class="element alkaline-earth metal " data-symbol="Ca" data-category="alkaline-earth"> - <p class="number">20</p> - <h3 class="symbol">Ca</h3> - <h2 class="name">Calcium</h2> - <p class="weight">40.078</p> - </div> - - <div class="element transition metal " data-symbol="Re" data-category="transition"> - <p class="number">75</p> - <h3 class="symbol">Re</h3> - <h2 class="name">Rhenium</h2> - <p class="weight">186.207</p> - </div> - - <div class="element post-transition metal " data-symbol="Tl" data-category="post-transition"> - <p class="number">81</p> - <h3 class="symbol">Tl</h3> - <h2 class="name">Thallium</h2> - <p class="weight">204.3833</p> - </div> - - <div class="element metalloid " data-symbol="Sb" data-category="metalloid"> - <p class="number">51</p> - <h3 class="symbol">Sb</h3> - <h2 class="name">Antimony</h2> - <p class="weight">121.76</p> - </div> - - <div class="element transition metal " data-symbol="Co" data-category="transition"> - <p class="number">27</p> - <h3 class="symbol">Co</h3> - <h2 class="name">Cobalt</h2> - <p class="weight">58.933195</p> - </div> - - <div class="element lanthanoid metal inner-transition " data-symbol="Lu" data-category="lanthanoid"> - <p class="number">71</p> - <h3 class="symbol">Lu</h3> - <h2 class="name">Lutetium</h2> - <p class="weight">174.9668</p> - </div> - - <div class="element noble-gas nonmetal " data-symbol="Ar" data-category="noble-gas"> - <p class="number">18</p> - <h3 class="symbol">Ar</h3> - <h2 class="name">Argon</h2> - <p class="weight">39.948</p> - </div> - - <div class="element alkali metal " data-symbol="Rb" data-category="alkali"> - <p class="number">37</p> - <h3 class="symbol">Rb</h3> - <h2 class="name">Rubidium</h2> - <p class="weight">85.4678</p> - </div> - - <div class="element other nonmetal " data-symbol="N" data-category="other"> - <p class="number">7</p> - <h3 class="symbol">N</h3> - <h2 class="name">Nitrogen</h2> - <p class="weight">14.0067</p> - </div> - - <div class="element actinoid metal inner-transition " data-symbol="Np" data-category="actinoid"> - <p class="number">93</p> - <h3 class="symbol">Np</h3> - <h2 class="name">Neptunium</h2> - <p class="weight">(237)</p> - </div> - - <div class="element actinoid metal inner-transition " data-symbol="Ac" data-category="actinoid"> - <p class="number">89</p> - <h3 class="symbol">Ac</h3> - <h2 class="name">Actinium</h2> - <p class="weight">(227)</p> - </div> -</div> - -<script src="../bower_components/eventEmitter/EventEmitter.js"></script> -<script src="../bower_components/eventie/eventie.js"></script> -<script src="../bower_components/doc-ready/doc-ready.js"></script> -<script src="../bower_components/get-style-property/get-style-property.js"></script> -<script src="../bower_components/get-size/get-size.js"></script> -<script src="../bower_components/jquery-bridget/jquery.bridget.js"></script> -<script src="../bower_components/matches-selector/matches-selector.js"></script> -<script src="../bower_components/fizzy-ui-utils/utils.js"></script> -<script src="../bower_components/outlayer/item.js"></script> -<script src="../bower_components/outlayer/outlayer.js"></script> - -<script src="../js/layout-mode.js"></script> -<script src="../js/item.js"></script> -<script src="../js/isotope.js"></script> -<script src="../js/layout-modes/fit-rows.js"></script> - -<script> -docReady( function() { - var container = document.querySelector('#container'); - var iso = window.iso = new Isotope( container, { - layoutMode: 'fitRows', - getSortData: { - // number: function( itemElem ) { - // return parseInt( getText( itemElem.querySelector('.number') ), 10 ); - // }, - // symbol: function( itemElem ) { - // return getText( itemElem.querySelector('.symbol') ); - // }, - // name: function( itemElem ) { - // return getText( itemElem.querySelector('.name') ); - // }, - // category: function( itemElem ) { - // return itemElem.getAttribute('data-category'); - // }, - - number: '.number parseInt', - symbol: '.symbol', - name: '.name', - category: '[data-category]', - - weight: function( itemElem ) { - // remove parenthesis - return parseFloat( getText( itemElem.querySelector('.weight') ).replace( /[\(\)]/g, '') ); - } - - - } - }); - - var options = document.querySelector('#options'); - - eventie.bind( options, 'click', function( event ) { - if ( !matchesSelector( event.target, 'a' ) ) { - return; - } - - // use link's href, remove leading hash - var sortBy = event.target.getAttribute('href').slice( 1 ); - sortBy.slice( 0, 1 ); - iso.options.sortBy = sortBy; - iso.arrange(); - event.preventDefault(); - }); - -}); - -function getText( elem ) { - return elem.textContent || elem.innerText; -} - -</script> - -</body> -</html> - - - diff --git a/profiles/wcm_base/libraries/jquery.isotope/sandbox/stamps.html b/profiles/wcm_base/libraries/jquery.isotope/sandbox/stamps.html deleted file mode 100644 index a7d19d0faddcb20c2e1a9ad9f0c0036adf542a92..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/libraries/jquery.isotope/sandbox/stamps.html +++ /dev/null @@ -1,133 +0,0 @@ -<!doctype html> -<html> -<head> - <meta charset="utf-8"> - - <title>stamps</title> - - - <link rel="stylesheet" href="sandbox.css" /> - - <style> - - #alpha .stamp1 { - width: 30%; - height: 100px; - left: 30%; - top: 20px; - } - - #alpha .stamp2 { - width: 200px; - height: 50px; - left: 20px; - top: 50px; - } - - #beta { - border-style: solid; - border-width: 40px 30px 20px 10px; - padding: 10px 20px 30px 40px; - } - - #beta .stamp1 { - width: 30%; - height: 100px; - left: 10%; - top: 20px; - } - - #beta .stamp2 { - width: 200px; - height: 50px; - right: 20px; - top: 50px; - } - - </style> - -</head> -<body> - - <h1>stamps</h1> - - <div id="alpha" class="container"> - <div class="stamp stamp1"></div> - <div class="stamp stamp2"></div> - <div class="item"></div> - <div class="item h4"></div> - <div class="item h2"></div> - <div class="item"></div> - <div class="item h3"></div> - <div class="item"></div> - <div class="item"></div> - <div class="item h4"></div> - <div class="item"></div> - <div class="item h4"></div> - <div class="item"></div> - </div> - - <div id="beta" class="container"> - <div class="stamp stamp2"></div> - <div class="stamp stamp1"></div> - <div class="item"></div> - <div class="item h4"></div> - <div class="item h2"></div> - <div class="item"></div> - <div class="item h3"></div> - <div class="item"></div> - <div class="item"></div> - <div class="item h4"></div> - <div class="item"></div> - <div class="item h4"></div> - <div class="item"></div> - </div> - -<script src="../bower_components/eventEmitter/EventEmitter.js"></script> -<script src="../bower_components/eventie/eventie.js"></script> -<script src="../bower_components/doc-ready/doc-ready.js"></script> -<script src="../bower_components/get-style-property/get-style-property.js"></script> -<script src="../bower_components/get-size/get-size.js"></script> -<script src="../bower_components/matches-selector/matches-selector.js"></script> -<script src="../bower_components/fizzy-ui-utils/utils.js"></script> -<script src="../bower_components/outlayer/item.js"></script> -<script src="../bower_components/outlayer/outlayer.js"></script> -<script src="../bower_components/masonry/masonry.js"></script> - -<script src="../js/item.js"></script> -<script src="../js/layout-mode.js"></script> -<script src="../js/isotope.js"></script> -<script src="../js/layout-modes/masonry.js"></script> - -<script> -docReady( function() { - ( function() { - var container = document.querySelector('#alpha'); - var iso = new Isotope( container, { - itemSelector: '.item', - stamp: '.stamp', - masonry: { - columnWidth: 60, - gutter: 10 - } - }); - - })(); - - ( function() { - var container = document.querySelector('#beta'); - var iso = new Isotope( container, { - stamp: '.stamp', - masonry: { - columnWidth: 60, - gutter: 10 - } - }); - - })(); - -}); -</script> - -</body> -</html> diff --git a/profiles/wcm_base/libraries/jquery.isotope/sandbox/transition-bug.html b/profiles/wcm_base/libraries/jquery.isotope/sandbox/transition-bug.html deleted file mode 100644 index d8eb37a36663880d6e088e42387682c1aff29d8e..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/libraries/jquery.isotope/sandbox/transition-bug.html +++ /dev/null @@ -1,86 +0,0 @@ -<!doctype html> -<html> -<head> - <meta charset="utf-8"> - - <title>transition bug</title> - - <link rel="stylesheet" href="sandbox.css" /> - <style> - #container { width: 100%; } - </style> -</head> -<body> - - <h1>transition bug</h1> - -<div> - <button id="bug-me">Bug me</button> -</div> - -<div id="container"> - - <!-- <div class="element post-transition metal " data-symbol="Tl" data-category="post-transition"> - <p class="number">81</p> - <h3 class="symbol">H</h3> - <h2 class="name">Thallium</h2> - <p class="weight">58.3833</p> - </div> --> - - <div class="element metalloid " data-symbol="Sb" data-category="metalloid"> - <p class="number">51</p> - <h3 class="symbol">Sb</h3> - <h2 class="name">Antimony</h2> - <p class="weight">121.76</p> - </div> -</div> - -<script src="../bower_components/eventEmitter/EventEmitter.js"></script> -<script src="../bower_components/eventie/eventie.js"></script> -<script src="../bower_components/doc-ready/doc-ready.js"></script> -<script src="../bower_components/get-style-property/get-style-property.js"></script> -<script src="../bower_components/get-size/get-size.js"></script> -<script src="../bower_components/jquery-bridget/jquery.bridget.js"></script> -<script src="../bower_components/matches-selector/matches-selector.js"></script> -<script src="../bower_components/fizzy-ui-utils/utils.js"></script> -<script src="../bower_components/outlayer/item.js"></script> -<script src="../bower_components/outlayer/outlayer.js"></script> - -<script src="../js/item.js"></script> -<script src="../js/layout-mode.js"></script> -<script src="../js/isotope.js"></script> -<script src="../js/layout-modes/fit-rows.js"></script> -<script src="../js/layout-modes/vertical.js"></script> - -<script> -docReady( function() { - var container = document.querySelector('#container'); - var iso = window.iso = new Isotope( container, { - layoutMode: 'fitRows', - transitionDuration: '2s' - }); - - var item = iso.items[0]; - - var bugButton = document.querySelector('#bug-me'); - eventie.bind( bugButton, 'click', function() { - item.reveal(); - item.moveTo( 200, 100 ); - setTimeout( function() { - item.moveTo( 100, 50 ); - }, 1500 ); - }); - -}); - -function getText( elem ) { - return elem.textContent || elem.innerText; -} - -</script> - -</body> -</html> - - - diff --git a/profiles/wcm_base/libraries/jquery.isotope/test/.jshintrc b/profiles/wcm_base/libraries/jquery.isotope/test/.jshintrc deleted file mode 100644 index db703817ce298e24aae710e2d2d4f63edd3df037..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/libraries/jquery.isotope/test/.jshintrc +++ /dev/null @@ -1,27 +0,0 @@ -{ - "browser": true, - "devel": false, - "strict": true, - "undef": true, - "unused": true, - "predef": { - "Isotope": false, - "getText": false, - - "asyncTest": false, - "deepEqual": false, - "equal": false, - "expect": false, - "module": false, - "notDeepEqual": false, - "notEqual": false, - "notStrictEqual": false, - "ok": false, - "QUnit": false, - "raises": false, - "start": false, - "stop": false, - "strictEqual": false, - "test": false - } -} diff --git a/profiles/wcm_base/libraries/jquery.isotope/test/arrange-complete.js b/profiles/wcm_base/libraries/jquery.isotope/test/arrange-complete.js deleted file mode 100644 index 3d91f85e1bd9f0327a65d4d0bbf4ad56fba355a4..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/libraries/jquery.isotope/test/arrange-complete.js +++ /dev/null @@ -1,73 +0,0 @@ -test( 'arrangeComplete', function() { - - 'use strict'; - - var iso = new Isotope( '#arrange-complete', { - layoutMode: 'fitRows', - transitionDuration: '0.1s' - }); - - var tests = [ - function() { - iso.once( 'arrangeComplete', function() { - ok( true, 'arrangeComplete after some were filtered' ); - next(); - }); - - iso.arrange({ - filter: '.a1' - }); - }, - function() { - iso.once( 'arrangeComplete', function() { - ok( true, 'after some revealed, some hidden, some same' ); - next(); - }); - - iso.arrange({ - filter: '.b2' - }); - }, - function() { - iso.once( 'arrangeComplete', function() { - ok( true, 'after random sort' ); - next(); - }); - - iso.arrange({ - sortBy: 'random' - }); - }, - function() { - iso.once( 'arrangeComplete', function() { - ok( true, 'after layout mid-way thru transition' ); - next(); - }); - - iso.arrange({ - filter: '.a2', - transitionDuration: '0.6s' - }); - - setTimeout( function() { - iso.arrange({ - filter: '.b2' - }); - }, 300 ); - } - ]; - - function next() { - if ( tests.length ) { - var nextTest = tests.shift(); - // HACK for consecutive arrangeComplete calls - setTimeout( nextTest ); - } else { - start(); - } - } - - next(); - stop(); - -}); diff --git a/profiles/wcm_base/libraries/jquery.isotope/test/filtering.js b/profiles/wcm_base/libraries/jquery.isotope/test/filtering.js deleted file mode 100644 index 9f97d4d50bfe1075a60470bf9e7e4748126d552a..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/libraries/jquery.isotope/test/filtering.js +++ /dev/null @@ -1,78 +0,0 @@ -( function() { - -'use strict'; - -var $ = window.jQuery; - -// return a string of item ids -function getFilteredItemIDs( iso ) { - var texts = []; - for ( var i=0, len = iso.filteredItems.length; i < len; i++ ) { - var item = iso.filteredItems[i]; - var id = item.element.getAttribute('data-item-id'); - texts.push( id ); - } - return texts.join(','); -} - -/* -<div data-item-id="1" class="item orange">5</div> -<div data-item-id="2" class="item">3</div> -<div data-item-id="3" class="item orange tall">2</div> -<div data-item-id="4" class="item tall">9</div> -<div data-item-id="5" class="item">7</div> -<div data-item-id="6" class="item orange">1</div> -<div data-item-id="7" class="item orange tall">8</div> -*/ - -test( 'filtering', function() { - - var iso = new Isotope( '#filtering', { - isJQueryFiltering: false, - transitionDuration: 0 - }); - - var ids = getFilteredItemIDs( iso ); - equal( ids, '1,2,3,4,5,6,7', 'all items there by default' ); - - function checkFilter( filter, expectedIDs, message ) { - iso.arrange({ filter: filter }); - ids = getFilteredItemIDs( iso ); - equal( ids, expectedIDs, message || filter ); - } - - checkFilter( '.orange', '1,3,6,7' ); - checkFilter( '.tall', '3,4,7' ); - checkFilter( '.tall.orange', '3,7' ); - - iso.arrange({ - filter: function( elem ) { - var num = parseInt( getText( elem ), 10 ); - return num > 5; - } - }); - ids = getFilteredItemIDs( iso ); - equal( ids, '4,5,7', 'function, text is greater than 5' ); - - // filter with jQuery - iso.options.isJQueryFiltering = true; - - checkFilter( '.orange', '1,3,6,7', '.orange with jQuery' ); - checkFilter( '.tall', '3,4,7', '.orange with jQuery' ); - checkFilter( '.tall.orange', '3,7', '.tall.orange with jQuery' ); - - checkFilter( ':not(.orange)', '2,4,5' ); - checkFilter( '.orange:not(.tall)', '1,6' ); - - iso.arrange({ - filter: function() { - var num = parseInt( $(this).text(), 10 ); - return num > 5; - } - }); - ids = getFilteredItemIDs( iso ); - equal( ids, '4,5,7', 'function, text is greater than 5, with jQuery' ); - -}); - -})(); diff --git a/profiles/wcm_base/libraries/jquery.isotope/test/fit-rows.js b/profiles/wcm_base/libraries/jquery.isotope/test/fit-rows.js deleted file mode 100644 index d29943661c17ac8184ba18f9bffe294ad87b80a5..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/libraries/jquery.isotope/test/fit-rows.js +++ /dev/null @@ -1,43 +0,0 @@ -( function() { - -'use strict'; - -test( 'fitRows', function() { - - var iso = new Isotope( '#fitrows-gutter', { - layoutMode: 'fitRows', - itemSelector: '.item', - transitionDuration: 0 - }); - - function checkPosition( item, x, y ) { - var elem = item.element; - var left = parseInt( elem.style.left, 10 ); - var top = parseInt( elem.style.top, 10 ); - deepEqual( [ left, top ], [ x, y ], 'item position ' + x + ', ' + y ); - } - - checkPosition( iso.items[0], 0, 0 ); - checkPosition( iso.items[1], 60, 0 ); - - // check gutter - iso.options.fitRows = { - gutter: 10 - }; - iso.layout(); - - checkPosition( iso.items[0], 0, 0 ); - checkPosition( iso.items[1], 70, 0 ); - - // check gutter, with element sizing - iso.options.fitRows = { - gutter: '.gutter-sizer' - }; - iso.layout(); - - checkPosition( iso.items[0], 0, 0 ); - checkPosition( iso.items[1], 78, 0 ); - -}); - -})(); diff --git a/profiles/wcm_base/libraries/jquery.isotope/test/get-segment-size.js b/profiles/wcm_base/libraries/jquery.isotope/test/get-segment-size.js deleted file mode 100644 index a6ed4503c811cf836a8a38c1a47931f2b15fca5f..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/libraries/jquery.isotope/test/get-segment-size.js +++ /dev/null @@ -1,38 +0,0 @@ -( function() { - -'use strict'; - -test( 'LayoutMode.getSegmentSize', function() { - - var iso = new Isotope( '#get-segment-size', { - layoutMode: 'cellsByRow', - itemSelector: '.item', - cellsByRow: { - columnWidth: 17, - rowHeight: 23 - } - }); - - var cellsByRow = iso.modes.cellsByRow; - equal( cellsByRow.columnWidth, 17, 'explicit columnWidth option set' ); - equal( cellsByRow.rowHeight, 23, 'explicit rowHeight option set' ); - - // set element sizing - iso.options.cellsByRow.columnWidth = '.grid-sizer'; - iso.options.cellsByRow.rowHeight = '.grid-sizer'; - cellsByRow.getColumnWidth(); - cellsByRow.getRowHeight(); - equal( cellsByRow.columnWidth, 57, 'element sizing columnWidth' ); - equal( cellsByRow.rowHeight, 47, 'element sizing rowHeight' ); - - // default to first item - delete iso.options.cellsByRow.columnWidth; - delete iso.options.cellsByRow.rowHeight; - cellsByRow.getColumnWidth(); - cellsByRow.getRowHeight(); - equal( cellsByRow.columnWidth, 60, 'first item columnWidth' ); - equal( cellsByRow.rowHeight, 30, 'first item rowHeight' ); - -}); - -})(); diff --git a/profiles/wcm_base/libraries/jquery.isotope/test/helpers.js b/profiles/wcm_base/libraries/jquery.isotope/test/helpers.js deleted file mode 100644 index 6e2294c7b3b00f0f7a234559132a62f291333b00..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/libraries/jquery.isotope/test/helpers.js +++ /dev/null @@ -1,19 +0,0 @@ -( function() { - -'use strict'; - -// ----- default layout mode ----- // -Isotope.defaults.layoutMode = 'fitRows'; - -// ----- getText ----- // -var docElem = document.documentElement; - -window.getText = docElem.textContent ? - function( elem ) { - return elem.textContent; - } : - function( elem ) { - return elem.innerText; - }; - -})(); diff --git a/profiles/wcm_base/libraries/jquery.isotope/test/index.html b/profiles/wcm_base/libraries/jquery.isotope/test/index.html deleted file mode 100644 index 40ac1bae8e791ecfdcfe05cc59b061370cb82019..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/libraries/jquery.isotope/test/index.html +++ /dev/null @@ -1,142 +0,0 @@ -<!doctype html> -<html> -<head> - <meta charset="utf-8"> - - <title>Isotope tests</title> - - <link rel="stylesheet" href="tests.css" /> - <link rel="stylesheet" href="../bower_components/qunit/qunit/qunit.css" /> - -<script src="../bower_components/qunit/qunit/qunit.js"></script> - -<script src="../bower_components/jquery/dist/jquery.js"></script> - -<script src="../bower_components/eventEmitter/EventEmitter.js"></script> -<script src="../bower_components/eventie/eventie.js"></script> -<script src="../bower_components/doc-ready/doc-ready.js"></script> -<script src="../bower_components/get-style-property/get-style-property.js"></script> -<script src="../bower_components/get-size/get-size.js"></script> -<script src="../bower_components/jquery-bridget/jquery.bridget.js"></script> -<script src="../bower_components/matches-selector/matches-selector.js"></script> -<script src="../bower_components/fizzy-ui-utils/utils.js"></script> -<script src="../bower_components/outlayer/item.js"></script> -<script src="../bower_components/outlayer/outlayer.js"></script> -<script src="../bower_components/masonry/masonry.js"></script> - -<script src="../js/item.js"></script> -<script src="../js/layout-mode.js"></script> -<script src="../js/isotope.js"></script> -<script src="../js/layout-modes/fit-rows.js"></script> -<script src="../js/layout-modes/masonry.js"></script> - -<script src="../bower_components/isotope-cells-by-row/cells-by-row.js"></script> - -<script src="helpers.js"></script> -<script src="sorting.js"></script> -<script src="sort-data.js"></script> -<script src="filtering.js"></script> -<script src="arrange-complete.js"></script> -<script src="get-segment-size.js"></script> -<script src="masonry-measure-columns.js"></script> -<script src="masonry-stamp.js"></script> -<script src="fit-rows.js"></script> - -</head> -<body> - - <h1>Isotope tests</h1> - - <div id="qunit"></div> - - <h2>Sorting</h2> - - <div id="sorting1" class="container"> - <div class="item"><b>B</b><i>4</i></div> - <div class="item"><b>B</b><i>2</i></div> - <div class="item"><b>A</b><i>4</i></div> - <div class="item"><b>A</b><i>1</i></div> - <div class="item"><b>B</b><i>1</i></div> - <div class="item"><b>A</b><i>3</i></div> - <div class="item"><b>A</b><i>2</i></div> - </div> - - <h2>getSortData</h2> - - <div id="get-sort-data" class="container"> - <div class="item item0" data-ninja-turtle="leonardo"> - <span class="fruit">watermelon</span> - <b>3.14</b> - <i>42</i> - </div> - <div class="item item2" data-ninja-turtle="raphael"> - <span class="fruit">papaya</span> - <b>2.13</b> - <i>1001</i> - </div> - </div> - - <h2>Filtering</h2> - - <div id="filtering" class="container"> - <div data-item-id="1" class="item orange">5</div> - <div data-item-id="2" class="item">3</div> - <div data-item-id="3" class="item orange tall">2</div> - <div data-item-id="4" class="item tall">9</div> - <div data-item-id="5" class="item">7</div> - <div data-item-id="6" class="item orange">1</div> - <div data-item-id="7" class="item orange tall">8</div> - </div> - - <h2>layoutComplete</h2> - - <div id="arrange-complete" class="container"> - <div class="item a1 b1">a1 b1</div> - <div class="item a2 b1">a2 b1</div> - <div class="item a3 b1">a3 b1</div> - <div class="item a1 b2">a1 b2</div> - <div class="item a2 b2">a2 b2</div> - <div class="item a3 b2">a3 b2</div> - <div class="item a1 b3">a1 b3</div> - <div class="item a2 b3">a2 b3</div> - <div class="item a3 b3">a3 b3</div> - </div> - - <h2>LayoutMode.getSegmentSize</h2> - - <div id="get-segment-size" class="container"> - <div class="grid-sizer"></div> - <div class="item"></div> - </div> - - <h2>Masonry</h2> - - <div id="masonry-measure-columns" class="container"> - <div class="grid-sizer"></div> - <div class="item a">a</div> - <div class="item b">b</div> - <div class="item c">c</div> - </div> - - <h2>Masonry stamp</h2> - - <div id="masonry-stamp" class="container"> - <div class="stamp stamp1"></div> - <div class="item"></div> - <div class="item"></div> - <div class="item"></div> - <div class="item"></div> - </div> - - <h2>fitRows</h2> - - <div id="fitrows-gutter" class="container"> - <div class="gutter-sizer"></div> - <div class="item"></div> - <div class="item"></div> - <div class="item"></div> - <div class="item"></div> - </div> - -</body> -</html> diff --git a/profiles/wcm_base/libraries/jquery.isotope/test/masonry-measure-columns.js b/profiles/wcm_base/libraries/jquery.isotope/test/masonry-measure-columns.js deleted file mode 100644 index 7f1afcdafb533905fc8750a8e41a83d11553104e..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/libraries/jquery.isotope/test/masonry-measure-columns.js +++ /dev/null @@ -1,39 +0,0 @@ -( function() { - -'use strict'; - -test( 'Masonry.measureColumns', function() { - - var iso = new Isotope( '#masonry-measure-columns', { - itemSelector: '.item', - layoutMode: 'masonry', - transitionDuration: 0 - }); - - var msnryMode = iso.modes.masonry; - equal( msnryMode.columnWidth, 60, 'after layout, measured first element' ); - - iso.modes.masonry._getMeasurement( 'columnWidth', 'outerWidth' ); - equal( msnryMode.columnWidth, 0, '_getMeasurement, no option' ); - - iso.modes.masonry.measureColumns(); - equal( msnryMode.columnWidth, 60, 'measureColumns, no option' ); - - iso.arrange({ filter: '.c' }); - - iso.modes.masonry.measureColumns(); - equal( msnryMode.columnWidth, 60, 'measureColumns after filter first item, no option' ); - - iso.arrange({ - masonry: { columnWidth: 80 } - }); - equal( msnryMode.columnWidth, 80, '.arrange() masonry.columnWidth option set number' ); - - iso.arrange({ - masonry: { columnWidth: '.grid-sizer' } - }); - equal( msnryMode.columnWidth, 70, '.arrange() masonry.columnWidth option set selector string' ); - -}); - -})(); diff --git a/profiles/wcm_base/libraries/jquery.isotope/test/masonry-stamp.js b/profiles/wcm_base/libraries/jquery.isotope/test/masonry-stamp.js deleted file mode 100644 index e37c887c7decdb59b724aec648c81851e15be42f..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/libraries/jquery.isotope/test/masonry-stamp.js +++ /dev/null @@ -1,27 +0,0 @@ -( function() { - -'use strict'; - -test( 'Masonry stamp', function() { - - var iso = new Isotope( '#masonry-stamp', { - layoutMode: 'masonry', - itemSelector: '.item', - stamp: '.stamp' - }); - - function checkPosition( item, x, y ) { - var elem = item.element; - var left = parseInt( elem.style.left, 10 ); - var top = parseInt( elem.style.top, 10 ); - deepEqual( [ left, top ], [ x, y ], 'item position ' + x + ', ' + y ); - } - - checkPosition( iso.items[0], 0, 0 ); - checkPosition( iso.items[1], 0, 30 ); - checkPosition( iso.items[2], 60, 45 ); - checkPosition( iso.items[3], 120, 45 ); - -}); - -})(); diff --git a/profiles/wcm_base/libraries/jquery.isotope/test/sort-data.js b/profiles/wcm_base/libraries/jquery.isotope/test/sort-data.js deleted file mode 100644 index 1e28cdcadec876e15077ce2e26ae34a20b360c63..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/libraries/jquery.isotope/test/sort-data.js +++ /dev/null @@ -1,101 +0,0 @@ -test( 'sort data', function() { - - 'use strict'; - - var iso = new Isotope( '#get-sort-data', { - layoutMode: 'fitRows', - getSortData: { - ninjaTurtle: '[data-ninja-turtle]', - fruit: 'span.fruit', - b: 'b parseFloat', - i: 'i parseInt', - bbroke: 'b foobar' - } - }); - - var item0 = iso.items[0]; - var item1 = iso.items[1]; - - equal( item0.sortData.ninjaTurtle, 'leonardo', '[data-attr] shorthand' ); - equal( item0.sortData.fruit, 'watermelon', 'query selector shorthand' ); - equal( item0.sortData.b, 3.14, 'parseFloat parser' ); - equal( item0.sortData.i, 42, 'parseInt parser' ); - equal( item0.sortData.bbroke, '3.14', 'default nonparser' ); - - // ----- ----- // - - var docElem = document.documentElement; - var textSetter = docElem.textContent !== undefined ? 'textContent' : 'innerText'; - - function setText( elem, value ) { - elem[ textSetter ] = value; - } - - var elem0 = iso.items[0].element; - var elem1 = iso.items[1].element; - - elem0.setAttribute( 'data-ninja-turtle', 'donatello' ); - setText( elem0.querySelector('span.fruit'), 'mango' ); - setText( elem0.querySelector('b'), '7.24' ); - setText( elem0.querySelector('i'), 'foo' ); - - iso.updateSortData( elem0 ); - - var message = ', after updateSortData on single item' - equal( item0.sortData.ninjaTurtle, 'donatello', '[data-attr] shorthand' + message ); - equal( item0.sortData.fruit, 'mango', 'query selector shorthand' + message ); - equal( item0.sortData.b, 7.24, 'parseFloat parser' + message ); - ok( isNaN( item0.sortData.i ), 'parseInt parser' + message ); - equal( item0.sortData.bbroke, '7.24', 'default nonparser' + message ); - - // ----- update all items ----- // - - elem0.setAttribute( 'data-ninja-turtle', 'leonardo' ); - setText( elem0.querySelector('span.fruit'), 'passion fruit' ); - - elem1.setAttribute( 'data-ninja-turtle', 'michelangelo' ); - setText( elem1.querySelector('span.fruit'), 'starfruit' ); - - // update all - iso.updateSortData(); - - message = ', after updateSortData on all items' - equal( item0.sortData.ninjaTurtle, 'leonardo', '[data-attr] shorthand' + message ); - equal( item0.sortData.fruit, 'passion fruit', 'query selector shorthand' + message ); - equal( item1.sortData.ninjaTurtle, 'michelangelo', '[data-attr] shorthand' + message ); - equal( item1.sortData.fruit, 'starfruit', 'query selector shorthand' + message ); - - // ----- no items ----- // - - iso.options.itemSelector = 'none'; - iso.reloadItems(); - - iso.updateSortData(); - ok( true, 'updateSortData on empty container is ok' ); - - iso.updateSortData( document.createElement('div') ); - ok( true, 'updateSortData with non-item is ok, with no child items' ); - - iso.updateSortData( false ); - ok( true, 'updateSortData with falsy is ok, with no child items' ); - - iso.updateSortData( [] ); - ok( true, 'updateSortData with empty array is ok, with no child items' ); - - iso.updateSortData( jQuery() ); - ok( true, 'updateSortData with empty jQuery object is ok, with no child items' ); - - // ----- bad getSortData ----- // - - delete iso.options.itemSelector; - iso.options.getSortData.badQuery = 'bad-query'; - iso.options.getSortData.badAttr = '[bad-attr]'; - iso._getSorters(); - iso.reloadItems(); - - item0 = iso.items[0]; - - equal( item0.sortData.badQuery, null, 'bad query returns null' ); - equal( item0.sortData.badAttr, null, 'bad attr returns null' ); - -}); diff --git a/profiles/wcm_base/libraries/jquery.isotope/test/sorting.js b/profiles/wcm_base/libraries/jquery.isotope/test/sorting.js deleted file mode 100644 index 6c0dacf4b65fda059eed4d2272651cb95ca096c1..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/libraries/jquery.isotope/test/sorting.js +++ /dev/null @@ -1,69 +0,0 @@ -( function() { - -'use strict'; - -function getItemsText( iso ) { - var texts = []; - for ( var i=0, len = iso.filteredItems.length; i < len; i++ ) { - var item = iso.filteredItems[i]; - texts.push( getText( item.element ) ); - } - return texts.join(','); -} - -test( 'sorting', function() { - - // sorting with history - ( function() { - var iso = new Isotope( '#sorting1', { - layoutMode: 'fitRows', - transitionDuration: 0, - getSortData: { - letter: 'b', - number: 'i' - }, - sortBy: 'number' - }); - - iso.arrange({ sortBy: 'letter' }); - - var texts = getItemsText( iso ); - - equal( texts, 'A1,A2,A3,A4,B1,B2,B4', 'items sorted by letter, then number, via history' ); - - iso.destroy(); - })(); - - // sorting with array - ( function() { - var iso = new Isotope( '#sorting1', { - layoutMode: 'fitRows', - transitionDuration: 0, - getSortData: { - letter: 'b', - number: 'i' - }, - sortBy: [ 'letter', 'number' ] - }); - - equal( getItemsText( iso ), 'A1,A2,A3,A4,B1,B2,B4', 'sortBy array' ); - - iso.arrange({ - sortAscending: false - }); - equal( getItemsText( iso ), 'B4,B2,B1,A4,A3,A2,A1', 'sortAscending false' ); - - iso.arrange({ - sortAscending: { - letter: true, - number: false - } - }); - equal( getItemsText( iso ), 'A4,A3,A2,A1,B4,B2,B1', 'sortAscending with object' ); - - iso.destroy(); - })(); - -}); - -})(); diff --git a/profiles/wcm_base/libraries/jquery.isotope/test/tests.css b/profiles/wcm_base/libraries/jquery.isotope/test/tests.css deleted file mode 100644 index c5b882cf4efa40eea7447d78d4691791385b0d6d..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/libraries/jquery.isotope/test/tests.css +++ /dev/null @@ -1,82 +0,0 @@ -* { - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} - -body { - font-family: sans-serif; -} - -.container { - background: #EEE; - width: 180px; - margin-bottom: 20px; - position: relative; -} - -.container:after { - content: ''; - display: block; - clear: both; -} - -.item { - width: 60px; - height: 30px; - float: left; - border: 1px solid; - background: #3BF; -} - -.item.w2 { width: 120px; } -.item.w3 { width: 180px; } - -.item.h2 { height: 50px; } -.item.h3 { height: 70px; } -.item.h4 { height: 90px; } -.item.h5 { height: 110px; } - -/* ---- stamp ---- */ - - -.stamp { - background: red; - opacity: 0.75; - position: absolute; - border: 1px solid; -} - -.has-stamp { - position: relative; -} - -/* ---- get segment size ---- */ - -#get-segment-size .grid-sizer { - /* 57 outer width */ - width: 52px; - margin-right: 5px; - /* 47 outer height */ - height: 40px; - margin-bottom: 7px; -} - -#masonry-measure-columns .grid-sizer { - width: 70px; -} - -/* ---- masonry stamp ---- */ - -#masonry-stamp .stamp1 { - width: 80px; - height: 30px; - right: 25px; - top: 15px; -} - -/* ---- fit rows ---- */ - -#fitrows-gutter .gutter-sizer { - width: 10%; -} diff --git a/profiles/wcm_base/modules/contrib/fieldable_panels_panes/PATCHES.txt b/profiles/wcm_base/modules/contrib/fieldable_panels_panes/PATCHES.txt deleted file mode 100644 index 0030995f64b28bff429f39773128832095a629eb..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/modules/contrib/fieldable_panels_panes/PATCHES.txt +++ /dev/null @@ -1,9 +0,0 @@ -The following patches have been applied to this project: -- http://drupal.org/files/issues/fieldable_panels_panes-n2283263-5.patch -- http://www.drupal.org/files/issues/fieldable_panels_panes-n2256503-12-backport-fpp15.patch -- http://www.drupal.org/files/issues/fieldable_panels_pane-avoid-reload-2415427-4.patch -- http://www.drupal.org/files/issues/2146479-admin-menu-map-conflict.patch -- http://www.drupal.org/files/issues/fieldable_panels_panes-title-visibility-rules-2463965-1.patch -- http://www.drupal.org/files/issues/fpp_rendering-2304921-1.patch - -This file was automatically generated by Drush Make (http://drupal.org/project/drush). \ No newline at end of file diff --git a/profiles/wcm_base/modules/contrib/fpp_bundles/LICENSE.txt b/profiles/wcm_base/modules/contrib/fpp_bundles/LICENSE.txt deleted file mode 100644 index d159169d1050894d3ea3b98e1c965c4058208fe1..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/modules/contrib/fpp_bundles/LICENSE.txt +++ /dev/null @@ -1,339 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - <one line to give the program's name and a brief idea of what it does.> - Copyright (C) <year> <name of author> - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - <signature of Ty Coon>, 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. diff --git a/profiles/wcm_base/modules/contrib/fpp_bundles/README.md b/profiles/wcm_base/modules/contrib/fpp_bundles/README.md deleted file mode 100644 index 58d82b8323d996bf3039a375488dc774497cc8ad..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/modules/contrib/fpp_bundles/README.md +++ /dev/null @@ -1,126 +0,0 @@ -# FPP Bundles (Fieldable Panels Panes UI) - -**Fieldable Panel Panes Bundles (Fieldable Panel Panes UI)** - module that helps to create bundles of the [Fieldable Panels Panes](https://www.drupal.org/project/fieldable_panels_panes) entity. The project aims to simplify developers life by way of refraining of writing the code for panels creation. - -The module has an integration with [Features](https://www.drupal.org/project/features) and allows to export an existing bundles with automatically adding their dependencies (fields, field groups, etc). - -## Installation - -**Drush:** -``` -drush en fpp_bundles -y -``` - -**Manual:** -- Download the release from [drupal.org](https://www.drupal.org/project/fpp_bundles); -- Put the unpacked folder into your Drupal installation "modules" directory; -- Go to `/admin/modules` and enable the module. - -## Documentation - -### API hooks - -See all hooks and their description in [fpp_bundles.api.php](fpp_bundles.api.php). - -### Helper functions - -Programmatically creation of a bundle: - -```php -// If the value of "$status" variable will be TRUE, then bundle was -// created successfully. In another case, when machine name is -// already exist, the error message will be stored in the Dblog -// and the value will be FALSE. -$status = fpp_bundles_save(array( - // The "name" is required. - 'name' => 'Video', - // By default it set to "0", - 'level' => 1, - // By default it set to "1". - 'assets' => 0, - // By default it is empty. - 'category' => 'Media', -)); -``` - -Programmatically update the bundle: - -```php -// Change only one parameter of the bundle. -$status = fpp_bundles_save(array( - // The ID of created bundle. - 'bid' => 1, - // Change "assets" to "1". - 'assets' => 1, -)); -``` - -Programmatically remove the bundle: - -```php -// Remove the bundle by ID. If bundle with such ID does not exist, -// then error message will be stored in the Dblog and a value -// of "$status" variable will be FALSE. -$status = fpp_bundles_remove(1); -``` - -Append your own assets in `preprocess` hooks: - -```php -/** - * Implements hook_preprocess_HOOK(). - */ -function hook_preprocess_fieldable_panels_pane(&$variables) { - $entity = $variables['elements']['#element']; - - // The "assets" property provided by "FPP Bundles" module - // and allowed only for panels, created from UI. - if (isset($entity->assets)) { - $entity->assets['css'][] = 'path/to/your/own/file.css'; - } -} -``` - -### Best practices - -Creating the new bundle with frontend and backend parts. - -- Create the bundle from UI with name `Media`; - - Correct the machine name of bundle by adding prefix `fpp_` (after changes it should be `fpp_media`); - - If necessary, type the name of category and check/uncheck the box that allow you to see the bundle in general list; - - Do not uncheck the box that indicate that CSS & JS for panel will be included automatically if they are exists; - - Create a bundle and add necessary fields and field groups, configure the displays; -- Create the template, CSS and JS if needed; - - Put your template file in: `path/to/theme/templates/fieldable-panels-panes/fieldable-panels-pane--fpp-media.tpl.php`; - - Put your CSS file in: `path/to/theme/css/fieldable-panels-panes/fpp-media.css`; - - Put your JS file in: `path/to/theme/js/fieldable-panels-panes/fpp-media.js`; - - If needed, put the CSS or/and JS in `path/to/theme/[js/css]/fieldable-panels-panes/admin/fpp-media-admin.[js/css]`; -- Export the bundle via Features; -- Commit created feature and theming files using your VCS system. - -## Changelog - -**Version [1.0](https://github.com/BR0kEN-/fpp_bundles/tree/7.x-1.0)**, December 18, 2014: -- UI CRUD interface for bundles of Fieldable Panels Panes entity. -- Integration with Features. - -**Version [1.1](https://github.com/BR0kEN-/fpp_bundles/tree/7.x-1.1)**, December 23, 2014: -- Fixed an [issue](https://www.drupal.org/node/2397973) with Features integration. - -**Version [1.2](https://github.com/BR0kEN-/fpp_bundles/tree/7.x-1.2)**, December 24, 2014: -- Improved integration with Features. From now, all fields, groups and widgets will be added into the Feature automatically. - -**Version [1.3](https://github.com/BR0kEN-/fpp_bundles/tree/7.x-1.3)**, January 29, 2015: -- Added the API hooks which occurs after successful insert/update/delete operation. -- Added the functions for programmatically creation, validation and deletion the bundles. -- Added an option to automatically load CSS & JS for a panel. -- Added the help section at `/admin/help/fpp_bundles`. -- Improved SimpleTest. - -**Version [1.4](https://github.com/BR0kEN-/fpp_bundles/tree/7.x-1.4)**, February 11, 2015: -- Added the possibility to include CSS & JS for administrative users. -- Updated the documentation. - -## Authors - -- [Sergey Bondarenko (BR0kEN)](https://github.com/BR0kEN-) diff --git a/profiles/wcm_base/modules/contrib/fpp_bundles/classes/FppBundle.inc b/profiles/wcm_base/modules/contrib/fpp_bundles/classes/FppBundle.inc deleted file mode 100644 index 457fc3a1b914a442187762b403b2c2f328f4dfe2..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/modules/contrib/fpp_bundles/classes/FppBundle.inc +++ /dev/null @@ -1,149 +0,0 @@ -<?php -/** - * @file - * An object that describes single Fieldable Panels Pane Bundle. - */ - -/** - * Class FppBundle. - */ -class FppBundle { - /** - * The bundle ID. - * - * @var int - */ - private $bid = 0; - - /** - * The human name of bundle. - * - * @var string - */ - private $name = ''; - - /** - * Indicates that the panel should be placed in top level or not. - * - * @var bool - */ - private $level = FALSE; - - /** - * An unique bundle machine name. - * - * @var string - */ - private $machine = ''; - - /** - * Category where was placed the bundle. - * - * @var string - */ - private $category = ''; - - /** - * Indicates the state of automatically load the CSS & JS files for bundle. - * - * @var bool - */ - private $assets = TRUE; - - /** - * Property getter. - */ - public function getBundleId() { - return (int) $this->bid; - } - - /** - * Property getter. - */ - public function getHumanName() { - return $this->name; - } - - /** - * Property getter. - */ - public function isTopLevelPanel() { - return (bool) $this->level; - } - - /** - * Property getter. - */ - public function getMachineName() { - return $this->machine; - } - - /** - * Property getter. - */ - public function getCategoryName() { - return $this->category; - } - - /** - * Property getter. - */ - public function isAssetsLoadAutomatically() { - return (bool) $this->assets; - } - - /** - * Get object representation as an array. - * - * @return array - * Bundle fields, except the ID. - */ - public function getAllFieldsAsArray() { - $parameters = get_object_vars($this); - // Delete the ID from the property set, because - // it is an unique and plays no role. - unset($parameters['bid']); - - return $parameters; - } - - /** - * Method for export object parameters as an keyed array. - * - * @return array - * Representation of the object as an array. - */ - public function export() { - return array($this->machine => $this->getAllFieldsAsArray()); - } - - /** - * Create the bundle object from an array. - * - * @param array $bundle - * Representation of the bundle as array. - * - * @throws \FppBundlesException - * When not all necessary properties was set. - * - * @return $this - * Bundle object. - */ - public function import(array $bundle) { - $fields = get_object_vars($this); - $filled = 0; - - foreach (array_keys($fields) as $field) { - if (isset($bundle[$field])) { - $this->$field = $bundle[$field]; - $filled++; - } - } - - if (count($fields) != $filled) { - throw \FppBundlesException::set(t('The bundle cannot to be imported from an array because the number of items is not equal to the properties number.')); - } - - return $this; - } -} diff --git a/profiles/wcm_base/modules/contrib/fpp_bundles/classes/FppBundlesDatabase.inc b/profiles/wcm_base/modules/contrib/fpp_bundles/classes/FppBundlesDatabase.inc deleted file mode 100644 index f94a0d888a885124a9ce38c427bd21f2da678541..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/modules/contrib/fpp_bundles/classes/FppBundlesDatabase.inc +++ /dev/null @@ -1,521 +0,0 @@ -<?php -/** - * @file - * Object for working with stored panels in DB. - */ - -/** - * Class FppBundlesDatabase. - */ -class FppBundlesDatabase { - const BUNDLE_CLASS_NAME = '\FppBundle'; - - /** - * An instance of object. - * - * @var \FppBundlesDatabase - */ - private static $instance; - - /** - * Database schema for Drupal "hook_schema" usage. - * - * @var array - */ - private $schema = array(); - - /** - * Table fields names, exclude indexes. - * - * @var array - */ - private $fields = array(); - - /** - * An array where key is name the index and value - field with index. - * - * @var array - */ - private $indexes = array( - 'primary' => '', - 'unique' => '', - ); - - /** - * An array with all bundles created from admin interface. - * - * @var array - */ - private $allBundles = array(); - - /** - * DB table name. - * - * @var string - */ - private $table = ''; - - /** - * Create instance to work with DB table. - * - * @param string $table_name - * The name of table in DB. - */ - private function __construct($table_name) { - $this->table = $table_name; - $not_null_varchar = array( - 'type' => 'varchar', - 'length' => 100, - 'not null' => TRUE, - ); - $not_null_int = array( - 'type' => 'int', - 'not null' => TRUE, - ); - - $indexes = array( - // Primary key - auto increment. - 'bid' => array( - 'type' => 'serial', - 'unsigned' => TRUE, - 'description' => 'Bundle ID', - ), - // Unique key - generated automatically. - 'machine' => $not_null_varchar + array( - 'description' => 'Machine name of the bundle', - ), - ); - - $fields = array( - // Input in UI. Required field on base of which - // will be generated a machine name of the bundle. - 'name' => $not_null_varchar + array( - 'description' => 'Human name of the bundle', - ), - // Checkbox in UI. Needed for the indicated where entity - // will be shown: in category or in general list. - 'level' => $not_null_int + array( - 'description' => 'Indicates that the panel is "top level" or placed into category.', - ), - // Input in UI. - 'category' => $not_null_varchar + array( - 'description' => 'Optional field for store bundles in categories.', - ), - 'assets' => $not_null_int + array( - 'default' => 1, - 'description' => 'Boolean. Indicates the state of automatically load the CSS & JS files.', - ), - ); - - $this->indexes = array_combine(array_keys($this->indexes), array_keys($indexes)); - $this->fields = array_keys($fields); - - // Create DB schema for the storage module data. - $this->schema = array( - $this->table => array( - 'fields' => $indexes + $fields, - 'primary key' => array($this->indexes['primary']), - 'unique keys' => array($this->indexes['unique'] => array($this->indexes['unique'])), - 'description' => 'Storage for Fieldable Panels Panes bundles', - ), - ); - } - - /** - * Property getter. - */ - public function getSchema() { - return $this->schema; - } - - /** - * Get the bundle by one of the indexes in table. - * - * @param string $index_name - * An index name. Must be "primary" or "unique". - * @param int|string $value - * An ID of the bundle. - * - * @return bool|\FppBundle - * False - if nothing was found or existing bundle object. - */ - public function getBundleByDbIndex($index_name, $value) { - if (!isset($this->indexes[$index_name])) { - return FALSE; - } - - return $this->bundleSelectQuery() - ->condition($this->indexes[$index_name], $value, '=') - ->execute() - ->fetchObject(self::BUNDLE_CLASS_NAME); - } - - /** - * Get all bundles from the DB. - * - * @param int $per_page - * Number of items per page. - * - * @return array - * An array where each item is an instance of the \FppBundle; - */ - public function getAllBundles($per_page = 0) { - if (!$this->allBundles) { - $query = $this->bundleSelectQuery(); - - if ($per_page && is_int($per_page)) { - /* @var \PagerDefault $query */ - $query = $query->extend('PagerDefault'); - $query->limit($per_page); - } - - $this->allBundles = $query->execute()->fetchAll( - \PDO::FETCH_CLASS, self::BUNDLE_CLASS_NAME - ); - - /* @var \FppBundle $bundle */ - foreach ($this->allBundles as $i => $bundle) { - $this->allBundles[$bundle->getMachineName()] = $bundle; - unset($this->allBundles[$i]); - } - } - - return $this->allBundles; - } - - /** - * Get the bundle by machine name. - * - * @param string $machine_name - * Machine readable name of the bundle. - * - * @return \FppBundle|bool - * An instance ob the bundle object or false if it does not exist. - */ - public function getBundleByMachineName($machine_name) { - $bundles = $this->getAllBundles(); - - return isset($bundles[$machine_name]) ? $bundles[$machine_name] : FALSE; - } - - /** - * Get machine names of all bundles. - * - * @return array - * An array where each item - an unique machine name of the bundle. - */ - public function getAllBundlesMachineNames() { - return array_keys($this->getAllBundles()); - } - - /** - * Get all field names from DB table where bundles was stored. - * - * @return array - * An array with fields machine names. - */ - public function getAllSchemaFields() { - return array_values($this->fields + $this->indexes); - } - - /** - * Select FPP bundles from DB. - * - * @return \SelectQuery - * Database object for select query. - */ - public function bundleSelectQuery() { - return db_select($this->table)->fields($this->table, $this->getAllSchemaFields()); - } - - /** - * Save values for the bundle and create it. - * - * @param array $bundle - * Bundle data. - * - * @return int - * Last insert ID. - */ - public function insertBundle(array $bundle) { - return $this->performAction(FPP_BUNDLES_CREATE_BUNDLE_ACTION, $bundle); - } - - /** - * Update existing bundle. - * - * @param array $bundle - * Bundle object. - */ - public function updateBundle(array $bundle) { - $this->performAction(FPP_BUNDLES_UPDATE_BUNDLE_ACTION, $bundle); - } - - /** - * Remove existing bundle. - * - * @param array $bundle - * Bundle object. - */ - public function deleteBundle(array $bundle) { - $this->performAction(FPP_BUNDLES_REMOVE_BUNDLE_ACTION, $bundle); - } - - /** - * Perform a database action over the bundle. - * - * @param string $action - * An action name. Can be a value the one of next constants: - * FPP_BUNDLES_CREATE_BUNDLE_ACTION - insert a new entry in DB; - * FPP_BUNDLES_UPDATE_BUNDLE_ACTION - update an existing entry. - * FPP_BUNDLES_REMOVE_BUNDLE_ACTION - delete an existing entry. - * @param array $bundle - * Bundle data. - * - * @see db_insert() - * @see db_update() - * @see db_delete() - * - * @throws \Exception - * When query cannot be performed or an action is incorrect. - * - * @return \DatabaseStatementInterface|int - * An interface on "update" and "delete" actions - * or ID of a new entry on "insert" action. - */ - public function performAction($action, array $bundle) { - $fpp_bundle = FALSE; - $func = "db_$action"; - - if (!function_exists($func)) { - \FppBundlesException::set(t('Action "!action" that was performed over the bundle is incorrect!', array( - '!action' => $action, - ))); - - return 0; - } - - $query = call_user_func($func, $this->table); - $index = $this->indexes['primary']; - $bundle_id = 0; - - if (isset($bundle[$index])) { - $bundle_id = $bundle[$index]; - unset($bundle[$index]); - } - - if ($query instanceof \DeleteQuery) { - $fpp_bundle = $this->getBundleByDbIndex('primary', $bundle_id); - } - else { - /* @var \UpdateQuery|\InsertQuery $query */ - $query->fields($bundle); - } - - if ($bundle_id && !($query instanceof \InsertQuery)) { - /* @var \UpdateQuery|\DeleteQuery $query */ - $query->condition($index, $bundle_id, '='); - } - - $query = $query->execute(); - - if (!$fpp_bundle) { - // The "$bundle_id" will be more than zero for "delete" and "update" - // actions, and for "insert" the ID will be returned by "execute" method. - $bundle['bid'] = $bundle_id ?: $query; - $fpp_bundle = new \FppBundle(); - $fpp_bundle = $fpp_bundle->import($bundle); - } - - module_invoke_all(_fpp_bundles_prefix("bundle_$action"), $fpp_bundle); - - return $query; - } - - /** - * Create an object representation of the bundle. - * - * @param array $data - * Keyed array with information about bundle. - * Required keys are: "name", "level", "machine", "category". - * - * @throws \FppBundlesException - * If property is absent but should be. - * - * @return array - * Bundle information. - */ - public function prepareBundleData(array $data) { - $save = array(); - - foreach ($this->getAllSchemaFields() as $field) { - if (isset($data[$field])) { - $save[$field] = $data[$field]; - } - elseif ($field !== $this->indexes['primary']) { - throw \FppBundlesException::set(t('The property "!property" is not specified or does not exist, but it is necessary to create the bundle.', array( - '!property' => $field, - ))); - } - } - - return $save; - } - - /** - * Validate the bundle before saving into DB. - * - * @param array $values - * The values for creating/updating the bundle. - * - * @throws \FppBundlesException - * When error is occured. - * - * @return array - * An associative array with two items: "action" and "values". - */ - public function validateBundle(array $values) { - $action = FALSE; - $error = FALSE; - - if (empty($values['name'])) { - $error = t('The name of bundle - required parameter.'); - } - else { - // Validate the text fields. - foreach (array('name', 'category') as $field_name) { - if (isset($values[$field_name])) { - $values[$field_name] = trim(filter_xss($values[$field_name])); - - if (empty($values[$field_name])) { - $error = t('The !field of bundle should not be empty and can contain only latin letters.', array( - '!field' => $field_name, - )); - } - elseif (!strlen(preg_replace('/\d+|\s+/', '', $values[$field_name]))) { - $error = t('The !field of bundle should not contain only numbers.', array( - '!field' => $field_name, - )); - } - elseif (strlen($values[$field_name]) < FPP_BUNDLES_MINIMUM_CHARS_FOR_NAME) { - $error = t('The !field of bundle should contain more than !number symbols.', array( - '!number' => FPP_BUNDLES_MINIMUM_CHARS_FOR_NAME, - '!field' => $field_name, - )); - } - } - } - - // If "bid" does not exist, then we try to create a new bundle. - if (empty($values[$this->indexes['primary']])) { - $values[$this->indexes['unique']] = _fpp_bundles_create_machine_name($values['name']); - - if ($this->getBundleByDbIndex('unique', $values[$this->indexes['unique']])) { - $error = t('The bundle with "!machine" machine name is already exist.', array( - '!machine' => $values[$this->indexes['unique']], - )); - } - else { - $action = FPP_BUNDLES_CREATE_BUNDLE_ACTION; - - $empty = new \FppBundle(); - $values += $empty->getAllFieldsAsArray(); - } - } - else { - $existing = $this->getBundleByDbIndex('primary', $values[$this->indexes['primary']]); - - if ($existing) { - $action = FPP_BUNDLES_UPDATE_BUNDLE_ACTION; - $values[$this->indexes['unique']] = $existing->getMachineName(); - $values += $existing->getAllFieldsAsArray(); - } - else { - $error = t('The bundle with ID "!id" was not created and cannot to be updated.', array( - '!id' => $values[$this->indexes['primary']], - )); - } - } - - foreach (array('level', 'assets') as $field_name) { - if (isset($values[$field_name])) { - $values[$field_name] = (int) $values[$field_name]; - } - } - } - - if ($error) { - throw \FppBundlesException::set($error); - } - - return array( - 'values' => $this->prepareBundleData($values), - 'action' => $action, - ); - } - - /** - * Create or update a bundle programmatically. - * - * @param array $bundle - * The values for creating or updating the bundle. If "bid" was not - * specified, then bundle will be created. To read about array keys, - * see the properties of \FppBundle object. - * - * @see \FppBundle - * - * @return bool - * TRUE - if bundle was created/updated, FALSE and watchdog message if not. - */ - public function saveBundle(array $bundle) { - try { - $bundle = $this->validateBundle($bundle); - } - catch (\FppBundlesException $e) { - return FALSE; - } - - $this->performAction($bundle['action'], $bundle['values']); - - return TRUE; - } - - /** - * Remove bundle programmatically. - * - * @param int $bid - * The bundle ID. - * - * @return bool - * TRUE - if a bundle was removed, FALSE and watchdog message if not. - */ - public function removeBundle($bid) { - if ($this->getBundleByDbIndex('primary', $bid)) { - $this->deleteBundle(array($this->indexes['primary'] => $bid)); - - return TRUE; - } - - \FppBundlesException::set(t('Trying to remove the bundle with ID "!id" that does not exist.', array( - '!id' => $bid, - ))); - - return FALSE; - } - - /** - * Create/get an instance of an object. - * - * @see self::__construct() - * - * @return \FppBundlesDatabase - * An object instance. - */ - public static function instance($table_name) { - if (!self::$instance) { - self::$instance = new self($table_name); - } - - return self::$instance; - } -} diff --git a/profiles/wcm_base/modules/contrib/fpp_bundles/classes/FppBundlesException.inc b/profiles/wcm_base/modules/contrib/fpp_bundles/classes/FppBundlesException.inc deleted file mode 100644 index c180e9400472dda491c20df7678c92e700951e5a..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/modules/contrib/fpp_bundles/classes/FppBundlesException.inc +++ /dev/null @@ -1,27 +0,0 @@ -<?php -/** - * @file - * FPP Bundles Exception. - */ - -/** - * Class FppBundlesException. - */ -class FppBundlesException extends \Exception { - /** - * Throw Drupal error and store it to "Recent log messages". - * - * @param string $message - * Exception message. - * - * @return self - * Exception, which can be thrown. - */ - public static function set($message) { - $exception = new self($message); - - watchdog_exception('FPP Bundles', $exception, $message); - - return $exception; - } -} diff --git a/profiles/wcm_base/modules/contrib/fpp_bundles/fpp_bundles.api.php b/profiles/wcm_base/modules/contrib/fpp_bundles/fpp_bundles.api.php deleted file mode 100644 index b61d38d80111d47a9598ad39812e9b1a526b3944..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/modules/contrib/fpp_bundles/fpp_bundles.api.php +++ /dev/null @@ -1,37 +0,0 @@ -<?php -/** - * @file - * FPP Bundles (Fieldable Panels Panes UI) API. - */ - -/** - * Called after successful inserting a bundle into DB. - * - * This hook should not return anything, because the data will nowhere used. - * - * @param \FppBundle $bundle - * Bundle object. - */ -function hook_fpp_bundles_bundle_insert(\FppBundle $bundle) { - -} - -/** - * Called after successful updating a bundle in DB. - * - * @param \FppBundle $bundle - * Bundle object. - */ -function hook_fpp_bundles_bundle_update(\FppBundle $bundle) { - -} - -/** - * Called after successful deleting a bundle from DB. - * - * @param \FppBundle $bundle - * Bundle object. - */ -function hook_fpp_bundles_bundle_delete(\FppBundle $bundle) { - -} diff --git a/profiles/wcm_base/modules/contrib/fpp_bundles/fpp_bundles.info b/profiles/wcm_base/modules/contrib/fpp_bundles/fpp_bundles.info deleted file mode 100644 index f5f1330d0e3c4d7f03f6ebe6c9c744f0f3a9eb13..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/modules/contrib/fpp_bundles/fpp_bundles.info +++ /dev/null @@ -1,29 +0,0 @@ -name = FPP Bundles (Fieldable Panels Panes UI) -description = Create your own "Fieldable Panels Pane" entity from admin interface, add fields on it and export it all with "Features". -package = Panels -core = 7.x - -testing_api = 2.x - -files[] = fpp_bundles.test -files[] = classes/FppBundle.inc -files[] = classes/FppBundlesDatabase.inc -files[] = classes/FppBundlesException.inc - -configure = admin/structure/fieldable-panels-panes - -dependencies[] = fieldable_panels_panes - -; Information added by Drupal.org packaging script on 2014-12-24 -version = "7.x-1.2" -core = "7.x" -project = "fpp_bundles" -datestamp = "1419451981" - - -; Information added by Drupal.org packaging script on 2015-02-11 -version = "7.x-1.4" -core = "7.x" -project = "fpp_bundles" -datestamp = "1423654984" - diff --git a/profiles/wcm_base/modules/contrib/fpp_bundles/fpp_bundles.install b/profiles/wcm_base/modules/contrib/fpp_bundles/fpp_bundles.install deleted file mode 100644 index 0ae89c945d32fb8a5261feb9198d608ae1da2617..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/modules/contrib/fpp_bundles/fpp_bundles.install +++ /dev/null @@ -1,27 +0,0 @@ -<?php -/** - * @file - * Installation file for the FPP Bundles module. - */ - -if (!defined('FPP_BUNDLES_MACHINE_NAME')) { - define('FPP_BUNDLES_MACHINE_NAME', 'fpp_bundles'); -} - -/** - * Implements hook_schema(). - */ -function fpp_bundles_schema() { - module_load_include('module', FPP_BUNDLES_MACHINE_NAME); - - return fpp_bundles_db()->getSchema(); -} - -/** - * Implements hook_update_N(). - */ -function fpp_bundles_update_7100() { - $schema = fpp_bundles_schema(); - - db_add_field(FPP_BUNDLES_MACHINE_NAME, 'assets', $schema[FPP_BUNDLES_MACHINE_NAME]['fields']['assets']); -} diff --git a/profiles/wcm_base/modules/contrib/fpp_bundles/fpp_bundles.module b/profiles/wcm_base/modules/contrib/fpp_bundles/fpp_bundles.module deleted file mode 100644 index 7a4bdfc742d46df95d8e257ef454953fd56e803a..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/modules/contrib/fpp_bundles/fpp_bundles.module +++ /dev/null @@ -1,583 +0,0 @@ -<?php -/** - * @file - * Module for creating panels from admin interface. - * - * @author Sergey Bondarenko <broken@propeople.com.ua> - */ - -/** - * Machine name of the module. - */ -define('FPP_BUNDLES_MACHINE_NAME', 'fpp_bundles'); -/** - * An entity machine name. - */ -define('FPP_BUNDLES_ENTITY_TYPE', 'fieldable_panels_pane'); -/** - * An entity access permissions. - */ -define('FPP_BUNDLES_ENTITY_ACCESS', 'administer fieldable panels panes'); -/** - * An entity admin page. - */ -define('FPP_BUNDLES_ADMIN_URL', 'admin/structure/fieldable-panels-panes'); -/** - * Minimum characters number for name of the bundle. - */ -define('FPP_BUNDLES_MINIMUM_CHARS_FOR_NAME', 3); -/** - * Name of an action for create new bundle. Should not be changed. - */ -define('FPP_BUNDLES_CREATE_BUNDLE_ACTION', 'insert'); -/** - * Name of an action for update an existing bundle. Should not be changed. - */ -define('FPP_BUNDLES_UPDATE_BUNDLE_ACTION', 'update'); -/** - * Name of an action for remove an existing bundle. Should not be changed. - */ -define('FPP_BUNDLES_REMOVE_BUNDLE_ACTION', 'delete'); - -/** - * Implements hook_fpp_bundles_bundle_update(). - */ -function fpp_bundles_fpp_bundles_bundle_insert(\FppBundle $bundle) { - $_SESSION['test']['insert'] = $bundle; -} -/** - * Implements hook_fpp_bundles_bundle_update(). - */ -function fpp_bundles_fpp_bundles_bundle_update(\FppBundle $bundle) { - $_SESSION['test']['update'] = $bundle; -} -/** - * Implements hook_fpp_bundles_bundle_update(). - */ -function fpp_bundles_fpp_bundles_bundle_delete(\FppBundle $bundle) { - $_SESSION['test']['delete'] = $bundle; -} - -/** - * Main controller of the module. - * - * @param string $option_name - * Option name, a value of which will be returned. - * - * @return array - * Module settings or an option value. - */ -function fpp_bundles($option_name = '') { - static $settings = array(); - - if (!$settings) { - foreach (array( - 'autocomplete category' => array( - 'type' => MENU_CALLBACK, - 'page callback' => TRUE, - 'page arguments' => array(5), - ), - FPP_BUNDLES_REMOVE_BUNDLE_ACTION => array( - 'title' => t('Remove the bundle'), - ), - FPP_BUNDLES_UPDATE_BUNDLE_ACTION => array( - 'title' => t('Update the bundle'), - ), - FPP_BUNDLES_CREATE_BUNDLE_ACTION => array( - 'type' => MENU_LOCAL_ACTION, - 'title' => t('Create the bundle'), - ), - ) as $human_name => $data) { - $relative_path = str_replace(' ', '/', $human_name); - // All menu routes of the module relative to the next URL: - // "admin/structure/fieldable-panels-panes/list/{module_route}". - // That's necessary to be a part of the FPP module and complement it. - $route_path = FPP_BUNDLES_ADMIN_URL . '/' . $relative_path; - // The suffix of the routing callback function by default is a - // "manage_bundle". Due to this, default callback function name - // is a "_fpp_bundles_manage_bundle". - $callback_suffix = 'manage_bundle'; - - // If we don't want to use the default route function, then we can - // override it, defining the "page callback". Suffix of the callback - // function will be generated automatically from relative route path. - if (isset($data['page callback'])) { - $callback_suffix = str_replace(' ', '_', $human_name); - unset($data['page callback']); - } - - $settings['menu_routes'][$route_path] = $data + array( - 'type' => MENU_VISIBLE_IN_BREADCRUMB, - 'file' => _fpp_bundles_include_file_path('admin'), - 'page callback' => _fpp_bundles_callback_prefix($callback_suffix), - 'page arguments' => array(3), - 'access arguments' => array(FPP_BUNDLES_ENTITY_ACCESS), - ); - - $settings['menu_paths'][$human_name] = $route_path; - - if (isset($data['title'])) { - $settings['action_titles'][$human_name] = $data['title']; - } - } - } - - return isset($settings[$option_name]) ? $settings[$option_name] : $settings; -} - -/** - * Get an object for working with DB. - * - * @return \FppBundlesDatabase - * An object instance. - */ -function fpp_bundles_db() { - return \FppBundlesDatabase::instance(FPP_BUNDLES_MACHINE_NAME); -} - -/** - * Create or update a bundle programmatically. - * - * @see \FppBundlesDatabase::saveBundle() - */ -function fpp_bundles_save(array $values) { - return fpp_bundles_db()->saveBundle($values); -} - -/** - * Remove bundle programmatically. - * - * @see \FppBundlesDatabase::removeBundle() - */ -function fpp_bundles_remove($bid) { - return fpp_bundles_db()->removeBundle($bid); -} - -/** - * Implements hook_help(). - */ -function fpp_bundles_help($path, $arg) { - $output = ''; - - switch ($path) { - case 'admin/help#' . FPP_BUNDLES_MACHINE_NAME: - return theme(_fpp_bundles_prefix('_admin_help'), func_get_args()); - } - - return $output; -} - -/** - * Implements hook_theme(). - */ -function fpp_bundles_theme($existing, $type, $theme, $path) { - $suggestions = array(); - - foreach (array('_admin_help') as $suggestion) { - $suggestion = _fpp_bundles_prefix($suggestion); - $suggestions[$suggestion] = array( - 'template' => str_replace('_', '-', $suggestion), - 'path' => "$path/templates", - ); - } - - return $suggestions; -} - -/** - * Create the module route. - * - * @return array - * An array of menu routes. - */ -function fpp_bundles_menu() { - return fpp_bundles('menu_routes'); -} - -/** - * Implements hook_features_api(). - */ -function fpp_bundles_features_api() { - $integrations = array(); - - $integrations[FPP_BUNDLES_MACHINE_NAME] = array( - 'name' => t('Fieldable Panels Panes Bundles'), - 'file' => drupal_get_path('module', FPP_BUNDLES_MACHINE_NAME) . '/' . _fpp_bundles_include_file_path('features'), - 'default_hook' => FPP_BUNDLES_MACHINE_NAME, - 'default_file' => FEATURES_DEFAULTS_INCLUDED, - 'feature_source' => TRUE, - ); - - return $integrations; -} - -/** - * Implements hook_entity_info_alter(). - */ -function fpp_bundles_entity_info_alter(&$entity_info) { - /* @var \FppBundle $bundle */ - foreach (fpp_bundles_db()->getAllBundles() as $machine_name => $bundle) { - $entity_info[FPP_BUNDLES_ENTITY_TYPE]['bundles'][$machine_name] = array( - 'bid' => $bundle->getBundleId(), - 'label' => $bundle->getHumanName(), - 'pane category' => $bundle->getCategoryName() ?: t('Custom'), - 'pane top level' => $bundle->isTopLevelPanel(), - 'admin' => array( - 'path' => FPP_BUNDLES_ADMIN_URL . '/manage/%fieldable_panels_panes_type', - 'real path' => FPP_BUNDLES_ADMIN_URL . "/manage/$machine_name", - 'bundle argument' => 4, - 'access arguments' => array(FPP_BUNDLES_ENTITY_ACCESS), - ), - ); - } -} - -/** - * Implements hook_entity_load(). - */ -function fpp_bundles_entity_load(array $entities, $type) { - if ($type == FPP_BUNDLES_ENTITY_TYPE) { - $db = fpp_bundles_db(); - - foreach ($entities as $entity) { - $bundle = $db->getBundleByDbIndex('unique', $entity->bundle); - - if ($bundle) { - $entity->assets = array(); - - if ($bundle->isAssetsLoadAutomatically()) { - _fpp_bundles_collect_assets($entity->assets, $entity->bundle); - } - } - } - } -} - -/** - * Implements hook_preprocess_HOOK(). - */ -function fpp_bundles_preprocess_fieldable_panels_pane(&$variables) { - $entity = $variables['elements']['#element']; - - // The "assets" property is provided by this module and set - // only for entities that has been created from UI. - if (isset($entity->assets)) { - // Add additional assets for administrative users. - if ($variables['is_admin']) { - _fpp_bundles_collect_assets($entity->assets, "admin/$entity->bundle-admin"); - } - - foreach ($entity->assets as $type => $files) { - array_map("drupal_add_$type", $files); - } - } -} - -/** - * Implements hook_menu_alter(). - */ -function fpp_bundles_menu_alter(&$items) { - $items[FPP_BUNDLES_ADMIN_URL]['page callback'] = _fpp_bundles_callback_prefix('entities_page'); -} - -/** - * Get the information about entity of the "fieldable_panels_pane" type. - * - * @return \stdClass - * Entity information. - */ -function fpp_bundles_get_fieldable_panels_pane_entity() { - return (object) entity_get_info(FPP_BUNDLES_ENTITY_TYPE); -} - -/** - * Callback function for the FPP Entities page. - * - * @return array - * An array with elements for render. - */ -function _fpp_bundles_entities_page() { - $items = $rows = array(); - - /* @var \FppBundle $bundle */ - foreach (fpp_bundles_db()->getAllBundles(10) as $machine_name => $bundle) { - $manage_entity_url = FPP_BUNDLES_ADMIN_URL . "/manage/$machine_name"; - $actions = array(); - - $actions['entity'] = _fpp_bundles_build_links_for_operations_with_bundle($manage_entity_url); - - foreach (array( - FPP_BUNDLES_UPDATE_BUNDLE_ACTION => t('update'), - FPP_BUNDLES_REMOVE_BUNDLE_ACTION => t('remove'), - ) as $action_type => $action_name) { - $actions['bundle'][$action_type] = array( - 'title' => $action_name, - 'href' => _fpp_bundles_get_menu_path($action_type) . '/' . $bundle->getBundleId(), - ); - } - - foreach (array_keys($actions) as $action_type) { - $actions[$action_type] = _fpp_bundles_theme_links_block($actions[$action_type]); - } - - $rows[] = array( - 'name' => l($bundle->getHumanName(), $manage_entity_url), - 'category' => $bundle->getCategoryName(), - ) + $actions; - } - - $items['bundles'] = array( - '#theme' => 'table', - '#header' => array( - 'name' => t('Name'), - 'category' => t('Category'), - 'entity' => t('Entity actions'), - 'bundle' => t('Bundle actions'), - ), - '#rows' => $rows, - '#empty' => t('Any bundle has not been created.'), - ); - - $items['pager'] = array( - '#theme' => 'pager', - ); - - $items['separator'] = array( - '#tag' => 'h4', - '#type' => 'html_tag', - '#value' => t('Bundles, that has been created programmatically.'), - '#attributes' => array( - 'class' => 'form-item', - ), - ); - - $items['in_code'] = array( - '#theme' => 'table', - '#header' => array( - 'name' => t('Name'), - 'category' => t('Category'), - 'operations' => t('Operations'), - ), - '#rows' => _fpp_bundles_get_bundles_stored_in_code(), - ); - - return $items; -} - -/** - * Get an array with links for entity managing. - * - * @param string $url_prefix - * Admin URL to bundle page. Will be suffixed by action type. - * - * @return array - * An associative array where key is a machine name of link and - * value - an array with two keys: "title" and "href". - */ -function _fpp_bundles_build_links_for_operations_with_bundle($url_prefix) { - $actions = array(); - - foreach (array( - 'add' => t('add panel'), - 'fields' => t('manage fields'), - 'display' => t('manage display'), - ) as $action_type => $action_name) { - $actions[$action_type] = array( - 'title' => $action_name, - 'href' => "$url_prefix/$action_type", - ); - } - - return $actions; -} - -/** - * Wrapper for Drupal "theme()" function. - * - * @param array $links - * An array that can be rendered by Drupal mechanism. - * - * @return string - * HTML markup. - */ -function _fpp_bundles_theme_links_block(array $links) { - return theme('links', array( - 'links' => $links, - 'attributes' => array( - 'class' => array('links', 'inline'), - ), - )); -} - -/** - * Get an array with bundles for render which has been created programmatically. - */ -function _fpp_bundles_get_bundles_stored_in_code() { - $rows = array(); - - foreach (fpp_bundles_get_fieldable_panels_pane_entity()->bundles as $bundle) { - // If the bundle does not have the "bid" it means that it has - // been created programmatically. - if (!isset($bundle['bid'])) { - $rows[] = array( - 'name' => l($bundle['label'], $bundle['admin']['real path']), - 'category' => isset($bundle['pane category']) ? $bundle['pane category'] : '', - 'operations' => _fpp_bundles_theme_links_block(_fpp_bundles_build_links_for_operations_with_bundle($bundle['admin']['real path'])), - ); - } - } - - return $rows; -} - -/** - * Get the URL by action name. - * - * @param string $action_name - * Name of performed action. - * - * @return string - * Relative URL or an empty string if action does not exist. - */ -function _fpp_bundles_get_menu_path($action_name) { - $paths = fpp_bundles('menu_paths'); - return isset($paths[$action_name]) ? $paths[$action_name] : ''; -} - -/** - * Get the title by action name. - * - * @param string $action_name - * Name of performed action. - * - * @return string - * Title for the specified action or an empty string if action does not exist. - */ -function _fpp_bundles_get_action_title($action_name) { - $titles = fpp_bundles('action_titles'); - return isset($titles[$action_name]) ? $titles[$action_name] : ''; -} - -/** - * Clear caches of the Drupal theme and entities. - */ -function _fpp_bundles_clear_caches() { - entity_info_cache_clear(); - drupal_theme_rebuild(); -} - -/** - * Create function name that prefixed by module name. - * - * @see _fpp_bundles_prefix() - */ -function _fpp_bundles_callback_prefix($suffix) { - return '_' . _fpp_bundles_prefix($suffix); -} - -/** - * Prepend module name into a string. - * - * @param string $suffix - * Ending of a string. - * - * @return string - * Prefixed string. - */ -function _fpp_bundles_prefix($suffix) { - return FPP_BUNDLES_MACHINE_NAME . "_$suffix"; -} - -/** - * Get the relative, to the module directory, file path from "includes" dir. - * - * @param string $type - * File extension. - * - * @return string - * Relative path. - */ -function _fpp_bundles_include_file_path($type) { - return 'includes/' . FPP_BUNDLES_MACHINE_NAME . ".$type.inc"; -} - -/** - * Get an action success message. - * - * @param string $action - * An action name. - * @param string $bundle_name - * The bundle name. - * - * @see \FppBundlesDatabase::performAction() - * - * @return string - * Success message. - */ -function _fpp_bundles_get_action_success_message_by_name($action, $bundle_name) { - $status = ''; - - switch ($action) { - case FPP_BUNDLES_CREATE_BUNDLE_ACTION: - $status = t('created'); - break; - - case FPP_BUNDLES_UPDATE_BUNDLE_ACTION: - $status = t('updated'); - break; - - case FPP_BUNDLES_REMOVE_BUNDLE_ACTION: - $status = t('removed'); - break; - } - - if ($status) { - return t('The "!bundle" bundle was successfully !status!', array( - '!bundle' => $bundle_name, - '!status' => $status, - )); - } - - return $status; -} - -/** - * Transform a any string to machine name. - * - * @param string $string - * Input string for transformations. - * - * @example - * String: "__-_ An awe-some manager!#$%^&_+123=-ÆæØä'Ö\"@ (bundle)" - * Will be transformed to: "an_awe_some_manager123_bundle". - * - * @return string - * Generated name. - */ -function _fpp_bundles_create_machine_name($string) { - // Firstly, set to lowercase the input string. Secondly, leave in a - // row only lowercase latin characters, numbers, and single spaces, - // but only between the words. Thirdly, replace spaces to underscores. - return trim(preg_replace('/\s+|-+/', '_', trim(preg_replace('/[^a-z\d\s-]/', '', strtolower($string)))), '_'); -} - -/** - * Collect an assets for a panel. - * - * @param array $assets - * An array with "css" & "js" keys. - * @param string $name - * File name without extension. - */ -function _fpp_bundles_collect_assets(array &$assets, $name) { - $theme_path = path_to_theme(); - - foreach (array('css', 'js') as $extension) { - $file = $theme_path . str_replace('_', '-', "/$extension/fieldable-panels-panes/$name.$extension"); - - if (file_exists(DRUPAL_ROOT . "/$file")) { - $assets[$extension][] = $file; - } - } -} - diff --git a/profiles/wcm_base/modules/contrib/fpp_bundles/fpp_bundles.test b/profiles/wcm_base/modules/contrib/fpp_bundles/fpp_bundles.test deleted file mode 100644 index 2b9348beda82b7e94c23c9314fa161255f86619a..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/modules/contrib/fpp_bundles/fpp_bundles.test +++ /dev/null @@ -1,224 +0,0 @@ -<?php -/** - * @file - * Test the "FPP Bundles" module functionality. - */ - -/** - * Class FppBundlesTestCase. - */ -class FppBundlesTestCase extends \DrupalWebTestCase { - /** - * Module object. - * - * @var \FppBundlesDatabase - */ - protected $db; - - /** - * Give display information to the SimpleTest system. - * - * @return array - * Keyed array with information for SimpleTest. - */ - public static function getInfo() { - $name = 'FPP Bundles'; - - return array( - 'name' => $name, - 'group' => $name, - 'description' => "Ensure that the \"$name\" provided functions properly.", - ); - } - - /** - * Setup the test environment. - */ - public function setUp() { - $this->db = fpp_bundles_db(); - parent::setUp(FPP_BUNDLES_MACHINE_NAME); - $this->drupalLogin($this->drupalCreateUser(array(FPP_BUNDLES_ENTITY_ACCESS))); - } - - /** - * Build an URL to page on that can be performed some action. - * - * @param string $action - * URL suffix. - * - * @return string - * Page URL. - */ - public function getActionUrl($action) { - return '/' . FPP_BUNDLES_ADMIN_URL . "/$action"; - } - - /** - * Programmatically creating the bundle in database. - * - * @param array $bundle - * An array with bundle data. - * - * @return array - * Information about bundle that has been created. - */ - public function createBundleProgrammatically(array $bundle) { - try { - $bundle['bid'] = $this->db->insertBundle($this->db->prepareBundleData($bundle)); - } - catch (\FppBundlesException $e) { - $this->error($e->getMessage()); - - return FALSE; - } - - return $bundle; - } - - /** - * Get the necessary data for creating the bundle. - * - * @param string $human_name - * The bundle name. - * - * @return array - * Information. - */ - public function getRandomBundleData($human_name = '') { - $human_name = $human_name ?: $this->randomString(14); - - $edit = array(); - $edit['name'] = $human_name; - $edit['level'] = 0; - $edit['assets'] = 1; - $edit['machine'] = preg_replace('/[^a-z0-9_]+/', '_', strtolower($human_name)); - $edit['category'] = $this->randomName(8); - - return $edit; - } - - /** - * Creating a new bundle. - */ - public function testCreateBundle() { - $action = FPP_BUNDLES_CREATE_BUNDLE_ACTION; - $url = $this->getActionUrl($action); - - // Go to the creating page. - $this->drupalGet($url); - $this->assertResponse(200, 'User is allowed to see the page for creating a bundle.'); - $this->assertFieldByName('name', '', 'Found the "name" field in creating form.'); - - // Create new bundle. - $edit = $this->getRandomBundleData('Test bundle'); - $message = _fpp_bundles_get_action_success_message_by_name($action, $edit['name']); - $this->drupalPost($url, $edit, _fpp_bundles_get_action_title($action)); - $this->assertResponse(200, 'The request for bundle creation has been successfully sent.'); - $this->assertText($message, $message); - } - - /** - * Test case, when the name consists only from cyrillic letters. - */ - public function testCreateBundleWithCyrillicSymbols() { - $action = FPP_BUNDLES_CREATE_BUNDLE_ACTION; - $message = t('The machine-readable name must contain unique characters.'); - - $this->drupalPost($this->getActionUrl($action), $this->getRandomBundleData('Кириллица'), _fpp_bundles_get_action_title($action)); - $this->assertText($message, $message); - } - - /** - * Test case, when the name consists only from numbers. - */ - public function testCreateBundleWithNumbers() { - $action = FPP_BUNDLES_CREATE_BUNDLE_ACTION; - $message = t('The name of bundle should not contain only numbers.'); - - $this->drupalPost($this->getActionUrl($action), $this->getRandomBundleData(' 22 1212 3432'), _fpp_bundles_get_action_title($action)); - $this->assertText($message, $message); - } - - /** - * Test case, when the name consists less than five symbols. - */ - public function testCreateBundleWithShortName() { - $action = FPP_BUNDLES_CREATE_BUNDLE_ACTION; - $message = t('The name of bundle should contain more than !number symbols.', array( - '!number' => FPP_BUNDLES_MINIMUM_CHARS_FOR_NAME, - )); - - $this->drupalPost($this->getActionUrl($action), $this->getRandomBundleData(' B1'), _fpp_bundles_get_action_title($action)); - $this->assertText($message, $message); - } - - /** - * Editing an existing bundle. - */ - public function testUpdateBundle() { - // Create the bundle. - $action = FPP_BUNDLES_UPDATE_BUNDLE_ACTION; - $bundle = $this->createBundleProgrammatically($this->getRandomBundleData('The bundle name')); - $url = $this->getActionUrl($action . '/' . $bundle['bid']); - - // Go to the editing page. - $this->drupalGet($url); - $this->assertResponse(200, 'User is allowed to see the page for editing a bundle.'); - $this->assertFieldByName('name', $bundle['name'], 'Found filled field "name" on the edit form.'); - - // Update data. - $bundle['name'] = 'Updated bundle'; - unset($bundle['machine']); - - $message = _fpp_bundles_get_action_success_message_by_name($action, $bundle['name']); - $this->drupalPost($url, $bundle, _fpp_bundles_get_action_title($action)); - $this->assertResponse(200, 'The request for bundle updating has been successfully sent.'); - $this->assertText($message, $message); - } - - /** - * Removing an existing bundle. - */ - public function testRemoveBundle() { - // Create the bundle. - $action = FPP_BUNDLES_REMOVE_BUNDLE_ACTION; - $bundle = $this->createBundleProgrammatically($this->getRandomBundleData('The bundle name')); - $url = $this->getActionUrl($action . '/' . $bundle['bid']); - - // Go to the removing page. - $this->drupalGet($url); - $this->assertResponse(200, 'User is allowed to see the page for removing a bundle.'); - $this->assertText($bundle['name'], 'Found filled field "name" on the edit form.'); - - // Remove the bundle. - $message = _fpp_bundles_get_action_success_message_by_name($action, $bundle['name']); - $this->drupalPost($url, array(), _fpp_bundles_get_action_title($action)); - $this->assertResponse(200, 'The request for bundle deletion has been successfully sent.'); - $this->assertText($message, $message); - } - - /** - * Programmatically create/update/remove the bundle. - */ - public function testCreateUpdateRemoveBundleProgrammatically() { - // Create a bundle. - $status = fpp_bundles_save(array( - 'name' => t('New bundle'), - 'category' => t('FPP Bundles'), - )); - $this->assertTrue($status, 'The bundle was created with help of "fpp_bundles_save" function.'); - - // Update the created bundle. - $status = fpp_bundles_save(array( - 'bid' => 1, - 'name' => t('New bundle name'), - 'level' => 1, - 'assets' => 0, - )); - $this->assertTrue($status, 'The bundle was updated with help of "fpp_bundles_save" function.'); - - // Remove the created bundle. - $status = fpp_bundles_remove(1); - $this->assertTrue($status, 'The bundle was removed with help of "fpp_bundles_save" function.'); - } -} diff --git a/profiles/wcm_base/modules/contrib/fpp_bundles/includes/fpp_bundles.admin.inc b/profiles/wcm_base/modules/contrib/fpp_bundles/includes/fpp_bundles.admin.inc deleted file mode 100644 index d959932cad8e820fff0d175ad92bf5fa4391c4ee..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/modules/contrib/fpp_bundles/includes/fpp_bundles.admin.inc +++ /dev/null @@ -1,219 +0,0 @@ -<?php -/** - * @file - * Admin functions. - */ - -/** - * Form for add/edit the FPP bundle. - * - * @param string $action - * An action that been performed. - * @param int $bid - * The bundle ID. - * - * @see fpp_bundles() - * - * @return array - * An array of form items. - */ -function _fpp_bundles_manage_bundle($action, $bid = NULL) { - if ($action == FPP_BUNDLES_CREATE_BUNDLE_ACTION) { - $bundle = new \FppBundle(); - - if (isset($bid)) { - drupal_goto(_fpp_bundles_get_menu_path($action)); - } - } - else { - $bundle = fpp_bundles_db()->getBundleByDbIndex('primary', $bid); - } - - if (!$bundle) { - drupal_goto(FPP_BUNDLES_ADMIN_URL); - } - - return drupal_get_form(__FUNCTION__ . '_form', $bundle, $action, drupal_set_title(_fpp_bundles_get_action_title($action))); -} - -/** - * Callback function for check bundles categories. - * - * @param string $string - * User input. - */ -function _fpp_bundles_autocomplete_category($string) { - $matches = array(); - $result = fpp_bundles_db() - ->bundleSelectQuery() - ->condition('category', "%$string%", 'like') - ->range(0, 15) - ->execute(); - - foreach ($result as $row) { - $matches[$row->category] = $row->category; - } - - drupal_json_output($matches); -} - -/** - * Settings form for the bundles actions. - * - * @param array $form - * Form items and configuration. - * @param array $form_state - * Information about current state of the form. - * @param \FppBundle $bundle - * Bundle object. - * @param string $action - * Performing action. - * @param string $page_title - * Human readable page name. - * - * @see _fpp_bundles_manage_bundle() - * - * @return array - * Drupal form. - */ -function _fpp_bundles_manage_bundle_form(array $form, array &$form_state, \FppBundle $bundle, $action, $page_title) { - $machine_name = $bundle->getMachineName(); - $bundle_name = $bundle->getHumanName(); - $items = array(); - - // Create hidden fields. - foreach (array( - 'bid' => $bundle->getBundleId(), - 'action' => $action, - ) as $name => $value) { - $items[$name] = array( - '#type' => 'hidden', - '#default_value' => $value, - ); - } - - $items['name'] = array( - '#type' => 'textfield', - '#title' => t('Name of the bundle'), - '#required' => TRUE, - '#default_value' => $bundle_name, - ); - - $items['machine'] = array( - '#type' => 'machine_name', - '#disabled' => (bool) $machine_name, - '#maxlength' => 32, - '#default_value' => $machine_name, - '#machine_name' => array( - 'exists' => _fpp_bundles_callback_prefix('check_machine_name_existence'), - ), - ); - - $items['category'] = array( - '#type' => 'textfield', - '#title' => t('Bundle category'), - '#default_value' => $bundle->getCategoryName(), - '#autocomplete_path' => _fpp_bundles_get_menu_path('autocomplete category'), - ); - - $items['level'] = array( - '#type' => 'checkbox', - '#title' => t('An entity will be shown in the general list?'), - '#description' => t('If "checked", bundle will not shown in category.'), - '#default_value' => $bundle->isTopLevelPanel(), - ); - - $items['assets'] = array( - '#type' => 'checkbox', - '#title' => t('Include CSS & JS files for this bundle automatically?'), - '#default_value' => $bundle->isAssetsLoadAutomatically(), - '#description' => t('If "checked", module will attempt to include assets on page on which bundle is used. For additional information see the !url page.', array( - '!url' => l(t('help'), 'admin/help/' . FPP_BUNDLES_MACHINE_NAME, array( - 'attributes' => array( - 'target' => '_blank', - ), - )), - )), - ); - - $form['actions'] = array( - '#type' => 'actions', - ); - - $form['actions']['save'] = array( - '#type' => 'submit', - '#value' => $page_title, - ); - - if ($action == FPP_BUNDLES_REMOVE_BUNDLE_ACTION) { - $items = array_map('hide', $items); - $form['warning'] = array( - '#markup' => t('Do you really want to remove the "!name" FPP bundle? This action can not to be undone!', array( - '!name' => "<b>$bundle_name</b>", - )), - ); - } - - return $items + $form; -} - -/** - * Drupal machine name validation callback. - * - * @param string $machine_name - * Generated machine name. - * - * @return bool - * Status of the name existence. - */ -function _fpp_bundles_check_machine_name_existence($machine_name) { - if (isset(fpp_bundles_get_fieldable_panels_pane_entity()->bundles[$machine_name])) { - return TRUE; - } - - return FALSE; -} - -/** - * Validation handler for _fpp_bundles_manage_bundle_form(). - */ -function _fpp_bundles_manage_bundle_form_validate(array $form, array &$form_state) { - $values = $form_state['values']; - - if (empty($values['category'])) { - unset($values['category']); - } - - try { - $form_state['bundle'] = fpp_bundles_db()->validateBundle($values); - } - catch (\FppBundlesException $e) { - form_set_error('name', $e->getMessage()); - } - - // Set the remove action if needed. - if ($values['action'] == FPP_BUNDLES_REMOVE_BUNDLE_ACTION) { - $form_state['bundle']['action'] = $values['action']; - } -} - -/** - * Submit handler for _fpp_bundles_manage_bundle_form(). - */ -function _fpp_bundles_manage_bundle_form_submit(array $form, array &$form_state) { - $bundle = $form_state['bundle']; - // @todo Remove all fields of the bundle together with it. - $status = fpp_bundles_db()->performAction($bundle['action'], $bundle['values']); - $message = t('Cannot complete the "!action" operation.', array( - '!action' => $bundle['action'], - )); - - if ($status) { - _fpp_bundles_clear_caches(); - $message = _fpp_bundles_get_action_success_message_by_name($bundle['action'], $bundle['values']['name']); - } - - drupal_set_message($message); - - $form_state['redirect'] = FPP_BUNDLES_ADMIN_URL; -} diff --git a/profiles/wcm_base/modules/contrib/fpp_bundles/includes/fpp_bundles.features.inc b/profiles/wcm_base/modules/contrib/fpp_bundles/includes/fpp_bundles.features.inc deleted file mode 100644 index 67ebfb8588201add8366544d238f6f1717cfd231..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/modules/contrib/fpp_bundles/includes/fpp_bundles.features.inc +++ /dev/null @@ -1,94 +0,0 @@ -<?php -/** - * @file - * Implements the Features API for export bundles as features. - */ - -/** - * Implements hook_features_export_options(). - */ -function fpp_bundles_features_export_options() { - $options = array(); - - /* @var \FppBundle $bundle */ - foreach (fpp_bundles_db()->getAllBundles() as $machine_name => $bundle) { - $options[$machine_name] = $bundle->getHumanName(); - } - - return $options; -} - -/** - * Implements hook_features_export(). - */ -function fpp_bundles_features_export($data, &$export, $feature_name, $module_name) { - $export['dependencies'][$module_name] = $module_name; - $prop = 'field' . (FEATURES_API >= 2 ? '_instance' : ''); - $pipe = array(); - - foreach ($data as $bundle_machine_name) { - $export['features'][$module_name][$bundle_machine_name] = $bundle_machine_name; - - $bundle_fields = db_select('field_config_instance', 'fci') - ->fields('fci', array('field_name')) - ->condition('bundle', $bundle_machine_name, '=') - ->execute() - ->fetchCol(); - - foreach ($bundle_fields as $field_name) { - $field_instance_args = array(FPP_BUNDLES_ENTITY_TYPE, $bundle_machine_name, $field_name); - $field_instance_id = implode('-', $field_instance_args); - $field_instance = call_user_func_array('field_info_instance', $field_instance_args); - - if ($field_instance) { - $export['dependencies'][$field_instance['widget']['module']] = $field_instance['widget']['module']; - } - - $export['features'][$prop][$field_instance_id] = $field_instance_id; - $pipe['field_base'][$field_name] = $field_name; - } - } - - return $pipe; -} - -/** - * Implements hook_features_export_render(). - */ -function fpp_bundles_features_export_render($feature_name, $data, $export = NULL) { - $code = array(); - - foreach ($data as $bundle_machine_name) { - $bundle = fpp_bundles_db()->getBundleByMachineName($bundle_machine_name); - - if ($bundle) { - $code += $bundle->export(); - } - } - - return array( - FPP_BUNDLES_MACHINE_NAME => ' return ' . features_var_export($code, ' ') . ';', - ); -} - -/** - * Implements hook_features_rebuild(). - */ -function fpp_bundles_features_rebuild($feature_name) { - $db = fpp_bundles_db(); - - foreach (module_invoke($feature_name, FPP_BUNDLES_MACHINE_NAME) as $machine_name => $values) { - if (!$db->getBundleByMachineName($machine_name)) { - $db->insertBundle($values); - } - } - - _fpp_bundles_clear_caches(); -} - -/** - * Implements hook_features_revert(). - */ -function fpp_bundles_features_revert($feature_name) { - fpp_bundles_features_rebuild($feature_name); -} diff --git a/profiles/wcm_base/modules/contrib/fpp_bundles/templates/fpp-bundles--admin-help.tpl.php b/profiles/wcm_base/modules/contrib/fpp_bundles/templates/fpp-bundles--admin-help.tpl.php deleted file mode 100644 index f1dccc2299c66d2b09535ebc0f953c9ab67e3ca7..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/modules/contrib/fpp_bundles/templates/fpp-bundles--admin-help.tpl.php +++ /dev/null @@ -1,143 +0,0 @@ -<?php -/** - * @file - * Admin help for FPP Bundles. - */ -?> -<section class="assets" role="region"> - <h2 role="heading"> - <?php print t('Automatically include the CSS & JS'); ?> - </h2> - <p> - <?php - print t('If panel has the "!name" machine name, then the module will try to find CSS & JS in following directories:', array( - '!name' => '<b>media_bundle</b>', - )); - ?> - </p> - <ul> - <li>PATH/TO/THEME/css/fieldable-panels-panes/media-bundle.css</li> - <li>PATH/TO/THEME/js/fieldable-panels-panes/media-bundle.js</li> - </ul> - <p> - <?php print t('Also, for <b>administrative users</b> can be added the additional assets. The files should be placed and named the same as in the next example:'); ?> - </p> - <ul> - <li>PATH/TO/THEME/css/fieldable-panels-panes/admin/media-bundle-admin.css</li> - <li>PATH/TO/THEME/js/fieldable-panels-panes/admin/media-bundle-admin.js</li> - </ul> - <h4 role="heading"> - <?php print t('Templates'); ?> - </h4> - <p> - <?php print t('For each panel can be created the template file in "templates" directory of current Drupal theme. But strongly recommended to store the templates in:'); ?> - </p> - <ul> - <li>PATH/TO/THEME/templates/fieldable-panels-panes/fieldable-panels-pane--media-bundle.tpl.php</li> - </ul> -</section> - -<br /> -<hr /> -<br /> - -<section class="api" role="region"> - <h2 role="heading"> - <?php print t('Application programming interface'); ?> - </h2> - <p><?php print t('The module has the next hooks:'); ?></p> - <ul> - <li> - <b>hook_fpp_bundles_bundle_insert</b> - </li> - <li> - <b>hook_fpp_bundles_bundle_update</b> - </li> - <li> - <b>hook_fpp_bundles_bundle_delete</b> - </li> - </ul> - <p><?php print t('Each of this hooks occurs after successfully operation with DB and called only when event happened and cannot affect on the data structure.'); ?></p> - <h6 role="heading"> - <?php print t('Also, the next functions can help for developers:'); ?> - </h6> - <ul> - <li> - <b>fpp_bundles_save</b> - <?php print t('Programmatically save the new bundle;'); ?> - </li> - <li> - <b>fpp_bundles_remove</b> - <?php print t('Programmatically update an existing bundle.'); ?> - </li> - </ul> - <br /> - <div> - <strong> - <?php print t('Creation example:'); ?> - </strong> - <pre> -// If the value of "$status" variable will be TRUE, then bundle was -// created successfully, in another case the error message will be -// stored in the Dblog and the value will be FALSE. -$status = fpp_bundles_save(array( - // The "name" is required. - 'name' => 'Video', - // By default it set to "0", - 'level' => 1, - // By default it set to "1". - 'assets' => 0, - // By default it is empty. - 'category' => 'Media', -)); - </pre> - </div> - <div> - <strong> - <?php print t('Update example:'); ?> - </strong> - <pre> -// Change only one parameter of the bundle. -$status = fpp_bundles_save(array( - // The ID of created bundle. - 'bid' => 1, - // Change "assets" to "1". - 'assets' => 1, -)); - </pre> - </div> - <div> - <strong> - <?php print t('Remove example:'); ?> - </strong> - <pre> -// Remove the bundle by ID. If bundle with such ID does not exist, -// then error message will be stored in the Dblog and a value -// of "$status" variable will be FALSE. -$status = fpp_bundles_remove(1); - </pre> - </div> - <div> - <strong> - <?php print t('Append your own assets in <b>preprocess</b> hooks:'); ?> - </strong> - <pre> -/** - * Implements hook_preprocess_HOOK(). - */ -function hook_preprocess_fieldable_panels_pane(&$variables) { - $entity = $variables['elements']['#element']; - - // The "assets" property provided by "FPP Bundles" module - // and allowed only for panels, created from UI. - if (isset($entity->assets)) { - $entity->assets['css'][] = 'path/to/your/own/file.css'; - } -} - </pre> - </div> - <p> - <?php print t('Highly recomended to create/update/delete the bundles !link and export them with !features.', array( - '!link' => l(t('via UI'), 'admin/structure/fieldable-panels-panes'), - '!features' => l(t('Features'), 'https://www.drupal.org/project/features'), - )); ?> - </p> -</section> diff --git a/profiles/wcm_base/modules/contrib/views_isotope/LICENSE.txt b/profiles/wcm_base/modules/contrib/views_isotope/LICENSE.txt deleted file mode 100644 index d159169d1050894d3ea3b98e1c965c4058208fe1..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/modules/contrib/views_isotope/LICENSE.txt +++ /dev/null @@ -1,339 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - <one line to give the program's name and a brief idea of what it does.> - Copyright (C) <year> <name of author> - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - <signature of Ty Coon>, 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. diff --git a/profiles/wcm_base/modules/contrib/views_isotope/README.txt b/profiles/wcm_base/modules/contrib/views_isotope/README.txt deleted file mode 100755 index 9bf161786d3d77ff5651b8c029cf30e3da0370f6..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/modules/contrib/views_isotope/README.txt +++ /dev/null @@ -1,19 +0,0 @@ -Views Isotope -------------- -Views Isotope is a views style plugin that allows views to return results as jQuery Isotope styled structure. - -## Dependencies -* views -* jquery_update -* libraries - -## Installation -* Download the latest version of [jquery.isotope.min.js][jquery.isotope] -* Place jquery.isotope.min.js in sites/all/libraries/jquery.isotope/ - -### Note -The D7 version of this module was based on a D6 version found in @funkym's sandbox -The D6 code was build using methods borrowed from views_cycle - -[jquery.isotope]: http://isotope.metafizzy.co/jquery.isotope.min.js -[views_cycle]: http://drupal.org/project/views_cycle \ No newline at end of file diff --git a/profiles/wcm_base/modules/contrib/views_isotope/isotope_example_feature/isotope_example_feature.features.field.inc b/profiles/wcm_base/modules/contrib/views_isotope/isotope_example_feature/isotope_example_feature.features.field.inc deleted file mode 100644 index 629006c36273bd16042a0633bf92aee4564dfbe6..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/modules/contrib/views_isotope/isotope_example_feature/isotope_example_feature.features.field.inc +++ /dev/null @@ -1,167 +0,0 @@ -<?php -/** - * @file - * isotope_example_feature.features.field.inc - */ - -/** - * Implements hook_field_default_fields(). - */ -function isotope_example_feature_field_default_fields() { - $fields = array(); - - // Exported field: 'node-article-body'. - $fields['node-article-body'] = array( - 'field_config' => array( - 'active' => '1', - 'cardinality' => '1', - 'deleted' => '0', - 'entity_types' => array( - 0 => 'node', - ), - 'field_name' => 'body', - 'foreign keys' => array( - 'format' => array( - 'columns' => array( - 'format' => 'format', - ), - 'table' => 'filter_format', - ), - ), - 'indexes' => array( - 'format' => array( - 0 => 'format', - ), - ), - 'locked' => '0', - 'module' => 'text', - 'settings' => array(), - 'translatable' => '0', - 'type' => 'text_with_summary', - ), - 'field_instance' => array( - 'bundle' => 'article', - 'default_value' => NULL, - 'deleted' => '0', - 'description' => '', - 'display' => array( - 'default' => array( - 'label' => 'hidden', - 'module' => 'text', - 'settings' => array(), - 'type' => 'text_default', - 'weight' => '0', - ), - 'teaser' => array( - 'label' => 'hidden', - 'module' => 'text', - 'settings' => array( - 'trim_length' => 600, - ), - 'type' => 'text_summary_or_trimmed', - 'weight' => 0, - ), - ), - 'entity_type' => 'node', - 'field_name' => 'body', - 'label' => 'Body', - 'required' => FALSE, - 'settings' => array( - 'display_summary' => TRUE, - 'text_processing' => 1, - 'user_register_form' => FALSE, - ), - 'widget' => array( - 'module' => 'text', - 'settings' => array( - 'rows' => 20, - 'summary_rows' => 5, - ), - 'type' => 'text_textarea_with_summary', - 'weight' => '2', - ), - ), - ); - - // Exported field: 'node-article-field_tags'. - $fields['node-article-field_tags'] = array( - 'field_config' => array( - 'active' => '1', - 'cardinality' => '-1', - 'deleted' => '0', - 'entity_types' => array(), - 'field_name' => 'field_tags', - 'foreign keys' => array( - 'tid' => array( - 'columns' => array( - 'tid' => 'tid', - ), - 'table' => 'taxonomy_term_data', - ), - ), - 'indexes' => array( - 'tid' => array( - 0 => 'tid', - ), - ), - 'locked' => '0', - 'module' => 'taxonomy', - 'settings' => array( - 'allowed_values' => array( - 0 => array( - 'vocabulary' => 'tags', - 'parent' => 0, - ), - ), - ), - 'translatable' => '0', - 'type' => 'taxonomy_term_reference', - ), - 'field_instance' => array( - 'bundle' => 'article', - 'default_value' => NULL, - 'deleted' => '0', - 'description' => 'Enter a comma-separated list of words to describe your content.', - 'display' => array( - 'default' => array( - 'label' => 'inline', - 'module' => 'taxonomy', - 'settings' => array(), - 'type' => 'taxonomy_term_reference_link', - 'weight' => '10', - ), - 'teaser' => array( - 'label' => 'above', - 'module' => 'taxonomy', - 'settings' => array(), - 'type' => 'taxonomy_term_reference_link', - 'weight' => 10, - ), - ), - 'entity_type' => 'node', - 'field_name' => 'field_tags', - 'label' => 'Tags', - 'required' => FALSE, - 'settings' => array( - 'user_register_form' => FALSE, - ), - 'widget' => array( - 'module' => 'taxonomy', - 'settings' => array( - 'autocomplete_path' => 'taxonomy/autocomplete', - 'size' => 60, - ), - 'type' => 'taxonomy_autocomplete', - 'weight' => '4', - ), - ), - ); - - // Translatables - // Included for use with string extractors like potx. - t('Body'); - t('Enter a comma-separated list of words to describe your content.'); - t('Tags'); - - return $fields; -} diff --git a/profiles/wcm_base/modules/contrib/views_isotope/isotope_example_feature/isotope_example_feature.features.inc b/profiles/wcm_base/modules/contrib/views_isotope/isotope_example_feature/isotope_example_feature.features.inc deleted file mode 100644 index ea7da4ffc753d1c2754794b68e4983ada8291bcf..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/modules/contrib/views_isotope/isotope_example_feature/isotope_example_feature.features.inc +++ /dev/null @@ -1,29 +0,0 @@ -<?php -/** - * @file - * isotope_example_feature.features.inc - */ - -/** - * Implements hook_views_api(). - */ -function isotope_example_feature_views_api() { - return array("version" => "3.0"); -} - -/** - * Implements hook_node_info(). - */ -function isotope_example_feature_node_info() { - $items = array( - 'article' => array( - 'name' => t('Article'), - 'base' => 'node_content', - 'description' => t('Use <em>articles</em> for time-sensitive content like news, press releases or blog posts.'), - 'has_title' => '1', - 'title_label' => t('Title'), - 'help' => '', - ), - ); - return $items; -} diff --git a/profiles/wcm_base/modules/contrib/views_isotope/isotope_example_feature/isotope_example_feature.features.taxonomy.inc b/profiles/wcm_base/modules/contrib/views_isotope/isotope_example_feature/isotope_example_feature.features.taxonomy.inc deleted file mode 100644 index 02c1272bf0af2f2bab5d5ba4e91d80dd05b8b0c8..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/modules/contrib/views_isotope/isotope_example_feature/isotope_example_feature.features.taxonomy.inc +++ /dev/null @@ -1,29 +0,0 @@ -<?php -/** - * @file - * isotope_example_feature.features.taxonomy.inc - */ - -/** - * Implements hook_taxonomy_default_vocabularies(). - */ -function isotope_example_feature_taxonomy_default_vocabularies() { - return array( - 'isotope_sort_options' => array( - 'name' => 'Isotope sort options', - 'machine_name' => 'isotope_sort_options', - 'description' => '', - 'hierarchy' => '0', - 'module' => 'taxonomy', - 'weight' => '0', - ), - 'tags' => array( - 'name' => 'Tags', - 'machine_name' => 'tags', - 'description' => 'Use tags to group articles on similar topics into categories.', - 'hierarchy' => '0', - 'module' => 'taxonomy', - 'weight' => '0', - ), - ); -} diff --git a/profiles/wcm_base/modules/contrib/views_isotope/isotope_example_feature/isotope_example_feature.info b/profiles/wcm_base/modules/contrib/views_isotope/isotope_example_feature/isotope_example_feature.info deleted file mode 100644 index 43820b4056802d32d757998c21f115478b351ccd..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/modules/contrib/views_isotope/isotope_example_feature/isotope_example_feature.info +++ /dev/null @@ -1,26 +0,0 @@ -name = Isotope Example -description = Sample Isotope Grid of articles filtered by tags -core = 7.x -package = Features -php = 5.2.4 -dependencies[] = features -dependencies[] = taxonomy -dependencies[] = views -dependencies[] = views_isotope -features[ctools][] = views:views_default:3.0 -features[features_api][] = api:1 -features[field][] = node-article-body -features[field][] = node-article-field_tags -features[node][] = article -features[taxonomy][] = isotope_sort_options -features[taxonomy][] = tags -features[views_view][] = isotope_example -features[views_view][] = isotope_example_filter_block -features[views_view][] = isotope_example_sort_block - -; Information added by Drupal.org packaging script on 2014-08-05 -version = "7.x-2.0-alpha1" -core = "7.x" -project = "views_isotope" -datestamp = "1407277128" - diff --git a/profiles/wcm_base/modules/contrib/views_isotope/isotope_example_feature/isotope_example_feature.module b/profiles/wcm_base/modules/contrib/views_isotope/isotope_example_feature/isotope_example_feature.module deleted file mode 100644 index 4fd5f7ab2d169782baa3de6c22b0ea3b5e8d3972..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/modules/contrib/views_isotope/isotope_example_feature/isotope_example_feature.module +++ /dev/null @@ -1,7 +0,0 @@ -<?php -/** - * @file - * Code for the Isotope Example feature. - */ - -include_once('isotope_example_feature.features.inc'); diff --git a/profiles/wcm_base/modules/contrib/views_isotope/isotope_example_feature/isotope_example_feature.views_default.inc b/profiles/wcm_base/modules/contrib/views_isotope/isotope_example_feature/isotope_example_feature.views_default.inc deleted file mode 100644 index 187bf415dd08d49eea53dbb0ff80337ee31b8a3e..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/modules/contrib/views_isotope/isotope_example_feature/isotope_example_feature.views_default.inc +++ /dev/null @@ -1,196 +0,0 @@ -<?php -/** - * @file - * isotope_example_feature.views_default.inc - */ - -/** - * Implements hook_views_default_views(). - */ -function isotope_example_feature_views_default_views() { - $export = array(); - - $view = new view(); - $view->name = 'isotope_example'; - $view->description = ''; - $view->tag = 'default'; - $view->base_table = 'node'; - $view->human_name = 'isotope_example'; - $view->core = 7; - $view->api_version = '3.0'; - $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */ - - /* Display: Master */ - $handler = $view->new_display('default', 'Master', 'default'); - $handler->display->display_options['title'] = 'isotope_example'; - $handler->display->display_options['use_more_always'] = FALSE; - $handler->display->display_options['access']['type'] = 'perm'; - $handler->display->display_options['cache']['type'] = 'none'; - $handler->display->display_options['query']['type'] = 'views_query'; - $handler->display->display_options['query']['options']['query_comment'] = FALSE; - $handler->display->display_options['exposed_form']['type'] = 'basic'; - $handler->display->display_options['pager']['type'] = 'some'; - $handler->display->display_options['pager']['options']['items_per_page'] = '10'; - $handler->display->display_options['style_plugin'] = 'isotope'; - $handler->display->display_options['row_plugin'] = 'fields'; - /* Header: Global: View area */ - $handler->display->display_options['header']['view']['id'] = 'view'; - $handler->display->display_options['header']['view']['table'] = 'views'; - $handler->display->display_options['header']['view']['field'] = 'view'; - $handler->display->display_options['header']['view']['view_to_insert'] = 'isotope_example_filter_block:isotope_filter'; - /* Header: Global: View area */ - $handler->display->display_options['header']['view_1']['id'] = 'view_1'; - $handler->display->display_options['header']['view_1']['table'] = 'views'; - $handler->display->display_options['header']['view_1']['field'] = 'view'; - $handler->display->display_options['header']['view_1']['view_to_insert'] = 'isotope_example_sort_block:isotope_sort'; - /* Field: Content: Title */ - $handler->display->display_options['fields']['title']['id'] = 'title'; - $handler->display->display_options['fields']['title']['table'] = 'node'; - $handler->display->display_options['fields']['title']['field'] = 'title'; - $handler->display->display_options['fields']['title']['label'] = ''; - $handler->display->display_options['fields']['title']['alter']['word_boundary'] = FALSE; - $handler->display->display_options['fields']['title']['alter']['ellipsis'] = FALSE; - /* Field: Content: Tags */ - $handler->display->display_options['fields']['field_tags']['id'] = 'field_tags'; - $handler->display->display_options['fields']['field_tags']['table'] = 'field_data_field_tags'; - $handler->display->display_options['fields']['field_tags']['field'] = 'field_tags'; - $handler->display->display_options['fields']['field_tags']['label'] = ''; - $handler->display->display_options['fields']['field_tags']['element_type'] = 'div'; - $handler->display->display_options['fields']['field_tags']['element_class'] = 'isotope-filter'; - $handler->display->display_options['fields']['field_tags']['element_label_colon'] = FALSE; - $handler->display->display_options['fields']['field_tags']['element_default_classes'] = FALSE; - $handler->display->display_options['fields']['field_tags']['type'] = 'taxonomy_term_reference_plain'; - $handler->display->display_options['fields']['field_tags']['delta_offset'] = '0'; - /* Field: Content: Title */ - $handler->display->display_options['fields']['title_1']['id'] = 'title_1'; - $handler->display->display_options['fields']['title_1']['table'] = 'node'; - $handler->display->display_options['fields']['title_1']['field'] = 'title'; - $handler->display->display_options['fields']['title_1']['label'] = ''; - $handler->display->display_options['fields']['title_1']['element_type'] = 'div'; - $handler->display->display_options['fields']['title_1']['element_class'] = 'isotope-sort title'; - $handler->display->display_options['fields']['title_1']['element_label_colon'] = FALSE; - $handler->display->display_options['fields']['title_1']['element_wrapper_type'] = '0'; - $handler->display->display_options['fields']['title_1']['element_default_classes'] = FALSE; - $handler->display->display_options['fields']['title_1']['link_to_node'] = FALSE; - /* Sort criterion: Content: Post date */ - $handler->display->display_options['sorts']['created']['id'] = 'created'; - $handler->display->display_options['sorts']['created']['table'] = 'node'; - $handler->display->display_options['sorts']['created']['field'] = 'created'; - $handler->display->display_options['sorts']['created']['order'] = 'DESC'; - /* Filter criterion: Content: Published */ - $handler->display->display_options['filters']['status']['id'] = 'status'; - $handler->display->display_options['filters']['status']['table'] = 'node'; - $handler->display->display_options['filters']['status']['field'] = 'status'; - $handler->display->display_options['filters']['status']['value'] = 1; - $handler->display->display_options['filters']['status']['group'] = 1; - $handler->display->display_options['filters']['status']['expose']['operator'] = FALSE; - /* Filter criterion: Content: Type */ - $handler->display->display_options['filters']['type']['id'] = 'type'; - $handler->display->display_options['filters']['type']['table'] = 'node'; - $handler->display->display_options['filters']['type']['field'] = 'type'; - $handler->display->display_options['filters']['type']['value'] = array( - 'article' => 'article', - ); - - /* Display: Page */ - $handler = $view->new_display('page', 'Page', 'page'); - $handler->display->display_options['defaults']['hide_admin_links'] = FALSE; - $handler->display->display_options['path'] = 'isotope-example'; - $export['isotope_example'] = $view; - - $view = new view(); - $view->name = 'isotope_example_filter_block'; - $view->description = ''; - $view->tag = 'default'; - $view->base_table = 'taxonomy_term_data'; - $view->human_name = 'isotope_example_filter_block'; - $view->core = 7; - $view->api_version = '3.0'; - $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */ - - /* Display: Master */ - $handler = $view->new_display('default', 'Master', 'default'); - $handler->display->display_options['title'] = 'isotope_example_filter_block'; - $handler->display->display_options['use_more_always'] = FALSE; - $handler->display->display_options['access']['type'] = 'perm'; - $handler->display->display_options['cache']['type'] = 'none'; - $handler->display->display_options['query']['type'] = 'views_query'; - $handler->display->display_options['query']['options']['query_comment'] = FALSE; - $handler->display->display_options['exposed_form']['type'] = 'basic'; - $handler->display->display_options['pager']['type'] = 'some'; - $handler->display->display_options['pager']['options']['items_per_page'] = '10'; - $handler->display->display_options['pager']['options']['offset'] = '0'; - $handler->display->display_options['style_plugin'] = 'isotope_filter_block'; - $handler->display->display_options['row_plugin'] = 'fields'; - $handler->display->display_options['row_options']['default_field_elements'] = FALSE; - /* Field: Taxonomy term: Name */ - $handler->display->display_options['fields']['name']['id'] = 'name'; - $handler->display->display_options['fields']['name']['table'] = 'taxonomy_term_data'; - $handler->display->display_options['fields']['name']['field'] = 'name'; - $handler->display->display_options['fields']['name']['label'] = ''; - $handler->display->display_options['fields']['name']['alter']['word_boundary'] = FALSE; - $handler->display->display_options['fields']['name']['alter']['ellipsis'] = FALSE; - $handler->display->display_options['fields']['name']['element_label_colon'] = FALSE; - $handler->display->display_options['fields']['name']['element_default_classes'] = FALSE; - /* Filter criterion: Taxonomy vocabulary: Machine name */ - $handler->display->display_options['filters']['machine_name']['id'] = 'machine_name'; - $handler->display->display_options['filters']['machine_name']['table'] = 'taxonomy_vocabulary'; - $handler->display->display_options['filters']['machine_name']['field'] = 'machine_name'; - $handler->display->display_options['filters']['machine_name']['value'] = array( - 'tags' => 'tags', - ); - - /* Display: Block */ - $handler = $view->new_display('block', 'Block', 'isotope_filter'); - $handler->display->display_options['defaults']['hide_admin_links'] = FALSE; - $export['isotope_example_filter_block'] = $view; - - $view = new view(); - $view->name = 'isotope_example_sort_block'; - $view->description = ''; - $view->tag = 'default'; - $view->base_table = 'taxonomy_term_data'; - $view->human_name = 'isotope_example_sort_block'; - $view->core = 7; - $view->api_version = '3.0'; - $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */ - - /* Display: Master */ - $handler = $view->new_display('default', 'Master', 'default'); - $handler->display->display_options['title'] = 'isotope_example_sort_block'; - $handler->display->display_options['use_more_always'] = FALSE; - $handler->display->display_options['access']['type'] = 'perm'; - $handler->display->display_options['cache']['type'] = 'none'; - $handler->display->display_options['query']['type'] = 'views_query'; - $handler->display->display_options['query']['options']['query_comment'] = FALSE; - $handler->display->display_options['exposed_form']['type'] = 'basic'; - $handler->display->display_options['pager']['type'] = 'some'; - $handler->display->display_options['pager']['options']['items_per_page'] = '10'; - $handler->display->display_options['pager']['options']['offset'] = '0'; - $handler->display->display_options['style_plugin'] = 'isotope_sort_block'; - $handler->display->display_options['row_plugin'] = 'fields'; - $handler->display->display_options['row_options']['default_field_elements'] = FALSE; - /* Field: Taxonomy term: Name */ - $handler->display->display_options['fields']['name']['id'] = 'name'; - $handler->display->display_options['fields']['name']['table'] = 'taxonomy_term_data'; - $handler->display->display_options['fields']['name']['field'] = 'name'; - $handler->display->display_options['fields']['name']['label'] = ''; - $handler->display->display_options['fields']['name']['alter']['word_boundary'] = FALSE; - $handler->display->display_options['fields']['name']['alter']['ellipsis'] = FALSE; - $handler->display->display_options['fields']['name']['element_label_colon'] = FALSE; - $handler->display->display_options['fields']['name']['element_default_classes'] = FALSE; - /* Filter criterion: Taxonomy vocabulary: Machine name */ - $handler->display->display_options['filters']['machine_name']['id'] = 'machine_name'; - $handler->display->display_options['filters']['machine_name']['table'] = 'taxonomy_vocabulary'; - $handler->display->display_options['filters']['machine_name']['field'] = 'machine_name'; - $handler->display->display_options['filters']['machine_name']['value'] = array( - 'isotope_sort_options' => 'isotope_sort_options', - ); - - /* Display: Block */ - $handler = $view->new_display('block', 'Block', 'isotope_sort'); - $handler->display->display_options['defaults']['hide_admin_links'] = FALSE; - $export['isotope_example_sort_block'] = $view; - - return $export; -} diff --git a/profiles/wcm_base/modules/contrib/views_isotope/views-isotope-filter-block.tpl.php b/profiles/wcm_base/modules/contrib/views_isotope/views-isotope-filter-block.tpl.php deleted file mode 100755 index 65b5167cf1ed99e892f861c00f4454ab2eada6a7..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/modules/contrib/views_isotope/views-isotope-filter-block.tpl.php +++ /dev/null @@ -1,29 +0,0 @@ -<?php -/** - * @file views-isotope-filter-block.tpl.php - * Default simple view template to display a list of rows. - * - * @ingroup views_templates - */ -?> - -<div class="isotope-options"> - <ul class="isotope-filters option-set clearfix" data-option-key="filter"> - - <li><a href="#filter" data-option-value="*" class="selected"><?php print t('All'); ?></a></li> - <?php foreach ( $rows as $id => $row ): ?> - - <?php - // Sanitize filter value. - $dataoption = trim(strip_tags(strtolower($row))); - $dataoption = str_replace(' ', '-', $dataoption); - $dataoption = str_replace('/', '-', $dataoption); - $dataoption = str_replace('&', '', $dataoption); - ?> - - <li><a class="filterbutton" data-option-value=".<?php print $dataoption; ?>" href="#filter"><?php print trim($row); ?></a></li> - - <?php endforeach; ?> - - </ul> -</div> diff --git a/profiles/wcm_base/modules/contrib/views_isotope/views-isotope-sort-block.tpl.php b/profiles/wcm_base/modules/contrib/views_isotope/views-isotope-sort-block.tpl.php deleted file mode 100644 index 6994ce8af37d061657af3249e6d3ec8cad476720..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/modules/contrib/views_isotope/views-isotope-sort-block.tpl.php +++ /dev/null @@ -1,32 +0,0 @@ -<?php -/** - * @file views-isotope-sort-block.tpl.php - * Default simple view template to display a list of rows. - * - * @ingroup views_templates - */ -?> - -<div class="isotope-options"> - <ul class="isotope-sort option-set clearfix" data-option-key="sortBy"> - - <?php foreach ($rows as $id => $row): ?> - - <?php - // Sanitize sort option value. - $dataoption = trim(strip_tags(strtolower($row))); - $dataoption = str_replace(' ', '-', $dataoption); - $dataoption = str_replace('/', '-', $dataoption); - $dataoption = str_replace('&', '', $dataoption); - ?> - - <li><a class="sortbutton" data-option-value="<?php print $dataoption; ?>" href="#sortBy=<?php print $dataoption; ?>"><?php print trim($row); ?></a></li> - - <?php endforeach; ?> - - </ul> - <ul id="isotope-sort-direction" class="option-set clearfix" data-option-key="sortAscending"> - <li><a class="sortbutton" href="#sortAscending=true" data-option-value="true" class="selected"><?php print t('Ascending'); ?></a></li> - <li><a class="sortbutton" href="#sortAscending=false" data-option-value="false"><?php print t('Descending');?></a></li> - </ul> -</div> \ No newline at end of file diff --git a/profiles/wcm_base/modules/contrib/views_isotope/views-isotope.tpl.php b/profiles/wcm_base/modules/contrib/views_isotope/views-isotope.tpl.php deleted file mode 100755 index 331dd4a2f4930c7b4a2eb5a17c3f6aa8578a9eb0..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/modules/contrib/views_isotope/views-isotope.tpl.php +++ /dev/null @@ -1,87 +0,0 @@ -<?php -/** - * @file views-isotope.tpl.php - * Default simple view template to display a list of rows. - * - * @ingroup views_templates - */ -?> - <div id="isotope-container"> - <?php - $looped = FALSE; - - $js = '(function($) { $(document).ready(function() { var $container = $(\'#isotope-container\'); $container.isotope(\'option\', { getSortData : { @sortdata } }); $container.isotope(\'updateSortData\', $(\'.isotope-element\')); }); })(jQuery);'; - $sortdata = ''; - ?> - <?php foreach ($rows as $id => $row): ?> - <?php - $classlist = NULL; - - // Pull out isotope-filter class if it exists. - if (strstr($row, '<div class="isotope-filter">')) { - // *** F I L T E R S *** - $filter_matches = array(); - preg_match_all('/<div class="isotope-filter">(.*?)<\/div>/', $row, $filter_matches); - - // Build filter matches string. - if (is_array($filter_matches[1])) { - $filter_matches = implode(', ', $filter_matches[1]); - } else { - $filter_matches = isset($filter_matches[1]) ? $filter_matches[1] : NULL; - } - - if (isset($filter_matches)) { - if (strstr($filter_matches, ',')) { - // Check for commas and treat as an array for list of taxonomy terms. - $classes = explode(',', $filter_matches); - foreach ($classes as $class) { - $class = trim(strip_tags(strtolower($class))); - $class = str_replace(' ', '-', $class); - $class = str_replace('/', '-', $class); - $class = str_replace('&', '', $class); - $classlist .= ' ' . $class; - } - } else { - // Normalize single term. - $class = trim(strip_tags(strtolower($filter_matches))); - $class = str_replace(' ', '-', $class); - $class = str_replace('/', '-', $class); - $class = str_replace('&', '', $class); - $classlist .= ' ' . $class; - } - } - - $row = preg_replace('/<div class="isotope-filter">(.*?)<\/div>/', '', $row); - - // *** S O R T I N G *** - if (!$looped) { - $sort_matches = array(); - preg_match_all('/<div class="isotope-sort (.*?)">(.*?)<\/div>/', $row, $sort_matches); - - if (is_array($sort_matches[1])) { - $matches = $sort_matches[1]; - foreach ($matches as $match) { - if ($sortdata != '') $sortdata .= ', '; - $sortdata .= '\'' . $match . '\'' . ' : function($elem) { var data = $elem.find(\'.isotope-sort.' . $match . '\').text(); console.log(data); if (!isNaN(data)) { return parseInt(data); } else { return data; } }'; - } - } else { - $sortdata .= '\'' . $sort_matches[1] . '\'' . ' : function($elem) { var data = $elem.find(\'.isotope-sort.' . $sort_matches[1] . '\').text(); console.log(data); if (!isNaN(data)) { return parseInt(data); } else { return data; } }'; - } - } - - $looped = TRUE; - } - ?> - <div class="isotope-element <?php print $classlist; ?>" data-category="<?php print trim($classlist); ?>"> - <?php print $row; ?> - </div> - <?php endforeach; ?> - <?php - $js = str_replace('@sortdata', $sortdata, $js); - drupal_add_js($js, array( - 'type' => 'inline', - 'scope' => 'header', - 'weight' => 10, - )); - ?> - </div> diff --git a/profiles/wcm_base/modules/contrib/views_isotope/views_isotope.css b/profiles/wcm_base/modules/contrib/views_isotope/views_isotope.css deleted file mode 100755 index 8ebe7cca6c77ce66c657a408357108c5fd3558e3..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/modules/contrib/views_isotope/views_isotope.css +++ /dev/null @@ -1,168 +0,0 @@ -/* Start: Recommended Isotope styles */ - -/**** Isotope Filtering ****/ - -.isotope-item { - z-index: 2; -} - -.isotope-hidden.isotope-item { - pointer-events: none; - z-index: 1; -} - -/**** Isotope Sorting ****/ - -.isotope-element .isotope-sort { - display: none; -} - -/**** Isotope CSS3 transitions ****/ - -.isotope, -.isotope .isotope-item { - -webkit-transition-duration: 0.8s; - -moz-transition-duration: 0.8s; - transition-duration: 0.8s; -} - -.isotope { - -webkit-transition-property: height, width; - -moz-transition-property: height, width; - transition-property: height, width; -} - -.isotope .isotope-item { - -webkit-transition-property: -webkit-transform, opacity; - -moz-transition-property: -moz-transform, opacity; - transition-property: transform, opacity; -} - -/**** disabling Isotope CSS3 transitions ****/ - -.isotope.no-transition, -.isotope.no-transition .isotope-item, -.isotope .isotope-item.no-transition { - -webkit-transition-duration: 0s; - -moz-transition-duration: 0s; - transition-duration: 0s; -} - -/* End: Recommended Isotope styles */ - - - -/* disable CSS transitions for isotope-containers with infinite scrolling*/ -.isotope.infinite-scrolling { - -webkit-transition: none; - -moz-transition: none; - transition: none; -} - -.isotope-element a, -.isotope-element a code { - color: #fff !important; - text-decoration: none; - -moz-transition: none; - -webkit-transition: none; - transition: none; -} - -.isotope-element a:hover, -.isotope-element a:hover code { - color: #fff; -} - -.isotope-element a:active, -.isotope-element a:active code { - color: #fff; -} - -/**** Isotope styles ****/ - -/* required for isotope-containers to inherit vertical size from window */ -html, -body { - height: 100%; -} - -.isotope-element { - width: 150px; - height: 150px; - margin: 10px 10px; - float: left; - overflow: hidden; - position: relative; - background: #bebebe; - color: #fff; -} - -.isotope-element img { - width: 150px; - margin: 0 auto; - text-align: center; -} - - -.variable-sizes .isotope-element.width2 { width: 230px; } - -.variable-sizes .isotope-element.height2 { height: 230px; } - -.variable-sizes .isotope-element.width2.height2 { - font-size: 2.0em; -} - -.isotope-element.large, -.variable-sizes .isotope-element.large, -.variable-sizes .isotope-element.large.width2.height2 { - font-size: 3.0em; - width: 350px; - height: 350px; - z-index: 100; -} - -.clickable .isotope-element:hover { - cursor: pointer; -} - -.clickable .isotope-element:hover h3 { - text-shadow: - 0 0 10px white, - 0 0 10px white - ; -} - -.clickable .isotope-element:hover h2 { - color: white; -} - -/**** Example Filters ****/ - -.isotope-options { - background-color: #EEEEEE; -} - -.view-isotope-example ul { - list-style: none outside none; - margin: 0; -} - -.view-isotope-example li { - display: block; - padding: 3px 10px; - text-align: center; - float: left; -} - -.view-isotope-example li a { - border-radius: 3px; - padding: 3px 5px; -} - -.view-isotope-example li a:hover { - background: #DDDDDD; -} - -.view-isotope-example li a.selected { - background: #CCCCCC; -} \ No newline at end of file diff --git a/profiles/wcm_base/modules/contrib/views_isotope/views_isotope.info b/profiles/wcm_base/modules/contrib/views_isotope/views_isotope.info deleted file mode 100644 index 645a4d53d109339144431dec168d03416cb2b75d..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/modules/contrib/views_isotope/views_isotope.info +++ /dev/null @@ -1,24 +0,0 @@ -; $Id: -name = Views Isotope -description = Create isotope views from views queries. -package = Views -version = 7.x-2.x-dev -core = 7.x - -dependencies[] = views -dependencies[] = jquery_update -dependencies[] = libraries - -files[] = views-isotope.tpl.php -files[] = views_isotope.module -files[] = views_isotope.theme.inc -files[] = views_isotope.views.inc -files[] = views_isotope_plugin_style_isotope.inc -files[] = views_isotope_plugin_style_isotope_filter_block.inc - -; Information added by Drupal.org packaging script on 2014-08-05 -version = "7.x-2.0-alpha1" -core = "7.x" -project = "views_isotope" -datestamp = "1407277128" - diff --git a/profiles/wcm_base/modules/contrib/views_isotope/views_isotope.js b/profiles/wcm_base/modules/contrib/views_isotope/views_isotope.js deleted file mode 100755 index bc8ddc5d1739c9a598f485376cd08be7dd1ffbc3..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/modules/contrib/views_isotope/views_isotope.js +++ /dev/null @@ -1,61 +0,0 @@ -(function($) { - $(document).ready(function() { - var $container = $('#isotope-container'); - - $container.isotope({ - itemSelector: '.isotope-element' - }); - - // Pre-select first option in option sets. - $('.isotope-options .option-set li:first-child a').addClass('selected'); - - var $optionSets = $('.isotope-options .option-set'); - $optionLinks = $optionSets.find('a'); - - $optionLinks.click(function() { - var $this = $(this); - // Don't proceed if already selected. - if ($this.hasClass('selected')) { - return false; - } - - var $optionSet = $this.parents('.option-set'); - $optionSet.find('.selected').removeClass('selected'); - - $this.addClass('selected'); - - var options = {}, - key = $optionSet.attr('data-option-key'), - value = $this.attr('data-option-value'); - // Parse 'false' as false boolean. - value = value === 'false' ? false : value; - - if (value && key == 'filter') { - // Support multiple independent filter sets. - $selectedFilters = $('.isotope-filters.option-set a.filterbutton.selected'); - - // Strip 'all' value to ensure other selected filters are still applied correctly. - if ($selectedFilters.length > 0) - value = value.replace('*', ''); - - // Compile selector based on selected filters. - $selectedFilters.each(function(index) { - var filter = $(this).attr('data-option-value'); - if (filter && value.indexOf(filter) == -1 && filter != '*') - value = value + filter; - }); - } - - options[key] = value; - if (key === 'layoutMode' && typeof changeLayoutMode === 'function') { - // Changes in layout modes need extra logic. - changeLayoutMode($this, options) - } else { - // Otherwise, apply new options. - $container.isotope(options); - } - - return false; - }); - }); -})(jQuery); \ No newline at end of file diff --git a/profiles/wcm_base/modules/contrib/views_isotope/views_isotope.module b/profiles/wcm_base/modules/contrib/views_isotope/views_isotope.module deleted file mode 100755 index 33985845335eb6705730eee1cd9291ade1741536..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/modules/contrib/views_isotope/views_isotope.module +++ /dev/null @@ -1,13 +0,0 @@ -<?php -// $id: - -/** - * Implements hook_views_api(). - */ -function views_isotope_views_api() { - return array( - 'api' => 2.0, - ); -} - - diff --git a/profiles/wcm_base/modules/contrib/views_isotope/views_isotope.theme.inc b/profiles/wcm_base/modules/contrib/views_isotope/views_isotope.theme.inc deleted file mode 100755 index 239e62f7806df2ff9f26b69aaae1337ddec3518c..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/modules/contrib/views_isotope/views_isotope.theme.inc +++ /dev/null @@ -1,52 +0,0 @@ -<?php -// $Id: - -/** - * Preprocess function to build the isotope grid - */ -function template_preprocess_views_isotope(&$vars) { - template_preprocess_views_view_list($vars); - - $view = $vars['view']; - $options = $view->style_plugin->options; - $handler = $view->style_plugin; - $fields = &$view->field; - $rows = &$vars['rows']; - $vars['attributes'] = array(); - - $vars['isotope_id'] = 'views-isotope-' . $view->name . '-' . $view->style_plugin->display->id; - - // Get stylesheets. - drupal_add_css(drupal_get_path('module', 'views_isotope') . '/views_isotope.css'); - - // Add JavaScript files and settings. - drupal_add_js(libraries_get_path('jquery.isotope') . '/jquery.isotope.min.js'); - drupal_add_js(drupal_get_path('module', 'views_isotope') . '/views_isotope.js'); - -} - -/** - * Preprocess function to build isotope filter blocks - */ -function template_preprocess_views_isotope_filter_block(&$vars) { - template_preprocess_views_view_list($vars); - $view = $vars['view']; - $options = $view->style_plugin->options; - $handler = $view->style_plugin; - $fields = &$view->field; - $rows = &$vars['rows']; - $vars['attributes'] = array(); -} - -/** - * Preprocess function for isotope sort blocks - */ -function template_preprocess_views_isotope_sort_block(&$vars) { - template_preprocess_views_view_list($vars); - $view = $vars['view']; - $options = $view->style_plugin->options; - $handler = $view->style_plugin; - $fields = &$view->field; - $rows = &$vars['rows']; - $vars['attributes'] = array(); -} \ No newline at end of file diff --git a/profiles/wcm_base/modules/contrib/views_isotope/views_isotope.views.inc b/profiles/wcm_base/modules/contrib/views_isotope/views_isotope.views.inc deleted file mode 100755 index dce459cd88b78b72e2ea0a87dfe79e8b57b600dc..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/modules/contrib/views_isotope/views_isotope.views.inc +++ /dev/null @@ -1,50 +0,0 @@ -<?php - -/** - * Implements hook_views_plugins(). - */ -function views_isotope_views_plugins() { - return array( - 'style' => array( - 'isotope' => array( - 'title' => t('Isotope Grid'), - 'help' => t('Display the results using the jQuery Isotope plugin'), - 'handler' => 'views_isotope_plugin_style_isotope', - 'theme' => 'views_isotope', - 'uses options' => TRUE, - 'uses row plugin' => TRUE, - 'uses fields' => TRUE, - 'uses grouping' => FALSE, - 'type' => 'normal', - 'parent' => 'list', - 'theme file' => 'views_isotope.theme.inc', - ), - 'isotope_filter_block' => array( - 'title' => t('Isotope Filter Block'), - 'help' => t('Display the results formatted to filter an Isotope View'), - 'handler' => 'views_isotope_plugin_style_isotope', - 'theme' => 'views_isotope_filter_block', - 'uses options' => TRUE, - 'uses row plugin' => TRUE, - 'uses fields' => TRUE, - 'uses grouping' => FALSE, - 'type' => 'normal', - 'parent' => 'list', - 'theme file' => 'views_isotope.theme.inc', - ), - 'isotope_sort_block' => array( - 'title' => t('Isotope Sort Block'), - 'help' => t('Display the results formatted to sort an Isotope View'), - 'handler' => 'views_isotope_plugin_style_isotope', - 'theme' => 'views_isotope_sort_block', - 'uses options' => TRUE, - 'uses row plugin' => TRUE, - 'uses fields' => TRUE, - 'uses grouping' => FALSE, - 'type' => 'normal', - 'parent' => 'list', - 'theme file' => 'views_isotope.theme.inc', - ), - ), - ); -} diff --git a/profiles/wcm_base/modules/contrib/views_isotope/views_isotope_plugin_style_isotope.inc b/profiles/wcm_base/modules/contrib/views_isotope/views_isotope_plugin_style_isotope.inc deleted file mode 100755 index 9f16a25ca82980a748b8fcfd4188eef855823edf..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/modules/contrib/views_isotope/views_isotope_plugin_style_isotope.inc +++ /dev/null @@ -1,30 +0,0 @@ -<?php - -/** - * @file - */ - -/** - * Style plugin. - */ -class views_isotope_plugin_style_isotope extends views_plugin_style_list { - - /** - * Set default options. - */ - function option_definition() { - $options = parent::option_definition(); - - return $options; - } - - /** - * Render the given style. - */ - function options_form(&$form, &$form_state) { - parent::options_form($form, $form_state); - - } -} - - diff --git a/profiles/wcm_base/modules/contrib/wysiwyg/tests/wysiwyg_test.info b/profiles/wcm_base/modules/contrib/wysiwyg/tests/wysiwyg_test.info index 156b65f8ac83372e9ecc73adb783410e37f34f6e..b957f8be0a40b81862e2f8255619d019a458a75b 100644 --- a/profiles/wcm_base/modules/contrib/wysiwyg/tests/wysiwyg_test.info +++ b/profiles/wcm_base/modules/contrib/wysiwyg/tests/wysiwyg_test.info @@ -6,9 +6,9 @@ hidden = TRUE dependencies[] = wysiwyg files[] = wysiwyg_test.module -; Information added by Drupal.org packaging script on 2015-06-29 -version = "7.x-2.2+62-dev" +; Information added by Drupal.org packaging script on 2015-07-03 +version = "7.x-2.2+63-dev" core = "7.x" project = "wysiwyg" -datestamp = "1435591383" +datestamp = "1435932899" diff --git a/profiles/wcm_base/modules/contrib/wysiwyg/wysiwyg.info b/profiles/wcm_base/modules/contrib/wysiwyg/wysiwyg.info index f800f66b5713f65f6fe1bec5f76f09359ea3b460..620e071f3841306021b06f86d62292f70bb64711 100644 --- a/profiles/wcm_base/modules/contrib/wysiwyg/wysiwyg.info +++ b/profiles/wcm_base/modules/contrib/wysiwyg/wysiwyg.info @@ -9,9 +9,9 @@ configure = admin/config/content/wysiwyg files[] = wysiwyg.module files[] = tests/wysiwyg.test -; Information added by Drupal.org packaging script on 2015-06-29 -version = "7.x-2.2+62-dev" +; Information added by Drupal.org packaging script on 2015-07-03 +version = "7.x-2.2+63-dev" core = "7.x" project = "wysiwyg" -datestamp = "1435591383" +datestamp = "1435932899" diff --git a/profiles/wcm_base/modules/contrib/wysiwyg/wysiwyg.js b/profiles/wcm_base/modules/contrib/wysiwyg/wysiwyg.js index 7a89c9f84c9a2387e530f76aa699c8ef93ccde5e..f43a2e9127f2882f1d2dc27a53fab48582ff7e41 100644 --- a/profiles/wcm_base/modules/contrib/wysiwyg/wysiwyg.js +++ b/profiles/wcm_base/modules/contrib/wysiwyg/wysiwyg.js @@ -627,10 +627,12 @@ if (oldBeforeSerialize) { excludeSelectors = excludeSelectors.concat(this); } }); - options.data['ajax_html_ids[]'] = []; - $('[id]:not(' + excludeSelectors.join(',') + ')').each(function () { - options.data['ajax_html_ids[]'].push(this.id); - }); + if (excludeSelectors.length > 0) { + options.data['ajax_html_ids[]'] = []; + $('[id]:not(' + excludeSelectors.join(',') + ')').each(function () { + options.data['ajax_html_ids[]'].push(this.id); + }); + } return ret; } } diff --git a/profiles/wcm_base/modules/custom/ocio_aggregator/README.md b/profiles/wcm_base/modules/custom/ocio_aggregator/README.md new file mode 100644 index 0000000000000000000000000000000000000000..1e5e25981f3d66ea70ae9aa3aad4199c0a8f3eef --- /dev/null +++ b/profiles/wcm_base/modules/custom/ocio_aggregator/README.md @@ -0,0 +1,4 @@ +OCIO Aggregator +========== + +TODO: write some documentation. diff --git a/profiles/wcm_base/modules/custom/ocio_aggregator/ocio_aggregator.info b/profiles/wcm_base/modules/custom/ocio_aggregator/ocio_aggregator.info new file mode 100644 index 0000000000000000000000000000000000000000..b515e65438f459584343542aa7634f0600b224b3 --- /dev/null +++ b/profiles/wcm_base/modules/custom/ocio_aggregator/ocio_aggregator.info @@ -0,0 +1,5 @@ +name = OCIO Aggregator +description = Fixes and enhancements to the core aggregator module. +dependencies[] = aggregator +package = OCIO Configuration +core = 7.x diff --git a/profiles/wcm_base/modules/custom/ocio_aggregator/ocio_aggregator.install b/profiles/wcm_base/modules/custom/ocio_aggregator/ocio_aggregator.install new file mode 100644 index 0000000000000000000000000000000000000000..7e7d0fb9ce9e6fabc304338ca9675f0352bdee7a --- /dev/null +++ b/profiles/wcm_base/modules/custom/ocio_aggregator/ocio_aggregator.install @@ -0,0 +1,14 @@ +<?php + +/** + * @file ocio_aggregator.install + * + * Installation operations + */ + +/** + * Implements hook_install(). + */ +function ocio_aggregator_install() { + variable_set('aggregator_clear', 0); +} diff --git a/profiles/wcm_base/modules/custom/ocio_aggregator/ocio_aggregator.module b/profiles/wcm_base/modules/custom/ocio_aggregator/ocio_aggregator.module new file mode 100644 index 0000000000000000000000000000000000000000..df0cb1af27e764ad19009d70f75cea3c35860b3d --- /dev/null +++ b/profiles/wcm_base/modules/custom/ocio_aggregator/ocio_aggregator.module @@ -0,0 +1,187 @@ +<?php + +/** + * @file ocio_aggregator.module + * + * Fixes and enhancements to the core aggregator module. + */ + +/** + * Implements hook_menu(). + */ +function ocio_aggregator_menu(){ + $items['admin/config/services/aggregator/update/all'] = array( + 'title' => 'Update all feeds', + 'access arguments' => array('administer news feeds'), + 'page callback' => 'ocio_aggregator_update_all_feeds', + 'type' => MENU_LOCAL_ACTION, + ); + return $items; +} + +/** + * Implements hook_menu_alter(). + */ +function ocio_aggregator_menu_alter(&$items){ + $items['aggregator/categories/%/categorize']['access callback'] = FALSE; + $items['aggregator/sources/%/categorize']['access callback'] = FALSE; +} + +/** + * Implements hook_theme_registry_alter(). + */ +function ocio_aggregator_theme_registry_alter(&$theme_registry) { + if (isset($theme_registry['aggregator_block_item'])) { + $theme_registry['aggregator_block_item']['function'] = 'ocio_aggregator_aggregator_block_item'; + } +} + +/** + * Overrides theme_aggregator_block_item(). + */ +function ocio_aggregator_aggregator_block_item($vars) { + $feed = aggregator_feed_load($vars['item']->fid); + return '<span class="aggregator-feed-source">' . $feed->title . ': </span><a href="' . check_url($vars['item']->link) . '">' . check_plain($vars['item']->title) . "</a>\n"; +} + +/** + * Implements hook_block_view_alter(). + */ +function ocio_aggregator_block_view_alter(&$data, $block) { + if ($block->module == 'aggregator') { + preg_match('/^feed-\d+$/', $block->delta, $matches); + + if (!empty($matches)) { + $data['content'] = preg_replace('/<span class="aggregator-feed-source">.*<\/span>/', '', $data['content']); + } + } +} + +/** + * Implements hook_form_FORM_ID_alter(). + */ +function ocio_aggregator_form_aggregator_form_feed_alter(&$form, &$form_state) { + $form['refresh']['#description'] = t("The length of time between feed updates."); + $form['block']['#description'] = t("This setting lets you configure the number of news items to show in this feed's block. If you choose '0' this feed's block will be disabled."); + $form['category']['#description'] = t("Feed items are automatically filed in the checked categories."); + + $form['#submit'][] = 'ocio_aggregator_form_aggregator_form_feed_submit'; +} + +/** + * Feed edit form submit handler. + */ +function ocio_aggregator_form_aggregator_form_feed_submit(&$form, &$form_state) { + if (isset($form_state['values']['fid'])) { + $feed_items = db_query("SELECT iid FROM {aggregator_item} WHERE fid = :fid", array(":fid" => $form_state['values']['fid'])); + + // Update the category of each feed item to match parent feed. + foreach ($feed_items as $item) { + foreach ($form_state['values']['category'] as $cid => $status) { + + if (empty($status)) { + db_delete('aggregator_category_item') + ->condition('cid', $cid) + ->condition('iid', $item->iid) + ->execute(); + } + else { + db_merge('aggregator_category_item') + ->key(array('iid' => $item->iid, 'cid' => $cid)) + ->fields(array('iid' => $item->iid, 'cid' => $cid)) + ->execute(); + } + } + } + } + else { + // Clear block cache + module_invoke('block', 'flush_caches'); + if (arg(0) == 'admin') { + $form_state['redirect'] = 'admin/config/services/aggregator/'; + } + } +} + +/** + * Implements hook_form_FORM_ID_alter(). + */ +function ocio_aggregator_form_aggregator_form_category_alter(&$form, &$form_state) { + if (isset($form['cid'])) { + $category = aggregator_category_load($form['cid']['#value']); + } + + // Allow number of feed items shown in category block to be set. + $form['block'] = array('#type' => 'select', + '#title' => t('News items in block'), + '#default_value' => isset($category['block']) ? $category['block'] : 5, + '#options' => drupal_map_assoc(range(0, 20)), + '#description' => t("This setting lets you configure the number of news items to show in this feed's block. If you choose '0' this feed's block will be disabled."), + ); + + $form['#submit'][] = 'ocio_aggregator_form_aggregator_form_category_submit'; +} + +/** + * Category edit form submit handler. + */ +function ocio_aggregator_form_aggregator_form_category_submit(&$form, &$form_state) { + + if (isset($form_state['values']['cid'])){ + $update_key = array('cid' => $form_state['values']['cid']); + } + else { + $update_key = array('title' => $form_state['values']['title']); + } + + db_merge('aggregator_category') + ->key($update_key) + ->fields(array('block' => $form_state['values']['block'])) + ->execute(); + + if (arg(0) == 'admin') { + $form_state['redirect'] = 'admin/config/services/aggregator/'; + } +} + +/** + * Implements hook_form_FORM_ID_alter(). + */ +function ocio_aggregator_form_aggregator_admin_form_alter(&$form, &$form_state) { + $form['aggregator_allowed_html_tags']['#access'] = FALSE; + $form['modules']['aggregator']['aggregator_summary_items']['#access'] = FALSE; + $form['modules']['aggregator']['aggregator_category_selector']['#access'] = FALSE; + $form['modules']['aggregator']['aggregator_teaser_length']['#access'] = FALSE; + + $form['modules']['aggregator']['aggregator_clear']['#description'] = '<div class="messages warning">' . t('Decreasing this value will permanently delete all feed items outside of the selected timeframe. Old items will likely be unrecoverable, as they may no longer be available from the source feed. Increasing this value will only affect newly imported feed items and will not retreive older items. These changes will not take effect until the next update of each feed.') . '</div>'; +} + +/** + * Implements hook_menu_breadcrumb_alter(). + * + * Fix breadcrumb breadcrumbs on aggreggator category and source pages. + */ +function ocio_aggregator_menu_breadcrumb_alter(&$active_trail, $item) { + if ($item['path'] == 'aggregator/sources/%') { + $active_trail[3]['title'] = $item['page_arguments'][0]->title; + menu_set_active_trail($active_trail); + } + elseif ($item['path'] == 'aggregator/categories/%') { + $active_trail[2] = menu_link_get_preferred('aggregator/categories'); + $active_trail[3] = $active_trail[1]; + $active_trail[1] = menu_link_get_preferred('aggregator'); + menu_set_active_trail($active_trail); + } +} + +/** + * Refresh all feeds. + */ +function ocio_aggregator_update_all_feeds() { + $feeds = db_query("SELECT fid FROM {aggregator_feed}"); + foreach ($feeds as $fid) { + $feed = aggregator_feed_load($fid->fid); + aggregator_refresh($feed); + } + drupal_goto('admin/config/services/aggregator'); +} diff --git a/profiles/wcm_base/modules/custom/ocio_panels_settings/ocio_panels_settings.module b/profiles/wcm_base/modules/custom/ocio_panels_settings/ocio_panels_settings.module index f9453dc8359ae0aa37f292bffc9e3d89258d745c..2b91945bb2f9c1d92ca563b00d4df09ee251c820 100644 --- a/profiles/wcm_base/modules/custom/ocio_panels_settings/ocio_panels_settings.module +++ b/profiles/wcm_base/modules/custom/ocio_panels_settings/ocio_panels_settings.module @@ -42,7 +42,7 @@ function ocio_panels_settings_form_panels_edit_style_type_form_alter(&$form, &$f */ function _ocio_panels_settings_region_style_settings($form) { $form['style']['style']['list']['#access'] = FALSE; - $form['style']['style']['panopoly_accordion']['#access'] = FALSE; +// $form['style']['style']['panopoly_accordion']['#access'] = FALSE; return $form; } diff --git a/profiles/wcm_base/modules/custom/ocio_permissions/ocio_permissions.features.user_permission.inc b/profiles/wcm_base/modules/custom/ocio_permissions/ocio_permissions.features.user_permission.inc index 018b3e9263f0da69be4bd20344811cb0f1f5b492..840090bb0cbf43cd8b34f0a62a602a22255bd89b 100644 --- a/profiles/wcm_base/modules/custom/ocio_permissions/ocio_permissions.features.user_permission.inc +++ b/profiles/wcm_base/modules/custom/ocio_permissions/ocio_permissions.features.user_permission.inc @@ -103,6 +103,17 @@ function ocio_permissions_user_default_permissions() { 'module' => 'navbar', ); + // Exported permission: 'access news feeds'. + $permissions['access news feeds'] = array( + 'name' => 'access news feeds', + 'roles' => array( + 'administrator' => 'administrator', + 'anonymous user' => 'anonymous user', + 'authenticated user' => 'authenticated user', + ), + 'module' => 'aggregator', + ); + // Exported permission: 'access ocio advanced menu'. $permissions['access ocio advanced menu'] = array( 'name' => 'access ocio advanced menu', @@ -487,6 +498,17 @@ function ocio_permissions_user_default_permissions() { 'module' => 'system', ); + // Exported permission: 'administer news feeds'. + $permissions['administer news feeds'] = array( + 'name' => 'administer news feeds', + 'roles' => array( + 'administrator' => 'administrator', + 'site builder' => 'site builder', + 'site manager' => 'site manager', + ), + 'module' => 'aggregator', + ); + // Exported permission: 'administer nodes'. $permissions['administer nodes'] = array( 'name' => 'administer nodes', diff --git a/profiles/wcm_base/modules/custom/ocio_permissions/ocio_permissions.info b/profiles/wcm_base/modules/custom/ocio_permissions/ocio_permissions.info index 07b7febf3c779f80c10a10c3a7f801fb56a50c72..0193b63c93d4630c282d0b0065c7da35f1902eec 100644 --- a/profiles/wcm_base/modules/custom/ocio_permissions/ocio_permissions.info +++ b/profiles/wcm_base/modules/custom/ocio_permissions/ocio_permissions.info @@ -4,6 +4,7 @@ core = 7.x package = OCIO Configuration version = 7.x-1.0 project = ocio_permissions +dependencies[] = aggregator dependencies[] = block dependencies[] = book dependencies[] = breakpoints @@ -69,6 +70,7 @@ features[user_permission][] = access devel information features[user_permission][] = access draggableviews features[user_permission][] = access media browser features[user_permission][] = access navbar +features[user_permission][] = access news feeds features[user_permission][] = access ocio advanced menu features[user_permission][] = access own authorizations features[user_permission][] = access own consumers @@ -110,6 +112,7 @@ features[user_permission][] = administer media browser features[user_permission][] = administer menu features[user_permission][] = administer module filter features[user_permission][] = administer modules +features[user_permission][] = administer news feeds features[user_permission][] = administer nodes features[user_permission][] = administer oauth features[user_permission][] = administer ocio main menu diff --git a/profiles/wcm_base/modules/custom/wcm_tile_panes/wcm_tile_panes.features.user_permission.inc b/profiles/wcm_base/modules/custom/wcm_tile_panes/wcm_tile_panes.features.user_permission.inc deleted file mode 100644 index f0a507f6ed044116e6b948019a5131b63be68ec0..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/modules/custom/wcm_tile_panes/wcm_tile_panes.features.user_permission.inc +++ /dev/null @@ -1,79 +0,0 @@ -<?php -/** - * @file - * wcm_tile_panes.features.user_permission.inc - */ - -/** - * Implements hook_user_default_permissions(). - */ -function wcm_tile_panes_user_default_permissions() { - $permissions = array(); - - // Exported permission: 'create fieldable tile_pane'. - $permissions['create fieldable tile_pane'] = array( - 'name' => 'create fieldable tile_pane', - 'roles' => array( - 'administrator' => 'administrator', - 'site builder' => 'site builder', - 'site manager' => 'site manager', - ), - 'module' => 'fieldable_panels_panes', - ); - - // Exported permission: 'create fieldable tile_pane_plus_text_area'. - $permissions['create fieldable tile_pane_plus_text_area'] = array( - 'name' => 'create fieldable tile_pane_plus_text_area', - 'roles' => array( - 'administrator' => 'administrator', - 'site builder' => 'site builder', - 'site manager' => 'site manager', - ), - 'module' => 'fieldable_panels_panes', - ); - - // Exported permission: 'delete fieldable tile_pane'. - $permissions['delete fieldable tile_pane'] = array( - 'name' => 'delete fieldable tile_pane', - 'roles' => array( - 'administrator' => 'administrator', - 'site builder' => 'site builder', - 'site manager' => 'site manager', - ), - 'module' => 'fieldable_panels_panes', - ); - - // Exported permission: 'delete fieldable tile_pane_plus_text_area'. - $permissions['delete fieldable tile_pane_plus_text_area'] = array( - 'name' => 'delete fieldable tile_pane_plus_text_area', - 'roles' => array( - 'administrator' => 'administrator', - 'site builder' => 'site builder', - ), - 'module' => 'fieldable_panels_panes', - ); - - // Exported permission: 'edit fieldable tile_pane'. - $permissions['edit fieldable tile_pane'] = array( - 'name' => 'edit fieldable tile_pane', - 'roles' => array( - 'administrator' => 'administrator', - 'site builder' => 'site builder', - 'site manager' => 'site manager', - ), - 'module' => 'fieldable_panels_panes', - ); - - // Exported permission: 'edit fieldable tile_pane_plus_text_area'. - $permissions['edit fieldable tile_pane_plus_text_area'] = array( - 'name' => 'edit fieldable tile_pane_plus_text_area', - 'roles' => array( - 'administrator' => 'administrator', - 'site builder' => 'site builder', - 'site manager' => 'site manager', - ), - 'module' => 'fieldable_panels_panes', - ); - - return $permissions; -} diff --git a/profiles/wcm_base/themes/ocio_omega_3/css/layouts/ocio-3/ocio-3.layout.css b/profiles/wcm_base/themes/ocio_omega_3/css/layouts/ocio-3/ocio-3.layout.css index cce8e916ff1818bb5235265c61071aeed2d43b7e..bb3a8ce98b6ac2105c2d877bc1b4cccdeee48543 100644 --- a/profiles/wcm_base/themes/ocio_omega_3/css/layouts/ocio-3/ocio-3.layout.css +++ b/profiles/wcm_base/themes/ocio_omega_3/css/layouts/ocio-3/ocio-3.layout.css @@ -76,27 +76,17 @@ padding: 0; margin: 0 auto; *zoom: 1; - /* - @include breakpoint($desk, true) { - padding:0 9%; - } - */ } .l-constrained:after, .l-region--highlighted:after, .l-region--footer:after { content: ""; display: table; clear: both; } -@media (min-width: 46em) { +@media (min-width: 47.5em) { .l-constrained, .l-region--highlighted, .l-region--footer { padding: 0 7%; } } -@media (min-width: 88em) { - .l-constrained, .l-region--highlighted, .l-region--footer { - padding: 0 10%; - } -} /* Setting body and page background color */ body.html { @@ -113,7 +103,7 @@ body.html { /* setting padding for containers */ .l-main { - padding: 2% 2.5%; + padding: 2% 2%; *zoom: 1; } .l-main:after { @@ -122,14 +112,6 @@ body.html { clear: both; } -.panel-panel { - padding: 0 2.5% 2% 2.5%; -} - -.front .l-main { - padding: 0; -} - img, media { max-width: 100%; } @@ -213,7 +195,7 @@ h2.block__title { margin-top: 0; } -@media (max-width: 43em) { +@media (max-width: 47.5em) { html { font-size: 50%; } @@ -225,7 +207,7 @@ h2.block__title { line-height: 150%; } } -@media (min-width: 46em) { +@media (min-width: 47.5em) { html { font-size: 57%; } @@ -237,7 +219,7 @@ h2.block__title { line-height: 150%; } } -@media (min-width: 68em) { +@media (min-width: 60em) { html { font-size: 62.5%; } @@ -249,7 +231,7 @@ h2.block__title { line-height: 150%; } } -@media (min-width: 88em) { +@media (min-width: 75em) { html { font-size: 66%; } @@ -408,7 +390,7 @@ h6 a:hover, .zeta a:hover { padding: 20px 0; } -@media (min-width: 46em) { +@media (min-width: 47.5em) { /* Header */ .l-branding { width: 23.72881%; @@ -476,7 +458,7 @@ h6 a:hover, .zeta a:hover { clear: both; } } -@media (min-width: 68em) { +@media (min-width: 60em) { /* Sidebars */ .has-one-sidebar .l-content { width: 66.10169%; diff --git a/profiles/wcm_base/themes/ocio_omega_3/css/layouts/ocio-3/ocio-3.layout.no-query.css b/profiles/wcm_base/themes/ocio_omega_3/css/layouts/ocio-3/ocio-3.layout.no-query.css index 98cb0dd452d3b8686529a719132b387acb651c78..b31f69bb334ee81a63134c618b1563e25b9e4516 100644 --- a/profiles/wcm_base/themes/ocio_omega_3/css/layouts/ocio-3/ocio-3.layout.no-query.css +++ b/profiles/wcm_base/themes/ocio_omega_3/css/layouts/ocio-3/ocio-3.layout.no-query.css @@ -77,12 +77,6 @@ margin: 0 auto; *zoom: 1; padding: 0 7%; - /* - @include breakpoint($desk, true) { - padding:0 9%; - } - */ - padding: 0 10%; } .l-constrained:after, .l-region--highlighted:after, .l-region--footer:after { content: ""; @@ -105,7 +99,7 @@ body.html { /* setting padding for containers */ .l-main { - padding: 2% 2.5%; + padding: 2% 2%; *zoom: 1; } .l-main:after { @@ -114,14 +108,6 @@ body.html { clear: both; } -.panel-panel { - padding: 0 2.5% 2% 2.5%; -} - -.front .l-main { - padding: 0; -} - img, media { max-width: 100%; } diff --git a/profiles/wcm_base/themes/ocio_omega_3/css/ocio-3.no-query.css b/profiles/wcm_base/themes/ocio_omega_3/css/ocio-3.no-query.css index 8fec18b6c2a36d33d4da281edd0ef4c6abfe5a5d..7e7d37ad0de31bebaadcf161e4514892b6f3b436 100644 --- a/profiles/wcm_base/themes/ocio_omega_3/css/ocio-3.no-query.css +++ b/profiles/wcm_base/themes/ocio_omega_3/css/ocio-3.no-query.css @@ -73,12 +73,6 @@ margin: 0 auto; *zoom: 1; padding: 0 7%; - /* - @include breakpoint($desk, true) { - padding:0 9%; - } - */ - padding: 0 10%; } .l-constrained:after { content: ""; @@ -101,7 +95,7 @@ body.html { /* setting padding for containers */ .l-main { - padding: 2% 2.5%; + padding: 2% 2%; *zoom: 1; } .l-main:after { @@ -110,14 +104,6 @@ body.html { clear: both; } -.panel-panel { - padding: 0 2.5% 2% 2.5%; -} - -.front .l-main { - padding: 0; -} - img, media { max-width: 100%; } @@ -382,10 +368,6 @@ h6 a:hover, .zeta a:hover { font-size: 2.8rem; } -.panel-pane { - padding: 0.6em; -} - h2.pane-title { text-transform: uppercase; margin-top: 1em; @@ -411,16 +393,6 @@ fieldset.search-advanced { padding-left: 1em; } -.view-user-directory img { - border: 1px solid #666666; -} -.view-user-directory .isotope-element { - background: #fff; - width: 45%; - min-width: 380px; - width: 31%; -} - .node-type-webform .webform-component-fieldset { margin: 40px 0 20px 0; padding: 20px 1.5em; diff --git a/profiles/wcm_base/themes/ocio_omega_3/css/ocio-3.styles.css b/profiles/wcm_base/themes/ocio_omega_3/css/ocio-3.styles.css index 9bdbb7908dcead446318cd722f0907b9981598c3..5ab7ca834faac18ae076da425d3d211cf8518ca7 100644 --- a/profiles/wcm_base/themes/ocio_omega_3/css/ocio-3.styles.css +++ b/profiles/wcm_base/themes/ocio_omega_3/css/ocio-3.styles.css @@ -72,27 +72,17 @@ padding: 0; margin: 0 auto; *zoom: 1; - /* - @include breakpoint($desk, true) { - padding:0 9%; - } - */ } .l-constrained:after { content: ""; display: table; clear: both; } -@media (min-width: 46em) { +@media (min-width: 47.5em) { .l-constrained { padding: 0 7%; } } -@media (min-width: 88em) { - .l-constrained { - padding: 0 10%; - } -} /* Setting body and page background color */ body.html { @@ -109,7 +99,7 @@ body.html { /* setting padding for containers */ .l-main { - padding: 2% 2.5%; + padding: 2% 2%; *zoom: 1; } .l-main:after { @@ -118,14 +108,6 @@ body.html { clear: both; } -.panel-panel { - padding: 0 2.5% 2% 2.5%; -} - -.front .l-main { - padding: 0; -} - img, media { max-width: 100%; } @@ -209,7 +191,7 @@ h2.block__title { margin-top: 0; } -@media (max-width: 43em) { +@media (max-width: 47.5em) { html { font-size: 50%; } @@ -221,7 +203,7 @@ h2.block__title { line-height: 150%; } } -@media (min-width: 46em) { +@media (min-width: 47.5em) { html { font-size: 57%; } @@ -233,7 +215,7 @@ h2.block__title { line-height: 150%; } } -@media (min-width: 68em) { +@media (min-width: 60em) { html { font-size: 62.5%; } @@ -245,7 +227,7 @@ h2.block__title { line-height: 150%; } } -@media (min-width: 88em) { +@media (min-width: 75em) { html { font-size: 66%; } @@ -381,7 +363,7 @@ h6 a:hover, .zeta a:hover { display: none; } -@media (min-width: 46em) { +@media (min-width: 47.5em) { .page-news .view-display-id-page { padding-right: 2em; margin-top: 1em; @@ -396,10 +378,6 @@ h6 a:hover, .zeta a:hover { font-size: 2.8rem; } -.panel-pane { - padding: 0.6em; -} - h2.pane-title { text-transform: uppercase; margin-top: 1em; @@ -425,24 +403,6 @@ fieldset.search-advanced { padding-left: 1em; } -.view-user-directory img { - border: 1px solid #666666; -} -.view-user-directory .isotope-element { - background: #fff; -} -@media (min-width: 56em) { - .view-user-directory .isotope-element { - width: 45%; - min-width: 380px; - } -} -@media (min-width: 88em) { - .view-user-directory .isotope-element { - width: 31%; - } -} - .node-type-webform .webform-component-fieldset { margin: 40px 0 20px 0; padding: 20px 1.5em; diff --git a/profiles/wcm_base/themes/ocio_omega_3/layouts/ocio-3/ocio-3-layout.tpl.php b/profiles/wcm_base/themes/ocio_omega_3/layouts/ocio-3/ocio-3-layout.tpl.php index 0c04dffc010b0da7529ac071280a0a607b3ab66b..004e18b197e60a42b310973ac6b72ed398c86172 100644 --- a/profiles/wcm_base/themes/ocio_omega_3/layouts/ocio-3/ocio-3-layout.tpl.php +++ b/profiles/wcm_base/themes/ocio_omega_3/layouts/ocio-3/ocio-3-layout.tpl.php @@ -5,7 +5,7 @@ <?php print render($page['masthead']); ?> </header> - <div class="l-constrained"> + <div class="l-constrained max-width"> <div class="constrained-container"> <?php print render($page['main_menu']); ?> diff --git a/profiles/wcm_base/themes/ocio_omega_3/ocio_3.info b/profiles/wcm_base/themes/ocio_omega_3/ocio_3.info index 78662900f7318762bbdaaaa364193c01e7a403ae..062824cf6da54a875e915a2990dd1c59b9c53280 100644 --- a/profiles/wcm_base/themes/ocio_omega_3/ocio_3.info +++ b/profiles/wcm_base/themes/ocio_omega_3/ocio_3.info @@ -1,4 +1,4 @@ -name = Traditional +name = Traditional (OCIO 3) description = A traditional looking theme with color and font customization options. base theme = ocio_omega_base screenshot = screenshot.png diff --git a/profiles/wcm_base/themes/ocio_omega_3/sass/base/_layout-base.scss b/profiles/wcm_base/themes/ocio_omega_3/sass/base/_layout-base.scss index 96d4caa127c0bdd9fc6bbae09979e38cfb7d11ea..8267d87d00b6282557a23503e61f4250842c2a4a 100644 --- a/profiles/wcm_base/themes/ocio_omega_3/sass/base/_layout-base.scss +++ b/profiles/wcm_base/themes/ocio_omega_3/sass/base/_layout-base.scss @@ -3,17 +3,10 @@ padding:0 ; margin: 0 auto; @include pie-clearfix; + @include breakpoint($tab, true) { padding:0 7%; } -/* - @include breakpoint($desk, true) { - padding:0 9%; - } -*/ - @include breakpoint($wide, true) { - padding:0 10%; - } } @@ -33,14 +26,7 @@ body.html { /* setting padding for containers */ .l-main { - padding: 2% 2.5%; + padding: 2% 2%; @include pie-clearfix; } -.panel-panel { - padding: 0 2.5% 2% 2.5%; -} - -.front .l-main { - padding: 0; -} diff --git a/profiles/wcm_base/themes/ocio_omega_3/sass/components/_panels.scss b/profiles/wcm_base/themes/ocio_omega_3/sass/components/_panels.scss index 7ddd3b6cf6d49db397777a61608950d3f5023d71..9ddf35d3c3686ea2cbbdcf3c18fcf0698359748c 100644 --- a/profiles/wcm_base/themes/ocio_omega_3/sass/components/_panels.scss +++ b/profiles/wcm_base/themes/ocio_omega_3/sass/components/_panels.scss @@ -1,7 +1,4 @@ //panels specific components -.panel-pane { - padding: 0.6em; -} h2.pane-title { text-transform: uppercase; diff --git a/profiles/wcm_base/themes/ocio_omega_3/sass/components/_users.scss b/profiles/wcm_base/themes/ocio_omega_3/sass/components/_users.scss index 830aefa452e91ff9dca089f10750de7c099db4f6..75806ae7dfd535acc4c524c283d2c5967d9014f0 100644 --- a/profiles/wcm_base/themes/ocio_omega_3/sass/components/_users.scss +++ b/profiles/wcm_base/themes/ocio_omega_3/sass/components/_users.scss @@ -1,21 +1,4 @@ .view-user-directory { - img { - border: 1px solid $md-gray; - } - - .isotope-element { - background: $white; - - @include breakpoint($tab-desk,true) { - width: 45%; - min-width: 380px; - } - - @include breakpoint($wide,true) { - width: 31%; - } - - } } diff --git a/profiles/wcm_base/themes/ocio_omega_base/css/layouts/ocio-default/ocio-default.layout.css b/profiles/wcm_base/themes/ocio_omega_base/css/layouts/ocio-default/ocio-default.layout.css index 972fa22e7a9b1af2fe982e534213f2226e832147..4bacd68387fffbf4062fb3066257f2b6e59aa6b4 100644 --- a/profiles/wcm_base/themes/ocio_omega_base/css/layouts/ocio-default/ocio-default.layout.css +++ b/profiles/wcm_base/themes/ocio_omega_base/css/layouts/ocio-default/ocio-default.layout.css @@ -517,28 +517,34 @@ input:focus { opacity: 0.5 !important; } -.l-constrained, .l-region--main-menu, .l-region--highlighted, .l-region--footer { +.l-constrained, .l-region--highlighted, .l-region--footer { padding: 0 2.5%; margin: 0 auto; *zoom: 1; } -.l-constrained:after, .l-region--main-menu:after, .l-region--highlighted:after, .l-region--footer:after { +.l-constrained:after, .l-region--highlighted:after, .l-region--footer:after { content: ""; display: table; clear: both; } @media (min-width: 47.5em) { - .l-constrained, .l-region--main-menu, .l-region--highlighted, .l-region--footer { - padding: 0 5%; + .l-constrained, .l-region--highlighted, .l-region--footer { + padding: 0 7%; } } -@media (min-width: 68em) { - .l-constrained, .l-region--main-menu, .l-region--highlighted, .l-region--footer { - padding: 0 6%; +@media (min-width: 60em) { + .l-constrained, .l-region--highlighted, .l-region--footer { + padding: 0 8%; } } -/* Setting body and page background color */ +@media (min-width: 92em) { + .max-width { + max-width: 87.5em; + margin: 0 auto; + padding: 0; + } +} body.html { background-color: #2d2d2d; } @@ -659,55 +665,6 @@ tr.error { color: #2d2d2d; } -/* Styles for main menu */ -.l-region--main-menu .menu .leaf, .l-region--main-menu .menu .expanded, .l-region--main-menu .menu .collapsed, .l-region--sidebar-1 .menu .leaf, .l-region--sidebar-1 .menu .expanded, .l-region--sidebar-1 .menu .collapsed { - list-style-image: none; - list-style-type: none; -} - -.l-region--main-menu h2.block__title { - display: none; -} -.l-region--main-menu ul.menu { - float: left; - clear: left; - margin-top: 0; -} -.l-region--main-menu ul.menu li { - float: left; - margin: 0; - padding: 0.75em 0.9em; - text-transform: uppercase; -} -.l-region--main-menu ul.menu li.first { - padding-left: 0em; -} -.l-region--main-menu ul.menu li a { - /* color:$md-gray; */ - font-weight: 500; -} -.l-region--main-menu ul.menu li a:hover { - text-decoration: none; - /* color:$dk-gray; */ -} -.l-region--main-menu ul.menu ul { - display: none; - float: none; - position: absolute; - z-index: 99; - margin-top: 0.7em; -} -.l-region--main-menu ul.menu ul li.first { - padding-left: 0.9em; -} -.l-region--main-menu ul li:hover > ul { - display: block; -} -.l-region--main-menu ul ul.menu li { - float: none; - position: relative; -} - /** * @file * Theme for markup generated by theme_pager(). @@ -841,7 +798,7 @@ h2.block__title { line-height: 150%; } } -@media (min-width: 68em) { +@media (min-width: 60em) { html { font-size: 62.5%; } @@ -853,7 +810,7 @@ h2.block__title { line-height: 150%; } } -@media (min-width: 88em) { +@media (min-width: 75em) { html { font-size: 66%; } @@ -1148,7 +1105,7 @@ h2.block__title { line-height: 150%; } } -@media (min-width: 68em) { +@media (min-width: 60em) { html { font-size: 62.5%; } @@ -1160,7 +1117,7 @@ h2.block__title { line-height: 150%; } } -@media (min-width: 88em) { +@media (min-width: 75em) { html { font-size: 66%; } @@ -1392,7 +1349,7 @@ h6 a:hover, .zeta a:hover { clear: both; } } -@media (min-width: 68em) { +@media (min-width: 60em) { /* Sidebars */ .has-one-sidebar .l-content { width: 66.10169%; diff --git a/profiles/wcm_base/themes/ocio_omega_base/css/layouts/ocio-default/ocio-default.layout.no-query.css b/profiles/wcm_base/themes/ocio_omega_base/css/layouts/ocio-default/ocio-default.layout.no-query.css index c9a5d0735b904689834c1906201a14b8f2fb16d9..283ed5c66eb270b3f2498dee9365ebf6143426d1 100644 --- a/profiles/wcm_base/themes/ocio_omega_base/css/layouts/ocio-default/ocio-default.layout.no-query.css +++ b/profiles/wcm_base/themes/ocio_omega_base/css/layouts/ocio-default/ocio-default.layout.no-query.css @@ -517,20 +517,19 @@ input:focus { opacity: 0.5 !important; } -.l-constrained, .l-region--main-menu, .l-region--highlighted, .l-region--footer { +.l-constrained, .l-region--highlighted, .l-region--footer { padding: 0 2.5%; margin: 0 auto; *zoom: 1; - padding: 0 5%; - padding: 0 6%; + padding: 0 7%; + padding: 0 8%; } -.l-constrained:after, .l-region--main-menu:after, .l-region--highlighted:after, .l-region--footer:after { +.l-constrained:after, .l-region--highlighted:after, .l-region--footer:after { content: ""; display: table; clear: both; } -/* Setting body and page background color */ body.html { background-color: #2d2d2d; } @@ -651,55 +650,6 @@ tr.error { color: #2d2d2d; } -/* Styles for main menu */ -.l-region--main-menu .menu .leaf, .l-region--main-menu .menu .expanded, .l-region--main-menu .menu .collapsed, .l-region--sidebar-1 .menu .leaf, .l-region--sidebar-1 .menu .expanded, .l-region--sidebar-1 .menu .collapsed { - list-style-image: none; - list-style-type: none; -} - -.l-region--main-menu h2.block__title { - display: none; -} -.l-region--main-menu ul.menu { - float: left; - clear: left; - margin-top: 0; -} -.l-region--main-menu ul.menu li { - float: left; - margin: 0; - padding: 0.75em 0.9em; - text-transform: uppercase; -} -.l-region--main-menu ul.menu li.first { - padding-left: 0em; -} -.l-region--main-menu ul.menu li a { - /* color:$md-gray; */ - font-weight: 500; -} -.l-region--main-menu ul.menu li a:hover { - text-decoration: none; - /* color:$dk-gray; */ -} -.l-region--main-menu ul.menu ul { - display: none; - float: none; - position: absolute; - z-index: 99; - margin-top: 0.7em; -} -.l-region--main-menu ul.menu ul li.first { - padding-left: 0.9em; -} -.l-region--main-menu ul li:hover > ul { - display: block; -} -.l-region--main-menu ul ul.menu li { - float: none; - position: relative; -} - /** * @file * Theme for markup generated by theme_pager(). diff --git a/profiles/wcm_base/themes/ocio_omega_base/css/ocio-omega-base.no-query.css b/profiles/wcm_base/themes/ocio_omega_base/css/ocio-omega-base.no-query.css index 34e9b0d435c9441e18bf91cf0a6ae10e70431e8c..89925e43e72c58f58c84a0070ad269a9786c9ebd 100644 --- a/profiles/wcm_base/themes/ocio_omega_base/css/ocio-omega-base.no-query.css +++ b/profiles/wcm_base/themes/ocio_omega_base/css/ocio-omega-base.no-query.css @@ -513,20 +513,19 @@ input:focus { opacity: 0.5 !important; } -.l-constrained, .l-region--main-menu { +.l-constrained { padding: 0 2.5%; margin: 0 auto; *zoom: 1; - padding: 0 5%; - padding: 0 6%; + padding: 0 7%; + padding: 0 8%; } -.l-constrained:after, .l-region--main-menu:after { +.l-constrained:after { content: ""; display: table; clear: both; } -/* Setting body and page background color */ body.html { background-color: #2d2d2d; } @@ -647,55 +646,6 @@ tr.error { color: #2d2d2d; } -/* Styles for main menu */ -.l-region--main-menu .menu .leaf, .l-region--main-menu .menu .expanded, .l-region--main-menu .menu .collapsed, .l-region--sidebar-1 .menu .leaf, .l-region--sidebar-1 .menu .expanded, .l-region--sidebar-1 .menu .collapsed { - list-style-image: none; - list-style-type: none; -} - -.l-region--main-menu h2.block__title { - display: none; -} -.l-region--main-menu ul.menu { - float: left; - clear: left; - margin-top: 0; -} -.l-region--main-menu ul.menu li { - float: left; - margin: 0; - padding: 0.75em 0.9em; - text-transform: uppercase; -} -.l-region--main-menu ul.menu li.first { - padding-left: 0em; -} -.l-region--main-menu ul.menu li a { - /* color:$md-gray; */ - font-weight: 500; -} -.l-region--main-menu ul.menu li a:hover { - text-decoration: none; - /* color:$dk-gray; */ -} -.l-region--main-menu ul.menu ul { - display: none; - float: none; - position: absolute; - z-index: 99; - margin-top: 0.7em; -} -.l-region--main-menu ul.menu ul li.first { - padding-left: 0.9em; -} -.l-region--main-menu ul li:hover > ul { - display: block; -} -.l-region--main-menu ul ul.menu li { - float: none; - position: relative; -} - /** * @file * Theme for markup generated by theme_pager(). @@ -1711,55 +1661,6 @@ p.search-result__snippet { color: #b00; } -.view-user-directory #isotope-container { - margin-left: -10px; - margin-right: 10px; - margin-right: -10px; -} -.view-user-directory .isotope-element { - width: 100%; - height: 202px; - background: #ececec; - color: #2d2d2d; - font-size: 14px; - line-height: 140%; - padding: 15px; - width: 47%; - min-width: 400px; - width: 30%; -} -.view-user-directory .isotope-element a { - color: #b00 !important; - font-weight: 600; -} -.view-user-directory .isotope-element img { - width: 120px; - height: 172px; -} -.view-user-directory .isotope-element .ds-2col-fluid.user-profile.view-mode-directory .group-left { - width: auto; -} -.view-user-directory .isotope-element .ds-2col-fluid.user-profile.view-mode-directory .group-right { - float: left; - padding: 0.4em 0 0.4em 1.4em; -} -.view-user-directory .isotope-element .ds-2col-fluid.user-profile.view-mode-directory .field--name-name { - font-weight: 600; - font-size: 20px; - margin-bottom: 2px; - line-height: 120%; -} -.view-user-directory .isotope-element .ds-2col-fluid.user-profile.view-mode-directory .field--name-field-job-title { - font-size: 16px; - font-style: italic; - margin-bottom: 8px; - line-height: 120%; -} -.view-user-directory .isotope-element .ds-2col-fluid.user-profile.view-mode-directory .field--name-user-email { - margin-top: 6px; - font-size: 15px; -} - .node-type-webform .webform-component-fieldset { margin: 40px 0 20px 0; padding: 20px 1.5em; @@ -1875,6 +1776,55 @@ div.workbench-info-block #edit-submit { margin-left: 0; } +/* Styles for main menu */ +.l-region--main-menu .menu .leaf, .l-region--main-menu .menu .expanded, .l-region--main-menu .menu .collapsed, .l-region--sidebar-1 .menu .leaf, .l-region--sidebar-1 .menu .expanded, .l-region--sidebar-1 .menu .collapsed { + list-style-image: none; + list-style-type: none; +} + +.l-region--main-menu h2.block__title { + display: none; +} +.l-region--main-menu ul.menu { + float: left; + clear: left; + margin-top: 0; +} +.l-region--main-menu ul.menu li { + float: left; + margin: 0; + padding: 0.75em 0.9em; + text-transform: uppercase; +} +.l-region--main-menu ul.menu li.first { + padding-left: 0em; +} +.l-region--main-menu ul.menu li a { + /* color:$md-gray; */ + font-weight: 500; +} +.l-region--main-menu ul.menu li a:hover { + text-decoration: none; + /* color:$dk-gray; */ +} +.l-region--main-menu ul.menu ul { + display: none; + float: none; + position: absolute; + z-index: 99; + margin-top: 0.7em; +} +.l-region--main-menu ul.menu ul li.first { + padding-left: 0.9em; +} +.l-region--main-menu ul li:hover > ul { + display: block; +} +.l-region--main-menu ul ul.menu li { + float: none; + position: relative; +} + .l-region--main-menu { position: relative; } @@ -2185,6 +2135,20 @@ div.workbench-info-block #edit-submit { .l-region--main-menu.lt-gray.mean-container .mean-nav ul li a { border-top: 1px solid lightgray !important; } +.l-region--main-menu.white.mean-container { + background: #fff; + border-bottom: 1px solid lightgray; + border-top: 1px solid lightgray; +} +.l-region--main-menu.white.mean-container a.meanmenu-reveal, .l-region--main-menu.white.mean-container .mean-nav a { + color: #666666; +} +.l-region--main-menu.white.mean-container .mean-bar, .l-region--main-menu.white.mean-container .mean-nav { + background: #fff; +} +.l-region--main-menu.white.mean-container .mean-nav ul li a { + border-top: 1px solid lightgray !important; +} .l-region--main-menu > * { display: table-cell !important; @@ -2203,9 +2167,8 @@ div.workbench-info-block #edit-submit { background-color: #fff; padding: 20px 0; } -.l-region--masthead .l-constrained, .l-region--masthead .l-region--main-menu, -.l-region--masthead.white .l-constrained, -.l-region--masthead.white .l-region--main-menu { +.l-region--masthead .l-constrained, +.l-region--masthead.white .l-constrained { display: table; width: 100%; } diff --git a/profiles/wcm_base/themes/ocio_omega_base/css/ocio-omega-base.styles.css b/profiles/wcm_base/themes/ocio_omega_base/css/ocio-omega-base.styles.css index 30341b99bb1352756929cb2bc25c7a11f29a5110..a8baeed3c253c6bb327be66246ac5f3034af6549 100644 --- a/profiles/wcm_base/themes/ocio_omega_base/css/ocio-omega-base.styles.css +++ b/profiles/wcm_base/themes/ocio_omega_base/css/ocio-omega-base.styles.css @@ -513,28 +513,34 @@ input:focus { opacity: 0.5 !important; } -.l-constrained, .l-region--main-menu { +.l-constrained { padding: 0 2.5%; margin: 0 auto; *zoom: 1; } -.l-constrained:after, .l-region--main-menu:after { +.l-constrained:after { content: ""; display: table; clear: both; } @media (min-width: 47.5em) { - .l-constrained, .l-region--main-menu { - padding: 0 5%; + .l-constrained { + padding: 0 7%; } } -@media (min-width: 68em) { - .l-constrained, .l-region--main-menu { - padding: 0 6%; +@media (min-width: 60em) { + .l-constrained { + padding: 0 8%; } } -/* Setting body and page background color */ +@media (min-width: 92em) { + .max-width { + max-width: 87.5em; + margin: 0 auto; + padding: 0; + } +} body.html { background-color: #2d2d2d; } @@ -655,55 +661,6 @@ tr.error { color: #2d2d2d; } -/* Styles for main menu */ -.l-region--main-menu .menu .leaf, .l-region--main-menu .menu .expanded, .l-region--main-menu .menu .collapsed, .l-region--sidebar-1 .menu .leaf, .l-region--sidebar-1 .menu .expanded, .l-region--sidebar-1 .menu .collapsed { - list-style-image: none; - list-style-type: none; -} - -.l-region--main-menu h2.block__title { - display: none; -} -.l-region--main-menu ul.menu { - float: left; - clear: left; - margin-top: 0; -} -.l-region--main-menu ul.menu li { - float: left; - margin: 0; - padding: 0.75em 0.9em; - text-transform: uppercase; -} -.l-region--main-menu ul.menu li.first { - padding-left: 0em; -} -.l-region--main-menu ul.menu li a { - /* color:$md-gray; */ - font-weight: 500; -} -.l-region--main-menu ul.menu li a:hover { - text-decoration: none; - /* color:$dk-gray; */ -} -.l-region--main-menu ul.menu ul { - display: none; - float: none; - position: absolute; - z-index: 99; - margin-top: 0.7em; -} -.l-region--main-menu ul.menu ul li.first { - padding-left: 0.9em; -} -.l-region--main-menu ul li:hover > ul { - display: block; -} -.l-region--main-menu ul ul.menu li { - float: none; - position: relative; -} - /** * @file * Theme for markup generated by theme_pager(). @@ -837,7 +794,7 @@ h2.block__title { line-height: 150%; } } -@media (min-width: 68em) { +@media (min-width: 60em) { html { font-size: 62.5%; } @@ -849,7 +806,7 @@ h2.block__title { line-height: 150%; } } -@media (min-width: 88em) { +@media (min-width: 75em) { html { font-size: 66%; } @@ -1145,7 +1102,7 @@ h2.block__title { line-height: 150%; } } -@media (min-width: 68em) { +@media (min-width: 60em) { html { font-size: 62.5%; } @@ -1157,7 +1114,7 @@ h2.block__title { line-height: 150%; } } -@media (min-width: 88em) { +@media (min-width: 75em) { html { font-size: 66%; } @@ -1668,17 +1625,17 @@ p.search-result__snippet { height: 80px; } } -@media (min-width: 68em) { +@media (min-width: 60em) { .panel-pane.pane-bundle-tile-pane .title-box { height: 90px; } } -@media (min-width: 78em) { +@media (min-width: 75em) { .panel-pane.pane-bundle-tile-pane .title-box { height: 94px; } } -@media (min-width: 88em) { +@media (min-width: 75em) { .panel-pane.pane-bundle-tile-pane .title-box { height: 96px; } @@ -1687,16 +1644,11 @@ p.search-result__snippet { width: 85%; float: left; } -@media (min-width: 78em) { +@media (min-width: 75em) { .panel-pane.pane-bundle-tile-pane .title-box .title-text { width: 75%; } } -@media (min-width: 100em) { - .panel-pane.pane-bundle-tile-pane .title-box .title-text { - width: 65%; - } -} .panel-pane.pane-bundle-tile-pane .title-box .title-text h2 { font-size: 24px; line-height: 120%; @@ -1715,17 +1667,17 @@ p.search-result__snippet { font-size: 18px; } } -@media (min-width: 68em) { +@media (min-width: 60em) { .panel-pane.pane-bundle-tile-pane .title-box .title-text h2 { font-size: 21px; } } -@media (min-width: 78em) { +@media (min-width: 75em) { .panel-pane.pane-bundle-tile-pane .title-box .title-text h2 { font-size: 23px; } } -@media (min-width: 88em) { +@media (min-width: 75em) { .panel-pane.pane-bundle-tile-pane .title-box .title-text h2 { font-size: 24px; } @@ -1735,19 +1687,19 @@ p.search-result__snippet { font-size: 32px; padding: 7px 0; } -@media (min-width: 68em) { +@media (min-width: 60em) { .panel-pane.pane-bundle-tile-pane .title-box .title-icon { font-size: 34px; padding: 9px 0; } } -@media (min-width: 78em) { +@media (min-width: 75em) { .panel-pane.pane-bundle-tile-pane .title-box .title-icon { font-size: 35px; padding: 10px 0; } } -@media (min-width: 88em) { +@media (min-width: 75em) { .panel-pane.pane-bundle-tile-pane .title-box .title-icon { font-size: 36px; padding: 12px 0; @@ -1814,67 +1766,6 @@ p.search-result__snippet { color: #b00; } -.view-user-directory #isotope-container { - margin-left: -10px; - margin-right: 10px; -} -@media (min-width: 47.5em) { - .view-user-directory #isotope-container { - margin-right: -10px; - } -} -.view-user-directory .isotope-element { - width: 100%; - height: 202px; - background: #ececec; - color: #2d2d2d; - font-size: 14px; - line-height: 140%; - padding: 15px; -} -@media (min-width: 56em) { - .view-user-directory .isotope-element { - width: 47%; - min-width: 400px; - } -} -@media (min-width: 88em) { - .view-user-directory .isotope-element { - width: 30%; - } -} -.view-user-directory .isotope-element a { - color: #b00 !important; - font-weight: 600; -} -.view-user-directory .isotope-element img { - width: 120px; - height: 172px; -} -.view-user-directory .isotope-element .ds-2col-fluid.user-profile.view-mode-directory .group-left { - width: auto; -} -.view-user-directory .isotope-element .ds-2col-fluid.user-profile.view-mode-directory .group-right { - float: left; - padding: 0.4em 0 0.4em 1.4em; -} -.view-user-directory .isotope-element .ds-2col-fluid.user-profile.view-mode-directory .field--name-name { - font-weight: 600; - font-size: 20px; - margin-bottom: 2px; - line-height: 120%; -} -.view-user-directory .isotope-element .ds-2col-fluid.user-profile.view-mode-directory .field--name-field-job-title { - font-size: 16px; - font-style: italic; - margin-bottom: 8px; - line-height: 120%; -} -.view-user-directory .isotope-element .ds-2col-fluid.user-profile.view-mode-directory .field--name-user-email { - margin-top: 6px; - font-size: 15px; -} - .node-type-webform .webform-component-fieldset { margin: 40px 0 20px 0; padding: 20px 1.5em; @@ -1991,6 +1882,55 @@ div.workbench-info-block #edit-submit { margin-left: 0; } } +/* Styles for main menu */ +.l-region--main-menu .menu .leaf, .l-region--main-menu .menu .expanded, .l-region--main-menu .menu .collapsed, .l-region--sidebar-1 .menu .leaf, .l-region--sidebar-1 .menu .expanded, .l-region--sidebar-1 .menu .collapsed { + list-style-image: none; + list-style-type: none; +} + +.l-region--main-menu h2.block__title { + display: none; +} +.l-region--main-menu ul.menu { + float: left; + clear: left; + margin-top: 0; +} +.l-region--main-menu ul.menu li { + float: left; + margin: 0; + padding: 0.75em 0.9em; + text-transform: uppercase; +} +.l-region--main-menu ul.menu li.first { + padding-left: 0em; +} +.l-region--main-menu ul.menu li a { + /* color:$md-gray; */ + font-weight: 500; +} +.l-region--main-menu ul.menu li a:hover { + text-decoration: none; + /* color:$dk-gray; */ +} +.l-region--main-menu ul.menu ul { + display: none; + float: none; + position: absolute; + z-index: 99; + margin-top: 0.7em; +} +.l-region--main-menu ul.menu ul li.first { + padding-left: 0.9em; +} +.l-region--main-menu ul li:hover > ul { + display: block; +} +.l-region--main-menu ul ul.menu li { + float: none; + position: relative; +} + .l-region--main-menu { position: relative; } @@ -2301,6 +2241,20 @@ div.workbench-info-block #edit-submit { .l-region--main-menu.lt-gray.mean-container .mean-nav ul li a { border-top: 1px solid lightgray !important; } +.l-region--main-menu.white.mean-container { + background: #fff; + border-bottom: 1px solid lightgray; + border-top: 1px solid lightgray; +} +.l-region--main-menu.white.mean-container a.meanmenu-reveal, .l-region--main-menu.white.mean-container .mean-nav a { + color: #666666; +} +.l-region--main-menu.white.mean-container .mean-bar, .l-region--main-menu.white.mean-container .mean-nav { + background: #fff; +} +.l-region--main-menu.white.mean-container .mean-nav ul li a { + border-top: 1px solid lightgray !important; +} @media (min-width: 47.5em) { .l-region--main-menu > * { @@ -2321,9 +2275,8 @@ div.workbench-info-block #edit-submit { background-color: #fff; padding: 20px 0; } -.l-region--masthead .l-constrained, .l-region--masthead .l-region--main-menu, -.l-region--masthead.white .l-constrained, -.l-region--masthead.white .l-region--main-menu { +.l-region--masthead .l-constrained, +.l-region--masthead.white .l-constrained { display: table; width: 100%; } diff --git a/profiles/wcm_base/themes/ocio_omega_base/layouts/ocio-default/ocio-default-layout.tpl.php b/profiles/wcm_base/themes/ocio_omega_base/layouts/ocio-default/ocio-default-layout.tpl.php index 79ec25f45a90ddfd2a3bede7d152918d01eb0fa1..2bbeba19b682d2a8e034c5ce3b0dffeb6471a54f 100644 --- a/profiles/wcm_base/themes/ocio_omega_base/layouts/ocio-default/ocio-default-layout.tpl.php +++ b/profiles/wcm_base/themes/ocio_omega_base/layouts/ocio-default/ocio-default-layout.tpl.php @@ -1,9 +1,8 @@ <div<?php print $attributes; ?>> <header class="l-header" role="banner"> - - <?php print render($page['osu_navbar']); ?> - <?php print render($page['masthead']); ?> - <?php print render($page['main_menu']); ?> + <?php print render($page['osu_navbar']); ?> + <?php print render($page['masthead']); ?> + <?php print render($page['main_menu']); ?> </header> <?php if (!empty($page['highlighted'])): ?> @@ -12,32 +11,37 @@ </div> <?php endif; ?> - <div class="l-main l-constrained <?php print $main_classes; ?>"> + <div class="l-main <?php print $main_classes; ?>"> <a id="main-content"></a> - <?php print $breadcrumb; ?> - <?php print render($tabs); ?> - <?php print render($page['help']); ?> - <?php print $messages; ?> - - <?php print render($page['workbench']); ?> + + <div class="l-constrained max-width"> + <?php print $breadcrumb; ?> + <?php print render($tabs); ?> + <?php print render($page['help']); ?> + <?php print $messages; ?> + <?php print render($page['workbench']); ?> - <div class="l-content" role="main"> - <?php if ($title): ?> - <h1 class="page-title"><?php print $title; ?></h1> - <?php endif; ?> - <?php if ($action_links): ?> - <ul class="action-links"><?php print render($action_links); ?></ul> - <?php endif; ?> - <?php print render($page['content']); ?> - <?php print $feed_icons; ?> - </div> + <div class="l-content" role="main"> + <?php if ($title): ?> + <h1 class="page-title"><?php print $title; ?></h1> + <?php endif; ?> + + <?php if ($action_links): ?> + <ul class="action-links"><?php print render($action_links); ?></ul> + <?php endif; ?> + + <?php print render($page['content']); ?> + <?php print $feed_icons; ?> + </div> - <?php print render($page['sidebar_1']); ?> - <?php print render($page['sidebar_2']); ?> + <?php print render($page['sidebar_1']); ?> + <?php print render($page['sidebar_2']); ?> + </div> <!-- end max-width --> + </div> <footer class="l-footer-wrapper" role="contentinfo"> - <div class="l-constrained"> + <div class="l-constrained max-width"> <?php print render($page['footer_1']); ?> <?php print render($page['footer_2']); ?> <?php print render($page['footer_3']); ?> diff --git a/profiles/wcm_base/themes/ocio_omega_base/preprocess/region.preprocess.inc b/profiles/wcm_base/themes/ocio_omega_base/preprocess/region.preprocess.inc index 7a77ed0663879047e69ec134be356bec216132fd..1c9ccd178cf117545aed047b1829b2212c1a27eb 100644 --- a/profiles/wcm_base/themes/ocio_omega_base/preprocess/region.preprocess.inc +++ b/profiles/wcm_base/themes/ocio_omega_base/preprocess/region.preprocess.inc @@ -26,6 +26,7 @@ function ocio_omega_base_preprocess_region(&$vars) { case 'main_menu': /* Variables for main_menu region */ $vars['classes_array'][] = theme_get_setting('ocio_omega_color_menu'); + $vars['classes_array'][] = 'l-constrained'; break; case 'footer_1': /* Variables for footer_1 region */ diff --git a/profiles/wcm_base/themes/ocio_omega_base/sass/base/_layout-base.scss b/profiles/wcm_base/themes/ocio_omega_base/sass/base/_layout-base.scss index 1d6adf237cc916cd39afe70efc6bc8ad56bba33b..ec07f53b5f554e53ead7541c57bcc58ad8e743b2 100644 --- a/profiles/wcm_base/themes/ocio_omega_base/sass/base/_layout-base.scss +++ b/profiles/wcm_base/themes/ocio_omega_base/sass/base/_layout-base.scss @@ -4,18 +4,30 @@ margin: 0 auto; @include pie-clearfix; @include breakpoint($tab, true) { - padding:0 5%; + padding:0 7%; } @include breakpoint($desk, true) { - padding:0 6%; + padding:0 8%; } } -/* Setting body and page background color */ + +// setting max-width of content containers +// note: main-menu region max-width is defined in ../components/regions/_main-menu.scss +@include breakpoint($x-wide){ + .max-width { + max-width: $max-width; + margin: 0 auto; + padding: 0; + } +} + +// Setting body and page background color body.html { background-color: $dk-gray; } .l-page { background-color: $white; -} \ No newline at end of file +} + diff --git a/profiles/wcm_base/themes/ocio_omega_base/sass/base/_navigation.scss b/profiles/wcm_base/themes/ocio_omega_base/sass/base/_navigation.scss deleted file mode 100644 index f8458851707067edc7db67cdf315fbe9f177181f..0000000000000000000000000000000000000000 --- a/profiles/wcm_base/themes/ocio_omega_base/sass/base/_navigation.scss +++ /dev/null @@ -1,63 +0,0 @@ -/* Styles for main menu */ -.l-region--main-menu, .l-region--sidebar-1 { - .menu .leaf, .menu .expanded, .menu .collapsed { - list-style-image:none; - list-style-type:none; - } -} -.l-region--main-menu { - @extend .l-constrained; - h2.block__title { - display:none; - } - - ul.menu { - float:left; - clear:left; - margin-top:0; - li { - float: left; - margin: 0; - padding: 0.75em 0.9em; - text-transform:uppercase; - } - li.first { - padding-left:0em; - } - li a { - /* color:$md-gray; */ - font-weight:500; - } - - li a:hover { - text-decoration:none; - /* color:$dk-gray; */ - } - } - - ul.menu ul { - display: none; - - float:none; - position:absolute; - z-index: 99; - margin-top:0.7em; - - - li.first { - padding-left:0.9em; - } - - - } - - ul li:hover > ul { - display: block; - } - ul ul.menu li { - float:none; - position:relative; - } - -} - diff --git a/profiles/wcm_base/themes/ocio_omega_base/sass/components/_panels.scss b/profiles/wcm_base/themes/ocio_omega_base/sass/components/_panels.scss index ae01968d694bf0344a64cc1335363287cfa8f3da..a62518aa6a0f49c45d29783b8e0c3f39a59b2755 100644 --- a/profiles/wcm_base/themes/ocio_omega_base/sass/components/_panels.scss +++ b/profiles/wcm_base/themes/ocio_omega_base/sass/components/_panels.scss @@ -13,7 +13,6 @@ h2.pane-title { } } - .sidebar-panel { background-color: $lt-gray; padding: 1em; diff --git a/profiles/wcm_base/themes/ocio_omega_base/sass/components/_tiles.scss b/profiles/wcm_base/themes/ocio_omega_base/sass/components/_tiles.scss index 8b26b19b9ffb70ffedf448bc68b76f94854ef5de..767946bef1a9af741b3497cb568f8d3df2d4d6b0 100644 --- a/profiles/wcm_base/themes/ocio_omega_base/sass/components/_tiles.scss +++ b/profiles/wcm_base/themes/ocio_omega_base/sass/components/_tiles.scss @@ -28,7 +28,7 @@ height: 90px; } - @include breakpoint($desk-wide){ + @include breakpoint($wide){ height: 94px; } @@ -40,14 +40,10 @@ width: 85%; float: left; - @include breakpoint($desk-wide){ + @include breakpoint($wide){ width: 75%; } - @include breakpoint($x-wide){ - width: 65%; - } - h2 { font-size: 24px; line-height: 120%; @@ -68,7 +64,7 @@ font-size: 21px; } - @include breakpoint($desk-wide){ + @include breakpoint($wide){ font-size: 23px; } @@ -89,7 +85,7 @@ padding: 9px 0; } - @include breakpoint($desk-wide){ + @include breakpoint($wide){ font-size: 35px; padding: 10px 0; } diff --git a/profiles/wcm_base/themes/ocio_omega_base/sass/components/_users.scss b/profiles/wcm_base/themes/ocio_omega_base/sass/components/_users.scss index 150a8d6207bad7ab41625a9462905f043067b826..3677b1baa7edbfa27f8931c84d69130b8f4ffb91 100644 --- a/profiles/wcm_base/themes/ocio_omega_base/sass/components/_users.scss +++ b/profiles/wcm_base/themes/ocio_omega_base/sass/components/_users.scss @@ -1,72 +1,4 @@ .view-user-directory { - #isotope-container { - margin-left: -10px; - margin-right: 10px; - @include breakpoint($tab,true) { - margin-right: -10px; - } - } - - .isotope-element { - width: 100%; - height: 202px; - background: $lt-gray; - color: $dk-gray; - font-size: 14px; - line-height: 140%; - padding: 15px; - - @include breakpoint($tab-desk,true) { - width: 47%; - min-width: 400px; - } - - @include breakpoint($wide,true) { - width: 30%; - } - - a { - color: $red !important; - font-weight: 600; - } - - img { - width: 120px; - height: 172px; - } - - .ds-2col-fluid.user-profile.view-mode-directory { - .group-left { - width: auto; - } - - .group-right { - float: left; - padding: 0.4em 0 0.4em 1.4em; - } - - .field--name-name { - font-weight: 600; - font-size: 20px; - margin-bottom: 2px; - line-height: 120%; - } - - .field--name-field-job-title { - font-size: 16px; - font-style: italic; - margin-bottom: 8px; - line-height: 120%; - } - - .field--name-user-email { - margin-top: 6px; - font-size: 15px; - } - - } - - } - + } diff --git a/profiles/wcm_base/themes/ocio_omega_base/sass/components/regions/_main-menu.scss b/profiles/wcm_base/themes/ocio_omega_base/sass/components/regions/_main-menu.scss index 8a5206537edd25e79dafd917b81eee9393e7c442..0addf4cc8d40a0d90ce6b8a61d0b2bc5c59f5890 100644 --- a/profiles/wcm_base/themes/ocio_omega_base/sass/components/regions/_main-menu.scss +++ b/profiles/wcm_base/themes/ocio_omega_base/sass/components/regions/_main-menu.scss @@ -1,3 +1,68 @@ +/* Styles for main menu */ +.l-region--main-menu, .l-region--sidebar-1 { + .menu .leaf, .menu .expanded, .menu .collapsed { + list-style-image:none; + list-style-type:none; + } +} +.l-region--main-menu { + + h2.block__title { + display:none; + } + + ul.menu { + float:left; + clear:left; + margin-top:0; + li { + float: left; + margin: 0; + padding: 0.75em 0.9em; + text-transform:uppercase; + } + li.first { + padding-left:0em; + } + li a { + /* color:$md-gray; */ + font-weight:500; + } + + li a:hover { + text-decoration:none; + /* color:$dk-gray; */ + } + } + + ul.menu ul { + display: none; + + float:none; + position:absolute; + z-index: 99; + margin-top:0.7em; + + + li.first { + padding-left:0.9em; + } + + } + + ul li:hover > ul { + display: block; + } + ul ul.menu li { + float:none; + position:relative; + } + +} + + + + .l-region--main-menu { position: relative; @@ -206,6 +271,25 @@ border-top: 1px solid darken($lt-gray, 10%) !important; } } + + &.white.mean-container { + background: $white; + border-bottom: 1px solid darken($lt-gray, 10%); + border-top: 1px solid darken($lt-gray, 10%); + + a.meanmenu-reveal, .mean-nav a { + color: $md-gray; + } + + .mean-bar, .mean-nav { + background: $white; + } + + .mean-nav ul li a { + border-top: 1px solid darken($lt-gray, 10%) !important; + } + } + } @include breakpoint($tab, true) { diff --git a/profiles/wcm_base/themes/ocio_omega_base/sass/variables/_grid.scss b/profiles/wcm_base/themes/ocio_omega_base/sass/variables/_grid.scss index 408f2722ef21a701eb8e97ade9413dcbd947ade9..57f44afc2df2e33e30c480b941d22dc3d8ba8001 100644 --- a/profiles/wcm_base/themes/ocio_omega_base/sass/variables/_grid.scss +++ b/profiles/wcm_base/themes/ocio_omega_base/sass/variables/_grid.scss @@ -4,11 +4,11 @@ $horz-spacing-unit: 1.5em; $small: max-width 47.5em; // 760px $tab: 47.5em; //760px -$tab-desk: 56em; //896px -$desk: 68em; //1088px -$desk-wide: 78em; //1248px -$wide: 88em; //1408px -$x-wide: 100em; //1600px +$desk: 60em; //960px +$wide: 75em; //1200px +$x-wide: 92em; //1472px + +$max-width: 87.5em; //1400px $grids: 4; $grids: add-grid(12 at $tab); diff --git a/profiles/wcm_base/themes/ocio_omega_base/template.php b/profiles/wcm_base/themes/ocio_omega_base/template.php index 1ef89be2382add9eeb14cf94d5f2fe9d83fbc35e..053987fb986c30ad75e71e2f1d94a3eeb4bfbf88 100644 --- a/profiles/wcm_base/themes/ocio_omega_base/template.php +++ b/profiles/wcm_base/themes/ocio_omega_base/template.php @@ -102,11 +102,11 @@ function ocio_omega_base_omega_theme_libraries_info() { /** * Create variables for custom panels panes created via FPP - ** + ** * Implements hook_preprocess_fieldable_panels_pane(). */ - + function ocio_omega_base_preprocess_fieldable_panels_pane(&$vars) { $vars['tile_title'] = $vars['content']['title']['#value']; $vars['tile_url'] = $vars['content']['field_tile_link']['#items'][0]['url']; -} \ No newline at end of file +} diff --git a/profiles/wcm_base/themes/ocio_omega_base/templates/regions/region--content.tpl.php b/profiles/wcm_base/themes/ocio_omega_base/templates/regions/region--content.tpl.php new file mode 100644 index 0000000000000000000000000000000000000000..e7f1feb4105c9fc4f987f6468dc8dac52be3744d --- /dev/null +++ b/profiles/wcm_base/themes/ocio_omega_base/templates/regions/region--content.tpl.php @@ -0,0 +1,36 @@ +<?php + +/** + * @file + * Default theme implementation to display a region. + * + * Available variables: + * - $content: The content for this region, typically blocks. + * - $classes: String of classes that can be used to style contextually through + * CSS. It can be manipulated through the variable $classes_array from + * preprocess functions. The default values can be one or more of the + * following: + * - region: The current template type, i.e., "theming hook". + * - region-[name]: The name of the region with underscores replaced with + * dashes. For example, the page_top region would have a region-page-top + * class. + * - $region: The name of the region variable as defined in the theme's .info + * file. + * + * Helper variables: + * - $classes_array: Array of html class attribute values. It is flattened + * into a string within the variable $classes. + * - $is_admin: Flags true when the current user is an administrator. + * - $is_front: Flags true when presented in the front page. + * - $logged_in: Flags true when the current user is a logged-in member. + * + * @see template_preprocess() + * @see template_preprocess_region() + * @see template_process() + */ +?> +<?php if ($content): ?> + <div<?php print $attributes; ?>> + <?php print $content; ?> + </div> +<?php endif; ?> diff --git a/profiles/wcm_base/themes/ocio_omega_base/templates/regions/region--main-menu.tpl.php b/profiles/wcm_base/themes/ocio_omega_base/templates/regions/region--main-menu.tpl.php new file mode 100644 index 0000000000000000000000000000000000000000..44b59307a66340998f4c0b9ffc5850229de689e4 --- /dev/null +++ b/profiles/wcm_base/themes/ocio_omega_base/templates/regions/region--main-menu.tpl.php @@ -0,0 +1,35 @@ +<?php + +/** + * @file + * Default theme implementation to display a region. + * + * Available variables: + * - $content: The content for this region, typically blocks. + * - $classes: String of classes that can be used to style contextually through + * CSS. It can be manipulated through the variable $classes_array from + * preprocess functions. The default values can be one or more of the + * following: + * - region: The current template type, i.e., "theming hook". + * - region-[name]: The name of the region with underscores replaced with + * dashes. For example, the page_top region would have a region-page-top + * class. + * - $region: The name of the region variable as defined in the theme's .info + * file. + * + * Helper variables: + * - $classes_array: Array of html class attribute values. It is flattened + * into a string within the variable $classes. + * - $is_admin: Flags true when the current user is an administrator. + * - $is_front: Flags true when presented in the front page. + * - $logged_in: Flags true when the current user is a logged-in member. + * + * @see template_preprocess() + * @see template_preprocess_region() + * @see template_process() + */ +?> +<div<?php print $attributes; ?>> + <?php print $content; ?> +</div> + diff --git a/profiles/wcm_base/themes/ocio_omega_base/templates/regions/region--masthead.tpl.php b/profiles/wcm_base/themes/ocio_omega_base/templates/regions/region--masthead.tpl.php index 81c594c62a2c15ecfc66475d329cdc54c2c4c6c2..04305683d05a8542a57e3fca832e42bbfd9cf375 100644 --- a/profiles/wcm_base/themes/ocio_omega_base/templates/regions/region--masthead.tpl.php +++ b/profiles/wcm_base/themes/ocio_omega_base/templates/regions/region--masthead.tpl.php @@ -35,7 +35,7 @@ */ ?> <div<?php print $attributes; ?>> - <div class="l-constrained"> + <div class="l-constrained max-width"> <div id="site-name"<?php print $site_name_classes; ?>> <a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home"> <?php if ($site_name_prefix): ?> diff --git a/profiles/wcm_base/themes/ocio_omega_base/templates/regions/region--osu-navbar.tpl.php b/profiles/wcm_base/themes/ocio_omega_base/templates/regions/region--osu-navbar.tpl.php index 93b2ff6d34084147002f024d2dc07762e2a54b6e..a66445c2b6b4f51b36e4de954a269ebd01b33a79 100644 --- a/profiles/wcm_base/themes/ocio_omega_base/templates/regions/region--osu-navbar.tpl.php +++ b/profiles/wcm_base/themes/ocio_omega_base/templates/regions/region--osu-navbar.tpl.php @@ -30,7 +30,7 @@ */ ?> <div<?php print $attributes; ?>> - <div role="navigation" id="osu_navbar" class="l-constrained" aria-labelledby="osu_navbar_heading"> + <div role="navigation" id="osu_navbar" class="l-constrained max-width" aria-labelledby="osu_navbar_heading"> <h2 id="osu_navbar_heading" class="osu-semantic">Ohio State nav bar</h2> <a href="#main-content" id="skip" class="osu-semantic">Skip to main content</a> diff --git a/profiles/wcm_base/themes/ocio_omega_base/templates/regions/region.tpl.php b/profiles/wcm_base/themes/ocio_omega_base/templates/regions/region.tpl.php new file mode 100644 index 0000000000000000000000000000000000000000..e7f1feb4105c9fc4f987f6468dc8dac52be3744d --- /dev/null +++ b/profiles/wcm_base/themes/ocio_omega_base/templates/regions/region.tpl.php @@ -0,0 +1,36 @@ +<?php + +/** + * @file + * Default theme implementation to display a region. + * + * Available variables: + * - $content: The content for this region, typically blocks. + * - $classes: String of classes that can be used to style contextually through + * CSS. It can be manipulated through the variable $classes_array from + * preprocess functions. The default values can be one or more of the + * following: + * - region: The current template type, i.e., "theming hook". + * - region-[name]: The name of the region with underscores replaced with + * dashes. For example, the page_top region would have a region-page-top + * class. + * - $region: The name of the region variable as defined in the theme's .info + * file. + * + * Helper variables: + * - $classes_array: Array of html class attribute values. It is flattened + * into a string within the variable $classes. + * - $is_admin: Flags true when the current user is an administrator. + * - $is_front: Flags true when presented in the front page. + * - $logged_in: Flags true when the current user is a logged-in member. + * + * @see template_preprocess() + * @see template_preprocess_region() + * @see template_process() + */ +?> +<?php if ($content): ?> + <div<?php print $attributes; ?>> + <?php print $content; ?> + </div> +<?php endif; ?> diff --git a/profiles/wcm_base/wcm_base.info b/profiles/wcm_base/wcm_base.info index ea33a22ba11e316651bf1cfabf81e16301df12c0..c3770319ecc174927e8124d8f64e2ce93a23a336 100644 --- a/profiles/wcm_base/wcm_base.info +++ b/profiles/wcm_base/wcm_base.info @@ -83,6 +83,7 @@ dependencies[] = uuid ; Custom dependencies[] = ocio_accessibility dependencies[] = ocio_admin_menu +dependencies[] = ocio_aggregator dependencies[] = ocio_basic_page dependencies[] = ocio_book dependencies[] = ocio_buckeye_alert diff --git a/profiles/wcm_base/wcm_base.make b/profiles/wcm_base/wcm_base.make index 931b62cccf6c2d519ffbe91db852f52f27027a5a..09be4e120f5b7384387a2063c7859dfdfc416d7c 100644 --- a/profiles/wcm_base/wcm_base.make +++ b/profiles/wcm_base/wcm_base.make @@ -102,6 +102,12 @@ projects[ocio_admin_menu][download][type] = "git" projects[ocio_admin_menu][download][url] = git@code.osu.edu:ocio_odee_web/ocio_admin_menu.git projects[ocio_admin_menu][download][branch] = 7.x-1.x +projects[ocio_aggregator][type] = module +projects[ocio_aggregator][subdir] = custom +projects[ocio_aggregator][download][type] = "git" +projects[ocio_aggregator][download][url] = git@code.osu.edu:ocio_odee_web/ocio_aggregator.git +projects[ocio_aggregator][download][branch] = 7.x-1.x + projects[ocio_basic_page][type] = module projects[ocio_basic_page][subdir] = custom projects[ocio_basic_page][download][type] = "git"