Changeset 10863 for extensions
- Timestamp:
- May 13, 2011, 11:03:34 AM (14 years ago)
- Location:
- extensions/akBookStyle/trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/akBookStyle/trunk/css/admin.css
r10853 r10863 1 #content{text-align:left;padding-left:20px;} 2 fieldset,fieldset p{text-align:left;} 3 fieldset p.field input[type="radio"],fieldset p.field input[type="checkbox"]{margin:0 3px 0 15px;} 1 #content { 2 text-align: left; 3 padding-left: 20px; 4 } 5 6 fieldset, fieldset p { 7 text-align: left; 8 } 9 10 fieldset p.field input[type="radio"], fieldset p.field input[type="checkbox"] { 11 margin:0 3px 0 15px; 12 } -
extensions/akBookStyle/trunk/include/akContent.class.php
r10853 r10863 89 89 $template->assign('AK_THUMBNAILS_LOC', $this->plugin_config->ak_thumbnails_loc); 90 90 $template->assign('AK_PIC_SRC', get_image_url($images[$this->current_picture])); 91 $url = duplicate_picture_url(92 array(93 'image_id' => $images[$this->current_picture]['id'] ,94 'image_file' => $images[$this->current_picture]['file']95 ),96 array('start')97 );98 99 $template->assign('AK_PIC_URL', $url);100 91 101 92 $template->assign('AK_NEXT', $this->getNextPicture($this->current_picture, $images)); … … 141 132 $tpl_vars = $GLOBALS['template']->smarty->_tpl_vars; 142 133 $response['AK_PIC_SRC'] = $tpl_vars['SRC_IMG']; 143 $response['AK_PIC_URL'] = $tpl_vars['current']['url'];144 134 $response['AK_PIC_ALT'] = $tpl_vars['ALT_IMG']; 145 135 if (isset($tpl_vars['ALT_IMG'])) { -
extensions/akBookStyle/trunk/js/ak_jquery-load.js
r10853 r10863 1 $(function 1 $(function() { 2 2 next_link = $('table.thumbnails div.navbar a[rel=next]'); 3 if (next_link.length !=0) {4 $('#akNextPicture').css('visibility', 'visible')3 if (next_link.length!=0) { 4 $('#akNextPicture').css('visibility', 'visible'); 5 5 } 6 6 previous_link = $('table.thumbnails div.navbar a[rel=previous]'); 7 if (previous_link.length !=0) {8 $('#akPreviousPicture').css('visibility', 'visible')7 if (previous_link.length!=0) { 8 $('#akPreviousPicture').css('visibility', 'visible'); 9 9 } 10 $("a.load").bind(ak_mouse_event, function () { 11 $('table.thumbnails tr td.ncol').each(function () { 12 if ($(this).hasClass('selected')) { 13 $(this).removeClass('selected') 10 11 $("a.load") 12 .bind(ak_mouse_event, function() { 13 $('table.thumbnails tr td.ncol').each(function() { 14 if ($(this).hasClass('selected')) { 15 $(this).removeClass('selected'); 16 } 17 }); 18 19 $a = $(this); 20 next_thumbnail = $('table.thumbnails a[href='+$(this).attr('href')+']'); 21 if (next_thumbnail.length==0) { 22 if ($a.attr('id')=='akNextPicture') { 23 rel = 'next'; 24 } else { 25 rel = 'previous'; 26 } 27 next_link = $('table.thumbnails div.navbar a[rel='+rel+']'); 28 if (next_link.length!=0) { 29 window.location = next_link.attr('href'); 14 30 } 15 }); 16 $a = $(this); 17 //next_thumbnail = $('table.thumbnails a[href=' + $(this).attr('href') + ']'); 18 next_thumbnail = $('table.thumbnails a'); 19 if (next_thumbnail.length == 0) { 20 if ($a.attr('id') == 'akNextPicture') { 21 rel = 'next' 22 } else { 23 rel = 'previous' 24 } 25 next_link = $('table.thumbnails div.navbar a[rel=' + rel + ']'); 26 if (next_link.length != 0) { 27 window.location = next_link.attr('href') 28 } 29 } else { 31 } else { 30 32 next_thumbnail.parent().parent().parent().addClass('selected'); 31 try { 32 $.get($a.attr('href'), {}, function success(data) { 33 $('#akPicture').attr('src', data.AK_PIC_SRC).attr('alt', data.AK_PIC_ALT).attr('title', data.AK_PIC_TITLE); 34 $('.ak_pic a').attr('href', data.AK_PIC_URL); 35 if (data.AK_PREVIOUS) { 36 $('#akPreviousPicture').removeClass('hide').attr('href', data.AK_PREVIOUS) 37 } else { 38 $('#akPreviousPicture').addClass('hide') 39 } 40 if (data.AK_NEXT) { 41 $('#akNextPicture').removeClass('hide').attr('href', data.AK_NEXT) 42 } else { 43 $('#akNextPicture').addClass('hide') 44 } 45 $a.click(function (e) { 46 e.preventDefault() 47 }) 48 }, 'json') 49 } catch (e) {} 50 } 51 return false 52 }) 53 }); 33 try { 34 $.get($a.attr('href'),{}, 35 function success(data) { 36 $('#akPicture') 37 .attr('src', data.AK_PIC_SRC) 38 .attr('alt', data.AK_PIC_ALT) 39 .attr('title', data.AK_PIC_TITLE); 40 41 if (data.AK_PREVIOUS) { 42 $('#akPreviousPicture') 43 .removeClass('hide') 44 .attr('href', data.AK_PREVIOUS); 45 } else { 46 $('#akPreviousPicture').addClass('hide'); 47 } 48 if (data.AK_NEXT) { 49 $('#akNextPicture') 50 .removeClass('hide') 51 .attr('href', data.AK_NEXT); 52 } else { 53 $('#akNextPicture').addClass('hide'); 54 } 55 $a.click(function(e) { e.preventDefault();}); 56 }, 57 'json'); 58 } catch (e) {} 59 } 60 return false; 61 }); 62 }); -
extensions/akBookStyle/trunk/main.inc.php
r10853 r10863 29 29 Author URI: http://www.nikrou.net/ 30 30 */ 31 31 32 if (!defined('PHPWG_ROOT_PATH')) { 32 33 die('Hacking attempt!'); -
extensions/akBookStyle/trunk/template/admin.tpl
r10853 r10863 34 34 </p> 35 35 <p class="field"> 36 {'Event to show medium picture.'|translate}36 <label>{'Event to show medium picture.'|translate} 37 37 {html_radios name='ak_mouse_event' values=$AK_AVAILABLE_EVENTS output=$AK_EVENTS_LABELS|translate selected=$AK_MOUSE_EVENT} 38 </label> 38 39 </p> 39 40 <p class="field"> 40 {'Thumbnails location'|translate}41 <label>{'Thumbnails location'|translate} 41 42 {html_radios name="ak_thumbnails_loc" values=$AK_THUMBNAILS_LOCATIONS_KEYS output=$AK_THUMBNAILS_LOCATIONS_VALUES|translate selected="$AK_THUMBNAILS_LOC"} 43 </label> 42 44 </p> 43 45 </fieldset> -
extensions/akBookStyle/trunk/template/ak_reloaded_image.tpl
r10853 r10863 10 10 11 11 <td class="ak_pic"> 12 <a href="{$AK_PIC_URL}"> 13 <img src="{$AK_PIC_SRC}" alt="{$AK_PIC_ALT}" title="{$AK_PIC_TITLE}" id="akPicture"> 14 </a> 12 <img src="{$AK_PIC_SRC}" alt="{$AK_PIC_ALT}" title="{$AK_PIC_TITLE}" id="akPicture"> 15 13 </td> 16 14 <td class="ncol"> -
extensions/akBookStyle/trunk/template/ak_thumbnails.tpl
r10853 r10863 1 {combine_script id='ak_jquery' require='jquery' path=$AK_PLUGIN_JS|@cat:'/ak_jquery-load.js'} 2 {combine_css path=$AK_PLUGIN_CSS|@cat:'/style.css'} 3 1 {known_script id="jquery" src=$ROOT_URL|cat:"themes/default/js/jquery.packed.js"} 4 2 {html_head} 3 <link rel="stylesheet" type="text/css" href="{$AK_PLUGIN_CSS}/style.css"> 5 4 <script type="text/javascript"> 6 5 var dir_thumbnail = '{$AK_DIR_THUMBNAIL}'; … … 8 7 var ak_mouse_event = '{$AK_MOUSE_EVENT}'; 9 8 </script> 9 <script type="text/javascript" src="{$AK_PLUGIN_JS}/ak_jquery-load.js"></script> 10 10 {/html_head} 11 11
Note: See TracChangeset
for help on using the changeset viewer.