Skip to content

Commit

Permalink
update help icon UI
Browse files Browse the repository at this point in the history
  • Loading branch information
bcwu committed Jul 22, 2021
1 parent af936b5 commit 841395d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 37 deletions.
47 changes: 14 additions & 33 deletions rsconnect_jupyter/static/connect.js
Original file line number Diff line number Diff line change
Expand Up @@ -1067,18 +1067,17 @@ define([
' <span class="help-block"></span>',
' </div>',
' </div>',
' <div id="hide-all-input-wrapper">',
' <div id="hide-all-input">',
' <input type="checkbox" id="hide_all_input" name="hide_all_input" value="hide_all_input">',
' <label for="hide_all_input"> Hide all input code cells </label>',
' </div>',
' </div>',
' <div id="hide-tagged-input-wrapper">',
' <div id="hide-tagged-input">',
' <input type="checkbox" id="hide_tagged_input" name="hide_tagged_input" value="hide_tagged_input">',
' <label for="hide_tagged_input"> Hide input code cells with the <span class="code">"hide_input"</span> tag </label>',
' </div>',
' </div>',
' <div id="hide-input-wrapper">',
' <label for="hide-input-wrapper"> Hide Input</label>',
' </div>',
' <div id="hide-all-input">',
' <input type="checkbox" id="hide_all_input" name="hide_all_input" value="hide_all_input">',
' <label for="hide_all_input"> Hide all input code cells </label>',
' </div>',
' <div id="hide-tagged-input">',
' <input type="checkbox" id="hide_tagged_input" name="hide_tagged_input" value="hide_tagged_input">',
' <label for="hide_tagged_input"> Hide input code cells with the <span class="code">"hide_input"</span> tag </label>',
' </div><br>',
' <div id="add-files">',
' <label for="rsc-add-files" id="rsc-add-files-label" class="rsc-label">Additional Files</label>',
' <button id="rsc-add-files" class="btn btn-default">Select Files...</button>',
Expand Down Expand Up @@ -1397,28 +1396,10 @@ define([
$('#rsc-publish-source > label').append(helpIcon);
})();

// setup hide all input help icon
(function() {
var msg =
'<a href="https://docs.rstudio.com/rsconnect-jupyter/usage/#hide-all-input" target="_blank">Check hide all input documentation</a>';

var helpIcon = $(
[
'<a tabindex="0" role="button" data-toggle="popover" data-trigger="focus">',
'<i class="fa fa-question-circle rsc-fa-icon"></i>'
].join('')
)
.data('content', msg)
.data('html', true)
.popover();

$('#hide-all-input-wrapper').append(helpIcon);
})();

// setup hide tagged input help icon
// setup hide input help icon
(function() {
var msg =
'<a href="https://docs.rstudio.com/rsconnect-jupyter/usage/#hide-tagged-input" target="_blank">Check hide tagged input documentation</a>';
'<a href="https://docs.rstudio.com/rsconnect-jupyter/usage/#hide-all-input" target="_blank">Hide input documentation</a>';

var helpIcon = $(
[
Expand All @@ -1430,7 +1411,7 @@ define([
.data('html', true)
.popover();

$('#hide-tagged-input-wrapper').append(helpIcon);
$('#hide-input-wrapper').append(helpIcon);
})();

var form = publishModal.find('form').on('submit', function(e) {
Expand Down
5 changes: 1 addition & 4 deletions rsconnect_jupyter/static/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,7 @@ p {
text-align: right;
}

#hide-all-input-wrapper {
display:flex;
}

#hide-tagged-input-wrapper {
#hide-input-wrapper {
display:flex;
}

0 comments on commit 841395d

Please sign in to comment.