diff --git a/3.0/modules/tag_cloud_html5/controllers/admin_tag_cloud_html5.php b/3.0/modules/tag_cloud_html5/controllers/admin_tag_cloud_html5.php new file mode 100644 index 00000000..e6a6a766 --- /dev/null +++ b/3.0/modules/tag_cloud_html5/controllers/admin_tag_cloud_html5.php @@ -0,0 +1,254 @@ +_get_admin_form(); + $this->_print_screen($form); + } + + public function edit() { + access::verify_csrf(); + $cfg = $this->_get_config(); + $form = $this->_get_admin_form(); + if ($form->validate()) { + if ($form->options_general->load_defaults->value) { + // reset all to defaults, redirect with message + module::install("tag_cloud_html5"); + message::success(t("Tag cloud options reset successfully")); + url::redirect("admin/tag_cloud_html5"); + } else { + $valid = true; + // run checks on various inputs + $options_general = $form->options_general; + if ($options_general->height_sidebar->value < 0) { + $form->options_general->height_sidebar->add_error("not_valid", 1); + $valid = false; + } + foreach ($cfg['groups'] as $groupname => $grouptext) { + ${"options".$groupname} = $form->{"options".$groupname}; + if ($options_general->{"maxtags".$groupname}->value < 0) { + $form->options_general->{"maxtags".$groupname}->add_error("not_valid", 1); + $valid = false; + } + if (${"options".$groupname}->{"maxSpeed".$groupname}->value < 0) { + $form->{"options".$groupname}->{"maxSpeed".$groupname}->add_error("not_valid", 1); + $valid = false; + } + if ((${"options".$groupname}->{"initialX".$groupname}->value < -1) || (${"options".$groupname}->{"initialX".$groupname}->value > 1)) { + $form->{"options".$groupname}->{"initialX".$groupname}->add_error("not_valid", 1); + $valid = false; + } + if ((${"options".$groupname}->{"initialY".$groupname}->value < -1) || (${"options".$groupname}->{"initialY".$groupname}->value > 1)) { + $form->{"options".$groupname}->{"initialY".$groupname}->add_error("not_valid", 1); + $valid = false; + } + if ((${"options".$groupname}->{"deadZone".$groupname}->value < 0) || (${"options".$groupname}->{"deadZone".$groupname}->value > 1)) { + $form->{"options".$groupname}->{"deadZone".$groupname}->add_error("not_valid", 1); + $valid = false; + } + if (${"options".$groupname}->{"zoom".$groupname}->value < 0) { + $form->{"options".$groupname}->{"zoom".$groupname}->add_error("not_valid", 1); + $valid = false; + } + if ((${"options".$groupname}->{"depth".$groupname}->value < 0) || (${"options".$groupname}->{"depth".$groupname}->value > 1)) { + $form->{"options".$groupname}->{"depth".$groupname}->add_error("not_valid", 1); + $valid = false; + } + if (${"options".$groupname}->{"outlineOffset".$groupname}->value < 0) { + $form->{"options".$groupname}->{"outlineOffset".$groupname}->add_error("not_valid", 1); + $valid = false; + } + if (preg_match("/^#[0-9A-Fa-f]{6}$/", ${"options".$groupname}->{"outlineColour".$groupname}->value) == 0) { + $form->{"options".$groupname}->{"outlineColour".$groupname}->add_error("not_valid", 1); + $valid = false; + } + if ((preg_match("/^#[0-9A-Fa-f]{6}$/", ${"options".$groupname}->{"textColour".$groupname}->value) == 0) && (strcmp(${"options".$groupname}->{"textColour".$groupname}->value, "") != 0) ) { + $form->{"options".$groupname}->{"textColour".$groupname}->add_error("not_valid", 1); + $valid = false; + } + if (${"options".$groupname}->{"textHeight".$groupname}->value < 0) { + $form->{"options".$groupname}->{"textHeight".$groupname}->add_error("not_valid", 1); + $valid = false; + } + } + if ($valid) { + // all inputs passed tests above; save them + module::set_var("tag_cloud_html5", "show_wholecloud_link", ($options_general->show_wholecloud_link->value == 1)); + module::set_var("tag_cloud_html5", "show_add_tag_form", ($options_general->show_add_tag_form->value == 1)); + module::set_var("tag_cloud_html5", "height_sidebar", $options_general->height_sidebar->value); + module::set_var("tag_cloud_html5", "show_wholecloud_list", ($options_general->show_wholecloud_list->value == 1)); + foreach ($cfg['groups'] as $groupname => $grouptext) { + module::set_var("tag_cloud_html5", "maxtags".$groupname, $options_general->{"maxtags".$groupname}->value); + + $optionsarray = array(); + $optionsarray['maxSpeed'] = ${"options".$groupname}->{"maxSpeed".$groupname}->value; + $optionsarray['deadZone'] = ${"options".$groupname}->{"deadZone".$groupname}->value; + $optionsarray['initial'] = array(${"options".$groupname}->{"initialX".$groupname}->value, ${"options".$groupname}->{"initialY".$groupname}->value); + $optionsarray['initialDecel'] = (${"options".$groupname}->{"initialDecel".$groupname}->value == 1); + $optionsarray['zoom'] = ${"options".$groupname}->{"zoom".$groupname}->value; + $optionsarray['depth'] = ${"options".$groupname}->{"depth".$groupname}->value; + $optionsarray['outlineMethod'] = ${"options".$groupname}->{"outlineMethod".$groupname}->value; + $optionsarray['outlineOffset'] = ${"options".$groupname}->{"outlineOffset".$groupname}->value; + $optionsarray['outlineColour'] = ${"options".$groupname}->{"outlineColour".$groupname}->value; + $optionsarray['textColour'] = ${"options".$groupname}->{"textColour".$groupname}->value; + $optionsarray['textFont'] = ${"options".$groupname}->{"textFont".$groupname}->value; + $optionsarray['textHeight'] = ${"options".$groupname}->{"textHeight".$groupname}->value; + $optionsarray['frontSelect'] = (${"options".$groupname}->{"frontSelect".$groupname}->value == 1); + $optionsarray['wheelZoom'] = false; // note that this is locked - otherwise scrolling through the page screws everything up + module::set_var("tag_cloud_html5", "options".$groupname, json_encode($optionsarray)); + } + // all done; redirect with message + message::success(t("Tag cloud options updated successfully")); + url::redirect("admin/tag_cloud_html5"); + } + } + } + // print screen from existing form - you wind up here if something wasn't validated + $this->_print_screen($form); + } + + private function _get_config() { + // these define the two variable name groups, along with their labels which are always shown with t() for i18n. + $cfg['groups'] = array("_sidebar"=>"Sidebar", "_wholecloud"=>"Whole cloud"); + // this defines the separator that's used between the group name and the attribute, and is *not* put through t(). + $cfg['sep'] = ": "; + return $cfg; + } + + private function _print_screen($form) { + $view = new Admin_View("admin.html"); + $view->content = new View("admin_tag_cloud_html5.html"); + $view->content->form = $form; + print $view; + } + + private function _get_admin_form() { + $cfg = $this->_get_config(); + $sep = $cfg['sep']; + + // Make the form. This form has three groups: group_general, group_sidebar, and group_wholecloud. + $form = new Forge("admin/tag_cloud_html5/edit", "", "post", array("id" => "g-tag-cloud-html5-admin-form")); + + // group_general + $group_general = $form->group("options_general")->label(t("Tag cloud options").$sep.t("General")); + $group_general->checkbox("load_defaults") + ->label(t("Reset all to default values")) + ->checked(false); + $group_general->checkbox("show_wholecloud_link") + ->label(t("Show 'View whole cloud' link in sidebar")) + ->checked(module::get_var("tag_cloud_html5", "show_wholecloud_link", null)); + $group_general->checkbox("show_add_tag_form") + ->label(t("Show 'Add tag to album' form in sidebar (when permitted and applicable)")) + ->checked(module::get_var("tag_cloud_html5", "show_add_tag_form", null)); + $group_general->input("height_sidebar") + ->label(t("Height of sidebar (as fraction of width)")) + ->value(round(module::get_var("tag_cloud_html5", "height_sidebar", null),3)) // round or else it gets 6 decimal places... + ->error_message("not_valid", t("Height of sidebar must be a 1-5 digit number")) + ->rules("required|valid_numeric|length[1,5]"); + $group_general->checkbox("show_wholecloud_list") + ->label(t("Show tag list under cloud on 'View whole cloud' page")) + ->checked(module::get_var("tag_cloud_html5", "show_wholecloud_list", null)); + + foreach ($cfg['groups'] as $groupname => $grouptext) { + // maxtags - note that this is displayed under group_general! + $maxtags = module::get_var("tag_cloud_html5", "maxtags".$groupname, null); + $group_general->input("maxtags".$groupname) + ->label(t($grouptext).$sep.t("max tags shown")) + ->value($maxtags) + ->error_message("not_valid", t("Max tags must be a 1-4 digit number")) + ->rules("required|valid_numeric|length[1,4]"); + // group_sidebar and group_wholecloud + $options = json_decode(module::get_var("tag_cloud_html5", "options".$groupname, null),true); + ${"group".$groupname} = $form->group("options".$groupname)->label(t("Tag cloud options").$sep.t($grouptext)); + ${"group".$groupname}->input("maxSpeed".$groupname) + ->label(t($grouptext).$sep.t("max speed (typically 0.01-0.20)")) + ->value($options['maxSpeed']) + ->error_message("not_valid", t("Max speed must be a 1-5 digit number")) + ->rules("required|valid_numeric|length[1,5]"); + ${"group".$groupname}->input("initialX".$groupname) + ->label(t($grouptext).$sep.t("initial horizontal speed (between +/-1.0, as fraction of max speed)")) + ->value($options['initial'][0]) + ->error_message("not_valid", t("Initial horizontal speed must be a 1-4 digit number")) + ->rules("required|valid_numeric|length[1,4]"); + ${"group".$groupname}->input("initialY".$groupname) + ->label(t($grouptext).$sep.t("initial vertical speed (between +/-1.0, as fraction of max speed)")) + ->value($options['initial'][1]) + ->error_message("not_valid", t("Initial vertical speed must be a 1-4 digit number")) + ->rules("required|valid_numeric|length[1,4]"); + ${"group".$groupname}->checkbox("initialDecel".$groupname) + ->label(t($grouptext).$sep.t("initial deceleration (if false, the initial speed is held until a mouseover event)")) + ->checked($options['initialDecel']); + ${"group".$groupname}->input("deadZone".$groupname) + ->label(t($grouptext).$sep.t("dead zone (0.0-1.0, where 0.0 is no dead zone and 1.0 is no active zone)")) + ->value($options['deadZone']) + ->error_message("not_valid", t("Dead zone must be a 1-4 digit number")) + ->rules("required|valid_numeric|length[1,4]"); + ${"group".$groupname}->input("zoom".$groupname) + ->label(t($grouptext).$sep.t("zoom (<1.0 is zoom out, >1.0 is zoom in)")) + ->value($options['zoom']) + ->error_message("not_valid", t("Zoom must be a 1-4 digit number")) + ->rules("required|valid_numeric|length[1,4]"); + ${"group".$groupname}->input("depth".$groupname) + ->label(t($grouptext).$sep.t("depth (0.0-1.0)")) + ->value($options['depth']) + ->error_message("not_valid", t("Depth must be a 1-4 digit number")) + ->rules("required|valid_numeric|length[1,4]"); + ${"group".$groupname}->dropdown("outlineMethod".$groupname) + ->label(t($grouptext).$sep.t("outline method (mouseover event)")) + ->options(array("colour"=>t("change text color"),"outline"=>t("add outline around text"),"block"=>t("add block behind text"))) + ->selected($options['outlineMethod']); + ${"group".$groupname}->input("outlineOffset".$groupname) + ->label(t($grouptext).$sep.t("outline offset (mouseover region size around text, in pixels)")) + ->value($options['outlineOffset']) + ->error_message("not_valid", t("Outline offset must be a 1-2 digit number")) + ->rules("required|valid_numeric|length[1,2]"); + ${"group".$groupname}->input("outlineColour".$groupname) + ->label(t($grouptext).$sep.t("outline color (mouseover color, as #hhhhhh)")) + ->value($options['outlineColour']) + ->error_message("not_valid", t("Outline color must be specified as #hhhhhh")) + ->rules("required|length[7]"); + ${"group".$groupname}->input("textColour".$groupname) + ->label(t($grouptext).$sep.t("text color (as #hhhhhh, or empty to use theme color)")) + ->value($options['textColour']) + ->error_message("not_valid", t("Text color must be specified as empty or #hhhhhh")) + ->rules("length[0,7]"); + ${"group".$groupname}->input("textFont".$groupname) + ->label(t($grouptext).$sep.t("text font family (empty to use theme font)")) + ->value($options['textFont']) + ->error_message("not_valid", t("Text font must be empty or a 0-40 character string")) + ->rules("length[0,40]"); + ${"group".$groupname}->input("textHeight".$groupname) + ->label(t($grouptext).$sep.t("text height (in pixels)")) + ->value($options['textHeight']) + ->error_message("not_valid", t("Text height must be a 1-2 digit number")) + ->rules("required|valid_numeric|length[1,2]"); + ${"group".$groupname}->checkbox("frontSelect".$groupname) + ->label(t($grouptext).$sep.t("only allow tags in front to be selected")) + ->checked($options['frontSelect']); + + } + + $form->submit("")->value(t("Save")); + + return $form; + } + +} diff --git a/3.0/modules/tag_cloud_html5/controllers/tag_cloud.php b/3.0/modules/tag_cloud_html5/controllers/tag_cloud.php new file mode 100644 index 00000000..ce9e0147 --- /dev/null +++ b/3.0/modules/tag_cloud_html5/controllers/tag_cloud.php @@ -0,0 +1,44 @@ +content = new View("tag_cloud_html5_page.html"); + $template->content->title = t("Tag cloud"); + $template->content->cloud = tag::cloud($maxtags); + $template->content->options = $options; + + // Display the page. + print $template; + } +} diff --git a/3.0/modules/tag_cloud_html5/css/admin_tag_cloud_html5.css b/3.0/modules/tag_cloud_html5/css/admin_tag_cloud_html5.css new file mode 100644 index 00000000..28afb51f --- /dev/null +++ b/3.0/modules/tag_cloud_html5/css/admin_tag_cloud_html5.css @@ -0,0 +1,30 @@ +#g-content fieldset li { + display: block; + clear: both; + height: 24px; +} +#g-content fieldset input { + display: inline; + float: left; + height: 18px; + margin-right: 0.8em; + width: 250px; +} +#g-content fieldset select { + display: inline; + float: left; + height: 24px; + margin-right: 0.8em; + width: 256px; +} +#g-content fieldset label { + display: inline; + line-height: 24px; +} +#g-content fieldset label input.checkbox { + float: left; + height: 24px; + margin-right: 0.8em; + width: 20px; + margin-left: 236px; +} \ No newline at end of file diff --git a/3.0/modules/tag_cloud_html5/css/tag_cloud_html5.css b/3.0/modules/tag_cloud_html5/css/tag_cloud_html5.css new file mode 100644 index 00000000..bf20ce8c --- /dev/null +++ b/3.0/modules/tag_cloud_html5/css/tag_cloud_html5.css @@ -0,0 +1,106 @@ +/* Tag cloud - sidebar ~~~~~~~~~~~~~~~~~~~~~~~ */ + +/* comment out this first block to make the inline tags appear if the cloud doesn't load */ +#g-tag-cloud-html5-tags { + display: none; +} + +#g-tag-cloud-html5-tags ul { + text-align: justify; +} + +#g-tag-cloud-html5-tags ul li { + display: inline; + text-align: justify; +} + +#g-tag-cloud-html5-tags ul li a { + text-decoration: none; +} + +#g-tag-cloud-html5-tags ul li span { + display: none; +} + +#g-tag-cloud-html5-page ul li a:hover { + text-decoration: underline; +} + +/* Tag cloud - whole cloud page ~~~~~~~~~~~~~~~~~~~~~~~ */ + +#g-tag-cloud-html5-page-canvas { + display: block; + margin: 0 auto; +} + +#g-tag-cloud-html5-page-tags ul { + font-size: 1.2em; + text-align: justify; +} + +#g-tag-cloud-html5-page-tags ul li { + display: inline; + line-height: 1.5em; + text-align: justify; +} + +#g-tag-cloud-html5-page-tags ul li a { + text-decoration: none; +} + +#g-tag-cloud-html5-page-tags ul li span { + display: none; +} + +#g-tag-cloud-html5-page-tags ul li.size0 a { + color: #9cf; + font-size: 70%; + font-weight: 100; +} + +#g-tag-cloud-html5-page-tags ul li.size1 a { + color: #9cf; + font-size: 80%; + font-weight: 100; +} + +#g-tag-cloud-html5-page-tags ul li.size2 a { + color: #69f; + font-size: 90%; + font-weight: 300; +} + +#g-tag-cloud-html5-page-tags ul li.size3 a { + color: #69c; + font-size: 100%; + font-weight: 500; +} + +#g-tag-cloud-html5-page-tags ul li.size4 a { + color: #369; + font-size: 110%; + font-weight: 700; +} + +#g-tag-cloud-html5-page-tags ul li.size5 a { + color: #0e2b52; + font-size: 120%; + font-weight: 900; +} + +#g-tag-cloud-html5-page-tags ul li.size6 a { + color: #0e2b52; + font-size: 130%; + font-weight: 900; +} + +#g-tag-cloud-html5-page-tags ul li.size7 a { + color: #0e2b52; + font-size: 140%; + font-weight: 900; +} + +#g-tag-cloud-html5-page-tags ul li a:hover { + color: #f30; + text-decoration: underline; +} diff --git a/3.0/modules/tag_cloud_html5/helpers/tag_cloud_html5_block.php b/3.0/modules/tag_cloud_html5/helpers/tag_cloud_html5_block.php new file mode 100644 index 00000000..e1df9264 --- /dev/null +++ b/3.0/modules/tag_cloud_html5/helpers/tag_cloud_html5_block.php @@ -0,0 +1,65 @@ + (t("Tag cloud")." HTML5")); + } + + static function get($block_id, $theme) { + $block = ""; + switch ($block_id) { + case "tag_cloud_html5_site": + // load settings + $options = module::get_var("tag_cloud_html5", "options_sidebar", null); + $maxtags = module::get_var("tag_cloud_html5", "maxtags_sidebar", null); + $showlink = module::get_var("tag_cloud_html5", "show_wholecloud_link", null); + $showaddtag = module::get_var("tag_cloud_html5", "show_add_tag_form", null); + $height = module::get_var("tag_cloud_html5", "height_sidebar", null); + + // make the block + $block = new Block(); + $block->css_id = "g-tag"; + $block->title = t("Tag cloud"); + $block->content = new View("tag_cloud_html5_block.html"); + $block->content->cloud = tag::cloud($maxtags); + $block->content->options = $options; + $block->content->height = $height; + + // add the 'View whole cloud' link if needed + if ($showlink) { + $block->content->wholecloud_link = "".t("View whole cloud").""; + } else { + $block->content->wholecloud_link = ""; + } + + // add the 'Add tag' form if needed + if ($theme->item() && $theme->page_subtype() != "tag" && access::can("edit", $theme->item()) && $showaddtag) { + $controller = new Tags_Controller(); + $block->content->form = tag::get_add_form($theme->item()); + } else { + $block->content->form = ""; + } + + break; + } + return $block; + } +} diff --git a/3.0/modules/tag_cloud_html5/helpers/tag_cloud_html5_event.php b/3.0/modules/tag_cloud_html5/helpers/tag_cloud_html5_event.php new file mode 100644 index 00000000..4e7fc3ca --- /dev/null +++ b/3.0/modules/tag_cloud_html5/helpers/tag_cloud_html5_event.php @@ -0,0 +1,28 @@ +get("settings_menu") + ->append(Menu::factory("link") + ->id("tag_cloud_html5") + ->label(t("Tag cloud")." HTML5") + ->url(url::site("admin/tag_cloud_html5"))); + } +} diff --git a/3.0/modules/tag_cloud_html5/helpers/tag_cloud_html5_installer.php b/3.0/modules/tag_cloud_html5/helpers/tag_cloud_html5_installer.php new file mode 100644 index 00000000..422a6f2c --- /dev/null +++ b/3.0/modules/tag_cloud_html5/helpers/tag_cloud_html5_installer.php @@ -0,0 +1,78 @@ + 0.05, + "deadZone" => 0.25, + "initial" => array(0.8,-0.3), + "initialDecel" => true, + "zoom" => 1.25, + "depth" => 0.5, + "outlineMethod" => "colour", + "outlineOffset" => 8, + "outlineColour" => "#eeeeee", + "textColour" => "", + "textFont" => "", + "textHeight" => 12, + "frontSelect" => true, + "wheelZoom" => false + ))); + module::set_var("tag_cloud_html5", "options_wholecloud", json_encode(array( + "maxSpeed" => 0.05, + "deadZone" => 0.25, + "initial" => array(0.8,-0.3), + "initialDecel" => true, + "zoom" => 1.25, + "depth" => 0.5, + "outlineMethod" => "colour", + "outlineOffset" => 8, + "outlineColour" => "#eeeeee", + "textColour" => "", + "textFont" => "", + "textHeight" => 13, + "frontSelect" => true, + "wheelZoom" => false + ))); + module::set_version("tag_cloud_html5", 4); + } + + static function upgrade() { + if (is_null(module::get_var("tag_cloud_html5", "options_sidebar")) || + is_null(module::get_var("tag_cloud_html5", "options_wholecloud")) || + (module::get_version("tag_cloud_html5") < 4) ) { + module::install("tag_cloud_html5"); + } + } + + static function uninstall() { + module::clear_all_vars("tag_cloud_html5"); + } + +} diff --git a/3.0/modules/tag_cloud_html5/helpers/tag_cloud_html5_theme.php b/3.0/modules/tag_cloud_html5/helpers/tag_cloud_html5_theme.php new file mode 100644 index 00000000..2bcb516a --- /dev/null +++ b/3.0/modules/tag_cloud_html5/helpers/tag_cloud_html5_theme.php @@ -0,0 +1,25 @@ +script("jquery.tagcanvas.mod.min.js"); + $theme->css("tag_cloud_html5.css"); + } +} \ No newline at end of file diff --git a/3.0/modules/tag_cloud_html5/js/excanvas.compiled.js b/3.0/modules/tag_cloud_html5/js/excanvas.compiled.js new file mode 100644 index 00000000..a34ca1da --- /dev/null +++ b/3.0/modules/tag_cloud_html5/js/excanvas.compiled.js @@ -0,0 +1,35 @@ +// Copyright 2006 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +document.createElement("canvas").getContext||(function(){var s=Math,j=s.round,F=s.sin,G=s.cos,V=s.abs,W=s.sqrt,k=10,v=k/2;function X(){return this.context_||(this.context_=new H(this))}var L=Array.prototype.slice;function Y(b,a){var c=L.call(arguments,2);return function(){return b.apply(a,c.concat(L.call(arguments)))}}var M={init:function(b){if(/MSIE/.test(navigator.userAgent)&&!window.opera){var a=b||document;a.createElement("canvas");a.attachEvent("onreadystatechange",Y(this.init_,this,a))}},init_:function(b){b.namespaces.g_vml_|| +b.namespaces.add("g_vml_","urn:schemas-microsoft-com:vml","#default#VML");b.namespaces.g_o_||b.namespaces.add("g_o_","urn:schemas-microsoft-com:office:office","#default#VML");if(!b.styleSheets.ex_canvas_){var a=b.createStyleSheet();a.owningElement.id="ex_canvas_";a.cssText="canvas{display:inline-block;overflow:hidden;text-align:left;width:300px;height:150px}g_vml_\\:*{behavior:url(#default#VML)}g_o_\\:*{behavior:url(#default#VML)}"}var c=b.getElementsByTagName("canvas"),d=0;for(;d','","");this.element_.insertAdjacentHTML("BeforeEnd",t.join(""))};i.stroke=function(b){var a=[],c=P(b?this.fillStyle:this.strokeStyle),d=c.color,f=c.alpha*this.globalAlpha;a.push("g.x)g.x=e.x;if(h.y==null||e.yg.y)g.y=e.y}}a.push(' ">');if(b)if(typeof this.fillStyle=="object"){var m=this.fillStyle,r=0,n={x:0,y:0},o=0,q=1;if(m.type_=="gradient"){var t=m.x1_/this.arcScaleX_,E=m.y1_/this.arcScaleY_,p=this.getCoords_(m.x0_/this.arcScaleX_,m.y0_/this.arcScaleY_), +z=this.getCoords_(t,E);r=Math.atan2(z.x-p.x,z.y-p.y)*180/Math.PI;if(r<0)r+=360;if(r<1.0E-6)r=0}else{var p=this.getCoords_(m.x0_,m.y0_),w=g.x-h.x,x=g.y-h.y;n={x:(p.x-h.x)/w,y:(p.y-h.y)/x};w/=this.arcScaleX_*k;x/=this.arcScaleY_*k;var R=s.max(w,x);o=2*m.r0_/R;q=2*m.r1_/R-o}var u=m.colors_;u.sort(function(ba,ca){return ba.offset-ca.offset});var J=u.length,da=u[0].color,ea=u[J-1].color,fa=u[0].alpha*this.globalAlpha,ga=u[J-1].alpha*this.globalAlpha,S=[],l=0;for(;l')}else a.push('');else{var K=this.lineScale_*this.lineWidth;if(K<1)f*=K;a.push("')}a.push("");this.element_.insertAdjacentHTML("beforeEnd",a.join(""))};i.fill=function(){this.stroke(true)};i.closePath=function(){this.currentPath_.push({type:"close"})};i.getCoords_=function(b,a){var c=this.m_;return{x:k*(b*c[0][0]+a*c[1][0]+c[2][0])-v,y:k*(b*c[0][1]+a*c[1][1]+c[2][1])-v}};i.save=function(){var b={};O(this,b);this.aStack_.push(b);this.mStack_.push(this.m_);this.m_=y(I(),this.m_)};i.restore=function(){O(this.aStack_.pop(), +this);this.m_=this.mStack_.pop()};function ha(b){var a=0;for(;a<3;a++){var c=0;for(;c<2;c++)if(!isFinite(b[a][c])||isNaN(b[a][c]))return false}return true}function A(b,a,c){if(!!ha(a)){b.m_=a;if(c)b.lineScale_=W(V(a[0][0]*a[1][1]-a[0][1]*a[1][0]))}}i.translate=function(b,a){A(this,y([[1,0,0],[0,1,0],[b,a,1]],this.m_),false)};i.rotate=function(b){var a=G(b),c=F(b);A(this,y([[a,c,0],[-c,a,0],[0,0,1]],this.m_),false)};i.scale=function(b,a){this.arcScaleX_*=b;this.arcScaleY_*=a;A(this,y([[b,0,0],[0,a, +0],[0,0,1]],this.m_),true)};i.transform=function(b,a,c,d,f,h){A(this,y([[b,a,0],[c,d,0],[f,h,1]],this.m_),true)};i.setTransform=function(b,a,c,d,f,h){A(this,[[b,a,0],[c,d,0],[f,h,1]],true)};i.clip=function(){};i.arcTo=function(){};i.createPattern=function(){return new U};function D(b){this.type_=b;this.r1_=this.y1_=this.x1_=this.r0_=this.y0_=this.x0_=0;this.colors_=[]}D.prototype.addColorStop=function(b,a){a=P(a);this.colors_.push({offset:b,color:a.color,alpha:a.alpha})};function U(){}G_vmlCanvasManager= +M;CanvasRenderingContext2D=H;CanvasGradient=D;CanvasPattern=U})(); diff --git a/3.0/modules/tag_cloud_html5/js/jquery.tagcanvas.mod.min.js b/3.0/modules/tag_cloud_html5/js/jquery.tagcanvas.mod.min.js new file mode 100644 index 00000000..44bf1876 --- /dev/null +++ b/3.0/modules/tag_cloud_html5/js/jquery.tagcanvas.mod.min.js @@ -0,0 +1,27 @@ +/** + * Copyright (C) 2010-2012 Graham Breach + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ +/** + * jQuery.tagcanvas 1.17.1 + * For more information, please contact + */ +/** + * Modified by Shad Laws 2012/06/01 -- all modified lines have "mod Shad Laws" comments + * - included initialDecel and deadZone as options + * - set defaults of new options to mimic behavior without them (false and 0) + * - removed two unnecessary variable declarations caught by YUI Compressor + */ +(function(I){var R,Q,G=Math.abs,r=Math.sin,h=Math.cos,z=Math.max,V=Math.min,B={},C={},D={0:"0,",1:"17,",2:"34,",3:"51,",4:"68,",5:"85,",6:"102,",7:"119,",8:"136,",9:"153,",a:"170,",A:"170,",b:"187,",B:"187,",c:"204,",C:"204,",d:"221,",D:"221,",e:"238,",E:"238,",f:"255,",F:"255,"},e,J,d,l=document,y,c={};for(R=0;R<256;++R){Q=R.toString(16);if(R<16){Q="0"+Q}C[Q]=C[Q.toUpperCase()]=R.toString()+","}function N(i){return typeof(i)!="undefined"}function H(j){var Y=j.length-1,X,Z;while(Y){Z=~~(Math.random()*Y);X=j[Y];j[Y]=j[Z];j[Z]=X;--Y}}function n(Y,aa,af,ac){var ab,ae,j,ad,ag=[],Z=Math.PI*(3-Math.sqrt(5)),X=2/Y;for(ab=0;ab0)}function W(ae,j){var X=1024,aa=ae.weightGradient,Z,ac,Y,ad,ab;if(ae.gCanvas){ac=ae.gCanvas.getContext("2d")}else{ae.gCanvas=Z=g(X,1);if(!Z){return null}ac=Z.getContext("2d");ad=ac.createLinearGradient(0,0,X,0);for(Y in aa){ad.addColorStop(1-Y,aa[Y])}ac.fillStyle=ad;ac.fillRect(0,0,X,1)}ab=ac.getImageData(~~((X-1)*j),0,1,1).data;return"rgba("+ab[0]+","+ab[1]+","+ab[2]+","+(ab[3]/255)+")"}function u(aa,Z,X,ad,ab,ac,j){var Y=(ac||0)+(j&&j[0]<0?G(j[0]):0),i=(ac||0)+(j&&j[1]<0?G(j[1]):0);aa.font=Z;aa.textBaseline="top";aa.fillStyle=X;ab&&(aa.shadowColor=ab);ac&&(aa.shadowBlur=ac);j&&(aa.shadowOffsetX=j[0],aa.shadowOffsetY=j[1]);aa.fillText(ad,Y,i)}function m(aj,ab,af,ah,aa,X,ad,ae,j,ai,ag){var Y=ah+G(j[0])+ae+ae,i=aa+G(j[1])+ae+ae,Z,ac;Z=g(Y+ai,i+ag);if(!Z){return null}ac=Z.getContext("2d");u(ac,ab,X,aj,ad,ae,j);return Z}function P(ab,ae,af,Y){var Z=ab.width+G(Y[0])+af+af,j=ab.height+G(Y[1])+af+af,ac,ad,aa=(af||0)+(Y&&Y[0]<0?G(Y[0]):0),X=(af||0)+(Y&&Y[1]<0?G(Y[1]):0);ac=g(Z,j);if(!ac){return null}ad=ac.getContext("2d");ae&&(ad.shadowColor=ae);af&&(ad.shadowBlur=af);Y&&(ad.shadowOffsetX=Y[0],ad.shadowOffsetY=Y[1]);ad.drawImage(ab,aa,X);return ac}function K(aj,ab,ah){var ai=parseInt(aj.length*ah),aa=parseInt(ah*2),Y=g(ai,aa),ae,j,Z,ad,ag,af,X,ac;if(!Y){return null}ae=Y.getContext("2d");ae.fillStyle="#000";ae.fillRect(0,0,ai,aa);u(ae,ah+"px "+ab,"#fff",aj);j=ae.getImageData(0,0,ai,aa);Z=j.width;ad=j.height;ac={min:{x:Z,y:ad},max:{x:-1,y:-1}};for(af=0;af0){if(agac.max.x){ac.max.x=ag}if(afac.max.y){ac.max.y=af}}}}if(Z!=ai){ac.min.x*=(ai/Z);ac.max.x*=(ai/Z)}if(ad!=aa){ac.min.y*=(ai/ad);ac.max.y*=(ai/ad)}Y=null;return ac}function t(i){return"'"+i.replace(/(\'|\")/g,"").replace(/\s*,\s*/g,"', '")+"'"}function A(i,j,X){X=X||l;if(X.addEventListener){X.addEventListener(i,j,false)}else{X.attachEvent("on"+i,j)}}function O(Z,ab,Y,j){var X=j.taglist,aa=j.imageScale;if(aa&&!(ab.width&&ab.height)){A("load",function(){O(Z,ab,Y,j)},window);return}if(!Z.complete){A("load",function(){O(Z,ab,Y,j)},Z);return}ab.width=ab.width;ab.height=ab.height;if(aa){Z.width=ab.width*aa;Z.height=ab.height*aa}Y.w=Z.width;Y.h=Z.height;X.push(Y)}function M(Y,X){var j=l.defaultView,i=X.replace(/\-([a-z])/g,function(Z){return Z.charAt(1).toUpperCase()});return(j&&j.getComputedStyle&&j.getComputedStyle(Y,null).getPropertyValue(X))||(Y.currentStyle&&Y.currentStyle[i])}function x(X,j){var i=1,Y;if(X.weightFrom){i=1*(j.getAttribute(X.weightFrom)||X.textHeight)}else{if(Y=M(j,"font-size")){i=(Y.indexOf("px")>-1&&Y.replace("px","")*1)||(Y.indexOf("pt")>-1&&Y.replace("pt","")*1.25)||Y*3.3}else{X.weight=false}}return i}function k(X){L(X);var j=X.target||X.fromElement.parentNode,i=s.tc[j.id];i&&(i.mx=i.my=-1)}function L(Z){var Y,X,j=l.documentElement,aa;for(Y in s.tc){X=s.tc[Y];if(X.tttimer){clearTimeout(X.tttimer);X.tttimer=null}aa=I(X.canvas).offset();if(Z.pageX){X.mx=Z.pageX-aa.left;X.my=Z.pageY-aa.top}else{X.mx=Z.clientX+(j.scrollLeft||l.body.scrollLeft)-aa.left;X.my=Z.clientY+(j.scrollTop||l.body.scrollTop)-aa.top}}}function q(Y){var j=s,i=l.addEventListener?0:1,X=Y.target&&N(Y.target.id)?Y.target.id:Y.srcElement.parentNode.id;if(X&&Y.button==i&&j.tc[X]){L(Y);j.tc[X].Clicked(Y)}}function T(X){var i=s,j=X.target&&N(X.target.id)?X.target.id:X.srcElement.parentNode.id;if(j&&i.tc[j]){X.cancelBubble=true;X.returnValue=false;X.preventDefault&&X.preventDefault();i.tc[j].Wheel((X.wheelDelta||X.detail)>0)}}function o(){var X=s.tc,j;for(j in X){X[j].Draw()}}function b(X,i){var j=r(i),Y=h(i);return{x:X.x,y:(X.y*Y)+(X.z*j),z:(X.y*-j)+(X.z*Y)}}function a(X,i){var j=r(i),Y=h(i);return{x:(X.x*Y)+(X.z*-j),y:X.y,z:(X.x*j)+(X.z*Y)}}function S(X,ae,ad,Z,ac,aa){var i,Y,ab,j=X.z1/(X.z1+X.z2+ae.z);i=ae.y*j*aa;Y=ae.x*j*ac;ab=X.z2+ae.z;return{x:Y,y:i,z:ab}}function f(i){this.ts=new Date().valueOf();this.tc=i;this.x=this.y=this.w=this.h=this.sc=1;this.z=0;this.Draw=i.pulsateTo<1&&i.outlineMethod!="colour"?this.DrawPulsate:this.DrawSimple;this.SetMethod(i.outlineMethod)}e=f.prototype;e.SetMethod=function(X){var j={block:["PreDraw","DrawBlock"],colour:["PreDraw","DrawColour"],outline:["PostDraw","DrawOutline"],classic:["LastDraw","DrawOutline"],none:["LastDraw"]},i=j[X]||j.outline;if(X=="none"){this.Draw=function(){return 1}}else{this.drawFunc=this[i[1]]}this[i[0]]=this.Draw};e.Update=function(ad,ac,ae,aa,ab,j,Z,i){var X=this.tc.outlineOffset,Y=2*X;this.x=ab*ad+Z-X;this.y=ab*ac+i-X;this.w=ab*ae+Y;this.h=ab*aa+Y;this.sc=ab;this.z=j.z};e.DrawOutline=function(aa,i,Z,j,X,Y){aa.strokeStyle=Y;aa.strokeRect(i,Z,j,X)};e.DrawColour=function(Y,ab,Z,ac,X,i,ad,j,aa){return this[ad.image?"DrawColourImage":"DrawColourText"](Y,ab,Z,ac,X,i,ad,j,aa)};e.DrawColourText=function(Z,ac,aa,ad,X,i,ae,j,ab){var Y=ae.colour;ae.colour=i;ae.Draw(Z,j,ab);ae.colour=Y;return 1};e.DrawColourImage=function(ac,af,ad,ag,ab,i,aj,j,ae){var ah=ac.canvas,Z=~~z(af,0),Y=~~z(ad,0),aa=V(ah.width-Z,ag)+0.5|0,ai=V(ah.height-Y,ab)+0.5|0,X;if(y){y.width=aa,y.height=ai}else{y=g(aa,ai)}if(!y){return this.SetMethod("outline")}X=y.getContext("2d");X.drawImage(ah,Z,Y,aa,ai,0,0,aa,ai);ac.clearRect(Z,Y,aa,ai);aj.Draw(ac,j,ae);ac.setTransform(1,0,0,1,0,0);ac.save();ac.beginPath();ac.rect(Z,Y,aa,ai);ac.clip();ac.globalCompositeOperation="source-in";ac.fillStyle=i;ac.fillRect(Z,Y,aa,ai);ac.restore();ac.globalCompositeOperation="destination-over";ac.drawImage(y,0,0,aa,ai,Z,Y,aa,ai);ac.globalCompositeOperation="source-over";return 1};e.DrawBlock=function(aa,i,Z,j,X,Y){aa.fillStyle=Y;aa.fillRect(i,Z,j,X)};e.DrawSimple=function(Z,i,j,Y){var X=this.tc;Z.setTransform(1,0,0,1,0,0);Z.strokeStyle=X.outlineColour;Z.lineWidth=X.outlineThickness;Z.shadowBlur=Z.shadowOffsetX=Z.shadowOffsetY=0;Z.globalAlpha=1;return this.drawFunc(Z,this.x,this.y,this.w,this.h,X.outlineColour,i,j,Y)};e.DrawPulsate=function(aa,i,j,Y){var Z=new Date().valueOf()-this.ts,X=this.tc;aa.setTransform(1,0,0,1,0,0);aa.strokeStyle=X.outlineColour;aa.lineWidth=X.outlineThickness;aa.shadowBlur=aa.shadowOffsetX=aa.shadowOffsetY=0;aa.globalAlpha=X.pulsateTo+((1-X.pulsateTo)*(0.5+(h(2*Math.PI*Z/(1000*X.pulsateTime))/2)));return this.drawFunc(aa,this.x,this.y,this.w,this.h,X.outlineColour,i,j,Y)};e.Active=function(X,i,j){return(i>=this.x&&j>=this.y&&i<=this.x+this.w&&j<=this.y+this.h)};e.PreDraw=e.PostDraw=e.LastDraw=function(){};function E(Z,j,ad,af,ae,ab,X,Y){var ac=Z.ctxt,aa;this.tc=Z;this.image=j.src?j:null;this.name=j.src?"":j;this.title=ad.title||null;this.a=ad;this.p3d={x:af[0]*Z.radius*1.1,y:af[1]*Z.radius*1.1,z:af[2]*Z.radius*1.1};this.x=this.y=0;this.w=ae;this.h=ab;this.colour=X||Z.textColour;this.textFont=Y||Z.textFont;this.weight=this.sc=this.alpha=1;this.weighted=!Z.weight;this.outline=new f(Z);if(this.image){if(Z.txtOpt&&Z.shadow){aa=P(this.image,Z.shadow,Z.shadowBlur,Z.shadowOffset);if(aa){this.image=aa;this.w=aa.width;this.h=aa.height}}}else{this.textHeight=Z.textHeight;this.extents=K(this.name,this.textFont,this.textHeight);this.Measure(ac,Z)}this.SetShadowColour=Z.shadowAlpha?this.SetShadowColourAlpha:this.SetShadowColourFixed;this.SetDraw(Z)}J=E.prototype;J.SetDraw=function(i){this.Draw=this.image?(i.ie>7?this.DrawImageIE:this.DrawImage):this.DrawText;i.noSelect&&(this.CheckActive=function(){})};J.Measure=function(ab,j){this.h=this.extents?this.extents.max.y+this.extents.min.y:this.textHeight;ab.font=this.font=this.textHeight+"px "+this.textFont;this.w=ab.measureText(this.name).width;if(j.txtOpt){var Y=j.txtScale,Z=Y*this.textHeight,aa=Z+"px "+this.textFont,X=[Y*j.shadowOffset[0],Y*j.shadowOffset[1]],i;ab.font=aa;i=ab.measureText(this.name).width;this.image=m(this.name,aa,Z,i,Y*this.h,this.colour,j.shadow,Y*j.shadowBlur,X,Y,Y);if(this.image){this.w=this.image.width/Y;this.h=this.image.height/Y}this.SetDraw(j);j.txtOpt=this.image}};J.SetWeight=function(i){if(!this.name.length){return}this.weight=i;this.Weight(this.tc.ctxt,this.tc);this.Measure(this.tc.ctxt,this.tc)};J.Weight=function(Y,X){var j=this.weight,i=X.weightMode;this.weighted=true;if(i=="colour"||i=="both"){this.colour=W(X,(j-X.min_weight)/(X.max_weight-X.min_weight))}if(i=="size"||i=="both"){this.textHeight=j*X.weightSize}this.extents=K(this.name,this.textFont,this.textHeight)};J.SetShadowColourFixed=function(X,j,i){X.shadowColor=j};J.SetShadowColourAlpha=function(X,j,i){X.shadowColor=p(j,i)};J.DrawText=function(X,ab,j){var ac=this.tc,Z=this.x,Y=this.y,aa,i,ad=this.sc;X.globalAlpha=this.alpha;X.setTransform(ad,0,0,ad,0,0);X.fillStyle=this.colour;ac.shadow&&this.SetShadowColour(X,ac.shadow,this.alpha);X.font=this.font;aa=this.w;i=this.h;Z+=(ab/ad)-(aa/2);Y+=(j/ad)-(i/2);X.fillText(this.name,Z,Y)};J.DrawImage=function(Z,af,Y){var ac=this.x,aa=this.y,ag=this.sc,j=this.image,ad=this.w,X=this.h,ab=this.alpha,ae=this.shadow;Z.globalAlpha=ab;Z.setTransform(ag,0,0,ag,0,0);Z.fillStyle=this.colour;ae&&this.SetShadowColour(Z,ae,ab);ac+=(af/ag)-(ad/2);aa+=(Y/ag)-(X/2);Z.drawImage(j,ac,aa,ad,X)};J.DrawImageIE=function(Z,ad,Y){var j=this.image,ae=this.sc,ac=j.width=this.w*ae,X=j.height=this.h*ae,ab=(this.x*ae)+ad-(ac/2),aa=(this.y*ae)+Y-(X/2);Z.setTransform(1,0,0,1,0,0);Z.globalAlpha=this.alpha;Z.drawImage(j,ab,aa)};J.Calc=function(Z,Y){var i=a(this.p3d,Z),j=this.tc,aa=j.minBrightness,X=j.radius;this.p3d=b(i,Y);i=S(j,this.p3d,this.w,this.h,j.stretchX,j.stretchY);this.x=i.x;this.y=i.y;this.sc=(j.z1+j.z2-i.z)/j.z2;this.alpha=z(aa,V(1,aa+1-((i.z-j.z2+X)/(2*X))))};J.CheckActive=function(Y,ac,X){var ad=this.tc,i=this.outline,ab=this.w,j=this.h,aa=this.x-ab/2,Z=this.y-j/2;i.Update(aa,Z,ab,j,this.sc,this.p3d,ac,X);return i.Active(Y,ad.mx,ad.my)?i:null};J.Clicked=function(aa){var j=this.a,X=j.target,Y=j.href,i;if(X!=""&&X!="_self"){if(self.frames[X]){self.frames[X]=Y}else{try{if(top.frames[X]){top.frames[X]=Y;return}}catch(Z){}window.open(Y,X)}return}if(l.createEvent){i=l.createEvent("MouseEvents");i.initMouseEvent("click",1,1,window,0,0,0,0,0,0,0,0,0,0,null);if(!j.dispatchEvent(i)){return}}else{if(j.fireEvent){if(!j.fireEvent("onclick")){return}}}l.location=Y};function s(){var j,X={mx:-1,my:-1,z1:20000,z2:20000,z0:0.0002,freezeActive:false,activeCursor:"pointer",pulsateTo:1,pulsateTime:3,reverse:false,depth:0.5,maxSpeed:0.05,minSpeed:0,decel:0.95,interval:20,initial:null,initialDecel:false,deadZone:0,hideTags:true,minBrightness:0.1,outlineColour:"#ffff99",outlineThickness:2,outlineOffset:5,outlineMethod:"outline",textColour:"#ff99ff",textHeight:15,textFont:"Helvetica, Arial, sans-serif",shadow:"#000",shadowBlur:0,shadowOffset:[0,0],zoom:1,weight:false,weightMode:"size",weightFrom:null,weightSize:1,weightGradient:{0:"#f00",0.33:"#ff0",0.66:"#0f0",1:"#00f"},txtOpt:true,txtScale:2,frontSelect:false,wheelZoom:true,zoomMin:0.3,zoomMax:3,zoomStep:0.05,shape:"sphere",lock:null,tooltip:null,tooltipDelay:300,tooltipClass:"tctooltip",radiusX:1,radiusY:1,radiusZ:1,stretchX:1,stretchY:1,shuffleTags:false,noSelect:false,noMouse:false,imageScale:1};for(j in X){this[j]=X[j]}this.max_weight=0;this.min_weight=200}d=s.prototype;d.Draw=function(){var ag=this.canvas,ae=ag.width,X=ag.height,j=0,ad=this.yaw,Y=this.pitch,Z=ae/2,aj=X/2,ah=this.ctxt,ab,ai,af,ac=-1,al=this.taglist,aa=al.length,ak=this.frontSelect;if(ad==0&&Y==0&&this.drawn&&!this.deadZoneActive){return this.Animate(ae,X)}ah.setTransform(1,0,0,1,0,0);this.active=null;for(af=0;af=0&&this.my>=0&&al[af].CheckActive(ah,Z,aj);if(ai&&ai.sc>j&&(!ak||ai.z<=0)){ab=ai;ab.index=ac=af;j=ai.sc}}this.active=ab;if(!this.txtOpt&&this.shadow){ah.shadowBlur=this.shadowBlur;ah.shadowOffsetX=this.shadowOffset[0];ah.shadowOffsetY=this.shadowOffset[1]}ah.clearRect(0,0,ae,X);for(af=0;af=0&&aa>=0&&abae){this.yaw=ad>X.z0?X.yaw*X.decel:0}if(j!="y"&&Y>ae){this.pitch=Y>X.z0?X.pitch*X.decel:0}}}};d.Zoom=function(i){this.z2=this.z1*(1/i);this.drawn=0};d.Clicked=function(Y){var X=this.taglist,i=this.active;try{if(i&&X[i.index]){X[i.index].Clicked(Y)}}catch(j){}};d.Wheel=function(j){var X=this.zoom+this.zoomStep*(j?1:-1);this.zoom=V(this.zoomMax,z(this.zoomMin,X));this.Zoom(this.zoom)};s.tc={};jQuery.fn.tagcanvas=function(X,j){var i,Y=j?jQuery("#"+j):this;if(l.all&&!j){return false}i=Y.find("a");if(N(window.G_vmlCanvasManager)){this.each(function(){I(this)[0]=window.G_vmlCanvasManager.initElement(I(this)[0])});X.ie=parseFloat(navigator.appVersion.split("MSIE")[1])}if(!i.length||!this[0].getContext||!this[0].getContext("2d").fillText){return false}this.each(function(){var ab,Z,ad,ag,ah,ac,af,ae=[],aa={sphere:n,vcylinder:w,hcylinder:F};j||(i=I(this).find("a"));ac=new s;for(ab in X){ac[ab]=X[ab]}ac.z1=(19800/(Math.exp(ac.depth)*(1-1/Math.E)))+20000-19800/(1-(1/Math.E));ac.z2=ac.z1*(1/ac.zoom);ac.radius=(this.height>this.width?this.width:this.height)*0.33*(ac.z2+ac.z1)/(ac.z1);ac.yaw=ac.initial?ac.initial[0]*ac.maxSpeed:0;ac.pitch=ac.initial?ac.initial[1]*ac.maxSpeed:0;ac.canvas=I(this)[0];ac.ctxt=ac.canvas.getContext("2d");ac.textFont=ac.textFont&&t(ac.textFont);ac.deadZone*=1;ac.pulsateTo*=1;ac.textHeight*=1;ac.minBrightness*=1;ac.ctxt.textBaseline="top";if(ac.shadowBlur||ac.shadowOffset[0]||ac.shadowOffset[1]){ac.ctxt.shadowColor=ac.shadow;ac.shadow=ac.ctxt.shadowColor;ac.shadowAlpha=v()}else{delete ac.shadow}ac.taglist=[];ac.shape=aa[ac.shape]||aa.sphere;Z=ac.shape(i.length,ac.radiusX,ac.radiusY,ac.radiusZ);ac.shuffleTags&&H(Z);ac.listLength=i.length;for(ab=0;abac.max_weight){ac.max_weight=af}if(afac.min_weight)){for(ab=0;ab + +
+

+ +

+

+ excanvas to maintain compatibility with pre-9.0 Internet Explorer.") ?> +

+

+ here.") ?> +

+ +
diff --git a/3.0/modules/tag_cloud_html5/views/tag_cloud_html5_block.html.php b/3.0/modules/tag_cloud_html5/views/tag_cloud_html5_block.html.php new file mode 100644 index 00000000..68d12e47 --- /dev/null +++ b/3.0/modules/tag_cloud_html5/views/tag_cloud_html5_block.html.php @@ -0,0 +1,38 @@ + + + +
+ + + +
+
+ +
+ + diff --git a/3.0/modules/tag_cloud_html5/views/tag_cloud_html5_page.html.php b/3.0/modules/tag_cloud_html5/views/tag_cloud_html5_page.html.php new file mode 100644 index 00000000..c8d58b97 --- /dev/null +++ b/3.0/modules/tag_cloud_html5/views/tag_cloud_html5_page.html.php @@ -0,0 +1,38 @@ + + + +
+
+ dynamic_top() ?> +
+

+
+
+ + + +
+
+ +
+dynamic_bottom() ?>