- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 3.7k
Fix Finder javascript error #5099
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
Conversation
| This thing that Jissues constantly changes the description of the PR is totally annoying. Anyhow, there is one more thing with this PR: 
 | 
| @test. Failed. First box is missing or hidden. Other boxes (which are supposed to be hidden initially, then slide out when selected from the first box) are shown. | 
| @chrisdavenport The change of behavior was intended, please read my comment above. | 
| @DGT41 Sorry, I thought you were describing how it was failing, not how you were changing its behaviour! My bad. Okay, functionally it seems to work, but there do seem to be display issues. When I first go in to create a new filter, all the boxes are displayed vertically without borders, but when I save a new filter then go back in to edit it, the boxes are displayed in rows of 2 and the last box has a right border and a horizontal scroll-bar. Can you make it look a bit prettier? Maybe just use more of the available screen space and restore the box borders? Tested in Firefox and Chrome on Ubuntu 14.04. | 
| @chrisdavenport No prob. I think it is waste of time to try to correct this outdated code, thus I propose to move it altogether to jquery. Anyway I comment out some more lines in the script and placed a border around every filter box. Here is a quick render: | 
| @test Fixes the issue. Thanks. A PR for moving to jQuery would be welcome. However, the priority right now is to get the current code to work properly since this bug is a release blocker for 3.4. | 
| @chrisdavenport I know this is a dirty quick patch, but it might be helpful! | 
| I know this is more of house keeping than anything else - but if we comment lines of code out - shouldn't these lines not be included in the PR? It will be there historically in the GIT repo. Just a suggestion. | 
| @chrisdavenport @spignataro OK I think this one is a better solution, as it restores the previous functionality! | 
| The "Select All" checkbox doesn't work. Hmm. I agree that the slide effect is not really good and we should just drop it. It causes problems and you've proved that it isn't really required. I also suspect that it would not work well for RTL languages. It's also less JavaScript to maintain (and convert to jQuery) if we just get rid of it. | 
| @chrisdavenport It’s your decision what will make it to Joomla. Picking the first two commits, you’ll get the plain boxes, applying all 3 you'll get the slide effect as well... | 
| Not just my decision. Personally, I'd go with just the plain boxes. | 
| @DGT41 Since no-one else has commented to the contrary, I'm going to make the decision and say we should go with the plain boxes and forget the slide effect. Can you adjust the PR to reflect that? | 
| @chrisdavenport Chris I did the changes here, also as you can see I also changed the way that slider finder.js is injected in order to make sure that  | 
| @DGT41 There is a new problem with this PR: 
 | 
| @chrisdavenport Confirmed. The problem for this instance is that there is no client side validation on the title, so data is sent to server -> will not validate thus not saved -> form will reload with empty (not selected) fields. Also changing line 12 @  JHtml::_('behavior.formvalidation');which was the prior code here gives the same result, thus this is not a new problem. Anyways I am gonna try to find a way around it... | 
| @chrisdavenport Done! Client side validation is activated | 
| @DGT41: try my solution (also not inline...): it is Cascading Style Sheets... | 
| @smanzi we are on the same page here | 
| @DGT41 no prob: last attribute declared takes precedence if understood... | 
| I still can't test with IE8, but it seems that the info that overflow-x and overflow-y are not supported by IE8 is false. Anyway at http://reference.sitepoint.com/css/overflow we have: 
 | 
| and at http://www.w3schools.com/jsref/prop_style_overflowx.asp 
 | 
| From Microsoft: http://msdn.microsoft.com/en-us/library/ie/ms530826%28v=vs.85%29.aspx 
 | 
| @infograf768 my reading is that you can use both: either -ms-overflow-x or overflow-x... correct? | 
| Mine is that we should be careful and do as was proposed above. AND test in IE8.  | 
| test... for sure! 😄 Damn, do I have to install a Windows XP VM?? | 
| @infograf768 This works fine here  | 
| Could someone look at making finder rtl aware? For example here in the case of .checklist, we would need a  | 
| Should be possible. That was one reason I favoured dropping the sliders. Needs a front-ender to look into it. I suggest opening a separate issue. | 
| @infograf768 @chrisdavenport is this acceptable: if (JFactory::getDocument()->direction == 'rtl')
{
    JFactory::getDocument()->addStyleDeclaration('
.checklist, .checklist dd, #branch-selectors dd, .checklist div.control-group, #branch-selectors div.control-group { text-align: right; }
dl.checklist.dt.label.checkbox { text-align: center; }
.radio input[type="radio"], .checkbox input[type="checkbox"] { float: left; margin-right: 5px; left: 5px;}
');
} | 
| Personnaly, I prefer full stylesheet as it is easy to correct/add  | 
| @infograf768 Just added rtl support per your request | 
| There are 2 places in that file where the rtl.css has to be added (see above) | 
| My thought was that this js was only used in here, maybe I am wrong... | 
| For me, its fine now. One more tester. | 
| @test works for me! | 
| Fixed with 6fb8834 | 




Fixes an error on Admin side for Finder #5018
Bug report here
Test instructions
Ensure you have content (ideally sample data)
Check your browsers console for js error
Re check your browser
Check functionality
Side note
Finder is totally dependent on mootools and this has to change somehow...