X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fresources%2Fstatic%2Fjavascript%2Fsone.js;h=9aa0b8219168935b14f8293583ca024e0661422b;hb=7815943b9ecc1199e11dd8be9736d6f3e892118e;hp=ad23acdb08223e4dd6d8828771e5e0a77d201c72;hpb=dd744d086e479089ff12c3e53d9d7e8a07e2f139;p=Sone.git diff --git a/src/main/resources/static/javascript/sone.js b/src/main/resources/static/javascript/sone.js index ad23acd..9aa0b82 100644 --- a/src/main/resources/static/javascript/sone.js +++ b/src/main/resources/static/javascript/sone.js @@ -830,6 +830,17 @@ function createNotification(id, text, dismissable) { return notification; } +/** + * Shows the details of the notification with the given ID. + * + * @param notificationId + * The ID of the notification + */ +function showNotificationDetails(notificationId) { + $("#sone .notification#" + notificationId + " .text").show(); + $("#sone .notification#" + notificationId + " .short-text").hide(); +} + // // EVERYTHING BELOW HERE IS EXECUTED AFTER LOADING THE PAGE // @@ -842,7 +853,7 @@ $(document).ready(function() { getTranslation("WebInterface.DefaultText.StatusUpdate", function(defaultText) { registerInputTextareaSwap("#sone #update-status .status-input", defaultText, "text", false, false); $("#sone #update-status").submit(function() { - if (!$(this).find(":input.default").hasAttr("disabled")) { + if ($(this).find(":input.default:enabled").length > 0) { return false; } text = $(this).find(":input:enabled").val();