MoonKiKi: web2.0 and ajax... the evolution road

Monday, March 2, 2009

iMoogle store active columns updated

UPDATE:

Now the project iMoogle can read json with columns that say a number major than the real number of columns, and our software can adjust the db data in two simple steps:

1) it put the portlet in the nearest columns to the column disappeared
2) it store the new order, to prevent data corruption in db.

the core code of that is in a simple and elegant recursive function named getIdx :

 getIdx: function(id){
if ($('portal_container' + id))
return id;
else return this.getIdx(id.toInt()-1);
},

buildPage : function(respJson) {
var obj=this;
...

respJson.portlets.each(function(p, index) {
var idx = obj.getIdx(p.col);
....

You will find this feature and others on EPlan by Cosmobile (see here some italian news about it) .

Nunzio Fiore

No comments:

Post a Comment