Signed-off-by: qianji <1535486312@qq.com>a_branch
parent
d8b755ff46
commit
8fb95b2d02
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,10 @@
|
||||
/**
|
||||
* Automatically generated file. DO NOT MODIFY
|
||||
*/
|
||||
package net.micode.notes.test;
|
||||
|
||||
public final class BuildConfig {
|
||||
public static final boolean DEBUG = Boolean.parseBoolean("true");
|
||||
public static final String APPLICATION_ID = "net.micode.notes.test";
|
||||
public static final String BUILD_TYPE = "debug";
|
||||
}
|
@ -0,0 +1 @@
|
||||
{}
|
Binary file not shown.
@ -0,0 +1,20 @@
|
||||
{
|
||||
"version": 3,
|
||||
"artifactType": {
|
||||
"type": "APK",
|
||||
"kind": "Directory"
|
||||
},
|
||||
"applicationId": "net.micode.notes.test",
|
||||
"variantName": "debugAndroidTest",
|
||||
"elements": [
|
||||
{
|
||||
"type": "SINGLE",
|
||||
"filters": [],
|
||||
"attributes": [],
|
||||
"versionCode": 0,
|
||||
"versionName": "",
|
||||
"outputFile": "app-debug-androidTest.apk"
|
||||
}
|
||||
],
|
||||
"elementType": "File"
|
||||
}
|
Binary file not shown.
@ -0,0 +1,2 @@
|
||||
#- File Locator -
|
||||
listingFile=../../apk/androidTest/debug/output-metadata.json
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1 @@
|
||||
8
|
Binary file not shown.
@ -0,0 +1 @@
|
||||
#Thu May 04 23:22:44 CST 2023
|
@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<merger version="3"><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="androidTest$Generated" generated="true" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="E:\Notes-master1\app\src\androidTest\res"/><source path="E:\Notes-master1\app\build\generated\res\rs\androidTest\debug"/><source path="E:\Notes-master1\app\build\generated\res\resValues\androidTest\debug"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="androidTest" generated-set="androidTest$Generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="E:\Notes-master1\app\src\androidTest\res"/><source path="E:\Notes-master1\app\build\generated\res\rs\androidTest\debug"/><source path="E:\Notes-master1\app\build\generated\res\resValues\androidTest\debug"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="androidTestDebug$Generated" generated="true" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="E:\Notes-master1\app\src\androidTestDebug\res"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="androidTestDebug" generated-set="androidTestDebug$Generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="E:\Notes-master1\app\src\androidTestDebug\res"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="generated$Generated" generated="true" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"/><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="generated" generated-set="generated$Generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"/><mergedItems/></merger>
|
@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<merger version="3"><dataSet config="androidTest" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="E:\Notes-master1\app\src\androidTest\assets"/><source path="E:\Notes-master1\app\build\intermediates\shader_assets\debugAndroidTest\out"/></dataSet><dataSet config="androidTestDebug" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="E:\Notes-master1\app\src\androidTestDebug\assets"/></dataSet></merger>
|
@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<merger version="3"><dataSet config="androidTest" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="E:\Notes-master1\app\src\androidTest\jniLibs"/></dataSet><dataSet config="androidTestDebug" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="E:\Notes-master1\app\src\androidTestDebug\jniLibs"/></dataSet></merger>
|
@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<merger version="3"><dataSet config="androidTest" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="E:\Notes-master1\app\src\androidTest\shaders"/></dataSet><dataSet config="androidTestDebug" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="E:\Notes-master1\app\src\androidTestDebug\shaders"/></dataSet></merger>
|
@ -1,4 +1,4 @@
|
||||
#Thu May 04 10:05:41 CST 2023
|
||||
#Thu May 04 23:43:05 CST 2023
|
||||
base.0=E\:\\Notes-master1\\app\\build\\intermediates\\dex\\debug\\mergeDexDebug\\classes.dex
|
||||
renamed.0=classes.dex
|
||||
path.0=classes.dex
|
||||
|
@ -0,0 +1,4 @@
|
||||
#Thu May 04 23:22:50 CST 2023
|
||||
base.0=E\:\\Notes-master1\\app\\build\\intermediates\\dex\\debugAndroidTest\\mergeDexDebugAndroidTest\\classes.dex
|
||||
renamed.0=classes.dex
|
||||
path.0=classes.dex
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,32 @@
|
||||
1<?xml version="1.0" encoding="utf-8"?>
|
||||
2<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
3 package="net.micode.notes.test" >
|
||||
4
|
||||
5 <uses-sdk
|
||||
5-->E:\Notes-master1\app\build\intermediates\tmp\manifest\androidTest\debug\tempFile1ProcessTestManifest10032632167883213957.xml:5:5-73
|
||||
6 android:minSdkVersion="1"
|
||||
6-->E:\Notes-master1\app\build\intermediates\tmp\manifest\androidTest\debug\tempFile1ProcessTestManifest10032632167883213957.xml:5:15-40
|
||||
7 android:targetSdkVersion="33" />
|
||||
7-->E:\Notes-master1\app\build\intermediates\tmp\manifest\androidTest\debug\tempFile1ProcessTestManifest10032632167883213957.xml:5:41-70
|
||||
8
|
||||
9 <instrumentation
|
||||
9-->E:\Notes-master1\app\build\intermediates\tmp\manifest\androidTest\debug\tempFile1ProcessTestManifest10032632167883213957.xml:11:5-15:66
|
||||
10 android:name="android.test.InstrumentationTestRunner"
|
||||
10-->E:\Notes-master1\app\build\intermediates\tmp\manifest\androidTest\debug\tempFile1ProcessTestManifest10032632167883213957.xml:11:22-75
|
||||
11 android:functionalTest="false"
|
||||
11-->E:\Notes-master1\app\build\intermediates\tmp\manifest\androidTest\debug\tempFile1ProcessTestManifest10032632167883213957.xml:14:22-52
|
||||
12 android:handleProfiling="false"
|
||||
12-->E:\Notes-master1\app\build\intermediates\tmp\manifest\androidTest\debug\tempFile1ProcessTestManifest10032632167883213957.xml:13:22-53
|
||||
13 android:label="Tests for net.micode.notes"
|
||||
13-->E:\Notes-master1\app\build\intermediates\tmp\manifest\androidTest\debug\tempFile1ProcessTestManifest10032632167883213957.xml:15:22-64
|
||||
14 android:targetPackage="net.micode.notes" />
|
||||
14-->E:\Notes-master1\app\build\intermediates\tmp\manifest\androidTest\debug\tempFile1ProcessTestManifest10032632167883213957.xml:12:22-62
|
||||
15
|
||||
16 <application android:debuggable="true" >
|
||||
16-->E:\Notes-master1\app\build\intermediates\tmp\manifest\androidTest\debug\tempFile1ProcessTestManifest10032632167883213957.xml:7:5-9:19
|
||||
17 <uses-library android:name="android.test.runner" />
|
||||
17-->E:\Notes-master1\app\build\intermediates\tmp\manifest\androidTest\debug\tempFile1ProcessTestManifest10032632167883213957.xml:8:9-60
|
||||
17-->E:\Notes-master1\app\build\intermediates\tmp\manifest\androidTest\debug\tempFile1ProcessTestManifest10032632167883213957.xml:8:23-57
|
||||
18 </application>
|
||||
19
|
||||
20</manifest>
|
Binary file not shown.
@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="net.micode.notes.test" >
|
||||
|
||||
<uses-sdk
|
||||
android:minSdkVersion="1"
|
||||
android:targetSdkVersion="33" />
|
||||
|
||||
<instrumentation
|
||||
android:name="android.test.InstrumentationTestRunner"
|
||||
android:functionalTest="false"
|
||||
android:handleProfiling="false"
|
||||
android:label="Tests for net.micode.notes"
|
||||
android:targetPackage="net.micode.notes" />
|
||||
|
||||
<application android:debuggable="true" >
|
||||
<uses-library android:name="android.test.runner" />
|
||||
</application>
|
||||
|
||||
</manifest>
|
@ -0,0 +1,18 @@
|
||||
{
|
||||
"version": 3,
|
||||
"artifactType": {
|
||||
"type": "PACKAGED_MANIFESTS",
|
||||
"kind": "Directory"
|
||||
},
|
||||
"applicationId": "net.micode.notes.test",
|
||||
"variantName": "debugAndroidTest",
|
||||
"elements": [
|
||||
{
|
||||
"type": "SINGLE",
|
||||
"filters": [],
|
||||
"attributes": [],
|
||||
"outputFile": "AndroidManifest.xml"
|
||||
}
|
||||
],
|
||||
"elementType": "File"
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
{
|
||||
"version": 3,
|
||||
"artifactType": {
|
||||
"type": "PROCESSED_RES",
|
||||
"kind": "Directory"
|
||||
},
|
||||
"applicationId": "net.micode.notes.test",
|
||||
"variantName": "debugAndroidTest",
|
||||
"elements": [
|
||||
{
|
||||
"type": "SINGLE",
|
||||
"filters": [],
|
||||
"attributes": [],
|
||||
"versionCode": 0,
|
||||
"versionName": "",
|
||||
"outputFile": "resources-debugAndroidTest.ap_"
|
||||
}
|
||||
],
|
||||
"elementType": "File"
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1 @@
|
||||
{"enableV1Signing":false,"enableV2Signing":true,"enableV3Signing":false,"enableV4Signing":false}
|
@ -0,0 +1,5 @@
|
||||
net.micode.notes.test.app-androidTest-0 E:\Notes-master1\app\build\generated\res\resValues\androidTest\debug
|
||||
net.micode.notes.test.app-androidTest-1 E:\Notes-master1\app\build\generated\res\rs\androidTest\debug
|
||||
net.micode.notes.test.app-mergeDebugAndroidTestResources-2 E:\Notes-master1\app\build\intermediates\incremental\debugAndroidTest\mergeDebugAndroidTestResources\merged.dir
|
||||
net.micode.notes.test.app-mergeDebugAndroidTestResources-3 E:\Notes-master1\app\build\intermediates\incremental\debugAndroidTest\mergeDebugAndroidTestResources\stripped.dir
|
||||
net.micode.notes.test.app-merged_res-4 E:\Notes-master1\app\build\intermediates\merged_res\debugAndroidTest
|
@ -0,0 +1,162 @@
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-family: sans-serif;
|
||||
font-size: 12pt;
|
||||
}
|
||||
|
||||
body, a, a:visited {
|
||||
color: #303030;
|
||||
}
|
||||
|
||||
#content {
|
||||
padding-left: 50px;
|
||||
padding-right: 50px;
|
||||
padding-top: 30px;
|
||||
padding-bottom: 30px;
|
||||
}
|
||||
|
||||
#content h1 {
|
||||
font-size: 160%;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
#footer {
|
||||
margin-top: 100px;
|
||||
font-size: 80%;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
#footer, #footer a {
|
||||
color: #a0a0a0;
|
||||
}
|
||||
|
||||
ul {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
h1, h2, h3 {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 120%;
|
||||
}
|
||||
|
||||
ul.tabLinks {
|
||||
padding-left: 0;
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
overflow: auto;
|
||||
min-width: 800px;
|
||||
width: auto !important;
|
||||
width: 800px;
|
||||
}
|
||||
|
||||
ul.tabLinks li {
|
||||
float: left;
|
||||
height: 100%;
|
||||
list-style: none;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
padding-top: 5px;
|
||||
padding-bottom: 5px;
|
||||
margin-bottom: 0;
|
||||
-moz-border-radius: 7px;
|
||||
border-radius: 7px;
|
||||
margin-right: 25px;
|
||||
border: solid 1px #d4d4d4;
|
||||
background-color: #f0f0f0;
|
||||
behavior: url(css3-pie-1.0beta3.htc);
|
||||
}
|
||||
|
||||
ul.tabLinks li:hover {
|
||||
background-color: #fafafa;
|
||||
}
|
||||
|
||||
ul.tabLinks li.selected {
|
||||
background-color: #c5f0f5;
|
||||
border-color: #c5f0f5;
|
||||
}
|
||||
|
||||
ul.tabLinks a {
|
||||
font-size: 120%;
|
||||
display: block;
|
||||
outline: none;
|
||||
text-decoration: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
ul.tabLinks li h2 {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
div.tab {
|
||||
}
|
||||
|
||||
div.selected {
|
||||
display: block;
|
||||
}
|
||||
|
||||
div.deselected {
|
||||
display: none;
|
||||
}
|
||||
|
||||
div.tab table {
|
||||
min-width: 350px;
|
||||
width: auto !important;
|
||||
width: 350px;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
div.tab th, div.tab table {
|
||||
border-bottom: solid #d0d0d0 1px;
|
||||
}
|
||||
|
||||
div.tab th {
|
||||
text-align: left;
|
||||
white-space: nowrap;
|
||||
padding-left: 6em;
|
||||
}
|
||||
|
||||
div.tab th:first-child {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
div.tab td {
|
||||
white-space: nowrap;
|
||||
padding-left: 6em;
|
||||
padding-top: 5px;
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
|
||||
div.tab td:first-child {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
div.tab td.numeric, div.tab th.numeric {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
span.code {
|
||||
display: inline-block;
|
||||
margin-top: 0em;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
span.code pre {
|
||||
font-size: 11pt;
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
margin: 0;
|
||||
background-color: #f7f7f7;
|
||||
border: solid 1px #d0d0d0;
|
||||
min-width: 700px;
|
||||
width: auto !important;
|
||||
width: 700px;
|
||||
}
|
@ -0,0 +1,81 @@
|
||||
|
||||
#summary {
|
||||
margin-top: 30px;
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
#summary table {
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
#summary td {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.breadcrumbs, .breadcrumbs a {
|
||||
color: #606060;
|
||||
}
|
||||
|
||||
.infoBox {
|
||||
width: 110px;
|
||||
padding-top: 15px;
|
||||
padding-bottom: 15px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.infoBox p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.counter, .percent {
|
||||
font-size: 120%;
|
||||
font-weight: bold;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
#duration {
|
||||
width: 125px;
|
||||
}
|
||||
|
||||
#successRate, .summaryGroup {
|
||||
border: solid 2px #d0d0d0;
|
||||
-moz-border-radius: 10px;
|
||||
border-radius: 10px;
|
||||
behavior: url(css3-pie-1.0beta3.htc);
|
||||
}
|
||||
|
||||
#successRate {
|
||||
width: 140px;
|
||||
margin-left: 35px;
|
||||
}
|
||||
|
||||
#successRate .percent {
|
||||
font-size: 180%;
|
||||
}
|
||||
|
||||
.success, .success a {
|
||||
color: #008000;
|
||||
}
|
||||
|
||||
div.success, #successRate.success {
|
||||
background-color: #bbd9bb;
|
||||
border-color: #008000;
|
||||
}
|
||||
|
||||
.failures, .failures a {
|
||||
color: #b60808;
|
||||
}
|
||||
|
||||
div.failures, #successRate.failures {
|
||||
background-color: #ecdada;
|
||||
border-color: #b60808;
|
||||
}
|
||||
|
||||
ul.linkList {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
ul.linkList li {
|
||||
list-style: none;
|
||||
margin-bottom: 5px;
|
||||
}
|
@ -0,0 +1,85 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<title>Test results - Test Summary</title>
|
||||
<link href="css/base-style.css" rel="stylesheet" type="text/css"/>
|
||||
<link href="css/style.css" rel="stylesheet" type="text/css"/>
|
||||
<script src="js/report.js" type="text/javascript"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="content">
|
||||
<h1>Test Summary</h1>
|
||||
<div id="summary">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="summaryGroup">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="infoBox" id="tests">
|
||||
<div class="counter">0</div>
|
||||
<p>tests</p>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="infoBox" id="failures">
|
||||
<div class="counter">0</div>
|
||||
<p>failures</p>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="infoBox" id="skipped">
|
||||
<div class="counter">0</div>
|
||||
<p>skipped</p>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="infoBox" id="duration">
|
||||
<div class="counter">-</div>
|
||||
<p>duration</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="infoBox success" id="successRate">
|
||||
<div class="percent">-</div>
|
||||
<p>N/A</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id="tabs">
|
||||
<ul class="tabLinks">
|
||||
<li>
|
||||
<a href="#tab0">Classes</a>
|
||||
</li>
|
||||
</ul>
|
||||
<div id="tab0" class="tab">
|
||||
<h2>Classes</h2>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Class</th>
|
||||
<th>Tests</th>
|
||||
<th>Failures</th>
|
||||
<th>Skipped</th>
|
||||
<th>Duration</th>
|
||||
<th>Success rate</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody/>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div id="footer">
|
||||
<p>Generated by
|
||||
<a href="http://www.gradle.org">Gradle 7.6.1</a> at 2023年5月4日 下午11:28:12</p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
@ -0,0 +1,101 @@
|
||||
var tabs = new Object();
|
||||
|
||||
function initTabs() {
|
||||
var container = document.getElementById('tabs');
|
||||
tabs.tabs = findTabs(container);
|
||||
tabs.titles = findTitles(tabs.tabs);
|
||||
tabs.headers = findHeaders(container);
|
||||
tabs.select = select;
|
||||
tabs.deselectAll = deselectAll;
|
||||
tabs.select(0);
|
||||
return true;
|
||||
}
|
||||
|
||||
window.onload = initTabs;
|
||||
|
||||
function switchTab() {
|
||||
var id = this.id.substr(1);
|
||||
for (var i = 0; i < tabs.tabs.length; i++) {
|
||||
if (tabs.tabs[i].id == id) {
|
||||
tabs.select(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function select(i) {
|
||||
this.deselectAll();
|
||||
changeElementClass(this.tabs[i], 'tab selected');
|
||||
changeElementClass(this.headers[i], 'selected');
|
||||
while (this.headers[i].firstChild) {
|
||||
this.headers[i].removeChild(this.headers[i].firstChild);
|
||||
}
|
||||
var h2 = document.createElement('H2');
|
||||
h2.appendChild(document.createTextNode(this.titles[i]));
|
||||
this.headers[i].appendChild(h2);
|
||||
}
|
||||
|
||||
function deselectAll() {
|
||||
for (var i = 0; i < this.tabs.length; i++) {
|
||||
changeElementClass(this.tabs[i], 'tab deselected');
|
||||
changeElementClass(this.headers[i], 'deselected');
|
||||
while (this.headers[i].firstChild) {
|
||||
this.headers[i].removeChild(this.headers[i].firstChild);
|
||||
}
|
||||
var a = document.createElement('A');
|
||||
a.setAttribute('id', 'ltab' + i);
|
||||
a.setAttribute('href', '#tab' + i);
|
||||
a.onclick = switchTab;
|
||||
a.appendChild(document.createTextNode(this.titles[i]));
|
||||
this.headers[i].appendChild(a);
|
||||
}
|
||||
}
|
||||
|
||||
function changeElementClass(element, classValue) {
|
||||
if (element.getAttribute('className')) {
|
||||
/* IE */
|
||||
element.setAttribute('className', classValue)
|
||||
} else {
|
||||
element.setAttribute('class', classValue)
|
||||
}
|
||||
}
|
||||
|
||||
function findTabs(container) {
|
||||
return findChildElements(container, 'DIV', 'tab');
|
||||
}
|
||||
|
||||
function findHeaders(container) {
|
||||
var owner = findChildElements(container, 'UL', 'tabLinks');
|
||||
return findChildElements(owner[0], 'LI', null);
|
||||
}
|
||||
|
||||
function findTitles(tabs) {
|
||||
var titles = new Array();
|
||||
for (var i = 0; i < tabs.length; i++) {
|
||||
var tab = tabs[i];
|
||||
var header = findChildElements(tab, 'H2', null)[0];
|
||||
header.parentNode.removeChild(header);
|
||||
if (header.innerText) {
|
||||
titles.push(header.innerText)
|
||||
} else {
|
||||
titles.push(header.textContent)
|
||||
}
|
||||
}
|
||||
return titles;
|
||||
}
|
||||
|
||||
function findChildElements(container, name, targetClass) {
|
||||
var elements = new Array();
|
||||
var children = container.childNodes;
|
||||
for (var i = 0; i < children.length; i++) {
|
||||
var child = children.item(i);
|
||||
if (child.nodeType == 1 && child.nodeName == name) {
|
||||
if (targetClass && child.className.indexOf(targetClass) < 0) {
|
||||
continue;
|
||||
}
|
||||
elements.push(child);
|
||||
}
|
||||
}
|
||||
return elements;
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue