Commit 86aed139 authored by PkSM3's avatar PkSM3

last beta version

parent 9890a4bd
/*
* Customize as you want ;)
*/
function callGeomap(){
db=getCurrentDBforCurrentGexf();
db=JSON.stringify(db);
if(is_empty(selections)){
jsonparams='["all"]';
} else {
jsonparams=JSON.stringify(getSelections());
jsonparams = jsonparams.split('&').join('__and__');
}
pr('in callGeomap: db='+db+'&query='+jsonparams);
initiateMap(db,jsonparams,"geomap/");
$("#ctlzoom").hide();
$("#CurrentView").hide();
sigmaheight=$('#leftcolumn').height();
$('.geomapCont').height(sigmaheight);
}
function callTWJS(){
// db=getCurrentDBforCurrentGexf();
// db=JSON.stringify(db);
// if(is_empty(selections)){
// jsonparams='["all"]';
// } else {
// jsonparams=JSON.stringify(getSelections());
// jsonparams = jsonparams.split('&').join('__and__');
// }
// pr('in callGeomap: db='+db+'&query='+jsonparams);
// initiateMap(db,jsonparams,"geomap/"); //From GEOMAP submod
sigmaheight=$('#leftcolumn').height();
$('.sigma-parent').height(sigmaheight);
$("#ctlzoom").show();
$("#CurrentView").show();
}
function selectionToMap(){
if(geomap) {
db=getCurrentDBforCurrentGexf();
db=JSON.stringify(db);
param='geomap/?db='+db+'';
if(is_empty(selections)){
newPopup('geomap/?db='+db+'&query=all');
} else pr("selection to geomap: be patient");
db=getCurrentDBforCurrentGexf();
db=JSON.stringify(db);
param='geomap/?db='+db+'';
if(is_empty(selections)){
newPopup('geomap/?db='+db+'&query=["all"]');
} else {
pr("selection to geomap:");
jsonparams=JSON.stringify(getSelections());
jsonparams = jsonparams.split('&').join('__and__');
pr('geomap/?db='+db+'&query='+jsonparams);
newPopup('geomap/?db='+db+'&query='+jsonparams);
}
}
......@@ -43,25 +82,23 @@ function getGlobalDBs(){
function getTopPapers(type){
if(getAdditionalInfo){
params=[];
for(var i in selections){
params.push(Nodes[i].label);
}
jsonparams=JSON.stringify(params);
jsonparams=JSON.stringify(getSelections());
//jsonparams = jsonparams.replaceAll("&","__and__");
jsonparams = jsonparams.split('&').join('__and__');
dbsPaths=getCurrentDBforCurrentGexf();
//dbsPaths.push(getGlobalDBs());
dbsPaths=JSON.stringify(dbsPaths);
thisgexf=JSON.stringify(decodeURIComponent(getUrlParam.file));
image='<img style="display:block; margin: 0px auto;" src="'+twjs+'img/ajax-loader.gif"></img>';
$("#topPapers").html(image);
$.ajax({
type: 'GET',
url: twjs+'php/info_div.php',
data: "type="+type+"&query="+jsonparams+"&dbs="+dbsPaths,
data: "type="+type+"&query="+jsonparams+"&dbs="+dbsPaths+"&gexf="+thisgexf,
//contentType: "application/json",
//dataType: 'json',
success : function(data){
pr(twjs+'php/info_div.php?'+"type="+type+"&query="+jsonparams+"&dbs="+dbsPaths);
pr(twjs+'php/info_div.php?'+"type="+type+"&query="+jsonparams+"&dbs="+dbsPaths+"&gexf="+thisgexf);
$("#topPapers").html(data);
},
error: function(){
......@@ -136,6 +173,11 @@ function updateLeftPanel_uni(){//Uni-partite graph
left: _cG.width() + "px"
});
});
i=0; for(var s in selections) i++;
if(is_empty(selections)==true || i==0){
cancelSelection(false);
partialGraph.draw();
}
}
//FOR UNI-PARTITE
......@@ -244,8 +286,7 @@ function showhideChat(){
function getTips(){
param='href="#" onclick="selectionToMap();" ';
text = '<div><br/><br/><h4>TIPS</h4><p> <b>- You can search for an expression in the search bar.</b><br/><p> <b>- When a node is selected, you can clic in the side bar on its name to launch a google search on that term.</b><br/><p> <b>- Double clic on a node to get more information</b><br/><b>- Double clic an empty area to erase current selection</b></p></div><br/><center><strong><a '+param+' >See the network world distribution</a></strong></center><br/><div id="footer"></div></div>';
text = '<div><br/><br/><h4>TIPS</h4><p> <b>- You can search for an expression in the search bar.</b><br/><p> <b>- When a node is selected, you can clic in the side bar on its name to launch a google search on that term.</b><br/><p> <b>- Double clic on a node to get more information</b><br/><b>- Double clic an empty area to erase current selection</b></p></div><br/><div id="footer"></div></div>';
return text;
}
......
<!DOCTYPE html>
<html>
<head>
<title>TinaJS</title>
<title>Mapping Rockefeller Portfolio</title>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="tinawebJS/styles/gexfjs.css" />
<link rel="stylesheet" type="text/css" href="tinawebJS/styles/tinaweb.css" />
......@@ -12,6 +12,12 @@
<script src="libs/jquery/jquery-ui.js" type="text/javascript"></script>
<script src="libs/jquery/jquery.ba-dotimeout.min.js" type="text/javascript"></script>
<script src="libs/jquery/jquery.mousewheel.min.js" type="text/javascript"></script>
<script src="geomap/js/raphael/raphael-min.js" charset="utf-8" ></script>
<script src="geomap/js/jquery.mapael.js" charset="utf-8" ></script>
<script src="geomap/js/maps/world_countries.js" charset="utf-8" ></script>
<script src="geomap/examples.js" charset="utf-8" ></script>
<link rel="stylesheet" type="text/css" href="geomap/css/geo.css" />
<script src="tinawebJS/js/canvas2image/base64.js" type="text/javascript"></script>
<script src="tinawebJS/js/canvas2image/canvas2image.js" type="text/javascript"></script>
......@@ -33,6 +39,12 @@
url,'popUpWindow','height=700,width=800,left=10,top=10,resizable=yes,scrollbars=yes,toolbar=no,menubar=no,location=no,directories=no,status=no')
}
</script>
<script>
$(function() {
$( "#tabs" ).tabs();
});
</script>
</head>
<!--<body onload="getChatFrame();">-->
......@@ -137,7 +149,7 @@
<div id="gexfs" style="margin-left:100px; width: 100px; float: left;"></div>
<div id="boxCurrentGraph">
Current graph: <strong><div id="currentGraph"></div></strong>
Current Landscape: <strong><div id="currentGraph"></div></strong>
</div>
<div style="float: right;">
......@@ -153,12 +165,32 @@
<div id="zonecentre" class="gradient">
<div class="sigma-parent">
<div onmousemove='if(typeof(partialGraph)!=="undefined" && cursor_size>0){trackMouse();}' oncontextmenu='return false;'
class="sigma-expand" id="sigma-example">
</div>
</div>
<!-- <div id="tabs">-->
<!-- <ul>-->
<!-- <li><a href="#tabs-1" onclick="callTWJS();">Semantic Landscape</a></li>-->
<!-- <li><a href="#tabs-2" onclick="callGeomap();">Worldmap</a></li>-->
<!-- </ul>-->
<!-- <div id="tabs-1">-->
<div onmousemove=
'if(typeof(partialGraph)!=="undefined" && cursor_size>0) {
trackMouse();
}' oncontextmenu='return false;'
class="sigma-expand" id="sigma-example"></div>
<!-- <div class="sigma-parent">-->
<!-- <div onmousemove='if(typeof(partialGraph)!=="undefined" && cursor_size>0){trackMouse();}' oncontextmenu='return false;' -->
<!-- class="sigma-expand" id="sigma-example">-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div id="tabs-2">-->
<!-- <div class="geomapCont"></div>-->
<!-- </div>-->
<!-- </div>-->
<ul id="ctlzoom">
<li>
......@@ -204,8 +236,8 @@
<div id="leftcolumn">
<div id="unfold">
<a href="#" id="aUnfold" class="rightarrow"> </a>
<a href="#" title="Status"><img width="60" src="tinawebJS/img/trans/status_title.png"></img></a>
<div align="center" style="left: -250px">
<div id="CurrentView" align="center" style="left: -250px">
<a href="#" title="Status"><img width="60" src="tinawebJS/img/trans/status_title.png"></img></a>
<table cellpadding="0" cellspacing="0">
<tr>
<td>
......@@ -228,9 +260,6 @@
-->
</div>
<div id="leftcontent">
<div style="text-align: center;">
<img src="rock/rock.png">
</div>
<div style="text-align: center;">
<img onclick="changeSwitchImage('fromHtml','')" id="switchbutton" width="60" src="tinawebJS/img/trans/showKeywords.png"></img>
</div>
......@@ -241,7 +270,7 @@
<div id="tips"></div>
<div id="names"></div>
<div id="opossiteNodes"></div>
<div id="topPapers"></div>
<!-- <div id="topPapers"></div>-->
<div id="information"></div>
</div>
</div>
......
......@@ -4,11 +4,14 @@
// ============ < DEVELOPER OPTIONS > ============
var geomap=false;
var minimap=false;
var getAdditionalInfo=false;//for topPapers div
var mainfile=encodeURIComponent("data/InnovativeAward.gexf");//"2-Terms-Authors-300nodes.gexf";
var mainfile=encodeURIComponent("data/CSLbibraph.gexf");//"2-Terms-Authors-300nodes.gexf";
var dataFolderTree = {};
var gexfDict={};
//gexfDict["data/the.gexf"]="The characteristic name";
gexfDict={};
//gexfDict["data/nci/NCI350_all.gexf"]="NCI 2013 - Landscape";
ircNick="";
......@@ -22,27 +25,35 @@ var startingNodeId = "1";
var minLengthAutoComplete = 1;
var maxSearchResults = 10;
var strSearchBar = "Search";
var cursor_size= 100;
var cursor_size_min= 0;
var cursor_size= 0;
var cursor_size_max= 100;
var desirableTagCloudFont_MIN=12;
var desirableTagCloudFont_MAX=20;
var desirableNodeSizeMIN=1;
var desirableNodeSizeMAX=12;
var desirableNodeSizeMAX=9;
var desirableScholarSize=6; //Remember that all scholars have the same size!
var fa2enabled=false;
/*
*Three states:
* - true: fa2 running at start
* - false: fa2 stopped at start, button exists
* - "off": button doesn't exist, fa2 stopped forever
**/
var fa2enabled="off";
var showLabelsIfZoom=2.0;
// ============ < SIGMA.JS PROPERTIES > ============
var desirableNodeSizeMIN=1;
var desirableNodeSizeMAX=12;
var desirableNodeSizeMAX=9;
var desirableScholarSize=6; //Remember that all scholars have the same size!
var sigmaJsDrawingProperties = {
defaultLabelColor: 'black',
defaultLabelSize: 12,//in fact I'm using it as minLabelSize'
defaultLabelSize: 10,//in fact I'm using it as minLabelSize'
defaultLabelBGColor: '#fff',
defaultLabelHoverColor: '#000',
labelThreshold: 12,
labelThreshold: 6,
defaultEdgeType: 'curve',
borderSize: 2.5,//Something other than 0
......@@ -66,7 +77,6 @@ var showLabelsIfZoom=2.0;
// ============ < VARIABLES.JS > ============
var dataFolderTree = {};
//"http://webchat.freenode.net/?nick=Ademe&channels=#anoe"
var ircUrl="http://webchat.freenode.net/?nick="+ircNick+"&channels="+ircCHN;
var twjs="tinawebJS/";
......@@ -132,7 +142,10 @@ var maxEdgeWeight=0.0;
//---------------------------------------------------
var bipartite=false;
var gexfDictReverse={}
for (var i in gexfDict){
gexfDictReverse[gexfDict[i]]=i;
}
var opts = {
lines: 13, // The number of lines to draw
......
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