Permalink
Browse files

add extra files

  • Loading branch information...
1 parent 2571b36 commit ef3e2b5aeb38c6e1c589fa9fa54c1f8c7e5324d0 @romaninsh romaninsh committed Apr 20, 2011
Showing with 89 additions and 2 deletions.
  1. +6 −0 .gitmodules
  2. +1 −0 atk4-1
  3. +1 −0 atk4-1-addons
  4. +5 −1 index.php
  5. +7 −1 lib/Frontend.php
  6. +10 −0 page/editablef.php
  7. +13 −0 page/metatags.php
  8. +23 −0 page/reloadform.php
  9. +23 −0 page/reloadformac.php
View
@@ -4,3 +4,9 @@
[submodule "atk4-addons"]
path = atk4-addons
url = git://github.com/atk4/atk4-addons.git
+[submodule "atk4-1"]
+ path = atk4-1
+ url = git://github.com/atk4/atk4.git
+[submodule "atk4-1-addons"]
+ path = atk4-1-addons
+ url = git://github.com/atk4/atk4-addons.git
1 atk4-1
Submodule atk4-1 added at a9a2df
Submodule atk4-1-addons added at cecd17
View
@@ -10,7 +10,11 @@
// agile_project - this is realm. It should be unique per-project
// jui - this is theme. Keep it jui unless you want to make your own theme
-include 'atk4/loader.php';
+if($_GET['b']=='devel'){
+ include 'atk4-1/loader.php';
+}else{
+ include 'atk4/loader.php';
+}
$api=new Frontend('sample_project','jui');
$api->main();
?>
View
@@ -13,7 +13,13 @@ function init(){
// This will add some resources from atk4-addons, which would be located
// in atk4-addons subdirectory.
- $this->addLocation('atk4-addons',array(
+ $this->api->stickyGET('b');
+ if($_GET['b']=='devel'){
+ $dir='atk4-1-addons';
+ }else{
+ $dir='atk4-addons';
+ }
+ $this->addLocation($dir,array(
'php'=>array(
'mvc',
'misc/lib',
View
@@ -0,0 +1,10 @@
+<?php
+class page_editablef extends Page {
+ function init(){
+ $g = $this->add('Grid');
+ $g->addColumn('inline','name');
+ $g->addColumn('inline','email');
+ $g->addColumn('expander','comments');
+ $g->setSource('user');
+ }
+}
View
@@ -0,0 +1,13 @@
+<?php
+
+class page_metatags extends Page {
+ function init(){
+ parent::init();
+
+ // Move this code in $api if you want it to appear on all pages
+ $this->api->add('Text',null,'js_include')
+ ->set('<meta testing="123"/>');
+
+ $this->add('View_Info')->set('View HTML source of this page');
+ }
+}
View
@@ -0,0 +1,23 @@
+<?php
+class page_reloadform extends Page {
+ function init(){
+ parent::init();
+
+ $form1=$this->add('Form');
+ $selection=$form1->addField('reference','user')->setController('Controller_User');
+
+ $form2=$this->add('MVCForm');
+
+ $selection->js('change',$form2->js()->reload(array('user_id'=>$selection->js()->val())));
+
+ $this->api->stickyGET('user_id');
+
+ $form2->setController('Controller_User');
+ if($_GET['user_id'])$form2->getController()->loadData($_GET['user_id']);
+
+ if($form2->isSubmitted()){
+ $form2->update();
+ $form2->js()->univ()->alert('Saved successfully')->execute();
+ }
+ }
+}
View
@@ -0,0 +1,23 @@
+<?php
+class page_reloadformac extends Page {
+ function init(){
+ parent::init();
+
+ $form1=$this->add('Form');
+ $selection=$form1->addField('autocomplete','user')->setController('Controller_User');
+
+ $form2=$this->add('MVCForm');
+
+ $selection->js('change',$form2->js()->reload(array('user_id'=>$selection->js()->val())));
+
+ $this->api->stickyGET('user_id');
+
+ $form2->setController('Controller_User');
+ if($_GET['user_id'])$form2->getController()->loadData($_GET['user_id']);
+
+ if($form2->isSubmitted()){
+ $form2->update();
+ $form2->js()->univ()->alert('Saved successfully')->execute();
+ }
+ }
+}

0 comments on commit ef3e2b5

Please sign in to comment.