blob: 09fe7869194178f2fc9b90e4fccfdc2418e0bd34 (
plain) (
tree)
|
|
<input type="hidden" name="locationid" value="{{id}}">
<div id="settings-outer">
<h3>{{lang_openingTime}}</h3>
{{^expertMode}}
<div id="simple-mode">
<div align="right" style="margin-bottom: 10px;">
<a href="#" class="btn btn-default btn-sm" id="btn-show-expert">{{lang_expertMode}}</a>
</div>
<div class="clearfix"></div>
<table class="table table-condensed" 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 type="text" class="form-control timepicker2" id="week-open" pattern="[0-9]{1,2}:[0-9]{2}">
</div>
</td>
<td>
<div class="input-group bootstrap-timepicker">
<span class="input-group-addon">
<span class="glyphicon glyphicon-time"></span>
</span>
<input type="text" class="form-control timepicker2" id="week-close" pattern="[0-9]{1,2}:[0-9]{2}">
</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 type="text" class="form-control timepicker2" id="saturday-open" pattern="[0-9]{1,2}:[0-9]{2}">
</div>
</td>
<td>
<div class="input-group bootstrap-timepicker">
<span class="input-group-addon">
<span class="glyphicon glyphicon-time"></span>
</span>
<input type="text" class="form-control timepicker2" id="saturday-close" pattern="[0-9]{1,2}:[0-9]{2}">
</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 type="text" class="form-control timepicker2" id="sunday-open" pattern="[0-9]{1,2}:[0-9]{2}">
</div>
</td>
<td>
<div class="input-group bootstrap-timepicker">
<span class="input-group-addon">
<span class="glyphicon glyphicon-time"></span>
</span>
<input type="text" class="form-control timepicker2" id="sunday-close" pattern="[0-9]{1,2}:[0-9]{2}">
</div>
</td>
</tr>
</table>
</div>
{{/expertMode}}
<div id="expert-mode" style="{{^expertMode}}display:none{{/expertMode}}">
<div class="clearfix"></div>
<div id="expert-table">
<div class="row">
<div class="col-sm-6">{{lang_openingTime}}</div>
<div class="col-sm-4">{{lang_closingTime}}</div>
<div class="col-sm-2 text-right">{{lang_delete}}</div>
</div>
</div>
<hr>
<div style="text-align: center;">
<a class="btn btn-success btn-sm" id="new-openingtime">
<span class="glyphicon glyphicon-plus-sign"></span>
{{lang_openingTime}}
</a>
</div>
<br>
</div>
</div>
<div class="hidden" id="expert-template">
<div class="row expert-row">
<hr>
<div class="col-xs-12 days-box">
<div class="pull-right checkbox checkbox-inline"><input type="checkbox" class="i-delete"><label><span class="glyphicon glyphicon-trash"></span></label></div>
<div class="checkbox checkbox-inline"><input type="checkbox" class="i-Monday"><label>{{lang_shortMonday}}</label></div>
<div class="checkbox checkbox-inline"><input type="checkbox" class="i-Tuesday"><label>{{lang_shortTuesday}}</label></div>
<div class="checkbox checkbox-inline"><input type="checkbox" class="i-Wednesday"><label>{{lang_shortWednesday}}</label></div>
<div class="checkbox checkbox-inline"><input type="checkbox" class="i-Thursday"><label>{{lang_shortThursday}}</label></div>
<div class="checkbox checkbox-inline"><input type="checkbox" class="i-Friday"><label>{{lang_shortFriday}}</label></div>
<div class="checkbox checkbox-inline"><input type="checkbox" class="i-Saturday"><label>{{lang_shortSaturday}}</label></div>
<div class="checkbox checkbox-inline"><input type="checkbox" class="i-Sunday"><label>{{lang_shortSunday}}</label></div>
</div>
<div class="col-sm-6">
<div class="input-group bootstrap-timepicker">
<span class="input-group-addon"><span class="glyphicon glyphicon-time"></span></span>
<input type="text" class="form-control timepicker2 i-openingtime" pattern="[0-9]{1,2}:[0-9]{2}">
</div>
</div>
<div class="col-sm-6">
<div class="input-group bootstrap-timepicker">
<span class="input-group-addon"><span class="glyphicon glyphicon-time"></span></span>
<input type="text" class="form-control timepicker2 i-closingtime" pattern="[0-9]{1,2}:[0-9]{2}">
</div>
</div>
</div>
</div>
<script type="application/javascript"><!--
(function() {
var scheduleData = {{{schedule_data}}};
{{#expertMode}}
for (var i = 0; i < scheduleData.length; ++i) {
newOpeningTime(scheduleData[i]);
}
{{/expertMode}}
{{^expertMode}}
for (var i = 0; i < scheduleData.length; ++i) {
if (scheduleData[i].days.length === 5) {
$('#week-open').val(scheduleData[i]['openingtime']);
$('#week-close').val(scheduleData[i]['closingtime']);
} else if (scheduleData[i].days.length === 1 && scheduleData[i].days[0] === 'Saturday') {
$('#saturday-open').val(scheduleData[i]['openingtime']);
$('#saturday-close').val(scheduleData[i]['closingtime']);
} else if (scheduleData[i].days.length === 1 && scheduleData[i].days[0] === 'Sunday') {
$('#sunday-open').val(scheduleData[i]['openingtime']);
$('#sunday-close').val(scheduleData[i]['closingtime']);
}
}
{{/expertMode}}
setTimepicker($('#settings-outer').find('.timepicker2'));
$('p.helptext').tooltip();
$('#new-openingtime').click(function (e) {
e.preventDefault();
setTimepicker(newOpeningTime({}).find('.timepicker2'));
});
$('#btn-show-expert').click(function (e) {
e.preventDefault();
scheduleData = simpleToExpert();
for (var i = 0; i < scheduleData.length; ++i) {
setTimepicker(newOpeningTime(scheduleData[i]).find('.timepicker2'));
}
$('#simple-mode').remove();
$('#expert-mode').show();
});
})();
//--></script>
|