Commit 2a36fee4 by Prem Sichanugrist

Prevent default click event on links

parent 95cf25c1
......@@ -2,5 +2,6 @@ class CMS.Views.Module extends Backbone.View
events:
"click .module-edit": "edit"
edit: =>
edit: (event) =>
event.preventDefault()
CMS.replaceView(new CMS.Views.ModuleEdit(model: new CMS.Models.Module(id: @$el.data('id'), type: @$el.data('type'))))
......@@ -14,7 +14,8 @@ class CMS.Views.Week extends Backbone.View
new CMS.Views.Module(el: this).render()
return @
edit: =>
edit: (event) =>
event.preventDefault()
CMS.replaceView(new CMS.Views.WeekEdit(model: new CMS.Models.Week(id: @$el.data('id'))))
setHeight: =>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment