moving support ticket response to communication (wip)

This commit is contained in:
Rushabh Mehta
2012-11-24 14:45:31 +05:30
parent 7d665818b5
commit 17db39dc94
4 changed files with 26 additions and 15 deletions

View File

@@ -13,7 +13,7 @@
<button class="btn btn-small" onclick="erpnext.calendar.refresh('Month')">
Month View
</button>
<button class="btn btn-small" onclick="erpnext.calendar.refresh()">
<button class="btn btn-small" onclick="erpnext.calendar.refresh(null, true)">
<i class="icon-refresh"></i> Refresh
</button>
</div>

View File

@@ -241,9 +241,19 @@ Calendar.prototype.set_event = function(ev) {
//------------------------------------------------------
Calendar.prototype.refresh = function(viewtype){//Sets the viewtype of the Calendar and Calls the View class based on the viewtype
Calendar.prototype.clear = function() {
this.events = {};
this.events_by_name = {};
locals.Event = {};
}
Calendar.prototype.refresh = function(viewtype, clear_events){//Sets the viewtype of the Calendar and Calls the View class based on the viewtype
if(viewtype)
this.viewtype = viewtype;
if(clear_events)
this.clear();
// switch view if reqd
if(this.cur_view.viewtype!=this.viewtype) {
this.cur_view.hide();
@@ -252,6 +262,7 @@ Calendar.prototype.refresh = function(viewtype){//Sets the viewtype of the Calen
this.cur_view.show();
}
else{
this.cur_view.get_events();
this.cur_view.refresh(this);
}
}