Skip to content

Commit

Permalink
Update js/grid.import.js
Browse files Browse the repository at this point in the history
  • Loading branch information
OlegKi committed Dec 19, 2012
1 parent 827c086 commit 6446d45
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions js/grid.import.js
@@ -1,4 +1,6 @@
;(function($){
/*jshint eqeqeq:false, eqnull:true, devel:true */
/*global jQuery, xmlJsonClass */
(function($){
/*
* jqGrid extension for constructing Grid Data from external file
* Tony Tomov tony@trirand.com
Expand All @@ -7,8 +9,6 @@
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl-2.0.html
**/
//jsHint options
/*global jQuery, $, alert, xmlJsonClass */

"use strict";
$.jgrid.extend({
Expand All @@ -33,11 +33,11 @@
var $t = this;
var xmlConvert = function (xml,o) {
var cnfg = $(o.xmlGrid.config,xml)[0];
var xmldata = $(o.xmlGrid.data,xml)[0], jstr, jstr1;
var xmldata = $(o.xmlGrid.data,xml)[0], jstr, jstr1, key;
if(xmlJsonClass.xml2json && $.jgrid.parse) {
jstr = xmlJsonClass.xml2json(cnfg," ");
jstr = $.jgrid.parse(jstr);
for(var key in jstr) {
for(key in jstr) {
if(jstr.hasOwnProperty(key)) {
jstr1=jstr[key];
}
Expand Down Expand Up @@ -151,7 +151,7 @@
var ret = null;
this.each(function () {
if(!this.grid) { return;}
var gprm = $.extend(true, {},$(this).jqGrid("getGridParam"));
var key, gprm = $.extend(true, {},$(this).jqGrid("getGridParam"));
// we need to check for:
// 1.multiselect, 2.subgrid 3. treegrid and remove the unneded columns from colNames
if(gprm.rownumbers) {
Expand All @@ -168,7 +168,7 @@
}
gprm.knv = null;
if(gprm.treeGrid) {
for (var key in gprm.treeReader) {
for (key in gprm.treeReader) {
if(gprm.treeReader.hasOwnProperty(key)) {
gprm.colNames.splice(gprm.colNames.length-1);
gprm.colModel.splice(gprm.colModel.length-1);
Expand Down Expand Up @@ -212,4 +212,4 @@
});
}
});
})(jQuery);
})(jQuery);

0 comments on commit 6446d45

Please sign in to comment.