Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: add common fixed classname or id prefix to all tv input fields #56

Open
donShakespeare opened this issue Mar 13, 2017 · 1 comment

Comments

@donShakespeare
Copy link

The native MODX file/image browsers have their ids starting with tvbrowser##
In this way, it will be easy to target the input fields to implement other Media Browsers to work with Image+

Good work on this Extra

@Jako
Copy link
Owner

Jako commented Mar 13, 2017

The browser is called here:

this.browser = MODx.load({
xtype: 'modx-browser',
closeAction: 'close',
id: Ext.id(),
multiple: true,
source: this.config.source || 1,
hideFiles: this.config.hideFiles || false,
rootVisible: this.config.rootVisible || false,
allowedFileTypes: this.config.allowedFileTypes || '',
wctx: this.config.wctx || 'web',
openTo: this.config.openTo || '',
rootId: this.config.rootId || '/',
hideSourceCombo: this.config.hideSourceCombo || false,
listeners: {
select: {
fn: function (data) {
this.setValue(data.relativeUrl);
this.fireEvent('select', data);
}, scope: this
}
}

If you want to hook a different file browser into the MODX system, you should go the ExtJS way and create a different xtype that i.e. calls elFinder for browsing.

After that is done, the ‘modx-browser' string could be changed to something that is configurable by a system setting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants