Commit 040ee42c authored by Rene AJM Veerman's avatar Rene AJM Veerman

bugfixes

parent 9883ab14
......@@ -277,7 +277,7 @@ sa.siteManager.ui.tree = sa.sm.ui.t = sa.tree = sa.t = {
switchView : function (node, view, event) {
debugger;
if (!event) {
if (!event || event.srcElement /* true html mouse event, not triggered from code with jquery */) {
switch (view) {
case 'all' :
sa.data_models.saMediaAlbum.html.albumView (
......
......@@ -63,8 +63,8 @@ sa.siteManager = sa.sm = {
}, function() {
jQuery(this).parents('td:first').children('img').not('.siteManagerButton').not('.siteManagerButton__onoffIndicator').fadeOut (sa.sm.ui.globals.fadeSpeed, function () {jQuery(this).remove();});
});
jQuery('.siteManagerButton__onoff').click (function() {
sa.siteManager.ui.clickSiteManagerButtonOnOff (this);
jQuery('.siteManagerButton__onoff').click (function(evt) {
sa.siteManager.ui.clickSiteManagerButtonOnOff (this, evt);
});
});
} else {
......@@ -80,30 +80,37 @@ sa.siteManager = sa.sm = {
}
},
clickSiteManagerButtonOnOff : function (btn) {
if (jQuery(btn).is('.siteManagerButton__onoffIndicator')) {
jQuery('.siteManagerButton__hoverIndicator, .siteManagerButton__onoffIndicator').fadeOut('fast',function () {
jQuery(this).remove;
});
} else {
jQuery('.siteManagerButton__hoverIndicator').fadeOut('fast',function () {
jQuery(this).remove;
});
};
var img = jQuery(btn).parents('td:first').children('img:first');
clickSiteManagerButtonOnOff : function (btn, event) {
if (!event || event.srcElement /* true html mouse event, not triggered from code with jquery */) {
debugger;
if (jQuery(btn).hasClass('siteManagerButton__onoff')) {
jQuery('.siteManagerButton__hoverIndicator, .siteManagerButton__onoffIndicator').fadeOut('fast',function () {
jQuery(this).remove;
});
} else {
jQuery('.siteManagerButton__hoverIndicator').fadeOut('fast',function () {
jQuery(this).remove;
});
};
jQuery(btn).parents('td:first').prepend (
'<img class="siteManagerButton__onoffIndicator" style="position:absolute;display:none;z-index:-1;"/>'
).children('img:first').css({
//width : 'inherit',
//height : 'inherit'
}).fadeIn(sa.sm.ui.globals.fadeSpeed).each (function (idx,el) {
jQuery(el).css ({
marginLeft : -1 * (Math.round((jQuery(el).width())/2)),
marginTop : -1 * (Math.round((jQuery(el).height())/2))
});
});
//setTimeout (function() {
var img = jQuery(btn).parents('td:first').children('img:first');
jQuery(btn).parents('td:first').prepend (
'<img class="siteManagerButton__onoffIndicator" style="position:absolute;display:none;z-index:-1;"/>'
).children('img:first').css({
//width : 'inherit',
//height : 'inherit'
}).fadeIn(sa.sm.ui.globals.fadeSpeed).each (function (idx,el) {
jQuery(el).css ({
marginLeft : -1 * (Math.round((jQuery(el).width())/2)),
marginTop : -1 * (Math.round((jQuery(el).height())/2))
});
});
//}, 700);
jQuery(btn).trigger('click');
}
},
resize : function () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment