Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
Feature: set table pager width
05/05/2010
18:17
Avatar
Klaus
Member
Members
Forum Posts: 68
Member Since:
18/11/2009
sp_UserOfflineSmall Offline

I sometimes have the problem that the table pager controls overlap because the left pager cell contains many custom buttons and is displayed strange on small screen size (because each of the 3 parts gets 1/3 of the total width)

Here is the code to set the left pager part (used for custom buttons) to a bigger width if the screen is too small.

added grid option:  pagerButtonCellWidth: -1 (disabled)

@ setPager:
  $("#"+pgid)
    .append("<div id='"+pgcnt+"' class='ui-pager-control' role='group'><table cellspacing='0' cellpadding='0' border='0' class='ui-pg-table' style='width:100%;' role='row'><tbody><tr><td id='"+lft+"' align='left'></td><td id='"+cent+"' align='center' style='white-space:pre;'></td><td id='"+rgt+"' align='right'></td></tr></tbody></table></div>")
    .attr("dir","ltr"); //explicit setting
    if (-1 !== ts.p.pagerButtonCellWidth) {
      $('#'+lft).css({ minWidth: ts.p.pagerButtonCellWidth });
    }

@ setGridWidth:
* replace:
    if($t.p.pager ) {$($t.p.pager).css("width",nwidth+"px");}

-> with:
    if($t.p.pager ) {
      $($t.p.pager).css("width",nwidth+"px");
      //this block is used to set the widths of the pager cells on resize
      if ($t.p.pagerButtonCellWidth > (nwidth/3)) { //cell too small -> make the others smaller
        $($t.p.pager+'_left')
          .css({width: $t.p.pagerButtonCellWidth})
            .next().next()
              .css({width: ''});
      }
      else if($($t.p.pager+'_center').css('display') !== 'none') {
        $($t.p.pager+'_left, '+$t.p.pager+'_center, '+$t.p.pager+'_right')
          .css("width",(nwidth/3)+"px");
      }
      else {
        $($t.p.pager+'_left, '+$t.p.pager+'_right')
          .css("width",'');
      }
    }

Maybe you could integrate this feature some time.

Kind regards,
Klaus.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
25 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

OlegK: 1255

markw65: 179

kobruleht: 144

phicarre: 132

YamilBracho: 124

Renso: 118

Member Stats:

Guest Posters: 447

Members: 11373

Moderators: 2

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 10592

Posts: 31289

Newest Members:

, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information