2013-04-09 01:30:54 +03:00
|
|
|
|
jQuery(document).ready(function($){
|
|
|
|
|
// Хук начала инициализации javascript-составляющих шаблона
|
|
|
|
|
ls.hook.run('ls_template_init_start',[],window);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Popovers
|
|
|
|
|
*/
|
|
|
|
|
$(document).popover({ selector: '.js-popover-default' });
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Modals
|
|
|
|
|
*/
|
|
|
|
|
$('.js-modal-default').modal();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Datepicker
|
|
|
|
|
*/
|
|
|
|
|
$('.date-picker').datepicker();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Dropdowns
|
|
|
|
|
*/
|
|
|
|
|
$('.js-dropdown-default').dropdown();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Tooltips
|
|
|
|
|
*/
|
2013-04-30 12:19:00 +03:00
|
|
|
|
$(document).tooltip({
|
|
|
|
|
selector: '.js-tooltip, .js-tooltip-vote-topic'
|
|
|
|
|
});
|
2013-04-09 01:30:54 +03:00
|
|
|
|
|
|
|
|
|
$('.js-title-talk').tooltip({
|
|
|
|
|
alignX: 'left',
|
|
|
|
|
alignY: 'center'
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$('.js-tip-help').tooltip({
|
|
|
|
|
alignX: 'right',
|
|
|
|
|
alignY: 'center'
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
if (ls.registry.get('block_stream_show_tip')) {
|
|
|
|
|
$(document).tooltip({
|
|
|
|
|
selector: '.js-title-comment, .js-title-topic',
|
|
|
|
|
alignX: 'left',
|
|
|
|
|
alignY: 'center',
|
|
|
|
|
delay: 1500
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Autocomplete
|
|
|
|
|
*/
|
|
|
|
|
ls.autocomplete.add($(".autocomplete-tags-sep"), aRouter['ajax']+'autocompleter/tag/', true);
|
|
|
|
|
ls.autocomplete.add($(".autocomplete-tags"), aRouter['ajax']+'autocompleter/tag/', false);
|
|
|
|
|
ls.autocomplete.add($(".autocomplete-users-sep"), aRouter['ajax']+'autocompleter/user/', true);
|
|
|
|
|
ls.autocomplete.add($(".autocomplete-users"), aRouter['ajax']+'autocompleter/user/', false);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Scroll
|
|
|
|
|
*/
|
|
|
|
|
$(window)._scrollable();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Toolbar
|
|
|
|
|
*/
|
2013-04-15 08:38:51 +03:00
|
|
|
|
$('#toolbar').toolbar({
|
|
|
|
|
alignTo: '#wrapper',
|
|
|
|
|
align: 'right',
|
|
|
|
|
offsetX: 10,
|
|
|
|
|
offsetY: 0
|
|
|
|
|
});
|
|
|
|
|
|
2013-04-09 01:30:54 +03:00
|
|
|
|
ls.toolbar.topic.init(); // Тул-бар топиков
|
|
|
|
|
ls.toolbar.up.init(); // Кнопка "UP"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Code highlight
|
|
|
|
|
*/
|
|
|
|
|
prettyPrint();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Blocks
|
|
|
|
|
*/
|
2013-05-04 17:10:22 +03:00
|
|
|
|
ls.blocks.init();
|
2013-04-09 01:30:54 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2013-05-04 17:10:22 +03:00
|
|
|
|
* Activity
|
2013-04-09 01:30:54 +03:00
|
|
|
|
*/
|
2013-05-04 17:10:22 +03:00
|
|
|
|
ls.stream.init();
|
2013-04-09 01:30:54 +03:00
|
|
|
|
|
2013-05-04 17:10:22 +03:00
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Userfeed
|
|
|
|
|
*/
|
|
|
|
|
ls.userfeed.init();
|
2013-04-09 01:30:54 +03:00
|
|
|
|
|
|
|
|
|
|
2013-05-04 17:10:22 +03:00
|
|
|
|
/**
|
|
|
|
|
* Comments
|
|
|
|
|
*/
|
2013-05-23 20:15:54 +03:00
|
|
|
|
ls.comments.init({
|
|
|
|
|
folding: false
|
|
|
|
|
});
|
2013-04-09 01:30:54 +03:00
|
|
|
|
|
|
|
|
|
|
2013-05-30 16:34:30 +03:00
|
|
|
|
/**
|
|
|
|
|
* User
|
|
|
|
|
*/
|
|
|
|
|
ls.user.init();
|
|
|
|
|
|
|
|
|
|
|
2013-07-03 07:36:17 +03:00
|
|
|
|
/**
|
|
|
|
|
* Captcha
|
|
|
|
|
*/
|
|
|
|
|
ls.captcha.init();
|
|
|
|
|
|
|
|
|
|
|
2013-05-04 17:10:22 +03:00
|
|
|
|
/**
|
|
|
|
|
* Talk
|
2013-04-09 01:30:54 +03:00
|
|
|
|
*/
|
2013-07-02 05:58:58 +03:00
|
|
|
|
ls.talk.init();
|
2013-07-08 07:42:49 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Poll
|
|
|
|
|
*/
|
|
|
|
|
ls.poll.init();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* User Note
|
|
|
|
|
*/
|
|
|
|
|
ls.usernote.init();
|
2013-07-09 08:09:06 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Editor
|
|
|
|
|
*/
|
|
|
|
|
ls.editor.init();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Topic
|
|
|
|
|
*/
|
|
|
|
|
ls.topic.init();
|
|
|
|
|
|
|
|
|
|
|
2013-07-09 11:40:06 +03:00
|
|
|
|
/**
|
|
|
|
|
* Vote
|
|
|
|
|
*/
|
|
|
|
|
ls.vote.init();
|
|
|
|
|
|
|
|
|
|
|
2013-07-15 12:40:44 +03:00
|
|
|
|
/**
|
|
|
|
|
* Pagination
|
|
|
|
|
*/
|
|
|
|
|
ls.pagination.init();
|
|
|
|
|
|
|
|
|
|
|
2013-07-09 08:09:06 +03:00
|
|
|
|
/**
|
|
|
|
|
* Photoset
|
|
|
|
|
*/
|
|
|
|
|
$('.js-photoset-type-default-image').prettyPhoto({
|
|
|
|
|
social_tools: '',
|
|
|
|
|
show_title: false,
|
|
|
|
|
slideshow: false,
|
|
|
|
|
deeplinking: false
|
|
|
|
|
});
|
2013-04-09 01:30:54 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Хук конца инициализации javascript-составляющих шаблона
|
|
|
|
|
ls.hook.run('ls_template_init_end',[],window);
|
2012-04-22 21:14:29 +03:00
|
|
|
|
});
|