Compare commits
1 Commits
master
...
revert-e1e
Author | SHA1 | Date |
---|---|---|
wmcheng | 17e2c67acd |
|
@ -77,7 +77,7 @@ var Calendar = function(dom,property_id){
|
|||
c.modeBtns.each(function(){
|
||||
if ($(this).data("mode") == view)
|
||||
$(this).addClass("active");
|
||||
});
|
||||
})
|
||||
if(view != "agenda"){
|
||||
if(c.currentView == "agenda"){
|
||||
// $("#sec1").addClass("span3").removeClass("span7");
|
||||
|
@ -97,23 +97,23 @@ var Calendar = function(dom,property_id){
|
|||
c.calendar.fullCalendar("refetchEvents");
|
||||
loadeventsonviewchange = false;
|
||||
}
|
||||
};
|
||||
}
|
||||
if(c.currentView == "agenda"){toggleViews("agenda");loadeventsonviewchange = true;}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
this.renderEvent = function(eventStick){
|
||||
if(eventStick.recurring === true)
|
||||
if(eventStick.recurring == true)
|
||||
c.calendar.fullCalendar("refetchEvents");
|
||||
else
|
||||
c.calendar.fullCalendar("renderEvent",eventStick);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
$(document).ready(function() {
|
||||
c.initialize();
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
var EventDialog = function(calendar,event){
|
||||
_t = this;
|
||||
|
@ -148,12 +148,13 @@ var EventDialog = function(calendar,event){
|
|||
}
|
||||
event_quick_view = $('<div class="calendar-modal" style="display:none;"></div>');
|
||||
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">×</button>' +
|
||||
'<h3>' + _event.title + '</h3>' +
|
||||
'</div>' +
|
||||
'<div class="modal-body">' +
|
||||
'<div class="event_summary">' + time_string + '</br>' + _event.hiring_person_name + '</div>' + _event.note +
|
||||
'<div class="event_summary">' + time_string + '</div>' +
|
||||
_event.note +
|
||||
'</div>' +
|
||||
'<div class="modal-footer" />' +
|
||||
'</div>';
|
||||
|
@ -564,3 +565,33 @@ var AgendaView = function(calendar){
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -69,57 +69,43 @@ class PropertyHiresController < ApplicationController
|
|||
"value" => property.note
|
||||
}
|
||||
end
|
||||
if !property.property_number.blank?
|
||||
data << {
|
||||
"header" => t("property_hire.property_number"),
|
||||
"value" => property.property_number
|
||||
}
|
||||
end
|
||||
data << {
|
||||
"header" => t("property_hire.property_number"),
|
||||
"value" => property.property_number
|
||||
}
|
||||
data << {
|
||||
"header" => t("property_hire.can_be_hired"),
|
||||
"value" => (property.can_be_hired ? "<span class='label label-success'>Yes</span>" : "<span class='label label-danger'>No</span>")
|
||||
}
|
||||
if !property.purchase_date.to_s.blank?
|
||||
data << {
|
||||
"header" => t("property_hire.purchase_date"),
|
||||
"value" => property.purchase_date.strftime("%Y-%m-%d")
|
||||
}
|
||||
end
|
||||
data << {
|
||||
"header" => t("property_hire.purchase_date"),
|
||||
"value" => property.purchase_date.strftime("%Y-%m-%d")
|
||||
}
|
||||
if property.owners.empty?
|
||||
owners = property.other_owner
|
||||
else
|
||||
owners = property.owner_profiles.collect{|mp| mp.name}.join(",")
|
||||
end
|
||||
if !owners.blank?
|
||||
data << {
|
||||
"header" => t("property_hire.owners"),
|
||||
"value" => owners
|
||||
}
|
||||
end
|
||||
if !property.owner_email.blank?
|
||||
data << {
|
||||
"header" => t("property_hire.owner_email"),
|
||||
"value" => property.owner_email
|
||||
}
|
||||
end
|
||||
if !property.owner_phone.blank?
|
||||
data << {
|
||||
"header" => t("property_hire.owner_phone"),
|
||||
"value" => property.owner_phone
|
||||
}
|
||||
end
|
||||
if !property.price.blank?
|
||||
data << {
|
||||
"header" => t("property_hire.price"),
|
||||
"value" => property.price
|
||||
}
|
||||
end
|
||||
if !property.get_location_name.blank?
|
||||
data << {
|
||||
"header" => t("property_hire.location"),
|
||||
"value" => property.get_location_name
|
||||
}
|
||||
end
|
||||
data << {
|
||||
"header" => t("property_hire.owners"),
|
||||
"value" => owners
|
||||
}
|
||||
data << {
|
||||
"header" => t("property_hire.owner_email"),
|
||||
"value" => property.owner_email
|
||||
}
|
||||
data << {
|
||||
"header" => t("property_hire.owner_phone"),
|
||||
"value" => property.owner_phone
|
||||
}
|
||||
data << {
|
||||
"header" => t("property_hire.price"),
|
||||
"value" => property.price
|
||||
}
|
||||
data << {
|
||||
"header" => t("property_hire.location"),
|
||||
"value" => property.get_location_name
|
||||
}
|
||||
actions = []
|
||||
if property.can_be_hired
|
||||
actions << {
|
||||
|
|
|
@ -23,8 +23,6 @@ class PHire
|
|||
{
|
||||
:id => self.id.to_s,
|
||||
:title => self.reason_for_hire,
|
||||
:hiring_person_id => self.hiring_person_id,
|
||||
:hiring_person_name => self.hiring_person_name,
|
||||
:note => self.note_for_hire || "",
|
||||
:start => self.start_time.rfc822,
|
||||
:end => self.end_time.rfc822,
|
||||
|
|
Loading…
Reference in New Issue