Revert "Merge pull request #2304 from techAPJ/speech-bubble-update"

This reverts commit 6590ebbcbe, reversing
changes made to 3855ead62e.
This commit is contained in:
Robin Ward
2014-05-09 12:01:36 -04:00
parent 6590ebbcbe
commit 842dd91958
7 changed files with 20 additions and 46 deletions
@@ -10,7 +10,6 @@ export default Discourse.Controller.extend({
topic: null,
showExtraInfo: null,
notifications: null,
loading_notifications: null,
showStarButton: function() {
return Discourse.User.current() && !this.get('topic.isPrivateMessage');
@@ -26,17 +25,11 @@ export default Discourse.Controller.extend({
showNotifications: function(headerView) {
var self = this;
if (self.get('currentUser.unread_notifications') || self.get('currentUser.unread_private_messages') || !self.get('notifications')) {
self.set("loading_notifications", true);
Discourse.ajax("/notifications").then(function(result) {
self.setProperties({
notifications: result,
loading_notifications: false,
'currentUser.unread_notifications': 0
});
});
}
headerView.showDropdownBySelector("#user-notifications");
Discourse.ajax("/notifications").then(function(result) {
self.set("notifications", result);
self.set("currentUser.unread_notifications", 0);
headerView.showDropdownBySelector("#user-notifications");
});
},
jumpToTopPost: function () {
@@ -48,3 +41,5 @@ export default Discourse.Controller.extend({
}
});
@@ -1,4 +1,3 @@
Discourse.NotificationsController = Ember.ArrayController.extend(Discourse.HasCurrentUser, {
needs: ['header'],
itemController: "notification"
});
@@ -1,18 +1,14 @@
<section class="d-dropdown" id="notifications-dropdown">
{{#unless controllers.header.loading_notifications}}
{{#if content}}
<ul>
{{#each}}
<li {{bind-attr class="read"}}>{{unbound boundI18n scope linkBinding="link" usernameBinding="username"}}</li>
{{/each}}
<li class="read last">
<a {{bind-attr href="currentUser.path"}}>{{i18n notifications.more}} &hellip;</a>
</li>
</ul>
{{else}}
<div class="none">{{i18n notifications.none}}</div>
{{/if}}
{{#if content}}
<ul>
{{#each}}
<li {{bind-attr class="read"}}>{{unbound boundI18n scope linkBinding="link" usernameBinding="username"}}</li>
{{/each}}
<li class="read last">
<a {{bind-attr href="currentUser.path"}}>{{i18n notifications.more}} &hellip;</a>
</li>
</ul>
{{else}}
<div class='loading'><i class='fa fa-spinner fa-spin'></i></div>
{{/unless}}
<div class="none">{{i18n notifications.none}}</div>
{{/if}}
</section>
@@ -204,13 +204,6 @@
.none {
padding: 5px;
}
.loading {
padding: 10px;
display: block;
color: lighten($primary_text_color, 50%);
font-size: 24px;
text-align: center;
}
}
// Search
@@ -194,13 +194,6 @@
.none {
padding: 5px;
}
.loading {
padding: 10px;
display: block;
color: #777;
font-size: 24px;
text-align: center;
}
}
// Search