Change to using the javascript flash interface instead of the object interface
This commit is contained in:
parent
f96adbde80
commit
a745f21051
@ -19,7 +19,7 @@
|
|||||||
*/
|
*/
|
||||||
class tag_cloud_theme_Core {
|
class tag_cloud_theme_Core {
|
||||||
static function head($theme) {
|
static function head($theme) {
|
||||||
|
$theme->script("swfobject.js");
|
||||||
$theme->script("tag_cloud.js");
|
$theme->script("tag_cloud.js");
|
||||||
// return html::script("modules/tag_cloud/js/tag_cloud.js");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -44,34 +44,27 @@
|
|||||||
$(addr).attr("style", "font-size:" + $(this).css("fontSize") + ";");
|
$(addr).attr("style", "font-size:" + $(this).css("fontSize") + ";");
|
||||||
$(tags).append(addr);
|
$(tags).append(addr);
|
||||||
});
|
});
|
||||||
var object = document.createElement("object");
|
|
||||||
$(object).attr({
|
var so = new SWFObject(self.options.movie, "gTagCloud3D", width, .75 * width, "7", self.options.bgColor);
|
||||||
type: "application/x-shockwave-flash",
|
so.addParam("wmode", self.options.wmode);
|
||||||
data: self.options.movie,
|
so.addVariable("mode", "tags");
|
||||||
width: width,
|
so.addVariable("distr", self.options.distr);
|
||||||
height: .75 * width
|
so.addVariable("tcolor", self.options.tcolor);
|
||||||
});
|
so.addVariable("tcolor2", self.options.tcolor2);
|
||||||
var value = "tcolor=" + self.options.tcolor + "&tcolor2=" + self.options.tcolor2 +
|
so.addVariable("hicolor", self.options.hicolor);
|
||||||
"&hicolor=" + self.options.hicolor + "&tspeed=" + self.options.tspeed +
|
so.addVariable("tagcloud", escape("<tags>" + $(tags).html() + "</tags>"));
|
||||||
"&distr=" + self.options.distr + "&mode=" + self.options.mode +
|
so.write("gTagCloud3D");
|
||||||
"&tagcloud=" + escape("<tags>" + $(tags).html() + "</tags>");
|
|
||||||
$(object).append("<param name=\"movie\" value=\"" + self.options.movie +"\" />")
|
|
||||||
.append("<param name=\"wmode\" value=\"" + self.options.wmode + "\" />")
|
|
||||||
.append("<param name=\"bgcolor\" value=\"" + self.options.bgColor + "\" />")
|
|
||||||
.append("<param name=\"allowScriptAccess\"value=\"" + self.options.scriptAccess + "\" />")
|
|
||||||
.append("<param name=\"flashvars\" value=\"" + value + "\" />");
|
|
||||||
$("#gTagCloud3D").html(object);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$.extend($.ui.gallery_tag_cloud, {
|
$.extend($.ui.gallery_tag_cloud, {
|
||||||
defaults: {
|
defaults: {
|
||||||
bgColor: false,
|
bgColor: 0xFFFFFF,
|
||||||
wmode: "transparent",
|
wmode: "transparent",
|
||||||
scriptAccess: "always",
|
scriptAccess: "always",
|
||||||
tcolor: "0x333333",
|
tcolor: 0x333333,
|
||||||
tcolor2: "0x009900",
|
tcolor2: 0x009900,
|
||||||
hicolor: "0x000000",
|
hicolor: 0x000000,
|
||||||
tspeed: 100,
|
tspeed: 100,
|
||||||
distr: "true",
|
distr: "true",
|
||||||
mode: "tag"
|
mode: "tag"
|
||||||
|
Reference in New Issue
Block a user