diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2015-07-09 13:22:40 +0300 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2015-07-09 13:22:40 +0300 |
commit | 7d2266e668751170ee935d6d90259f8fffc91493 (patch) | |
tree | 35e1fdbabcbd5dae759e2cf887090817b74ab325 /js | |
parent | 7a12a7887902c0a7bc687f4a12fb9e1ccdf46206 (diff) |
skelleton
Diffstat (limited to 'js')
-rw-r--r-- | js/script.js | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/js/script.js b/js/script.js new file mode 100644 index 0000000..f0e54fc --- /dev/null +++ b/js/script.js @@ -0,0 +1,31 @@ +/** + * ownCloud - popularitycontestserver + * + * This file is licensed under the Affero General Public License version 3 or + * later. See the COPYING file. + * + * @author Bjoern Schiessle <schiessle@owncloud.com> + * @copyright Bjoern Schiessle 2015 + */ + +(function ($, OC) { + + $(document).ready(function () { + $('#hello').click(function () { + alert('Hello from your script file'); + }); + + $('#echo').click(function () { + var url = OC.generateUrl('/apps/popularitycontestserver/echo'); + var data = { + echo: $('#echo-content').val() + }; + + $.post(url, data).success(function (response) { + $('#echo-result').text(response.echo); + }); + + }); + }); + +})(jQuery, OC);
\ No newline at end of file |