Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Normalized the various input-with-label elements to use SPAN wrappers instead of DIV. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | fileedit-ajaxify |
| Files: | files | file ages | folders |
| SHA3-256: |
53b31b0814f1baeeea8baf64e99f0615 |
| User & Date: | stephan 2020-05-07 12:52:42.201 |
Context
|
2020-05-08
| ||
| 12:39 | /fileedit now accepts 'fn' and 'ci' as undocumented aliases for 'filename' resp. 'checkin', for consistency with some other pages. style_emit_script_builtin() now includes a cache-buster on URLs (a prefix of the builtin content's MD5 hash). ... (check-in: 3733293a01 user: stephan tags: fileedit-ajaxify) | |
|
2020-05-07
| ||
| 12:52 | Normalized the various input-with-label elements to use SPAN wrappers instead of DIV. ... (check-in: 53b31b0814 user: stephan tags: fileedit-ajaxify) | |
| 11:12 | doc typo ... (check-in: a62594e58d user: stephan tags: fileedit-ajaxify) | |
Changes
Changes to src/style.c.
| ︙ | ︙ | |||
1305 1306 1307 1308 1309 1310 1311 | ** the optional value for the checkbox. zTip is an optional tooltip, ** which gets set as the "title" attribute of the outermost ** element. If isChecked is true, the checkbox gets the "checked" ** attribute set, else it is not. ** ** Resulting structure: ** | | | | | | 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 |
** the optional value for the checkbox. zTip is an optional tooltip,
** which gets set as the "title" attribute of the outermost
** element. If isChecked is true, the checkbox gets the "checked"
** attribute set, else it is not.
**
** Resulting structure:
**
** <span class='input-with-label' title={{zTip}} id={{zWrapperId}}>
** <input type='checkbox' name={{zFieldName}} value={{zValue}}
** {{isChecked ? " checked : ""}}/>
** <span>{{zLabel}}</span>
** </span>
**
** zFieldName, zLabel, and zValue are required. zWrapperId and zTip
** are optional.
**
** Be sure that the input-with-label CSS class is defined sensibly, in
** particular, having its display:inline-block is useful for alignment
** purposes.
*/
void style_labeled_checkbox(const char * zWrapperId,
const char *zFieldName, const char * zLabel,
const char * zValue, const char * zTip,
int isChecked){
CX("<span class='input-with-label'");
if(zTip && *zTip){
CX(" title='%h'", zTip);
}
if(zWrapperId && *zWrapperId){
CX(" id='%s'",zWrapperId);
}
CX("><input type='checkbox' name='%s' value='%T'%s/>",
zFieldName,
zValue ? zValue : "", isChecked ? " checked" : "");
CX("<span>%h</span></span>", zLabel);
}
/*
** Outputs a SELECT list from a compile-time list of integers.
** The vargs must be a list of (const char *, int) pairs, terminated
** with a single NULL. Each pair is interpreted as...
**
|
| ︙ | ︙ | |||
1365 1366 1367 1368 1369 1370 1371 | ** zLabel is an optional string to use as a "label" for the element ** (see below). ** ** zTooltip is an optional value for the SELECT's title attribute. ** ** The structure of the emitted HTML is: ** | | | | 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 |
** zLabel is an optional string to use as a "label" for the element
** (see below).
**
** zTooltip is an optional value for the SELECT's title attribute.
**
** The structure of the emitted HTML is:
**
** <span class='input-with-label' title={{zToolTip}} id={{zWrapperId}}>
** <span>{{zLabel}}</span>
** <select>...</select>
** </span>
**
** Example:
**
** style_select_list_int("my-grapes", "my_grapes", "Grapes",
** "Select the number of grapes",
** atoi(PD("my_field","0")),
** "", 1, "2", 2, "Three", 3,
|
| ︙ | ︙ |