jQuery easyui layout centering - one region overlaying another - layout

I am trying to centre a button inside a region by using jQuery easyui layout feature:
<!DOCTYPE html>
<html style="height: 90%;">
<head>
<meta charset="UTF-8">
<title>The Analytic Platform - Home Page</title>
<link rel="stylesheet" type="text/css" href="../themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="../themes/icon.css">
<link rel="stylesheet" type="text/css" href="demo.css">
<script type="text/javascript" src="../jquery.min.js"></script>
<script type="text/javascript" src="../jquery.easyui.min.js"></script>
<style>
.middle {
height:30%;
}
.topandbelow {
height:40%;
}
</style>
</head>
<body style="height: 90%;">
<h2>The Analytic Platform</h2>
<p>Easy analytics for everyone!</p>
<div id="p" class="easyui-panel" title="Step 1: Load data for analysis" style="width:100%;height:100%;padding:10px;">
<div class="easyui-layout" data-options="fit:true" style="width:100%;height:100%">
<div data-options="region:'west',split:false,border:true" style="width:40%;" title="Get data from Excel file">
<div class="easyui-layout" data-options="fit:true" style="width:100%;height:100%">
<div data-options="region:'centre',split:false,border:true" style="width:100%;">
<a href="ExcelUpload.html" class="easyui-linkbutton" >Upload Excel file</a>
</div>
</div>
</div>
<div data-options="region:'east',split:false,border:true" style="width:40%;height:100%" title="Get data from database">
<div class="easyui-layout" data-options="fit:false" style="width:100%;height:100%">
<div data-options="region:'north',split:false,border:true" class="topandbelow"></div>
<div data-options="region:'centre',split:false,border:true" class="middle">
Define Database Connection
</div>
<div data-options="region:'south',split:false,border:true" class="topandbelow"></div>
</div>
</div>
</div>
</div>
</body>
</html>
The "east" region is not displaying its nested "centre" region with the "north" region overlaying it.
What could be wrong in here?

Related

CSS And Other Few Elements Not Working In Express Website. Node.js

I am making a discord bot with website, and i have defined css and other stuff in .html file but its still not showing when i go to the website.
res.status(200).sendFile(path.resolve(__dirname, "../../website/command.html"))
})
Thats how i require the html file.
The Html File:
<html lang="en-US">
<head>
<title>Commandli</title>
<link rel="icon" href="https://cdn.discordapp.com/avatars/746706292562853888/0b578635739cbd7e5b076e65f2c04a4c.png?size=2048">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="./css/commands.css" />
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght#300;500;600;700&display=swap" rel="stylesheet">
</head>
<body>
<header class="header">
<img src="https://cdn.discordapp.com/avatars/"/> bot
<input class="menu-btn" type="checkbox" id="menu-btn" />
<label class="menu-icon" for="menu-btn"><span class="navicon"></span></label>
<ul class="menu">
<li>Home</li>
<li><a class="active" href="commands.html">Commands</a></li>
<li>About us</li>
<li>Contact us</li>
<li>Invite bot</li>
</ul>
</header>
<main>
<section class="tabs">
<div class="tab-header">
<div class="tablink tab-active" onclick="openCity(event,'Utility')">Utility</div>
<div class="tablink " onclick="openCity(event,'Fun')">Fun</div>
<div class="tablink" onclick="openCity(event,'Economy')">Economy</div>
<div class="tablink" onclick="openCity(event,'Info')">Info</div>
<div class="tablink" onclick="openCity(event,'Games')">Games</div>
<div class="tablink" onclick="openCity(event,'Misc')">Misc</div>
<div class="tablink" onclick="openCity(event,'All commands')">All commands</div>
</div>
<div style="margin-left:130px">
<div id="Utility" class="tab-content category" style="display:block">
<p><a>Utility commnads</a><br>Those commands help you with some things</p>
<p><a>=dungeon</a><br>Sends information about the current dungeon.</p>
<p><a>=help</a><br>Sends help!</p>
<p><a>=gamepedia</a><br>Search what you want on gamepedia</p>
<p><a>=welcome info</a><br>Information about the welcome system</p>
<p><a>Soon more!</a><br>Stay tuned!</p>
</div>
</div>
<script type="text/javascript" src="../js/commands.js"></script>
</section>
</main>
</body>
</html>
HTML file in bin = https://sourceb.in/DEA1wBlvs2
(Had to remove some code because it was huge)

How to Change SAPI VOICES in Windows [PHP]

I have basic code which works as:
$voice = new COM("SAPI.SpVoice");
voice .Speak("hello world");
I am getting RID of default voice, So
I am now looking at a way to change which voice is getting used for the TTS.
I want to change SAPI voice to ZIRA
What is the correct way to change the default voice, I read some thread here , But it is in javascript, and it is not working.
my code :
#$submit = $_POST['process'];
#$word = $_POST['texttospeech'];
$voice = new COM("SAPI.SpVoice");
if($_SERVER["REQUEST_METHOD"] == "POST" and isset($submit) and !empty($word)){
$voice->Speak($word);
}
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="robots" content="noindex, nofollow">
<title>PHP Text to Speech</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="img/fav.png" type="image/png">
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
</head>
<body onload="startTime()">
<nav class="navbar-inverse" role="navigation">
<a href="https://google.com/" target="_blank">
<img src="img/cod.png" class="hederimg">
</a>
<div id="clockdate">
<div class="clockdate-wrapper">
<div id="clock"></div>
<div id="date"><?php echo date('l, F j, Y'); ?></div>
</div>
</div>
</nav>
<div class="topmost">
<div class="col-md-12">
<div class="panel panel-primary">
<div class="panel-heading">
<center>
<strong class="panelinputtitle">PHP Text to Speech Converter Using Microsoft Speech API</strong>
</center>
</div>
<div class="panel-body">
<form method = "POST">
<div class = "form-group">
<textarea class="form-control input-sm" rows="6" name="texttospeech" placeholder="Type your Text Here..."></textarea>
</div>
<div class = "form-group">
<input type = "submit" class = "btn btn-primary btn-block" name="process" value="Speak">
</div>
</form>
</div>
</div>
</div>
</div>
<script src="js/bootstrap.min.js"></script>
<script src="js/script.js"></script>
</body>
</html>
Thanks in advance.
I've searched this one a long time ..
At least selecting Zira within the control panel as default voice works

I'm having trouble horizontally centering my h1 with zurb flexbox

I'm new to flexbox, and I've tried applying align-center to the row class but, the h1 will not center. Could someone give me a hand with this, and explain to me why the align center is not working? Here is a code pen Codepen
<!doctype html>
<html class="no-js" lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Foundation for Sites</title>
<link rel="stylesheet" href="css/foundation.css">
<link rel="stylesheet" href="css/app.css">
</head>
<body>
<div class='header-section'>
<div class='title-bar' data-responsive-toggle='menu' data-hide-for='medium'>
<button class='menu-icon' type='button' data-toggle></button>
<div class='title-bar-title'>Menu</div>
</div>
<div class='top-bar' id='menu'>
<div class='top-bar-left'>
<ul class='dropdown vertical medium-horizontal menu' data-dropdown-menu>
<li class='menu-text'>The American Dream</li>
<li>Home</li>
<li>About</li>
<li>Contact</li>
</ul>
</div>
</div>
</div>
<div class='main-content'>
<div class='row'>
<div class='small-12 column'>
<h1>And...Then, ZANG!</h1>
</div>
</div>
</div>
<script src="js/vendor/jquery.js"></script>
<script src="js/vendor/what-input.js"></script>
<script src="js/vendor/foundation.js"></script>
<script src="js/app.js"></script>
</body>
</html>

Bootstrap Modal Windows in NodeJS

I am developing a dashboard website in NodeJS and MongoDB. In one of the page, I have to open an image in the modal window. Following is the code of that page.
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Tor Modal Check</title>
<link rel="stylesheet" href="css/style.default.css" type="text/css" />
<link rel="stylesheet" href="css/responsive-tables.css">
<script type="text/javascript" src="js/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="js/jquery-migrate-1.1.1.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
<script type="text/javascript" src="js/jquery-ui-1.9.2.min.js"></script>
<script type="text/javascript" src="js/modernizr.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/jquery.bxSlider.min.js"></script>
<script type="text/javascript" src="js/jquery.cookie.js"></script>
<script type="text/javascript" src="js/jquery.uniform.min.js"></script>
<script type="text/javascript" src="js/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="js/flot/jquery.flot.min.js"></script>
<script type="text/javascript" src="js/jquery.slimscroll.js"></script>
<script type="text/javascript" src="js/flot/jquery.flot.pie.min.js"></script>
<script type="text/javascript" src="js/flot/jquery.flot.resize.min.js"></script>
<script type="text/javascript" src="js/responsive-tables.js"></script>
<script type="text/javascript" src="js/custom.js"></script>
<style type="text/css">
body .modal {
width: 650px;
margin-left: -325px;
}
</style>
</head>
<body>
<div class="mainwrapper">
<div class="rightpanel">
<ul class="commentlist">
<% tor.forEach(function(t){ %>
<li>
<img src="images/screenshot/<%= t.screenshot %>" alt="" style="width: 60px;" class="pull-left" />
<div class="comment-info">
<h4><%= t.url %></h4>
<p><strong>Comments: </strong><%= t.comments %></p>
<div class="container">
<!-- Trigger the modal with a button -->
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#<%= t.modalid %>">Show Screenshot</button>
<!-- Modal -->
<div class="modal fade" id="<%= t.modalid %>" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title"><%= t.url %></h4>
</div>
<div class="modal-body">
<img src="images/screenshot/<%= t.screenshot %>" height="100%" width="100%">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</div>
</div>
</li>
<% }) %>
</ul>
</div>
</div>
</body>
The problem that I am facing is that not all "View Screenshot" are clickable. After digging a lot, I figure it's because of "rightpanel" div class.
/*** MAIN PANEL ***/
.rightpanel { margin-left: 260px; background: #f7f7f7; }
.rightpanel:after { clear: both; content: ''; display: block; }
If I remove margin-left: 260px; everything works as expected.
Any idea why this is happening and how to overcome it?
PS. This is not the complete code. Only the code that is significant for this question.
EDIT 1:
It works perfectly fine when i change margin-left: 260px to margin-left: 150px.
Bootstrap modals are already centered and have three sizes (300px for .modal-sm, 600px (default) and 900px for .modal-lg). But, if you need the width to be exactly 650px, you should set the width of .modal-dialog, not .modal. For example:
#media (min-width: 768px)
.modal-dialog {
width: 650px;
}

close off canvas menu after click links foundation

I have set up my site with an off canvas menu when it goes mobile
<html class="no-js" lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title> Mobile Application</title>
<link rel="stylesheet" href="css/normalize.css" />
<link rel="stylesheet" href="css/foundation.css" />
<link rel="stylesheet" href="css/custom.css" />
<link rel="stylesheet" href="css/custom-mobile-portrait.css" />
<link rel="stylesheet" href="css/custom-mobile-landscape.css" />
<link rel="stylesheet" href="css/custom-xlarge.css" />
<link rel="stylesheet" href="css/custom-ipad.css" />
<link rel="stylesheet" href="css/custom-ipad-portrait.css" />
<link rel="stylesheet" href="css/font-sizes.css" />
<link href='http://fonts.googleapis.com/css?family=Muli' rel='stylesheet' type='text/css'>
<script src="js/vendor/modernizr.js"></script>
<a name="head"></a>
</head>
<body>
<div class="off-canvas-wrap mobile-menu" data-offcanvas>
<div class="inner-wrap">
<nav class=" tab-bar hidden-for-large-up" data-topbar ">
<section class="left-small ">
<a class="left-off-canvas-toggle menu-icon " href="# "><span></span></a>
</section>
<section class="middle tab-bar-section ">
</section>
</nav>
<aside class="left-off-canvas-menu ">
<ul class="off-canvas-list ">
<li><label>Dehumaniser App</label></li>
<li><STRONG>TOP</STRONG></li>
<li><STRONG>APP OVERVIEW</STRONG></li>
<li><STRONG>HOW DOES IT WORK</STRONG></li>
<li><a href="#features " ><STRONG>FEATURES</STRONG></a></li>
<li><STRONG>GALLERY</STRONG></li>
</ul>
</aside>
<!-- <aside class="right-off-canvas-menu ">
<ul class="off-canvas-list ">
<li><label>Users</label></li>
<li>Hari Seldon</li>
<li>...</li>
</ul>
</aside> -->
<section class="main-section ">
i put my site content in here and then after my code finishes:
<script type="text/javascript" src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
<script type="text/javascript" src="http://code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
<script src="js/vendor/fastclick.js"></script>
<script src="js/foundation.min.js"></script>
<script src="js/foundation/foundation.js"></script>
<script src="js/foundation/foundation.offcanvas.js"></script>
<link rel="stylesheet" type="text/css" href="http://cdn.jsdelivr.net/jquery.slick/1.3.15/slick.css" />
<script type="text/javascript" src="http://cdn.jsdelivr.net/jquery.slick/1.3.15/slick.min.js"></script>
<script src="js/myscript.js"></script>
<script src="js/foundation/foundation.topbar.js"></script>
<script src="js/foundation/foundation.orbit.js"></script>
<script src="js/myscript.js"></script>
<script type="text/javascript">
jQuery(document).ready(function() {
jQuery('.single-item').slick();
});
</script>
<script type="text/javascript">
jQuery(document).foundation()
</script>
</section>
<a class="exit-off-canvas"></a>
</div>
</div>
<script>
jQuery(document).foundation();
jQuery('a.left-off-canvas-toggle').on('click', function() {
});
</script>
<div id="fixedbutton">
<a href="#head"><img src="img/upbutton.png">
</a>
</div>
</body>
</html>
I get the proper off canvas behavior (I get the three lines box . when I click the box it opens, and the off-canvas menu appears) but when I click a menu link even though the page scrolls smoothly down the off-canvas menu doesn't close. How can I fix this?
Try to add these lines to your script
$(document).foundation({
offcanvas : {
close_on_click : true
}
});

Resources