You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
572 B
JavaScript
28 lines
572 B
JavaScript
'use strict';
|
|
|
|
|
|
define('admin/general/social', [], function () {
|
|
var social = {};
|
|
|
|
social.init = function () {
|
|
$('#save').on('click', function () {
|
|
var networks = [];
|
|
$('#postSharingNetworks input[type="checkbox"]').each(function () {
|
|
if ($(this).prop('checked')) {
|
|
networks.push($(this).attr('id'));
|
|
}
|
|
});
|
|
|
|
socket.emit('admin.social.savePostSharingNetworks', networks, function (err) {
|
|
if (err) {
|
|
return app.alertError(err);
|
|
}
|
|
|
|
app.alertSuccess('[[admin/general/social:save-success]]');
|
|
});
|
|
});
|
|
};
|
|
|
|
return social;
|
|
});
|