Fossil SCM

Add accordion panels to the /ckout page.

drh 2024-12-13 12:19 trunk
Commit 4af5cde63d01fdaa3eac35a84af42a4f8ae15d126981672f1ee1dd65011d8230
1 file changed +7
+7
--- src/info.c
+++ src/info.c
@@ -650,11 +650,15 @@
650650
if( zHostname ){
651651
style_header("Checkout Status: %h on %h", zCwd, zHostname);
652652
}else{
653653
style_header("Checkout Status: %h", zCwd);
654654
}
655
+ builtin_request_js("accordion.js");
656
+ @ <div class="section accordion">Context</div>
657
+ @ <div class="accordion_panel"> <!-- ap-001 -->
655658
render_checkin_context(vid, 0, 0, 0);
659
+ @ </div> <!-- ap-001 -->
656660
if( pCfg==0 ){
657661
style_finish_page();
658662
return;
659663
}
660664
db_prepare(&q,
@@ -669,10 +673,12 @@
669673
if( pCfg->diffFlags & DIFF_SIDEBYSIDE ){
670674
pCfg->diffFlags |= DIFF_HTML | DIFF_NOTTOOBIG;
671675
}else{
672676
pCfg->diffFlags |= DIFF_LINENO | DIFF_HTML | DIFF_NOTTOOBIG;
673677
}
678
+ @ <div class="section accordion">Uncommitted Changes</div>
679
+ @ <div class="accordion_panel"> <!-- ap-002 -->
674680
@ <div class="sectionmenu info-changes-menu">
675681
/* Filled out by JS */
676682
@ </div>
677683
while( db_step(&q)==SQLITE_ROW ){
678684
const char *zTreename = db_column_text(&q,0);
@@ -730,10 +736,11 @@
730736
blob_reset(&old);
731737
blob_reset(&new);
732738
}
733739
}
734740
db_finalize(&q);
741
+ @ </div> <!-- ap-002 -->
735742
append_diff_javascript(diffType);
736743
style_finish_page();
737744
}
738745
739746
/*
740747
--- src/info.c
+++ src/info.c
@@ -650,11 +650,15 @@
650 if( zHostname ){
651 style_header("Checkout Status: %h on %h", zCwd, zHostname);
652 }else{
653 style_header("Checkout Status: %h", zCwd);
654 }
 
 
 
655 render_checkin_context(vid, 0, 0, 0);
 
656 if( pCfg==0 ){
657 style_finish_page();
658 return;
659 }
660 db_prepare(&q,
@@ -669,10 +673,12 @@
669 if( pCfg->diffFlags & DIFF_SIDEBYSIDE ){
670 pCfg->diffFlags |= DIFF_HTML | DIFF_NOTTOOBIG;
671 }else{
672 pCfg->diffFlags |= DIFF_LINENO | DIFF_HTML | DIFF_NOTTOOBIG;
673 }
 
 
674 @ <div class="sectionmenu info-changes-menu">
675 /* Filled out by JS */
676 @ </div>
677 while( db_step(&q)==SQLITE_ROW ){
678 const char *zTreename = db_column_text(&q,0);
@@ -730,10 +736,11 @@
730 blob_reset(&old);
731 blob_reset(&new);
732 }
733 }
734 db_finalize(&q);
 
735 append_diff_javascript(diffType);
736 style_finish_page();
737 }
738
739 /*
740
--- src/info.c
+++ src/info.c
@@ -650,11 +650,15 @@
650 if( zHostname ){
651 style_header("Checkout Status: %h on %h", zCwd, zHostname);
652 }else{
653 style_header("Checkout Status: %h", zCwd);
654 }
655 builtin_request_js("accordion.js");
656 @ <div class="section accordion">Context</div>
657 @ <div class="accordion_panel"> <!-- ap-001 -->
658 render_checkin_context(vid, 0, 0, 0);
659 @ </div> <!-- ap-001 -->
660 if( pCfg==0 ){
661 style_finish_page();
662 return;
663 }
664 db_prepare(&q,
@@ -669,10 +673,12 @@
673 if( pCfg->diffFlags & DIFF_SIDEBYSIDE ){
674 pCfg->diffFlags |= DIFF_HTML | DIFF_NOTTOOBIG;
675 }else{
676 pCfg->diffFlags |= DIFF_LINENO | DIFF_HTML | DIFF_NOTTOOBIG;
677 }
678 @ <div class="section accordion">Uncommitted Changes</div>
679 @ <div class="accordion_panel"> <!-- ap-002 -->
680 @ <div class="sectionmenu info-changes-menu">
681 /* Filled out by JS */
682 @ </div>
683 while( db_step(&q)==SQLITE_ROW ){
684 const char *zTreename = db_column_text(&q,0);
@@ -730,10 +736,11 @@
736 blob_reset(&old);
737 blob_reset(&new);
738 }
739 }
740 db_finalize(&q);
741 @ </div> <!-- ap-002 -->
742 append_diff_javascript(diffType);
743 style_finish_page();
744 }
745
746 /*
747

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button