Fossil SCM

Reorder and revise the /timeline submenu controls for a more natural presentation.

drh 2015-02-06 21:39 trunk merge
Commit f76cfaca7f44a02d3efe464e8afe4f3529de0043
2 files changed +27 -37 +10 -7
+27 -37
--- src/style.c
+++ src/style.c
@@ -45,20 +45,20 @@
4545
} aSubmenu[30];
4646
static int nSubmenu = 0; /* Number of buttons */
4747
static struct SubmenuCtrl {
4848
const char *zName; /* Form query parameter */
4949
const char *zLabel; /* Label. Might be NULL for FF_MULTI */
50
- int eType; /* FF_ENTRY, FF_CKBOX, FF_MULTI */
51
- int iSize; /* Width for FF_ENTRY. Count for FF_MULTI */
50
+ unsigned char eType; /* FF_ENTRY, FF_MULTI, FF_BINARY */
51
+ unsigned char isDisabled; /* True if this control is grayed out */
52
+ short int iSize; /* Width for FF_ENTRY. Count for FF_MULTI */
5253
const char **azChoice; /* value/display pairs for FF_MULTI */
5354
const char *zFalse; /* FF_BINARY label when false */
5455
} aSubmenuCtrl[20];
5556
static int nSubmenuCtrl = 0;
5657
#define FF_ENTRY 1
57
-#define FF_CKBOX 2
58
-#define FF_MULTI 3
59
-#define FF_BINARY 4
58
+#define FF_MULTI 2
59
+#define FF_BINARY 3
6060
6161
/*
6262
** Remember that the header has been generated. The footer is omitted
6363
** if an error occurs before the header.
6464
*/
@@ -246,50 +246,46 @@
246246
nSubmenu++;
247247
}
248248
void style_submenu_entry(
249249
const char *zName, /* Query parameter name */
250250
const char *zLabel, /* Label before the entry box */
251
- int iSize /* Size of the entry box */
251
+ int iSize, /* Size of the entry box */
252
+ int isDisabled /* True if disabled */
252253
){
253254
assert( nSubmenuCtrl < ArraySize(aSubmenuCtrl) );
254255
aSubmenuCtrl[nSubmenuCtrl].zName = zName;
255256
aSubmenuCtrl[nSubmenuCtrl].zLabel = zLabel;
256257
aSubmenuCtrl[nSubmenuCtrl].iSize = iSize;
258
+ aSubmenuCtrl[nSubmenuCtrl].isDisabled = isDisabled;
257259
aSubmenuCtrl[nSubmenuCtrl].eType = FF_ENTRY;
258260
nSubmenuCtrl++;
259261
}
260
-void style_submenu_checkbox(
261
- const char *zName, /* Query parameter name */
262
- const char *zLabel /* Label before the checkbox */
263
-){
264
- assert( nSubmenuCtrl < ArraySize(aSubmenuCtrl) );
265
- aSubmenuCtrl[nSubmenuCtrl].zName = zName;
266
- aSubmenuCtrl[nSubmenuCtrl].zLabel = zLabel;
267
- aSubmenuCtrl[nSubmenuCtrl].eType = FF_CKBOX;
268
- nSubmenuCtrl++;
269
-}
270262
void style_submenu_binary(
271263
const char *zName, /* Query parameter name */
272264
const char *zTrue, /* Label to show when parameter is true */
273
- const char *zFalse /* Label to show when the parameter is false */
265
+ const char *zFalse, /* Label to show when the parameter is false */
266
+ int isDisabled /* True if this control is disabled */
274267
){
275268
assert( nSubmenuCtrl < ArraySize(aSubmenuCtrl) );
276269
aSubmenuCtrl[nSubmenuCtrl].zName = zName;
277270
aSubmenuCtrl[nSubmenuCtrl].zLabel = zTrue;
278271
aSubmenuCtrl[nSubmenuCtrl].zFalse = zFalse;
272
+ aSubmenuCtrl[nSubmenuCtrl].isDisabled = isDisabled;
279273
aSubmenuCtrl[nSubmenuCtrl].eType = FF_BINARY;
280274
nSubmenuCtrl++;
281275
}
282276
void style_submenu_multichoice(
283277
const char *zName, /* Query parameter name */
284278
int nChoice, /* Number of options */
285
- const char **azChoice /* value/display pairs. 2*nChoice entries */
279
+ const char **azChoice, /* value/display pairs. 2*nChoice entries */
280
+ int isDisabled /* True if this control is disabled */
286281
){
287282
assert( nSubmenuCtrl < ArraySize(aSubmenuCtrl) );
288283
aSubmenuCtrl[nSubmenuCtrl].zName = zName;
289284
aSubmenuCtrl[nSubmenuCtrl].iSize = nChoice;
290285
aSubmenuCtrl[nSubmenuCtrl].azChoice = azChoice;
286
+ aSubmenuCtrl[nSubmenuCtrl].isDisabled = isDisabled;
291287
aSubmenuCtrl[nSubmenuCtrl].eType = FF_MULTI;
292288
nSubmenuCtrl++;
293289
}
294290
295291
@@ -499,42 +495,36 @@
499495
}
500496
}
501497
if( nSubmenuCtrl>0 ){
502498
for(i=0; i<nSubmenuCtrl; i++){
503499
const char *zQPN = aSubmenuCtrl[i].zName;
504
- cgi_tag_query_parameter(zQPN);
500
+ const char *zDisabled = " disabled";
501
+ if( !aSubmenuCtrl[i].isDisabled ){
502
+ zDisabled = "";
503
+ cgi_tag_query_parameter(zQPN);
504
+ }
505505
switch( aSubmenuCtrl[i].eType ){
506506
case FF_ENTRY: {
507507
cgi_printf(
508508
"<span class='submenuctrl'>"
509
- "%h:&nbsp;<input type='text' name='%s' size='%d' "
510
- "value='%h'></span>\n",
509
+ "&nbsp;%h<input type='text' name='%s' size='%d' "
510
+ "value='%h'%s></span>\n",
511511
aSubmenuCtrl[i].zLabel,
512512
zQPN,
513513
aSubmenuCtrl[i].iSize,
514
- PD(zQPN,"")
515
- );
516
- break;
517
- }
518
- case FF_CKBOX: {
519
- cgi_printf(
520
- "<span class='submenuctrl'>"
521
- "%h:&nbsp;<input type='checkbox' name='%s'%s "
522
- "onchange='gebi(\"f01\").submit();'></span>\n",
523
- aSubmenuCtrl[i].zLabel,
524
- zQPN,
525
- PB(zQPN) ? " checked":""
514
+ PD(zQPN,""),
515
+ zDisabled
526516
);
527517
break;
528518
}
529519
case FF_MULTI: {
530520
int j;
531521
const char *zVal = P(zQPN);
532522
cgi_printf(
533
- "<select class='submenuctrl' size='1' name='%s' "
523
+ "<select class='submenuctrl' size='1' name='%s'%s "
534524
"onchange='gebi(\"f01\").submit();'>\n",
535
- zQPN
525
+ zQPN, zDisabled
536526
);
537527
for(j=0; j<aSubmenuCtrl[i].iSize*2; j+=2){
538528
const char *zQPV = aSubmenuCtrl[i].azChoice[j];
539529
cgi_printf(
540530
"<option value='%h'%s>%h</option>\n",
@@ -547,13 +537,13 @@
547537
break;
548538
}
549539
case FF_BINARY: {
550540
int isTrue = PB(zQPN);
551541
cgi_printf(
552
- "<select class='submenuctrl' size='1' name='%s' "
542
+ "<select class='submenuctrl' size='1' name='%s'%s "
553543
"onchange='gebi(\"f01\").submit();'>\n",
554
- zQPN
544
+ zQPN, zDisabled
555545
);
556546
cgi_printf(
557547
"<option value='1'%s>%h</option>\n",
558548
isTrue ? " selected":"", aSubmenuCtrl[i].zLabel
559549
);
560550
--- src/style.c
+++ src/style.c
@@ -45,20 +45,20 @@
45 } aSubmenu[30];
46 static int nSubmenu = 0; /* Number of buttons */
47 static struct SubmenuCtrl {
48 const char *zName; /* Form query parameter */
49 const char *zLabel; /* Label. Might be NULL for FF_MULTI */
50 int eType; /* FF_ENTRY, FF_CKBOX, FF_MULTI */
51 int iSize; /* Width for FF_ENTRY. Count for FF_MULTI */
 
52 const char **azChoice; /* value/display pairs for FF_MULTI */
53 const char *zFalse; /* FF_BINARY label when false */
54 } aSubmenuCtrl[20];
55 static int nSubmenuCtrl = 0;
56 #define FF_ENTRY 1
57 #define FF_CKBOX 2
58 #define FF_MULTI 3
59 #define FF_BINARY 4
60
61 /*
62 ** Remember that the header has been generated. The footer is omitted
63 ** if an error occurs before the header.
64 */
@@ -246,50 +246,46 @@
246 nSubmenu++;
247 }
248 void style_submenu_entry(
249 const char *zName, /* Query parameter name */
250 const char *zLabel, /* Label before the entry box */
251 int iSize /* Size of the entry box */
 
252 ){
253 assert( nSubmenuCtrl < ArraySize(aSubmenuCtrl) );
254 aSubmenuCtrl[nSubmenuCtrl].zName = zName;
255 aSubmenuCtrl[nSubmenuCtrl].zLabel = zLabel;
256 aSubmenuCtrl[nSubmenuCtrl].iSize = iSize;
 
257 aSubmenuCtrl[nSubmenuCtrl].eType = FF_ENTRY;
258 nSubmenuCtrl++;
259 }
260 void style_submenu_checkbox(
261 const char *zName, /* Query parameter name */
262 const char *zLabel /* Label before the checkbox */
263 ){
264 assert( nSubmenuCtrl < ArraySize(aSubmenuCtrl) );
265 aSubmenuCtrl[nSubmenuCtrl].zName = zName;
266 aSubmenuCtrl[nSubmenuCtrl].zLabel = zLabel;
267 aSubmenuCtrl[nSubmenuCtrl].eType = FF_CKBOX;
268 nSubmenuCtrl++;
269 }
270 void style_submenu_binary(
271 const char *zName, /* Query parameter name */
272 const char *zTrue, /* Label to show when parameter is true */
273 const char *zFalse /* Label to show when the parameter is false */
 
274 ){
275 assert( nSubmenuCtrl < ArraySize(aSubmenuCtrl) );
276 aSubmenuCtrl[nSubmenuCtrl].zName = zName;
277 aSubmenuCtrl[nSubmenuCtrl].zLabel = zTrue;
278 aSubmenuCtrl[nSubmenuCtrl].zFalse = zFalse;
 
279 aSubmenuCtrl[nSubmenuCtrl].eType = FF_BINARY;
280 nSubmenuCtrl++;
281 }
282 void style_submenu_multichoice(
283 const char *zName, /* Query parameter name */
284 int nChoice, /* Number of options */
285 const char **azChoice /* value/display pairs. 2*nChoice entries */
 
286 ){
287 assert( nSubmenuCtrl < ArraySize(aSubmenuCtrl) );
288 aSubmenuCtrl[nSubmenuCtrl].zName = zName;
289 aSubmenuCtrl[nSubmenuCtrl].iSize = nChoice;
290 aSubmenuCtrl[nSubmenuCtrl].azChoice = azChoice;
 
291 aSubmenuCtrl[nSubmenuCtrl].eType = FF_MULTI;
292 nSubmenuCtrl++;
293 }
294
295
@@ -499,42 +495,36 @@
499 }
500 }
501 if( nSubmenuCtrl>0 ){
502 for(i=0; i<nSubmenuCtrl; i++){
503 const char *zQPN = aSubmenuCtrl[i].zName;
504 cgi_tag_query_parameter(zQPN);
 
 
 
 
505 switch( aSubmenuCtrl[i].eType ){
506 case FF_ENTRY: {
507 cgi_printf(
508 "<span class='submenuctrl'>"
509 "%h:&nbsp;<input type='text' name='%s' size='%d' "
510 "value='%h'></span>\n",
511 aSubmenuCtrl[i].zLabel,
512 zQPN,
513 aSubmenuCtrl[i].iSize,
514 PD(zQPN,"")
515 );
516 break;
517 }
518 case FF_CKBOX: {
519 cgi_printf(
520 "<span class='submenuctrl'>"
521 "%h:&nbsp;<input type='checkbox' name='%s'%s "
522 "onchange='gebi(\"f01\").submit();'></span>\n",
523 aSubmenuCtrl[i].zLabel,
524 zQPN,
525 PB(zQPN) ? " checked":""
526 );
527 break;
528 }
529 case FF_MULTI: {
530 int j;
531 const char *zVal = P(zQPN);
532 cgi_printf(
533 "<select class='submenuctrl' size='1' name='%s' "
534 "onchange='gebi(\"f01\").submit();'>\n",
535 zQPN
536 );
537 for(j=0; j<aSubmenuCtrl[i].iSize*2; j+=2){
538 const char *zQPV = aSubmenuCtrl[i].azChoice[j];
539 cgi_printf(
540 "<option value='%h'%s>%h</option>\n",
@@ -547,13 +537,13 @@
547 break;
548 }
549 case FF_BINARY: {
550 int isTrue = PB(zQPN);
551 cgi_printf(
552 "<select class='submenuctrl' size='1' name='%s' "
553 "onchange='gebi(\"f01\").submit();'>\n",
554 zQPN
555 );
556 cgi_printf(
557 "<option value='1'%s>%h</option>\n",
558 isTrue ? " selected":"", aSubmenuCtrl[i].zLabel
559 );
560
--- src/style.c
+++ src/style.c
@@ -45,20 +45,20 @@
45 } aSubmenu[30];
46 static int nSubmenu = 0; /* Number of buttons */
47 static struct SubmenuCtrl {
48 const char *zName; /* Form query parameter */
49 const char *zLabel; /* Label. Might be NULL for FF_MULTI */
50 unsigned char eType; /* FF_ENTRY, FF_MULTI, FF_BINARY */
51 unsigned char isDisabled; /* True if this control is grayed out */
52 short int iSize; /* Width for FF_ENTRY. Count for FF_MULTI */
53 const char **azChoice; /* value/display pairs for FF_MULTI */
54 const char *zFalse; /* FF_BINARY label when false */
55 } aSubmenuCtrl[20];
56 static int nSubmenuCtrl = 0;
57 #define FF_ENTRY 1
58 #define FF_MULTI 2
59 #define FF_BINARY 3
 
60
61 /*
62 ** Remember that the header has been generated. The footer is omitted
63 ** if an error occurs before the header.
64 */
@@ -246,50 +246,46 @@
246 nSubmenu++;
247 }
248 void style_submenu_entry(
249 const char *zName, /* Query parameter name */
250 const char *zLabel, /* Label before the entry box */
251 int iSize, /* Size of the entry box */
252 int isDisabled /* True if disabled */
253 ){
254 assert( nSubmenuCtrl < ArraySize(aSubmenuCtrl) );
255 aSubmenuCtrl[nSubmenuCtrl].zName = zName;
256 aSubmenuCtrl[nSubmenuCtrl].zLabel = zLabel;
257 aSubmenuCtrl[nSubmenuCtrl].iSize = iSize;
258 aSubmenuCtrl[nSubmenuCtrl].isDisabled = isDisabled;
259 aSubmenuCtrl[nSubmenuCtrl].eType = FF_ENTRY;
260 nSubmenuCtrl++;
261 }
 
 
 
 
 
 
 
 
 
 
262 void style_submenu_binary(
263 const char *zName, /* Query parameter name */
264 const char *zTrue, /* Label to show when parameter is true */
265 const char *zFalse, /* Label to show when the parameter is false */
266 int isDisabled /* True if this control is disabled */
267 ){
268 assert( nSubmenuCtrl < ArraySize(aSubmenuCtrl) );
269 aSubmenuCtrl[nSubmenuCtrl].zName = zName;
270 aSubmenuCtrl[nSubmenuCtrl].zLabel = zTrue;
271 aSubmenuCtrl[nSubmenuCtrl].zFalse = zFalse;
272 aSubmenuCtrl[nSubmenuCtrl].isDisabled = isDisabled;
273 aSubmenuCtrl[nSubmenuCtrl].eType = FF_BINARY;
274 nSubmenuCtrl++;
275 }
276 void style_submenu_multichoice(
277 const char *zName, /* Query parameter name */
278 int nChoice, /* Number of options */
279 const char **azChoice, /* value/display pairs. 2*nChoice entries */
280 int isDisabled /* True if this control is disabled */
281 ){
282 assert( nSubmenuCtrl < ArraySize(aSubmenuCtrl) );
283 aSubmenuCtrl[nSubmenuCtrl].zName = zName;
284 aSubmenuCtrl[nSubmenuCtrl].iSize = nChoice;
285 aSubmenuCtrl[nSubmenuCtrl].azChoice = azChoice;
286 aSubmenuCtrl[nSubmenuCtrl].isDisabled = isDisabled;
287 aSubmenuCtrl[nSubmenuCtrl].eType = FF_MULTI;
288 nSubmenuCtrl++;
289 }
290
291
@@ -499,42 +495,36 @@
495 }
496 }
497 if( nSubmenuCtrl>0 ){
498 for(i=0; i<nSubmenuCtrl; i++){
499 const char *zQPN = aSubmenuCtrl[i].zName;
500 const char *zDisabled = " disabled";
501 if( !aSubmenuCtrl[i].isDisabled ){
502 zDisabled = "";
503 cgi_tag_query_parameter(zQPN);
504 }
505 switch( aSubmenuCtrl[i].eType ){
506 case FF_ENTRY: {
507 cgi_printf(
508 "<span class='submenuctrl'>"
509 "&nbsp;%h<input type='text' name='%s' size='%d' "
510 "value='%h'%s></span>\n",
511 aSubmenuCtrl[i].zLabel,
512 zQPN,
513 aSubmenuCtrl[i].iSize,
514 PD(zQPN,""),
515 zDisabled
 
 
 
 
 
 
 
 
 
 
516 );
517 break;
518 }
519 case FF_MULTI: {
520 int j;
521 const char *zVal = P(zQPN);
522 cgi_printf(
523 "<select class='submenuctrl' size='1' name='%s'%s "
524 "onchange='gebi(\"f01\").submit();'>\n",
525 zQPN, zDisabled
526 );
527 for(j=0; j<aSubmenuCtrl[i].iSize*2; j+=2){
528 const char *zQPV = aSubmenuCtrl[i].azChoice[j];
529 cgi_printf(
530 "<option value='%h'%s>%h</option>\n",
@@ -547,13 +537,13 @@
537 break;
538 }
539 case FF_BINARY: {
540 int isTrue = PB(zQPN);
541 cgi_printf(
542 "<select class='submenuctrl' size='1' name='%s'%s "
543 "onchange='gebi(\"f01\").submit();'>\n",
544 zQPN, zDisabled
545 );
546 cgi_printf(
547 "<option value='1'%s>%h</option>\n",
548 isTrue ? " selected":"", aSubmenuCtrl[i].zLabel
549 );
550
+10 -7
--- src/timeline.c
+++ src/timeline.c
@@ -1032,11 +1032,11 @@
10321032
static void timeline_y_submenu(void){
10331033
static int i = 0;
10341034
static const char *az[12];
10351035
if( i==0 ){
10361036
az[0] = "all";
1037
- az[1] = "All Types";
1037
+ az[1] = "Any Type";
10381038
i = 2;
10391039
if( g.perm.Read ){
10401040
az[i++] = "ci";
10411041
az[i++] = "Check-ins";
10421042
az[i++] = "g";
@@ -1055,11 +1055,11 @@
10551055
az[i++] = "Wiki";
10561056
}
10571057
assert( i<=ArraySize(az) );
10581058
}
10591059
if( i>2 ){
1060
- style_submenu_multichoice("y", i/2, az);
1060
+ style_submenu_multichoice("y", i/2, az, 0);
10611061
}
10621062
}
10631063
10641064
/*
10651065
** WEBPAGE: timeline
@@ -1309,13 +1309,14 @@
13091309
if( p_rid ){
13101310
/* If both p= and d= are set, we don't have the uuid of d yet. */
13111311
zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", d_rid);
13121312
}
13131313
}
1314
- style_submenu_binary("v","With Files","Without Files");
1315
- style_submenu_entry("n","Lines",1);
1314
+ style_submenu_entry("n","Max:",1,0);
13161315
timeline_y_submenu();
1316
+ style_submenu_binary("v","With Files","Without Files",
1317
+ zType[0]!='a' && zType[0]!='c');
13171318
}else if( f_rid && g.perm.Read ){
13181319
/* If f= is present, ignore all other parameters other than n= */
13191320
char *zUuid;
13201321
db_multi_exec(
13211322
"CREATE TEMP TABLE IF NOT EXISTS ok(rid INTEGER PRIMARY KEY);"
@@ -1329,11 +1330,12 @@
13291330
if( useDividers ) timeline_add_dividers(0, f_rid);
13301331
blob_appendf(&desc, "Parents and children of check-in ");
13311332
zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", f_rid);
13321333
blob_appendf(&desc, "%z[%S]</a>", href("%R/info/%s", zUuid), zUuid);
13331334
tmFlags |= TIMELINE_DISJOINT;
1334
- style_submenu_binary("v","With Files","Without Files");
1335
+ style_submenu_binary("v","With Files","Without Files",
1336
+ zType[0]!='a' && zType[0]!='c');
13351337
if( (tmFlags & TIMELINE_UNHIDE)==0 ){
13361338
timeline_submenu(&url, "Unhide", "unhide", "", 0);
13371339
}
13381340
}else{
13391341
/* Otherwise, a timeline based on a span of time */
@@ -1551,13 +1553,14 @@
15511553
if( zType[0]=='a' || zType[0]=='c' ){
15521554
if( (tmFlags & TIMELINE_UNHIDE)==0 ){
15531555
timeline_submenu(&url, "Unhide", "unhide", "", 0);
15541556
}
15551557
}
1556
- style_submenu_binary("v","With Files","Without Files");
1558
+ style_submenu_entry("n","Max:",1,0);
15571559
if( zUses==0 ) timeline_y_submenu();
1558
- style_submenu_entry("n","Lines",1);
1560
+ style_submenu_binary("v","With Files","Without Files",
1561
+ zType[0]!='a' && zType[0]!='c');
15591562
}
15601563
}
15611564
if( P("showsql") ){
15621565
@ <blockquote>%h(blob_sql_text(&sql))</blockquote>
15631566
}
15641567
--- src/timeline.c
+++ src/timeline.c
@@ -1032,11 +1032,11 @@
1032 static void timeline_y_submenu(void){
1033 static int i = 0;
1034 static const char *az[12];
1035 if( i==0 ){
1036 az[0] = "all";
1037 az[1] = "All Types";
1038 i = 2;
1039 if( g.perm.Read ){
1040 az[i++] = "ci";
1041 az[i++] = "Check-ins";
1042 az[i++] = "g";
@@ -1055,11 +1055,11 @@
1055 az[i++] = "Wiki";
1056 }
1057 assert( i<=ArraySize(az) );
1058 }
1059 if( i>2 ){
1060 style_submenu_multichoice("y", i/2, az);
1061 }
1062 }
1063
1064 /*
1065 ** WEBPAGE: timeline
@@ -1309,13 +1309,14 @@
1309 if( p_rid ){
1310 /* If both p= and d= are set, we don't have the uuid of d yet. */
1311 zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", d_rid);
1312 }
1313 }
1314 style_submenu_binary("v","With Files","Without Files");
1315 style_submenu_entry("n","Lines",1);
1316 timeline_y_submenu();
 
 
1317 }else if( f_rid && g.perm.Read ){
1318 /* If f= is present, ignore all other parameters other than n= */
1319 char *zUuid;
1320 db_multi_exec(
1321 "CREATE TEMP TABLE IF NOT EXISTS ok(rid INTEGER PRIMARY KEY);"
@@ -1329,11 +1330,12 @@
1329 if( useDividers ) timeline_add_dividers(0, f_rid);
1330 blob_appendf(&desc, "Parents and children of check-in ");
1331 zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", f_rid);
1332 blob_appendf(&desc, "%z[%S]</a>", href("%R/info/%s", zUuid), zUuid);
1333 tmFlags |= TIMELINE_DISJOINT;
1334 style_submenu_binary("v","With Files","Without Files");
 
1335 if( (tmFlags & TIMELINE_UNHIDE)==0 ){
1336 timeline_submenu(&url, "Unhide", "unhide", "", 0);
1337 }
1338 }else{
1339 /* Otherwise, a timeline based on a span of time */
@@ -1551,13 +1553,14 @@
1551 if( zType[0]=='a' || zType[0]=='c' ){
1552 if( (tmFlags & TIMELINE_UNHIDE)==0 ){
1553 timeline_submenu(&url, "Unhide", "unhide", "", 0);
1554 }
1555 }
1556 style_submenu_binary("v","With Files","Without Files");
1557 if( zUses==0 ) timeline_y_submenu();
1558 style_submenu_entry("n","Lines",1);
 
1559 }
1560 }
1561 if( P("showsql") ){
1562 @ <blockquote>%h(blob_sql_text(&sql))</blockquote>
1563 }
1564
--- src/timeline.c
+++ src/timeline.c
@@ -1032,11 +1032,11 @@
1032 static void timeline_y_submenu(void){
1033 static int i = 0;
1034 static const char *az[12];
1035 if( i==0 ){
1036 az[0] = "all";
1037 az[1] = "Any Type";
1038 i = 2;
1039 if( g.perm.Read ){
1040 az[i++] = "ci";
1041 az[i++] = "Check-ins";
1042 az[i++] = "g";
@@ -1055,11 +1055,11 @@
1055 az[i++] = "Wiki";
1056 }
1057 assert( i<=ArraySize(az) );
1058 }
1059 if( i>2 ){
1060 style_submenu_multichoice("y", i/2, az, 0);
1061 }
1062 }
1063
1064 /*
1065 ** WEBPAGE: timeline
@@ -1309,13 +1309,14 @@
1309 if( p_rid ){
1310 /* If both p= and d= are set, we don't have the uuid of d yet. */
1311 zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", d_rid);
1312 }
1313 }
1314 style_submenu_entry("n","Max:",1,0);
 
1315 timeline_y_submenu();
1316 style_submenu_binary("v","With Files","Without Files",
1317 zType[0]!='a' && zType[0]!='c');
1318 }else if( f_rid && g.perm.Read ){
1319 /* If f= is present, ignore all other parameters other than n= */
1320 char *zUuid;
1321 db_multi_exec(
1322 "CREATE TEMP TABLE IF NOT EXISTS ok(rid INTEGER PRIMARY KEY);"
@@ -1329,11 +1330,12 @@
1330 if( useDividers ) timeline_add_dividers(0, f_rid);
1331 blob_appendf(&desc, "Parents and children of check-in ");
1332 zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", f_rid);
1333 blob_appendf(&desc, "%z[%S]</a>", href("%R/info/%s", zUuid), zUuid);
1334 tmFlags |= TIMELINE_DISJOINT;
1335 style_submenu_binary("v","With Files","Without Files",
1336 zType[0]!='a' && zType[0]!='c');
1337 if( (tmFlags & TIMELINE_UNHIDE)==0 ){
1338 timeline_submenu(&url, "Unhide", "unhide", "", 0);
1339 }
1340 }else{
1341 /* Otherwise, a timeline based on a span of time */
@@ -1551,13 +1553,14 @@
1553 if( zType[0]=='a' || zType[0]=='c' ){
1554 if( (tmFlags & TIMELINE_UNHIDE)==0 ){
1555 timeline_submenu(&url, "Unhide", "unhide", "", 0);
1556 }
1557 }
1558 style_submenu_entry("n","Max:",1,0);
1559 if( zUses==0 ) timeline_y_submenu();
1560 style_submenu_binary("v","With Files","Without Files",
1561 zType[0]!='a' && zType[0]!='c');
1562 }
1563 }
1564 if( P("showsql") ){
1565 @ <blockquote>%h(blob_sql_text(&sql))</blockquote>
1566 }
1567

Keyboard Shortcuts

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