Browse Source

Add clockpicker dependency for times

tags/2.6.0
Mike Koch 3 years ago
parent
commit
6cbe3564a1

+ 69
- 0
admin/calendar.php View File

@@ -29,6 +29,7 @@
*******************************************************************************/

define('IN_SCRIPT', 1);
define('VALIDATOR', 1);
define('HESK_PATH', '../');
define('PAGE_TITLE', 'ADMIN_TOOLS');

@@ -67,6 +68,74 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
</div>
</div>
</div>
<div class="modal fade" id="create-event-modal" tabindex="-1" role="dialog" style="overflow: hidden">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header" style="cursor: move">
<button type="button" class="close cancel-callback" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="myModalLabel">Create Event</h4>
</div>
<form class="form-horizontal" data-toggle="validator">
<div class="modal-body">
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label for="name" class="col-sm-3 control-label">Title</label>
<div class="col-sm-9">
<input type="text" name="name" class="form-control" placeholder="Title"
data-error="<?php echo htmlspecialchars($hesklang['this_field_is_required']); ?>"
required>
<div class="help-block with-errors"></div>
</div>
</div>
<div class="form-group">
<label for="location" class="col-sm-3 control-label">Location</label>
<div class="col-sm-9">
<input type="text" name="location" class="form-control" placeholder="Location"
data-error="<?php echo htmlspecialchars($hesklang['this_field_is_required']); ?>"
required>
<div class="help-block with-errors"></div>
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="start-date" class="col-sm-3 control-label">Start</label>
<div class="col-sm-9">
<input type="text" name="start-date" class="form-control datepicker" placeholder="Start Date">
<input type="text" name="start-time" class="form-control clockpicker" placeholder="Start Time" value="13:15" data-placement="left" data-align="top" data-autoclose="true">
</div>
</div>
<div class="form-group">
<label for="end-date" class="col-sm-3 control-label">End</label>
<div class="col-sm-9">
<input type="text" name="end-date" class="form-control datepicker" placeholder="End Date">
<input type="time" name="end-time" class="form-control" placeholder="End Time">
</div>
</div>
</div>
</div>

<!--<div class="form-group">
<label for=""
</div>-->
</div>
<div class="modal-footer">
<div class="btn-group">
<button type="button" class="btn btn-default cancel-callback" data-dismiss="modal">
<i class="fa fa-times-circle"></i>
<span>Cancel</span>
</button>
<button type="submit" class="btn btn-success callback-btn">
<i class="fa fa-check-circle"></i>
<span>Save</span>
</button>
</div>
</div>
</form>
</div>
</div>
</div>

<?php


+ 5
- 0
css/bootstrap-clockpicker.min.css View File

@@ -0,0 +1,5 @@
/*!
* ClockPicker v0.0.7 for Bootstrap (http://weareoutman.github.io/clockpicker/)
* Copyright 2014 Wang Shenwei.
* Licensed under MIT (https://github.com/weareoutman/clockpicker/blob/gh-pages/LICENSE)
*/.clockpicker .input-group-addon{cursor:pointer}.clockpicker-moving{cursor:move}.clockpicker-align-left.popover>.arrow{left:25px}.clockpicker-align-top.popover>.arrow{top:17px}.clockpicker-align-right.popover>.arrow{left:auto;right:25px}.clockpicker-align-bottom.popover>.arrow{top:auto;bottom:6px}.clockpicker-popover .popover-title{background-color:#fff;color:#999;font-size:24px;font-weight:700;line-height:30px;text-align:center}.clockpicker-popover .popover-title span{cursor:pointer}.clockpicker-popover .popover-content{background-color:#f8f8f8;padding:12px}.popover-content:last-child{border-bottom-left-radius:5px;border-bottom-right-radius:5px}.clockpicker-plate{background-color:#fff;border:1px solid #ccc;border-radius:50%;width:200px;height:200px;overflow:visible;position:relative;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.clockpicker-canvas,.clockpicker-dial{width:200px;height:200px;position:absolute;left:-1px;top:-1px}.clockpicker-minutes{visibility:hidden}.clockpicker-tick{border-radius:50%;color:#666;line-height:26px;text-align:center;width:26px;height:26px;position:absolute;cursor:pointer}.clockpicker-tick.active,.clockpicker-tick:hover{background-color:#c0e5f7;background-color:rgba(0,149,221,.25)}.clockpicker-button{background-image:none;background-color:#fff;border-width:1px 0 0;border-top-left-radius:0;border-top-right-radius:0;margin:0;padding:10px 0}.clockpicker-button:hover{background-image:none;background-color:#ebebeb}.clockpicker-button:focus{outline:0!important}.clockpicker-dial{-webkit-transition:-webkit-transform 350ms,opacity 350ms;-moz-transition:-moz-transform 350ms,opacity 350ms;-ms-transition:-ms-transform 350ms,opacity 350ms;-o-transition:-o-transform 350ms,opacity 350ms;transition:transform 350ms,opacity 350ms}.clockpicker-dial-out{opacity:0}.clockpicker-hours.clockpicker-dial-out{-webkit-transform:scale(1.2,1.2);-moz-transform:scale(1.2,1.2);-ms-transform:scale(1.2,1.2);-o-transform:scale(1.2,1.2);transform:scale(1.2,1.2)}.clockpicker-minutes.clockpicker-dial-out{-webkit-transform:scale(.8,.8);-moz-transform:scale(.8,.8);-ms-transform:scale(.8,.8);-o-transform:scale(.8,.8);transform:scale(.8,.8)}.clockpicker-canvas{-webkit-transition:opacity 175ms;-moz-transition:opacity 175ms;-ms-transition:opacity 175ms;-o-transition:opacity 175ms;transition:opacity 175ms}.clockpicker-canvas-out{opacity:.25}.clockpicker-canvas-bearing,.clockpicker-canvas-fg{stroke:none;fill:#0095dd}.clockpicker-canvas-bg{stroke:none;fill:#c0e5f7}.clockpicker-canvas-bg-trans{fill:rgba(0,149,221,.25)}.clockpicker-canvas line{stroke:#0095dd;stroke-width:1;stroke-linecap:round}.clockpicker-button.am-button{margin:1px;padding:5px;border:1px solid rgba(0,0,0,.2);border-radius:4px}.clockpicker-button.pm-button{margin:1px 1px 1px 136px;padding:5px;border:1px solid rgba(0,0,0,.2);border-radius:4px}

+ 2
- 0
inc/headerAdmin.inc.php View File

@@ -78,6 +78,7 @@ $modsForHesk_settings = mfh_getSettings();
<link rel="stylesheet" href="<?php echo HESK_PATH; ?>css/dropzone.min.css">
<link rel="stylesheet" href="<?php echo HESK_PATH; ?>css/dropzone-basic.min.css">
<link rel="stylesheet" href="<?php echo HESK_PATH; ?>css/fullcalendar.min.css">
<link rel="stylesheet" href="<?php echo HESK_PATH; ?>css/bootstrap-clockpicker.min.css">
<script src="<?php echo HESK_PATH; ?>js/jquery-1.10.2.min.js"></script>
<script language="Javascript" type="text/javascript" src="<?php echo HESK_PATH; ?>hesk_javascript.js"></script>
<script language="Javascript" type="text/javascript" src="<?php echo HESK_PATH; ?>js/bootstrap.min.js"></script>
@@ -86,6 +87,7 @@ $modsForHesk_settings = mfh_getSettings();
src="<?php echo HESK_PATH; ?>js/modsForHesk-javascript.js"></script>
<script language="JavaScript" type="text/javascript"
src="<?php echo HESK_PATH; ?>js/bootstrap-datepicker.js"></script>
<script type="text/javascript" src="<?php echo HESK_PATH; ?>js/bootstrap-clockpicker.min.js"></script>
<script type="text/javascript" src="<?php echo HESK_PATH; ?>js/iconset-fontawesome-4.3.0.js"></script>
<script type="text/javascript" src="<?php echo HESK_PATH; ?>js/iconset-octicon-2.1.2.js"></script>
<script type="text/javascript" src="<?php echo HESK_PATH; ?>js/bootstrap-iconpicker.js"></script>

+ 6
- 0
js/bootstrap-clockpicker.min.js
File diff suppressed because it is too large
View File


+ 12
- 1
js/calendar/mods-for-hesk-calendar.js View File

@@ -21,6 +21,17 @@ $(document).ready(function() {
console.error(data);
}
});
},
dayClick: function(date, jsEvent, view) {
displayCreateModal(date);
$('#create-event-modal').modal('show');
console.log(date);
console.info(jsEvent);
console.warn(view);
}
});
});
});

function displayCreateModal(date) {
$('#create-event-modal')
}

+ 5
- 1
js/modsForHesk-javascript.js View File

@@ -28,7 +28,7 @@ var loadJquery = function()
html: 'true'
});

//-- Activate jQuery's date picker
//-- Activate Bootstrap Datepicker
$(function() {
$('.datepicker').datepicker({
todayBtn: "linked",
@@ -46,6 +46,10 @@ var loadJquery = function()
searchText: $('#search-icon').text(),
labelFooter: $('#footer-icon').text()
});

$('.clockpicker').clockpicker({
doneText: 'Done'
});
};

var setIcon = function(icon) {

Loading…
Cancel
Save