{"size": 2035, "ext": "js", "max_stars_repo_path": "_src/chapter_6/novius-os/novius-os/static/admin/novius-os/js/inspector/minified/jquery.novius-os.inspector-model.js", "max_stars_repo_name": "paullewallencom/fuelphp-978-1-7839-8540-1", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "_src/chapter_6/novius-os/novius-os/static/admin/novius-os/js/inspector/minified/jquery.novius-os.inspector-model.js", "max_issues_repo_name": "paullewallencom/fuelphp-978-1-7839-8540-1", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "_src/chapter_6/novius-os/novius-os/static/admin/novius-os/js/inspector/minified/jquery.novius-os.inspector-model.js", "max_forks_repo_name": "paullewallencom/fuelphp-978-1-7839-8540-1", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 226.1111111111, "max_line_length": 1768, "alphanum_fraction": 0.7371007371}
/**
 * NOVIUS OS - Web OS for digital communication
 *
 * @copyright  2011 Novius
 * @license    GNU Affero General Public License v3 or (at your option) any later version
 *             http://www.gnu.org/licenses/agpl-3.0.html
 * @link http://www.novius-os.org
 */
define("jquery-nos-inspector-model",["jquery-nos-listgrid","jquery-ui.datepicker"],function(a){a.fn.extend({nosInspectorModel:function(){return this.each(function(){var g=a(this),i=g.attr("id"),b=g.closest(".nos-dispatcher, body").on("contextChange",function(){c();if(e.contextChange){g.noslistgrid("ensureControl",true)}}),f=g.parent().on({widgetResize:function(){g.noslistgrid("setSize",f.width(),f.height())},widgetReload:function(){g.noslistgrid("setSize",null,f.height())}}),e=f.data("inspector"),d=e.grid.showFilter||false,h=false,c=function(){if(e.reloadEvent){g.nosUnlistenEvent("inspector"+i);var j={name:e.reloadEvent};if(b.data("nosContext")){j.context=b.data("nosContext")}g.nosListenEvent(j,function(){f.trigger("widgetReload")},"inspector"+i)}};c();g.css({height:"100%",width:"100%"}).noslistgrid({columnsAutogenerationMode:"none",showFilter:d,allowSorting:true,scrollMode:"auto",allowPaging:true,pageIndex:0,pageSizeAuto:true,allowColSizing:true,allowColMoving:true,loadingText:e.loadingText||"Loading...",columns:e.grid.columns,data:new wijdatasource({dynamic:true,proxy:new wijhttpproxy({url:e.grid.urlJson,dataType:"json",error:function(j,l,k){log(j,l,k)},data:{}}),loading:function(l,j){var k=j.data.paging;l.proxy.options.data.context=b.data("nosContext")||"";l.proxy.options.data.offset=k.pageIndex*k.pageSize;l.proxy.options.data.limit=k.pageSize},reader:{read:function(k){var j=parseInt(k.data.total,10);k.data=k.data.items;k.data.totalRows=j}}}),noCellsSelected:true,currentCellChanged:function(k){var l=a(k.target).noslistgrid("currentCell").row(),j=l?l.data:false;if(j&&h){e.selectionChanged(j.id,j._title)}g.noslistgrid("currentCell",-1,-1)},rendering:function(){h=false},rendered:function(){h=true;g.css("height","auto")}})})}});return a});