From 48a23f87b490469228c0cc0bf8137aa05383c3c2 Mon Sep 17 00:00:00 2001 From: Marcos Roberto Date: Fri, 24 Apr 2015 16:11:20 -0300 Subject: [PATCH 01/11] Tarefa #218 adjusts forms!! --- app/assets/stylesheets/application.css.scss | 4 ++++ app/views/admin/groupings/_form.html.erb | 2 +- app/views/admin/notifications/_form.html.erb | 2 +- app/views/admin/roles/_form.html.erb | 2 +- app/views/admin/sites/_form.html.erb | 2 +- app/views/admin/users/edit.html.erb | 2 +- app/views/admin/users/new.html.erb | 2 +- app/views/profiles/edit.html.erb | 2 +- app/views/sites/_form.html.erb | 2 +- app/views/sites/admin/backups/index.html.erb | 2 +- app/views/sites/admin/layouts/settings.html.erb | 2 +- app/views/sites/admin/menus/_form.html.erb | 2 +- app/views/sites/admin/menus/menu_items/_form.html.erb | 2 +- app/views/sites/admin/pages/_form.html.erb | 2 +- .../repositories/_link_to_add_files_multiple.html.erb | 2 +- app/views/sites/admin/roles/_form.html.erb | 2 +- config/initializers/simple_form.rb | 8 +++----- lib/assets/javascripts/init/tinymce.js | 6 ++++-- vendor/assets/stylesheets/codeMirror/codemirror.css | 2 +- .../journal/app/views/journal/admin/news/_form.html.erb | 2 +- .../lib/weby/components/front_news/views/_show.html.erb | 2 +- 21 files changed, 29 insertions(+), 25 deletions(-) diff --git a/app/assets/stylesheets/application.css.scss b/app/assets/stylesheets/application.css.scss index b397f36e3..80baa208a 100755 --- a/app/assets/stylesheets/application.css.scss +++ b/app/assets/stylesheets/application.css.scss @@ -196,6 +196,10 @@ body.modal-open { border-bottom-right-radius: 4px; } +.tab-pane{ + padding: 19px; +} + .highlight:hover td{ background-color: #EEE !important; } diff --git a/app/views/admin/groupings/_form.html.erb b/app/views/admin/groupings/_form.html.erb index 1cf5ed0e2..a93407a89 100644 --- a/app/views/admin/groupings/_form.html.erb +++ b/app/views/admin/groupings/_form.html.erb @@ -1,4 +1,4 @@ -<%= simple_form_for [:admin, @grouping], html: { class: 'form-horizontal' } do |f| %> +<%= simple_form_for [:admin, @grouping] do |f| %> <%= f.show_errors %> <%= f.input :name %> diff --git a/app/views/admin/notifications/_form.html.erb b/app/views/admin/notifications/_form.html.erb index 7eacf7b3a..5a40d07eb 100755 --- a/app/views/admin/notifications/_form.html.erb +++ b/app/views/admin/notifications/_form.html.erb @@ -1,4 +1,4 @@ -<%= simple_form_for [:admin, @notification], html: { class: 'form-horizontal' } do |f| %> +<%= simple_form_for [:admin, @notification] do |f| %> <%= f.show_errors %> <%= f.input :title %> <%= f.input :body, diff --git a/app/views/admin/roles/_form.html.erb b/app/views/admin/roles/_form.html.erb index d62867e6f..f8fe75f33 100755 --- a/app/views/admin/roles/_form.html.erb +++ b/app/views/admin/roles/_form.html.erb @@ -1,4 +1,4 @@ -<%= simple_form_for [:admin, @role], html: { class: 'form-horizontal' } do |f| %> +<%= simple_form_for [:admin, @role] do |f| %> <%= f.show_errors %> <%= f.input :name %> diff --git a/app/views/admin/sites/_form.html.erb b/app/views/admin/sites/_form.html.erb index 8f78001e3..48b43f2e2 100755 --- a/app/views/admin/sites/_form.html.erb +++ b/app/views/admin/sites/_form.html.erb @@ -1,4 +1,4 @@ -<%= simple_form_for [:admin, @site], html: { class: 'form-horizontal' } do |f| %> +<%= simple_form_for [:admin, @site] do |f| %> <%= f.show_errors %> <%= f.input :name, :hint => t("field_required"), :input_html => {:pattern => '^[a-z0-9_\-]+$'} %> diff --git a/app/views/admin/users/edit.html.erb b/app/views/admin/users/edit.html.erb index f14106bca..8a1c5ead6 100755 --- a/app/views/admin/users/edit.html.erb +++ b/app/views/admin/users/edit.html.erb @@ -1,4 +1,4 @@ -<%= simple_form_for [:admin, @user], :url => admin_user_path, html: { class: 'form-horizontal' } do |f| %> +<%= simple_form_for [:admin, @user], :url => admin_user_path do |f| %> <%= f.show_errors %> <%= render :partial => "form", :object => f %> <% end %> diff --git a/app/views/admin/users/new.html.erb b/app/views/admin/users/new.html.erb index 6219fabed..866a5fd28 100755 --- a/app/views/admin/users/new.html.erb +++ b/app/views/admin/users/new.html.erb @@ -1,4 +1,4 @@ -<%= simple_form_for [:admin, @user], html: { class: 'form-horizontal' } do |f| %> +<%= simple_form_for [:admin, @user] do |f| %> <%= f.show_errors %> <%= render :partial => "form", :object => f %> <% end %> diff --git a/app/views/profiles/edit.html.erb b/app/views/profiles/edit.html.erb index f0f3ba251..ed0ddb649 100644 --- a/app/views/profiles/edit.html.erb +++ b/app/views/profiles/edit.html.erb @@ -1,5 +1,5 @@
-<%= simple_form_for @profile, url: profile_path, html: { class: 'form-horizontal' } do |f| %> +<%= simple_form_for @profile, url: profile_path do |f| %>
diff --git a/app/views/sites/_form.html.erb b/app/views/sites/_form.html.erb index 23c858fad..77b4a9522 100755 --- a/app/views/sites/_form.html.erb +++ b/app/views/sites/_form.html.erb @@ -1,4 +1,4 @@ -<%= simple_form_for @site, url: update_site_admin_path, html: { class: 'form-horizontal' } do |f| %> +<%= simple_form_for @site, url: update_site_admin_path do |f| %> <%= f.show_errors %> <%= repository_search t(".site_image"), "site_image", diff --git a/app/views/sites/admin/backups/index.html.erb b/app/views/sites/admin/backups/index.html.erb index 846a86cba..2f7d3704f 100644 --- a/app/views/sites/admin/backups/index.html.erb +++ b/app/views/sites/admin/backups/index.html.erb @@ -9,7 +9,7 @@
" id="backup"> - <%= form_tag site_admin_generate_path, html: { class: 'form-horizontal' }, method: 'get' do %> + <%= form_tag site_admin_generate_path, method: 'get' do %>
<%= t('.output') %> diff --git a/app/views/sites/admin/layouts/settings.html.erb b/app/views/sites/admin/layouts/settings.html.erb index c82949d9e..15c386bbe 100644 --- a/app/views/sites/admin/layouts/settings.html.erb +++ b/app/views/sites/admin/layouts/settings.html.erb @@ -1,6 +1,6 @@ <% breadcrumb :layout_settings %> -<%= simple_form_for current_site, url: settings_site_admin_layouts_path, html: { class: 'form-horizontal' } do |f| %> +<%= simple_form_for current_site, url: settings_site_admin_layouts_path do |f| %> <%= f.input :head_html, input_html: { id: 'code' }, hint: t('.head_html_hint') %>
diff --git a/app/views/sites/admin/menus/_form.html.erb b/app/views/sites/admin/menus/_form.html.erb index a3fbf005c..2f579bd02 100755 --- a/app/views/sites/admin/menus/_form.html.erb +++ b/app/views/sites/admin/menus/_form.html.erb @@ -1,4 +1,4 @@ -<%= simple_form_for [:site_admin, @menu], html: { class: 'form-horizontal' } do |f| %> +<%= simple_form_for [:site_admin, @menu] do |f| %> <%= f.show_errors %> <%= f.input :name, diff --git a/app/views/sites/admin/menus/menu_items/_form.html.erb b/app/views/sites/admin/menus/menu_items/_form.html.erb index ad3c34f9d..b66d765f2 100755 --- a/app/views/sites/admin/menus/menu_items/_form.html.erb +++ b/app/views/sites/admin/menus/menu_items/_form.html.erb @@ -1,5 +1,5 @@ <% title ".menus" %> -<%= simple_form_for [:site_admin, @menu, @menu_item], html: { class: 'form-horizontal' } do |f| %> +<%= simple_form_for [:site_admin, @menu, @menu_item] do |f| %> <%= f.show_errors %> <% if @menu_item_parent %> diff --git a/app/views/sites/admin/pages/_form.html.erb b/app/views/sites/admin/pages/_form.html.erb index 901dcccb1..177f3d5a6 100755 --- a/app/views/sites/admin/pages/_form.html.erb +++ b/app/views/sites/admin/pages/_form.html.erb @@ -1,4 +1,4 @@ -<%= simple_form_for [:site_admin, @page], html: { class: 'form-horizontal' } do |f| %> +<%= simple_form_for [:site_admin, @page] do |f| %> <%= f.show_errors %> <%= render('translates_form', f: f) %> diff --git a/app/views/sites/admin/repositories/_link_to_add_files_multiple.html.erb b/app/views/sites/admin/repositories/_link_to_add_files_multiple.html.erb index 36ab6dca5..df69d1325 100755 --- a/app/views/sites/admin/repositories/_link_to_add_files_multiple.html.erb +++ b/app/views/sites/admin/repositories/_link_to_add_files_multiple.html.erb @@ -1,5 +1,5 @@
-
+
<%= link_to link_title, "#", {data: {:'place-name' => place_name, :'field-name' => field_name, :'multiple' => multiple, :'file-types' => file_types.to_s}, class: 'add-button btn btn-info'} %> diff --git a/app/views/sites/admin/roles/_form.html.erb b/app/views/sites/admin/roles/_form.html.erb index e98dc44de..083f99f64 100755 --- a/app/views/sites/admin/roles/_form.html.erb +++ b/app/views/sites/admin/roles/_form.html.erb @@ -1,4 +1,4 @@ -<%= simple_form_for [:site_admin, @role], html: { class: 'form-horizontal' } do |f| %> +<%= simple_form_for [:site_admin, @role] do |f| %> <%= f.show_errors %> <%= f.input :site_id, :input_html => {:value => @site.id}, :as => :hidden if @site %> diff --git a/config/initializers/simple_form.rb b/config/initializers/simple_form.rb index e65dd957c..e2f946069 100644 --- a/config/initializers/simple_form.rb +++ b/config/initializers/simple_form.rb @@ -81,11 +81,9 @@ def input_html_classes b.use :placeholder b.optional :pattern b.optional :readonly - b.use :label, wrap_with: { class: 'col-md-3 control-label' } - b.wrapper tag: 'div', class: 'col-md-7' do |input_block| - input_block.use :input - input_block.use :hint, wrap_with: { tag: 'span', class: 'help-block' } - end + b.use :label + b.use :input + b.use :hint, wrap_with: { tag: 'span', class: 'help-block' } b.use :error, wrap_with: { tag: 'span', class: 'help-block has-error' } end diff --git a/lib/assets/javascripts/init/tinymce.js b/lib/assets/javascripts/init/tinymce.js index 771ed4368..7f9e852fa 100644 --- a/lib/assets/javascripts/init/tinymce.js +++ b/lib/assets/javascripts/init/tinymce.js @@ -93,7 +93,8 @@ $(document).ready(function() { relative_urls: false, toolbar_items_size: 'small', file_browser_callback: callback, - setup: editorSetup + setup: editorSetup, + resize: "both" }); $('textarea.mceSimple').tinymce({ @@ -109,7 +110,8 @@ $(document).ready(function() { file_browser_callback: callback, toolbar: "undo redo | bold italic underline strikethrough | forecolor backcolor | alignleft aligncenter alignright alignjustify | bullist numlist | link unlink image | removeformat | code preview fullscreen", language : $("html").attr("lang"), - setup: editorSetup + setup: editorSetup, + resize: "both" }); }); diff --git a/vendor/assets/stylesheets/codeMirror/codemirror.css b/vendor/assets/stylesheets/codeMirror/codemirror.css index aa829a12c..bf329e400 100644 --- a/vendor/assets/stylesheets/codeMirror/codemirror.css +++ b/vendor/assets/stylesheets/codeMirror/codemirror.css @@ -92,7 +92,7 @@ word-break: normal; } .CodeMirror-wrap .CodeMirror-scroll { - overflow-x: hidden; + /*overflow-x: hidden;*/ } .CodeMirror textarea { diff --git a/vendor/engines/journal/app/views/journal/admin/news/_form.html.erb b/vendor/engines/journal/app/views/journal/admin/news/_form.html.erb index aeb46d7d2..bfd139007 100644 --- a/vendor/engines/journal/app/views/journal/admin/news/_form.html.erb +++ b/vendor/engines/journal/app/views/journal/admin/news/_form.html.erb @@ -1,4 +1,4 @@ -<%= simple_form_for [:admin, @news], html: { class: 'form-horizontal' } do |f| %> +<%= simple_form_for [:admin, @news] do |f| %> <%= f.input :site_id, as: :hidden, input_html: {value: current_site.id} %> <%= f.show_errors %> diff --git a/vendor/engines/journal/lib/weby/components/front_news/views/_show.html.erb b/vendor/engines/journal/lib/weby/components/front_news/views/_show.html.erb index afa1287b7..74e1580a5 100644 --- a/vendor/engines/journal/lib/weby/components/front_news/views/_show.html.erb +++ b/vendor/engines/journal/lib/weby/components/front_news/views/_show.html.erb @@ -25,7 +25,7 @@ <%= t(".posted_by") %><%= news.user.name_or_login %> <% end %> <% if component.show_date %> - <%= t(".posted_on") %><%= localize news.created_at, format: :medium %> + <%= t(".posted_on") %><%= localize news.i18ns.first.updated_at, format: :medium %> <% end %>

<% end %> From 3f8cc1a3ef6df8b87bed70f46bcc5155138814f4 Mon Sep 17 00:00:00 2001 From: Marcos Roberto Date: Tue, 28 Apr 2015 16:05:02 -0300 Subject: [PATCH 02/11] Tarefa #218 adjusts css forms!! --- app/assets/stylesheets/application.css.scss | 6 ++++++ app/views/sites/_form.html.erb | 2 +- app/views/sites/admin/components/_form.html.erb | 2 +- .../sites/admin/menus/menu_items/_form.html.erb | 6 +++--- .../sites/admin/pages/_target_dialog_input.html.erb | 2 +- config/initializers/simple_form.rb | 12 +++++------- lib/weby/components/image/views/_form.html.erb | 2 +- .../institutional_links/views/_form.html.erb | 2 +- lib/weby/components/menu/views/_form.html.erb | 2 +- .../menu_accessibility/views/_form.html.erb | 6 +++--- lib/weby/components/menu_i18n/views/_form.html.erb | 2 +- .../components/news_as_home/views/_form.html.erb | 4 ++-- .../components/photo_slider/views/_form.html.erb | 4 ++-- vendor/assets/stylesheets/codeMirror/codemirror.css | 3 ++- .../calendar/admin/events/_translates_form.html.erb | 2 +- .../app/views/journal/admin/news/_form.html.erb | 2 +- .../weby/components/front_news/views/_form.html.erb | 8 ++++---- .../weby/components/news_list/views/_form.html.erb | 8 ++++---- .../weby/components/banner_list/views/_form.html.erb | 4 ++-- 19 files changed, 42 insertions(+), 37 deletions(-) diff --git a/app/assets/stylesheets/application.css.scss b/app/assets/stylesheets/application.css.scss index 80baa208a..29d6de4bf 100755 --- a/app/assets/stylesheets/application.css.scss +++ b/app/assets/stylesheets/application.css.scss @@ -200,6 +200,10 @@ body.modal-open { padding: 19px; } +.optional{ + margin-left: 0px !important; +} + .highlight:hover td{ background-color: #EEE !important; } @@ -292,6 +296,8 @@ input[type="checkbox"].toggle { margin-top: 0; } } .form-group { margin-top: 20px; + margin-left: 0px !important; + label{font-weight: bold !important;} } //Paginator diff --git a/app/views/sites/_form.html.erb b/app/views/sites/_form.html.erb index 77b4a9522..4416e67a4 100755 --- a/app/views/sites/_form.html.erb +++ b/app/views/sites/_form.html.erb @@ -17,7 +17,7 @@ <%= f.input :title, :input_html => {:maxlength => 50} %> <%= f.input :description, :input_html => {:rows => 8}, :hint => t(".site_comments"), :as => :text %> - <%= f.input :view_desc_pages, :hint => t(".view_desc_pages_help"), :as => :boolean %> + <%= f.input :view_desc_pages, :hint => t(".view_desc_pages_help"), :as => :boolean, wrapper: :checkbox %> <%= f.input :theme, :collection => @themes.collect{|name| [t("themes.#{name}.title"), name]} %> <%= f.input :body_width, :hint => t(".example_width") %> <%= f.input :per_page, :hint => t(".example_per_page") %> diff --git a/app/views/sites/admin/components/_form.html.erb b/app/views/sites/admin/components/_form.html.erb index dbf0ddf79..fdb3080de 100755 --- a/app/views/sites/admin/components/_form.html.erb +++ b/app/views/sites/admin/components/_form.html.erb @@ -11,7 +11,7 @@ <%= render_component @component, 'form', locals: {f: f} %>
- <%= f.input :publish , wrapper_html: { class: "side" }, as: :boolean, input_html: { class: "check-button" } %> + <%= f.input :publish, wrapper: :checkbox, wrapper_html: { class: "side" }, as: :boolean, input_html: { class: "check-button" } %> <%= f.input :visibility, collection: [ [t(".always"),"0"], diff --git a/app/views/sites/admin/menus/menu_items/_form.html.erb b/app/views/sites/admin/menus/menu_items/_form.html.erb index b66d765f2..cebedf78b 100755 --- a/app/views/sites/admin/menus/menu_items/_form.html.erb +++ b/app/views/sites/admin/menus/menu_items/_form.html.erb @@ -16,7 +16,7 @@ <%= each_i18n_tab available_locales(@menu_item) do |locale| %> <%= f.i18ns_fields_for(locale) do |g| %> <% unless g.object.id.blank? %> - <%= g.input :_destroy, as: :boolean %> + <%= g.input :_destroy, wrapper: :checkbox, as: :boolean %> <% end %> <%= g.input :title, placeholder: t(".title"), @@ -31,12 +31,12 @@ <%= target_dialog_input(f, :target, true) %>
- <%= f.input :new_tab, + <%= f.input :new_tab, wrapper: :checkbox, as: :boolean, input_html: { class: "check-button" } %>
- <%= f.input :publish, + <%= f.input :publish, wrapper: :checkbox, as: :boolean, input_html: { class: "check-button" } %>
diff --git a/app/views/sites/admin/pages/_target_dialog_input.html.erb b/app/views/sites/admin/pages/_target_dialog_input.html.erb index cc383979c..ae1b11383 100755 --- a/app/views/sites/admin/pages/_target_dialog_input.html.erb +++ b/app/views/sites/admin/pages/_target_dialog_input.html.erb @@ -3,7 +3,7 @@
<%= f.input field_name, :wrapper => :append do %> - <%= f.input_field field_name, as: :string, + <%= f.input_field field_name, as: :string, disabled: !editable_url, value: editable_url ? f.object.send(field_name) : f.object.send(field_name).try(:title), placeholder: editable_url ? "" : t("target_dialog.none_selected"), diff --git a/config/initializers/simple_form.rb b/config/initializers/simple_form.rb index e2f946069..14af307fb 100644 --- a/config/initializers/simple_form.rb +++ b/config/initializers/simple_form.rb @@ -32,11 +32,10 @@ def input_html_classes config.wrappers :append, tag: 'div', class: 'form-group', error_class: 'has-error' do |b| b.use :html5 b.use :placeholder - b.use :label, wrap_with: { class: 'col-md-3 control-label' } - b.wrapper tag: 'div', class: 'col-md-7' do |append| + b.use :label + b.wrapper tag: 'div', class: 'url' do |append| append.use :input, wrap_with: { tag: 'div', class: 'input-group' } end - b.use :hint, wrap_with: { tag: 'span', class: 'help-block' } b.use :error, wrap_with: { tag: 'span', class: 'help-block has-error' } end @@ -65,11 +64,10 @@ def input_html_classes config.wrappers :checkbox, tag: 'div', class: 'form-group', error_class: 'has-error' do |b| b.use :html5 - b.use :label, wrap_with: { class: 'col-md-3 control-label' } - b.wrapper tag: 'div', class: 'col-md-7' do |input_block| - input_block.use :input - input_block.use :hint, wrap_with: { tag: 'span', class: 'help-block' } + b.wrapper tag: 'div', class: 'checkbox' do |ba| + ba.use :label_input end + b.use :hint, wrap_with: { tag: 'span', class: 'help-block' } b.use :error, wrap_with: { tag: 'span', class: 'help-block has-error' } end diff --git a/lib/weby/components/image/views/_form.html.erb b/lib/weby/components/image/views/_form.html.erb index de8b680cb..5090a4674 100644 --- a/lib/weby/components/image/views/_form.html.erb +++ b/lib/weby/components/image/views/_form.html.erb @@ -6,7 +6,7 @@ <%= target_dialog_input f, :target, true %> -<%= f.input :new_tab, as: :boolean %> +<%= f.input :new_tab, wrapper: :checkbox, as: :boolean %> <%= f.input :html_class, :input_html => {:pattern => '^[A-Za-z0-9_\-]*$'} %> diff --git a/lib/weby/components/institutional_links/views/_form.html.erb b/lib/weby/components/institutional_links/views/_form.html.erb index c08c63567..9f2d645d3 100644 --- a/lib/weby/components/institutional_links/views/_form.html.erb +++ b/lib/weby/components/institutional_links/views/_form.html.erb @@ -6,5 +6,5 @@ priority: component.format, include_blank: false %> -<%= f.input :new_tab, as: :boolean %> +<%= f.input :new_tab, wrapper: :checkbox, as: :boolean %> <%= f.input :html_class %> \ No newline at end of file diff --git a/lib/weby/components/menu/views/_form.html.erb b/lib/weby/components/menu/views/_form.html.erb index 2295df0d6..32b78dcd9 100644 --- a/lib/weby/components/menu/views/_form.html.erb +++ b/lib/weby/components/menu/views/_form.html.erb @@ -2,4 +2,4 @@ priority: component.menu_id, include_blank: false %> -<%= f.input :dropdown, hint: t(".dropdown_hint"), as: :boolean %> +<%= f.input :dropdown, hint: t(".dropdown_hint"), wrapper: :checkbox, as: :boolean %> diff --git a/lib/weby/components/menu_accessibility/views/_form.html.erb b/lib/weby/components/menu_accessibility/views/_form.html.erb index 4cc3b0358..9e067b86e 100644 --- a/lib/weby/components/menu_accessibility/views/_form.html.erb +++ b/lib/weby/components/menu_accessibility/views/_form.html.erb @@ -10,20 +10,20 @@
- <%= f.input :contrast, :label => t("menu_accessibility.views.form.contrast"), :as => :boolean %> + <%= f.input :contrast, :label => t("menu_accessibility.views.form.contrast"), wrapper: :checkbox, :as => :boolean %> <%= each_i18n_tab do |locale| %> <%= f.component_i18n_input locale, :label_contrast, :as => :string %> <% end %> - <%= f.input :font_size, :label => t("menu_accessibility.views.form.font_size"), :as => :boolean %> + <%= f.input :font_size, :label => t("menu_accessibility.views.form.font_size"), wrapper: :checkbox, :as => :boolean %> <%= each_i18n_tab do |locale| %> <%= f.component_i18n_input locale, :label_font_size, :as => :string %> <% end %>
- <%= f.input :extended_accessibility, as: :boolean %> + <%= f.input :extended_accessibility, wrapper: :checkbox, as: :boolean %>
<%= each_i18n_tab do |locale| %> <%= f.component_i18n_input locale, :additional_information, diff --git a/lib/weby/components/menu_i18n/views/_form.html.erb b/lib/weby/components/menu_i18n/views/_form.html.erb index 4f113f5dd..346521025 100644 --- a/lib/weby/components/menu_i18n/views/_form.html.erb +++ b/lib/weby/components/menu_i18n/views/_form.html.erb @@ -1 +1 @@ -<%= f.input :dropdown, as: :boolean %> +<%= f.input :dropdown, wrapper: :checkbox, as: :boolean %> diff --git a/lib/weby/components/news_as_home/views/_form.html.erb b/lib/weby/components/news_as_home/views/_form.html.erb index f7b09470e..cc0e5aae6 100644 --- a/lib/weby/components/news_as_home/views/_form.html.erb +++ b/lib/weby/components/news_as_home/views/_form.html.erb @@ -1,4 +1,4 @@ <%= target_dialog_input(f, :page, false, false) %> -<%= f.input :show_title, as: :boolean %> -<%= f.input :show_info, as: :boolean %> +<%= f.input :show_title, wrapper: :checkbox, as: :boolean %> +<%= f.input :show_info, wrapper: :checkbox, as: :boolean %> diff --git a/lib/weby/components/photo_slider/views/_form.html.erb b/lib/weby/components/photo_slider/views/_form.html.erb index e716166c4..feb216e22 100644 --- a/lib/weby/components/photo_slider/views/_form.html.erb +++ b/lib/weby/components/photo_slider/views/_form.html.erb @@ -5,8 +5,8 @@ <%= f.input :width %> <%= f.input :height %> <%= f.input :timer, as: :integer, hint: t(".timer_hint") %> -<%= f.input :description, as: :boolean %> -<%= f.input :show_controls, as: :boolean, hint: t(".control_hint") %> +<% f.input :description, wrapper: :checkbox, as: :boolean %> +<%= f.input :show_controls, wrapper: :checkbox, as: :boolean, hint: t(".control_hint") %> <%= repository_search t(".add_photo"), "photo_ids", "photo_slider_component[photo_ids][]", component.generate_vector_images, multiple: true, file_types: 'image' %> diff --git a/vendor/assets/stylesheets/codeMirror/codemirror.css b/vendor/assets/stylesheets/codeMirror/codemirror.css index bf329e400..0c5285ee5 100644 --- a/vendor/assets/stylesheets/codeMirror/codemirror.css +++ b/vendor/assets/stylesheets/codeMirror/codemirror.css @@ -3,6 +3,7 @@ line-height: 1em; font-family: monospace; + lineWrapping: true; /* Necessary so the scrollbar can be absolutely positioned within the wrapper on Lion. */ position: relative; /* This prevents unwanted scrollbars from showing up on the body and wrapper in IE. */ @@ -96,7 +97,7 @@ } .CodeMirror textarea { - outline: none !important; + /*outline: none !important;*/ } .CodeMirror pre.CodeMirror-cursor { diff --git a/vendor/engines/calendar/app/views/calendar/admin/events/_translates_form.html.erb b/vendor/engines/calendar/app/views/calendar/admin/events/_translates_form.html.erb index a27c71515..5d84b2ae9 100644 --- a/vendor/engines/calendar/app/views/calendar/admin/events/_translates_form.html.erb +++ b/vendor/engines/calendar/app/views/calendar/admin/events/_translates_form.html.erb @@ -1,6 +1,6 @@ <%= each_i18n_tab available_locales(@event) do |locale| %> <%= f.i18ns_fields_for(locale) do |g| %> - <%= g.input :_destroy, as: :boolean if g.object.try(:id) %> + <%= g.input :_destroy, wrapper: :checkbox, as: :boolean if g.object.try(:id) %> <%= g.input :name %> <%= g.input :place %> <%= g.input :information, diff --git a/vendor/engines/journal/app/views/journal/admin/news/_form.html.erb b/vendor/engines/journal/app/views/journal/admin/news/_form.html.erb index bfd139007..c3c7a7c77 100644 --- a/vendor/engines/journal/app/views/journal/admin/news/_form.html.erb +++ b/vendor/engines/journal/app/views/journal/admin/news/_form.html.erb @@ -19,7 +19,7 @@ <%= g.input :site_id, as: :hidden, input_html: {value: current_site.id} %> <%= g.input :category_list, :hint => t(".page_categories_help"), input_html: {class: 'input-xlarge input-category', data: {tags: Journal::NewsSite.uniq_category_counts.map{|t| t.name }}} %> <%= g.input :date_begin_at, :hint => t(".date_begin_hint") %> - <%= g.input :front %> + <%= g.input :front, wrapper: :checkbox %> <%= g.input :date_end_at, :hint => t(".date_end_hint") %> <% end %> diff --git a/vendor/engines/journal/lib/weby/components/front_news/views/_form.html.erb b/vendor/engines/journal/lib/weby/components/front_news/views/_form.html.erb index 0ddd051e1..9d1e520db 100644 --- a/vendor/engines/journal/lib/weby/components/front_news/views/_form.html.erb +++ b/vendor/engines/journal/lib/weby/components/front_news/views/_form.html.erb @@ -35,9 +35,9 @@ <%= f.input :avatar_width, as: :integer %> <%= f.input :avatar_height, as: :integer %> - <%= f.input :read_more, as: :boolean %> - <%= f.input :show_author, as: :boolean %> - <%= f.input :show_date, as: :boolean %> + <%= f.input :read_more, wrapper: :checkbox, as: :boolean %> + <%= f.input :show_author, wrapper: :checkbox, as: :boolean %> + <%= f.input :show_date, wrapper: :checkbox, as: :boolean %> <%= each_i18n_tab do |locale| %> <%= f.component_i18n_input locale, :link_to_all, :as => :string, hint: t(".link_to_all_hint") %> <% end %> @@ -46,7 +46,7 @@ priority: component.order_by, include_blank: false %> - <%= f.input :new_tab, as: :boolean %> + <%= f.input :new_tab, wrapper: :checkbox, as: :boolean %>
diff --git a/vendor/engines/journal/lib/weby/components/news_list/views/_form.html.erb b/vendor/engines/journal/lib/weby/components/news_list/views/_form.html.erb index 092b59194..ab5e793e3 100644 --- a/vendor/engines/journal/lib/weby/components/news_list/views/_form.html.erb +++ b/vendor/engines/journal/lib/weby/components/news_list/views/_form.html.erb @@ -7,15 +7,15 @@ include_blank: t(".no_category_filter"), input_html: { style: 'width: 325px' } %> -<%= f.input :front, as: :boolean %> +<%= f.input :front, wrapper: :checkbox, as: :boolean %> <%= f.input :quant, as: :integer %> -<%= f.input :new_tab, as: :boolean %> -<%= f.input :show_image, as: :boolean %> +<%= f.input :new_tab, wrapper: :checkbox, as: :boolean %> +<%= f.input :show_image, wrapper: :checkbox, as: :boolean %> <%= f.input :image_size, collection: component.image_sizes, priority: component.image_size, include_blank: false %> -<%= f.input :show_date, as: :boolean %> +<%= f.input :show_date, wrapper: :checkbox, as: :boolean %> <%= f.input :date_format, collection: component.date_formats.map{|format| [l(Time.now, format: format.to_sym), format] }, priority: component.date_format, include_blank: false diff --git a/vendor/engines/sticker/lib/weby/components/banner_list/views/_form.html.erb b/vendor/engines/sticker/lib/weby/components/banner_list/views/_form.html.erb index b11c6298b..730f6f7d1 100644 --- a/vendor/engines/sticker/lib/weby/components/banner_list/views/_form.html.erb +++ b/vendor/engines/sticker/lib/weby/components/banner_list/views/_form.html.erb @@ -14,7 +14,7 @@ %>
<%= f.input :timer, as: :integer, hint: t(".timer_hint") %> - <%= f.input :description, as: :boolean %> - <%= f.input :show_controls, as: :boolean, hint: t(".control_hint") %> + <%= f.input :description, wrapper: :checkbox, as: :boolean %> + <%= f.input :show_controls, wrapper: :checkbox, as: :boolean, hint: t(".control_hint") %>
From d6f0861af7c094c92e5467d0e0f7fd0211ace9d9 Mon Sep 17 00:00:00 2001 From: Marcos Roberto Date: Thu, 30 Apr 2015 09:56:42 -0300 Subject: [PATCH 03/11] Tarefa #218 adjusts forms and css!! --- app/assets/stylesheets/application.css.scss | 17 +++++++++++++---- app/views/sites/admin/components/_form.html.erb | 5 ----- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/app/assets/stylesheets/application.css.scss b/app/assets/stylesheets/application.css.scss index 29d6de4bf..1115d4ba2 100755 --- a/app/assets/stylesheets/application.css.scss +++ b/app/assets/stylesheets/application.css.scss @@ -269,8 +269,10 @@ div#available_components div > div.thumbnail img { background-color: #DFF0D8 !important; } -input[type="checkbox"].toggle { margin-top: 0; } - +input[type="checkbox"].toggle { margin-top: 0;} +input[type="checkbox"] { + margin: 3px 0 0; +} .nav-header { text-transform: uppercase; font-size: 11px; @@ -297,7 +299,9 @@ input[type="checkbox"].toggle { margin-top: 0; } .form-group { margin-top: 20px; margin-left: 0px !important; - label{font-weight: bold !important;} + label{ + font-weight: bold !important; + } } //Paginator @@ -316,7 +320,12 @@ input[type="checkbox"].toggle { margin-top: 0; } } li .checkbox { - height: 20px; + height: 10px; + margin: 3px 0px 0px !important; +} + +.checkbox label { + padding-left: 5px; } .center{ diff --git a/app/views/sites/admin/components/_form.html.erb b/app/views/sites/admin/components/_form.html.erb index fdb3080de..b2c0900ac 100755 --- a/app/views/sites/admin/components/_form.html.erb +++ b/app/views/sites/admin/components/_form.html.erb @@ -22,10 +22,7 @@ %>
-
-
-
<% if params[:placeholder] %> <% if params[:placeholder].match(/^\d*$/) %> <% group = current_site.components.find_by(id: params[:placeholder].to_i) %> @@ -44,8 +41,6 @@ <% end %> <% end %> <%= f.input :place_holder, as: :hidden, input_html: {id: "component_place_holder"} %> -
-
<%= f.button :submit, class: 'btn btn-primary', disable_with: t("please_wait") %> From 665f13f04f9e573052365df81c16cf79d0cf595e Mon Sep 17 00:00:00 2001 From: Marcos Roberto Date: Thu, 30 Apr 2015 10:10:50 -0300 Subject: [PATCH 04/11] Tarefa #218 adjusts forms and css 1!! --- app/assets/stylesheets/application.css.scss | 1 - .../lib/weby/components/event_list/views/_form.html.erb | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/assets/stylesheets/application.css.scss b/app/assets/stylesheets/application.css.scss index 1115d4ba2..57b0f1490 100755 --- a/app/assets/stylesheets/application.css.scss +++ b/app/assets/stylesheets/application.css.scss @@ -321,7 +321,6 @@ input[type="checkbox"] { li .checkbox { height: 10px; - margin: 3px 0px 0px !important; } .checkbox label { diff --git a/vendor/engines/calendar/lib/weby/components/event_list/views/_form.html.erb b/vendor/engines/calendar/lib/weby/components/event_list/views/_form.html.erb index cc69d5c53..7f43eb3eb 100644 --- a/vendor/engines/calendar/lib/weby/components/event_list/views/_form.html.erb +++ b/vendor/engines/calendar/lib/weby/components/event_list/views/_form.html.erb @@ -43,7 +43,7 @@ <%= f.component_i18n_input locale, :link_to_all, :as => :string, hint: t(".link_to_all_hint") %> <% end %> - <%= f.input :read_more, as: :boolean %> + <%= f.input :read_more, wrapper: :checkbox, as: :boolean %>
From 75136a3955d25c67ab1d2402661b21ff7a330462 Mon Sep 17 00:00:00 2001 From: Marcos Roberto Date: Thu, 30 Apr 2015 11:15:30 -0300 Subject: [PATCH 05/11] Tarefa #218 adjusts forms and css 2!! --- app/assets/stylesheets/application.css.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/app/assets/stylesheets/application.css.scss b/app/assets/stylesheets/application.css.scss index 57b0f1490..0036a3a52 100755 --- a/app/assets/stylesheets/application.css.scss +++ b/app/assets/stylesheets/application.css.scss @@ -299,6 +299,7 @@ input[type="checkbox"] { .form-group { margin-top: 20px; margin-left: 0px !important; + padding-right: 10px; label{ font-weight: bold !important; } From 8af1e7289ca02a084dce8747e75fe305b62b443c Mon Sep 17 00:00:00 2001 From: Marcos Roberto Date: Thu, 30 Apr 2015 11:27:53 -0300 Subject: [PATCH 06/11] Tarefa #218 change img background-color!! --- app/assets/stylesheets/application.css.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/app/assets/stylesheets/application.css.scss b/app/assets/stylesheets/application.css.scss index 0036a3a52..9255b0dd9 100755 --- a/app/assets/stylesheets/application.css.scss +++ b/app/assets/stylesheets/application.css.scss @@ -241,6 +241,7 @@ body.modal-open { #repo_list > div.row > div > div > a > img{ height: 160px; + background-color: #F5F5F5; } From fdbb5fcb1d74f4e6481f996f958b75887c35262f Mon Sep 17 00:00:00 2001 From: Marcos Roberto Date: Thu, 30 Apr 2015 16:16:13 -0300 Subject: [PATCH 07/11] Tarefa #218 adjusts forms!! --- app/views/sites/admin/pages/_translates_form.html.erb | 2 +- app/views/sites/admin/styles/_form.html.erb | 2 +- .../app/views/journal/admin/news/_translates_form.html.erb | 2 +- .../sticker/app/views/sticker/admin/banners/_form.html.erb | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/views/sites/admin/pages/_translates_form.html.erb b/app/views/sites/admin/pages/_translates_form.html.erb index 6256a90ba..0d24860b1 100755 --- a/app/views/sites/admin/pages/_translates_form.html.erb +++ b/app/views/sites/admin/pages/_translates_form.html.erb @@ -1,6 +1,6 @@ <%= each_i18n_tab available_locales(@page) do |locale| %> <%= f.i18ns_fields_for(locale) do |g| %> - <%= g.input :_destroy, as: :boolean if g.object.try(:id) %> + <%= g.input :_destroy, wrapper: :checkbox, as: :boolean if g.object.try(:id) %> <%= g.input :title %> <%= g.input :text, input_html: {class: "mceAdvance", style: " height: 320px;"}, diff --git a/app/views/sites/admin/styles/_form.html.erb b/app/views/sites/admin/styles/_form.html.erb index 4939b9054..3f784cca8 100755 --- a/app/views/sites/admin/styles/_form.html.erb +++ b/app/views/sites/admin/styles/_form.html.erb @@ -4,7 +4,7 @@ <%= f.input :name, hint: t("field_required") %> - <%= f.input :publish , wrapper_html: { class: "side" }, as: :boolean, input_html: { class: "check-button" } %> + <%= f.input :publish, wrapper: :checkbox, wrapper_html: { class: "side" }, as: :boolean, input_html: { class: "check-button" } %> <% unless @style.new_record? %>
diff --git a/vendor/engines/journal/app/views/journal/admin/news/_translates_form.html.erb b/vendor/engines/journal/app/views/journal/admin/news/_translates_form.html.erb index 98a8b71b1..d76c8814b 100644 --- a/vendor/engines/journal/app/views/journal/admin/news/_translates_form.html.erb +++ b/vendor/engines/journal/app/views/journal/admin/news/_translates_form.html.erb @@ -1,6 +1,6 @@ <%= each_i18n_tab available_locales(@news) do |locale| %> <%= f.i18ns_fields_for(locale) do |g| %> - <%= g.input :_destroy, as: :boolean if g.object.try(:id) %> + <%= g.input :_destroy, wrapper: :checkbox, as: :boolean if g.object.try(:id) %> <%= g.input :title %> <%= g.input :summary, input_html: {class: "mceSimple", style: "height: 180px;"}, diff --git a/vendor/engines/sticker/app/views/sticker/admin/banners/_form.html.erb b/vendor/engines/sticker/app/views/sticker/admin/banners/_form.html.erb index e9784706a..a0fae35a1 100755 --- a/vendor/engines/sticker/app/views/sticker/admin/banners/_form.html.erb +++ b/vendor/engines/sticker/app/views/sticker/admin/banners/_form.html.erb @@ -31,7 +31,7 @@ <%= f.input :position, hint: t(".lower_numbers_come_first") %>
- <%= f.input :publish, + <%= f.input :publish, wrapper: :checkbox, wrapper_html: { class: "side" }, as: :boolean, input_html: { class: "check-button" } %>
@@ -52,7 +52,7 @@ <% end %>
- <%= f.input :new_tab, + <%= f.input :new_tab, wrapper: :checkbox, wrapper_html: { class: "side" }, as: :boolean, input_html: { class: "check-button" } %>
From 86ba38c52b995a0ce863ddd354da94bba14f5e76 Mon Sep 17 00:00:00 2001 From: Marcos Roberto Date: Mon, 4 May 2015 14:54:53 -0300 Subject: [PATCH 08/11] Tarefa #24 adjust frontnews link readmore!! --- .../journal/lib/weby/components/front_news/views/_show.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor/engines/journal/lib/weby/components/front_news/views/_show.html.erb b/vendor/engines/journal/lib/weby/components/front_news/views/_show.html.erb index 74e1580a5..eb15daf40 100644 --- a/vendor/engines/journal/lib/weby/components/front_news/views/_show.html.erb +++ b/vendor/engines/journal/lib/weby/components/front_news/views/_show.html.erb @@ -39,7 +39,7 @@ <% end %> <% if !(news.text.blank?) and component.read_more %> -

<%= link_to t(".read_more"), news_path(news) %>

+

<%= link_to t(".read_more"), news_url(news, subdomain: news.site) %>

<% end %>
From 9a7d95127640c927d116a04ea31fc30c325d50a2 Mon Sep 17 00:00:00 2001 From: Marcos Roberto Date: Tue, 5 May 2015 11:40:20 -0300 Subject: [PATCH 09/11] Tarefa #218 update codemirror and enable addons!! --- app/views/sites/admin/styles/_form.html.erb | 26 +- lib/assets/javascripts/init/codemirror.js | 8 +- .../javascripts/codeMirror/codemirror.min.js | 6 +- .../assets/javascripts/codeMirror/css.min.js | 2 +- .../javascripts/codeMirror/htmlmixed.min.js | 10 +- .../javascripts/codeMirror/javascript.min.js | 10 +- .../assets/javascripts/codeMirror/xml.min.js | 10 +- .../stylesheets/codeMirror/codemirror.css | 549 +++++++++++++----- 8 files changed, 448 insertions(+), 173 deletions(-) diff --git a/app/views/sites/admin/styles/_form.html.erb b/app/views/sites/admin/styles/_form.html.erb index 3f784cca8..0e70553b6 100755 --- a/app/views/sites/admin/styles/_form.html.erb +++ b/app/views/sites/admin/styles/_form.html.erb @@ -20,26 +20,34 @@
- <%= f.input :css, - as: :text, - wrapper_html: { class: 'nostyle' }, - input_html: {class: 'style-editor', id: 'code' } %> -
<%= link_to icon('question-sign', text:t(".help_with_style")), - (current_settings.help_site || "/help"), - target: "_blank"%> + (current_settings.help_site || "/help"), + target: "_blank"%>
+ <%= f.input :css, + as: :text, + wrapper_html: { class: 'nostyle' }, + input_html: {class: 'style-editor', id: 'code' } %> <% content_for :stylesheets, stylesheet_link_tag("codeMirror/codemirror") %> <% content_for :javascripts, javascript_include_tag("init/codemirror") %> <% content_for :javascripts do %>