[possible bug] qcubed 2.0.0 List Box

Login or register to post comments
5 replies [Last post]
animekun's picture
Offline
Joined: 04/05/2008

hi all,
while trying qcubed 2.0.0, using the sample database from qcodo, i came across adding new person, but error comes up said this.children is not a function in qcubed.js, i change it into $j(this).children, then it work, but the selected data not saved, perhaps the selected data didn't go in the post ajax.

ok that's my report.

ratno

animekun's picture
Offline
Joined: 04/05/2008

this bug makes me itchy, so doing some research, then found the problem and solution, here it is:
problem:

case "select-multiple":
  var blnOneSelected = false;
  this.children(':selected').each (function (i) {
    strPostData += "&" + $j(this).attr("name") + "=";
    strPostData += $j(this).val();
  });
  break;

the problem is this.children and $j(this).attr("name"), so the solution:
case "select-multiple":
  var blnOneSelected = false;
  $j(this).children(':selected').each (function (i) {
    strPostData += "&" + $j(this).parent().attr("name") + "=";
    strPostData += $j(this).val();
  });
  break;

the change should be in qcubed.js line 192

ratno

alex94040's picture
Offline
Joined: 11/06/2008

Great find, thanks, animekun!

Could you create a patch, please, and attach it to a Trac ticket?

Offline
Joined: 07/10/2008

Does that also solve the save issue using ajax?

animekun's picture
Offline
Joined: 04/05/2008

Basilieus, yes this is also solve the save problem.
Alex, well, i not used to create patch nor ticket, but i'll try to.

Offline
Joined: 03/31/2008

Sounds like http://trac.qcu.be/projects/qcubed/ticket/542 which was already committed. Does the latest version from SVN still have this problem?