/*********************************************** * ng-grid JavaScript Library * Authors: https://github.com/angular-ui/ng-grid/blob/master/README.md * License: MIT (http://www.opensource.org/licenses/mit-license.php) * Compiled At: 12/21/2012 15:55:15 ***********************************************/ (function(g){g.ng={};g.ng.$http=undefined;var n=angular.module("ngGrid.services",[]);var k=angular.module("ngGrid.directives",[]);var d=angular.module("ngGrid.filters",[]);var b="__ng_selected__";var j="__koGrid__";var m=8;var a=6;var c="asc";var e="desc";var p="_ng_field_";var h="_ng_depth_";var o="_ng_hidden_";var i="_ng_column_";var l=/CUSTOM_FILTERS/g;var f=/<.+>/;ng.moveSelectionHandler=function(t,v,r){if(v===null||v===undefined){return true;}if(v.config.selectedItems===undefined){return true;}var q=r.which||r.keyCode;var w=(q==38?-1:(q==40?1:null));if(!w){return true;}var s=t.renderedRows;var u=s.indexOf(v.selectionService.lastClickedRow)+w;if(u<0||u>=s.length){return true;}v.selectionService.ChangeSelection(s[u],r);if(u>s.length-m){v.$viewport.scrollTop(v.$viewport.scrollTop()+(v.config.rowHeight*2));}else{if(u>>0;var s=Number(arguments[1])||0;s=(s<0)?Math.ceil(s):Math.floor(s);if(s<0){s+=q;}for(;s>>0;if(typeof r!=="function"){throw new TypeError();}var v=[];var u=arguments[1];for(var s=0;s",r[0]){}return q>4?q:undefined;})()};$.extend(ng.utils,{isIe6:(function(){return ng.utils.ieVersion===6;})(),isIe7:(function(){return ng.utils.ieVersion===7;})(),isIe:(function(){return ng.utils.ieVersion!==undefined;})()});d.filter("ngColumns",function(){return function(q){return q.filter(function(r){return !r.isAggCol;});};});d.filter("checkmark",function(){return function(q){return q?"\u2714":"\u2718";};});n.factory("SortService",function(){var q={};q.colSortFnCache={};q.dateRE=/^(\d\d?)[\/\.-](\d\d?)[\/\.-]((\d\d)?\d\d)$/;q.guessSortFn=function(t){var u,w,s,v,r;if(t===undefined||t===null||t===""){return null;}w=typeof(t);switch(w){case"number":u=q.sortNumber;break;case"boolean":u=q.sortBool;break;default:u=undefined;break;}if(u){return u;}if(Object.prototype.toString.call(t)==="[object Date]"){return q.sortDate;}if(w!=="string"){return q.basicSort;}if(t.match(/^-?[�$�]?[\d,.]+%?$/)){return q.sortNumberStr;}s=t.match(q.dateRE);if(s){v=parseInt(s[1],10);r=parseInt(s[2],10);if(v>12){return q.sortDDMMStr;}else{if(r>12){return q.sortMMDDStr;}else{return q.sortMMDDStr;}}}return q.sortAlpha;};q.basicSort=function(s,r){if(s==r){return 0;}if(s");s.appendTo("body");s.height(100).width(100).css("position","absolute").css("overflow","scroll");s.append('
');q.ScrollH=(s.height()-s[0].clientHeight);q.ScrollW=(s.width()-s[0].clientWidth);s.empty();s.attr("style","");s.append('M');q.LetterW=s.children().first().width();s.remove();};q.eventStorage={};q.AssignGridContainers=function(t,s){s.$root=$(t);s.$topPanel=s.$root.find(".ngTopPanel");s.$groupPanel=s.$root.find(".ngGroupPanel");s.$headerContainer=s.$topPanel.find(".ngHeaderContainer");s.$headerScroller=s.$topPanel.find(".ngHeaderScroller");s.$headers=s.$headerScroller.children();s.$viewport=s.$root.find(".ngViewport");s.$canvas=s.$viewport.find(".ngCanvas");s.$footerPanel=s.$root.find(".ngFooterPanel");q.UpdateGridLayout(s);};q.UpdateGridLayout=function(s){var t=s.$viewport.scrollTop();s.elementDims.rootMaxW=s.$root.width();s.elementDims.rootMaxH=s.$root.height();s.refreshDomSizes();s.adjustScrollTop(t,true);};q.numberOfGrids=0;q.BuildStyles=function(B,t,z){var s=t.config.rowHeight,u=t.$styleSheet,w=t.gridId,y,A=B.visibleColumns(),v=0;if(!u){u=$("#"+w);if(!u[0]){u=$("