canvas.utils.nearestInDocumentOrder
[fnpeditor.git] / modules / indicator / indicator.js
index 0e9bcdc..d98fe04 100644 (file)
@@ -1,32 +1,35 @@
-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);
+            }
+        }
+        
+    };
+
+};
+
+});