• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python common.ideviceHeader函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



在下文中一共展示了ideviceHeader函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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


示例16: renderView

    def renderView(self, style, preview=False):
        """
        Returns an XHTML string for viewing this block
        """
        lb = "\n" #Line breaks
        html = common.ideviceHeader(self, style, "view")
        html += '<form name="quizForm%s" id="quizForm%s" action="javascript:calcScore2();">' % (self.idevice.id, self.idevice.id)
        html += lb
        html += u'<input type="hidden" name="passrate" id="passrate-'+self.idevice.id+'" value="'+self.idevice.passRate+'" />'+lb
        for element in self.questionElements:
            if preview: 
                html += element.renderPreview()
            else:
                html += element.renderView()
        html += '<div class="block iDevice_buttons">'+lb
        html += '<p><input type="submit" name="submitB" value="' + c_("SUBMIT ANSWERS")+'" /> '+common.javaScriptIsRequired()+'</p>'+lb
        html += '</div>'+lb                
        html += '</form>'+lb
        html += common.ideviceFooter(self, style, "view")

        return html
开发者ID:RichDijk,项目名称:eXe,代码行数:21,代码来源:quiztestblock.py


示例17: renderView

    def renderView(self, style):
        """
        Returns an XHTML string for viewing this block
        """
        lb = "\n" #Line breaks
        dT = common.getExportDocType()
        sectionTag = "div"
        if dT == "HTML5":
            sectionTag = "section"
            
        html = common.ideviceHeader(self, style, "view")
        html += self.instructionElement.renderView()
        
        for element in self.questionElements:
            html += "<"+sectionTag+" class=\"question\">"+lb
            html += element.renderQuestionView()
            html += element.renderFeedbackView()
            html += "</"+sectionTag+">"+lb
            
        html += common.ideviceFooter(self, style, "view")

        return html
开发者ID:Rafav,项目名称:iteexe,代码行数:22,代码来源:truefalseblock.py


示例18: renderPreview

    def renderPreview(self, style):
        """
        Returns an XHTML string for previewing this block
        """

        lb = "\n" #Line breaks
        dT = common.getExportDocType()
        figureTag = "div"
        if dT == "HTML5":
            figureTag = "figure"         
        
        html = common.ideviceHeader(self, style, "preview")
        
        html += '<div class="iDevice_content">'+lb
        html += '<'+figureTag+' class="image_text" style="width:'+str(self.idevice.imageMagnifier.width)+'px;float:'+self.idevice.float+';'
        if self.idevice.float == 'left':
            html += 'margin:0 20px 20px 0'
        if self.idevice.float == 'right':
            html += 'margin:0 0 20px 20px'
        html += '">'+lb
        html += self.imageMagnifierElement.renderPreview()
        if self.idevice.caption != '':
            html = html.replace(' alt="" ',' alt="'+self.idevice.caption.replace('"','&quot;')+'" ', 1)
            if dT == "HTML5":
                html += '<figcaption style="font-weight:bold">'+self.idevice.caption+'</figcaption>'+lb
            else:
                html += '<strong>'+self.idevice.caption+'</strong>'+lb
        html += '</'+figureTag+'>'+lb 
        text = self.textElement.renderPreview()
        if text:
            text = text.replace('"block iDevice_content"', '"iDevice_text"', 1)
            html += text
        else:
            html += '&nbsp;'
        html += '</div>'+lb # /.iDevice_content
        
        html += common.ideviceFooter(self, style, "preview")

        return html
开发者ID:Rafav,项目名称:iteexe,代码行数:39,代码来源:imagemagnifierblock.py


示例19: renderPreview

 def renderPreview(self, style):
     html = common.ideviceHeader(self, style, "preview")
     html += self.renderHTML(preview_mode = True)
     html += common.ideviceFooter(self, style, "preview")
     return html
开发者ID:UstadMobile,项目名称:exelearning-ustadmobile-work,代码行数:5,代码来源:textinputblock.py


示例20: renderView

 def renderView(self, style):
     html = common.ideviceHeader(self, style, "view")
     html += self.content_element.renderPreview()
     html += common.ideviceFooter(self, style, "view")
     
     return html
开发者ID:UstadMobile,项目名称:exelearning-ustadmobile-work,代码行数:6,代码来源:generichtmlblock.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python common.nodeHasMediaelement函数代码示例发布时间:2022-05-24
下一篇:
Python common.ideviceFooter函数代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap