Forms Designer Icon missing
Posted: 14 Mar 2014
I added some jquery to a document library using a content editor web part and the Forms Designer icon doesn't display on the ribbon. When I remove the webpart, the icon still doesn't display. (The icon had previously displayed and fd_ form functions properly) (script alos performs properly)
This is a document set library. Below is the script added.
<script type="text/javascript" src="../../Style Library/jquery-1.10.2.js"></script>
<script type="text/javascript">
$(document).ready( function() {
$("img[alt='edit']").each(function(index, element) {
var parent = $(element).parent();
var link = $("<a href='#' target='_self'><img border='0' alt='edit' src='/_layouts/15/images/noteicon.gif?rev=23'></a>");
var js = parent.attr('onclick');
js = js.replace("return false;", "");
js = js.replace("EditItemWithCheckoutAlert", "EditItem2");
link.click(function() {
eval(js);
setTimeout(clickTab, 500);
});
parent.after(link);
});
$("#contentBox").prepend('<input class="newButton" type="button" value="Create New Proposal Set"/>');
$(".newButton").on("click", function (e) {
e.preventDefault();
var url = "https://portals.xxxxxx.com/bd/ProposalS ... ts&IsDlg=1";
var options = {
url: url
};
SP.SOD.execute('sp.ui.dialog.js', 'SP.UI.ModalDialog.showModalDialog', options);
$(".ms-dlgOverlay").css("opacity", "0.9").css("background-color", "#222222").click(function () {
SP.UI.ModalDialog.commonModalDialogClose(1, "done");
});
});
});
function clickTab()
{
var iframe = $("iframe.ms-dlgFrame");
var a = iframe.contents().find("#ui-id-2");
if ( a.length === 0 )
{
setTimeout(clickTab, 500);
}
else
{
a[0].click();
}
}
</script>
This is a document set library. Below is the script added.
<script type="text/javascript" src="../../Style Library/jquery-1.10.2.js"></script>
<script type="text/javascript">
$(document).ready( function() {
$("img[alt='edit']").each(function(index, element) {
var parent = $(element).parent();
var link = $("<a href='#' target='_self'><img border='0' alt='edit' src='/_layouts/15/images/noteicon.gif?rev=23'></a>");
var js = parent.attr('onclick');
js = js.replace("return false;", "");
js = js.replace("EditItemWithCheckoutAlert", "EditItem2");
link.click(function() {
eval(js);
setTimeout(clickTab, 500);
});
parent.after(link);
});
$("#contentBox").prepend('<input class="newButton" type="button" value="Create New Proposal Set"/>');
$(".newButton").on("click", function (e) {
e.preventDefault();
var url = "https://portals.xxxxxx.com/bd/ProposalS ... ts&IsDlg=1";
var options = {
url: url
};
SP.SOD.execute('sp.ui.dialog.js', 'SP.UI.ModalDialog.showModalDialog', options);
$(".ms-dlgOverlay").css("opacity", "0.9").css("background-color", "#222222").click(function () {
SP.UI.ModalDialog.commonModalDialogClose(1, "done");
});
});
});
function clickTab()
{
var iframe = $("iframe.ms-dlgFrame");
var a = iframe.contents().find("#ui-id-2");
if ( a.length === 0 )
{
setTimeout(clickTab, 500);
}
else
{
a[0].click();
}
}
</script>