Dropdown
by Farzad Cyrus
JavaScript
RegisterNamespace("app");
app = (function ($) {
"use strict";
function init()
{
var self = this;
self.clientDetails.id = $("#client_id").val();
self.clientDetails.role = getRole($("#client_role").val());
self.clientDetails.companyId = $("#client_companyid").val();
self.clientDetails.popId = $("#client_popid").val();
$('#manageAlerts').on('click', function () {
if (app.alert === undefined)
{
$.getScript(app.urls.alertJs).done(function (script, textStatus) {
});
}
});
/* **************************************************
JQUERY PLUGIN FOR HIDING AND SHOWING ELEMENTS WITHOUT INLINE STYLING - NOTE: DO NOT REMOVE THIS AS ADMIN AREA IS BASED ON THIS
************************************************** */
$.fn.hideIt = function () {
this.addClass('is-hidden');
return this;
};
$.fn.showIt = function () {
this.removeClass('is-hidden');
return this;
};
/* **************************************************
DATE TIME PICKER
************************************************** */
if ($.datetimepicker) {
$('.date-time-picker').datetimepicker();
$('.date-picker').datetimepicker({
timepicker: false,
dateFormat: 'dd-mm-yy',
minDate: new Date()
});
$('.time-picker').datetimepicker({
datepicker: false,
allowTimes: ['12:00', '13:00', '15:00', '17:00', '17:05', '17:20', '19:00', '20:00'],
step: 5
});
$('#account-calendar').datetimepicker({
format: 'd.m.Y H:i',
inline: true,
onSelectDate: function () {
toastr.error('Please pick another date from the calendar.', 'Wrong Date');
...