Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
vbVersions.$ext.appendChild(this.timelineTooltip);
}
var _self = this;
var len = logData.length;
var tsBegin = logData[0].committer.timestamp;
var timeSpan = logData[len-1].committer.timestamp - tsBegin;
// Create all the points in time
for (var i = 0; i < len; i++) {
var ts = logData[i].committer.timestamp;
var tsDiff = ts - tsBegin;
var percentage = (tsDiff / timeSpan) * 100;
logData[i].dotEl = rutil.createElement("u", {
"style" : "left: " + percentage + "%",
"rel" : i,
"hash" : logData[i].commit
});
logData[i].dotEl.addEventListener("mouseover", logData[i].dotElMouseOver = function() {
var dotClass = this.getAttribute("class");
if(dotClass && dotClass.split(" ")[0] == "pop")
return;
var it = this.getAttribute("rel");
var output = rutil.formulateRevisionMetaData(logData[it], true, 30);
_self.timelineTooltip.innerHTML = output;
var pos = apf.getAbsolutePosition(this);
var sttWidth = apf.getHtmlInnerWidth(_self.timelineTooltip);
setupTimeline : function(logData) {
if (!logData.length)
return;
if (!this.timelineEl) {
vbHistoricalHeader.$ext.appendChild(
rutil.createElement("div", { "id": "versionsSliderBg" })
);
this.timelineEl = rutil.createElement("div", {
"id": "versionsHistoricalSlider"
});
vbHistoricalHeader.$ext.appendChild(this.timelineEl);
this.timelineTooltip = rutil.createElement("div", {
"id" : "slider_tooltip"
});
vbVersions.$ext.appendChild(this.timelineTooltip);
}
var _self = this;
var len = logData.length;
var tsBegin = logData[0].committer.timestamp;
var timeSpan = logData[len-1].committer.timestamp - tsBegin;
// Create all the points in time
for (var i = 0; i < len; i++) {
var ts = logData[i].committer.timestamp;
var tsDiff = ts - tsBegin;
var percentage = (tsDiff / timeSpan) * 100;
var largeGHistory = rutil.createElement("div", {
"id" : "large_ghistory",
"class" : "history_graphic"
});
_self.historyGraphics.appendChild(smallGHistory);
_self.historyGraphics.appendChild(mediumGHistory);
_self.historyGraphics.appendChild(largeGHistory);
vbVersions.$ext.appendChild(_self.historyGraphics);
_self.loading_div = rutil.createElement("div", {
"id" : "revisions_loading"
});
vbVersions.$ext.appendChild(_self.loading_div);
var pgTurner = rutil.createElement("div", { "id" : "page_turner" });
hveContainer.$ext.appendChild(pgTurner);
}, 100);
setupTimeline : function(logData) {
if (!logData.length)
return;
if (!this.timelineEl) {
vbHistoricalHeader.$ext.appendChild(
rutil.createElement("div", { "id": "versionsSliderBg" })
);
this.timelineEl = rutil.createElement("div", {
"id": "versionsHistoricalSlider"
});
vbHistoricalHeader.$ext.appendChild(this.timelineEl);
this.timelineTooltip = rutil.createElement("div", {
"id" : "slider_tooltip"
});
vbVersions.$ext.appendChild(this.timelineTooltip);
}
var _self = this;
var len = logData.length;
setTimeout(function() {
vbMain.appendChild(animateEditorClone);
_self.historyGraphics = rutil.createElement("div", {
"id" : "history_graphics"
});
var smallGHistory = rutil.createElement("div", {
"id" : "small_ghistory",
"class" : "history_graphic"
});
var mediumGHistory = rutil.createElement("div", {
"id" : "medium_ghistory",
"class" : "history_graphic"
});
var largeGHistory = rutil.createElement("div", {
"id" : "large_ghistory",
"class" : "history_graphic"
});
_self.historyGraphics.appendChild(smallGHistory);
setTimeout(function() {
vbMain.appendChild(animateEditorClone);
_self.historyGraphics = rutil.createElement("div", {
"id" : "history_graphics"
});
var smallGHistory = rutil.createElement("div", {
"id" : "small_ghistory",
"class" : "history_graphic"
});
var mediumGHistory = rutil.createElement("div", {
"id" : "medium_ghistory",
"class" : "history_graphic"
});
var largeGHistory = rutil.createElement("div", {
"id" : "large_ghistory",
"class" : "history_graphic"
});
_self.historyGraphics.appendChild(smallGHistory);
_self.historyGraphics.appendChild(mediumGHistory);
_self.historyGraphics.appendChild(largeGHistory);
vbVersions.$ext.appendChild(_self.historyGraphics);
_self.loading_div = rutil.createElement("div", {
"id" : "revisions_loading"
});
setupTimeline : function(logData) {
if (!logData.length)
return;
if (!this.timelineEl) {
vbHistoricalHeader.$ext.appendChild(
rutil.createElement("div", { "id": "versionsSliderBg" })
);
this.timelineEl = rutil.createElement("div", {
"id": "versionsHistoricalSlider"
});
vbHistoricalHeader.$ext.appendChild(this.timelineEl);
this.timelineTooltip = rutil.createElement("div", {
"id" : "slider_tooltip"
});
vbVersions.$ext.appendChild(this.timelineTooltip);
}
var _self = this;
var len = logData.length;
var tsBegin = logData[0].committer.timestamp;
var timeSpan = logData[len-1].committer.timestamp - tsBegin;
setTimeout(function() {
vbMain.appendChild(animateEditorClone);
_self.historyGraphics = rutil.createElement("div", {
"id" : "history_graphics"
});
var smallGHistory = rutil.createElement("div", {
"id" : "small_ghistory",
"class" : "history_graphic"
});
var mediumGHistory = rutil.createElement("div", {
"id" : "medium_ghistory",
"class" : "history_graphic"
});
var largeGHistory = rutil.createElement("div", {
"id" : "large_ghistory",
"class" : "history_graphic"
});
_self.historyGraphics.appendChild(smallGHistory);
_self.historyGraphics.appendChild(mediumGHistory);
_self.historyGraphics.appendChild(largeGHistory);
vbVersions.$ext.appendChild(_self.historyGraphics);
hook : function(){
var _self = this;
document.body.appendChild(
rutil.createElement("script", {
"type" : "text/javascript",
"src" : ide.staticPrefix + "/ext/githistory/diff_match_patch.js"
})
);
this.revisionState = new RState();
this.gitLogParser = new GitLogParser();
ide.addEventListener("socketMessage", this.onMessage.bind(this));
window.addEventListener("resize", function() {
if (_self.isFocused)
_self.resizeElements();
});
ide.addEventListener("loadrevision", function(e) {
});
var mediumGHistory = rutil.createElement("div", {
"id" : "medium_ghistory",
"class" : "history_graphic"
});
var largeGHistory = rutil.createElement("div", {
"id" : "large_ghistory",
"class" : "history_graphic"
});
_self.historyGraphics.appendChild(smallGHistory);
_self.historyGraphics.appendChild(mediumGHistory);
_self.historyGraphics.appendChild(largeGHistory);
vbVersions.$ext.appendChild(_self.historyGraphics);
_self.loading_div = rutil.createElement("div", {
"id" : "revisions_loading"
});
vbVersions.$ext.appendChild(_self.loading_div);
var pgTurner = rutil.createElement("div", { "id" : "page_turner" });
hveContainer.$ext.appendChild(pgTurner);
}, 100);