Sha256: 2d751f61b00cc57373c945e4a5796a567f7f7fadf116191a2a9364c488daa266

Contents?: true

Size: 1.57 KB

Versions: 93

Compression:

Stored size: 1.57 KB

Contents

define("ace/ext/statusbar",["require","exports","module","ace/lib/dom","ace/lib/lang"], function(require, exports, module) {
"use strict";
var dom = require("ace/lib/dom");
var lang = require("ace/lib/lang");

var StatusBar = function(editor, parentNode) {
    this.element = dom.createElement("div");
    this.element.className = "ace_status-indicator";
    this.element.style.cssText = "display: inline-block;";
    parentNode.appendChild(this.element);

    var statusUpdate = lang.delayedCall(function(){
        this.updateStatus(editor)
    }.bind(this));
    editor.on("changeStatus", function() {
        statusUpdate.schedule(100);
    });
    editor.on("changeSelection", function() {
        statusUpdate.schedule(100);
    });
};

(function(){
    this.updateStatus = function(editor) {
        var status = [];
        function add(str, separator) {
            str && status.push(str, separator || "|");
        }

        add(editor.keyBinding.getStatusText(editor));
        if (editor.commands.recording)
            add("REC");

        var c = editor.selection.lead;
        add(c.row + ":" + c.column, " ");
        if (!editor.selection.isEmpty()) {
            var r = editor.getSelectionRange();
            add("(" + (r.end.row - r.start.row) + ":"  +(r.end.column - r.start.column) + ")");
        }
        status.pop();
        this.element.textContent = status.join("");
    };
}).call(StatusBar.prototype);

exports.StatusBar = StatusBar;

});
                (function() {
                    window.require(["ace/ext/statusbar"], function() {});
                })();
            

Version data entries

93 entries across 93 versions & 4 rubygems

Version Path
optimacms-0.1.23 test/dummy/public/js/ace/src/ext-statusbar.js
optimacms-0.1.21 test/dummy/public/js/ace/src/ext-statusbar.js
optimacms-0.1.19 test/dummy/public/js/ace/src/ext-statusbar.js
optimacms-0.1.17 test/dummy/public/js/ace/src/ext-statusbar.js
optimacms-0.1.15 test/dummy/public/js/ace/src/ext-statusbar.js
optimacms-0.1.14 test/dummy/public/js/ace/src/ext-statusbar.js
optimacms-0.1.5 test/dummy/public/js/ace/src/ext-statusbar.js
optimacms-0.1.3 test/dummy/public/js/ace/src/ext-statusbar.js
optimacms-0.1.2 test/dummy/public/js/ace/src/ext-statusbar.js
optimacms-0.1.1 test/dummy/public/js/ace/src/ext-statusbar.js
help_kit-0.0.5 app/assets/javascripts/ace/ext-statusbar.js
help_kit-0.0.4 app/assets/javascripts/ace/ext-statusbar.js
help_kit-0.0.3 app/assets/javascripts/ace/ext-statusbar.js
help_kit-0.0.2 app/assets/javascripts/ace/ext-statusbar.js
help_kit-0.0.1 app/assets/javascripts/ace/ext-statusbar.js
agile-proxy-0.1.24 assets/ui/bower_components/ace-builds/src/ext-statusbar.js
agile-proxy-0.1.23 assets/ui/bower_components/ace-builds/src/ext-statusbar.js
agile-proxy-0.1.22 assets/ui/bower_components/ace-builds/src/ext-statusbar.js
agile-proxy-0.1.21 assets/ui/bower_components/ace-builds/src/ext-statusbar.js
agile-proxy-0.1.20 assets/ui/bower_components/ace-builds/src/ext-statusbar.js