Old 12-25-2008, 04:08 AM   #1 (permalink)
Junior Member
 
Join Date: Dec 2008
Posts: 2
Default Pagination Centering Issue

I am having issues with the pagination number portion not centering due to paths of the url which is part of Zend Framework which I use. For example:

Code:
http://mydomain.com/admin/Customer/list
Everything else renders properly as I do full paths to the css files. It's just the pagination page number portion that does not render properly.

You can also reproduce this by just putting the css and js in a folder below your html file then referencing it by ../css/general.css

You can fix it in the ../ case by making a css folder in the same folder as your html file. You can even leave the ../css/general.css reference which makes things really strange like the js portion which centres the pag_list is sensitive to the path of the css? I really don't know where the exact cause is just a guess.

So is there a way to make this work as expected when the css folder is not in the expected location.
InFloW is offline   Reply With Quote
Old 12-30-2008, 08:14 PM   #2 (permalink)
Oxylus
 
Octav's Avatar
 
Join Date: May 2008
Posts: 55
Send a message via Yahoo to Octav Send a message via Skype™ to Octav
Default

Hello,

We are curently on vacation, but we'll look into this on 2nd-3rd January and if there's an issue we'll fix it at once.

All the best,
Octav
Octav is offline   Reply With Quote
Old 01-02-2009, 02:57 PM   #3 (permalink)
Junior Member
 
Join Date: Jan 2009
Posts: 9
Default

Hello,

The css file that centers the pagination list, is included dinamically in css.js (js/css.js). You have to edit this line in the css.js:

document.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"css/js.css\" media=\"screen\" />");

The path is written in bold.

Please let me know if you encounter other problems.

All the best,
Marian
Marian Banita is offline   Reply With Quote
Old 01-02-2009, 08:49 PM   #4 (permalink)
Junior Member
 
Join Date: Dec 2008
Posts: 2
Default

Interesting way of doing that. I'm guessing I can just as easily just drop in

Code:
<link rel="stylesheet" type="text/css" href="css/js.css" media="screen" />
Then the javascript doesn't really matter? Seems to be working fine for me and solves the paths issue for my application.
InFloW is offline   Reply With Quote
Old 01-02-2009, 10:49 PM   #5 (permalink)
Junior Member
 
Join Date: Jan 2009
Posts: 9
Default

Quote:
Originally Posted by InFloW View Post
Interesting way of doing that. I'm guessing I can just as easily just drop in

Code:
<link rel="stylesheet" type="text/css" href="css/js.css" media="screen" />
Then the javascript doesn't really matter? Seems to be working fine for me and solves the paths issue for my application.
Well ...the idea was to make the template work with or without javascript enabled. I couldn't center the pagination list only with css, because the width of the list is relative. The css rules found in js.css are :

.pag_list {

visibility: hidden;

position: absolute;

top: 0;

left: 50%;

}

I also needed to set a 'margin-left' rule to the list equal to -1/2 of its width, which is set by this js code from behaviour.js as soon as the webpage is loaded:

function centerPagList () {

var pag_list = getElementsByClass('pag_list',null,'ul');

for(i=0; i<pag_list.length; i++) {

pag_list[i].style.marginLeft = 0 - pag_list[i].offsetWidth/2 + 'px';

pag_list[i].style.visibility = 'visible';

}



}

I used 'visibility: hidden' in js.css, because the javascript code executes after the webpage has loaded (without images), and i didn't want the user to notice the pagination list jumping from left to center. Besides 'margin-left', the javascript function also sets 'visibility: visible'.


If you disable javascript in your browser, you won't see the pagination list
because js.css isn't included with javascript anymore.
Marian Banita is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 11:08 AM.