? Success

User tests: Successful: Unsuccessful:

avatar infograf768
infograf768
5 Apr 2016

When the field menuitem is used, the list of menu items will now display the language code (xx-XX) when it is not set to "All" languages.

To test, edit for example the login module.
After patch one will get for the Login or Logout Redirection page:

menuitem

avatar infograf768 infograf768 - open - 5 Apr 2016
avatar infograf768 infograf768 - change - 5 Apr 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 5 Apr 2016
Labels Added: ?
avatar SharkyKZ SharkyKZ - test_item - 5 Apr 2016 - Tested successfully
avatar SharkyKZ
SharkyKZ - comment - 5 Apr 2016

I have tested this item :white_check_mark: successfully on d8bdf8b


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9735.

avatar brianteeman brianteeman - change - 5 Apr 2016
Category Modules Multilanguage
avatar brianteeman brianteeman - test_item - 5 Apr 2016 - Tested successfully
avatar brianteeman
brianteeman - comment - 5 Apr 2016

I have tested this item :white_check_mark: successfully on d8bdf8b

Successful test - just wondering if it should use the flags


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9735.

avatar andrepereiradasilva
andrepereiradasilva - comment - 5 Apr 2016

@infograf768 just want to ask a question. Why does Joomla uses chosen instead of select2.

i think select2 does everything chosen does and, among many other improvements, allows to add image (flags), It would be perfect for this case (also other select boxes that uses languages).

More info https://select2.github.io/examples.html#templating

avatar andrepereiradasilva andrepereiradasilva - test_item - 5 Apr 2016 - Tested successfully
avatar andrepereiradasilva
andrepereiradasilva - comment - 5 Apr 2016

I have tested this item :white_check_mark: successfully on d8bdf8b

works as described.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9735.

avatar brianteeman brianteeman - change - 5 Apr 2016
Status Pending Ready to Commit
avatar brianteeman
brianteeman - comment - 5 Apr 2016

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9735.

avatar joomla-cms-bot joomla-cms-bot - change - 5 Apr 2016
Labels Added: ?
avatar brianteeman brianteeman - change - 5 Apr 2016
Milestone Added:
avatar infograf768
infograf768 - comment - 5 Apr 2016

@andrepereiradasilva

just want to ask a question. Why does Joomla uses chosen instead of select2.

Don't ask me... :smiley:
Select2 is MIT license, so I guess we could use it indeed. It would have to ship with core. Not sure this can be done in the 3.x series.

There are ways to include images in dropdown btw, see my patch using chosen.
#9095

The problem in this menuitem field is the use of JHtml::_('select.option', etc.
I could not find a way to tweek it to get images.

I can get the right image fine with

                    // Create a new query object.
                    if ($link->language !== '*')
                    {
                        $db = JFactory::getDbo();
                        $query = $db->getQuery(true)
                            ->select($db->quoteName('image'))
                            ->where($db->quoteName('lang_code') . '=' . $db->quote($link->language))
                            ->from($db->quoteName('#__languages'));

                        $db->setQuery($query);
                        $image = $db->loadResult();
                    }

Then I tried using:

$lang = '<span>' . JHtml::_('image', 'mod_languages/' . $image . '.gif', $link->language, array('title' => $image),  true). '</span>';

but it would not show using

                    $groups[$menu->menutype][] = JHtml::_('select.option',
                                        $link->value, $levelPrefix . $link->text . $lang,
                                        'value',
                                        'text',
                                        in_array($link->type, $this->disable)
                                    );

Maybe you have an idea?
If not, let's make this RTC as it is better than nothing.

avatar andrepereiradasilva
andrepereiradasilva - comment - 5 Apr 2016

IMO this stays RTC. But we should investigate the flags in the select boxes question further for future.
It would be a nice usability improvement.

avatar brianteeman
brianteeman - comment - 5 Apr 2016

I set it RTC while you were typing ;)

On 5 April 2016 at 11:08, andrepereiradasilva notifications@github.com
wrote:

IMO this stays RTC. But we should investigate the flags in the select
boxes question further for future.
It would be a nice usability improvement.


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#9735 (comment)

Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/

avatar andrepereiradasilva
andrepereiradasilva - comment - 5 Apr 2016

at 97 pending RTC :bell:

avatar brianteeman
brianteeman - comment - 5 Apr 2016

As soon as 351 is released they will be merged ;)

avatar infograf768
infograf768 - comment - 5 Apr 2016

BTW, I am now preparing a similar PR for the category field.

avatar infograf768 infograf768 - change - 5 Apr 2016
Category Modules Multilanguage Multilanguage
avatar Devportobello
Devportobello - comment - 6 Apr 2016

Sound like #7905 will close so.
Just want to point out why not check if multi language enabled JLanguageMultilang::isEnabled()

avatar infograf768
infograf768 - comment - 6 Apr 2016

@Devportobello
One can start creating content languages and assigning languages to items (including menu items) before even enabling the language filter plugin.

avatar rdeutz rdeutz - reference | 456b66e - 12 Apr 16
avatar rdeutz rdeutz - merge - 12 Apr 2016
avatar rdeutz rdeutz - close - 12 Apr 2016
avatar rdeutz rdeutz - change - 12 Apr 2016
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2016-04-12 20:25:57
Closed_By rdeutz
avatar rdeutz rdeutz - close - 12 Apr 2016
avatar rdeutz rdeutz - merge - 12 Apr 2016
avatar joomla-cms-bot joomla-cms-bot - close - 12 Apr 2016
avatar joomla-cms-bot joomla-cms-bot - change - 12 Apr 2016
Labels Removed: ?
avatar infograf768 infograf768 - head_ref_deleted - 17 Apr 2016
avatar rdeutz rdeutz - change - 1 May 2016
Milestone Removed:
avatar rdeutz rdeutz - change - 1 May 2016
Milestone Added:
avatar rdeutz rdeutz - change - 1 May 2016
Milestone Added:
avatar rdeutz rdeutz - change - 1 May 2016
Milestone Removed:

Add a Comment

Login with GitHub to post a comment