slickgrid
Advanced tools
Comparing version 2.3.18 to 2.3.19
@@ -97,2 +97,3 @@ /*** | ||
var _grid = grid; | ||
var _gridUid = (grid && grid.getUID) ? grid.getUID() : ''; | ||
var _isMenuOpen = false; | ||
@@ -102,2 +103,3 @@ var _options = options; | ||
var $list; | ||
var $button; | ||
var $menu; | ||
@@ -117,4 +119,7 @@ var columnCheckboxes; | ||
var gridMenuWidth = (_options.gridMenu && _options.gridMenu.menuWidth) || _defaults.menuWidth; | ||
var $header = $('.slick-header'); | ||
var $header = $('.' + _gridUid + ' .slick-header'); | ||
$header.attr('style', 'width: calc(100% - ' + gridMenuWidth +'px)'); | ||
// subscribe to the grid, when it's destroyed, we should also destroy the Grid Menu | ||
grid.onBeforeDestroy.subscribe(destroy); | ||
@@ -128,3 +133,3 @@ // if header row is enabled, we need to resize it's width also | ||
var $button = $('<button class="slick-gridmenu-button"/>'); | ||
$button = $('<button class="slick-gridmenu-button"/>'); | ||
if (_options.gridMenu && _options.gridMenu.iconCssClass) { | ||
@@ -155,3 +160,3 @@ $button.addClass(_options.gridMenu.iconCssClass); | ||
// Hide the menu on outside click. | ||
$(document.body).on("mousedown", handleBodyMouseDown); | ||
$(document.body).on("mousedown." + _gridUid, handleBodyMouseDown); | ||
@@ -162,3 +167,3 @@ // destroy the picker if user leaves the page | ||
// add on click handler for the Grid Menu itself | ||
$button.on("click", showGridMenu); | ||
$button.on("click." + _gridUid, showGridMenu); | ||
} | ||
@@ -172,5 +177,7 @@ | ||
_grid.onColumnsReordered.unsubscribe(updateColumnOrder); | ||
$(document.body).off("mousedown", handleBodyMouseDown); | ||
_grid.onBeforeDestroy.unsubscribe(); | ||
$(document.body).off("mousedown." + _gridUid, handleBodyMouseDown); | ||
$("div.slick-gridmenu").hide(_options.fadeSpeed); | ||
$menu.remove(); | ||
$button.remove(); | ||
} | ||
@@ -305,2 +312,3 @@ | ||
$list.appendTo($menu); | ||
_isMenuOpen = true; | ||
} | ||
@@ -311,4 +319,2 @@ | ||
hideMenu(e); | ||
} else { | ||
_isMenuOpen = true; | ||
} | ||
@@ -315,0 +321,0 @@ } |
{ | ||
"name": "slickgrid", | ||
"version": "2.3.18", | ||
"version": "2.3.19", | ||
"description": "A lightning fast JavaScript grid/spreadsheet", | ||
@@ -5,0 +5,0 @@ "main": "slick.core.js", |
## This is the 6pac SlickGrid repo | ||
Check out the NEW SlickGrid Website! http://slickgrid.net/ | ||
This is the acknowledged most active non-customised fork of SlickGrid. | ||
@@ -9,2 +11,2 @@ | ||
Also check out the [wiki](https://github.com/6pac/SlickGrid/wiki) for news and documentation. | ||
Also check out the [wiki](https://github.com/6pac/SlickGrid/wiki) for news and documentation. |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4806444
91310
12
3