|
|
|
@ -1431,6 +1431,22 @@ function BurningCtrl($scope, $http, $modal, $timeout, settings, appropriateWeapo |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$scope.downloadCharacterModel = function(){ |
|
|
|
|
var json = angular.toJson($scope.convertCurrentCharacterToStructForCharSheet(), true); |
|
|
|
|
$http.post("/model", json). |
|
|
|
|
success(function(data,status,headers,config){ |
|
|
|
|
console.log("huzzah, making model succeeded. File URL: " + data); |
|
|
|
|
var frame = document.getElementById("downloadframe"); |
|
|
|
|
if ( frame ){ |
|
|
|
|
frame.src = data; |
|
|
|
|
} |
|
|
|
|
}). |
|
|
|
|
error(function(data,status,headers,config){ |
|
|
|
|
console.log("boo, making model failed: " + data); |
|
|
|
|
$scope.addAlert('tools', "Generating character model failed: " + data); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$scope.saveCurrentCharacterToServer = function(){ |
|
|
|
|
var nameWarn = "The character must have a name before it can be saved."; |
|
|
|
|
if( $scope.name.length == 0 ){ |
|
|
|
|