Hi,
I am trying to test out the AMD feature of jqgrid and getting this error. I thought jquery.jqGrid.min is self-contained. Why is it looking for grid.base.js?
<span class=”objectBox objectBox-string “>NetworkError: 404 Not Found – http://localhost/~xyz/js/grid.base.js?bust=1433206542026</span>
Here is where I setup requirejs:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
//Setup app require.config({ paths: { jquery: "../libs/jqueries/jquery", underscore: "../libs/underscores/underscore", backbone: "../libs/backbones/backbone", bootstrap: "../libs/boostraps/bootstrap", sha: "../libs/sha/sha", text: "../libs/requires/plugins/text", jqgridlocale: "../libs/jqgrid/js/i18n/grid.locale-en", jqgrid: "../libs/jqgrid/js/jquery.jqGrid.min", cssjs: "../libs/requires/plugins/css", css: "../../css", templates: "../../templates", models: "../models", views: "../views" }, urlArgs: "bust=" + (new Date()).getTime() }); //Kick off app require(["../views/giip/login_view"], function(LoginView) { new LoginView(); }); Here is where the path above is referenced: define([ "jquery", "text!templates/giipa/marketing/contacts_manager_template.html", "jqgridlocale", "jqgrid", "cssjs!css/jqgrid.css", "cssjs!css/jqueryui.css" ], function($, contactsManagerTemplateText) { var ContactsManagerView = Backbone.View.extend({ el: $("body"), events: { //"click #contactsManager-tabs ul > li > a": "showSelectedContactsManagerMethod", }, instantiateGrid: function() { $("#contacts-grid").jqGrid({ url: 'data.json', // we set the changes to be made at client side using predefined word clientArray editurl: 'clientArray', datatype: "json", colModel: [ { label: 'Customer ID', name: 'CustomerID', width: 75, key: true, editable: true, editrules : { required: true} }, { label: 'Company Name', name: 'CompanyName', width: 140, editable: true // must set editable to true if you want to make the field editable }, ... ... Here is where grid instantiation is called: render: function () { var compiledContactsManagerTemplate; if($("#central .tab-content > #contacts-manager").html() != "" ) { return; } compiledContactsManagerTemplate = _.template(contactsManagerTemplateText); $("#contacts-manager").append(compiledContactsManagerTemplate); this.instantiateGrid(); }, |
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top