Index: src/browse.c ================================================================== --- src/browse.c +++ src/browse.c @@ -620,19 +620,20 @@ @ lists[i].style.display = display; @ } @ } @ @ var outer_ul = document.querySelector('.filetree > ul'); + @ var subdir = outer_ul.querySelector('.subdir'); @ outer_ul.querySelector('.subdir > a').style.cursor = 'pointer'; @ outer_ul.onclick = function( e ){ @ var a = e.target; @ if( a.nodeName!='A' ) return; - @ if( a.parentNode.className.indexOf('subdir')>=0 ){ + @ if( a.parentNode==subdir ){ @ toggleAll(outer_ul); @ return false; @ } - @ if( style(a.parentNode, 'display')=='inline' ) return; + @ if( !subdir.contains(a) ) return; @ var ul = a.nextSibling; @ while( ul && ul.nodeName!='UL' ) ul = ul.nextSibling; @ ul.style.display = style(ul, 'display')=='none' ? 'block' : 'none'; @ return false; @ } Index: src/makemake.tcl ================================================================== --- src/makemake.tcl +++ src/makemake.tcl @@ -804,18 +804,18 @@ set j " \\\n " writeln "SQLITE_OPTIONS = [join $MINGW_SQLITE_OPTIONS $j]\n" set j " \\\n " writeln "SHELL_OPTIONS = [join $SHELL_WIN32_OPTIONS $j]\n" -writeln "\$(OBJDIR)/sqlite3.o:\t\$(SRCDIR)/sqlite3.c" +writeln "\$(OBJDIR)/sqlite3.o:\t\$(SRCDIR)/sqlite3.c win/Makefile.mingw" writeln "\t\$(XTCC) \$(SQLITE_OPTIONS) \$(SQLITE_CFLAGS) -c \$(SRCDIR)/sqlite3.c -o \$(OBJDIR)/sqlite3.o\n" writeln "\$(OBJDIR)/cson_amalgamation.o:\t\$(SRCDIR)/cson_amalgamation.c" writeln "\t\$(XTCC) -c \$(SRCDIR)/cson_amalgamation.c -o \$(OBJDIR)/cson_amalgamation.o\n" writeln "\$(OBJDIR)/json.o \$(OBJDIR)/json_artifact.o \$(OBJDIR)/json_branch.o \$(OBJDIR)/json_config.o \$(OBJDIR)/json_diff.o \$(OBJDIR)/json_dir.o \$(OBJDIR)/jsos_finfo.o \$(OBJDIR)/json_login.o \$(OBJDIR)/json_query.o \$(OBJDIR)/json_report.o \$(OBJDIR)/json_status.o \$(OBJDIR)/json_tag.o \$(OBJDIR)/json_timeline.o \$(OBJDIR)/json_user.o \$(OBJDIR)/json_wiki.o : \$(SRCDIR)/json_detail.h\n" -writeln "\$(OBJDIR)/shell.o:\t\$(SRCDIR)/shell.c \$(SRCDIR)/sqlite3.h" +writeln "\$(OBJDIR)/shell.o:\t\$(SRCDIR)/shell.c \$(SRCDIR)/sqlite3.h win/Makefile.mingw" writeln "\t\$(XTCC) \$(SHELL_OPTIONS) \$(SHELL_CFLAGS) -c \$(SRCDIR)/shell.c -o \$(OBJDIR)/shell.o\n" writeln "\$(OBJDIR)/th.o:\t\$(SRCDIR)/th.c" writeln "\t\$(XTCC) -c \$(SRCDIR)/th.c -o \$(OBJDIR)/th.o\n" @@ -1128,15 +1128,15 @@ $(BCC) $** mkversion$E: $B\src\mkversion.c $(BCC) $** -$(OX)\shell$O : $(SRCDIR)\shell.c +$(OX)\shell$O : $(SRCDIR)\shell.c Makefile.msc $(TCC) /Fo$@ $(SHELL_OPTIONS) $(SQLITE_OPTIONS) $(SHELL_CFLAGS) -c $(SRCDIR)\shell.c -$(OX)\sqlite3$O : $(SRCDIR)\sqlite3.c - $(TCC) /Fo$@ -c $(SQLITE_OPTIONS) $(SQLITE_CFLAGS) $** +$(OX)\sqlite3$O : $(SRCDIR)\sqlite3.c Makefile.msc + $(TCC) /Fo$@ -c $(SQLITE_OPTIONS) $(SQLITE_CFLAGS) $(SRCDIR)\sqlite3.c $(OX)\th$O : $(SRCDIR)\th.c $(TCC) /Fo$@ -c $** $(OX)\th_lang$O : $(SRCDIR)\th_lang.c Index: src/style.c ================================================================== --- src/style.c +++ src/style.c @@ -778,36 +778,24 @@ @ margin: 1em 0; @ line-height: 1.5; }, { ".filetree ul", "tree-view lists", - @ display: inline; - @ margin: 0; - @ padding: 0; - }, - { ".filetree li", - "tree-view list items", - @ display: inline; - }, - /* There is exactly one element with class="subdir". That element is - ** the name of the directory specified by the "name=" query parameter, - ** and the directory described by the text at the top of the page. */ - { ".filetree .subdir ul", - "tree-view lists below subdir", - @ position: relative; - @ display: block; - @ margin: 0 0 0 21px; - @ padding: 0; - }, - { ".filetree .subdir li", - "tree-view lists items below subdir", - @ position: relative; - @ display: block; - @ margin: 0; - @ padding: 0; - }, - { ".filetree .subdir li:before", + @ margin: 0; + @ padding: 0; + @ list-style: none; + }, + { ".filetree ul ul", + "tree-view lists below the root", + @ position: relative; + @ margin: 0 0 0 21px; + }, + { ".filetree li", + "tree-view lists items", + @ position: relative; + }, + { ".filetree li li:before", "tree-view node lines", @ content: ''; @ position: absolute; @ top: -.8em; @ left: -14px; @@ -814,30 +802,29 @@ @ width: 14px; @ height: 1.5em; @ border-left: 2px solid #aaa; @ border-bottom: 2px solid #aaa; }, - { ".filetree .subdir > ul ul:before", + { ".filetree ul ul:before", "tree-view directory lines", @ content: ''; @ position: absolute; @ top: -1.5em; @ bottom: 0; @ left: -35px; @ border-left: 2px solid #aaa; }, - { ".filetree .subdir li:last-child > ul:before", + { ".filetree li:last-child > ul:before", "hide lines for last-child directories", @ display: none; }, { ".filetree a", "tree-view links", @ position: relative; @ z-index: 1; @ display: inline-block; @ min-height: 16px; - @ margin-right: .5em; @ padding-left: 21px; @ background-image: url(data:image/gif;base64,R0lGODlhEAAQAJEAAP\/\/\/yEhIf\/\/\/wAAACH5BAEHAAIALAAAAAAQABAAAAIvlIKpxqcfmgOUvoaqDSCxrEEfF14GqFXImJZsu73wepJzVMNxrtNTj3NATMKhpwAAOw==); @ background-position: center left; @ background-repeat: no-repeat; }, Index: win/Makefile.mingw ================================================================== --- win/Makefile.mingw +++ win/Makefile.mingw @@ -1714,19 +1714,19 @@ -DSQLITE_OMIT_LOAD_EXTENSION=1 \ -Dsqlite3_strglob=strglob \ -Dgetenv=fossil_getenv \ -Dfopen=fossil_fopen -$(OBJDIR)/sqlite3.o: $(SRCDIR)/sqlite3.c +$(OBJDIR)/sqlite3.o: $(SRCDIR)/sqlite3.c win/Makefile.mingw $(XTCC) $(SQLITE_OPTIONS) $(SQLITE_CFLAGS) -c $(SRCDIR)/sqlite3.c -o $(OBJDIR)/sqlite3.o $(OBJDIR)/cson_amalgamation.o: $(SRCDIR)/cson_amalgamation.c $(XTCC) -c $(SRCDIR)/cson_amalgamation.c -o $(OBJDIR)/cson_amalgamation.o $(OBJDIR)/json.o $(OBJDIR)/json_artifact.o $(OBJDIR)/json_branch.o $(OBJDIR)/json_config.o $(OBJDIR)/json_diff.o $(OBJDIR)/json_dir.o $(OBJDIR)/jsos_finfo.o $(OBJDIR)/json_login.o $(OBJDIR)/json_query.o $(OBJDIR)/json_report.o $(OBJDIR)/json_status.o $(OBJDIR)/json_tag.o $(OBJDIR)/json_timeline.o $(OBJDIR)/json_user.o $(OBJDIR)/json_wiki.o : $(SRCDIR)/json_detail.h -$(OBJDIR)/shell.o: $(SRCDIR)/shell.c $(SRCDIR)/sqlite3.h +$(OBJDIR)/shell.o: $(SRCDIR)/shell.c $(SRCDIR)/sqlite3.h win/Makefile.mingw $(XTCC) $(SHELL_OPTIONS) $(SHELL_CFLAGS) -c $(SRCDIR)/shell.c -o $(OBJDIR)/shell.o $(OBJDIR)/th.o: $(SRCDIR)/th.c $(XTCC) -c $(SRCDIR)/th.c -o $(OBJDIR)/th.o Index: win/Makefile.mingw.mistachkin ================================================================== --- win/Makefile.mingw.mistachkin +++ win/Makefile.mingw.mistachkin @@ -1714,19 +1714,19 @@ -DSQLITE_OMIT_LOAD_EXTENSION=1 \ -Dsqlite3_strglob=strglob \ -Dgetenv=fossil_getenv \ -Dfopen=fossil_fopen -$(OBJDIR)/sqlite3.o: $(SRCDIR)/sqlite3.c +$(OBJDIR)/sqlite3.o: $(SRCDIR)/sqlite3.c win/Makefile.mingw.mistachkin $(XTCC) $(SQLITE_OPTIONS) $(SQLITE_CFLAGS) -c $(SRCDIR)/sqlite3.c -o $(OBJDIR)/sqlite3.o $(OBJDIR)/cson_amalgamation.o: $(SRCDIR)/cson_amalgamation.c $(XTCC) -c $(SRCDIR)/cson_amalgamation.c -o $(OBJDIR)/cson_amalgamation.o $(OBJDIR)/json.o $(OBJDIR)/json_artifact.o $(OBJDIR)/json_branch.o $(OBJDIR)/json_config.o $(OBJDIR)/json_diff.o $(OBJDIR)/json_dir.o $(OBJDIR)/jsos_finfo.o $(OBJDIR)/json_login.o $(OBJDIR)/json_query.o $(OBJDIR)/json_report.o $(OBJDIR)/json_status.o $(OBJDIR)/json_tag.o $(OBJDIR)/json_timeline.o $(OBJDIR)/json_user.o $(OBJDIR)/json_wiki.o : $(SRCDIR)/json_detail.h -$(OBJDIR)/shell.o: $(SRCDIR)/shell.c $(SRCDIR)/sqlite3.h +$(OBJDIR)/shell.o: $(SRCDIR)/shell.c $(SRCDIR)/sqlite3.h win/Makefile.mingw.mistachkin $(XTCC) $(SHELL_OPTIONS) $(SHELL_CFLAGS) -c $(SRCDIR)/shell.c -o $(OBJDIR)/shell.o $(OBJDIR)/th.o: $(SRCDIR)/th.c $(XTCC) -c $(SRCDIR)/th.c -o $(OBJDIR)/th.o Index: win/Makefile.msc ================================================================== --- win/Makefile.msc +++ win/Makefile.msc @@ -449,15 +449,15 @@ $(BCC) $** mkversion$E: $B\src\mkversion.c $(BCC) $** -$(OX)\shell$O : $(SRCDIR)\shell.c +$(OX)\shell$O : $(SRCDIR)\shell.c Makefile.msc $(TCC) /Fo$@ $(SHELL_OPTIONS) $(SQLITE_OPTIONS) $(SHELL_CFLAGS) -c $(SRCDIR)\shell.c -$(OX)\sqlite3$O : $(SRCDIR)\sqlite3.c - $(TCC) /Fo$@ -c $(SQLITE_OPTIONS) $(SQLITE_CFLAGS) $** +$(OX)\sqlite3$O : $(SRCDIR)\sqlite3.c Makefile.msc + $(TCC) /Fo$@ -c $(SQLITE_OPTIONS) $(SQLITE_CFLAGS) $(SRCDIR)\sqlite3.c $(OX)\th$O : $(SRCDIR)\th.c $(TCC) /Fo$@ -c $** $(OX)\th_lang$O : $(SRCDIR)\th_lang.c