summaryrefslogtreecommitdiffstats
path: root/modules-available/locationinfo/templates
diff options
context:
space:
mode:
Diffstat (limited to 'modules-available/locationinfo/templates')
-rw-r--r--modules-available/locationinfo/templates/config.html13
-rw-r--r--modules-available/locationinfo/templates/location-info.html5
-rw-r--r--modules-available/locationinfo/templates/pcsubtable.html2
-rw-r--r--modules-available/locationinfo/templates/timetable.html264
4 files changed, 217 insertions, 67 deletions
diff --git a/modules-available/locationinfo/templates/config.html b/modules-available/locationinfo/templates/config.html
index 6df69cdc..06240e66 100644
--- a/modules-available/locationinfo/templates/config.html
+++ b/modules-available/locationinfo/templates/config.html
@@ -29,7 +29,7 @@
<div style="float: left; margin-left: 15px;">
<Label data-toggle="tooltip" title="{{lang_daysToShowTooltip}}">{{lang_daysToShow}}</Label><br>
<select name="daystoshow">
- <option value="1" id="day1">1</opton>
+ <option value="1" id="day1">1</option>
<option value="2" id="day2">2</option>
<option value="3" id="day3">3</option>
<option value="4" id="day4">4</option>
@@ -134,19 +134,20 @@ function loadValues() {
}
function showScaleValue(newValue) {
- $("#scale").text(newValue + " %");
+ $("#scale").text(newValue + " %");
}
function showSwitchValue(newValue) {
- $("#switch").text(newValue + " " + '{{lang_sec}}');
+ $("#switch").text(newValue + " " + '{{lang_sec}}');
}
function vertical_cb(value) {
+ var cb = $("#cb_vertical");
if (value == 1) {
- $("#cb_vertical").prop("disabled", false);
+ cb.prop("disabled", false);
} else {
- $("#cb_vertical").prop("disabled", true);
- $("#cb_vertical").prop("checked", false);
+ cb.prop("disabled", true);
+ cb.prop("checked", false);
}
}
</script>
diff --git a/modules-available/locationinfo/templates/location-info.html b/modules-available/locationinfo/templates/location-info.html
index 91a274be..69665d01 100644
--- a/modules-available/locationinfo/templates/location-info.html
+++ b/modules-available/locationinfo/templates/location-info.html
@@ -1,7 +1,7 @@
<div>
<h1>{{lang_mainHeader}}</h1>
-<table class="table table-condensed locations" style="margin-bottom:0px">
+<table class="table table-condensed locations" style="margin-bottom:0">
<tr>
<th>{{lang_locationName}}</th>
@@ -15,7 +15,7 @@
{{#list}}
<tr id="row{{locationid}}" class="tablerow" onclick="{{#hasPcs}}slxOpenLocationInfo(this, {{locationid}}){{/hasPcs}}">
- <td><div style="display:inline-block;width:{{depth}}em"></div>{{#hasPcs}}<a>{{/hasPcs}}{{locationname}}</td>
+ <td><div style="display:inline-block;width:{{depth}}em"></div>{{#hasPcs}}<a>{{/hasPcs}}{{locationname}}{{#hasPcs}}</a>{{/hasPcs}}</td>
<td align="center">[{{locationid}}]</td>
<td align="center">{{#hasPcs}}{{inUse}} / {{total}}{{/hasPcs}}</td>
@@ -110,3 +110,4 @@ function loadConfigModal(locationId, locationName) {
}
</script>
+</div>
diff --git a/modules-available/locationinfo/templates/pcsubtable.html b/modules-available/locationinfo/templates/pcsubtable.html
index 1a7ea81e..22eea6f1 100644
--- a/modules-available/locationinfo/templates/pcsubtable.html
+++ b/modules-available/locationinfo/templates/pcsubtable.html
@@ -1,6 +1,6 @@
<div>
<br>
-<table style="margin-bottom:0px">
+<table style="margin-bottom:0">
<tr>
<th width=320>{{lang_pcID}}</th>
<th width=120>{{lang_pcIP}}</th>
diff --git a/modules-available/locationinfo/templates/timetable.html b/modules-available/locationinfo/templates/timetable.html
index 2484ddc8..05ef7c65 100644
--- a/modules-available/locationinfo/templates/timetable.html
+++ b/modules-available/locationinfo/templates/timetable.html
@@ -1,64 +1,212 @@
<div>
- <form method="post" action="?do=locationinfo" id="timeForm">
- <input type="hidden" name="token" value="{{token}}">
- <input type="hidden" name="action" value="updateOpeningTime">
- <input type="hidden" name="id" value="{{id}}">
-
- <table class="table table-condensed locations" style="margin-bottom:0px">
- <tr>
- <th>{{lang_day}}</th>
- <th>{{lang_openingTime}}</th>
- <th>{{lang_closingTime}}</th>
- <th>{{lang_delete}}</th>
- </tr>
-
- {{#openingtimes}}
- <tr class=tablerow>
- <td>{{days}}</td>
- <td>{{openingtime}}</td>
- <td>{{closingtime}}</td>
- <td align="center"><input type="checkbox" name="delete[]" value="{{index}}"</td>
- <!--<td><button class="btn btn-sm btn-danger">X</button></td>-->
- </tr>
- {{/openingtimes}}
-
- <tr id="lastOpenTimesTableElement"></tr>
- </table>
-
- <br>
- <a class="btn btn-success btn-sm" onclick=newOpeningTime()><span class="glyphicon glyphicon-plus-sign"></span> {{lang_openingTime}}</a>
- <!--<a class="btn btn-danger btn-sm" onclick=>{{lang_deleteAll}}</a>-->
- <br>
- <br>
- <button type="submit" class="btn btn-primary">{{lang_save}}</button>
-
- </form>
+
+<div align="right">
+ <label for="CB_1">{{lang_expertMode}}</label>
+ <input class="bs-switch" name="1" id="CB_1" type="checkbox" {{#expertMode}}checked="checked"{{/expertMode}}>
+</div>
+<br>
+
+ <div id="easyMode" style="{{#expertMode}}display: none;{{/expertMode}}">
+ <form method="post" action="?do=locationinfo" id="timeForm">
+ <input type="hidden" name="token" value="{{token}}">
+ <input type="hidden" name="action" value="updateOpeningTimeEasy">
+ <input type="hidden" name="id" value="{{id}}">
+ <input type="hidden" name="easyMode" value="{{easyMode}}">
+
+ <table class="table table-condensed locations" style="margin-bottom:0">
+ <tr>
+ <th>{{lang_day}}</th>
+ <th>{{lang_openingTime}}</th>
+ <th>{{lang_closingTime}}</th>
+ </tr>
+
+ <tr class=tablerow>
+ <td>{{lang_monTilFr}}</td>
+ <td>
+ <div class="input-group bootstrap-timepicker">
+ <span class="input-group-addon">
+ <span class="glyphicon glyphicon-time"></span>
+ </span>
+ <input required type="text" class="form-control timepicker2" name="openingtime[]" id="openingtimepicker" pattern="[0-9]{1,2}:[0-9]{2}" value="{{openingtime0}}">
+ </div>
+ </td>
+ <td>
+ <div class="input-group bootstrap-timepicker">
+ <span class="input-group-addon">
+ <span class="glyphicon glyphicon-time"></span>
+ </span>
+ <input required type="text" class="form-control timepicker2" name="closingtime[]" id="openingtimepicker" pattern="[0-9]{1,2}:[0-9]{2}" value="{{closingtime0}}">
+ </div>
+ </td>
+ </tr>
+ <tr class=tablerow>
+ <td>{{lang_saturday}}</td>
+ <td>
+ <div class="input-group bootstrap-timepicker">
+ <span class="input-group-addon">
+ <span class="glyphicon glyphicon-time"></span>
+ </span>
+ <input required type="text" class="form-control timepicker2" name="openingtime[]" id="openingtimepicker" pattern="[0-9]{1,2}:[0-9]{2}" value="{{openingtime1}}">
+ </div>
+ </td>
+ <td>
+ <div class="input-group bootstrap-timepicker">
+ <span class="input-group-addon">
+ <span class="glyphicon glyphicon-time"></span>
+ </span>
+ <input required type="text" class="form-control timepicker2" name="closingtime[]" id="openingtimepicker" pattern="[0-9]{1,2}:[0-9]{2}" value="{{closingtime1}}">
+ </div>
+ </td>
+ </tr>
+ <tr class=tablerow>
+ <td>{{lang_sunday}}</td>
+ <td>
+ <div class="input-group bootstrap-timepicker">
+ <span class="input-group-addon">
+ <span class="glyphicon glyphicon-time"></span>
+ </span>
+ <input required type="text" class="form-control timepicker2" name="openingtime[]" id="openingtimepicker" pattern="[0-9]{1,2}:[0-9]{2}" value="{{openingtime2}}">
+ </div>
+ </td>
+ <td>
+ <div class="input-group bootstrap-timepicker">
+ <span class="input-group-addon">
+ <span class="glyphicon glyphicon-time"></span>
+ </span>
+ <input required type="text" class="form-control timepicker2" name="closingtime[]" id="openingtimepicker" pattern="[0-9]{1,2}:[0-9]{2}" value="{{closingtime2}}">
+ </div>
+ </td>
+ </tr>
+ </table>
+
+ <br>
+ <br>
+ <br>
+ <button type="submit" class="btn btn-primary">{{lang_save}}</button>
+ <br>
+ </form>
+ </div>
+
+ <div id="expertMode" style="{{#easyMode}}display: none;{{/easyMode}}">
+ <form method="post" action="?do=locationinfo" id="timeForm">
+ <input type="hidden" name="token" value="{{token}}">
+ <input type="hidden" name="action" value="updateOpeningTimeExpert">
+ <input type="hidden" name="id" value="{{id}}">
+ <input type="hidden" name="easyMode" value="{{easyMode}}">
+
+
+ <table class="table table-condensed locations" style="margin-bottom:0">
+ <tr>
+ <th>{{lang_day}}</th>
+ <th>{{lang_openingTime}}</th>
+ <th>{{lang_closingTime}}</th>
+ <th>{{lang_delete}}</th>
+ </tr>
+
+ {{#openingtimes}}
+ <tr class=tablerow>
+ <td>{{days}}</td>
+ <td>{{openingtime}}</td>
+ <td>{{closingtime}}</td>
+ <td align="center"><input type="checkbox" name="delete[]" value="{{index}}"></td>
+ <!--<td><button class="btn btn-sm btn-danger">X</button></td>-->
+ </tr>
+ {{/openingtimes}}
+
+ <tr id="lastOpenTimesTableElement"></tr>
+ </table>
+
+ <br>
+ <a class="btn btn-success btn-sm" onclick=newOpeningTime()><span class="glyphicon glyphicon-plus-sign"></span> {{lang_openingTime}}</a>
+ <!--<a class="btn btn-danger btn-sm" onclick=>{{lang_deleteAll}}</a>-->
+ <br>
+ <br>
+ <button type="submit" class="btn btn-primary">{{lang_save}}</button>
+ <br>
+ </form>
+ </div>
</div>
<script>
-function newOpeningTime() {
- $('#lastOpenTimesTableElement').before('<tr>\
- <td>\
- <label><input type="checkbox" name="days[]" value="Monday">{{lang_shortMonday}}</label>\
- <label><input type="checkbox" name="days[]" value="Tuesday">{{lang_shortTuesday}}</label>\
- <label><input type="checkbox" name="days[]" value="Wednesday">{{lang_shortWednesday}}</label>\
- <label><input type="checkbox" name="days[]" value="Thursday">{{lang_shortThursday}}</label>\
- <label><input type="checkbox" name="days[]" value="Friday">{{lang_shortFriday}}</label>\
- <label><input type="checkbox" name="days[]" value="Saturday">{{lang_shortSaturday}}</label>\
- <label><input type="checkbox" name="days[]" value="Sunday">{{lang_shortSunday}}</label>\
- <input type="hidden" name="days[]" value="-">\
- </td>\
- <td>\
- <input type="time" name="openingtime[]">\
- </td>\
- <td>\
- <input type="time" name="closingtime[]">\
- </td>\
- <td align="center">\
- <input type="checkbox" name="dontadd[]" value="dontadd"\
- </td>\
- </tr>');
-}
-// <!--<button type="submit" class="btn btn-success btn-sm" onclick=>✓</button>-->\
+setTimepicker();
+$('#CB_1').bootstrapSwitch();
+$('#CB_1').on('switchChange.bootstrapSwitch', function (e, data) {
+
+ if (data == false) {
+ $('#expertMode').hide();
+ $('#easyMode').show();
+ } else {
+ $('#easyMode').hide();
+ $('#expertMode').show();
+ }
+});
+
+ function setTimepicker() {
+ $('.timepicker2').timepicker({
+ minuteStep: 1,
+ template: 'modal',
+ appendWidgetTo: 'body',
+ showSeconds: false,
+ showMeridian: false,
+ defaultTime: false
+ });
+ };
+
+ function newOpeningTime() {
+ $('#lastOpenTimesTableElement').before('<tr>\
+ <td>\
+ <div class="form-group options">\
+ <label><input required type="checkbox" name="days[]" value="Monday">{{lang_shortMonday}}</label>\
+ <label><input required type="checkbox" name="days[]" value="Tuesday">{{lang_shortTuesday}}</label>\
+ <label><input required type="checkbox" name="days[]" value="Wednesday">{{lang_shortWednesday}}</label>\
+ <label><input required type="checkbox" name="days[]" value="Thursday">{{lang_shortThursday}}</label>\
+ <label><input required type="checkbox" name="days[]" value="Friday">{{lang_shortFriday}}</label>\
+ <label><input required type="checkbox" name="days[]" value="Saturday">{{lang_shortSaturday}}</label>\
+ <label><input required type="checkbox" name="days[]" value="Sunday">{{lang_shortSunday}}</label>\
+ </div>\
+ <input type="hidden" name="days[]" value="-">\
+ </td>\
+ <td>\
+ \
+ <div class="input-group bootstrap-timepicker">\
+ <span class="input-group-addon">\
+ <span class="glyphicon glyphicon-time"></span>\
+ </span>\
+ <input required type="text" class="form-control timepicker2" name="openingtime[]" id="openingtimepicker" pattern="[0-9]{1,2}:[0-9]{2}" value="8:00">\
+ </div>\
+ \
+ </td>\
+ <td>\
+ \
+ <div class="input-group bootstrap-timepicker">\
+ <span class="input-group-addon">\
+ <span class="glyphicon glyphicon-time"></span>\
+ </span>\
+ <input required type="text" class="form-control timepicker2" name="closingtime[]" id="closingtimepicker" pattern="[0-9]{1,2}:[0-9]{2}" value="18:00">\
+ </div>\
+ \
+ </td>\
+ <td align="center">\
+ <input type="checkbox" name="dontadd[]" value="dontadd"\
+ </td>\
+ </tr>');
+ setTimepicker();
+
+ $(function(){
+ var requiredCheckboxes = $('.options :checkbox[required]');
+ requiredCheckboxes.change(function(){
+ if(requiredCheckboxes.is(':checked')) {
+ requiredCheckboxes.removeAttr('required');
+ } else {
+ requiredCheckboxes.attr('required', 'required');
+ }
+ });
+ });
+ };
+ // <!--<button type="submit" class="btn btn-success btn-sm" onclick=>✓</button>-->\
+ // <input type="time" name="openingtime[]">\
+ // <input type="time" name="closingtime[]">\
+
+
</script>