]> source.dussan.org Git - archiva.git/commitdiff
fix hidden div place in the table to prevent weird screen issue
authorOlivier Lamy <olamy@apache.org>
Mon, 13 Feb 2012 15:57:54 +0000 (15:57 +0000)
committerOlivier Lamy <olamy@apache.org>
Mon, 13 Feb 2012 15:57:54 +0000 (15:57 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1243570 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/archiva/templates/proxy-connectors.html

index e8c03f751cecc360ca93fbf8c774be046f810555..9b8b13ee2144d189ff1253a19d437aeb29dd242e 100644 (file)
@@ -356,9 +356,9 @@ $(function() {
       return res;
     }
 
-    showSettings=function(proxyConnector){
+    showSettings=function(proxyConnector,targetContentStartId, targetImgStartId){
       //proxyConnector=getProxyConnector(proxyConnector.sourceRepoId(),proxyConnector.targetRepoId());
-      var targetContent = $("#proxy-connectors-grid-remoterepo-settings-content-"
+      var targetContent = $( (targetContentStartId?targetContentStartId:"#proxy-connectors-grid-remoterepo-settings-content-")
                                 +proxyConnector.sourceRepoId()+"-"+proxyConnector.targetRepoId());
       targetContent.html("");
       targetContent.append($("#proxy-connectors-remote-settings-popover-tmpl")
@@ -367,8 +367,8 @@ $(function() {
                                     proxyConnector:ko.toJS(proxyConnector)
                                     }));
 
-      var targetImg = $("#proxy-connectors-grid-remoterepo-settings-edit-"+proxyConnector.sourceRepoId()
-                            +"-"+proxyConnector.targetRepoId());
+      var targetImg = $((targetImgStartId?targetImgStartId:"#proxy-connectors-grid-remoterepo-settings-edit-")
+                            +proxyConnector.sourceRepoId()+"-"+proxyConnector.targetRepoId());
       targetImg.attr("data-content",targetContent.html());
       targetImg.popover(
           {
index 09e19650b933eb12c8ffc7baf9efe2633cb0d00a..db7a441ac3ef93106457c20ce6c829d8c8879a0d 100644 (file)
     <tr data-bind="css:{ 'modified': row.modified()}">
       <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()}"
+      <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)},}"></td>
+               data-bind="event: { mouseover: function(){ showSettings(row)},}">
+          <div id="proxy-connectors-grid-remoterepo-settings-content-${row.sourceRepoId()}-${row.targetRepoId()}"
+               style="display:none"></div>
+      </td>
       <td>
         <a data-bind="click: function(){ editProxyConnector(row)}" href="#">
            ${$.i18n.prop('edit')}
         </a>
-        <div id="proxy-connectors-grid-remoterepo-settings-content-${row.sourceRepoId()}-${row.targetRepoId()}"
-             style="display:none"></div>
       </td>
       <td>
         <a href="#" data-bind="click: function(){ deleteProxyConnector(row)}">