-
-
Notifications
You must be signed in to change notification settings - Fork 227
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed toggler for stable/testing channel
- Loading branch information
Showing
6 changed files
with
43 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
title: Generic Ajax | ||
|
||
access: | ||
admin.configuration: true | ||
admin.super: true | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import $ from 'jquery'; | ||
import request from '../utils/request'; | ||
|
||
const switcher = $('input[type="radio"][name="channel-switch"]'); | ||
|
||
if (switcher) { | ||
switcher.on('change', (event) => { | ||
let radio = $(event.target); | ||
let url = `${radio.parent('[data-url]').data('url')}`; | ||
|
||
request(url, { | ||
method: 'post', | ||
body: { | ||
task: 'gpmRelease', | ||
release: radio.val() | ||
} | ||
}, | ||
(response) => { | ||
if (response.reload) { | ||
global.location.reload(); | ||
} | ||
}); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters