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. ...@@ -212,15 +212,15 @@ POSSIBILITY OF SUCH DAMAGE.
'<td>' + row['flatsize'] + '</td>' + '<td>' + row['flatsize'] + '</td>' +
'<td>' + row['comment'] + '</td>' + '<td>' + row['comment'] + '</td>' +
'<td>' + '<td>' +
'<button class="btn btn-default btn-xs act_reinstall" data-package="' + row['name'] + '">' + '<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">' + ' data-toggle="tooltip" data-placement="left" title="Reinstall ' + row['name'] + '">' +
'</span></button> ' + (row['locked'] === '1' ? '<span class="fa fa-recycle"></span></button> ' + (row['locked'] === '1' ?
'<button class="btn btn-default btn-xs act_unlock" data-package="' + row['name'] + '">' + '<button data-toggle="tooltip" data-placement="left" title="Unlock ' + row['name'] + '" 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">' + '<span class="fa fa-lock">' +
'</span></button>' : '</span></button>' :
'<button class="btn btn-default btn-xs act_lock" data-package="' + row['name'] + '">' + '<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">' + ' data-toggle="tooltip" data-placement="left" title="Lock ' + row['name'] + '" >' +
'</span></button>' '<span class="fa fa-unlock"></span></button>'
) + '</td>' + ) + '</td>' +
'</tr>' '</tr>'
); );
...@@ -240,11 +240,13 @@ POSSIBILITY OF SUCH DAMAGE. ...@@ -240,11 +240,13 @@ POSSIBILITY OF SUCH DAMAGE.
'<td>' + row['flatsize'] + '</td>' + '<td>' + row['flatsize'] + '</td>' +
'<td>' + row['comment'] + '</td>' + '<td>' + row['comment'] + '</td>' +
'<td>' + (row['name'] in installed ? '<td>' + (row['name'] in installed ?
'<button class="btn btn-default btn-xs act_remove" data-package="' + row['name'] + '">' + '<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">' + ' data-toggle="tooltip" data-placement="left" title="Remove ' + row['name'] + '">' +
'<span class="fa fa-trash">' +
'</span></button>' : '</span></button>' :
'<button class="btn btn-default btn-xs act_install" data-package="' + row['name'] + '">' + '<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">' + ' data-toggle="tooltip" data-placement="left" title="Install ' + row['name'] + '">' +
'<span class="fa fa-plus">' +
'</span></button>' '</span></button>'
) + '</td>' + '</tr>' ) + '</td>' + '</tr>'
); );
...@@ -277,6 +279,8 @@ POSSIBILITY OF SUCH DAMAGE. ...@@ -277,6 +279,8 @@ POSSIBILITY OF SUCH DAMAGE.
event.preventDefault(); event.preventDefault();
action('install', $(this).data('package')); 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