Skip to content

allow columnsCustomName[x] to be a functionΒ #3289

@mewalig

Description

@mewalig

Hi,

I'd like my column names in list view to be dynamic. An easy way and backward-compatible way to do this, would be for me to provide a custom function in uioptions.cwd.listView.columnsCustomName[x], which would only require the following change in elFinder.js around line 4973:

		self.getColumnName = function(key) {
			// return columnNames[key] || self.i18n(key); // removed
			var cn = columnNames[key] || self.i18n(key); // added
			return cn && cn.constructor == Function ? cn() : cn; // added
		};

Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions