From 46687f391c4e81fd17f7ecac22d3587c711e07d5 Mon Sep 17 00:00:00 2001 From: FuXiaoHei Date: Mon, 10 Mar 2014 16:54:52 +0800 Subject: ssh keys operation page ui --- public/js/app.js | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) (limited to 'public/js') diff --git a/public/js/app.js b/public/js/app.js index 6a4c72bd78..59d521090c 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -3,12 +3,7 @@ var Gogits = { }; (function ($) { - Gogits.showTooltips = function () { - $("body").tooltip({ - selector: "[data-toggle=tooltip]" - //container: "body" - }); - }; + Gogits.showTab = function (selector, index) { if (!index) { index = 0; @@ -27,11 +22,29 @@ var Gogits = { }; $form.validate(options); }; + + // ----- init elements + Gogits.initModals = function () { + var modals = $("[data-toggle=modal]"); + if (modals.length < 1) { + return; + } + $.each(modals, function (i, item) { + $(item).modal("hide"); + }); + }; + Gogits.initTooltips = function () { + $("body").tooltip({ + selector: "[data-toggle=tooltip]" + //container: "body" + }); + }; })(jQuery); function initCore() { - Gogits.showTooltips(); + Gogits.initTooltips(); + Gogits.initModals(); } function initRegister() { -- cgit v1.2.3