Pastebin

Paste #2041: py2js-bridging

< previous paste - next paste>

Pasted by chrivers

Download View as text

    def meta_html(self):
        js = py2js.convert_py2js

        app = TestApplication(self)
        app.add_script("/test/static/py-builtins.js")
        app.add_script("/test/static/js/jquery-1.4.4.min.js")
        app.add_script("/test/static/js/jquery-ui-1.8.9.custom.min.js")

        app.add_script("/test/static/jquery.jsonrpc.js")

        app.add_stylesheet("/test/static/jquery-ui.css")

        app.construct("HTML Test",
                html.div(html.button(html.p("RPC"), id = "rpc")),
                html.div(html.button(html.p("RCE"), id = "rce")),
                html.div(html.button(html.p("Press me"), id = "button")),
                html.div(html.h3(html.a("first element", id = "a1")), html.div("content"), html.h3(html.a("second element", id = "a2")), html.div("content"), id = "accordion"),
                html.div(html.input(type = "text", id = "date")),
                html.div(html.p(
                            html.span(cls = "ui-icon ui-icon-alert", style="float:left; margin:0 7px 20px 0;"),
                            "These items will be permanently deleted and cannot be recovered. Are you sure?"),
                         id="dialog-confirm",
                         title="Empty the recycle bin?"
                         )
                )
        return app.present()

New Paste


Do not write anything in this field if you're a human.

Go to most recent paste.