Skip to content

Commit

Permalink
a new pushstate plugin and removed a few old and unused plugins. #423
Browse files Browse the repository at this point in the history
…and pull #85
  • Loading branch information
justinbmeyer committed Sep 20, 2013
1 parent e2a31f6 commit 520f1b9
Show file tree
Hide file tree
Showing 41 changed files with 569 additions and 1,183 deletions.
2 changes: 1 addition & 1 deletion Gruntfile.js
Expand Up @@ -151,8 +151,8 @@ module.exports = function (grunt) {
steal: {
options: {
urls: [
'http://localhost:8000/test/dojo.html',
'http://localhost:8000/test/jquery.html',
'http://localhost:8000/test/dojo.html',
//'http://localhost:8000/can/test/zepto.html',
'http://localhost:8000/test/mootools.html',
'http://localhost:8000/test/yui.html'
Expand Down
5 changes: 5 additions & 0 deletions builder.json
Expand Up @@ -56,6 +56,11 @@
"type": "core",
"isDefault": true
},
"can/route/pushstate": {
"name": "can.route.pushstate",
"description": "can.route with pushstate",
"type": "plugin"
},
"can/control/route": {
"name": "can.Control.route",
"description": "Declare routes in your Control",
Expand Down
14 changes: 9 additions & 5 deletions control/route/route_test.js
Expand Up @@ -3,19 +3,24 @@
module("can/control/route",{
setup : function(){
stop();
can.route.routes = {};
can.route._teardown();
can.route.defaultBinding = "hashchange";
can.route.ready();
window.location.hash = "";
setTimeout(function(){

start();
},13)
},13);

}
});

test("routes changed", function () {
can.route.ready();
expect(3);

//setup controller
can.Control("Router", {
can.Control.extend("Router", {
"foo/:bar route" : function () {
ok(true, 'route updated to foo/:bar')
},
Expand Down Expand Up @@ -44,9 +49,8 @@ test("routes changed", function () {
});

test("route pointers", function(){
can.route.ready();
expect(1);
var Tester = can.Control({
var Tester = can.Control.extend({
"lol/:wat route" : "meth",
meth : function(){
ok(true, "method pointer called")
Expand Down
152 changes: 0 additions & 152 deletions map/elements/elements.js

This file was deleted.

15 changes: 0 additions & 15 deletions map/elements/elements_test.js

This file was deleted.

25 changes: 0 additions & 25 deletions map/elements/test.html

This file was deleted.

2 changes: 1 addition & 1 deletion map/map.js
Expand Up @@ -440,7 +440,7 @@ steal('can/util','can/util/bind','can/construct', 'can/util/batch',function(can,
*/
removeAttr: function( attr ) {
// Info if this is List or not
var isList = this instanceof can.List,
var isList = can.List && this instanceof can.List,
// Convert the `attr` into parts (if nested).
parts = attrParts(attr),
// The actual property to remove.
Expand Down
9 changes: 8 additions & 1 deletion map/map_test.js
Expand Up @@ -47,6 +47,13 @@ test("Nested Map", 5, function(){

})


test("remove attr", function(){
var state = new can.Map({
category : 5,
productType : 4
});
state.removeAttr("category");
deepEqual( can.Map.keys(state), ["productType"], "one property" );
})

})();
18 changes: 0 additions & 18 deletions map/transaction/qunit.html

This file was deleted.

52 changes: 0 additions & 52 deletions map/transaction/transaction.js

This file was deleted.

41 changes: 0 additions & 41 deletions map/transaction/transaction_test.js

This file was deleted.

0 comments on commit 520f1b9

Please sign in to comment.