Jump to:

7940 Posts in 1543 Topics by 946 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » DOM and ModelAdmin

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Page: 1 2 3 4
Go to End
Author Topic: 4603 Views
  • UncleCheese
    Avatar
    4085 Posts

    Re: DOM and ModelAdmin Link to this post

    Just realized.. it's not going to be good enough to add the metatag to the popup template, because that's nested in an iframe, which is agnostic of facebox. The true fix would have to be to add the emulate IE7 meta tag to the CMSMain template. Ouch.

    As an experiment, please try adding this as the first line to DataObjectManager.ss (or FileDataObjectManager.ss, or whatever you're using..)

    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7">

    Actually, I can almost guarantee that this won't work because the DOM is loaded with AJAX. Hmm..

    Alright, time to look for a new modal window.

  • Dave L
    Avatar
    Community Member
    56 Posts

    Re: DOM and ModelAdmin Link to this post

    I did a global find and replace for "new Image()" >> "document.createElement("img")" in facebox.js. Seems to work but couldn't say whether it's suitable or fits across all browsers.

  • UncleCheese
    Avatar
    4085 Posts

    Re: DOM and ModelAdmin Link to this post

    Wow. Thanks so much. Worst case we can use $.browser to detect IE8 if it doesn't work in all browsers.

    Thanks.. that takes some weight off my shoulders!

  • joelg
    Avatar
    Community Member
    129 Posts

    Re: DOM and ModelAdmin Link to this post

    Hi UncleCheese & Co

    I think this topic might be the issue I'm experiencing with modelAdmin. However, I've had a closer look at dataobject_manager.js and everything seems to be updated. I've taken some screenshots to show whats going on.

    When I open modelAdmin and do a "Search" everything is ok. I'm also able to "Create 'XXXXXX'" from modelAdmin.

    However, after "Add"'ing a new object things become strange: If I do a new "Search" or "Create XXXXXX" the form shows up in the browser window without css-style and not in the SilverStripe CMS. This doesn't happend if I do a "Search", edit an object and hit regular "Save", only when I add a new object from the "Create XXXXXX"-button. Please see next screenshot which shows the strange behaviour:

    I'm using SilverStripe 2.3.5 and DOM (modules-dataobject_manager-r364.tar.gz), so all files are pretty new. My browsers are Firefox 3.5.7 and Safari 4.0.4 on Mac OS X.

    I can give ftp-access, if someone has time to take a closer look.

    Anyway, thanks for any help

    Joel

  • UncleCheese
    Avatar
    4085 Posts

    Re: DOM and ModelAdmin Link to this post

    What Javascript errors are you getting?

  • joelg
    Avatar
    Community Member
    129 Posts

    Re: DOM and ModelAdmin Link to this post

    The only error I can find is:

    tinyMCE is not defined
    ? in ModelAdmin.js?m=1263505532@85()ModelA...3505532 (linje 86)
    ? in jquery.js?m=1227675043@724()jquery...7675043 (linje 745)
    ? in jquery.js?m=1227675043@137()jquery...7675043 (linje 138)
    ? in ModelAdmin.js?m=1263505532@82()ModelA...3505532 (linje 85)
    ? in jquery.js?m=1227675043@2051()jquery...7675043 (linje 2076)
    ? in jquery.js?m=1227675043@1854()jquery...7675043 (linje 1858)
    [Break on this error] tinyMCE.execCommand('mceRemoveControl', false, $(this).attr('id'));
    ModelA...3505532 (linje 86)

    Any clues?

  • UncleCheese
    Avatar
    4085 Posts

    Re: DOM and ModelAdmin Link to this post

    Are you using a tinyMCE field?

  • joelg
    Avatar
    Community Member
    129 Posts

    Re: DOM and ModelAdmin Link to this post

    No, I'm not using a tinyMCE field... I have a couple of TextareaFields, TextFields, HeaderField, Literalfields, checkboxes, imagefields and dropdowns. And then a HasOneDataObjectManager and ManyManyDataObjectManager.

    You can see the file here: http://www.joel.biz/Employee.txt

    4603 Views
Page: 1 2 3 4
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.