Advertisement
Guest User

Untitled

a guest
Apr 20th, 2014
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.02 KB | None | 0 0
  1. 1. jquery-ui-1.10.4.custom.min.js
  2. 2. jquery.ui.core.js
  3. 3. jquery.ui.widget.js
  4. 4. jquery.ui.position.js
  5. 5. jquery.ui.menu.js
  6. 6. jquery.ui.autocomplete.js
  7.  
  8. 1. grid.locale-en.js
  9. 2. jquery.jqGrid.min.js
  10. 3. grid.common.js
  11. 4. jqModal.js
  12. 5. jqDnR.js
  13. 6. grid.formedit.js
  14.  
  15. 1. jquery-ui-1.10.4.custom.css
  16. 2. demos.css
  17. 3. jquery.ui.all.css
  18.  
  19. colNames:['Id', 'First Name', 'Last Name'],
  20. colModel:[
  21. {name:'id',index:'id', width:55,editable:false,editoptions:readonly:true,size:10},hidden:true},
  22. {name:'firstname',index:'lastname', width:100,editable:true,edittype:'text',
  23. editoptions: {
  24. dataInit: function (elem) {
  25. myAutocomplete(elem, "${pageContext.servletContext.contextPath}/grid/autocomplete.action");
  26. }
  27. }},
  28. {name:'lastname',index:'firstname', width:100,editable:true, editrules:{required:true}, editoptions:{size:10}}
  29. ],
  30.  
  31. var jq = jQuery.noConflict();
  32.  
  33. jq(function() {
  34. jq("#grid").jqGrid({
  35. url:'${pageContext.servletContext.contextPath}/grid/load.action',
  36. datatype: 'json',
  37. mtype: 'GET',
  38. colNames:['Id', 'First Name', 'Last Name'],
  39. colModel:[
  40. {name:'id',index:'id', width:55,editable:false,editoptions:{readonly:true,size:10},hidden:true},
  41. {name:'firstname',index:'lastname', width:100,editable:true,edittype:'text',
  42. editoptions: {
  43. dataInit: function (elem) {
  44. myAutocomplete(elem, "${pageContext.servletContext.contextPath}/grid/autocomplete.action");
  45. }
  46. }},
  47. {name:'lastname',index:'firstname', width:100,editable:true, editrules:{required:true}, editoptions:{size:10}}
  48. ],
  49. postData: {
  50. },
  51. rowNum:20,
  52. rowList:[20,40,60],
  53. height: 200,
  54. autowidth: true,
  55. rownumbers: true,
  56. pager: '#pager',
  57. sortname: 'id',
  58. viewrecords: true,
  59. sortorder: "asc",
  60. caption:"Users",
  61. emptyrecords: "Empty records",
  62. loadonce: false,
  63. editurl:'${pageContext.servletContext.contextPath}/grid/edit.action',
  64. loadError : function(xhr,st,err) {
  65. console.log('display error : '+err);
  66. jq("#rsperror").html("Type: "+st+"; Response: "+ xhr.status + " "+xhr.statusText);
  67.  
  68. },
  69. loadComplete: function() {
  70. },
  71. jsonReader : {
  72. root: "rows",
  73. page: "page",
  74. total: "total",
  75. records: "records",
  76. repeatitems: false,
  77. cell: "cell",
  78. id: "id"
  79. }
  80. });
  81. jq("#grid").jqGrid('navGrid','#pager',
  82. {edit:true,add:true,del:true,search:true},
  83. { },
  84. { },
  85. { },
  86. {
  87. sopt:['eq', 'ne', 'lt', 'gt', 'cn', 'bw', 'ew'],
  88. closeOnEscape: true,
  89. multipleSearch: true,
  90. closeAfterSearch: true }
  91. );
  92. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement