From 1b0142513e21fd37d477ca776ccf8d6f6f1bc928 Mon Sep 17 00:00:00 2001 From: FuXiaoHei Date: Sun, 6 Apr 2014 16:29:45 +0800 Subject: release-new page ui --- public/js/app.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'public/js') diff --git a/public/js/app.js b/public/js/app.js index 0ba0675f..93e01abd 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); -- cgit v1.2.3