01org/appframework — pull request #505 by LeoYuan (2013-12-09 11:39:02+00:00)
Title: add one more option `jsonp` for $.ajax.

### new features
add two features for af.

#### 1. user don't want to add callback=? to the url which is very inconvenient and unnecessary.
```
$.ajax({
url: 'http:/example.com/group/swRightHP/do_query.jsonp?firstCatId=7&secCatId=727&leafCatId=1',
type: 'get',
data: {a: 1, b: 2},
dataType: 'jsonp',
success: function(data) {
console.log(data);
},
error: function() {
console.err(arguments);
}
})
```
requested url:
**http:/example.com/group/swRightHP/do_query.jsonp?firstCatId=7&secCatId=727&leafCatId=1&callback=jsonp_callback1**

#### 2. add one more option jsonp for $.ajax, so we can specify the name of the callback now.
```
$.ajax({
url: 'http:/example.com/group/swRightHP/do_query.jsonp?firstCatId=7&secCatId=727&leafCatId=1',
type: 'get',
data: {a: 1, b: 2},
dataType: 'jsonp',
jsonp: 'myCallback',
success: function(data) {
console.log(data);
},
error: function() {
console.err(arguments);
}
})
```
-> requested url: **http:/example.com/group/swRightHP/do_query.jsonp?firstCatId=7&secCatId=727&leafCatId=1&myCallback=jsonp_callback1**

See also: http://api.jquery.com/jquery.ajax/