Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

hotfixing issue #174

  • Loading branch information...
commit 5fcb4c54bc80bf9082001c69f406d5fd1c3132f6 1 parent bb8a1ba
Tim Sweet timothyswt authored
6 build/KoGrid.debug.js
View
@@ -2,7 +2,7 @@
* koGrid JavaScript Library
* Authors: https://github.com/ericmbarnard/koGrid/blob/master/README.md
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
-* Compiled At: 12/18/2012 15:37:41
+* Compiled At: 12/19/2012 10:15:47
***********************************************/
(function (window) {
@@ -1400,9 +1400,9 @@ window.kg.Grid = function (options) {
});
self.clearSortingData(col);
if(!self.config.useExternalSorting){
- window.kg.sortService.Sort(sortInfo, self.sortedData);
+ window.kg.sortService.Sort(self.sortInfo.peek(), self.sortedData);
} else {
- self.config.sortInfo(sortInfo);
+ self.config.sortInfo(self.sortInfo.peek());
}
self.lastSortedColumn = col;
self.isSorting = false;
6 koGrid-2.1.1.debug.js
View
@@ -2,7 +2,7 @@
* koGrid JavaScript Library
* Authors: https://github.com/ericmbarnard/koGrid/blob/master/README.md
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
-* Compiled At: 12/18/2012 15:37:41
+* Compiled At: 12/19/2012 10:15:47
***********************************************/
(function (window) {
@@ -1400,9 +1400,9 @@ window.kg.Grid = function (options) {
});
self.clearSortingData(col);
if(!self.config.useExternalSorting){
- window.kg.sortService.Sort(sortInfo, self.sortedData);
+ window.kg.sortService.Sort(self.sortInfo.peek(), self.sortedData);
} else {
- self.config.sortInfo(sortInfo);
+ self.config.sortInfo(self.sortInfo.peek());
}
self.lastSortedColumn = col;
self.isSorting = false;
4 koGrid-2.1.1.js
View
@@ -2,7 +2,7 @@
* koGrid JavaScript Library
* Authors: https://github.com/ericmbarnard/koGrid/blob/master/README.md
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
-* Compiled At: 12/18/2012 15:37:41
+* Compiled At: 12/19/2012 10:15:47
***********************************************/
(function(window){'use strict';if(!window.kg){window.kg={};}
window.kg.numberOfGrids=0;window.kg.eventStorage={};var SELECTED_PROP='__kg_selected__',GRID_KEY='__koGrid__',EXCESS_ROWS=8,SCROLL_THRESHOLD=6,ASC="asc",DESC="desc",KG_FIELD='_kg_field_',KG_DEPTH='_kg_depth_',KG_HIDDEN='_kg_hidden_',KG_COLUMN='_kg_column_',TEMPLATE_REGEXP=/<.+>/;window.kg.moveSelectionHandler=function(grid,evt){if(window.kg.utils.isNullOrUndefined(grid)||window.kg.utils.isNullOrUndefined(grid.config.selectedItems)){return true;}
@@ -79,7 +79,7 @@ self.maxCanvasHt(self.calcMaxCanvasHeight());if(!self.isSorting){self.configureC
var rowIndex=Math.floor(scrollTop/self.config.rowHeight);if(self.prevScrollTop<scrollTop&&rowIndex<self.prevScrollIndex+SCROLL_THRESHOLD){return;}
if(self.prevScrollTop>scrollTop&&rowIndex>self.prevScrollIndex-SCROLL_THRESHOLD){return;}
self.prevScrollTop=scrollTop;self.rowFactory.UpdateViewableRange(new window.kg.Range(Math.max(0,rowIndex-EXCESS_ROWS),rowIndex+self.minRowsToRender()+EXCESS_ROWS));self.prevScrollIndex=rowIndex;};self.adjustScrollLeft=function(scrollLeft){if(self.$headerContainer){self.$headerContainer.scrollLeft(scrollLeft);}};self.resizeOnData=function(col){var longest=col.minWidth;var arr=window.kg.utils.getElementsByClassName('col'+col.index);$.each(arr,function(index,elem){var i;if(index===0){var kgHeaderText=$(elem).find('.kgHeaderText');i=window.kg.utils.visualLength(kgHeaderText)+10;}else{var ngCellText=$(elem).find('.kgCellText');i=window.kg.utils.visualLength(ngCellText)+10;}
-if(i>longest){longest=i;}});col.width=longest=Math.min(col.maxWidth,longest+7);window.kg.domUtilityService.BuildStyles(self);};self.sortData=function(col,direction){self.isSorting=true;self.sortInfo({column:col,direction:direction});self.clearSortingData(col);if(!self.config.useExternalSorting){window.kg.sortService.Sort(sortInfo,self.sortedData);}else{self.config.sortInfo(sortInfo);}
+if(i>longest){longest=i;}});col.width=longest=Math.min(col.maxWidth,longest+7);window.kg.domUtilityService.BuildStyles(self);};self.sortData=function(col,direction){self.isSorting=true;self.sortInfo({column:col,direction:direction});self.clearSortingData(col);if(!self.config.useExternalSorting){window.kg.sortService.Sort(self.sortInfo.peek(),self.sortedData);}else{self.config.sortInfo(self.sortInfo.peek());}
self.lastSortedColumn=col;self.isSorting=false;};self.clearSortingData=function(col){if(!col){$.each(self.columns(),function(i,c){c.sortDirection("");});}else if(self.lastSortedColumn&&col!=self.lastSortedColumn){self.lastSortedColumn.sortDirection("");}};self.fixColumnIndexes=function(){self.$$indexPhase=true;var cols=self.columns.peek();$.each(cols,function(i,col){col.index=i;});self.$$indexPhase=false;};self.elementsNeedMeasuring=true;self.columns=ko.observableArray([]);self.columns.subscribe(function(newCols){self.config.columnsChanged(newCols);});self.renderedRows=ko.observableArray([]);self.headerRow=null;self.rowHeight=self.config.rowHeight;self.jqueryUITheme=ko.observable(self.config.jqueryUITheme);self.footer=null;self.selectedItems=self.config.selectedItems;self.multiSelect=self.config.multiSelect;self.footerVisible=window.kg.utils.isNullOrUndefined(self.config.displayFooter)?self.config.footerVisible:self.config.displayFooter;self.config.footerRowHeight=self.footerVisible?self.config.footerRowHeight:0;self.showColumnMenu=self.config.showColumnMenu;self.showMenu=ko.observable(false);self.configGroups=ko.observableArray([]);self.enablePaging=self.config.enablePaging;self.pagingOptions=self.config.pagingOptions;self.rowTemplate=self.config.rowTemplate||window.kg.defaultRowTemplate();self.headerRowTemplate=self.config.headerRowTemplate||window.kg.defaultHeaderRowTemplate();if(self.config.rowTemplate&&!TEMPLATE_REGEXP.test(self.config.rowTemplate)){self.rowTemplate=window.kg.utils.getTemplatePromise(self.config.rowTemplate);}
if(self.config.headerRowTemplate&&!TEMPLATE_REGEXP.test(self.config.headerRowTemplate)){self.headerRowTemplate=window.kg.utils.getTemplatePromise(self.config.headerRowTemplate);}
self.visibleColumns=ko.computed(function(){var cols=self.columns();return cols.filter(function(col){var isVis=col.visible();return isVis;});});self.nonAggColumns=ko.computed(function(){return self.columns().filter(function(col){return!col.isAggCol;});});self.toggleShowMenu=function(){self.showMenu(!self.showMenu());};self.allSelected=self.config.selectAllState;self.allSelected.subscribe(function(state){if(self.config.beforeSelectionChange(self.sortedData.peek(),this)){self.selectionService.toggleSelectAll(state);self.config.afterSelectionChange(self.selectedItems.peek(),this);}});self.totalFilteredItemsLength=ko.computed(function(){return self.filteredData().length;});self.showGroupPanel=ko.computed(function(){return self.config.showGroupPanel;});self.topPanelHeight=ko.observable(self.config.showGroupPanel===true?(self.config.headerRowHeight*2):self.config.headerRowHeight);self.viewportDimHeight=ko.computed(function(){return Math.max(0,self.rootDim.outerHeight()-self.topPanelHeight()-self.config.footerRowHeight-2);});self.groupBy=function(col){if(self.sortedData().length<1){return;}
4 src/classes/grid.js
View
@@ -329,9 +329,9 @@ window.kg.Grid = function (options) {
});
self.clearSortingData(col);
if(!self.config.useExternalSorting){
- window.kg.sortService.Sort(sortInfo, self.sortedData);
+ window.kg.sortService.Sort(self.sortInfo.peek(), self.sortedData);
} else {
- self.config.sortInfo(sortInfo);
+ self.config.sortInfo(self.sortInfo.peek());
}
self.lastSortedColumn = col;
self.isSorting = false;
Please sign in to comment.
Something went wrong with that request. Please try again.