diff --git a/src/nhttpd/web/Y_Boxcontrol_Menue.yhtm b/src/nhttpd/web/Y_Boxcontrol_Menue.yhtm index 536cd1dc7..cc6da366d 100644 --- a/src/nhttpd/web/Y_Boxcontrol_Menue.yhtm +++ b/src/nhttpd/web/Y_Boxcontrol_Menue.yhtm @@ -56,17 +56,7 @@ function set_mode(_mode){ function init(){ volumen_set_audiobar(volumen_get()); set_mute_button(); - var menu=ext.select_menu('boxcontrol'); - menu.each(function(e){ - var el=new Element('li').update( - new Element('a', {'target':'work', - 'title': e.get('desc'), - 'href': e.get('file') - }).update("-"+e.get('menuitem')) - ); - $('secmenu_boxcontrol').insert({'bottom':el}); - }); - + add_yExtensions('boxcontrol', 'secmenu_boxcontrol'); } //]]> diff --git a/src/nhttpd/web/Y_Info_Menue.yhtm b/src/nhttpd/web/Y_Info_Menue.yhtm index c549d5ffc..3ea5dab60 100644 --- a/src/nhttpd/web/Y_Info_Menue.yhtm +++ b/src/nhttpd/web/Y_Info_Menue.yhtm @@ -5,16 +5,7 @@ diff --git a/src/nhttpd/web/Y_Live_Menue.yhtm b/src/nhttpd/web/Y_Live_Menue.yhtm index a92bb0d90..89457120f 100644 --- a/src/nhttpd/web/Y_Live_Menue.yhtm +++ b/src/nhttpd/web/Y_Live_Menue.yhtm @@ -22,36 +22,9 @@ function epg_plus_popup() { window.open("Y_EPG_Plus.yhtm","_blank","resizable=yes,scrollbars=yes"); } function init(){ - var menu=ext.select_menu('live'); - menu.each(function(e){ - var el=new Element('li').update( - new Element('a', {'target':'work', - 'title': e.get('desc'), - 'href': e.get('file') - }).update("-"+e.get('menuitem')) - ); - $('secmenu_live').insert({'bottom':el}); - }); - var menu=ext.select_menu('epg'); - menu.each(function(e){ - var el=new Element('li').update( - new Element('a', {'target':'work', - 'title': e.get('desc'), - 'href': e.get('file') - }).update("-"+e.get('menuitem')) - ); - $('secmenu_epg').insert({'bottom':el}); - }); - var menu=ext.select_menu('timer'); - menu.each(function(e){ - var el=new Element('li').update( - new Element('a', {'target':'work', - 'title': e.get('desc'), - 'href': e.get('file') - }).update("-"+e.get('menuitem')) - ); - $('secmenu_timer').insert({'bottom':el}); - }); + add_yExtensions('live', 'secmenu_live'); + add_yExtensions('epg', 'secmenu_epg'); + add_yExtensions('timer', 'secmenu_timer'); } //]]> diff --git a/src/nhttpd/web/Y_Main.css b/src/nhttpd/web/Y_Main.css index 7f4f979a1..1d3a39aa8 100644 --- a/src/nhttpd/web/Y_Main.css +++ b/src/nhttpd/web/Y_Main.css @@ -177,8 +177,6 @@ tr { font-weight: normal; padding: 0em 0.3em; } -.y_menu_prim_item { -} .y_menu_prim li a { font-size: 11pt; text-decoration: none; @@ -191,6 +189,10 @@ tr { .y_menu_prim li a:hover { color: #FF6600; } +/*extensions*/ +.y_menu_prim_ext { +} + #box_name { font-weight:normal; font-size:10pt; @@ -280,6 +282,10 @@ tr { .y_menu_sec ul li:first-child { margin-top: 5px; } +/*extensions*/ +.y_menu_sec_ext { +} + .y_menu_popup_link { float: right; margin-right: 15px; diff --git a/src/nhttpd/web/Y_Menue.yhtm b/src/nhttpd/web/Y_Menue.yhtm index 0ba6a9ad0..121d3e5b7 100644 --- a/src/nhttpd/web/Y_Menue.yhtm +++ b/src/nhttpd/web/Y_Menue.yhtm @@ -46,16 +46,7 @@ function i_start(){ g_i_counter = 0; i_clock(); g_i_active = window.setInterval('i_interval()', 1000); - var mainmenu=ext.select_menu('main'); - mainmenu.each(function(e){ - var el=new Element('li').update( - new Element('a', {'class':'y_menu_prim_item', 'target':'base', - 'title': e.get('desc'), - 'href': e.get('file') - }).update(e.get('menuitem')) - ); - $('menu_prim').insert({'bottom':el}); - }); + add_yExtensions('main', 'menu_prim'); } function i_stop(){ window.clearInterval(g_i_active); diff --git a/src/nhttpd/web/Y_Settings_Menue.yhtm b/src/nhttpd/web/Y_Settings_Menue.yhtm index 2769674bf..72d4f9f20 100644 --- a/src/nhttpd/web/Y_Settings_Menue.yhtm +++ b/src/nhttpd/web/Y_Settings_Menue.yhtm @@ -5,36 +5,9 @@ diff --git a/src/nhttpd/web/Y_Tools_Menue.yhtm b/src/nhttpd/web/Y_Tools_Menue.yhtm index 6cf1ac3e5..aa4a47799 100644 --- a/src/nhttpd/web/Y_Tools_Menue.yhtm +++ b/src/nhttpd/web/Y_Tools_Menue.yhtm @@ -7,36 +7,9 @@ function cmd_popup(){ window.open('Y_Tools_Cmd.yhtm','cmd','width=720,height=470,resizable=yes'); } function init(){ - var menu=ext.select_menu('tools'); - menu.each(function(e){ - var el=new Element('li').update( - new Element('a', {'target':'work', - 'title': e.get('desc'), - 'href': e.get('file') - }).update("-"+e.get('menuitem')) - ); - $('secmenu_tools').insert({'bottom':el}); - }); - var menu=ext.select_menu('expert'); - menu.each(function(e){ - var el=new Element('li').update( - new Element('a', {'target':'work', - 'title': e.get('desc'), - 'href': e.get('file') - }).update("-"+e.get('menuitem')) - ); - $('secmenu_expert').insert({'bottom':el}); - }); - var menu=ext.select_menu('yweb'); - menu.each(function(e){ - var el=new Element('li').update( - new Element('a', {'target':'work', - 'title': e.get('desc'), - 'href': e.get('file') - }).update("-"+e.get('menuitem')) - ); - $('secmenu_yweb').insert({'bottom':el}); - }); + add_yExtensions('tools', 'secmenu_tools'); + add_yExtensions('expert', 'secmenu_expert'); + add_yExtensions('yweb', 'secmenu_yweb'); } diff --git a/src/nhttpd/web/Y_Version.txt b/src/nhttpd/web/Y_Version.txt index 21f61c8ad..31639c62c 100644 --- a/src/nhttpd/web/Y_Version.txt +++ b/src/nhttpd/web/Y_Version.txt @@ -1,4 +1,4 @@ -version=2.8.0.38 +version=2.8.0.39 date=05.07.2013 type=Release info=Port CST diff --git a/src/nhttpd/web/Y_yweb.js b/src/nhttpd/web/Y_yweb.js index a73bdd7a1..ecd729d2a 100644 --- a/src/nhttpd/web/Y_yweb.js +++ b/src/nhttpd/web/Y_yweb.js @@ -182,6 +182,22 @@ Object.extend(Y.extension.prototype, { },this); } }); + +function add_yExtensions(_ymenu, _id) { + var menu=ext.select_menu(_ymenu); + menu.each(function(e){ + var el=new Element('li').update( + new Element('a', { + 'class': (_ymenu == 'main') ? 'y_menu_prim_ext' : 'y_menu_sec_ext', + 'target': (_ymenu == 'main') ? 'base' : 'work', + 'title': e.get('desc'), + 'href': e.get('file') + }).update(e.get('menuitem')) + ); + $(_id).insert({'bottom':el}); + }); +} + /* singleton pattern*/ if (window == top.top_main.prim_menu) { var ext = new Y.extension();