Welcome to the nuBuilder forums!

Please register and login to view forums and other content only available to registered users.

nuBuilder To Do List

admin
Site Admin
Posts: 2778
Joined: Mon Jun 15, 2009 2:23 am
nuBuilder Version: 4.5

Re: nuBuilder To Do List

Unread post by admin »

massiws,

Here is some custom code that can be put on 'Before Browse' to disable clicks (in this case, the first ten rows), but it could be conditionally on any of the rows/column values..

Disabling things this way means you only run it on rows of the current page.

Code: Select all



$s = "


function nuLoadThis(){

   var x = 0;
   
//-- loop through all valid rows
   while($('#rw'+ nuXPad(x) + '0').length > 0){

      if(x < 10){
      
         var y= 0;

//-- loop through all valid columns
           while($('#rw00' + y).length > 0){
              $('#rw'+ nuXPad(x) + y).attr('onclick',null);
              console.log(nuGridValue(x, y,'N / A'));
              y++;
           }
          
      }

      x++;
      
   }

}


function nuGridValue(x, y, v){

    
    if($('#rw'+ nuXPad(x) + y).length == 0){
        return '';
    }
    if(arguments.length == 3){
        $('#rw'+ nuXPad(x) + y).html(' '+v+' ');
    }
    
    var nv = String($('#rw'+ nuXPad(x) + y).html().substr(9));
    
    return nv.substr(0, nv.length-11);
    
}

function nuGridCss(x, y, s, v){

    var adjustY = y + 1;
    
    if($('#rw'+ nuXPad(x) + y).length == 0){
        return '';
    }
    if(arguments.length == 4){
        $('#rw'+ nuXPad(x) + y).css(s, v);
    }
    
    return $('#rw'+ nuXPad(x) + y).css(s);
    
}

function nuXPad(value) {
    
    return String(Math.pow(10,2 - String(value).length)).substr(1)+String(value);

}




";

addJSfunction($s);

Steven
massiws
Posts: 503
Joined: Thu May 24, 2012 2:08 am
Location: Milan, Italy
Contact:

Re: nuBuilder To Do List

Unread post by massiws »

Steven, thanks for reply!
I will work around your solution ASAP (I'm now on holiday :D).

Thanks again.
admin
Site Admin
Posts: 2778
Joined: Mon Jun 15, 2009 2:23 am
nuBuilder Version: 4.5

Re: nuBuilder To Do List

Unread post by admin »

massiws,

Thanks for all YOUR help!

Steven
Post Reply