Move display logic into view

Model shouldn't know about things like close buttons, visibility, and so on
This commit is contained in:
David Baumgold
2013-05-14 16:37:02 -04:00
parent 528987342a
commit 4af3325976
14 changed files with 204 additions and 125 deletions

View File

@@ -32,8 +32,14 @@
<%include file="courseware_vendor_js.html"/>
## js templates
<script id="system-feedback-tpl" type="text/template">
<%static:include path="js/system-feedback.underscore" />
<script id="alert-tpl" type="text/template">
<%static:include path="js/alert.underscore" />
</script>
<script id="notification-tpl" type="text/template">
<%static:include path="js/notification.underscore" />
</script>
<script id="prompt-tpl" type="text/template">
<%static:include path="js/prompt.underscore" />
</script>
## javascript
@@ -68,8 +74,8 @@ $(document).ajaxError(function(event, jqXHR, ajaxSettings, thrownError) {
"actions": {
"primary": {
"text": "Dismiss",
"click": function() {
this.hide();
"click": function(view) {
view.hide();
}
}
}