lstDirs, bool skipHidden, bool skipSystem, Stopwatch stopwatch )
{
if( backgroundWorker.CancellationPending ) return;
@@ -79,12 +80,13 @@ namespace Snap2HTML
{
lstDirs.Add( d );
- if( lstDirs.Count % 9 == 0 ) // for performance don't update gui for each file
+ if(stopwatch.ElapsedMilliseconds >= 50)
{
- backgroundWorker.ReportProgress( 0, "Aquiring folders... " + lstDirs.Count + " (" + d + ")" );
+ backgroundWorker.ReportProgress( 0, "Getting folders... " + lstDirs.Count + " (" + d + ")" );
+ stopwatch.Restart();
}
- DirSearch( d, lstDirs, skipHidden, skipSystem );
+ DirSearch( d, lstDirs, skipHidden, skipSystem, stopwatch );
}
}
}
@@ -118,7 +120,8 @@ namespace Snap2HTML
return s.Replace( "\\", "\\\\" )
.Replace( "&", "&" )
.Replace( "\u2028", "" )
- .Replace( "\u2029", "" );
+ .Replace( "\u2029", "" )
+ .Replace( "\u0004", "" );
}
// Test string for matches against a wildcard pattern. Use ? and * as wildcards. (Wrapper around RegEx)
@@ -151,5 +154,11 @@ namespace Snap2HTML
return regex.IsMatch( text );
}
+
+ private int ToUnixTimestamp(DateTime value)
+ {
+ return (int)Math.Truncate( ( value.ToUniversalTime().Subtract( new DateTime( 1970, 1, 1 ) ) ).TotalSeconds );
+ }
+
}
}
diff --git a/Snap2HTML/template.html b/Snap2HTML/template.html
index 1e30421..19874db 100644
--- a/Snap2HTML/template.html
+++ b/Snap2HTML/template.html
@@ -205,6 +205,7 @@
background-repeat: no-repeat;
background-position: center right;
cursor: pointer;
+ text-align: center;
}
#files.tablesorter tbody td {
vertical-align: top;
@@ -368,7 +369,7 @@
}
.export_text {
width: 100%;
- height: calc(100% - 4em); /* two .export_options => 4em */
+ height: calc(100% - 5em); /* two .export_options => 4em + save link*/
}
.export_close:link, .export_close:visited {
float: right;
@@ -383,6 +384,54 @@
margin-right: 1em;
}
+
+ .export_save {
+ text-align: center;
+ margin-top: 0.25em;
+ }
+ .export_save a:link, .export_save a:visited {
+ color: black;
+ text-decoration: none;
+ }
+ .export_save a:hover {
+ text-decoration: underline;
+ }
+
+ .export_chevron {
+ box-sizing: border-box;
+ position: relative;
+ display: inline-block;
+ width: 18px;
+ height: 16px
+ }
+ .export_chevron::after,
+ .export_chevron::before {
+ content: "";
+ display: block;
+ box-sizing: border-box;
+ position: absolute;
+ width: 8px;
+ height: 8px;
+ border-bottom: 2px solid;
+ border-right: 2px solid;
+ transform: rotate(45deg);
+ left: 7px;
+ top: 3px
+ }
+ .export_chevron::after {
+ top: 8px
+ }
+
+ #export_tip {
+ color: #eee;
+ position: absolute;
+ bottom: 13px;
+ right: 20px;
+ font-size: 11px;
+ }
+
+
+
/* --- DynaTree --- */
ul.dynatree-container
@@ -566,7 +615,7 @@
@@ -1553,8 +1686,10 @@
+
+ Tip: Search for * to export all files and folders