]> source.dussan.org Git - archiva.git/commitdiff
use a static popover mode with button instead of mouseover which is ugly
authorOlivier Lamy <olamy@apache.org>
Tue, 28 Aug 2012 13:51:01 +0000 (13:51 +0000)
committerOlivier Lamy <olamy@apache.org>
Tue, 28 Aug 2012 13:51:01 +0000 (13:51 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1378137 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/proxy-connectors.js
archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/templates/archiva/repositories.html

index 48a2c32fcf0e0433592236f6135445e27e156533..c26bccb266066abf51212d222764f42a1ebd7840 100644 (file)
@@ -369,36 +369,30 @@ define("archiva.proxy-connectors",["jquery","i18n","jquery.tmpl","bootstrap","jq
     }
 
     showSettings=function(proxyConnector,targetContentStartId, targetImgStartId,theProxyConnectorsViewModel){
-      var id = (targetContentStartId?targetContentStartId:"#proxy-connectors-grid-remoterepo-settings-content-")
-                                      +proxyConnector.sourceRepoId().replace(/\./g,"\\\.")+"-"+proxyConnector.targetRepoId()
-          .replace(/\./g,"\\\.");
-
+      $.log("showSettings");
+    }
 
-      var targetContent = $(id);
-      targetContent.html("");
+    hideSettings=function(proxyConnector){
+      $("#body_content" ).find(".popover" ).hide();
+    }
 
+    buildSettings=function(proxyConnector){
       var tmplHtml = $("#proxy-connectors-remote-settings-popover-tmpl")
                                            .tmpl({
                                                 proxyConnectorsViewModel: self,
                                                 proxyConnector:ko.toJS(proxyConnector)
                                                 } ).html();
 
-      var targetImg = $((targetImgStartId?targetImgStartId:"#proxy-connectors-grid-remoterepo-settings-edit-")
+      var targetImg = $(("#proxy-connectors-grid-remoterepo-settings-edit-")
                             +proxyConnector.sourceRepoId().replace(/\./g,"\\\.")+"-"+proxyConnector.targetRepoId().replace(/\./g,"\\\."));
-      targetImg.attr("data-content",tmplHtml);
-      targetImg.popover(
-          {
-            placement: "left",
-            html: true
-          }
-      );
 
-      targetImg.popover('show');
 
-    }
 
-    hideSettings=function(proxyConnector){
-      $("#body_content" ).find(".popover" ).hide();
+      //targetImg.popover();
+
+      //targetImg.popover('show');
+
+      return tmplHtml;
     }
 
     this.displaySettings=function(sourceRepoId,targetRepoId,targetContentStartId, targetImgStartId){
@@ -447,7 +441,11 @@ define("archiva.proxy-connectors",["jquery","i18n","jquery.tmpl","bootstrap","jq
       var mainContent = $("#main-content");
 
       ko.applyBindings(this,mainContent.find("#proxy-connectors-view").get(0));
-      removeSmallSpinnerImg("#main-content");
+      var prxGrids=mainContent.find("[id^='proxy-connectors-grid-remoterepo-settings-edit-']");
+
+      $.log("prxGrids:"+prxGrids.length);
+      prxGrids.popover();
+      removeSmallSpinnerImg();
       mainContent.find("#proxy-connectors-view-tabs #proxy-connectors-view-tabs-a-network-proxies-grid").tab('show');
 
       mainContent.find("#proxy-connectors-view-tabs").on('show', function (e) {
index ef1fa182dd61e0893d4a79c78fec1559dbb5ec98..f6aa6eba6eb9eaeb41b063cd40ab8cfb9321c573 100644 (file)
       <td>${row.sourceRepoId()}</td>
       <td>${row.targetRepoId()}</td>
       <td>
-          <img src="images/utilities-system-monitor-22-22.png" id="proxy-connectors-grid-remoterepo-settings-edit-${row.sourceRepoId()}-${row.targetRepoId()}"
-               data-original-title="${$.i18n.prop('proxy-connectors.grid.remoterepo.settings.popover.title')}"
-               data-bind="event: { mouseover: function(){ showSettings(row)},mouseout: function(){hideSettings(row)},}">
+          <a class="btn btn-info btn-mini" id="proxy-connectors-grid-remoterepo-settings-edit-${row.sourceRepoId()}-${row.targetRepoId()}"
+                  data-original-title="${$.i18n.prop('proxy-connectors.grid.remoterepo.settings.popover.title')}"
+                  data-content="${buildSettings(row)}">
+              <i class="icon-question-sign icon-white"></i>
+          </a>
+
       </td>
       <td>
         <a data-bind="click: function(){ editProxyConnector(row)}" href="#">