MDL-42434 mod_chat: display the whole help text
authorSara Arjona <sara@moodle.com>
Thu, 20 Aug 2020 12:23:20 +0000 (14:23 +0200)
committerVictor Deniz Falcon <victor@moodle.com>
Thu, 20 Aug 2020 22:45:56 +0000 (23:45 +0100)
When testing this issue was raised that the help text was cut-off.
This patch should fix this issue changing the placement from
right/left to top.

mod/chat/gui_ajax/module.js

index 06819d8..231392f 100644 (file)
@@ -126,6 +126,12 @@ M.mod_chat_ajax.init = function(Y, cfg) {
                 this.moveTo((e.pageX - 20), (e.pageY - 20));
                 this.show();
             }, this.thememenu);
+
+            // Set the data-placement for the help-icon to display all the content.
+            this.helpicon = Y.one('#button-send + a');
+            this.dataset = this.helpicon.get('dataset');
+            this.dataset.placement = 'top';
+            this.helpicon.set('dataset', this.dataset);
         },
 
         append_message : function(key, message, row) {