]> source.dussan.org Git - archiva.git/commitdiff
call simpleGrid callback on first rendering
authorOlivier Lamy <olamy@apache.org>
Wed, 18 Jan 2012 23:30:02 +0000 (23:30 +0000)
committerOlivier Lamy <olamy@apache.org>
Wed, 18 Jan 2012 23:30:02 +0000 (23:30 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1233121 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-webapp-js/TODO.TXT
archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/repositories.js
archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/knockout.simpleGrid.js

index e26e45f3fac74343887e93ef2ebc74f36a831fd2..cb6dc7aaa78ca016263dfbd1792c41cd0a7d77ab 100644 (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
index 54375c32e764c20d4ef5e60e8d94e0bb7a6b92a8..30c58a534800fc2739842db83f501e4d8c2342ed 100644 (file)
@@ -301,7 +301,6 @@ $(function() {
             ],
             pageSize: 5,
             gridUpdateCallBack: function(){
-              $.log("gridUpdateCallBack");
               $("#main-content #managed-repositories-table [title]").twipsy();
             }
           });
index 02815f7312888210f84b451a9f42622bf5a71e9a..9a3a1382a2b8ef3e859515b54f3308f4eff5b63b 100644 (file)
           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();
         }
     };
 })();
\ No newline at end of file