mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-28 01:56:01 -05:00
BUGFIX: not showing tooltips correctly
This commit is contained in:
parent
d07d53e339
commit
8ec9288a5c
2 changed files with 16 additions and 4 deletions
|
@ -101,9 +101,9 @@ export default Discourse.Controller.extend({
|
||||||
if(composer.get('cantSubmitPost')) {
|
if(composer.get('cantSubmitPost')) {
|
||||||
var now = Date.now();
|
var now = Date.now();
|
||||||
this.setProperties({
|
this.setProperties({
|
||||||
"view.showTitleTip": now,
|
'view.showTitleTip': now,
|
||||||
"view.showCategoryTip": now,
|
'view.showCategoryTip': now,
|
||||||
"view.showReplyTip": now
|
'view.showReplyTip': now
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -404,12 +404,24 @@ Discourse.ComposerView = Discourse.View.extend(Ember.Evented, {
|
||||||
|
|
||||||
// I hate to use Em.run.later, but I don't think there's a way of waiting for a CSS transition
|
// I hate to use Em.run.later, but I don't think there's a way of waiting for a CSS transition
|
||||||
// to finish.
|
// to finish.
|
||||||
return Em.run.later(jQuery, (function() {
|
Em.run.later(jQuery, (function() {
|
||||||
var replyTitle = $('#reply-title');
|
var replyTitle = $('#reply-title');
|
||||||
self.resize();
|
self.resize();
|
||||||
self.refreshPreview();
|
self.refreshPreview();
|
||||||
return replyTitle.length ? replyTitle.putCursorAtEnd() : $wmdInput.putCursorAtEnd();
|
return replyTitle.length ? replyTitle.putCursorAtEnd() : $wmdInput.putCursorAtEnd();
|
||||||
}), 300);
|
}), 300);
|
||||||
|
|
||||||
|
$('#reply-title').on('focusout', function(){
|
||||||
|
self.set('showTitleTip', Date.now());
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#wmd-input').on('focusout', function(){
|
||||||
|
self.set('showReplyTip', Date.now());
|
||||||
|
});
|
||||||
|
|
||||||
|
self.$('.category-input').on('focusout', function(){
|
||||||
|
self.set('showCategoryTip', Date.now());
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
addMarkdown: function(text) {
|
addMarkdown: function(text) {
|
||||||
|
|
Loading…
Reference in a new issue