diff --git a/res/app/components/stf/common-ui/help-icon/help-icon-directive.js b/res/app/components/stf/common-ui/help-icon/help-icon-directive.js new file mode 100644 index 00000000..3438521e --- /dev/null +++ b/res/app/components/stf/common-ui/help-icon/help-icon-directive.js @@ -0,0 +1,13 @@ +require('./help-icon.css') + +module.exports = function clearButtonDirective() { + return { + restrict: 'EA', + replace: true, + scope: { + topic: '@', + tooltip: '@' + }, + template: require('./help-icon.jade') + } +} diff --git a/res/app/components/stf/common-ui/help-icon/help-icon.css b/res/app/components/stf/common-ui/help-icon/help-icon.css new file mode 100644 index 00000000..e69de29b diff --git a/res/app/components/stf/common-ui/help-icon/help-icon.jade b/res/app/components/stf/common-ui/help-icon/help-icon.jade new file mode 100644 index 00000000..ace890ec --- /dev/null +++ b/res/app/components/stf/common-ui/help-icon/help-icon.jade @@ -0,0 +1,2 @@ +a(ng-href='/#!/docs/{{topic}}', tooltip='{{tooltip}}', tooltip-placement='left').btn.btn-xs.btn-primary-outline.pull-right.transparent-border + i.fa.fa-question-circle diff --git a/res/app/components/stf/common-ui/help-icon/index.js b/res/app/components/stf/common-ui/help-icon/index.js new file mode 100644 index 00000000..5fcb5131 --- /dev/null +++ b/res/app/components/stf/common-ui/help-icon/index.js @@ -0,0 +1,2 @@ +module.exports = angular.module('stf.help-icon', []) + .directive('helpIcon', require('./help-icon-directive')) diff --git a/res/app/components/stf/common-ui/index.js b/res/app/components/stf/common-ui/index.js index 2db96e8f..1a1fc0a3 100644 --- a/res/app/components/stf/common-ui/index.js +++ b/res/app/components/stf/common-ui/index.js @@ -18,5 +18,6 @@ module.exports = angular.module('stf/common-ui', [ require('./icon-inside-input').name, require('./focus-element').name, require('./blur-element').name, - require('./stacked-icon').name + require('./stacked-icon').name, + require('./help-icon').name ]) diff --git a/res/app/control-panes/dashboard/remote-debug/remote-debug.jade b/res/app/control-panes/dashboard/remote-debug/remote-debug.jade index afb1b203..95e3dfde 100644 --- a/res/app/control-panes/dashboard/remote-debug/remote-debug.jade +++ b/res/app/control-panes/dashboard/remote-debug/remote-debug.jade @@ -2,8 +2,8 @@ .heading stacked-icon(icon='fa-bug', color='color-darkgreen') span(translate) Remote debug - a(ng-href='/#!/docs/remote-debug').pull-right - i.fa.fa-question-circle(tooltip='{{remoteDebugTooltip | translate}}', tooltip-placement='left') + help-icon(topic='remote-debug', tooltip='{{remoteDebugTooltip | translate}}') + .widget-content.padded .form-inline textarea(readonly, rows='1', ng-model='debugCommand', msd-elastic, text-focus-select).form-control.remote-debug-textarea diff --git a/res/app/control-panes/dashboard/shell/shell.jade b/res/app/control-panes/dashboard/shell/shell.jade index 45db838c..3b508a47 100644 --- a/res/app/control-panes/dashboard/shell/shell.jade +++ b/res/app/control-panes/dashboard/shell/shell.jade @@ -3,12 +3,11 @@ stacked-icon(icon='fa-terminal', color='color-darkgray') span(translate) Shell clear-button(ng-click='clear()', ng-disabled='!command && !data').btn-xs + help-icon(topic='remote-shell', tooltip='{{"Executes remote shell commands" | translate}}') - a(ng-href='/#!/docs/remote-shell').btn.btn-xs.btn-primary-outline.pull-right.transparent-border - i.fa.fa-book .widget-content.padded - // TODO: find why autofill doesn't work here + // TODO: autofill doesn't work here form(method='post', enable-autofill, ng-submit='run(command)') .input-group.form-inline input(type=text, ng-model='command', Xtext-focus-select,