nitdoc: migrate javascript plugins
[nit.git] / share / nitdoc / js / plugins / github.js
index 84ad4f2..c77c0d0 100644 (file)
@@ -46,11 +46,21 @@ define([
                        this.origin = this._parseUpstream(upstream);\r
                        this._initMarked();\r
                        // Add github menu\r
-                       $("nav.main ul").append(\r
-                               $("<li/>")\r
-                               .attr("id", "nitdoc-github-li")\r
+                       $("#topmenu>.container-fluid").append(\r
+                               $("<a/>")\r
+                               .attr({\r
+                                       "id": "nitdoc-github-li",\r
+                                       "type": "button",\r
+                                       "class": "navbar-btn navbar-right btn-link",\r
+                                       "href": "#",\r
+                                       "data-container": "body",\r
+                                       "data-toggle": "popover",\r
+                                       "data-placement": "bottom",\r
+                                       "data-content": "bottom",\r
+                                       "data-html": "true",\r
+                               })\r
                                .loginbox()\r
-                               .loginbox("displayLogin")\r
+                               //.loginbox("displayLogin")\r
                                .bind("loginbox_logoff", function() {\r
                                        GithubUI.disactivate();\r
                                })\r
@@ -124,7 +134,7 @@ define([
                                                .modalbox("open");\r
                                        } else if(isok == "error:sha") {\r
                                                $("<p/>")\r
-                                               .text("The provided Github repository must contain the base commit '" + UI.origin.sha + "'.")\r
+                                               .text("The provided Github repository must contain the base commit '" + this.origin.sha + "'.")\r
                                                .modalbox({\r
                                                        title: "Github base commit error",\r
                                                        isError: true\r