Sha256: 83a146dce9f0068c08e335de297261dde43e1563d88cac7ef4948aaa9e91dea1
Contents?: true
Size: 847 Bytes
Versions: 1
Compression:
Stored size: 847 Bytes
Contents
Ponytail.Views.MigrationFileView = Backbone.View.extend({ events: { "click .pt_edit_checkbox input": "toggleRawContent", "click .pt_submit": function() { this.setRawContentEnabled(true); }, "keyup .pt_class_name input": function(e) { this.model.set({className: e.target.value}); }, }, initialize: function(options) { _.bindAll(this, "render"); this.model.bind("change", this.render); }, render: function() { $(".pt_raw_content textarea").text(this.model.get("rawContent")); }, toggleRawContent: function() { this.setRawContentEnabled($(".pt_raw_content textarea").attr("disabled")); }, setRawContentEnabled: function(enabled) { if (enabled) { $(".pt_raw_content textarea").removeAttr("disabled"); } else { $(".pt_raw_content textarea").attr("disabled", "disabled"); } }, });
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ponytail-0.3.0 | app/assets/javascripts/ponytail/views/migration_file.js |