mirror of
https://github.com/UnickSoft/graphonline.git
synced 2026-02-16 10:40:57 +00:00
Change script location.
Split js code. Added cache and changed loading mechanism for js sources.
This commit is contained in:
52
script/features/saved_graph_handler/index.js
Normal file
52
script/features/saved_graph_handler/index.js
Normal file
@@ -0,0 +1,52 @@
|
||||
doInclude ([
|
||||
include ("features/base_handler/index.js")
|
||||
])
|
||||
|
||||
/**
|
||||
* Save dialog Graph handler.
|
||||
*
|
||||
*/
|
||||
function SavedDialogGraphHandler(app)
|
||||
{
|
||||
BaseHandler.apply(this, arguments);
|
||||
this.message = "";
|
||||
}
|
||||
|
||||
// inheritance.
|
||||
SavedDialogGraphHandler.prototype = Object.create(BaseHandler.prototype);
|
||||
// First selected.
|
||||
SavedDialogGraphHandler.prototype.firstObject = null;
|
||||
// Path
|
||||
SavedDialogGraphHandler.prototype.pathObjects = null;
|
||||
// Objects.
|
||||
SavedDialogGraphHandler.prototype.objects = null;
|
||||
|
||||
SavedDialogGraphHandler.prototype.show = function(object)
|
||||
{
|
||||
this.app.SaveGraphOnDisk();
|
||||
|
||||
var dialogButtons = {};
|
||||
|
||||
dialogButtons[g_close] = function() {
|
||||
$( this ).dialog( "close" );
|
||||
};
|
||||
|
||||
document.getElementById('GraphName').value = "http://" + window.location.host + window.location.pathname +
|
||||
"?graph=" + this.app.GetGraphName();
|
||||
|
||||
document.getElementById('GraphName').select();
|
||||
|
||||
document.getElementById("ShareSavedGraph").innerHTML =
|
||||
document.getElementById("ShareSavedGraph").innerHTML.replace(/graph=([A-Za-z]*)/g, "graph=" + this.app.GetGraphName());
|
||||
|
||||
$( "#saveDialog" ).dialog({
|
||||
resizable: false,
|
||||
height: "auto",
|
||||
width: "auto",
|
||||
modal: true,
|
||||
title: g_save_dialog,
|
||||
buttons: dialogButtons,
|
||||
dialogClass: 'EdgeDialog'
|
||||
});
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user