From e852b77f6c1feddd9c2b40ba325eacc79f38f47f Mon Sep 17 00:00:00 2001 From: Fernando Lemos Date: Tue, 8 Aug 2006 19:29:19 +0000 Subject: Updated scripts in accordance with the new cg2 stuff (on_apply_event, etc.). --- packages/cg2/sample/sample.inc | 15 +++++++++++---- packages/cg2/sample/sample_ui.xml | 3 +-- 2 files changed, 12 insertions(+), 6 deletions(-) (limited to 'packages/cg2') diff --git a/packages/cg2/sample/sample.inc b/packages/cg2/sample/sample.inc index 9f53c8de..62ec59ab 100644 --- a/packages/cg2/sample/sample.inc +++ b/packages/cg2/sample/sample.inc @@ -1,11 +1,11 @@ value='This example shows how to change the text inside a text box from within the include file, when the form is loaded.'; @@ -16,7 +16,14 @@ function sample_on_sync_event() /* This is called when the form is posted. You generally want to sync the * configurations in the XML file to settings in files spread across the file * system or maybe restart a service here. */ - var_dump('BEING SYNCED'); + //var_dump('BEING SYNCED'); +} + +function sample_on_apply_event() +{ + /* This is called when a configuration has been changed and the user is + * prompted to apply the changes and clicks "Apply changes". */ + var_dump('BEING APPLIED'); } function sample_on_submit_event() @@ -25,6 +32,6 @@ function sample_on_submit_event() * clicked. This should only be used when you have more than one submit * button in the same form. Otherwise, performs better and * is cleaner. */ - var_dump('BEING SUBMITTED'); + //var_dump('BEING SUBMITTED'); } ?> diff --git a/packages/cg2/sample/sample_ui.xml b/packages/cg2/sample/sample_ui.xml index 65d9ebdf..f862b103 100644 --- a/packages/cg2/sample/sample_ui.xml +++ b/packages/cg2/sample/sample_ui.xml @@ -72,8 +72,7 @@ table move,edit,delete,add - Those stupid rules have been updated. Click this button to apply thechanges. - sample_on_sync_event + sample_on_apply_event checkbox dummycheckbox -- cgit v1.2.3