call simpleGrid callback on first rendering

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1233121 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2012-01-18 23:30:02 +00:00
parent a4d3620a65
commit 8233740cf9
3 changed files with 4 additions and 1 deletions

View File

@ -7,3 +7,4 @@ documentation:
* page to describe general architecture (jquery, knockout, jquery tmpl etc)
* page for rest services (redback karma)
* page for template loading (i18n etc...)
* page for simpleGrid binding and various options

View File

@ -301,7 +301,6 @@ $(function() {
],
pageSize: 5,
gridUpdateCallBack: function(){
$.log("gridUpdateCallBack");
$("#main-content #managed-repositories-table [title]").twipsy();
}
});

View File

@ -59,10 +59,13 @@
ko.renderTemplate(gridTemplateName, viewModel, { templateEngine: templateEngine }, gridContainer, "replaceNode")
.subscribe(viewModel.gridUpdateCallBack?viewModel.gridUpdateCallBack:function(){});
if (viewModel.gridUpdateCallBack) viewModel.gridUpdateCallBack();
// Render the page links
var pageLinksContainer = $("#"+allBindings.pageLinksId).get(0);
ko.renderTemplate(pageLinksTemplateName, viewModel, { templateEngine: templateEngine }, pageLinksContainer, "replaceNode")
.subscribe(viewModel.pageLinksUpdateCallBack?viewModel.pageLinksUpdateCallBack:function(){});
if (viewModel.pageLinksUpdateCallBack) viewModel.pageLinksUpdateCallBack();
}
};
})();