Files
nextcloud-registration/js/script.js
Pellaeon Lin c3eedc1460 Create app
2014-08-28 14:43:28 +00:00

31 lines
649 B
JavaScript

/**
* ownCloud - registration
*
* This file is licensed under the Affero General Public License version 3 or
* later. See the COPYING file.
*
* @author Pellaeon Lin <pellaeon@hs.ntnu.edu.tw>
* @copyright Pellaeon Lin 2014
*/
(function ($, OC) {
$(document).ready(function () {
$('#hello').click(function () {
alert('Hello from your script file');
});
$('#echo').click(function () {
var url = OC.generateUrl('/apps/registration/echo');
var data = {
echo: $('#echo-content').val()
};
$.post(url, data).success(function (response) {
$('#echo-result').text(response.echo);
});
});
});
})(jQuery, OC);