aboutsummaryrefslogtreecommitdiff
path: root/app/view/templates
diff options
context:
space:
mode:
authorn-peugnet <n.peugnet@free.fr>2020-04-28 18:08:35 +0200
committern-peugnet <n.peugnet@free.fr>2020-04-28 18:08:35 +0200
commit5b1457835be6c00a7d108537ecc88d3d85d48d51 (patch)
tree5db70e04ce18ba9b15bdd69e85e8e483585e13ae /app/view/templates
parent877e0570ea7eb94e9698aab9147104f5251f55c9 (diff)
downloadwcms-5b1457835be6c00a7d108537ecc88d3d85d48d51.tar.gz
wcms-5b1457835be6c00a7d108537ecc88d3d85d48d51.zip
feat: select all for code inputs
This enable the "select all" feature for `input.select-all` element. input elements are used because these are the only one with the `select()` method. To obtain the same rendering as before the readonly attribute and the class `code` have been added to these elements. @vincent-peugnet: make sure to use this element for future select-all Closes #107
Diffstat (limited to 'app/view/templates')
-rw-r--r--app/view/templates/homemenu.php2
-rw-r--r--app/view/templates/media.php2
-rw-r--r--app/view/templates/mediamenu.php2
3 files changed, 3 insertions, 3 deletions
diff --git a/app/view/templates/homemenu.php b/app/view/templates/homemenu.php
index f3564f8..d58e91e 100644
--- a/app/view/templates/homemenu.php
+++ b/app/view/templates/homemenu.php
@@ -235,7 +235,7 @@
<input type="submit" value="generate">
</form>
<?php if(!empty($optlist)) { ?>
- <code><?= $optlist->getcode() ?></code>
+ <input readonly class="code select-all" value="<?= $optlist->getcode() ?>" />
<?php } ?>
</div>
</details>
diff --git a/app/view/templates/media.php b/app/view/templates/media.php
index 9901b8e..faa1dd3 100644
--- a/app/view/templates/media.php
+++ b/app/view/templates/media.php
@@ -98,7 +98,7 @@ $this->layout('layout', ['title' => 'media', 'stylesheets' => [$css . 'home.css'
<td><?= $media->uid('name') ?></td>
<td><code><?= $media->permissions() ?></code></td>
<td><?= $media->surface() ?></td>
- <td class="code"><code><?= $media->getcode() ?></code></td>
+ <td><input readonly class="code select-all" value="<?= $media->getcode() ?>" /></td>
</tr>
<?php
}
diff --git a/app/view/templates/mediamenu.php b/app/view/templates/mediamenu.php
index 2a33b65..b64bd25 100644
--- a/app/view/templates/mediamenu.php
+++ b/app/view/templates/mediamenu.php
@@ -73,7 +73,7 @@
<p>Use this code to print the content of the actual folder in a page</p>
- <code><?= $mediaopt->getcode() ?></code>
+ <input readonly class="code select-all" value="<?= $mediaopt->getcode() ?>" />
</div>
</details>