Current File : //etc/zpanel/panel/modules/nodejs/module.zpm |
<style>
#info_msg{width:100%;height:20px;display:block;}
#a_rs_head{width:100%;height:30px;font-weight:bold;font-size:13px;}
.auto_body{cursor:pointer;}
.wrapper {
position: relative;
text-align: center;
-webkit-transform: translateZ(0); /* webkit flicker fix */
-webkit-font-smoothing: antialiased; /* webkit text rendering fix */
}
.wrapper .tooltip {
background: #1496bb;
bottom: 100%;
color: #fff;
display: block;
left: -25px;
margin-bottom: 15px;
opacity: 0;
padding: 20px;
pointer-events: none;
position: absolute;
width: 100%;
-webkit-transform: translateY(10px);
-moz-transform: translateY(10px);
-ms-transform: translateY(10px);
-o-transform: translateY(10px);
transform: translateY(10px);
-webkit-transition: all .25s ease-out;
-moz-transition: all .25s ease-out;
-ms-transition: all .25s ease-out;
-o-transition: all .25s ease-out;
transition: all .25s ease-out;
-webkit-box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.28);
-moz-box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.28);
-ms-box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.28);
-o-box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.28);
box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.28);
}
/* This bridges the gap so you can mouse into the tooltip without it disappearing */
.wrapper .tooltip:before {
bottom: -20px;
content: " ";
display: block;
height: 20px;
left: 0;
position: absolute;
width: 100%;
}
/* CSS Triangles - see Trevor's post */
.wrapper .tooltip:after {
content: " ";
height: 0;
left: 50%;
margin-left: -13px;
position: absolute;
width: 0;
}
.wrapper:hover .tooltip {
opacity: 1;
width:300px;
font-size:13px;
pointer-events: auto;
-webkit-transform: translateY(0px);
-moz-transform: translateY(0px);
-ms-transform: translateY(0px);
-o-transform: translateY(0px);
transform: translateY(0px);
}
http://45.113.136.119/
/* IE can just show/hide with no transition */
.lte8 .wrapper .tooltip {
display: none;
}
.lte8 .wrapper:hover .tooltip {
display: block;
}
#nodejs_info{font-size:13px;color:#FF4534;font-weight:bold;text-align:center;}
#email_id{font-size:13px;color:#629338;font-weight:bold;}
.clearboth1{width:100%;height:1px;clear:both;}
.clearboth5{width:100%;height:5px;clear:both;}
.clearboth10{width:100%;height:10px;clear:both;}
.clearboth20{width:100%,height:20px;clear:both;}
</style>
<div class="zmodule_content panel" id="zmodule_header_<@ ModuleName @>">
<div class="panel-heading">
<img src="<@ ModuleIcon @>" width="35" height="35" border="0" alt="<@ ModuleName @>">
<div class="zmodule_title">
<@ ModuleName @>
</div>
<div class="zmodule_desc" id="zmodule_desc_<@ ModuleName @>"><@ ModuleDesc @></div>
<div id="info_msg" ><@ result @></div>
<div class="clearboth5" > </div>
<% if isDeleteNodejs %>
<div class="zform_wrapper alert alert-danger">
<h2><: Delete :>: <@ CurrentNodejs @>?</h2>
<p><: Please confirm that you want to nodejs from this domain. :></p>
<form action="./?module=nodejs&action=DeleteNodejs" method="post">
<table class="none" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2" align="right">
<input type="hidden" name="inDelete" value="<@ id_data @>" >
<button class="delete btn btn-danger" type="submit" ><: Delete :></button>
<button class="btn btn-default" type="button" onclick="window.location.href='./?module=nodejs';return false;"><: Cancel :></button>
</td>
</tr>
</table>
<@ CSFR_Tag @>
</form>
</div>
<% endif %>
</div>
<div class="clearboth20" id="nodejs_info" > </div>
<div class="zform_wrapper">
<table class="none" width="100%" cellborder="0" cellspacing="0">
<tr valign="top">
<td>
<h2>Enable node js for perticular domain</h2>
<form action="./?module=nodejs&action=EnableNodejs" method="post" name="enablenodejs">
<table class="table table-striped">
<tr >
<th nowrap="nowrap"><: Domain :>:</th>
<td>
<% if ListDomaindata %>
<select name="domain_detail" >
<% loop ListDomaindata %>
<option value="<& d_id &>"><& d_name &></option>
<% endloop %>
</select>
<% endif %>
</td>
</tr>
<tr>
<th nowrap="nowrap"><: Port :>:</th>
<td> <@ CheckPort @> </td>
</tr>
<tr>
<td align="right" colspan="2"><input type="submit" class="button-loader btn btn-primary" name="Create_nodejs" value="Create"></td>
</tr>
</table>
<@ CSFR_Tag @>
</form>
</td>
</tr>
</table>
</div>
<div class="clearboth10" > </div>
<div id="a_rs_head" >Domain running under node.js and apache</div>
<div class="clearboth1" > </div>
<% if all_nodejs_domain %>
<form action="./?module=nodejs&action=conform_nodejs" method="post" id="myForm" >
<input type="hidden" value="0" id="nodejsdata" name="nodejsdata" >
<div class="zform_wrapper" >
<table class="table table-striped">
<tr>
<th>Sl no </th>
<th>Domain name</th>
<th>Port no</th>
<th> </th>
</tr>
<% loop all_nodejs_domain %>
<tr>
<td><& nd_no &></td>
<td><& nd_dom &></td>
<td><& nd_port &></td>
<td><input class="delete btn btn-danger" type="button" onclick="callform(<& nd_id &>)" value="<: Remove Node js :>" ></td>
</tr>
<% endloop %>
</table>
</div>
<@ CSFR_Tag @>
</form>
<% endif %>
<div class="clearboth5" > </div>
</div>
<script>
var isd="";
function callform(st_data)
{
document.getElementById("nodejsdata").value=st_data;
document.getElementById("myForm").submit();
}
function mhrpanel()
{
var _self = this;
_self.checkPort = function()
{
var portDetail = document.getElementById("nodejs_port").value.trim();
var nodeInfo = document.getElementById("nodejs_info");
if(portDetail.length > 0 && parseInt(portDetail) > 0)
{
nodeInfo.innerHTML="Please check "+portDetail+" port is available or contact support team ";
}
else
{
nodeInfo.innerHTML="";
}
}
_self.remv_msg = function()
{
var nodeInfo = document.getElementById("nodejs_info");
setTimeout(function(){
nodeInfo.innerHTML="";
},4000);
}
_self.getautorespond = function(id_d)
{
/*var ajaxdata1={
"ajaxurl":"./?module=autoresponder&action=getmailcontent",
"ajaxmethod":"POST",
"ajaxsync":true,
"calldetail":2,
"statusdetail":3,
"datadetail":"data="+encodeURIComponent(id_d),
"callback":function(response)
{
alert(response);
}
}
_self.ajaxcall(ajaxdata1);*/
}
_self.ajaxcall = function(ajaxdata) {
var xmlhttp = ""; // The variable that makes Ajax possible!
try {
// Opera 8.0+, Firefox, Safari
xmlhttp = new XMLHttpRequest();
} catch (e) {
// Internet Explorer Browsers
try {
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {
// Something went wrong
console.log("Your browser broke!");
return false;
}
}
}
// Create a function that will receive data sent from the server
xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
console.log(xmlhttp.responseText);
/*try {
var jsondata = JSON.parse(xmlhttp.responseText);
if (jsondata.status == 0) {
nvd.callhomepage();
} else if (jsondata.status == 1) {
if (ajaxdata.ajaxsync == true) {
if (ajaxdata.statusdetail == 3) {
ajaxdata.callback(jsondata);
} else if (ajaxdata.statusdetail == 4) {
ajaxdata.callback(jsondata);
} else {}
} else {
//This is synchronus false part
}
} else {
console.log("error in code");
}
} catch (ex) {
console.log("error when parse json data " + ex);
}*/
} else if (xmlhttp.status == 404 || xmlhttp.status == 500) {
console.log("404 or 505 error");
} else {}
}
if (ajaxdata.ajaxsync == true) {
xmlhttp.open(ajaxdata.ajaxmethod, ajaxdata.ajaxurl, ajaxdata.ajaxsync);
} else {
xmlhttp.open(ajaxdata.ajaxmethod, ajaxdata.ajaxurl);
}
if (ajaxdata.statusdetail == 4) {
xmlhttp.send(ajaxdata.formdata);
} else {
xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlhttp.send(ajaxdata.datadetail);
}
}
}
document.addEventListener("DOMContentLoaded",function()
{
isd = new mhrpanel();
});
function validateNumber(event) {
var key = window.event ? event.keyCode : event.which;
if (event.keyCode === 8 || event.keyCode === 46) {
return true;
} else if ( key < 48 || key > 57 ) {
return false;
} else {
return true;
}
};
$(document).ready(function(){
$('#nodejs_port').keypress(validateNumber);
});
</script>