Commit 97b71372 authored by luciash's avatar luciash

[REM] ColorBox: commented out code causing problems and which was intended to...

[REM] ColorBox: commented out code causing problems and which was intended to detect and distinguish only "box[foo]" from the rel="shadowbox[foo];bar=..." attributes and be able to group by that for ColorBox "gallery" purposes
[FIX] ColorBox: inline links and relative links (non-images) displayed properly now
parent 5ca87a8d
......@@ -244,20 +244,13 @@ $jq(document).ready( function() { // JQuery's DOM is ready event - before onload
overlayClose: true,
title: true
});
// inline content: hrefs starting with #
$jq("a[rel*='box'][href^='#']").colorbox({
inline: true,
href: function(){
return $(this).attr('href');
}
});
// rel containg type=img or no type=
$jq("a[rel*='box'][rel*='type=img'],a[rel*='box'][rel!='type=']").colorbox({
photo: true
});
// rel containg type=flash
$jq("a[rel*='box'][rel*='type=flash']").colorbox({
flash: true
flash: true
});
// rel containg slideshow
$jq("a[rel*='box'][rel*='slideshow']").colorbox({
......@@ -265,8 +258,17 @@ $jq(document).ready( function() { // JQuery's DOM is ready event - before onload
preloading: false,
height: "100%"
});
// href starting with http(s)
$jq("a[rel*='box'][href^='http://'], a[rel*='box'][href^='https://']").colorbox({
// inline content: hrefs starting with #
$jq("a[rel*='box'][href^='#']").colorbox({
inline: true,
width: "50%",
height: "50%",
href: function(){
return $(this).attr('href');
}
});
// href starting with http(s) or no image link
$jq("a[rel*='box'][href^='http://'], a[rel*='box'][href^='https://'], a[rel*='box'][href!='&display']").colorbox({
iframe: true,
width: "95%"
});
......@@ -308,9 +310,9 @@ $jq(document).ready( function() { // JQuery's DOM is ready event - before onload
}
});
// rel containg foobox[bar] to group objects in "galleries" (shadowbox compatible) TODO: buggy (applies after first display of the object)
// rel containg foobox[bar] to group objects in "galleries" (shadowbox compatible) TODO: buggy (applies after first display of the object), must be done with live() jQuery function maybe
colorboxgroups = function () {
/*colorboxgroups = function () {
re = /(box\[([^\]]*)\])/i;
ret = $jq(this).attr("rel").match(re);
return ret[2];
......@@ -322,7 +324,7 @@ $jq(document).ready( function() { // JQuery's DOM is ready event - before onload
rel: function(){
return $(this).attr('rev');
}
});
});*/
}
......
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