8000 MODx.panel.Resource should inherit the config.url from MODx.page.UpdateResource and MODx.page.CreateResource · Issue #8767 · modxcms/revolution · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

MODx.panel.Resource should inherit the config.url from MODx.page.UpdateResource and MODx.page.CreateResource #8767

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

Closed
modxbot opened this issue Sep 25, 2012 · 5 comments
Labels
proposal Proposal about improvement aka RFC. Need to be discussed before start implementation. type-frontend Issues related to UI/UX issues, mostly about styles and frontend implementations on JavaScript.

Comments

@modxbot
Copy link
Contributor
modxbot commented Sep 25, 2012

Eiventeleiron created Redmine issue ID 8767

This is also similar for all other Resource Types (weblink, static resource, etc).

When instantiating for example the MODx.page.UpdateResource JavaScript class, we are defining a config.url value, which is pointing to the connector. Well, the fact is that the value inside MODx.page.UpdateResource doesn't get used at all (this is not so obvious), instead it is using the config.url from MODx.panel.Resource, where it is set up AGAIN (by exactly the same way).
Well, we can't modify this value without modifying the MODx.page.UpdateResource itself (because the MODx.panel.Resource from inside MODx.page.UpdateResource), so no way of changing of the connector URL FROM THE CONTROLLER. Yes, I can setting the MODx.page.UpdateResource config.url (by this way for example:

MODx.load({
                xtype: "modx-page-resource-update"
                ,url: "/my/connector/path/connector.php"
                // something else
            });

but this setting gets lost when instantiating the MODx.panel.Resource.

I suggest changing (for example)
manager/assets/modext/sections/resource/update.js:

,components: [{
            xtype: config.panelXType || 'modx-panel-resource'
            ,renderTo: config.panelRenderTo || 'modx-panel-resource-div'
            ,resource: config.resource
            ,record: config.record || {}
            ,publish_document: config.publish_document
            ,access_permissions: config.access_permissions
            ,show_tvs: config.show_tvs
            ,mode: config.mode
        }]

to

,components: [{
            xtype: config.panelXType || 'modx-panel-resource'
            ,renderTo: config.panelRenderTo || 'modx-panel-resource-div'
            ,resource: config.resource
            ,record: config.record || {}
            ,publish_document: config.publish_document
            ,access_permissions: config.access_permissions
            ,show_tvs: config.show_tvs
            ,mode: config.mode
            ,url: config.url
        }]

If needed I can provide a pull request with all required changes on Github. This will allow better control over connectors from the controllers of the resource classes.

@modxbot
Copy link
Contributor Author
modxbot commented Sep 25, 2012

Eiventeleiron submitted:

Added pull request: #380

@modxbot
Copy link
Contributor Author
modxbot commented Sep 25, 2012

Eiventeleiron submitted:

Assigning to opengeek for reviewing the pull request and eventually merging it.
If I made some mistakes please doesn't hesitate to contact me.

@modxbot
Copy link
Contributor Author
modxbot commented Sep 25, 2012

Eiventeleiron submitted:

Attaching diff cause I never used push requests on github before and now it contains several fixes :)

@modxbot
Copy link
Contributor Author
modxbot commented Sep 25, 2012

Eiventeleiron submitted:

Sorry, wrong diff. Attaching new one.

@modxbot
Copy link
Contributor Author
modxbot commented Sep 26, 2012

Eiventeleiron submitted:

Finally get sorted all this pull request stuff. Pull request: #381

enigmatic-user pushed a commit to enigmatic-user/revolution that referenced this issue Feb 13, 2014
enigmatic-user pushed a commit to enigmatic-user/revolution that referenced this issue Feb 13, 2014
Merge remote-tracking branch 'Evengard/rel22bug8767' into bug-8767
enigmatic-user pushed a commit to enigmatic-user/revolution that referenced this issue Feb 13, 2014
enigmatic-user pushed a commit to enigmatic-user/revolution that referenced this issue Feb 13, 2014
Merge branch 'bug-8767' into release-2.2

* bug-8767:
  [modxcms#8767] add changelog entry
  [modxcms#8767] possible bug fix
enigmatic-user pushed a commit to enigmatic-user/revolution that referenced this issue Feb 13, 2014
Merge branch 'release-2.2'

* release-2.2: (130 commits)
  Bump version for 2.2.5-pl
  [modxcms#8753] fixing that trivial variable error.
  French translation update
  [modxcms#8196] Changed event type for fieldChangeEvent for combo boxes
  [modxcms#8186] Adding FC rules checking based on reloadData.
  [modxcms#8790] adding a possibility to hide the new password after changing via profile reset.
  [modxcms#7631] add changelog entry
  Fix duplicate beforeSave() in modProcessorObjectCreate
  Italian translation for Revo 2.2.5
  [modxcms#7551] adding an additional check so that the destination static file can't be an existing directory
  Czech translation update
  Correction in setting lexicon
  [modxcms#7654] Fix Update processor for ResourceGroup-restricted TVs
  Preserve backwards compatibility(add 'object' key) after objectType fix
  Last changes in the German translation for Revo 2.2.5
  [modxcms#8767] add changelog entry
  Possible fix for bug [modxcms#4430]
  [modxcms#8767] possible bug fix
  [modxcms#8545] add changelog entry
  [modxcms#8089] add changelog entry
  ...
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal Proposal about improvement aka RFC. Need to be discussed before start implementation. type-frontend Issues related to UI/UX issues, mostly about styles and frontend implementations on JavaScript.
Projects
None yet
Development

No branches or pull requests

1 participant
0