PluginProbe
Smart Forms – when you need more than just a contact form / 0.5
Smart Forms – when you need more than just a contact form v0.5
trunk 0.5 0.5.5 0.6 0.7 0.8 0.8.5 0.9.1
smart-forms / js / formBuilder / eventmanager.js

eventmanager.js in Smart Forms – when you need more than just a contact form 0.5, at js/formBuilder/eventmanager.js

36 lines 786 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /**
2 * Created by edseventeen on 11/23/13.
3 */
4 function RedNaoInternalEventManager()
5 {
6 this.Events={};
7 };
8
9 RedNaoInternalEventManager.prototype.Subscribe=function(eventName,callBack)
10 {
11 if(typeof this.Events[eventName]=='undefined')
12 this.Events[eventName]=[];
13
14 this.Events[eventName].push(callBack);
15 }
16
17 RedNaoInternalEventManager.prototype.Publish=function(eventName,args)
18 {
19 var eventArray=this.Events[eventName];
20 if(typeof eventArray=='undefined')
21 return;
22 for(var i=0;i<eventArray.length;i++)
23 {
24 try{
25 if(typeof args=='undefined')
26 eventArray[i]();
27 else
28 eventArray[i](args);
29 }catch (Exception){
30
31 }
32 }
33 }
34
35
36 var RedNaoEventManager=new RedNaoInternalEventManager();