Skip to content

Commit

Permalink
tidy;use fileListCount
Browse files Browse the repository at this point in the history
  • Loading branch information
leonstafford committed Jun 27, 2019
1 parent fc51ab1 commit d1e97dd
Show file tree
Hide file tree
Showing 13 changed files with 72 additions and 20 deletions.
51 changes: 51 additions & 0 deletions '
@@ -0,0 +1,51 @@
<div id="workflow_tab">

<section class="wp2static-content wp2static-flex">
<div class="content" style="max-width:33%">
<img src="<?php echo plugins_url( '/../assets/dev-server.svg', __FILE__ ); ?>" style="max-width:250px" alt="Add-on">

<h2>Development</h2>

<p>Run WP2Static on your local computer or private web server. It's WordPress as usual, but without the security concerns. WP2Static generates a static HTML copy of this site, ready for deployment to super-fast static hosting.</p>

<h3>Health Checks</h3>
<ul>
<li>Publicly accessible</li>
<li>Local DNS resolution</li>
<li>PHP max_execution_time</li>
<li>Writable uploads dir</li>
</ul>

</div>
<div class="content" style="max-width:33%">
<img src="<?php echo plugins_url( '/../assets/staging-server.svg', __FILE__ ); ?>" style="max-width:250px" alt="Add-on">

<h2>Staging</h2>

<p>QA your static site before going to production.</p>

<h3>Deployment summary</h3>
<ul>
<li><b>Deployment Method</b> Netlify</li>
<li><b>Destination URL</b> https://testmysite.netlify.com</li>
<span><nest1><nest2>sdfsdfsdf</nest2></nest1></span>
</ul>
</div>

<div class="content" style="max-width:33%">
<img src="<?php echo plugins_url( '/../assets/production-server.svg', __FILE__ ); ?>" style="max-width:250px" alt="Add-on">

<h2>Production</h2>

<p>Your live site hosting.</p>

<h3>Deployment summary</h3>
<ul>
<li><b>Deployment Method</b> S3</li>
<li><b>Destination URL</b> https://www.mywebsite.com</li>
</ul>
</div>
</section>


</div> <!-- end workflow settings -->
14 changes: 8 additions & 6 deletions js/wp2static-admin.ts
Expand Up @@ -77,8 +77,10 @@ const localhostDomainRE = /^localhost[:?\d]*(?:[^:?\d]\S*)?$/;
const nonLocalhostDomainRE = /^[^\s.]+\.\S{2,}$/;
document.addEventListener("DOMContentLoaded", () => {
const adminPage = new WP2StaticAdminPageModel();
function generateFileListSuccessCallback(serverResponse: any) {
if (!serverResponse) {
function generateFileListSuccessCallback(event: any) {
const fileListCount: number = <number>event.target.response;

if (!fileListCount) {
adminPage.pulsateCSS.style.display = "none";
adminPage.currentAction.innerHTML = `Failed to generate initial file list.
Please <a href="https://docs.wp2static.com" target="_blank">contact support</a>`;
Expand All @@ -89,9 +91,9 @@ document.addEventListener("DOMContentLoaded", () => {
adminPage.resetDefaultSettingsButton.removeAttribute("disabled");
adminPage.saveSettingsButton.removeAttribute("disabled");
adminPage.startExportButton.removeAttribute("disabled");
adminPage.currentAction.innerHTML = `${serverResponse} URLs were detected for
adminPage.currentAction.innerHTML = `${fileListCount} URLs were detected for
initial crawl list. Adjust detection via the URL Detection tab.`;
adminPage.initialCrawlListCount.textContent = `${serverResponse} URLs were
adminPage.initialCrawlListCount.textContent = `${fileListCount} URLs were
detected on your site that will be used to initiate the crawl.
Other URLs will be discovered while crawling.`;
}
Expand Down Expand Up @@ -553,12 +555,12 @@ Wordpress_Shiny_Icon.svg/768px-Wordpress_Shiny_Icon.svg.png`,
for (const key in tabsContentMapping) {
if (tabsContentMapping.hasOwnProperty(key)) {
if (tabsContentMapping[key] === targetTab) {
const tabContent = document.getElementById("." + key)!;
const tabContent = document.getElementById(key)!;
tabContent.style.display = "block";
document.body.scrollTop = 0;
document.documentElement.scrollTop = 0;
} else {
const tabContent = document.getElementById("." + key)!;
const tabContent = document.getElementById(key)!;
tabContent.style.display = "none";
}
}
Expand Down
2 changes: 1 addition & 1 deletion views/tab_add_ons.php
@@ -1,4 +1,4 @@
<div class="add_ons" style="display:none;">
<div id="add_ons" style="display:none;">

<section class="wp2static-content wp2static-flex">
<div class="content" style="max-width:30%">
Expand Down
2 changes: 1 addition & 1 deletion views/tab_advanced.php
@@ -1,4 +1,4 @@
<div class="advanced_settings" style="display:none;">
<div id="advanced_settings" style="display:none;">

<section class="wp2static-content wp2static-flex">
<div class="content" style="max-width:30%">
Expand Down
2 changes: 1 addition & 1 deletion views/tab_automation.php
@@ -1,4 +1,4 @@
<div class="automation_settings" style="display:none;">
<div id="automation_settings" style="display:none;">

<section class="wp2static-content wp2static-flex">
<div class="content" style="max-width:30%">
Expand Down
2 changes: 1 addition & 1 deletion views/tab_caching.php
@@ -1,4 +1,4 @@
<div class="caching_settings" style="display:none;">
<div id="caching_settings" style="display:none;">

<section class="wp2static-content wp2static-flex">
<div class="content" style="max-width:30%">
Expand Down
2 changes: 1 addition & 1 deletion views/tab_detection.php
@@ -1,4 +1,4 @@
<div class="url_detection" style="display:none;">
<div id="url_detection" style="display:none;">

<section class="wp2static-content">
<h2><?php echo __( 'Initial crawl list', 'static-html-output-plugin' ); ?></h2>
Expand Down
2 changes: 1 addition & 1 deletion views/tab_forms.php
@@ -1,4 +1,4 @@
<div class="form_settings" style="display:none;">
<div id="form_settings" style="display:none;">

<section class="wp2static-content wp2static-flex">
<div class="content" style="max-width:30%">
Expand Down
2 changes: 1 addition & 1 deletion views/tab_help.php
@@ -1,4 +1,4 @@
<div class="help_troubleshooting" style="display:none;">
<div id="help_troubleshooting" style="display:none;">

<section class="wp2static-content wp2static-flex">
<div class="content">
Expand Down
2 changes: 1 addition & 1 deletion views/tab_processing.php
@@ -1,4 +1,4 @@
<div class="processing_settings" style="display:none;">
<div id="processing_settings" style="display:none;">

<section class="wp2static-content wp2static-flex">
<div class="content" style="max-width:30%">
Expand Down
2 changes: 1 addition & 1 deletion views/tab_production.php
@@ -1,4 +1,4 @@
<div class="production_deploy" style="display:none;">
<div id="production_deploy" style="display:none;">

<section class="wp2static-content wp2static-flex">
<div class="content" style="max-width:30%">
Expand Down
2 changes: 1 addition & 1 deletion views/tab_staging.php
@@ -1,4 +1,4 @@
<div class="staging_deploy" style="display:none;">
<div id="staging_deploy" style="display:none;">

<section class="wp2static-content wp2static-flex">
<div class="content" style="max-width:30%">
Expand Down
7 changes: 3 additions & 4 deletions views/tab_workflow.php
@@ -1,4 +1,4 @@
<div class="workflow_tab">
<div id="workflow_tab">

<section class="wp2static-content wp2static-flex">
<div class="content" style="max-width:33%">
Expand All @@ -22,13 +22,12 @@

<h2>Staging</h2>

<p>QA your static site before going to production.</p>
<p>Automatically deploy any changes to your WordPress site here. If you don't want to stage before production use your production environment details here.</p>

<h3>Deployment summary</h3>
<ul>
<li><b>Deployment Method</b> Netlify</li>
<li><b>Destination URL</b> https://testmysite.netlify.com</li>
<span><nest1><nest2>sdfsdfsdf</nest2></nest1></span>
</ul>
</div>

Expand All @@ -37,7 +36,7 @@

<h2>Production</h2>

<p>Your live site hosting.</p>
<p>For those who want to preview site changes on staging before going live, enter production deployment details here. Production deploys use the same generated static site content as staging, so choose a URL processing scheme that will work on either domain.</p>

<h3>Deployment summary</h3>
<ul>
Expand Down

0 comments on commit d1e97dd

Please sign in to comment.