Add tab structure to the developer panel

This commit is contained in:
j2blake 2014-01-05 17:18:37 -05:00
parent 245763e9e7
commit 23c30a8957
4 changed files with 123 additions and 71 deletions

View file

@ -46,3 +46,28 @@ div.developer input[type="text"]:disabled {
div.developer a { div.developer a {
margin: 3px; margin: 3px;
} }
#developerPanelBody ul.ui-tabs-nav li a {
padding: 0em 1em;
}
#developerPanelBody .ui-widget-header {
background-image: none;
background-color: #CC9900;
}
#developerPanelBody .ui-widget-content {
background-image: none;
background-color: #f7dd8a;
}
#developerPanelBody .ui-widget-header .ui-state-default {
background-image: none;
background-color: #f7cc33;
}
#developerPanelBody .ui-widget-header li.ui-state-active {
background-image: none;
background-color: #f7dd8a;
}

View file

@ -14,6 +14,7 @@ function DeveloperPanel(developerAjaxUrl) {
enablePanelOpener(); enablePanelOpener();
addBehaviorToElements(); addBehaviorToElements();
updateDisabledFields(); updateDisabledFields();
initializeTabs();
} }
} }
}); });
@ -55,6 +56,10 @@ function DeveloperPanel(developerAjaxUrl) {
document.getElementById("developer_loggingRDFService_stackRestriction").disabled = !rdfServiceEnabled; document.getElementById("developer_loggingRDFService_stackRestriction").disabled = !rdfServiceEnabled;
} }
function initializeTabs() {
$("#developerTabs").tabs();
}
function collectFormData() { function collectFormData() {
var data = new Object(); var data = new Object();
getCheckbox("developer_enabled", data); getCheckbox("developer_enabled", data);
@ -82,9 +87,14 @@ function DeveloperPanel(developerAjaxUrl) {
} }
/* /*
* Relies on the global variable for the AJAX URL. * Relies on the global variables for the AJAX URL and the CSS files.
*/ */
$(document).ready(function() { $(document).ready(function() {
$.each(developerCssLinks, function(index, value){
var cssLink = $("<link rel='stylesheet' type='text/css' href='" + value + "'>");
$("head").append(cssLink);
});
new DeveloperPanel(developerAjaxUrl).setupDeveloperPanel({}); new DeveloperPanel(developerAjaxUrl).setupDeveloperPanel({});
}); });

View file

@ -1,6 +1,9 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> <#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<div id="developerPanel" > </div> <div id="developerPanel" > </div>
<script>developerAjaxUrl = '${urls.developerAjax}'</script> <script>
developerAjaxUrl = '${urls.developerAjax}'
developerCssLinks = ["${urls.base}/css/developer/developerPanel.css", "${urls.base}/js/jquery-ui/css/smoothness/jquery-ui-1.8.9.custom.css"]
</script>
${scripts.add('<script type="text/javascript" src="${urls.base}/js/developer/developerPanel.js"></script>')} ${scripts.add('<script type="text/javascript" src="${urls.base}/js/developer/developerPanel.js"></script>')}
<link rel="stylesheet" href="${urls.base}/css/developer/developerPanel.css" /> ${scripts.add('<script type="text/javascript" src="${urls.base}/js/jquery-ui/js/jquery-ui-1.8.9.custom.min.js"></script>')}

View file

@ -31,75 +31,89 @@
</label> </label>
</div> </div>
<div class="devright"> <div id="developerTabs">
<div class="container"> <ul>
Page configuration <li><a href="#developerTabGeneral"><span>General</span></a></li>
<label> <li><a href="#developerTabAuthorization"><span>Authorization</span></a></li>
<@showCheckbox "developer_pageContents_logCustomListView" /> </ul>
Log the use of custom list view XML files.
</label> <div id="developerTabGeneral">
<label> <div class="devright">
<@showCheckbox "developer_pageContents_logCustomShortView" /> <div class="container">
Log the use of custom short views in search, index and browse pages. Page configuration
</label> <label>
</div> <@showCheckbox "developer_pageContents_logCustomListView" />
Log the use of custom list view XML files.
<div class="container"> </label>
Language support <label>
<label> <@showCheckbox "developer_pageContents_logCustomShortView" />
<@showCheckbox "developer_i18n_defeatCache" /> Log the use of custom short views in search, index and browse pages.
Defeat the cache of language property files </label>
</label> </div>
<label>
<@showCheckbox "developer_i18n_logStringRequests" /> <div class="container">
Log the retrieval of language strings Language support
</label> <label>
</div> <@showCheckbox "developer_i18n_defeatCache" />
Defeat the cache of language property files
<div class="container"> </label>
Links <label>
<br/> <@showCheckbox "developer_i18n_logStringRequests" />
<a href="${urls.base}/admin/log4j.jsp">Set log levels</a> Log the retrieval of language strings
<a href="${urls.base}/admin/showConfiguration">Show Configuration</a> </label>
<br/> </div>
<a href="${urls.base}/admin/showAuth">Show authorization info</a>
<a href="${urls.base}/admin/showThreads">Show background threads</a> <div class="container">
</div> Links
</div> <br/>
<a href="${urls.base}/admin/log4j.jsp">Set log levels</a>
<div class="devleft"> <a href="${urls.base}/admin/showConfiguration">Show Configuration</a>
<div class="container"> <br/>
Freemarker templates <a href="${urls.base}/admin/showAuth">Show authorization info</a>
<label> <a href="${urls.base}/admin/showThreads">Show background threads</a>
<@showCheckbox "developer_defeatFreemarkerCache" /> </div>
Defeat the template cache
</label>
<label>
<@showCheckbox "developer_insertFreemarkerDelimiters" />
Insert HTML comments at start and end of templates
</label>
</div>
<div class="container">
SPARQL Queries
<label>
<@showCheckbox "developer_loggingRDFService_enable" />
Log each query
</label>
<div class="within">
<label>
<@showCheckbox "developer_loggingRDFService_stackTrace" />
Add stack trace
</label>
<label>
Restrict by query string
<@showTextbox "developer_loggingRDFService_queryRestriction" />
</label>
<label>
Restrict by calling stack
<@showTextbox "developer_loggingRDFService_stackRestriction" />
</label>
</div> </div>
<div class="devleft">
<div class="container">
Freemarker templates
<label>
<@showCheckbox "developer_defeatFreemarkerCache" />
Defeat the template cache
</label>
<label>
<@showCheckbox "developer_insertFreemarkerDelimiters" />
Insert HTML comments at start and end of templates
</label>
</div>
<div class="container">
SPARQL Queries
<label>
<@showCheckbox "developer_loggingRDFService_enable" />
Log each query
</label>
<div class="within">
<label>
<@showCheckbox "developer_loggingRDFService_stackTrace" />
Add stack trace
</label>
<label>
Restrict by query string
<@showTextbox "developer_loggingRDFService_queryRestriction" />
</label>
<label>
Restrict by calling stack
<@showTextbox "developer_loggingRDFService_stackRestriction" />
</label>
</div>
</div>
</div>
</div>
<div id="developerTabAuthorization">
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
</div> </div>
</div> </div>