From 586c6f3cbe5a6664576113331407b0193dc84fc3 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Tue, 7 Aug 2012 16:36:40 +0530 Subject: [PATCH] calendar: links to ref document --- erpnext/utilities/page/calendar/calendar.js | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/erpnext/utilities/page/calendar/calendar.js b/erpnext/utilities/page/calendar/calendar.js index 9aa5df87dc..3d3519b402 100644 --- a/erpnext/utilities/page/calendar/calendar.js +++ b/erpnext/utilities/page/calendar/calendar.js @@ -83,6 +83,7 @@ Calendar.prototype.show_event = function(ev, cal_ev) { d.make_body([ ['HTML','Heading'] ,['Text','Description'] + ,['HTML', 'Ref Link'] ,['Check', 'Public Event'] ,['Check', 'Cancel Event'] ,['HTML', 'Event Link'] @@ -111,12 +112,17 @@ Calendar.prototype.show_event = function(ev, cal_ev) { this.widgets['Public Event'].checked = true; this.widgets['Event Link'].innerHTML = ''; + this.widgets['Ref Link'].innerHTML = ''; - // link - var div = $a(this.widgets['Event Link'], 'div', 'link_type', {margin:'4px 0px'}); - div.onclick = function() { me.event_dialog.hide(); loaddoc('Event', me.event_dialog.ev.name); } - div.innerHTML = 'View Event details, add or edit participants'; - + if(this.ev.ref_type) { + $(repl('Reference: %(ref_type)s: %(ref_name)s', this.ev)) + .appendTo(this.widgets['Ref Link']) + } + + $(repl('More Options', this.ev)) + .appendTo(this.widgets['Event Link']) } // event save