diff --git a/Gruntfile.js b/Gruntfile.js index 3e66e2e37d3..d91dedb9bc4 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -229,6 +229,9 @@ grunt.initConfig({ "qunit/qunit.css": "qunit/qunit/qunit.css", "qunit/LICENSE.txt": "qunit/LICENSE.txt", + "qunit-assert-classes/qunit-assert-classes.js": "qunit-assert-classes/qunit-assert-classes.js", + "qunit-assert-classes/LICENSE.txt": "qunit-assert-classes/LICENSE", + "jquery-mousewheel/jquery.mousewheel.js": "jquery-mousewheel/jquery.mousewheel.js", "jquery-mousewheel/LICENSE.txt": "jquery-mousewheel/LICENSE.txt", diff --git a/bower.json b/bower.json index 38a9f77ee54..9b6b71b6f36 100644 --- a/bower.json +++ b/bower.json @@ -15,6 +15,7 @@ "jquery-simulate": "1.0.0", "jshint": "2.4.4", "qunit": "1.17.1", + "qunit-assert-classes": "0.1.5", "jquery-1.7.0": "jquery#1.7.0", "jquery-1.7.1": "jquery#1.7.1", diff --git a/demos/autocomplete/combobox.html b/demos/autocomplete/combobox.html index 437e52ab1d2..f8898094dc8 100644 --- a/demos/autocomplete/combobox.html +++ b/demos/autocomplete/combobox.html @@ -58,7 +58,9 @@ source: $.proxy( this, "_source" ) }) .tooltip({ - tooltipClass: "ui-state-highlight" + classes: { + "ui-tooltip": "ui-state-highlight" + } }); this._on( this.input, { diff --git a/demos/droppable/accepted-elements.html b/demos/droppable/accepted-elements.html index 19db546508d..2a50295260d 100644 --- a/demos/droppable/accepted-elements.html +++ b/demos/droppable/accepted-elements.html @@ -20,8 +20,10 @@ $( "#draggable, #draggable-nonvalid" ).draggable(); $( "#droppable" ).droppable({ accept: "#draggable", - activeClass: "ui-state-hover", - hoverClass: "ui-state-active", + classes: { + "ui-droppable-active": "ui-state-active", + "ui-droppable-hover": "ui-state-hover" + }, drop: function( event, ui ) { $( this ) .addClass( "ui-state-highlight" ) diff --git a/demos/droppable/photo-manager.html b/demos/droppable/photo-manager.html index 6323e5d7baa..6a8cf33d18b 100644 --- a/demos/droppable/photo-manager.html +++ b/demos/droppable/photo-manager.html @@ -47,7 +47,9 @@ // let the trash be droppable, accepting the gallery items $trash.droppable({ accept: "#gallery > li", - activeClass: "ui-state-highlight", + classes: { + "ui-droppable-active": "ui-state-highlight" + }, drop: function( event, ui ) { deleteImage( ui.draggable ); } @@ -56,7 +58,9 @@ // let the gallery be droppable as well, accepting items from the trash $gallery.droppable({ accept: "#trash li", - activeClass: "custom-state-active", + classes: { + "ui-droppable-active": "custom-state-active" + }, drop: function( event, ui ) { recycleImage( ui.draggable ); } diff --git a/demos/droppable/propagation.html b/demos/droppable/propagation.html index 60cf7cb377e..99fb2171187 100644 --- a/demos/droppable/propagation.html +++ b/demos/droppable/propagation.html @@ -21,8 +21,10 @@ $( "#draggable" ).draggable(); $( "#droppable, #droppable-inner" ).droppable({ - activeClass: "ui-state-hover", - hoverClass: "ui-state-active", + classes: { + "ui-droppable-active": "ui-state-active", + "ui-droppable-hover": "ui-state-hover" + }, drop: function( event, ui ) { $( this ) .addClass( "ui-state-highlight" ) @@ -34,8 +36,10 @@ $( "#droppable2, #droppable2-inner" ).droppable({ greedy: true, - activeClass: "ui-state-hover", - hoverClass: "ui-state-active", + classes: { + "ui-droppable-active": "ui-state-active", + "ui-droppable-hover": "ui-state-hover" + }, drop: function( event, ui ) { $( this ) .addClass( "ui-state-highlight" ) diff --git a/demos/droppable/revert.html b/demos/droppable/revert.html index 74ccb6fc545..f34801e90a6 100644 --- a/demos/droppable/revert.html +++ b/demos/droppable/revert.html @@ -21,8 +21,10 @@ $( "#draggable2" ).draggable({ revert: "invalid" }); $( "#droppable" ).droppable({ - activeClass: "ui-state-default", - hoverClass: "ui-state-hover", + classes: { + "ui-droppable-active": "ui-state-active", + "ui-droppable-hover": "ui-state-hover" + }, drop: function( event, ui ) { $( this ) .addClass( "ui-state-highlight" ) diff --git a/demos/droppable/shopping-cart.html b/demos/droppable/shopping-cart.html deleted file mode 100644 index 0304004edc7..00000000000 --- a/demos/droppable/shopping-cart.html +++ /dev/null @@ -1,94 +0,0 @@ - - -
- -Demonstrate how to use an accordion to structure products into a catalog and make use of drag and drop for adding them to a shopping cart, where they are sortable.
-Change the droppable's appearance on hover, or when the droppable is active (an acceptable draggable is dropped on it). Use the hoverClass
or activeClass
options to specify respective classes.
Change the droppable's appearance on hover, or when the droppable is active (an acceptable draggable is dropped on it). Set the values of the ui-droppable-hover
or ui-droppable-active
properties on the classes
option to specify the respective classes.