diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f9ff2f9..fcc50c8f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +Unreleased +========== + +* Improve message completion + 0.51.2 / 2015-09-18 ================== diff --git a/client/index.html b/client/index.html index b774a2a3..100c91d5 100644 --- a/client/index.html +++ b/client/index.html @@ -258,6 +258,15 @@

Notifications

+
+

Other

+
+
+
+ + +
+

About Shout

@@ -278,7 +287,7 @@

About Shout

- +
diff --git a/client/js/shout.js b/client/js/shout.js index c3560284..fd33d78e 100644 --- a/client/js/shout.js +++ b/client/js/shout.js @@ -347,6 +347,7 @@ $(function() { part: true, thumbnails: true, quit: true, + afterComplete: "", }, $.cookie("settings")); for (var i in options) { @@ -358,7 +359,11 @@ $(function() { settings.on("change", "input", function() { var self = $(this); var name = self.attr("name"); - options[name] = self.prop("checked"); + if (self.is(":checkbox")) { + options[name] = self.prop("checked"); + } else { + options[name] = self.val(); + } $.cookie( "settings", options, { @@ -378,6 +383,9 @@ $(function() { if (name === "colors") { chat.toggleClass("no-colors", !self.prop("checked")); } + if (name === "afterComplete") { + initTabCompletion(); + } }).find("input") .trigger("change"); @@ -404,8 +412,14 @@ $(function() { }); var input = $("#input") - .history() - .tab(complete, {hint: false}); + .history(); + + initTabCompletion(); + + function initTabCompletion() { + var settings = $.cookie("settings") || {}; + $("#input").tab(complete, {hint: false, after: settings.afterComplete}); + } var form = $("#form");