Sha256: af9df8805b97727ccfdc41008bbfe36cf20357e3864e8a3db356b0ba981391cf

Contents?: true

Size: 1.02 KB

Versions: 20

Compression:

Stored size: 1.02 KB

Contents


module OMF::Web::Widget
      
  # Module containing all the layout widgets
  #
  module Layout

    def self.create_layout_widget(type, wdescr)
      case type.split('/')[1].to_s
      when 'one_column'
        require 'omf-web/widget/layout/one_column_layout'
        return OMF::Web::Widget::Layout::OneColumnLayout.new(wdescr)        
      when 'two_columns'
        require 'omf-web/widget/layout/two_columns_layout'
        return OMF::Web::Widget::Layout::TwoColumnsLayout.new(type, wdescr)        
      when 'stacked'
        require 'omf-web/widget/layout/stacked_layout'
        return OMF::Web::Widget::Layout::StackedLayout.new(wdescr)        
      when 'tabbed'
        require 'omf-web/widget/layout/tabbed_layout'
        return OMF::Web::Widget::Layout::TabbedLayout.new(wdescr)        
      when 'flow'
        require 'omf-web/widget/layout/flow_layout'
        return OMF::Web::Widget::Layout::FlowLayout.new(wdescr)        
      else
        raise "Unknown layout type '#{type}'"
      end
      
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
omf_web-1.2.9 lib/omf-web/widget/layout.rb
omf_web-1.2.8 lib/omf-web/widget/layout.rb
omf_web-1.2.7 lib/omf-web/widget/layout.rb
omf_web-1.2.6 lib/omf-web/widget/layout.rb
omf_web-1.2.5 lib/omf-web/widget/layout.rb
omf_web-1.2.4 lib/omf-web/widget/layout.rb
omf_web-1.2.3 lib/omf-web/widget/layout.rb
omf_web-1.2.2 lib/omf-web/widget/layout.rb
omf_web-1.2.1 lib/omf-web/widget/layout.rb
omf_web-1.2.0 lib/omf-web/widget/layout.rb
omf_web-1.0.0 lib/omf-web/widget/layout.rb
omf_web-0.9.9 lib/omf-web/widget/layout.rb
omf_web-0.9.8 lib/omf-web/widget/layout.rb
omf_web-0.9.7 lib/omf-web/widget/layout.rb
omf_web-0.9.6 lib/omf-web/widget/layout.rb
omf_web-0.9.5 lib/omf-web/widget/layout.rb
omf_web-0.9.4 lib/omf-web/widget/layout.rb
omf_web-0.9.3 lib/omf-web/widget/layout.rb
omf_web-0.9.1 lib/omf-web/widget/layout.rb
omf_web-0.9 lib/omf-web/widget/layout.rb