Merged sidebar all.js, ignore globe if js not loaded yet
This commit is contained in:
parent
5b35bea489
commit
1a536369de
2 changed files with 12 additions and 4 deletions
|
@ -372,7 +372,7 @@ class Sidebar extends Class
|
||||||
@globe.scene.remove(@globe.points)
|
@globe.scene.remove(@globe.points)
|
||||||
@globe.addData( globe_data, {format: 'magnitude', name: "hello", animated: false} )
|
@globe.addData( globe_data, {format: 'magnitude', name: "hello", animated: false} )
|
||||||
@globe.createPoints()
|
@globe.createPoints()
|
||||||
else
|
else if typeof(DAT) != "undefined"
|
||||||
try
|
try
|
||||||
@globe = new DAT.Globe( @tag.find(".globe")[0], {"imgDir": "/uimedia/globe/"} )
|
@globe = new DAT.Globe( @tag.find(".globe")[0], {"imgDir": "/uimedia/globe/"} )
|
||||||
@globe.addData( globe_data, {format: 'magnitude', name: "hello"} )
|
@globe.addData( globe_data, {format: 'magnitude', name: "hello"} )
|
||||||
|
|
|
@ -557,12 +557,20 @@ window.initScrollable = function () {
|
||||||
var inner_path;
|
var inner_path;
|
||||||
inner_path = _this.tag.find("#input-contents").val();
|
inner_path = _this.tag.find("#input-contents").val();
|
||||||
if (wrapper.site_info.privatekey) {
|
if (wrapper.site_info.privatekey) {
|
||||||
wrapper.ws.cmd("siteSign", ["stored", inner_path], function(res) {
|
wrapper.ws.cmd("siteSign", {
|
||||||
|
privatekey: "stored",
|
||||||
|
inner_path: inner_path,
|
||||||
|
update_changed_files: true
|
||||||
|
}, function(res) {
|
||||||
return wrapper.notifications.add("sign", "done", inner_path + " Signed!", 5000);
|
return wrapper.notifications.add("sign", "done", inner_path + " Signed!", 5000);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
wrapper.displayPrompt("Enter your private key:", "password", "Sign", function(privatekey) {
|
wrapper.displayPrompt("Enter your private key:", "password", "Sign", function(privatekey) {
|
||||||
return wrapper.ws.cmd("siteSign", [privatekey, inner_path], function(res) {
|
return wrapper.ws.cmd("siteSign", {
|
||||||
|
privatekey: privatekey,
|
||||||
|
inner_path: inner_path,
|
||||||
|
update_changed_files: true
|
||||||
|
}, function(res) {
|
||||||
if (res === "ok") {
|
if (res === "ok") {
|
||||||
return wrapper.notifications.add("sign", "done", inner_path + " Signed!", 5000);
|
return wrapper.notifications.add("sign", "done", inner_path + " Signed!", 5000);
|
||||||
}
|
}
|
||||||
|
@ -633,7 +641,7 @@ window.initScrollable = function () {
|
||||||
animated: false
|
animated: false
|
||||||
});
|
});
|
||||||
_this.globe.createPoints();
|
_this.globe.createPoints();
|
||||||
} else {
|
} else if (typeof DAT !== "undefined") {
|
||||||
try {
|
try {
|
||||||
_this.globe = new DAT.Globe(_this.tag.find(".globe")[0], {
|
_this.globe = new DAT.Globe(_this.tag.find(".globe")[0], {
|
||||||
"imgDir": "/uimedia/globe/"
|
"imgDir": "/uimedia/globe/"
|
||||||
|
|
Loading…
Reference in a new issue