mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Fix for bad MIME Content-Type (per #152)
This commit is contained in:
parent
75fc46c05d
commit
c9374532a9
@ -16,14 +16,14 @@
|
|||||||
var RED = function() {
|
var RED = function() {
|
||||||
|
|
||||||
$('#btn-keyboard-shortcuts').click(function(){showHelp();});
|
$('#btn-keyboard-shortcuts').click(function(){showHelp();});
|
||||||
|
|
||||||
|
|
||||||
$('#chart').on("dragenter",function(event) {
|
$('#chart').on("dragenter",function(event) {
|
||||||
if ($.inArray("text/plain",event.originalEvent.dataTransfer.types) != -1) {
|
if ($.inArray("text/plain",event.originalEvent.dataTransfer.types) != -1) {
|
||||||
$("#dropTarget").css({display:'table'});
|
$("#dropTarget").css({display:'table'});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#dropTarget').on("dragover",function(event) {
|
$('#dropTarget').on("dragover",function(event) {
|
||||||
if ($.inArray("text/plain",event.originalEvent.dataTransfer.types) != -1) {
|
if ($.inArray("text/plain",event.originalEvent.dataTransfer.types) != -1) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
@ -37,8 +37,8 @@ var RED = function() {
|
|||||||
RED.view.importNodes(data);
|
RED.view.importNodes(data);
|
||||||
$("#dropTarget").hide();
|
$("#dropTarget").hide();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
function save(force) {
|
function save(force) {
|
||||||
if (RED.view.dirty()) {
|
if (RED.view.dirty()) {
|
||||||
|
|
||||||
@ -70,7 +70,8 @@ var RED = function() {
|
|||||||
}
|
}
|
||||||
var nns = RED.nodes.createCompleteNodeSet();
|
var nns = RED.nodes.createCompleteNodeSet();
|
||||||
|
|
||||||
d3.xhr("flows").post(JSON.stringify(nns),function(err,resp) {
|
d3.xhr("flows").header("Content-type", "application/json")
|
||||||
|
.post(JSON.stringify(nns),function(err,resp) {
|
||||||
if (resp && resp.status == 204) {
|
if (resp && resp.status == 204) {
|
||||||
RED.notify("Successfully deployed","success");
|
RED.notify("Successfully deployed","success");
|
||||||
RED.view.dirty(false);
|
RED.view.dirty(false);
|
||||||
|
Loading…
Reference in New Issue
Block a user