r2930 - in branches/ng-jtimer/jtimer-server/src/main/webapp: js partials
Author: echatellier Date: 2013-09-01 14:48:08 +0200 (Sun, 01 Sep 2013) New Revision: 2930 Url: http://chorem.org/projects/jtimer/repository/revisions/2930 Log: Fix first level update (hack) Modified: branches/ng-jtimer/jtimer-server/src/main/webapp/js/app.js branches/ng-jtimer/jtimer-server/src/main/webapp/partials/tasks.html Modified: branches/ng-jtimer/jtimer-server/src/main/webapp/js/app.js =================================================================== --- branches/ng-jtimer/jtimer-server/src/main/webapp/js/app.js 2013-09-01 12:47:05 UTC (rev 2929) +++ branches/ng-jtimer/jtimer-server/src/main/webapp/js/app.js 2013-09-01 12:48:08 UTC (rev 2930) @@ -185,6 +185,13 @@ } }); }); + // FIXME echatellier 20130901 for root children not being updated + $scope.$watchCollection("tree.children", function(newValue, oldValue, scope){ + if (newValue !== oldValue) { + var tree = treeGetter($scope); + update(tree); + } + }); // on force un premier appel pour que l'arbre s'affiche update(treeGetter($scope)); Modified: branches/ng-jtimer/jtimer-server/src/main/webapp/partials/tasks.html =================================================================== --- branches/ng-jtimer/jtimer-server/src/main/webapp/partials/tasks.html 2013-09-01 12:47:05 UTC (rev 2929) +++ branches/ng-jtimer/jtimer-server/src/main/webapp/partials/tasks.html 2013-09-01 12:48:08 UTC (rev 2930) @@ -22,7 +22,7 @@ <div id="footer"> <span class="left">{{currentDate()}}</span> <span class="center"><i class="icon-html5"></i> <a href="#">WebTimer</a></span> - <span class="right">{{tree.getTime().today |time}} | {{tree.getTime().global | time}}</a> + <span class="right">{{tree.getTime().today |time}} | {{tree.getTime().global | time}}</span> </div> <div>
participants (1)
-
echatellier@users.chorem.org