mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 13:33:34 -07:00
fixed toggle-cell tool-tips sticking around.
This commit is contained in:
parent
642207c68d
commit
3f203acab9
6 changed files with 17 additions and 43 deletions
|
@ -1,26 +0,0 @@
|
|||
'use strict';
|
||||
define(
|
||||
[
|
||||
'backgrid',
|
||||
'moment',
|
||||
'Shared/FormatHelpers'
|
||||
], function (Backgrid, Moment, FormatHelpers) {
|
||||
return Backgrid.Cell.extend({
|
||||
className: 'air-date-cell',
|
||||
|
||||
render: function () {
|
||||
|
||||
this.$el.empty();
|
||||
var date = this.model.get(this.column.get('name'));
|
||||
|
||||
if (date) {
|
||||
this.$el.html('<div>' + FormatHelpers.DateHelper(date) + '</div>');
|
||||
|
||||
this.$el.children('div').attr('title', Moment(date).format('LLLL'));
|
||||
}
|
||||
|
||||
return this;
|
||||
|
||||
}
|
||||
});
|
||||
});
|
|
@ -14,8 +14,7 @@ define(
|
|||
var date = this.model.get(this.column.get('name'));
|
||||
|
||||
if (date) {
|
||||
this.$el.html(FormatHelpers.DateHelper(date));
|
||||
this.$el.attr('title', Moment(date).format('LLLL'));
|
||||
this.$el.html("<span title='" + Moment(date).format('LLLL') + "' >" + FormatHelpers.DateHelper(date) + "</span");
|
||||
}
|
||||
|
||||
return this;
|
||||
|
|
|
@ -14,18 +14,19 @@ define(
|
|||
|
||||
|
||||
_onClick: function () {
|
||||
|
||||
var self = this;
|
||||
|
||||
this.$el.tooltip('hide');
|
||||
|
||||
var name = this.column.get('name');
|
||||
this.model.set(name, !this.model.get(name));
|
||||
|
||||
this.$('i').addClass('icon-spinner icon-spin');
|
||||
|
||||
var promise = this.model.save();
|
||||
|
||||
promise.always(function (){
|
||||
self.render();
|
||||
});
|
||||
this.model.save().always(function () {
|
||||
self.render();
|
||||
});
|
||||
},
|
||||
|
||||
render: function () {
|
||||
|
@ -44,7 +45,7 @@ define(
|
|||
var tooltip = this.column.get('tooltip');
|
||||
|
||||
if (tooltip) {
|
||||
this.$('i').attr('title', tooltip);
|
||||
this.$el.attr('title', tooltip);
|
||||
}
|
||||
|
||||
return this;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue