Last active
August 29, 2015 14:06
-
-
Save ian128K/ae8b3453cfeb4eab95bf to your computer and use it in GitHub Desktop.
By viewing the source and just minifying the inline JavaScript in the Opportunity Dashboard view from the mock Salesforce project that comes with the trial of Tableau Online, I was able to cut the file size from 42 KB to 32 KB — a reduction of almost 24%!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |
<head> | |
<meta name="csrf-param" content="authenticity_token"/> | |
<meta name="csrf-token" content="xpGnHlrBwMt4Sski2rk7xIKRT50B4KgNYXmlk3FY6wA="/> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=2.0" /> | |
<meta http-equiv="Expires" content="Thu, 01 Jan 1970 00:00:00 GMT"/> | |
<meta http-equiv="Cache-Control" content="no-cache, no-store"/> | |
<meta http-equiv="Pragma" content="no-cache"/> | |
<title>Opportunity Dashboard</title> | |
<link href="/v_82001408231643/stylesheets/base_packaged.css" media="screen" rel="stylesheet" type="text/css" /> | |
</head> | |
<body class="bodySingleView" | |
> | |
<script> | |
__TABLEAU_SITE = 'adventuresindatasitting'; | |
</script> | |
<script src="/v_82001408231643/javascripts/wgapp_jsstrings_en.js"></script> | |
<script type="text/javascript"> | |
tableau_assets = { | |
VIEW_ERROR:"\x2Fv\x5F82001408231643\x2Fimages\x2Fviewerror\x2Epng", | |
EXPAND_LEFT:"\x2Fv\x5F82001408231643\x2Fimages\x2Fexpand\x5Fleft\x2Egif", | |
EXPAND_RIGHT:"\x2Fv\x5F82001408231643\x2Fimages\x2Fexpand\x5Fright\x2Egif", | |
EXPAND_UP:"\x2Fv\x5F82001408231643\x2Fimages\x2Fexpand\x5Fup\x2Egif", | |
EXPAND_DOWN:"\x2Fv\x5F82001408231643\x2Fimages\x2Fexpand\x5Fdown\x2Egif", | |
CHECK_ALLPAGES:"\x2Fv\x5F82001408231643\x2Fimages\x2Fcheckbox\x5Fdouble\x2Epng", | |
CHECK_SELECT:"\x2Fv\x5F82001408231643\x2Fimages\x2Fcheckbox\x5Fon\x2Epng", | |
CHECK_NONE:"\x2Fv\x5F82001408231643\x2Fimages\x2Fcheckbox\x5Foff\x2Epng", | |
CHECK_MULTI:"\x2Fv\x5F82001408231643\x2Fimages\x2Fcheckbox\x5Ffilled\x2Epng", | |
ADMIN_OPEN:"\x2Fv\x5F82001408231643\x2Fimages\x2Fexpand\x5Fdown\x2Egif", | |
ADMIN_CLOSED:"\x2Fv\x5F82001408231643\x2Fimages\x2Fexpand\x5Fup\x2Egif", | |
POWERED_BY:"\x2Fv\x5F82001408231643\x2Fimages\x2Fpowered\x5Fby\x2Egif", | |
LYTEBOX_EMPTY:"\x2Fv\x5F82001408231643\x2Fimages\x2Flytebox\x5Fempty\x2Epng" | |
}; | |
</script> | |
<script type="text/javascript"> | |
(function() { | |
window.tabConfig = { | |
shareDescriptionCharLimit: 106 | |
}; | |
}()) | |
</script> | |
<script src="/v_82001408231643/javascripts/initial_packaged.js" type="text/javascript"></script> | |
<script type="text/javascript"> | |
//<![CDATA[ | |
mark_body_for_ie(); | |
mark_body_with_css_class('admin'); | |
//]]> | |
</script> | |
<script type="text/javascript"> | |
//<![CDATA[ | |
jQuery(function ($) { | |
var mastheadArgs = {"logo": {"img": "\/images\/tableau-icon.gif", "width": 26, "height": 26, "uri": "\/t\/adventuresindatasitting\/", "tooltip": "Tableau Online Home"}, "vizTitle": {"star": "<span id='star_View_2033264' style='display:inline-block;' onclick=\"setFavorite(this.id, 1, true);\"><ul class='favorite no'><li class=\"current\" style=\"width: 0.0em;\" alt=\"Not a Favorite\"><\/li><li><a href=\"javascript:\/\/\" class=\"favorite1\" title=\"Click to toggle favorite\"><\/a><\/li><\/ul><\/span>", "label": "Salesforce", "links": [{"label": "Workbook", "uri": "\/t\/adventuresindatasitting\/workbooks\/Salesforce"}]}, "toolbar": [{"type": "alert", "label": "Alerts(0)"}, {"type": "help", "label": "Help", "searchUriPrefix": "http:\/\/www.tableausoftware.com\/search\/support\/", "pageLinks": [{"label": "Getting Started", "uri": "javascript:Tableau.Notifications.showGettingStarted()"}, {"label": "Work with views", "uri": "http:\/\/www.tableausoftware.com\/en-us\/app\/server-viz1?edition=online&lang=en-us&version=8.2", "target": "_blank"}, {"label": "Remember my changes", "uri": "http:\/\/www.tableausoftware.com\/en-us\/app\/server-viz2?edition=online&lang=en-us&version=8.2", "target": "_blank"}, {"label": "Build a view", "uri": "http:\/\/www.tableausoftware.com\/en-us\/app\/server-viz4?edition=online&lang=en-us&version=8.2", "target": "_blank"}, {"label": "Share views", "uri": "http:\/\/www.tableausoftware.com\/en-us\/app\/server-viz5?edition=online&lang=en-us&version=8.2", "target": "_blank"}, {"label": "Subscribe to views", "uri": "http:\/\/www.tableausoftware.com\/en-us\/app\/server-viz6?edition=online&lang=en-us&version=8.2", "target": "_blank"}, {"label": "Keep data fresh", "uri": "http:\/\/www.tableausoftware.com\/en-us\/app\/server-viz7?edition=online&lang=en-us&version=8.2", "target": "_blank"}], "fixedLinks": [{"label": "Contact Support", "uri": "https:\/\/auth.tableausoftware.com\/online\/supportRequest?uid=1411363693-20b33465a512baeeed7afbd88dd6d833&serverSiteId=19340f69-42c1-4c1f-8b9b-8c2d88176163&serverInstanceId=prod_online", "target": "_blank"}, {"label": "All Help Topics", "uri": "javascript:callHelpSimple('http:\/\/www.tableausoftware.com\/app\/server-help1?edition=online&lang=en-us&version=8.2','')"}]}, {"type": "menu", "star": true, "leftIcons": true, "options": [], "filter": true, "tooltip": "Saved Favorites", "noResultsMessage": "No results found.", "noFavoritesMessage": "No favorites"}, {"type": "menu", "label": "Ian Adams", "tooltip": "Ian Adams ([email protected])", "options": [{"label": "User Preferences", "uri": "\/t\/adventuresindatasitting\/users\/ian@128k%252Eco"}, {"label": "Sign Out", "uri": "\/manual\/auth\/logout"}]}], "collapseBar": {"collapsePrefsUri": "\/t\/adventuresindatasitting\/prefs\/toggle_display_of_thin_header"}, "mastheadHidden": false}; | |
var alertsArgs = {"alertsEndpointUrl": "\/t\/adventuresindatasitting\/alerts\/workbooks\/Salesforce", "dismissEndpointUrl": "\/t\/adventuresindatasitting\/alerts\/dismiss", "retryEndpointUrl": "\/t\/adventuresindatasitting\/run\/tasks", "datasourceParameterizedUrl": "\/t\/adventuresindatasitting\/datasources?search=%{workbook_name}", "localizedNotifierLabel": "Alerts(0)", "localizedAlertItemStrings": {"messageZeroWorkbooksFail": "%{datasource} is out of date. No workbooks are affected.", "messageOneWorkbookFail": "%{single_workbook} is out of date.", "messageFewWorkbooksFail": "%{multiple_workbooks} and %{final_workbook} are out of date.", "messageManyWorkbooksFail": "%{multiple_workbooks} and %{workbook_count} others are out of date.", "labelDataSource": "Data source:", "labelFailed": "Refresh failed:", "labelSucceeded": "Last refreshed:", "labelErrorMessage": "Error:", "labelEmbeddedDatasource": "Embedded", "labelNeverRefreshed": "None", "actionTryAgain": "Try again", "actionEditConnection": "Edit connection info", "actionDismiss": "Permanently dismiss alert"}, "localizedFailureStrings": {"1000": "Unknown failure", "2000": "Sign in failed", "2100": "Expired Password", "2200": "Access token validation", "2300": "OAuth client misconfigured", "3000": "Connection failed", "4000": "Overlapping schedules", "5000": "Full refresh required", "10000": "Connectionless failure"}, "authenticity_token": "xpGnHlrBwMt4Sski2rk7xIKRT50B4KgNYXmlk3FY6wA=", "minPollingInterval": 300000, "maxPollingInterval": 1200000, "isDebug": false}; | |
mastheadArgs.alertsSettings = alertsArgs; | |
var masthead = new Tableau.Masthead(mastheadArgs); | |
$('.singleLayoutTop').append(masthead.$el); | |
}); | |
function resizeViewer() {} //Defaults to No-op | |
//]]> | |
</script> | |
<div class="singleLayoutTop"> | |
</div> | |
<div class="singleLayoutCenter"> | |
<script type="text/javascript"> | |
//<![CDATA[ | |
tableau = { | |
size: { minw: 0, maxw: 0, minh: 0, maxh: 0 }, | |
sizeAddedHeight: 0, | |
_functions: {} | |
}; | |
function setSize(hash, sizeAddedHeight){ | |
tableau.size = hash; | |
tableau.sizeAddedHeight = sizeAddedHeight; | |
} | |
// resizeViewerWasCalled is a flag that is set true to run the real resizeViewer if the viz tried to call | |
// resizeViewer before it was properly defined | |
var resizeViewerWasCalledByViz = false; | |
function resizeViewer() { | |
resizeViewerWasCalledByViz = true; | |
} | |
//]]> | |
</script> | |
<div id="thin_client_viewer" style="position: relative"> | |
<iframe id="viewerFrame" src="/t/adventuresindatasitting/views/Salesforce/OpportunityDashboard?:embed=y&:from_wg=true" frameborder="0" scrolling="no" height="800px" width="100%" name="DisplayFrame" allowTransparency="true"></iframe> | |
<div id="wgapp_load_indicators" style="position:absolute; top:0px; left:0px; right:0px; height:800px; background-color:#FFF"> | |
<div id="wgappLoadingSpinner" style="position:absolute; top:20%; left:0px; right:0px; z-index:991; text-align:center"><img src="/images/30x30REV.gif"></div> | |
<div id="wgappGlassPane" style="position:absolute; cursor:wait; top:0px; left:0px; right:0px; top:0px; bottom:0px; z-index:990; background-color:#CCCCD3; -ms-filter:'progid:DXImageTransform.Microsoft.Alpha(Opacity=24)'; filter:alpha(opacity=24); opacity:0.24"></div> | |
</div> | |
</div> | |
<script type="text/javascript"> | |
//<![CDATA[ | |
(function() { | |
var loadContainer = document.getElementById("wgapp_load_indicators"); | |
var iframe = document.getElementById("viewerFrame"); | |
function hideLoadIndicators() { | |
if (loadContainer) { | |
loadContainer.innerHTML = ""; | |
loadContainer.parentNode.removeChild(loadContainer); | |
loadContainer = null; | |
} | |
} | |
function onMessage(e) { | |
if (e.data === "tableau.completed" || e.data === "completed" || e.data === "tableau.loadIndicatorsLoaded") { | |
hideLoadIndicators(); | |
} | |
} | |
function IEStateChange() { | |
if (iframe && iframe.readyState === 'complete') { | |
hideLoadIndicators(); | |
} | |
} | |
if (window.postMessage) { | |
if (document.addEventListener) { | |
document.addEventListener("message", onMessage, false); | |
window.addEventListener("message", onMessage, false); | |
} else if (document.attachEvent) { | |
document.attachEvent("onmessage", onMessage); | |
window.attachEvent("onmessage", onMessage); | |
} else { | |
window.onmessage = onMessage; | |
} | |
} else { | |
if (/(msie) ([\w.]+)/.exec(navigator.userAgent.toLowerCase())) { | |
iframe.onreadystatechange = IEStateChange; | |
} else { | |
iframe.onload = hideLoadIndicators; | |
} | |
} | |
// B89134 add no-op mousewheel handler to iframe so that Safari 6.1.1+ will send mousewheel | |
// events to content nested in overflow:hidden containers within the iframe | |
var ua = navigator.userAgent; | |
var isWebKit = ua.indexOf("WebKit") >= 0; | |
var isChrome = ua.indexOf("Chrome") >= 0; | |
var isSafari = ua.indexOf("Safari") >= 0 || (isWebKit && !isChrome); | |
if (isSafari) { | |
iframe.addEventListener("mousewheel", function () {}); | |
} | |
})(); | |
//]]> | |
</script> | |
<script src="/v_82001408231643/javascripts/secondary_packaged.js" type="text/javascript"></script> | |
<script src="/v_82001408231643/javascripts/cultures/globalize.culture.en-GB.js"></script> | |
<script>Globalize.culture("en-GB");</script> | |
<script src="/v_82001408231643/javascripts/encryption_packaged.js" type="text/javascript"></script> | |
<div id="view_summary" style="display:none"> | |
<script type="text/javascript"> | |
//<![CDATA[ | |
var spinner_comments = 'spinner_comments_fixed'; | |
if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)) { //test for MSIE x.x; | |
var ieversion = new Number(RegExp.$1); | |
if (ieversion < 7) { | |
spinner_comments = 'spinner_comments_relative'; | |
} | |
} | |
//]]> | |
</script> | |
<div id="spinner_comments_fixed" style="display:none; position:fixed; z-index:1; right:10px; bottom:10px;"> | |
<img alt="Loading" src="/v_82001408231643/images/loading.gif" /> | |
</div> | |
<table width="60%" align="center" ID="centering_fix"><tbody> | |
<tr> | |
<td> | |
<div id="CommentsSection"> | |
<table class="formTable" style="border-collapse:separate;" width="100%"> | |
<tr class="rowtone"><td colspan="4" class="Textinsidetable" style="text-align:center"> | |
<span id="CommentHeader"> | |
<strong>Comments</strong> | |
</span> | |
</td></tr> | |
<tr><td> | |
<table id="CommentDisplay" width="100%"> | |
<tr><td style="text-align: center"> | |
No comments for this view yet | |
</td></tr> | |
</table> | |
</td></tr> | |
<tr><td class="Textinsidetable" colspan="4"> | |
<form accept-charset="UTF-8" action="/t/adventuresindatasitting/comments" data-remote="true" id="add_comment_form" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓" /><input name="authenticity_token" type="hidden" value="xpGnHlrBwMt4Sski2rk7xIKRT50B4KgNYXmlk3FY6wA=" /></div> | |
<div class="Textinsidetable"> | |
<textarea class="commentTextArea" id="comment" name="comment" style="width:500px; height:80px;"></textarea> | |
<input class="button" id="comment_add_button" name="commit" style="margin-top:5px" title="Add Comment" type="submit" value="Add" /> | |
</div> | |
<div class="Textinsidetable" style="white-space: nowrap;" | |
><span style="display: inline-block; color: #AAA;">Format sample:</span | |
><span> "MyLink":http://www.example.com *bold* _italics_ +underline+</span | |
></div> | |
<div class="Textinsidetable" style="white-space: nowrap;" | |
><span style="display: inline-block; color: #AAA;">Displays as:</span | |
><span> <a href="http://www.example.com">MyLink</a> <strong>bold</strong> <em>italics</em> <ins>underline</ins></span | |
></div> | |
<input id="view_id" name="view_id" type="hidden" value="Salesforce/OpportunityDashboard" /> | |
<input type="hidden" value="" id="comment_form_hash" name="hash"> | |
</form> | |
<script type="text/javascript"> | |
//<![CDATA[ | |
jQuery(function() { | |
var limit, str; | |
limit = 1000; | |
str = 'Add New Comment: (1000 characters remaining)'; | |
attach_char_limit_behavior('#comment', limit, str); | |
}); | |
Event.observe("add_comment_form","ajax:before", function() { | |
Element.show(spinner_comments); | |
$('comment_add_button').disable(); | |
}); | |
Event.observe("add_comment_form","ajax:error", function(response) { | |
if (response.memo.status == 401) { | |
sessionTimeoutSuggestLogin(); | |
} | |
}); | |
Event.observe("add_comment_form","ajax:complete", function(evt, xhr, status){ | |
$('comment').value = ''; | |
$('comment_add_button').enable(); | |
Element.hide(spinner_comments); | |
}); | |
//]]> | |
</script> | |
</td></tr> | |
</table> | |
</div> | |
</td> | |
<td> | |
<img alt="Loading" id="spinner_comments_relative" src="/v_82001408231643/images/loading.gif" style="display:none; float:right; margin:0;" /> | |
</td> | |
</tr> | |
<tr><td> | |
<table class="formTable" style="width:100%; margin:10px 0 10px 0; border-collapse:separate;"><tbody> | |
<tr valign="top" class="rowtone"><td class="Textinsidetable" colspan='4' style='text-align:center'> | |
<strong>Tags</strong> | |
</td></tr> | |
<tr> | |
<td class="Textinsidetable"> | |
<div id="tags_section"> | |
<span id="tags_id" class="adminControlContents"> | |
<span class="adminControlEmpty"> | |
<none> | |
</span> | |
</span> | |
</div> | |
</td> | |
<td> </td> | |
<td> | |
<form accept-charset="UTF-8" action="/t/adventuresindatasitting/add_tag_from_form/views/Salesforce/OpportunityDashboard" data-remote="true" id="AjaxTag" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓" /><input name="authenticity_token" type="hidden" value="xpGnHlrBwMt4Sski2rk7xIKRT50B4KgNYXmlk3FY6wA=" /></div> | |
<div id="AddTagInput"> | |
<table><tbody> | |
<tr> | |
<td> | |
<input id="NewTag" name="NewTag" type="text" onKeyPress="return submitOnEnter(event, $('NewTag').value);"/> | |
</td> | |
<td class="adminControlCommand"> | |
<input type="button" value="Add" class="button" onclick="submitNewTag($('NewTag').value)" title="Add Tag"/> | |
</td> | |
</tr> | |
</tbody></table> | |
</div> | |
</form> </td> | |
</tr> | |
</tbody></table> | |
</td></tr> | |
<tr id="who_has_seen"><td style="text-align: center"> | |
<div style="margin-bottom:10px;"> | |
<a href="/t/adventuresindatasitting/admin/views/author/2033264/views/WhoHasSeen">Who has seen this view?</a> | |
</div> | |
</td></tr> | |
</tbody> | |
</table> | |
</div> | |
<script type="text/javascript"> | |
window.prototypeLibraryShim = { | |
isGecko: navigator.userAgent.indexOf('Gecko') > -1 && navigator.userAgent.indexOf('KHTML') == -1, | |
attachEvent: function(elm, eventName, handler) { jQuery(elm).bind(eventName, handler); }, | |
showElement: function(elm) { jQuery(typeof elm === 'string' ? ('#'+elm) : elm).show() } | |
}; | |
</script> | |
<script type="text/javascript"> | |
//<![CDATA[ | |
var currentTab = "Salesforce/OpportunityDashboard"; | |
var currentView = "Opportunity Dashboard"; | |
function scrollToBottom() { | |
window.scrollTo(0, document.body.scrollHeight); | |
} | |
function abs(el) { | |
var ret = { top: 0, left: 0 }; | |
while (el) { | |
ret.top += el.offsetTop; | |
ret.left += el.offsetLeft; | |
el = el.offsetParent; | |
} | |
return ret; | |
} | |
tableau._functions.isLandscape = function() { | |
if (typeof(window.orientation) !== "undefined") { | |
return (Math.abs(window.orientation) === 90); | |
} else { | |
return false; // defaults to portrait | |
} | |
} | |
tableau._functions.getViewportWidth = function() { | |
if (document.documentElement.clientWidth) { | |
return document.documentElement.clientWidth; | |
} | |
return (tableau._functions.isLandscape()) ? screen.Height : screen.width; // inaccurate fallback | |
} | |
tableau._functions.getViewportHeight = function() { | |
if (document.documentElement.clientHeight) { | |
return document.documentElement.clientHeight; | |
} | |
return (tableau._functions.isLandscape()) ? screen.width : screen.height; // inaccurate fallback | |
} | |
resizeViewer = function(e) { | |
var viewer = document.getElementById("viewerFrame"); | |
var headerSpace = abs(viewer).top; | |
var after = document.getElementById("view_summary"); | |
var useAfter = (after.className == "view-summary-abs" && after.offsetHeight > 0) ? true : false; | |
var afterSpace = (useAfter) ? 0 : ((abs(after).top + after.offsetHeight) - (headerSpace + viewer.offsetHeight)); | |
var footer = (useAfter) ? after : null; | |
var totalHeight; | |
var comments_peek_margin = 25; | |
var restrictedSize = false; | |
var summary = document.getElementById("view_summary"); | |
var totalWidth = viewer.parentNode.offsetWidth; | |
var availHeight; | |
if (footer) { | |
totalHeight = abs(footer).top; | |
} else { | |
if (window.innerHeight != null) { | |
totalHeight = window.innerHeight; | |
} else if (document.documentElement.clientHeight != null) { | |
totalHeight = document.documentElement.clientHeight; | |
} else if (document.body.clientHeight != null) { | |
totalHeight = document.body.clientHeight; | |
} else { | |
totalHeight = headerSpace + afterSpace + viewer.offsetHeight; | |
} | |
} | |
if (tableau.size.maxw > 0 && tableau.size.maxw < totalWidth) { | |
totalWidth = tableau.size.maxw; | |
restrictedSize = true; | |
} | |
if (tableau.size.minw > 0) { | |
if (totalWidth < tableau.size.minw) { | |
totalWidth = tableau.size.minw; | |
restrictedSize = true; | |
} | |
} | |
if (!restrictedSize) { | |
viewer.style.width = "100%"; //let it float to the width of the view | |
if (summary) { | |
summary.style.width = "100%"; | |
summary.style.paddingTop = "15px"; | |
} | |
} else { | |
viewer.style.width = totalWidth + "px"; | |
if (summary) { | |
summary.style.width = totalWidth + "px"; | |
summary.style.paddingTop = "15px"; | |
} | |
} | |
var bodyWidth = document.body.offsetWidth; | |
if (bodyWidth < totalWidth) { totalHeight -= 18; } | |
availHeight = (totalHeight - headerSpace) - comments_peek_margin; | |
if (tableau.size.minh > 0) { | |
availHeight = Math.max(tableau.size.minh + tableau.sizeAddedHeight, availHeight); | |
} | |
if (tableau.size.maxh > 0) { | |
availHeight = Math.min(tableau.size.maxh + tableau.sizeAddedHeight, availHeight); | |
} | |
viewer.style.height = availHeight+"px"; | |
var loadIndicators = document.getElementById("wgapp_load_indicators"); | |
if (loadIndicators) { | |
loadIndicators.style.height = availHeight+"px"; | |
} | |
prototypeLibraryShim.showElement(document.getElementById("view_summary")); | |
var d = document.getElementById("debug"); | |
if (d) { | |
d.innerHTML = "totalHeight="+totalHeight+"<br>"; | |
d.innerHTML += "availSpace="+availHeight+"<br>"; | |
d.innerHTML += "headerSpace="+headerSpace+"<br>"; | |
d.innerHTML += "afterSpace="+afterSpace+"<br>"; | |
d.innerHTML += "afterTop="+abs(after).top+"<br>"; | |
d.innerHTML += "afterHeight="+after.offsetHeight+"<br>"; | |
d.innerHTML += "afterClass="+after.className+"<br>"; | |
d.innerHTML += "<br>"; | |
} | |
} | |
if(resizeViewerWasCalledByViz) resizeViewer(); | |
var timeoutID = null; | |
function showWarnings() { | |
} | |
(function() { | |
var windowResizeTriggered = false; | |
// BUGZID 44167: jrockwood-2011-11-29 | |
// Some browsers (IE7 in particular) have a problem of infinitely calling the | |
// resize event when a dynamic element is added to a content element that has | |
// scrolling. Calling it in a timer prevents the infinite recursion. | |
prototypeLibraryShim.attachEvent(window, "resize", function () { windowResizeTriggered=true; setTimeout(resizeViewer, 1); }); | |
prototypeLibraryShim.attachEvent(document, "load", function() { if(!windowResizeTriggered) resizeViewer(); }); | |
})(); | |
function submitOnEnter(e, value) { | |
var keynum, keychar, numcheck; | |
if(window.event) { | |
keynum = e.keyCode | |
} else if(e.which) { | |
keynum = e.which | |
} | |
if (13 == keynum) { | |
return submitNewTag(value); | |
} else { | |
return true; | |
} | |
} | |
function submitNewTag(val) { | |
Element.show(spinner_comments); | |
parms = "NewTag=" + encodeURIComponent(val.replace(/[\t\n\r]/g, " ")); | |
parms += "&authenticity_token=xpGnHlrBwMt4Sski2rk7xIKRT50B4KgNYXmlk3FY6wA="; | |
parms += "&hash=" + currentTab; | |
new Ajax.Request('/t/adventuresindatasitting/add_tag_from_form/views/Salesforce/OpportunityDashboard', | |
{asynchronous:true, evalScripts:true, parameters:parms, | |
on401:sessionTimeoutSuggestLogin, | |
onComplete:function(request){Element.hide(spinner_comments); $$('#NewTag')[0].value = ''}}); | |
return false; | |
} | |
function submitRemoveTag(val) { | |
Element.show(spinner_comments); | |
parms = "RemoveTag=" + encodeURIComponent(val); | |
parms += "&authenticity_token=xpGnHlrBwMt4Sski2rk7xIKRT50B4KgNYXmlk3FY6wA="; | |
parms += "&hash=" + currentTab; | |
new Ajax.Request('/t/adventuresindatasitting/remove_tag_from_form/views/Salesforce/OpportunityDashboard', | |
{asynchronous:true, evalScripts:true, parameters:parms, | |
on401:sessionTimeoutSuggestLogin, | |
onComplete:function(request){Element.hide(spinner_comments);}}); | |
return false; | |
} | |
function showMoreTags() { | |
Element.show(spinner_comments); | |
parms = ""; | |
parms += "&authenticity_token=xpGnHlrBwMt4Sski2rk7xIKRT50B4KgNYXmlk3FY6wA="; | |
parms += "&hash=" + currentTab; | |
new Ajax.Request('/t/adventuresindatasitting/show_more_tags/views/Salesforce/OpportunityDashboard', | |
{asynchronous:true, evalScripts:true, parameters:parms, | |
on401:sessionTimeoutSuggestLogin, | |
onComplete:function(request){Element.hide(spinner_comments);}}); | |
return false; | |
} | |
function fix_ff_window_location(e) { | |
var expected_url = decodeURI("\x2Ft\x2Fadventuresindatasitting\x2Fviews\x2FSalesforce\x2FOpportunityDashboard\x3F\x3Aembed\x3Dy\x26\x3Afrom\x5Fwg\x3Dtrue"); | |
var actual_url = decodeURI(this.location.pathname + this.location.search); | |
if (expected_url != actual_url) { | |
this.location.replace(expected_url); | |
} | |
} | |
if (prototypeLibraryShim.isGecko) { | |
var viewer_frame = document.getElementById('viewerFrame'); | |
if (null != viewer_frame) { | |
var viewer_win = viewer_frame.contentWindow; | |
viewer_win.addEventListener('load', fix_ff_window_location, false); | |
} | |
} | |
//]]> | |
function hopeForAutoLoginAndCurrentTab(repository_url){ | |
window.location = "/t/adventuresindatasitting/views/" + repository_url; | |
} | |
function updateTab(htmlEscapedSheetName, repository_url){ | |
if ($('comment_form_hash')) { | |
$('comment_form_hash').value = repository_url; | |
} | |
parms = "hash=" + repository_url; | |
// repository_url and session_guid are an internal ids that are already scrubbed | |
route = "/t/adventuresindatasitting/update_tab/views/" + repository_url; | |
new Ajax.Request(route, | |
{asynchronous:true, evalScripts:true, parameters:parms, | |
on401:function(request){hopeForAutoLoginAndCurrentTab(repository_url);}}); | |
// make sure to use the unescaped sheet name for the document.title | |
document.title = htmlEscapedSheetName.unescapeHTML(); | |
return false; | |
} | |
function handleSheetChanged(htmlEscapedSheetName, repository_url) { | |
clear_flash(); | |
currentTab = repository_url; | |
currentView = htmlEscapedSheetName; | |
updateTab(htmlEscapedSheetName, repository_url); | |
} | |
</script> | |
</div> | |
<a href="/v_82001408231643/images/lightbox_small_empty.png" rel="lytebox" title="" id="tableau_lytebox"></a> | |
<div id="tabEditConnDialogHolder"> | |
<div id="tabEditConnDialog"> | |
<form action="/t/adventuresindatasitting/do_edit/data_connections" method="post" id="dc_edit_form"> | |
<div class="tabEditConnTitle">Edit Data Connection</div> | |
<div class="tabEditConnBody"> | |
<div class="tabEditConnTable"> | |
<div class="tabEditConnForm"> | |
<div class="tabEditConnTableRow"> | |
<span class="tabEditConnLabelHolder"><label for="edit_server">Server:</label></span> | |
<span class="tabEditConnInputHolder"> | |
<input name="edit_server" type="text" class="formfield tabEditConnInput" value=> | |
<div class="tabEditConnInputClear">undo ×</div> | |
</span> | |
</div> | |
<div class="tabEditConnTableRow"> | |
<span class="tabEditConnLabelHolder"><label for="edit_portbox">Server Port:</label></span> | |
<span class="tabEditConnInputHolder"> | |
<input name="edit_port" id="edit_portbox" type="text" class="formfield tabEditConnInput" value=><div class="tabEditConnInputClear">undo ×</div> | |
</span> | |
</div> | |
<div class="tabEditConnTableRow"> | |
<span class="tabEditConnLabelHolder"><label for="edit_username">Database Username:</label></span> | |
<span class="tabEditConnInputHolder"> | |
<input name="edit_username" type="text" class="formfield tabEditConnInput" value=><div class="tabEditConnInputClear">undo ×</div> | |
</span> | |
</div> | |
<div class="tabEditConnTableRow"> | |
<span class="tabEditConnLabelHolder"><label for="password">Password:</label></span> | |
<span class="tabEditConnInputHolder"> | |
<input type="password" class="formfield tabEditConnInput" name="password" value="password" autocomplete="off"><div class="tabEditConnInputClear">undo ×</div> | |
</span> | |
</div> | |
<div class="tabEditConnTableRow"> | |
<span class="tabEditConnLabelHolder"><label for="password_confirmation">Confirm Password:</label></span> | |
<span class="tabEditConnInputHolder"><input type="password" class="formfield tabEditConnInput" name="password_confirmation" value="password" autocomplete="off"></span> | |
</div> | |
</div> | |
<div class="tabEditConnTest"><a class="tabEditConnTestLink">Test Connection</a></div> | |
<div class="tabEditConnMessages"> | |
<img alt="Busy" id="tabEditConnBusy" src="/v_82001408231643/images/busy.gif" /><span id="edit_flash" style="color:#EE0000;"></span><span id="edit_flash_status" style="display: none; color: #330066"></span> | |
</div> | |
<div class="tabEditButtons"> | |
<a class="tabEditConnButton tabEditConnSave tabDisabled">Save</a> | |
<a class="tabEditConnButton tabEditConnCancel">Cancel</a> | |
</div> | |
</div> | |
<input type="hidden" name="c_server" /> | |
<input type="hidden" name="c_port" /> | |
<input type="hidden" name="c_username" /> | |
<input type="hidden" name="c_password" /> | |
<input type="hidden" name="crypted" size="130" /> | |
<input type="hidden" name="crypted_confirmation" size="130" /> | |
<input type="hidden" name="submitted" value="yes" /> | |
<input type="hidden" name="checked_ids" /> | |
<input type="hidden" name="checked_count" /> | |
<input type="hidden" name="server" /> | |
<input type="hidden" name="search_port_select" /> | |
<input type="hidden" name="port" /> | |
<input type="hidden" name="dbclass" /> | |
<input type="hidden" name="username" /> | |
<input type="hidden" name="pw_exists" /> | |
<input name="authenticity_token" type="hidden" value="xpGnHlrBwMt4Sski2rk7xIKRT50B4KgNYXmlk3FY6wA=" /> | |
</div> | |
</form> | |
<script type="text/javascript"> | |
//<![CDATA[ | |
jQuery(function() { | |
if (Tableau.EditConnection) { | |
Tableau.EditConnection.bindControls(); | |
} | |
}); | |
//]]> | |
</script> | |
</div> | |
<div class="tabEditConnOverlay"></div> | |
</div> | |
<script type="text/javascript"> | |
//<![CDATA[ | |
(function() { | |
function onInputKeyup(e) { | |
switch (e.which) { | |
case 9: // tab | |
case 13: // enter | |
case 16: // shift | |
case 17: // ctrl | |
case 18: // alt | |
return; | |
} | |
e.data.$changedInput.val("on"); | |
e.data.$formInput.parents(".tabEditConnInputHolder").addClass("tabEditConnModified"); | |
jQuery('#edit_flash_status').text(""); | |
jQuery(".tabEditConnSave").removeClass("tabDisabled"); | |
}; | |
function onUndoEdits(e) { | |
e.data.$changedInput.val(""); | |
e.data.$formInput.val(e.data.origValue || ""); | |
e.data.$formInput.parents(".tabEditConnInputHolder").removeClass("tabEditConnModified"); | |
jQuery(".tabEditConnSave").toggleClass("tabDisabled", jQuery(".tabEditConnModified").length === 0); | |
} | |
function toggleBusy(busy) { | |
jQuery("#tabEditConnBusy").toggle(busy); | |
} | |
function startEditing(id) { | |
jQuery.get('/t/adventuresindatasitting/data_connections/' + id + ".xml", {}, function(data) { | |
if (data) { | |
var $data = jQuery(data); | |
if ($data.find("authMode").text() === "oauth") { | |
Tableau.Connection.edit('/t/adventuresindatasitting/pre_edit_oauth/data_connections', [id]); | |
} else { | |
showEditDlg(id, $data.find("server").text(), $data.find("port").text(), $data.find("username").text()) | |
} | |
} | |
}, "xml"); | |
} | |
// This function can either be called from an 'index' or a 'show' context. | |
// If it's from an 'index' context, the id will be null, ortherwise | |
// it will be the id the dc we are editing. | |
function showEditDlg(id, server, port, username) { | |
if( id == null ) { | |
var chks = $$(".multi_select_checkbox"); | |
var chknames = chks.select(function(c){return c.checked}).pluck('name'); | |
if (get_table_form_var('multiple_pages_selected') == 'true') { | |
$('dc_edit_form').checked_ids.value = "all"; | |
$('dc_edit_form').checked_count.value = "all"; | |
} else { | |
$('dc_edit_form').checked_ids.value = chknames.join(','); | |
$('dc_edit_form').checked_count.value = chknames.length; | |
} | |
$('dc_edit_form').server.value = $('search_form').server.value || ""; | |
$('dc_edit_form').search_port_select.value = $('search_form').search_port_select.value || ""; | |
$('dc_edit_form').port.value = $('search_form').port.value || ""; | |
$('dc_edit_form').dbclass.value = $('search_form').dbclass.value || ""; | |
$('dc_edit_form').username.value = $('search_form').username.value || ""; | |
$('dc_edit_form').pw_exists.value = $('search_form').pw_exists.value || ""; | |
} | |
else { | |
$('dc_edit_form').checked_ids.value = "checkbox_" + id; | |
$('dc_edit_form').checked_count.value = 1; | |
} | |
//if values passed in then set else...get current values from DOM | |
$('dc_edit_form').edit_server.value = server || ""; | |
$('dc_edit_form').edit_port.value = port || ""; | |
$('dc_edit_form').edit_username.value = username || ""; | |
// test is only available for single connections | |
jQuery(".tabEditConnTestLink") | |
.toggle($('dc_edit_form').checked_count.value == 1); | |
jQuery("#tabEditConnDialog").show(); | |
jQuery(".tabEditConnOverlay").show(); | |
Tableau.EditConnection.bindControls(); | |
} | |
function closeEditConnDialog() { | |
refreshConnectionSettings(); | |
jQuery("#tabEditConnDialog").hide(); | |
jQuery(".tabEditConnOverlay").hide(); | |
parms = "authenticity_token=xpGnHlrBwMt4Sski2rk7xIKRT50B4KgNYXmlk3FY6wA="; | |
new Ajax.Updater('tabEditConnDialog', '/t/adventuresindatasitting/end_edit/data_connections', | |
{ asynchronous:true, evalScripts:true, parameters:parms }); | |
} | |
function bindControls() { | |
if (!jQuery("#tabEditConnDialog").is(":visible")) { return; } | |
jQuery.each(["server", "port", "username"], function(i, field) { | |
var $formInput = jQuery("#dc_edit_form").find("[name='edit_" + field + "']"); | |
var $changedInput = jQuery("#dc_edit_form").find("[name='c_" + field + "']"); | |
var data = { | |
$formInput: $formInput, | |
$changedInput: $changedInput, | |
origValue: $formInput.val() }; | |
$formInput | |
.keyup(data, onInputKeyup) | |
.parent().find(".tabEditConnInputClear").click(data, onUndoEdits); | |
}); | |
var $pwFormInputs = jQuery("#dc_edit_form").find("[name=password], [name=password_confirmation]"); | |
var $pwChangedInput = jQuery("#dc_edit_form").find("[name=c_password]"); | |
var data = { | |
$formInput: $pwFormInputs, | |
$changedInput: $pwChangedInput, | |
origValue: $pwFormInputs.val() }; | |
$pwFormInputs | |
.keyup(data, onInputKeyup) | |
.parent().find(".tabEditConnInputClear").click(data, onUndoEdits); | |
jQuery(".tabEditConnTestLink").click(initiateTestConnection); | |
jQuery(".tabEditConnSave").click(saveConnection); | |
jQuery(".tabEditConnCancel").click(closeEditConnDialog); | |
}; | |
//global object to store new connection parameters | |
var connectionVals = {port:null, server:null, username:null}; | |
function saveConnection() { | |
if (jQuery(".tabEditConnSave").hasClass("tabDisabled")) { return; } | |
toggleBusy(true); | |
jQuery("#edit_flash").hide(); | |
jQuery("#edit_flash_status").empty().text("Submitting changes...").show(); | |
jQuery.post('/t/adventuresindatasitting/gen_key/data_connections', | |
{ authenticity_token: "xpGnHlrBwMt4Sski2rk7xIKRT50B4KgNYXmlk3FY6wA=" }, | |
function(data, status, xhr) { | |
ajaxSubmitForm(data.modulus, data.exponent); | |
}); | |
} | |
function ajaxSubmitForm(mod, exp) { | |
//Save the connections parameters being changed... | |
//We will update the page with these if the values | |
//are set successfully | |
var form = jQuery("#dc_edit_form")[0]; | |
if(form.c_port.value === "on") { | |
connectionVals.port = form.edit_port.value; | |
} | |
if(form.c_server.value === "on") { | |
connectionVals.server = form.edit_server.value; | |
} | |
if(form.c_username.value === "on") { | |
connectionVals.username = form.edit_username.value; | |
} | |
if(form.c_password.value === "on") { | |
var rsa = new RSAKey(); | |
rsa.setPublic(mod, exp); | |
encryptField(rsa, form, form.crypted, form.password, "txt1"); | |
encryptField(rsa, form, form.crypted_confirmation, form.password_confirmation, "txt2"); | |
} | |
new Ajax.Updater({ success: 'tabEditConnDialog' }, '/t/adventuresindatasitting/do_edit/data_connections', | |
{ asynchronous:true, evalScripts:true, parameters:Form.serialize(form), | |
onFailure: function(){ displayEditConnDialogError(); } | |
}); | |
return false; | |
} | |
function displayEditConnDialogError() { | |
toggleBusy(false); | |
jQuery('#edit_flash_status').text("The server encountered an error saving this connection."); | |
} | |
function closeLytebox() { | |
refreshConnectionSettings(); | |
myLytebox.end(); | |
parms = "authenticity_token=xpGnHlrBwMt4Sski2rk7xIKRT50B4KgNYXmlk3FY6wA="; | |
new Ajax.Updater('tabEditConnDialog', '/t/adventuresindatasitting/do_edit/data_connections', | |
{ asynchronous:true, evalScripts:true, parameters:parms }); | |
} | |
function initiateTestConnection() { | |
toggleBusy(true); | |
jQuery("#edit_flash").hide(); | |
jQuery("#edit_flash_status").empty().text("Testing...").show(); | |
jQuery.post('/t/adventuresindatasitting/gen_key/data_connections', | |
{ authenticity_token: "xpGnHlrBwMt4Sski2rk7xIKRT50B4KgNYXmlk3FY6wA=" }, | |
function(data, status, xhr) { | |
testConnection(data.modulus, data.exponent); | |
}); | |
} | |
function prepareRequestData(form, mod, exp) { | |
var result = { | |
authenticity_token: "xpGnHlrBwMt4Sski2rk7xIKRT50B4KgNYXmlk3FY6wA=", | |
submitted: "yes", | |
checked_ids: form.checked_ids.value | |
}; | |
if(form.c_port.value === "on") { | |
result["c_port"] = "on"; | |
result["edit_port"] = form.edit_port.value; | |
} | |
if(form.c_server.value === "on") { | |
result["c_server"] = "on"; | |
result["edit_server"] = form.edit_server.value; | |
} | |
if(form.c_username.value === "on") { | |
result["c_username"] = "on"; | |
result["edit_username"] = form.edit_username.value; | |
} | |
if (form.c_password.value === "on") { | |
var rsa = new RSAKey(); | |
rsa.setPublic(mod, exp); | |
result["c_password"] = "on"; | |
result["password"] = "txt1"; | |
result["password_confirmation"] = "txt2"; | |
result["crypted"] = rsa.encrypt(form.password.value) | |
result["crypted_confirmation"] = rsa.encrypt(form.password_confirmation.value) | |
} | |
return result; | |
} | |
function testConnection(mod, exp) { | |
var form = jQuery("#dc_edit_form")[0]; | |
if(form.c_port.value === "on") { | |
connectionVals.port = form.edit_port.value; | |
} | |
if(form.c_server.value === "on") { | |
connectionVals.server = form.edit_server.value; | |
} | |
if(form.c_username.value === "on") { | |
connectionVals.username = form.edit_username.value; | |
} | |
var showErrors = function(errors) { | |
var errorDom = jQuery("<div class='tabConnectionErrors'/>"); | |
errors = errors || ["Test connection failed"]; | |
// take the last error message, this tends to be the most useful one | |
jQuery.each(errors.slice(0, 1), function(i, e) { | |
errorDom.append(jQuery("<div class='tabConnectionError'/>").text(e)); | |
}); | |
jQuery("#edit_flash_status").hide(); | |
jQuery("#edit_flash").empty().append(errorDom).show() | |
.attr("title", errorDom.text()); | |
}; | |
jQuery.post('/t/adventuresindatasitting/test/data_connections', prepareRequestData(form, mod, exp)) | |
.done(function(data, status, xhr) { | |
if (data && data.success) { | |
jQuery("#edit_flash_status").text("Test connection succeeded").show(); | |
jQuery("#edit_flash").hide(); | |
} else { | |
showErrors(data.errors); | |
} | |
}) | |
.fail(function(e) { | |
showErrors(); | |
}) | |
.always(function() { | |
toggleBusy(false); | |
}); | |
return false; | |
} | |
function updateJobMonitoringStatus() { | |
var form = $('monitor_form'); | |
new Ajax.Updater('tabEditConnDialog', '/t/adventuresindatasitting/monitor/data_connections', | |
{ asynchronous:true, method:'get', evalScripts:true, parameters:Form.serialize(form) }); | |
} | |
function refreshConnectionSettings() { | |
//check if anything was sumbitted by looking for a status box | |
var elements; | |
var statusBox = document.getElementsByClassName('statusMessage'); | |
if(statusBox.length === 1) { | |
var Status = statusBox[0].value; | |
var statusOk = Status.match("Finished"); | |
if(statusOk) { | |
if(connectionVals.server) { | |
elements = document.getElementsByClassName('server'); | |
if(elements.length > 0) { | |
elements[0].innerHTML = connectionVals.server; | |
} | |
connectionVals.server = null; | |
} | |
if(connectionVals.port) { | |
elements = document.getElementsByClassName('port'); | |
if(elements.length > 0) { | |
elements[0].innerHTML = connectionVals.port; | |
} | |
connectionVals.port = null; | |
} | |
if(connectionVals.username) { | |
elements = document.getElementsByClassName('username'); | |
if(elements.length > 0) { | |
elements[0].innerHTML = connectionVals.username; | |
} | |
connectionVals.username = null; | |
} | |
} | |
} | |
} | |
function setDots() { | |
var dotspan = $('dots'); | |
var count = $('monitor_form').refresh_count.value; | |
var dots = ""; | |
for(i=0; i<count; i++) { dots += "..."; } | |
dotspan.update(dots); | |
} | |
this.Tableau || (this.Tableau = {}); | |
var EditConnection = { | |
bindControls: bindControls, | |
close: closeEditConnDialog, | |
updateJobMonitoringStatus: updateJobMonitoringStatus, | |
setDots: setDots, | |
edit: showEditDlg, | |
startEditing: startEditing | |
}; | |
this.Tableau.EditConnection = EditConnection; | |
}).call(this, jQuery); | |
//]]> | |
</script> | |
</body> | |
<script type="text/javascript"> | |
set_and_highlight_flash(" ", ""); | |
function show_popup(details) { | |
$('tableau_lytebox').title = details; | |
loadLytebox('tableau_lytebox'); | |
} | |
var timeoutID = null; | |
function setFavorite(id, state, updateStar) { | |
if (updateStar) { | |
var span = $(id); | |
var ul = span.getElementsByTagName("ul")[0]; | |
var origClass = ul.className; | |
ul.className = "favorite updating"; | |
} | |
parms = id + "=" + state; | |
parms += "&authenticity_token=xpGnHlrBwMt4Sski2rk7xIKRT50B4KgNYXmlk3FY6wA="; | |
var url = '/t/adventuresindatasitting/update_favs/favorites'; | |
new Ajax.Request(url, | |
{ asynchronous:true, evalScripts:true, | |
parameters: parms, | |
onFailure:function(transport){ | |
if (ul) ul.className = origClass; | |
}, | |
on401:sessionTimeoutSuggestLogin}); | |
} | |
</script> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |
<head> | |
<meta name="csrf-param" content="authenticity_token"/> | |
<meta name="csrf-token" content="nSip0RJ7zulPE3nYvcscsAjHTxEKagQHx/9m8iQIhd0="/> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=2.0" /> | |
<meta http-equiv="Expires" content="Thu, 01 Jan 1970 00:00:00 GMT"/> | |
<meta http-equiv="Cache-Control" content="no-cache, no-store"/> | |
<meta http-equiv="Pragma" content="no-cache"/> | |
<title>Opportunity Dashboard</title> | |
<link href="/v_82001408231643/stylesheets/base_packaged.css" media="screen" rel="stylesheet" type="text/css" /> | |
</head> | |
<body class="bodySingleView" | |
> | |
<script> | |
__TABLEAU_SITE = 'adventuresindatasitting'; | |
</script> | |
<script src="/v_82001408231643/javascripts/wgapp_jsstrings_en.js"></script> | |
<script type="text/javascript"> | |
tableau_assets={VIEW_ERROR:"\x2Fv\x5F82001408231643\x2Fimages\x2Fviewerror\x2Epng",EXPAND_LEFT:"\x2Fv\x5F82001408231643\x2Fimages\x2Fexpand\x5Fleft\x2Egif",EXPAND_RIGHT:"\x2Fv\x5F82001408231643\x2Fimages\x2Fexpand\x5Fright\x2Egif",EXPAND_UP:"\x2Fv\x5F82001408231643\x2Fimages\x2Fexpand\x5Fup\x2Egif",EXPAND_DOWN:"\x2Fv\x5F82001408231643\x2Fimages\x2Fexpand\x5Fdown\x2Egif",CHECK_ALLPAGES:"\x2Fv\x5F82001408231643\x2Fimages\x2Fcheckbox\x5Fdouble\x2Epng",CHECK_SELECT:"\x2Fv\x5F82001408231643\x2Fimages\x2Fcheckbox\x5Fon\x2Epng",CHECK_NONE:"\x2Fv\x5F82001408231643\x2Fimages\x2Fcheckbox\x5Foff\x2Epng",CHECK_MULTI:"\x2Fv\x5F82001408231643\x2Fimages\x2Fcheckbox\x5Ffilled\x2Epng",ADMIN_OPEN:"\x2Fv\x5F82001408231643\x2Fimages\x2Fexpand\x5Fdown\x2Egif",ADMIN_CLOSED:"\x2Fv\x5F82001408231643\x2Fimages\x2Fexpand\x5Fup\x2Egif",POWERED_BY:"\x2Fv\x5F82001408231643\x2Fimages\x2Fpowered\x5Fby\x2Egif",LYTEBOX_EMPTY:"\x2Fv\x5F82001408231643\x2Fimages\x2Flytebox\x5Fempty\x2Epng"}; | |
</script> | |
<script type="text/javascript"> | |
(function(){window.tabConfig={shareDescriptionCharLimit:106}}()); | |
</script> | |
<script src="/v_82001408231643/javascripts/initial_packaged.js" type="text/javascript"></script> | |
<script type="text/javascript"> | |
//<![CDATA[ | |
mark_body_for_ie(); | |
mark_body_with_css_class('admin'); | |
//]]> | |
</script> | |
<script type="text/javascript"> | |
//<![CDATA[ | |
jQuery(function(c){var d={logo:{img:"/images/tableau-icon.gif",width:26,height:26,uri:"/t/adventuresindatasitting/",tooltip:"Tableau Online Home"},vizTitle:{star:'<span id=\'star_View_2033264\' style=\'display:inline-block;\' onclick="setFavorite(this.id, 1, true);"><ul class=\'favorite no\'><li class="current" style="width: 0.0em;" alt="Not a Favorite"></li><li><a href="javascript://" class="favorite1" title="Click to toggle favorite"></a></li></ul></span>',label:"Salesforce",links:[{label:"Back",uri:"/t/adventuresindatasitting/workbooks/Salesforce"},{label:"Workbook",uri:"/t/adventuresindatasitting/workbooks/Salesforce"}]},toolbar:[{type:"alert",label:"Alerts(0)"},{type:"help",label:"Help",searchUriPrefix:"http://www.tableausoftware.com/search/support/",pageLinks:[{label:"Getting Started",uri:"javascript:Tableau.Notifications.showGettingStarted()"},{label:"Work with views",uri:"http://www.tableausoftware.com/en-us/app/server-viz1?edition=online&lang=en-us&version=8.2",target:"_blank"},{label:"Remember my changes",uri:"http://www.tableausoftware.com/en-us/app/server-viz2?edition=online&lang=en-us&version=8.2",target:"_blank"},{label:"Build a view",uri:"http://www.tableausoftware.com/en-us/app/server-viz4?edition=online&lang=en-us&version=8.2",target:"_blank"},{label:"Share views",uri:"http://www.tableausoftware.com/en-us/app/server-viz5?edition=online&lang=en-us&version=8.2",target:"_blank"},{label:"Subscribe to views",uri:"http://www.tableausoftware.com/en-us/app/server-viz6?edition=online&lang=en-us&version=8.2",target:"_blank"},{label:"Keep data fresh",uri:"http://www.tableausoftware.com/en-us/app/server-viz7?edition=online&lang=en-us&version=8.2",target:"_blank"}],fixedLinks:[{label:"Contact Support",uri:"https://auth.tableausoftware.com/online/supportRequest?uid=1411363693-20b33465a512baeeed7afbd88dd6d833&serverSiteId=19340f69-42c1-4c1f-8b9b-8c2d88176163&serverInstanceId=prod_online",target:"_blank"},{label:"All Help Topics",uri:"javascript:callHelpSimple('http://www.tableausoftware.com/app/server-help1?edition=online&lang=en-us&version=8.2','')"}]},{type:"menu",star:true,leftIcons:true,options:[],filter:true,tooltip:"Saved Favorites",noResultsMessage:"No results found.",noFavoritesMessage:"No favorites"},{type:"menu",label:"Ian Adams",tooltip:"Ian Adams ([email protected])",options:[{label:"User Preferences",uri:"/t/adventuresindatasitting/users/ian@128k%252Eco"},{label:"Sign Out",uri:"/manual/auth/logout"}]}],collapseBar:{collapsePrefsUri:"/t/adventuresindatasitting/prefs/toggle_display_of_thin_header"},mastheadHidden:false};var b={alertsEndpointUrl:"/t/adventuresindatasitting/alerts/workbooks/Salesforce",dismissEndpointUrl:"/t/adventuresindatasitting/alerts/dismiss",retryEndpointUrl:"/t/adventuresindatasitting/run/tasks",datasourceParameterizedUrl:"/t/adventuresindatasitting/datasources?search=%{workbook_name}",localizedNotifierLabel:"Alerts(0)",localizedAlertItemStrings:{messageZeroWorkbooksFail:"%{datasource} is out of date. No workbooks are affected.",messageOneWorkbookFail:"%{single_workbook} is out of date.",messageFewWorkbooksFail:"%{multiple_workbooks} and %{final_workbook} are out of date.",messageManyWorkbooksFail:"%{multiple_workbooks} and %{workbook_count} others are out of date.",labelDataSource:"Data source:",labelFailed:"Refresh failed:",labelSucceeded:"Last refreshed:",labelErrorMessage:"Error:",labelEmbeddedDatasource:"Embedded",labelNeverRefreshed:"None",actionTryAgain:"Try again",actionEditConnection:"Edit connection info",actionDismiss:"Permanently dismiss alert"},localizedFailureStrings:{"1000":"Unknown failure","2000":"Sign in failed","2100":"Expired Password","2200":"Access token validation","2300":"OAuth client misconfigured","3000":"Connection failed","4000":"Overlapping schedules","5000":"Full refresh required","10000":"Connectionless failure"},authenticity_token:"nSip0RJ7zulPE3nYvcscsAjHTxEKagQHx/9m8iQIhd0=",minPollingInterval:300000,maxPollingInterval:1200000,isDebug:false};d.alertsSettings=b;var a=new Tableau.Masthead(d);c(".singleLayoutTop").append(a.$el)});function resizeViewer(){}; | |
//]]> | |
</script> | |
<div class="singleLayoutTop"> | |
</div> | |
<div class="singleLayoutCenter"> | |
<script type="text/javascript"> | |
//<![CDATA[ | |
tableau={size:{minw:0,maxw:0,minh:0,maxh:0},sizeAddedHeight:0,_functions:{}};function setSize(b,a){tableau.size=b;tableau.sizeAddedHeight=a}var resizeViewerWasCalledByViz=false;function resizeViewer(){resizeViewerWasCalledByViz=true};//]]> | |
</script> | |
<div id="thin_client_viewer" style="position: relative"> | |
<iframe id="viewerFrame" src="/t/adventuresindatasitting/views/Salesforce/OpportunityDashboard?:embed=y&:from_wg=true" frameborder="0" scrolling="no" height="800px" width="100%" name="DisplayFrame" allowTransparency="true"></iframe> | |
<div id="wgapp_load_indicators" style="position:absolute; top:0px; left:0px; right:0px; height:800px; background-color:#FFF"> | |
<div id="wgappLoadingSpinner" style="position:absolute; top:20%; left:0px; right:0px; z-index:991; text-align:center"><img src="/images/30x30REV.gif"></div> | |
<div id="wgappGlassPane" style="position:absolute; cursor:wait; top:0px; left:0px; right:0px; top:0px; bottom:0px; z-index:990; background-color:#CCCCD3; -ms-filter:'progid:DXImageTransform.Microsoft.Alpha(Opacity=24)'; filter:alpha(opacity=24); opacity:0.24"></div> | |
</div> | |
</div> | |
<script type="text/javascript"> | |
//<![CDATA[ | |
(function(){var c=document.getElementById("wgapp_load_indicators");var e=document.getElementById("viewerFrame");function h(){if(c){c.innerHTML="";c.parentNode.removeChild(c);c=null}}function i(j){if(j.data==="tableau.completed"||j.data==="completed"||j.data==="tableau.loadIndicatorsLoaded"){h()}}function d(){if(e&&e.readyState==="complete"){h()}}if(window.postMessage){if(document.addEventListener){document.addEventListener("message",i,false);window.addEventListener("message",i,false)}else{if(document.attachEvent){document.attachEvent("onmessage",i);window.attachEvent("onmessage",i)}else{window.onmessage=i}}}else{if(/(msie) ([\w.]+)/.exec(navigator.userAgent.toLowerCase())){e.onreadystatechange=d}else{e.onload=h}}var b=navigator.userAgent;var f=b.indexOf("WebKit")>=0;var a=b.indexOf("Chrome")>=0;var g=b.indexOf("Safari")>=0||(f&&!a);if(g){e.addEventListener("mousewheel",function(){})}})(); | |
//]]> | |
</script> | |
<script src="/v_82001408231643/javascripts/secondary_packaged.js" type="text/javascript"></script> | |
<script src="/v_82001408231643/javascripts/cultures/globalize.culture.en-GB.js"></script> | |
<script>Globalize.culture("en-GB");</script> | |
<script src="/v_82001408231643/javascripts/encryption_packaged.js" type="text/javascript"></script> | |
<div id="view_summary" style="display:none"> | |
<script type="text/javascript"> | |
//<![CDATA[ | |
var spinner_comments="spinner_comments_fixed";if(/MSIE (\d+\.\d+);/.test(navigator.userAgent)){var ieversion=new Number(RegExp.$1);if(ieversion<7){spinner_comments="spinner_comments_relative"}}; //]]> | |
</script> | |
<div id="spinner_comments_fixed" style="display:none; position:fixed; z-index:1; right:10px; bottom:10px;"> | |
<img alt="Loading" src="/v_82001408231643/images/loading.gif" /> | |
</div> | |
<table width="60%" align="center" ID="centering_fix"><tbody> | |
<tr> | |
<td> | |
<div id="CommentsSection"> | |
<table class="formTable" style="border-collapse:separate;" width="100%"> | |
<tr class="rowtone"><td colspan="4" class="Textinsidetable" style="text-align:center"> | |
<span id="CommentHeader"> | |
<strong>Comments</strong> | |
</span> | |
</td></tr> | |
<tr><td> | |
<table id="CommentDisplay" width="100%"> | |
<tr><td style="text-align: center"> | |
No comments for this view yet | |
</td></tr> | |
</table> | |
</td></tr> | |
<tr><td class="Textinsidetable" colspan="4"> | |
<form accept-charset="UTF-8" action="/t/adventuresindatasitting/comments" data-remote="true" id="add_comment_form" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓" /><input name="authenticity_token" type="hidden" value="nSip0RJ7zulPE3nYvcscsAjHTxEKagQHx/9m8iQIhd0=" /></div> | |
<div class="Textinsidetable"> | |
<textarea class="commentTextArea" id="comment" name="comment" style="width:500px; height:80px;"></textarea> | |
<input class="button" id="comment_add_button" name="commit" style="margin-top:5px" title="Add Comment" type="submit" value="Add" /> | |
</div> | |
<div class="Textinsidetable" style="white-space: nowrap;" | |
><span style="display: inline-block; color: #AAA;">Format sample:</span | |
><span> "MyLink":http://www.example.com *bold* _italics_ +underline+</span | |
></div> | |
<div class="Textinsidetable" style="white-space: nowrap;" | |
><span style="display: inline-block; color: #AAA;">Displays as:</span | |
><span> <a href="http://www.example.com">MyLink</a> <strong>bold</strong> <em>italics</em> <ins>underline</ins></span | |
></div> | |
<input id="view_id" name="view_id" type="hidden" value="Salesforce/OpportunityDashboard" /> | |
<input type="hidden" value="" id="comment_form_hash" name="hash"> | |
</form> | |
<script type="text/javascript"> | |
//<![CDATA[ | |
jQuery(function(){var a,b;a=1000;b="Add New Comment: (1000 characters remaining)";attach_char_limit_behavior("#comment",a,b)});Event.observe("add_comment_form","ajax:before",function(){Element.show(spinner_comments);$("comment_add_button").disable()});Event.observe("add_comment_form","ajax:error",function(a){if(a.memo.status==401){sessionTimeoutSuggestLogin()}});Event.observe("add_comment_form","ajax:complete",function(b,c,a){$("comment").value="";$("comment_add_button").enable();Element.hide(spinner_comments)}); | |
//]]> | |
</script> | |
</td></tr> | |
</table> | |
</div> | |
</td> | |
<td> | |
<img alt="Loading" id="spinner_comments_relative" src="/v_82001408231643/images/loading.gif" style="display:none; float:right; margin:0;" /> | |
</td> | |
</tr> | |
<tr><td> | |
<table class="formTable" style="width:100%; margin:10px 0 10px 0; border-collapse:separate;"><tbody> | |
<tr valign="top" class="rowtone"><td class="Textinsidetable" colspan='4' style='text-align:center'> | |
<strong>Tags</strong> | |
</td></tr> | |
<tr> | |
<td class="Textinsidetable"> | |
<div id="tags_section"> | |
<span id="tags_id" class="adminControlContents"> | |
<span class="adminControlEmpty"> | |
<none> | |
</span> | |
</span> | |
</div> | |
</td> | |
<td> </td> | |
<td> | |
<form accept-charset="UTF-8" action="/t/adventuresindatasitting/add_tag_from_form/views/Salesforce/OpportunityDashboard" data-remote="true" id="AjaxTag" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓" /><input name="authenticity_token" type="hidden" value="nSip0RJ7zulPE3nYvcscsAjHTxEKagQHx/9m8iQIhd0=" /></div> | |
<div id="AddTagInput"> | |
<table><tbody> | |
<tr> | |
<td> | |
<input id="NewTag" name="NewTag" type="text" onKeyPress="return submitOnEnter(event, $('NewTag').value);"/> | |
</td> | |
<td class="adminControlCommand"> | |
<input type="button" value="Add" class="button" onclick="submitNewTag($('NewTag').value)" title="Add Tag"/> | |
</td> | |
</tr> | |
</tbody></table> | |
</div> | |
</form> </td> | |
</tr> | |
</tbody></table> | |
</td></tr> | |
<tr id="who_has_seen"><td style="text-align: center"> | |
<div style="margin-bottom:10px;"> | |
<a href="/t/adventuresindatasitting/admin/views/author/2033264/views/WhoHasSeen">Who has seen this view?</a> | |
</div> | |
</td></tr> | |
</tbody> | |
</table> | |
</div> | |
<script type="text/javascript"> | |
window.prototypeLibraryShim={isGecko:navigator.userAgent.indexOf("Gecko")>-1&&navigator.userAgent.indexOf("KHTML")==-1,attachEvent:function(c,a,b){jQuery(c).bind(a,b)},showElement:function(a){jQuery(typeof a==="string"?("#"+a):a).show()}}; | |
</script> | |
<script type="text/javascript"> | |
//<![CDATA[ | |
var currentTab="Salesforce/OpportunityDashboard";var currentView="Opportunity Dashboard";function scrollToBottom(){window.scrollTo(0,document.body.scrollHeight)}function abs(b){var a={top:0,left:0};while(b){a.top+=b.offsetTop;a.left+=b.offsetLeft;b=b.offsetParent}return a}tableau._functions.isLandscape=function(){if(typeof(window.orientation)!=="undefined"){return(Math.abs(window.orientation)===90)}else{return false}};tableau._functions.getViewportWidth=function(){if(document.documentElement.clientWidth){return document.documentElement.clientWidth}return(tableau._functions.isLandscape())?screen.Height:screen.width};tableau._functions.getViewportHeight=function(){if(document.documentElement.clientHeight){return document.documentElement.clientHeight}return(tableau._functions.isLandscape())?screen.width:screen.height};resizeViewer=function(i){var f=document.getElementById("viewerFrame");var q=abs(f).top;var a=document.getElementById("view_summary");var b=(a.className=="view-summary-abs"&&a.offsetHeight>0)?true:false;var m=(b)?0:((abs(a).top+a.offsetHeight)-(q+f.offsetHeight));var o=(b)?a:null;var l;var p=25;var h=false;var k=document.getElementById("view_summary");var c=f.parentNode.offsetWidth;var r;if(o){l=abs(o).top}else{if(window.innerHeight!=null){l=window.innerHeight}else{if(document.documentElement.clientHeight!=null){l=document.documentElement.clientHeight}else{if(document.body.clientHeight!=null){l=document.body.clientHeight}else{l=q+m+f.offsetHeight}}}}if(tableau.size.maxw>0&&tableau.size.maxw<c){c=tableau.size.maxw;h=true}if(tableau.size.minw>0){if(c<tableau.size.minw){c=tableau.size.minw;h=true}}if(!h){f.style.width="100%";if(k){k.style.width="100%";k.style.paddingTop="15px"}}else{f.style.width=c+"px";if(k){k.style.width=c+"px";k.style.paddingTop="15px"}}var n=document.body.offsetWidth;if(n<c){l-=18}r=(l-q)-p;if(tableau.size.minh>0){r=Math.max(tableau.size.minh+tableau.sizeAddedHeight,r)}if(tableau.size.maxh>0){r=Math.min(tableau.size.maxh+tableau.sizeAddedHeight,r)}f.style.height=r+"px";var g=document.getElementById("wgapp_load_indicators");if(g){g.style.height=r+"px"}prototypeLibraryShim.showElement(document.getElementById("view_summary"));var j=document.getElementById("debug");if(j){j.innerHTML="totalHeight="+l+"<br>";j.innerHTML+="availSpace="+r+"<br>";j.innerHTML+="headerSpace="+q+"<br>";j.innerHTML+="afterSpace="+m+"<br>";j.innerHTML+="afterTop="+abs(a).top+"<br>";j.innerHTML+="afterHeight="+a.offsetHeight+"<br>";j.innerHTML+="afterClass="+a.className+"<br>";j.innerHTML+="<br>"}};if(resizeViewerWasCalledByViz){resizeViewer()}var timeoutID=null;function showWarnings(){}(function(){var a=false;prototypeLibraryShim.attachEvent(window,"resize",function(){a=true;setTimeout(resizeViewer,1)});prototypeLibraryShim.attachEvent(document,"load",function(){if(!a){resizeViewer()}})})();function submitOnEnter(c,a){var f,d,b;if(window.event){f=c.keyCode}else{if(c.which){f=c.which}}if(13==f){return submitNewTag(a)}else{return true}}function submitNewTag(a){Element.show(spinner_comments);parms="NewTag="+encodeURIComponent(a.replace(/[\t\n\r]/g," "));parms+="&authenticity_token=nSip0RJ7zulPE3nYvcscsAjHTxEKagQHx/9m8iQIhd0=";parms+="&hash="+currentTab;new Ajax.Request("/t/adventuresindatasitting/add_tag_from_form/views/Salesforce/OpportunityDashboard",{asynchronous:true,evalScripts:true,parameters:parms,on401:sessionTimeoutSuggestLogin,onComplete:function(b){Element.hide(spinner_comments);$$("#NewTag")[0].value=""}});return false}function submitRemoveTag(a){Element.show(spinner_comments);parms="RemoveTag="+encodeURIComponent(a);parms+="&authenticity_token=nSip0RJ7zulPE3nYvcscsAjHTxEKagQHx/9m8iQIhd0=";parms+="&hash="+currentTab;new Ajax.Request("/t/adventuresindatasitting/remove_tag_from_form/views/Salesforce/OpportunityDashboard",{asynchronous:true,evalScripts:true,parameters:parms,on401:sessionTimeoutSuggestLogin,onComplete:function(b){Element.hide(spinner_comments)}});return false}function showMoreTags(){Element.show(spinner_comments);parms="";parms+="&authenticity_token=nSip0RJ7zulPE3nYvcscsAjHTxEKagQHx/9m8iQIhd0=";parms+="&hash="+currentTab;new Ajax.Request("/t/adventuresindatasitting/show_more_tags/views/Salesforce/OpportunityDashboard",{asynchronous:true,evalScripts:true,parameters:parms,on401:sessionTimeoutSuggestLogin,onComplete:function(a){Element.hide(spinner_comments)}});return false}function fix_ff_window_location(c){var a=decodeURI("\x2Ft\x2Fadventuresindatasitting\x2Fviews\x2FSalesforce\x2FOpportunityDashboard\x3F\x3Aembed\x3Dy\x26\x3Afrom\x5Fwg\x3Dtrue");var b=decodeURI(this.location.pathname+this.location.search);if(a!=b){this.location.replace(a)}}if(prototypeLibraryShim.isGecko){var viewer_frame=document.getElementById("viewerFrame");if(null!=viewer_frame){var viewer_win=viewer_frame.contentWindow;viewer_win.addEventListener("load",fix_ff_window_location,false)}}; | |
//]]> | |
function hopeForAutoLoginAndCurrentTab(a){window.location="/t/adventuresindatasitting/views/"+a}function updateTab(a,b){if($("comment_form_hash")){$("comment_form_hash").value=b}parms="hash="+b;route="/t/adventuresindatasitting/update_tab/views/"+b;new Ajax.Request(route,{asynchronous:true,evalScripts:true,parameters:parms,on401:function(c){hopeForAutoLoginAndCurrentTab(b)}});document.title=a.unescapeHTML();return false}function handleSheetChanged(a,b){clear_flash();currentTab=b;currentView=a;updateTab(a,b)}; | |
</script> | |
</div> | |
<a href="/v_82001408231643/images/lightbox_small_empty.png" rel="lytebox" title="" id="tableau_lytebox"></a> | |
<div id="tabEditConnDialogHolder"> | |
<div id="tabEditConnDialog"> | |
<form action="/t/adventuresindatasitting/do_edit/data_connections" method="post" id="dc_edit_form"> | |
<div class="tabEditConnTitle">Edit Data Connection</div> | |
<div class="tabEditConnBody"> | |
<div class="tabEditConnTable"> | |
<div class="tabEditConnForm"> | |
<div class="tabEditConnTableRow"> | |
<span class="tabEditConnLabelHolder"><label for="edit_server">Server:</label></span> | |
<span class="tabEditConnInputHolder"> | |
<input name="edit_server" type="text" class="formfield tabEditConnInput" value=> | |
<div class="tabEditConnInputClear">undo ×</div> | |
</span> | |
</div> | |
<div class="tabEditConnTableRow"> | |
<span class="tabEditConnLabelHolder"><label for="edit_portbox">Server Port:</label></span> | |
<span class="tabEditConnInputHolder"> | |
<input name="edit_port" id="edit_portbox" type="text" class="formfield tabEditConnInput" value=><div class="tabEditConnInputClear">undo ×</div> | |
</span> | |
</div> | |
<div class="tabEditConnTableRow"> | |
<span class="tabEditConnLabelHolder"><label for="edit_username">Database Username:</label></span> | |
<span class="tabEditConnInputHolder"> | |
<input name="edit_username" type="text" class="formfield tabEditConnInput" value=><div class="tabEditConnInputClear">undo ×</div> | |
</span> | |
</div> | |
<div class="tabEditConnTableRow"> | |
<span class="tabEditConnLabelHolder"><label for="password">Password:</label></span> | |
<span class="tabEditConnInputHolder"> | |
<input type="password" class="formfield tabEditConnInput" name="password" value="password" autocomplete="off"><div class="tabEditConnInputClear">undo ×</div> | |
</span> | |
</div> | |
<div class="tabEditConnTableRow"> | |
<span class="tabEditConnLabelHolder"><label for="password_confirmation">Confirm Password:</label></span> | |
<span class="tabEditConnInputHolder"><input type="password" class="formfield tabEditConnInput" name="password_confirmation" value="password" autocomplete="off"></span> | |
</div> | |
</div> | |
<div class="tabEditConnTest"><a class="tabEditConnTestLink">Test Connection</a></div> | |
<div class="tabEditConnMessages"> | |
<img alt="Busy" id="tabEditConnBusy" src="/v_82001408231643/images/busy.gif" /><span id="edit_flash" style="color:#EE0000;"></span><span id="edit_flash_status" style="display: none; color: #330066"></span> | |
</div> | |
<div class="tabEditButtons"> | |
<a class="tabEditConnButton tabEditConnSave tabDisabled">Save</a> | |
<a class="tabEditConnButton tabEditConnCancel">Cancel</a> | |
</div> | |
</div> | |
<input type="hidden" name="c_server" /> | |
<input type="hidden" name="c_port" /> | |
<input type="hidden" name="c_username" /> | |
<input type="hidden" name="c_password" /> | |
<input type="hidden" name="crypted" size="130" /> | |
<input type="hidden" name="crypted_confirmation" size="130" /> | |
<input type="hidden" name="submitted" value="yes" /> | |
<input type="hidden" name="checked_ids" /> | |
<input type="hidden" name="checked_count" /> | |
<input type="hidden" name="server" /> | |
<input type="hidden" name="search_port_select" /> | |
<input type="hidden" name="port" /> | |
<input type="hidden" name="dbclass" /> | |
<input type="hidden" name="username" /> | |
<input type="hidden" name="pw_exists" /> | |
<input name="authenticity_token" type="hidden" value="nSip0RJ7zulPE3nYvcscsAjHTxEKagQHx/9m8iQIhd0=" /> | |
</div> | |
</form> | |
<script type="text/javascript"> | |
//<![CDATA[ | |
jQuery(function(){if(Tableau.EditConnection){Tableau.EditConnection.bindControls()}}); | |
//]]> | |
</script> | |
</div> | |
<div class="tabEditConnOverlay"></div> | |
</div> | |
<script type="text/javascript"> | |
//<![CDATA[ | |
(function(){function b(u){switch(u.which){case 9:case 13:case 16:case 17:case 18:return}u.data.$changedInput.val("on");u.data.$formInput.parents(".tabEditConnInputHolder").addClass("tabEditConnModified");jQuery("#edit_flash_status").text("");jQuery(".tabEditConnSave").removeClass("tabDisabled")}function p(u){u.data.$changedInput.val("");u.data.$formInput.val(u.data.origValue||"");u.data.$formInput.parents(".tabEditConnInputHolder").removeClass("tabEditConnModified");jQuery(".tabEditConnSave").toggleClass("tabDisabled",jQuery(".tabEditConnModified").length===0)}function d(u){jQuery("#tabEditConnBusy").toggle(u)}function t(u){jQuery.get("/t/adventuresindatasitting/data_connections/"+u+".xml",{},function(w){if(w){var v=jQuery(w);if(v.find("authMode").text()==="oauth"){Tableau.Connection.edit("/t/adventuresindatasitting/pre_edit_oauth/data_connections",[u])}else{q(u,v.find("server").text(),v.find("port").text(),v.find("username").text())}}},"xml")}function q(z,x,v,y){if(z==null){var u=$$(".multi_select_checkbox");var w=u.select(function(A){return A.checked}).pluck("name");if(get_table_form_var("multiple_pages_selected")=="true"){$("dc_edit_form").checked_ids.value="all";$("dc_edit_form").checked_count.value="all"}else{$("dc_edit_form").checked_ids.value=w.join(",");$("dc_edit_form").checked_count.value=w.length}$("dc_edit_form").server.value=$("search_form").server.value||"";$("dc_edit_form").search_port_select.value=$("search_form").search_port_select.value||"";$("dc_edit_form").port.value=$("search_form").port.value||"";$("dc_edit_form").dbclass.value=$("search_form").dbclass.value||"";$("dc_edit_form").username.value=$("search_form").username.value||"";$("dc_edit_form").pw_exists.value=$("search_form").pw_exists.value||""}else{$("dc_edit_form").checked_ids.value="checkbox_"+z;$("dc_edit_form").checked_count.value=1}$("dc_edit_form").edit_server.value=x||"";$("dc_edit_form").edit_port.value=v||"";$("dc_edit_form").edit_username.value=y||"";jQuery(".tabEditConnTestLink").toggle($("dc_edit_form").checked_count.value==1);jQuery("#tabEditConnDialog").show();jQuery(".tabEditConnOverlay").show();Tableau.EditConnection.bindControls()}function o(){k();jQuery("#tabEditConnDialog").hide();jQuery(".tabEditConnOverlay").hide();parms="authenticity_token=nSip0RJ7zulPE3nYvcscsAjHTxEKagQHx/9m8iQIhd0=";new Ajax.Updater("tabEditConnDialog","/t/adventuresindatasitting/end_edit/data_connections",{asynchronous:true,evalScripts:true,parameters:parms})}function m(){if(!jQuery("#tabEditConnDialog").is(":visible")){return}jQuery.each(["server","port","username"],function(y,A){var B=jQuery("#dc_edit_form").find("[name='edit_"+A+"']");var x=jQuery("#dc_edit_form").find("[name='c_"+A+"']");var z={$formInput:B,$changedInput:x,origValue:B.val()};B.keyup(z,b).parent().find(".tabEditConnInputClear").click(z,p)});var u=jQuery("#dc_edit_form").find("[name=password], [name=password_confirmation]");var v=jQuery("#dc_edit_form").find("[name=c_password]");var w={$formInput:u,$changedInput:v,origValue:u.val()};u.keyup(w,b).parent().find(".tabEditConnInputClear").click(w,p);jQuery(".tabEditConnTestLink").click(s);jQuery(".tabEditConnSave").click(f);jQuery(".tabEditConnCancel").click(o)}var c={port:null,server:null,username:null};function f(){if(jQuery(".tabEditConnSave").hasClass("tabDisabled")){return}d(true);jQuery("#edit_flash").hide();jQuery("#edit_flash_status").empty().text("Submitting changes...").show();jQuery.post("/t/adventuresindatasitting/gen_key/data_connections",{authenticity_token:"nSip0RJ7zulPE3nYvcscsAjHTxEKagQHx/9m8iQIhd0="},function(v,u,w){g(v.modulus,v.exponent)})}function g(u,x){var w=jQuery("#dc_edit_form")[0];if(w.c_port.value==="on"){c.port=w.edit_port.value}if(w.c_server.value==="on"){c.server=w.edit_server.value}if(w.c_username.value==="on"){c.username=w.edit_username.value}if(w.c_password.value==="on"){var v=new RSAKey();v.setPublic(u,x);encryptField(v,w,w.crypted,w.password,"txt1");encryptField(v,w,w.crypted_confirmation,w.password_confirmation,"txt2")}new Ajax.Updater({success:"tabEditConnDialog"},"/t/adventuresindatasitting/do_edit/data_connections",{asynchronous:true,evalScripts:true,parameters:Form.serialize(w),onFailure:function(){l()}});return false}function l(){d(false);jQuery("#edit_flash_status").text("The server encountered an error saving this connection.")}function e(){k();myLytebox.end();parms="authenticity_token=nSip0RJ7zulPE3nYvcscsAjHTxEKagQHx/9m8iQIhd0=";new Ajax.Updater("tabEditConnDialog","/t/adventuresindatasitting/do_edit/data_connections",{asynchronous:true,evalScripts:true,parameters:parms})}function s(){d(true);jQuery("#edit_flash").hide();jQuery("#edit_flash_status").empty().text("Testing...").show();jQuery.post("/t/adventuresindatasitting/gen_key/data_connections",{authenticity_token:"nSip0RJ7zulPE3nYvcscsAjHTxEKagQHx/9m8iQIhd0="},function(v,u,w){r(v.modulus,v.exponent)})}function a(x,v,y){var u={authenticity_token:"nSip0RJ7zulPE3nYvcscsAjHTxEKagQHx/9m8iQIhd0=",submitted:"yes",checked_ids:x.checked_ids.value};if(x.c_port.value==="on"){u.c_port="on";u.edit_port=x.edit_port.value}if(x.c_server.value==="on"){u.c_server="on";u.edit_server=x.edit_server.value}if(x.c_username.value==="on"){u.c_username="on";u.edit_username=x.edit_username.value}if(x.c_password.value==="on"){var w=new RSAKey();w.setPublic(v,y);u.c_password="on";u.password="txt1";u.password_confirmation="txt2";u.crypted=w.encrypt(x.password.value);u.crypted_confirmation=w.encrypt(x.password_confirmation.value)}return u}function r(u,x){var v=jQuery("#dc_edit_form")[0];if(v.c_port.value==="on"){c.port=v.edit_port.value}if(v.c_server.value==="on"){c.server=v.edit_server.value}if(v.c_username.value==="on"){c.username=v.edit_username.value}var w=function(z){var y=jQuery("<div class='tabConnectionErrors'/>");z=z||["Test connection failed"];jQuery.each(z.slice(0,1),function(A,B){y.append(jQuery("<div class='tabConnectionError'/>").text(B))});jQuery("#edit_flash_status").hide();jQuery("#edit_flash").empty().append(y).show().attr("title",y.text())};jQuery.post("/t/adventuresindatasitting/test/data_connections",a(v,u,x)).done(function(z,y,A){if(z&&z.success){jQuery("#edit_flash_status").text("Test connection succeeded").show();jQuery("#edit_flash").hide()}else{w(z.errors)}}).fail(function(y){w()}).always(function(){d(false)});return false}function n(){var u=$("monitor_form");new Ajax.Updater("tabEditConnDialog","/t/adventuresindatasitting/monitor/data_connections",{asynchronous:true,method:"get",evalScripts:true,parameters:Form.serialize(u)})}function k(){var x;var v=document.getElementsByClassName("statusMessage");if(v.length===1){var u=v[0].value;var w=u.match("Finished");if(w){if(c.server){x=document.getElementsByClassName("server");if(x.length>0){x[0].innerHTML=c.server}c.server=null}if(c.port){x=document.getElementsByClassName("port");if(x.length>0){x[0].innerHTML=c.port}c.port=null}if(c.username){x=document.getElementsByClassName("username");if(x.length>0){x[0].innerHTML=c.username}c.username=null}}}}function j(){var u=$("dots");var v=$("monitor_form").refresh_count.value;var w="";for(i=0;i<v;i++){w+="..."}u.update(w)}this.Tableau||(this.Tableau={});var h={bindControls:m,close:o,updateJobMonitoringStatus:n,setDots:j,edit:q,startEditing:t};this.Tableau.EditConnection=h}).call(this,jQuery); | |
//]]> | |
</script> | |
</body> | |
<script type="text/javascript"> | |
set_and_highlight_flash(" ","");function show_popup(a){$("tableau_lytebox").title=a;loadLytebox("tableau_lytebox")}var timeoutID=null;function setFavorite(g,f,c){if(c){var e=$(g);var d=e.getElementsByTagName("ul")[0];var a=d.className;d.className="favorite updating"}parms=g+"="+f;parms+="&authenticity_token=nSip0RJ7zulPE3nYvcscsAjHTxEKagQHx/9m8iQIhd0=";var b="/t/adventuresindatasitting/update_favs/favorites";new Ajax.Request(b,{asynchronous:true,evalScripts:true,parameters:parms,onFailure:function(h){if(d){d.className=a}},on401:sessionTimeoutSuggestLogin})}; | |
</script> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It also reduced the number of lines in the file by 729. That's significant!