Commit 2fe23ad1 authored by Bryce Johnson's avatar Bryce Johnson

Clean up title-tooltip directive and component.

parent 4a006c34
......@@ -10,13 +10,10 @@
Vue.directive('tooltip-title', {
update(el, binding) {
const titleInitAttr = 'title';
const titleStoreAttr = 'data-original-title';
const updatedValue = binding.value || el.getAttribute(titleInitAttr);
const updatedValue = binding.value || el.getAttribute('title');
el.setAttribute(titleInitAttr, updatedValue);
el.setAttribute(titleStoreAttr, updatedValue);
el.setAttribute('title', updatedValue);
el.setAttribute('data-original-title', updatedValue);
},
});
......
......@@ -7,7 +7,6 @@
data: function() {
return {
displayHelp: false,
loading: false,
}
},
computed: {
......@@ -27,6 +26,7 @@
showHelp() {
return !!this.displayHelp;
},
/* Parsed time values */
parsedEstimate() {
return this.parseSeconds(this.time_estimate);
......@@ -38,6 +38,7 @@
const diffSeconds = this.time_estimate - this.time_spent;
return this.parseSeconds(diffSeconds);
},
/* Human readable time values */
estimatedPretty() {
return this.stringifyTime(this.parsedEstimate);
......@@ -52,6 +53,7 @@
const prefix = this.diffMinutes < 0 ? 'Over by' : 'Time remaining:';
return `${prefix} ${this.remainingPretty}`;
},
/* Diff values for comparison meter */
diffMinutes () {
const time_estimate = this.time_estimate;
......@@ -72,7 +74,6 @@
},
parseSeconds (seconds) {
const DAYS_PER_WEEK = 5, HOURS_PER_DAY = 8, MINUTES_PER_HOUR = 60;
const MINUTES_PER_WEEK = DAYS_PER_WEEK * HOURS_PER_DAY * MINUTES_PER_HOUR;
const MINUTES_PER_DAY = HOURS_PER_DAY * MINUTES_PER_HOUR;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment