From: Stefan Lage Date: Tue, 28 May 2013 20:38:33 +0000 (-0400) Subject: nitdoc: Added some field to github form X-Git-Tag: v0.6~46^2~5 X-Git-Url: http://nitlanguage.org nitdoc: Added some field to github form Adding a title field to its form, and a field to inform about which repository was selected when the user signed in. Signed-off-by: Stefan Lage --- diff --git a/share/nitdoc/scripts/js-facilities.js b/share/nitdoc/scripts/js-facilities.js index 88f9cc2..eb2c89c 100644 --- a/share/nitdoc/scripts/js-facilities.js +++ b/share/nitdoc/scripts/js-facilities.js @@ -745,14 +745,16 @@ function updateDisplaying(){ $('#lbbranchGit').hide(); $('#branchGit').hide(); $('#listBranches').show(); + $('#divGitHubRepoDisplay').show(); $("#liGitHub").attr("class", "current"); $("#imgGitHub").attr("src", "resources/icons/github-icon-w.png"); - $('#nickName').text(userName); + $('#nickName').text(userName); $('#githubAccount').attr("href", "https://github.com/"+userName); $('#logginMessage').css({'display' : 'block'}); $('#logginMessage').css({'text-align' : 'center'}); - $('.popover').css({'height' : '160px'}); - $('#signIn').text("Sign out"); + $('.popover').css({'height' : '190px'}); + $('#signIn').text("Sign out"); + $('#githubRepoDisplay').text(githubRepo); sessionStarted = true; reloadComment(); } @@ -779,6 +781,7 @@ function updateDisplaying(){ $('#lbbranchGit').show(); $('#branchGit').show(); $('#listBranches').hide(); + $('#divGitHubRepoDisplay').hide(); } } @@ -1158,10 +1161,10 @@ function getCommentLastCommit(path){ function displayMessage(msg, widthDiv, margModal){ spinner.stop(); $('#modal').hide(); - $('#txtQuestion').text(msg); - $('#btnCreateBranch').text("Ok"); $('#btnCancelBranch').hide(); $('#modalQuestion').show().prepend('Close'); + $('#txtQuestion').text(msg); + $('#btnCreateBranch').text("Ok"); var xModal = $('#modalQuestion').css('width').split('px')[0]; var yModal = $('#modalQuestion').css('height').split('px')[0]; var x = $(document).width/2 - xModal/2; diff --git a/share/nitdoc/styles/main.css b/share/nitdoc/styles/main.css index b5358be..53b0132 100644 --- a/share/nitdoc/styles/main.css +++ b/share/nitdoc/styles/main.css @@ -830,9 +830,14 @@ fieldset { height:20px; } -#listBranches{ +#listBranches, #divGitHubRepoDisplay{ + color: #000000; display:block; text-align:center; margin-top: 15px; margin-bottom: 15px; -} +} + +.githubTitle{ + text-align:center; +} diff --git a/src/nitdoc.nit b/src/nitdoc.nit index 486a8b2..52db95c 100644 --- a/src/nitdoc.nit +++ b/src/nitdoc.nit @@ -170,7 +170,7 @@ class DocContext var custom_items = "" if self._opt_custom_menu_items.value != null then custom_items = self._opt_custom_menu_items.value.as(not null) - var action_bar = "
\n" + var action_bar = "
\n" var custom_title = "Nitdoc" if self._opt_custom_title.value != null then custom_title = self._opt_custom_title.value.as(not null) @@ -227,7 +227,7 @@ class DocContext assert mod isa MMSrcModule if not mod.require_doc(self) then continue self.filename = mod.html_name - action_bar = "
\n" + action_bar = "
\n" clear addGithubInformation addCommitForm @@ -246,7 +246,7 @@ class DocContext for c in mainmod.local_classes do if not c.require_doc(self) then continue self.filename = c.html_name - action_bar = "
\n" + action_bar = "
\n" clear addGithubInformation addCommitForm @@ -262,7 +262,7 @@ class DocContext end self.filename = "fullindex" - action_bar = "
\n" + action_bar = "
\n" clear addGithubInformation addCommitForm