-define([\r
-'libs/jquery-1.9.1.min',\r
-'libs/underscore-min',\r
-'libs/text!./template.html'\r
-], function($, _, template) {\r
-\r
-'use strict';\r
-\r
-return function(sandbox) {\r
-\r
- var view = {\r
- dom: $(_.template(template)()),\r
- setup: function() {\r
- \r
- }\r
- }\r
-\r
- return {\r
- start: function() { sandbox.publish('ready'); },\r
- getView: function() { return view.dom; },\r
- showMessage: function(msg) {\r
- view.dom.html('<span>' + msg + '</span>').show();\r
- },\r
- clearMessage: function() {\r
- view.dom.empty();\r
- }\r
- \r
- }\r
-\r
-}\r
-\r
-});\r
+define([
+'libs/jquery-1.9.1.min',
+'libs/underscore-min',
+'libs/text!./template.html'
+], function($, _, template) {
+
+'use strict';
+
+return function(sandbox) {
+
+ var view = {
+ dom: $(_.template(template)()),
+ setup: function() {
+
+ }
+ };
+
+ return {
+ start: function() { sandbox.publish('ready'); },
+ getView: function() { return view.dom; },
+ showMessage: function(msg) {
+ view.dom.html('<span>' + msg + '</span>').show();
+ },
+ clearMessage: function(report) {
+ view.dom.empty();
+ if(report && report.message) {
+ view.dom.html('<span class="success">' + report.message + '</span>').show().fadeOut(4000);
+ }
+ }
+
+ };
+
+};
+
+});