21.12.2009, 20:05 | #1 |
Участник
|
CRM Programmer: Upgrade of javascript function to hide "Add Existing ..." button
Источник: http://crmpro.blogspot.com/2009/12/u...n-to-hide.html
============== I improved the source code for one of my previous post — Remove 'Add Existing...' button from associated view entities form. function HideAssociatedViewButtons(areaPrefix, loadAreaId, buttonTitles,addAreaParams){ var navElement = document.getElementById(areaPrefix+loadAreaId); if (navElement != null) { navElement.onclick = function LoadAreaOverride(){ if(addAreaParams.length>0) loadArea('area'+loadAreaId, addAreaParams[0]); else loadArea('area'+loadAreaId); var iframeid='area' + loadAreaId + 'Frame'; HideViewButtons(document.getElementById(iframeid), buttonTitles); } } } function HideViewButtons(Iframe, buttonTitles) { if (Iframe != null ) { Iframe.onreadystatechange = function HideTitledButtons() { if (Iframe.readyState == 'complete') { var iFrame = frames[window.event.srcElement.id]; var liElements = iFrame.document.getElementsByTagName('li'); for (var j = 0; j < buttonTitles.length; j++) { for (var i = 0; i < liElements.length; i++) { if (liElements[i].getAttribute('title') == buttonTitles[j]) { liElements[i].style.display = 'none'; break; } } } } } } } Источник: http://crmpro.blogspot.com/2009/12/u...n-to-hide.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|
|
|