Index: skins/black_and_white/header.txt ================================================================== --- skins/black_and_white/header.txt +++ skins/black_and_white/header.txt @@ -14,11 +14,11 @@
} if( bHashBeforeComment && zUuid ){ hyperlink_to_uuid(zUuid); } - @ %W(zCom) + @ + @ %W(zCom) if( bHashAfterComment && zUuid ){ hyperlink_to_uuid(zUuid); } if( bShowDetail ){ + @ ⋯ if( bSeparateDetail ){ if( zBgClr && zBgClr[0] ){ @ | }else{ @ |
}
}
+ cgi_printf("", frid);
cgi_printf("(");
if( zUuid && bHashInDetail ){
@ file: %z(href("%R/artifact/%!S",zUuid))[%S(zUuid)]
if( fShowId ){
int srcId = delta_source_rid(frid);
@@ -589,22 +587,22 @@
}else{
@ Deleted
}
}
}
- if( g.perm.Hyperlink && zUuid && !bBasic ){
+ if( g.perm.Hyperlink && zUuid ){
const char *z = zFilename;
- @
+ @
@ %z(href("%R/annotate?filename=%h&checkin=%s",z,zCkin))
@ [annotate]
@ %z(href("%R/blame?filename=%h&checkin=%s",z,zCkin))
@ [blame]
@ %z(href("%R/timeline?n=all&uf=%!S",zUuid))[check-ins using]
if( fpid>0 ){
@ %z(href("%R/fdiff?sbs=1&v1=%!S&v2=%!S",zPUuid,zUuid))[diff]
}
- @
+ @
}
if( fDebug & FINFO_DEBUG_MLINK ){
int ii;
char *zAncLink;
@ fid=%d(frid) pid=%d(fpid) mid=%d(fmid) @@ -617,11 +615,11 @@ zAncLink = href("%R/finfo?name=%T&ci=%!S&debug=1",zFilename,zCkin); @ %z(zAncLink)[ancestry] } tag_private_status(frid); if( bShowDetail ){ - @ + @ } @ |
}
db_finalize(&q);
db_finalize(&qparent);
Index: src/style.c
==================================================================
--- src/style.c
+++ src/style.c
@@ -47,21 +47,29 @@
static int nSubmenu = 0; /* Number of buttons */
static struct SubmenuCtrl {
const char *zName; /* Form query parameter */
const char *zLabel; /* Label. Might be NULL for FF_MULTI */
unsigned char eType; /* FF_ENTRY, FF_MULTI, FF_BINARY */
- unsigned char isDisabled; /* True if this control is grayed out */
+ unsigned char eVisible; /* STYLE_NORMAL, STYLE_VISIBLE, .... */
short int iSize; /* Width for FF_ENTRY. Count for FF_MULTI */
const char *const *azChoice; /* value/display pairs for FF_MULTI */
const char *zFalse; /* FF_BINARY label when false */
const char *zJS; /* Javascript to run on toggle */
} aSubmenuCtrl[20];
static int nSubmenuCtrl = 0;
-#define FF_ENTRY 1
-#define FF_MULTI 2
-#define FF_BINARY 3
-#define FF_CHECKBOX 4
+#define FF_ENTRY 1 /* Text entry box */
+#define FF_MULTI 2 /* Combobox. Multiple choices. */
+#define FF_BINARY 3 /* Control binary query parameter */
+#define FF_CHECKBOX 4 /* Check-box with JS */
+#define FF_JSBUTTON 5 /* Run JS when clicked */
+
+#if INTERFACE
+#define STYLE_NORMAL 0 /* Normal display of control */
+#define STYLE_DISABLED 1 /* Control is disabled */
+#define STYLE_CLUTTER 2 /* Only visible in "Advanced" display */
+#define STYLE_BASIC 4 /* Only visible in "Basic" display */
+#endif /* INTERFACE */
/*
** Remember that the header has been generated. The footer is omitted
** if an error occurs before the header.
*/
@@ -248,59 +256,71 @@
}
void style_submenu_entry(
const char *zName, /* Query parameter name */
const char *zLabel, /* Label before the entry box */
int iSize, /* Size of the entry box */
- int isDisabled /* True if disabled */
+ int eVisible /* Visible or disabled */
){
assert( nSubmenuCtrl < count(aSubmenuCtrl) );
aSubmenuCtrl[nSubmenuCtrl].zName = zName;
aSubmenuCtrl[nSubmenuCtrl].zLabel = zLabel;
aSubmenuCtrl[nSubmenuCtrl].iSize = iSize;
- aSubmenuCtrl[nSubmenuCtrl].isDisabled = isDisabled;
+ aSubmenuCtrl[nSubmenuCtrl].eVisible = eVisible;
aSubmenuCtrl[nSubmenuCtrl].eType = FF_ENTRY;
nSubmenuCtrl++;
}
void style_submenu_checkbox(
const char *zName, /* Query parameter name */
const char *zLabel, /* Label to display after the checkbox */
- int isDisabled, /* True if disabled */
+ int eVisible, /* Visible or disabled */
const char *zJS /* Optional javascript to run on toggle */
){
assert( nSubmenuCtrl < count(aSubmenuCtrl) );
aSubmenuCtrl[nSubmenuCtrl].zName = zName;
aSubmenuCtrl[nSubmenuCtrl].zLabel = zLabel;
- aSubmenuCtrl[nSubmenuCtrl].isDisabled = isDisabled;
+ aSubmenuCtrl[nSubmenuCtrl].eVisible = eVisible;
aSubmenuCtrl[nSubmenuCtrl].zJS = zJS;
aSubmenuCtrl[nSubmenuCtrl].eType = FF_CHECKBOX;
nSubmenuCtrl++;
+}
+void style_submenu_jsbutton(
+ const char *zLabel, /* Label to display on the submenu */
+ int eVisible, /* Visible or disabled */
+ const char *zJS /* Javascript to run when clicked */
+){
+ assert( nSubmenuCtrl < count(aSubmenuCtrl) );
+ aSubmenuCtrl[nSubmenuCtrl].zLabel = zLabel;
+ aSubmenuCtrl[nSubmenuCtrl].eVisible = eVisible;
+ aSubmenuCtrl[nSubmenuCtrl].zJS = zJS;
+ aSubmenuCtrl[nSubmenuCtrl].eType = FF_JSBUTTON;
+ nSubmenuCtrl++;
}
void style_submenu_binary(
const char *zName, /* Query parameter name */
const char *zTrue, /* Label to show when parameter is true */
const char *zFalse, /* Label to show when the parameter is false */
- int isDisabled /* True if this control is disabled */
+ int eVisible /* Visible or disabled */
){
assert( nSubmenuCtrl < count(aSubmenuCtrl) );
aSubmenuCtrl[nSubmenuCtrl].zName = zName;
aSubmenuCtrl[nSubmenuCtrl].zLabel = zTrue;
aSubmenuCtrl[nSubmenuCtrl].zFalse = zFalse;
- aSubmenuCtrl[nSubmenuCtrl].isDisabled = isDisabled;
+ aSubmenuCtrl[nSubmenuCtrl].eVisible = eVisible;
aSubmenuCtrl[nSubmenuCtrl].eType = FF_BINARY;
nSubmenuCtrl++;
}
void style_submenu_multichoice(
- const char *zName, /* Query parameter name */
- int nChoice, /* Number of options */
- const char *const *azChoice,/* value/display pairs. 2*nChoice entries */
- int isDisabled /* True if this control is disabled */
+ const char *zName, /* Query parameter name */
+ int nChoice, /* Number of options */
+ const char *const *azChoice, /* value/display pairs. 2*nChoice entries */
+ int eVisible /* Visible or disabled */
){
assert( nSubmenuCtrl < count(aSubmenuCtrl) );
aSubmenuCtrl[nSubmenuCtrl].zName = zName;
aSubmenuCtrl[nSubmenuCtrl].iSize = nChoice;
aSubmenuCtrl[nSubmenuCtrl].azChoice = azChoice;
- aSubmenuCtrl[nSubmenuCtrl].isDisabled = isDisabled;
+ aSubmenuCtrl[nSubmenuCtrl].eVisible = eVisible;
aSubmenuCtrl[nSubmenuCtrl].eType = FF_MULTI;
nSubmenuCtrl++;
}
void style_submenu_sql(
const char *zName, /* Query parameter name */
@@ -329,11 +349,11 @@
if( n>0 ){
aSubmenuCtrl[nSubmenuCtrl].zName = zName;
aSubmenuCtrl[nSubmenuCtrl].zLabel = zLabel;
aSubmenuCtrl[nSubmenuCtrl].iSize = n/2;
aSubmenuCtrl[nSubmenuCtrl].azChoice = (const char *const *)az;
- aSubmenuCtrl[nSubmenuCtrl].isDisabled = 0;
+ aSubmenuCtrl[nSubmenuCtrl].eVisible = STYLE_NORMAL;
aSubmenuCtrl[nSubmenuCtrl].eType = FF_MULTI;
nSubmenuCtrl++;
}
}
@@ -563,18 +583,26 @@
}
}
}
for(i=0; i