diff --git a/css/filebrowser_style.css b/css/filebrowser_style.css new file mode 100644 index 0000000..a4b0326 --- /dev/null +++ b/css/filebrowser_style.css @@ -0,0 +1,8 @@ +#filebrowser-form-actions img { + max-width:none; +} + +#filebrowser-form-actions th.select-all { + width:1%; + max-width: 18px; +} diff --git a/filebrowser.info b/filebrowser.info index 448732d..f09f7a8 100644 --- a/filebrowser.info +++ b/filebrowser.info @@ -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" \ No newline at end of file +stylesheets[all][] = css/filebrowser_style.css diff --git a/filebrowser.module b/filebrowser.module index 898edd0..8e9d36a 100644 --- a/filebrowser.module +++ b/filebrowser.module @@ -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); } /** @@ -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 == '/') { @@ -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; } @@ -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 @@ -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; diff --git a/filebrowser.theme.inc b/filebrowser.theme.inc index b8ca665..ea16a6c 100644 --- a/filebrowser.theme.inc +++ b/filebrowser.theme.inc @@ -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;