summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2012-09-10 15:32:00 +0000
committerOlivier Lamy <olamy@apache.org>2012-09-10 15:32:00 +0000
commited54b795ae91516065a4141f11fc3593d5ed2362 (patch)
treeddb0ef2c1369ce9aaefc072746d1ad7140a01d86
parent011e33c2c3b93373d2b02983d419386985cab35b (diff)
downloadarchiva-ed54b795ae91516065a4141f11fc3593d5ed2362.tar.gz
archiva-ed54b795ae91516065a4141f11fc3593d5ed2362.zip
add a method to call activatePopoverDoc which will select class from #main-content and activate:
* popover-doc: popover on click and destroy on mouseover. * tooltip-doc: tooltip with hover trigger. git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1382942 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/repositories.js6
-rw-r--r--archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/utils.js14
-rw-r--r--archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/templates/archiva/repositories.html5
3 files changed, 25 insertions, 0 deletions
diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/repositories.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/repositories.js
index 472888eb1..b9fc45186 100644
--- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/repositories.js
+++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/repositories.js
@@ -177,6 +177,10 @@ define("archiva.repositories",["jquery","i18n","jquery.tmpl","bootstrap","jquery
this.availableLayouts = window.managedRepositoryTypes;
+ showCronExpressionDoc=function(){
+ //$.log("showCronExpressionDoc") ;
+ }
+
this.save=function(){
var valid = $("#main-content").find("#managed-repository-edit-form").valid();
if (valid==false) {
@@ -308,6 +312,7 @@ define("archiva.repositories",["jquery","i18n","jquery.tmpl","bootstrap","jquery
activateManagedRepositoryEditTab();
mainContent.find("#managed-repository-edit-li a").html($.i18n.prop('edit'));
activateManagedRepositoryFormValidation();
+ activatePopoverDoc();
}
scanNow=function(managedRepository){
@@ -946,6 +951,7 @@ define("archiva.repositories",["jquery","i18n","jquery.tmpl","bootstrap","jquery
var viewModel = new ManagedRepositoryViewModel(new ManagedRepository(),false,managedRepositoriesViewModel);
ko.applyBindings(viewModel,mainContent.find("#managed-repository-edit").get(0));
activateManagedRepositoryFormValidation();
+ activatePopoverDoc();
}
if ($(e.target).attr("href")=="#managed-repositories-view") {
mainContent.find("#managed-repository-edit-li a").html($.i18n.prop("add"));
diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/utils.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/utils.js
index 3eab02a92..182dcb453 100644
--- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/utils.js
+++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/utils.js
@@ -440,6 +440,20 @@ require(["jquery","jquery.tmpl","i18n"], function(jquery,jqueryTmpl,i18n) {
return str.replace(/\./g,"\\\.");
}
+ activatePopoverDoc=function(){
+ var mainContent=$("#main-content");
+ mainContent.find(".popover-doc" ).popover({html: true, trigger: 'manual'});
+ mainContent.find(".popover-doc" ).on("click",function(){
+ $(this).popover("show");
+ });
+
+ mainContent.find(".popover-doc" ).mouseover(function(){
+ $(this).popover("destroy");
+ });
+
+ mainContent.find(".tooltip-doc" ).tooltip({html: true, trigger: 'hover'});
+ }
+
//-----------------------------------------
// extends jquery tmpl to support var def
//-----------------------------------------
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 c2f083c55..71f626ee3 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
@@ -207,6 +207,11 @@
<label class="control-label" for="cronExpression">${$.i18n.prop('cronExpression')}</label>
<div class="controls">
<input type="text" id="cronExpression" class="required" name="cronExpression" size="40" data-bind="value: managedRepository.cronExpression"/>
+ <a class="btn btn-warning btn-mini popover-doc" id="rowcount-info-button"
+ data-original-title="${$.i18n.prop('cronExpression.help.title')}"
+ data-content="${$.i18n.prop('cronExpression.help.content')}">
+ <i class="icon-question-sign icon-white"></i>
+ </a>
</div>
</div>
<div class="control-group">