1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-05-19 09:18:18 +03:00

fix templates

This commit is contained in:
Mzhelskiy Maxim 2011-08-23 14:19:32 +00:00
parent 1295d1bc87
commit f7e107faf2
15 changed files with 43 additions and 32 deletions

View file

@ -104,6 +104,13 @@ class ActionBlog extends Action {
$this->iCountTopicsPersonalNew=$this->Topic_GetCountTopicsPersonalNew();
$this->iCountTopicsBlogNew=$this->iCountTopicsCollectiveNew;
$this->iCountTopicsNew=$this->iCountTopicsCollectiveNew+$this->iCountTopicsPersonalNew;
/**
* Загружаем в шаблон JS текстовки
*/
$this->Lang_AddLangJs(array(
'blog_join','blog_leave'
));
}
/**

View file

@ -29,6 +29,12 @@ class ActionBlogs extends Action {
protected $sMenuHeadItemSelect='blogs';
public function Init() {
/**
* Загружаем в шаблон JS текстовки
*/
$this->Lang_AddLangJs(array(
'blog_join','blog_leave'
));
}
protected function RegisterEvent() {

View file

@ -61,6 +61,13 @@ class ActionQuestion extends Action {
$this->oUserCurrent=$this->User_GetUserCurrent();
$this->SetDefaultEvent('add');
$this->Viewer_AddHtmlTitle($this->Lang_Get('topic_question_title'));
/**
* Загружаем в шаблон JS текстовки
*/
$this->Lang_AddLangJs(array(
'topic_question_create_answers_error_max','delete'
));
}
/**
* Регистрируем евенты

View file

@ -52,6 +52,13 @@ class ActionTalk extends Action {
$this->oUserCurrent=$this->User_GetUserCurrent();
$this->SetDefaultEvent('inbox');
$this->Viewer_AddHtmlTitle($this->Lang_Get('talk_menu_inbox'));
/**
* Загружаем в шаблон JS текстовки
*/
$this->Lang_AddLangJs(array(
'delete'
));
}
protected function RegisterEvent() {

View file

@ -938,6 +938,7 @@ return array(
'not_access' => 'Нет доступа',
'install_directory_exists' => 'Для работы с сайтом удалите директорию /install.',
'login' => 'Вход на сайт',
'delete' => 'Удалить',
'date_day' => 'день',
'date_month' => 'месяц',

View file

@ -30,14 +30,7 @@
var LIVESTREET_SECURITY_KEY = '{$LIVESTREET_SECURITY_KEY}';
var SESSION_ID = '{$_sPhpSessionId}';
var BLOG_USE_TINYMCE = '{cfg name="view.tinymce"}';
var LANG_JOIN = '{$aLang.blog_join}';
var LANG_LEAVE = '{$aLang.blog_leave}';
var LANG_DELETE = '{$aLang.blog_delete}';
var LANG_POLL_ERROR = '{$aLang.topic_question_create_answers_error_max}';
var IMG_PATH_LOADER = DIR_STATIC_SKIN + '/images/loader.gif';
var TINYMCE_LANG='en';
{if $oConfig->GetValue('lang.current')=='russian'}
TINYMCE_LANG='ru';

View file

@ -15,9 +15,9 @@ ls.blog = (function ($) {
} else {
obj = $(obj);
ls.msg.notice(null, result.sMsg);
obj.text(LANG_JOIN);
obj.text(ls.lang.get('blog_join'));
if (result.bState) {
obj.text(LANG_LEAVE);
obj.text(ls.lang.get('blog_leave'));
}
$('#blog_user_count_'+idBlog).text(result.iCountUser);
}

View file

@ -24,12 +24,12 @@ ls.poll = (function ($) {
*/
this.addAnswer = function() {
if($("#question_list li").length == 20) {
ls.msg.error(null, LANG_POLL_ERROR);
ls.msg.error(null, ls.lang.get('topic_question_create_answers_error_max'));
return false;
}
var newItem = $("#question_list li:first-child").clone();
newItem.find('a').remove();
newItem.appendTo("#question_list").append($('<a href="#">'+LANG_DELETE+'</a>').click(function(ev){
newItem.appendTo("#question_list").append($('<a href="#">'+ls.lang.get('delete')+'</a>').click(function(ev){
return this.removeAnswer(ev.target);
}.bind(this)));
newItem.find('input').val('');

View file

@ -24,7 +24,7 @@ ls.talk = (function ($) {
if($('#speaker_list').length == 0) {
$('#speaker_list_block').append($('<ul class="list" id="speaker_list"></ul>'));
}
$('#speaker_list').append($('<li id="speaker_item_'+item.sUserId+'_area"><a href="'+item.sUserLink+'" class="user">'+item.sUserLogin+'</a> - <a href="#" id="speaker_item_'+item.sUserId+'" class="delete">'+LANG_DELETE+'</a></li>'));
$('#speaker_list').append($('<li id="speaker_item_'+item.sUserId+'_area"><a href="'+item.sUserLink+'" class="user">'+item.sUserLogin+'</a> - <a href="#" id="speaker_item_'+item.sUserId+'" class="delete">'+ls.lang.get('delete')+'</a></li>'));
}
});
}
@ -76,7 +76,7 @@ ls.talk = (function ($) {
if($('#black_list').length == 0) {
$('#black_list_block').append($('<ul class="list" id="black_list"></ul>'));
}
$('#black_list').append($('<li id="blacklist_item_'+item.sUserId+'_area"><a href="#" class="user">'+item.sUserLogin+'</a> - <a href="#" id="blacklist_item_'+item.sUserId+'" class="delete">'+LANG_DELETE+'</a></li>'));
$('#black_list').append($('<li id="blacklist_item_'+item.sUserId+'_area"><a href="#" class="user">'+item.sUserLogin+'</a> - <a href="#" id="blacklist_item_'+item.sUserId+'" class="delete">'+ls.lang.get('delete')+'</a></li>'));
}
});
}

View file

@ -66,7 +66,7 @@
'id' : 'blacklist_item_'+sId,
'href' : "#",
'class' : 'delete',
'text' : LANG_BLOG_DELETE,
'text' : lsLang.get('delete'),
'events': {
'click': function() {
deleteFromBlackList(this);

View file

@ -45,12 +45,9 @@
{foreach from=$aRouter key=sPage item=sPath}
aRouter['{$sPage}']='{$sPath}';
{/foreach}
var LANG_JOIN = '{$aLang.blog_join}';
var LANG_LEAVE = '{$aLang.blog_leave}';
var LANG_COMMENT_FOLD = '{$aLang.comment_fold}';
var LANG_COMMENT_UNFOLD = '{$aLang.comment_unfold}';
var LANG_BLOG_DELETE = '{$aLang.blog_delete}';
</script>

View file

@ -14,9 +14,9 @@ function ajaxJoinLeaveBlog(obj,idBlog) {
} else {
msgNoticeBox.alert(result.sMsgTitle,result.sMsg);
if (obj) {
obj.set('html',LANG_JOIN);
obj.set('html',lsLang.get('blog_join'));
if (result.bState) {
obj.set('html',LANG_LEAVE);
obj.set('html',lsLang.get('blog_leave'));
}
divCount=$('blog_user_count_'+idBlog);
if (divCount) {

View file

@ -31,13 +31,6 @@
var SESSION_ID = '{$_sPhpSessionId}';
var BLOG_USE_TINYMCE = '{cfg name="view.tinymce"}';
var LANG_JOIN = '{$aLang.blog_join}';
var LANG_LEAVE = '{$aLang.blog_leave}';
var LANG_DELETE = '{$aLang.blog_delete}';
var LANG_POLL_ERROR = '{$aLang.topic_question_create_answers_error_max}';
var IMG_PATH_LOADER = DIR_STATIC_SKIN + '/images/loader.gif';
var TINYMCE_LANG='en';
{if $oConfig->GetValue('lang.current')=='russian'}
TINYMCE_LANG='ru';

View file

@ -24,12 +24,12 @@ ls.poll = (function ($) {
*/
this.addAnswer = function() {
if($("#question_list li").length == 20) {
ls.msg.error(null, LANG_POLL_ERROR);
ls.msg.error(null, ls.lang.get('topic_question_create_answers_error_max'));
return false;
}
var newItem = $("#question_list li:first-child").clone();
newItem.find('a').remove();
newItem.appendTo("#question_list").append($('<a href="#" class="dashed">'+LANG_DELETE+'</a>').click(function(ev){
newItem.appendTo("#question_list").append($('<a href="#" class="dashed">'+ls.lang.get('delete')+'</a>').click(function(ev){
return this.removeAnswer(ev.target);
}.bind(this)));
newItem.find('input').val('');

View file

@ -24,7 +24,7 @@ ls.talk = (function ($) {
if($('#speaker_list').length == 0) {
$('#speaker_list_block').append($('<ul class="list" id="speaker_list"></ul>'));
}
$('#speaker_list').append($('<li id="speaker_item_'+item.sUserId+'_area"><a href="'+item.sUserLink+'" class="user">'+item.sUserLogin+'</a> - <a href="#" id="speaker_item_'+item.sUserId+'" class="delete">'+LANG_DELETE+'</a></li>'));
$('#speaker_list').append($('<li id="speaker_item_'+item.sUserId+'_area"><a href="'+item.sUserLink+'" class="user">'+item.sUserLogin+'</a> - <a href="#" id="speaker_item_'+item.sUserId+'" class="delete">'+ls.lang.get('delete')+'</a></li>'));
}
});
}
@ -76,7 +76,7 @@ ls.talk = (function ($) {
if($('#black_list').length == 0) {
$('#black_list_block').append($('<ul class="list" id="black_list"></ul>'));
}
$('#black_list').append($('<li id="blacklist_item_'+item.sUserId+'_area"><a href="#" class="user">'+item.sUserLogin+'</a> - <a href="#" id="blacklist_item_'+item.sUserId+'" class="delete">'+LANG_DELETE+'</a></li>'));
$('#black_list').append($('<li id="blacklist_item_'+item.sUserId+'_area"><a href="#" class="user">'+item.sUserLogin+'</a> - <a href="#" id="blacklist_item_'+item.sUserId+'" class="delete">'+ls.lang.get('delete')+'</a></li>'));
}
});
}