r3020 - in branches/ng-jtimer/src/main: java/org/chorem/jtimer/storage resources webapp/js webapp/partials
Author: obruce Date: 2014-07-23 17:46:46 +0200 (Wed, 23 Jul 2014) New Revision: 3020 Url: http://forge.chorem.org/projects/jtimer/repository/revisions/3020 Log: BDD, Storage: Changement long pour timestamp Changement modal option de taches Removed: branches/ng-jtimer/src/main/webapp/partials/timeModal.html Modified: branches/ng-jtimer/src/main/java/org/chorem/jtimer/storage/Storage.java branches/ng-jtimer/src/main/resources/jtimer-default.properties branches/ng-jtimer/src/main/webapp/js/app.js 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/task.html Modified: branches/ng-jtimer/src/main/java/org/chorem/jtimer/storage/Storage.java =================================================================== --- branches/ng-jtimer/src/main/java/org/chorem/jtimer/storage/Storage.java 2014-07-22 13:18:31 UTC (rev 3019) +++ branches/ng-jtimer/src/main/java/org/chorem/jtimer/storage/Storage.java 2014-07-23 15:46:46 UTC (rev 3020) @@ -215,8 +215,8 @@ statement.setString(3, task.getTaskId()); statement.setBoolean(4, task.isClosed()); statement.setString(5, null /*project.getNote()*/); - statement.setLong(6, task.getCreationDate().getTime()); - statement.setLong(7, task.getModificationDate().getTime()); + statement.setObject(6, task.getCreationDate()); + statement.setObject(7, task.getModificationDate()); statement.setLong(8,task.getRemoved()); statement.executeUpdate(); @@ -269,10 +269,10 @@ statement = connection.prepareStatement(config.getStorageQueryInsertTime()); statement.setString(1, task.getTaskId()); - statement.setLong(2, date.getTime()); + statement.setObject(2, new Date()); statement.setString(3, uuid); statement.setLong(4, duration); - statement.setLong(5, new Date().getTime()); + statement.setObject(5, new Date()); statement.setBoolean(6, false); statement.executeUpdate(); } catch (SQLException ex) { @@ -292,10 +292,10 @@ statement = connection.prepareStatement(config.getStorageQueryInsertTime()); statement.setString(1, time.getTaskId()); - statement.setLong(2, time.getCreationDate().getTime()); + statement.setObject(2, time.getCreationDate()); statement.setString(3, time.getTimeId()); statement.setLong(4, time.getTime()); - statement.setLong(5, time.getModificationDate().getTime()); + statement.setObject(5, time.getModificationDate()); statement.setLong(6, time.getRemoved()); statement.executeUpdate(); } catch (SQLException ex) { @@ -325,7 +325,7 @@ statement.setInt(6, alarm.getLimitMin()); statement.setInt(7, alarm.getRemainingHour()); statement.setInt(8, alarm.getRemainingMin()); - statement.setLong(9, alarm.getModificationDate().getTime()); + statement.setObject(9, alarm.getModificationDate()); statement.setLong(10, alarm.getRemoved()); statement.executeUpdate(); @@ -347,9 +347,8 @@ PreparedStatement statement = null; try { statement = connection.prepareStatement(config.getStorageQuerySelectTaskTimeWithDate()); + statement.setObject(1, new Date(date)); - statement.setLong(1, date); - ResultSet rs = statement.executeQuery(); while (rs.next()) { @@ -357,8 +356,8 @@ time.setTaskId(rs.getString("mytask")); time.setTimeId(rs.getString("uuid")); time.setTime(rs.getLong("duration")); - time.setCreationDate(new java.util.Date(rs.getLong("date"))); - time.setModificationDate(new java.util.Date(rs.getLong("modificationDate"))); + time.setCreationDate(new java.util.Date(rs.getTimestamp("creationDate").getTime())); + time.setModificationDate(new java.util.Date(rs.getTimestamp("modificationDate").getTime())); time.setRemoved(rs.getLong("removed")); times.add(time); @@ -384,7 +383,7 @@ try { statement = connection.prepareStatement(config.getStorageQuerySelectTimedTask()); - statement.setLong(1, date); + statement.setObject(1, new Date(date)); log.debug(statement.toString()); @@ -399,15 +398,15 @@ task.setTodayTime(0); - task.setCreationDate(new java.util.Date(rs.getLong("creationDate"))); - task.setModificationDate(new java.util.Date(rs.getLong("modificationDate"))); + task.setCreationDate(new java.util.Date((rs.getTimestamp("creationDate").getTime()))); + task.setModificationDate(new java.util.Date(rs.getTimestamp("modificationDate").getTime())); task.setTotalTime(rs.getLong("totalduration")); tasks.add(task); } // not timed tasks statement2 = connection.prepareStatement(config.getStorageQuerySelectNotTimedTask()); - statement2.setLong(1, date); + statement2.setObject(1, new Date(date)); rs = statement2.executeQuery(); while (rs.next()) { @@ -415,8 +414,8 @@ task.setName(rs.getString("name")); task.setTaskId(rs.getString("taskId")); task.setParent(rs.getString("parent")); - task.setCreationDate(new java.util.Date(rs.getLong("creationDate"))); - task.setModificationDate(new java.util.Date(rs.getLong("modificationDate"))); + task.setCreationDate(new java.util.Date((rs.getTimestamp("creationDate").getTime()))); + task.setModificationDate(new java.util.Date(rs.getTimestamp("modificationDate").getTime())); task.setRemoved(rs.getLong("removed")); task.setTodayTime(0); task.setTotalTime(0); @@ -443,7 +442,7 @@ try { statement = connection.prepareStatement(config.getStorageQuerySelectNotRemovedTaskTime()); statement.setString(1, taskid); - statement.setLong(2, date); + statement.setObject(2, new Date(date)); ResultSet rs = statement.executeQuery(); while (rs.next()) { @@ -451,8 +450,8 @@ time.setTaskId(taskid); time.setTimeId(rs.getString("uuid")); time.setTime(rs.getLong("duration")); - time.setCreationDate(new java.util.Date(rs.getLong("date"))); - time.setModificationDate(new java.util.Date(rs.getLong("modificationDate"))); + time.setCreationDate(new java.util.Date(rs.getTimestamp("creationDate").getTime())); + time.setModificationDate(new java.util.Date(rs.getTimestamp("modificationDate").getTime())); time.setRemoved(rs.getLong("removed")); times.add(time); @@ -468,8 +467,8 @@ /** * Methode qui retourne toutes les alarmes dans la base - * @param date - * @return + * @param date la date + * @return list de date */ public ArrayList<TimerAlarm> getAlarms(Long date) { ArrayList<TimerAlarm> alarms = new ArrayList<>(); @@ -477,7 +476,7 @@ try { statement = connection.prepareStatement(config.getStorageQuerySelectAlarmOnDate()); - statement.setLong(1, date); + statement.setObject(1, new Date(date)); ResultSet rs = statement.executeQuery(); while (rs.next()) { @@ -490,7 +489,7 @@ alarm.setLimitMin(rs.getInt("limitMin")); alarm.setRemainingHour(rs.getInt("remainingHour")); alarm.setRemainingMin(rs.getInt("remainingMin")); - alarm.setModificationDate(new Date(rs.getLong("modificationDate"))); + alarm.setModificationDate(new Date(rs.getTimestamp("modificationDate").getTime())); alarm.setRemoved(rs.getLong("removed")); alarms.add(alarm); @@ -511,7 +510,7 @@ try { statement = connection.prepareStatement(config.getStorageQuerySelectAlarmWithTaskID()); - statement.setLong(1, date); + statement.setObject(1, new Date(date)); statement.setString(2, taskId); ResultSet rs = statement.executeQuery(); @@ -554,8 +553,8 @@ try{ statement = connection.prepareStatement(config.getStorageQuerySelectReportTasks()); - statement.setLong(1, startDate); - statement.setLong(2, endDate); + statement.setObject(1, new Date(startDate)); + statement.setObject(2, new Date(endDate)); ResultSet rs = statement.executeQuery(); while(rs.next()){ @@ -648,8 +647,8 @@ //Les taches minutees sur les differentes semaines statement = connection.prepareStatement(config.getStorageQuerySelectReportWeekTimedTasks()); - statement.setLong(1, startDate); - statement.setLong(2, endDate); + statement.setObject(1, new Date(startDate)); + statement.setObject(2, new Date(endDate)); ResultSet rs = statement.executeQuery(); @@ -766,7 +765,7 @@ statement.setString(2, task.getParent()); //parent statement.setBoolean(3, task.isClosed()); //hidden statement.setString(4, null /*project.getNote()*/);//note - statement.setLong(5, task.getModificationDate().getTime()); //modificationDate + statement.setObject(5, task.getModificationDate()); //modificationDate statement.setLong(6,task.getRemoved()); statement.setString(7, task.getTaskId()); //taskId @@ -788,9 +787,9 @@ try { statement = connection.prepareStatement(config.getStorageQueryUpdateTime()); - statement.setLong(1, t.getCreationDate().getTime()); + statement.setObject(1, t.getCreationDate()); statement.setLong(2, t.getTime()); - statement.setLong(3, t.getModificationDate().getTime()); //modificationDate + statement.setObject(3, t.getModificationDate()); //modificationDate statement.setLong(4, t.getRemoved()); statement.setString(5, t.getTimeId() ); statement.executeUpdate(); @@ -900,7 +899,7 @@ statement = connection.prepareStatement(config.getStorageQueryUpdateTimeToRemove()); statement.setLong(1, time); - statement.setLong(2, time); + statement.setObject(2, new Date(time)); statement.setString(3, timeId); statement.executeUpdate(); } catch (SQLException ex) { @@ -922,7 +921,7 @@ statement = connection.prepareStatement(config.getStorageQueryUpdateTaskToRemove()); statement.setLong(1, time); - statement.setLong(2, time); + statement.setObject(2, new Date(time)); statement.setString(3, taskId); statement.executeUpdate(); @@ -941,7 +940,7 @@ statement = connection.prepareStatement(config.getStorageQueryUpdateAlarmToRemove()); statement.setLong(1, time); - statement.setLong(2, time); + statement.setObject(2, new Date(time)); statement.setString(3, alarmId); statement.executeUpdate(); Modified: branches/ng-jtimer/src/main/resources/jtimer-default.properties =================================================================== --- branches/ng-jtimer/src/main/resources/jtimer-default.properties 2014-07-22 13:18:31 UTC (rev 3019) +++ branches/ng-jtimer/src/main/resources/jtimer-default.properties 2014-07-23 15:46:46 UTC (rev 3020) @@ -2,7 +2,7 @@ # jTimer default properties ### # jTimer storage path -jtimer.storage.path=/home/olivia/Bureau/jtimer/jtimer/BDDTest4 +jtimer.storage.path=/home/olivia/Bureau/jtimer/jtimer/BDDNewDepart ### # SQL properties ### @@ -18,8 +18,8 @@ (taskId VARCHAR(255) NOT NULL, \ name VARCHAR(255) NOT NULL, \ parent VARCHAR(255), \ - creationDate LONG, \ - modificationDate LONG, \ + creationDate Timestamp, \ + modificationDate Timestamp, \ hidden BOOLEAN, \ path ARRAY, \ note TEXT, \ @@ -27,12 +27,12 @@ PRIMARY KEY (taskId)) jtimer.storage.create.table.time=CREATE TABLE tasktime \ (taskid VARCHAR(255) NOT NULL, \ - date LONG, \ + creationDate Timestamp, \ uuid varchar(255) unique, \ duration LONG, \ - modificationDate LONG, \ + modificationDate Timestamp, \ removed LONG, \ - PRIMARY KEY (taskid, date, uuid), \ + PRIMARY KEY (taskid, creationDate, uuid), \ FOREIGN KEY (taskid) \ REFERENCES task (taskId) \ ON DELETE CASCADE) @@ -45,7 +45,7 @@ limitMin INTEGER, \ remainingMin INTEGER, \ remainingHour INTEGER, \ - modificationDate LONG, \ + modificationDate Timestamp, \ removed LONG, \ PRIMARY KEY (taskId, alarmId), \ FOREIGN KEY (taskid) \ @@ -56,7 +56,7 @@ jtimer.storage.insert.version.number=INSERT INTO VERSION VALUES('2.0') jtimer.storage.insert.task=INSERT INTO task (name, parent, taskId, hidden, note,creationDate, modificationDate, removed) \ VALUES (?, ?, ?, ?, ?, ?, ?, ?) -jtimer.storage.insert.time=INSERT INTO tasktime (taskid, date, uuid, duration, modificationDate, removed) \ +jtimer.storage.insert.time=INSERT INTO tasktime (taskid, creationDate, uuid, duration, modificationDate, removed) \ VALUES (?, ?, ?, ?, ?, ?) jtimer.storage.insert.alarm=INSERT INTO taskalarm (taskid, alarmId, name, type, limitHour, \ limitMin, remainingHour, remainingMin, modificationDate, removed) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) @@ -93,18 +93,16 @@ jtimer.storage.select.report.timedtasks=SELECT TA.* , sum(TI.duration) AS totalduration \ FROM task TA, tasktime TI \ WHERE TA.taskId = TI.taskid \ - AND TA.creationDate > ? \ - AND TA.creationDate < ? \ + AND TI.creationDate BETWEEN ? AND ? \ AND TA.removed = 0 \ GROUP BY TA.taskId jtimer.storage.select.report.roottasks=SELECT * \ FROM task \ WHERE (taskId not in (SELECT taskid FROM tasktime) AND removed = 0 ) -jtimer.storage.select.report.week.timedtasks=SELECT WEEK(DATEADD('SECOND', (TI.date/1000), DATE '1970-01-01')) as week, TA.* , sum(TI.duration) AS totalduration \ +jtimer.storage.select.report.week.timedtasks=SELECT WEEK(TI.creationDate) as week, TA.* , sum(TI.duration) AS totalduration \ FROM task TA, tasktime TI \ WHERE TA.taskId = TI.taskid \ - AND TA.creationDate > ? \ - AND TA.creationDate < ? \ + AND TI.creationDate BETWEEN ? AND ? \ AND TA.removed = 0 \ GROUP BY TA.taskId, week \ ORDER BY TA.creationDate DESC @@ -126,7 +124,7 @@ WHERE taskId = ? jtimer.storage.update.task.withid=UPDATE task SET name=?, parent=?, hidden=?, note=?, modificationDate=?, removed=? \ WHERE taskId = ? -jtimer.storage.update.time.withid=UPDATE tasktime SET date=?, duration=?, modificationDate=?, removed = ? \ +jtimer.storage.update.time.withid=UPDATE tasktime SET creationDate=?, duration=?, modificationDate=?, removed = ? \ WHERE uuid = ? jtimer.storage.update.alarm.withid=UPDATE tasktime SET remainingHour=?, remainingMin=?, modificationDate=?, removed = ? \ WHERE alarmid = ? Modified: branches/ng-jtimer/src/main/webapp/js/app.js =================================================================== --- branches/ng-jtimer/src/main/webapp/js/app.js 2014-07-22 13:18:31 UTC (rev 3019) +++ branches/ng-jtimer/src/main/webapp/js/app.js 2014-07-23 15:46:46 UTC (rev 3020) @@ -314,7 +314,10 @@ when('/contact', {templateUrl: 'partials/contact.html'}). otherwise({redirectTo: '/tasks'}); }]) - + .config(function (datepickerConfig, datepickerPopupConfig) { + datepickerConfig.showWeeks = false; + datepickerPopupConfig.toggleWeeksText = null; + }) .factory("$localStorage", function() { // Encapsule l'acces au localStorage pour // - ajouter un prefix au variable sauvee pour les differencier des autres ("WebTimer-") Modified: branches/ng-jtimer/src/main/webapp/js/controllers.js =================================================================== --- branches/ng-jtimer/src/main/webapp/js/controllers.js 2014-07-22 13:18:31 UTC (rev 3019) +++ branches/ng-jtimer/src/main/webapp/js/controllers.js 2014-07-23 15:46:46 UTC (rev 3020) @@ -155,7 +155,6 @@ checkRecurseParent($scope.currentTask); } - checkAlarms(0); }, 60000-delay); }; @@ -1029,76 +1028,6 @@ }); } - $scope.popupTime = function (node){ - //Task identifier - var id = node.task.taskId; - var data; - - var modalInstance = $modal.open({ - templateUrl: 'partials/timeModal.html', - controller: TimeModalCtrl, - resolve: { - taskTimes : function () { - return angular.copy($scope.data); - }, - indent : function () { - return id; - } - } - - }); - - modalInstance.result.then(function (item) { - - if(item.index != -1){ - if(item.action=='Modification'){ - //On met la valeur à jour - - $scope.data.times[id][item.index].changeCreationDate(item.creationDate); - $scope.data.times[id][item.index].changeDuration(item.time); - - //init - if(!$scope.todo.stockedEditedTimes[id]){$scope.todo.stockedEditedTimes[id]=[]; } - - //On ajoute dans la tdList - $scope.todo.stockedEditedTimes[id].push($scope.data.times[id][item.index]); - - save(); - } - - if(item.action=='Ajout'){ - //init - - if(!$scope.data.times[id]){$scope.data.times[id]= [];}; - if(!$scope.todo.stockedNewTimes[id]){$scope.todo.stockedNewTimes[id] = []}; - - //on cree le temps - var res = new TaskTime(node.task,undefined,item.creationDate,item.time); - $scope.data.times[id].push(res); - $scope.todo.stockedNewTimes[id].push(res); - save(); - } - - if(item.action == 'Suppression'){ - // init de l'objet - if(!$scope.todo.stockedDeletedTimes[id]){ - $scope.todo.stockedDeletedTimes[id] = [] - }; - //on pousse l'objet à supprimer - $scope.todo.stockedDeletedTimes[id].push($scope.data.times[id][item.index].timeId); - - $scope.data.times[id].splice(item.index,1); - if($scope.data.times[id]==[]){ - delete $scope.data.times[id]; - } - save(); - } - data = $scope.data.times; - } - }); - - } - $scope.reportPopup = function (){ var modalInstance = $modal.open({ @@ -1341,14 +1270,54 @@ function ReportModalInstanceCtrl($scope, $modalInstance,$http, $sce, serverReportAccess, tree){ + $scope.modal={radioModel: "Project", showTime : true}; $scope.tree = tree; + + /** + * Function to find Monday date of current week + */ + function getMonday(date) { + d = date; + var day = d.getDay(), + diff = d.getDate() - day + (day == 0 ? -6:1); // adjust when day is sunday + return new Date(d.setDate(diff)); + } + + + $scope.obj={ - startDate : new Date(), + startDate : getMonday(new Date()), endDate : new Date() }; + $scope.previousWeek = function(){ + var beforeOneWeek = new Date($scope.obj.startDate.getTime() - 60 * 60 * 24 * 7 * 1000); + day = beforeOneWeek.getDay(); + diffToMonday = beforeOneWeek.getDate() - day + (day === 0 ? -6 : 1); + + // Updating scope date + $scope.obj.startDate = new Date(beforeOneWeek.setDate(diffToMonday)); + $scope.obj.endDate = new Date(beforeOneWeek.setDate(diffToMonday + 6)); + }; + + $scope.currentWeek= function(){ + $scope.obj.startDate = getMonday(new Date()); + $scope.obj.endDate = new Date(); + }; + + $scope.nextWeek= function(){ + var afterOneWeek = new Date($scope.obj.startDate.getTime() + 60 * 60 * 24 * 7 * 1000); + day = afterOneWeek.getDay(); + diffToMonday = afterOneWeek.getDate() - day + (day === 0 ? -6 : 1); + + // Updating scope date + $scope.obj.startDate = new Date(afterOneWeek.setDate(diffToMonday)); + $scope.obj.endDate = new Date(afterOneWeek.setDate(diffToMonday + 6)); + + }; + $scope.obj.endDate.setHours(23,59,59,999); $scope.htmlReport="Générer un rapport"; @@ -1658,16 +1627,19 @@ serverTimeAccess.create({taskId: task.taskId,dispatch:true} , angular.toJson(res), function(){ console.log("persist time success" + task); - }, function(){ console.log("fail"); }); - $scope.taskTimes.times[task.taskId] = []; + if(!$scope.taskTimes.times[task.taskId]){ + $scope.taskTimes.times[task.taskId] = []; + } $scope.taskTimes.times[task.taskId].push(res); - $scope.changeDate(); + $scope.times.push(res); + console.log($scope.times); + //On ferme la partie d'ajout de temps $scope.limit.fromHour =0; $scope.limit.fromMin =0; @@ -1740,7 +1712,7 @@ //On va recuperer les temps de la tache angular.forEach($scope.taskTimes.times[$scope.indent],function(time){ // si le temps est entre les bornes de la journées - if(time.creationDate> startday.getTime() && + if(time.creationDate > startday.getTime() && time.creationDate< endday.getTime()){ //ajout du temps $scope.times.push(time); @@ -1753,11 +1725,17 @@ }; - +/** + * Controller pour le datepicker + **/ function DatePickerCtrl($scope){ $scope.dateMaxPicker= new Date(); + /** + * Methode qui change la date de creation en fonction de ce qui est renvoyer par le datepicker + * + */ $scope.changeDayDate = function(){ var year = $scope.dateobj.date.getFullYear(); @@ -1773,6 +1751,10 @@ }; }; +/** + * Controller pour la progress bar dynamique + * Calcul constant de la progression + */ function alarmProgressBarCtrl($scope){ $scope.dynamicProgressBar = function(alarm){ @@ -1788,77 +1770,9 @@ }; -function TimePickerOptionModalCtrl($scope){ - //Activated button radio - $scope.radioModel = 'Left'; - //Le pas des heures et minutes - $scope.hstep = 1; - $scope.mstep = 1; - /* - * Méthode déclancher quand l'heure change dans le timepicker - * Change l'objet du controller principal - */ - $scope.changeModel = function(){ - } -}; -function RadioTimeCtrl($scope){ - //Activated button radio - $scope.radioModel = 'Left'; - - //Le pas des heures et minutes - $scope.hstep = 1; - $scope.mstep = 1; - - /* - * Méthode déclancher quand l'heure change dans le timepicker - * Change l'objet du controller principal - */ - $scope.changeModel = function(){ - - //La date max - var maxDate = new Date($scope.dateobj.aTime); - maxDate.setHours(23,59,59,999); - - //Si On modifie sur la date de debut - if(($scope.radioModel || 'null') == 'Left'){ - $scope.obj.creationDate = $scope.dateobj.aTime.getTime(); - - //si crea+temps superieur à 23:59 - if(($scope.obj.creationDate+$scope.obj.time) > maxDate.getTime()){ - $scope.dateobj.aTime=new Date(maxDate.getTime()-$scope.obj.time); - $scope.obj.creationDate = maxDate.getTime()-$scope.obj.time; - } - - }else{//On modifie la date de fin - //Si l'heure de fin est superieur a l'heure de depart - if($scope.dateobj.aTime.getTime() > $scope.obj.creationDate){ - var duree = $scope.dateobj.aTime.getTime() - $scope.obj.creationDate ; - $scope.obj.time = duree; - }else{ - //Empeche de depasser 23:59 - $scope.dateobj.aTime = maxDate; - $scope.obj.time = maxDate.getTime() - $scope.obj.creationDate; - } - } - } - - //Change l'heure dans le timePicker selon debut/fin - $scope.changeFonc=function(){ - if(($scope.radioModel || 'null') == 'Left'){ - $scope.dateobj.aTime = new Date($scope.obj.creationDate); - }else{ - $scope.dateobj.aTime = new Date($scope.obj.creationDate + $scope.obj.time); - } - } -} - - - - - Modified: branches/ng-jtimer/src/main/webapp/partials/reportModal.html =================================================================== --- branches/ng-jtimer/src/main/webapp/partials/reportModal.html 2014-07-22 13:18:31 UTC (rev 3019) +++ branches/ng-jtimer/src/main/webapp/partials/reportModal.html 2014-07-23 15:46:46 UTC (rev 3020) @@ -32,6 +32,19 @@ </p> </div> </div> + + <div style="margin-left:50px;"> + <button type="button" class="btn btn-default" popover="Previous Week!" popover-trigger="mouseenter" ng-click="previousWeek()"> + <i class="glyphicon glyphicon-circle-arrow-left"></i> + </button> + <button type="button" class="btn btn-default" popover="Current Week!" popover-trigger="mouseenter" ng-click="currentWeek()"> + <i class="glyphicon glyphicon-download"></i> + </button> + <button type="button" class="btn btn-default" popover="Next Week!" popover-trigger="mouseenter" ng-click="nextWeek()"> + <i class="glyphicon glyphicon-circle-arrow-right"></i> + </button> + </div> + <h4>Group by :</h4> <div style="margin-left:25px;" > <div class="btn-group"> @@ -48,7 +61,7 @@ </div> <div> - <span>Afficher les temps </span> + <span>Show times </span> <input type="checkbox" ng-model="modal.showTime" /> </div> Modified: branches/ng-jtimer/src/main/webapp/partials/task.html =================================================================== --- branches/ng-jtimer/src/main/webapp/partials/task.html 2014-07-22 13:18:31 UTC (rev 3019) +++ branches/ng-jtimer/src/main/webapp/partials/task.html 2014-07-23 15:46:46 UTC (rev 3020) @@ -8,7 +8,7 @@ <h5>Time :</h5> <b>Total time :</b>{{totaltime|time}} <br/> <b>Today Time :</b>{{todaytime|time}} - <div ng-if="task.tags.length == 0"> + <div ng-if="task.tags.length != 0"> <h5>Tags :</h5> <span class="label label-info" ng-repeat="tag in task.tags"> {{tag}} Deleted: branches/ng-jtimer/src/main/webapp/partials/timeModal.html =================================================================== --- branches/ng-jtimer/src/main/webapp/partials/timeModal.html 2014-07-22 13:18:31 UTC (rev 3019) +++ branches/ng-jtimer/src/main/webapp/partials/timeModal.html 2014-07-23 15:46:46 UTC (rev 3020) @@ -1,113 +0,0 @@ -<div> - <h3> Edition de la tâche.</h3> - - <div class="btn-group" dropdown is-open="status.isopen" ng-show="obj.action==''"> - <button type="button" class="btn btn-default btn-sm dropdown-toggle"> - Action à faire sur la tâche: <span class="caret"></span> - </button> - <ul class="dropdown-menu" role="menu"> - <li><a ng-click="periodAction1()">Ajouter une periode</a></li> - <li><a ng-click="periodAction2()">Modifier une periode</a></li> - <li><a ng-click="periodAction3()">Supprimer une periode</a></li> - </ul> - - </div> - - <h4 ng-show="obj.action != ''"> {{obj.action}} d'une période</h4> - - <!-- Div dropdown choix de periode --> - <div class="btn-group" dropdown is-open="status.isopen" ng-if="!activTime && obj.action !='' && obj.action !='Ajout'"> - <button type="button" class="btn btn-default btn-sm dropdown-toggle"> - Les périodes pour la tâche sélectionnée : <span class="caret"></span> - </button> - <ul class="dropdown-menu" role="menu"> - - <li ng-repeat="(index,item) in times" > - - <a ng-click="select(item, index)"> - Début : {{getStartTime(item)}} - Durée : {{getStopTime(item)| time}} - </a> - - </li> - - </ul> - </div> - - <!-- div ajout d'une periode --> - <div ng-if = " obj.action=='Ajout'"> - - <hr/> - <div class ="timepick"> - <div ng-controller="DatePickerCtrl" style="display:inline-block; min-height:290px;"> - <datepicker ng-model="dateobj.date" ng-change="changeDayDate()" min-date="minDate" max-date="dateMaxPicker" show-weeks="true" class="well well-sm"></datepicker> - </div> - - <div class = "timepick" ng-controller="RadioTimeCtrl"> - <div> - <div class="btn-group"> - <label class="btn btn-default btn-sm" ng-model="radioModel" ng-change="changeFonc()" btn-radio="'Left'">Début de période </label> - <label class="btn btn-default btn-sm" ng-model="radioModel" ng-change="changeFonc()" btn-radio="'Right'">Fin de période </label> - </div> - </div> - <div class="timepick"> - <timepicker - ng-model="dateobj.aTime" ng-change="changeModel()" hour-step="hstep" minute-step="mstep" show-meridian="ismeridian"> - </timepicker> - </div> - - </div> - </div> - <alert type="info" >Début : {{getStartObjTime()}} - Fin : {{getStopObjTime()}} - Duree : {{getObjDuration() | time}} </alert> - </div> - - - - <!-- div modification d'une periode --> - <div ng-if = "activTime && obj.action=='Modification'"> - <hr/> - - <alert type="danger" >Choisir une période :</alert> - - <div class = "timepick" ng-controller="RadioTimeCtrl"> - <br/> - - - <div> - <div class="btn-group"> - <label class="btn btn-default btn-sm" ng-model="radioModel" ng-change="changeFonc()" btn-radio="'Left'">Début de période </label> - <label class="btn btn-default btn-sm" ng-model="radioModel" ng-change="changeFonc()" btn-radio="'Right'">Fin de période </label> - </div> - </div> - - <br/> - - <div class = "timepick"> - <timepicker - ng-model="dateobj.aTime" ng-change="changeModel()" hour-step="hstep" minute-step="mstep" show-meridian="ismeridian"> - </timepicker> - </div> - <br/> - - </div> - - - <alert type="info" >Début : {{getStartObjTime()}} - Fin : {{getStopObjTime()}} - Duree : {{getObjDuration() | time}} </alert> - - </div> - - <!-- div suppression d'une periode --> - <div ng-if = "activTime && obj.action=='Suppression'"> - <alert type="danger" > La période suivante va être supprimée :<br/> - Début : {{getStartObjTime()}} - Fin : {{getStopObjTime()}} - Duree : {{getObjDuration() | time}} </alert> - </div> - -<!-- - <div class="modal-footer"> - <button class="btn btn-default btn-sm" ng-click="ok()">OK</button> - <button class="btn btn-warning" ng-click="cancel()">Cancel</button> - </div> - ---> - -</div> -
participants (1)
-
obruce@users.chorem.org