{I" class:ETI"ProcessedAsset;FI"logical_path;TI"rubber_ring/editor.js;FI" pathname;TI"O/home/vagrant/rubber_ring/app/assets/javascripts/rubber_ring/editor.coffee;FI"content_type;TI"application/javascript;TI" mtime;Tl+çQjQI" length;TiýI" digest;TI"%793df7795cd0865eed6786bbb47f3e1c;FI" source;TI"ý(function() { $(function() { var $contentEditable, $duplicables, generate_new_group_key, pm; pm = new PersistenceManager(); $contentEditable = $("[contenteditable]"); $duplicables = $(".duplicable"); $("body").on("focus", "[contenteditable]", function() { var $this; $this = $(this); $this.data("before", $this.html()); return $this; }).on("blur", "[contenteditable]", function() { var $this; $this = $(this); if ($this.data("before") !== $this.html()) { $this.data("before", $this.html()); $this.trigger("change"); } return $this; }); $contentEditable.change(function(e) { var $content; $content = $(e.currentTarget); return pm.save($content); }); $contentEditable.not(".multi-line").keydown(function(e) { if (e.keyCode === 13) { return e.preventDefault(); } }); $duplicables.on("dblclick", function(e) { var $clone, $editField, new_key; $editField = $(e.currentTarget); pm.save($editField); $clone = $editField.clone(true).appendTo($editField.parent()); new_key = generate_new_group_key($clone); $clone.attr("data-cms", new_key); return pm.save($clone); }); generate_new_group_key = function(element) { var temp_key; temp_key = element.data("cms").split("_").reverse(); temp_key[0] = $(".duplicable").length - 1; return temp_key.reverse().join("_"); }; return $duplicables.on("mouseup", function(e) { var $removingField; if (e.which === 2) { e.preventDefault(); $removingField = $(e.currentTarget); pm.remove($removingField); return $removingField.remove(); } }); }); }).call(this); ;TI"dependency_digest;TI"%64144ab0c16a14e69159038a14d6cbfa;FI"required_paths;T[I"O/home/vagrant/rubber_ring/app/assets/javascripts/rubber_ring/editor.coffee;FI"dependency_paths;T[{I" path;TI"O/home/vagrant/rubber_ring/app/assets/javascripts/rubber_ring/editor.coffee;FI" mtime;TI"2013-04-14T08:51:19+02:00;TI" digest;TI"%a255366cb634c7ebb865c05ceca763bb;FI" _version;TI"%35f7b60363742cb867c4c7f8a36022b9;F