All times are UTC + 1 hour




Post new topic Reply to topic  [ 1 post ] 
  Print view

NF_EDIT_DIALOG
Author Message
PostPosted: Wed Dec 10, 2008 5:14 pm 
Regular
Offline

Joined: Mon May 23, 2005 10:52 am
Posts: 64
Location: Italy
I hope in an NF_EDIT_DIALOG flag in the next release of atk! :D
I tried to implement a replacement with this chunk of code:

Code:
function adminPage(&$handler){
        $page = atkPage::getInstance();
        $page->register_scriptcode('
        function editDialog(selector){
           new ATK.Dialog(
              "Test - Edit",
              "index.php?atknodetype=test.test&atkaction=edit&atkpartial=dialog&atklevel=-1&atkprevlevel=0&atkselector="+escape(selector),
              {},
              "atkdialog",
              {},
              {}              
           ).show();
        }');
        return $handler->adminPage();
    }

    function recordActions($record, &$actions, &$mraactions)
    {
        $actions["edit2"]= 'javascript:editDialog("'.$record['atkprimkey'].'");';
    }


It works, but only in simple nodes. Modal nested windows doesn't save the own form values. (for example, if i have a oneToMany pointing to a node with NF_ADD_DIALOG, the content of that node can't be saved).


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group