1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-07-05 07:54:24 +03:00
ifhub.club/application/frontend/common/js/feed.js
2014-07-19 23:50:52 +07:00

56 lines
1.1 KiB
JavaScript

/**
* Лента
*
* @module ls/feed
*
* @license GNU General Public License, version 2
* @copyright 2013 OOO "ЛС-СОФТ" {@link http://livestreetcms.com}
* @author Denis Shakhov <denis.shakhov@gmail.com>
*/
(function($) {
"use strict";
$.widget( "livestreet.lsFeed", {
/**
* Дефолтные опции
*/
options: {
// Ссылки
urls: {
// Подгрузка топиков
more: null
},
// Селекторы
selectors: {
// Список топиков
list: '.js-feed-topic-list',
// Кнопка подгрузки
more: '.js-feed-more'
}
},
/**
* Конструктор
*
* @constructor
* @private
*/
_create: function () {
var _this = this;
this.elements = {
list: this.element.find( this.option( 'selectors.list' ) ),
more: this.element.find( this.option( 'selectors.more' ) )
};
// Подгрузка топиков
this.elements.more.more({
url: this.option( 'urls.more' ),
target: this.elements.list,
});
},
});
})(jQuery);