Changeset - 62fb395a459d
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 13 years ago 2013-04-22 16:40:24
marcin@python-works.com
make sure we hide the spans
1 file changed with 7 insertions and 6 deletions:
0 comments (0 inline, 0 general)
rhodecode/public/js/rhodecode.js
Show inline comments
 
@@ -2197,29 +2197,27 @@ var MultiSelectWidget = function(selecte
 
                   'add_all_elements','remove_all_elements'],'click',
 
                   prompts_action_callback)
 
    if (form_id !== undefined) {
 
        YUE.addListener(form_id,'submit',function(){
 
            var chosen = YUD.get(selected_container);
 
            for (var i = 0; i < chosen.options.length; i++) {
 
                chosen.options[i].selected = 'selected';
 
            }
 
        });
 
    }
 
}
 

	
 

	
 

	
 
// custom paginator
 
var YUI_paginator = function(links_per_page, containers){
 

	
 
var YUI_paginator = function(links_per_page, containers){
 
    // my custom paginator
 
    (function () {
 

	
 
        var Paginator = YAHOO.widget.Paginator,
 
            l         = YAHOO.lang,
 
            setId     = YAHOO.util.Dom.generateId;
 

	
 
        Paginator.ui.MyFirstPageLink = function (p) {
 
            this.paginator = p;
 

	
 
            p.subscribe('recordOffsetChange',this.update,this,true);
 
            p.subscribe('rowsPerPageChange',this.update,this,true);
 
            p.subscribe('totalRecordsChange',this.update,this,true);
 
@@ -2267,25 +2265,26 @@ var YUI_paginator = function(links_per_p
 

	
 
                var left = Math.max(1, (cur_page - (radius)))
 
                var right = Math.min(max_page, cur_page + (radius))
 
                return [left, cur_page, right]
 
            },
 
            render : function (id_base) {
 
                var p      = this.paginator,
 
                    c      = p.get('firstPageLinkClass'),
 
                    label  = p.get('firstPageLinkLabel'),
 
                    title  = p.get('firstPageLinkTitle');
 

	
 
                this.link     = document.createElement('a');
 
                this.span     = document.createElement();
 
                this.span     = document.createElement('span');
 
                YUD.setStyle(this.span, 'display', 'none');
 

	
 
                var _pos = this.getPos(p.getCurrentPage(), p.getTotalPages(), 5);
 
                this.leftmost_page = _pos[0];
 
                this.rightmost_page = _pos[2];
 

	
 
                setId(this.link, id_base + '-first-link');
 
                this.link.href      = '#';
 
                this.link.className = c;
 
                this.link.innerHTML = label;
 
                this.link.title     = title;
 
                YAHOO.util.Event.on(this.link,'click',this.onClick,this,true);
 

	
 
@@ -2394,25 +2393,27 @@ var YUI_paginator = function(links_per_p
 
            render : function (id_base) {
 
                var p      = this.paginator,
 
                    c      = p.get('lastPageLinkClass'),
 
                    label  = p.get('lastPageLinkLabel'),
 
                    last   = p.getTotalPages(),
 
                    title  = p.get('lastPageLinkTitle');
 

	
 
                var _pos = this.getPos(p.getCurrentPage(), p.getTotalPages(), 5);
 
                this.leftmost_page = _pos[0];
 
                this.rightmost_page = _pos[2];
 

	
 
                this.link = document.createElement('a');
 
                this.span = document.createElement();
 
                this.span = document.createElement('span');
 
                YUD.setStyle(this.span, 'display', 'none');
 

	
 
                this.na   = this.span.cloneNode(false);
 

	
 
                setId(this.link, id_base + '-last-link');
 
                this.link.href      = '#';
 
                this.link.className = c;
 
                this.link.innerHTML = label;
 
                this.link.title     = title;
 
                YAHOO.util.Event.on(this.link,'click',this.onClick,this,true);
 

	
 
                setId(this.span, id_base + '-last-span');
 
                this.span.className = c;
 
                this.span.innerHTML = label;
0 comments (0 inline, 0 general)