Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
2fe23ad1
Commit
2fe23ad1
authored
Nov 16, 2016
by
Bryce Johnson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up title-tooltip directive and component.
parent
4a006c34
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
8 deletions
+6
-8
app/assets/javascripts/directives/tooltip_title.js.es6
app/assets/javascripts/directives/tooltip_title.js.es6
+3
-6
app/assets/javascripts/issuable_time_tracker.js.es6
app/assets/javascripts/issuable_time_tracker.js.es6
+3
-2
No files found.
app/assets/javascripts/directives/tooltip_title.js.es6
View file @
2fe23ad1
...
...
@@ -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);
},
});
...
...
app/assets/javascripts/issuable_time_tracker.js.es6
View file @
2fe23ad1
...
...
@@ -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;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment