diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2017-12-12 08:46:28 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2017-12-12 08:46:28 +0100 |
| commit | aefc83f729ab3f3c35d9371ec972fb6885b13125 (patch) | |
| tree | 526aab55889bc6714c377d53eaa8d9a43fe36001 /public/assets/js | |
| parent | 5e053888b7bec0017f191c8b30c405abd085711f (diff) | |
mail qa
Diffstat (limited to 'public/assets/js')
| -rw-r--r-- | public/assets/js/lib/router.js | 3 | ||||
| -rw-r--r-- | public/assets/js/lib/views/mail/compose.js | 2 | ||||
| -rw-r--r-- | public/assets/js/lib/views/mail/message.js | 7 |
3 files changed, 9 insertions, 3 deletions
diff --git a/public/assets/js/lib/router.js b/public/assets/js/lib/router.js index 1419e81..388bdac 100644 --- a/public/assets/js/lib/router.js +++ b/public/assets/js/lib/router.js @@ -17,7 +17,8 @@ var SiteRouter = Router.extend({ "/mail/:mailbox": 'mailbox', "/mail/compose": 'compose', "/mail/compose/:username": 'compose', - "/message/:id": 'message', + "/mail/read/:id": 'message', + "/mail/reply/:id": 'compose', "/comment/:id/edit": 'editComment', "/profile": 'profile', "/profile/:username": 'profile', diff --git a/public/assets/js/lib/views/mail/compose.js b/public/assets/js/lib/views/mail/compose.js index 2c76b3f..b3e302e 100644 --- a/public/assets/js/lib/views/mail/compose.js +++ b/public/assets/js/lib/views/mail/compose.js @@ -5,7 +5,7 @@ var ComposeView = FormView.extend({ events: { }, - action: "", + action: "/api/mail/send", initialize: function(){ this.__super__.initialize.call(this) diff --git a/public/assets/js/lib/views/mail/message.js b/public/assets/js/lib/views/mail/message.js index da5e1b4..19293e5 100644 --- a/public/assets/js/lib/views/mail/message.js +++ b/public/assets/js/lib/views/mail/message.js @@ -10,7 +10,12 @@ var MessageView = View.extend({ load: function(name){ name = sanitize(name) || "inbox" - $.get(this.action + name, this.populate.bind(this)) + $.ajax({ + url: this.action + name, + method: 'get', + success: this.populate.bind(this), + error: app.router.error404 + }) }, populate: function(data){ |
