Changeset 704918
- Timestamp:
- 04/28/2013 08:10:19 AM (13 years ago)
- Location:
- tagged-gallery/trunk
- Files:
-
- 1 added
- 7 edited
-
css/tg.css (modified) (1 diff)
-
js/jquery.resizecrop-1.0.3.js (modified) (6 diffs)
-
js/resize.js (modified) (1 diff)
-
js/tg.js (modified) (1 diff)
-
readme.txt (modified) (4 diffs)
-
tags (added)
-
tg.php (modified) (3 diffs)
-
tg_class.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tagged-gallery/trunk/css/tg.css
r702849 r704918 1 1 .overlay 2 2 { 3 background-color: #000; 4 opacity: .7; 5 filter: alpha(opacity=70); 6 position: fixed; top: 0; left: 0; 7 width: 100%; height: 100%; 8 z-index: 10; 3 position: fixed; top: 0; left: 0; 4 width: 100%; height: 100%; 5 z-index: 100; 9 6 } 10 7 .overlayimg 11 8 { 12 13 z-index: 11; 14 position: fixed; top: 20%; left: 20%; 15 9 z-index: 110; 10 position: fixed; center; 16 11 } 17 12 -
tagged-gallery/trunk/js/jquery.resizecrop-1.0.3.js
r702849 r704918 1 // 2 // This is a modyfied version of resize-crop 3 // https://code.google.com/p/resize-crop/ 4 // 5 1 6 jQuery(document).ready(function($){ 2 7 $.fn.resizecrop = function(options) { … … 22 27 $obj.css("display","none"); // remove blink transformation 23 28 $obj.removeAttr("width").removeAttr("height"); // remove attribute dimensions 24 options.width = $obj.attr("thumb-width"); 25 options.height = $obj.attr("thumb-height"); 29 options.width = $obj.attr("thumb-width"); // Added by Tagged Gallery 30 options.height = $obj.attr("thumb-height"); // Added by Tagged Gallery 31 26 32 27 33 // Wrapper default CSS … … 37 43 // move Classes from IMG to Wrapper element 38 44 if (options.moveClass) { 39 45 40 46 var classAttr = $obj.attr("class"); 41 47 … … 48 54 $obj.removeAttr("class"); 49 55 $obj.addClass(options.className); 50 } 56 } 51 57 } 52 58 … … 67 73 width_ratio = options.width / ref.width(); 68 74 height_ratio = options.height / ref.height(); 75 76 ref.attr("fs-width", ref.width()); 77 ref.attr("fs-height", ref.height()); 69 78 70 79 if (width_ratio > height_ratio) { … … 127 136 }; 128 137 $.fn.cropresize = $.fn.resizecrop; // -- deprecated, Backward compatibility 129 }) (jQuery);138 });(jQuery); -
tagged-gallery/trunk/js/resize.js
r702849 r704918 1 1 $j=jQuery.noConflict(); 2 2 $j(document).ready(function() { 3 $j('.tagged-gallery').resizecrop({ });4 });3 $j('.tagged-gallery').resizecrop({ }); 4 }); -
tagged-gallery/trunk/js/tg.js
r702418 r704918 1 function expandPhoto() { 2 3 // create overlay and append to page 4 var overlay = document.createElement("div"); 5 overlay.setAttribute("id","overlay"); 6 overlay.setAttribute("class", "overlay"); 7 document.body.appendChild(overlay); 8 9 // create image and append to page 10 var img = document.createElement("img"); 11 img.setAttribute("id","img"); 12 img.src = this.getAttribute("data-larger"); 13 img.setAttribute("class","overlayimg"); 14 15 // click to restore page 16 img.onclick=restore; 17 18 document.body.appendChild(img); 19 20 } 21 // restore page to normal 22 function restore() { 23 24 document.body.removeChild(document.getElementById("overlay")); 25 document.body.removeChild(document.getElementById("img")); 26 } 27 28 29 window.onload=function() { 30 var imgs = document.getElementsByClassName("tg-resizecrop"); 31 imgs[0].focus(); 32 for (var i = 0; i < imgs.length; i++) { 33 imgs[i].onclick=expandPhoto; 34 imgs[i].onkeydown=expandPhoto; 35 } 36 } 1 $j=jQuery.noConflict(); 2 $j(document).ready(function(){ 3 $j('.tg-resizecrop').click(function(event){ 4 $j(this).tgbox({}); 5 event.preventDefault(); 6 }); 7 }); -
tagged-gallery/trunk/readme.txt
r704435 r704918 5 5 Requires at least: 3.3 6 6 Tested up to: 3.5.1 7 Stable tag: 0. 6.17 Stable tag: 0.7 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 27 27 28 28 Tagged Gallery does NOT connect to any external servers. Just getting tags and images from your WordPress database 29 30 = 0.7 = 31 32 * PHPImagic is completely replaced with jQuery 33 * New view image feature created in jQuery. That now fit to screen. 34 * Support for mobile screen rotation. Image resizes to fit window resize 35 29 36 30 37 = 0.6.1 = … … 75 82 == Todo == 76 83 - Next/previous function 77 - Mobile optimization78 - User defined view size79 84 - user defined CSS 80 85 - Lose pendency to Tag Pages and WordPress Media Tags … … 82 87 == Upgrade Notice == 83 88 84 "Bugfix" 85 86 When I converted into jQuery for the thummaking, I forgot to remove hardcoded values from the jq-script and add variables. This is now fixed. 89 * PHPImagic is completely replaced with jQuery 90 * New view image feature created in jQuery. That now fit to screen. 91 * Support for mobile screen rotation. Image resizes to fit window resize -
tagged-gallery/trunk/tg.php
r702849 r704918 5 5 Description: Tagged Gallery enables you to easily generate a gallery in any post or page based on tagged media. 6 6 Author: Erik Bergh 7 Version: 0. 6.17 Version: 0.7 8 8 Author URI: http://www.bergh.me 9 9 */ … … 17 17 wp_enqueue_style( 'tg-style' ); 18 18 19 wp_register_script( 'tg- script', plugins_url( '/js/tg.js', __FILE__ ) );20 wp_enqueue_script('tg- script');19 wp_register_script( 'tg-lighbox', plugins_url( '/js/tgbox.jquery.js', __FILE__ ) ); 20 wp_enqueue_script('tg-lighbox'); 21 21 22 22 wp_register_script( 'jqresize-script', plugins_url( '/js/jquery.resizecrop-1.0.3.js', __FILE__ ) ); … … 26 26 wp_enqueue_script('resize-script'); 27 27 28 wp_register_script( 'tg-script', plugins_url( '/js/tg.js', __FILE__ ) ); 29 wp_enqueue_script('tg-script'); 30 31 32 28 33 add_filter('the_content','tg_gallery'); 29 34 -
tagged-gallery/trunk/tg_class.php
r702849 r704918 36 36 if($wpdb->num_rows>0) 37 37 { 38 $i=0; 38 39 foreach ($test as $post){ 40 $i++; 39 41 $postmime=explode('/',$post->post_mime_type); 40 42 if($postmime[0]=="image") … … 42 44 $img=substr($post->guid,strlen($server),strlen($post->guid)-strlen($server)); 43 45 44 $string="<img src=\"".$img."\" class=\"tagged-gallery\" style=\"max-width: none;\" thumb-width=\"".$width."\" thumb-height=\"".$height."\" data-larger=\"/wp-content/plugins/tagged-gallery/img.php?img=".$img."&size=700x700\" alt=\"".$img."\" /> ";46 $string="<img src=\"".$img."\" class=\"tagged-gallery\" style=\"max-width: none;\" thumb-width=\"".$width."\" picnum=\"".$i."\" thumb-height=\"".$height."\" data-larger=\"".$img."\" alt=\"Descritption\" /> "; 45 47 $sup.="<div class=\"tg-thumb\">".$string."</div>"; 46 48 //$sup.=$string;
Note: See TracChangeset
for help on using the changeset viewer.