Skip to content
This repository was archived by the owner on Jun 9, 2021. It is now read-only.

Commit 3a94670

Browse files
committed
Showing message on successful save #140
1 parent f9dde1c commit 3a94670

File tree

5 files changed

+22
-7
lines changed

5 files changed

+22
-7
lines changed

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,16 @@
33
Changelog of Pull Request Notifier for Bitbucket.
44

55
## Unreleased
6+
### GitHub [#140](https://github.com/tomasbjerre/pull-request-notifier-for-bitbucket/issues/140) Show notification when settings are saved
7+
Showing message on successful save
8+
9+
[7f30b9cf2b6cbee](https://github.com/tomasbjerre/pull-request-notifier-for-bitbucket/commit/7f30b9cf2b6cbee) Tomas Bjerre *2016-08-17 17:46:52*
10+
11+
## 2.36
612
### GitHub [#139](https://github.com/tomasbjerre/pull-request-notifier-for-bitbucket/issues/139) Bitbucket - PR Button created at project level shows up for other projects in the same host
713
Hiding project-level buttons from other projects
814

9-
[47b1aaea2806d9d](https://github.com/tomasbjerre/pull-request-notifier-for-bitbucket/commit/47b1aaea2806d9d) Tomas Bjerre *2016-08-12 15:32:23*
15+
[ad97c910e5cf25f](https://github.com/tomasbjerre/pull-request-notifier-for-bitbucket/commit/ad97c910e5cf25f) Tomas Bjerre *2016-08-12 15:32:45*
1016

1117
### No issue
1218
doc

docker-build.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
#!/bin/bash
2+
docker rm prnfb
23
docker build -t prnfb .

docker-logs.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/bash
2+
docker logs -f prnfb

src/main/resources/pr-triggerbutton.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ define('plugin/prnfb/pr-triggerbutton', [
2323
AJS.flag({
2424
close: 'auto',
2525
type: 'success',
26-
title: notificationResponse.notificationName.replace(/<script>/g,'script'),
26+
title: notificationResponse.notificationName.replace(/<script>/g, 'script'),
2727
body: '<p>You may check network tab in web browser for exact URL and response.</p>'
2828
});
2929
} else {
3030
AJS.flag({
3131
close: 'auto',
3232
type: 'error',
33-
title: notificationResponse.notificationName.replace(/<script>/g,'script'),
33+
title: notificationResponse.notificationName.replace(/<script>/g, 'script'),
3434
body: '<p>' + notificationResponse.status + ' ' + notificationResponse.uri + '</p>' +
3535
'<p>You may check network tab in web browser for exact URL and response.</p>'
3636
});
@@ -61,7 +61,7 @@ define('plugin/prnfb/pr-triggerbutton', [
6161
function loadSettingsAndShowButtons() {
6262
$.get(buttonsAdminUrl + '/repository/' + pageState.getRepository().id + '/pullrequest/' + pageState.getPullRequest().id, function(settings) {
6363
settings.forEach(function(item) {
64-
var $buttonDropdownItem = buttonTemplate(item.name.replace(/<script>/g,'script'));
64+
var $buttonDropdownItem = buttonTemplate(item.name.replace(/<script>/g, 'script'));
6565
$buttonDropdownItem.click(function() {
6666
var $this = $(this);
6767
$this.attr("disabled", "disabled");

src/main/resources/utils.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,19 @@ define('plugin/prnfb/utils', [
1717
if (data && data.uuid) {
1818
doSetupForm(formSelector, url + '/' + data.uuid);
1919
}
20+
AJS.flag({
21+
close: 'auto',
22+
type: 'success',
23+
title: 'Saved',
24+
body: '<p>=)</p>'
25+
});
2026
},
2127
error: function(xhr, status, error) {
2228
AJS.messages.error(".statusresponse", {
2329
title: 'Error',
2430
body: '<p>' +
25-
'Sent POST ' + url + ':<br/><code>' + jsonString.replace(/<script>/g,'script') + '</code><br/><br/>' +
26-
'Got:<br/><code>' + xhr.responseText.replace(/<script>/g,'script') + '</code><br/><br/>' +
31+
'Sent POST ' + url + ':<br/><code>' + jsonString.replace(/<script>/g, 'script') + '</code><br/><br/>' +
32+
'Got:<br/><code>' + xhr.responseText.replace(/<script>/g, 'script') + '</code><br/><br/>' +
2733
'</p>'
2834
});
2935
$("html, body").animate({
@@ -205,7 +211,7 @@ define('plugin/prnfb/utils', [
205211
$(formSelector + ' [name=uuid]').append('<option value="">New</option>');
206212
for (var i = 0; i < data.length; i++) {
207213
var name = data[i].name;
208-
name = name.replace(/<script>/g,'script')
214+
name = name.replace(/<script>/g, 'script')
209215
$(formSelector + ' [name=uuid]').append('<option value="' + data[i].uuid + '">' + (data[i].projectKey || '') + ' ' + (data[i].repositorySlug || '') + ' ' + name + '</option>');
210216
}
211217
});

0 commit comments

Comments
 (0)