Fossil SCM
Normalized the various input-with-label elements to use SPAN wrappers instead of DIV.
Commit
53b31b0814f1baeeea8baf64e99f061519ca2d38a43a00175791ed1b30333566
Parent
a62594e58d3c971…
1 file changed
+6
-6
+6
-6
| --- src/style.c | ||
| +++ src/style.c | ||
| @@ -1307,15 +1307,15 @@ | ||
| 1307 | 1307 | ** element. If isChecked is true, the checkbox gets the "checked" |
| 1308 | 1308 | ** attribute set, else it is not. |
| 1309 | 1309 | ** |
| 1310 | 1310 | ** Resulting structure: |
| 1311 | 1311 | ** |
| 1312 | -** <div class='input-with-label' title={{zTip}} id={{zWrapperId}}> | |
| 1312 | +** <span class='input-with-label' title={{zTip}} id={{zWrapperId}}> | |
| 1313 | 1313 | ** <input type='checkbox' name={{zFieldName}} value={{zValue}} |
| 1314 | 1314 | ** {{isChecked ? " checked : ""}}/> |
| 1315 | 1315 | ** <span>{{zLabel}}</span> |
| 1316 | -** </div> | |
| 1316 | +** </span> | |
| 1317 | 1317 | ** |
| 1318 | 1318 | ** zFieldName, zLabel, and zValue are required. zWrapperId and zTip |
| 1319 | 1319 | ** are optional. |
| 1320 | 1320 | ** |
| 1321 | 1321 | ** Be sure that the input-with-label CSS class is defined sensibly, in |
| @@ -1324,21 +1324,21 @@ | ||
| 1324 | 1324 | */ |
| 1325 | 1325 | void style_labeled_checkbox(const char * zWrapperId, |
| 1326 | 1326 | const char *zFieldName, const char * zLabel, |
| 1327 | 1327 | const char * zValue, const char * zTip, |
| 1328 | 1328 | int isChecked){ |
| 1329 | - CX("<div class='input-with-label'"); | |
| 1329 | + CX("<span class='input-with-label'"); | |
| 1330 | 1330 | if(zTip && *zTip){ |
| 1331 | 1331 | CX(" title='%h'", zTip); |
| 1332 | 1332 | } |
| 1333 | 1333 | if(zWrapperId && *zWrapperId){ |
| 1334 | 1334 | CX(" id='%s'",zWrapperId); |
| 1335 | 1335 | } |
| 1336 | 1336 | CX("><input type='checkbox' name='%s' value='%T'%s/>", |
| 1337 | 1337 | zFieldName, |
| 1338 | 1338 | zValue ? zValue : "", isChecked ? " checked" : ""); |
| 1339 | - CX("<span>%h</span></div>", zLabel); | |
| 1339 | + CX("<span>%h</span></span>", zLabel); | |
| 1340 | 1340 | } |
| 1341 | 1341 | |
| 1342 | 1342 | /* |
| 1343 | 1343 | ** Outputs a SELECT list from a compile-time list of integers. |
| 1344 | 1344 | ** The vargs must be a list of (const char *, int) pairs, terminated |
| @@ -1367,14 +1367,14 @@ | ||
| 1367 | 1367 | ** |
| 1368 | 1368 | ** zTooltip is an optional value for the SELECT's title attribute. |
| 1369 | 1369 | ** |
| 1370 | 1370 | ** The structure of the emitted HTML is: |
| 1371 | 1371 | ** |
| 1372 | -** <div class='input-with-label' title={{zToolTip}} id={{zWrapperId}}> | |
| 1372 | +** <span class='input-with-label' title={{zToolTip}} id={{zWrapperId}}> | |
| 1373 | 1373 | ** <span>{{zLabel}}</span> |
| 1374 | 1374 | ** <select>...</select> |
| 1375 | -** </div> | |
| 1375 | +** </span> | |
| 1376 | 1376 | ** |
| 1377 | 1377 | ** Example: |
| 1378 | 1378 | ** |
| 1379 | 1379 | ** style_select_list_int("my-grapes", "my_grapes", "Grapes", |
| 1380 | 1380 | ** "Select the number of grapes", |
| 1381 | 1381 |
| --- src/style.c | |
| +++ src/style.c | |
| @@ -1307,15 +1307,15 @@ | |
| 1307 | ** element. If isChecked is true, the checkbox gets the "checked" |
| 1308 | ** attribute set, else it is not. |
| 1309 | ** |
| 1310 | ** Resulting structure: |
| 1311 | ** |
| 1312 | ** <div class='input-with-label' title={{zTip}} id={{zWrapperId}}> |
| 1313 | ** <input type='checkbox' name={{zFieldName}} value={{zValue}} |
| 1314 | ** {{isChecked ? " checked : ""}}/> |
| 1315 | ** <span>{{zLabel}}</span> |
| 1316 | ** </div> |
| 1317 | ** |
| 1318 | ** zFieldName, zLabel, and zValue are required. zWrapperId and zTip |
| 1319 | ** are optional. |
| 1320 | ** |
| 1321 | ** Be sure that the input-with-label CSS class is defined sensibly, in |
| @@ -1324,21 +1324,21 @@ | |
| 1324 | */ |
| 1325 | void style_labeled_checkbox(const char * zWrapperId, |
| 1326 | const char *zFieldName, const char * zLabel, |
| 1327 | const char * zValue, const char * zTip, |
| 1328 | int isChecked){ |
| 1329 | CX("<div class='input-with-label'"); |
| 1330 | if(zTip && *zTip){ |
| 1331 | CX(" title='%h'", zTip); |
| 1332 | } |
| 1333 | if(zWrapperId && *zWrapperId){ |
| 1334 | CX(" id='%s'",zWrapperId); |
| 1335 | } |
| 1336 | CX("><input type='checkbox' name='%s' value='%T'%s/>", |
| 1337 | zFieldName, |
| 1338 | zValue ? zValue : "", isChecked ? " checked" : ""); |
| 1339 | CX("<span>%h</span></div>", zLabel); |
| 1340 | } |
| 1341 | |
| 1342 | /* |
| 1343 | ** Outputs a SELECT list from a compile-time list of integers. |
| 1344 | ** The vargs must be a list of (const char *, int) pairs, terminated |
| @@ -1367,14 +1367,14 @@ | |
| 1367 | ** |
| 1368 | ** zTooltip is an optional value for the SELECT's title attribute. |
| 1369 | ** |
| 1370 | ** The structure of the emitted HTML is: |
| 1371 | ** |
| 1372 | ** <div class='input-with-label' title={{zToolTip}} id={{zWrapperId}}> |
| 1373 | ** <span>{{zLabel}}</span> |
| 1374 | ** <select>...</select> |
| 1375 | ** </div> |
| 1376 | ** |
| 1377 | ** Example: |
| 1378 | ** |
| 1379 | ** style_select_list_int("my-grapes", "my_grapes", "Grapes", |
| 1380 | ** "Select the number of grapes", |
| 1381 |
| --- src/style.c | |
| +++ src/style.c | |
| @@ -1307,15 +1307,15 @@ | |
| 1307 | ** element. If isChecked is true, the checkbox gets the "checked" |
| 1308 | ** attribute set, else it is not. |
| 1309 | ** |
| 1310 | ** Resulting structure: |
| 1311 | ** |
| 1312 | ** <span class='input-with-label' title={{zTip}} id={{zWrapperId}}> |
| 1313 | ** <input type='checkbox' name={{zFieldName}} value={{zValue}} |
| 1314 | ** {{isChecked ? " checked : ""}}/> |
| 1315 | ** <span>{{zLabel}}</span> |
| 1316 | ** </span> |
| 1317 | ** |
| 1318 | ** zFieldName, zLabel, and zValue are required. zWrapperId and zTip |
| 1319 | ** are optional. |
| 1320 | ** |
| 1321 | ** Be sure that the input-with-label CSS class is defined sensibly, in |
| @@ -1324,21 +1324,21 @@ | |
| 1324 | */ |
| 1325 | void style_labeled_checkbox(const char * zWrapperId, |
| 1326 | const char *zFieldName, const char * zLabel, |
| 1327 | const char * zValue, const char * zTip, |
| 1328 | int isChecked){ |
| 1329 | CX("<span class='input-with-label'"); |
| 1330 | if(zTip && *zTip){ |
| 1331 | CX(" title='%h'", zTip); |
| 1332 | } |
| 1333 | if(zWrapperId && *zWrapperId){ |
| 1334 | CX(" id='%s'",zWrapperId); |
| 1335 | } |
| 1336 | CX("><input type='checkbox' name='%s' value='%T'%s/>", |
| 1337 | zFieldName, |
| 1338 | zValue ? zValue : "", isChecked ? " checked" : ""); |
| 1339 | CX("<span>%h</span></span>", zLabel); |
| 1340 | } |
| 1341 | |
| 1342 | /* |
| 1343 | ** Outputs a SELECT list from a compile-time list of integers. |
| 1344 | ** The vargs must be a list of (const char *, int) pairs, terminated |
| @@ -1367,14 +1367,14 @@ | |
| 1367 | ** |
| 1368 | ** zTooltip is an optional value for the SELECT's title attribute. |
| 1369 | ** |
| 1370 | ** The structure of the emitted HTML is: |
| 1371 | ** |
| 1372 | ** <span class='input-with-label' title={{zToolTip}} id={{zWrapperId}}> |
| 1373 | ** <span>{{zLabel}}</span> |
| 1374 | ** <select>...</select> |
| 1375 | ** </span> |
| 1376 | ** |
| 1377 | ** Example: |
| 1378 | ** |
| 1379 | ** style_select_list_int("my-grapes", "my_grapes", "Grapes", |
| 1380 | ** "Select the number of grapes", |
| 1381 |