Sha256: f0c28ef7f0b17ffe13055c1a23ef635c97640f09995831fa93b4e7709bb61655

Contents?: true

Size: 881 Bytes

Versions: 4

Compression:

Stored size: 881 Bytes

Contents

(function() {
    var fitopts = {min: 6, max: 400};

    var Title = function(json) {
      view.View.call(this, json);
      this.title = json.title;
      this.clickFocusable = true;
      this.el.addClass("title");
      this.h2 = $('<h2/>');
      this.el.append(this.h2);
      this.h2.text(this.title);
      this.reflow();
    }

    view.inherit(view.View, Title);
    view.Title = Title;
    view.types.Title = Title;

    Title.prototype.json = function() {
      return $.extend(view.View.prototype.json.call(this), {
        type: 'Title',
        title: this.title
      });
    }

    Title.prototype.editForm = function() {
      return Mustache.render('<label for="title">Title</label>' +
          '<input type="title" name="title" value="{{title}}" />',
        this);
    }

    Title.prototype.reflow = function() {
      this.h2.quickfit(fitopts);
    }
})();

Version data entries

4 entries across 4 versions & 3 rubygems

Version Path
mindreframer-riemann-dash-0.2.3 lib/riemann/dash/public/views/title.js
mindreframer-reslike-dash-0.2.2 lib/riemann/dash/public/views/title.js
riemann-dash-0.2.1 lib/riemann/dash/public/views/title.js
riemann-dash-0.2.0 lib/riemann/dash/public/views/title.js