slickgrid
Advanced tools
Comparing version 2.4.30 to 2.4.31
@@ -82,5 +82,14 @@ /*** | ||
_grid.onColumnsReordered.unsubscribe(updateColumnOrder); | ||
if ($list) { | ||
$list.remove(); | ||
} | ||
if ($menu) { | ||
$menu.off("click").remove(); | ||
} | ||
$(document.body).off("mousedown", handleBodyMouseDown); | ||
$("div.slick-columnpicker").hide(_options && _options.columnPicker && _options.columnPicker.fadeSpeed); | ||
$menu.remove(); | ||
$(".slick-columnpicker." + _gridUid).hide(_options && _options.columnPicker && _options.columnPicker.fadeSpeed); | ||
$columnTitleElm = null; | ||
$list = null; | ||
$menu = null; | ||
$(window).off("beforeunload"); | ||
} | ||
@@ -155,2 +164,4 @@ | ||
$list.appendTo($menu); | ||
$li = null; | ||
$input = null; | ||
} | ||
@@ -157,0 +168,0 @@ |
@@ -192,4 +192,3 @@ /*** | ||
if (enableResizeHeaderRow && _options.showHeaderRow) { | ||
var $headerrow = $('.' + _gridUid + '.slick-headerrow'); | ||
$headerrow.attr('style', 'width: calc(100% - ' + gridMenuWidth + 'px)'); | ||
$('.' + _gridUid + '.slick-headerrow').attr('style', 'width: calc(100% - ' + gridMenuWidth + 'px)'); | ||
} | ||
@@ -202,4 +201,3 @@ | ||
var iconImage = (_options.gridMenu && _options.gridMenu.iconImage) ? _options.gridMenu.iconImage : "../images/drag-handle.png"; | ||
var $btnImage = $('<img src="' + iconImage + '"/>'); | ||
$btnImage.appendTo($button); | ||
$('<img src="' + iconImage + '"/>').appendTo($button); | ||
} | ||
@@ -237,3 +235,5 @@ $button.insertBefore($header); | ||
_grid.onSetOptions.unsubscribe(); | ||
$("div.slick-gridmenu." + _gridUid).remove(); | ||
deleteMenu(); | ||
$(window).off("beforeunload"); | ||
} | ||
@@ -245,7 +245,21 @@ | ||
$("div.slick-gridmenu." + _gridUid).hide(); | ||
$menu.remove(); | ||
$button.remove(); | ||
if ($button) { | ||
$button.remove(); | ||
} | ||
if ($menu) { | ||
$menu.remove(); | ||
} | ||
if ($customMenu) { | ||
$customMenu.remove(); | ||
} | ||
if ($header) { | ||
$header.attr('style', 'width: 100%'); // put back original width | ||
} | ||
$customTitleElm = null; | ||
$columnTitleElm = null; | ||
$customMenu = null; | ||
$header = null; | ||
$list = null; | ||
$button = null; | ||
$menu = null; | ||
} | ||
@@ -333,2 +347,5 @@ | ||
} | ||
$icon = null; | ||
$li = null; | ||
$text = null; | ||
} | ||
@@ -477,2 +494,3 @@ } | ||
} | ||
$input = null; | ||
} | ||
@@ -479,0 +497,0 @@ |
{ | ||
"name": "slickgrid", | ||
"version": "2.4.30", | ||
"version": "2.4.31", | ||
"description": "A lightning fast JavaScript grid/spreadsheet", | ||
@@ -5,0 +5,0 @@ "main": "slick.core.js", |
@@ -25,3 +25,3 @@ (function ($) { | ||
}; | ||
/** | ||
@@ -36,3 +36,3 @@ * Initialize plugin. | ||
} | ||
/** | ||
@@ -45,3 +45,3 @@ * Destroy plugin. | ||
} | ||
/** | ||
@@ -67,5 +67,6 @@ * Handle mouse entering grid cell to add/remove tooltip. | ||
} | ||
$node = null; | ||
} | ||
} | ||
/** | ||
@@ -82,4 +83,5 @@ * Handle mouse entering header cell to add/remove tooltip. | ||
} | ||
$node = null; | ||
} | ||
// Public API | ||
@@ -86,0 +88,0 @@ $.extend(this, { |
@@ -180,2 +180,5 @@ (function ($) { | ||
} | ||
$commandTitleElm = null; | ||
$optionTitleElm = null; | ||
$menu = null; | ||
} | ||
@@ -182,0 +185,0 @@ |
@@ -62,2 +62,6 @@ (function ($) { | ||
function destroy() { | ||
hide(); | ||
} | ||
function hide() { | ||
@@ -73,5 +77,6 @@ if (_elem) { | ||
"show": show, | ||
"hide": hide | ||
"hide": hide, | ||
"destroy": destroy | ||
}); | ||
} | ||
})(jQuery); |
@@ -51,2 +51,7 @@ (function ($) { | ||
_handler.unsubscribeAll(); | ||
_$activeCanvas = null; | ||
_canvas = null; | ||
if (_decorator && _decorator.destroy) { | ||
_decorator.destroy(); | ||
} | ||
} | ||
@@ -130,3 +135,3 @@ | ||
// ... frozen column(s), | ||
// ... frozen column(s), | ||
if ( _gridOptions.frozenColumn >= 0 && (!_isRightCanvas && (end.cell > _gridOptions.frozenColumn)) || (_isRightCanvas && (end.cell <= _gridOptions.frozenColumn)) ) { | ||
@@ -169,3 +174,3 @@ return; | ||
} | ||
function getCurrentRange() { | ||
@@ -172,0 +177,0 @@ return _currentlySelectedRange; |
@@ -48,2 +48,6 @@ (function ($) { | ||
_grid.unregisterPlugin(_selector); | ||
_canvas = null; | ||
if (_selector && _selector.destroy) { | ||
_selector.destroy(); | ||
} | ||
} | ||
@@ -50,0 +54,0 @@ |
@@ -269,3 +269,3 @@ (function ($) { | ||
function addCheckboxToFilterHeaderRow(grid) { | ||
grid.onHeaderRowCellRendered.subscribe(function (e, args) { | ||
_handler.subscribe(grid.onHeaderRowCellRendered, function (e, args) { | ||
if (args.column.field === "sel") { | ||
@@ -272,0 +272,0 @@ $(args.node).empty(); |
@@ -197,2 +197,5 @@ (function ($) { | ||
} | ||
$commandTitleElm = null; | ||
$optionTitleElm = null; | ||
$menu = null; | ||
} | ||
@@ -199,0 +202,0 @@ |
@@ -59,2 +59,3 @@ /** | ||
var onGroupChanged = new Slick.Event(); | ||
var _handler = new Slick.EventHandler(); | ||
@@ -80,3 +81,3 @@ /** | ||
_grid.onHeaderCellRendered.subscribe(function (e, args) { | ||
_handler.subscribe(_grid.onHeaderCellRendered, function (e, args) { | ||
var column = args.column; | ||
@@ -148,2 +149,3 @@ var node = args.node; | ||
onGroupChanged.unsubscribe(); | ||
_handler.unsubscribeAll(); | ||
} | ||
@@ -150,0 +152,0 @@ |
@@ -135,2 +135,8 @@ (function ($) { | ||
$(document.body).off("mousedown", handleBodyMouseDown); | ||
if ($menu) { | ||
$menu.remove(); | ||
} | ||
$menu = null; | ||
$activeHeaderColumn = null; | ||
$menu = null; | ||
} | ||
@@ -185,2 +191,3 @@ | ||
.appendTo(args.node); | ||
$el = null; | ||
} | ||
@@ -288,2 +295,5 @@ } | ||
} | ||
$icon = null; | ||
$text = null; | ||
$li = null; | ||
} | ||
@@ -319,2 +329,3 @@ | ||
e.stopPropagation(); | ||
$menuButton = null; | ||
} | ||
@@ -321,0 +332,0 @@ |
@@ -114,2 +114,3 @@ (function ($) { | ||
options.destroy && options.destroy(); | ||
editors = []; | ||
}; | ||
@@ -204,7 +205,10 @@ | ||
} | ||
$validationElm = null; | ||
$labelElm = null; | ||
$editorElm = null; | ||
} | ||
idx++; | ||
} | ||
$targetElm = null; | ||
if (errors.length) { | ||
@@ -211,0 +215,0 @@ return { |
@@ -52,2 +52,3 @@ (function ($) { | ||
var filterCache = []; | ||
var _grid = null; | ||
@@ -76,2 +77,3 @@ // grouping | ||
var groupingDelimiter = ':|:'; | ||
var selectedRowIds = null; | ||
@@ -103,3 +105,24 @@ var pagesize = 0; | ||
} | ||
function destroy() { | ||
items = []; | ||
idxById = null; | ||
rowsById = null; | ||
filter = null; | ||
updated = null; | ||
sortComparer = null; | ||
filterCache = []; | ||
filteredItems = []; | ||
compiledFilter = null; | ||
compiledFilterWithCaching = null; | ||
if (_grid && _grid.onSelectedRowsChanged && _grid.onCellCssStylesChanged) { | ||
_grid.onSelectedRowsChanged.unsubscribe(); | ||
_grid.onCellCssStylesChanged.unsubscribe(); | ||
} | ||
if (self.onRowsOrCountChanged) { | ||
self.onRowsOrCountChanged.unsubscribe(); | ||
} | ||
} | ||
function setRefreshHints(hints) { | ||
@@ -1058,3 +1081,2 @@ refreshHints = hints; | ||
} | ||
/*** | ||
@@ -1081,4 +1103,5 @@ * Wires the grid and the DataView together to keep row selection tied to item ids. | ||
var self = this; | ||
_grid = grid; | ||
var inHandler; | ||
var selectedRowIds = self.mapRowsToIds(grid.getSelectedRows()); | ||
selectedRowIds = self.mapRowsToIds(grid.getSelectedRows()); | ||
var onSelectedRowIdsChanged = new Slick.Event(); | ||
@@ -1130,2 +1153,17 @@ | ||
/** Get all selected IDs */ | ||
function getAllSelectedIds(){ | ||
return selectedRowIds; | ||
} | ||
/** Get all selected dataContext items */ | ||
function getAllSelectedItems() { | ||
var selectedData = []; | ||
var selectedIds = getAllSelectedIds(); | ||
selectedIds.forEach(function (id) { | ||
selectedData.push(self.getItemById(id)); | ||
}); | ||
return selectedData; | ||
} | ||
function syncGridCellCssStyles(grid, key) { | ||
@@ -1181,2 +1219,3 @@ var hashById; | ||
"endUpdate": endUpdate, | ||
"destroy": destroy, | ||
"setPagingOptions": setPagingOptions, | ||
@@ -1202,2 +1241,4 @@ "getPagingInfo": getPagingInfo, | ||
"getGroups": getGroups, | ||
"getAllSelectedIds": getAllSelectedIds, | ||
"getAllSelectedItems": getAllSelectedItems, | ||
"getIdxById": getIdxById, | ||
@@ -1236,3 +1277,3 @@ "getRowByItem": getRowByItem, | ||
"onGroupExpanded": onGroupExpanded, | ||
"onGroupCollapsed": onGroupCollapsed | ||
"onGroupCollapsed": onGroupCollapsed, | ||
}); | ||
@@ -1239,0 +1280,0 @@ } |
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
4555817
100918