Commit 322d3ee3 authored by Romain Loth's avatar Romain Loth

css, html + prepare topPapers

parent ea03a7c7
...@@ -5,6 +5,10 @@ ...@@ -5,6 +5,10 @@
// ini_set('display_startup_errors',1); // ini_set('display_startup_errors',1);
// error_reporting(-1); // error_reporting(-1);
// exemple call:
// http://blabla/LOCALDB/info_div.php?type=semantic&bi=0&query=[%22Monte%20Carlo%22]&gexf=%22data/AXA/RiskV2PageRank1000.gexf%22&index=ISItermsAxa_2015
include('parameters_details.php'); include('parameters_details.php');
$max_item_displayed=6; $max_item_displayed=6;
...@@ -22,10 +26,10 @@ function getDB ($directory) { ...@@ -22,10 +26,10 @@ function getDB ($directory) {
$result = ""; $result = "";
$handler = opendir($directory); $handler = opendir($directory);
while ($file = readdir($handler)) { while ($file = readdir($handler)) {
if ($file != "." && $file != ".." if ($file != "." && $file != ".."
&& &&
((strpos($file,'.db~'))==false && (strpos($file,'.db'))==true ) ((strpos($file,'.db~'))==false && (strpos($file,'.db'))==true )
|| ||
((strpos($file,'.sqlite~'))==false && (strpos($file,'.sqlite'))==true) ((strpos($file,'.sqlite~'))==false && (strpos($file,'.sqlite'))==true)
) { ) {
//$results[] = $file; //$results[] = $file;
......
...@@ -277,25 +277,14 @@ ...@@ -277,25 +277,14 @@
<!-- say thanks for the suggestion, etc. --> <!-- say thanks for the suggestion, etc. -->
<li id="crowdsourcing_answer" class="nav crowdsourcingModule navbar-lower"></li> <li id="crowdsourcing_answer" class="nav crowdsourcingModule navbar-lower"></li>
<li class="navbar-lower"> <!-- checkbox -->
<!-- <li class="navbar-lower">
<input id="checkboxdiv" onclick="alertCheckBox(this);" <input id="checkboxdiv" onclick="alertCheckBox(this);"
title="Add next search results to current selection" title="Add next search results to current selection"
class="nav btn btn-info" class="nav btn btn-info"
type="checkbox"> type="checkbox">
<span style="position: relative; top: 4px;">Add to selection</span> <span style="position: relative; top: 4px;">Add to selection</span>
</li> -->
</li> <!-- /checkbox group -->
<li style="margin: 20px 0 0 10px;">
<div class="onoffswitch">
<input type="checkbox" name="edges-switch" class="onoffswitch-checkbox" id="edges-switch" checked>
<label class="onoffswitch-label" for="edges-switch">
<span id="edges-switch-inner-label" class="onoffswitch-inner"></span>
<span class="onoffswitch-switch"></span>
</label>
</div>
</li>
</ul> </ul>
...@@ -366,6 +355,17 @@ ...@@ -366,6 +355,17 @@
<img src="libs/img2/edges.png" style="width:32px"> <img src="libs/img2/edges.png" style="width:32px">
</a> </a>
</li> </li>
<li>
<div class="onoffswitch">
<input type="checkbox" name="edges-switch" class="onoffswitch-checkbox" id="edges-switch" checked>
<label class="onoffswitch-label" for="edges-switch">
<span id="edges-switch-inner-label" class="onoffswitch-inner"></span>
<span class="onoffswitch-switch"></span>
</label>
</div>
</li>
</ul> </ul>
<!-- inline *after* sigma-contnr for better overlay positioning --> <!-- inline *after* sigma-contnr for better overlay positioning -->
......
...@@ -269,32 +269,44 @@ function set_ClustersLegend ( daclass ) { ...@@ -269,32 +269,44 @@ function set_ClustersLegend ( daclass ) {
// = = = = = = = = = = = [ / Clusters Plugin ] = = = = = = = = = = = // // = = = = = = = = = = = [ / Clusters Plugin ] = = = = = = = = = = = //
//For CNRS //For CNRS
// function getTopPapers(type){
// if(TW.getAdditionalInfo){
// console.log("getTopPapers")
// jsonparams=JSON.stringify(getSelections());
// bi=(Object.keys(categories).length==2)?1:0;
// //jsonparams = jsonparams.replaceAll("&","__and__");
// jsonparams = jsonparams.split('&').join('__and__');
// //dbsPaths.push(getGlobalDBs());
// thisgexf=JSON.stringify(decodeURIComponent(getUrlParam.file));
// image='<img style="display:block; margin: 0px auto;" src="'+TW.APINAME+'img/ajax-loader.gif"></img>';
// $("#tab-container-top").show();
// $("#topPapers").show();
// $("#topPapers").html(image);
// $.ajax({
// type: 'GET',
// url: TW.APINAME+'info_div.php',
// data: "type="+type+"&bi="+bi+"&query="+jsonparams+"&gexf="+thisgexf+"&index="+TW.field[getUrlParam.file],
// //contentType: "application/json",
// //dataType: 'json',
// success : function(data){
// console.log(TW.APINAME+'info_div.php?'+"type="+type+"&bi="+bi+"&query="+jsonparams+"&gexf="+thisgexf+"&index="+TW.field[getUrlParam.file]);
// $("#topPapers").html(data);
// },
// error: function(){
// console.log('Page Not found: getTopPapers');
// }
// });
// }
// }
function getTopPapers(type){ function getTopPapers(type){
console.log("new getTopPapers")
if(TW.getAdditionalInfo){ if(TW.getAdditionalInfo){
jsonparams=JSON.stringify(getSelections()); jsonparams=JSON.stringify(getSelections());
bi=(Object.keys(categories).length==2)?1:0;
//jsonparams = jsonparams.replaceAll("&","__and__");
jsonparams = jsonparams.split('&').join('__and__'); jsonparams = jsonparams.split('&').join('__and__');
//dbsPaths.push(getGlobalDBs());
thisgexf=JSON.stringify(decodeURIComponent(getUrlParam.file)); $("#topPapers").html("<p> jsonparams:"+jsonparams+" </p>");
image='<img style="display:block; margin: 0px auto;" src="'+TW.APINAME+'img/ajax-loader.gif"></img>'; $("#topPapers").show()
$("#tab-container-top").show();
$("#topPapers").show();
$("#topPapers").html(image);
$.ajax({
type: 'GET',
url: TW.APINAME+'info_div.php',
data: "type="+type+"&bi="+bi+"&query="+jsonparams+"&gexf="+thisgexf+"&index="+TW.field[getUrlParam.file],
//contentType: "application/json",
//dataType: 'json',
success : function(data){
console.log(TW.APINAME+'info_div.php?'+"type="+type+"&bi="+bi+"&query="+jsonparams+"&gexf="+thisgexf+"&index="+TW.field[getUrlParam.file]);
$("#topPapers").html(data);
},
error: function(){
console.log('Page Not found: getTopPapers');
}
});
} }
} }
......
...@@ -69,8 +69,8 @@ function search_proposed_terms_and_draw( the_queries ) { ...@@ -69,8 +69,8 @@ function search_proposed_terms_and_draw( the_queries ) {
}, },
error: function(exception) { error: function(exception) {
// console.log("search_proposed_terms_and_draw:exception" console.log("search_proposed_terms_and_draw:exception"
// + JSON.stringify(exception)) + JSON.stringify(exception))
$search_histogram $search_histogram
.html('<p class="micromessage">' .html('<p class="micromessage">'
+'<b>No histogram</b>: too many nodes selected</b>' +'<b>No histogram</b>: too many nodes selected</b>'
......
...@@ -8,6 +8,15 @@ ...@@ -8,6 +8,15 @@
-moz-box-shadow: 0px 2px 6px #000; -moz-box-shadow: 0px 2px 6px #000;
-webkit-box-shadow: 0px 2px 6px #000; -webkit-box-shadow: 0px 2px 6px #000;
box-shadow: 0px 2px 6px #000; box-shadow: 0px 2px 6px #000;
/*non selectable*/
-webkit-touch-callout: none; /* iOS Safari */
-webkit-user-select: none; /* Safari */
-khtml-user-select: none; /* Konqueror HTML */
-moz-user-select: none; /* Firefox */
-ms-user-select: none; /* Internet Explorer/Edge */
user-select: none; /* Non-prefixed version, currently
supported by Chrome and Opera */
} }
#unselectbutton { #unselectbutton {
...@@ -19,7 +28,7 @@ ...@@ -19,7 +28,7 @@
margin-right:1em margin-right:1em
} }
""
/* LEGEND PANEL */ /* LEGEND PANEL */
.legend_for_clusters { .legend_for_clusters {
position:absolute; position:absolute;
...@@ -140,9 +149,6 @@ ...@@ -140,9 +149,6 @@
} }
#zoomSliderzone { #zoomSliderzone {
height: 100px;
top: -9px;
position: relative;
} }
#edgesButton { #edgesButton {
...@@ -234,11 +240,11 @@ ...@@ -234,11 +240,11 @@
}*/ }*/
#unfold { #unfold {
width: 12px; height: 12px; background: rgb(250, 250, 252); padding: 2px 2px 2px 0; border-top-right-radius: 5px; border-bottom-right-radius: 5px; box-shadow: 1px 1px 2px #808090; display:none; width: 12px; height: 12px; background: rgb(250, 250, 252); padding: 2px 2px 2px 0; border-top-right-radius: 5px; border-bottom-right-radius: 5px; box-shadow: 1px 1px 2px #808090;
} }
#aUnfold { #aUnfold {
display: block; width: 12px; height: 12px; background-image: url("../img2/fleches-horiz.png"); margin: 0 auto; display: none; width: 12px; height: 12px; background-image: url("../img2/fleches-horiz.png"); margin: 0 auto;
} }
/* /*
#saveAs { #saveAs {
...@@ -249,7 +255,7 @@ ...@@ -249,7 +255,7 @@
#zoomSlider { #zoomSlider {
background:#fff; background:#fff;
border:1px solid #aaa; border:1px solid #aaa;
height: 120px; margin: 0 auto; height: 90px; margin: 0 auto;
} }
......
...@@ -22,6 +22,12 @@ html, body { ...@@ -22,6 +22,12 @@ html, body {
left: 0; left: 0;
right: 250px; right: 250px;
z-index: 1; z-index: 1;
/* non selectable: we've got our own events here */
-webkit-user-select: none; /* Safari */
-moz-user-select: none; /* Firefox */
-ms-user-select: none; /* IE/Edge */
user-select: none; /* Chrome and Opera, future + */
} }
#sidebar { #sidebar {
...@@ -122,6 +128,11 @@ html, body { ...@@ -122,6 +128,11 @@ html, body {
} }
/* right info panel */
#accordion {
display:none
}
/* VARIAE */ /* VARIAE */
#selectionsBox{ #selectionsBox{
......
...@@ -5,7 +5,7 @@ var TW = {} ...@@ -5,7 +5,7 @@ var TW = {}
TW.colorByAtt = false; TW.colorByAtt = false;
TW.twittertimeline = false; TW.twittertimeline = false;
TW.minimap=false; TW.minimap=false;
TW.getAdditionalInfo=true;// True: Activate TopPapers feature. TW.getAdditionalInfo = true;// True: Activate TopPapers feature.
//TW.mainfile = ["db.json"]; //TW.mainfile = ["db.json"];
// // TW.mainfile = "api.json"; // // TW.mainfile = "api.json";
TW.mainfile = [ TW.mainfile = [
...@@ -21,7 +21,7 @@ var TW = {} ...@@ -21,7 +21,7 @@ var TW = {}
// // "data/example.json", // // "data/example.json",
// // "data/Elisa__Omodei.gexf", // // "data/Elisa__Omodei.gexf",
]; ];
TW.APINAME = "LOCALDB/"; TW.APINAME = "LOCALDB/"; // TODO use in topPapers
TW.tagcloud_limit = 50; TW.tagcloud_limit = 50;
TW.bridge={}; TW.bridge={};
TW.bridge["forFilteredQuery"] = "php/bridgeClientServer_filter.php"; TW.bridge["forFilteredQuery"] = "php/bridgeClientServer_filter.php";
...@@ -56,9 +56,6 @@ var TW = {} ...@@ -56,9 +56,6 @@ var TW = {}
TW.catSoc = "Document"; TW.catSoc = "Document";
TW.catSem = "NGram"; TW.catSem = "NGram";
// to get ajax topPapers via info_div.php
TW.getAdditionalInfo = false;
TW.strSearchBar = "Select or suggest topics"; TW.strSearchBar = "Select or suggest topics";
var ParseCustom = function () {}; var ParseCustom = function () {};
......
...@@ -762,7 +762,7 @@ TinaWebJS = function ( sigmacanvas ) { ...@@ -762,7 +762,7 @@ TinaWebJS = function ( sigmacanvas ) {
min: 1 / sigmaJsMouseProperties.maxRatio, min: 1 / sigmaJsMouseProperties.maxRatio,
max: 1 / sigmaJsMouseProperties.minRatio, max: 1 / sigmaJsMouseProperties.minRatio,
// range: true, // range: true,
step: 1, step: .2,
value: 1, value: 1,
slide: function( event, ui ) { slide: function( event, ui ) {
partialGraph.camera.goTo({ partialGraph.camera.goTo({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment