User tests: Successful: Unsuccessful:
Same as #4513 and #4514 but for content history
Content history is currently using mootools modal.
Without affecting in anyway the logic of the field we can use jQuery and bootstrap.
B/C
Should be 100% compatible
Testing:
Go to administrator -> Banners -> create a new banner
change the alternative text and save it again
repeat the last part for few more times
press the versions button
Everything should be ok
Labels |
Added:
?
|
Why:
- JHtml::_('behavior.modal', 'a.modal_jform_contenthistory');
-
+ JHtml::_('bootstrap.modal');
+
+ $lang = JFactory::getLanguage();
+ $extension = 'com_contenthistory';
+ $base_dir = JFactory::getApplication()->isAdmin() ? JPATH_ADMINISTRATOR : JPATH_SITE;
+ $language_tag = $lang->getName();
+ $reload = true;
+ $lang->load($extension, $base_dir, $language_tag, $reload);
which is anyway wrong as you should use $lang->getTag();
instead of $lang->getName();
Category | ⇒ | Templates (admin) UI/UX |
Hmm, found out that we indeed have to reload language to get the modal title translated.
Not sure we need to check the $app and else as anyway the language file is only in admin
so we only need:
$lang = JFactory::getLanguage();
$lang->load('com_contenthistory', JPATH_ADMINISTRATOR, $lang->getTag(), true);
@dgt41 I am not guru, and for me jQuery("#userModal").modal("hide”);
is good
another notice:
you use JHtmlBootstrap::renderModal
but better do it in Joomla! way JHtml::_('bootstrap.renderModal', $selector, $params , $footer)
example your:
JHtmlBootstrap::renderModal('versionsModal', array( 'url' => $link, 'title' => $label ,'height' => '600px', 'width' => '800px'), '');
will become:
JHtml::_('bootstrap.renderModal', 'versionsModal', array( 'url' => $link, 'title' => $label ,'height' => '600px', 'width' => '800px'));
Labels |
Added:
?
|
@test
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/4561.
@tested Succesfully
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/4561.
moving to RTC as we have more that 2 successful tests
Status | Pending | ⇒ | Ready to Commit |
moving to RTC as we have more than 2 successful tests
The PRs regarding Media Field, User Field and Content History are also used in the front end. That might break the rendered design IF THE TEMPLATE is not BOOTSTRAP compatible. (the old modal uses it’s own css file). I wrote it!
Status | Ready to Commit | ⇒ | Needs Review |
For B/C I reverted the option to use the mootools modal in front end. Lets NOT break every site out there.
Please test again
Status | Needs Review | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2014-10-19 16:04:56 |
Proposed title: