jquery-mobile-contribs

Some contribs for JQuery Mobile

License

License

GroupId

GroupId

com.ovea
ArtifactId

ArtifactId

jquery-mobile-contribs
Last Version

Last Version

1.7.ga
Release Date

Release Date

Type

Type

jar
Description

Description

jquery-mobile-contribs
Some contribs for JQuery Mobile
Project Organization

Project Organization

Ovea
Source Code Management

Source Code Management

http://github.com/Ovea/jquery-mobile-contribs

Download jquery-mobile-contribs

How to add to project

<!-- https://jarcasting.com/artifacts/com.ovea/jquery-mobile-contribs/ -->
<dependency>
    <groupId>com.ovea</groupId>
    <artifactId>jquery-mobile-contribs</artifactId>
    <version>1.7.ga</version>
</dependency>
// https://jarcasting.com/artifacts/com.ovea/jquery-mobile-contribs/
implementation 'com.ovea:jquery-mobile-contribs:1.7.ga'
// https://jarcasting.com/artifacts/com.ovea/jquery-mobile-contribs/
implementation ("com.ovea:jquery-mobile-contribs:1.7.ga")
'com.ovea:jquery-mobile-contribs:jar:1.7.ga'
<dependency org="com.ovea" name="jquery-mobile-contribs" rev="1.7.ga">
  <artifact name="jquery-mobile-contribs" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.ovea', module='jquery-mobile-contribs', version='1.7.ga')
)
libraryDependencies += "com.ovea" % "jquery-mobile-contribs" % "1.7.ga"
[com.ovea/jquery-mobile-contribs "1.7.ga"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

JQueryMobile contribs

A - Navigation Events

1 - Define the eventbus (https://github.com/Ovea/js-eventbus)

if (myapp.bus == undefined) {
  (function($) {
    myapp.bus = {
      local: new EventBus({
        name: 'EventBus Local'
      })
    };
  })(jQuery);
}

2 - Bridge jquery Mobile with the EventBus

if (myapp.namesapce == undefined) {
  (function($) {
    window.jqmcontrib.bridge(myapp.bus.local);
  })(jQuery);
}

3 - No you can listen anywhere on your code the JQueryMobile events (pagebeforeshow, pagecreate, pageshow, pagehide) through topics (beforeshow, create, show, hide).

// Be notified by the creation of the page 'member'
myapp.bus.local.topic('/event/ui/view/create/member').subscribe(function(page) {
                                                                 r
}

// For all pages
myapp.bus.local.topic('/event/ui/view/create').subscribe(function(page) {

}

....

B - Navigation

1 - Define the eventbus (https://github.com/Ovea/js-eventbus)

if (myapp.bus == undefined) {
  (function($) {
    myapp.bus = {
      local: new EventBus({
        name: 'EventBus Local'
      })
    };
  })(jQuery);
}

2 - Init Navigation object

if (app.navigation == undefined) {
  (function($) {
    app.navigation = new window.jqmcontrib.Navigation(myapp.bus.local);
  })(jQuery);
}

3 - Use in your app

// In which page I am ?
var page = app.navigation.pageName();

// Go to external URL and when I come back to my app go to page : myPage
app.navigation.redirect(external_url, {
  to: myPage
});

N.B : The navigation object publish on topic '/event/navigation/restoring' when it restore state

// Change page
app.navigation.changePage('game');
com.ovea

OVEA

Versions

Version
1.7.ga
1.6.ga
1.5.ga
1.4.ga
1.3.ga
1.2.ga
1.1.ga
1.0