application/js/views.js in spontaneous-0.1.0.alpha1 vs application/js/views.js in spontaneous-0.2.0.alpha1

- old
+ new

@@ -1,9 +1,10 @@ Spontaneous.Views = (function($, S) { var dom = S.Dom; var View = new JS.Class({ + include: Spontaneous.Properties, initialize: function(content) { this.content = content; }, id: function() { return this.content.id(); @@ -77,21 +78,20 @@ var h = wi.outerHeight(); o.add(r).animate({'height':h}, { queue: false, duration: time_to_reveal }); w.css({'position':'relative'}); r.css({'position':'absolute', 'top':0, 'right':0, 'left':0}).animate({'top':h}, { queue: false, duration: time_to_reveal, complete:function() { w.css({'z-index': front, 'position':'relative', 'height':'auto'}) - r.css({'z-index': back, 'position':'absolute'}) + r.css({'z-index': back, 'position':'absolute', 'display':'none'}) o.css('height', 'auto'); panel.on_show(focus_field); }}); }, edit_closing: false, edit_closed: function() { if (this.edit_closing) { return; } this.edit_closing = true; var time_to_reveal = 300, back = 10, front = 20, - a = this.editing_area, o = a.outer, w = a.write, r = a.read, wi = a.write_inner, ri = a.read_inner, - h = ri.outerHeight(), __content = this; + a = this.editing_area, o = a.outer, w = a.write, r = a.read.css('display', 'block'), wi = a.write_inner, ri = a.read_inner, __content = this, h = ri.outerHeight(); o.add(r).animate({'height':h}, { queue: false, duration: time_to_reveal }); r.css({'z-index':front, 'height':h, 'top':wi.outerHeight()+'px'}).animate({'top':0}, { queue: true, duration: time_to_reveal, complete: function() { w.css({'position':'absolute', 'z-index':back}); r.css({'position':'relative', 'height':'auto', 'z-index':front}) o.css('height', 'auto')