? ? Success

User tests: Successful: Unsuccessful:

avatar n9iels
n9iels
24 Aug 2015

I made this addition as requested by @mbabker in #7750

This PR conatin

  • JHtml bootstrap sliders and tabs
  • JLayout implementation for the navigation
  • Code style / code cleaning
  • Rename the old Mootools tabs to Mootools tabs and Mootools slider. The new tabs made with Bootstrap have the name Tabs and Sliders

Test instructions

  1. Apply the patch, and confirm that all parameters are working like they used to do. (Please notice the "Presentation Style" parameter values Tabs and Sliders are the new Bootstrap Tabs).

Notes

I'm not sure if this plugin is allready correct and does what it has to do, also I'm not a pro developer. I simply made addition to the old plugin. So please comment on my code, give me hints and tips and tell me if I'm on the good why or not ?

Votes

# of Users Experiencing Issue
0/1
Average Importance Score
3.00

avatar n9iels n9iels - open - 24 Aug 2015
avatar n9iels n9iels - change - 24 Aug 2015
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 24 Aug 2015
Labels Added: ?
avatar n9iels n9iels - change - 24 Aug 2015
The description was changed
avatar zero-24 zero-24 - change - 24 Aug 2015
Status New Pending
avatar zero-24 zero-24 - change - 24 Aug 2015
Category Plugins
avatar mbabker
mbabker - comment - 24 Aug 2015

At a quick glance it looks like a good start.

So there's two options going forward. Option 1 like I originally thought of is a totally new plugin with just the Bootstrap styling options and the pages option. Option 2 is to add two new styles to the existing plugin, 'Bootstrap Sliders' and 'Bootstrap Tabs', and everything can be supported in one plugin. Either way, the existing sliders and tabs style options need to be preserved in a B/C manner because changing from the JHtml helpers producing the MooTools based content for those to the Bootstrap versions will cause layout breaks in sites. Option 2 is probably a cleaner choice.

avatar n9iels
n9iels - comment - 24 Aug 2015

I also think the second option is the best. I will add them to this PR

avatar joomla-cms-bot joomla-cms-bot - change - 24 Aug 2015
Labels Added: ?
avatar n9iels
n9iels - comment - 24 Aug 2015

I re-add the Mootools tabs & slider option, and make new select option for the XML file. Also fix a little bug in the Table of Content custum heading.

avatar N6REJ
N6REJ - comment - 24 Aug 2015

why can't there be dual class's? for example for bootstrap 2 & 3
compatibility you could have span2 col-md-2
With our current frontend being BS2 and HOPEFULLY soon bs3 or bs4
wouldn't it make sense to stick with BS? Everyone has had plenty of
warning to get away from mootools
Bear
On 8/24/2015 08:17, Michael Babker wrote:

At a quick glance it looks like a good start.

So there's two options going forward. Option 1 like I originally
thought of is a totally new plugin with just the Bootstrap styling
options and the pages option. Option 2 is to add two new styles to the
existing plugin, 'Bootstrap Sliders' and 'Bootstrap Tabs', and
everything can be supported in one plugin. Either way, the existing
sliders and tabs style options need to be preserved in a B/C manner
because changing from the JHtml helpers producing the MooTools based
content for those to the Bootstrap versions will cause layout breaks
in sites. Option 2 is probably a cleaner choice.


Reply to this email directly or view it on GitHub
#7760 (comment).

avatar mbabker
mbabker - comment - 24 Aug 2015

Splitting things into layouts makes it possible to override the HTML without hacking the plugin. So it's less of an issue to have BS2 and BS3+ syntax in this location. There are some places with non-overridable markup I'd agree with you on that though, and one was merged recently (the debug plugin).

avatar n9iels
n9iels - comment - 24 Aug 2015

offtopic of this plugn:
@N6REJ I think in the feature using one framework in Joomla! isn't the best idea. In my opinium it is better to write a own Joomla! CSS framework, that can be loaded next to another framework like Bootstrap or Zurb. With someting like that, you can use every framework you want, without conflicts and backward compability problems.

avatar dgt41 dgt41 - test_item - 5 Nov 2015 - Tested successfully
avatar dgt41
dgt41 - comment - 5 Nov 2015

I have tested this item :white_check_mark: successfully on a4f1e19


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

avatar schnuti
schnuti - comment - 5 Nov 2015

:white_check_mark: I have tested this item successfully

I propose a change of the option names. The JLayouts my be overridden using other frameworks than Bootstrap. ie the new options should not refer to it. I have no nice name at hand though.
'Tabs new style' and 'Sliders new style' ?

There is still a problem with the old sliders. They do not work. This is not a stop for this PR! as it presents a working alternative.

avatar waader waader - test_item - 5 Nov 2015 - Tested successfully
avatar waader
waader - comment - 5 Nov 2015

I have tested this item :white_check_mark: successfully on a4f1e19

Thanks @niels! I have tested with current Chrome, FF, IE and IE8.

@Schnuti: what operating system and browser do you use?


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

avatar schnuti
schnuti - comment - 5 Nov 2015

@waader: I tested localy XAMPP, Win 10 and Firefox

avatar waader
waader - comment - 5 Nov 2015

As I totally refuse Win10. Do you experience the same probleme on Win7/8 and FF respectively do you have the possibility to test this combination?

avatar schnuti
schnuti - comment - 5 Nov 2015

@waader Do you mean test the old sliders?

I have to withdraw my statement that it's not working. I hope I was right about it before this PR.
I now also tested wih the new MS Edge browser.
I presumably didn't click on the slider names now. It is confusing that slide-1 (page 2) is opend when you open the article page. ie the first page should be very short when using sliders.
It's the same with tabs. I never tested tabs and sliders before #8279

To me it would be better to include page 1 in a first opened slider/tag but that's another issue.


Win 10 is not much worse than Win7. I've removed most of the new 'features' and for sure am not using any spying apps. My netbook with win7 gave up some time ago. I still didn't decide how to replace it.

avatar n9iels
n9iels - comment - 5 Nov 2015

The sliders are working correct for me on all browsers (I mean, they slide, hide content and make it visible when I click on it). But it is true that a bootstrap slider is not open by default, and for the mootools slider (slide old style) the first slider is always open by default.

Not sure if that is something in this PR or the old slider API. I have to check that later. Then I will try to make it general for both sliders

avatar schnuti
schnuti - comment - 5 Nov 2015

@n9iels
the default opened sliders/tabs are in the old api and should probably not be changed. Who knows who depend on it?
But give a thougt to the naming of the options. Not Bootstrap?

avatar n9iels
n9iels - comment - 5 Nov 2015

I think I solve the merge conflict now.

@schnuti Good point about the name, it may be a good option.
If the sliders should open by default is something what can be discussed in a PR or Issue. If it is a simple change and you can do it, make a PR and we can discuss over there if it is a good idea or not.

avatar schnuti
schnuti - comment - 5 Nov 2015

@n9iels
You misunderstood. Please do not change the closed tabs/sliders for the new options. I meant that maybe it's better to keep the old behavior for the old options.

avatar n9iels
n9iels - comment - 5 Nov 2015

Ah, that way, I won't :wink:

avatar infograf768
infograf768 - comment - 6 Nov 2015

Please re-order this string:

PLG_CONTENT_PAGEBREAK_SITE_TITLE_LABEL="Show Site Title"
-PLG_CONTENT_PAGEBREAK_SLIDERS="Sliders"
 PLG_CONTENT_PAGEBREAK_STYLE_DESC="Choose whether to layout the article with separate pages, tabs or sliders."
 PLG_CONTENT_PAGEBREAK_STYLE_LABEL="Presentation Style"
+PLG_CONTENT_PAGEBREAK_SLIDERS="Sliders"
avatar n9iels
n9iels - comment - 6 Nov 2015

Sorry for the double commit.
@infograf768 I alpha sort the whole language file now

avatar n9iels n9iels - reference | 6e4d8ff - 6 Nov 15
avatar n9iels
n9iels - comment - 6 Nov 2015

I change the name of the old sliders and tabs to "Mootools slider" and "Mootools Tabs". The value of that option stays the same, so there is no BC problem.

Also, I add two new JLayout files for the New Tabs and New Sliders. So they can be overridden.

avatar schnuti
schnuti - comment - 6 Nov 2015

:white_check_mark: I tested to override navigation and toc succsessfully.

:small_red_triangle_down: BUG: If no title is set to the pagebreak - line 133

if ($attrs['title'])

fails. Parameter = Page! ie not Sliders/Tabs

I'm not sure if a default should be added to the page title. Probably yes.

This works for me

$attrs = JUtility::parseAttributes($matches[$page - 1][1]);
if (isset($attrs['title']))
{
   $row->page_title = $attrs['title'];
}
else
{
   $row->page_title = JText::sprintf('PLG_CONTENT_PAGEBREAK_PAGE_NUM', $page + 1);
}

Edit: My linenumbers are not the same as the original. Now fixed!

avatar schnuti
schnuti - comment - 6 Nov 2015

@n9iels
I think you have missunderstood JLayout a bit. What you added is "layouts" in the tmpl folder. Those can be overridden. JLayouts are reusable and for Joomla stored in path layouts/

It is correct that you now can override to eg choose another JLayout.
JHtml::_('bootstrap. - is partly (for tabs) using JLayout from layouts/libraries/cms/html/bootstrap.
A new project could be to add sliders to this path, if not allready in work.

:heavy_plus_sign: What you added is though very very usefull!

It's hard to get all those levels, but as I understand, it's the way to a less Bootstrap 2 lock in.

avatar n9iels
n9iels - comment - 6 Nov 2015

@schnuti You mean I should add the layout folder off the plugin to the root/layout folder? Now you note that it make sense indeed. Overriding these layout now via a template is quite difficult. Is that what you mean?

And that is true, and exactly what I want :). The idea is we can easy override these JLayout and use Bootstrap 3 code instead of JHtml Bootstrap.

About that little bug, confirmed. Good solution, I will implement that for the next commit.

avatar schnuti
schnuti - comment - 6 Nov 2015

@n9iels No, I think you have gone as far as possible right now. The rest has to find a common Joomla way. You can now override the JLayout files for the Bootstrap tabs. Those overrides are system relevant. You can also add other javascripts to your template to override the 'common' Bootstrap js.
ie your tabs would probably work with Bootstrap 3 and 4 if you add this code to your template.

But I think the navigation could be converted to a JLayout. ie the navigation.php calling a JLayout. If someone wants a special output for the article paging they can still override navigation.php otherwise a common JLayout is used. I don't know, if there is one allready. Will have a look.

I found a few Bootstrap 2 classes in tabelofcontent.php. It could be overridden or use two new parameters.
with default "pull-right" for the div wrapper
and "nav nav-tabs nav-stacked" for the ul class.
That is my proposal.

avatar schnuti
schnuti - comment - 6 Nov 2015

@n9iels :smirk: You promised not to change the closed tabs. You did!
newtabs.php line 13

$t[] = JHtml::_('bootstrap.startTabSet', 'pageBreak', array('active' => 'article-1'));

Please remove article-1

$t[] = JHtml::_('bootstrap.startTabSet', 'pageBreak', array('active' => ''));

The sliders are closed!

avatar n9iels
n9iels - comment - 6 Nov 2015

Woops. But, for the old tabs the first tab is always open... Maybe for consistency it is better to do the same for the Bootstrap Tabs?

I moved the navigation to JLayout so it can be overridden. For that two bootstrap 2 classes I don't know a solution at the moment. Convert tableofcontent.php to a JLayout is not a good idea, because it is a complex file with parameters etc.

Convert the bootstrap accordion to a JLayout is also a good idea. Must be possible if I give it a fast look.

avatar n9iels n9iels - change - 6 Nov 2015
The description was changed
avatar joomla-cms-bot
joomla-cms-bot - comment - 6 Nov 2015

This PR has received new commits.

CC: @dgt41, @waader


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

avatar schnuti
schnuti - comment - 6 Nov 2015

Open tabs and sliders would be a no go for me and probably for most users. Two pages directly shown when you open an article? Impossible. The new options can only do it better than the old.

The JLayouts are only for common reusable output. Not for things like tableofcontent.php.
I don't understand why you changed navigation.php to JLayout. What advantage? You only changed path for the override.
It has to be added to layouts/joomla/somewhere to give an advantage.

avatar n9iels
n9iels - comment - 6 Nov 2015

The advantage is that the navigation can be overridden now via a template override: html/layouts/plugins/content/pagebreak/navigation.php. That is in my opinion the best way, so users can easily change it if they like to.

avatar brianteeman brianteeman - change - 27 Apr 2016
Category Plugins Language & Strings Plugins
avatar brianteeman brianteeman - change - 27 Apr 2016
Labels
avatar conconnl
conconnl - comment - 26 Jun 2016

@n9iels is this PR ready for testing?
Can you write a full test scenario with Before patch and after patch?
Then we can let people test it on the next PBF (probably August 20, Eindhoven)


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

avatar n9iels
n9iels - comment - 27 Jun 2016

No this PR isn't ready for testing at all. I don't have time at the moment to make it ready, also the code is not good. So I close this PR, and maybe I make a new one when I have time for it.

If someone else like to do it, no problem at all ?

avatar n9iels n9iels - change - 27 Jun 2016
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2016-06-27 08:40:20
Closed_By n9iels
avatar n9iels n9iels - close - 27 Jun 2016

Add a Comment

Login with GitHub to post a comment