PDA

View Full Version : A google book API simple Modal Intergration



urbanvintner
09-26-2010, 02:10 PM
Just really posting it here to see what people think. Its just something I bodged together this afternoon. The tricky part is waiting for simple modal to be fully expanded before allowing google code to load the book, otherwise you end up with the google API trying to adjust the dimensions of an invisible element (at least I think that was what the problem was). Go here (http://www.urbanvintner.co.nz/books/) to take a look at it in action, and here (http://www.urbanvintner.co.nz/books/js/gb.js) for the js.

Also, credit where credit is due. The UI is taken directly Eric Martins Simple Modal (http://www.ericmmartin.com/projects/simplemodal-demos/) OSX Style Dialog. I like it a lot

jscheuer1
09-26-2010, 02:45 PM
Neat! One problem in Opera, when you click on the little x to close the book, it closes the entire page.

urbanvintner
09-27-2010, 01:23 AM
At least I hope so. I have made a few improvements to it. It now checks if the book is embeddable first, and defaults to the about this book page URL if not, which it sets for you.

jscheuer1
09-27-2010, 03:58 AM
There wasn't any problem with seeing the book. Just that when the book closed, so did the page. That's fixed. But there is a new issue in Opera. Once you launch a book and close it, the overlay remains below the content division. It's weird. If you switch to another tab and then back, it goes away. I'm thinking this may be able to be solved by making the body and the html elements 100% height in the style:


html, body {
height: 100%;
}

urbanvintner
09-27-2010, 04:21 AM
I have updated the stylesheet. I have another issue though, I'm currently trying to hack in a call to an isbn.com xml feed, but proxy.php trips a 406 error.