1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-07-07 17:04:24 +03:00
ifhub.club/application/frontend/components/activity/js/activity-settings.js
Denis Shakhov c31a235423 Компоненты специфичные для lscms перенесены во frontend/components
Остальные перенесены во фреймворк
2015-01-31 19:16:15 +07:00

51 lines
1,018 B
JavaScript

/**
* Activity settings
*
* @module ls/activity/settings
*
* @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.lsActivitySettings", $.livestreet.lsComponent, {
/**
* Дефолтные опции
*/
options: {
// Ссылки
urls: {
toggle_type: null
},
// Селекторы
selectors: {
type_checkbox: '.js-activity-settings-type-checkbox'
}
},
/**
* Конструктор
*
* @constructor
* @private
*/
_create: function () {
this._super();
this._on( this.elements.type_checkbox, { change: 'toggleEventType' } );
},
/**
* Сохранение настроек
*/
toggleEventType: function( event ) {
this.option( 'params.type', $( event.target ).data( 'type' ) );
this._load( 'toggle_type', function( response ) {} );
}
});
})(jQuery);