Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision fe7ce01d

Von Sven Schöling vor etwa 12 Jahren hinzugefügt

  • ID fe7ce01de366afa8ecfd1fafc5e355097eae1197
  • Vorgänger c0589062
  • Nachfolger ca5da06d

switch_menu script und transition

Unterschiede anzeigen:

css/lx-office-erp/menu.css
295 295
   each line is a mi (menuitem) and has one mii (menu-item-icon) whcih is ms (menu-spacer)
296 296
   and one mic (menu-item-chunk)
297 297
   indenting is done with the levels s0, s1, s2 */
298
#html-menu { float:left; width: 183px; font-size: 8pt; margin-top: 10px; }
298
#content.html-menu, #html-menu {
299
  transition:         margin-left 0.2s, width 0.2s;
300
  -moz-transition:    margin-left 0.2s, width 0.2s;
301
  -webkit-transition: margin-left 0.2s, width 0.2s;
302
  -o-transition:      margin-left 0.2s, width 0.2s;
303
}
304
#content.html-menu { margin-left: 190px; }
305
#content.html-menu.folded { margin-left: 40px }
306
#html-menu.folded:hover + #content.html-menu.folded { margin-left: 190px }
307
#html-menu { float:left; width: 183px; font-size: 8pt; margin-top: 10px; overflow:hidden; }
308
#html-menu.folded { width: 32px; }
309
#html-menu.folded:hover { width: 183px; }
299 310
#html-menu div.mi { margin-top: 4px; margin-bottom: 3px; white-space: nowrap; clear:both; position:relative; }
300 311
#html-menu div.sm { font-weight: bold }
301 312
#html-menu img { vertical-align: top; border: 0; }
......
312 323
#html-menu div.s0 { padding-left: 2px }
313 324
#html-menu div.s1 { padding-left: 8px }
314 325
#html-menu div.s2 { padding-left: 16px }
315
#content.html-menu { margin-left: 190px }
316 326

  
317 327
body { margin: 0 }
js/switchmenuframe.js
1
var vSwitch_Menu = 1;
2
var Frame;
3
var FrameSize;
4

  
1
var vSwitch_Menu = 0;
5 2
function Switch_Menu() {
6
  if (Frame) {
7
    Frame.attr('cols',vSwitch_Menu ? '30,*' : FrameSize);
8
    vSwitch_Menu=!vSwitch_Menu;
3
  vSwitch_Menu=!vSwitch_Menu;
4
  SetMenuFolded(vSwitch_Menu);
5
  $.cookie('html-menu-folded', vSwitch_Menu);
6
}
7
function SetMenuFolded(on) {
8
  if (on) {
9
    $('#html-menu').removeClass('folded');
10
    $('#content').removeClass('folded');
11
  } else {
12
    $('#html-menu').addClass('folded');
13
    $('#content').addClass('folded');
9 14
  }
10 15
}
11

  
12 16
$(function(){
13
  Frame = $(parent.document.getElementById('menuframe'));
14
  FrameSize = Frame.attr('cols');
17
  vSwitch_Menu = $.cookie('html-menu-folded');
18
  SetMenuFolded(vSwitch_Menu);
15 19
})

Auch abrufbar als: Unified diff