Sha256: b7235c597880e041120f9e3abc0e1cf7b17de9c0755ab9ed5f65b18af755ae87
Contents?: true
Size: 1.42 KB
Versions: 18
Compression:
Stored size: 1.42 KB
Contents
module BivouacSample::Views def drag_and_drop html do head do javascript_include_tag :defaults style do %(div.cart { clear:both; border:1px solid #E8A400; background-color:white; padding:8px; width:500px; } div.cart-active { background-color: #FFF4D8; }) end end body do h1 "drag_and_drop" span "Drag one of the folowing..." div( :id => "product-1", :style => "background-color: red; padding: 5px; width: 20px;", :class => "product" ) do; span "1"; end draggable_element( "product-1", :revert => 'true' ) div( :id => "product-2", :style => "background-color: blue; padding: 5px; width: 20px;", :class => "product" ) do; span "2"; end draggable_element( "product-2", :revert => 'true' ) div( :id => "product-3", :style => "background-color: green; padding: 5px; width: 20px;", :class => "product" ) do; span "3"; end draggable_element( "product-3", :revert => 'true' ) div( :id => "cart", :class => 'cart', :style => "clear: left; height: 132px; margin-top: 10px; position: relative;") do; span "Drop me something..."; end drop_receiving_element( "cart", :accept => 'product', :onDrop => { :url => R(DragAndDrop), :update => 'cart' }, :hoverclass => 'cart-active' ) end end end end
Version data entries
18 entries across 18 versions & 1 rubygems