-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[com_modules] modules view (modal) - Implement searchtools #9232
[com_modules] modules view (modal) - Implement searchtools #9232
Conversation
…odules-searchtools
…odules-searchtools
I have tested this item ✅ successfully on ba84682 This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9232. |
sorry, didn't understand your comment. |
Dont worry about it - just personally dont see the need to add a style here On 28 February 2016 at 13:06, andrepereiradasilva notifications@github.com
Brian Teeman |
window.parent.jInsertEditorText("{loadmodule " + type + "," + name + extraVal + "}", "' . $editor . '"); | ||
window.parent.jModalClose(); | ||
}; | ||
modulePosIns = function(position) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add back the 2 tabs in this javascript part so the rendered output is more aligned?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, will do when i fixed merge conflicts
BTW, just for info, i tried a new javasctipt to add to core.js, it worked good but didn't want to merge in this PR
/**
* Insert a loadmodule or loadposiiton text shortcut in modules modal windows. Used in modules modal.
* USED IN: administrator/components/com_modules/views/modules/tmpl/modal.php
*
* @param string component The component in usage (ex: com_content).
* @param string type The type of insert (module or position).
* @param string what What to insert, the position or module type.
* @param string title The title.
*
* @return boolean False to remove the default click event.
*/
Joomla.insertEditorShortCode = function(component, type, what, title) {
var editor = document.getElementById('editor').value, extraClass = document.getElementById('extra_class').value;
if (component === 'com_modules')
{
window.parent.jInsertEditorText('{load' + type +' ' + what + ((title !== '') ? ',' + title : '') + ((extraClass !== '') ? ',' + extraClass : '') + '}', editor);
window.parent.jModalClose();
}
return false;
}
then call it with
For modules:
onclick="Joomla.insertEditorShortCode('com_modules', 'module', '<?php echo $this->escape($item->module); ?>', '<?php echo $this->escape($item->title); ?>');">
For position:
onclick="Joomla.insertEditorShortCode('com_modules', 'position', '<?php echo $this->escape($item->position); ?>', '');"
What to you think? for a future PR after this is merged...
also has the advantage that is vanilla js
And of course, could also be modified to use data-* attributes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can have vanilla js here:
moduleIns = function(type, name) {
var extraVal ,fieldExtra = document.getElementById("extra_class");
extraVal = (fieldExtra.length && fieldExtra.value.length) ? "," + fieldExtra.value : "";
window.parent.jInsertEditorText("{loadmodule " + type + "," + name + extraVal + "}", "' . $editor . '");
window.parent.jModalClose();
I wouldn't abstract the function in core.js as it makes it harder to trace back...
On the other hand that way we discard the inline script, so I see an advantage there as well. You decide here
I have tested this item ✅ successfully on ba84682 This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9232. |
RTC thanks This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9232. |
Hi, i want to contribute by testing this PR. |
Means the latest "version" on the current branch "staging" it contains all
|
The term 'staging' refers to something that's staged to be delivered. In Joomla context, it is the name of all the latest accepted changes. Then, to test a new change, you have to download from Github the latest Additionally, some PRs provide the whole Joomla to avoid the hassle of Happy testing !
|
Just one more small doubt. I have installed joomla version 3.4.8 and using xampp to run it. |
This PR has received new commits. CC: @anibalsanchez, @brianteeman This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9232. |
This PR has received new commits. CC: @anibalsanchez, @brianteeman This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9232. |
ignore again the unit tests label, somehow my git changed the filename of the xcache unit test, i reverted. Conflicts fixed. @brianteeman please remove again the label sorry. |
Two questions:
|
Dont know abut the removal of the type column (perhaps a mistake I only noticed the removal of the pages column which was meaningless) but this was only a "feature" added in 3.5.0 and to me its a bug fix/improvement |
the type column is there is only hidden in tablet view. |
As per your screenshot in the first post and a retest I just did right now which shows the same as your screenshot. |
@brianteeman what was added in 3.5.0? |
funny I have testet it, I am getting old :-), thanks |
ok will check the type column, maybe the popup is a tablet size (width) and so it doesn't appear. |
just tested, yes the popup is tablet size, i will change it. |
This PR has received new commits. CC: @anibalsanchez, @brianteeman This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9232. |
Done. BTW not related to this PR, but the popups width shouldn't be fixed! |
All good to me - will let @rdeutz decide on 3.5.2 or 3.6 This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9232. |
thanks On 13 April 2016 at 17:28, Robert Deutz notifications@github.com wrote:
Brian Teeman |
ok will fix the merge conflicts in the other 3 PR when i have time. |
Description
This PR adds searchtools to com_modules modal layout modules view.
Also, in normal layout:
Before PR (modal)
After PR (modal)
How to test
Normal view:
Modal view (test in frontend and backend):
Observations
/components/com_modules/models/forms/filter_modules.xml
file to control the frontend searchtools fields (a similiar one already exists for the com_content in/components/com_content/models/forms/filter_articles.xml
). Please tell if there are any problems with this.