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>
<label>
<@showCheckbox "developer_pageContents_logCustomShortView" />
Log the use of custom short views in search, index and browse pages.
</label>
</div>
<div class="container"> <div id="developerTabGeneral">
Language support <div class="devright">
<label> <div class="container">
<@showCheckbox "developer_i18n_defeatCache" /> Page configuration
Defeat the cache of language property files <label>
</label> <@showCheckbox "developer_pageContents_logCustomListView" />
<label> Log the use of custom list view XML files.
<@showCheckbox "developer_i18n_logStringRequests" /> </label>
Log the retrieval of language strings <label>
</label> <@showCheckbox "developer_pageContents_logCustomShortView" />
</div> Log the use of custom short views in search, index and browse pages.
</label>
</div>
<div class="container"> <div class="container">
Links Language support
<br/> <label>
<a href="${urls.base}/admin/log4j.jsp">Set log levels</a> <@showCheckbox "developer_i18n_defeatCache" />
<a href="${urls.base}/admin/showConfiguration">Show Configuration</a> Defeat the cache of language property files
<br/> </label>
<a href="${urls.base}/admin/showAuth">Show authorization info</a> <label>
<a href="${urls.base}/admin/showThreads">Show background threads</a> <@showCheckbox "developer_i18n_logStringRequests" />
</div> Log the retrieval of language strings
</div> </label>
</div>
<div class="devleft"> <div class="container">
<div class="container"> Links
Freemarker templates <br/>
<label> <a href="${urls.base}/admin/log4j.jsp">Set log levels</a>
<@showCheckbox "developer_defeatFreemarkerCache" /> <a href="${urls.base}/admin/showConfiguration">Show Configuration</a>
Defeat the template cache <br/>
</label> <a href="${urls.base}/admin/showAuth">Show authorization info</a>
<label> <a href="${urls.base}/admin/showThreads">Show background threads</a>
<@showCheckbox "developer_insertFreemarkerDelimiters" /> </div>
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>