Skip to content

Commit

Permalink
makes controller accept strings
Browse files Browse the repository at this point in the history
  • Loading branch information
justinbmeyer committed Dec 19, 2011
1 parent 808c624 commit 3528bf9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions controller/controller_core.js
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,8 @@ steal('jquery/class/class_core.js', 'jquery/lang/string', 'jquery/event/destroye
var funcName, ready, cls = this.constructor;

//want the raw element here
element = element.jquery ? element[0] : element;
element = (typeof element == 'string' ? $(element) :
(element.jquery ? element : [element]) )[0];

//set element and className on element
var pluginname = cls.pluginName || cls._fullName;
Expand Down Expand Up @@ -672,7 +673,7 @@ steal('jquery/class/class_core.js', 'jquery/lang/string', 'jquery/event/destroye
* }
* }
*/
return this.element;
return [this.element, this.options];
},
/**
* Bind attaches event handlers that will be
Expand Down
2 changes: 1 addition & 1 deletion mvc/mvc_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ test("Controller Basics",3,function(){
});


var tasks = new Tasks( $('#qunit-test-area') , {
var tasks = new Tasks( '#qunit-test-area' , {
Task : Task
})
$('#qunit-test-area').click();
Expand Down

0 comments on commit 3528bf9

Please sign in to comment.