本文整理汇总了PHP中getPathToStaticResource函数的典型用法代码示例。如果您正苦于以下问题:PHP getPathToStaticResource函数的具体用法?PHP getPathToStaticResource怎么用?PHP getPathToStaticResource使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getPathToStaticResource函数的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: workbenchLog
if (WorkbenchConfig::get()->value("checkSSL") && !usingSslEndToEnd()) {
print "<div style='font-size: 8pt; color: orange;'>WARNING: Unsecure connection detected</div>";
}
if (WorkbenchContext::isEstablished() && WorkbenchContext::get()->isRequestStartTimeSet() && WorkbenchConfig::get()->value("displayRequestTime")) {
$requestProcessingTime = WorkbenchContext::get()->getRequestProcessingTime();
workbenchLog(LOG_INFO, "RequestProcessingMetrics", array("measure.request.service" => $requestProcessingTime . "sec", "source" => basename($_SERVER['SCRIPT_NAME'])));
printf("Requested in %01.3f sec<BR/>", $requestProcessingTime);
}
print "Jason's Workbench " . ($GLOBALS["WORKBENCH_VERSION"] != "trunk" ? $GLOBALS["WORKBENCH_VERSION"] : "") . "<br/>\n";
?>
</div>
</body>
<script type="text/javascript" src="<?php
echo getPathToStaticResource('/script/wz_tooltip.js');
?>
"></script>
<?php
if (isset($_REQUEST["footerScripts"])) {
foreach ($_REQUEST["footerScripts"] as $script) {
print $script . "\n";
}
}
?>
</html>
<?php
$peak = memory_get_peak_usage();
开发者ID:juhlrich,项目名称:forceworkbench,代码行数:31,代码来源:footer.php
示例2: displayBulkApiOptions
function displayBulkApiOptions($action, $forceDoAsync, $recommendDoAsync = false)
{
//Hard Delete option
if (WorkbenchContext::get()->isApiVersionAtLeast(19.0) && $action == 'Confirm Delete') {
print "<p><label><input type='checkbox' id='doHardDelete' name='doHardDelete' onClick=\"" . "if (this.checked && " . ($forceDoAsync ? "false" : "true") . ") {" . " document.getElementById('doAsync').checked = true;" . " document.getElementById('asyncDeleteObjectSelection').style.display = 'inline';" . " document.getElementById('unsupportedBulkConfigList').style.display = 'inline';" . "}\"/> " . "Permanently hard delete records</label>" . " <img onmouseover=\"Tip('When specified, the deleted records are not stored in the Recycle Bin. " . "Instead, the records become immediately eligible for deletion, don\\'t count toward the storage space used " . "by your organization, and may improve performance. The Administrative permission for this operation, " . "\\'Bulk API Hard Delete\\', is disabled by default and must be enabled by an administrator. " . "A Salesforce user license is required for hard delete. Hard Delete is only available via Bulk API.')\" " . "align='absmiddle' src='" . getPathToStaticResource('/images/help16.png') . "'/>" . "</p>";
}
//Async Options
if (WorkbenchContext::get()->isApiVersionAtLeast(17.0) && in_array($action, array('Confirm Insert', 'Confirm Update', 'Confirm Upsert')) || WorkbenchContext::get()->isApiVersionAtLeast(18.0) && $action == 'Confirm Delete') {
if ($forceDoAsync) {
print "<input name='doAsync' type='hidden' value='true'/>";
} else {
print "<p><label><input id='doAsync' name='doAsync' type='checkbox' " . ($recommendDoAsync ? "checked='checked' " : "") . "onClick=\"" . "var doHardDelete = document.getElementById('doHardDelete');" . "var asyncDeleteObjectSelection = document.getElementById('asyncDeleteObjectSelection');" . "var unsupportedBulkConfigList = document.getElementById('unsupportedBulkConfigList');" . "if (this.checked) {" . " if (asyncDeleteObjectSelection != null) asyncDeleteObjectSelection.style.display = 'inline';" . " if (unsupportedBulkConfigList != null) unsupportedBulkConfigList.style.display = 'inline';" . "} else {" . " if (doHardDelete != null) doHardDelete.checked = false;" . " if (asyncDeleteObjectSelection != null) asyncDeleteObjectSelection.style.display = 'none';" . " if (unsupportedBulkConfigList != null) unsupportedBulkConfigList.style.display = 'none';" . "}\"/> " . "Process records asynchronously via Bulk API</label>" . " <img onmouseover=\"Tip('Processing records asynchronously is recommended for large data loads. " . "The data will be uploaded to Salesforce via the Bulk API in batches and processed when server resources are available. " . "After batches have completed, results can be downloaded. Batch size and concurrency options are available in Settings.')\" " . "align='absmiddle' src='" . getPathToStaticResource('/images/help16.png') . "'/>" . "</p>";
}
// object selection for Bulk API Delete
if ($action == 'Confirm Delete') {
print "<div id='asyncDeleteObjectSelection' style='display: " . ($forceDoAsync || $recommendDoAsync ? "inline" : "none; margin-left: 3em;") . "'>Object Type: ";
printObjectSelection(WorkbenchContext::get()->getDefaultObject());
print "</div>";
}
// all configs not supported by Bulk API
$bulkUnsupportedConfigs = array("mruHeader_updateMru", "allOrNoneHeader_allOrNone", "emailHeader_triggerAutoResponseEmail", "emailHeader_triggertriggerUserEmail", "emailHeader_triggerOtherEmail", "allowFieldTruncationHeader_allowFieldTruncation", "UserTerritoryDeleteHeader_transferToUserId");
// find this user's settings that are in the unsupported config list
$bulkUnsupportedSettings = array();
foreach ($bulkUnsupportedConfigs as $c) {
if (WorkbenchConfig::get()->overridden($c)) {
$bulkUnsupportedSettings[] = $c;
}
}
// print out a warning if any settings were found
if (count($bulkUnsupportedSettings) > 0) {
print "<div id='unsupportedBulkConfigList' style='display: " . ($forceDoAsync || $recommendDoAsync ? "inline" : "none") . "; color: orange;'>" . "<p " . ($forceDoAsync ? "" : "style='margin-left: 3em;'") . ">" . "<img src='" . getPathToStaticResource('/images/warning24.png') . "' /> " . "The following settings are not supported by the Bulk API and will be ignored:" . "<ul " . ($forceDoAsync ? "" : "style='margin-left: 5em;'") . ">";
foreach ($bulkUnsupportedSettings as $s) {
print "<li>" . WorkbenchConfig::get()->label($s) . "</li>";
}
print "</ul>" . "</p>" . "</div>";
}
}
}
开发者ID:sivarajankumar,项目名称:forceworkbench,代码行数:38,代码来源:put.php
示例3: getPathToStaticResource
<?php
require_once 'session.php';
require_once 'shared.php';
require_once 'put.php';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="Content-Language" content="UTF-8" />
<meta http-equiv="Content-Type" content="text/xhtml; charset=UTF-8" />
<link rel="stylesheet" href="<?php
echo getPathToStaticResource('/style/master.css');
?>
" type="text/css" />
<link rel="Shortcut Icon" type="image/png" href="<?php
echo getPathToStaticResource('/images/bluecube-16x16.png');
?>
" />
<title>Workbench - CSV Preview</title>
</head>
<body>
<?php
if (isset($_SESSION['csv_array'])) {
displayCsvArray($_SESSION['csv_array']);
} else {
displayError("No CSV has been uploaded, or it is no longer active");
}
include_once 'footer.php';
开发者ID:sivarajankumar,项目名称:forceworkbench,代码行数:31,代码来源:csv_preview.php
示例4: getCsrfFormTag
options:</p>
<form id='deployForm' name='deployForm' method='POST'
action=''
enctype='multipart/form-data'><input type='file' name='deployFile'
size='44' />
<?php
print getCsrfFormTag();
?>
<input type='hidden' name='MAX_FILE_SIZE' value='<?php
print WorkbenchConfig::get()->value("maxFileSize");
?>
' />
<img onmouseover="Tip('Choose a ZIP file containing a project manifest, a file named package.xml, and a set of directories that contain the components to deploy. See Salesforce.com Metadata API Developers guide more information about working with ZIP files for deployment.')"
align='absmiddle' src='<?php
echo getPathToStaticResource('/images/help16.png');
?>
' />
<p />
<?php
printDeployOptions(defaultDeployOptions());
?>
<p />
<input type='submit' name='stageForDeployment' value='Next' /></form>
<?php
}
}
include_once 'footer.php';
exit;
function deserializeDeployOptions($request)
{
开发者ID:sivarajankumar,项目名称:forceworkbench,代码行数:31,代码来源:metadataDeploy.php
示例5: getPathToStaticResource
value="Delete"/>
<span id="waitingIndicator">
<img src="<?php
echo getPathToStaticResource('/images/wait16trans.gif');
?>
"/>
Processing...
</span>
</div>
</form>
</div>
</div>
<div id="streamContainer">
<div><span id="status"></span><span id="pollIndicator">•</span></div>
<div id="streamBody"></div>
</div>
<script type="text/javascript">
</script>
<?php
if ($c->isEnabled()) {
addFooterScript("<script type='text/javascript' src='" . 'static-unversioned/script/dojo/dojo/dojo.js' . "'></script>");
addFooterScript("<script type='text/javascript' src='" . getPathToStaticResource('/script/streamingClient.js') . "'></script>");
addFooterScript("<script type='text/javascript'>var wbStreaming = " . $c->getStreamingConfig() . ";</script>");
}
require_once "footer.php";
开发者ID:neftcorp,项目名称:forceworkbench,代码行数:31,代码来源:streaming.php
示例6: futureAjax
function futureAjax($asyncId)
{
?>
<div id="async-container-<?php
echo $asyncId;
?>
"></div>
<script type='text/javascript' src='<?php
echo getPathToStaticResource('/script/getElementsByClassName.js');
?>
'></script>
<script type="text/javascript">
<!--
var WorkbenchFuture<?php
echo $asyncId;
?>
= new function() {
// Get the HTTP Object
this.getHTTPObject = function() {
if (window.ActiveXObject) {
return new ActiveXObject("Microsoft.XMLHTTP");
} else if (window.XMLHttpRequest) {
return new XMLHttpRequest();
} else {
alert("Your browser does not support AJAX.");
return null;
}
};
this.getFuture = function() {
this.disableWhileAsyncLoading(true);
var container = document.getElementById('async-container-<?php
echo $asyncId;
?>
');
container.innerHTML = "<img src='<?php
echo getPathToStaticResource('/images/wait16trans.gif');
?>
'/> Loading...";
this.getFutureInternal(container, 0);
};
this.getFutureInternal = function(container, totalTimeWaiting) {
var ajax = this.getHTTPObject();
if (ajax != null) {
var longPollTimeout = 10;
ajax.open("GET", "future_get.php?async_id=<?php
echo $asyncId;
?>
&wait_for=" + longPollTimeout, true);
ajax.send(null);
ajax.onreadystatechange = function () {
if (ajax.readyState == 4) {
if (ajax.status == 200) {
container.innerHTML = ajax.responseText;
var evalables = getElementsByClassName("evalable", "script", container);
for (i in evalables) {
eval(evalables[i].innerHTML)
}
} else if (ajax.status == 202) {
// 202 means that long poll ended, but still waiting for result
container.innerHTML += ".";
if (totalTimeWaiting > (<?php
echo WorkbenchConfig::get()->value('asyncTimeoutSeconds');
?>
)) {
container.innerHTML = "<span style='color:red;'>Timed out waiting for asynchronous job to complete</span>";
} else {
WorkbenchFuture<?php
echo $asyncId;
?>
.getFutureInternal(container, totalTimeWaiting + longPollTimeout);
return;
}
} else if (ajax.status == 404) {
container.innerHTML = "<span style='color:red;'>Unknown Asynchronous Job</span>";
} else if (ajax.status == 503) {
container.innerHTML = "<span style='color:red;'>Service was temporarily interrupted or is unavailable. Please try again in a moment.</span>";
} else {
container.innerHTML = "<span style='color:red;'>Unknown Asynchronous State</span>";
}
WorkbenchFuture<?php
echo $asyncId;
?>
.disableWhileAsyncLoading(false);
}
};
} else {
container.innerHTML = "Unknown error loading content";
}
};
this.disableWhileAsyncLoading = function(isAllowed) {
var disableWhileAsyncLoadingElements = getElementsByClassName("disableWhileAsyncLoading");
for (i in disableWhileAsyncLoadingElements) {
//.........这里部分代码省略.........
开发者ID:sivarajankumar,项目名称:forceworkbench,代码行数:101,代码来源:future_ajax.js.php
示例7: isset
$operation = isset($_REQUEST['op']) ? htmlspecialchars($_REQUEST['op']) : (isset($asyncResults->checkOnly) ? "D" : "R");
$results = $operation == "D" ? WorkbenchContext::get()->getMetadataConnection()->checkDeployStatus($asyncProcessId, $debugInfo) : WorkbenchContext::get()->getMetadataConnection()->checkRetrieveStatus($asyncProcessId, $debugInfo);
$zipLink = null;
if (isset($results->zipFile) || isset($results->retrieveResult->zipFile)) {
if (isset($results->zipFile)) {
$_SESSION['retrievedZips'][$asyncResults->id] = $results->zipFile;
unset($results->zipFile);
} else {
if (isset($results->retrieveResult->zipFile)) {
$_SESSION['retrievedZips'][$asyncResults->id] = $results->retrieveResult->zipFile;
unset($results->retrieveResult->zipFile);
}
}
displayInfo("Retrieve result ZIP file is ready for download.");
print "<p/>";
$zipLink = " | <a id='zipLink' href='?asyncProcessId={$asyncResults->id}&downloadZip' onclick='undownloadedZip=false;' style='text-decoration:none;'>" . "<span style='text-decoration:underline;'>Download ZIP File</span> <img src='" . getPathToStaticResource('/images/downloadIconCompleted.gif') . "' border='0'/>" . "</a></p>";
}
$tree = new ExpandableTree("metadataStatusResultsTree", ExpandableTree::processResults($results));
$tree->setForceCollapse(true);
$tree->setAdditionalMenus($zipLink);
$tree->setContainsIds(true);
$tree->setContainsDates(true);
$tree->printTree();
if (isset($debugInfo["DebuggingInfo"]->debugLog)) {
print "<p> </p><h3>Debug Logs</h3>";
print "<pre>" . addLinksToIds(htmlspecialchars($debugInfo["DebuggingInfo"]->debugLog, ENT_QUOTES)) . '</pre>';
}
// if metadata changes were deployed, clear the cache because describe results will probably be different
if ($operation == "D") {
WorkbenchContext::get()->clearCache();
}
开发者ID:robbyrob42,项目名称:forceworkbench,代码行数:31,代码来源:metadataStatus.php
示例8: getClearCacheMenu
public static function getClearCacheMenu()
{
return " | <a href='?clearCache' style='text-decoration:none;'>" . "<span style='text-decoration:underline;'>Clear Cache</span> <img src='" . getPathToStaticResource('/images/sweep.png') . "' border='0' align='top'/>" . "</a>";
}
开发者ID:robbyrob42,项目名称:forceworkbench,代码行数:4,代码来源:ExpandableTree.php
示例9: displayInfo
function displayInfo($infos)
{
print "<div class='displayInfo'>\n";
print "<img src='" . getPathToStaticResource('/images/info24.png') . "' width='24' height='24' align='middle' border='0' alt='info:' /> <p/>";
if (is_array($infos)) {
$infoString = "";
foreach ($infos as $info) {
$infoString .= "<p>" . htmlspecialchars($info) . "</p>";
}
print $infoString;
} else {
print htmlspecialchars($infos);
}
print "</div>\n";
}
开发者ID:sivarajankumar,项目名称:forceworkbench,代码行数:15,代码来源:shared.php
示例10: displaySearchResult
function displaySearchResult($records, $searchTimeElapsed)
{
//Check if records were returned
if ($records) {
if (WorkbenchConfig::get()->value("areTablesSortable")) {
addFooterScript("<script type='text/javascript' src='" . getPathToStaticResource('/script/sortable.js') . "></script>");
}
try {
print "<a name='sr'></a><div style='clear: both;'><br/><h2>Search Results</h2>\n";
print "<p>Returned " . count($records) . " total record";
if (count($records) !== 1) {
print 's';
}
print " in ";
printf("%01.3f", $searchTimeElapsed);
print " seconds:</p>";
$searchResultArray = array();
foreach ($records as $record) {
$recordObject = new Sobject($record->record);
$searchResultArray[$recordObject->type][] = $recordObject;
}
foreach ($searchResultArray as $recordSetName => $records) {
echo "<h3>{$recordSetName}</h3>";
print "<table id='" . $recordSetName . "_results' class='" . getTableClass() . "'>\n";
//Print the header row on screen
$record0 = $records[0];
print "<tr><th></th>";
//If the user queried for the Salesforce ID, this special method is nessisary
//to export it from the nested SOAP message. This will always be displayed
//in the first column regardless of search order
if (isset($record0->Id)) {
print "<th>Id</th>";
}
if ($record0->fields) {
foreach ($record0->fields->children() as $field) {
print "<th>";
print htmlspecialchars($field->getName(), ENT_QUOTES);
print "</th>";
}
} else {
print "</td></tr>";
}
print "</tr>\n";
//Print the remaining rows in the body
$rowNum = 1;
foreach ($records as $record) {
print "<tr><td>{$rowNum}</td>";
$rowNum++;
//Another check if there are ID columns in the body
if (isset($record->Id)) {
print "<td>" . addLinksToIds($record->Id) . "</td>";
}
//Print the non-ID fields
if (isset($record->fields)) {
foreach ($record->fields as $datum) {
print "<td>";
if ($datum) {
print localizeDateTimes(addLinksToIds(htmlspecialchars($datum, ENT_QUOTES)));
} else {
print " ";
}
print "</td>";
}
print "</tr>\n";
} else {
print "</td></tr>\n";
}
}
print "</table> <p/>";
}
print "</div>\n";
} catch (Exception $e) {
$errors = null;
$errors = $e->getMessage();
print "<p />";
displayError($errors, false, true);
}
} else {
print "<p><a name='sr'> </a></p>";
displayError("Sorry, no records returned.");
}
include_once 'footer.php';
}
开发者ID:neftcorp,项目名称:forceworkbench,代码行数:83,代码来源:search.php
示例11: displayQueryForm
function displayQueryForm($queryRequest)
{
registerShortcut("Ctrl+Alt+W", "addFilterRow(document.getElementById('numFilters').value++);" . "toggleFieldDisabled();");
if ($queryRequest->getObject()) {
$describeSObjectResult = WorkbenchContext::get()->describeSObjects($queryRequest->getObject());
$fieldValuesToLabels = array();
foreach ($describeSObjectResult->fields as $field) {
$fieldValuesToLabels[$field->name] = $field->name;
}
} else {
displayInfo('First choose an object to use the SOQL builder wizard.');
}
print "<script type='text/javascript'>\n";
print "var field_type_array = new Array();\n";
if (isset($describeSObjectResult)) {
foreach ($describeSObjectResult->fields as $fields => $field) {
print " field_type_array[\"{$field->name}\"]=[\"{$field->type}\"];\n";
}
}
$ops = array('=' => '=', '!=' => '≠', '<' => '<', '<=' => '≤', '>' => '>', '>=' => '≥', 'starts' => 'starts with', 'ends' => 'ends with', 'contains' => 'contains', 'IN' => 'in', 'NOT IN' => 'not in', 'INCLUDES' => 'includes', 'EXCLUDES' => 'excludes');
print "var compOper_array = new Array();\n";
foreach ($ops as $opValue => $opLabel) {
print " compOper_array[\"{$opValue}\"]=[\"{$opLabel}\"];\n";
}
print "</script>\n";
print "<script src='" . getPathToStaticResource('/script/query.js') . "' type='text/javascript'></script>\n";
print "<form method='POST' id='query_form' name='query_form' action='query.php'>\n";
print "<input type='hidden' name='justUpdate' value='0' />";
print "<input type='hidden' id='numFilters' name='numFilters' value='" . count($queryRequest->getFilters()) . "' />";
print "<p class='instructions'>Choose the object, fields, and critera to build a SOQL query below:</p>\n";
print "<table border='0' style='width: 100%;'>\n";
print "<tr><td valign='top' width='1'>Object:";
printObjectSelection($queryRequest->getObject(), 'QB_object_sel', "16", "onChange='updateObject();'", "queryable");
print "<p/>Fields:<select id='QB_field_sel' name='QB_field_sel[]' multiple='mutliple' size='4' style='width: 16em;' onChange='buildQuery();'>\n";
if (isset($describeSObjectResult)) {
print " <option value='count()'";
if ($queryRequest->getFields() != null) {
//check to make sure something is selected; otherwise warnings will display
foreach ($queryRequest->getFields() as $selectedField) {
if ('count()' == $selectedField) {
print " selected='selected' ";
}
}
}
print ">count()</option>\n";
//print ">$field->name</option>\n";
foreach ($describeSObjectResult->fields as $fields => $field) {
print " <option value='{$field->name}'";
if ($queryRequest->getFields() != null) {
//check to make sure something is selected; otherwise warnings will display
foreach ($queryRequest->getFields() as $selectedField) {
if ($field->name == $selectedField) {
print " selected='selected' ";
}
}
}
print ">{$field->name}</option>\n";
}
}
print "</select></td>\n";
print "<td valign='top'>";
print "<table border='0' align='right' style='width:100%'>\n";
print "<tr><td valign='top' colspan=2>View as:<br/>" . "<label><input type='radio' id='export_action_screen' name='export_action' value='screen' ";
if ($queryRequest->getExportTo() == 'screen') {
print "checked='true'";
}
print " onClick='toggleMatrixSortSelectors(true);'>List</label> ";
print "<label><input type='radio' id='export_action_matrix' name='export_action' value='matrix' ";
if ($queryRequest->getExportTo() == 'matrix') {
print "checked='true'";
}
print " onClick='toggleMatrixSortSelectors(true);'>Matrix</label>";
if (WorkbenchConfig::get()->value("allowQueryCsvExport")) {
print "<label><input type='radio' id='export_action_csv' name='export_action' value='csv' ";
if ($queryRequest->getExportTo() == 'csv') {
print "checked='true'";
}
print " onClick='toggleMatrixSortSelectors(true);'>CSV</label> ";
}
print "<label><input type='radio' id='export_action_async_csv' name='export_action' value='async_CSV' ";
if ($queryRequest->getExportTo() == 'async_CSV') {
print "checked='true'";
}
print " onClick='toggleMatrixSortSelectors(true);'>Bulk CSV</label> ";
print "<label><input type='radio' id='export_action_async_xml' name='export_action' value='async_XML' ";
if ($queryRequest->getExportTo() == 'async_XML') {
print "checked='true'";
}
print " onClick='toggleMatrixSortSelectors(true);'>Bulk XML</label> ";
print "<td valign='top' colspan=2>Deleted and archived records:<br/>" . "<label><input type='radio' name='query_action' value='Query' ";
if ($queryRequest->getQueryAction() == 'Query') {
print "checked='true'";
}
print " >Exclude</label> ";
print "<label><input type='radio' name='query_action' value='QueryAll' ";
if ($queryRequest->getQueryAction() == 'QueryAll') {
print "checked='true'";
}
print " >Include</label></td></tr></table>\n";
print "<table id='QB_right_sub_table' border='0' align='right' style='width:100%'>\n";
//.........这里部分代码省略.........
开发者ID:neftcorp,项目名称:forceworkbench,代码行数:101,代码来源:query.php
示例12: displayQueryForm
//.........这里部分代码省略.........
"<option value=''></option>";
for (var field in field_type_array) {
row += "<option value='" + field + "'";
if (defaultField == field) row += " selected='selected' ";
row += "'>" + field + "</option>";
}
row += "</select> " +
"" +
"<select id='QB_filter_compOper_" + filterRowNum + "' name='QB_filter_compOper_" + filterRowNum + "' style='width: 6em;' onChange='buildQuery();' onkeyup='buildQuery();'>";
for (var opKey in compOper_array) {
row += "<option value='" + opKey + "'";
if (defaultCompOper == opKey) row += " selected='selected' ";
row += ">" + compOper_array[opKey] + "</option>";
}
defaultValue = defaultValue != null ? defaultValue : "";
row += "</select> " +
"<input type='text' id='QB_filter_value_" + filterRowNum + "' size='31' name='QB_filter_value_" + filterRowNum + "' value='" + defaultValue + "' onkeyup='buildQuery();' />";
//add to the DOM
var newFilterCell = document.createElement('td');
newFilterCell.setAttribute('colSpan','4');
newFilterCell.setAttribute('vAlign','top');
newFilterCell.setAttribute('nowrap','true');
newFilterCell.innerHTML = row;
var newPlusCell = document.createElement('td');
newPlusCell.setAttribute('id','filter_plus_cell_' + filterRowNum);
newPlusCell.setAttribute('vAlign','bottom');
newPlusCell.innerHTML = "<img id='filter_plus_button' src='" + getPathToStaticResource('/images/plus_icon.jpg') + "' onclick='addFilterRow(document.getElementById(\\"numFilters\\").value++);toggleFieldDisabled();' onmouseover='this.style.cursor=\\"pointer\\";' style='padding-top: 4px;'/>";
var newFilterRow = document.createElement('tr');
newFilterRow.setAttribute('id','filter_row_' + filterRowNum);
newFilterRow.appendChild(newFilterCell);
newFilterRow.appendChild(newPlusCell);
document.getElementById('QB_right_sub_table').getElementsByTagName("TBODY").item(0).appendChild(newFilterRow);
if (filterRowNum > 0) {
var filter_plus_button = document.getElementById('filter_plus_button');
filter_plus_button.parentNode.removeChild(filter_plus_button);
}
//expand the field list so it looks right
document.getElementById('QB_field_sel').size += 2;
}
function toggleMatrixSortSelectors(hasChanged) {
if (exportActionIs('matrix')) {
document.getElementById('matrix_selection_headers').style.display = '';
document.getElementById('matrix_selection_row').style.display = '';
document.getElementById('QB_field_sel').size += 4;
if(hasChanged) buildQuery();
} else if (document.getElementById('matrix_selection_headers').style.display == '') {
document.getElementById('matrix_selection_headers').style.display = 'none';
document.getElementById('matrix_selection_row').style.display = 'none';
document.getElementById('QB_field_sel').size -= 4;
if(hasChanged) buildQuery();
}
开发者ID:robbyrob42,项目名称:forceworkbench,代码行数:66,代码来源:query.php
示例13: foreach
?>
<div id='mainBlock'>
<div id='navMenu' style="clear: both;">
<span class="preload1"></span>
<span class="preload2"></span>
<ul id="nav">
<?php
foreach ($GLOBALS["MENUS"] as $menu => $pages) {
if (isReadOnlyMode() && $menu == "Data") {
//special-case for Data menu, since all read-only
continue;
}
$menuLabel = $menu == "WORKBENCH" ? " <img src='" . getPathToStaticResource('/images/workbench-3-cubed-white-small.png') . "'/>" : strtolower($menu);
print "<li class='top'><a class='top_link'><span class='down'>" . $menuLabel . "</span></a>\n" . "<ul class='sub'>";
foreach ($pages as $href => $page) {
if (!$page->onNavBar || !isLoggedIn() && $page->requiresSfdcSession || isLoggedIn() && $page->title == 'Login' || !$page->isReadOnly && isReadOnlyMode()) {
continue;
}
print "<li><a href='{$href}' onmouseover=\"Tip('{$page->desc}')\" target=\"" . $page->window . "\">{$page->title}</a></li>\n";
}
print "</ul></li>";
if (!isLoggedIn() || !termsOk()) {
break;
}
//only show first "Workbench" menu in these cases
}
?>
</ul>
开发者ID:robbyrob42,项目名称:forceworkbench,代码行数:31,代码来源:header.php
示例14: addFooterScript
?>
</select>
</p>
</div>
<div class="loginType_std loginType_oauth loginType_adv">
<?php
if ($c->getTermsFile()) {
?>
<div style="margin-left: 95px;">
<input type="checkbox" id="termsAccepted" name="termsAccepted"/>
<label for="termsAccepted"><a href="terms.php" target="_blank">I agree to the terms of service</a></label>
</div>
<?php
}
?>
<p>
<div style="text-align: right;">
<input type="submit" id="loginBtn" name="uiLogin" value="Login">
</div>
</p>
</div>
</form>
</div>
<?php
addFooterScript("<script type='text/javascript' src='" . getPathToStaticResource('/script/login.js') . "'></script>");
addFooterScript("<script type='text/javascript'>wbLoginConfig=" . $c->getJsConfig() . "</script>");
addFooterScript("<script type='text/javascript'>WorkbenchLogin.initializeForm('" . htmlspecialchars($c->getLoginType()) . "');</script>");
require_once "footer.php";
开发者ID:sivarajankumar,项目名称:forceworkbench,代码行数:31,代码来源:login.php
示例15: displayQueryResults
function displayQueryResults($records, $queryTimeElapsed, QueryRequest $queryRequest)
{
if (is_numeric($records)) {
$countString = "Query would return {$records} record";
$countString .= $records == 1 ? "." : "s.";
displayInfo($countString);
return;
}
if (!$records) {
displayWarning("Sorry, no records returned.");
return;
}
if (WorkbenchConfig::get()->value("areTablesSortable")) {
addFooterScript("<script type='text/javascript' src='" . getPathToStaticResource('/script/sortable.js') . "></script>");
}
print "<a name='qr'></a><div style='clear: both;'><br/><h2>Query Results</h2>\n";
if (isset($this->queryLocator)) {
preg_match("/-(\\d+)/", $this->queryLocator, $lastRecord);
$rowOffset = $lastRecord[1];
} else {
$rowOffset = 0;
}
$minRowNum = $rowOffset + 1;
$maxRowNum = $rowOffset + count($records);
print "<p>Returned records {$minRowNum} - {$maxRowNum} of " . $this->totalQuerySize . " total record" . ($this->totalQuerySize !== 1 ? "s" : "") . " in " . sprintf("%01.3f", $queryTimeElapsed) . " seconds:</p>\n";
if (!WorkbenchConfig::get()->value("autoRunQueryMore") && $this->nextQueryLocator) {
print "<p><input type='hidden' name='queryLocator' value='" . $this->nextQueryLocator . "' /></p>\n";
print "<p><input type='submit' name='queryMore' id='queryMoreButtonTop' value='More...' /></p>\n";
}
print addLinksToIds($queryRequest->getExportTo() == 'matrix' ? $this->createQueryResultsMatrix($records, $queryRequest->getMatrixCols(), $queryRequest->getMatrixRows()) : $this->createQueryResultTable($records, $minRowNum));
if (!WorkbenchConfig::get()->value("autoRunQueryMore") && $this->nextQueryLocator) {
print "<p><input type='hidden' name='queryLocator' value='" . $this->nextQueryLocator . "' /></p>\n";
print "<p><input type='submit' name='queryMore' id='queryMoreButtonBottom' value='More...' /></p>";
}
print "</form></div>\n";
}
开发者ID:robbyrob42,项目名称:forceworkbench,代码行数:36,代码来源:QueryFutureTask.php
示例16: displayWarning
displayWarning("Unknown object type");
}
WorkbenchContext::get()->setDefaultObject($specifiedType);
}
?>
<p class='instructions'>Choose an object to describe:</p>
<form name='describeForm' method='POST' action='describe.php'>
<?php
printObjectSelection(WorkbenchContext::get()->getDefaultObject(), 'default_object', 30, "onChange=\"document.getElementById('loadingMessage').style.visibility='visible'; document.describeForm.submit();\"");
?>
<span id='loadingMessage' style='visibility:hidden; color:#888;'>
<img src='<?php
print getPathToStaticResource('/images/wait16trans.gif');
?>
' align='absmiddle'/> Loading...
</span>
</form>
<br/>
<?php
if (WorkbenchContext::get()->getDefaultObject()) {
$describeSObjectResult = WorkbenchContext::get()->describeSObjects(WorkbenchContext::get()->getDefaultObject());
$alwaysArrayChildren = array("recordTypeInfos", "childRelationships");
foreach ($alwaysArrayChildren as $child) {
if (isset($describeSObjectResult->{$child}) && !is_array($describeSObjectResult->{$child})) {
$describeSObjectResult->{$child} = array($describeSObjectResult->{$child});
}
开发者ID:neftcorp,项目名称:forceworkbench,代码行数:31,代码来源:describe.php
示例17: localizeDateTimes
print "<tr>" . "<td class='dataLabel'>API Processing</td><td class='dataValue'>" . $jobInfo->getApiActiveProcessingTime() . " ms</td>" . "<td class='dataLabel'>Apex Processing</td><td class='dataValue'>" . $jobInfo->getApexProcessingTime() . " ms</td>" . "<td class='dataLabel'>Total Processing</td><td class='dataValue'>" . $jobInfo->getTotalProcessingTime() . " ms</td>" . "</tr>";
}
print "<tr>" . "<td class='dataLabel'>Created</td><td class='dataValue'>" . localizeDateTimes($jobInfo->getCreatedDate(), $timeOnlyFormat) . "</td>" . "<td class='dataLabel'>Last Modified</td><td class='dataValue'>" . localizeDateTimes($jobInfo->getSystemModstamp(), $timeOnlyFormat) . "</td>" . "<td class='dataLabel'>Retries</td><td class='dataValue'>" . $jobInfo->getNumberRetries() . "</td>" . "</tr>";
print "</table>";
print "<p> </p>";
if (count($batchInfos) > 0) {
print "<h3>Batches</h3>";
print "<table cellpadding='4' width='1
|
请发表评论