码迷,mamicode.com
首页 > Web开发 > 详细

CRM HomePage.aspx

时间:2016-12-08 03:31:17      阅读:190      评论:0      收藏:0      [点我收藏+]

标签:pre   homepage   err   get   splay   button   for   his   title   

 //added by bgx on 20160616
 //隐藏指定title按钮
function hideISVButton(buttonTitle) {
  var comps = document.getElementsByTagName(‘li‘);
  for (var i = 0; i < comps.length; i++) {
    if (comps[i].title == buttonTitle)
    {
      comps[i].style.display = "none";
      comps[i-1].style.display = "none";
      break;
    }
  }
}
 //added by bgx on 20160616
 //获取当前人员是否含有指定角色权限 
function UserHasRole(roleName)
{
 //get Current User Roles, oXml is an object
 var oXml = GetCurrentUserRoles();
 if(oXml != null)
 {
  //select the node text
  var roles = oXml.selectNodes("//BusinessEntity/q1:name");
  if(roles != null)
  {
   for( i = 0; i < roles.length; i++)
   {
    if(roles[i].text == roleName)
    {
     //return true if user has this role
     return true;
    }
   }
  }
 }
 //otherwise return false
 return false;
}

 

CRM HomePage.aspx

标签:pre   homepage   err   get   splay   button   for   his   title   

原文地址:http://www.cnblogs.com/BinBinGo/p/6143431.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!