adds button and blocks tick over
This commit is contained in:
@ -1,8 +1,10 @@
|
||||
class BlocksModel < Volt::ArrayModel
|
||||
|
||||
def instruction_changed old , ins
|
||||
self.last._class_name = "" if( page._blocks.length > 0)
|
||||
self << { :name => ins.to_s , :class_name => "active" }
|
||||
self.last._class_name = "inactive" if( self.length > 0)
|
||||
self << { :name => ins.to_s , :class_name => "bright" }
|
||||
puts "block #{self.length}"
|
||||
self.delete_at(0) if( self.length > 5)
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -3,7 +3,7 @@ class RegisterModel < Volt::Model
|
||||
field :value
|
||||
|
||||
def register_changed reg , old , ins
|
||||
self.last._class_name = "" if( page._blocks.length > 0)
|
||||
self.last._class_name = "" if( self.length > 0)
|
||||
self << { :name => ins.to_s , :class_name => "active" }
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user