Updated for opal 1.8.3 bug --> use 1.8.2

This commit is contained in:
G. Gibson 2026-08-06 18:41:49 -07:00
commit f50308f9e8
6 changed files with 133 additions and 7 deletions

View file

@ -117,7 +117,9 @@ module GxG
end
end
end
# email address -- TODO
unless result
# email address -- TODO
end
end
result
end

View file

@ -438,7 +438,7 @@ module GxG
path_array = []
queue = [(self)]
while queue.size > 0 do
entry = queue.unshift()
entry = queue.shift()
if entry
unless page() == entry
path_array << entry.title.to_s
@ -1155,12 +1155,86 @@ module GxG
# puts "Got: #{event_record.inspect}"
end
end
#
@event_handlers[(the_type)].call(event_record)
# TODO: switch in edit mode to object_selection_component_overly
if GxG::DISPLAY_DETAILS[:mode] == :browsing
GxG::DISPLAY_DETAILS[:target] = self
@event_handlers[(the_type)].call(event_record)
else
if GxG::DISPLAY_DETAILS[:mode] == :editing
if GxG::EDITMASK.keys.include?(@uuid)
GxG::DISPLAY_DETAILS[:target] = self
@event_handlers[(the_type)].call(event_record)
else
# ???
# edit object
GxG::DISPLAY_DETAILS[:target] = nil
page.editor_select_object(self,{})
end
else
# unsupported mode --> expansion
end
end
#
end
end
#
def editmask(options={:original_content => true})
process_queue = [(self)]
mask_queue = [(self)]
while process_queue.size > 0 do
entry = process_queue.shift
if entry
if options[:original_content] == true
if entry.respond_to?(:original_content)
entry.original_content.each_pair do |object_name, the_object|
process_queue << the_object
mask_queue << the_object
end
end
end
#
entry.content.each_pair do |object_name, the_object|
process_queue << the_object
mask_queue << the_object
end
end
end
mask_queue.each do |the_object|
unless GxG::EDITMASK[(the_object.uuid)]
GxG::EDITMASK[(the_object.uuid)] = the_object
end
end
true
end
#
def editunmask(options={:original_content => true})
process_queue = [(self)]
mask_queue = [(self)]
while process_queue.size > 0 do
entry = process_queue.shift
if entry
if options[:original_content] == true
if entry.respond_to?(:original_content)
entry.original_content.each_pair do |object_name, the_object|
process_queue << the_object
mask_queue << the_object
end
end
end
#
entry.content.each_pair do |object_name, the_object|
process_queue << the_object
mask_queue << the_object
end
end
end
mask_queue.each do |the_object|
tempobject = GxG::EDITMASK.delete(the_object.uuid)
end
true
end
# TODO: fix indent wierdness
def set_script(the_script_body="", alternate_target=nil)
result = false
if the_script_body.size > 0

View file

@ -1625,6 +1625,53 @@ module GxG
# ### Page supports
module Vdom
class Page
# Busy/Unbusy Supports:
def busy()
@busy
end
#
def set_busy(state=false)
if state == true
unless @busy == true
busy_overlay = {:component => "block", :options => {:title => "gxg_wait_overlay", :style => {:cursor => "wait", :opacity => 0.01, :"background-color" => "#ffffff", :position => "absolute", :top => "0px", :left => "0px", :width => "100%", :height => "100%", :"z-index" => 9999}}, :content => [], :script => ""}
busy_overlay[:script] = "
on(:mouseup,true) do |event|
end
on(:mousedown,true) do |event|
end
on(:mousemove,true) do |event|
end
on(:mouseenter,true) do |event|
end
on(:mouseleave,true) do |event|
end
"
self.build_components([{:parent => nil, :record => {:content => [(busy_overlay)]}, :element => self}])
@busy = true
end
else
if @busy == true
busy_overlay = self.find_object_by_title("gxg_wait_overlay")
if busy_overlay
self.unregister_object("gxg_wait_overlay")
busy_overlay.destroy
end
@busy = false
end
end
@busy
end
#
def editor_select_object(the_object=nil, options={})
result = false
#
if the_object
# Get top-left and height and width from native object
end
#
result
end
#
def window_open(build_source=nil, the_application=nil)
if build_source.is_a?(GxG::Database::DetachedHash)
self.build_components(self, [(build_source)], {:application => the_application})