为了实现页面加载后自动点击第一行,我开过一个帖子,目前的解决办法是写一端JS来实现。
var className = "repeater-item-selected"
var cellName = "Manager_Invited_Comment_List";
var repeaterCellType = Forguncy.Page.getCell(cellName)._cellType;
var currentRowHelper = repeaterCellType._currentRowHelper;
currentRowHelper.bind("RepeaterCurrentRowChanged", null, function (_, args) {
var currentIndex = args.newCurrentRowIndex;
if(currentIndex < 0)
return;
var container = $("div[fgcname='" + cellName + "']");
var items = container.find(".repeater-item");
items.removeClass(className);
currentIndex >=0 && items.eq(currentIndex).addClass(className);
});
$(function(){
setTimeout(function(){ $(".repeater-item:first").click() }, 100);
$(".repeater-item:first").click()
});
现在遇到了新的问题,我的页面上有2个图文列表,都要实现自动点击第一行。但是这段JS放在第二个图文列表的加载命令里总是点击第一个图文列表的第一行。有没有高手可以指点一下,如何获取到相应的图文列表。
|