Browse code

Premenovana metoda

Cinan Rakosnik authored on 24/03/2013 at 19:44:25
Showing 2 changed files
... ...
@@ -16,12 +16,12 @@ this.App =
16 16
         @_bindEvents()
17 17
         callback?()
18 18
 
19
-    fetch: (options) ->
19
+    trigger: (options) ->
20 20
       _.defaults(options, {data: {} })
21 21
       App._dispatcher.trigger(options.event, options.data, options.success, options.error)
22 22
 
23 23
     initRoster: ->
24
-      App.Com.fetch(
24
+      App.Com.trigger(
25 25
         event: 'app.roster.initRoster'
26 26
         success: (data) ->
27 27
           _.each(data.contacts, (jid) ->
... ...
@@ -31,13 +31,13 @@ this.App =
31 31
       )
32 32
 
33 33
     startFetchingVcards: ->
34
-      App.Com.fetch(event: 'app.roster.startFetchingVcards')
34
+      App.Com.trigger(event: 'app.roster.startFetchingVcards')
35 35
 
36 36
     startPollingRoster: ->
37
-      App.Com.fetch(event: 'app.roster.startPolling')
37
+      App.Com.trigger(event: 'app.roster.startPolling')
38 38
 
39 39
     setPresence: ->
40
-      App.Com.fetch(event: 'app.roster.setPresence')
40
+      App.Com.trigger(event: 'app.roster.setPresence')
41 41
 
42 42
     _setupBackboneComponents: ->
43 43
       App.Collections.Contacts = new Xmpp.Collections.ContactsCollection()
... ...
@@ -22,7 +22,7 @@ class Xmpp.Models.Model extends Backbone.Model
22 22
         error(model, xhr, options)
23 23
       model.trigger('error', model, xhr, options);
24 24
 
25
-    result = options.result = App.Com.fetch(_.extend(params, options))
25
+    result = options.result = App.Com.trigger(_.extend(params, options))
26 26
 
27 27
     model.trigger('request', model, result, options)
28 28
     return result
29 29
\ No newline at end of file