本文整理汇总了Python中exe.webui.common.ideviceFooter函数的典型用法代码示例。如果您正苦于以下问题:Python ideviceFooter函数的具体用法?Python ideviceFooter怎么用?Python ideviceFooter使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ideviceFooter函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: renderPreview
def renderPreview(self, style):
"""
Returns an XHTML string for previewing this block
"""
lb = "\n" #Line breaks
html = common.ideviceHeader(self, style, "preview")
html += u'<input type="hidden" name="passrate" id="passrate-'+self.idevice.id+'" value="'+self.idevice.passRate+'" />'
for element in self.questionElements:
html += element.renderPreview()
html += '<div class="block iDevice_buttons">'+lb
html += '<p><input type="submit" name="submitScore" value="' + c_("SUBMIT ANSWERS")+'" /></p>'
html += '</div>'+lb
if not self.idevice.score == -1:
message = c_("Your score is ") + unicode(self.idevice.score) + "%"
html += '<script type="text/javascript">alert("'+ message+ '")</script>'
self.idevice.score = -1
html += common.ideviceFooter(self, style, "preview")
return html
示例2: renderPreview
def renderPreview(self, style):
"""
Returns an XHTML string for previewing this block during editing
"""
html = common.ideviceHeader(self, style, "preview")
html += self.renderViewContent()
html += common.ideviceFooter(self, style, "preview")
return html
示例3: renderPreview
def renderPreview(self, style):
"""
Returns an XHTML string for previewing this block during editing
"""
html = common.ideviceHeader(self, style, "preview")
for element in self.elements:
html += element.renderPreview()
html += common.ideviceFooter(self, style, "preview")
return html
示例4: renderView
def renderView(self, style):
"""
Returns an XHTML string for viewing this block,
i.e. when exported as a webpage or SCORM package
"""
html = common.ideviceHeader(self, style, "view")
html += self.renderViewContent()
html += common.ideviceFooter(self, style, "view")
return html
示例5: renderView
def renderView(self, style):
"""
Returns an XHTML string for viewing this block
"""
html = common.ideviceHeader(self, style, "view")
for element in self.questionElements:
html += element.renderView()
html += common.ideviceFooter(self, style, "view")
return html
示例6: renderPreview
def renderPreview(self, style):
"""
Returns an XHTML string for previewing this block
"""
log.debug("renderPreview")
html = common.ideviceHeader(self, style, "preview")
html += self.articleElement.renderPreview()
html += common.ideviceFooter(self, style, "preview")
return html
示例7: renderView
def renderView(self, style):
"""
Returns an XHTML string for viewing this block
"""
# html = u"<div class=\"iDevice "
# html += u"emphasis"+unicode(self.idevice.emphasis)+"\">\n"
html = common.ideviceHeader(self, style, "view")
html += self._renderGame(False)
html += common.ideviceFooter(self, style, "view")
return html
示例8: renderPreview
def renderPreview(self, style):
"""
Returns an XHTML string for previewing this block
"""
if hasattr(self.idevice, 'parent') and self.idevice.parent and not self.idevice.parent.edit:
return u""
html = common.ideviceHeader(self, style, "preview")
html += self.contentElement.renderPreview()
html += common.ideviceFooter(self, style, "preview")
return html
示例9: renderView
def renderView(self, style):
"""
Returns an XHTML string for viewing this block
"""
log.debug("renderView")
content = self.rssElement.renderView()
content = re.sub(r'src="/.*?/resources/', 'src="', content)
html = common.ideviceHeader(self, style, "view")
html += content
html += common.ideviceFooter(self, style, "view")
return html
示例10: renderPreview
def renderPreview(self, style):
"""
Returns an XHTML string for previewing this block
"""
html = common.ideviceHeader(self, style, "preview")
for element in self.questionElements:
html += element.renderPreview("/images/panel-amusements.png","/images/stock-stop.png")
html += common.ideviceFooter(self, style, "preview")
return html
示例11: renderView
def renderView(self, style):
"""
Returns an XHTML string for viewing this block
"""
log.debug("renderView")
html = common.ideviceHeader(self, style, "view")
html += u"<div class=\"media\">"
html += self.mediaElement.renderView()
html += "</div>"
html += self.textElement.renderView()
html += common.ideviceFooter(self, style, "view")
return html
示例12: renderPreview
def renderPreview(self, style):
"""
Returns an XHTML string for previewing this block
"""
# html = u"<div class=\"iDevice "
# html += u"emphasis"+unicode(self.idevice.emphasis)+"\" "
# html += u"ondblclick=\"submitLink('edit',"+self.id+", 0);\">\n"
html = common.ideviceHeader(self, style, "preview")
html += self._renderGame(True)
# html += self.renderViewButtons()
# html += "</div>\n"
html += common.ideviceFooter(self, style, "preview")
return html
示例13: renderPreview
def renderPreview(self, style):
"""
Returns an XHTML string for previewing this block
"""
html = common.ideviceHeader(self, style, "preview")
aux = self.questionElements[len(self.questionElements) - 1]
for element in self.questionElements:
if element == aux:
html += element.renderPreview()
else:
html += element.renderPreview() + "<br/>"
html += common.ideviceFooter(self, style, "preview")
return html
示例14: renderView
def renderView(self, style):
"""
Returns an XHTML string for viewing this block
"""
log.debug("renderView")
content = self.articleElement.renderView()
# content = re.sub(r'src="resources/', 'src="', content)
content = re.sub(r'src="http://127.0.0.1:\d+/newPackage.*/resources/', 'src="', content)
content = re.sub(r'src="/newPackage.*/resources/', 'src="', content)
content = re.sub(r'src=\'/newPackage.*/resources/', 'src="', content)
content = re.sub(r'src=\"/newPackage.*/resources/', 'src="', content)
html = common.ideviceHeader(self, style, "view")
html += content
html += common.ideviceFooter(self, style, "view")
return html
示例15: renderView
def renderView(self, style):
"""
Returns an XHTML string for viewing this block
"""
log.debug("renderView")
appletcode = self.idevice.appletCode
appletcode = appletcode.replace('>', '>')
appletcode = appletcode.replace('<', '<')
appletcode = appletcode.replace('"', '"')
appletcode = appletcode.replace(' ', '')
appletcode = appletcode.replace('\xC2\x82','‚')
lb = "\n" #Line breaks
html = common.ideviceHeader(self, style, "view")
html += '<div class="iDevice_content">'+lb
html += appletcode+lb
html += '</div>'+lb
html += common.ideviceFooter(self, style, "view")
return html