12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta name="apple-mobile-web-app-capable" content="yes" />
- <meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1, maximum-scale=1"/>
- <meta charset="UTF-8">
- <meta name="theme-color" content="#4b75ff">
- <link rel="stylesheet" href="../script/semantic/semantic.min.css">
- <script src="../script/jquery.min.js"></script>
- <script src="../script/ao_module.js"></script>
- <script src="../script/semantic/semantic.min.js"></script>
- <title>Dummy</title>
- <style>
- body{
- background-color:white;
- }
- </style>
- </head>
- <body>
- <br><br>
- <div class="ui container">
- <h3>This is a Dummy Testing Module</h3>
- <p>Received drag-in filelist (if any)</p>
- <span id="flist"></span>
- <div class="ui divider"></div>
- <p>Try open an IME and type something</p>
- <input class="ui fluid input" val="Test"></input>
- <br>
- <textarea></textarea>
- <br>
- <button class="ui blue button" onClick="pinWindow();">Pin Window</button>
- <button class="ui blue button" onClick="unpinWindow();">Unpin Window</button>
- <button class="ui primary button" onclick="openfileselector();">Open File Selector New Mode</button>
- <button class="ui negative button" onClick="ao_module_close();">Close Window</button>
- </div>
- <script>
- var flist = ao_module_loadInputFiles();
- if (flist == null){
- $("#flist").text("No input file");
- }else{
- for (var i =0; i < flist.length; i++){
- $("#flist").append(flist[i].filename + " / " + flist[i].filepath + "<br>");
- }
- }
- function openfileselector(){
- ao_module_openFileSelector(fileLoader, "user:/Desktop/",type="new",true, {
- defaultName: "New File.txt"
- })
- }
- //Test to pin this window to topmost
- function pinWindow(){
- ao_module_setTopMost();
- }
- function unpinWindow(){
- ao_module_unsetTopMost();
- }
- function fileLoader(filedata){
- if (filedata.length == 0){
- $("#flist").text("No file selected");
- return;
- }
- $("#flist").html("");
- for (var i =0; i < filedata.length; i++){
- $("#flist").append(filedata[i].filename + " / " + filedata[i].filepath + "<br>");
- }
- }
- function testRunScript(){
- var script = "Dummy/backend/getParamters.js";
- $.ajax({
- url: "../system/ajgi/interface?script=" + script,
- data: {foo: "Hello", bar: "World"},
- method: "POST",
- success: function(data){
- console.log(data);
- }
- })
- }
- </script>
- </body>
- </html>
|