add json-support to $.mobile.changePage#799
add json-support to $.mobile.changePage#799markusweb wants to merge 3 commits intojquery-archive:masterfrom
Conversation
…splay the results with the help of jquery.tmpl.min.js.
to use this: the url must contain "mode=json" as get parameter. in the main/index.html the template has to be inserted.
the json data must contain a "template"-entry in the main section
{"id":"foobar", "template":"templateListIntro", "list":[ ... ]}
|
ony the commit to fa055bf... (jquery.mobile.navigation.js) is relevant in this pull. the change to the css is not needed. sorry, i am new to git |
|
Hi there markusweb, it is a nice feature. But think using an external JSON API in your app, so if I can't modify the JSON how can I use this feature? Using the template outside the JSON maybe the very best option. |
|
what do you mena by "external json api"? how would that help me? my server responds with json data rather then sending the complete rendered html. this will save some amount of data going over the air (in my case 30-50%). then in the jquery-mobile app the json data is rendered via jquery tmpl build and setup in the main index.html. marku |
|
Sorry for not begin clear, by "external json api" I mean when you can't change the server behaviour, like using a third party API. Thanks for the patch anyway. I'm using JQmobile with 3rd party JSON API but don't changed anything on the project, just load it when 'pageshow' == 'page i want' |
|
A couple of notes here.
Right now we're really focusing on device support and bug fixes as we move towards a beta. I'm going to close this request for now but when first release happens new features should be on the table and I invite you to resubmit then. |
add support to retrieve json data and display the results as html with jquery.tmpl.js. it is controlled via url-parameter &mode=json, as this matches our application logic.