ACP integration for Sounds
parent
eeb3bdc7f7
commit
c1ccc81400
@ -0,0 +1,27 @@
|
||||
"use strict";
|
||||
/* global define */
|
||||
|
||||
define(['sounds', 'settings'], function(Sounds, Settings) {
|
||||
var SoundsAdmin = {};
|
||||
|
||||
SoundsAdmin.init = function() {
|
||||
// Sounds tab
|
||||
$('.sounds').find('button[data-action="play"]').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
var fileName = $(this).parent().parent().find('select').val();
|
||||
Sounds.playFile(fileName);
|
||||
});
|
||||
|
||||
// Load Form Values
|
||||
Settings.load('sounds', $('.sounds form'));
|
||||
|
||||
// Saving of Form Values
|
||||
var saveEl = $('#save');
|
||||
saveEl.on('click', function() {
|
||||
Settings.save('sounds', $('.sounds form'));
|
||||
});
|
||||
};
|
||||
|
||||
return SoundsAdmin;
|
||||
});
|
Loading…
Reference in New Issue