|
|
@@ -1,5 +1,5 @@
|
|
|
<?PHP
|
|
|
-include "../pcdl/html_head.php";
|
|
|
+require_once "../pcdl/html_head.php";
|
|
|
?>
|
|
|
<body>
|
|
|
|
|
|
@@ -114,20 +114,31 @@ include "../pcdl/html_head.php";
|
|
|
cursor: pointer;
|
|
|
}
|
|
|
guide{
|
|
|
+ position: relative;
|
|
|
display:inline-block;
|
|
|
width:1.4em;
|
|
|
height:1.4em;
|
|
|
cursor: pointer;
|
|
|
background-color:gray;
|
|
|
}
|
|
|
- #guide {
|
|
|
+ guide:hover .guide_contence{
|
|
|
+ display:inline-block;
|
|
|
+ }
|
|
|
+ .guide_contence {
|
|
|
+ position: absolute;
|
|
|
+ top:100%;
|
|
|
width:18em;
|
|
|
min-height:30em;
|
|
|
+ padding:10px;
|
|
|
background-color:white;
|
|
|
box-shadow: 0 0 10px rgba(0,0,0,0.15);
|
|
|
- }
|
|
|
- #guide h1{
|
|
|
- font-size:2em;
|
|
|
+ font-size:10pt;
|
|
|
+ text-align:left;
|
|
|
+ display:none;
|
|
|
+ }
|
|
|
+
|
|
|
+ .guide_contence h1{
|
|
|
+ font-size:1.5em;
|
|
|
font-weight:700;
|
|
|
}
|
|
|
</style>
|
|
|
@@ -138,7 +149,7 @@ include "../pcdl/html_head.php";
|
|
|
<div>
|
|
|
<div>
|
|
|
<div>
|
|
|
- <input id="dict_ref_search_input" type="input" placeholder="<?php echo $_local->gui->search;?>" onkeyup="dict_input_keyup(event,this)" style=" margin-left: 0.5em;width: 40em;max-width: 100%;font-size:140%;padding: 0.6em;color: var(--btn-hover-bg-color);background-color: var(--btn-color);" onfocus="dict_input_onfocus()" />
|
|
|
+ <guide gid="comp_split"></guide><input id="dict_ref_search_input" type="input" placeholder="<?php echo $_local->gui->search;?>" onkeyup="dict_input_keyup(event,this)" style=" margin-left: 0.5em;width: 40em;max-width: 100%;font-size:140%;padding: 0.6em;color: var(--btn-hover-bg-color);background-color: var(--btn-color);" onfocus="dict_input_onfocus()" />
|
|
|
</div>
|
|
|
<div id="word_parts">
|
|
|
<div id="input_parts" style="font-size: 1.1em;padding: 2px 1em;"></div>
|
|
|
@@ -241,25 +252,38 @@ function GetPageScroll()
|
|
|
echo "</script>";
|
|
|
}
|
|
|
?>
|
|
|
- <div id="guide" style="position:absolute;"></div>
|
|
|
+
|
|
|
<script>
|
|
|
+ $("guide").each(function(){
|
|
|
+ if($(this).offset().left<$(document.body).width()/2){
|
|
|
+ $(this).append('<div class="guide_contence" style="left: 0;"></div>');
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ $(this).append('<div class="guide_contence" style="right: 0;"></div>');
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
$("guide").mouseenter(function(){
|
|
|
- let id = $(this).attr("gid");
|
|
|
- var guideObj = $(this);
|
|
|
- $.get("../../documents/users_guide/en/"+id+".md",
|
|
|
+ if($(this).children(".guide_contence").first().html().length>0){
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ let gid = $(this).attr("gid");
|
|
|
+ let guideObj = $(this);
|
|
|
+ $.get("../guide/get.php",
|
|
|
{
|
|
|
+ id:gid
|
|
|
},
|
|
|
function(data,status){
|
|
|
- $("#guide").html(marked(data));
|
|
|
- $("#guide").appendTo(guideObj);
|
|
|
- //$("#guide").show();
|
|
|
+ try{
|
|
|
+ let jsonGuide = JSON.parse(data);
|
|
|
+ $("guide[gid='"+jsonGuide.id+"']").find(".guide_contence").html(marked(jsonGuide.data));
|
|
|
+ }
|
|
|
+ catch(e){
|
|
|
+ console.error(e);
|
|
|
+ }
|
|
|
});
|
|
|
});
|
|
|
|
|
|
- $("guide").mouseout(function(){
|
|
|
- //$("#guide").hide();
|
|
|
- });
|
|
|
-
|
|
|
</script>
|
|
|
<?php
|
|
|
include "../pcdl/html_foot.php";
|