Skip to content

Commit

Permalink
finnaly works
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleh committed Dec 28, 2013
1 parent 24d0976 commit b269fb0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions app/views/rails_admin/main/form_types/_form_tabbed.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
= form.localized_fields do |localized_field|
%li{ class: ( 'active' if localized_field.language == I18n.locale ) }
%a{ href: "##{localized_field.language}_#{field.method_name}", data: { toggle: "tab" } }= localized_field.language
.tab-content{ :style => 'float:left' }
.tab-content{ style: 'float:left' }
= form.localized_fields do |localized_field|
.fields.tab-pane{ id: "#{localized_field.language}_#{field.method_name}", class: ( 'active' if localized_field.language == I18n.locale ) }
.fields.tab-pane{ style: 'padding:5px',id: "#{localized_field.language}_#{field.method_name}", class: ( 'active' if localized_field.language == I18n.locale ) }
= localized_field.send field_type, field.method_name, html_attributes
22 changes: 11 additions & 11 deletions lib/rails_admin_mongo_loc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,29 +38,29 @@ class Textml < RailsAdmin::Config::Fields::Types::Text

end

class CodeMirrorml < RailsAdmin::Config::Fields::Types::CodeMirror
class CKEditorml < RailsAdmin::Config::Fields::Types::CKEditor
include ConfigureBasicType

register_instance_option :partial do
:form_code_mirrorml
:form_ck_editorml
end

end

class Wysihtml5ml < RailsAdmin::Config::Fields::Types::Wysihtml5
class CodeMirrorml < RailsAdmin::Config::Fields::Types::CodeMirror
include ConfigureBasicType

register_instance_option :partial do
:form_wysihtml5ml
:form_code_mirrorml
end

end

class CKEditorml < RailsAdmin::Config::Fields::Types::CKEditor
class Wysihtml5ml < RailsAdmin::Config::Fields::Types::Wysihtml5
include ConfigureBasicType

register_instance_option :partial do
:form_ck_editorml
:form_wysihtml5ml
end

end
Expand All @@ -82,21 +82,21 @@ class Stringml < RailsAdmin::Config::Fields::Types::String
RailsAdmin::Config::Fields.register_factory do |parent, properties, fields|

case properties[:name]
when :ck_editorml
fields << RailsAdmin::Config::Fields::Types::CKEditorml.new(parent, properties[:name], properties)
true
when :textml
fields << RailsAdmin::Config::Fields::Types::Textml.new(parent, properties[:name], properties)
true
when :stringml
fields << RailsAdmin::Config::Fields::Types::Stringml.new(parent, properties[:name], properties)
when :ck_editorml
fields << RailsAdmin::Config::Fields::Types::CKEditorml.new(parent, properties[:name], properties)
true
when :code_mirrorml
fields << RailsAdmin::Config::Fields::Types::CodeMirrorml.new(parent, properties[:name], properties)
true
when :wysihtml5ml
fields << RailsAdmin::Config::Fields::Types::Wysihtml5ml.new(parent, properties[:name], properties)
true
when :stringml
fields << RailsAdmin::Config::Fields::Types::Stringml.new(parent, properties[:name], properties)
true
else
false
end
Expand Down

0 comments on commit b269fb0

Please sign in to comment.