diff --git a/public/css/style.less b/public/css/style.less index 1d5ce86999..cef80c0496 100644 --- a/public/css/style.less +++ b/public/css/style.less @@ -691,4 +691,12 @@ a:hover { text-overflow:ellipsis; overflow: hidden; } +} + +body .navbar .nodebb-inline-block { + display:inline-block; +} + +#right-menu{ + float:right; } \ No newline at end of file diff --git a/public/src/app.js b/public/src/app.js index 911ba94f9b..bcdb98540d 100644 --- a/public/src/app.js +++ b/public/src/app.js @@ -33,11 +33,13 @@ var socket, }); socket.on('disconnect', function(data){ - $('#disconnect-modal').modal('show'); - $('#reload-button').on('click',function(){ - $('#disconnect-modal').modal('hide'); - window.location.reload(); - }); + setTimeout(function() { + $('#disconnect-modal').modal('show'); + $('#reload-button').on('click',function(){ + $('#disconnect-modal').modal('hide'); + window.location.reload(); + }); + }, 500); }); }, async: false @@ -243,12 +245,24 @@ var socket, }; app.edit_post = function(pid) { - var content = document.getElementById('post_content'); - socket.emit('api:posts.edit', { pid: pid, content: content.value }); + var content = $('#post_content'); + + if (content.val().length < 5) { + app.alert({ + title: 'Topic Post Failure', + message: 'You need to write more dude.', + type: 'error', + timeout: 2000 + }); + + return; + } + + socket.emit('api:posts.edit', { pid: pid, content: content.val() }); jQuery(post_window).slideUp(250); $(document.body).removeClass('composing'); - content.value = ''; + content.val(''); } diff --git a/public/templates/header.tpl b/public/templates/header.tpl index cf4984bdbf..93096a053a 100644 --- a/public/templates/header.tpl +++ b/public/templates/header.tpl @@ -28,7 +28,7 @@ - +