/** * Trade Business Technology Corp. * * NOTICE OF LICENSE * * This source file is subject to the Open Software License (OSL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://opensource.org/licenses/osl-3.0.php * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to license@magentocommerce.com so we can send you a copy immediately. * * @copyright Copyright (c) 2008-2009 Trade Business Technology Corp. (contact@tbtcorp.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ varienGrid.prototype.initialize = function(containerId, url, pageVar, sortVar, dirVar, filterVar){ this.containerId = containerId; this.url = url; this.pageVar = pageVar || false; this.sortVar = sortVar || false; this.dirVar = dirVar || false; this.filterVar = filterVar || false; this.tableSufix = '_table'; this.useAjax = false; this.rowClickCallback = false; this.checkboxCheckCallback = false; this.preInitCallback = false; this.initCallback = false; this.initRowCallback = false; this.doFilterCallback = false; // muliselect row this.selectedRowEvents = {}; this.doMultiSelect = false; this.multiSelectFunction = function(events) { this.onMultiSelect(events); }; this.reloadParams = false; this.trOnMouseOver = this.rowMouseOver.bindAsEventListener(this); this.trOnMouseOut = this.rowMouseOut.bindAsEventListener(this); this.trOnMouseUp = this.rowMouseUp.bindAsEventListener(this); this.trOnMouseDown = this.rowMouseDown.bindAsEventListener(this); this.trOnMouseMove = this.rowMouseMove.bindAsEventListener(this); this.trOnClick = this.rowMouseClick.bindAsEventListener(this); this.trOnDblClick = this.rowMouseDblClick.bindAsEventListener(this); this.trOnKeyPress = this.keyPress.bindAsEventListener(this); this.thLinkOnClick = this.doSort.bindAsEventListener(this); this.initGrid(); }; varienGrid.prototype.initGrid = function(){ if(this.preInitCallback){ this.preInitCallback(this); } if($(this.containerId+this.tableSufix)){ this.rows = $$('#'+this.containerId+this.tableSufix+' tbody tr'); for (var row=0; row