Skip to content

Commit

Permalink
version upped
Browse files Browse the repository at this point in the history
minor js improvement
  • Loading branch information
Szymon Olewniczak committed Aug 1, 2020
1 parent ed74ea0 commit 6a2be7f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion plugin.info.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
base filelisting
author Szymon Olewniczak
email dokuwiki@cosmocode.de
date 2020-03-18
date 2020-08-01
name filelisting plugin
desc List files in currently viewed namespaces
url http://www.dokuwiki.org/plugin:filelisting
7 changes: 4 additions & 3 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -405,8 +405,9 @@ jQuery(function() {
options.dirClosedIcon = JSINFO.plugin.filelisting.dirClosedIcon;
options.loadingIcon = JSINFO.plugin.filelisting.loadingIcon;

var $plugin__filelisting = jQuery('.plugin__filelisting');
// if base namespace is not properly set, sorting and filtering wont work
var ns = jQuery('.plugin__filelisting').data("namespace");
var ns = $plugin__filelisting.data("namespace");
if (ns !== undefined) {
options.baseNamespace = ns;
} else {
Expand All @@ -416,14 +417,14 @@ jQuery(function() {
options.filterLabel = LANG.plugins.filelisting.filter_label;
options.deleteConfirm = LANG.plugins.filelisting.delete_confirm;

jQuery('.plugin__filelisting').dokuwiki_plugin_filelisting(options);
$plugin__filelisting.dokuwiki_plugin_filelisting(options);

/**
* Fixes the tablewidths so that the table columns in header and body are exactly aligned
*
* This is necessary, because browsers have different widths for scrollbars
*/
jQuery('.plugin__filelisting').each(function adjustTableWidthForScrollbar(index, container) {
$plugin__filelisting.each(function adjustTableWidthForScrollbar(index, container) {
var $bodyTable = jQuery(container).find('.plugin__filelisting_bodytable table');
var $headerWrapper = jQuery(container).find('.plugin__filelisting_headertable');
var tablediff = $bodyTable.width() - $headerWrapper.find('table').width();
Expand Down

0 comments on commit 6a2be7f

Please sign in to comment.