After typing my previous comment, it gave me an idea. Notice the jquery 
reference at the bottom. That was causing the version conflict. As soon as 
I commented it out from the master template, I immediately started getting 
a grid.

The fix? Remove the default jquery include from master.

Thanks,


On Monday, March 3, 2014 3:37:41 PM UTC-6, Greg Copeland wrote:
>
> TurboGears 2.3.1 on Linux:
>
> class MyGrid( jqGridWidget ):
>     id = "mygrid"
>     options = {
>         "pager" : "mygridpager",
>         "url" : "/myData",
>         "mtype" : "GET",
>         "rowList" : [25,50,100,250],
>         "datatype" : "json",
>         "colNames" : [ "ID", "timestamp", "message" ]
>         }
>
>     def prepare( self ):
>         self.resources.append( word_wrap_css )
>         super( MyGrid, self ).prepare()
>
>
> My dictionary returned from my controller has:
> dict( form=MyGrid )
>
> My template has:
> ${form().display()}
>
> Which renders:
>
> <table id="mygrid"></table><div id="mygridpager"></div><script 
> type="text/javascript">$(document).ready(    function(){        var opts = 
> {"rowList": [25, 50, 100, 250], "url": "/myData", "mtype": "GET", "datatype": 
> "json", "colNames": ["ID", "timestamp", "message"], "pager": "mygridpager"};  
>       var grid = $("#mygrid");        *grid.jqGrid(opts);*        if ( 
> 'pager' in opts ) {            opts['pager_selector'] = opts['pager'];        
>     opts['pager'] = $(opts['pager'])            var pager_opts = {}           
>  var prmEdit = {};            var prmAdd = {};            var prmDel = {};    
>         var prmSearch = {};            var prmView  = {};            
> grid.navGrid('#'+opts['pager_selector'], pager_opts,                         
> prmEdit, prmAdd, prmDel, prmSearch, prmView)            ;        }    
> });</script></div>
>
>
> Firefox reports:
> TypeError: grid.jqGrid is not a function
>
> grid.jqGrid(opts);
>
>
> I made bold the line which generates the error.
>
> The "myData" URL is never fetched.
>
> From what I can tell, ToscaWidgets is rendering it correctly, however, 
> Firefox certainly doesn't like it. Any ideas?
>
> Thanks,
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/turbogears.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to