From 7998e01615fa47209a6a18eeec5f4ce9e3660436 Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Tue, 28 Aug 2012 06:31:02 +0000 Subject: [PATCH] correctly close popover when mouseout git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1377984 13f79535-47bb-0310-9956-ffa450edef68 --- .../main/webapp/js/archiva/proxy-connectors.js | 16 ++++++++++++---- .../js/templates/archiva/repositories.html | 4 +--- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/proxy-connectors.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/proxy-connectors.js index 65177c55f..52adcb64a 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/proxy-connectors.js +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/proxy-connectors.js @@ -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); diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/templates/archiva/repositories.html b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/templates/archiva/repositories.html index 12e54a3c0..ef1fa182d 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/templates/archiva/repositories.html +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/templates/archiva/repositories.html @@ -716,9 +716,7 @@ - + data-bind="event: { mouseover: function(){ showSettings(row)},mouseout: function(){hideSettings(row)},}"> -- 2.39.5