| @ -33,7 +33,8 @@ export default class MUCPollView extends CustomElement { | |||||||
|     return tplPoll(this, currentPoll) |     return tplPoll(this, currentPoll) | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   toggle () { |   toggle (ev) { | ||||||
|  |     ev.preventDefault() | ||||||
|     this.collapsed = !this.collapsed |     this.collapsed = !this.collapsed | ||||||
|   } |   } | ||||||
|  |  | ||||||
|  | |||||||
| @ -30,6 +30,10 @@ | |||||||
|       p.livechat-poll-question { |       p.livechat-poll-question { | ||||||
|         text-align: center; |         text-align: center; | ||||||
|         font-weight: bold; |         font-weight: bold; | ||||||
|  |  | ||||||
|  |         span { | ||||||
|  |           cursor: pointer; // because a click toggles | ||||||
|  |         } | ||||||
|       } |       } | ||||||
|  |  | ||||||
|       p.livechat-poll-instructions { |       p.livechat-poll-instructions { | ||||||
| @ -120,6 +124,11 @@ body[livechat-viewer-mode="on"] { | |||||||
|         // stop showing poll when over in readonly mode |         // stop showing poll when over in readonly mode | ||||||
|         display: none !important; |         display: none !important; | ||||||
|       } |       } | ||||||
|  |  | ||||||
|  |       p.livechat-poll-instructions { | ||||||
|  |         // No need for instruction in readonly mode | ||||||
|  |         display: none !important; | ||||||
|  |       } | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
| } | } | ||||||
|  | |||||||
| @ -104,7 +104,9 @@ export function tplPoll (el, currentPoll) { | |||||||
|               size="1em"></converse-icon> |               size="1em"></converse-icon> | ||||||
|           </button>` |           </button>` | ||||||
|       } |       } | ||||||
|       ${currentPoll.question} |       <span @click=${el.toggle}> | ||||||
|  |         ${currentPoll.question} | ||||||
|  |       </span> | ||||||
|     </p> |     </p> | ||||||
|     ${ |     ${ | ||||||
|       el.collapsed |       el.collapsed | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user