mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
Close notifications dropdown on mobile after you click something
This commit is contained in:
parent
cf4666d363
commit
6713db7133
2 changed files with 11 additions and 1 deletions
|
@ -9,7 +9,10 @@
|
||||||
Discourse.Route = Em.Route.extend({
|
Discourse.Route = Em.Route.extend({
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Called every time we enter a route on Discourse.
|
NOT called every time we enter a route on Discourse.
|
||||||
|
Only called the FIRST time we enter a route.
|
||||||
|
So, when going from one topic to another, activate will only be called on the
|
||||||
|
TopicRoute for the first topic.
|
||||||
|
|
||||||
@method activate
|
@method activate
|
||||||
**/
|
**/
|
||||||
|
|
|
@ -113,6 +113,13 @@ Discourse.TopicRoute = Discourse.Route.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
setupController: function(controller, model) {
|
setupController: function(controller, model) {
|
||||||
|
if (Discourse.Mobile.mobileView) {
|
||||||
|
// close the dropdowns on mobile
|
||||||
|
$('.d-dropdown').hide();
|
||||||
|
$('header ul.icons li').removeClass('active');
|
||||||
|
$('[data-toggle="dropdown"]').parent().removeClass('open');
|
||||||
|
}
|
||||||
|
|
||||||
controller.setProperties({
|
controller.setProperties({
|
||||||
model: model,
|
model: model,
|
||||||
editingTopic: false
|
editingTopic: false
|
||||||
|
|
Loading…
Reference in a new issue