当前位置: 首页>>代码示例>>Python>>正文


Python common.ideviceHeader函数代码示例

本文整理汇总了Python中exe.webui.common.ideviceHeader函数的典型用法代码示例。如果您正苦于以下问题:Python ideviceHeader函数的具体用法?Python ideviceHeader怎么用?Python ideviceHeader使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了ideviceHeader函数的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
开发者ID:RichDijk,项目名称:eXe,代码行数:25,代码来源:quiztestblock.py

示例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
开发者ID:tquilian,项目名称:exelearningTest,代码行数:8,代码来源:block.py

示例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
开发者ID:exelearning,项目名称:iteexe,代码行数:9,代码来源:genericblock.py

示例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
开发者ID:tquilian,项目名称:exelearningTest,代码行数:9,代码来源:block.py

示例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    
开发者ID:UstadMobile,项目名称:exelearning-ustadmobile-work,代码行数:9,代码来源:multiselectblock.py

示例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
开发者ID:UstadMobile,项目名称:exelearning-extjs5-mirror,代码行数:9,代码来源:wikipediablock.py

示例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
开发者ID:RichDijk,项目名称:eXe,代码行数:10,代码来源:sortblock.py

示例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
开发者ID:Rafav,项目名称:iteexe,代码行数:10,代码来源:freetextblock.py

示例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
开发者ID:Rafav,项目名称:iteexe,代码行数:11,代码来源:rssblock.py

示例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
开发者ID:RichDijk,项目名称:eXe,代码行数:12,代码来源:multichoiceblock.py

示例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
开发者ID:RichDijk,项目名称:eXe,代码行数:12,代码来源:multimediablock.py

示例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
开发者ID:RichDijk,项目名称:eXe,代码行数:13,代码来源:sortblock.py

示例13: 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
开发者ID:UstadMobile,项目名称:exelearning-extjs5-mirror,代码行数:15,代码来源:wikipediablock.py

示例14: 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
开发者ID:Rafav,项目名称:iteexe,代码行数:15,代码来源:seleccionmultiplefpdblock.py

示例15: renderView

    def renderView(self, style):
        """
        Returns an XHTML string for viewing this block
        """        
        log.debug("renderView")
        appletcode = self.idevice.appletCode
        appletcode = appletcode.replace('&gt;', '>')
        appletcode = appletcode.replace('&lt;', '<')
        appletcode = appletcode.replace('&quot;', '"')
        appletcode = appletcode.replace('&nbsp;', '')
        appletcode = appletcode.replace('\xC2\x82','&#130')
        
        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
开发者ID:Rafav,项目名称:iteexe,代码行数:20,代码来源:appletblock.py


注:本文中的exe.webui.common.ideviceHeader函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。