Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move QWPDemo-related files into simpletest #1616

Merged
merged 1 commit into from
Aug 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
97 changes: 97 additions & 0 deletions modules/simpletest/resources/views/QWPDemo.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
<style type="text/css">

.qwp-demo .tab > a {
margin: 10px;
}

.tab {
padding: 5px;
border: 1px solid #c0c0c0;
border-top-width: 0;
}

.tab-first {
border-top: 1px solid #c0c0c0;
}

.active-tab {
background-color: #e0e6ea;
}
</style>
<table class="qwp-demo">
<tr>
<td valign="top">
<div class="tab tab-first"><a href="#testSchemaOnly">List out all queries in schema</a></div>
<div class="tab"><a href="#testQueryOnly">Show default view for query</a></div>
<div class="tab"><a href="#testFilterArray">Filter by Tag equals blue</a></div>
<div class="tab"><a href="#testSort">Sort by Tag</a></div>
<div class="tab"><a href="#testHideButtons">Hide buttons</a></div>
<div class="tab"><a href="#testRStudioButtons">RStudio buttons</a></div>
<div class="tab"><a href="#testHideColumns">Hide Edit and Details columns</a></div>
<div class="tab"><a href="#testPagingConfig">Set Paging to 3 with config</a></div>
<div class="tab"><a href="#testSetPaging">Set Paging to 2 with API</a></div>
<div class="tab"><a href="#testParameterizedQueries">Parameterized Queries</a></div>
<div class="tab"><a href="#testDateFilterFormat">Issue #47735: Date filter format</a></div>
<div class="tab"><a href="#test25337">Regression #25337</a></div>
<div class="tab"><a href="#testPageOffset">Change Page Offset</a></div>
<div class="tab"><a href="#testRemovableFilters">Keep Removable Filters</a></div>
<div class="tab"><a href="#testMultiClausesFilter">Collapse filter clauses</a></div>
<div class="tab"><a href="#testCaseInsensitiveFilterField">Filter field case insensitive</a></div>
<div class="tab"><a href="#testHidePagingCount">Hide Paging Count</a></div>
<div class="tab"><a href="#testAsyncTotalRowsCount">Async Total Rows Count</a></div>
<div class="tab"><a href="#testShowAllTotalRows">Show All Rows</a></div>
<div class="tab"><a href="#testGetBaseFilters">Use getBaseFilters</a></div>
<div class="tab"><a href="#testFilterOnSortColumn">Filter on "Sort" column</a></div>
<div class="tab"><a href="#testButtonBarConfig">Use onRender via ButtonBarOptions</a></div>
<div class="tab"><a href="#testRespectExcludingPrefixes">Exclude "skipPrefixes"</a></div>
<div class="tab"><a href="#testGetSelected">Get Selected (Regression #41705)</a></div>
</td>
<td valign="top">
<div id="qwpDiv"></div>
</td>
</tr>
</table>
<script type="text/javascript" nonce="<%=scriptNonce%>">
(function($) {
$(function() {
function showPopulateButton(isShow) {
var btn = $('#populatedata');
isShow ? btn.show() : btn.hide();
}
function showPopulateSuccess(isShow) {
var msg = $('#populatemessage');
isShow ? msg.show() : msg.hide();
}


LABKEY.Domain.get(function() {
LABKEY.Domain.get(function() {
LABKEY.Domain.get(function() {
showPopulateSuccess(true);
}, function() {
showPopulateButton(true);
}, 'Samples', 'sampleDataTest3');
}, function() {
showPopulateButton(true);
}, 'Samples', 'sampleDataTest2');
}, function() {
showPopulateButton(true);
}, 'Samples', 'sampleDataTest1');
});
})(jQuery);
</script>
<br><br>
<div id="populatemessage" style="display:none; color:green;">
<b>Test data is populated!</b><br>
</div>
<div id="populatedata" style="display:none; color:red;">
<b>Test data is not populated!</b><br>
<button id="btnPopulateTestData" class="btn btn-primary">Populate test data</button><br>
</div>
<br>
<button id="btnDropSchema" class="btn btn-default">Drop schema and clear test data</button>

<script type="text/javascript" nonce="<%=scriptNonce%>">
document.getElementById("btnPopulateTestData")['onclick'] = setUpDomains;
document.getElementById("btnDropSchema")['onclick'] = dropDomains;
</script>
7 changes: 7 additions & 0 deletions modules/simpletest/resources/views/QWPDemo.view.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<view xmlns="http://labkey.org/data/xml/view" title="Test Query Web Part" frame="portal">
<dependencies>
<dependency path="internal/jQuery"/>
<dependency path="simpletest/QWPDemoData.js"/>
<dependency path="simpletest/QWPDemo.js"/>
</dependencies>
</view>
Loading