Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Filterable: As part of backcompat, listview refresh refreshes filterable #7335

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
c017357
Build: Set branch to 1.4-stable for TravisCI
gseguin Mar 13, 2014
5b8a14f
Filterable: Prevent form submission when user presses ENTER
Mar 13, 2014
c2a12bc
Build: Fixed animationComplete module id
gseguin Mar 16, 2014
3e8261b
Build: Upgrade grunt-hash-manifest version to 0.5.1
gseguin Mar 15, 2014
da4c187
Toolbar: Stop using deprecated event in fixed persistent demo
Mar 3, 2014
84d2250
Build: Update release script for new jquery-release API
scottgonzalez Mar 18, 2014
369eae0
Demos: Added CasperJS functional tests
gseguin Mar 14, 2014
6a08158
Filterable: fix preventDefault not working
frequent Feb 22, 2014
11eb494
Build: Update hashchange to include script tag escape
Apr 8, 2014
2d1d09b
All: Removed non-existent "-ms-box-sizing"
siokoshou Nov 18, 2013
bc5c13d
Toolbar: Remove fullscreen from fixed toolbar demo
Apr 10, 2014
3c0378a
Filterable: When all items match the filter string, show them
Apr 10, 2014
fa2ccd1
Slider: value on button not updated
cgack Apr 1, 2014
ab9ab7e
Panel: Allow click that opens panel to bubble
Apr 8, 2014
2f726f1
Filterable: Instantiate on data-filter="true" listview for backcompat
Apr 10, 2014
0625b4b
Panel: Remove inline height from .ui-panel-dismiss on _closePanel
devben Apr 10, 2014
003fed6
Panel: Ensure height is removed from modal inline style upon panel close
Apr 11, 2014
2eb11cb
Popup: Ignore resize events right after a click
Apr 14, 2014
b8431e1
Popup: Correctly enhance popup and its contents before opening
Apr 23, 2014
4a3ad8d
Filterable: As part of backcompat, listview refresh refreshes filterable
Apr 23, 2014
583caae
Filterable: Test that refreshing listview also refreshes filterable
Apr 23, 2014
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
language: node_js
node_js:
- 0.8
language: php
php:
- "5.5"
before_script:
- npm install -g grunt-cli
- npm install
script: npm run-script ci
branches:
only:
- master
- 1.4-stable
env:
- TYPES=unit
JQUERIES=1.8.3
Expand Down
42 changes: 41 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ module.exports = function( grunt ) {
},
path = require( "path" ),
httpPort = Math.floor( 9000 + Math.random()*1000 ),
phpPort = Math.floor( 8000 + Math.random()*1000 ),
name = "jquery.mobile",
dist = "dist" + path.sep,
copyrightYear = grunt.template.today( "UTC:yyyy" ),
Expand Down Expand Up @@ -693,6 +694,37 @@ module.exports = function( grunt ) {
}
},

php: {
server: {
options: {
port: phpPort,
baseUrl: "."
}
}
},

casper: {
options: {
test: true,
verbose : false,
"log-level": "error",
parallel: true,
concurrency: 5
},
"demos.src": {
options: {
args: [ "--port=" + phpPort ]
},
src: [ "tests/casperjs/**/*.js" ]
},
"demos.dist": {
options: {
args: [ "--port=" + phpPort ]
},
src: [ "tests/casperjs/**/*.js" ]
}
},

connect: {
server: {
options: {
Expand Down Expand Up @@ -987,13 +1019,21 @@ module.exports = function( grunt ) {

grunt.registerTask( "updateDependencies", [ "bowercopy" ] );

grunt.registerTask( "test:demos:src", [ "php", "casper:demos.src" ] );

grunt.registerTask( "test:demos:dist", [ "casper:demos.dist" ] );

grunt.registerTask( "test",
[
"clean:testsOutput",
"jshint",
"test:demos:src",
"config:fetchHeadHash",
"js:release",
"connect", "qunit:http"
"demos",
"connect",
"test:demos:dist",
"qunit:http"
]
);
grunt.registerTask( "test:ci", [ "qunit_junit", "connect", "qunit:http" ] );
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"jquery": "1.10.2",
"jquery-ui": "jquery/jquery-ui#c0ab71056b936627e8a7821f03c044aec6280a40",
"jquery-ui-tabs": "jquery/jquery-ui#fadf2b312a05040436451c64bbfaf4814bc62c56",
"jquery-hashchange": "gseguin/jquery-hashchange#77c4b3551fc6bdc2ac6b22b2641cfd7ac6b212d2"
"jquery-hashchange": "gseguin/jquery-hashchange#2da0c56fd418fa323c136254f971b6176f1ae135"
},
"devDependencies": {
"requirejs": "2.1.2",
Expand Down
48 changes: 25 additions & 23 deletions build/release.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
var cheerio = require( "cheerio" ),
fs = require( "fs" ),
scp = require( "scp" ),
path = require( "path" ),
semver = require( "semver" ),
shell = require( "shelljs" );

module.exports = function( Release ) {
var clonedRepos = {};
var cheerio = require( "cheerio" ),
fs = require( "fs" ),
semver = require( "semver" ),
shell = require( "shelljs" ),
clonedRepos = {};

Release.define({
issueTracker: "github",
Expand All @@ -15,9 +12,7 @@ module.exports = function( Release ) {
},

generateArtifacts: function( done ) {
Release.exec(
"grunt dist:release"
);
Release.exec( "grunt dist:release" );
done([]);
},

Expand All @@ -27,7 +22,7 @@ module.exports = function( Release ) {

if ( !clonedRepos[ remote ] ) {
console.log( "Cloning " + remote.cyan + "..." );
Release.git( "clone " + remote + " " + local, "Error cloning Demos repo." );
Release.exec( "git clone " + remote + " " + local, "Error cloning Demos repo." );
console.log();

clonedRepos[ remote ] = local;
Expand All @@ -48,17 +43,18 @@ module.exports = function( Release ) {

if (!Release.preRelease) {
console.log( "Updating demos index..." );
fs.writeFileSync( repo + "/index.php", "<?php header('Location: " + Release.newVersion + "');" );
fs.writeFileSync( repo + "/index.php",
"<?php header('Location: " + Release.newVersion + "');" );
}

console.log( "Adding files..." );
process.chdir( repo );
Release.git( "add ." , "Error adding files." );
Release.git( "commit -m '" + commitMessage + "'" , "Error commiting demos files." );
Release.exec( "git add .", "Error adding files." );
Release.exec( "git commit -m '" + commitMessage + "'", "Error commiting demos files." );
Release.exec( "npm version patch" );
if ( !Release.isTest ) {
console.log( "Pushing to github..." );
Release.git( "push --tags origin master", "Error pushing demos to github." );
Release.exec( "git push --tags origin master", "Error pushing demos to github." );
}
console.log();
},
Expand All @@ -69,7 +65,7 @@ module.exports = function( Release ) {

if ( !clonedRepos[ remote ] ) {
console.log( "Cloning " + remote.cyan + "..." );
Release.git( "clone " + remote + " " + local, "Error cloning website repo." );
Release.exec( "git clone " + remote + " " + local, "Error cloning website repo." );
console.log();

clonedRepos[ remote ] = local;
Expand Down Expand Up @@ -119,11 +115,12 @@ module.exports = function( Release ) {

console.log( "Adding files..." );
process.chdir( repo );
Release.git( "add ." , "Error adding files." );
Release.git( "commit -m '" + commitMessage + "'" , "Error commiting builder files." );
Release.exec( "git add .", "Error adding files." );
Release.exec( "git commit -m '" + commitMessage + "'",
"Error commiting builder files." );
if ( !Release.isTest ) {
console.log( "Pushing to github..." );
Release.git( "push", "Error pushing builder update to github." );
Release.exec( "git push", "Error pushing builder update to github." );
}
console.log();
},
Expand All @@ -141,11 +138,11 @@ module.exports = function( Release ) {

console.log( "Adding files..." );
process.chdir( repo );
Release.git( "add ." , "Error adding zip files." );
Release.git( "commit -m '" + commitMessage + "'" , "Error commiting zip files." );
Release.exec( "git add .", "Error adding zip files." );
Release.exec( "git commit -m '" + commitMessage + "'", "Error commiting zip files." );
if ( !Release.isTest ) {
console.log( "Pushing to github..." );
Release.git( "push", "Error pushing zip files to github." );
Release.exec( "git push", "Error pushing zip files to github." );
}
console.log();
},
Expand All @@ -168,3 +165,8 @@ module.exports = function( Release ) {
}
});
};

module.exports.dependencies = [
"semver@2.2.1",
"shelljs@0.2.6"
];
1 change: 0 additions & 1 deletion css/structure/jquery.mobile.forms.fieldcontain.css
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
width: 78%;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
-ms-box-sizing: border-box;
box-sizing: border-box;
}
/* ui-hide-label deprecated in 1.4. TODO: Remove in 1.5 */
Expand Down
2 changes: 0 additions & 2 deletions css/structure/jquery.mobile.forms.flipswitch.css
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
border-style: solid;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
-ms-box-sizing: border-box;
box-sizing: border-box;
border-radius: inherit;
overflow: visible;
Expand All @@ -72,7 +71,6 @@ html .ui-popup .ui-field-contain > label + .ui-flipswitch {
width: 5.875em; /* If you override the width for .ui-flipswitch you should repeat the same value here */
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
-ms-box-sizing: content-box;
box-sizing: content-box;
}
.ui-field-contain .ui-flipswitch.ui-flipswitch-active,
Expand Down
1 change: 0 additions & 1 deletion css/structure/jquery.mobile.forms.slider.css
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ input.ui-slider-input {
appearance: none;
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
-ms-box-sizing: content-box;
box-sizing: content-box;
}
.ui-slider-input::-webkit-outer-spin-button,
Expand Down
1 change: 0 additions & 1 deletion css/structure/jquery.mobile.forms.textinput.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ textarea.ui-input-text {
width: 100%;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
-ms-box-sizing: border-box;
box-sizing: border-box;
outline: 0;
}
Expand Down
6 changes: 3 additions & 3 deletions demos/jqm-contents.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<li data-filtertext="form button widget input button submit reset"><a href="../button/" data-ajax="false">Button widget</a></li>
<li data-role="collapsible" data-enhanced="true" data-collapsed-icon="carat-d" data-expanded-icon="carat-u" data-iconpos="right" data-inset="false" class="ui-collapsible ui-collapsible-themed-content ui-collapsible-collapsed">
<h3 class="ui-collapsible-heading ui-collapsible-heading-collapsed">
<a href="#" class="ui-collapsible-heading-toggle ui-btn ui-btn-icon-right ui-btn-inherit ui-icon-carat-d">
Checkboxradio widget<span class="ui-collapsible-heading-status"> click to expand contents</span>
</a>
<a href="#" class="ui-collapsible-heading-toggle ui-btn ui-btn-icon-right ui-btn-inherit ui-icon-carat-d"
>Checkboxradio widget<span class="ui-collapsible-heading-status"> click to expand contents</span><
/a>
</h3>
<div class="ui-collapsible-content ui-body-inherit ui-collapsible-content-collapsed" aria-hidden="true">
<ul>
Expand Down
1 change: 0 additions & 1 deletion demos/listview-grid/listview-grid.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
.my-page .ui-listview li > .ui-btn {
-webkit-box-sizing: border-box; /* include padding and border in height so we can set it to 100% */
-moz-box-sizing: border-box;
-ms-box-sizing: border-box;
box-sizing: border-box;
height: 100%;
}
Expand Down
26 changes: 19 additions & 7 deletions demos/popup-dynamic/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,27 @@
closebtn = '<a href="#" data-rel="back" class="ui-btn ui-corner-all ui-btn-a ui-icon-delete ui-btn-icon-notext ui-btn-right">Close</a>',
header = '<div data-role="header"><h2>' + brand + ' ' + model + '</h2></div>',
img = '<img src="../_assets/img/' + short + '.jpg" alt="' + brand + '" class="photo">',
popup = '<div data-role="popup" id="popup-' + short + '" data-short="' + short +'" data-theme="none" data-overlay-theme="a" data-corners="false" data-tolerance="15">' + closebtn + header + img + '</div>';
popup = '<div data-role="popup" id="popup-' + short + '" data-short="' + short +'" data-theme="none" data-overlay-theme="a" data-corners="false" data-tolerance="15"></div>';

// Create the popup.
$( header )
.appendTo( $( popup )
.appendTo( $.mobile.activePage )
.popup() )
.toolbar()
.before( closebtn )
.after( img );

// Create the popup. Trigger "pagecreate" instead of "create" because currently the framework doesn't bind the enhancement of toolbars to the "create" event (js/widgets/page.sections.js).
$.mobile.activePage.append( popup ).trigger( "pagecreate" );
// Wait with opening the popup until the popup image has been loaded in the DOM.
// This ensures the popup gets the correct size and position
$( ".photo", "#popup-" + short ).load(function() {
var height = $( this ).height(),
width = $( this ).width();
// Set height and width attribute of the image
$( this ).attr({ "height": height, "width": width });
// Open the popup
$( "#popup-" + short ).popup( "open" );

// Clear the fallback
clearTimeout( fallback );
});

// Fallback in case the browser doesn't fire a load event
var fallback = setTimeout(function() {
$( "#popup-" + short ).popup( "open" );
Expand All @@ -46,6 +51,13 @@

// Set a max-height to make large images shrink to fit the screen.
$( document ).on( "popupbeforeposition", ".ui-popup", function() {
var image = $( this ).children( "img" ),
height = image.height(),
width = image.width();

// Set height and width attribute of the image
$( this ).attr({ "height": height, "width": width });

// 68px: 2 * 15px for top/bottom tolerance, 38px for the header.
var maxHeight = $( window ).height() - 68 + "px";

Expand Down
4 changes: 2 additions & 2 deletions demos/toolbar-fixed-persistent/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
$( "[data-role='header'], [data-role='footer']" ).toolbar();
});
// Update the contents of the toolbars
$( document ).on( "pageshow", "[data-role='page']", function() {
$( document ).on( "pagecontainershow", function() {
// Each of the four pages in this demo has a data-title attribute
// which value is equal to the text of the nav button
// For example, on first page: <div data-role="page" data-title="Info">
var current = $( this ).jqmData( "title" );
var current = $( ".ui-page-active" ).jqmData( "title" );
// Change the heading
$( "[data-role='header'] h1" ).text( current );
// Remove active class from nav buttons
Expand Down
2 changes: 1 addition & 1 deletion demos/toolbar-fixed/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<body>
<div data-role="page" class="jqm-demos" data-quicklinks="true">

<div data-role="header" data-position="fixed" data-fullscreen="true">
<div data-role="header" data-position="fixed">
<a href="../toolbar/" data-rel="back" class="ui-btn ui-btn-left ui-alt-icon ui-nodisc-icon ui-corner-all ui-btn-icon-notext ui-icon-carat-l">Back</a>
<h1>Fixed header</h1>
</div><!-- /header -->
Expand Down
2 changes: 1 addition & 1 deletion external/jquery/plugins/jquery.hashchange.js
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@
iframe_doc.open();

// Set document.domain for the Iframe document as well, if necessary.
domain && iframe_doc.write( '<script>document.domain="' + domain + '"</script>' );
domain && iframe_doc.write( '\x3cscript>document.domain="' + domain + '"\x3c/script>' );

iframe_doc.close();

Expand Down
2 changes: 1 addition & 1 deletion js/jquery.mobile.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ define([
"./navigation/method",
"./transitions/handlers",
"./transitions/visuals",
"./jquery.mobile.animationComplete.js",
"./jquery.mobile.animationComplete",
"./jquery.mobile.navigation",
"./jquery.mobile.degradeInputs",
"./widgets/page.dialog",
Expand Down
Loading