Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

update opa-jquery-ui to compile with modern opa #3

Open
wants to merge 2 commits into from

1 participant

@ogunden

it seems the params to Server.start have changed a little bit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 1, 2012
  1. @ogunden
Commits on Dec 19, 2012
  1. @ogunden

    updated to new syntax

    ogunden authored
This page is out of date. Refresh to see the latest.
Showing with 24 additions and 18 deletions.
  1. +6 −3 jquery-ui-demo.opa
  2. +18 −15 packages/jQueryUI/jQueryUI/jQueryUI.js
View
9 jquery-ui-demo.opa
@@ -85,8 +85,11 @@ function page() {
}
Server.start(Server.http,
- [ {resources: @static_resource_directory("resources")}
- , {register: ["resources/bootstrap.css", "resources/style.css", "resources/bootstrap.js"]}
- , {title: "JQuery-UI in Opa", ~page}
+ [ { resources: @static_resource_directory("resources") }
+ , { register: [
+ {css: ["resources/bootstrap.css", "resources/style.css"] }
+ , {js: ["resources/bootstrap.js"] }
+ ]}
+ , { title: "JQuery-UI in Opa", ~page }
]
)
View
33 packages/jQueryUI/jQueryUI/jQueryUI.js
@@ -1,22 +1,25 @@
-##extern-type Dom.private.element
+/** @externType Dom.private.element */
-##register mk_sortable: Dom.private.element -> void
-##args(dom)
-{
- dom.sortable();
- return js_void;
+/**
+ * @register {Dom.private.element -> void}
+ */
+function mk_sortable(dom) {
+ dom.sortable();
+ return js_void;
}
-##register disable_selection: Dom.private.element -> void
-##args(dom)
-{
- dom.disableSelection();
- return js_void;
+/**
+ * @register {Dom.private.element -> void}
+ */
+function disable_selection(dom) {
+ dom.disableSelection();
+ return js_void;
}
-##register sortable_on_update : Dom.private.element, ( -> void) -> void
-##args(dom, on_update)
-{
-return dom.bind( "sortupdate", function(event, ui) { on_update(); } );
+/**
+ * @register {Dom.private.element, ( -> void) -> void}
+ */
+function sortable_on_update(dom, on_update) {
+ return dom.bind( "sortupdate", function(event, ui) { on_update(); } );
}
Something went wrong with that request. Please try again.