- included link to manage console (but not if pages are rendered to static html)
- nicer feedback after rendering
This commit is contained in:
		
							parent
							
								
									862cdef847
								
							
						
					
					
						commit
						6b534edeab
					
				
					 3 changed files with 16 additions and 3 deletions
				
			
		|  | @ -43,11 +43,13 @@ function functionindex_action () { | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| function render_action () { | function render_action () { | ||||||
|  |    // set res.data.rendering, this will suppress the link back to the manage
 | ||||||
|  |    // console in the apidocs actions
 | ||||||
|  |    res.data.rendering = true; | ||||||
| 	if (checkAddress()==false) | 	if (checkAddress()==false) | ||||||
| 	   return; | 	   return; | ||||||
| 	if (checkAuth(this.getParentElement ())==false) | 	if (checkAuth(this.getParentElement ())==false) | ||||||
| 	   return; | 	   return; | ||||||
| 	res.writeln("<html><head><title>render</title></head><body>rendering API ... "); |  | ||||||
| 	var prefix = this.href (""); | 	var prefix = this.href (""); | ||||||
| 	this.storePage (this, "main", "", "index.html"); | 	this.storePage (this, "main", "", "index.html"); | ||||||
| 	this.storePage (this, "prototypes"); | 	this.storePage (this, "prototypes"); | ||||||
|  | @ -65,5 +67,9 @@ function render_action () { | ||||||
| 			ct += 1; | 			ct += 1; | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| 	res.writeln (" ... wrote " + ct + " files"); | 	res.data.body =  '<body>rendering API ...<br/>wrote ' + ct + ' files<br/><br/>'; | ||||||
|  | 	res.data.body += '<a href="' + root.href ("main") + '">back to manage console</a>'; | ||||||
|  |    res.data.title = "rendering helma api"; | ||||||
|  |    res.data.head = renderSkinAsString("head"); | ||||||
|  |    renderSkin ("basic"); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -24,6 +24,13 @@ function link_macro (param) 		{	return renderLink (this, param);			} | ||||||
| //// END OF COPIED FUNCTIONS
 | //// END OF COPIED FUNCTIONS
 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | 
 | ||||||
|  | function linkToManage_macro (param) { | ||||||
|  |    if (res.data.rendering != true) { | ||||||
|  |       return ('<a href="' + root.href ("main") + '" target="_top">back to manage console</a>'); | ||||||
|  |    } | ||||||
|  | } | ||||||
|  | 
 | ||||||
| function headline_macro (param) { | function headline_macro (param) { | ||||||
| 	res.write (this.getName ()); | 	res.write (this.getName ()); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -1,4 +1,4 @@ | ||||||
| 
 | <% this.linkToManage suffix="<br/><br/>" %> | ||||||
| 
 | 
 | ||||||
| <big class="top">Application <a href="<% this.href action="summary" %>" target="main"><% this.name %></a></big><br><br> | <big class="top">Application <a href="<% this.href action="summary" %>" target="main"><% this.name %></a></big><br><br> | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue