From adafc52e87d7c2a451eb0f2044c9d511ca2ab5c4 Mon Sep 17 00:00:00 2001 From: Justo Delgado Date: Sat, 18 Jun 2016 21:33:22 +0200 Subject: [PATCH] Updated for Haxe 3.3.0 --- js/bootstrap/Alert.hx | 6 +++--- js/bootstrap/Button.hx | 8 ++++---- js/bootstrap/Dropdown.hx | 2 +- js/bootstrap/JQuery.hx | 3 +++ js/bootstrap/Modal.hx | 8 ++++---- js/bootstrap/Popover.hx | 10 +++++----- js/bootstrap/Tab.hx | 4 ++-- js/bootstrap/Tooltip.hx | 8 ++++---- 8 files changed, 26 insertions(+), 23 deletions(-) create mode 100644 js/bootstrap/JQuery.hx diff --git a/js/bootstrap/Alert.hx b/js/bootstrap/Alert.hx index cacc14f..5f4421c 100644 --- a/js/bootstrap/Alert.hx +++ b/js/bootstrap/Alert.hx @@ -2,11 +2,11 @@ package js.bootstrap; class Alert { - public static inline function alert( j : js.JQuery ) : js.JQuery { + public static inline function alert( j : JQuery ) : JQuery { return untyped j.alert(); } - public static inline function alertClose( j : js.JQuery ) : js.JQuery { + public static inline function alertClose( j : JQuery ) : JQuery { return untyped j.alert("close"); } @@ -16,4 +16,4 @@ class Alert { } #end -} \ No newline at end of file +} diff --git a/js/bootstrap/Button.hx b/js/bootstrap/Button.hx index 16333ab..c93cf66 100644 --- a/js/bootstrap/Button.hx +++ b/js/bootstrap/Button.hx @@ -1,13 +1,13 @@ package js.bootstrap; class Button { - public static inline function button( j : js.JQuery, ?state:String = null ) : js.JQuery { + public static inline function button( j : JQuery, ?state:String = null ) : JQuery { return untyped j.button( state ); } - public static inline function buttonToggle( j : js.JQuery ) { return button(j, "toggle" ); } - public static inline function buttonLoading( j : js.JQuery ) { return button(j, "loading" ); } - public static inline function buttonReset( j : js.JQuery ) { return button(j, "reset" ); } + public static inline function buttonToggle( j : JQuery ) { return button(j, "toggle" ); } + public static inline function buttonLoading( j : JQuery ) { return button(j, "loading" ); } + public static inline function buttonReset( j : JQuery ) { return button(j, "reset" ); } #if !noEmbedBootstrap public static function __init__() { bootstrap.Lib.includeFile("js/bootstrap-button.js"); } diff --git a/js/bootstrap/Dropdown.hx b/js/bootstrap/Dropdown.hx index ce8ee66..57a384d 100644 --- a/js/bootstrap/Dropdown.hx +++ b/js/bootstrap/Dropdown.hx @@ -2,7 +2,7 @@ package js.bootstrap; class Dropdown { - public static inline function dropdown( j : js.JQuery ) : js.JQuery { + public static inline function dropdown( j : JQuery ) : JQuery { return untyped j.dropdown(); } diff --git a/js/bootstrap/JQuery.hx b/js/bootstrap/JQuery.hx new file mode 100644 index 0000000..0879116 --- /dev/null +++ b/js/bootstrap/JQuery.hx @@ -0,0 +1,3 @@ +package js.bootstrap; + +typedef JQuery = #if (haxe_ver >= 3.300) js.jquery.JQuery #else js.JQuery #end diff --git a/js/bootstrap/Modal.hx b/js/bootstrap/Modal.hx index 9ffc9c3..657cae5 100644 --- a/js/bootstrap/Modal.hx +++ b/js/bootstrap/Modal.hx @@ -7,13 +7,13 @@ typedef ModalOptions = { } class Modal { - public static inline function modal( j : js.JQuery , conf : ModalOptions = null ) : js.JQuery { + public static inline function modal( j : JQuery , conf : ModalOptions = null ) : JQuery { return untyped j.modal( conf ); } - public static inline function modalToggle( j : js.JQuery ) : js.JQuery { return untyped j.modal( "toggle" ); } - public static inline function modalShow( j : js.JQuery ) : js.JQuery { return untyped j.modal( "show" ); } - public static inline function modalHide( j : js.JQuery ) : js.JQuery { return untyped j.modal( "hide" ); } + public static inline function modalToggle( j : JQuery ) : JQuery { return untyped j.modal( "toggle" ); } + public static inline function modalShow( j : JQuery ) : JQuery { return untyped j.modal( "show" ); } + public static inline function modalHide( j : JQuery ) : JQuery { return untyped j.modal( "hide" ); } #if !noEmbedBootstrap public static function __init__() { bootstrap.Lib.includeFile("js/bootstrap-modal.js"); } diff --git a/js/bootstrap/Popover.hx b/js/bootstrap/Popover.hx index 8ac1379..35872f6 100644 --- a/js/bootstrap/Popover.hx +++ b/js/bootstrap/Popover.hx @@ -11,13 +11,13 @@ typedef PopoverOptions = { } class Popover { - public static inline function popover( j : js.JQuery , ?opts : PopoverOptions = null ) : js.JQuery { + public static inline function popover( j : JQuery , ?opts : PopoverOptions = null ) : JQuery { return untyped j.popover( opts ); } - public static inline function popoverToggle( j : js.JQuery ) : js.Jquery { return untyped j.popover( "toggle" ); } - public static inline function popoverShow( j : js.JQuery ) : js.Jquery { return untyped j.popover( "show" ); } - public static inline function popoverHide( j : js.JQuery ) : js.Jquery { return untyped j.popover( "hide" ); } + public static inline function popoverToggle( j : JQuery ) : JQuery { return untyped j.popover( "toggle" ); } + public static inline function popoverShow( j : JQuery ) : JQuery { return untyped j.popover( "show" ); } + public static inline function popoverHide( j : JQuery ) : JQuery { return untyped j.popover( "hide" ); } #if !noEmbedBootstrap public static function __init__() { @@ -25,4 +25,4 @@ class Popover { bootstrap.Lib.includeFile("js/bootstrap-popover.js"); } #end -} \ No newline at end of file +} diff --git a/js/bootstrap/Tab.hx b/js/bootstrap/Tab.hx index 3ee3946..a6aafd8 100644 --- a/js/bootstrap/Tab.hx +++ b/js/bootstrap/Tab.hx @@ -2,10 +2,10 @@ package js.bootstrap; class Tab { - public static inline function tab( j : js.JQuery ) : js.JQuery + public static inline function tab( j : JQuery ) : JQuery return untyped j.tab(); - public static inline function tabShow( j : js.JQuery ) : js.JQuery + public static inline function tabShow( j : JQuery ) : JQuery return untyped j.tab( "show" ); #if !noEmbedBootstrap diff --git a/js/bootstrap/Tooltip.hx b/js/bootstrap/Tooltip.hx index 23e6ed5..425512a 100644 --- a/js/bootstrap/Tooltip.hx +++ b/js/bootstrap/Tooltip.hx @@ -10,13 +10,13 @@ typedef TooltipOptions = { } class Tooltip { - public static inline function tooltip( j : js.JQuery , ?opts:TooltipOptions = null ) : js.JQuery { + public static inline function tooltip( j : JQuery , ?opts:TooltipOptions = null ) : JQuery { return untyped j.tooltip( opts ); } - public static inline function tooltipToggle( j : js.JQuery ) : js.JQuery { return untyped j.tooltip( "toggle" ); } - public static inline function tooltipShow( j : js.JQuery ) : js.JQuery { return untyped j.tooltip( "show" ); } - public static inline function tooltipHide( j : js.JQuery ) : js.JQuery { return untyped j.tooltip( "hide" ); } + public static inline function tooltipToggle( j : JQuery ) : JQuery { return untyped j.tooltip( "toggle" ); } + public static inline function tooltipShow( j : JQuery ) : JQuery { return untyped j.tooltip( "show" ); } + public static inline function tooltipHide( j : JQuery ) : JQuery { return untyped j.tooltip( "hide" ); } #if !noEmbedBootstrap public static function __init__() { bootstrap.Lib.includeFile( "js/bootstrap-tooltip.js" ); }