forked from rudolphi/open_enventory
-
Notifications
You must be signed in to change notification settings - Fork 0
/
applet_test.php
executable file
·62 lines (53 loc) · 2.75 KB
/
applet_test.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<?php
require_once "lib_global_funcs.php";
require_once "lib_db_query.php";
require_once "lib_applet.php";
require_once "lib_form_elements.php";
pageHeader();
$paramHash=array("int_name" => "testform");
echo stylesheet.
style.
getFixedStyleBlock().
_style.
loadJS(array("chem.js","safety.js","controls.js","jsDatePick.min.1.3.js","forms.js","folder_browser.js","literature.js","sds.js","molecule_edit.js","searchpk.js","subitemlist_helper.js","subitemlist_get.js","subitemlist.js","client_cache.js","edit.js"),"lib/").
script."
var readOnly,selectActive,editMode;
".
_script.
"<body>";
showCommFrame(); // for molecule and pk_search
showCommFrame(array("name" => "edit")); // for async ops (reload data, save data)
copyPasteAppletHelper();
echo getHelperTop()."<form name=\"appletTest\" action=\"applet_test_async.php\" target=\"edit\" method=\"post\">".
getFormElements($paramHash,array(
array("item" => "select", "int_name" => "modus", "text" => "Modus", "int_names" => array("draw","compare"), "texts" => array("Zeichnen","Vergleichen")),
//~ array("item" => "hidden", "int_name" => "active_modus", ),
array("item" => "applet", "int_name" => "appl", "mode" => $_REQUEST["mode"], "searchMode" => false, "copyPasteButtons" => true, "width" => "95%", "height" => "60%"),
array("item" => "text", "text" => "<a href=\"javascript:transfer();\">Nach Aussehen prüfen</a> <a href=\"javascript:done();\">Fertig</a><br>"),
array("item" => "input", "int_name" => "molecule_id", "text" => "Bei Fehlern diese Nummer aufschreiben.", DEFAULTREADONLY => "always"),
array("item" => "input", "int_name" => "smiles_stereo", "size" => 20,"maxlength" => 80, "softLineBreakAfter" => 20, DEFAULTREADONLY => "always"),
array("item" => "input", "int_name" => "smiles", "size" => 20,"maxlength" => 80, "softLineBreakAfter" => 20, DEFAULTREADONLY => "always"),
"br",
array("item" => "structure", "int_name" => "molfile_blob_before", "width" => rxn_gif_x, "height" => rxn_gif_y, "showMolfileButton" => true, "showGifButton" => true, "showCopyPasteButton" => true, "mode" => $_REQUEST["mode"], DEFAULTREADONLY => "always", ), // split rxnfile and invoke update
"br",
array("item" => "structure", "int_name" => "molfile_blob_after", "width" => rxn_gif_x, "height" => rxn_gif_y, "showMolfileButton" => true, "showGifButton" => true, "showCopyPasteButton" => true, "mode" => $_REQUEST["mode"], DEFAULTREADONLY => "always", ), // split rxnfile and invoke update
));
echo "</form>".
script.
"
function transfer() {
setInputValue(\"molfile_blob_after\",getControlValue(\"appl\"));
addMoleculeToUpdateQueue(\"molfile_blob_after\");
updateMolecules();
}
function done() {
prepareSubmitForms();
document.forms.appletTest.submit();
}
readOnlyForms(false);
done();
".
_script.
getHelperBottom()."
</body></html>";
?>