forked from openlp/openlp
Fix disply settings again - alerts coded
This commit is contained in:
parent
047e8efe1f
commit
6787a41eae
@ -47,6 +47,11 @@ HTMLSRC = u"""
|
|||||||
var t = null;
|
var t = null;
|
||||||
var transition = %s;
|
var transition = %s;
|
||||||
|
|
||||||
|
function displayAlert(alert){
|
||||||
|
var text1 = document.getElementById('alertmain');
|
||||||
|
text1.innerHTML = newtext;
|
||||||
|
}
|
||||||
|
|
||||||
function startfade(newtext){
|
function startfade(newtext){
|
||||||
var text1 = document.getElementById('lyricsmain');
|
var text1 = document.getElementById('lyricsmain');
|
||||||
var texto1 = document.getElementById('lyricsoutline');
|
var texto1 = document.getElementById('lyricsoutline');
|
||||||
@ -159,7 +164,7 @@ def build_html(item, screen, alert):
|
|||||||
build_image(width, height),
|
build_image(width, height),
|
||||||
build_lyrics(item),
|
build_lyrics(item),
|
||||||
build_footer(item),
|
build_footer(item),
|
||||||
build_alert(width, alert),
|
build_alert(width, height, alert),
|
||||||
build_image(width, height),
|
build_image(width, height),
|
||||||
build_blank(width, height),
|
build_blank(width, height),
|
||||||
"true" if theme and theme.display_slideTransition else "false",
|
"true" if theme and theme.display_slideTransition else "false",
|
||||||
@ -282,7 +287,6 @@ def build_lyrics(item):
|
|||||||
else:
|
else:
|
||||||
if theme.display_shadow:
|
if theme.display_shadow:
|
||||||
shadow = u'color: %s;' % (theme.display_shadow_color)
|
shadow = u'color: %s;' % (theme.display_shadow_color)
|
||||||
|
|
||||||
lyrics_html = style % (lyricscommon, lyricstable, outlinetable,
|
lyrics_html = style % (lyricscommon, lyricstable, outlinetable,
|
||||||
shadowtable, lyrics, outline, shadow)
|
shadowtable, lyrics, outline, shadow)
|
||||||
print lyrics_html
|
print lyrics_html
|
||||||
@ -319,7 +323,7 @@ def build_footer(item):
|
|||||||
return lyrics_html
|
return lyrics_html
|
||||||
|
|
||||||
|
|
||||||
def build_alert(width, alertTab):#
|
def build_alert(width, height, alertTab):#
|
||||||
style = """
|
style = """
|
||||||
.alertcommon { position: absolute; %s }
|
.alertcommon { position: absolute; %s }
|
||||||
.alerttable { z-index:8; %s }
|
.alerttable { z-index:8; %s }
|
||||||
@ -332,7 +336,7 @@ def build_alert(width, alertTab):#
|
|||||||
if alertTab:
|
if alertTab:
|
||||||
alertcommon = u'width: %spx; height: %spx; ' \
|
alertcommon = u'width: %spx; height: %spx; ' \
|
||||||
u'font-family %s; font-size: %spx; color: %s; ' % \
|
u'font-family %s; font-size: %spx; color: %s; ' % \
|
||||||
(width, 70, alertTab.font_face, alertTab.font_size,
|
(width, height, alertTab.font_face, alertTab.font_size,
|
||||||
alertTab.bg_color)
|
alertTab.bg_color)
|
||||||
alerttable = u'left: %spx; top: %spx;' % (0, 0)
|
alerttable = u'left: %spx; top: %spx;' % (0, 0)
|
||||||
if alertTab.location == 2:
|
if alertTab.location == 2:
|
||||||
|
@ -38,7 +38,8 @@ class GeneralTab(SettingsTab):
|
|||||||
"""
|
"""
|
||||||
self.screens = screens
|
self.screens = screens
|
||||||
self.monitorNumber = 0
|
self.monitorNumber = 0
|
||||||
self.overrideChanged = False
|
# Set to true to allow PostSetUp to work first time
|
||||||
|
self.overrideChanged = True
|
||||||
SettingsTab.__init__(self, u'General')
|
SettingsTab.__init__(self, u'General')
|
||||||
|
|
||||||
def preLoad(self):
|
def preLoad(self):
|
||||||
@ -414,7 +415,6 @@ class GeneralTab(SettingsTab):
|
|||||||
self.customYValueEdit.setEnabled(self.overrideCheckBox.isChecked())
|
self.customYValueEdit.setEnabled(self.overrideCheckBox.isChecked())
|
||||||
self.customHeightValueEdit.setEnabled(self.overrideCheckBox.isChecked())
|
self.customHeightValueEdit.setEnabled(self.overrideCheckBox.isChecked())
|
||||||
self.customWidthValueEdit.setEnabled(self.overrideCheckBox.isChecked())
|
self.customWidthValueEdit.setEnabled(self.overrideCheckBox.isChecked())
|
||||||
self.overrideChanged = False
|
|
||||||
|
|
||||||
def save(self):
|
def save(self):
|
||||||
"""
|
"""
|
||||||
@ -466,6 +466,7 @@ class GeneralTab(SettingsTab):
|
|||||||
Receiver.send_message(u'config_updated')
|
Receiver.send_message(u'config_updated')
|
||||||
# On save update the screens as well
|
# On save update the screens as well
|
||||||
self.postSetUp()
|
self.postSetUp()
|
||||||
|
self.overrideChanged = False
|
||||||
|
|
||||||
def postSetUp(self):
|
def postSetUp(self):
|
||||||
"""
|
"""
|
||||||
|
@ -175,7 +175,8 @@ class MainDisplay(DisplayWidget):
|
|||||||
The slide text to be displayed
|
The slide text to be displayed
|
||||||
"""
|
"""
|
||||||
log.debug(u'alert')
|
log.debug(u'alert')
|
||||||
self.frame.findFirstElement('td#alertmain').setInnerXml(text)
|
self.frame.evaluateJavaScript("displayAlert('" +
|
||||||
|
text.replace("\\", "\\\\").replace("\'", "\\\'") + "')")
|
||||||
|
|
||||||
def image(self, image):
|
def image(self, image):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user