This repository has been archived by the owner on Oct 30, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
No bubbles displayed if only start date exist. #92
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
7f87b07
Add point to timeline by manually manipulating DOM and style.
sergibondarenko aa514d6
Remove unneeded code. Define vars as const.
sergibondarenko 9759d3b
Fix "Emphasize first label instance" feature.
sergibondarenko a431e2a
Fix test.
sergibondarenko 47ed29e
Change emphasized item border color to the group color.
sergibondarenko a1ef2ee
Move styles to the css file.
sergibondarenko 07fcb0e
I'm unsuccessfully trying to import and compile the content template …
sergibondarenko fdf9077
Move item template building to a separate timelineHelper method.
sergibondarenko 7e8ee67
Delete console.log.
sergibondarenko 81db318
Get rid off the i varibale in the item template building method.
sergibondarenko 49dc771
Delete unused lint directive.
sergibondarenko 3154b41
Refactor the item template creation method.
sergibondarenko 54c811d
Init label with correct value inside the item template creating method.
sergibondarenko File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -184,6 +184,5 @@ define(function (require) { | |
removeVisStateChangedHandler(); | ||
}); | ||
} | ||
|
||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,31 @@ define(function (require) { | |
function TimelineHelper() { | ||
} | ||
|
||
TimelineHelper.prototype.noEndOrEqual = function (startValue, endValue) { | ||
return !endValue || startValue === endValue ? true : false; | ||
}; | ||
|
||
TimelineHelper.prototype.createItemTemplate = function (itemDict) { | ||
let endfield = ''; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @scampi how do you find my readability code refactoring? |
||
let dot = ''; | ||
let hilit = ''; | ||
let label = itemDict.labelValue; | ||
|
||
if (itemDict.endField) { | ||
endfield = `, endField: ${itemDict.endField}`; | ||
} | ||
if (this.noEndOrEqual(itemDict.startValue, itemDict.endValue)) { | ||
dot = `<div class="kibi-tl-dot-item" style="border-color:${itemDict.groupColor}"></div>`; | ||
label = `<div class="kibi-tl-label-item">${itemDict.labelValue}</div>`; | ||
} | ||
if (itemDict.useHighlight) { | ||
hilit = `<p class="tiny-txt">${itemDict.highlight}</p>`; | ||
} | ||
|
||
return `<div title="index: ${itemDict.indexId}, startField: ${itemDict.startField}${endfield}">` + | ||
`${dot}${label}${hilit}</div>`; | ||
}; | ||
|
||
TimelineHelper.prototype.changeTimezone = function (timezone) { | ||
if (timezone !== 'Browser') { | ||
return moment().tz(timezone).format('Z'); | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@szydan Seems I can't deprecate this
style
variable because I need to change thegroupColor
for every group.