Reformat for IE
@@ -174,12 +174,12 @@ $(document).ready(function () {
createResource(resourceType, title);
});
- function createResource(type, title="Untitled Resource") {
+ function createResource(type, title) {
// Disable dropdown items while we process the request
$(".navbar-inverse .res-dropdown .dropdown-menu").toggleClass("disabled", true);
var formData = new FormData();
-
+ title = "Untitled Resource";
formData.append("csrfmiddlewaretoken", csrf_token);
formData.append("title", title);
formData.append("resource-type", type);
@@ -194,7 +194,7 @@ $(document).ready(function () {
contentType: false,
url: "/hsapi/_internal/create-resource/do/",
success: function (response) {
- if (response.status == "success") {
+ if (response.status === "success") {
window.location = response['resource_url'];
}
else {
