diff options
author | FuXiaoHei <fuxiaohei@hexiaz.com> | 2014-04-06 16:29:45 +0800 |
---|---|---|
committer | FuXiaoHei <fuxiaohei@hexiaz.com> | 2014-04-06 16:29:45 +0800 |
commit | 1b0142513e21fd37d477ca776ccf8d6f6f1bc928 (patch) | |
tree | fab0b0849f0bead985f19526caa4b198d31ac73b /public/js/app.js | |
parent | 98f918ed28d5a8b1c131cda587a06714a768f951 (diff) | |
download | gitea-1b0142513e21fd37d477ca776ccf8d6f6f1bc928.tar.gz gitea-1b0142513e21fd37d477ca776ccf8d6f6f1bc928.zip |
release-new page ui
Diffstat (limited to 'public/js/app.js')
-rw-r--r-- | public/js/app.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/public/js/app.js b/public/js/app.js index 0ba0675f20..93e01abd28 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -520,6 +520,23 @@ function initIssue() { } +function initRelease() { +// release new ajax preview + (function () { + $('[data-ajax-name=release-preview]').on("click", function () { + var $this = $(this); + $this.toggleAjax(function (json) { + if (json.ok) { + $($this.data("preview")).html(json.content); + } + }) + }); + $('.release-write a[data-toggle]').on("click", function () { + $('.release-preview-content').html("loading..."); + }); + }()) +} + (function ($) { $(function () { initCore(); @@ -539,5 +556,8 @@ function initIssue() { if ($('#issue').length) { initIssue(); } + if ($('#release').length) { + initRelease(); + } }); })(jQuery); |