Author: obruce Date: 2014-07-18 17:38:00 +0200 (Fri, 18 Jul 2014) New Revision: 3018 Url: http://forge.chorem.org/projects/jtimer/repository/revisions/3018 Log: interface: changement modal, ajout rapport sans les temps Modified: branches/ng-jtimer/src/main/webapp/css/app.css branches/ng-jtimer/src/main/webapp/js/controllers.js branches/ng-jtimer/src/main/webapp/partials/reportModal.html branches/ng-jtimer/src/main/webapp/partials/reportNestedTask.html branches/ng-jtimer/src/main/webapp/partials/timesModal.html Modified: branches/ng-jtimer/src/main/webapp/css/app.css =================================================================== --- branches/ng-jtimer/src/main/webapp/css/app.css 2014-07-18 15:37:03 UTC (rev 3017) +++ branches/ng-jtimer/src/main/webapp/css/app.css 2014-07-18 15:38:00 UTC (rev 3018) @@ -406,7 +406,7 @@ .divYScrolable { overflow-y:scroll; - height:200px; + height:170px; width:250px; } Modified: branches/ng-jtimer/src/main/webapp/js/controllers.js =================================================================== --- branches/ng-jtimer/src/main/webapp/js/controllers.js 2014-07-18 15:37:03 UTC (rev 3017) +++ branches/ng-jtimer/src/main/webapp/js/controllers.js 2014-07-18 15:38:00 UTC (rev 3018) @@ -1391,7 +1391,7 @@ function ReportModalInstanceCtrl($scope, $modalInstance,$http, $sce, serverReportAccess, tree){ - $scope.modal={radioModel: "Project"}; + $scope.modal={radioModel: "Project", showTime : true}; $scope.tree = tree; $scope.obj={ @@ -1533,7 +1533,6 @@ $scope.open = function($event) { $event.preventDefault(); $event.stopPropagation(); - $scope.opened = true; }; } @@ -1634,6 +1633,9 @@ $scope.dateobj.endPeriod = item.creationDate + item.time; }; + $scope.addTime= function(date){ + $scope.addTimeBool=true; + } $scope.removeTime = function(ind, item){ if(!$scope.todo.stockedDeletedTimes[item.taskId]){ Modified: branches/ng-jtimer/src/main/webapp/partials/reportModal.html =================================================================== --- branches/ng-jtimer/src/main/webapp/partials/reportModal.html 2014-07-18 15:37:03 UTC (rev 3017) +++ branches/ng-jtimer/src/main/webapp/partials/reportModal.html 2014-07-18 15:38:00 UTC (rev 3018) @@ -9,7 +9,7 @@ <!-- Datepicker div --> <div style="border:1px solid black; display : inline-block;vertical-align: top;margin-left:1px;margin-right:1px;"> <h4><u>Option :</u></h4> - De : + From : <div style="margin-left:2px;" ng-controller="ReportDatePickerCtrl" class="row"> <div class="col-md-6"> <p class="input-group medium_input"> @@ -21,7 +21,7 @@ </div> </div> - A : + To : <div style="margin-left:1px;margin-right:1px;" class="row" ng-controller="ReportDatePickerCtrl"> <div class="col-md-6"> <p class="input-group medium_input"> @@ -32,22 +32,27 @@ </p> </div> </div> - <h4>Sort by :</h4> + <h4>Group by :</h4> <div style="margin-left:25px;" > <div class="btn-group"> <label class="btn btn-default" ng-model="modal.radioModel" btn-radio="'Project'">Project</label> - <label class="btn btn-default" ng-model="modal.radioModel" btn-radio="'Day'">Day</label> + <label class="btn btn-default" ng-model="modal.radioModel" disabled="true" btn-radio="'Day'">Day</label> <label class="btn btn-default" ng-model="modal.radioModel" btn-radio="'Week'">Week</label> </div> <br/> <div style="margin-left:30px;" class="btn-group"> - <label class="btn btn-default" ng-model="modal.radioModel" btn-radio="'Month'">Month</label> - <label class="btn btn-default" ng-model="modal.radioModel" btn-radio="'Year'">Year</label> + <label class="btn btn-default" ng-model="modal.radioModel" disabled="true" btn-radio="'Month'">Month</label> + <label class="btn btn-default" ng-model="modal.radioModel" disabled="true" btn-radio="'Year'">Year</label> </div> </div> + <div> + <span>Afficher les temps </span> + <input type="checkbox" ng-model="modal.showTime" /> + </div> + <hr/> <div> <h4><u>Projet :</u></h4> Modified: branches/ng-jtimer/src/main/webapp/partials/reportNestedTask.html =================================================================== --- branches/ng-jtimer/src/main/webapp/partials/reportNestedTask.html 2014-07-18 15:37:03 UTC (rev 3017) +++ branches/ng-jtimer/src/main/webapp/partials/reportNestedTask.html 2014-07-18 15:38:00 UTC (rev 3018) @@ -1,7 +1,7 @@ <div style="display : block" > <div style="min-width : 100px; max-width : 110px; display : inline-block;">-{{subtask.name}}</div> - <div style="min-width : 100px; max-width : 150px; display : inline-block;" ng-show="subtask.selftime != 0">{{subtask.selftime|time}} </div> + <div style="min-width : 100px; max-width : 150px; display : inline-block;" ng-show="subtask.selftime != 0 && modal.showTime">{{subtask.selftime|time}}</div> </div> <div style="margin-left : 10px" ng-repeat="subtask in subtask.subtasks" ng-include="'./partials/reportNestedTask.html'"> Modified: branches/ng-jtimer/src/main/webapp/partials/timesModal.html =================================================================== --- branches/ng-jtimer/src/main/webapp/partials/timesModal.html 2014-07-18 15:37:03 UTC (rev 3017) +++ branches/ng-jtimer/src/main/webapp/partials/timesModal.html 2014-07-18 15:38:00 UTC (rev 3018) @@ -22,25 +22,29 @@ <div> <!--ng-show="dateChosen"--> - Time for this date : - <div class="paded divYScrolable"> - <div ng-repeat="(index,item) in times" class="rowYScrolable" ng-class="{ 'selected-row' : (item === selectedItem)}"> + <div ng-if="!addTimeBool"> + Times for this date : + <div class="paded divYScrolable"> + <div ng-repeat="(index,item) in times" class="rowYScrolable" ng-class="{ 'selected-row' : (item === selectedItem)}"> - <div class="borderedbottom" ng-click="select(item, index)"> - At : {{getStartTime(item)}} for : {{getDuration(item)| time}}<i class="glyphicon glyphicon-minus-sign btn" ng-click="removeTime(index,item)"></i> + <div class="borderedbottom" ng-click="select(item, index)"> + At : {{getStartTime(item)}} for : {{getDuration(item)| time}}<i class="glyphicon glyphicon-minus-sign btn" ng-click="removeTime(index,item)"></i> + </div> </div> + + <span ng-show="times.length == 0" > + No time for {{task.name}} at this date. + </span> </div> + <i class="glyphicon glyphicon-plus-sign btn" ng-click="addTime(date)"> Add Time{{addTimeBool}}</i> - <span ng-show="times.length == 0" > - No time for {{task.name}} at this date. - </span> </div> - </div> </div> - <div class="right paded" ng-if="selectedItem"> - <div> + <div class="right paded"> + <!--Si periode selectionnee--> + <div ng-if="!addTimeBool && selectedItem"> <h4>Description : </h4> <div class="paded"> @@ -52,7 +56,7 @@ <h4>Modification : </h4> <div style="display : inline-block;"> - De : + From : </div> <div style="display : inline-block;"> <timepicker @@ -60,7 +64,7 @@ </timepicker> </div> <div style="display : inline-block;"> - A : + To : </div> <div style="display : inline-block;"> <timepicker @@ -68,5 +72,24 @@ </timepicker> </div> </div> + + <!--Si ajout selectionne--> + <div ng-show="addTimeBool"> + <h4>Period's limit :</h4> + <div style="display : inline-block;"> + <span>From :</span> + <input type="number" step="1" min="0" max="23" ng-model="fromhHour">h: + <input type="number" step="1" min="0" max="59" ng-model="fromMin">m + + </div> + <br/> + <div style="display : inline-block;"> + <span> To :</span> + <input type="number" step="1" min="0" max="23" ng-model="toHour">h: + <input type="number" step="1" min="0" max="59" ng-model="toMin">m + </div> + + </div> + </div> </div>