Fossil SCM

Normalized the various input-with-label elements to use SPAN wrappers instead of DIV.

stephan 2020-05-07 12:52 fileedit-ajaxify
Commit 53b31b0814f1baeeea8baf64e99f061519ca2d38a43a00175791ed1b30333566
1 file changed +6 -6
+6 -6
--- src/style.c
+++ src/style.c
@@ -1307,15 +1307,15 @@
13071307
** element. If isChecked is true, the checkbox gets the "checked"
13081308
** attribute set, else it is not.
13091309
**
13101310
** Resulting structure:
13111311
**
1312
-** <div class='input-with-label' title={{zTip}} id={{zWrapperId}}>
1312
+** <span class='input-with-label' title={{zTip}} id={{zWrapperId}}>
13131313
** <input type='checkbox' name={{zFieldName}} value={{zValue}}
13141314
** {{isChecked ? " checked : ""}}/>
13151315
** <span>{{zLabel}}</span>
1316
-** </div>
1316
+** </span>
13171317
**
13181318
** zFieldName, zLabel, and zValue are required. zWrapperId and zTip
13191319
** are optional.
13201320
**
13211321
** Be sure that the input-with-label CSS class is defined sensibly, in
@@ -1324,21 +1324,21 @@
13241324
*/
13251325
void style_labeled_checkbox(const char * zWrapperId,
13261326
const char *zFieldName, const char * zLabel,
13271327
const char * zValue, const char * zTip,
13281328
int isChecked){
1329
- CX("<div class='input-with-label'");
1329
+ CX("<span class='input-with-label'");
13301330
if(zTip && *zTip){
13311331
CX(" title='%h'", zTip);
13321332
}
13331333
if(zWrapperId && *zWrapperId){
13341334
CX(" id='%s'",zWrapperId);
13351335
}
13361336
CX("><input type='checkbox' name='%s' value='%T'%s/>",
13371337
zFieldName,
13381338
zValue ? zValue : "", isChecked ? " checked" : "");
1339
- CX("<span>%h</span></div>", zLabel);
1339
+ CX("<span>%h</span></span>", zLabel);
13401340
}
13411341
13421342
/*
13431343
** Outputs a SELECT list from a compile-time list of integers.
13441344
** The vargs must be a list of (const char *, int) pairs, terminated
@@ -1367,14 +1367,14 @@
13671367
**
13681368
** zTooltip is an optional value for the SELECT's title attribute.
13691369
**
13701370
** The structure of the emitted HTML is:
13711371
**
1372
-** <div class='input-with-label' title={{zToolTip}} id={{zWrapperId}}>
1372
+** <span class='input-with-label' title={{zToolTip}} id={{zWrapperId}}>
13731373
** <span>{{zLabel}}</span>
13741374
** <select>...</select>
1375
-** </div>
1375
+** </span>
13761376
**
13771377
** Example:
13781378
**
13791379
** style_select_list_int("my-grapes", "my_grapes", "Grapes",
13801380
** "Select the number of grapes",
13811381
--- 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

Keyboard Shortcuts

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