mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-07-02 22:45:02 +03:00
фиксы по jquery-шаблонам
This commit is contained in:
parent
6a498e00fd
commit
65ea1d41e4
|
@ -64,13 +64,13 @@ ls.comments = (function ($) {
|
|||
this.load(targetId, targetType, result.sCommentId, true);
|
||||
}
|
||||
}.bind(this));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// Активирует форму
|
||||
this.enableFormComment = function() {
|
||||
$('#form_comment_text').removeClass(this.options.classes.form_loader).attr('readonly',false);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// Показывает/скрывает форму комментирования
|
||||
|
@ -97,7 +97,7 @@ ls.comments = (function ($) {
|
|||
tinyMCE.execCommand('mceAddControl',true,'form_comment_text');
|
||||
}
|
||||
if (!bNoFocus) $('#form_comment_text').focus();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// Подгружает новые комментарии
|
||||
|
@ -163,7 +163,7 @@ ls.comments = (function ($) {
|
|||
this.checkFolding();
|
||||
}
|
||||
}.bind(this));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// Вставка комментария
|
||||
|
@ -175,7 +175,7 @@ ls.comments = (function ($) {
|
|||
$('#comments').append(newComment);
|
||||
}
|
||||
ls.hook.run('ls_comment_inject_after',arguments,newComment);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// Удалить/восстановить комментарий
|
||||
|
@ -200,18 +200,20 @@ ls.comments = (function ($) {
|
|||
$(obj).text(result.sTextToggle);
|
||||
}
|
||||
}.bind(this));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// Предпросмотр комментария
|
||||
this.preview = function() {
|
||||
this.preview = function(divPreview) {
|
||||
var divPreview = divPreview ? divPreview : 'comment_preview_'+this.iCurrentShowFormComment;
|
||||
ls.debug(divPreview);
|
||||
if (this.options.wysiwyg) {
|
||||
$("#form_comment_text").val(tinyMCE.activeEditor.getContent());
|
||||
}
|
||||
if ($("#form_comment_text").val() == '') return;
|
||||
$("#comment_preview_"+this.iCurrentShowFormComment).show();
|
||||
ls.tools.textPreview('form_comment_text', false, 'comment_preview_'+this.iCurrentShowFormComment);
|
||||
}
|
||||
$("#"+divPreview).show();
|
||||
ls.tools.textPreview('form_comment_text', false, divPreview);
|
||||
};
|
||||
|
||||
|
||||
// Устанавливает число новых комментариев
|
||||
|
@ -221,7 +223,7 @@ ls.comments = (function ($) {
|
|||
} else {
|
||||
$('#new_comments_counter').text(0).hide();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// Вычисляет кол-во новых комментариев
|
||||
|
@ -231,7 +233,7 @@ ls.comments = (function ($) {
|
|||
$.each(aCommentsNew,function(k,v){
|
||||
this.aCommentNew.push(parseInt($(v).attr('id').replace('comment_id_','')));
|
||||
}.bind(this));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// Переход к следующему комментарию
|
||||
|
@ -243,7 +245,7 @@ ls.comments = (function ($) {
|
|||
this.aCommentNew.shift();
|
||||
}
|
||||
this.setCountNewComment(this.aCommentNew.length);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// Прокрутка к комментарию
|
||||
|
@ -255,7 +257,7 @@ ls.comments = (function ($) {
|
|||
}
|
||||
$('#comment_id_'+idComment).addClass(this.options.classes.comment_current);
|
||||
this.iCurrentViewComment=idComment;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// Прокрутка к родительскому комментарию
|
||||
|
@ -270,7 +272,7 @@ ls.comments = (function ($) {
|
|||
});
|
||||
this.scrollToComment(pid);
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// Сворачивание комментариев
|
||||
|
@ -286,27 +288,27 @@ ls.comments = (function ($) {
|
|||
}
|
||||
});
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
this.expandComment = function(folding) {
|
||||
$(folding).removeClass("folded").parent().nextAll(".comment-wrapper").show();
|
||||
}
|
||||
};
|
||||
|
||||
this.collapseComment = function(folding) {
|
||||
$(folding).addClass("folded").parent().nextAll(".comment-wrapper").hide();
|
||||
}
|
||||
};
|
||||
|
||||
this.expandCommentAll = function() {
|
||||
$.each($(".folding"),function(k,v){
|
||||
this.expandComment(v);
|
||||
}.bind(this))
|
||||
}
|
||||
}.bind(this));
|
||||
};
|
||||
|
||||
this.collapseCommentAll = function() {
|
||||
$.each($(".folding"),function(k,v){
|
||||
this.collapseComment(v);
|
||||
}.bind(this))
|
||||
}
|
||||
}.bind(this));
|
||||
};
|
||||
|
||||
this.init = function() {
|
||||
this.initEvent();
|
||||
|
@ -318,7 +320,7 @@ ls.comments = (function ($) {
|
|||
this.options.wysiwyg = Boolean(BLOG_USE_TINYMCE && tinyMCE);
|
||||
}
|
||||
ls.hook.run('ls_comments_init_after',[],this);
|
||||
}
|
||||
};
|
||||
|
||||
this.initEvent = function() {
|
||||
$('#form_comment_text').bind('keyup', function(e) {
|
||||
|
@ -338,7 +340,7 @@ ls.comments = (function ($) {
|
|||
}
|
||||
}.bind(this));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
return this;
|
||||
}).call(ls.comments || {},jQuery);
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<td>{$aLang.plugins_plugin_name}</td>
|
||||
<td>{$aLang.plugins_plugin_version}</td>
|
||||
<td>{$aLang.plugins_plugin_author}</td>
|
||||
<td>{$aLang.plugins_plugin_settings}</td>
|
||||
<td>{$aLang.plugins_plugin_settings}</td>
|
||||
<td>{$aLang.plugins_plugin_action}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
|
@ -40,7 +40,7 @@
|
|||
</table>
|
||||
|
||||
<input type="hidden" name="security_ls_key" value="{$LIVESTREET_SECURITY_KEY}" />
|
||||
<input type="submit" name="submit_plugins_del" value="{$aLang.plugins_submit_delete}" onclick="return ($$('.form_plugins_checkbox:checked').length==0)?false:confirm('{$aLang.plugins_delete_confirm}');" />
|
||||
<input type="submit" name="submit_plugins_del" value="{$aLang.plugins_submit_delete}" onclick="return (jQuery('.form_plugins_checkbox:checked').size()==0)?false:confirm('{$aLang.plugins_delete_confirm}');" />
|
||||
</form>
|
||||
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
</tbody>
|
||||
</table>
|
||||
|
||||
<input type="submit" name="submit_talk_del" value="{$aLang.talk_inbox_delete}" onclick="return ($('.form_talks_checkbox:checked').length==0)?false:confirm('{$aLang.talk_inbox_delete_confirm}');" />
|
||||
<input type="submit" name="submit_talk_del" value="{$aLang.talk_inbox_delete}" onclick="return (jQuery('.form_talks_checkbox:checked').size()==0)?false:confirm('{$aLang.talk_inbox_delete_confirm}');" />
|
||||
</form>
|
||||
|
||||
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
{if $sAction=='profile'}
|
||||
<ul class="sub-menu">
|
||||
<li {if $aParams[0]=='whois' or $aParams[0]==''}class="active"{/if}><a href="{$oUserProfile->getUserWebPath()}">{$aLang.user_menu_profile_whois}</a></li>
|
||||
<li {if $aParams[0]=='favourites' and $aParams[1]==''}class="active"{/if}><a href="{router page='profile'}{$oUserProfile->getLogin()}/favourites/">{$aLang.user_menu_profile_favourites}</a>{if $iCountTopicFavourite} ({$iCountTopicFavourite}){/if}</li>
|
||||
<li {if $aParams[1]=='comments'}class="active"{/if}><a href="{router page='profile'}{$oUserProfile->getLogin()}/favourites/comments/">{$aLang.user_menu_profile_favourites_comments}</a>{if $iCountCommentFavourite} ({$iCountCommentFavourite}){/if}</li>
|
||||
<li {if $aParams[0]=='favourites' and $aParams[1]==''}class="active"{/if}><a href="{$oUserProfile->getUserWebPath()}favourites/">{$aLang.user_menu_profile_favourites}</a>{if $iCountTopicFavourite} ({$iCountTopicFavourite}){/if}</li>
|
||||
<li {if $aParams[1]=='comments'}class="active"{/if}><a href="{$oUserProfile->getUserWebPath()}favourites/comments/">{$aLang.user_menu_profile_favourites_comments}</a>{if $iCountCommentFavourite} ({$iCountCommentFavourite}){/if}</li>
|
||||
{hook run='menu_profile_profile_item'}
|
||||
</ul>
|
||||
{/if}
|
||||
|
|
|
@ -29,11 +29,11 @@
|
|||
{if !$oTopic->getUserQuestionIsVote()}
|
||||
<ul class="poll-vote">
|
||||
{foreach from=$oTopic->getQuestionAnswers() key=key item=aAnswer}
|
||||
<li><label><input type="radio" id="topic_answer_{$oTopic->getId()}_{$key}" name="topic_answer_{$oTopic->getId()}" value="{$key}" onchange="$('#topic_answer_{$oTopic->getId()}_value').val($(this).val());" /> {$aAnswer.text|escape:'html'}</label></li>
|
||||
<li><label><input type="radio" id="topic_answer_{$oTopic->getId()}_{$key}" name="topic_answer_{$oTopic->getId()}" value="{$key}" onchange="jQuery('#topic_answer_{$oTopic->getId()}_value').val(jQuery(this).val());" /> {$aAnswer.text|escape:'html'}</label></li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
|
||||
<input type="submit" value="{$aLang.topic_question_vote}" onclick="ls.poll.vote({$oTopic->getId()},$('#topic_answer_{$oTopic->getId()}_value').val());" />
|
||||
<input type="submit" value="{$aLang.topic_question_vote}" onclick="ls.poll.vote({$oTopic->getId()},jQuery('#topic_answer_{$oTopic->getId()}_value').val());" />
|
||||
<input type="submit" value="{$aLang.topic_question_abstain}" onclick="ls.poll.vote({$oTopic->getId()},-1)" />
|
||||
<input type="hidden" id="topic_answer_{$oTopic->getId()}_value" value="-1" />
|
||||
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
{if $sAction=='profile'}
|
||||
<ul class="sub-menu">
|
||||
<li {if $aParams[0]=='whois' or $aParams[0]==''}class="active"{/if}><a href="{$oUserProfile->getUserWebPath()}">{$aLang.user_menu_profile_whois}</a></li>
|
||||
<li {if $aParams[0]=='favourites' and $aParams[1]==''}class="active"{/if}><a href="{router page='profile'}{$oUserProfile->getLogin()}/favourites/">{$aLang.user_menu_profile_favourites}</a>{if $iCountTopicFavourite} ({$iCountTopicFavourite}){/if}</li>
|
||||
<li {if $aParams[1]=='comments'}class="active"{/if}><a href="{router page='profile'}{$oUserProfile->getLogin()}/favourites/comments/">{$aLang.user_menu_profile_favourites_comments}</a>{if $iCountCommentFavourite} ({$iCountCommentFavourite}){/if}</li>
|
||||
<li {if $aParams[0]=='favourites' and $aParams[1]==''}class="active"{/if}><a href="{$oUserProfile->getUserWebPath()}favourites/">{$aLang.user_menu_profile_favourites}</a>{if $iCountTopicFavourite} ({$iCountTopicFavourite}){/if}</li>
|
||||
<li {if $aParams[1]=='comments'}class="active"{/if}><a href="{$oUserProfile->getUserWebPath()}favourites/comments/">{$aLang.user_menu_profile_favourites_comments}</a>{if $iCountCommentFavourite} ({$iCountCommentFavourite}){/if}</li>
|
||||
{hook run='menu_profile_profile_item'}
|
||||
</ul>
|
||||
{/if}
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
</table>
|
||||
|
||||
<input type="hidden" name="security_ls_key" value="{$LIVESTREET_SECURITY_KEY}" />
|
||||
<input type="submit" name="submit_plugins_del" value="{$aLang.plugins_submit_delete}" onclick="return ($$('.form_plugins_checkbox:checked').length==0)?false:confirm('{$aLang.plugins_delete_confirm}');" />
|
||||
<input type="submit" name="submit_plugins_del" value="{$aLang.plugins_submit_delete}" onclick="return (jQuery('.form_plugins_checkbox:checked').size())?false:confirm('{$aLang.plugins_delete_confirm}');" />
|
||||
</form>
|
||||
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
</tbody>
|
||||
</table>
|
||||
|
||||
<input type="submit" name="submit_talk_del" value="{$aLang.talk_inbox_delete}" onclick="return ($('.form_talks_checkbox:checked').length==0)?false:confirm('{$aLang.talk_inbox_delete_confirm}');" />
|
||||
<input type="submit" name="submit_talk_del" value="{$aLang.talk_inbox_delete}" onclick="return (jQuery('.form_talks_checkbox:checked').size()==0)?false:confirm('{$aLang.talk_inbox_delete_confirm}');" />
|
||||
</form>
|
||||
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
<a href="{router page='blog'}{$oBlog->getUrl()}/"><img src="{$oBlog->getAvatarPath(24)}" alt="" class="avatar" /></a>
|
||||
<a href="{router page='blog'}{$oBlog->getUrl()}/" class="title">{$oBlog->getTitle()|escape:'html'}</a>
|
||||
{if $oBlog->getType()=='close'}<img src="{cfg name='path.static.skin'}/images/lock.png" alt="[x]" title="{$aLang.blog_closed}" class="private" />{/if}
|
||||
<p>{$aLang.blogs_owner}: <a href="{router page='profile'}{$oUserOwner->getLogin()}/" class="user">{$oUserOwner->getLogin()}</a></p>
|
||||
<p>{$aLang.blogs_owner}: <a href="{$oUserOwner->getUserWebPath()}" class="user">{$oUserOwner->getLogin()}</a></p>
|
||||
</td>
|
||||
{if $oUserCurrent}
|
||||
<td class="blog-join-leave">
|
||||
|
|
|
@ -91,7 +91,7 @@
|
|||
ed.onKeyPress.add(function(ed, e) {
|
||||
key = e.keyCode || e.which;
|
||||
if(e.ctrlKey && (key == 13)) {
|
||||
$('#comment-button-submit').click();
|
||||
jQuery('#comment-button-submit').click();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
@ -106,7 +106,7 @@
|
|||
jQuery(document).ready(function($){
|
||||
ls.lang.load({lang_load name="panel_b,panel_i,panel_u,panel_s,panel_url,panel_url_promt,panel_code,panel_video,panel_image,panel_cut,panel_quote,panel_list,panel_list_ul,panel_list_ol,panel_title,panel_clear_tags,panel_video_promt,panel_list_li,panel_image_promt,panel_user,panel_user_promt"});
|
||||
// Подключаем редактор
|
||||
$('#form_comment_text').markItUp(getMarkitupCommentSettings());
|
||||
jQuery('#form_comment_text').markItUp(getMarkitupCommentSettings());
|
||||
});
|
||||
</script>
|
||||
{/if}
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
{if $sAction=='profile'}
|
||||
<ul class="sub-menu">
|
||||
<li {if $aParams[0]=='whois' or $aParams[0]==''}class="active"{/if}><a href="{$oUserProfile->getUserWebPath()}">{$aLang.user_menu_profile_whois}</a></li>
|
||||
<li {if $aParams[0]=='favourites' and $aParams[1]==''}class="active"{/if}><a href="{router page='profile'}{$oUserProfile->getLogin()}/favourites/">{$aLang.user_menu_profile_favourites}</a>{if $iCountTopicFavourite} ({$iCountTopicFavourite}){/if}</li>
|
||||
<li {if $aParams[1]=='comments'}class="active"{/if}><a href="{router page='profile'}{$oUserProfile->getLogin()}/favourites/comments/">{$aLang.user_menu_profile_favourites_comments}</a>{if $iCountCommentFavourite} ({$iCountCommentFavourite}){/if}</li>
|
||||
<li {if $aParams[0]=='favourites' and $aParams[1]==''}class="active"{/if}><a href="{$oUserProfile->getUserWebPath()}favourites/">{$aLang.user_menu_profile_favourites}</a>{if $iCountTopicFavourite} ({$iCountTopicFavourite}){/if}</li>
|
||||
<li {if $aParams[1]=='comments'}class="active"{/if}><a href="{$oUserProfile->getUserWebPath()}favourites/comments/">{$aLang.user_menu_profile_favourites_comments}</a>{if $iCountCommentFavourite} ({$iCountCommentFavourite}){/if}</li>
|
||||
{hook run='menu_profile_profile_item'}
|
||||
</ul>
|
||||
{/if}
|
||||
|
|
|
@ -39,11 +39,11 @@
|
|||
{if !$oTopic->getUserQuestionIsVote()}
|
||||
<ul class="poll-vote">
|
||||
{foreach from=$oTopic->getQuestionAnswers() key=key item=aAnswer}
|
||||
<li><label><input type="radio" id="topic_answer_{$oTopic->getId()}_{$key}" name="topic_answer_{$oTopic->getId()}" value="{$key}" onchange="$('#topic_answer_{$oTopic->getId()}_value').val($(this).val());" /> {$aAnswer.text|escape:'html'}</label></li>
|
||||
<li><label><input type="radio" id="topic_answer_{$oTopic->getId()}_{$key}" name="topic_answer_{$oTopic->getId()}" value="{$key}" onchange="jQuery('#topic_answer_{$oTopic->getId()}_value').val(jQuery(this).val());" /> {$aAnswer.text|escape:'html'}</label></li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
|
||||
<input type="submit" value="{$aLang.topic_question_vote}" onclick="ls.poll.vote({$oTopic->getId()},$('#topic_answer_{$oTopic->getId()}_value').val());" />
|
||||
<input type="submit" value="{$aLang.topic_question_vote}" onclick="ls.poll.vote({$oTopic->getId()},jQuery('#topic_answer_{$oTopic->getId()}_value').val());" />
|
||||
<input type="submit" value="{$aLang.topic_question_abstain}" onclick="ls.poll.vote({$oTopic->getId()},-1)" />
|
||||
<input type="hidden" id="topic_answer_{$oTopic->getId()}_value" value="-1" />
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
{foreach from=$aBlogUsers item=oBlogUser}
|
||||
{assign var="oUser" value=$oBlogUser->getUser()}
|
||||
<tr>
|
||||
<td class="username"><a href="{router page='profile'}{$oUser->getLogin()}/">{$oUser->getLogin()}</a></td>
|
||||
<td class="username"><a href="{$oUser->getUserWebPath()}">{$oUser->getLogin()}</a></td>
|
||||
{if $oUser->getId()==$oUserCurrent->getId()}
|
||||
<td colspan="3" align="center">{$aLang.blog_admin_users_current_administrator}</td>
|
||||
{else}
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<td class="name">
|
||||
<a href="{router page='blog'}{$oBlog->getUrl()}/"><img src="{$oBlog->getAvatarPath(24)}" alt="" /></a>
|
||||
<a href="{router page='blog'}{$oBlog->getUrl()}/" class="title {if $oBlog->getType()=='close'}close{/if}">{$oBlog->getTitle()|escape:'html'}</a><br />
|
||||
{$aLang.blogs_owner}: <a href="{router page='profile'}{$oUserOwner->getLogin()}/" class="author">{$oUserOwner->getLogin()}</a>
|
||||
{$aLang.blogs_owner}: <a href="{$oUserOwner->getUserWebPath()}" class="author">{$oUserOwner->getLogin()}</a>
|
||||
</td>
|
||||
{if $oUserCurrent}
|
||||
<td class="join {if $oBlog->getUserIsJoin()}active{/if}">
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
{if $sAction=='profile'}
|
||||
<ul class="sub-menu" >
|
||||
<li {if $aParams[0]=='whois' or $aParams[0]==''}class="active"{/if}><div><a href="{$oUserProfile->getUserWebPath()}">{$aLang.user_menu_profile_whois}</a></div></li>
|
||||
<li {if $aParams[0]=='favourites' and $aParams[1]==''}class="active"{/if}><div><a href="{router page='profile'}{$oUserProfile->getLogin()}/favourites/">{$aLang.user_menu_profile_favourites}</a>{if $iCountTopicFavourite} ({$iCountTopicFavourite}){/if}</div></li>
|
||||
<li {if $aParams[1]=='comments'}class="active"{/if}><div><a href="{router page='profile'}{$oUserProfile->getLogin()}/favourites/comments/">{$aLang.user_menu_profile_favourites_comments}</a>{if $iCountCommentFavourite} ({$iCountCommentFavourite}){/if}</div></li>
|
||||
<li {if $aParams[0]=='favourites' and $aParams[1]==''}class="active"{/if}><div><a href="{$oUserProfile->getUserWebPath()}favourites/">{$aLang.user_menu_profile_favourites}</a>{if $iCountTopicFavourite} ({$iCountTopicFavourite}){/if}</div></li>
|
||||
<li {if $aParams[1]=='comments'}class="active"{/if}><div><a href="{$oUserProfile->getUserWebPath()}favourites/comments/">{$aLang.user_menu_profile_favourites_comments}</a>{if $iCountCommentFavourite} ({$iCountCommentFavourite}){/if}</div></li>
|
||||
{hook run='menu_profile_profile_item'}
|
||||
</ul>
|
||||
{/if}
|
||||
|
|
Loading…
Reference in a new issue