{I"
class:ETI"BundledAsset;�FI"logical_path;�TI"mercury/statusbar.js;�FI"
pathname;�TI"�/home/edik/.rvm/gems/ruby-2.0.0-p247@very_simple_cms/bundler/gems/mercury-3e0245e33195/app/assets/javascripts/mercury/statusbar.js.coffee;�FI"content_type;�TI"application/javascript;�TI"
mtime;�Tl+��9RI"length;�Ti�
I"digest;�TI"%652646e1be9496047509db9c7ea98413;�FI"source;�TI"�
(function() {
  this.Mercury.Statusbar = (function() {
    function Statusbar(options) {
      this.options = options != null ? options : {};
      this.visible = this.options.visible;
      this.build();
      this.bindEvents();
    }

    Statusbar.prototype.build = function() {
      var _ref;
      this.element = jQuery('<div>', {
        "class": 'mercury-statusbar'
      });
      this.aboutElement = jQuery('<a>', {
        "class": "mercury-statusbar-about"
      }).appendTo(this.element).html("Mercury Editor v" + Mercury.version);
      this.pathElement = jQuery('<div>', {
        "class": 'mercury-statusbar-path'
      }).appendTo(this.element);
      if (!this.visible) {
        this.element.css({
          visibility: 'hidden'
        });
      }
      return this.element.appendTo((_ref = jQuery(this.options.appendTo).get(0)) != null ? _ref : 'body');
    };

    Statusbar.prototype.bindEvents = function() {
      var _this = this;
      Mercury.on('region:update', function(event, options) {
        if (options.region && jQuery.type(options.region.path) === 'function') {
          return _this.setPath(options.region.path());
        }
      });
      return this.aboutElement.on('click', function() {
        return Mercury.lightview('/mercury/lightviews/about.html', {
          title: "Mercury Editor v" + Mercury.version
        });
      });
    };

    Statusbar.prototype.height = function() {
      return this.element.outerHeight();
    };

    Statusbar.prototype.top = function() {
      var currentTop, top;
      top = this.element.offset().top;
      currentTop = parseInt(this.element.css('bottom')) < 0 ? top - this.element.outerHeight() : top;
      if (this.visible) {
        return currentTop;
      } else {
        return top + this.element.outerHeight();
      }
    };

    Statusbar.prototype.setPath = function(elements) {
      var element, path, _i, _len;
      path = [];
      for (_i = 0, _len = elements.length; _i < _len; _i++) {
        element = elements[_i];
        path.push("<a>" + (element.tagName.toLowerCase()) + "</a>");
      }
      return this.pathElement.html("<span><strong>" + (Mercury.I18n('Path:')) + " </strong>" + (path.reverse().join(' &raquo; ')) + "</span>");
    };

    Statusbar.prototype.show = function() {
      this.visible = true;
      this.element.css({
        opacity: 0,
        visibility: 'visible'
      });
      return this.element.animate({
        opacity: 1
      }, 200, 'easeInOutSine');
    };

    Statusbar.prototype.hide = function() {
      this.visible = false;
      return this.element.css({
        visibility: 'hidden'
      });
    };

    return Statusbar;

  })();

}).call(this);
;�TI"required_assets_digest;�TI"%d4fd39875617bacca40931994027eaa1;�FI"
_version;�TI"%2cf3622cbba861b85d33ffabfa420c13;�F