From 55eddd7accf2c5f9b0f52b22a010c4c4b7c130d1 Mon Sep 17 00:00:00 2001 From: Bill Marquette Date: Fri, 6 Feb 2009 19:18:00 -0600 Subject: mv packages to config dir to match web layout --- config/cg2/sample/i18n/messages_de.xml | 7 ++ config/cg2/sample/i18n/messages_en.xml | 7 ++ config/cg2/sample/sample.inc | 37 ++++++++ config/cg2/sample/sample.xml | 18 ++++ config/cg2/sample/sample_ui.xml | 156 +++++++++++++++++++++++++++++++++ config/cg2/sample/sample_ui2.xml | 29 ++++++ 6 files changed, 254 insertions(+) create mode 100644 config/cg2/sample/i18n/messages_de.xml create mode 100644 config/cg2/sample/i18n/messages_en.xml create mode 100644 config/cg2/sample/sample.inc create mode 100644 config/cg2/sample/sample.xml create mode 100644 config/cg2/sample/sample_ui.xml create mode 100644 config/cg2/sample/sample_ui2.xml (limited to 'config/cg2') diff --git a/config/cg2/sample/i18n/messages_de.xml b/config/cg2/sample/i18n/messages_de.xml new file mode 100644 index 00000000..0cfef583 --- /dev/null +++ b/config/cg2/sample/i18n/messages_de.xml @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/config/cg2/sample/i18n/messages_en.xml b/config/cg2/sample/i18n/messages_en.xml new file mode 100644 index 00000000..1ee7d24d --- /dev/null +++ b/config/cg2/sample/i18n/messages_en.xml @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/config/cg2/sample/sample.inc b/config/cg2/sample/sample.inc new file mode 100644 index 00000000..62ec59ab --- /dev/null +++ b/config/cg2/sample/sample.inc @@ -0,0 +1,37 @@ +value='This example shows how to change the text inside a text box from within the include file, when the form is loaded.'; +} + +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'); +} + +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() +{ + /* This allows you to perform an action when an specific submit button is + * 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'); +} +?> diff --git a/config/cg2/sample/sample.xml b/config/cg2/sample/sample.xml new file mode 100644 index 00000000..d851c54e --- /dev/null +++ b/config/cg2/sample/sample.xml @@ -0,0 +1,18 @@ + + +2.0 + +A fancy example + + + + + + sample_ui.xml + + + + sample_ui2.xml + + + diff --git a/config/cg2/sample/sample_ui.xml b/config/cg2/sample/sample_ui.xml new file mode 100644 index 00000000..aebe8bfe --- /dev/null +++ b/config/cg2/sample/sample_ui.xml @@ -0,0 +1,156 @@ + + +2.0 +sample + +sample.inc + +sample.js + + + form + sample_on_load_event + sample_on_sync_event + + header + + + + textbox + mytextbox + + This is a textbox. + Welcome to the world of coregui 2.0 + + + + ipsec_select + ipsec + + IPsec selection widget test. + + + + select + sample_sel + + + + + + interfaces_select + inter_sel + + + + + textarea + mytextarea + + Just testing descriptions... + This widget can not be edited! + + + + checkbox + mycheckbox + + Check this nice checkbox + Now checkboxes can have a caption as well. + _('hey, this is only meant for quick and dirty stuff, do NOT implement anything longer than 2 or 3 commands here! Btw, i was clicked.'); + + + submit + mysubmit + Send something + sample_on_submit_event + + + + button + mybutton + Cancel something + The description for the last element in a group is the description that matters. + _('Hi, don\'t abuse me, use include_javascript instead!'); + + + + textbox + dummydummy + + + + + checkbox + anothercheckbox + + Enable + Another checkbox, this time after a group, and disabled. + + + + + + table + move,edit,delete,add + sample_on_apply_event + + checkbox + dummycheckbox + + + + port + dummyport + + Enter a port here. + 3128 + + + + textbox + dummysetting + + This dummy setting will not show up in the table. + + + + textarea + longfield + + Very very very very very long field. + + + + + + form + + header + + + + button + mybutton + + Another silly button + + + + + table + + + + + + + + + diff --git a/config/cg2/sample/sample_ui2.xml b/config/cg2/sample/sample_ui2.xml new file mode 100644 index 00000000..aa17d49d --- /dev/null +++ b/config/cg2/sample/sample_ui2.xml @@ -0,0 +1,29 @@ + + +2.0 +sample2 + + + form + + textbox + mytextbox + + Welcome to the world of coregui 2.0 + + + + textarea + mytextarea + + This widget will be encoded to the config + + + + submit + mysubmit + Submit this now + + + + -- cgit v1.2.3