]> source.dussan.org Git - archiva.git/commitdiff
correctly close popover when mouseout
authorOlivier Lamy <olamy@apache.org>
Tue, 28 Aug 2012 06:31:02 +0000 (06:31 +0000)
committerOlivier Lamy <olamy@apache.org>
Tue, 28 Aug 2012 06:31:02 +0000 (06:31 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1377984 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 65177c55fb3db7cceca8d14550486eca6505aa43..52adcb64af465a01d7da759d4e1ba4123960e021 100644 (file)
@@ -370,7 +370,7 @@ 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()+"-"+proxyConnector.targetRepoId()
+                                      +proxyConnector.sourceRepoId().replace(/\./g,"\\\.")+"-"+proxyConnector.targetRepoId()
           .replace(/\./g,"\\\.");
 
 
@@ -383,11 +383,11 @@ define("archiva.proxy-connectors",["jquery","i18n","jquery.tmpl","bootstrap","jq
                                                 proxyConnector:ko.toJS(proxyConnector)
                                                 } ).html();
 
-      targetContent.append(tmplHtml);
+      //targetContent.append(tmplHtml);
 
       var targetImg = $((targetImgStartId?targetImgStartId:"#proxy-connectors-grid-remoterepo-settings-edit-")
-                            +proxyConnector.sourceRepoId()+"-"+proxyConnector.targetRepoId().replace(/\./g,"\\\."));
-      targetImg.attr("data-content",targetContent.html());
+                            +proxyConnector.sourceRepoId().replace(/\./g,"\\\.")+"-"+proxyConnector.targetRepoId().replace(/\./g,"\\\."));
+      targetImg.attr("data-content",tmplHtml);//targetContent.html());
       targetImg.popover(
           {
             placement: "left",
@@ -399,6 +399,14 @@ define("archiva.proxy-connectors",["jquery","i18n","jquery.tmpl","bootstrap","jq
 
     }
 
+    hideSettings=function(proxyConnector){
+      $.log('hideSettings:'+proxyConnector.sourceRepoId()+","+proxyConnector.targetRepoId());
+      //var targetImg = $("#proxy-connectors-grid-remoterepo-settings-edit-")
+      //                      +proxyConnector.sourceRepoId().replace(/\./g,"\\\.")+"-"+proxyConnector.targetRepoId().replace(/\./g,"\\\.");
+      $("#body_content" ).find(".popover" ).hide();
+      //targetImg.attr("data-content",'');//.popover('hide');
+    }
+
     this.displaySettings=function(sourceRepoId,targetRepoId,targetContentStartId, targetImgStartId){
       var proxyConnector=getProxyConnector(sourceRepoId,targetRepoId);
       showSettings(proxyConnector,targetContentStartId,targetImgStartId);
index 12e54a3c0cb442984e84d616a75472042a0a4cee..ef1fa182dd61e0893d4a79c78fec1559dbb5ec98 100644 (file)
       <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)},}">
-          <div id="proxy-connectors-grid-remoterepo-settings-content-${row.sourceRepoId()}-${row.targetRepoId()}"
-               style="display:none"></div>
+               data-bind="event: { mouseover: function(){ showSettings(row)},mouseout: function(){hideSettings(row)},}">
       </td>
       <td>
         <a data-bind="click: function(){ editProxyConnector(row)}" href="#">