comments + images
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -226,7 +226,44 @@ function setElem(aoAnchor, asPath, oValue)
|
||||
}
|
||||
}
|
||||
|
||||
$.prototype.addIcon = function(sIcon)
|
||||
$.prototype.addIcon = function(sIcon, bMargin)
|
||||
{
|
||||
return $(this).prepend($('<i>', {'class':'fa '+sIcon}));
|
||||
};
|
||||
bMargin = bMargin || false;
|
||||
return $(this).prepend($('<i>', {'class':'fa '+sIcon+(bMargin?' push':'')}));
|
||||
};
|
||||
|
||||
$.prototype.defaultVal = function(sDefaultValue)
|
||||
{
|
||||
$(this)
|
||||
.data('default_value', sDefaultValue)
|
||||
.val(sDefaultValue)
|
||||
.addClass('defaultText')
|
||||
.focus(function()
|
||||
{
|
||||
var $This = $(this);
|
||||
if($This.val() == $This.data('default_value')) $This.val('').removeClass('defaultText');
|
||||
})
|
||||
.blur(function()
|
||||
{
|
||||
var $This = $(this);
|
||||
if($This.val() == '') $This.val($This.data('default_value')).addClass('defaultText');
|
||||
});
|
||||
};
|
||||
|
||||
$.prototype.checkForm = function(sSelector)
|
||||
{
|
||||
sSelector = sSelector || 'input[type="text"], textarea';
|
||||
var $This = $(this);
|
||||
var bOk = true;
|
||||
$This.find(sSelector).each(function()
|
||||
{
|
||||
$This = $(this);
|
||||
bOk = bOk && $This.val()!='' && $This.val()!=$This.data('default_value');
|
||||
});
|
||||
return bOk;
|
||||
};
|
||||
|
||||
$.prototype.cascadingDown = function(sDuration)
|
||||
{
|
||||
return $(this).slideDown(sDuration, function(){$(this).next().cascadingDown(sDuration);});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user