Page 2 of 2

Re: nuBuilder To Do List

PostPosted: Fri Aug 23, 2013 2:20 pm
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

PostPosted: Fri Aug 30, 2013 7:19 am
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

PostPosted: Wed Oct 09, 2013 7:45 am
by admin
massiws,

Thanks for all YOUR help!

Steven