In Report Attributes, Call below function in link - URL
function fun(a)
{
//alert(a);
var str = a.substring(4);
// alert(str);
str = parseInt(str, 10);
str = pad(str,4);
//alert(str);
var id = "#f02_"+str;
var hold = "#f14_"+str;
var role = $("#f15_"+str).val();
var b = $("#f16_"+str).val();
// alert(b);
// alert(hold||''||id);
if($(hold).val().length == 0||$(hold).val() == 'N')
{
$(id).closest("tr").find("input,button,textarea,select").attr("readonly", "true");
$(id).closest("tr").find("input[type!='hidden'],select").on('mousedown', function(e) {return false;});
$(id).closest("tr").find("a").on('click', function(e) {return false;});
$(id).closest("tr").find("input[type='checkbox']").attr("onclick","return false");
/* $(id).closest("tr").find("a").attr("href", "#");*/
$(id).closest("tr").find("a").css("cursor", "default");
$(id).closest("tr").find("td").css("background-color","#e6e6e6");
$(id).closest("tr").find("a").css("color","#696969");
$(hold).val('Y'); }
else
{
$(id).closest("tr").find("input,button,textarea,select").removeAttr("readonly");
$(id).closest("tr").find("input[type!='hidden'],select").off('mousedown');
$(id).closest("tr").find("a").off('click');
$(id).closest("tr").find("a").css("cursor", "auto");
$(id).closest("tr").find("td").css("background-color","#FFFFFF");
$(id).closest("tr").find("a").css("color","#009999");
// $('#del_item').trigger('apexrefresh');
$(hold).val('N');
if ((role =='Developer' || role =='Validator' || role =='Reviewer') && b != 'red') {
$(hold).closest('tr').find("td[headers='TITLE'] a").attr( "href", "javascript:void(0);").css({"cursor":"default","color": "black"});
}
else
{
if ((role =='Developer' || role =='Validator' || role =='Reviewer') && b == 'red'){
$(hold).closest('tr').find("td[headers='TITLE'] a").attr( "href", "javascript:void(0);").css({"cursor":"default","color": "red"});
}
}
if( role == 'Programming Manager')
{
$(hold).closest('tr').find("td[headers='OUTPUT_NAME'] a").attr( "href", "javascript:void(0);").css({"cursor":"default","color": "black"});
}
if (b == 'red')
{
$(hold).closest('tr').find("td[headers='TITLE'] a").css({"color": "red"});
}
}
}
function fun(a)
{
//alert(a);
var str = a.substring(4);
// alert(str);
str = parseInt(str, 10);
str = pad(str,4);
//alert(str);
var id = "#f02_"+str;
var hold = "#f14_"+str;
var role = $("#f15_"+str).val();
var b = $("#f16_"+str).val();
// alert(b);
// alert(hold||''||id);
if($(hold).val().length == 0||$(hold).val() == 'N')
{
$(id).closest("tr").find("input,button,textarea,select").attr("readonly", "true");
$(id).closest("tr").find("input[type!='hidden'],select").on('mousedown', function(e) {return false;});
$(id).closest("tr").find("a").on('click', function(e) {return false;});
$(id).closest("tr").find("input[type='checkbox']").attr("onclick","return false");
/* $(id).closest("tr").find("a").attr("href", "#");*/
$(id).closest("tr").find("a").css("cursor", "default");
$(id).closest("tr").find("td").css("background-color","#e6e6e6");
$(id).closest("tr").find("a").css("color","#696969");
$(hold).val('Y'); }
else
{
$(id).closest("tr").find("input,button,textarea,select").removeAttr("readonly");
$(id).closest("tr").find("input[type!='hidden'],select").off('mousedown');
$(id).closest("tr").find("a").off('click');
$(id).closest("tr").find("a").css("cursor", "auto");
$(id).closest("tr").find("td").css("background-color","#FFFFFF");
$(id).closest("tr").find("a").css("color","#009999");
// $('#del_item').trigger('apexrefresh');
$(hold).val('N');
if ((role =='Developer' || role =='Validator' || role =='Reviewer') && b != 'red') {
$(hold).closest('tr').find("td[headers='TITLE'] a").attr( "href", "javascript:void(0);").css({"cursor":"default","color": "black"});
}
else
{
if ((role =='Developer' || role =='Validator' || role =='Reviewer') && b == 'red'){
$(hold).closest('tr').find("td[headers='TITLE'] a").attr( "href", "javascript:void(0);").css({"cursor":"default","color": "red"});
}
}
if( role == 'Programming Manager')
{
$(hold).closest('tr').find("td[headers='OUTPUT_NAME'] a").attr( "href", "javascript:void(0);").css({"cursor":"default","color": "black"});
}
if (b == 'red')
{
$(hold).closest('tr').find("td[headers='TITLE'] a").css({"color": "red"});
}
}
}
No comments:
Post a Comment