IBICT / noosfero

Noosfero is a Web platform for social networks. Besides the regular social network features (such as friends and communities), Noosfero offers a full-featured CMS, making every user or community profile a complete Web site with several types of content (including text, image gallery, blogs, and file uploads), RSS feeds, agenda, the possibility to set custom themes, and other features. It is also possible to run several independent social networks within the same Noosfero installation.
noosfero.org
GNU Affero General Public License v3.0
1 stars 1 forks source link

CustomFormsPlugin: Hover breaks polls block submit button on block editor page #63

Closed joenio closed 6 years ago

joenio commented 6 years ago

https://gitlab.com/noosfero/noosfero/issues/304

maxbborges commented 6 years ago

O botão enviar usava a classe genérica "button-bar", essa mesma classe era usada pelos blocos laterais para ocultar o menu de opções de edição do bloco, isso tava fazendo com que o botão enviar ficasse desconfigurado. Para arrumar esse problema, foi necessário atribuir uma nova classe, além da existe, ao menu de opções dos blocos, ficando ".button-bar .button-bar-boxes" e modificando a criação de novo bloco de .button-bar para .button-bar-boxes.

Arquivos editados: public/stylesheets/blocks.scss linhas: 113, 125 e 126

diff --git a/public/stylesheets/blocks.scss b/public/stylesheets/blocks.scss
index 699b0a0f5..a51d4607c 100644
--- a/public/stylesheets/blocks.scss
+++ b/public/stylesheets/blocks.scss
@@ -110,7 +110,7 @@
   min-height: 20px;
 }

-#box-organizer .block .button-bar {
+#box-organizer .block .button-bar-boxes {
   cursor: move;
   position: absolute;
   display: block;
@@ -122,8 +122,8 @@
   display: none;
 }

-#box-organizer .block-outer:focus .button-bar,
-#box-organizer .block-outer:hover .button-bar {
+#box-organizer .block-outer:focus .button-bar-boxes,
+#box-organizer .block-outer:hover .button-bar-boxes {
   display: block;
 }

app/helpers/boxes_helper.rb linha: 316

diff --git a/app/helpers/boxes_helper.rb b/app/helpers/boxes_helper.rb
index a1235af74..27e71aa5d 100644
--- a/app/helpers/boxes_helper.rb
+++ b/app/helpers/boxes_helper.rb
@@ -313,7 +313,7 @@ module BoxesHelper
       buttons << modal_inline_icon(:embed, _('Embed code'), {}, "#embed-code-box-#{block.id}") << html
     end

-    content_tag('div', buttons.join("\n").html_safe + tag('br', :style => 'clear: left'), :class => 'button-bar')
+    content_tag('div', buttons.join("\n").html_safe + tag('br', :style => 'clear: left'), :class => 'button-bar button-bar-boxes')
   end

   def current_blocks
joenio commented 6 years ago

merge request feito por @maxbborges, irei revisar o merge request #75