SharePoint 2013 Visio Web Acces Modal 대화 상자 - 도움말
-
29-09-2020 - |
문제
나는 솔루션을 찾거나 더 나은 방법을 찾으려고 노력하고 있습니다. 기본적으로 페이지 레이아웃은 작은 양식에만 표시됩니다.전체 모드로 확장하면 Visio 파일을 호출하기 위해 기반 visiowebaccess.aspx를 사용하여 도구 모음 단추를 표시하지 않으므로
질문 : 사용할 수있는 VisioweBaccess.aspx에 대한 queryString이 있습니까?아니면 SharePoint Modal 대화 상자가 일부 JavaScript를 주입 할 수 있습니까?
코드와 같은 코드 :
// Hook into the AJAX Sys.Application.load event.
Sys.Application.add_load(onApplicationLoad)
// Define global variables.
var vwaControl;
var webPartElementID;
var drawingURL ;
var vwaPage;
// Capture a reference to the current session of the Visio Web Access Web Part.
function onApplicationLoad() {
try{
webPartElementID = getVWAWebPartID();
vwaControl= new Vwa.VwaControl(webPartElementID);
drawingURL = vwaControl.getDiagramUrl();
vwaPage = vwaControl.getActivePage();
}
catch(err){
console.log(err);
$("#btn_visioModal").hide();
}
}
// Search the SharePoint page to get the WebPartID# for the Visio Web Access Web Part.
function getVWAWebPartID() {
// Get a NodesList of all the div tags on the page.
var divArray = document.getElementsByTagName("div");
var webPartElementID;
// Iterate through the NodesList to get the node with the class attribute "VisioWebAccess."
for (var i = 0; i < divArray.length; i++) {
var node = divArray[i];
// Return the first instance of the Visio Web Access Web Part.
if (node.className == "VisioWebAccess") {
webPartElementID = node.parentNode.parentNode.id;
break;
}
}
return webPartElementID;
}
function openInDialog() {
try{
// Get the URL for the drawing currently displayed in the Visio Web Access Web Part.
drawingURL = vwaControl.getDiagramUrl();
// Setup option for the modal dialog
var options = {url: "http://sharepointportal/_layouts/15/VisioWebAccess/VisioWebAccess.aspx?id="
+ drawingURL,
width: 1280,
height: 768,
allowMaximize: false,
showClose: true};
SP.SOD.execute('sp.ui.dialog.js', 'SP.UI.ModalDialog.showModalDialog', options);
}
catch(err){
console.log(err);
}
.
감사합니다.
해결책
가 나 자신을 찾은 것처럼 보입니다. VisiowEbAccess 페이지를 사용하는 대신 Visio 웹 파트만으로 새 빈 페이지를 만듭니다. SharePoint 사이트에 BootStrap (Andual Stap)이있는 경우 Container-Fluid를 사용하십시오 (Mine HAS). QueryString 및 Modal 페이지에서 파일 URL에서 모달 전달을 호출 할 때이 스크립트를 포함하십시오 :
function changeUrl(){
// Get the URL of the current file being displayed.
fileURL = GetQueryStringParams('fileURL');
var currDiagram = vwaControl.getDiagramUrl();
currDiagram = currDiagram.replace("%20", " ");
fileURL = decodeURI(fileURL);
console.log(vwaControl.getDiagramUrl());
console.log(fileURL);
// Replace the currently displayed Web Drawing with the other Web Drawing.
vwaControl.openDiagram(fileURL);
}
. 제휴하지 않습니다 sharepoint.stackexchange