Changeset 28443 for extensions/modus
- Timestamp:
- May 12, 2014, 1:13:56 PM (10 years ago)
- Location:
- extensions/modus
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/modus/admin/admin.inc.php
r27151 r28443 26 26 foreach ($bool_values as $k ) 27 27 $my_conf[$k] = isset($_POST[$k]) ? true:false; 28 29 if (!isset($_POST['use_album_square_thumbs'])) 30 { 31 $my_conf['album_thumb_size'] = 0; 32 } 33 28 34 // int/double 29 35 $my_conf['album_thumb_size'] = max(0, $my_conf['album_thumb_size']); … … 32 38 33 39 global $page; 34 $page['infos'][] = 'options saved !';40 $page['infos'][] = l10n('Information data registered in database'); 35 41 } 36 42 … … 43 49 foreach ($bool_values as $k ) 44 50 $template->assign( strtoupper($k), $my_conf[$k] ); 51 52 // we don't use square thumbs if the thumb size is 0 53 $template->assign('use_album_square_thumbs', 0 != $my_conf['album_thumb_size']); 54 55 if (0 == $my_conf['album_thumb_size']) 56 { 57 $template->assign('ALBUM_THUMB_SIZE', 250); 58 } 45 59 46 60 $available_derivatives = array( ''=> 'Default'); -
extensions/modus/admin/modus_admin.tpl
r27151 r28443 1 {combine_script id='common' load='footer' path='admin/themes/default/js/common.js'} 2 {combine_script id='jquery.ui.slider' require='jquery.ui' load='footer' path='themes/default/js/ui/minified/jquery.ui.slider.min.js'} 3 {combine_css path="themes/default/js/ui/theme/jquery.ui.slider.css"} 4 5 {html_style} 6 .graphicalCheckbox { 7 font-size:16px; 8 line-height:16px; 9 } 10 11 .graphicalCheckbox + input { 12 display:none; 13 } 14 15 #album_thumb_size { 16 width:400px; 17 display:inline-block; 18 margin-right:10px; 19 } 20 21 #album_square_thumbs { 22 margin-top:5px; 23 } 24 {/html_style} 25 26 27 {footer_script} 28 jQuery(document).ready(function() { 29 jQuery('#modus-config input[type=checkbox]').change(function() { 30 jQuery(this).prev().toggleClass('icon-check icon-check-empty'); 31 }); 32 33 jQuery('input[name=use_album_square_thumbs]').change(function() { 34 jQuery('#album_square_thumbs').toggle(); 35 }); 36 37 jQuery("#album_thumb_size").slider({ 38 range: "min", 39 min: 200, 40 max: 400, 41 value: {$ALBUM_THUMB_SIZE}, 42 slide: function( event, ui ) { 43 jQuery("#album_thumb_size_info").html(sprintf("{'%d pixels'|translate}", ui.value)); 44 }, 45 stop: function( event, ui ) { 46 jQuery("input[name=album_thumb_size]").val(ui.value); 47 } 48 }); 49 50 }); 51 {/footer_script} 52 1 53 <h2>Modus theme config</h2> 2 54 3 <form method="post" action="" >55 <form method="post" action="" id="modus-config"> 4 56 5 57 … … 11 63 12 64 <fieldset><legend>Album thumbs size</legend> 13 Use square thumbs of <input type="text" size="4" name="album_thumb_size" value="{$ALBUM_THUMB_SIZE}"> pixels. (Leave 0 for default theme presentation) 65 <label> 66 <span class="graphicalCheckbox icon-check{if not $use_album_square_thumbs}-empty{/if}"></span> 67 <input type="checkbox" name="use_album_square_thumbs"{if $use_album_square_thumbs} checked="checked"{/if}> 68 <b>{'Use square thumbs'|translate}</b> 69 </label> 70 71 <div id="album_square_thumbs"{if not $use_album_square_thumbs} style="display:none"{/if}> 72 <div id="album_thumb_size"></div> 73 <span id="album_thumb_size_info">{'%d pixels'|translate|sprintf:$ALBUM_THUMB_SIZE}</span> 74 <input type="hidden" name="album_thumb_size" value="{$ALBUM_THUMB_SIZE}"> 75 </div> 76 14 77 </fieldset> 15 78 … … 34 97 </fieldset> 35 98 36 <p >37 <input type="submit" value=" Submit" />99 <p class="formButtons"> 100 <input type="submit" value="{'Save Settings'|translate}" /> 38 101 </p> 39 102 </form> -
extensions/modus/functions.inc.php
r26836 r28443 18 18 return array( 19 19 'skin' => 'dark', 20 'album_thumb_size' => 0,20 'album_thumb_size' => 250, 21 21 'index_photo_deriv'=>'', 22 22 'index_photo_deriv_hdpi'=>'',
Note: See TracChangeset
for help on using the changeset viewer.