forked from openlp/openlp
fix up pintservice form
This commit is contained in:
parent
3d556a9790
commit
7f58348c8c
@ -311,8 +311,8 @@ class Ui_MainWindow(object):
|
|||||||
self.export_language_item))
|
self.export_language_item))
|
||||||
add_actions(self.file_menu, (self.file_new_item, self.file_open_item,
|
add_actions(self.file_menu, (self.file_new_item, self.file_open_item,
|
||||||
self.file_save_item, self.file_save_as_item, self.recent_files_menu.menuAction(), None,
|
self.file_save_item, self.file_save_as_item, self.recent_files_menu.menuAction(), None,
|
||||||
self.file_import_menu.menuAction(), self.file_export_menu.menuAction(), None, self.print_service_order_item,
|
self.file_import_menu.menuAction(), self.file_export_menu.menuAction(), None,
|
||||||
self.file_exit_item))
|
self.print_service_order_item, self.file_exit_item))
|
||||||
add_actions(self.view_mode_menu, (self.mode_default_item, self.mode_setup_item, self.mode_live_item))
|
add_actions(self.view_mode_menu, (self.mode_default_item, self.mode_setup_item, self.mode_live_item))
|
||||||
add_actions(self.view_menu, (self.view_mode_menu.menuAction(), None, self.view_media_manager_item,
|
add_actions(self.view_menu, (self.view_mode_menu.menuAction(), None, self.view_media_manager_item,
|
||||||
self.view_service_manager_item, self.view_theme_manager_item, None, self.view_preview_panel,
|
self.view_service_manager_item, self.view_theme_manager_item, None, self.view_preview_panel,
|
||||||
|
@ -31,9 +31,10 @@ The actual print service dialog
|
|||||||
"""
|
"""
|
||||||
import datetime
|
import datetime
|
||||||
import os
|
import os
|
||||||
|
import html
|
||||||
|
import lxml.html
|
||||||
|
|
||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
from lxml import html
|
|
||||||
|
|
||||||
from openlp.core.common import Registry, Settings, UiStrings, translate
|
from openlp.core.common import Registry, Settings, UiStrings, translate
|
||||||
from openlp.core.lib import get_text_file_string
|
from openlp.core.lib import get_text_file_string
|
||||||
@ -183,7 +184,7 @@ class PrintServiceForm(QtGui.QDialog, Ui_PrintServiceDialog):
|
|||||||
self._add_element(
|
self._add_element(
|
||||||
'span', translate('OpenLP.ServiceManager', 'Custom Service Notes: '), div, classId='customNotesTitle')
|
'span', translate('OpenLP.ServiceManager', 'Custom Service Notes: '), div, classId='customNotesTitle')
|
||||||
self._add_element('span', html.escape(self.footer_text_edit.toPlainText()), div, classId='customNotesText')
|
self._add_element('span', html.escape(self.footer_text_edit.toPlainText()), div, classId='customNotesText')
|
||||||
self.document.setHtml(html.tostring(html_data).decode())
|
self.document.setHtml(lxml.html.tostring(html_data).decode())
|
||||||
self.preview_widget.updatePreview()
|
self.preview_widget.updatePreview()
|
||||||
|
|
||||||
def _add_preview_item(self, body, item, index):
|
def _add_preview_item(self, body, item, index):
|
||||||
@ -257,9 +258,9 @@ class PrintServiceForm(QtGui.QDialog, Ui_PrintServiceDialog):
|
|||||||
Tuple name/value pair to add as an optional attribute
|
Tuple name/value pair to add as an optional attribute
|
||||||
"""
|
"""
|
||||||
if text is not None:
|
if text is not None:
|
||||||
element = html.fragment_fromstring(str(text), create_parent=tag)
|
element = lxml.html.fragment_fromstring(str(text), create_parent=tag)
|
||||||
else:
|
else:
|
||||||
element = html.Element(tag)
|
element = lxml.html.Element(tag)
|
||||||
if parent is not None:
|
if parent is not None:
|
||||||
parent.append(element)
|
parent.append(element)
|
||||||
if classId is not None:
|
if classId is not None:
|
||||||
|
@ -1627,7 +1627,7 @@ class ServiceManager(OpenLPMixin, RegistryMixin, QtGui.QWidget, Ui_ServiceManage
|
|||||||
else:
|
else:
|
||||||
return parent_item.data(0, QtCore.Qt.UserRole)
|
return parent_item.data(0, QtCore.Qt.UserRole)
|
||||||
|
|
||||||
def print_service_order(self):
|
def print_service_order(self, field=None):
|
||||||
"""
|
"""
|
||||||
Print a Service Order Sheet.
|
Print a Service Order Sheet.
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user