Skip to content

Commit

Permalink
Cleanup, ATP
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerry Gleason committed Jan 15, 2013
1 parent 8ac0c38 commit 2f1f8c2
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 22 deletions.
8 changes: 5 additions & 3 deletions lib/wagn/set/type/set.rb
@@ -1,6 +1,7 @@

module Wagn
module Set::Type::Set
module Set::Type
module Set
include Sets

format :base
Expand Down Expand Up @@ -47,7 +48,7 @@ def setting_groups


module Model
include Wagn::Set::Type::SearchType::Model
include SearchType::Model

def inheritable?
return true if junction_only?
Expand Down Expand Up @@ -83,7 +84,7 @@ def label
def setting_codes_by_group
test = Card::PointerID != ( templt = templt = fetch(:trait=>:content) || fetch(:trait=>:default) and
templt.type_id or (right_id == Card::TypeID ? left_id : trunk.type_id) )
Wagn::Set::Type::Setting::SETTING_GROUPS.reject {|k,v| test && k == :pointer_group }
Setting::SETTING_GROUPS.reject {|k,v| test && k == :pointer_group }
end

def prototype
Expand All @@ -92,5 +93,6 @@ def prototype
end

end
end
end
end
29 changes: 10 additions & 19 deletions lib/wagn/set/type/setting.rb
Expand Up @@ -16,6 +16,16 @@ module Set::SettingGroups
module Set::Type::Setting
include Sets

SETTING_GROUPS = {
:perms => [ :create, :read, :update, :delete, :comment ],
:look => [ :default, :content, :layout, :table_of_content ],
:com => [ :add_help, :edit_help, :send, :thanks ],
:pointer_group => [ :options, :options_label, :input ],
:other => [ :autoname, :accountable, :captcha ]
}

DEFAULT_CONFIG = {:seq=>9999}

format :base

define_view :core, :type=>'setting' do |args|
Expand All @@ -42,24 +52,5 @@ module Set::Type::Setting
%{<div class="instruction">#{process_content "{{+*right+*edit help}}"}</div>}
end

SETTING_GROUPS = {
:perms => [ :create, :read, :update, :delete, :comment ],
:look => [ :default, :content, :layout, :table_of_content ],
:com => [ :add_help, :edit_help, :send, :thanks ],
:pointer_group => [ :options, :options_label, :input ],
:other => [ :autoname, :accountable, :captcha ]
}

DEFAULT_CONFIG = {:seq=>9999}

module Model
def config key=nil
raise "who calls ???"
if @configs.nil?
#@configs = {}.merge( DEFAULT_CONFIGS[self.codename] || DEFAULT_CONFIG )
end
@configs
end
end
end
end
2 changes: 2 additions & 0 deletions lib/wagn/sets.rb
Expand Up @@ -35,6 +35,7 @@ def get_set_key selection_key, opts
key.to_sym
end

=begin
def get_module mod
module_name_parts = mod.split('::').map(&:to_sym)
module_name_parts.inject Wagn::Set do |base, part|
Expand All @@ -57,6 +58,7 @@ def namespace spc, &block
#warn "namespace2: #{spc.inspect} :: #{const}"
const.module_eval &block
end
=end
end

CARDLIB = "#{Rails.root}/lib/cardlib/*.rb"
Expand Down

0 comments on commit 2f1f8c2

Please sign in to comment.