var g_eEChapterGrid=null;var eRenderer={toolTip:function(e,b,d,c,a){if(e!=null){b.attr='ext:qtip="'+String(d.get("strDescription")).gsub('"',"&quot;")+'" style="line-height:21px;"'}return e},iconType:function(e,b,d,c,a){b.attr='ext:qtip="e-chapter"';return'<div class="Icon Icon-Echapter" ext:qtip="e-chapter" style="line-height:21px;">&nbsp;</div>'},copyrightDate:function(c,b,e,d,a){if(c==null){return"&nbsp;"}b.attr='ext:qtip="'+c.format("m/d/Y")+'" style="line-height:21px;"';return c.format("Y")}};Ext.onReady(function(){Ext.QuickTips.init();var d=new Ext.data.SimpleStore({totalProperty:"nCnt",root:"rows",id:"Id",fields:[{name:"Id",mapping:"Id"},{name:"strIsbn",mapping:"strIsbn"},{name:"strTitle",mapping:"strTitle"},{name:"strAuthor",mapping:"strAuthor"},{name:"dtCopyRight",mapping:"dtCopyRight"},{name:"strDescription",mapping:"strDescription"},{name:"Prices",mapping:"Prices"}],data:g_eBook.Chapters});var b=new Ext.BvD.Horizon.SelectionModel();var c=new Ext.grid.ColumnModel([b,{id:"icon",dataIndex:"Id",header:"&nbsp;",fixed:true,resizable:false,sortable:false,hideable:false,menuDisabled:true,width:28,renderer:eRenderer.iconType},{id:"strIsbn",dataIndex:"strIsbn",header:"ISBN",resizable:false,hideable:false,sortable:false,menuDisabled:true,width:110,renderer:eRenderer.toolTip},{id:"strTitle",dataIndex:"strTitle",header:"Title",resizable:false,hideable:false,sortable:false,menuDisabled:true,width:100,renderer:eRenderer.toolTip},{id:"strAuthor",dataIndex:"strAuthor",header:"Author",resizable:false,hideable:false,sortable:false,menuDisabled:true,width:100,renderer:eRenderer.toolTip},{id:"dtCopyRight",dataIndex:"dtCopyRight",header:"CopyRight",resizable:false,hideable:false,sortable:false,menuDisabled:true,width:60,renderer:eRenderer.copyrightDate}]);var a=new Ext.BvD.Horizon.ChapterToolbar({height:24,style:"padding:0px; align:left;"});g_eEChapterGrid=new Ext.grid.GridPanel({store:d,colModel:c,selModel:b,el:"_divEChapterList",stripeRows:true,autoExpandColumn:"strTitle",enableColumnMove:false,enableColumnResize:false,enableColumnHide:false,viewConfig:{forceFit:false},height:365,width:536});if((String(document.location).parseQuery()).nChapterIdx){g_eEChapterGrid.on("render",function(e){e.getView().onRowSelect.bind(e.getView()).delay(0.1,(String(document.location).parseQuery()).nChapterIdx);e.getSelectionModel().selectRow((String(document.location).parseQuery()).nChapterIdx)});g_eEChapterGrid.render()}});
