Project "Tuxbox-GIT: apps": The branch, master has been updated via c1cf01815f4f773d3ccedc83cc0f80fae53cbc93 (commit) from 4bd37d828870929f2f3754fd25bfe2f6e2675ca6 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit c1cf01815f4f773d3ccedc83cc0f80fae53cbc93 Author: svenhoefer <svenhoe...@svenhoefer.com> Date: Thu Mar 12 18:37:33 2015 +0100 yweb: add new function 'add_yExtensions()' to avoid duplicate code remove prefix '-' from added items Signed-off-by: GetAway <get-a...@t-online.de> diff --git a/tuxbox/neutrino/daemons/nhttpd/web/Y_Boxcontrol_Menue.yhtm b/tuxbox/neutrino/daemons/nhttpd/web/Y_Boxcontrol_Menue.yhtm index a3e1a80..4140630 100644 --- a/tuxbox/neutrino/daemons/nhttpd/web/Y_Boxcontrol_Menue.yhtm +++ b/tuxbox/neutrino/daemons/nhttpd/web/Y_Boxcontrol_Menue.yhtm @@ -62,17 +62,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').insert({'bottom':el}); - }); - + add_yExtensions('boxcontrol', 'secmenu_boxcontrol'); } //]]> </script> diff --git a/tuxbox/neutrino/daemons/nhttpd/web/Y_Info_Menue.yhtm b/tuxbox/neutrino/daemons/nhttpd/web/Y_Info_Menue.yhtm index 4ac674f..9dc8991 100644 --- a/tuxbox/neutrino/daemons/nhttpd/web/Y_Info_Menue.yhtm +++ b/tuxbox/neutrino/daemons/nhttpd/web/Y_Info_Menue.yhtm @@ -5,16 +5,7 @@ <script type="text/javascript" src="/Y_yweb.js"></script> <script type="text/javascript"> function init(){ - var menu=ext.select_menu('info'); - 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').insert({'bottom':el}); - }); + add_yExtensions('info', 'secmenu_info'); } </script> </head> diff --git a/tuxbox/neutrino/daemons/nhttpd/web/Y_Live_Menue.yhtm b/tuxbox/neutrino/daemons/nhttpd/web/Y_Live_Menue.yhtm index 2781d89..b3aef57 100644 --- a/tuxbox/neutrino/daemons/nhttpd/web/Y_Live_Menue.yhtm +++ b/tuxbox/neutrino/daemons/nhttpd/web/Y_Live_Menue.yhtm @@ -22,26 +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('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'); } //]]> </script> diff --git a/tuxbox/neutrino/daemons/nhttpd/web/Y_Menue.yhtm b/tuxbox/neutrino/daemons/nhttpd/web/Y_Menue.yhtm index 851bec9..2e4199d 100644 --- a/tuxbox/neutrino/daemons/nhttpd/web/Y_Menue.yhtm +++ b/tuxbox/neutrino/daemons/nhttpd/web/Y_Menue.yhtm @@ -50,16 +50,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() { diff --git a/tuxbox/neutrino/daemons/nhttpd/web/Y_Settings_Menue.yhtm b/tuxbox/neutrino/daemons/nhttpd/web/Y_Settings_Menue.yhtm index 4608091..da764a7 100644 --- a/tuxbox/neutrino/daemons/nhttpd/web/Y_Settings_Menue.yhtm +++ b/tuxbox/neutrino/daemons/nhttpd/web/Y_Settings_Menue.yhtm @@ -5,36 +5,9 @@ <script type="text/javascript" src="/Y_yweb.js"></script> <script type="text/javascript"> function init(){ - var menu=ext.select_menu('settings_general'); - 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_general').insert({'bottom':el}); - }); - var menu=ext.select_menu('settings_neutrino'); - 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_neutrino').insert({'bottom':el}); - }); - var menu=ext.select_menu('settings_plugins'); - 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_plugins').insert({'bottom':el}); - }); + add_yExtensions('settings_general', 'secmenu_general'); + add_yExtensions('settings_neutrino', 'secmenu_neutrino'); + add_yExtensions('settings_plugins', 'secmenu_plugins'); } </script> </head> diff --git a/tuxbox/neutrino/daemons/nhttpd/web/Y_Tools_Menue.yhtm b/tuxbox/neutrino/daemons/nhttpd/web/Y_Tools_Menue.yhtm index 316936d..c34cef8 100644 --- a/tuxbox/neutrino/daemons/nhttpd/web/Y_Tools_Menue.yhtm +++ b/tuxbox/neutrino/daemons/nhttpd/web/Y_Tools_Menue.yhtm @@ -7,26 +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}); - }); + add_yExtensions('tools', 'secmenu_tools'); + add_yExtensions('expert', 'secmenu_expert'); + add_yExtensions('yweb', 'secmenu_yweb'); } </script> </head> diff --git a/tuxbox/neutrino/daemons/nhttpd/web/Y_Version.txt b/tuxbox/neutrino/daemons/nhttpd/web/Y_Version.txt index d116d59..2d2231c 100644 --- a/tuxbox/neutrino/daemons/nhttpd/web/Y_Version.txt +++ b/tuxbox/neutrino/daemons/nhttpd/web/Y_Version.txt @@ -1,4 +1,4 @@ -version=2.8.0.5 +version=2.8.0.6 date=12.03.2015 type=Release info=Tuxbox diff --git a/tuxbox/neutrino/daemons/nhttpd/web/Y_yweb.js b/tuxbox/neutrino/daemons/nhttpd/web/Y_yweb.js index 6691391..ecd729d 100644 --- a/tuxbox/neutrino/daemons/nhttpd/web/Y_yweb.js +++ b/tuxbox/neutrino/daemons/nhttpd/web/Y_yweb.js @@ -1,7 +1,7 @@ /* yWeb by yjogol internal organisation of yweb - $Date: 2008/02/24 08:23:12 $ - $Revision: 1.1 $ + $Date$ + $Revision$ */ /* define namespace */ @@ -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(); ----------------------------------------------------------------------- Summary of changes: .../daemons/nhttpd/web/Y_Boxcontrol_Menue.yhtm | 12 +------ .../neutrino/daemons/nhttpd/web/Y_Info_Menue.yhtm | 11 +------ .../neutrino/daemons/nhttpd/web/Y_Live_Menue.yhtm | 23 ++------------ tuxbox/neutrino/daemons/nhttpd/web/Y_Menue.yhtm | 11 +------ .../daemons/nhttpd/web/Y_Settings_Menue.yhtm | 33 ++------------------ .../neutrino/daemons/nhttpd/web/Y_Tools_Menue.yhtm | 23 ++------------ tuxbox/neutrino/daemons/nhttpd/web/Y_Version.txt | 2 +- tuxbox/neutrino/daemons/nhttpd/web/Y_yweb.js | 20 +++++++++++- 8 files changed, 31 insertions(+), 104 deletions(-) -- Tuxbox-GIT: apps ------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ Tuxbox-cvs-commits mailing list Tuxbox-cvs-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tuxbox-cvs-commits