1
0
mirror of https://github.com/e107inc/e107.git synced 2025-04-19 20:21:51 +02:00

Behaviors for .e-hideme and .e-expandit elements.

This commit is contained in:
lonalore 2017-07-21 09:17:36 +02:00
parent 5b87c9f9e2
commit 1e3d8d4621

View File

@ -315,6 +315,36 @@ var e107 = e107 || {'settings': {}, 'behaviors': {}};
}
};
/**
* Behavior to hide elements.
*
* @type {{attach: e107.behaviors.eHideMe.attach}}
*/
e107.behaviors.eHideMe = {
attach: function (context, settings)
{
$(context).find('.e-hideme').once('e-hide-me').each(function ()
{
$(this).hide();
});
}
};
/**
* Behavior to show elements.
*
* @type {{attach: e107.behaviors.eExpandIt.attach}}
*/
e107.behaviors.eExpandIt = {
attach: function (context, settings)
{
$(context).find('.e-expandit').once('e-expand-it').each(function ()
{
$(this).show();
});
}
};
/**
* Check if the selector is valid.
*
@ -715,12 +745,6 @@ $.ajaxSetup({
$(document).ready(function()
{
$(".e-hideme").hide();
$(".e-expandit").show();
// $(".e-spinner").spinner(); //FIXME breaks tooltips
//check all
$("#check-all").click(function(event){
var val = $(this).val(), selector = '.field-spacer';