Skip to content

Commit a895729

Browse files
committed
Fix timepicker in scenario edit view + update README
1 parent 33230c7 commit a895729

File tree

6 files changed

+25
-9
lines changed

6 files changed

+25
-9
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,9 @@ When creating a new grow, all you have to do is to configure its attributes, cho
335335
![grows](md/grows.png)
336336
*List of grows*
337337

338+
![grows](md/grow.png)
339+
*Grow view*
340+
338341
#### Subjects
339342

340343
Here, a subject is a living being, generally a plant, that is part of a grow, and placed into a room.
@@ -347,6 +350,20 @@ Each subject is identified by a a QR code that you can print (grouped by grow) a
347350

348351
*NB: With the iOS app coming, you can scan the subject QR code to directly post an observation on this scanned subject.*
349352

353+
### Calendar
354+
355+
As for individual grow, MagicBox provides a general calendar view that regroups all active grows, as well as todos, issues and observations.
356+
357+
![grows](md/calendar.png)
358+
*Calendar view*
359+
360+
### Statistics
361+
362+
MagicBox provides a set of statistics about sensors data, system usage, OpenWeather if configured and harvest progress.
363+
364+
![grows](md/stats.png)
365+
* Statistics view*
366+
350367
### Users managment
351368

352369
For now users managment is very minimal with two different roles:

app/assets/javascripts/application.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,16 @@ function init_views() {
4444

4545
$('#roomsSubmenu').collapse('show');
4646

47-
4847
$('.timepicker').datetimepicker({format: 'HH:mm', stepping: "5"});
4948
$('.weekpicker').datetimepicker({format: 'YYYY-MM-DD', inline: true, sideBySide: true});
5049
$('#datetimepicker-todo-date').datetimepicker({format: 'YYYY-MM-DD HH:mm', inline: true, sideBySide: true});
5150

52-
$(document).on('mouseup touchend', function (e) {
53-
var container = $('.bootstrap-datetimepicker-widget');
54-
if (!container.is(e.target) && container.has(e.target).length === 0) {
55-
container.parent().datetimepicker('hide');
56-
}
57-
});
51+
// $(document).on('mouseup touchend', function (e) {
52+
// var container = $('.bootstrap-datetimepicker-widget');
53+
// if (!container.is(e.target) && container.has(e.target).length === 0) {
54+
// container.parent().datetimepicker('hide');
55+
// }
56+
// });
5857

5958
$('input[type=checkbox][data-toggle^=toggle]').bootstrapToggle();
6059

app/views/admin/scenarios/_condition_fields.html.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66

77
<div class="condition_form condition_type_date">
88
<span>Between:&nbsp;</span>
9-
<%= f.text_field :start_time, value: ftime(f.object.start_time), placeholder: "8:00 am", class: "form-control mr-2 timepicker", id: "timepicker-#{f.object.id}-start_time", data: { toggle: "datetimepicker", target: "#timepicker-#{f.object.id}-start_time" } %>
9+
<%= f.text_field :start_time, value: ftime(f.object.start_time), placeholder: "8:00 am", class: "datetimepicker-input form-control mr-2 timepicker", id: "timepicker-#{f.object.id}-start_time", data: { toggle: "datetimepicker", target: "#timepicker-#{f.object.id}-start_time" } %>
1010

1111
<span>And:&nbsp;</span>
12-
<%= f.text_field :end_time, value: ftime(f.object.end_time), placeholder: "8:00 pm", class: "form-control mr-2 timepicker", id: "timepicker-#{f.object.id}-end_time", data: { toggle: "datetimepicker", target: "#timepicker-#{f.object.id}-end_time" } %>
12+
<%= f.text_field :end_time, value: ftime(f.object.end_time), placeholder: "8:00 pm", class: "datetimepicker-input form-control mr-2 timepicker", id: "timepicker-#{f.object.id}-end_time", data: { toggle: "datetimepicker", target: "#timepicker-#{f.object.id}-end_time" } %>
1313
</div>
1414

1515
<div class="condition_form condition_type_time_duration">

md/calendar.png

152 KB
Loading

md/grow.png

240 KB
Loading

md/stats.png

129 KB
Loading

0 commit comments

Comments
 (0)