Changeset 274 for Dev/branches/rest-dojo-ui/client/rft/content.js
- Timestamp:
- 02/20/12 16:27:19 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Dev/branches/rest-dojo-ui/client/rft/content.js
r264 r274 92 92 return dfd.promise; 93 93 } 94 currentPage = null; 94 95 } 95 96 … … 99 100 100 101 // load html 101 var pageUrl = ' pages'+hri.path()+'.html';102 var pageUrl = 'rft/pages'+hri.path()+'.html'; 102 103 xhr.get({ 103 104 url: pageUrl, … … 107 108 // initialize page or create error message 108 109 .then(function(html){ 109 currentPage = new _Page({ 110 templateString: html, 111 pageQuery: hri.args() 112 }); 113 contentPane.set('content',currentPage); 110 contentPane.set('content',html); 111 var rootNode = contentPane.containerNode.firstChild; 112 currentPage = dijit.byNode(rootNode); 113 if ( !currentPage ) { 114 currentPage = new _Page({},rootNode); 115 } 114 116 dfd.resolve(); 115 117 },function(){ 116 currentPage = new _Page({ 117 templateString: "<div>Page "+hri.path()+" not found.</div>" 118 }); 119 contentPane.set('content',currentPage); 118 contentPane.set('content',"<div>Page "+hri.path()+" not found.</div>"); 120 119 dfd.reject(); 121 120 });
Note: See TracChangeset
for help on using the changeset viewer.