Browse Source

update message preview effects, fix feed loading on post

main
ghost 3 years ago
parent
commit
ec00ef7d08
  1. 20
      src/public/css/template/default/module/post.css
  2. 6
      src/public/js/module/post.js

20
src/public/css/template/default/module/post.css

@ -55,14 +55,19 @@
color: #ccd3df; color: #ccd3df;
font-size: 12px; font-size: 12px;
border-top: 1px #4d5666 solid; border-top: 1px #4d5666 solid;
display: none; opacity: 0;
height: 0
}
.modulePost .preview.active {
opacity: 1;
height: auto
} }
.modulePost .preview .title { .modulePost .preview .title {
float: left; position: absolute;
padding: 16px; left: 56px;
width: 78px; top: 16px;
text-align: center;
} }
.modulePost .preview .title i { .modulePost .preview .title i {
@ -70,7 +75,10 @@
} }
.modulePost .preview .text { .modulePost .preview .text {
padding: 16px 16px 16px 90px; padding-left: 82px;
padding-right: 16px;
padding-top: 16px;
padding-bottom: 16px;
} }
.modulePost .button { .modulePost .button {

6
src/public/js/module/post.js

@ -63,10 +63,10 @@ var ModulePost = {
if (response.success) { if (response.success) {
if (response.format == '') { if (response.format == '') {
$('#modulePostPreview').hide(); $('#modulePostPreview').removeClass('active');
$('#modulePostPreview .text').html(''); $('#modulePostPreview .text').html('');
} else { } else {
$('#modulePostPreview').show(); $('#modulePostPreview').addClass('active');
$('#modulePostPreview .text').html(response.format); $('#modulePostPreview .text').html(response.format);
} }
@ -89,7 +89,7 @@ $(document).ready(function() {
// Event listeners // Event listeners
$(document).on('ModulePost.add:success', function(/*event, response*/) { $(document).on('ModulePost.add:success', function(/*event, response*/) {
ModuleFeed.load('#moduleFeed', true); ModuleFeed.load('#moduleFeed', 1, true);
}); });
$('#modulePostMessage').on('keyup', function() { $('#modulePostMessage').on('keyup', function() {

Loading…
Cancel
Save