thekingsimo / jquery-week-calendar

Automatically exported from code.google.com/p/jquery-week-calendar
0 stars 0 forks source link

Allow html code in event title #95

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I needed to be able to use HTML code in event titles, so I added a
following option:

changed _refreshEventDetails function (SVN rev 67) from:

      _refreshEventDetails : function(calEvent, $calEvent) {
         var self = this;
         var options = this.options;
         $calEvent.find(".wc-time").text(self._formatDate(calEvent.start,
options.timeFormat) + options.timeSeparator +
self._formatDate(calEvent.end, options.timeFormat));
         $calEvent.find(".wc-title").text(calEvent.title);
         $calEvent.data("calEvent", calEvent);
      }

to:

      _refreshEventDetails : function(calEvent, $calEvent) {
         var self = this;
         var options = this.options;
         $calEvent.find(".wc-time").text(self._formatDate(calEvent.start,
options.timeFormat) + options.timeSeparator +
self._formatDate(calEvent.end, options.timeFormat));
         if (options.allowHtmlTitle) { 
             $calEvent.find(".wc-title").html(calEvent.title);
         } else {
             $calEvent.find(".wc-title").text(calEvent.title);
         }
         $calEvent.data("calEvent", calEvent);
      }

and added the option to defaults:

         allowHtmlTitle: false, 

So now I can use html in event titles fine.

Original issue reported on code.google.com by doze...@gmail.com on 19 Oct 2009 at 1:47

GoogleCodeExporter commented 8 years ago

Original comment by robmo...@gmail.com on 30 Oct 2009 at 5:40