Implemented issue#536 - Tooltip in forms is not shown / only on hover / not no click.

This commit is contained in:
Martin Edenhofer 2016-12-13 14:55:10 +01:00
parent fa8bf6e65f
commit d6ee7025ab
4 changed files with 22 additions and 15 deletions

View file

@ -108,7 +108,7 @@ class App.ControllerForm extends App.Controller
if @fullForm
if !@formClass
@formClass = ''
fieldset = $('<form class="' + @formClass + '" autocomplete="off"><button class="btn">' + App.i18n.translateContent('Submit') + '</button></form>').prepend( fieldset )
fieldset = $('<form class="' + @formClass + '" autocomplete="off"><button class="btn">' + App.i18n.translateContent('Submit') + '</button></form>').prepend(fieldset)
# bind form events
if @events
@ -117,8 +117,11 @@ class App.ControllerForm extends App.Controller
evs = eventSelector.split(' ')
fieldset.find( evs[1] ).bind( evs[0], (e) -> callback(e) )
# bind tool tips
fieldset.find('.js-helpMessage').tooltip()
# return form
return fieldset
fieldset
###

View file

@ -60,7 +60,7 @@ class Index extends App.ControllerSubContent
new App.ControllerGenericNew(
pageData:
title: 'SLAs'
object: 'Sla'
object: 'SLA'
objects: 'SLAs'
genericObject: 'Sla'
container: @el.closest('.content')

View file

@ -1,6 +1,6 @@
<div class="<%= @attribute.tag %> form-group<%= " #{ @attribute.item_class }" if @attribute.item_class %>">
<div class="formGroup-label">
<label for="<%= @attribute.id %>"<% if @attribute.label_class: %> class="<%= @attribute.label_class %>"<% end %>><%- @T( @attribute.display ) %> <span><% if !@attribute.null: %>*<% end %></span></label>
<label for="<%= @attribute.id %>"<% if @attribute.label_class: %> class="<%= @attribute.label_class %>"<% end %>><%- @T(@attribute.display) %> <span><% if !@attribute.null: %>*<% end %></span></label>
<%- @item %>
<% if @bookmarkable: %>
<div class="align-right js-bookmark formGroup-bookmark">
@ -8,7 +8,7 @@
</div>
<% end %>
<% if @attribute.note: %>
<div class="help-message" title="<%- @Ti( @attribute.note ) + ' ' %>">
<div class="help-message js-helpMessage" title="<%- @Ti(@attribute.note) %>">
<%- @Icon('help') %>
</div>
<% end %>
@ -17,6 +17,6 @@
<% if @attribute.remove: %><span><a href="#" class="glyphicon glyphicon-minus"></a></span><% end %>
<% if @attribute.add: %><span><a href="#" class="glyphicon glyphicon-plus"></a></span><% end %>
<span class="help-inline"></span>
<span class="help-block"><% if @attribute.help: %><%- @T( @attribute.help ) + ' ' %><% end %><%- @attribute.helpLink %></span>
<span class="help-block"><% if @attribute.help: %><%- @T(@attribute.help) %><% end %><%- @attribute.helpLink %></span>
</div>
</div>

View file

@ -3684,6 +3684,10 @@ footer {
font-family: inherit;
}
.tooltip-inner {
max-width: 400px;
}
.popover {
font-family: inherit;
width: 372px;