Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

All other Modules /

Discuss all other Modules here.

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

Bulk Uploader Module: Testers needed!


Reply


57 Posts   13250 Views

Avatar
UncleCheese

Forum Moderator, 4094 Posts

12 January 2009 at 6:12pm

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.

Avatar
Amir Mostofi

Community Member, 59 Posts

12 January 2009 at 6:31pm

Edited: 12/01/2009 6:34pm

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.

Avatar
Amir Mostofi

Community Member, 59 Posts

12 January 2009 at 6:43pm

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

Avatar
Amir Mostofi

Community Member, 59 Posts

12 January 2009 at 11:52pm

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!

Avatar
UncleCheese

Forum Moderator, 4094 Posts

13 January 2009 at 4:04am

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.

Avatar
UncleCheese

Forum Moderator, 4094 Posts

13 January 2009 at 4:05am

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

Avatar
Amir Mostofi

Community Member, 59 Posts

13 January 2009 at 9:12am

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?

Avatar
Amir Mostofi

Community Member, 59 Posts

13 January 2009 at 9:26am

Edited: 13/01/2009 9:27am

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.