appframework icon indicating copy to clipboard operation
appframework copied to clipboard

loadAjax() did not load content with class='panel' properly

Open cmwong opened this issue 9 years ago • 2 comments

original code Line 1181 if(!$res.hasClass(".panel")){ $res=$res.attr("data-title",(target)); $res.prop("id",crc); $res.addClass("panel"); } else { $res=$res.find(".panel"); }

I fixed it with the following //the first node not having class panel if(!$(res).hasClass('panel')) { $res=$res.attr("data-title",(target)); $res.prop("id",crc); $res.addClass("panel"); } else { $res=$res.find(".panel"); //check if panel do not hv id if(!$res.prop('id')) { $res.prop("id",crc); } }

Hope someone can fixed this to the repository!!

cmwong avatar Apr 03 '15 17:04 cmwong

I also encountered。。can you help me ? use api "$.af.loadajax" load page 。 I trying refresh page.. Results page Jump to the home page。How to keep the current page?

zhangkangbin avatar Jun 16 '15 04:06 zhangkangbin

@zhangkangbin -please submit a pull request with the fix and a demo showing the fix, and we will merge it.

imaffett avatar Jun 16 '15 11:06 imaffett