Fossil SCM
Rename the sticky CSS class to pinned.
Commit
0f145235ff4fe018c9e5e90500cd9ff8036770e229410c9dea0bda52145484c8
Parent
6483b05b0d0195c…
2 files changed
+1
-1
+4
-4
+1
-1
| --- src/default.css | ||
| +++ src/default.css | ||
| @@ -1114,11 +1114,11 @@ | ||
| 1114 | 1114 | div.setup_forum-column { |
| 1115 | 1115 | display: flex; |
| 1116 | 1116 | flex-direction: column; |
| 1117 | 1117 | } |
| 1118 | 1118 | |
| 1119 | -body.forum div.forumPosts table tr.sticky > td:nth-child(1):before { | |
| 1119 | +body.forum div.forumPosts table tr.pinned > td:nth-child(1):before { | |
| 1120 | 1120 | padding-right: 0.25em; |
| 1121 | 1121 | content: "📌"; |
| 1122 | 1122 | } |
| 1123 | 1123 | |
| 1124 | 1124 | body.cpage-setup_forum > .content table { |
| 1125 | 1125 |
| --- src/default.css | |
| +++ src/default.css | |
| @@ -1114,11 +1114,11 @@ | |
| 1114 | div.setup_forum-column { |
| 1115 | display: flex; |
| 1116 | flex-direction: column; |
| 1117 | } |
| 1118 | |
| 1119 | body.forum div.forumPosts table tr.sticky > td:nth-child(1):before { |
| 1120 | padding-right: 0.25em; |
| 1121 | content: "📌"; |
| 1122 | } |
| 1123 | |
| 1124 | body.cpage-setup_forum > .content table { |
| 1125 |
| --- src/default.css | |
| +++ src/default.css | |
| @@ -1114,11 +1114,11 @@ | |
| 1114 | div.setup_forum-column { |
| 1115 | display: flex; |
| 1116 | flex-direction: column; |
| 1117 | } |
| 1118 | |
| 1119 | body.forum div.forumPosts table tr.pinned > td:nth-child(1):before { |
| 1120 | padding-right: 0.25em; |
| 1121 | content: "📌"; |
| 1122 | } |
| 1123 | |
| 1124 | body.cpage-setup_forum > .content table { |
| 1125 |
+4
-4
| --- src/forum.c | ||
| +++ src/forum.c | ||
| @@ -2223,11 +2223,11 @@ | ||
| 2223 | 2223 | style_submenu_entry("n","Max:",4,0); |
| 2224 | 2224 | iOfst = atoi(PD("x","0")); |
| 2225 | 2225 | iCnt = 0; |
| 2226 | 2226 | if( db_table_exists("repository","forumpost") ){ |
| 2227 | 2227 | db_prepare(&q, |
| 2228 | - "WITH thread(age,duration,cnt,root,last,sticky) AS (" | |
| 2228 | + "WITH thread(age,duration,cnt,root,last,pinned) AS (" | |
| 2229 | 2229 | " SELECT" |
| 2230 | 2230 | " julianday('now') - max(fmtime)," |
| 2231 | 2231 | " max(fmtime) - min(fmtime)," |
| 2232 | 2232 | " sum(fprev IS NULL)," |
| 2233 | 2233 | " froot," |
| @@ -2253,11 +2253,11 @@ | ||
| 2253 | 2253 | " thread.duration," /* 1 */ |
| 2254 | 2254 | " thread.cnt," /* 2 */ |
| 2255 | 2255 | " blob.uuid," /* 3 */ |
| 2256 | 2256 | " substr(event.comment,instr(event.comment,':')+1)," /* 4 */ |
| 2257 | 2257 | " thread.last," /* 5 */ |
| 2258 | - " thread.sticky" /* 6 */ | |
| 2258 | + " thread.pinned" /* 6 */ | |
| 2259 | 2259 | " FROM thread, blob, event" |
| 2260 | 2260 | " WHERE blob.rid=thread.last" |
| 2261 | 2261 | " AND event.objid=thread.last" |
| 2262 | 2262 | " ORDER BY 7 DESC, 1;", |
| 2263 | 2263 | g.perm.ModForum ? "" : "AND y.fpid NOT IN private" /*safe-for-%s*/, |
| @@ -2265,11 +2265,11 @@ | ||
| 2265 | 2265 | iLimit+1, iOfst |
| 2266 | 2266 | ); |
| 2267 | 2267 | while( db_step(&q)==SQLITE_ROW ){ |
| 2268 | 2268 | char *zAge = human_readable_age(db_column_double(&q,0)); |
| 2269 | 2269 | int nMsg = db_column_int(&q, 2); |
| 2270 | - int bSticky = db_column_int(&q, 6); | |
| 2270 | + int bPinned = db_column_int(&q, 6); | |
| 2271 | 2271 | const char *zUuid = db_column_text(&q, 3); |
| 2272 | 2272 | const char *zTitle = db_column_text(&q, 4); |
| 2273 | 2273 | if( iCnt==0 ){ |
| 2274 | 2274 | if( iOfst>0 ){ |
| 2275 | 2275 | @ <h1>Threads at least %s(zAge) old</h1> |
| @@ -2294,11 +2294,11 @@ | ||
| 2294 | 2294 | @ %z(href("%R/forum?x=%d&n=%d",iOfst+iLimit,iLimit))\ |
| 2295 | 2295 | @ ↓ Older...</a></td></tr> |
| 2296 | 2296 | fossil_free(zAge); |
| 2297 | 2297 | break; |
| 2298 | 2298 | } |
| 2299 | - @ <tr%s(bSticky ? " class='sticky'" : "")><td>%h(zAge) ago</td> | |
| 2299 | + @ <tr%s(bPinned ? " class='pinned'" : "")><td>%h(zAge) ago</td> | |
| 2300 | 2300 | @ <td>%z(href("%R/forumpost/%S",zUuid))%h(zTitle)</a></td> |
| 2301 | 2301 | @ <td>\ |
| 2302 | 2302 | if( g.perm.ModForum && moderation_pending(db_column_int(&q,5)) ){ |
| 2303 | 2303 | @ <span class="modpending">\ |
| 2304 | 2304 | @ Awaiting Moderator Approval</span><br> |
| 2305 | 2305 |
| --- src/forum.c | |
| +++ src/forum.c | |
| @@ -2223,11 +2223,11 @@ | |
| 2223 | style_submenu_entry("n","Max:",4,0); |
| 2224 | iOfst = atoi(PD("x","0")); |
| 2225 | iCnt = 0; |
| 2226 | if( db_table_exists("repository","forumpost") ){ |
| 2227 | db_prepare(&q, |
| 2228 | "WITH thread(age,duration,cnt,root,last,sticky) AS (" |
| 2229 | " SELECT" |
| 2230 | " julianday('now') - max(fmtime)," |
| 2231 | " max(fmtime) - min(fmtime)," |
| 2232 | " sum(fprev IS NULL)," |
| 2233 | " froot," |
| @@ -2253,11 +2253,11 @@ | |
| 2253 | " thread.duration," /* 1 */ |
| 2254 | " thread.cnt," /* 2 */ |
| 2255 | " blob.uuid," /* 3 */ |
| 2256 | " substr(event.comment,instr(event.comment,':')+1)," /* 4 */ |
| 2257 | " thread.last," /* 5 */ |
| 2258 | " thread.sticky" /* 6 */ |
| 2259 | " FROM thread, blob, event" |
| 2260 | " WHERE blob.rid=thread.last" |
| 2261 | " AND event.objid=thread.last" |
| 2262 | " ORDER BY 7 DESC, 1;", |
| 2263 | g.perm.ModForum ? "" : "AND y.fpid NOT IN private" /*safe-for-%s*/, |
| @@ -2265,11 +2265,11 @@ | |
| 2265 | iLimit+1, iOfst |
| 2266 | ); |
| 2267 | while( db_step(&q)==SQLITE_ROW ){ |
| 2268 | char *zAge = human_readable_age(db_column_double(&q,0)); |
| 2269 | int nMsg = db_column_int(&q, 2); |
| 2270 | int bSticky = db_column_int(&q, 6); |
| 2271 | const char *zUuid = db_column_text(&q, 3); |
| 2272 | const char *zTitle = db_column_text(&q, 4); |
| 2273 | if( iCnt==0 ){ |
| 2274 | if( iOfst>0 ){ |
| 2275 | @ <h1>Threads at least %s(zAge) old</h1> |
| @@ -2294,11 +2294,11 @@ | |
| 2294 | @ %z(href("%R/forum?x=%d&n=%d",iOfst+iLimit,iLimit))\ |
| 2295 | @ ↓ Older...</a></td></tr> |
| 2296 | fossil_free(zAge); |
| 2297 | break; |
| 2298 | } |
| 2299 | @ <tr%s(bSticky ? " class='sticky'" : "")><td>%h(zAge) ago</td> |
| 2300 | @ <td>%z(href("%R/forumpost/%S",zUuid))%h(zTitle)</a></td> |
| 2301 | @ <td>\ |
| 2302 | if( g.perm.ModForum && moderation_pending(db_column_int(&q,5)) ){ |
| 2303 | @ <span class="modpending">\ |
| 2304 | @ Awaiting Moderator Approval</span><br> |
| 2305 |
| --- src/forum.c | |
| +++ src/forum.c | |
| @@ -2223,11 +2223,11 @@ | |
| 2223 | style_submenu_entry("n","Max:",4,0); |
| 2224 | iOfst = atoi(PD("x","0")); |
| 2225 | iCnt = 0; |
| 2226 | if( db_table_exists("repository","forumpost") ){ |
| 2227 | db_prepare(&q, |
| 2228 | "WITH thread(age,duration,cnt,root,last,pinned) AS (" |
| 2229 | " SELECT" |
| 2230 | " julianday('now') - max(fmtime)," |
| 2231 | " max(fmtime) - min(fmtime)," |
| 2232 | " sum(fprev IS NULL)," |
| 2233 | " froot," |
| @@ -2253,11 +2253,11 @@ | |
| 2253 | " thread.duration," /* 1 */ |
| 2254 | " thread.cnt," /* 2 */ |
| 2255 | " blob.uuid," /* 3 */ |
| 2256 | " substr(event.comment,instr(event.comment,':')+1)," /* 4 */ |
| 2257 | " thread.last," /* 5 */ |
| 2258 | " thread.pinned" /* 6 */ |
| 2259 | " FROM thread, blob, event" |
| 2260 | " WHERE blob.rid=thread.last" |
| 2261 | " AND event.objid=thread.last" |
| 2262 | " ORDER BY 7 DESC, 1;", |
| 2263 | g.perm.ModForum ? "" : "AND y.fpid NOT IN private" /*safe-for-%s*/, |
| @@ -2265,11 +2265,11 @@ | |
| 2265 | iLimit+1, iOfst |
| 2266 | ); |
| 2267 | while( db_step(&q)==SQLITE_ROW ){ |
| 2268 | char *zAge = human_readable_age(db_column_double(&q,0)); |
| 2269 | int nMsg = db_column_int(&q, 2); |
| 2270 | int bPinned = db_column_int(&q, 6); |
| 2271 | const char *zUuid = db_column_text(&q, 3); |
| 2272 | const char *zTitle = db_column_text(&q, 4); |
| 2273 | if( iCnt==0 ){ |
| 2274 | if( iOfst>0 ){ |
| 2275 | @ <h1>Threads at least %s(zAge) old</h1> |
| @@ -2294,11 +2294,11 @@ | |
| 2294 | @ %z(href("%R/forum?x=%d&n=%d",iOfst+iLimit,iLimit))\ |
| 2295 | @ ↓ Older...</a></td></tr> |
| 2296 | fossil_free(zAge); |
| 2297 | break; |
| 2298 | } |
| 2299 | @ <tr%s(bPinned ? " class='pinned'" : "")><td>%h(zAge) ago</td> |
| 2300 | @ <td>%z(href("%R/forumpost/%S",zUuid))%h(zTitle)</a></td> |
| 2301 | @ <td>\ |
| 2302 | if( g.perm.ModForum && moderation_pending(db_column_int(&q,5)) ){ |
| 2303 | @ <span class="modpending">\ |
| 2304 | @ Awaiting Moderator Approval</span><br> |
| 2305 |