# HG changeset patch # User Matti Hamalainen # Date 1415647716 -7200 # Node ID a91a91b8160e184413f27ff502e6ec287f7dad0c # Parent 45750a346f3e79d14649c80c6a1a0d551a14f809 Cleanups. diff -r 45750a346f3e -r a91a91b8160e admajax.php --- a/admajax.php Mon Nov 10 21:26:23 2014 +0200 +++ b/admajax.php Mon Nov 10 21:28:36 2014 +0200 @@ -103,7 +103,6 @@ { global $compoModeData, $previewTypeList; - // XXX TODO Dropdown menu or so for selecting compo type switch ($item["ctype"]) { case COMPO_NORMAL: @@ -118,17 +117,17 @@ return "

#".$id." - ".chentities($item["name"])."

\n". - " Type: ".stGetFormOptionListFromArray("cotype".$id, " ", FALSE, $compoModeData, $item["ctype"], 0, "updateCompoType(".$id.")"). + " Type: ".stGetFormOptionListFromArray($prefix."type".$id, " ", FALSE, $compoModeData, $item["ctype"], 0, "updateCompoType(".$id.")"). " - ".$compoModeData[$item["ctype"]][1]."
\n". " Name: ".stGetFormTextInput(40, SET_LEN_COMPO_NAME, "name", $id, $prefix, $item["name"])."
\n". " File path: ".stGetFormTextInput(40, SET_LEN_COMPO_PATH, "cpath", $id, $prefix, $item["cpath"])."
\n". " ".stGetFormTextArea(8, 60, "description", $id, $prefix, $item["description"])."
\n". + " ".stGetFormCheckBoxInput("visible", $id, $prefix, $item["visible"], "Visible")."\n". + " ".stGetFormCheckBoxInput("show_authors", $id, $prefix, $item["show_authors"], "Show authors")."\n". " ".stGetFormOptionListFromArray($prefix."preview_type".$id, " ", FALSE, $previewTypeList, $item["preview_type"], 0)."\n". + $str."\n". " ".stGetFormButtonInput("update", $id, $prefix, "Update", "updateCompo(".$id.")")."\n". - " ".stGetFormButtonInput("delete", $id, $prefix, "Delete", "deleteCompo(".$id.")")."\n". - " ".stGetFormCheckBoxInput("visible", $id, $prefix, $item["visible"], "Visible", "onChange=\"setCompoData(".$id.",'visible')\"")."\n". - " ".stGetFormCheckBoxInput("show_authors", $id, $prefix, $item["show_authors"], "Show authors", "onChange=\"setCompoData(".$id.",'show_authors')\"")."\n". - $str."\n"; + " ".stGetFormButtonInput("delete", $id, $prefix, "Delete", "deleteCompo(".$id.")")."\n"; }