Showing with 34 additions and 13 deletions.
  1. +16 −7 1.3.1/_assets/js/index.js
  2. +15 −6 1.3.2/_assets/js/index.js
  3. +3 −0 package.json
@@ -1,4 +1,4 @@
(function( $, undefined ) {
(function( $, undefined ) {
$( document ).on( "mobileinit", function(){
$.widget( "mobile.listview", $.mobile.listview, {
options: {
@@ -17,15 +17,24 @@
},
_create: function(){
this._super();
if ( this.options.globalNav ){
if ( this.options.globalNav ) {
this._globalnav();
}
},
_globalnav: function(){
var base = $( "base" ).attr( "href" ).split('demos')[0],
base = base.split('index.html')[0] + this.options.globalNav + "/";

this.element.find( "a" ).each(function() {
_globalnav: function() {
var version, base,
parts = $( "base" ).attr( "href" ).split( "/" ),
versionString = /^[0-9]\.[0-9]\.[0-9]/;

parts.forEach( function( part ){
if ( versionString.test( part ) ){
base = $( "base" ).attr( "href" )
.split( part )[ 0 ]
.split( "index.html" )[0] + part + "/";
}
});

this.element.find( "a" ).each( function() {
var href = base + $( this ).attr( "href" );
$( this ).attr( "href", href );
});
@@ -1,4 +1,4 @@
(function( $, undefined ) {
(function( $, undefined ) {
$( document ).on( "mobileinit", function(){
$.widget( "mobile.listview", $.mobile.listview, {
options: {
@@ -21,11 +21,20 @@
this._globalnav();
}
},
_globalnav: function(){
var base = $( "base" ).attr( "href" ).split('demos')[0],
base = base.split('index.html')[0] + this.options.globalNav + "/";

this.element.find( "a" ).each(function() {
_globalnav: function() {
var version, base,
parts = $( "base" ).attr( "href" ).split( "/" ),
versionString = /^[0-9]\.[0-9]\.[0-9]/;

parts.forEach( function( part ){
if ( versionString.test( part ) ){
base = $( "base" ).attr( "href" )
.split( part )[ 0 ]
.split( "index.html" )[0] + part + "/";
}
});

this.element.find( "a" ).each( function() {
var href = base + $( this ).attr( "href" );
$( this ).attr( "href", href );
});
@@ -0,0 +1,3 @@
{
"version": "1.4.1"
}