Update code base on changes in master
This commit is contained in:
@@ -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'))
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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())
|
||||
)
|
||||
|
||||
@@ -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())
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user