Flyer53 / jsPanel

A jQuery Plugin to create highly configurable floating panels, modals, tooltips and hints/notifiers for use in a backend solution and other web applications.
http://v2.jspanel.de/
Other
163 stars 56 forks source link

Ability to attach to element but still maximize full screen #17

Closed devmondo closed 9 years ago

devmondo commented 9 years ago

one of the coolest thing about JSPanel is you can attach it to element, this is great specially when using Angularjs, as i can inherit the controller properties because JSPanel is a child of it, but when i do so i cant Maximize the panel to full screen, is there a solution ?

thanks in advanced.

Flyer53 commented 9 years ago

I have to check ...

But I'm quite sure I'll find a solution for you ... maybe an optional override of the default behaviour.

Flyer53 commented 9 years ago

@devmondo I modified a test file to enable fullscreen maximize on jsPanels appended to an element other than "body". It's done by an extra parameter in option.controls like:

$.jsPanel({
    selector: 'your-container-element',
    controls: {
        maxtoScreen: true
    }
});

This will maximize the panel to fullscreen even if option.selector is used with another value than "body". But since this panel is not appended to the body it will not maintain its position relative to the browser viewport on page scroll.

Download the testfile here

Sure needs some testing ...

devmondo commented 9 years ago

@Flyer53

thank you very much it is working, regarding scrolling, we can disable it while the modal is on screen then enable it back using some jquery magic, so it is no issue :)

Flyer53 commented 9 years ago

@devmondo Had to release a version 2.2.1 fixing two minor issues with the controls (affecting only childpanels) and jsPanel events.

Though not documented yet the parameter "maxtoScreen" for option.controls is included in this version.

devmondo commented 9 years ago

@Flyer53 Awesome, thanks a lot