diff --git a/engine/lib/internal/template/js/wall.js b/engine/lib/internal/template/js/wall.js index fe3562e9..d803f76b 100644 --- a/engine/lib/internal/template/js/wall.js +++ b/engine/lib/internal/template/js/wall.js @@ -21,6 +21,7 @@ ls.wall = (function ($) { if (result.bStateError) { ls.msg.error(null, result.sMsg); } else { + $('.js-wall-reply-parent-text').val(''); this.loadNew(); ls.hook.run('ls_wall_add_after',[sText, iPid, result]); } @@ -28,18 +29,17 @@ ls.wall = (function ($) { return false; }; - this.addReply = function(sText) { + this.addReply = function(sText, iPid) { var url = aRouter['profile']+this.options.login+'/wall/add/'; - var params = {sText: sText, iPid: this.iIdForReply}; + var params = {sText: sText, iPid: iPid}; '*addReplyBefore*'; '*/addReplyBefore*'; ls.ajax(url, params, function(result) { if (result.bStateError) { ls.msg.error(null, result.sMsg); } else { - $('#wall-reply-text').val(''); - $('#wall-reply-form').hide(); - this.loadReplyNew(this.iIdForReply); - ls.hook.run('ls_wall_addreply_after',[sText, this.iIdForReply, result]); + $('.js-wall-reply-text').val(''); + this.loadReplyNew(iPid); + ls.hook.run('ls_wall_addreply_after',[sText, iPid, result]); } }.bind(this)); return false; @@ -154,14 +154,12 @@ ls.wall = (function ($) { }; this.toggleReply = function(iId) { - var reply=$('#wall-reply-form'); - if (iId==this.iIdForReply) { - reply.toggle(); - } else { - reply.insertAfter($('#wall-button-reply-'+iId)); - reply.show(); - this.iIdForReply=iId; - } + $('#wall-item-' + iId + ' .wall-submit-reply').toggle(); + return false; + }; + + this.expandReply = function(iId) { + $('#wall-item-' + iId + ' .wall-submit-reply').addClass('active'); return false; }; @@ -172,4 +170,15 @@ ls.wall = (function ($) { }; return this; -}).call(ls.wall || {},jQuery); \ No newline at end of file +}).call(ls.wall || {},jQuery); + + +jQuery(document).ready(function($){ + $(document).click(function() { + $('.wall-submit-reply.active').removeClass('active'); + }); + + $('body').on("click", ".wall-submit-reply", function(e) { + e.stopPropagation(); + }); +}); \ No newline at end of file diff --git a/templates/skin/developer-jquery/actions/ActionProfile/wall.tpl b/templates/skin/developer-jquery/actions/ActionProfile/wall.tpl index e0c53f0e..62de9be9 100644 --- a/templates/skin/developer-jquery/actions/ActionProfile/wall.tpl +++ b/templates/skin/developer-jquery/actions/ActionProfile/wall.tpl @@ -19,7 +19,7 @@
@@ -35,11 +35,5 @@ {/if} - - - {include file='footer.tpl'} \ No newline at end of file diff --git a/templates/skin/developer-jquery/actions/ActionProfile/wall_items.tpl b/templates/skin/developer-jquery/actions/ActionProfile/wall_items.tpl index 04449983..c0e4650a 100644 --- a/templates/skin/developer-jquery/actions/ActionProfile/wall_items.tpl +++ b/templates/skin/developer-jquery/actions/ActionProfile/wall_items.tpl @@ -15,9 +15,11 @@ {$oWall->getText()} --
- -+
+ +{$aLang.block_blog_info_note_text}
+{$aLang.block_blog_info_note_text}
++ {$aLang.stream_block_config_append}
+ + {if count($aStreamSubscribedUsers)} +{$aLang.stream_no_subscribed_users}
+ {/if} +- {$aLang.userfeed_block_users_append}
++ {$aLang.userfeed_block_users_append}
+ + {if count($aUserfeedSubscribedUsers)} +
{$iCountComment} {$iCountComment|declension:$aLang.comment_declension:'russian'}
+ + {if $bAllowSubscribe and $oUserCurrent} + getStatus()}checked="checked"{/if} type="checkbox" id="comment_subscribe" class="input-checkbox" onchange="ls.subscribe.toggle('{$sTargetType}_new_comment','{$iTargetId}','',this.checked);"> + + {/if} +