summaryrefslogtreecommitdiff
path: root/skins/jason/vdr.js
diff options
context:
space:
mode:
authorAndreas Brachold <vdr07@deltab.de>2010-07-21 20:32:36 +0000
committerAndreas Brachold <vdr07@deltab.de>2010-07-21 20:32:36 +0000
commit32b9ea3f0445eb738c8f2526ad83aa3f4285048b (patch)
treeac189c7fffb922e39fb7747a6164a965f4e6aea8 /skins/jason/vdr.js
parent6ae3413729aebda77dc1b4f0359a54ab0303b009 (diff)
downloadxxv-32b9ea3f0445eb738c8f2526ad83aa3f4285048b.tar.gz
xxv-32b9ea3f0445eb738c8f2526ad83aa3f4285048b.tar.bz2
jason: note update eol-style (native)
jason: remote fix wrong keycodes for adjust volume jason: allow download music files (save button on player window) jason: update group views
Diffstat (limited to 'skins/jason/vdr.js')
-rw-r--r--skins/jason/vdr.js228
1 files changed, 114 insertions, 114 deletions
diff --git a/skins/jason/vdr.js b/skins/jason/vdr.js
index f538b2a..3a77fb0 100644
--- a/skins/jason/vdr.js
+++ b/skins/jason/vdr.js
@@ -1,7 +1,7 @@
-/*
- * jason - Javascript based skin for xxv
- * Copyright(c) 2008-2009, anbr
- *
+/*
+ * jason - Javascript based skin for xxv
+ * Copyright(c) 2008-2009, anbr
+ *
* http://xxv.berlios.de/
*
* $Id$
@@ -13,108 +13,108 @@ Ext.xxv.vdrStore = function() {
return new Ext.data.Store({
baseParams:{cmd:'vl'}
,autoLoad:{params:{start:0, limit:configuration.pageSize}}
- ,reader: new Ext.xxv.jsonReader({
- fields: [
+ ,reader: new Ext.xxv.jsonReader({
+ fields: [
{name: 'id', type: 'int'},
{name: 'active', type: 'int', convert: function(x) { if(x == 'y'){ return 1;} else {return 0;} }},
- {name: 'primary', type: 'int', convert: function(x) { if(x == 'y'){ return 1;} else {return 0;} }},
+ {name: 'primary', type: 'int', convert: function(x) { if(x == 'y'){ return 1;} else {return 0;} }},
{name: 'host', type: 'string'},
{name: 'dvbtyp', type: 'string'},
- {name: 'directory', type: 'string'}
+ {name: 'directory', type: 'string'}
]
})
- ,proxy : new Ext.data.HttpProxy({
- url: XXV.help.baseURL()
- ,method: 'GET'
+ ,proxy : new Ext.data.HttpProxy({
+ url: XXV.help.baseURL()
+ ,method: 'GET'
})
,sortInfo:{field:'host', direction:'ASC'}
});
};
-Ext.xxv.vdrGrid = function(viewer) {
- this.viewer = viewer;
- //Ext.apply(this, {}); // Apply config
+Ext.xxv.vdrGrid = function(viewer) {
+ this.viewer = viewer;
+ //Ext.apply(this, {}); // Apply config
// create the data store
this.store = new Ext.xxv.vdrStore();
this.store.setDefaultSort('host', "ASC");
- // custom columns as plugins
- this.activeColumn = new Ext.grid.CheckColumn({
- header: this.szColActive
- ,dataIndex: 'active'
+ // custom columns as plugins
+ this.activeColumn = new Ext.grid.CheckColumn({
+ header: this.szColActive
+ ,dataIndex: 'active'
,width: 50
,bitmask: 1
- ,editable: false
- ,hidden: true
+ ,editable: false
+ ,hidden: true
});
- this.primaryColumn = new Ext.grid.CheckColumn({
- header: this.szColPrimary
- ,dataIndex: 'primary'
+ this.primaryColumn = new Ext.grid.CheckColumn({
+ header: this.szColPrimary
+ ,dataIndex: 'primary'
,width: 50
- ,bitmask: 1
+ ,bitmask: 1
,editable: false
- ,hidden: true
+ ,hidden: true
});
this.columns = [
- {
- header: this.szColHost
- ,dataIndex: 'host'
+ {
+ header: this.szColHost
+ ,dataIndex: 'host'
,width: 200
- ,renderer: this.formatTitle
+ ,renderer: this.formatTitle
},
this.activeColumn,
- this.primaryColumn,
- { header: this.szColDirectory
- ,dataIndex: 'directory'
+ this.primaryColumn,
+ { header: this.szColDirectory
+ ,dataIndex: 'directory'
,width: 200
- ,renderer: this.formatTitle
- },{
- header: this.szDVBTyp
- ,dataIndex: 'dvbtyp'
+ ,renderer: this.formatTitle
+ },{
+ header: this.szDVBTyp
+ ,dataIndex: 'dvbtyp'
,width: 200
- ,renderer: this.formatTitle
+ ,renderer: this.formatTitle
}
- ];
+ ];
var cm = new Ext.grid.ColumnModel(this.columns);
cm.defaultSortable = true;
- Ext.xxv.vdrGrid.superclass.constructor.call(this, {
- region: 'center'
- ,id: 'vdr-view-grid'
+ Ext.xxv.vdrGrid.superclass.constructor.call(this, {
+ region: 'center'
+ ,id: 'vdr-view-grid'
,loadMask: true
- ,plugins:[this.activeColumn,this.primaryColumn]
+ ,plugins:[this.activeColumn,this.primaryColumn]
,clicksToEdit:1
,cm: cm
- ,sm: new Ext.grid.RowSelectionModel({
- singleSelect:false
+ ,sm: new Ext.grid.RowSelectionModel({
+ singleSelect:false
})
,tbar:new Ext.PagingToolbar({
pageSize: this.store.autoLoad.params.limit
,store: this.store
,displayInfo: true
,items: [
- {
- id:'vn'
- ,iconCls: 'new-icon'
-// ,text: this.szNew
- ,scope: this
- ,disabled:false
- ,handler: function(){ this.EditItem(null); }
+ {
+ id:'vn'
+ ,iconCls: 'new-icon'
+// ,text: this.szNew
+ ,scope: this
+ ,disabled:false
+ ,handler: function(){ this.EditItem(null); }
}
]})
});
- this.store.on({
- 'load' : this.onLoad
- ,'loadexception' : this.onLoadException
- ,scope:this
+ this.store.on({
+ 'load' : this.onLoad
+ ,'loadexception' : this.onLoadException
+ ,scope:this
});
this.on('rowcontextmenu', this.onContextClick, this);
- this.on('rowdblclick', this.onEditItem, this);
+ this.on('rowdblclick', this.onEditItem, this);
};
Ext.extend(Ext.xxv.vdrGrid, Ext.grid.EditorGridPanel, {
@@ -127,7 +127,7 @@ Ext.extend(Ext.xxv.vdrGrid, Ext.grid.EditorGridPanel, {
,szColActive : "Active"
,szColPrimary : "Primary"
,szColDirectory : "Directory"
- ,szDVBTyp : "Type of DVB-cards"
+ ,szDVBTyp : "Type of DVB-cards"
,szLoadException : "Couldn't get data about video disk recorder!\r\n{0}"
,szDeleteSuccess : "Video disk recorder deleted successful.\r\n{0}"
,szDeleteFailure : "Couldn't delete video disk recorder!\r\n{0}"
@@ -141,57 +141,57 @@ Ext.extend(Ext.xxv.vdrGrid, Ext.grid.EditorGridPanel, {
this.getSelectionModel().selectFirstRow();
this.ownerCt.SetPanelTitle(this.szTitle);
}
- ,onContextClick : function(grid, index, e){
- if(!this.menu){ // create context menu on first right click
- this.menu = new Ext.menu.Menu({
- id:'grid-ctx',
- items: [{
- itemId:'ve'
- ,text: this.szEdit
- ,iconCls: 'edit-icon'
- ,scope:this
+ ,onContextClick : function(grid, index, e){
+ if(!this.menu){ // create context menu on first right click
+ this.menu = new Ext.menu.Menu({
+ id:'grid-ctx',
+ items: [{
+ itemId:'ve'
+ ,text: this.szEdit
+ ,iconCls: 'edit-icon'
+ ,scope:this
,disabled: true
,handler: function() { this.EditItem(this.ctxRecord); }
- },{
- itemId:'vd'
- ,text: this.szDelete
- ,iconCls: 'delete-icon'
- ,scope:this
+ },{
+ itemId:'vd'
+ ,text: this.szDelete
+ ,iconCls: 'delete-icon'
+ ,scope:this
,disabled: true
- ,handler: function() { this.DeleteItem(this.ctxRecord); }
+ ,handler: function() { this.DeleteItem(this.ctxRecord); }
}
- ]
- });
- this.menu.on('hide', this.onContextHide, this);
- }
- e.stopEvent();
- if(this.ctxRow){
- Ext.fly(this.ctxRow).removeClass('x-node-ctx');
- this.ctxRow = null;
- }
- this.ctxRow = this.view.getRow(index);
- this.ctxRecord = this.store.getAt(index);
- Ext.fly(this.ctxRow).addClass('x-node-ctx');
-
- var items = this.menu.items;
+ ]
+ });
+ this.menu.on('hide', this.onContextHide, this);
+ }
+ e.stopEvent();
+ if(this.ctxRow){
+ Ext.fly(this.ctxRow).removeClass('x-node-ctx');
+ this.ctxRow = null;
+ }
+ this.ctxRow = this.view.getRow(index);
+ this.ctxRecord = this.store.getAt(index);
+ Ext.fly(this.ctxRow).addClass('x-node-ctx');
+
+ var items = this.menu.items;
if(items) { items.eachKey(function(key, f) {
if(XXV.help.cmdAllowed(f.itemId))
f.enable();
},items);
}
- this.menu.showAt(e.getXY());
- }
- ,onContextHide : function(){
- if(this.ctxRow){
- Ext.fly(this.ctxRow).removeClass('x-node-ctx');
- this.ctxRow = null;
+ this.menu.showAt(e.getXY());
+ }
+ ,onContextHide : function(){
+ if(this.ctxRow){
+ Ext.fly(this.ctxRow).removeClass('x-node-ctx');
+ this.ctxRow = null;
}
if(this.menu) {
this.menu.destroy();
delete this.menu;
this.menu = null;
- }
+ }
}
,formatTitle: function(value, p, record) {
var style = "";
@@ -201,9 +201,9 @@ Ext.extend(Ext.xxv.vdrGrid, Ext.grid.EditorGridPanel, {
style = " running";
}
- return String.format(
- '<div class="topic{1}">{0}</div>',
- value, style
+ return String.format(
+ '<div class="topic{1}">{0}</div>',
+ value, style
);
}
@@ -212,7 +212,7 @@ Ext.extend(Ext.xxv.vdrGrid, Ext.grid.EditorGridPanel, {
{
this.loadMask.hide();
- var o = eval("("+response.responseText+")");
+ var o = eval("("+response.responseText+")");
if(o && o.data && typeof(o.data) == 'string'
&& o.success) {
@@ -248,7 +248,7 @@ Ext.extend(Ext.xxv.vdrGrid, Ext.grid.EditorGridPanel, {
}
,DeleteItem : function( record ) {
- this.stopEditing();
+ this.stopEditing();
this.loadMask.show();
var gsm = this.getSelectionModel();
@@ -278,7 +278,7 @@ Ext.extend(Ext.xxv.vdrGrid, Ext.grid.EditorGridPanel, {
this.stopEditing();
var item;
- if(record != null) {
+ if(record != null) {
var gsmTimer = this.getSelectionModel();
gsmTimer.selectRecords([record]);
@@ -296,36 +296,36 @@ Ext.extend(Ext.xxv.vdrGrid, Ext.grid.EditorGridPanel, {
}
if(this.viewer.formwin){
- this.viewer.formwin.close();
- }
- this.viewer.formwin = new Ext.xxv.Question(item,this.store);
+ this.viewer.formwin.close();
+ }
+ this.viewer.formwin = new Ext.xxv.Question(item,this.store);
},
onEditItem : function(grid, index, e) {
- e.stopEvent();
- if(this.ctxRow){
- Ext.fly(this.ctxRow).removeClass('x-node-ctx');
- this.ctxRow = null;
- }
+ e.stopEvent();
+ if(this.ctxRow){
+ Ext.fly(this.ctxRow).removeClass('x-node-ctx');
+ this.ctxRow = null;
+ }
var record = this.store.getAt(index);
this.EditItem(record);
- }
+ }
});
function createVDRView(viewer,id) {
viewer.gridvdr = new Ext.xxv.vdrGrid(viewer);
- tab = new Ext.xxv.Panel({
+ tab = new Ext.xxv.Panel({
id: id,
iconCls:"vdr-icon",
- closable:true,
+ closable:true,
border:false,
layout:'border',
- stateful:true,
- items:[
+ stateful:true,
+ items:[
viewer.gridvdr
- ]
- });
+ ]
+ });
viewer.add(tab);