forked from openlp/openlp
Only show stage chords controls if enabled in settings.
This commit is contained in:
parent
12c2b5e578
commit
374e40e242
@ -16,7 +16,7 @@
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., 59 *
|
||||
* Temple Place, Suite 330, Boston, MA 02111-1307 USA *
|
||||
******************************************************************************/
|
||||
var lastChord;
|
||||
var lastChord;
|
||||
|
||||
function getTransposeValue(songId) {
|
||||
if (localStorage.getItem(songId + '_transposeValue')) {return localStorage.getItem(songId + '_transposeValue');}
|
||||
@ -78,7 +78,8 @@ function transposeChord(chord, transposeValue) {
|
||||
|
||||
var OpenLPChordOverflowFillCount = 0;
|
||||
window.OpenLP = {
|
||||
showchords:true,
|
||||
showchords:false,
|
||||
stageviewChords:false,
|
||||
loadService: function (event) {
|
||||
$.getJSON(
|
||||
"/api/service/list",
|
||||
@ -251,11 +252,39 @@ window.OpenLP = {
|
||||
m = '0' + m + '';
|
||||
div.html(h + ":" + m);
|
||||
},
|
||||
stageChords: function(stageviewChords) {
|
||||
if (stageviewChords != OpenLP.stageviewChords) {
|
||||
OpenLP.stageviewChords = stageviewChords;
|
||||
OpenLP.showchords = stageviewChords;
|
||||
if (!stageviewChords) {
|
||||
$('#transpose').hide();
|
||||
$('#transposedown').hide();
|
||||
$('#transposevalue').hide();
|
||||
$('#transposeup').hide();
|
||||
$('#transposeup').hide();
|
||||
$('#capodisplay').hide();
|
||||
$('#chords').hide();
|
||||
$('#plus').hide();
|
||||
$('#minus').hide();
|
||||
} else {
|
||||
$('#transpose').show();
|
||||
$('#transposedown').show();
|
||||
$('#transposevalue').show();
|
||||
$('#transposeup').show();
|
||||
$('#transposeup').show();
|
||||
$('#capodisplay').show();
|
||||
$('#chords').show();
|
||||
$('#plus').show();
|
||||
$('#minus').show();
|
||||
}
|
||||
}
|
||||
},
|
||||
pollServer: function () {
|
||||
$.getJSON(
|
||||
"/api/poll",
|
||||
function (data, status) {
|
||||
OpenLP.updateClock(data);
|
||||
OpenLP.stageChords(data.results.stageviewChords);
|
||||
if (OpenLP.currentItem != data.results.item || OpenLP.currentService != data.results.service) {
|
||||
OpenLP.currentItem = data.results.item;
|
||||
OpenLP.currentService = data.results.service;
|
||||
|
@ -477,7 +477,8 @@ class HttpRouter(RegistryProperties):
|
||||
'display': self.live_controller.desktop_screen.isChecked(),
|
||||
'version': 2,
|
||||
'isSecure': Settings().value(self.settings_section + '/authentication enabled'),
|
||||
'isAuthorised': self.authorised
|
||||
'isAuthorised': self.authorised,
|
||||
'stageviewChords': Settings().value('songs/stageview chords'),
|
||||
}
|
||||
self.do_json_header()
|
||||
return json.dumps({'results': result}).encode()
|
||||
|
@ -66,9 +66,9 @@ __default_settings__ = {
|
||||
'songs/songselect username': '',
|
||||
'songs/songselect password': '',
|
||||
'songs/songselect searches': '',
|
||||
'songs/chords': True,
|
||||
'songs/stageview chords': False,
|
||||
'songs/mainview chords': False
|
||||
'songs/stageview chords': True,
|
||||
'songs/mainview chords': False,
|
||||
'songs/disable chords import': False,
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user