mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-01 09:51:22 +02:00
- yweb: add new function 'add_yExtensions()' to avoid duplicate code
* remove prefix '-' from added items * add class 'y_menu_sec_ext' to added items * rename unused class 'y_menu_prim_item' to 'y_menu_prim_ext'
This commit is contained in:
@@ -56,17 +56,7 @@ function set_mode(_mode){
|
|||||||
function init(){
|
function init(){
|
||||||
volumen_set_audiobar(volumen_get());
|
volumen_set_audiobar(volumen_get());
|
||||||
set_mute_button();
|
set_mute_button();
|
||||||
var menu=ext.select_menu('boxcontrol');
|
add_yExtensions('boxcontrol', 'secmenu_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});
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
}
|
||||||
//]]>
|
//]]>
|
||||||
</script>
|
</script>
|
||||||
|
@@ -5,16 +5,7 @@
|
|||||||
<script type="text/javascript" src="/Y_yweb.js"></script>
|
<script type="text/javascript" src="/Y_yweb.js"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function init(){
|
function init(){
|
||||||
var menu=ext.select_menu('info');
|
add_yExtensions('info', 'secmenu_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_info').insert({'bottom':el});
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
@@ -22,36 +22,9 @@ function epg_plus_popup() {
|
|||||||
window.open("Y_EPG_Plus.yhtm","_blank","resizable=yes,scrollbars=yes");
|
window.open("Y_EPG_Plus.yhtm","_blank","resizable=yes,scrollbars=yes");
|
||||||
}
|
}
|
||||||
function init(){
|
function init(){
|
||||||
var menu=ext.select_menu('live');
|
add_yExtensions('live', 'secmenu_live');
|
||||||
menu.each(function(e){
|
add_yExtensions('epg', 'secmenu_epg');
|
||||||
var el=new Element('li').update(
|
add_yExtensions('timer', 'secmenu_timer');
|
||||||
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});
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
//]]>
|
//]]>
|
||||||
</script>
|
</script>
|
||||||
|
@@ -177,8 +177,6 @@ tr {
|
|||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
padding: 0em 0.3em;
|
padding: 0em 0.3em;
|
||||||
}
|
}
|
||||||
.y_menu_prim_item {
|
|
||||||
}
|
|
||||||
.y_menu_prim li a {
|
.y_menu_prim li a {
|
||||||
font-size: 11pt;
|
font-size: 11pt;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
@@ -191,6 +189,10 @@ tr {
|
|||||||
.y_menu_prim li a:hover {
|
.y_menu_prim li a:hover {
|
||||||
color: #FF6600;
|
color: #FF6600;
|
||||||
}
|
}
|
||||||
|
/*extensions*/
|
||||||
|
.y_menu_prim_ext {
|
||||||
|
}
|
||||||
|
|
||||||
#box_name {
|
#box_name {
|
||||||
font-weight:normal;
|
font-weight:normal;
|
||||||
font-size:10pt;
|
font-size:10pt;
|
||||||
@@ -280,6 +282,10 @@ tr {
|
|||||||
.y_menu_sec ul li:first-child {
|
.y_menu_sec ul li:first-child {
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
}
|
}
|
||||||
|
/*extensions*/
|
||||||
|
.y_menu_sec_ext {
|
||||||
|
}
|
||||||
|
|
||||||
.y_menu_popup_link {
|
.y_menu_popup_link {
|
||||||
float: right;
|
float: right;
|
||||||
margin-right: 15px;
|
margin-right: 15px;
|
||||||
|
@@ -46,16 +46,7 @@ function i_start(){
|
|||||||
g_i_counter = 0;
|
g_i_counter = 0;
|
||||||
i_clock();
|
i_clock();
|
||||||
g_i_active = window.setInterval('i_interval()', 1000);
|
g_i_active = window.setInterval('i_interval()', 1000);
|
||||||
var mainmenu=ext.select_menu('main');
|
add_yExtensions('main', 'menu_prim');
|
||||||
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});
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
function i_stop(){
|
function i_stop(){
|
||||||
window.clearInterval(g_i_active);
|
window.clearInterval(g_i_active);
|
||||||
|
@@ -5,36 +5,9 @@
|
|||||||
<script type="text/javascript" src="/Y_yweb.js"></script>
|
<script type="text/javascript" src="/Y_yweb.js"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function init(){
|
function init(){
|
||||||
var menu=ext.select_menu('settings_general');
|
add_yExtensions('settings_general', 'secmenu_general');
|
||||||
menu.each(function(e){
|
add_yExtensions('settings_neutrino', 'secmenu_neutrino');
|
||||||
var el=new Element('li').update(
|
add_yExtensions('settings_plugins', 'secmenu_plugins');
|
||||||
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});
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
@@ -7,36 +7,9 @@ function cmd_popup(){
|
|||||||
window.open('Y_Tools_Cmd.yhtm','cmd','width=720,height=470,resizable=yes');
|
window.open('Y_Tools_Cmd.yhtm','cmd','width=720,height=470,resizable=yes');
|
||||||
}
|
}
|
||||||
function init(){
|
function init(){
|
||||||
var menu=ext.select_menu('tools');
|
add_yExtensions('tools', 'secmenu_tools');
|
||||||
menu.each(function(e){
|
add_yExtensions('expert', 'secmenu_expert');
|
||||||
var el=new Element('li').update(
|
add_yExtensions('yweb', 'secmenu_yweb');
|
||||||
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});
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
version=2.8.0.38
|
version=2.8.0.39
|
||||||
date=05.07.2013
|
date=05.07.2013
|
||||||
type=Release
|
type=Release
|
||||||
info=Port CST
|
info=Port CST
|
||||||
|
@@ -182,6 +182,22 @@ Object.extend(Y.extension.prototype, {
|
|||||||
},this);
|
},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*/
|
/* singleton pattern*/
|
||||||
if (window == top.top_main.prim_menu) {
|
if (window == top.top_main.prim_menu) {
|
||||||
var ext = new Y.extension();
|
var ext = new Y.extension();
|
||||||
|
Reference in New Issue
Block a user