Permalink
Browse files

adds workbench position to permanent storage

  • Loading branch information...
MSchmidt committed Jun 3, 2010
1 parent 5b16648 commit 76fbda7ed868a5d4d921d0698aac10f238cfae88
@@ -6,7 +6,8 @@
hullo
.browser
- @domains.each do |domain|
.domain{:id => "domain#{domain.id}"}
- position_style = domain.workbench_x && domain.workbench_x ? "top: #{domain.workbench_y}px; left: #{domain.workbench_x}px" : ""
.domain{:id => "domain#{domain.id}", :style => position_style}
.domain-nob
.domain-info
%h1= h(domain.fqdn)
@@ -6,6 +6,8 @@ def self.up
t.string :mount_point
t.boolean :php, :default => false, :null => false
t.boolean :rails, :default => false, :null => false
t.integer :workbench_x
t.integer :workbench_y
t.timestamps
end
View
@@ -39,6 +39,8 @@
t.string "mount_point"
t.boolean "php", :default => false, :null => false
t.boolean "rails", :default => false, :null => false
t.integer "workbench_x"
t.integer "workbench_y"
t.datetime "created_at"
t.datetime "updated_at"
end
@@ -18,11 +18,7 @@ window.addEvent('domready', function(){
var infobar_fx = new Fx.Tween($('infobar'), {
property: 'height',
link: 'cancel',
onComplete: function(){
//$('infobar-collapsed').fade('toggle');
//$('infobar-expanded').fade('toggle');
}
link: 'cancel'
});
var infobar_original_height = $('infobar').getStyle('height');
@@ -39,6 +39,7 @@ window.addEvent('domready', function(){
i.getElement('.domain_path').set('html', i.retrieve('domain_path'));
i.getElement('.domain_changed').set('html', '0');
});
$('infobar').fade('out');
$('infobar-expanded').set('html', '');
event.stop();
@@ -55,10 +56,15 @@ window.addEvent('domready', function(){
}
}).post({
'_method': 'put',
'domain[mount_point]': i.getElement('.domain_path').get('html')
'domain[mount_point]': i.getElement('.domain_path').get('html'),
'domain[workbench_x]': i.getStyle('left'),
'domain[workbench_y]': i.getStyle('top')
});
}
});
$('infobar').fade('out');
$('infobar-expanded').set('html', '');
event.stop();
});

0 comments on commit 76fbda7

Please sign in to comment.