Closed dpinney closed 9 years ago
Good enough for now. Future event.
@jinhw1989 doesn't need to worry about this.
Mannan assigned.
I think this is ready to go!
Error looks like:
Made a change to the runButton in PVWatts ( as an example) so it runs the following javascript before submitting the form: (added to models.js since it will eventually be used in every model):
function checkModelName() {
var newName = modelName.value
$.ajax({
url: "/uniqObjName/Model/" + currentUser + "/" + newName
}).done(function (data) {
if (data.exists) {
alert("You already have a Model named " + newName)
}
else{
inputForm.submit()
}
})
}
runButton change:
<button id="runButton" type="button" class="preRun" onclick="javascript:checkModelName()">Run Model</button>
Looks nice and clean.
If it tests okay with pvWatts, let's slap it on the models.
One change, for the error message:
alert("You already have a Model named '" + newName + "', please choose a different name.")
Oh, and by the way, triple backticks on github put your code in fixed width font. I added that to your comment above.
Oh that looks a lot better, thanks!
I'll update the rest of the models and commit.
Now updated and closed.
This was interfering with input validation, fixed this in commit 7ffc6e6cce40f4a9ede521224e3cae0f0997c46e
Reopened.
Fixed and production updated!
The commit where this was fixed is 66155a5f6cc5d20d96afedc2b736619594d1c62a
TODO
POSSIBLE OPTIONS