From 0705f55ce097b9892a7c4c11faa5396c4e557232 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Wed, 5 Aug 2015 20:23:08 +0800 Subject: finish new milestone page --- public/js/gogs.js | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) (limited to 'public/js') diff --git a/public/js/gogs.js b/public/js/gogs.js index 214cdf9f..8802ea64 100644 --- a/public/js/gogs.js +++ b/public/js/gogs.js @@ -51,21 +51,6 @@ function initRepository() { $('.color-picker').val(color_hex); $('.minicolors-swatch-color').css("background-color", color_hex); }); - $('.delete-label-button').click(function () { - var $this = $(this); - $('.delete-label.modal').modal({ - closable: false, - onApprove: function () { - $.post($this.data('url'), { - "_csrf": csrf, - "id": $this.data("id") - }).done(function (data) { - window.location.href = data.redirect; - }); - } - }).modal('show'); - return false; - }); $('.edit-label-button').click(function () { $('#label-modal-id').val($(this).data('id')); $('#label-modal-title').val($(this).data('title')); @@ -81,6 +66,9 @@ function initRepository() { } // Milestones + if ($('.repository.milestones').length > 0) { + + } if ($('.repository.new.milestone').length > 0) { var $datepicker = $('.milestone.datepicker') $datepicker.datetimepicker({ @@ -118,6 +106,23 @@ $(document).ready(function () { }); $('.poping.up').popup(); + // Helpers. + $('.delete-button').click(function () { + var $this = $(this); + $('.delete.modal').modal({ + closable: false, + onApprove: function () { + $.post($this.data('url'), { + "_csrf": csrf, + "id": $this.data("id") + }).done(function (data) { + window.location.href = data.redirect; + }); + } + }).modal('show'); + return false; + }); + initInstall(); initRepository(); }); \ No newline at end of file -- cgit v1.2.3