wlxmlListener: handle nodeAdded, nodeRemoved, nodeDetached events
[fnpeditor.git] / src / editor / modules / indicator / indicator.js
1 define([
2 'libs/jquery',
3 'libs/underscore',
4 'libs/text!./template.html'
5 ], function($, _, template) {
6
7 'use strict';
8
9 return function(sandbox) {
10
11     var view = {
12         dom: $(_.template(template)()),
13         setup: function() {
14         
15         }
16     };
17
18     return {
19         start: function() { sandbox.publish('ready'); },
20         getView: function() { return view.dom; },
21         showMessage: function(msg) {
22             view.dom.html('<span>' + msg + '</span>').show();
23         },
24         clearMessage: function(report) {
25             view.dom.empty();
26             if(report && report.message) {
27                 view.dom.html('<span class="success">' + report.message + '</span>').show().fadeOut(4000);
28             }
29         }
30         
31     };
32
33 };
34
35 });