[ Index ] |
|
Code source de Horde 3.1.3 |
1 <div id="expandedSidebar" style="overflow:hidden"> 2 <div id="menu" style="overflow:hidden"> 3 <?php if (!empty($conf['logo']['image']) || !Util::getFormData('mozbar')): ?> 4 <span class="leftFloat"<?php if (empty($conf['logo']['image'])) echo ' id="themelogo"' ?>> 5 <?php 6 if (!empty($conf['logo']['image'])) { 7 if (!empty($conf['logo']['link'])) { 8 echo Horde::link($conf['logo']['link'], null, null, '_top'); 9 } 10 echo Horde::img($conf['logo']['image'], '', '', ''); 11 if (!empty($conf['logo']['link'])) { 12 echo '</a>'; 13 } 14 } else { 15 echo ' '; 16 } 17 ?> 18 </span> 19 <span class="leftFloat" id="logopad"> </span> 20 <div class="clear"> </div> 21 <?php endif; ?> 22 </div> 23 <span id="expandButton" class="rightFloat"><?php if (!$is_mozbar) echo Horde::link('#', _("Collapse Sidebar"), '', '', 'toggleMenuFrame(); return false;', _("Collapse Sidebar")) . Horde::img('hide_panel.png') . '</a>' ?></span> 24 <div id="sidebarPanel"> 25 <?php $tree->renderTree() ?> 26 </div> 27 </div> 28 29 <div id="hiddenSidebar"> 30 <div id="menu"> 31 </div> 32 <?php echo Horde::link('#', '', '', '', 'toggleMenuFrame(); return false;') . Horde::img('show_panel.png') . '</a>' ?> 33 </div> 34 35 <script type="text/javascript"> 36 37 var rtl = <?php echo $rtl ? 'true' : 'false' ?>; 38 var expandedSidebar = new Horde_Hideable('expandedSidebar'); 39 var hiddenSidebar = new Horde_Hideable('hiddenSidebar'); 40 hiddenSidebar.hide(); 41 42 function getCookie(name, deflt) 43 { 44 var dc = document.cookie; 45 var prefix = name + '='; 46 var begin = dc.indexOf('; ' + prefix); 47 if (begin == -1) { 48 begin = dc.indexOf(prefix); 49 if (begin != 0) { 50 return deflt; 51 } 52 } else { 53 begin += 2; 54 } 55 var end = document.cookie.indexOf(';', begin); 56 if (end == -1) { 57 end = dc.length; 58 } 59 return unescape(dc.substring(begin + prefix.length, end)); 60 } 61 62 function toggleMenuFrame() 63 { 64 if (parent && parent.document.getElementById('hf')) { 65 if (expandedSidebar.shown()) { 66 parent.document.getElementById('hf').cols = rtl ? '*,20' : '20,*'; 67 expandedSidebar.hide(); 68 hiddenSidebar.show(); 69 } else { 70 parent.document.getElementById('hf').cols = (rtl ? '*,' : '') + <?php echo (isset($prefs) ? $prefs->getValue('sidebar_width') : 150) ?> + (rtl ? '' : ',*'); 71 hiddenSidebar.hide(); 72 expandedSidebar.show(); 73 } 74 75 // Expire in one year. 76 var expires = new Date(); 77 expires.setTime(expires.getTime() + 31536000000); 78 document.cookie = 'horde_sidebar_expanded=' + expandedSidebar.shown() + ';DOMAIN=<?php echo $GLOBALS['conf']['cookie']['domain'] ?>;PATH=<?php echo $GLOBALS['conf']['cookie']['path'] ?>;expires=' + expires.toGMTString(); 79 } 80 } 81 82 if (getCookie('horde_sidebar_expanded', true).toString() != expandedSidebar.shown().toString()) { 83 toggleMenuFrame(); 84 } 85 86 var MenuUpdateHandler = { 87 onLoad: function(result) 88 { 89 // Run the javascript we got back. 90 eval(result); 91 } 92 }; 93 94 function update() 95 { 96 var client = new HTTPClient(); 97 client.init("<?php echo Horde::applicationUrl('services/portal/sidebar.php?httpclient=1', true) ?>"); 98 99 try { 100 client.asyncGET(MenuUpdateHandler); 101 } catch (e) { 102 // Don't do anything on errors; probably a transient failure, 103 // and we'll try again after the next interval. 104 } 105 window.setTimeout('update();', <?php echo $prefs->getValue('menu_refresh_time') ?> * 1000); 106 } 107 108 <?php if ($prefs->getValue('menu_refresh_time')): ?> 109 // Update the menu if set in user prefs. 110 <?php if ($GLOBALS['browser']->hasFeature('xmlhttpreq')): ?> 111 window.setTimeout('update();', <?php echo $prefs->getValue('menu_refresh_time') ?> * 1000); 112 <?php else: ?> 113 window.setTimeout('window.location.reload(true);', <?php echo $prefs->getValue('menu_refresh_time') ?> * 1000); 114 <?php endif; endif; ?> 115 116 </script> 117 118 <?php if (isset($GLOBALS['notification'])) $GLOBALS['notification']->notify(array('listeners' => array('javascript'))) ?> 119 120 </body> 121 </html>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Feb 25 18:01:28 2007 | par Balluche grâce à PHPXref 0.7 |