mirror of
				https://git.openwrt.org/project/luci.git
				synced 2025-10-31 10:49:03 +08:00 
			
		
		
		
	 ae8bbb814f
			
		
	
	ae8bbb814f
	
	
	
		
			
			* HTML Cleanup: Meta tags. * Converted charset to shorthand. * Removed meta tags with `Content-Script-Type` attribute. (Invalid in HTML5 spec.) * HTML Cleanup: CSS tags. * Removed `type` attribute with CSS files from link tags. (HTML5 spec recommends omitting it.) * Removed `type` attribute from style tags. (Deprecated in HTML5 spec.) https://html.spec.whatwg.org/#attr-link-type https://developer.mozilla.org/en-US/docs/Web/HTML/Element/style * HTML Cleanup: Convert from XHTML to HTML5 * Removed XML declaration. * Removed XML namespace. * Changed doctype to HTML5. * HTML Cleanup: CDATA tags. * CDATA sections should not be used within HTML they are considered as comments and not displayed. https://developer.mozilla.org/en-US/docs/Web/API/CDATASection * HTML Cleanup: Script tags. * Removed `language` attribute from script tags. (No longer valid in HTML5) * Removed `type` attribute with JavaScript MIME type from script tags. (HTML5 spec recommends omitting it.) https://html.spec.whatwg.org/multipage/scripting.html#attr-script-type https://mimesniff.spec.whatwg.org/#javascript-mime-type Signed-off-by: Mustafa Can Elmacı <mustafacan@elmaci.net>
		
			
				
	
	
		
			57 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			57 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
| 
 | |
| <!-- ++ BEGIN ++ Privoxy ++ detail_logview.htm ++ -->
 | |
| <script>
 | |
| 	function onclick_logview(section, bottom)  {
 | |
| 		// get elements
 | |
| 		var txt = document.getElementById("cbid.privoxy.privoxy._logview.txt");	// TextArea
 | |
| 		if ( !txt ) { return; }	// security check
 | |
| 		var lvXHR = new XHR();
 | |
| 		lvXHR.get('<%=url('admin/services/privoxy/logview')%>', null,
 | |
| 			function(x) {
 | |
| 				if (x.responseText == "_nodata_")
 | |
| 					txt.value = "<%:File not found or empty%>";
 | |
| 				else
 | |
| 					txt.value = x.responseText;
 | |
| 				if (bottom)
 | |
| 					txt.scrollTop = txt.scrollHeight;
 | |
| 				else
 | |
| 					txt.scrollTop = 0;			}
 | |
| 		);
 | |
| 	}
 | |
| </script>
 | |
| 
 | |
| <%+cbi/valueheader%>
 | |
| 
 | |
| <br />
 | |
| 
 | |
| <%
 | |
| -- one button on top, one at the buttom
 | |
| %>
 | |
| <input class="cbi-button cbi-input-button" style="align: center; width: 100%" type="button" onclick="onclick_logview(this.name, false)"
 | |
| <%=
 | |
| attr("name", section) .. attr("id", cbid .. ".btn1") .. attr("value", self.inputtitle)
 | |
| %> />
 | |
| 
 | |
| <br /><br />
 | |
| 
 | |
| <%
 | |
| -- set a readable style taken from openwrt theme for textarea#syslog
 | |
| -- in openwrt theme there are problems with a width of 100 so we check for theme and set to lower value
 | |
| %>
 | |
| <textarea style="width: <%if media == "/luci-static/openwrt.org" then%>98.7%<%else%>100%<%end%> ; min-height: 500px; border: 3px solid #cccccc; padding: 5px; font-family: monospace; resize: none;" wrap="off" readonly="readonly"
 | |
| <%=
 | |
| attr("name", cbid .. ".txt") .. attr("id", cbid .. ".txt") .. ifattr(self.rows, "rows")
 | |
| %> >
 | |
| <%-=pcdata(self:cfgvalue(section))-%>
 | |
| </textarea>
 | |
| <br /><br />
 | |
| 
 | |
| <%
 | |
| -- one button on top, one at the buttom
 | |
| %>
 | |
| <input class="cbi-button cbi-input-button" style="align: center; width: 100%" type="button" onclick="onclick_logview(this.name, true)"
 | |
| <%= attr("name", section) .. attr("id", cbid .. ".btn2") .. attr("value", self.inputtitle) %> />
 | |
| 
 | |
| <%+cbi/valuefooter%>
 | |
| <!-- ++ END ++ Privoxy ++ detail_logview.htm ++ -->
 |