-
Notifications
You must be signed in to change notification settings - Fork 359
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
Form attribute support #802
Conversation
@@ -1,25 +1,25 @@ | |||
<? if((isset($this->showBulkOptions) && $this->showBulkOptions) | |||
|| (isset($this->showCartControls) && $this->showCartControls)): ?> | |||
<div class="bulkActionButtons hidden-print"> | |||
<div class="bulkActionButtons hidden-print<?if($this->idPrefix):?> form-inline<? endif; ?>"> |
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.
Do you think it might make more sense to include a separate attribute for form name, rather than checking idPrefix? We can rely on idPrefix based on current usage, but it's not really an intuitively logical trigger for form attribute functionality.
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.
Looks like you've changed most of the new idPrefix checks to formAttr checks, except for the one right above these comments. Is that intentional or a typo?
I can't seem to add items to my cart in Firefox 49 when using this branch. |
This branch needs the love of the cart fixes. |
Conflicts: themes/bootstrap3/js/cart.js
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.
Thanks!
We have a new version of solrmarc being added here. Is that a GitHub weirdness or is that from a merge from master? |
That's valid -- it was recently updated to fix a bug. |
Conflicts: themes/bootstrap3/js/cart.js themes/bootstrap3/js/hold.js
@crhallberg, this branch seems to have developed a conflict with master. Could you sort that out when you have a chance? Once it's up to date, I'll give it another round of testing. Thanks! |
Conflicts: themes/bootstrap3/templates/search/results.phtml
@@ -278,7 +278,10 @@ VuFind.register('lightbox', function Lightbox() { | |||
data: data | |||
}).done(function recaptchaReset() { | |||
if (typeof grecaptcha !== 'undefined') { | |||
grecaptcha.reset($(form).find('.g-recaptcha').data('captchaId')); | |||
var captcha = $(form).find('.g-recaptcha'); |
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.
This captcha-related change appears to pop up several times in this PR. Is this related to the form change, or is this an unrelated improvement? Do we perhaps want a resetReCaptcha(form)
function in common.js so we don't have to repeat the same four lines of code multiple times, or is that overkill?
@@ -15,6 +15,7 @@ | |||
'vendor/bootstrap.min.js', | |||
'vendor/bootstrap-accessibility.min.js', | |||
'vendor/validator.min.js', | |||
'vendor/form-attr-polyfill.js', // input[form] polyfill, cannot load conditionally, since we need all versions of IE |
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.
Does this really belong in the vendor directory if you wrote it? At very least, should it get its own repo somewhere in addition to being dropped here?
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.
I did not write it, I found it online and updated it. I think maybe we need a new folder for the elements that stand alone, but are custom to VuFind. They exist between vendor and regular scripting. Like autocomplete and the new channels slider.
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.
Might "lib" be an appropriate directory name for this sort of thing?
Note: Changing the line your comment was on removed your comment. |
Changes requested have been addressed.
Conflicts: themes/bootstrap3/js/record.js themes/bootstrap3/theme.config.php
@crhallberg, where are we on this one? A couple of questions that stand out from a quick review: 1.) I notice that you adjusted _registerUpdate() to have a hard-coded form retrieval inside it, rather than accepting a form as a parameter. Does this reduce any important flexibility? 2.) There's some discussion above about the location of form-attr-polyfill.js, since right now it's not technically a vendor file, since it only exists in its current form as part of VuFind. Do we need to continue that conversation? |
1.) I don't expect this will be any less flexible, but I can add a form option back in for devs who want to bind cart submission to another form. |
Found a few IE bugs. Working on them. See checkboxes in description. |
- Remove previously added fields for multiple form submissions. - Removed extraneous jQuery plugin appendFields. - Faster in IE.
Can anyone confirm or explain why IE would be taking so long to get to the Print interface?
It's slow on both master and this branch, taking up to 10 seconds on my machine. |
Have you tried replacing the actual print operation with some arbitrary task, like an alert? I'd be interested to know whether the slowness was specifically related to IE's print functionality (in which case, there's not much we can do about it), or if the problem is happening somewhere leading up to that point. |
It's using the same form and method as email and export, this leads me to think it is the print process specifically. Also, this is happening in master as well. |
I did just replace the print with an alert and it was immediate, no pause at all. The delay today isn't as bad, which is also why I was looking for confirmation. |
Add support for the
form="id"
attribute on input elements. This new feature is then applied to remove the hack that allowed us to use forms within forms for embedded records.Unfortunately, IE removed support from conditional loading after IE 9. This means we need to load the polyfill for all browsers and skip the logic addition for those that support it. The asset pipeline makes this negligible for production performance.
IDs or classes (discussion at VuFind)in the wrong PR