diff options
| author | polo <ordipolo@gmx.fr> | 2025-10-29 12:08:28 +0100 |
|---|---|---|
| committer | polo <ordipolo@gmx.fr> | 2025-10-29 12:08:28 +0100 |
| commit | 822f526fd7f4e89043e64b435961720b622bdb6e (patch) | |
| tree | 2c4bb2a653052f9dc76858db2a2f9f1d0d0a031a /public | |
| parent | f653506421ee8e2c46c78e93d28ee2418a1d399d (diff) | |
| download | cms-822f526fd7f4e89043e64b435961720b622bdb6e.tar.gz cms-822f526fd7f4e89043e64b435961720b622bdb6e.tar.bz2 cms-822f526fd7f4e89043e64b435961720b622bdb6e.zip | |
gestion réseaux sociaux présents/absents, partie 1
Diffstat (limited to 'public')
| -rw-r--r-- | public/css/head.css | 5 | ||||
| -rw-r--r-- | public/js/Input.js | 12 |
2 files changed, 10 insertions, 7 deletions
diff --git a/public/css/head.css b/public/css/head.css index 3d9d6ca..b5f1bd1 100644 --- a/public/css/head.css +++ b/public/css/head.css | |||
| @@ -90,11 +90,6 @@ header a | |||
| 90 | #header_social_content img | 90 | #header_social_content img |
| 91 | { | 91 | { |
| 92 | width: 28px; | 92 | width: 28px; |
| 93 | |||
| 94 | } | ||
| 95 | #header_social_content a img | ||
| 96 | { | ||
| 97 | width: 28px; | ||
| 98 | background-color: #ffffffb3; | 93 | background-color: #ffffffb3; |
| 99 | border-radius: 50%; | 94 | border-radius: 50%; |
| 100 | } | 95 | } |
diff --git a/public/js/Input.js b/public/js/Input.js index 6c5af10..54872d1 100644 --- a/public/js/Input.js +++ b/public/js/Input.js | |||
| @@ -76,11 +76,19 @@ class InputText extends InputToggler{ | |||
| 76 | 76 | ||
| 77 | class InputTextSocialNetwork extends InputText{ | 77 | class InputTextSocialNetwork extends InputText{ |
| 78 | open(){ | 78 | open(){ |
| 79 | this.input_elem.value = this.content_elem.parentNode.href; | 79 | const elem_parent = this.content_elem.parentNode; |
| 80 | if(elem_parent.tagName.toLowerCase() === 'a'){ | ||
| 81 | this.input_elem.value = elem_parent.href; | ||
| 82 | } | ||
| 80 | super.open(); | 83 | super.open(); |
| 81 | } | 84 | } |
| 82 | onSuccess(data){ | 85 | onSuccess(data){ |
| 83 | this.content_elem.parentNode.href = this.input_elem.value; | 86 | if(this.input_elem.value){ |
| 87 | this.content_elem.parentNode.href = this.input_elem.value; | ||
| 88 | } | ||
| 89 | else{ | ||
| 90 | this.content_elem.parentNode.removeAttribute('href'); | ||
| 91 | } | ||
| 84 | } | 92 | } |
| 85 | } | 93 | } |
| 86 | 94 | ||
