Esempio n. 1
0
def JxBrowse():
	from controls import Jx__Model_CardModel_String	
	JxAnswerSettings = Jx__Model_CardModel_String("JxAnswerSettings")
	JxPreview.page().mainFrame().addToJavaScriptWindowObject("JxAnswerSettings",JxAnswerSettings)	
	JxPreview.setWindowTitle(u"Css and Template Browser")
        from html import Jx_Html_Preview
	JxPreview.setHtml(Jx_Html_Preview,JxResourcesUrl)
	JxPreview.activateWindow()
	JxPreview.show()
Esempio n. 2
0
def JxShowOut(stat):
    from database import display_complement
    from html import Jx_Html_DisplayStuff
    html = Jx_Html_DisplayStuff + display_complement(stat)+ """</body></html>"""
    JxPreview.setHtml(html,JxResourcesUrl)
    JxPreview.activateWindow()
    JxPreview.setWindowTitle("Facts Report")
    JxPreview.show()
Esempio n. 3
0
def JxShowIn(stat,label):
    from database import display_partition
    from html import Jx_Html_DisplayStuff
    html = Jx_Html_DisplayStuff + display_partition(stat,label)+ """</body></html>"""
    JxPreview.setHtml(html,JxResourcesUrl)
    JxPreview.activateWindow()
    JxPreview.setWindowTitle("Facts Report")
    JxPreview.show()
Esempio n. 4
0
def onJxGraphs():
    from database import eDeck
    JxGraphsJSon = eDeck.getJsonedGraphs()
    from html import Jx_Html_Graphs
    tasks = {'W-JLPT':MapJLPTTango, 'K-JLPT':MapJLPTKanji, 'Jouyou':MapJouyouKanji, 'Kanken':MapKankenKanji} 
    dic = dict([('JSon:' + graph,"[" + ",".join(['{ label: "'+ string +'",data :'+ JxGraphsJSon[(graph,key)] +'}' for (key,string) in (reversed(mapping.Order+[('Other','Other')]))]) +"]") for (graph,mapping) in tasks.iteritems()])
    tasks = {'W-AFreq':MapZoneTango, 'K-AFreq':MapZoneKanji}
    dic.update([('JSon:' + graph,"[" + ",".join(['{ label: "'+ string +'",data :'+ JxGraphsJSon[(graph,key)] +'}' for (key,string) in (reversed(mapping.Order))]) +"]") for (graph,mapping) in tasks.iteritems()])
    from html import graphJavascriptCode
    dic.update({
            'JS:K-JLPT':graphJavascriptCode % {'prefix':'KJLPT','json':dic['JSon:K-JLPT'],'columns':5,'include':''},
            'JS:W-JLPT':graphJavascriptCode % {'prefix':'WJLPT','json':dic['JSon:W-JLPT'],'columns':5,'include':''},
            'JS:Jouyou':graphJavascriptCode % {'prefix':'Jouyou','json':dic['JSon:Jouyou'],'columns':11,'include':''},
            'JS:Kanken':graphJavascriptCode % {'prefix':'Kanken','json':dic['JSon:Kanken'],'columns':13,'include':''},
            'JS:K-AFreq':graphJavascriptCode % {'prefix':'KAFreq','json':dic['JSon:K-AFreq'],'columns':5,'include':
                "yaxis:{tickDecimals:0,tickFormatter:function (val, axis) {return val.toFixed(axis.tickDecimals) +' %'}},"},
            'JS:W-AFreq':graphJavascriptCode % {'prefix':'WAFreq','json':dic['JSon:W-AFreq'],'columns':5,'include':
                "yaxis:{tickDecimals:0,tickFormatter:function (val, axis) {return val.toFixed(axis.tickDecimals) +' %'}},"}
            })
    JxHtml = Jx_Html_Graphs % dic
    JxPreview.setHtml(JxHtml ,JxResourcesUrl)
    JxPreview.setWindowTitle(u"Japanese related Graphs")
    JxPreview.activateWindow()
    JxPreview.show()
Esempio n. 5
0
def JxHelp():
        from html import Jx_Html_HelpAutomaticMapping
        JxPreview.setHtml(Jx_Html_HelpAutomaticMapping,JxResourcesUrl)
        JxPreview.activateWindow()
        JxPreview.show()