From 2360a111c83d416319c09f22f9ac057dc50417d7 Mon Sep 17 00:00:00 2001 From: marco Date: Sun, 12 May 2013 12:08:04 -0400 Subject: [PATCH] attempt to trigger js event for mode button press, not breaking yet but nonfunctional --- cms/static/coffee/src/views/module_edit.coffee | 7 ++++++- cms/templates/component.html | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/cms/static/coffee/src/views/module_edit.coffee b/cms/static/coffee/src/views/module_edit.coffee index 8a6db67e3a..83298a215b 100644 --- a/cms/static/coffee/src/views/module_edit.coffee +++ b/cms/static/coffee/src/views/module_edit.coffee @@ -7,7 +7,7 @@ class CMS.Views.ModuleEdit extends Backbone.View "click .component-editor .save-button": 'clickSaveButton' "click .component-actions .edit-button": 'clickEditButton' "click .component-actions .delete-button": 'onDelete' - + "click .mode .not-set": 'clickModeButton' initialize: -> @onDelete = @options.onDelete @@ -83,3 +83,8 @@ class CMS.Views.ModuleEdit extends Backbone.View $modalCover.show().addClass('is-fixed') @$component_editor().slideDown(150) @loadEdit() + + clickModeButton: (event) -> + event.preventDefault() + @$el.removeClass('not-set') + @$el.addClass('is-set') diff --git a/cms/templates/component.html b/cms/templates/component.html index a461f4ce06..5883bd55d5 100644 --- a/cms/templates/component.html +++ b/cms/templates/component.html @@ -11,7 +11,7 @@ Compiler