Fix infieldLabels on new aspect box
This commit is contained in:
parent
48cfa49582
commit
75d514c448
3 changed files with 16 additions and 12 deletions
|
|
@ -11,7 +11,6 @@ javascripts:
|
|||
- public/javascripts/vendor/jquery152.min.js
|
||||
main:
|
||||
- public/javascripts/rails.js
|
||||
- public/javascripts/vendor/jquery.infieldlabel.js
|
||||
- public/javascripts/vendor/jquery.tipsy.js
|
||||
- public/javascripts/vendor/jquery.hotkeys.js
|
||||
- public/javascripts/vendor/jquery.autoresize.min.js
|
||||
|
|
@ -22,6 +21,7 @@ javascripts:
|
|||
- public/javascripts/vendor/Mustache.js
|
||||
- public/javascripts/vendor/charCount.js
|
||||
- public/javascripts/jquery.autocomplete-custom.js
|
||||
- public/javascripts/jquery.infieldlabel-custom.js
|
||||
- public/javascripts/fileuploader-custom.js
|
||||
- public/javascripts/keycodes.js
|
||||
- public/javascripts/diaspora.js
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
// To avoid scope issues, use 'base' instead of 'this'
|
||||
// to reference this class from internal events and functions.
|
||||
var base = this;
|
||||
|
||||
|
||||
// Access to jQuery and DOM versions of each element
|
||||
base.$label = $(label);
|
||||
base.label = label;
|
||||
|
|
@ -98,7 +98,7 @@
|
|||
(e.keyCode === 16) || // Skip Shift
|
||||
(e.keyCode === 9) // Skip Tab
|
||||
) {
|
||||
return;
|
||||
return;
|
||||
}
|
||||
|
||||
if (base.showing) {
|
||||
|
|
@ -134,19 +134,19 @@
|
|||
// This fucking for_attr thing is some seriously dumb shit.
|
||||
//
|
||||
// It must be dealt with
|
||||
$field = $(
|
||||
"input#" + for_attr + "[type='text']," +
|
||||
"input#" + for_attr + "[type='search']," +
|
||||
"input#" + for_attr + "[type='tel']," +
|
||||
"input#" + for_attr + "[type='url']," +
|
||||
"input#" + for_attr + "[type='email']," +
|
||||
"input#" + for_attr + "[type='password']," +
|
||||
$field = $(this).siblings(
|
||||
"input#" + for_attr + "[type='text']," +
|
||||
"input#" + for_attr + "[type='search']," +
|
||||
"input#" + for_attr + "[type='tel']," +
|
||||
"input#" + for_attr + "[type='url']," +
|
||||
"input#" + for_attr + "[type='email']," +
|
||||
"input#" + for_attr + "[type='password']," +
|
||||
"textarea#" + for_attr
|
||||
);
|
||||
|
||||
if ($field.length === 0) {
|
||||
return; // Again, nothing to attach
|
||||
}
|
||||
}
|
||||
|
||||
// Only create object for input[text], input[password], or textarea
|
||||
(new $.InFieldLabels(this, $field[0], options));
|
||||
|
|
@ -15,6 +15,10 @@ var View = {
|
|||
|
||||
/* In field labels */
|
||||
$("label").inFieldLabels();
|
||||
$(document).bind('afterReveal.facebox', function() {
|
||||
jQuery("#facebox label").inFieldLabels();
|
||||
});
|
||||
|
||||
|
||||
/* Showing debug messages */
|
||||
$(this.debug.selector)
|
||||
|
|
@ -66,7 +70,7 @@ var View = {
|
|||
$("#notification").delegate('.hard_object_link', 'click', function(evt){
|
||||
var post = $("*[data-guid='"+ $(this).attr('data-ref') +"']"),
|
||||
lastComment = post.find('.comment.posted').last();
|
||||
|
||||
|
||||
if(post.length > 0){
|
||||
evt.preventDefault();
|
||||
$('html, body').animate({scrollTop: parseInt(lastComment.offset().top)-80 }, 'fast');
|
||||
|
|
|
|||
Loading…
Reference in a new issue