Alex_Rus
Posts: 4
Joined: Mon Apr 06, 2009 8:07 pm
Location: Moscow, Russia (ðáð¥ÐüÐüð©ÐÅ)
Contact: ICQ

Disable resize or(and) move popup

Hi! sorry for pure English. Thanks for Highslide, I like not only functionality and powerful of this, but every time when I view the code, I have great example of right and beautiful javascript.

In my interface there are some small and easy popups with notes, short forms, ets. where not necessary to resize and move. In small popups a superfluous buttons (or links) look very large and distract user. Generally speaking, such popups need only one button - 'close'. (I use for this symbols '[X]' ). We can hide resize triangle disabling a footer (but sometime we need footer), but to hide 'move' we can't disable a header because it contain 'close' too.
How to do here?
Is it possible to add new properties to hs hash which could disable to show resize and move buttons in popups?
User avatar
RoadRash
Posts: 8249
Joined: Tue Jul 15, 2008 6:43 pm
Location: Fredrikstad, Norway
Contact: Website

Re: Disable resize or(and) move popup

For removing resize and Move button on some popups you need to use wrapperClassName.

The highslide.css file comes with a pre-made wrapperClassName for disabling the footer. All you need to do is adding wrapperClassName: ÔÇÿno-footerÔÇÖ to the onclick - like this:

Code: Select all

onclick="return hs.htmlExpand(this, { wrapperClassName: 'no-footer' } )"
You can make your own wrapperClassName for disabling the Close button.
Add this to the highslide.css file:

Code: Select all

.no-move .highslide-header .highslide-move {
	display: none;
}
and add the new wrapperClassName to the onclick ÔÇô like this:

Code: Select all

onclick="return hs.htmlExpand(this, { wrapperClassName: 'no-footer no-move' } )"
You can read more about wrapperClassName in the reference pages: http://highslide.com/ref/hs.wrapperClassName
Hilde
Highslide Support Team

Overview of my Highslide sample pages: RoadRash.no
Alex_Rus
Posts: 4
Joined: Mon Apr 06, 2009 8:07 pm
Location: Moscow, Russia (ðáð¥ÐüÐüð©ÐÅ)
Contact: ICQ

Re: Disable resize or(and) move popup

Thanks! I was too concentrated in javascript and forgot about CSS!
icampbe
Posts: 3
Joined: Mon Sep 26, 2016 12:13 pm

Re: Disable resize or(and) move popup

icampbe wrote:Where in the *.js file do I place the onclick statement? I've tried at line 132 where the highslide-footer div is defined to no avail. Help.
RoadRash wrote:For removing resize and Move button on some popups you need to use wrapperClassName.

The highslide.css file comes with a pre-made wrapperClassName for disabling the footer. All you need to do is adding wrapperClassName: ÔÇÿno-footerÔÇÖ to the onclick - like this:

Code: Select all

onclick="return hs.htmlExpand(this, { wrapperClassName: 'no-footer' } )"
You can make your own wrapperClassName for disabling the Close button.
Add this to the highslide.css file:

Code: Select all

.no-move .highslide-header .highslide-move {
	display: none;
}
and add the new wrapperClassName to the onclick ÔÇô like this:

Code: Select all

onclick="return hs.htmlExpand(this, { wrapperClassName: 'no-footer no-move' } )"
You can read more about wrapperClassName in the reference pages: http://highslide.com/ref/hs.wrapperClassName
MisterNeutron
Posts: 440
Joined: Sun Aug 18, 2013 11:20 am

Re: Disable resize or(and) move popup

You don't place any of this in the .js files. The changes described are to your own HTML code and to the Highslide CSS.

(And please don't post the same question in multiple threads - it just confuses things.)

Return to “Highslide JS Usage”