make saturday sunday only visible if theres hours on them #92

refine styling of dialog for create/edit of timelogs to remove dropdown entry and remove issue of deleting text in input control from before.
This commit is contained in:
Chris.Watts90@outlook.com 2018-03-06 11:54:21 +00:00
parent 5ff1ad5a5a
commit 5639724390
2 changed files with 21 additions and 20 deletions

View File

@ -274,6 +274,7 @@
</thead> </thead>
<tbody> <tbody>
<!-- ko foreach: TimeLogs--> <!-- ko foreach: TimeLogs-->
<!-- ko if: !((DayOfWeek === "Saturday" || DayOfWeek=== "Sunday") && LogCount===0)-->
<tr> <tr>
<td class="valign" data-bind="text: DayOfWeek, contextMenu: $root.createContextMenu"></td> <td class="valign" data-bind="text: DayOfWeek, contextMenu: $root.createContextMenu"></td>
<!-- ko foreach: Logs --> <!-- ko foreach: Logs -->
@ -285,6 +286,7 @@
<td class="valign" data-bind="text: $root.convertToHours(DailyTotal), contextMenu: $root.createContextMenu"></td> <td class="valign" data-bind="text: $root.convertToHours(DailyTotal), contextMenu: $root.createContextMenu"></td>
</tr> </tr>
<!-- /ko --> <!-- /ko -->
<!-- /ko -->
<tr> <tr>
<td class="valign" data-bind="attr:{colspan: $root.correctLogOffset(MaxDailyLogCount)+1}, contextMenu: $root.createContextMenu">Weekly Total</td> <td class="valign" data-bind="attr:{colspan: $root.correctLogOffset(MaxDailyLogCount)+1}, contextMenu: $root.createContextMenu">Weekly Total</td>
<td class="valign" for="dailyHrsTotal" data-bind="text: $root.convertToHours(WeeklyTotal), contextMenu: $root.createContextMenu"></td> <td class="valign" for="dailyHrsTotal" data-bind="text: $root.convertToHours(WeeklyTotal), contextMenu: $root.createContextMenu"></td>
@ -335,20 +337,16 @@
<button type="button" class="close" data-dismiss="modal">&times;</button> <button type="button" class="close" data-dismiss="modal">&times;</button>
<h4>MANUAL EDIT</h4> <h4>MANUAL EDIT</h4>
</div> </div>
<div class="modal-body" style="height: 300px;"> <div class="modal-body" style="height: 400px;">
<form action="#manualLog" method="post" class="form-group"> <form action="#manualLog" method="post" class="form-group">
<input type="hidden" name="Id" data-bind="value: Id"/> <input type="hidden" name="Id" data-bind="value: Id"/>
<div class="form-group"> <div class="form-group">
<div class="input-group date" id="datetimepicker1"> <div id="datetimepicker1"></div>
<input type="text" class="form-control" />
<span class="input-group-addon">
<span class="glyphicon glyphicon-calendar"></span>
</span>
</div>
</div> </div>
<br/>
<div> <div>
<div class="input-group"> <div class="input-group col-md-offset-1">
<select data-bind="options: $root.possibleLogDirections, <select class="form-control" data-bind="options: $root.possibleLogDirections,
optionsText: function(item) { return item.Text }, optionsText: function(item) { return item.Text },
optionsValue: function(item){ return item.value }, optionsValue: function(item){ return item.value },
value: Direction, value: Direction,
@ -356,8 +354,10 @@
</div> </div>
</div> </div>
<br/> <br/>
<div class="pull-right">
<button type="submit" class="btn btn-primary">Submit</button> <button type="submit" class="btn btn-primary">Submit</button>
<button type="button" class="btn btn-secondary close" data-dismiss="modal">Cancel</button> <button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button>
</div>
</form> </form>
</div> </div>
</div> </div>

View File

@ -402,6 +402,7 @@
.datetimepicker({ .datetimepicker({
format: "YYYY-DD-MM HH:mm:ss", format: "YYYY-DD-MM HH:mm:ss",
date: new Date(date), date: new Date(date),
inline:true,
sideBySide:true, sideBySide:true,
minDate: moment(date).startOf("week"), minDate: moment(date).startOf("week"),
maxDate: moment(date).endOf("week") maxDate: moment(date).endOf("week")