Merge branch 'bugron-bugron-bug_btn_enhancement_merged' into staging

t push origin staging:
This commit is contained in:
Quincy Larson
2015-09-07 07:54:59 -07:00
2 changed files with 17 additions and 1 deletions

View File

@ -66,10 +66,20 @@ $(document).ready(function() {
}, 200);
});
$('#search-issue').unbind('click');
$('#search-issue').on('click', function() {
var queryIssue = window.location.href.toString();
window.open('https://github.com/FreeCodeCamp/FreeCodeCamp/issues?q=is:issue is:all '+ queryIssue.substr(queryIssue.lastIndexOf('challenges/') + 11).replace('/', ''), '_blank');
});
$('#report-issue').unbind('click');
$('#report-issue').on('click', function() {
var textMessage = 'https://github.com/freecodecamp/freecodecamp/issues/new?&body=Challenge ' + window.location.href + ' has an issue.';
textMessage += ' User Agent is: <code>' + navigator.userAgent + '</code>.';
textMessage += ' Please describe how to reproduce this issue, and include links to screenshots if possible.%0A%0A';
textMessage = textMessage.replace(';', ','); //GitHub cuts User Agent text because of ';' symbol so I just replace it with ','
$('#issue-modal').modal('hide');
window.open('https://github.com/freecodecamp/freecodecamp/issues/new?&body=Challenge '+ window.location.href +' has an issue. Please describe how to reproduce it, and include links to screenshots if possible.', '_blank')
window.open(textMessage, '_blank');
});
$('#completed-courseware').unbind('click');

View File

@ -20,6 +20,12 @@
.modal-body.text-center
h3 This will open our GitHub Issues page.
h3 Please tell us how to reproduce the bug and link us to screenshots if possible.
h3 It's recommended first to search issues in GitHub. It could be a similar issue opened or already solved!
h3
| Also take a look at this helpful Wiki article:
br
a(href='https://github.com/FreeCodeCamp/FreeCodeCamp/wiki/Help-I%27ve-Found-a-Bug', target='_blank') Help I've Found a Bug
a.btn.btn-lg.btn-success.btn-block#search-issue(name='_csrf', value=_csrf) Search issues on this challenge in GitHub
a.btn.btn-lg.btn-primary.btn-block#report-issue(name='_csrf', value=_csrf) Create my GitHub issue
a.btn.btn-lg.btn-info.btn-block(href='#', data-dismiss='modal', aria-hidden='true') Cancel