Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
removed ngm-event directive, as the angular parseJSON is now just a s…
…imple JSON.parse, which would make the syntax in html awkward. Please use the specific directives like ngm-click, ... instead. Fixes #40.
- Loading branch information
Tobias Bosch
committed
Jun 5, 2012
1 parent
1b9af3e
commit e16b524
Showing
11 changed files
with
39 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
compiled/min/jquery-mobile-angular-adapter-1.0.7-rc3-SNAPSHOT.js
Large diffs are not rendered by default.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
compiled/min/jquery-mobile-angular-adapter-standalone-1.0.7-SNAPSHOT.js
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
compiled/min/jquery-mobile-angular-adapter-standalone-1.0.7-rc3-SNAPSHOT.js
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,39 @@ | ||
describe("event shortcuts", function () { | ||
it("should eval the expression when the event is fired", function () { | ||
var events = {taphold:'taphold', swipe:'swipe', swiperight:'swiperight', | ||
swipeleft:'swipeleft', | ||
pagebeforeshow:'pagebeforeshow', | ||
pagebeforehide:'pagebeforehide', | ||
pageshow:'pageshow', | ||
pagehide:'pagehide', | ||
click:'vclick' | ||
}; | ||
for (var event in events) { | ||
var d = testutils.compileInPage('<span ngm-' + event + '="executed=true"></span>'); | ||
describe('events', function () { | ||
describe("event shortcuts", function () { | ||
it("should eval the expression when the event is fired", function () { | ||
var events = {taphold:'taphold', swipe:'swipe', swiperight:'swiperight', | ||
swipeleft:'swipeleft', | ||
pagebeforeshow:'pagebeforeshow', | ||
pagebeforehide:'pagebeforehide', | ||
pageshow:'pageshow', | ||
pagehide:'pagehide', | ||
click:'vclick' | ||
}; | ||
for (var event in events) { | ||
var d = testutils.compileInPage('<span ngm-' + event + '="executed=true"></span>'); | ||
var element = d.element; | ||
var scope = element.scope(); | ||
element.trigger(events[event]); | ||
expect(scope.executed).toEqual(true); | ||
} | ||
}); | ||
|
||
it("should work together with ng-model", function () { | ||
var d = testutils.compileInPage('<input ngm-click="executed=true" type="text" ng-model="data">'); | ||
var element = d.element; | ||
var scope = element.scope(); | ||
element.trigger(events[event]); | ||
element.trigger('click'); | ||
expect(scope.executed).toEqual(true); | ||
} | ||
element.val('test'); | ||
testutils.triggerInputEvent(element); | ||
expect(scope.data).toBe('test'); | ||
}); | ||
|
||
|
||
}); | ||
|
||
it("should work together with ng-model", function () { | ||
var d = testutils.compileInPage('<input ng-click="executed=true" type="text" ng-model="data">'); | ||
var element = d.element; | ||
var scope = element.scope(); | ||
element.trigger('click'); | ||
expect(scope.executed).toEqual(true); | ||
element.val('test'); | ||
testutils.triggerInputEvent(element); | ||
expect(scope.data).toBe('test'); | ||
describe('ngm-event', function() { | ||
it("should execute teh ") | ||
}); | ||
|
||
}); |