summaryrefslogtreecommitdiff
path: root/web-ui/app/js/page/events.js
blob: c5c239e54230ae03b0c795095cf8a4e2f5bb2e54 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
define(function () {
  'use strict';

  var events = {
    router: {
      pushState: 'router:pushState'
    },
    ui: {
      sendbutton: {
        enable: 'ui:sendbutton:enable'
      },
      middlePane: {
        expand: 'ui:middlePane:expand',
        contract: 'ui:middlePane:contract'
      },
      userAlerts: {
        displayMessage: 'ui:userAlerts:displayMessage'
      },
      tag: {
        selected: 'ui:tagSelected',
        select: 'ui:tagSelect'
      },
      tags: {
        loaded: 'ui:tagsLoaded'
      },
      tagList: {
        refresh: 'ui:tagList:refresh',
        load: 'ui:tagList:load'
      },
      mails: {
        refresh: 'ui:mails:refresh',
        fetchByTag: 'ui:mails:fetchByTag',
        cleanSelected: 'ui:mails:cleanSelected',
        checkAll: 'ui:mails:checkAll',
        uncheckAll: 'ui:mails:uncheckAll',
        hasMailsChecked: 'ui:mails:hasMailsChecked'
      },
      mail: {
        open: 'ui:mail:open',
        updateSelected: 'ui:mail:updateSelected',
        delete: 'ui:mail:delete',
        deleteMany: 'ui:mail:deleteMany',
        wantChecked: 'ui:mail:wantChecked',
        hereChecked: 'ui:mail:hereChecked',
        checked: 'ui:mail:checked',
        unchecked: 'ui:mail:unchecked',
        changedSinceLastSave: 'ui:mail:changedSinceLastSave',
        send: 'ui:mail:send',
        recipientsUpdated: 'ui:mail:recipientsUpdated'
      },
      page: {
        previous: 'ui:page:previous',
        next: 'ui:page:next',
        changed: 'ui:page:changed'
      },
      composeBox: {
        newMessage: 'ui:composeBox:newMessage',
        newReply: 'ui:composeBox:newReply',
        trashReply: 'ui:composeBox:trashReply',
        requestCancelReply: 'ui:composeBox:requestCancelReply'
      },
      replyBox: {
        showReply: 'ui:replyBox:showReply',
        showReplyAll: 'ui:replyBox:showReplyAll'
      },
      recipients: {
        entered: 'ui:recipients:entered',
        updated: 'ui:recipients:updated',
        deleteLast: 'ui:recipients:deleteLast',
        selectLast: 'ui:recipients:selectLast',
        unselectAll: 'ui:recipients:unselectAll',
        addressesExist: 'ui:recipients:addressesExist',
        inputHasMail: 'ui:recipients:inputHasMail',
        inputHasNoMail: 'ui:recipients:inputHasNoMail',
        doCompleteInput: 'ui:recipients:doCompleteInput',
        doCompleteRecipients: 'ui:recipients:doCompleteRecipients'
      }
    },
    search: {
      perform: 'search:perform',
      results: 'search:results',
      empty: 'search:empty',
      highlightResults: 'search:highlightResults'
    },
    mail: {
      here: 'mail:here',
      want: 'mail:want',
      send: 'mail:send',
      sent: 'mail:sent',
      read: 'mail:read',
      unread: 'mail:unread',
      delete: 'mail:delete',
      deleteMany: 'mail:deleteMany',
      deleted: 'mail:deleted',
      saveDraft: 'draft:save',
      draftSaved: 'draft:saved',
      draftReply: {
        want: 'mail:draftReply:want',
        here: 'mail:draftReply:here',
        notFound: 'mail:draftReply:notFound'
      },
      notFound: 'mail:notFound',
      save: 'mail:saved',
      tags: {
        update: 'mail:tags:update',
        updated: 'mail:tags:updated'
      }
    },
    mails: {
      available: 'mails:available',
      availableForRefresh: 'mails:available:refresh',
      teardown: 'mails:teardown'
    },
    tags: {
      want: 'tags:want',
      received: 'tags:received',
      teardown: 'tags:teardown',
      shortcuts: {
        teardown: 'tags:shortcuts:teardown'
      }
    },
    route: {
      toUrl: 'route:toUrl'
    },

    components: {
      composeBox: {
        open: 'components:composeBox:open',
        close: 'components:composeBox:close'
      },
      mailPane: {
        open: 'components:mailPane:open',
        close: 'components:mailPane:close'
      },
      mailView: {
        show: 'components:mailView:show',
        close: 'components:mailView:close'
      },
      replySection: {
        initialize: 'components:replySection:initialize',
        close: 'components:replySection:close'
      },
      noMessageSelectedPane: {
        open: 'components:noMessageSelectedPane:open',
        close: 'components:noMessageSelectedPane:close'
      }
    },

    dispatchers: {
      rightPane: {
        openComposeBox: 'dispatchers:rightPane:openComposeBox',
        openNoMessageSelected: 'dispatchers:rightPane:openNoMessageSelected',
        openNoMessageSelectedWithoutPushState: 'dispatchers:rightPane:openNoMessageSelectedWithoutPushState',
        refreshMailList: 'dispatchers:rightPane:refreshMailList',
        openDraft: 'dispatchers:rightPane:openDraft',
        selectTag: 'dispatchers:rightPane:selectTag',
        clear: 'dispatchers:rightPane:clear'
      },
      middlePane: {
        refreshMailList: 'dispatchers:middlePane:refreshMailList',
        cleanSelected: 'dispatchers:middlePane:unselect',
        resetScroll: 'dispatchers:middlePane:resetScroll'
      },
      tags: {
        refreshTagList: 'dispatchers:tag:refresh'
      }
    }
  };

  return events;
});