automatically setup checkboxes via js utility
This commit is contained in:
parent
0b62845a8d
commit
d48b335cb2
@ -66,7 +66,7 @@ headedRowSelector toExternal fromExternal attrs colonnade tdata = do
|
||||
-- TODO: move this to a *.hamlet file
|
||||
[whamlet|
|
||||
<label style="display: block">
|
||||
<input type=checkbox uw-checkbox name=#{name} value=#{toPathPiece extId} *{attributes} :isRight val:checked>
|
||||
<input type=checkbox name=#{name} value=#{toPathPiece extId} *{attributes} :isRight val:checked>
|
||||
|]
|
||||
|
||||
selectionIdent <- newFormIdent
|
||||
|
||||
@ -76,6 +76,10 @@
|
||||
}
|
||||
|
||||
if (utilInstance) {
|
||||
if (DEBUG_MODE > 2) {
|
||||
console.info('Got utility instance for utility "' + util.name + '"', { utilInstance });
|
||||
}
|
||||
|
||||
activeUtilInstances.push(utilInstance);
|
||||
}
|
||||
});
|
||||
|
||||
@ -130,16 +130,16 @@
|
||||
* Checkbox Utility
|
||||
* wraps native checkbox
|
||||
*
|
||||
* Attribute: uw-checkbox
|
||||
* (element must be an input of type='checkbox')
|
||||
* Attribute: (none)
|
||||
* (element must be an input of type="checkbox")
|
||||
*
|
||||
* Example usage:
|
||||
* <input type='checkbox' uw-checkbox>
|
||||
* <input type="checkbox">
|
||||
*
|
||||
*/
|
||||
|
||||
var CHECKBOX_UTIL_NAME = 'checkbox';
|
||||
var CHECKBOX_UTIL_SELECTOR = 'input[type="checkbox"][uw-checkbox]';
|
||||
var CHECKBOX_UTIL_SELECTOR = 'input[type="checkbox"]';
|
||||
|
||||
var CHECKBOX_CLASS = 'checkbox';
|
||||
var CHECKBOX_INITIALIZED_CLASS = 'checkbox--initialized';
|
||||
|
||||
@ -6,7 +6,7 @@ $newline never
|
||||
<li>
|
||||
<div .file-container>
|
||||
<label for=#{fuiHtmlId}>#{fuiTitle}
|
||||
<input type=checkbox uw-checkbox id=#{fuiHtmlId} name=#{fieldName} :fuiChecked:checked value=#{toPathPiece fuiId}>
|
||||
<input type=checkbox id=#{fuiHtmlId} name=#{fieldName} :fuiChecked:checked value=#{toPathPiece fuiId}>
|
||||
|
||||
<div .file-input__info>
|
||||
_{MsgPreviouslyUploadedDeletionInfo}
|
||||
@ -21,7 +21,7 @@ $# new files
|
||||
|
||||
<div .file-input__unpack>
|
||||
<label for=#{fieldId}_zip>ZIPs automatisch entpacken
|
||||
<input type=checkbox uw-checkbox id=#{fieldId}_zip name=#{fieldName} value=#{unpackZips}>
|
||||
<input type=checkbox id=#{fieldId}_zip name=#{fieldName} value=#{unpackZips}>
|
||||
<div class="tooltip">
|
||||
<div class="tooltip__handle">
|
||||
<div class="tooltip__content">Entpackt hochgeladene Zip-Dateien (*.zip) automatisch und fügt den Inhalt dem Stamm-Verzeichnis der Abgabe hinzu.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user