django cms popup window height is too big - django-cms

I'm using DjnagoCMS 3 and I have annoying problem with all editing popup windows. It happens when page content is bigger (higher) than browser window. When I try to edit text or any cms plugins (double click on content) it shows popup window, but it's height is greather than height of monitor resolution.
If content length is not so big, everything is ok.
Problem is somewhere in js/css of django cms.

I had the same problem and found the solution. The problem is that this line:
https://github.com/divio/django-cms/blob/release/3.0.x/cms/static/cms/js/modules/cms.modal.js#L137
returns the content-height, not the window height, because of this:
jquery $(window).height() is returning the document height
So all you need to do to fix this is declare a doctype in your template.

Related

Slideshow Image not scalling with browser window

I have a slideshow in my website that will not scale to the browser.
What happens: When the browser is reduced to 414 px it renders
correctly. When I drag the browser window larger the slideshow image
size remains the same. Refreshing the browser makes it render correctly.
Also during the increase in browser size it's not a smooth transition.
You can see it here. http://comrefhvac.com
Thank you in advance.
RichM
How to fix the issue is a different question, and one that requires that we look at your code. If you simply want to know why, then it's because the styling for the slideshow is dynamically applied via javascript and it looks like the author of the plugin only considered the initial page load and no the window.resize event.
I'm cool with that. Try this, go to my website then take the browser down to 414 px and you will see a gap between the slideshow and the text below. Then refresh the page and it will render as it should. Then maximize the browser and you will see that the slideshow container does not expand to the proper size which is set in my css at 440 x 800 px. Thanks for being honest, hope your head doesn't hurt this AM Jeff. RichM

Resizing the window breaks float behavior when using media queries?

I have a site that I'm working that has navigation bar with secondary block-level elements (images in my case) inside the <a> tags which respond to the window size by either floating or not floating. As long as a user never resizes their browser window after loading the page, the issue would never occur, but it appears as though if the page is stretched wide, and then scaled down without reloading the page, the float style attached to the main CSS declaration (not inside a #media query) fails to activate.
http://jsfiddle.net/MrPickle/ace1rtrq/
Here's an example the behavior that I'm seeing (with the same css code I'm using for layout). If you play with the size of the result panel, you can see what I'm talking about.
I know that I could use javascript to monitor the width of the page and add or remove a .left class to the inner element as needed, but I don't think that's the most elegant solution possible. Has anyone ever run into this kind of an issue?

QGraphicsWebView incorrectly expands horizontally with unused white bars (window.outerWidth >> window.innerWidth)

I'm using a view hierarchy of
QMainWindow > central widget > QVBoxLayout > QGraphicsView (800x600 fixed) > class deriving from QGraphicsScene > QGraphicsWebView (800x600)
When I load a jQuery Mobile powered HTML file and use the horizontal slide transition between pages, the value of window.outerWidth grows to 2400 pixels. But the actual page width, and value of window.innerWidth, remains at 800. The web view then shows 800 pixel-wide white bars at the left and right (horizontal scrollbar also expands to 2400px), with the new jQM "page" in the middle. Right-clicking in the white bars does not show the QtWebView context menu, but right-clicking in the middle works. I enabled developer tools [1] which told me that the HTML, BODY and DATA-ROLE="page" elements have the correct width of 800px.
This is working in browsers like Firefox and Chrome, so I think it's a bug in Qt's web view implementation or a setting that I have missed. The problem seems to come from the fact that the jQM pages which are sliding in/out during transitions are considered for the width. Why does window.outerWidth get such a wrong value? Note that any size policies on the web view do not have an effect. Any ideas what else I could try?
[1] "Inspect" context menu option:
QWebSettings::globalSettings()->setAttribute(
QWebSettings::DeveloperExtrasEnabled,
true);
Solved it by upgrading to Qt 5 which has the latest WebKit. It however creates new trouble, so first try if the rest of your web pages work before switching to the newly released 5.0.0.

asp.net telerik radWindow icon size

I'm facing a trouble with a RadWindow, from the Telerik Library. I'm adding Telerik in my asp.net project through DLLs and when I try to load an icon in the top left part of the window, it doesn't display anything.
After searching for a bit, I found that the size of my icon was the source of my miseries. I'm trying to load 128x128 icons where the width and height of my RawWindow icon is set to 16x16 in the css file.
Now my question : How can I manage to change the width and height of my RadWindow's icon ? I have subclassed RadWindow so I could write some CSS in my code-behind, but after trying for a while, I can't manage to find a way to do it !
I also tried to write some css code in my website default css file, without much success neither!
Can somebody provide me a solution to this please ?
Your title seems to indicate that you have an issue setting the icon size; however your question seems to indicate that your issue is really how to set the window size. If the latter, then this should do it:
Client-side, you can use setSize
wnd.setSize(400, 400);
And server-side you can use Width, Height, etc.

Shadowbox skinning & sizing

How do I skin shadowbox and make sure popup size is fixed size?
The css part is ok since it's just overriding ids and classes.
However, I'm not sure what the markup.js is supposed to look.
So here are my questions:
I created shadowbox-custom-skin/markup.js and added the hook like:
add_filter('shadowbox-markup', 'shadowbox_custom_markup');
Now I can't find an example of how the markup.js is supposed to look.
(I'm trying to put the sb-nav div before the content and the sb-title div below the content and also add some new parameters).
I fixed the size of the popup using this method:
rel="shadowbox;width=480px;height=240px"
handleOversize resize no longer works. Meaning, it will resize content, but it's squeezed.
How do I make sure the popup is the same size, but oversized content isn't squeezed and small content is just centered?
You don't really need to tweak javascript to do this. Using the property inspector on your browser or the Firebug plugin, right click on the Shadowbox and see what css classes/ids are being used. Put those css classes/ids in your own stylesheet apply the styles you want. Then upload the file to your server.

Resources