mirror of
https://github.com/UnickSoft/graphonline.git
synced 2026-02-16 02:30:51 +00:00
Moved php from cgi-bin to backend
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
moduleLoader.beginCacheLoading(["/script/shared/utils.js?v=86","/script/entities/graph/api/index.js?v=86","/script/shared/point.js?v=86","/script/entities/edge/api/index.js?v=86","/script/entities/edge/model/BaseEdge.js?v=86","/script/entities/edge/model/EdgeModel.js?v=86","/script/entities/vertex/api/index.js?v=86","/script/entities/vertex/model/BaseVertex.js?v=86","/script/entities/vertex/model/VertexModel.js?v=86","/script/entities/graph/model/Graph.js?v=86","/script/features/draw_graph/api/index.js?v=86","/script/features/draw_graph/model/BaseBackgroundDrawer.js?v=86","/script/features/draw_graph/model/EdgeStyle.js?v=86","/script/features/draw_graph/model/BaseEdgeDrawer.js?v=86","/script/features/draw_graph/model/VertexShape.js?v=86","/script/features/draw_graph/model/VertexStyle.js?v=86","/script/features/draw_graph/model/BaseVertexDrawer.js?v=86","/script/features/algorithms/api/index.js?v=86","/script/features/algorithms/model/Algorithms.js?v=86","/script/features/algorithms/model/BaseTraversal.js?v=86","/script/features/base_handler/index.js?v=86","/script/features/default_handler/index.js?v=86","/script/features/add_vertices_handler/index.js?v=86","/script/features/connect_vertices_handler/index.js?v=86","/script/features/delete_objects_handler/index.js?v=86","/script/features/algorithm_handler/index.js?v=86","/script/features/serialization/api/index.js?v=86","/script/features/serialization/model/GraphMLCreator.js?v=86","/script/features/enum_vertices/EnumVertices.js?v=86","/script/pages/editor/model/texts.js?v=86","/script/pages/editor/model/UndoStack.js?v=86","/script/pages/editor/model/DiskSaveLoad.js?v=86","/script/pages/editor/model/Application.js?v=86","/script/pages/editor/ui/ya_metrika.js?v=86","/script/pages/editor/ui/editor.js?v=86","/script/pages/editor/ui/main.js?v=86",]);{function onloadEditor(){console.log("onload() call");doIncludeAsync([include("shared/canvas2svg.js"),include("features/group_rename_handler/index.js"),include("features/saved_graph_handler/index.js"),include("features/saved_graph_image_handler/index.js"),include("features/show_adjacency_matrix/index.js"),include("features/show_distance_matrix/index.js"),include("features/show_incidence_matrix/index.js"),include("features/setup_background_style/index.js"),include("features/setup_edge_style/index.js"),include("features/setup_vertex_style/index.js"),]);postLoadPage();}
|
||||
moduleLoader.beginCacheLoading(["/script/shared/utils.js?v=87","/script/entities/graph/api/index.js?v=87","/script/shared/point.js?v=87","/script/entities/edge/api/index.js?v=87","/script/entities/edge/model/BaseEdge.js?v=87","/script/entities/edge/model/EdgeModel.js?v=87","/script/entities/vertex/api/index.js?v=87","/script/entities/vertex/model/BaseVertex.js?v=87","/script/entities/vertex/model/VertexModel.js?v=87","/script/entities/graph/model/Graph.js?v=87","/script/features/draw_graph/api/index.js?v=87","/script/features/draw_graph/model/BaseBackgroundDrawer.js?v=87","/script/features/draw_graph/model/EdgeStyle.js?v=87","/script/features/draw_graph/model/BaseEdgeDrawer.js?v=87","/script/features/draw_graph/model/VertexShape.js?v=87","/script/features/draw_graph/model/VertexStyle.js?v=87","/script/features/draw_graph/model/BaseVertexDrawer.js?v=87","/script/features/algorithms/api/index.js?v=87","/script/features/algorithms/model/Algorithms.js?v=87","/script/features/algorithms/model/BaseTraversal.js?v=87","/script/features/base_handler/index.js?v=87","/script/features/default_handler/index.js?v=87","/script/features/add_vertices_handler/index.js?v=87","/script/features/connect_vertices_handler/index.js?v=87","/script/features/delete_objects_handler/index.js?v=87","/script/features/algorithm_handler/index.js?v=87","/script/features/serialization/api/index.js?v=87","/script/features/serialization/model/GraphMLCreator.js?v=87","/script/features/enum_vertices/EnumVertices.js?v=87","/script/pages/editor/model/texts.js?v=87","/script/pages/editor/model/UndoStack.js?v=87","/script/pages/editor/model/DiskSaveLoad.js?v=87","/script/pages/editor/model/Application.js?v=87","/script/pages/editor/ui/ya_metrika.js?v=87","/script/pages/editor/ui/editor.js?v=87","/script/pages/editor/ui/main.js?v=87",]);{function onloadEditor(){console.log("onload() call");doIncludeAsync([include("shared/canvas2svg.js"),include("features/group_rename_handler/index.js"),include("features/saved_graph_handler/index.js"),include("features/saved_graph_image_handler/index.js"),include("features/show_adjacency_matrix/index.js"),include("features/show_distance_matrix/index.js"),include("features/show_incidence_matrix/index.js"),include("features/setup_background_style/index.js"),include("features/setup_edge_style/index.js"),include("features/setup_vertex_style/index.js"),]);postLoadPage();}
|
||||
let modulDir="pages/editor/";doInclude([include("shared/utils.js"),include("entities/graph/api/index.js"),include("features/draw_graph/api/index.js"),include("features/algorithms/api/index.js"),include("features/base_handler/index.js"),include("features/default_handler/index.js"),include("features/add_vertices_handler/index.js"),include("features/connect_vertices_handler/index.js"),include("features/delete_objects_handler/index.js"),include("features/algorithm_handler/index.js"),include("features/serialization/api/index.js"),include("features/enum_vertices/EnumVertices.js"),include("model/texts.js",modulDir),include("model/UndoStack.js",modulDir),include("model/DiskSaveLoad.js",modulDir),include("model/Application.js",modulDir),include("ui/ya_metrika.js",modulDir),include("ui/editor.js",modulDir),include("ui/main.js",modulDir)],onloadEditor);}
|
||||
function gEncodeToHTML(str)
|
||||
{if(typeof str!=='string')
|
||||
@@ -1364,13 +1364,13 @@ UndoStack.prototype.ClearUndoStack=function()
|
||||
UndoStack.prototype.IsUndoStackEmpty=function()
|
||||
{return(this.undoStack.length<=0);}
|
||||
var DiskSaveLoad=function(){};DiskSaveLoad.LoadGraphFromDisk=function(graphName,callback)
|
||||
{$.ajax({type:"GET",url:"/"+SiteDir+"cgi-bin/loadGraph.php?name="+graphName}).done(callback);}
|
||||
{$.ajax({type:"GET",url:"/"+SiteDir+"backend/loadGraph.php?name="+graphName}).done(callback);}
|
||||
DiskSaveLoad.SaveSVGGraphOnDisk=function(imageName,svgText,callback)
|
||||
{$.ajax({type:"POST",url:"/"+SiteDir+"cgi-bin/saveSvg.php?name="+imageName,data:{svgdata:svgText},dataType:"text",success:callback});return imageName;}
|
||||
{$.ajax({type:"POST",url:"/"+SiteDir+"backend/saveSvg.php?name="+imageName,data:{svgdata:svgText},dataType:"text",success:callback});return imageName;}
|
||||
DiskSaveLoad.SaveGraphOnDisk=function(savedGraphName,graphAsString,callback)
|
||||
{$.ajax({type:"POST",url:"/"+SiteDir+"cgi-bin/saveGraph.php?name="+savedGraphName,data:graphAsString,dataType:"text"}).done(callback);}
|
||||
{$.ajax({type:"POST",url:"/"+SiteDir+"backend/saveGraph.php?name="+savedGraphName,data:graphAsString,dataType:"text"}).done(callback);}
|
||||
DiskSaveLoad.SaveGraphImageOnDisk=function(imageName,rectParams,imageBase64Data,callback)
|
||||
{$.ajax({type:"POST",url:"/"+SiteDir+"cgi-bin/saveImage.php?name="+imageName+rectParams,data:{base64data:imageBase64Data},dataType:"text",success:callback});}
|
||||
{$.ajax({type:"POST",url:"/"+SiteDir+"backend/saveImage.php?name="+imageName+rectParams,data:{base64data:imageBase64Data},dataType:"text",success:callback});}
|
||||
var globalApplication=null;function Application(document,window,listener)
|
||||
{this.document=document;this.listener=listener;this.canvas=this.document.getElementById('canvas');this.handler=new DefaultHandler(this);this.savedGraphName="";this.currentEnumVerticesType=new BaseEnumVertices(this,1);this.findPathReport=1;this.isTimerRender=false;globalApplication=this;this.renderPath=[];this.renderTimer=0;this.renderPathLength=0;this.renderPathCounter=0;this.renderPathLoops=0;this.enumVerticesTextList=[new BaseEnumVertices(this,1),new BaseEnumVertices(this,0),new TextEnumVertices(this),new TextEnumVerticesCyr(this),new TextEnumVerticesGreek(this),new TextEnumVerticesCustom(this)];this.SetDefaultTransformations();this.algorithmsValues={};this.undoStack=new UndoStack(this.maxUndoStackSize);this.edgeCommonStyle=new CommonEdgeStyle();this.isEdgeCommonStyleCustom=false;this.edgeSelectedStyles=FullArrayCopy(DefaultSelectedEdgeStyles);this.isEdgeSelectedStylesCustom=false;this.edgePrintCommonStyle=new CommonPrintEdgeStyle();this.edgePrintSelectedStyles=FullArrayCopy(DefaultPrintSelectedEdgeStyles);this.vertexCommonStyle=new CommonVertexStyle();this.isVertexCommonStyleCustom=false;this.vertexSelectedVertexStyles=FullArrayCopy(DefaultSelectedGraphStyles);this.isVertexSelectedVertexStylesCustom=false;this.vertexPrintCommonStyle=new CommonPrintVertexStyle();this.vertexPrintSelectedVertexStyles=FullArrayCopy(DefaultPrintSelectedGraphStyles);this.backgroundCommonStyle=new CommonBackgroundStyle();this.backgroundPrintStyle=new PrintBackgroundStyle();this.isBackgroundCommonStyleCustom=false;this.renderPathWithEdges=false;this.edgePresets=[1,3,5,7,11,42];this.maxEdgePresets=6;this.selectionRect=null;this.defaultVertexSize=null;this.defaultEdgeWidth=null;this.processEmscriptenFunction=null;this.defaultEdge=null;this.useDefaultEdge=false;};Application.prototype.graph=new Graph();Application.prototype.dragObject=-1;Application.prototype.handler=null;Application.prototype.status={};Application.prototype.graphNameLength=16;Application.prototype.maxUndoStackSize=8;Application.prototype.getMousePos=function(canvas,e)
|
||||
{var rect=canvas.getBoundingClientRect();return{x:(e.clientX-rect.left)/this.canvasScale-this.canvasPosition.x,y:(e.clientY-rect.top)/this.canvasScale-this.canvasPosition.y};}
|
||||
@@ -1580,11 +1580,11 @@ Application.prototype.SetAdjacencyMatrix=function(matrix,separator)
|
||||
{if(separator===undefined)
|
||||
{separator=",";}
|
||||
var res=true;var r={};var c={};if(!this.TestAdjacencyMatrix(matrix,r,c,separator))
|
||||
{$.get("/"+SiteDir+"cgi-bin/addFailedMatrix.php?text=adjacency&matrix="+encodeURIComponent(matrix),function(data){;});res=false;}
|
||||
{$.get("/"+SiteDir+"backend/addFailedMatrix.php?text=adjacency&matrix="+encodeURIComponent(matrix),function(data){;});res=false;}
|
||||
this.graph.SetAdjacencyMatrix(matrix,new Point(this.GetRealWidth(),this.GetRealHeight()),this.currentEnumVerticesType,separator);this.AutoAdjustViewport();this.redrawGraph();return res;}
|
||||
Application.prototype.SetPair=function(pair)
|
||||
{var res=true;var r={};var c={};if(!this.TestPair(pair))
|
||||
{$.get("/"+SiteDir+"cgi-bin/addFailedMatrix.php?text=pair&matrix="+encodeURIComponent(pair),function(data){;});res=false;}
|
||||
{$.get("/"+SiteDir+"backend/addFailedMatrix.php?text=pair&matrix="+encodeURIComponent(pair),function(data){;});res=false;}
|
||||
this.graph.SetPair(pair,new Point(this.GetRealWidth(),this.GetRealHeight()),this.currentEnumVerticesType);this.AutoAdjustViewport();this.redrawGraph();return res;}
|
||||
Application.prototype.GetIncidenceMatrix=function()
|
||||
{return this.graph.GetIncidenceMatrix();}
|
||||
@@ -1594,7 +1594,7 @@ Application.prototype.TestPair=function(pair)
|
||||
{return this.graph.TestPair(pair);}
|
||||
Application.prototype.SetIncidenceMatrix=function(matrix)
|
||||
{var res=true;var r={};var c={};if(!this.TestIncidenceMatrix(matrix,r,c))
|
||||
{$.get("/"+SiteDir+"cgi-bin/addFailedMatrix.php?text=incidence&matrix="+encodeURIComponent(matrix),function(data){;});res=false;}
|
||||
{$.get("/"+SiteDir+"backend/addFailedMatrix.php?text=incidence&matrix="+encodeURIComponent(matrix),function(data){;});res=false;}
|
||||
this.graph.SetIncidenceMatrix(matrix,new Point(this.GetRealWidth(),this.GetRealHeight()),this.currentEnumVerticesType);this.AutoAdjustViewport();this.redrawGraph();return res;}
|
||||
Application.prototype.Test=function()
|
||||
{this.graph.VerticesReposition(new Point(this.GetRealWidth(),this.GetRealHeight()),this.graph.vertices);this.redrawGraph();}
|
||||
@@ -1983,7 +1983,7 @@ Editor.prototype.initVoteButton=function()
|
||||
document.getElementById('VoteButton').onclick=function()
|
||||
{var dialogButtons={};for(var i=0;i<6&&document.getElementById('vote'+i)!==null;i++)
|
||||
{document.getElementById('vote'+i)["voteIndex"]=i;document.getElementById('vote'+i).onclick=function()
|
||||
{console.log("Vote"+self["voteIndex"]);$.ajax({type:"GET",url:"/"+SiteDir+"cgi-bin/vote.php?index="+self["voteIndex"],dataType:"text"});$("#voteDialog").dialog('close');$("#VoteButton").hide();}}
|
||||
{console.log("Vote"+self["voteIndex"]);$.ajax({type:"GET",url:"/"+SiteDir+"backend/vote.php?index="+self["voteIndex"],dataType:"text"});$("#voteDialog").dialog('close');$("#VoteButton").hide();}}
|
||||
dialogButtons[g_close]=function(){$(self).dialog("close");};$("#voteDialog").dialog({resizable:false,title:g_vote,width:400,modal:true,dialogClass:'EdgeDialog',buttons:dialogButtons,});}}
|
||||
Editor.prototype.initAlgorithmList=function()
|
||||
{$(function(){$('#algorithmList').on('click',function(event){if(!event.originalEvent.closeThisMenu){event.stopPropagation();}});$(window).on('click',function(){$('#algorithmList').slideUp();});});let showHideCategory=function(button,elementsListName){let width=$(button).width();let elementsList=$(elementsListName);var hideMark=button.querySelector('span[name="hideMark"]')
|
||||
|
||||
Reference in New Issue
Block a user