-
-
Save Nolski/47d9bde36091dc5e9ce2 to your computer and use it in GitHub Desktop.
editorerror
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function () { | |
<<<<<<< HEAD <--- This code belongs to upstream | |
PopcornEditor.listen(PopcornEditor.events.loaded, function () { | |
$.get($('#editor').data('url'), { | |
slug: $('#editor').data('slug') | |
}) | |
.done(function (response) { | |
if(response.data) { | |
PopcornEditor.loadInfo(response); | |
} else { | |
PopcornEditor.loadInfo(PopcornEditor.createTemplate(response.metadata)); | |
} | |
}) | |
.fail(function() { | |
console.warn("Unable to load popcorn data :("); | |
console.error.apply(console, arguments); | |
}); | |
======= <-- The code below here is the code that you wrote | |
PopcornEditor.listen(PopcornEditor.events.loaded, function () { | |
$.get($('#editor').data('url'), { | |
slug: $('#editor').data('slug') | |
}) | |
.done(function (response) { | |
if(response.data) { | |
PopcornEditor.loadInfo(response.data); | |
} else { | |
PopcornEditor.loadInfo(PopcornEditor.createTemplate(response.metadata)); | |
} | |
}) | |
.fail(function() { | |
console.warn("Unable to load popcorn data :("); | |
console.error.apply(console, arguments); | |
}); | |
>>>>>>> bug 1181198 <-- And here is the end of the code you wrote. | |
// Now what you want to do is delete the code that belongs to upstream (since none of | |
// that code needs to stick around) Try to figure out for the next section which part | |
// you should delete and which part you should keep. | |
}) | |
// Initialize the editor with the div id and path to Popcorn Editor. | |
PopcornEditor.init('editor', '/static/popcorn/PopcornEditor/editor.html'); | |
PopcornEditor.listen('save', function (message) { | |
<<<<<<< HEAD | |
$.post($('#editor').data('save'), { | |
data: JSON.stringify(message), | |
slug: $('#editor').data('slug'), | |
csrfmiddlewaretoken: $('input[name="csrfmiddlewaretoken"]').val() | |
}) | |
.done(function (response) { | |
var message = "Your edit has been saved and sent it for transcoding. " | |
+ "Once it completes, which can take several minutes, we'll automatically" | |
+ " update the event to use your latest video edits."; | |
alert(message); | |
}) | |
.fail(function () { | |
console.warn('Unable to save edit :('); | |
console.error.apply(console, arguments); | |
======= | |
$.post($('#editor').data('save'), { | |
data: JSON.stringify(message.data), | |
slug: $('#editor').data('slug'), | |
csrfmiddlewaretoken: $('input[name="csrfmiddlewaretoken"]').val() | |
}) | |
.done(function (response) { | |
var message = "Your edit has been saved and sent it for transcoding. " | |
+ "Once it completes, which can take several minutes, we'll automatically" | |
+ " update the event to use your latest video edits."; | |
alert(message); | |
}) | |
.fail(function () { | |
console.warn('Unable to save edit :('); | |
console.error.apply(console, arguments); | |
}); | |
>>>>>>> bug 1181198 | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment