diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-01-08 15:20:33 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-01-08 15:20:33 +0100 |
| commit | 10256ddf3b7d65fde443b68d305101c8e7edd5e4 (patch) | |
| tree | 55c2e05159883c7bf2ba60645fe2bf7bec7bd03d /public/assets/js | |
| parent | 9baea1263a1cd3961545d2b5c0ac0fc1190a084d (diff) | |
move the new message alert to the top above thread box on phone
Diffstat (limited to 'public/assets/js')
| -rw-r--r-- | public/assets/js/lib/views/index/index.js | 3 | ||||
| -rw-r--r-- | public/assets/js/vendor/util.js | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/public/assets/js/lib/views/index/index.js b/public/assets/js/lib/views/index/index.js index edf5483..985f990 100644 --- a/public/assets/js/lib/views/index/index.js +++ b/public/assets/js/lib/views/index/index.js @@ -42,6 +42,9 @@ var IndexView = View.extend({ " new message" + courtesy_s(data.mail.count) + "!</a>") + if (is_mobile) { + $("#content").prepend( $(".alert") ) + } } $(".search_form input").focus() }, diff --git a/public/assets/js/vendor/util.js b/public/assets/js/vendor/util.js index cab7a6c..bcaa2d2 100644 --- a/public/assets/js/vendor/util.js +++ b/public/assets/js/vendor/util.js @@ -277,7 +277,7 @@ if (!Function.prototype.bind) { var is_iphone = (navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)) var is_ipad = (navigator.userAgent.match(/iPad/i)) var is_android = (navigator.userAgent.match(/Android/i)) -var is_mobile = is_iphone || is_ipad || is_android +var is_mobile = !!( is_iphone || is_ipad || is_android ) var is_desktop = ! is_mobile; var app_devicePixelRatio = is_mobile ? devicePixelRatio : 1; |
