Commit c1824ad5 authored by Rene AJM Veerman's avatar Rene AJM Veerman

bugfixes

parent 479d4879
......@@ -243,30 +243,53 @@ saTree = sa.tree = sa.t = {
setTimeout (function() {
var
s = sa.tree.settings, c = s.current, ref = sa.tree.getRef(), node = ref.get_selected('full',true);
if (node.length>=1) sa.tree.activate_node (node[0]);
if (node.length>=1) sa.tree.activate_node__gotoNewNode (node[0]);
}, 2000);
},
switchView : function (type, node) {
if (type=='saMediaAlbum') {
sa.dataModels.saMediaAlbum.html.albumView (
sa.tree.currentPath (sa.tree.settings.current.node),
function (html) {
html =
// must be all_scrollpane, not all__scrollpane, otherwise the scrollpane won't initialize properly.
'<div id="siteManager__uploader__all__scrollpane" class="vividScrollpane vividTheme__scroll_black" style="width:'+jQuery('#siteManager__uploader_tab').width()+'px;height:'+(jQuery('#siteManager__uploader_tab').height() - jQuery('#siteManager__tr__uploader_header').height())+'px;">'
+html
+'</div>';
switchView : function (node, view) {
debugger;
sa.siteManager.ui.clickSiteManagerButtonOnOff (jQuery('#btnView_'+view)[0]);
jQuery('.siteManager__uploader__tab').css ({display : 'none'});
jQuery('#siteManager__uploader__all__tab').html (html).css({display:'block'});
setTimeout(function () {
sa.vcc.init (jQuery('#siteManager__uploader__all__tab')[0]);
}, 500);
}
);
switch (view) {
case 'all' :
sa.dataModels.saMediaAlbum.html.albumView (
sa.tree.currentPath (sa.tree.settings.current.node),
function (html) {
html =
// must be all_scrollpane, not all__scrollpane, otherwise the scrollpane won't initialize properly.
'<div id="siteManager__uploader__all__scrollpane" class="vividScrollpane vividTheme__scroll_black" style="width:'+jQuery('#siteManager__uploader_tab').width()+'px;height:'+(jQuery('#siteManager__uploader_tab').height() - jQuery('#siteManager__tr__uploader_header').height())+'px;">'
+html
+'</div>';
jQuery('.siteManager__uploader__tab').css ({display : 'none'});
jQuery('#siteManager__uploader__all__tab').html (html).css({display:'block'});
setTimeout(function () {
sa.vcc.init (jQuery('#siteManager__uploader__all__tab')[0]);
}, 500);
}
);
break;
case 'jQueryFileUpload' :
jQuery('.siteManager__uploader__tab').css ({display : 'none'});
jQuery('#siteManager__uploader__jQueryFileUpload__tab').css({display:'block'});
break;
case 'youtube':
jQuery('.siteManager__uploader__tab').css ({display : 'none'});
jQuery('#siteManager__uploader__youtube__tab').css({display:'block'});
break;
case 'iframes':
jQuery('.siteManager__uploader__tab').css ({display : 'none'});
jQuery('#siteManager__uploader__iframes__tab').css({display:'block'});
break;
}
},
save_node : function (node, callback) {
......@@ -369,14 +392,15 @@ saTree = sa.tree = sa.t = {
var node2 = sa.tree.db[i];
var changed = node.state.selected;
delete node.state.selected;
var changed = node2.state.selected;
delete node2.state.selected;
if (node.id === node2.id) {
node.state.selected = true;
node2.state.selected = true;
if (!changed) changed = true;
}
if (changed) {
debugger;
sa.pouchdb[node2.database].get(node2._id).then(function(doc) {
return sa.pouchdb[node2.database].put({
_id : node2._id,
......@@ -526,7 +550,6 @@ saTree = sa.tree = sa.t = {
},
success : function (data, ts, xhr) {
tinymce.get('siteManager__tinymce').setContent (data);//, {format:'bbcode'});
debugger;
for (var idx in sa.tree.db) {
var st = sa.tree.db[idx];
......@@ -535,7 +558,6 @@ saTree = sa.tree = sa.t = {
break;
}
}
}
};
jQuery.ajax(ajaxCommand);
......@@ -578,6 +600,8 @@ saTree = sa.tree = sa.t = {
}
}
sa.tree.switchView (node, 'jQueryFileUpload');
},
100
);
......
......@@ -214,16 +214,16 @@
<table style="width:100%;">
<tr id="siteManager__tr__uploader_header">
<td style="width:50px;display:table-cell;vertical-align:middle;text-align:center" class="siteManagerButton__td">
<img src="/seductiveapps/siteMedia/iconUploaderPhotos.png" class="siteManagerButton siteManagerButton_onoff" style="width:40px;" title="View All" onclick="sa.tree.switchView ('saMediaAlbum', sa.tree.settings.current.node,'viewJQueryFileUpload');"/>
<img id="btnView_jQueryFileUpload" src="/seductiveapps/siteMedia/iconUploaderPhotos.png" class="siteManagerButton siteManagerButton_onoff" style="width:40px;" title="Photo items" onclick="sa.tree.switchView (sa.tree.settings.current.node,'jQueryFileUpload');"/>
</td>
<td style="width:50px;display:table-cell;vertical-align:middle;text-align:center" class="siteManagerButton__td">
<img src="/seductiveapps/siteMedia/iconUploaderYoutube.png" class="siteManagerButton siteManagerButton_onoff" style="width:40px;" title="View All" onclick="sa.tree.switchView ('saMediaAlbum', sa.tree.settings.current.node,'viewYoutube');"/>
<img id="btnView_youtube" src="/seductiveapps/siteMedia/iconUploaderYoutube.png" class="siteManagerButton siteManagerButton_onoff" style="width:40px;" title="Youtube items" onclick="sa.tree.switchView (sa.tree.settings.current.node,'youtube');"/>
</td>
<td style="width:50px;display:table-cell;vertical-align:middle;text-align:center" class="siteManagerButton__td">
<img src="/seductiveapps/siteMedia/iconUploaderIframe.png" class="siteManagerButton siteManagerButton_onoff" style="width:40px;" title="View All" onclick="sa.tree.switchView ('saMediaAlbum', sa.tree.settings.current.node,'viewJQueryFileUpload');"/>
<img id="btnView_iframes" src="/seductiveapps/siteMedia/iconUploaderIframe.png" class="siteManagerButton siteManagerButton_onoff" style="width:40px;" title="iframe (Canvas, WebGL) items" onclick="sa.tree.switchView (sa.tree.settings.current.node,'iframes');"/>
</td>
<td style="width:50px;display:table-cell;vertical-align:middle;text-align:center" class="siteManagerButton__td">
<img src="/seductiveapps/siteMedia/iconUploaderViewAll.png" class="siteManagerButton siteManagerButton_onoff" style="width:40px;" title="View All" onclick="sa.tree.switchView ('saMediaAlbum', sa.tree.settings.current.node, 'viewAll');"/>
<img id="btnView_all" src="/seductiveapps/siteMedia/iconUploaderViewAll.png" class="siteManagerButton siteManagerButton_onoff" style="width:40px;" title="All items" onclick="sa.tree.switchView (sa.tree.settings.current.node, 'all');"/>
</td>
<td style="width:50px;display:table-cell;vertical-align:middle;text-align:center" class="siteManagerButton__td">
<img src="/seductiveapps/siteMedia/iconPublish.png" class="siteManagerButton" style="width:40px;" title="Publish" onclick="sa.tree.currentNode_publish();"/>
......
......@@ -47,43 +47,22 @@ sa.siteManager = sa.sm = {
sa.desktop.systemDialogs.show (null, 'siteManager', null, null, function() {
jQuery('.siteManagerButton').hover(function() {
var isOn = jQuery(this).parents('td:first').children('div.siteManagerButton__onoffIndicator').length > 0;
var
isOn = jQuery(this).parents('td:first').children('div.siteManagerButton__onoffIndicator').length > 0,
img = jQuery(this).parents('td:first').children('img:first');
if (!isOn) jQuery(this).parents('td:first').prepend (
'<div class="siteManagerButton__hoverIndicator" style="position:absolute;display:none;z-index:-1;background-image: url(\'/seductiveapps/siteMedia/backgrounds/tiled/active/blue/blue170.jpg\'); background-size: 209px 181px; background-repeat:repeat;opacity:0.45;border-radius:5px;border:groove 3px rgba(255,255,255,0.7);"></div>'
'<div class="siteManagerButton__hoverIndicator" style="position:absolute;display:none;z-index:-1;margin:5px;background-image: url(\'/seductiveapps/siteMedia/backgrounds/tiled/active/blue/blue170.jpg\'); background-size: 209px 181px; background-repeat:repeat;opacity:0.58;border-radius:5px;noborder:groove 3px rgba(255,255,255,0.7);"></div>'
).children('div:first').css({
marginLeft : Math.round ((jQuery(this).parents('td:first').width() / 2) - (( jQuery(this).parents('td:first').children('img:first').width()+20)/2) ),
marginTop : Math.round ((jQuery(this).parents('td:first').height() / 2) - (( jQuery(this).parents('td:first').children('img:first').height()+20)/2) ),
width : jQuery(this).parents('td:first').children('img:first').width()+10,
height : jQuery(this).parents('td:first').children('img:first').height()+10
marginLeft : img[0].offsetLeft,
marginTop : img[0].offsetTop,
width : img.width(),
height : img.height()
}).fadeIn('normal');
}, function() {
jQuery(this).parents('td:first').children('div').not('.siteManagerButton__onoffIndicator').fadeOut ('normal', function () {jQuery(this).remove();});
});
jQuery('.siteManagerButton_onoff').click (function() {
var btn = this;
setTimeout (function () {
//var isOn = jQuery(btn).parents('td:first').children('div.siteManagerButton__onoffIndicator').length > 0;
//jQuery(btn).parents('td:first').children('div').not('.siteManagerButton__onoffIndicator').fadeOut('fast', function () {
if (jQuery(this).is('.siteManagerButton__onoffIndicator')) {
jQuery('.siteManagerButton__hoverIndicator, .siteManagerButton__onoffIndicator').fadeOut('fast',function () {
jQuery(this).remove;
});
} else {
jQuery('.siteManagerButton__hoverIndicator').fadeOut('fast',function () {
jQuery(this).remove;
});
};
//if (!isOn)
jQuery(btn).parents('td:first').prepend (
'<div class="siteManagerButton__onoffIndicator" style="position:absolute;display:none;z-index:-1;background-image: url(\'/seductiveapps/siteMedia/backgrounds/tiled/active/green/363806708_7d577861f7.jpg\'); background-size: 209px 181px; background-repeat:repeat;opacity:0.7;border-radius:5px;border:groove 3px rgba(100,100,255,0.7);"></div>'
).children('div:first').css({
marginLeft : Math.round ((jQuery(btn).parents('td:first').width() / 2) - (( jQuery(btn).parents('td:first').children('img:first').width()+10)/2) )-5,
marginTop : Math.round ((jQuery(btn).parents('td:first').height() / 2) - (( jQuery(btn).parents('td:first').children('img:first').height()+10)/2) )-5,
width : jQuery(btn).parents('td:first').children('img:first').width()+10,
height : jQuery(btn).parents('td:first').children('img:first').height()+10
}).fadeIn('normal');
}, 300);
sa.siteManager.ui.clickSiteManagerButtonOnOff (this);
});
});
} else {
......@@ -99,6 +78,33 @@ sa.siteManager = sa.sm = {
}
},
clickSiteManagerButtonOnOff : function (btn) {
setTimeout (function () {
//var isOn = jQuery(btn).parents('td:first').children('div.siteManagerButton__onoffIndicator').length > 0;
//jQuery(btn).parents('td:first').children('div').not('.siteManagerButton__onoffIndicator').fadeOut('fast', function () {
if (jQuery(this).is('.siteManagerButton__onoffIndicator')) {
jQuery('.siteManagerButton__hoverIndicator, .siteManagerButton__onoffIndicator').fadeOut('fast',function () {
jQuery(this).remove;
});
} else {
jQuery('.siteManagerButton__hoverIndicator').fadeOut('fast',function () {
jQuery(this).remove;
});
};
//if (!isOn)
var img = jQuery(btn).parents('td:first').children('img:first');
jQuery(btn).parents('td:first').prepend (
'<div class="siteManagerButton__onoffIndicator" style="position:absolute;display:none;margin:5px;z-index:-1;background-image: url(\'/seductiveapps/siteMedia/backgrounds/tiled/active/green/363806708_7d577861f7.jpg\'); background-size: 209px 181px; background-repeat:repeat;opacity:0.7;border-radius:5px;noborder:groove 3px rgba(100,100,255,0.7);"></div>'
).children('div:first').css({
width : img.width(),
height : img.height()
}).fadeIn('normal');
}, 300);
},
resize : function () {
debugger;
var
......@@ -136,15 +142,6 @@ sa.siteManager = sa.sm = {
height : jQuery('#siteManager').height()
});
setTimeout (function () {
jQuery('.siteManager__uploader__tab, #jQueryFileUpload__scrollpane__container, #jQueryFileUpload__scrollpane, #jQueryFileUpload').css({
width : jQuery('#siteManager__uploader_tab').width(),
height : jQuery('#siteManager__uploader_tab').height() - jQuery('#siteManager__tr__uploader_header').height()
});
setTimeout (function () {
sa.sp.containerSizeChanged (jQuery('#jQueryFileUpload__scrollpane')[0], true);
sa.sp.bindEvents(jQuery('#jQueryFileUpload__scrollpane')[0]);
}, 100);
if (sa.m.browserHeight() > 500 && jQuery('#siteMedia__treeview__controls').width()>500) {
jQuery('#siteMedia__treeview__controls').css({
height : 90
......@@ -178,8 +175,19 @@ sa.siteManager = sa.sm = {
zIndex : 21100
});
};
switch (sa.tree.settings.current.view) {
case 'jQueryFileUpload':
jQuery('.siteManager__uploader__tab, #jQueryFileUpload__scrollpane__container, #jQueryFileUpload__scrollpane, #jQueryFileUpload').css({
width : jQuery('#siteManager__uploader_tab').width(),
height : jQuery('#siteManager__uploader_tab').height() - jQuery('#siteManager__tr__uploader_header').height()
});
setTimeout (function () {
sa.sp.containerSizeChanged (jQuery('#jQueryFileUpload__scrollpane')[0], true);
sa.sp.bindEvents(jQuery('#jQueryFileUpload__scrollpane')[0]);
}, 100);
break;
};
}, 100);
}
});
......
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