How to use the ext/githistory/util.createElement function in ext

To help you get started, we’ve selected a few ext examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pylonide / pylon / client / ext / githistory / timeline.js View on Github external
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);
github pylonide / pylon / client / ext / githistory / timeline.js View on Github external
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;
github pylonide / pylon / client / ext / githistory / githistory.js View on Github external
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);
github pylonide / pylon / client / ext / githistory / timeline.js View on Github external
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;
github pylonide / pylon / client / ext / githistory / githistory.js View on Github external
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);
github pylonide / pylon / client / ext / githistory / githistory.js View on Github external
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"
            });
github pylonide / pylon / client / ext / githistory / timeline.js View on Github external
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;
github pylonide / pylon / client / ext / githistory / githistory.js View on Github external
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);
github pylonide / pylon / client / ext / githistory / githistory.js View on Github external
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) {
github pylonide / pylon / client / ext / githistory / githistory.js View on Github external
});
            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);