Forum
10:57
28/12/2010
Hi Tony, Congratulation for your last release!!
Here the bugs, i hat to remove before using this wonderful release:
Changes for jqGrid: ( jqGrid 4.1.2 - jQuery Grid )
to make work formedit, i had to change to following routine -- very important!!
grid.common.js:
function setAttributes(elm, atr, exl) {
var exclude = ['dataInit', 'dataEvents', 'dataUrl', 'buildSelect', 'sopt', 'searchhidden', 'defaultValue', 'attr'];
if (typeof (exl) != "undefined" && $.isArray(exl)) {
// exclude = $.extend(exclude, exl);
exclude = $.merge(exl, exclude);
}
$.each(atr, function (key, value) {
if ($.inArray(key, exclude) === -1) {
$(elm).attr(key, value);
}
});
if (!atr.hasOwnProperty('id')) {
$(elm).attr('id', $.jgrid.randId());
}
}
to make work treegrid ( "adjacency" - model , different names in treeReader )
grid.treegrid.js:
collapseNode: function (rc) {
return this.each(function () {
if (!this.grid || !this.p.treeGrid) { return; }
var expanded = this.p.treeReader.expanded_field; // changed Markus Fritschi 31.07.2011
if (rc[expanded]) { // changed Markus Fritschi 31.07.2011
rc[expanded] = false; // changed Markus Fritschi 31.07.2011
var id = $.jgrid.getAccessor(rc, this.p.localReader.id);
var rc1 = $("#" + id, this.grid.bDiv)[0];
$("div.treeclick", rc1).removeClass(this.p.treeIcons.minus + " tree-minus").addClass(this.p.treeIcons.plus + " tree-plus");
}
});
},
I had to change these lines ( from a previous release )
ldat[expanded] = ((ldat[expanded] == "true" || ldat[expanded] === true) ? true : false) && ldat[loaded];
if (ldat[expanded] === true) {
twrap += $t.p.treeIcons.minus + " tree-minus treeclick'";
} else {
twrap += $t.p.treeIcons.plus + " tree-plus treeclick'";
}
twrap += "</div></div>";
to make work formedit, i had also to change to following routine -- very important!!
grid.formedit.js:
// following line changed by M.Fritschi on 03.08.2011
postdata = $.extend(postdata, rp_ge[$t.p.id].editData, onCS);
everything works now fine!!
11:14
Moderators
30/10/2007
Hello,
Thank yo for the fixes, but it will be better if you send me the files with the changes so that I see it in detail.
Just a question what is the benefit of using $.merge instead of extend in setAttributes function?
Kind Regards
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
08:13
28/12/2010
Dear tony, I could not send you the email with the attachements. Your email was not accepted:
<admin@trirand.com>
Error transferring to mail.TRIRAND.COM; SMTP Protocol Returned a Permanent Error 550 5.1.1 <admin@trirand.com>: Recipient address rejected: User unknown in virtual mailbox table
Please give me your email! thanks in advance
Markus
17:17
28/12/2010
tony said:
Hello,
Thank yo for the fixes, but it will be better if you send me the files with the changes so that I see it in detail.
Just a question what is the benefit of using $.merge instead of extend in setAttributes function?
Kind Regards
Hi Toni,
difference between $.merge(exl, exclude) and $.extend(exclude, exl) is in this case error relevant:
When you look at the result, dataInit has been removed with $.extend command, not with $.merge!!
The result for jqgrid is that i.E. datepicker does not work anymore!
please tell me your e-mail address to sen you the files!
Thanks in advance!
Here the trace values:
RESULT WITH exclude = $.extend(exclude, exl);
BEFORE:
- exclude [dataInit,dataEvents,dataUrl,buildSelect,sopt,searchhidden,defaultValue,attr]
+ [0] "value" String
AFTER
- exclude [value,dataEvents,dataUrl,buildSelect,sopt,searchhidden,defaultValue,attr]
- exl [value] Object, (Array)
RESULT WITH
BEFORE:
- exclude [dataInit,dataEvents,dataUrl,buildSelect,sopt,searchhidden,defaultValue,attr]
+ exl [value] Object, (Array)
AFTER:
- exclude [value,dataInit,dataEvents,dataUrl,buildSelect,sopt,searchhidden,defaultValue,attr]
- exl [value,dataInit,dataEvents,dataUrl,buildSelect,sopt,searchhidden,defaultValue,attr]
15:51
Moderators
30/10/2007
Hello,
Not sure if this true about merge.
I will perform tests with this, but it depends what you do.
Here is example (in the php component) which uses dataInit, but it works
http://www.trirand.com/blog/ph.....efault.php
As for the email you will maybe to look at this page in the site:
http://www.trirand.com/blog/?page_id=2
Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
Most Users Ever Online: 715
Currently Online:
24 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66