Page 2 of 2

Re: nuBuilder To Do List

Posted: Fri Aug 23, 2013 6:50 am
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

Re: nuBuilder To Do List

Posted: Thu Aug 29, 2013 11:49 pm
by massiws
Steven, thanks for reply!
I will work around your solution ASAP (I'm now on holiday :D).

Thanks again.

Re: nuBuilder To Do List

Posted: Wed Oct 09, 2013 12:15 am
by admin
massiws,

Thanks for all YOUR help!

Steven