Skip to content

Commit

Permalink
change toggle json text label for watson-developer-cloud#49
Browse files Browse the repository at this point in the history
  • Loading branch information
JAMES ZHANG committed May 13, 2016
1 parent 721b7ce commit dfd45cd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions public/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -1810,6 +1810,9 @@ pre[class*=" language-"] {
float: right; }
.summary-json {
display: none; }
.js-toggle-summary-json_hide {
display: none; }

.sentences {
min-width: 732px; }
.sentences--filters {
Expand Down
4 changes: 4 additions & 0 deletions public/js/demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ function allReady(thresholds, sampleText) {
$socialGraph = $('.summary-social-graph'),
$summaryJsonButton = $('.js-toggle-summary-json'),
$summaryJson = $('.js-summary-json'),
$summaryJsonView = $('.js-toggle-summary-json_show'),
$summaryJsonHide = $('.js-toggle-summary-json_hide'),
$summaryJsonCode = $('.js-summary-json .json--code'),
$emotionFilters = $('.filters--emotion'),
$writingFilters = $('.filters--writing'),
Expand Down Expand Up @@ -435,6 +437,8 @@ function allReady(thresholds, sampleText) {

$summaryJsonButton.click(function() {
$summaryJson.toggle();
$summaryJsonView.toggle();
$summaryJsonHide.toggle();
});
}

Expand Down
3 changes: 2 additions & 1 deletion views/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@
<span class="icon-hyperlink summary-view-code-button">
<img class="icon icon-code" src="images/icons/code.svg" />
<button class="base--a icon-hyperlink--button_BLANK js-toggle-summary-json" href="">
View JSON
<span class="js-toggle-summary-json_show">View JSON</span>
<span class="js-toggle-summary-json_hide">Hide JSON</span>
</button>
</span>
</div>
Expand Down

0 comments on commit dfd45cd

Please sign in to comment.