p4a_db_navigator

Developers
croaker___
2012-09-24
2013-05-15
  • croaker___
    croaker___
    2012-09-24

    There seems to be a problem with this widget if it is nested within a fieldset or frame. Drag and drop works except when dragging to the root. When you try to do this, the element does not move, in my Firefox the element seems to remain painted on the screen where it was dropped but nothing is changed in the back-end (if I refresh the screen, the element appears back where it was dragged from).

    It seems to be a problem with the javascript - on dropping, firebug produces "Error: uncaught exception: Syntax error, unrecognized expression: #".

    I want to place my db_navigator in a frame so I can add other widgets there too (for example, I have a drop down which filters the db_source).

    My mask test code…

    class test extends p4a_base_mask {
       public function __construct() {
          parent::__construct();
          $this->build('p4a_db_source','source')
               ->setTable('pages')
               ->load();
          $this->setSource($this->source);
          $this->build('p4a_simple_toolbar','toolbar')->setMask($this);
          $this->frame
               ->anchor($this->fields->id)
               ->anchor($this->fields->parent_id)
               ->anchor($this->fields->title);
          $this->build('p4a_db_navigator','tree_navigator')
                 ->setSource($this->source)
                 ->setRecursor('parent_id')
                 ->setDescription('title')
                 ->allowMovement($this->fields->parent_id)
                 ->allowRootsMovement()
                 ->allowMovementToRoot()
                 ->setRootLabel('Website');
          $this->build('p4a_frame','f_tree_navigator')
               ->addCssClass('fom_staticpages_leftside');
          $this->build("p4a_fieldset", "fs_tree_navigator")
               ->setStyleProperty('border','0')
               ->setStyleProperty('padding','0')
               ->setStyleProperty('width','100%');
          $this->f_tree_navigator
               ->anchor($this->tree_navigator);
          $this->display('top',$this->toolbar)
    //           ->display('sidebar_left',$this->tree_navigator)
               ->display('sidebar_left',$this->f_tree_navigator)
               ->firstRow();
       }
    }
    

    Any ideas as to why this should happen?

    Thanks