Aded business menu
This commit is contained in:
50
Client/inputhelper/web/inputhelper.css
Normal file
50
Client/inputhelper/web/inputhelper.css
Normal file
@@ -0,0 +1,50 @@
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#black {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: -1;
|
||||
background-color: rgba(0, 0, 0, .3);
|
||||
}
|
||||
|
||||
.input-main {
|
||||
display: block;
|
||||
width: 70%;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
|
||||
background-color: rgba(0, 0, 0, .8);
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.input-main h1 {
|
||||
color: white;
|
||||
font-size: 24px;
|
||||
font-family: "Arial";
|
||||
font-weight: lighter;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.input-main input {
|
||||
width: 100%;
|
||||
background-color: black;
|
||||
outline: 0;
|
||||
border: grey 1px solid;
|
||||
color: white;
|
||||
padding: 5px;
|
||||
font-size: 20px;
|
||||
font-family: "Arial";
|
||||
font-weight: lighter;
|
||||
}
|
||||
|
||||
32
Client/inputhelper/web/inputhelper.html
Normal file
32
Client/inputhelper/web/inputhelper.html
Normal file
@@ -0,0 +1,32 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="inputhelper.css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="black"></div>
|
||||
<div class="input-main">
|
||||
<h1></h1>
|
||||
<input id="input-value" autofocus>
|
||||
</div>
|
||||
<script type="text/javascript" src="package://Dependences/jquery-3.3.1.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
mp.trigger('cef_request_title');
|
||||
|
||||
$('#input-value').keydown(function (e) {
|
||||
if (e.keyCode != 13) return;
|
||||
var currentValue = $('#input-value').val();
|
||||
if (currentValue) {
|
||||
mp.trigger('cef_inputhelper_sendvalue', currentValue);
|
||||
console.log("triggered event: " + currentValue);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function setTitle(title) {
|
||||
$('.input-main h1').text(title);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user