Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/VincentTam/huginn.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Tam <sere@live.hk>2019-05-21 15:56:40 +0300
committerVincent Tam <sere@live.hk>2019-05-21 16:00:28 +0300
commit0aaf1ec507c1dbf87a08be1f029f030c7c4284c8 (patch)
tree3199774521edc4396316dbbadee1eba019372307
parent4c9b17ef908908e292dec3119b8c04aab9d68896 (diff)
Fixé le bouton "Reset"
Grâce à https://stackoverflow.com/a/193787/3184351
-rw-r--r--assets/css/staticman.css11
-rw-r--r--assets/js/staticman.js6
2 files changed, 11 insertions, 6 deletions
diff --git a/assets/css/staticman.css b/assets/css/staticman.css
index 9581eb8..5c41c99 100644
--- a/assets/css/staticman.css
+++ b/assets/css/staticman.css
@@ -9,16 +9,17 @@
.staticman-comments input {
margin: .3rem 0;
- padding:.4rem .8rem;
+ padding: .4rem .8rem;
border: .1rem solid #768294;
- border-radius:3px;
- background-color:#fff;
+ border-radius: 3px;
+ background-color: #fff;
width: 60%;
max-width: 95%;
display: block;
}
.staticman-comments input[type="submit"], .staticman-comments input[type="reset"] {
+ background-color: #ebeffa;
width: auto;
display: inline;
}
@@ -29,9 +30,9 @@
.staticman-comments textarea {
margin: .3rem 0;
- padding:.2rem .4rem;
+ padding: .2rem .4rem;
border: .1rem solid #768294;
- border-radius:2px;
+ border-radius: 2px;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
diff --git a/assets/js/staticman.js b/assets/js/staticman.js
index efc5aad..3ea1e98 100644
--- a/assets/js/staticman.js
+++ b/assets/js/staticman.js
@@ -43,7 +43,11 @@ $(document).ready(function() {
}
function clearForm() {
- $('.js-form input:not(.button)').val(''); // empty all text & hidden fields
+ $('.js-form input')
+ .filter(function() {
+ return this.name.match(/^fields\[.*\]$/);
+ })
+ .val(''); // empty all text & hidden fields
$('.js-form textarea').val(''); // empty text area
$('.js-form .reply-notice-text').text(''); // reset reply target
$('.js-form .reply-notice').addClass('hidden'); // hide reply target display