Jump to:

7938 Posts in 1541 Topics by 945 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » DOM in a popup?

Discuss the DataObjectManager module, and the related ImageGallery module.

Moderators: martimiz, UncleCheese, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1 2
Go to End
Author Topic: 3412 Views
  • t|m
    Avatar
    Community Member
    19 Posts

    DOM in a popup? Link to this post

    im trying to use the dataobject manager in a popup window.
    it seems not to load the requirements.

    any one experiences?

    Cheers

  • UncleCheese
    Avatar
    4085 Posts

    Re: DOM in a popup? Link to this post

    Wow.. That's a wild idea, and I don't think there's any chance you'll get it working, but if you do, please let me know how you do it.

    Wouldn't that present some serious interface challenges? A DOM popup in a DOM popup?!

    FYI, I'm working on a new field for DOM that will allow very limited CRUD management of DataObjects to another DataObject. Won't be as pretty as the DOM, but it will do the job.

    Can't say a release date, though. Pretty far off at this point.

  • t|m
    Avatar
    Community Member
    19 Posts

    Re: DOM in a popup? Link to this post

    hmm yeah it is a bit weird

    but i'd like to manage children of children of a page.
    cant use DOM for the first view as it needs a different view...

    maybe i'll find another way of handling it...

    Cheers

  • t|m
    Avatar
    Community Member
    19 Posts

    Re: DOM in a popup? Link to this post

    btw... it almost works. just the css and js files are not blocked / included (even though the func is called) ... weird...

  • t|m
    Avatar
    Community Member
    19 Posts

    Re: DOM in a popup? Link to this post

    got it!

    i moved the requirements calls from DataObjectManager::__construct() to a new function "FieldHolder"
    in order to overwrite the calls by complex table field

    public function FieldHolder() {
          parent::FieldHolder();
          
          Requirements::block(THIRDPARTY_DIR . "/greybox/AmiJS.js");
          Requirements::block(THIRDPARTY_DIR . "prototype.js");
          Requirements::block(THIRDPARTY_DIR . "/greybox/greybox.js");
          Requirements::block(SAPPHIRE_DIR . "/javascript/ComplexTableField.js");
          Requirements::block(SAPPHIRE_DIR . "/javascript/TableListField.js");

          Requirements::block(THIRDPARTY_DIR . "/greybox/greybox.css");
          Requirements::block(SAPPHIRE_DIR . "/css/ComplexTableField.css");
          Requirements::css('dataobject_manager/css/dataobject_manager.css');
          Requirements::css('dataobject_manager/css/facebox.css');
          Requirements::javascript('dataobject_manager/javascript/facebox.js');   
          Requirements::javascript('dataobject_manager/javascript/jquery-ui.1.5.3.js');
          Requirements::javascript('dataobject_manager/javascript/dataobject_manager.js');
          Requirements::javascript('dataobject_manager/javascript/tooltip.js');

          return $this->renderWith($this->template);
       }

  • UncleCheese
    Avatar
    4085 Posts

    Re: DOM in a popup? Link to this post

    OMG.. please send a screenshot! How does the nested popup work?

  • t|m
    Avatar
    Community Member
    19 Posts

    Re: DOM in a popup? Link to this post

    quite a bit buggy at this stage.
    will do some fixes and send you a proper patch with shots as well

  • UndefinedOffset
    Avatar
    Community Member
    27 Posts

    Re: DOM in a popup? Link to this post

    I hate bumping old topics but did you ever manage to get it working? I'm also trying to have a DataObjectManager in a DataObjectManager popup. Only thing thats not working is the drag and drop reordering, when I try to reorder it all that happens is it adds space bellow the item I want to move. I have firebug installed and it's showing "c.Event is not a function" comming from jQuery-ui.1.7.js line 10.

    I'm likely missing some javascript file, but any ideas?

    3412 Views
Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.