Skip to content

Commit

Permalink
add help icons for hide cells checkboxes
Browse files Browse the repository at this point in the history
  • Loading branch information
bcwu committed Jul 21, 2021
1 parent 6707584 commit 012b6d2
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 8 deletions.
56 changes: 48 additions & 8 deletions rsconnect_jupyter/static/connect.js
Original file line number Diff line number Diff line change
Expand Up @@ -1067,14 +1067,18 @@ define([
' <span class="help-block"></span>',
' </div>',
' </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><br></br>',
' </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><br></br>',
' </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><br></br>',
' </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><br></br>',
' </div>',
' </div>',
' <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 @@ -1393,6 +1397,42 @@ 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
(function() {
var msg =
'<a href="https://docs.rstudio.com/rsconnect-jupyter/usage/#hide-tagged-input" target="_blank">Check hide tagged 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-tagged-input-wrapper').append(helpIcon);
})();

var form = publishModal.find('form').on('submit', function(e) {
e.preventDefault();
publishModal.find('.form-group').removeClass('has-error');
Expand Down
8 changes: 8 additions & 0 deletions rsconnect_jupyter/static/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,11 @@ p {
font-size: .7em;
text-align: right;
}

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

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

0 comments on commit 012b6d2

Please sign in to comment.