#189 Add create event button to calendar header
This commit is contained in:
parent
7639bf3dd7
commit
ce46f3d4a1
@ -89,7 +89,15 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
|||||||
<div class="col-lg-9">
|
<div class="col-lg-9">
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
<h4>Calendar</h4>
|
<h4>
|
||||||
|
Calendar
|
||||||
|
<span class="nu-floatRight panel-button">
|
||||||
|
<button class="btn btn-success" id="create-event-button">
|
||||||
|
<i class="fa fa-plus-circle"></i>
|
||||||
|
New Event
|
||||||
|
</button>
|
||||||
|
</span>
|
||||||
|
</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<div id="calendar"></div>
|
<div id="calendar"></div>
|
||||||
|
@ -142,6 +142,12 @@ $(document).ready(function() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('#create-event-button').click(function() {
|
||||||
|
// Hard-code the view name so the modal treats this as an "all-day" event.
|
||||||
|
var viewName = 'month';
|
||||||
|
displayCreateModal(moment(), viewName);
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
$('#create-form input[name="all-day"]').change(function() {
|
$('#create-form input[name="all-day"]').change(function() {
|
||||||
var hideTimeFields = $(this).is(':checked');
|
var hideTimeFields = $(this).is(':checked');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user