Merge branch 'master' into 'master'

Update property_hire_calendar_frontend.js



See merge request !3
This commit is contained in:
wmcheng 2019-11-09 23:48:17 +08:00
commit 0bd0a61986
1 changed files with 9 additions and 40 deletions

View File

@ -77,7 +77,7 @@ var Calendar = function(dom,property_id){
c.modeBtns.each(function(){ c.modeBtns.each(function(){
if ($(this).data("mode") == view) if ($(this).data("mode") == view)
$(this).addClass("active"); $(this).addClass("active");
}) });
if(view != "agenda"){ if(view != "agenda"){
if(c.currentView == "agenda"){ if(c.currentView == "agenda"){
// $("#sec1").addClass("span3").removeClass("span7"); // $("#sec1").addClass("span3").removeClass("span7");
@ -97,23 +97,23 @@ var Calendar = function(dom,property_id){
c.calendar.fullCalendar("refetchEvents"); c.calendar.fullCalendar("refetchEvents");
loadeventsonviewchange = false; loadeventsonviewchange = false;
} }
} };
if(c.currentView == "agenda"){toggleViews("agenda");loadeventsonviewchange = true;} if(c.currentView == "agenda"){toggleViews("agenda");loadeventsonviewchange = true;}
} };
this.renderEvent = function(eventStick){ this.renderEvent = function(eventStick){
if(eventStick.recurring == true) if(eventStick.recurring === true)
c.calendar.fullCalendar("refetchEvents"); c.calendar.fullCalendar("refetchEvents");
else else
c.calendar.fullCalendar("renderEvent",eventStick); c.calendar.fullCalendar("renderEvent",eventStick);
} };
$(document).ready(function() { $(document).ready(function() {
c.initialize(); c.initialize();
}); });
} };
var EventDialog = function(calendar,event){ var EventDialog = function(calendar,event){
_t = this; _t = this;
@ -148,13 +148,12 @@ var EventDialog = function(calendar,event){
} }
event_quick_view = $('<div class="calendar-modal" style="display:none;"></div>'); event_quick_view = $('<div class="calendar-modal" style="display:none;"></div>');
template = '<div class="modal-content">' + template = '<div class="modal-content">' +
'<div class="modal-header">' + '<div class="modal-header">' +
'<button type="button" class="close event-close-btn" data-dismiss="modal" aria-hidden="true">&times;</button>' + '<button type="button" class="close event-close-btn" data-dismiss="modal" aria-hidden="true">&times;</button>' +
'<h3>' + _event.title + '</h3>' + '<h3>' + _event.title + '</h3>' +
'</div>' + '</div>' +
'<div class="modal-body">' + '<div class="modal-body">' +
'<div class="event_summary">' + time_string + '<br>' + _event.hiring_person_name + '</div>' '<div class="event_summary">' + time_string + '</br>' + _event.hiring_person_name + '</div>' + _event.note +
_event.note +
'</div>' + '</div>' +
'<div class="modal-footer" />' + '<div class="modal-footer" />' +
'</div>'; '</div>';
@ -565,33 +564,3 @@ var AgendaView = function(calendar){
} }
} }