|
var QB_DlgUrl = "/_layouts/QueryBuilder.aspx";
var QB_DlgDimension = "resizable:yes;dialogWidth:800px;dialogHeight:650px;status:no;location:no;menubar:no;help:no";
var QB_WarningFailedOperation_TEXT = "Do you wish to continue?";
var QB_NullSelectionText_TEXT = "Please select a target or click cancel";
var QB_IdSeparator = ",";
function QB_LaunchQueryBuilderDialog(siteUrl, list, view, query, isView, isQuery, isUserInput, callback) {
if (view == null)
view = "";
if (query == null)
query = "";
if (isView == null)
isView = false;
if (isQuery == null)
isQuery = false;
if (isUserInput == null)
isUserInput = false;
var dialogUrl = QB_TrimLastSlash(siteUrl) + QB_DlgUrl + "?list=" + list + "&view=" + view + "&query=" + query;
dialogUrl += "&isview=";
if (isView)
dialogUrl += "true";
else
dialogUrl += "false";
dialogUrl += "&isquery=";
if (isQuery)
dialogUrl += "true";
else
dialogUrl += "false";
dialogUrl += "&userinput=";
if (isUserInput)
dialogUrl += "true";
else
dialogUrl += "false";
commonShowModalDialog(dialogUrl, QB_DlgDimension, callback, null);
}
function QB_TrimLastSlash(siteUrl) {
return (siteUrl.charAt(siteUrl.length - 1) == "/") ? siteUrl.substring(0, (siteUrl.length - 1)) : siteUrl;
}
function QB_HandleOkReturnValues(strDlgReturnValue, strDlgReturnErr) {
if (strDlgReturnValue[0].indexOf("Error:") >= 0) {
alert(strDlgReturnValue[0].slice(7));
}
else {
if (strDlgReturnErr.indexOf("Error:") >= 0) {
var promptUser = strDlgReturnErr.slice(7) + "." + QB_NullSelectionText_TEXT;
if (confirm(promptUser) == 0)
return false;
}
setModalDialogReturnValue(window, strDlgReturnValue);
window.top.close();
}
return false;
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.