mirror of https://github.com/apache/archiva.git
use a static popover mode with button instead of mouseover which is ugly
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1378137 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
eb75f825f6
commit
a497642645
|
@ -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");
|
||||
}
|
||||
|
||||
hideSettings=function(proxyConnector){
|
||||
$("#body_content" ).find(".popover" ).hide();
|
||||
}
|
||||
|
||||
var targetContent = $(id);
|
||||
targetContent.html("");
|
||||
|
||||
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) {
|
||||
|
|
|
@ -714,9 +714,12 @@
|
|||
<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="#">
|
||||
|
|
Loading…
Reference in New Issue