Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions css/filebrowser_style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#filebrowser-form-actions img {
max-width:none;
}

#filebrowser-form-actions th.select-all {
width:1%;
max-width: 18px;
}
7 changes: 3 additions & 4 deletions filebrowser.info
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
type = module
name = Filebrowser
description = Provides FTP-like browsing capabilities.
version = 1.x-3.1
version = 1.x-3.5
backdrop = 1.x
type = module
package = FileBrowser
project = "filebrowser"
stylesheets[all][] = css/filebrowser_style.css
15 changes: 10 additions & 5 deletions filebrowser.module
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,9 @@ function filebrowser_insert($node) {
function filebrowser_update($node) {
_filebrowser_prepare_record($node, FALSE);
backdrop_write_record("node_dir_listing", $node, 'nid');
_filebrowser_node_content_delete($node);
// From Drupal Filebrowser Issue #2760957: listing edit resets fids
// No need to reset the fids on node edit.
// _filebrowser_node_content_delete($node);
}

/**
Expand Down Expand Up @@ -472,7 +474,8 @@ function filebrowser_view($node, $view_mode) {
$path_elements = explode('/', rtrim($node->file_listing['.']['relative-path'], "/"));
for ($i = 0; $i < count($path_elements); $i++) {
$child_dir = $path_elements[$i] == '' ? '/' : $path_elements[$i];
$breadcrumb_path .= $child_dir;
// From Drupal Filebrowser Issue #2511546: Add a slash from the third breadcrumb.
$breadcrumb_path = ($i < 2) ? $breadcrumb_path . $child_dir : $breadcrumb_path . '/' . $child_dir;
$fid = db_query("SELECT fid FROM {node_dir_listing_content}
WHERE path = :path", array(':path' => $breadcrumb_path)) ->fetchField();
if ($child_dir == '/') {
Expand Down Expand Up @@ -530,7 +533,9 @@ function filebrowser_view($node, $view_mode) {
// Insert filebrowser links
$node-> content['links']['filebrowser'] = array('#theme' => 'links__node__blog',
'#links' => _filebrowser_links($node),
'#attributes' => array('class' => array('links', 'inline')),);
'#attributes' => array('class' => array('links', 'inline')),
);

return $node;
}

Expand Down Expand Up @@ -651,7 +656,7 @@ function filebrowser_form_upload_validate($form, &$form_state) {
}

/**
* uploads submition.
* uploads submission.
*/
function filebrowser_form_upload_submit($form, &$form_state) {
$i = 1; // Later we can have multi-upload
Expand Down Expand Up @@ -804,7 +809,7 @@ function filebrowser_form_actions_submit($form, $form_state) {
if ($value) {
$fids[] = $form['table']['#options'][$key]['fid'];
}
}
}
$result = module_invoke_all('filebrowser_action_process', $form['#node'], $form_state['values']['action'], $fids);
if ($result) {
return $result;
Expand Down
2 changes: 1 addition & 1 deletion filebrowser.theme.inc
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ function theme_dir_listing_list_view($node) {
$visible_columns[$column_name] = TRUE;
$unsorted_rows[$file_name][FILEBROWSER_DATA_NAME_ICON] = array(
'data' => _filebrowser_thumbnails_generate($node, $data),
'style' => 'width:1%;'
'style' => 'width:1%;min-width:18px;'
);
break;

Expand Down