* 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
this.availableLayouts = window.managedRepositoryTypes;
+ showCronExpressionDoc=function(){
+ //$.log("showCronExpressionDoc") ;
+ }
+
this.save=function(){
var valid = $("#main-content").find("#managed-repository-edit-form").valid();
if (valid==false) {
activateManagedRepositoryEditTab();
mainContent.find("#managed-repository-edit-li a").html($.i18n.prop('edit'));
activateManagedRepositoryFormValidation();
+ activatePopoverDoc();
}
scanNow=function(managedRepository){
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"));
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
//-----------------------------------------
<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">