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_Related Related Topics sp_TopicIcon
restoring multiboxonly
26/06/2011
02:45
Avatar
hb
New Member
Members
Forum Posts: 1
Member Since:
26/06/2011
sp_UserOfflineSmall Offline

Hi,

I read http://www.trirand.com/blog/?p.....perty-bug/

The last word on the topic is that the behavior is changed, i.e. multiboxonly feature is removed.

Why is it removed? I found the multiselect without this option very annoying. Can we get the option back?

Thanks

17/07/2011
20:20
Avatar
kobruleht
Member
Members
Forum Posts: 144
Member Since:
05/05/2011
sp_UserOfflineSmall Offline

Yes, this is serious issue. You can use Oleg patch to restore it, I added 2 lines to it as noted

        //   this enables keys to work if multiselect is true
        $.extend($.fn.jqGrid,{
            bindKeys : function( settings ){
                var o = $.extend({
                    onEnter: null,
                    onSpace: null,
                    onLeftKey: null,
                    onRightKey: null,
                    scrollingRows : true
                },settings || {});
                return this.each(function(){
                    var $t = this;
                    if( !$('body').is('[role]') ){$('body').attr('role','application');}
                    $t.p.scrollrows = o.scrollingRows;
                    $($t).keydown(function(event){
                        var target = $($t).find('tr[tabindex=0]')[0], id, r, mind,
                        expanded = $t.p.treeReader.expanded_field;
                        if (!target && $t.p.selrow !== null) {
                            r = $("#"+$t.p.selrow);
                            if (r.length > 0) {
                                target = r[0];
                            }
                        }
                        //check for arrow keys
                        if(target) {
                            mind = $t.p._index[target.id];
                            if(event.keyCode === 37 || event.keyCode === 38 || event.keyCode === 39 || event.keyCode === 40){
                                // up key
                                if(event.keyCode === 38 ){
                                    r = target.previousSibling;
                                    id = "";
                                    if(r) {
                                        if($(r).is(":hidden")) {
                                            while(r) {
                                                r = r.previousSibling;
                                                if(!$(r).is(":hidden") && $(r).hasClass('jqgrow')) {id = r.id;break;}
                                            }
                                        } else {
                                            id = r.id;
                                        }
                                    }
                                    if ($.inArray(id,$t.p.selarrrow) === -1) {
                                        $($t).jqGrid('resetSelection'); // AM. added
                                        $($t).jqGrid('setSelection', id);
                                    } else {
                                        $t.p.selrow = id;
                                    }
                                }
                                //if key is down arrow
                                if(event.keyCode === 40){
                                    r = target.nextSibling;
                                    id ="";
                                    if(r) {
                                        if($(r).is(":hidden")) {
                                            while(r) {
                                                r = r.nextSibling;
                                                if(!$(r).is(":hidden") && $(r).hasClass('jqgrow') ) {id = r.id;break;}
                                            }
                                        } else {
                                            id = r.id;
                                        }
                                    }
                                    if ($.inArray(id,$t.p.selarrrow) === -1) {
                                        $($t).jqGrid('resetSelection'); // AM. added
                                        $($t).jqGrid('setSelection', id);
                                    } else {
                                        $t.p.selrow = id;
                                    }
                                }
                                // left
                                if(event.keyCode === 37 ){
                                    if($t.p.treeGrid && $t.p.data[mind][expanded]) {
                                        $(target).find("div.treeclick").trigger('click');
                                    }
                                    if($.isFunction(o.onLeftKey)) {
                                        o.onLeftKey.call($t, $t.p.selrow);
                                }
                                }
                                // right
                                if(event.keyCode === 39 ){
                                    if($t.p.treeGrid && !$t.p.data[mind][expanded]) {
                                        $(target).find("div.treeclick").trigger('click');
                                    }
                                    if($.isFunction(o.onRightKey)) {
                                        o.onRightKey.call($t, $t.p.selrow);
                                }
                                }
                                return false;
                            }
                            //check if enter was pressed on a grid or treegrid node
                            else if( event.keyCode === 13 ){
                                if($.isFunction(o.onEnter)) {
                                    o.onEnter.call($t, $t.p.selrow);
                                }
                                return false;
                            } else if(event.keyCode === 32) {
                                if($.isFunction(o.onSpace)) {
                                    o.onSpace.call($t, $t.p.selrow);
                                }
                                return false;
                            }
                        }
                    });
                });
            }
        });

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
52 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