Commit 08a807ed301ee082b5a911fafd4e5c4645c0a8f9
1 parent
fb4288ae
Add do_updateFieldset and fix changes since this was first developed.
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@3761 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
21 additions
and
9 deletions
presentation/lookAndFeel/knowledgeTree/ajaxConditional.php
| @@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
| 2 | require_once("../../../config/dmsDefaults.php"); | 2 | require_once("../../../config/dmsDefaults.php"); |
| 3 | require_once(KT_DIR . "/presentation/Html.inc"); | 3 | require_once(KT_DIR . "/presentation/Html.inc"); |
| 4 | require_once(KT_LIB_DIR . "/templating/templating.inc.php"); | 4 | require_once(KT_LIB_DIR . "/templating/templating.inc.php"); |
| 5 | -require_once(KT_LIB_DIR . "/documentmanagement/DocumentFieldSet.inc"); | 5 | +require_once(KT_LIB_DIR . "/metadata/fieldset.inc.php"); |
| 6 | require_once(KT_LIB_DIR . "/documentmanagement/DocumentField.inc"); | 6 | require_once(KT_LIB_DIR . "/documentmanagement/DocumentField.inc"); |
| 7 | require_once(KT_LIB_DIR . "/documentmanagement/MDCondition.inc"); | 7 | require_once(KT_LIB_DIR . "/documentmanagement/MDCondition.inc"); |
| 8 | require_once(KT_LIB_DIR . "/database/dbutil.inc"); | 8 | require_once(KT_LIB_DIR . "/database/dbutil.inc"); |
| @@ -19,18 +19,11 @@ require_once(KT_DIR . "/presentation/webpageTemplate.inc"); | @@ -19,18 +19,11 @@ require_once(KT_DIR . "/presentation/webpageTemplate.inc"); | ||
| 19 | class AjaxConditionalDispatcher extends KTDispatcher { | 19 | class AjaxConditionalDispatcher extends KTDispatcher { |
| 20 | 20 | ||
| 21 | function do_main() { | 21 | function do_main() { |
| 22 | - $oTemplating = new KTTemplating; | ||
| 23 | - | ||
| 24 | - $oTemplate = $oTemplating->loadTemplate("ktcore/widget_fieldset_conditional"); | ||
| 25 | - $aTemplateData = array( | ||
| 26 | - "fieldset_id" => 3, | ||
| 27 | - ); | ||
| 28 | - return $oTemplate->render($aTemplateData); | 22 | + return "AJAX Error"; |
| 29 | } | 23 | } |
| 30 | 24 | ||
| 31 | function handleOutput($data) { | 25 | function handleOutput($data) { |
| 32 | print $data; | 26 | print $data; |
| 33 | - | ||
| 34 | } | 27 | } |
| 35 | 28 | ||
| 36 | function do_verifyAndUpdate() { | 29 | function do_verifyAndUpdate() { |
| @@ -45,6 +38,25 @@ class AjaxConditionalDispatcher extends KTDispatcher { | @@ -45,6 +38,25 @@ class AjaxConditionalDispatcher extends KTDispatcher { | ||
| 45 | return ; | 38 | return ; |
| 46 | } | 39 | } |
| 47 | 40 | ||
| 41 | + function do_updateFieldset() { | ||
| 42 | + header('Content-Type: application/xml'); | ||
| 43 | + return ' | ||
| 44 | +<div class="widget"> | ||
| 45 | +<label> | ||
| 46 | +<select name="test123"> | ||
| 47 | + <option value="1">Option 1</option> | ||
| 48 | + <option value="2">Option 2</option> | ||
| 49 | + <option value="3">Option 3</option> | ||
| 50 | + <option value="4">Option 4</option> | ||
| 51 | + <option value="5">Option 5</option> | ||
| 52 | + <option value="6">Option 6</option> | ||
| 53 | +</select> | ||
| 54 | + Test 123. Was that not nice? | ||
| 55 | +</label> | ||
| 56 | +</div> | ||
| 57 | + '; | ||
| 58 | + } | ||
| 59 | + | ||
| 48 | } | 60 | } |
| 49 | 61 | ||
| 50 | $oDispatcher = new AjaxConditionalDispatcher(); | 62 | $oDispatcher = new AjaxConditionalDispatcher(); |