Commit 02c2b33c authored by Ad Schellevis's avatar Ad Schellevis

(firmware) move tooltip to button, apply tooltip for dynamic generated...

(firmware) move tooltip to button, apply tooltip for dynamic generated buttons. closes https://github.com/opnsense/core/issues/830
parent 02c5681b
......@@ -212,15 +212,15 @@ POSSIBILITY OF SUCH DAMAGE.
'<td>' + row['flatsize'] + '</td>' +
'<td>' + row['comment'] + '</td>' +
'<td>' +
'<button class="btn btn-default btn-xs act_reinstall" data-package="' + row['name'] + '">' +
'<span data-toggle="tooltip" data-placement="left" title="Reinstall ' + row['name'] + '" class="fa fa-recycle">' +
'</span></button> ' + (row['locked'] === '1' ?
'<button class="btn btn-default btn-xs act_unlock" data-package="' + row['name'] + '">' +
'<span data-toggle="tooltip" data-placement="left" title="Unlock ' + row['name'] + '" class="fa fa-lock">' +
'<button class="btn btn-default btn-xs act_reinstall" data-package="' + row['name'] + '" ' +
' data-toggle="tooltip" data-placement="left" title="Reinstall ' + row['name'] + '">' +
'<span class="fa fa-recycle"></span></button> ' + (row['locked'] === '1' ?
'<button data-toggle="tooltip" data-placement="left" title="Unlock ' + row['name'] + '" class="btn btn-default btn-xs act_unlock" data-package="' + row['name'] + '">' +
'<span class="fa fa-lock">' +
'</span></button>' :
'<button class="btn btn-default btn-xs act_lock" data-package="' + row['name'] + '">' +
'<span data-toggle="tooltip" data-placement="left" title="Lock ' + row['name'] + '" class="fa fa-unlock">' +
'</span></button>'
'<button class="btn btn-default btn-xs act_lock" data-package="' + row['name'] + '" ' +
' data-toggle="tooltip" data-placement="left" title="Lock ' + row['name'] + '" >' +
'<span class="fa fa-unlock"></span></button>'
) + '</td>' +
'</tr>'
);
......@@ -240,11 +240,13 @@ POSSIBILITY OF SUCH DAMAGE.
'<td>' + row['flatsize'] + '</td>' +
'<td>' + row['comment'] + '</td>' +
'<td>' + (row['name'] in installed ?
'<button class="btn btn-default btn-xs act_remove" data-package="' + row['name'] + '">' +
'<span data-toggle="tooltip" data-placement="left" title="Remove ' + row['name'] + '" class="fa fa-trash">' +
'<button class="btn btn-default btn-xs act_remove" data-package="' + row['name'] + '" '+
' data-toggle="tooltip" data-placement="left" title="Remove ' + row['name'] + '">' +
'<span class="fa fa-trash">' +
'</span></button>' :
'<button class="btn btn-default btn-xs act_install" data-package="' + row['name'] + '">' +
'<span data-toggle="tooltip" data-placement="left" title="Install ' + row['name'] + '" class="fa fa-plus">' +
'<button class="btn btn-default btn-xs act_install" data-package="' + row['name'] + '" ' +
' data-toggle="tooltip" data-placement="left" title="Install ' + row['name'] + '">' +
'<span class="fa fa-plus">' +
'</span></button>'
) + '</td>' + '</tr>'
);
......@@ -277,6 +279,8 @@ POSSIBILITY OF SUCH DAMAGE.
event.preventDefault();
action('install', $(this).data('package'));
});
// attach tooltip to generated buttons
$('[data-toggle="tooltip"]').tooltip();
});
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment