nuBuilder To Do List

Re: nuBuilder To Do List

Postby admin » Fri Aug 23, 2013 2:20 pm

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
admin
Site Admin
 
Posts: 2230
Joined: Mon Jun 15, 2009 9:53 am

Re: nuBuilder To Do List

Postby massiws » Fri Aug 30, 2013 7:19 am

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

Thanks again.
massiws
 
Posts: 503
Joined: Thu May 24, 2012 9:38 am
Location: Milan, Italy

Re: nuBuilder To Do List

Postby admin » Wed Oct 09, 2013 7:45 am

massiws,

Thanks for all YOUR help!

Steven
admin
Site Admin
 
Posts: 2230
Joined: Mon Jun 15, 2009 9:53 am

Previous

Return to Project Contributions



cron