81
Views
3
Comments
Solved
Pop up editor position 
Question
I need to display the popup editior on the top of the parent web page instead of in center. 
I checked the JS and found below line which I think open the popup at center
position: 'center',

I tried to copy the richwidget in my espace and changed the position to 'top' but popup is not working and link is opening as new page. Please suggest how to achieve this. 

Thank you 
2018-11-07 10-43-31
Hugo Pinheiro
Staff
Solution
Vivek Ghiria wrote:
I need to display the popup editior on the top of the parent web page instead of in center. 
I checked the JS and found below line which I think open the popup at center
position: 'center',

I tried to copy the richwidget in my espace and changed the position to 'top' but popup is not working and link is opening as new page. Please suggest how to achieve this. 

Thank you 
 Hello Vivek,

There is two ways to accomplish what you need:
  • for the first one, you just need to force the class that is arround the popup to have top: 0px !important:
            div.os-internal-Popup .os-internal-ui-dialog, 
            div.os-internal-Popup.os-internal-ui-dialog {
                 top: 0px !important;
            }

            By doing this, the popup will be always in the top and it can't be moved (if you just want it fixed on               the top, you can just go with this solution).

  • second solution, you will need to customize the popup editor javascript:


   This code from the RichWidgets PopupEditor calculates the top that is needed to put the popup   centered. 

Best Regards,
Hugo Pinheiro

 
2022-03-04 12-11-22
Paulo Sousa
Hugo,

And where do I put the CSS piece above, i.e.:

div.os-internal-Popup .os-internal-ui-dialog, 
div.os-internal-Popup.os-internal-ui-dialog {
  top: 0px !important;
}

Can I put it in the Layout, to ensure that every Popup of the same Layout behave the same way?

Thank you
2018-11-07 10-43-31
Hugo Pinheiro
Staff
Hello Paulo,

Yes if you want to have all your popups aligned to the top, you should put the css on the eSpace theme.

Best Regards
Hugo Pinheiro
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.