forked from Catrobat/HardwarePlugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
export/import should work, tests needed
- Loading branch information
1 parent
9252d8d
commit 00ea74e
Showing
5 changed files
with
41 additions
and
7 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/** | ||
* Created by dominik on 21.01.17. | ||
*/ | ||
AJS.toInit(function () { | ||
var file = undefined; | ||
|
||
AJS.$('#upload-field').change(function () { | ||
file = AJS.$("#upload-field").value; | ||
}); | ||
|
||
AJS.$("#post-inputs").click(function () { | ||
console.log("about to post inputs"); | ||
if(file === undefined) { | ||
AJS.messages.error({ | ||
title: "Error !", | ||
body: "Select a Hardware Backup Zip-File to proceed!" | ||
}) | ||
} | ||
else { | ||
if(!file.contains(".zip")){ | ||
AJS.messages.error({ | ||
title: "Error !", | ||
body: "The Datatype of the Backup must be .zip!" | ||
}) | ||
} | ||
AJS.$("#upload-form").submit(); | ||
} | ||
}) | ||
}); |
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