Jump to:

10994 Posts in 2728 Topics by 1819 members

All other Modules

SilverStripe Forums » All other Modules » Bulk Uploader Module: Testers needed!

Discuss all other Modules here.

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

Page: 1 2 3 4 5 6 7 8
Go to End
Author Topic: 12963 Views
  • UncleCheese
    Avatar
    4085 Posts

    Re: Bulk Uploader Module: Testers needed! Link to this post

    Just pushed in a new version. Try it now with the absolute URL.

    I would love to be able to use a TreeDropdownField for the folder selection. For some reason, its AJAX doesn't work in frames, though. Same thing happens if you try to use them in a CTF popup. Known bug.

    I suppose I could get smart, though, and do some clever indenting. Originally I had the entire filename of the folder showing. e.g. /assets/Galleries/my-album/ but some of them ran really long and it got ugly.

    Anyway, let me know how this goes. Thanks for being a beta tester. It's good to be aware of these bugs.

  • Amir Mostofi
    Avatar
    Community Member
    59 Posts

    Re: Bulk Uploader Module: Testers needed! Link to this post

    The "Director::absoluteURL" has done the trick. I need to define absolute URLs on my local server. The situation might be different on the actual server.

    Now, after the content of a folder loads and I select a couple of files and try to import, I get the following error. Any idea?

    Fatal error: Class '{$this->DataObjectClassName}' not found in /Users/Amir/Sites/silverstripe/bulk_uploader/code/BulkUploader_Controller.php on line 312

    I just noticed that the error is appearing on your sandbox too.

  • Amir Mostofi
    Avatar
    Community Member
    59 Posts

    Re: Bulk Uploader Module: Testers needed! Link to this post

    Can we also get rid of the "hello" prompt that appears when you first click on "Upload files" on the left?

  • Amir Mostofi
    Avatar
    Community Member
    59 Posts

    Re: Bulk Uploader Module: Testers needed! Link to this post

    The jQuery slide function works when selecting a folder option. However, the vertical scrollbar is not invoked when the content is longer than the defined height. I have tested this on Firefox, Safari and Opera (all on Mac) and the same result.
    It appears that "overflow: auto" is not invoked for "#file-selection-wrapper".

    This is driving me nuts and I cannot find a solution for it. For some odd reason, this vertical scrollbar issue does not happen on your demo when viewed in Firefox (but does so in Safari).

    This Bulk Uploader module is so promising if it worked without a glitch!

  • UncleCheese
    Avatar
    4085 Posts

    Re: Bulk Uploader Module: Testers needed! Link to this post

    Okay, the syntax error is solved, as well as the goofy alert('hello') that accidentally got checked in.

    I'm not sure what you mean about the scroll bar. Would you rather it display all of the time? It's nice to have all your files contained to a fixed height so it doesn't run all the way down the page. What's nice about the overflow : auto property is that it only uses the scroll bar if it needs it. Otherwise, we can use overflow:scroll which would display a greyed out scrollbar if it's not needed, but that's kind of ugly.

  • UncleCheese
    Avatar
    4085 Posts

    Re: Bulk Uploader Module: Testers needed! Link to this post

    Also, you'll get pagination links, but they don't work right now. I'm working on that today.

  • Amir Mostofi
    Avatar
    Community Member
    59 Posts

    Re: Bulk Uploader Module: Testers needed! Link to this post

    I just downloaded the latest svn files for bulk_uploader, sortable_dataobject and swfupload and tried to install them on a fresh build of SS 2.3.0-rc2 with no other modules added.

    When doing a dev/build, below is the error I get:

    --------------
    Building Database

    Creating database tables

    PageComment

    Parse error: syntax error, unexpected T_STRING, expecting T_FUNCTION in /Users/Amir/Sites/silverstripe/mysite/code/Resource.php on line 4
    --------------

    As before, I want to implement your module for the basic Page type, so below is my code for Page.php.

    -----------------------
    <?php

    class Page extends SiteTree {

    public static $db = array(
    );

    public static $has_one = array(
    );

    static $has_many = array (
    'Resources' => 'Resource'
    );

    function getCMSFields()
    {
    $fields = parent::getCMSFields();
    $fields->addFieldToTab("Root.Content.Files", new BulkUploaderField(
    $this,
    'Resources',
    'PDF'
    ));
    return $fields;
    }

    }

    class Page_Controller extends ContentController {

    public function init() {
    parent::init();

    // Note: you should use <% require %> tags inside your templates instead of putting Requirements calls here. However
    // these are included so that our older themes still work
    Requirements::themedCSS("layout");
    Requirements::themedCSS("typography");
    Requirements::themedCSS("form");
    }

    }

    ?>
    -----------------------

    and the following is the code for Resource.php

    -----------------------
    <?php

    class Resource extends DataObject {
    static $db = array (
    'Name' => 'Text',
    'Description' => 'Text'
    );

    static $has_one = array (
    'Page' => 'Page',
    'PDF' => 'File'
    );

    protected static $bulk_uploader_fields = array (
    'Name' => 'TextField',
    'Description' => 'TextField'
    );

    protected static $allowed_file_types = array (
    'pdf'
    );

    }

    ?>
    -----------------------

    What's causing that error?

    Could you possibly zip the latest stable version of bulk_uploader, sortable_dataobject and swfupload and provide them as links here?

  • Amir Mostofi
    Avatar
    Community Member
    59 Posts

    Re: Bulk Uploader Module: Testers needed! Link to this post

    Also, I just tried your sandbox and the syntax error and hello alert have disappeared.

    However, as mentioned before, in Safari 3.2.1 (Mac) you are not getting the vertical scrollbar for long lists of files. The list is cropped within the fixed height and there's no way to scroll to the bottom of the list. I have a feeling, it's a jQuery issue not CSS. "overflow: auto" is the right way, but I think jQuery is just not implementing it.

    12963 Views
Page: 1 2 3 4 5 6 7 8
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.