/** ##################################################################### # Warning # # ####### # # This external file is Ampache-adapted and probably unsynced with # # origin because abandonned by its original authors. # # # ##################################################################### Copyright (c) 2012 Marco Pegoraro, http://movableapp.com/ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. WHERE TO FIND MEDIA TABLE: https://github.com/thepeg/MediaTable http://consulenza-web.com/jquery/MediaTable/ http://www.consulenza-web.com/2012/01/mediatable-jquery-plugin/ **/ /** * jQuery Bacheca * Plugin Dimostrativo */ ;(function($){ /** * DOM Initialization Logic */ var __loop = function( cfg, i ) { var $this = $(this), wdg = $this.data( 'MediaTable' ); // Prevent re-initialization of the widget! if ( !$.isEmptyObject(wdg) ) return; // Build the widget context. wdg = { $wrap: $('
'), // Refer to the main content of the widget $table: $this, // Refer to the MediaTable DOM (TABLE TAG) $menu: false, // Refer to the column's toggler menu container cfg: cfg, // widget local configuration object id: $this.attr('id') }; // Setup Widget ID if not specified into DOM Table. if ( !wdg.id ) { wdg.id = 'MediaTable-' + i; wdg.$table.attr( 'id', wdg.id ); } // Activate the MediaTable. wdg.$table.addClass('activeMediaTable'); // Create the wrapper. wdg.$wrap.addClass('mediaTableWrapper'); wdg.$wrap.attr('data-respond', ''); // Place the wrapper near the table and fill with MediaTable. wdg.$table.before(wdg.$wrap).appendTo(wdg.$wrap); // Save widget context into table DOM. wdg.$table.data( 'MediaTable', wdg ); }; // EndOf: "__loop()" ### var __initMenu = function( wdg ) { // Buid menu objects wdg.$menu = $('
'); wdg.$menu.$header = $(''); wdg.$menu.$list = $('