Update code base on changes in master

This commit is contained in:
Prem Sichanugrist
2012-07-05 14:44:01 -04:00
parent b533ab481a
commit a9aa5d9ea0
5 changed files with 10 additions and 10 deletions

View File

@@ -1,6 +1,6 @@
class CMS.Views.Week extends Backbone.View
events:
'click .module-edit': 'edit'
'click .week-edit': 'edit'
initialize: ->
@model = new CMS.Models.Week(id: @$el.data('id'))

View File

@@ -38,7 +38,7 @@
% for week in weeks:
<li class="week" data-id="${week.location.url()}">
<header>
<h1><a href="#" class="module-edit">${week.name}</a></h1>
<h1><a href="#" class="week-edit">${week.name}</a></h1>
<ul>
% if 'goals' in week.metadata:
% for goal in week.metadata['goals']:
@@ -52,7 +52,7 @@
<ul class="modules">
% for module in week.get_children():
<li class="module" data-id="${module.location.url()}" data-type="${module.category}">
<li class="module" data-id="${module.location.url()}" data-type="${module.js_module_name()}">
<a href="#" class="module-edit">${module.name}</a>
<a href="#" class="draggable">handle</a>
</li>

View File

@@ -37,7 +37,7 @@
<ol>
% for child in module.get_children():
<li>
<a href="#" class="module-edit" data-id="${child.location.url()}" data-type="${child.type}">${child.name}</a>
<a href="#" class="module-edit" data-id="${child.location.url()}" data-type="${child.js_module_name()}">${child.name}</a>
<a href="#" class="draggable">handle</a>
</li>
%endfor

View File

@@ -1,7 +1,7 @@
class @HTML
constructor: (@id) ->
@edit_box = $("##{@id} .edit-box")
@preview = $("##{@id} .preview")
constructor: (@element) ->
@edit_box = $(".edit-box", @element)
@preview = $(".preview", @element)
@edit_box.on('input', =>
@preview.empty().append(@edit_box.val())
)

View File

@@ -1,7 +1,7 @@
class @Raw
constructor: (@id) ->
@edit_box = $("##{@id} .edit-box")
@preview = $("##{@id} .preview")
constructor: (@element) ->
@edit_box = $(".edit-box", @element)
@preview = $(".preview", @element)
@edit_box.on('input', =>
@preview.empty().text(@edit_box.val())
)