summaryrefslogtreecommitdiff
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
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
-rw-r--r--skins/jason/audio.js58
-rw-r--r--skins/jason/autotimers.js266
-rw-r--r--skins/jason/channels.js40
-rw-r--r--skins/jason/channelspanel.js378
-rw-r--r--skins/jason/chronicle.js264
-rw-r--r--skins/jason/common.js160
-rw-r--r--skins/jason/fixes.js10
-rw-r--r--skins/jason/form.js672
-rw-r--r--skins/jason/help.js42
-rw-r--r--skins/jason/locale/lang-de.js47
-rw-r--r--skins/jason/locale/lang-en.js43
-rw-r--r--skins/jason/locale/lang-it.js43
-rw-r--r--skins/jason/locale/login-de.js8
-rw-r--r--skins/jason/locale/login-en.js8
-rw-r--r--skins/jason/locale/login-it.js8
-rw-r--r--skins/jason/login.js8
-rw-r--r--skins/jason/main.js52
-rw-r--r--skins/jason/menus.js96
-rw-r--r--skins/jason/monitor.js52
-rw-r--r--skins/jason/movetimers.js186
-rw-r--r--skins/jason/music.js256
-rw-r--r--skins/jason/now.js1180
-rw-r--r--skins/jason/program.js348
-rw-r--r--skins/jason/reader.js78
-rw-r--r--skins/jason/recordings.js778
-rw-r--r--skins/jason/remote.js58
-rw-r--r--skins/jason/search.js347
-rw-r--r--skins/jason/stream.js56
-rw-r--r--skins/jason/tabpanel.js178
-rw-r--r--skins/jason/teletext.js112
-rw-r--r--skins/jason/timers.js462
-rw-r--r--skins/jason/users.js186
-rw-r--r--skins/jason/vdr.js228
33 files changed, 3366 insertions, 3342 deletions
diff --git a/skins/jason/audio.js b/skins/jason/audio.js
index e06bdcc..2a620d5 100644
--- a/skins/jason/audio.js
+++ b/skins/jason/audio.js
@@ -1,13 +1,13 @@
-/*
- * jason - Javascript based skin for xxv
- * Copyright(c) 2009, anbr
- *
+/*
+ * jason - Javascript based skin for xxv
+ * Copyright(c) 2009-2010, anbr
+ *
* http://xxv.berlios.de/
*
* $Id$
- */
-
-Ext.xxv.AudioWindow = function(item) {
+ */
+
+Ext.xxv.AudioWindow = function(item) {
var width = 320;
var height = 29;
@@ -21,39 +21,47 @@ Ext.xxv.AudioWindow = function(item) {
});
this.item = item;
- Ext.xxv.AudioWindow.superclass.constructor.call(this, {
+ Ext.xxv.AudioWindow.superclass.constructor.call(this, {
title: this.szTitle
- ,iconCls: 'music-icon'
+ ,iconCls: 'music-icon'
,id: 'audio-win'
- ,width: width + marginWidth
- ,height: height + marginHeight
+ ,width: width + marginWidth
+ ,height: height + marginHeight
,resizable: false
- ,plain: true
- ,modal: false
- ,autoScroll: false
+ ,plain: true
+ ,modal: false
+ ,autoScroll: false
,closeAction: 'hide'
,maximizable: false
- ,stateful: true
+ ,stateful: true
+ ,tools:[
+ {id:'save', handler:this.save, scope:this, qtip:this.szSaveFile }
+ ]
,items: [{
- width: width
+ width: width
,height: height
,html: "<div id='audio-player'><p>" + this.szNeedFlash +"</p></div>"
}]
});
this.on('beforeshow', this.onBeforeShow, this);
Ext.xxv.AudioWindow.superclass.show.apply(this, arguments);
-}
-
+}
+
Ext.extend(Ext.xxv.AudioWindow, Ext.Window, {
szTitle: "Music playback"
,szNeedFlash: "You need to get the latest Flash Player to hear music with this player"
+ ,szSaveFile: "Save file to disk"
,onBeforeShow : function(){
if(!this.embed){
+ var files = "";
for(var i = 0, len = this.item.url.length; i < len; i++){
- this.item.url[i] = escape(this.item.url[i]);
+ files += escape(this.item.url[i]);
+ if((i+1) < len) {
+ files += ",";
+ }
}
AudioPlayer.embed('audio-player', {
- soundFile: this.item.url.join(',')
+ soundFile: files
,titles: this.item.title.join(',')
,artists: this.item.artist.join(',')
,autostart: 'yes'
@@ -72,7 +80,13 @@ Ext.extend(Ext.xxv.AudioWindow, Ext.Window, {
if(this.embed) {
AudioPlayer.load('audio-player',item.url.join(','),item.title.join(','),item.artist.join(','));
AudioPlayer.open('audio-player');
+ this.item = item;
}
- Ext.xxv.AudioWindow.superclass.show.apply(this, arguments);
- }
+ Ext.xxv.AudioWindow.superclass.show.apply(this, arguments);
+ }
+ ,save : function(){
+ for(var i = 0, len = this.item.url.length; i < len; i++){
+ window.open(this.item.url[i], '_blank');
+ }
+ }
});
diff --git a/skins/jason/autotimers.js b/skins/jason/autotimers.js
index 1f6c13e..3981785 100644
--- a/skins/jason/autotimers.js
+++ b/skins/jason/autotimers.js
@@ -1,11 +1,11 @@
-/*
- * 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$
- */
+ */
Ext.xxv.autotimerStore = function() {
@@ -13,108 +13,108 @@ Ext.xxv.autotimerStore = function() {
return new Ext.data.Store({
baseParams:{cmd:'al'}
,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: 'title', type: 'string'},
+ {name: 'title', type: 'string'},
{name: 'channels', type: 'string'},
{name: 'directory', type: 'string'},
- {name: 'start', type: 'string'},
- {name: 'stop', type: 'string'},
+ {name: 'start', type: 'string'},
+ {name: 'stop', type: 'string'},
{name: 'minlength', type: 'int'}
]
})
- ,proxy : new Ext.data.HttpProxy({
- url: XXV.help.baseURL()
- ,method: 'GET'
+ ,proxy : new Ext.data.HttpProxy({
+ url: XXV.help.baseURL()
+ ,method: 'GET'
})
,sortInfo:{field:'title', direction:'ASC'}
});
};
-Ext.xxv.autotimerGrid = function(viewer, channels) {
- this.viewer = viewer;
- //Ext.apply(this, {}); // Apply config
+Ext.xxv.autotimerGrid = function(viewer, channels) {
+ this.viewer = viewer;
+ //Ext.apply(this, {}); // Apply config
// create the data store
this.store = new Ext.xxv.autotimerStore();
this.store.setDefaultSort('title', "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
+ ,hidden: true
});
this.columns = [
{
- id:'expand'
- ,header: this.szColSearch
- ,dataIndex: 'title'
+ id:'expand'
+ ,header: this.szColSearch
+ ,dataIndex: 'title'
,width: 200
- ,renderer: this.formatTitle
+ ,renderer: this.formatTitle
},
- this.activeColumn,
- { header: this.szColChannels
- ,dataIndex: 'channels'
+ this.activeColumn,
+ { header: this.szColChannels
+ ,dataIndex: 'channels'
,width: 150
},{
- header: this.szColDirectory
- ,dataIndex: 'directory'
- ,width: 250
- },{
- header: this.szColStart
- ,dataIndex: 'start'
- ,width: 50
- },{
- header: this.szColStop
- ,dataIndex: 'stop'
- ,width: 50
+ header: this.szColDirectory
+ ,dataIndex: 'directory'
+ ,width: 250
},{
- header: this.szColMinLength
- ,dataIndex: 'minlength'
- ,width: 50
+ header: this.szColStart
+ ,dataIndex: 'start'
+ ,width: 50
+ },{
+ header: this.szColStop
+ ,dataIndex: 'stop'
+ ,width: 50
+ },{
+ header: this.szColMinLength
+ ,dataIndex: 'minlength'
+ ,width: 50
}
- ];
+ ];
var cm = new Ext.grid.ColumnModel(this.columns);
cm.defaultSortable = true;
- Ext.xxv.autotimerGrid.superclass.constructor.call(this, {
- region: 'center'
- ,id: 'autotimer-view-grid'
+ Ext.xxv.autotimerGrid.superclass.constructor.call(this, {
+ region: 'center'
+ ,id: 'autotimer-view-grid'
,loadMask: true
- ,plugins:[this.activeColumn]
+ ,plugins:[this.activeColumn]
,clicksToEdit:1
,autoExpandColumn:'expand'
,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:'au'
- ,iconCls: 'upgrade-icon'
- ,tooltip: this.szUpgrade
- ,scope: this
- ,disabled:false
- ,handler: function(){ this.UpgradeItem(); }
- },{
- id:'an'
- ,iconCls: 'new-icon'
- ,tooltip: this.szNew
- ,scope: this
- ,disabled:false
- ,handler: function(){ this.EditItem(null); }
+ {
+ id:'au'
+ ,iconCls: 'upgrade-icon'
+ ,tooltip: this.szUpgrade
+ ,scope: this
+ ,disabled:false
+ ,handler: function(){ this.UpgradeItem(); }
+ },{
+ id:'an'
+ ,iconCls: 'new-icon'
+ ,tooltip: this.szNew
+ ,scope: this
+ ,disabled:false
+ ,handler: function(){ this.EditItem(null); }
}
]})
,plugins:[new Ext.ux.grid.Search({
@@ -129,14 +129,14 @@ Ext.xxv.autotimerGrid = function(viewer, channels) {
})]
});
- 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.autotimerGrid, Ext.grid.EditorGridPanel, {
@@ -150,7 +150,7 @@ Ext.extend(Ext.xxv.autotimerGrid, Ext.grid.EditorGridPanel, {
,szColActive : "Active"
,szColChannels : "Channels"
,szColDirectory : "Directory"
- ,szColStart : "Start"
+ ,szColStart : "Start"
,szColStop : "Stop"
,szColMinLength : "Min. Length"
,szLoadException : "Couldn't get data about autotimer!\r\n{0}"
@@ -170,73 +170,73 @@ Ext.extend(Ext.xxv.autotimerGrid, 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:'ae'
- ,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:'ae'
+ ,text: this.szEdit
+ ,iconCls: 'edit-icon'
+ ,scope:this
,disabled: true
,handler: function() { this.EditItem(this.ctxRecord); }
- },{
- itemId:'ad'
- ,text: this.szDelete
- ,iconCls: 'delete-icon'
- ,scope:this
+ },{
+ itemId:'ad'
+ ,text: this.szDelete
+ ,iconCls: 'delete-icon'
+ ,scope:this
,disabled: true
- ,handler: function() { this.DeleteItem(this.ctxRecord); }
- },'-',{
- itemId:'s'
- ,text: this.szFindReRun
- ,iconCls: 'find-icon'
- ,scope:this
+ ,handler: function() { this.DeleteItem(this.ctxRecord); }
+ },'-',{
+ itemId:'s'
+ ,text: this.szFindReRun
+ ,iconCls: 'find-icon'
+ ,scope:this
,disabled: true
,handler: function(){ this.viewer.searchTab(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 = "";
if((record.data.active & 1) == 0) {
style = " deactive";
- }
- return String.format(
- '<div class="topic{1}"><b>{0}</b></div>',
- value, style
+ }
+ return String.format(
+ '<div class="topic{1}"><b>{0}</b></div>',
+ value, style
);
}
/******************************************************************************/
@@ -244,7 +244,7 @@ Ext.extend(Ext.xxv.autotimerGrid, 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) {
@@ -280,7 +280,7 @@ Ext.extend(Ext.xxv.autotimerGrid, Ext.grid.EditorGridPanel, {
}
,DeleteItem : function( record ) {
- this.stopEditing();
+ this.stopEditing();
this.loadMask.show();
var gsm = this.getSelectionModel();
@@ -310,7 +310,7 @@ Ext.extend(Ext.xxv.autotimerGrid, Ext.grid.EditorGridPanel, {
this.stopEditing();
var item;
- if(record != null) {
+ if(record != null) {
var gsmTimer = this.getSelectionModel();
gsmTimer.selectRecords([record]);
@@ -328,16 +328,16 @@ Ext.extend(Ext.xxv.autotimerGrid, 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);
}
@@ -345,7 +345,7 @@ Ext.extend(Ext.xxv.autotimerGrid, Ext.grid.EditorGridPanel, {
,onUpgradeSuccess : function( response,options )
{
Ext.MessageBox.hide();
- var o = eval("("+response.responseText+")");
+ var o = eval("("+response.responseText+")");
if(o && o.data && typeof(o.data) == 'string'
&& o.success) {
@@ -389,24 +389,24 @@ Ext.extend(Ext.xxv.autotimerGrid, Ext.grid.EditorGridPanel, {
}
});
}
-
+
});
function createAutoTimerView(viewer,id) {
viewer.gridAutoTimer = new Ext.xxv.autotimerGrid(viewer, viewer.storeChannels);
- tab = new Ext.xxv.Panel({
+ tab = new Ext.xxv.Panel({
id: id,
iconCls:"autotimer-icon",
- closable:true,
+ closable:true,
border:false,
layout:'border',
- stateful:true,
- items:[
+ stateful:true,
+ items:[
viewer.gridAutoTimer
- ]
- });
+ ]
+ });
viewer.add(tab);
return tab;
diff --git a/skins/jason/channels.js b/skins/jason/channels.js
index 507a1f4..bb1c5f7 100644
--- a/skins/jason/channels.js
+++ b/skins/jason/channels.js
@@ -1,22 +1,22 @@
-/*
- * 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$
- */
+ */
Ext.xxv.storeChannels = function() {
return new Ext.data.Store({
autoLoad: true,
- reader: new Ext.xxv.jsonReader({
- fields: [
+ reader: new Ext.xxv.jsonReader({
+ fields: [
{name: 'id', type: 'string'},
{name: 'name', type: 'string'},
{name: 'group', type: 'string'},
{name: 'position', type: 'int'},
- {name: 'grpname', type: 'string'}
+ {name: 'grpname', type: 'string'}
]
}),
proxy : new Ext.data.HttpProxy({
@@ -29,16 +29,16 @@ Ext.xxv.storeChannels = function() {
};
/******************************************************************************/
-Ext.xxv.ChannelsCombo = function(config){
- Ext.apply(this, config);
- if(!this.id){
- this.id = Ext.id();
- }
- this.renderer = this.renderer.createDelegate(this);
-};
-
-Ext.xxv.ChannelsCombo.prototype ={
- init : function(grid){
+Ext.xxv.ChannelsCombo = function(config){
+ Ext.apply(this, config);
+ if(!this.id){
+ this.id = Ext.id();
+ }
+ this.renderer = this.renderer.createDelegate(this);
+};
+
+Ext.xxv.ChannelsCombo.prototype ={
+ init : function(grid){
},
renderer: function(value, p, record) {
@@ -47,7 +47,7 @@ Ext.xxv.ChannelsCombo.prototype ={
if(rec.data.position == value) {
return rec.data.name;
}
- }
+ }
return record.data.channel;
- }
+ }
};
diff --git a/skins/jason/channelspanel.js b/skins/jason/channelspanel.js
index 4c8c881..fe0327c 100644
--- a/skins/jason/channelspanel.js
+++ b/skins/jason/channelspanel.js
@@ -1,113 +1,113 @@
-/*
- * 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$
- */
-
+ */
+
Ext.xxv.channelsPanel = function() {
this.store = new Ext.xxv.storeChannels();
- Ext.xxv.channelsPanel.superclass.constructor.call(this, {
- id:'channel-tree',
- region:'west',
- split:true,
- width: 225,
- minSize: 175,
- maxSize: 400,
- collapsible: true,
- margins:'5 0 5 5',
- cmargins:'5 5 5 5',
- rootVisible:false,
- lines:false,
- autoScroll:true,
- root: new Ext.tree.TreeNode('items'),
- collapseFirst:false,
-
+ Ext.xxv.channelsPanel.superclass.constructor.call(this, {
+ id:'channel-tree',
+ region:'west',
+ split:true,
+ width: 225,
+ minSize: 175,
+ maxSize: 400,
+ collapsible: true,
+ margins:'5 0 5 5',
+ cmargins:'5 5 5 5',
+ rootVisible:false,
+ lines:false,
+ autoScroll:true,
+ root: new Ext.tree.TreeNode('items'),
+ collapseFirst:false,
+
tbar: [
- {
- id:'lst'
- ,iconCls:'stream-icon'
- ,tooltip: {title:this.webcastTTText,text:this.webcastText}
+ {
+ id:'lst'
+ ,iconCls:'stream-icon'
+ ,tooltip: {title:this.webcastTTText,text:this.webcastText}
,scope: this
- ,disabled: true
- ,handler:function(){
- var s = this.getSelectionModel().getSelectedNode();
- if(s){
- this.onWebCastChannel(s.attributes.channel);
- }
+ ,disabled: true
+ ,handler:function(){
+ var s = this.getSelectionModel().getSelectedNode();
+ if(s){
+ this.onWebCastChannel(s.attributes.channel);
+ }
}
},
{
- id:'sw'
- ,iconCls:'switch-icon'
- ,tooltip: {title:this.switchTTText,text:this.switchText}
- ,scope: this
- ,disabled: true
- ,handler:function(){
- var s = this.getSelectionModel().getSelectedNode();
- if(s){
- this.onSwitchChannel(s.attributes.channel);
- }
+ id:'sw'
+ ,iconCls:'switch-icon'
+ ,tooltip: {title:this.switchTTText,text:this.switchText}
+ ,scope: this
+ ,disabled: true
+ ,handler:function(){
+ var s = this.getSelectionModel().getSelectedNode();
+ if(s){
+ this.onSwitchChannel(s.attributes.channel);
+ }
}
}
,'-',
{
- id:'ced'
- ,iconCls:'edit-icon'
- ,tooltip: {title:this.editTTText,text:this.editText}
+ id:'ced'
+ ,iconCls:'edit-icon'
+ ,tooltip: {title:this.editTTText,text:this.editText}
,scope: this
- ,disabled: true
- ,handler:function(){
- var s = this.getSelectionModel().getSelectedNode();
- if(s){
- this.EditItem(s.attributes.channel);
- }
+ ,disabled: true
+ ,handler:function(){
+ var s = this.getSelectionModel().getSelectedNode();
+ if(s){
+ this.EditItem(s.attributes.channel);
+ }
}
}
,'->'
,{
id:'cl'
- ,iconCls:'x-tbar-loading'
- ,tooltip: this.refreshText
- ,scope: this
+ ,iconCls:'x-tbar-loading'
+ ,tooltip: this.refreshText
+ ,scope: this
,handler:function(){ this.store.reload(); }
}
- ]
- });
-
- this.getSelectionModel().on({
- 'beforeselect' : function(sm, node){
- return node.isLeaf();
- },
- 'selectionchange' : function(sm, node){
+ ]
+ });
+
+ this.getSelectionModel().on({
+ 'beforeselect' : function(sm, node){
+ return node.isLeaf();
+ },
+ 'selectionchange' : function(sm, node){
if(node){
var record = this.store.getById(node.attributes.channel);
var top = Ext.getCmp('main-tabs');
switch(top.getActiveTab().id) {
case 'vt': top.openTeleText(node.attributes.text, node.attributes.channel); break;
default: top.openProgram(record.data); break;
- }
+ }
- var items = this.topToolbar.items;
+ var items = this.topToolbar.items;
if(items) { items.eachKey(function(key, f) {
if(XXV.help.cmdAllowed(key)) f.enable();
},items); }
- }
- },
- scope:this
- });
+ }
+ },
+ scope:this
+ });
this.store.on('load', this.onLoad, this);
this.store.on('loadexception', this.onLoadException, this);
this.on('contextmenu', this.onContextMenu, this);
-};
-
-Ext.extend(Ext.xxv.channelsPanel, Ext.tree.TreePanel, {
+};
+
+Ext.extend(Ext.xxv.channelsPanel, Ext.tree.TreePanel, {
title : "Channels"
,refreshText : "Refresh"
@@ -126,136 +126,136 @@ Ext.extend(Ext.xxv.channelsPanel, Ext.tree.TreePanel, {
,szSwitchFailure : "Couldn't switch to channel!\r\n{0}"
,szDeleteSuccess : "Channel successful deleted.\r\n{0}"
,szDeleteFailure : "Couldn't delete channel!\r\n{0}"
- ,stateful : true
-
- ,onContextMenu : function(node, e){
- if(!this.menu){ // create context menu on first right click
- this.menu = new Ext.menu.Menu({
- items: [{
- itemId:'p'
- ,iconCls:'select-channel-icon'
- ,text:this.selectText
- ,scope: this
- ,disabled: true
+ ,stateful : true
+
+ ,onContextMenu : function(node, e){
+ if(!this.menu){ // create context menu on first right click
+ this.menu = new Ext.menu.Menu({
+ items: [{
+ itemId:'p'
+ ,iconCls:'select-channel-icon'
+ ,text:this.selectText
+ ,scope: this
+ ,disabled: true
,handler:function(){
var record = this.store.getById(this.ctxNode.attributes.channel);
- var top = Ext.getCmp('main-tabs');
+ var top = Ext.getCmp('main-tabs');
top.openProgram(record.data);
}
}
,'-',
- {
- itemId:'lst'
- ,iconCls:'stream-icon'
- ,text:this.webcastText
- ,scope: this
- ,disabled: true
+ {
+ itemId:'lst'
+ ,iconCls:'stream-icon'
+ ,text:this.webcastText
+ ,scope: this
+ ,disabled: true
,handler:function(){ this.onWebCastChannel(this.ctxNode.attributes.channel); }
- },{
- itemId:'sw'
- ,iconCls:'switch-icon'
- ,text:this.switchText
- ,scope: this
- ,disabled: true
+ },{
+ itemId:'sw'
+ ,iconCls:'switch-icon'
+ ,text:this.switchText
+ ,scope: this
+ ,disabled: true
,handler:function(){ this.onSwitchChannel(this.ctxNode.attributes.channel); }
- },{
- itemId:'vt'
- ,iconCls:'teletext-icon'
- ,text:this.teleTextText
- ,scope: this
- ,disabled: true
+ },{
+ itemId:'vt'
+ ,iconCls:'teletext-icon'
+ ,text:this.teleTextText
+ ,scope: this
+ ,disabled: true
,handler:function(){
- var top = Ext.getCmp('main-tabs');
+ var top = Ext.getCmp('main-tabs');
top.openTeleText(this.ctxNode.attributes.text, this.ctxNode.attributes.channel);
}
}
,'-',
- {
- itemId:'ced'
- ,iconCls:'edit-icon'
- ,text:this.editText
+ {
+ itemId:'ced'
+ ,iconCls:'edit-icon'
+ ,text:this.editText
,scope: this
- ,disabled: true
+ ,disabled: true
,handler:function(){ this.EditItem(this.ctxNode.attributes.channel); }
},
- {
- itemId:'cdl'
- ,iconCls:'delete-icon'
- ,text:this.deleteText
+ {
+ itemId:'cdl'
+ ,iconCls:'delete-icon'
+ ,text:this.deleteText
,scope: this
- ,disabled: true
+ ,disabled: true
,handler:function(){ this.DeleteItem(this.ctxNode.attributes.channel,this.ctxNode); }
}
- ]
- });
- this.menu.on('hide', this.onContextHide, this);
- }
- if(this.ctxNode){
- this.ctxNode.ui.removeClass('x-node-ctx');
- this.ctxNode = null;
- }
- if(node.isLeaf()){
- this.ctxNode = node;
+ ]
+ });
+ this.menu.on('hide', this.onContextHide, this);
+ }
+ if(this.ctxNode){
+ this.ctxNode.ui.removeClass('x-node-ctx');
+ this.ctxNode = null;
+ }
+ if(node.isLeaf()){
+ this.ctxNode = node;
this.ctxNode.ui.addClass('x-node-ctx');
- var items = this.menu.items;
+ 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.ctxNode){
- this.ctxNode.ui.removeClass('x-node-ctx');
- this.ctxNode = null;
+ this.menu.showAt(e.getXY());
+ }
+ }
+
+ ,onContextHide : function(){
+ if(this.ctxNode){
+ this.ctxNode.ui.removeClass('x-node-ctx');
+ this.ctxNode = null;
}
if(this.menu) {
this.menu.destroy();
delete this.menu;
this.menu = null;
- }
- }
-
- ,additem : function(attrs, inactive, preventAnim, treeitem){
- var exists = this.getNodeById(attrs.url);
- if(exists){
- if(!inactive){
- exists.select();
- exists.ui.highlight();
- }
- return null;
- }
- Ext.apply(attrs, {
- iconCls: 'channel-icon',
- leaf:true,
- cls:'channel',
- id: attrs.url
- });
- var node = new Ext.tree.TreeNode(attrs);
+ }
+ }
+
+ ,additem : function(attrs, inactive, preventAnim, treeitem){
+ var exists = this.getNodeById(attrs.url);
+ if(exists){
+ if(!inactive){
+ exists.select();
+ exists.ui.highlight();
+ }
+ return null;
+ }
+ Ext.apply(attrs, {
+ iconCls: 'channel-icon',
+ leaf:true,
+ cls:'channel',
+ id: attrs.url
+ });
+ var node = new Ext.tree.TreeNode(attrs);
treeitem.appendChild(node);
-
- if(!inactive){
- if(!preventAnim){
- Ext.fly(node.ui.elNode).slideIn('l', {
- callback: node.select, scope: node, duration: .4
- });
- }else{
- node.select();
- }
- }
- return node;
- }
-
- // prevent the default context menu when you miss the node
- ,afterRender : function(){
- Ext.xxv.channelsPanel.superclass.afterRender.call(this);
- this.el.on('contextmenu', function(e){
- e.preventDefault();
+
+ if(!inactive){
+ if(!preventAnim){
+ Ext.fly(node.ui.elNode).slideIn('l', {
+ callback: node.select, scope: node, duration: .4
+ });
+ }else{
+ node.select();
+ }
+ }
+ return node;
+ }
+
+ // prevent the default context menu when you miss the node
+ ,afterRender : function(){
+ Ext.xxv.channelsPanel.superclass.afterRender.call(this);
+ this.el.on('contextmenu', function(e){
+ e.preventDefault();
});
}
/******************************************************************************/
@@ -272,29 +272,29 @@ Ext.extend(Ext.xxv.channelsPanel, Ext.tree.TreePanel, {
for(var i = 0, len = records.length; i < len; i++){
if(!node || records[i].data.grpname != grpname) {
- node = this.root.appendChild(
- new Ext.tree.TreeNode({
- text:records[i].data.grpname,
- cls:'channels-node',
- expanded: (i == 0 ? true: false)
- })
+ node = this.root.appendChild(
+ new Ext.tree.TreeNode({
+ text:records[i].data.grpname,
+ cls:'channels-node',
+ expanded: (i == 0 ? true: false)
+ })
);
grpname = records[i].data.grpname;
- }
+ }
this.additem({
text: records[i].data.name,
- channel: records[i].data.id
+ channel: records[i].data.id
// }, (i == 0 ? false: true),(i == 0 ? false: true),node); //Select first node
- }, true,true,node);
+ }, true,true,node);
}
}
/******************************************************************************/
,onSwitchSuccess : function( response,options )
{
- var json = response.responseText;
- var o = eval("("+json+")");
- if(!o || !o.data || typeof(o.data) != 'string') {
- throw {message: "Ajax.read: Json message not found"};
+ var json = response.responseText;
+ var o = eval("("+json+")");
+ if(!o || !o.data || typeof(o.data) != 'string') {
+ throw {message: "Ajax.read: Json message not found"};
}
if(o.success) {
new Ext.xxv.MessageBox().msgSuccess(this.szSwitchSuccess, o.data);
@@ -329,17 +329,17 @@ Ext.extend(Ext.xxv.channelsPanel, Ext.tree.TreePanel, {
var viewer = Ext.getCmp('main-tabs');
if(viewer.formwin){
- viewer.formwin.close();
- }
+ viewer.formwin.close();
+ }
viewer.formwin = new Ext.xxv.Question(item,this.store);
}
/******************************************************************************/
,onDeleteSuccess : function( response,options )
{
- var json = response.responseText;
- var o = eval("("+json+")");
- if(!o || !o.data || typeof(o.data) != 'string') {
- throw {message: "Ajax.read: Json message not found"};
+ var json = response.responseText;
+ var o = eval("("+json+")");
+ if(!o || !o.data || typeof(o.data) != 'string') {
+ throw {message: "Ajax.read: Json message not found"};
}
if(o.success) {
this.root.removeChild(options.node);
@@ -378,6 +378,6 @@ Ext.extend(Ext.xxv.channelsPanel, Ext.tree.TreePanel, {
};
var viewer = Ext.getCmp('main-tabs');
- viewer.streamwin = Ext.xxv.createStream(item,viewer.streamwin);
- }
+ viewer.streamwin = Ext.xxv.createStream(item,viewer.streamwin);
+ }
});
diff --git a/skins/jason/chronicle.js b/skins/jason/chronicle.js
index 2463a44..03f04d1 100644
--- a/skins/jason/chronicle.js
+++ b/skins/jason/chronicle.js
@@ -1,11 +1,11 @@
-/*
- * 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$
- */
+ */
Ext.xxv.chronicleStore = function() {
@@ -13,27 +13,27 @@ Ext.xxv.chronicleStore = function() {
return new Ext.data.Store({
baseParams:{cmd:'chrl'}
,autoLoad:{params:{start:0, limit:configuration.pageSize}}
- ,reader: new Ext.xxv.jsonReader({
- fields: [
+ ,reader: new Ext.xxv.jsonReader({
+ fields: [
{name: 'id', type: 'int'},
- {name: 'title', type: 'string'},
+ {name: 'title', type: 'string'},
{name: 'channel', type: 'string'},
{name: 'day', type:'date', dateFormat:'timestamp'},
- {name: 'start', type: 'string'},
+ {name: 'start', type: 'string'},
{name: 'stop', type: 'string'},
- {name: 'description', type: 'string'}
+ {name: 'description', 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:'day', direction:'ASC'}
});
};
-Ext.xxv.ChronicleGrid = function(viewer) {
- this.viewer = viewer;
+Ext.xxv.ChronicleGrid = function(viewer) {
+ this.viewer = viewer;
this.preview = new Ext.xxv.ChroniclePreview(viewer);
// create the data store
@@ -42,30 +42,30 @@ Ext.xxv.ChronicleGrid = function(viewer) {
this.columns = [
{
- id:'expand'
- ,header: this.szColTitle
- ,dataIndex: 'title'
+ id:'expand'
+ ,header: this.szColTitle
+ ,dataIndex: 'title'
,width: 200
- ,renderer: this.formatTitle
+ ,renderer: this.formatTitle
},
- { header: this.szColChannel
- ,dataIndex: 'channel'
- ,width: 130
- },{
- header: this.szColDay
- ,dataIndex: 'day'
- ,width: 50
- ,renderer: Ext.util.Format.dateRenderer(this.szColDayFormat)
- },{
- header: this.szColStart
- ,dataIndex: 'start'
- ,width: 50
- },{
- header: this.szColStop
- ,dataIndex: 'stop'
- ,width: 50
+ { header: this.szColChannel
+ ,dataIndex: 'channel'
+ ,width: 130
+ },{
+ header: this.szColDay
+ ,dataIndex: 'day'
+ ,width: 50
+ ,renderer: Ext.util.Format.dateRenderer(this.szColDayFormat)
+ },{
+ header: this.szColStart
+ ,dataIndex: 'start'
+ ,width: 50
+ },{
+ header: this.szColStop
+ ,dataIndex: 'stop'
+ ,width: 50
}
- ];
+ ];
var cm = new Ext.grid.ColumnModel(this.columns);
cm.defaultSortable = true;
@@ -79,15 +79,15 @@ Ext.xxv.ChronicleGrid = function(viewer) {
,query:'data'
}
});
- Ext.xxv.ChronicleGrid.superclass.constructor.call(this, {
- region: 'center'
- ,id: 'chronicle-view-grid'
+ Ext.xxv.ChronicleGrid.superclass.constructor.call(this, {
+ region: 'center'
+ ,id: 'chronicle-view-grid'
,loadMask: true
,clicksToEdit:1
,autoExpandColumn:'expand'
,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,
@@ -96,16 +96,16 @@ Ext.xxv.ChronicleGrid = function(viewer) {
,plugins:[this.filter]
});
- this.store.on({
+ this.store.on({
'load' : this.onLoad
- ,'beforeload' : this.onBeforeLoad
- ,'loadexception' : this.onLoadException
- ,scope:this
+ ,'beforeload' : this.onBeforeLoad
+ ,'loadexception' : this.onLoadException
+ ,scope:this
});
this.on('rowcontextmenu', this.onContextClick, this);
this.getSelectionModel().on('rowselect', this.select, this, {buffer:50});
- this.on('rowdblclick', this.onEditItem, this);
+ this.on('rowdblclick', this.onEditItem, this);
};
Ext.extend(Ext.xxv.ChronicleGrid, Ext.grid.EditorGridPanel, {
@@ -116,7 +116,7 @@ Ext.extend(Ext.xxv.ChronicleGrid, Ext.grid.EditorGridPanel, {
,szColTitle : "Title"
,szColDay : "Day"
,szColChannel : "Channel"
- ,szColStart : "Start"
+ ,szColStart : "Start"
,szColStop : "Stop"
,szColDayFormat : "l, m/d/Y"
,szLoadException : "Couldn't get data from chronicle!\r\n{0}"
@@ -135,64 +135,64 @@ Ext.extend(Ext.xxv.ChronicleGrid, Ext.grid.EditorGridPanel, {
this.ownerCt.SetPanelTitle(this.szTitle);
this.getSelectionModel().selectFirstRow();
}
- ,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:'s'
- ,text: Ext.xxv.timerGrid.prototype.szFindReRun
- ,iconCls: 'find-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:'s'
+ ,text: Ext.xxv.timerGrid.prototype.szFindReRun
+ ,iconCls: 'find-icon'
+ ,scope:this
,disabled: true
,handler: function(){ this.viewer.searchTab(this.ctxRecord);}
- },{
- itemId:'chrd'
- ,text: Ext.xxv.timerGrid.prototype.szDelete
- ,iconCls: 'delete-icon'
- ,scope:this
+ },{
+ itemId:'chrd'
+ ,text: Ext.xxv.timerGrid.prototype.szDelete
+ ,iconCls: 'delete-icon'
+ ,scope:this
,disabled: true
- ,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');
+ ,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;
+ 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) {
- return String.format(
- '<div class="topic"><b>{0}</b></div>',
- value
+ formatTitle: function(value, p, record) {
+ return String.format(
+ '<div class="topic"><b>{0}</b></div>',
+ value
);
}
/******************************************************************************/
@@ -200,7 +200,7 @@ Ext.extend(Ext.xxv.ChronicleGrid, 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) {
@@ -233,7 +233,7 @@ Ext.extend(Ext.xxv.ChronicleGrid, Ext.grid.EditorGridPanel, {
new Ext.xxv.MessageBox().msgFailure(this.szDeleteFailure, response.statusText);
}
,DeleteItem : function( record ) {
- this.stopEditing();
+ this.stopEditing();
this.loadMask.show();
var gsm = this.getSelectionModel();
@@ -259,48 +259,48 @@ Ext.extend(Ext.xxv.ChronicleGrid, Ext.grid.EditorGridPanel, {
}
,select : function(sm, index, record){
this.preview.select(record, this.filter.getValue());
- }
+ }
});
Ext.xxv.ChroniclePreview = function(viewer) {
this.viewer = viewer;
- Ext.xxv.ChroniclePreview.superclass.constructor.call(this, {
- id: 'chronicle-preview',
- region: 'south',
- cls:'preview',
- autoScroll: true,
+ Ext.xxv.ChroniclePreview.superclass.constructor.call(this, {
+ id: 'chronicle-preview',
+ region: 'south',
+ cls:'preview',
+ autoScroll: true,
stateful:true,
- tbar: [ {
- id:'s',
- tooltip: Ext.xxv.timerGrid.prototype.szFindReRun,
- iconCls: 'find-icon',
- disabled:true,
- scope: viewer,
- handler: function(){ this.searchTab(this.gridChronicle.getSelectionModel().getSelected()); }
- } ]
+ tbar: [ {
+ id:'s',
+ tooltip: Ext.xxv.timerGrid.prototype.szFindReRun,
+ iconCls: 'find-icon',
+ disabled:true,
+ scope: viewer,
+ handler: function(){ this.searchTab(this.gridChronicle.getSelectionModel().getSelected()); }
+ } ]
});
};
Ext.extend(Ext.xxv.ChroniclePreview, Ext.Panel, {
select : function(record, lookup){
- if(this.body)
+ if(this.body)
XXV.getTemplate().overwrite(this.body, record.data);
if(lookup)
highlightText(this.body.dom,lookup,'x-highlight',1);
// Enable all toolbar buttons
- var items = this.topToolbar.items;
+ var items = this.topToolbar.items;
if(items) {
items.eachKey(function(key, f) {
if(XXV.help.cmdAllowed(key)) f.enable();
},items);
}
- }
+ }
,clear: function(){
- if(this) {
+ if(this) {
if(this.body)
- this.body.update('');
+ this.body.update('');
// Disable all items
- var items = this.topToolbar.items;
+ var items = this.topToolbar.items;
if(items) { items.eachKey(function(key, f){f.disable();},items); }
}
}
@@ -310,35 +310,35 @@ function createChronicleView(viewer,id) {
viewer.gridChronicle = new Ext.xxv.ChronicleGrid(viewer);
- tab = new Ext.xxv.Panel({
+ tab = new Ext.xxv.Panel({
id: id,
iconCls:"chronicle-icon",
- closable:true,
+ closable:true,
border:false,
layout:'border',
- stateful:true,
+ stateful:true,
items:[ viewer.gridChronicle
- ,{
- id:'chronicle-bottom-preview',
- layout:'fit',
- items:XXV.BottomPreview ? 0 : viewer.gridChronicle.preview,
- height: 250,
- split: true,
- border:false,
- region:'south',
- hidden:XXV.BottomPreview
- }, {
- id:'chronicle-right-preview',
- layout:'fit',
+ ,{
+ id:'chronicle-bottom-preview',
+ layout:'fit',
+ items:XXV.BottomPreview ? 0 : viewer.gridChronicle.preview,
+ height: 250,
+ split: true,
+ border:false,
+ region:'south',
+ hidden:XXV.BottomPreview
+ }, {
+ id:'chronicle-right-preview',
+ layout:'fit',
items:XXV.RightPreview ? 0 : viewer.gridChronicle.preview,
- border:false,
- region:'east',
- width:350,
- split: true,
- hidden:XXV.RightPreview
+ border:false,
+ region:'east',
+ width:350,
+ split: true,
+ hidden:XXV.RightPreview
}
- ]
- });
+ ]
+ });
viewer.add(tab);
diff --git a/skins/jason/common.js b/skins/jason/common.js
index f15814f..89e4f72 100644
--- a/skins/jason/common.js
+++ b/skins/jason/common.js
@@ -1,59 +1,59 @@
-/*
- * 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$
- */
+ */
-Ext.grid.CheckColumn = function(config){
+Ext.grid.CheckColumn = function(config){
this.editable = true;
- Ext.apply(this, config);
- if(!this.id){
- this.id = Ext.id();
- }
- this.renderer = this.renderer.createDelegate(this);
-};
-
-Ext.grid.CheckColumn.prototype ={
- init : function(grid){
- this.grid = grid;
- this.grid.on('render', function(){
+ Ext.apply(this, config);
+ if(!this.id){
+ this.id = Ext.id();
+ }
+ this.renderer = this.renderer.createDelegate(this);
+};
+
+Ext.grid.CheckColumn.prototype ={
+ init : function(grid){
+ this.grid = grid;
+ this.grid.on('render', function(){
var view = this.grid.getView();
- if(this.editable)
- view.mainBody.on('mousedown', this.onMouseDown, this);
- }, this);
- },
-
- onMouseDown : function(e, t){
- if(t.className && t.className.indexOf('x-grid3-cc-'+this.id) != -1){
- e.stopEvent();
- var index = this.grid.getView().findRowIndex(t);
+ if(this.editable)
+ view.mainBody.on('mousedown', this.onMouseDown, this);
+ }, this);
+ },
+
+ onMouseDown : function(e, t){
+ if(t.className && t.className.indexOf('x-grid3-cc-'+this.id) != -1){
+ e.stopEvent();
+ var index = this.grid.getView().findRowIndex(t);
var record = this.grid.store.getAt(index);
var flags = record.data[this.dataIndex];
if(flags & this.bitmask) {
flags &= ~(this.bitmask);
} else {
flags |= (this.bitmask);
- }
- record.set(this.dataIndex, flags);
- }
- },
-
- renderer : function(v, p, record){
- p.css += ' x-grid3-check-col-td';
- return '<div class="x-grid3-check-col'+((v&(this.bitmask))?'-on':'')+' x-grid3-cc-'+this.id+'">&#160;</div>';
- }
+ }
+ record.set(this.dataIndex, flags);
+ }
+ },
+
+ renderer : function(v, p, record){
+ p.css += ' x-grid3-check-col-td';
+ return '<div class="x-grid3-check-col'+((v&(this.bitmask))?'-on':'')+' x-grid3-cc-'+this.id+'">&#160;</div>';
+ }
};
Ext.namespace('Ext.xxv');
/******************************************************************************/
Ext.xxv.MessageBox = function(config){
- Ext.apply(this, config);
- if(!this.id){
- this.id = Ext.id();
- }
+ Ext.apply(this, config);
+ if(!this.id){
+ this.id = Ext.id();
+ }
};
Ext.xxv.MessageBox.prototype = {
@@ -91,9 +91,9 @@ Ext.xxv.MessageBox.prototype = {
/******************************************************************************/
Ext.xxv.Panel = function(config){
- Ext.apply(this, config);
- if(!this.id){
- this.id = Ext.id();
+ Ext.apply(this, config);
+ if(!this.id){
+ this.id = Ext.id();
}
};
Ext.xxv.Panel = Ext.extend(Ext.Panel, {
@@ -105,7 +105,7 @@ Ext.xxv.Panel = Ext.extend(Ext.Panel, {
}
,SetPanelTitle : function(str){
this.setTitle(str);
- this.DocumentTitle(str);
+ this.DocumentTitle(str);
}
,DocumentTitle : function(str){
document.title = str + " - " + this.szTitle;
@@ -114,18 +114,18 @@ Ext.xxv.Panel = Ext.extend(Ext.Panel, {
});
/******************************************************************************/
-Ext.xxv.TagClouds = function(config){
- Ext.xxv.TagClouds.superclass.constructor.call(this, config);
- Ext.apply(this, config);
-};
-
-Ext.extend(Ext.xxv.TagClouds, Ext.Component, {
-
- initComponent : function(){
- Ext.xxv.TagClouds.superclass.initComponent.call(this);
-
- this.addEvents({'selectKeyword' : true});
- },
+Ext.xxv.TagClouds = function(config){
+ Ext.xxv.TagClouds.superclass.constructor.call(this, config);
+ Ext.apply(this, config);
+};
+
+Ext.extend(Ext.xxv.TagClouds, Ext.Component, {
+
+ initComponent : function(){
+ Ext.xxv.TagClouds.superclass.initComponent.call(this);
+
+ this.addEvents({'selectKeyword' : true});
+ },
setvalue : function(keywords){
@@ -137,44 +137,44 @@ Ext.extend(Ext.xxv.TagClouds, Ext.Component, {
this.cloudlist = null;
}
},
-
- render : function(ct, position){
+
+ render : function(ct, position){
if(!this.cloudlist && this.keywords && this.keywords.length) {
this.cloudlist = ct.createChild({tag: "ol", cls: "x-cloud-list"});
- for(var i = 0, len = this.keywords.length; i < len; i++){
- var child = this.cloudlist.createChild({
- tag: "li",
- cls: "x-cloud-item "+this.getWeight(this.keywords[i][1]),
- html: '<a href="#">'+this.keywords[i][0]+'</a>'
- });
-
- child.on('click', this.onSelectKeyWord, this);
+ for(var i = 0, len = this.keywords.length; i < len; i++){
+ var child = this.cloudlist.createChild({
+ tag: "li",
+ cls: "x-cloud-item "+this.getWeight(this.keywords[i][1]),
+ html: '<a href="#">'+this.keywords[i][0]+'</a>'
+ });
+
+ child.on('click', this.onSelectKeyWord, this);
}
}
}
/**************************************************************************/
- ,getWeight : function(weight){
+ ,getWeight : function(weight){
var nmax = 100;
var nmin = 0;
var styles = new Array('smallest','smaller','small','medium','large','larger','largest');
- var value = weight / (nmax - nmin) * 6;
- if(value >= 6.0)
- return styles[6];
- if(value <= 0.0)
- return styles[0];
-
- return styles[Math.round(value)];
+ var value = weight / (nmax - nmin) * 6;
+ if(value >= 6.0)
+ return styles[6];
+ if(value <= 0.0)
+ return styles[0];
+
+ return styles[Math.round(value)];
}
/**************************************************************************/
- ,onSelectKeyWord : function(e, t){
-
- var tag = t.firstChild.data;
- this.fireEvent('selectKeyword', tag);
-
- // Prevent the link href from being followed
- Ext.EventObject.stopEvent(e);
+ ,onSelectKeyWord : function(e, t){
+
+ var tag = t.firstChild.data;
+ this.fireEvent('selectKeyword', tag);
+
+ // Prevent the link href from being followed
+ Ext.EventObject.stopEvent(e);
}
});
diff --git a/skins/jason/fixes.js b/skins/jason/fixes.js
index 756a8ad..b3ae7b9 100644
--- a/skins/jason/fixes.js
+++ b/skins/jason/fixes.js
@@ -1,11 +1,11 @@
-/*
- * 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$
- */
+ */
/* http://extjs.com/forum/showthread.php?p=309913#post309913 */
Ext.override(Ext.form.TimeField, {
diff --git a/skins/jason/form.js b/skins/jason/form.js
index 2b3ab14..de62ae5 100644
--- a/skins/jason/form.js
+++ b/skins/jason/form.js
@@ -1,336 +1,336 @@
-/*
- * jason - Javascript based skin for xxv
- * Copyright(c) 2008-2009, anbr
- *
- * http://xxv.berlios.de/
- *
- * $Id$
- */
-
-Ext.xxv.Question = function(item,parentstore) {
-
- if(XXV.help.cmdDisabled(item.cmd)) {
- new Ext.xxv.MessageBox().msgFailure(this.szCommandDeny, item.cmd);
- return;
- }
-
- this.parentstore = parentstore;
- this.item = item;
-
- this.store = new Ext.data.Store({
- reader: new Ext.xxv.jsonReader({
- fields: [
- {name: 'id',type: 'string'},
- {name: 'fieldLabel', type: 'string'},
- {name: 'type', type: 'string'},
- {name: 'valuedef', type: 'string'},
- {name: 'valuereq', type: 'boolean'},
- {name: 'readonly', type: 'boolean'},
- {name: 'choices'}
- ]
- }),
- proxy : new Ext.data.HttpProxy({
- url: XXV.help.cmdAJAX(item.cmd,{ data:item.id })
- ,method: 'GET'
-// ,params: { data:item.id }
- })
- });
-
- Ext.xxv.Question.superclass.constructor.call(this, {
- stateful: false
- ,title: item.title
- ,width: 600
- //,height:500
- ,autoHeight:true
- ,minWidth: 300
- ,minHeight: 100
- ,layout: 'anchor'
- ,plain:true
- //,bodyStyle:'padding:5px;'
- ,buttonAlign:'right'
- ,buttons: [{
- text: this.szClose
- ,handler: this.destroy
- ,scope: this
- },{
- text: this.szApply
- ,handler: this.onApply
- ,scope: this
- }]
- });
-
- this.store.load({ scope: this
- ,callback: this.onLoad
- ,failure: this.onLoadException
- });
-};
-
-Ext.extend(Ext.xxv.Question, Ext.Window, {
-
- szClose : "Close"
- ,szApply : "Apply"
- ,szCommandDeny : "Command '{0}' not allowed!"
- ,szLoadException : "Couldn't get data!\r\n{0}"
- ,szFailure : "Couldn't save data!\r\n{0}"
- ,szSuccess : "Data saved successful.\r\n{0}"
- ,szComboEmpty : "Select ..."
-
- ,onLoadException : function( scope, o, arg, e) {
- new Ext.xxv.MessageBox().msgFailure(this.szLoadException, e.message);
- }
- ,onLoad : function(r,options,success){
-
- this.form = new Ext.form.FormPanel({
- id: 'form-panel'
- ,stateful: false
- ,baseCls: 'x-plain'
- ,labelWidth: 200
- ,defaultType: 'textfield'
- ,forceLayout: true
- });
-
- for(var i = 0, len = r.length; i < len; i++){
- var config = {
- name: r[i].data.id
- ,fieldLabel: Ext.util.Format.ellipsis(r[i].data.fieldLabel,30)
- ,value: r[i].data.valuedef
- ,anchor: '100%' // anchor width by percentage
- ,stateful: false
- ,tabIndex: i + 1
- };
- if(r[i].data.valuereq){
- config.allowBlank = false;
- }
- switch(r[i].data.type){
- case 'hidden':
- config.autoShow = false;
- config.xtype = 'hidden';
- break;
- case 'confirm':
- config.name = null;
- config.xtype = 'fieldset';
- config.hideLabel = true;
- config.fieldLabel = null;
- config.hideBorders = true;
- config.autoHeight = true;
- config.labelWidth = 1;
- config.baseCls = '';
- config.style = 'border: 0px none;';
- config.items = [{
- xtype: 'checkbox'
- ,labelSeparator: ''
- ,boxLabel: Ext.util.Format.ellipsis(r[i].data.fieldLabel,80)
- ,checked: r[i].data.valuedef == 'y' ? true : false
- ,name: r[i].data.id
- }
- ];
- break;
- case 'checkbox':
- config.xtype = 'checkboxgroup';
- config.items = [];
- for(var f = 0, flen = r[i].data.choices.length; f < flen; f++){
- config.items.push({
- name: r[i].data.choices[f],
- boxLabel: Ext.util.Format.ellipsis(r[i].data.choices[f],15),
- checked: (config.value.match(r[i].data.choices[f]) ? true : false)
- });
- }
- break;
- case 'password':
- config.xtype = 'textfield';
- config.allowBlank = true;
- config.inputType = 'password';
- break;
- case 'multilist':
- config.xtype = 'multiselect';
- config.allowBlank = true;
-
- if(r[i].data.choices.length > 0) {
-
- var fields;
- if(r[i].data.choices[0].length >= 3) {
- fields = [ {name: 'display'} ,{name: 'value'}, {name: 'groups'} ];
-
- var cls = 'ux-mselect';
- var tpl = '<tpl for=".">';
- tpl+= '<tpl if="this.isNewGroup(groups)"><div class="x-combo-list-hd">{groups}</div></tpl>';
- tpl+= '<div class="' + cls +'-item';
- if(Ext.isIE || Ext.isIE7)
- tpl+='" unselectable=on';
- else
- tpl+=' x-unselectable"';
-
- tpl+='>{display}</div></tpl>';
-
- config.tpl = new Ext.XTemplate(tpl, {
- isNewGroup: function(groups){
- if(groups && (!this.lastgroups || groups != this.lastgroups))
- { this.lastgroups = groups; return 1; }
- return 0;
- }
- });
- } else {
- fields = [ {name: 'display'} ,{name: 'value'} ];
- config.tpl = null;
- }
- config.store = new Ext.data.Store({
- reader: new Ext.data.ArrayReader({}, fields),
- data: r[i].data.choices
- });
- }
- config.valueField = 'value';
- config.displayField = 'display';
- config.width = '100%';
- if(len == 1) {
- config.hideLabel = true;
- config.height = 430;
- if(!this.title) {
- this.title = config.fieldLabel;
- }
- } else {
- config.height = 120;
- }
- config.minLength = 0;
- config.maxLength = r[i].data.choices.length;
- break;
- case 'list':
- config.xtype = 'combo';
- if(r[i].data.choices.length > 0) {
- var fields;
- if(r[i].data.choices[0].length >= 3) {
- fields = [ {name: 'display'} ,{name: 'value'}, {name: 'groups'} ];
- config.tpl = new Ext.XTemplate(
- '<tpl for=".">',
- '<tpl if="this.isNewGroup(groups)"><div class="x-combo-list-hd">{groups}</div></tpl>',
- '<div class="x-combo-list-item">{display}</div>',
- '</tpl>', {
- isNewGroup: function(groups){
- if(groups && (!this.lastgroups || groups != this.lastgroups)) { this.lastgroups = groups; return 1; }
- return 0;
- }
- });
-
- } else {
- fields = [ {name: 'display'} ,{name: 'value'} ];
- config.tpl = '<tpl for="."><div class="x-combo-list-item">{display}</div></tpl>';
-
- }
- config.store = new Ext.data.Store({
- reader: new Ext.data.ArrayReader({}, fields),
- data: r[i].data.choices
- });
-
- config.displayField = 'display';
- config.valueField = 'value';
- }
-
- config.triggerAction = 'all';
- config.lazyRender = true;
- config.listClass = 'x-combo-list-small';
- config.mode = 'local';
- config.emptyText = this.szComboEmpty;
- config.selectOnFocus = true;
- config.editable = false;
-
- break;
- case 'date':
- var today = new Date();
- today.clearTime();
- config.xtype = 'datefield';
- config.minValue = today;
- break;
- case 'time':
- config.xtype = 'timefield';
- config.increment = 15;
- config.format = 'H:i';
- break;
- case 'integer':
- config.xtype = 'numberfield';
- config.allowDecimals = false;
- break;
- case 'textfield':
- config.xtype = 'textarea';
- break;
- }
- if(r[i].data.readonly){
- config.hideLabel = true;
- config.height = 200; // anchor width by percentage and height by raw adjustment
- config.readOnly = true;
- }
- this.form.add(config);
- }
- if(i) {
- this.add(this.form);
- this.show();
- } else {
- new Ext.xxv.MessageBox().msgFailure(this.szLoadException, "");
- }
-
- },
-
- onApply: function() {
- this.el.mask(Ext.LoadMask.prototype.msg, 'x-mask-loading');
-
- var params = {data:this.item.id,ajax:'json','__action':'save'};
- for(var i = 0, len = this.store.getCount(); i < len; i++){
- var record = this.store.getAt(i);
- if(record.data.readonly == 0) {
- var field = this.form.getForm().findField(record.data.id);
- if(field)
- switch(record.data.type){
- case 'confirm':
- params['__'+record.data.id] = field.checked ? 'y' : 'n';
- break;
- case 'checkbox':
- var values = field.getValue();
- var boxes = [];
- for(var f = 0, flen = values.length; f < flen; f++){
- boxes.push(values[f].name);
- }
- params['__'+record.data.id] = boxes.join(',');
- break;
- case 'time':
- params['__'+record.data.id] = field.getValue();
- break;
- case 'date':
- params['__'+record.data.id] = field.getValue().dateFormat('Y-m-d');
- break;
- default:
- params['__'+record.data.id] = field.getValue();
- break;
- }
- }
- }
- Ext.Ajax.request({
- url:'?' + Ext.urlEncode({cmd:this.item.cmd})
- ,method: 'POST'
- ,params: params
- ,success: this.onSuccess
- ,failure: this.onFailure
- ,scope: this
- });
- },
-
- onFailure : function(response,options){
- this.el.unmask();
- new Ext.xxv.MessageBox().msgFailure(this.szFailure,response.statusText);
- },
-
- onSuccess : function(response, options){
- this.el.unmask();
- var o = eval("("+response.responseText+")");
- if(o && o.data && typeof(o.data) == 'string'
- && o.success) {
- new Ext.xxv.MessageBox().msgSuccess(this.szSuccess, o.data);
- this.hide();
- if(this.parentstore)
- this.parentstore.reload();
- } else {
- var msg = '';
- if(o && o.data && typeof(o.data) == 'string') {
- msg = o.data;
- }
- new Ext.xxv.MessageBox().msgFailure(this.szFailure, msg);
- }
- }
-});
+/*
+ * jason - Javascript based skin for xxv
+ * Copyright(c) 2008-2009, anbr
+ *
+ * http://xxv.berlios.de/
+ *
+ * $Id$
+ */
+
+Ext.xxv.Question = function(item,parentstore) {
+
+ if(XXV.help.cmdDisabled(item.cmd)) {
+ new Ext.xxv.MessageBox().msgFailure(this.szCommandDeny, item.cmd);
+ return;
+ }
+
+ this.parentstore = parentstore;
+ this.item = item;
+
+ this.store = new Ext.data.Store({
+ reader: new Ext.xxv.jsonReader({
+ fields: [
+ {name: 'id',type: 'string'},
+ {name: 'fieldLabel', type: 'string'},
+ {name: 'type', type: 'string'},
+ {name: 'valuedef', type: 'string'},
+ {name: 'valuereq', type: 'boolean'},
+ {name: 'readonly', type: 'boolean'},
+ {name: 'choices'}
+ ]
+ }),
+ proxy : new Ext.data.HttpProxy({
+ url: XXV.help.cmdAJAX(item.cmd,{ data:item.id })
+ ,method: 'GET'
+// ,params: { data:item.id }
+ })
+ });
+
+ Ext.xxv.Question.superclass.constructor.call(this, {
+ stateful: false
+ ,title: item.title
+ ,width: 600
+ //,height:500
+ ,autoHeight:true
+ ,minWidth: 300
+ ,minHeight: 100
+ ,layout: 'anchor'
+ ,plain:true
+ //,bodyStyle:'padding:5px;'
+ ,buttonAlign:'right'
+ ,buttons: [{
+ text: this.szClose
+ ,handler: this.destroy
+ ,scope: this
+ },{
+ text: this.szApply
+ ,handler: this.onApply
+ ,scope: this
+ }]
+ });
+
+ this.store.load({ scope: this
+ ,callback: this.onLoad
+ ,failure: this.onLoadException
+ });
+};
+
+Ext.extend(Ext.xxv.Question, Ext.Window, {
+
+ szClose : "Close"
+ ,szApply : "Apply"
+ ,szCommandDeny : "Command '{0}' not allowed!"
+ ,szLoadException : "Couldn't get data!\r\n{0}"
+ ,szFailure : "Couldn't save data!\r\n{0}"
+ ,szSuccess : "Data saved successful.\r\n{0}"
+ ,szComboEmpty : "Select ..."
+
+ ,onLoadException : function( scope, o, arg, e) {
+ new Ext.xxv.MessageBox().msgFailure(this.szLoadException, e.message);
+ }
+ ,onLoad : function(r,options,success){
+
+ this.form = new Ext.form.FormPanel({
+ id: 'form-panel'
+ ,stateful: false
+ ,baseCls: 'x-plain'
+ ,labelWidth: 200
+ ,defaultType: 'textfield'
+ ,forceLayout: true
+ });
+
+ for(var i = 0, len = r.length; i < len; i++){
+ var config = {
+ name: r[i].data.id
+ ,fieldLabel: Ext.util.Format.ellipsis(r[i].data.fieldLabel,30)
+ ,value: r[i].data.valuedef
+ ,anchor: '100%' // anchor width by percentage
+ ,stateful: false
+ ,tabIndex: i + 1
+ };
+ if(r[i].data.valuereq){
+ config.allowBlank = false;
+ }
+ switch(r[i].data.type){
+ case 'hidden':
+ config.autoShow = false;
+ config.xtype = 'hidden';
+ break;
+ case 'confirm':
+ config.name = null;
+ config.xtype = 'fieldset';
+ config.hideLabel = true;
+ config.fieldLabel = null;
+ config.hideBorders = true;
+ config.autoHeight = true;
+ config.labelWidth = 1;
+ config.baseCls = '';
+ config.style = 'border: 0px none;';
+ config.items = [{
+ xtype: 'checkbox'
+ ,labelSeparator: ''
+ ,boxLabel: Ext.util.Format.ellipsis(r[i].data.fieldLabel,80)
+ ,checked: r[i].data.valuedef == 'y' ? true : false
+ ,name: r[i].data.id
+ }
+ ];
+ break;
+ case 'checkbox':
+ config.xtype = 'checkboxgroup';
+ config.items = [];
+ for(var f = 0, flen = r[i].data.choices.length; f < flen; f++){
+ config.items.push({
+ name: r[i].data.choices[f],
+ boxLabel: Ext.util.Format.ellipsis(r[i].data.choices[f],15),
+ checked: (config.value.match(r[i].data.choices[f]) ? true : false)
+ });
+ }
+ break;
+ case 'password':
+ config.xtype = 'textfield';
+ config.allowBlank = true;
+ config.inputType = 'password';
+ break;
+ case 'multilist':
+ config.xtype = 'multiselect';
+ config.allowBlank = true;
+
+ if(r[i].data.choices.length > 0) {
+
+ var fields;
+ if(r[i].data.choices[0].length >= 3) {
+ fields = [ {name: 'display'} ,{name: 'value'}, {name: 'groups'} ];
+
+ var cls = 'ux-mselect';
+ var tpl = '<tpl for=".">';
+ tpl+= '<tpl if="this.isNewGroup(groups)"><div class="x-combo-list-hd">{groups}</div></tpl>';
+ tpl+= '<div class="' + cls +'-item';
+ if(Ext.isIE || Ext.isIE7)
+ tpl+='" unselectable=on';
+ else
+ tpl+=' x-unselectable"';
+
+ tpl+='>{display}</div></tpl>';
+
+ config.tpl = new Ext.XTemplate(tpl, {
+ isNewGroup: function(groups){
+ if(groups && (!this.lastgroups || groups != this.lastgroups))
+ { this.lastgroups = groups; return 1; }
+ return 0;
+ }
+ });
+ } else {
+ fields = [ {name: 'display'} ,{name: 'value'} ];
+ config.tpl = null;
+ }
+ config.store = new Ext.data.Store({
+ reader: new Ext.data.ArrayReader({}, fields),
+ data: r[i].data.choices
+ });
+ }
+ config.valueField = 'value';
+ config.displayField = 'display';
+ config.width = '100%';
+ if(len == 1) {
+ config.hideLabel = true;
+ config.height = 430;
+ if(!this.title) {
+ this.title = config.fieldLabel;
+ }
+ } else {
+ config.height = 120;
+ }
+ config.minLength = 0;
+ config.maxLength = r[i].data.choices.length;
+ break;
+ case 'list':
+ config.xtype = 'combo';
+ if(r[i].data.choices.length > 0) {
+ var fields;
+ if(r[i].data.choices[0].length >= 3) {
+ fields = [ {name: 'display'} ,{name: 'value'}, {name: 'groups'} ];
+ config.tpl = new Ext.XTemplate(
+ '<tpl for=".">',
+ '<tpl if="this.isNewGroup(groups)"><div class="x-combo-list-hd">{groups}</div></tpl>',
+ '<div class="x-combo-list-item">{display}</div>',
+ '</tpl>', {
+ isNewGroup: function(groups){
+ if(groups && (!this.lastgroups || groups != this.lastgroups)) { this.lastgroups = groups; return 1; }
+ return 0;
+ }
+ });
+
+ } else {
+ fields = [ {name: 'display'} ,{name: 'value'} ];
+ config.tpl = '<tpl for="."><div class="x-combo-list-item">{display}</div></tpl>';
+
+ }
+ config.store = new Ext.data.Store({
+ reader: new Ext.data.ArrayReader({}, fields),
+ data: r[i].data.choices
+ });
+
+ config.displayField = 'display';
+ config.valueField = 'value';
+ }
+
+ config.triggerAction = 'all';
+ config.lazyRender = true;
+ config.listClass = 'x-combo-list-small';
+ config.mode = 'local';
+ config.emptyText = this.szComboEmpty;
+ config.selectOnFocus = true;
+ config.editable = false;
+
+ break;
+ case 'date':
+ var today = new Date();
+ today.clearTime();
+ config.xtype = 'datefield';
+ config.minValue = today;
+ break;
+ case 'time':
+ config.xtype = 'timefield';
+ config.increment = 15;
+ config.format = 'H:i';
+ break;
+ case 'integer':
+ config.xtype = 'numberfield';
+ config.allowDecimals = false;
+ break;
+ case 'textfield':
+ config.xtype = 'textarea';
+ break;
+ }
+ if(r[i].data.readonly){
+ config.hideLabel = true;
+ config.height = 200; // anchor width by percentage and height by raw adjustment
+ config.readOnly = true;
+ }
+ this.form.add(config);
+ }
+ if(i) {
+ this.add(this.form);
+ this.show();
+ } else {
+ new Ext.xxv.MessageBox().msgFailure(this.szLoadException, "");
+ }
+
+ },
+
+ onApply: function() {
+ this.el.mask(Ext.LoadMask.prototype.msg, 'x-mask-loading');
+
+ var params = {data:this.item.id,ajax:'json','__action':'save'};
+ for(var i = 0, len = this.store.getCount(); i < len; i++){
+ var record = this.store.getAt(i);
+ if(record.data.readonly == 0) {
+ var field = this.form.getForm().findField(record.data.id);
+ if(field)
+ switch(record.data.type){
+ case 'confirm':
+ params['__'+record.data.id] = field.checked ? 'y' : 'n';
+ break;
+ case 'checkbox':
+ var values = field.getValue();
+ var boxes = [];
+ for(var f = 0, flen = values.length; f < flen; f++){
+ boxes.push(values[f].name);
+ }
+ params['__'+record.data.id] = boxes.join(',');
+ break;
+ case 'time':
+ params['__'+record.data.id] = field.getValue();
+ break;
+ case 'date':
+ params['__'+record.data.id] = field.getValue().dateFormat('Y-m-d');
+ break;
+ default:
+ params['__'+record.data.id] = field.getValue();
+ break;
+ }
+ }
+ }
+ Ext.Ajax.request({
+ url:'?' + Ext.urlEncode({cmd:this.item.cmd})
+ ,method: 'POST'
+ ,params: params
+ ,success: this.onSuccess
+ ,failure: this.onFailure
+ ,scope: this
+ });
+ },
+
+ onFailure : function(response,options){
+ this.el.unmask();
+ new Ext.xxv.MessageBox().msgFailure(this.szFailure,response.statusText);
+ },
+
+ onSuccess : function(response, options){
+ this.el.unmask();
+ var o = eval("("+response.responseText+")");
+ if(o && o.data && typeof(o.data) == 'string'
+ && o.success) {
+ new Ext.xxv.MessageBox().msgSuccess(this.szSuccess, o.data);
+ this.hide();
+ if(this.parentstore)
+ this.parentstore.reload();
+ } else {
+ var msg = '';
+ if(o && o.data && typeof(o.data) == 'string') {
+ msg = o.data;
+ }
+ new Ext.xxv.MessageBox().msgFailure(this.szFailure, msg);
+ }
+ }
+});
diff --git a/skins/jason/help.js b/skins/jason/help.js
index bcae331..3732147 100644
--- a/skins/jason/help.js
+++ b/skins/jason/help.js
@@ -1,29 +1,29 @@
-/*
- * 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$
- */
+ */
-Ext.xxv.help = function(/*config*/){
- //Ext.xxv.help.superclass.constructor.call(this, config);
- //Ext.apply(this, config);
+Ext.xxv.help = function(/*config*/){
+ //Ext.xxv.help.superclass.constructor.call(this, config);
+ //Ext.apply(this, config);
this.store = new Ext.data.Store({
baseParams:{cmd:'help'}
,autoLoad: true
- ,reader: new Ext.xxv.jsonReader({
- fields: [
+ ,reader: new Ext.xxv.jsonReader({
+ fields: [
{name: 'id', type: 'string'},
{name: 'cmd', type: 'string'},
{name: 'module', type: 'string'},
- {name: 'description', type: 'string'}
+ {name: 'description', type: 'string'}
]
})
- ,proxy : new Ext.data.HttpProxy({
- url: this.baseURL()
+ ,proxy : new Ext.data.HttpProxy({
+ url: this.baseURL()
,method: 'GET'
})
});
@@ -32,7 +32,7 @@ Ext.xxv.help = function(/*config*/){
};
-Ext.extend(Ext.xxv.help, Ext.util.Observable, {
+Ext.extend(Ext.xxv.help, Ext.util.Observable, {
onLoad : function(store, records, options) {
@@ -56,24 +56,24 @@ Ext.extend(Ext.xxv.help, Ext.util.Observable, {
,Configure : function(item, e) {
if(e) {
if(XXV.tab.formwin){
- XXV.tab.formwin.close();
- }
+ XXV.tab.formwin.close();
+ }
XXV.tab.formwin = new Ext.xxv.Question({
cmd: 'ce'
,id: item.text
,title: item.text
- });
+ });
}
}
,Settings : function(item, e) {
if(e) {
if(XXV.tab.formwin){
- XXV.tab.formwin.close();
- }
+ XXV.tab.formwin.close();
+ }
XXV.tab.formwin = new Ext.xxv.Question({
cmd: 'up'
,title: item.text
- });
+ });
}
}
,baseURL: function(param) {
@@ -82,7 +82,7 @@ Ext.extend(Ext.xxv.help, Ext.util.Observable, {
}
param.ajax = 'json';
return '?' + Ext.urlEncode(param);
- }
+ }
,cmdHTML: function(cmd, param) {
if(!param) {
param = {};
diff --git a/skins/jason/locale/lang-de.js b/skins/jason/locale/lang-de.js
index 8add744..e302af0 100644
--- a/skins/jason/locale/lang-de.js
+++ b/skins/jason/locale/lang-de.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$
@@ -27,7 +27,7 @@ Ext.xxv.MainMenu.prototype.szMenuRemote = "Fernzugriff";
Ext.xxv.MainMenu.prototype.szMenuView = "Anzeige";
Ext.xxv.MainMenu.prototype.szMenuItemSetup = "Einstellungen";
Ext.xxv.MainMenu.prototype.szGlobalSettings = "Globale Einstellungen";
-Ext.xxv.MainMenu.prototype.szOwnSettings = "Eigene Einstellungen";
+Ext.xxv.MainMenu.prototype.szOwnSettings = "Eigene Einstellungen";
Ext.xxv.MainMenu.prototype.szMenuItemLogout = "Abmelden";
Ext.xxv.MainMenu.prototype.szMenuItemLogoutTooltip = "Wähle diesen Button um sich von XXV abzumelden";
Ext.xxv.MainMenu.prototype.szSelectTheme = "Wähle Thema";
@@ -76,7 +76,7 @@ Ext.xxv.autotimerGrid.prototype.szColSearch = "Suchtext";
Ext.xxv.autotimerGrid.prototype.szColActive = "Aktiv";
Ext.xxv.autotimerGrid.prototype.szColChannels = "Kanäle";
Ext.xxv.autotimerGrid.prototype.szColDirectory = "Verzeichnis";
-Ext.xxv.autotimerGrid.prototype.szColStart = "Beginn";
+Ext.xxv.autotimerGrid.prototype.szColStart = "Beginn";
Ext.xxv.autotimerGrid.prototype.szColStop = "Ende";
Ext.xxv.autotimerGrid.prototype.szColMinLength = "Min. Länge";
Ext.xxv.autotimerGrid.prototype.szLoadException = "Konnte keine Daten über Autotimer holen!\r\n{0}";
@@ -93,7 +93,7 @@ Ext.xxv.ChronicleGrid.prototype.szToolTip = "Zeigt Aufnahmen in chronologischer
Ext.xxv.ChronicleGrid.prototype.szColTitle = "Titel";
Ext.xxv.ChronicleGrid.prototype.szColDay = "Datum";
Ext.xxv.ChronicleGrid.prototype.szColChannel = "Kanal";
-Ext.xxv.ChronicleGrid.prototype.szColStart = "Beginn";
+Ext.xxv.ChronicleGrid.prototype.szColStart = "Beginn";
Ext.xxv.ChronicleGrid.prototype.szColStop = "Ende";
Ext.xxv.ChronicleGrid.prototype.szColDayFormat = "l, d.m.Y";
Ext.xxv.ChronicleGrid.prototype.szLoadException = "Konnte keine Daten der Chronik holen!\r\n{0}";
@@ -110,10 +110,10 @@ Ext.xxv.NowGrid.prototype.szRecord = "Aufnehmen";
Ext.xxv.NowGrid.prototype.szEditTimer = "Timer bearbeiten";
Ext.xxv.NowGrid.prototype.szDeleteTimer = "Timer löschen";
Ext.xxv.NowGrid.prototype.szColPosition = "Position des Kanal";
-Ext.xxv.NowGrid.prototype.szColTitle = "Titel";
-Ext.xxv.NowGrid.prototype.szColChannel = "Kanal";
-Ext.xxv.NowGrid.prototype.szColGrpName = "Gruppe der Kanäle";
-Ext.xxv.NowGrid.prototype.szColStart = "Beginn";
+Ext.xxv.NowGrid.prototype.szColTitle = "Titel";
+Ext.xxv.NowGrid.prototype.szColChannel = "Kanal";
+Ext.xxv.NowGrid.prototype.szColGrpName = "Gruppe der Kanäle";
+Ext.xxv.NowGrid.prototype.szColStart = "Beginn";
Ext.xxv.NowGrid.prototype.szColStop = "Ende";
Ext.xxv.NowGrid.prototype.szLoadException = "Konnte keine Daten holen!\r\n{0}";
Ext.xxv.NowGrid.prototype.szRecordSuccess = "Timer erfolgreich erstellt.\r\n{0}";
@@ -124,8 +124,8 @@ Ext.xxv.programGrid.prototype.szTitle = "Programführer";
Ext.xxv.programGrid.prototype.szFindReRun = "Suche Wiederholung";
Ext.xxv.programGrid.prototype.szRecord = "Aufnehmen";
Ext.xxv.programGrid.prototype.szColTitle = "Titel";
-Ext.xxv.programGrid.prototype.szColDay = "Datum";
-Ext.xxv.programGrid.prototype.szColStart = "Beginn";
+Ext.xxv.programGrid.prototype.szColDay = "Datum";
+Ext.xxv.programGrid.prototype.szColStart = "Beginn";
Ext.xxv.programGrid.prototype.szColStop = "Ende";
Ext.xxv.programGrid.prototype.szColDayFormat = "l, d.m.Y";
Ext.xxv.programGrid.prototype.szLoadException = "Konnte keine Programmdaten holen!\r\n{0}";
@@ -136,8 +136,8 @@ Ext.xxv.searchGrid.prototype.szFindReRun = "Suche Wiederholung";
Ext.xxv.searchGrid.prototype.szRecord = "Aufnehmen";
Ext.xxv.searchGrid.prototype.szColTitle = "Titel";
Ext.xxv.searchGrid.prototype.szColChannel = "Kanal";
-Ext.xxv.searchGrid.prototype.szColDay = "Datum";
-Ext.xxv.searchGrid.prototype.szColStart = "Beginn";
+Ext.xxv.searchGrid.prototype.szColDay = "Datum";
+Ext.xxv.searchGrid.prototype.szColStart = "Beginn";
Ext.xxv.searchGrid.prototype.szColStop = "Ende";
Ext.xxv.searchGrid.prototype.szColDayFormat = "l, d.m.Y";
Ext.xxv.searchGrid.prototype.szLoadException = "Konnte keine Wiederholung finden!\r\n{0}";
@@ -177,15 +177,15 @@ Ext.xxv.timerGrid.prototype.szNew = "Neuen Timer anlegen";
Ext.xxv.timerGrid.prototype.szEdit = "Bearbeiten";
Ext.xxv.timerGrid.prototype.szDelete = "Löschen";
Ext.xxv.timerGrid.prototype.szToggle = "De- bzw. Aktivieren";
-Ext.xxv.timerGrid.prototype.szColTitle = "Titel";
-Ext.xxv.timerGrid.prototype.szColActive = "Aktiv";
-Ext.xxv.timerGrid.prototype.szColPDC = "VPS";
+Ext.xxv.timerGrid.prototype.szColTitle = "Titel";
+Ext.xxv.timerGrid.prototype.szColActive = "Aktiv";
+Ext.xxv.timerGrid.prototype.szColPDC = "VPS";
Ext.xxv.timerGrid.prototype.szColDay = "Tag";
-Ext.xxv.timerGrid.prototype.szColChannel = "Kanal";
-Ext.xxv.timerGrid.prototype.szColStart = "Beginn";
+Ext.xxv.timerGrid.prototype.szColChannel = "Kanal";
+Ext.xxv.timerGrid.prototype.szColStart = "Beginn";
Ext.xxv.timerGrid.prototype.szColStop = "Ende";
Ext.xxv.timerGrid.prototype.szColDuration = "Dauer";
-Ext.xxv.timerGrid.prototype.szSelChEmptyText = "Kanal wählen...";
+Ext.xxv.timerGrid.prototype.szSelChEmptyText = "Kanal wählen...";
Ext.xxv.timerGrid.prototype.szColDayFormat = "l, d.m.Y";
Ext.xxv.timerGrid.prototype.szLoadException = "Konnte keine Daten über Timer holen!\r\n{0}";
Ext.xxv.timerGrid.prototype.szDeleteSuccess = "Timer erfolgreich gelöscht.\r\n{0}";
@@ -231,7 +231,7 @@ Ext.xxv.vdrGrid.prototype.szColHost = "Hostrechner";
Ext.xxv.vdrGrid.prototype.szColActive = "Aktiv";
Ext.xxv.vdrGrid.prototype.szColPrimary = "Primär";
Ext.xxv.vdrGrid.prototype.szColDirectory = "Verzeichnis";
-Ext.xxv.vdrGrid.prototype.szDVBTyp = "Typ der DVB-Karten";
+Ext.xxv.vdrGrid.prototype.szDVBTyp = "Typ der DVB-Karten";
Ext.xxv.vdrGrid.prototype.szLoadException = "Konnte keine Daten über Video Disk Rekorder holen!\r\n{0}";
Ext.xxv.vdrGrid.prototype.szDeleteSuccess = "Video Disk Rekorder erfolgreich gelöscht.\r\n{0}";
Ext.xxv.vdrGrid.prototype.szDeleteFailure = "Konnte Video Disk Rekorder nicht löschen!\r\n{0}";
@@ -239,6 +239,7 @@ Ext.xxv.vdrGrid.prototype.szDeleteFailure = "Konnte Video Disk Rekorder nicht lÃ
/* audio.js */
Ext.xxv.AudioWindow.prototype.szTitle = "Musikwiedergabe";
Ext.xxv.AudioWindow.prototype.szNeedFlash = "Es wird ein aktueller Flash Player benötigt, damit die Musikwiedergabe funktioniert";
+Ext.xxv.AudioWindow.prototype.szSaveFile = "Datei abspeichern";
/* music.js */
Ext.xxv.musicGrid.prototype.szTitle = "Musik";
@@ -255,7 +256,7 @@ Ext.xxv.musicGrid.prototype.szColTitle = "Titel";
Ext.xxv.musicGrid.prototype.szColDuration = "Länge";
Ext.xxv.musicGrid.prototype.szColTrack = "Track";
Ext.xxv.musicGrid.prototype.szColYear = "Jahr";
-Ext.xxv.musicGrid.prototype.szColGenre = "Genre";
+Ext.xxv.musicGrid.prototype.szColGenre = "Genre";
Ext.xxv.musicGrid.prototype.szColComment = "Kommentar";
Ext.xxv.musicGrid.prototype.szLoadException = "Konnte keine Titel der Musikliste holen!\r\n{0}";
diff --git a/skins/jason/locale/lang-en.js b/skins/jason/locale/lang-en.js
index 0386249..098bce2 100644
--- a/skins/jason/locale/lang-en.js
+++ b/skins/jason/locale/lang-en.js
@@ -1,7 +1,7 @@
-/*
- * jason - Javascript based skin for xxv
- * Copyright(c) 2009, anbr
- *
+/*
+ * jason - Javascript based skin for xxv
+ * Copyright(c) 2009, anbr
+ *
* http://xxv.berlios.de/
*
* $Id$
@@ -27,7 +27,7 @@ Ext.xxv.MainMenu.prototype.szMenuRemote = "Remote access";
Ext.xxv.MainMenu.prototype.szMenuView = "View";
Ext.xxv.MainMenu.prototype.szMenuItemSetup = "Setup";
Ext.xxv.MainMenu.prototype.szGlobalSettings = "Global settings";
-Ext.xxv.MainMenu.prototype.szOwnSettings = "Own settings";
+Ext.xxv.MainMenu.prototype.szOwnSettings = "Own settings";
Ext.xxv.MainMenu.prototype.szMenuItemLogout = "Logout";
Ext.xxv.MainMenu.prototype.szMenuItemLogoutTooltip = "Click this button to logout from XXV";
Ext.xxv.MainMenu.prototype.szSelectTheme = "Select theme";
@@ -76,7 +76,7 @@ Ext.xxv.autotimerGrid.prototype.szColSearch = "Search text";
Ext.xxv.autotimerGrid.prototype.szColActive = "Active";
Ext.xxv.autotimerGrid.prototype.szColChannels = "Channels";
Ext.xxv.autotimerGrid.prototype.szColDirectory = "Directory";
-Ext.xxv.autotimerGrid.prototype.szColStart = "Start";
+Ext.xxv.autotimerGrid.prototype.szColStart = "Start";
Ext.xxv.autotimerGrid.prototype.szColStop = "Stop";
Ext.xxv.autotimerGrid.prototype.szColMinLength = "Min. Length";
Ext.xxv.autotimerGrid.prototype.szLoadException = "Couldn't get data about autotimer!\r\n{0}";
@@ -93,7 +93,7 @@ Ext.xxv.ChronicleGrid.prototype.szToolTip = "Display recordings in chronological
Ext.xxv.ChronicleGrid.prototype.szColTitle = "Title";
Ext.xxv.ChronicleGrid.prototype.szColDay = "Day";
Ext.xxv.ChronicleGrid.prototype.szColChannel = "Channel";
-Ext.xxv.ChronicleGrid.prototype.szColStart = "Start";
+Ext.xxv.ChronicleGrid.prototype.szColStart = "Start";
Ext.xxv.ChronicleGrid.prototype.szColStop = "Stop";
Ext.xxv.ChronicleGrid.prototype.szColDayFormat = "l, m/d/Y";
Ext.xxv.ChronicleGrid.prototype.szLoadException = "Couldn't get data from chronicle!\r\n{0}";
@@ -110,10 +110,10 @@ Ext.xxv.NowGrid.prototype.szRecord = "Record";
Ext.xxv.NowGrid.prototype.szEditTimer = "Edit timer";
Ext.xxv.NowGrid.prototype.szDeleteTimer = "Delete timer";
Ext.xxv.NowGrid.prototype.szColPosition = "Channel position";
-Ext.xxv.NowGrid.prototype.szColTitle = "Title";
-Ext.xxv.NowGrid.prototype.szColChannel = "Channel";
-Ext.xxv.NowGrid.prototype.szColGrpName = "Group of channel";
-Ext.xxv.NowGrid.prototype.szColStart = "Start";
+Ext.xxv.NowGrid.prototype.szColTitle = "Title";
+Ext.xxv.NowGrid.prototype.szColChannel = "Channel";
+Ext.xxv.NowGrid.prototype.szColGrpName = "Group of channel";
+Ext.xxv.NowGrid.prototype.szColStart = "Start";
Ext.xxv.NowGrid.prototype.szColStop = "Stop";
Ext.xxv.NowGrid.prototype.szLoadException = "Couldn't get data!\r\n{0}";
Ext.xxv.NowGrid.prototype.szRecordSuccess = "Successful created timer.\r\n{0}";
@@ -124,8 +124,8 @@ Ext.xxv.programGrid.prototype.szTitle = "Program guide";
Ext.xxv.programGrid.prototype.szFindReRun = "Find rerun";
Ext.xxv.programGrid.prototype.szRecord = "Record";
Ext.xxv.programGrid.prototype.szColTitle = "Title";
-Ext.xxv.programGrid.prototype.szColDay = "Day";
-Ext.xxv.programGrid.prototype.szColStart = "Start";
+Ext.xxv.programGrid.prototype.szColDay = "Day";
+Ext.xxv.programGrid.prototype.szColStart = "Start";
Ext.xxv.programGrid.prototype.szColStop = "Stop";
Ext.xxv.programGrid.prototype.szColDayFormat = "l, m/d/Y";
Ext.xxv.programGrid.prototype.szLoadException = "Couldn't get program data!\r\n{0}";
@@ -135,9 +135,9 @@ Ext.xxv.searchGrid.prototype.szTitle = "Search";
Ext.xxv.searchGrid.prototype.szFindReRun = "Find rerun";
Ext.xxv.searchGrid.prototype.szRecord = "Record";
Ext.xxv.searchGrid.prototype.szColTitle = "Title";
-Ext.xxv.searchGrid.prototype.szColChannel = "Channel";
-Ext.xxv.searchGrid.prototype.szColDay = "Day";
-Ext.xxv.searchGrid.prototype.szColStart = "Start";
+Ext.xxv.searchGrid.prototype.szColChannel = "Channel";
+Ext.xxv.searchGrid.prototype.szColDay = "Day";
+Ext.xxv.searchGrid.prototype.szColStart = "Start";
Ext.xxv.searchGrid.prototype.szColStop = "Stop";
Ext.xxv.searchGrid.prototype.szColDayFormat = "l, m/d/Y";
Ext.xxv.searchGrid.prototype.szLoadException = "Couldn't find data!\r\n{0}";
@@ -180,14 +180,14 @@ Ext.xxv.timerGrid.prototype.szToggle = "Enable or disable";
Ext.xxv.timerGrid.prototype.szColTitle = "Title";
Ext.xxv.timerGrid.prototype.szColActive = "Active";
Ext.xxv.timerGrid.prototype.szColPDC = "PDC";
-Ext.xxv.timerGrid.prototype.szColDay = "Day";
+Ext.xxv.timerGrid.prototype.szColDay = "Day";
Ext.xxv.timerGrid.prototype.szColChannel = "Channel";
-Ext.xxv.timerGrid.prototype.szColStart = "Start";
+Ext.xxv.timerGrid.prototype.szColStart = "Start";
Ext.xxv.timerGrid.prototype.szColStop = "Stop";
Ext.xxv.timerGrid.prototype.szColDuration = "Duration";
Ext.xxv.timerGrid.prototype.szHost = "Host";
Ext.xxv.timerGrid.prototype.szColDayFormat = "l, m/d/Y";
-Ext.xxv.timerGrid.prototype.szSelChEmptyText = "Select a channel...";
+Ext.xxv.timerGrid.prototype.szSelChEmptyText = "Select a channel...";
Ext.xxv.timerGrid.prototype.szLoadException = "Couldn't get data about timer!\r\n{0}";
Ext.xxv.timerGrid.prototype.szDeleteSuccess = "Timer deleted successful.\r\n{0}";
Ext.xxv.timerGrid.prototype.szDeleteFailure = "Couldn't delete timer!\r\n{0}";
@@ -233,7 +233,7 @@ Ext.xxv.vdrGrid.prototype.szColHost = "Host computer";
Ext.xxv.vdrGrid.prototype.szColActive = "Active";
Ext.xxv.vdrGrid.prototype.szColPrimary = "Primary";
Ext.xxv.vdrGrid.prototype.szColDirectory = "Directory";
-Ext.xxv.vdrGrid.prototype.szDVBTyp = "Type of DVB-cards";
+Ext.xxv.vdrGrid.prototype.szDVBTyp = "Type of DVB-cards";
Ext.xxv.vdrGrid.prototype.szLoadException = "Couldn't get data about video disk recorder!\r\n{0}";
Ext.xxv.vdrGrid.prototype.szDeleteSuccess = "Video disk recorder deleted successful.\r\n{0}";
Ext.xxv.vdrGrid.prototype.szDeleteFailure = "Couldn't delete video disk recorder!\r\n{0}";
@@ -241,6 +241,7 @@ Ext.xxv.vdrGrid.prototype.szDeleteFailure = "Couldn't delete video disk recorder
/* audio.js */
Ext.xxv.AudioWindow.prototype.szTitle = "Music playback";
Ext.xxv.AudioWindow.prototype.szNeedFlash = "You need to get the latest Flash Player to hear music with this player";
+Ext.xxv.AudioWindow.prototype.szSaveFile = "Save file to disk";
/* music.js */
Ext.xxv.musicGrid.prototype.szTitle = "Music";
@@ -257,7 +258,7 @@ Ext.xxv.musicGrid.prototype.szColTitle = "Title";
Ext.xxv.musicGrid.prototype.szColDuration = "Duration";
Ext.xxv.musicGrid.prototype.szColTrack = "Track";
Ext.xxv.musicGrid.prototype.szColYear = "Year";
-Ext.xxv.musicGrid.prototype.szColGenre = "Genre";
+Ext.xxv.musicGrid.prototype.szColGenre = "Genre";
Ext.xxv.musicGrid.prototype.szColComment = "Comment";
Ext.xxv.musicGrid.prototype.szLoadException = "Couldn't get tracks from music list!\r\n{0}";
diff --git a/skins/jason/locale/lang-it.js b/skins/jason/locale/lang-it.js
index c836e65..7116525 100644
--- a/skins/jason/locale/lang-it.js
+++ b/skins/jason/locale/lang-it.js
@@ -1,7 +1,7 @@
-/*
- * jason - Javascript based skin for xxv
- * Copyright(c) 2009-2010, Diego Pierotto
- *
+/*
+ * jason - Javascript based skin for xxv
+ * Copyright(c) 2009-2010, Diego Pierotto
+ *
* http://xxv.berlios.de/
*
* $Id$
@@ -27,7 +27,7 @@ Ext.xxv.MainMenu.prototype.szMenuRemote = "Accesso remoto";
Ext.xxv.MainMenu.prototype.szMenuView = "Visualizza";
Ext.xxv.MainMenu.prototype.szMenuItemSetup = "Opzioni";
Ext.xxv.MainMenu.prototype.szGlobalSettings = "Impostazioni globali";
-Ext.xxv.MainMenu.prototype.szOwnSettings = "Impostazioni proprie";
+Ext.xxv.MainMenu.prototype.szOwnSettings = "Impostazioni proprie";
Ext.xxv.MainMenu.prototype.szMenuItemLogout = "Esci";
Ext.xxv.MainMenu.prototype.szMenuItemLogoutTooltip = "Fai click sul pulsante per uscire da XXV";
Ext.xxv.MainMenu.prototype.szSelectTheme = "Seleziona tema";
@@ -76,7 +76,7 @@ Ext.xxv.autotimerGrid.prototype.szColSearch = "Cerca testo";
Ext.xxv.autotimerGrid.prototype.szColActive = "Attivo";
Ext.xxv.autotimerGrid.prototype.szColChannels = "Canali";
Ext.xxv.autotimerGrid.prototype.szColDirectory = "Directory";
-Ext.xxv.autotimerGrid.prototype.szColStart = "Inizio";
+Ext.xxv.autotimerGrid.prototype.szColStart = "Inizio";
Ext.xxv.autotimerGrid.prototype.szColStop = "Fine";
Ext.xxv.autotimerGrid.prototype.szColMinLength = "Durata minima";
Ext.xxv.autotimerGrid.prototype.szLoadException = "Impossibile recuperare dati del timer automatico!\r\n{0}";
@@ -93,7 +93,7 @@ Ext.xxv.ChronicleGrid.prototype.szToolTip = "Mostra registrazioni in ordine cron
Ext.xxv.ChronicleGrid.prototype.szColTitle = "Titolo";
Ext.xxv.ChronicleGrid.prototype.szColDay = "Giorno";
Ext.xxv.ChronicleGrid.prototype.szColChannel = "Canale";
-Ext.xxv.ChronicleGrid.prototype.szColStart = "Inizio";
+Ext.xxv.ChronicleGrid.prototype.szColStart = "Inizio";
Ext.xxv.ChronicleGrid.prototype.szColStop = "Fine";
Ext.xxv.ChronicleGrid.prototype.szColDayFormat = "l, m/d/Y";
Ext.xxv.ChronicleGrid.prototype.szLoadException = "Impossibile recuperare dati della cronologia!\r\n{0}";
@@ -110,10 +110,10 @@ Ext.xxv.NowGrid.prototype.szRecord = "Registra";
Ext.xxv.NowGrid.prototype.szEditTimer = "Modifica timer";
Ext.xxv.NowGrid.prototype.szDeleteTimer = "Elimina timer";
Ext.xxv.NowGrid.prototype.szColPosition = "Posizione canale";
-Ext.xxv.NowGrid.prototype.szColTitle = "Titolo";
-Ext.xxv.NowGrid.prototype.szColChannel = "Canale";
-Ext.xxv.NowGrid.prototype.szColGrpName = "Gruppo del canale";
-Ext.xxv.NowGrid.prototype.szColStart = "Inizio";
+Ext.xxv.NowGrid.prototype.szColTitle = "Titolo";
+Ext.xxv.NowGrid.prototype.szColChannel = "Canale";
+Ext.xxv.NowGrid.prototype.szColGrpName = "Gruppo del canale";
+Ext.xxv.NowGrid.prototype.szColStart = "Inizio";
Ext.xxv.NowGrid.prototype.szColStop = "Fine";
Ext.xxv.NowGrid.prototype.szLoadException = "Impossibile recuperare i dati!\r\n{0}";
Ext.xxv.NowGrid.prototype.szRecordSuccess = "Creazione timer riuscita.\r\n{0}";
@@ -124,8 +124,8 @@ Ext.xxv.programGrid.prototype.szTitle = "Guida programmi";
Ext.xxv.programGrid.prototype.szFindReRun = "Cerca repliche";
Ext.xxv.programGrid.prototype.szRecord = "Registra";
Ext.xxv.programGrid.prototype.szColTitle = "Titolo";
-Ext.xxv.programGrid.prototype.szColDay = "Giorno";
-Ext.xxv.programGrid.prototype.szColStart = "Inizio";
+Ext.xxv.programGrid.prototype.szColDay = "Giorno";
+Ext.xxv.programGrid.prototype.szColStart = "Inizio";
Ext.xxv.programGrid.prototype.szColStop = "Fine";
Ext.xxv.programGrid.prototype.szColDayFormat = "l, m/d/Y";
Ext.xxv.programGrid.prototype.szLoadException = "Impossibile recuperare dati del programma!\r\n{0}";
@@ -135,9 +135,9 @@ Ext.xxv.searchGrid.prototype.szTitle = "Cerca";
Ext.xxv.searchGrid.prototype.szFindReRun = "Cerca repliche";
Ext.xxv.searchGrid.prototype.szRecord = "Registra";
Ext.xxv.searchGrid.prototype.szColTitle = "Titolo;
-Ext.xxv.searchGrid.prototype.szColChannel = "Canale";
-Ext.xxv.searchGrid.prototype.szColDay = "Giorno";
-Ext.xxv.searchGrid.prototype.szColStart = "Inizio";
+Ext.xxv.searchGrid.prototype.szColChannel = "Canale";
+Ext.xxv.searchGrid.prototype.szColDay = "Giorno";
+Ext.xxv.searchGrid.prototype.szColStart = "Inizio";
Ext.xxv.searchGrid.prototype.szColStop = "Fine";
Ext.xxv.searchGrid.prototype.szColDayFormat = "l, m/d/Y";
Ext.xxv.searchGrid.prototype.szLoadException = "Impossibile trovare i dati!\r\n{0}";
@@ -180,14 +180,14 @@ Ext.xxv.timerGrid.prototype.szToggle = "Attiva o disattiva";
Ext.xxv.timerGrid.prototype.szColTitle = "Titolo";
Ext.xxv.timerGrid.prototype.szColActive = "Attivo";
Ext.xxv.timerGrid.prototype.szColPDC = "PDC";
-Ext.xxv.timerGrid.prototype.szColDay = "Giorno";
+Ext.xxv.timerGrid.prototype.szColDay = "Giorno";
Ext.xxv.timerGrid.prototype.szColChannel = "Canale";
-Ext.xxv.timerGrid.prototype.szColStart = "Inizio";
+Ext.xxv.timerGrid.prototype.szColStart = "Inizio";
Ext.xxv.timerGrid.prototype.szColStop = "Fine";
Ext.xxv.timerGrid.prototype.szColDuration = "Durata";
Ext.xxv.timerGrid.prototype.szHost = "Nome sistema";
Ext.xxv.timerGrid.prototype.szColDayFormat = "l, m/d/Y";
-Ext.xxv.timerGrid.prototype.szSelChEmptyText = "Seleziona un canale...";
+Ext.xxv.timerGrid.prototype.szSelChEmptyText = "Seleziona un canale...";
Ext.xxv.timerGrid.prototype.szLoadException = "Impossibile recuperare dati sul timer!\r\n{0}";
Ext.xxv.timerGrid.prototype.szDeleteSuccess = "Eliminazione timer riuscita.\r\n{0}";
Ext.xxv.timerGrid.prototype.szDeleteFailure = "Impossibile eliminare timer!\r\n{0}";
@@ -233,7 +233,7 @@ Ext.xxv.vdrGrid.prototype.szColHost = "Nome sistema";
Ext.xxv.vdrGrid.prototype.szColActive = "Attivo";
Ext.xxv.vdrGrid.prototype.szColPrimary = "Primario";
Ext.xxv.vdrGrid.prototype.szColDirectory = "Directory";
-Ext.xxv.vdrGrid.prototype.szDVBTyp = "Tipo di schede DVB";
+Ext.xxv.vdrGrid.prototype.szDVBTyp = "Tipo di schede DVB";
Ext.xxv.vdrGrid.prototype.szLoadException = "Impossibile recuperare dati su Video Disk Recorder!\r\n{0}";
Ext.xxv.vdrGrid.prototype.szDeleteSuccess = "Eliminazione Video Disk Recorder riuscita.\r\n{0}";
Ext.xxv.vdrGrid.prototype.szDeleteFailure = "Impossibile eliminare Video Disk Recorder!\r\n{0}";
@@ -241,6 +241,7 @@ Ext.xxv.vdrGrid.prototype.szDeleteFailure = "Impossibile eliminare Video Disk Re
/* audio.js */
Ext.xxv.AudioWindow.prototype.szTitle = "Riproduci musica";
Ext.xxv.AudioWindow.prototype.szNeedFlash = "Devi avere una versione aggiornata di Flash Player per ascoltare la musica con questo lettore";
+/*** Need translate */ Ext.xxv.AudioWindow.prototype.szSaveFile = "Save file to disk";
/* music.js */
Ext.xxv.musicGrid.prototype.szTitle = "Musica";
@@ -257,7 +258,7 @@ Ext.xxv.musicGrid.prototype.szColTitle = "Titolo";
Ext.xxv.musicGrid.prototype.szColDuration = "Durata";
Ext.xxv.musicGrid.prototype.szColTrack = "Traccia";
Ext.xxv.musicGrid.prototype.szColYear = "Anno";
-Ext.xxv.musicGrid.prototype.szColGenre = "Genere";
+Ext.xxv.musicGrid.prototype.szColGenre = "Genere";
Ext.xxv.musicGrid.prototype.szColComment = "Commento";
Ext.xxv.musicGrid.prototype.szLoadException = "Impossibile recuperare titoli elenco musicale!\r\n{0}";
diff --git a/skins/jason/locale/login-de.js b/skins/jason/locale/login-de.js
index a6dd17e..69a2f60 100644
--- a/skins/jason/locale/login-de.js
+++ b/skins/jason/locale/login-de.js
@@ -1,7 +1,7 @@
-/*
- * jason - Javascript based skin for xxv
- * Copyright(c) 2009, anbr
- *
+/*
+ * jason - Javascript based skin for xxv
+ * Copyright(c) 2009, anbr
+ *
* http://xxv.berlios.de/
*
* $Id$
diff --git a/skins/jason/locale/login-en.js b/skins/jason/locale/login-en.js
index 20e50ae..fc5d087 100644
--- a/skins/jason/locale/login-en.js
+++ b/skins/jason/locale/login-en.js
@@ -1,7 +1,7 @@
-/*
- * jason - Javascript based skin for xxv
- * Copyright(c) 2009, anbr
- *
+/*
+ * jason - Javascript based skin for xxv
+ * Copyright(c) 2009, anbr
+ *
* http://xxv.berlios.de/
*
* $Id$
diff --git a/skins/jason/locale/login-it.js b/skins/jason/locale/login-it.js
index 59c1f2c..c34cdc3 100644
--- a/skins/jason/locale/login-it.js
+++ b/skins/jason/locale/login-it.js
@@ -1,7 +1,7 @@
-/*
- * jason - Javascript based skin for xxv
- * Copyright(c) 2009-2010, Diego Pierotto
- *
+/*
+ * jason - Javascript based skin for xxv
+ * Copyright(c) 2009-2010, Diego Pierotto
+ *
* http://xxv.berlios.de/
*
* $Id$
diff --git a/skins/jason/login.js b/skins/jason/login.js
index ac5c8ac..b8b12dc 100644
--- a/skins/jason/login.js
+++ b/skins/jason/login.js
@@ -1,7 +1,7 @@
-/*
- * jason - Javascript based skin for xxv
- * Copyright(c) 2009, anbr
- *
+/*
+ * jason - Javascript based skin for xxv
+ * Copyright(c) 2009, anbr
+ *
* http://xxv.berlios.de/
*
* $Id$
diff --git a/skins/jason/main.js b/skins/jason/main.js
index 10551e8..150ac80 100644
--- a/skins/jason/main.js
+++ b/skins/jason/main.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$
@@ -10,9 +10,9 @@
var XXV = {
}
-Ext.Component.prototype.stateful = false;
-
-Ext.onReady(function(){
+Ext.Component.prototype.stateful = false;
+
+Ext.onReady(function(){
Ext.BLANK_IMAGE_URL = 'extjs/resources/images/default/s.gif';
Ext.QuickTips.init();
@@ -20,10 +20,10 @@ Ext.onReady(function(){
{
// state: Ext.appState,
expires: new Date(new Date().getTime()+(1000*3600*24*365))
- }));
+ }));
Ext.History.init();
-
- var tpl = Ext.Template.from('preview-tpl', {
+
+ var tpl = Ext.Template.from('preview-tpl', {
compiled:true
,getTitle : function(v, all){
var title = v || all.title;
@@ -54,32 +54,32 @@ Ext.onReady(function(){
}
return channel;
- }
+ }
,getBody : function(v, all){
- return Ext.util.Format.stripScripts(v || all.description).replace(/\r\n/g, '<br />');
- }
- });
- XXV.getTemplate = function(){
- return tpl;
+ return Ext.util.Format.stripScripts(v || all.description).replace(/\r\n/g, '<br />');
+ }
+ });
+ XXV.getTemplate = function(){
+ return tpl;
}
XXV.help = new Ext.xxv.help();
- XXV.side = new Ext.xxv.channelsPanel();
- XXV.tab = new Ext.xxv.tabPanel();
+ XXV.side = new Ext.xxv.channelsPanel();
+ XXV.tab = new Ext.xxv.tabPanel();
XXV.menu = new Ext.xxv.MainMenu();
-
+
XXV.viewport = new Ext.Viewport({
- id:"masterlayout",
- layout:'border',
+ id:"masterlayout",
+ layout:'border',
items:[
XXV.menu,
- XXV.side,
- XXV.tab
- ]
+ XXV.side,
+ XXV.tab
+ ]
});
- // Handle this change event in order to restore the UI to the appropriate history state
- Ext.History.on('change', function(token){
+ // Handle this change event in order to restore the UI to the appropriate history state
+ Ext.History.on('change', function(token){
if(!token){
token = 'n';
}
diff --git a/skins/jason/menus.js b/skins/jason/menus.js
index 0e3ed56..b373dbf 100644
--- a/skins/jason/menus.js
+++ b/skins/jason/menus.js
@@ -1,12 +1,12 @@
-/*
- * 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$
- */
-
+ */
+
Ext.xxv.MainSearchField = Ext.extend(Ext.form.TwinTriggerField, {
initComponent : function(){
Ext.xxv.MainSearchField.superclass.initComponent.call(this);
@@ -45,7 +45,7 @@ Ext.xxv.Menu = Ext.extend(Ext.menu.Menu, {
}
});
-Ext.xxv.MainMenu = function(/*config*/){
+Ext.xxv.MainMenu = function(/*config*/){
var selTheme = this.initTheme();
@@ -56,14 +56,14 @@ Ext.xxv.MainMenu = function(/*config*/){
,handler: function(b,e) { XXV.tab.openTab(b.cmd); }
}
,items:[{
- text:this.szOwnSettings
+ text:this.szOwnSettings
,iconCls: 'setup-icon'
,handler: XXV.help.Settings
- ,scope:XXV.help
+ ,scope:XXV.help
,cmd: 'up'
},{
- text:this.szGlobalSettings
- ,iconCls: 'setup-icon'
+ text:this.szGlobalSettings
+ ,iconCls: 'setup-icon'
,menu: XXV.configMenu
,cmd: 'ce'
},'-',{
@@ -84,8 +84,8 @@ Ext.xxv.MainMenu = function(/*config*/){
var systemMenu = new Ext.menu.Menu({
items:[{
- text:this.szMenuItemSetup
- ,iconCls: 'setup-icon'
+ text:this.szMenuItemSetup
+ ,iconCls: 'setup-icon'
,menu: setupMenu
},'-',{
text:this.szMenuItemLogout
@@ -189,48 +189,48 @@ Ext.xxv.MainMenu = function(/*config*/){
menu:RemoteMenu,
iconCls:"remote-icon"
},{
- text:this.szMenuView,
- iconCls: 'view-icon',
- menu:{
+ text:this.szMenuView,
+ iconCls: 'view-icon',
+ menu:{
items: [
{
text: this.szSelectTheme,
- iconCls: 'preview-hide',
+ iconCls: 'preview-hide',
menu: {
- cls:'reading-menu',
+ cls:'reading-menu',
items: themes
}
}
,
- { text:this.szPreviewPreviewPane,
- iconCls: 'preview-icon',
- menu:{
- id:'reading-menu',
- cls:'reading-menu',
+ { text:this.szPreviewPreviewPane,
+ iconCls: 'preview-icon',
+ menu:{
+ id:'reading-menu',
+ cls:'reading-menu',
items: [
- {
- text:this.szPreviewBottom,
- checked:true,
- group:'rp-group',
- checkHandler:XXV.tab.movePreview,
- scope:XXV.tab,
- iconCls:'preview-bottom'
- },{
- text:this.szPreviewRight,
- checked:false,
- group:'rp-group',
- checkHandler:XXV.tab.movePreview,
- scope:XXV.tab,
- iconCls:'preview-right'
- },{
- text:this.szPreviewHide,
- checked:false,
- group:'rp-group',
- checkHandler:XXV.tab.movePreview,
- scope:XXV.tab,
- iconCls:'preview-hide'
- }]
- }
+ {
+ text:this.szPreviewBottom,
+ checked:true,
+ group:'rp-group',
+ checkHandler:XXV.tab.movePreview,
+ scope:XXV.tab,
+ iconCls:'preview-bottom'
+ },{
+ text:this.szPreviewRight,
+ checked:false,
+ group:'rp-group',
+ checkHandler:XXV.tab.movePreview,
+ scope:XXV.tab,
+ iconCls:'preview-right'
+ },{
+ text:this.szPreviewHide,
+ checked:false,
+ group:'rp-group',
+ checkHandler:XXV.tab.movePreview,
+ scope:XXV.tab,
+ iconCls:'preview-hide'
+ }]
+ }
}
]}
},
@@ -250,7 +250,7 @@ Ext.xxv.MainMenu = function(/*config*/){
};
-Ext.extend(Ext.xxv.MainMenu, Ext.Toolbar, {
+Ext.extend(Ext.xxv.MainMenu, Ext.Toolbar, {
szMenuXXV : "XXV"
,szMenuProgramming : "Programming"
@@ -260,7 +260,7 @@ Ext.extend(Ext.xxv.MainMenu, Ext.Toolbar, {
,szMenuItemSetup : "Setup"
,szGlobalSettings : "Global settings"
- ,szOwnSettings : "Own settings"
+ ,szOwnSettings : "Own settings"
,szMenuItemLogout : "Logout"
,szMenuItemLogoutTooltip : "Click this button to logout from XXV"
diff --git a/skins/jason/monitor.js b/skins/jason/monitor.js
index 243a50c..205add3 100644
--- a/skins/jason/monitor.js
+++ b/skins/jason/monitor.js
@@ -1,13 +1,13 @@
-/*
- * 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$
*/
-
-Ext.xxv.MonitorWindow = function() {
+
+Ext.xxv.MonitorWindow = function() {
this.UpdateRate = 2;
this.UpdateRateInv = [1000,2000,5000,10000,15000,30000,60000];
@@ -32,34 +32,34 @@ Ext.xxv.MonitorWindow = function() {
var marginHeight = 33;
var marginWidth = 16;
- Ext.xxv.MonitorWindow.superclass.constructor.call(this, {
+ Ext.xxv.MonitorWindow.superclass.constructor.call(this, {
title: this.szTitle
- ,monitortpl:tpl
- ,iconCls: 'monitor-icon'
+ ,monitortpl:tpl
+ ,iconCls: 'monitor-icon'
,id: 'monitor-win'
,minWidth: 160
,minHeight: 120
,marginWidth: marginWidth
,marginHeight: marginHeight
- ,width: width
- ,height: height
- ,resizable: true
- ,plain: true
- ,modal: false
- ,autoScroll: false
+ ,width: width
+ ,height: height
+ ,resizable: true
+ ,plain: true
+ ,modal: false
+ ,autoScroll: false
,closeAction: 'hide'
- ,maximizable: true
+ ,maximizable: true
,tools:[
{id:'gear', handler:this.aspect, scope:this, qtip:this.szAspect }
,{id:'plus', handler:this.upFast, scope:this, qtip:this.szUpdateFast }
,{id:'refresh',handler:this.update, scope:this, qtip:this.szUpdate }
,{id:'minus', handler:this.upSlow, scope:this, qtip:this.szUpdateSlow }
- ]
+ ]
,items: [{
id: 'monitor'
,region: 'center'
- ,width: width - marginWidth
- ,height: height - marginHeight
+ ,width: width - marginWidth
+ ,height: height - marginHeight
,html: tpl.apply({
width : width - marginWidth,
height : height - marginHeight
@@ -71,9 +71,9 @@ Ext.xxv.MonitorWindow = function() {
this.on('resize', this.onresize, this);
this.update();
-}
-
-Ext.extend(Ext.xxv.MonitorWindow, Ext.Window, {
+}
+
+Ext.extend(Ext.xxv.MonitorWindow, Ext.Window, {
szTitle : "Monitor"
,szAspect : "Restore aspect ratio correctly"
@@ -157,10 +157,10 @@ Ext.extend(Ext.xxv.MonitorWindow, Ext.Window, {
});
Ext.xxv.MonitorWindowOpen = function(){
- var viewer = Ext.getCmp('main-tabs');
- if(!viewer.monitor){
- viewer.monitor = new Ext.xxv.MonitorWindow();
- } else {
+ var viewer = Ext.getCmp('main-tabs');
+ if(!viewer.monitor){
+ viewer.monitor = new Ext.xxv.MonitorWindow();
+ } else {
viewer.monitor.show();
viewer.monitor.update();
}
diff --git a/skins/jason/movetimers.js b/skins/jason/movetimers.js
index 0e4c67e..8725b45 100644
--- a/skins/jason/movetimers.js
+++ b/skins/jason/movetimers.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,84 +13,84 @@ Ext.xxv.movetimersStore = function() {
return new Ext.data.Store({
baseParams:{cmd:'mtl'}
,autoLoad:{params:{start:0, limit:configuration.pageSize}}
- ,reader: new Ext.xxv.jsonReader({
- fields: [
+ ,reader: new Ext.xxv.jsonReader({
+ fields: [
{name: 'id', type: 'int'},
{name: 'source', type: 'string'},
{name: 'destination', type: 'string'},
{name: 'move', type: 'string'},
- {name: 'original', type: 'string'}
+ {name: 'original', 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:'source', direction:'ASC'}
});
};
-Ext.xxv.movetimersGrid = function(viewer) {
- this.viewer = viewer;
- //Ext.apply(this, {}); // Apply config
+Ext.xxv.movetimersGrid = function(viewer) {
+ this.viewer = viewer;
+ //Ext.apply(this, {}); // Apply config
// create the data store
this.store = new Ext.xxv.movetimersStore();
this.store.setDefaultSort('source', "ASC");
this.columns = [
- {
- header: this.szColSource
- ,dataIndex: 'source'
+ {
+ header: this.szColSource
+ ,dataIndex: 'source'
,width: 200
- },{ header: this.szColDestination
- ,dataIndex: 'destination'
+ },{ header: this.szColDestination
+ ,dataIndex: 'destination'
,width: 200
- },{ header: this.szColMove
- ,dataIndex: 'move'
+ },{ header: this.szColMove
+ ,dataIndex: 'move'
,width: 200
- },{ header: this.szColOriginal
- ,dataIndex: 'original'
+ },{ header: this.szColOriginal
+ ,dataIndex: 'original'
,width: 200
}
- ];
+ ];
var cm = new Ext.grid.ColumnModel(this.columns);
cm.defaultSortable = true;
- Ext.xxv.movetimersGrid.superclass.constructor.call(this, {
- region: 'center'
- ,id: 'movetimers-view-grid'
+ Ext.xxv.movetimersGrid.superclass.constructor.call(this, {
+ region: 'center'
+ ,id: 'movetimers-view-grid'
,loadMask: true
,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:'mtc'
- ,iconCls: 'new-icon'
-// ,text: this.szNew
- ,scope: this
- ,disabled:false
- ,handler: function(){ this.EditItem(null); }
+ {
+ id:'mtc'
+ ,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.movetimersGrid, Ext.grid.EditorGridPanel, {
@@ -116,64 +116,64 @@ Ext.extend(Ext.xxv.movetimersGrid, 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:'mte'
- ,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:'mte'
+ ,text: this.szEdit
+ ,iconCls: 'edit-icon'
+ ,scope:this
,disabled: true
,handler: function() { this.EditItem(this.ctxRecord); }
- },{
- itemId:'mtd'
- ,text: this.szDelete
- ,iconCls: 'delete-icon'
- ,scope:this
+ },{
+ itemId:'mtd'
+ ,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');
+ ]
+ });
+ 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;
+ 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;
- }
+ }
}
/******************************************************************************/
,onDeleteSuccess : function( response,options )
{
this.loadMask.hide();
- var o = eval("("+response.responseText+")");
+ var o = eval("("+response.responseText+")");
if(o && o.data && typeof(o.data) == 'string'
&& o.success) {
@@ -209,7 +209,7 @@ Ext.extend(Ext.xxv.movetimersGrid, Ext.grid.EditorGridPanel, {
}
,DeleteItem : function( record ) {
- this.stopEditing();
+ this.stopEditing();
this.loadMask.show();
var gsm = this.getSelectionModel();
@@ -239,7 +239,7 @@ Ext.extend(Ext.xxv.movetimersGrid, Ext.grid.EditorGridPanel, {
this.stopEditing();
var item;
- if(record != null) {
+ if(record != null) {
var gsmTimer = this.getSelectionModel();
gsmTimer.selectRecords([record]);
@@ -257,36 +257,36 @@ Ext.extend(Ext.xxv.movetimersGrid, 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 createMoveTimersView(viewer,id) {
viewer.gridMoveTimers = new Ext.xxv.movetimersGrid(viewer);
- tab = new Ext.xxv.Panel({
+ tab = new Ext.xxv.Panel({
id: id,
iconCls:"movetimers-icon",
- closable:true,
+ closable:true,
border:false,
layout:'border',
- stateful:true,
- items:[
+ stateful:true,
+ items:[
viewer.gridMoveTimers
- ]
- });
+ ]
+ });
viewer.add(tab);
diff --git a/skins/jason/music.js b/skins/jason/music.js
index ebc211f..0365bb7 100644
--- a/skins/jason/music.js
+++ b/skins/jason/music.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,10 +13,10 @@ Ext.xxv.musicStore = function() {
return new Ext.data.GroupingStore({
baseParams:{cmd:'ml',data:'all:1'}
,autoLoad:{params:{start:0, limit:configuration.pageSize}}
- ,reader: new Ext.xxv.jsonReader({
- fields: [
+ ,reader: new Ext.xxv.jsonReader({
+ fields: [
{name: 'id', type: 'int'}
- ,{name: 'artist', type: 'string'}
+ ,{name: 'artist', type: 'string'}
,{name: 'album', type: 'string'}
,{name: 'title', type: 'string'}
,{name: 'track', type: 'int'}
@@ -26,18 +26,18 @@ Ext.xxv.musicStore = function() {
,{name: 'comment', 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:'track', direction:'ASC'}
,groupField:'album'
});
};
-Ext.xxv.musicGrid = function(viewer) {
- this.viewer = viewer;
- //Ext.apply(this, {}); // Apply config
+Ext.xxv.musicGrid = function(viewer) {
+ this.viewer = viewer;
+ //Ext.apply(this, {}); // Apply config
// create the data store
this.store = new Ext.xxv.musicStore();
@@ -45,45 +45,45 @@ Ext.xxv.musicGrid = function(viewer) {
this.columns = [
{
- header: this.szColArtist
- ,dataIndex: 'artist'
+ header: this.szColArtist
+ ,dataIndex: 'artist'
,width: 200
- },{
- header: this.szColTitle
- ,dataIndex: 'title'
+ },{
+ header: this.szColTitle
+ ,dataIndex: 'title'
,width: 200
,id:'expand'
},{
- header: this.szColAlbum
- ,dataIndex: 'album'
+ header: this.szColAlbum
+ ,dataIndex: 'album'
,width: 200
,hidden: true
- },{
- header: this.szColTrack
- ,dataIndex: 'track'
+ },{
+ header: this.szColTrack
+ ,dataIndex: 'track'
+ ,width: 50
+ ,hidden: true
+ },{
+ header: this.szColYear
+ ,dataIndex: 'year'
,width: 50
- ,hidden: true
- },{
- header: this.szColYear
- ,dataIndex: 'year'
+ ,hidden: true
+ },{
+ header: this.szColDuration
+ ,dataIndex: 'duration'
,width: 50
- ,hidden: true
- },{
- header: this.szColDuration
- ,dataIndex: 'duration'
- ,width: 50
- },{
- header: this.szColGenre
- ,dataIndex: 'genre'
+ },{
+ header: this.szColGenre
+ ,dataIndex: 'genre'
,width: 100
- ,hidden: true
- },{
- header: this.szColComment
- ,dataIndex: 'comment'
+ ,hidden: true
+ },{
+ header: this.szColComment
+ ,dataIndex: 'comment'
,width: 250
- ,hidden: true
+ ,hidden: true
}
- ];
+ ];
var cm = new Ext.grid.ColumnModel(this.columns);
cm.defaultSortable = true;
@@ -98,17 +98,17 @@ Ext.xxv.musicGrid = function(viewer) {
,query:'data'
}
});
- Ext.xxv.musicGrid.superclass.constructor.call(this, {
- region: 'center'
- ,id: 'music-view-grid'
+ Ext.xxv.musicGrid.superclass.constructor.call(this, {
+ region: 'center'
+ ,id: 'music-view-grid'
,loadMask: true
,clicksToEdit:1
,autoExpandColumn:'expand'
,cm: cm
- ,sm: new Ext.grid.RowSelectionModel({
- singleSelect:false
- })
- ,view: new Ext.grid.GroupingView({
+ ,sm: new Ext.grid.RowSelectionModel({
+ singleSelect:false
+ })
+ ,view: new Ext.grid.GroupingView({
enableGroupingMenu:false
,showGroupName: false
//,groupTextTpl: '{text} <img class="coverimage" src="?cmd=mi&data={[values.rs[0].data["id"]]}" />'
@@ -156,26 +156,26 @@ Ext.xxv.musicGrid = function(viewer) {
,store: this.store
,displayInfo: true
/*,items: [
- {
- id:'mn'
- ,iconCls: 'music-new-icon'
- ,tooltip: this.szNew
- ,scope: this
- ,disabled:false
- ,handler: function(){ this.EditItem(null); }
+ {
+ id:'mn'
+ ,iconCls: 'music-new-icon'
+ ,tooltip: this.szNew
+ ,scope: this
+ ,disabled:false
+ ,handler: function(){ this.EditItem(null); }
}
]*/})
,plugins:[this.filter]
});
- 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.onDblClick, this);
+ this.on('rowdblclick', this.onDblClick, this);
};
Ext.extend(Ext.xxv.musicGrid, Ext.grid.GridPanel, { // Ext.grid.EditorGridPanel
@@ -194,7 +194,7 @@ Ext.extend(Ext.xxv.musicGrid, Ext.grid.GridPanel, { // Ext.grid.EditorGridPanel
,szColDuration : "Duration"
,szColTrack : "Track"
,szColYear : "Year"
- ,szColGenre : "Genre"
+ ,szColGenre : "Genre"
,szColComment : "Comment"
,szLoadException : "Couldn't get tracks from music list!\r\n{0}"
@@ -207,82 +207,82 @@ Ext.extend(Ext.xxv.musicGrid, Ext.grid.GridPanel, { // 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:'mg'
- ,text: this.szPlaying
- ,iconCls: 'playing-music-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:'mg'
+ ,text: this.szPlaying
+ ,iconCls: 'playing-music-icon'
+ ,scope:this
,disabled: true
- ,handler: function() { this.PlayingItem(this.ctxRecord); }
- },'-',{
- text: this.szFindTitle ,iconCls: 'find-icon'
- ,scope:this
+ ,handler: function() { this.PlayingItem(this.ctxRecord); }
+ },'-',{
+ text: this.szFindTitle ,iconCls: 'find-icon'
+ ,scope:this
,disabled: false
,handler: function(){ this.reload('title', this.ctxRecord.data.title);}
- },{
- text: this.szFindArtist ,iconCls: 'find-icon'
- ,scope:this
+ },{
+ text: this.szFindArtist ,iconCls: 'find-icon'
+ ,scope:this
,disabled: false
,handler: function(){ this.reload('artist', this.ctxRecord.data.artist);}
- },{
- text: this.szFindAlbum ,iconCls: 'find-icon'
- ,scope:this
+ },{
+ text: this.szFindAlbum ,iconCls: 'find-icon'
+ ,scope:this
,disabled: false
,handler: function(){ this.reload('album', this.ctxRecord.data.album);}
}/*,{
- text: this.szFindGenre ,iconCls: 'find-icon'
- ,scope:this
+ text: this.szFindGenre ,iconCls: 'find-icon'
+ ,scope:this
,disabled: false
,handler: function(){ this.reload('genre', this.ctxRecord.data.genre);}
}*/,{
- text: this.szFindYear ,iconCls: 'find-icon'
- ,scope:this
+ text: this.szFindYear ,iconCls: 'find-icon'
+ ,scope:this
,disabled: false
,handler: function(){ this.reload('year', this.ctxRecord.data.year);}
- }
- ]
- });
- 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');
+ }
+ ]
+ });
+ 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;
+ var items = this.menu.items;
if(items) { items.eachKey(function(key, f) {
if(f.disabled && 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) {
- return String.format(
- '<div class="topic"><b>{0}</b></div>',
- value
+ formatTitle: function(value, p, record) {
+ return String.format(
+ '<div class="topic"><b>{0}</b></div>',
+ value
);
}
,reload : function(topic, value) {
@@ -291,24 +291,24 @@ Ext.extend(Ext.xxv.musicGrid, Ext.grid.GridPanel, { // Ext.grid.EditorGridPanel
this.filter.field.setValue('');
}
this.store.baseParams = {
- cmd: 'ml'
- ,data: topic + ':' + value
+ cmd: 'ml'
+ ,data: topic + ':' + value
};
- this.store.title = value;
- this.store.load({params:{start:0, limit:configuration.pageSize}});
+ this.store.title = value;
+ this.store.load({params:{start:0, limit:configuration.pageSize}});
}
/******************************************************************************/
,onDblClick : function(grid, index, e) {
- //if(e) e.stopEvent();
- if(this.ctxRow){
- Ext.fly(this.ctxRow).removeClass('x-node-ctx');
- this.ctxRow = null;
- }
+ //if(e) e.stopEvent();
+ if(this.ctxRow){
+ Ext.fly(this.ctxRow).removeClass('x-node-ctx');
+ this.ctxRow = null;
+ }
var record = this.store.getAt(index);
this.PlayingItem(record);
}
,PlayingItem : function( record ) {
- this.stopEditing();
+ this.stopEditing();
//this.loadMask.show();
var gsm = this.getSelectionModel();
@@ -333,9 +333,9 @@ Ext.extend(Ext.xxv.musicGrid, Ext.grid.GridPanel, { // Ext.grid.EditorGridPanel
,artist: toartist
};
- if(!this.viewer.audiowin){
- this.viewer.audiowin = new Ext.xxv.AudioWindow(item);
- } else {
+ if(!this.viewer.audiowin){
+ this.viewer.audiowin = new Ext.xxv.AudioWindow(item);
+ } else {
this.viewer.audiowin.show(item);
}
//this.loadMask.hide();
@@ -354,15 +354,15 @@ function createMusicView(viewer,id) {
viewer.musicGrid = new Ext.xxv.musicGrid(viewer);
- tab = new Ext.xxv.Panel({
+ tab = new Ext.xxv.Panel({
id: id,
iconCls:"music-icon",
- closable:true,
+ closable:true,
border:false,
layout:'border',
- stateful:true,
- items:[ viewer.musicGrid ]
- });
+ stateful:true,
+ items:[ viewer.musicGrid ]
+ });
viewer.add(tab);
diff --git a/skins/jason/now.js b/skins/jason/now.js
index 0e4b60a..70bedf0 100644
--- a/skins/jason/now.js
+++ b/skins/jason/now.js
@@ -1,590 +1,590 @@
-/*
- * jason - Javascript based skin for xxv
- * Copyright(c) 2008-2009, anbr
- *
- * http://xxv.berlios.de/
- *
- * $Id$
- */
-
-Ext.xxv.NowStore = function() {
- return new Ext.data.GroupingStore({
- baseParams:{cmd:'n','__cgrp':'all'}
- ,autoLoad:{params:{start:0, limit:configuration.pageSize}}
- ,reader: new Ext.xxv.jsonReader({
- fields: [
- {name: 'id', type: 'string'}
- ,{name: 'title', type: 'string'}
- ,{name: 'subtitle', type: 'string'}
- ,{name: 'channel', type: 'string'}
- ,{name: 'chid', type: 'string'}
- ,{name: 'grpname', type: 'string'}
- ,{name: 'start', type: 'string' }
- ,{name: 'stop', type: 'string' }
- ,{name: 'description', type: 'string'}
- ,{name: 'prozent', type: 'string'}
- ,{name: 'timerid', type: 'string'}
- ,{name: 'timeractiv', type: 'string'}
- ,{name: 'running', type: 'string'}
- ,{name: 'vps', type: 'string'} //type:'date', dateFormat:'timestamp'}
- ,{name: 'rang', type: 'int'} //dummy field created after onload
- ]
- })
- ,proxy : new Ext.data.HttpProxy({
- url: XXV.help.baseURL()
- ,method: 'GET'
- })
- ,sortInfo:{field:'rang', direction:'ASC'}
- ,groupField:'grpname'
- ,remoteGroup:true
- });
-}
-
-Ext.xxv.NowGrid = function(viewer) {
-
- this.viewer = viewer;
- this.preview = new Ext.xxv.NowPreview(viewer);
-
- // create the data store
- this.store = new Ext.xxv.NowStore();
- this.store.setDefaultSort('rang', "ASC");
-
- var range = new Array();
- range.push([this.szPresent,0]);
- range.push([this.szFollowing,this.szFollowing]);
- for(var i = 0, len = configuration.periods.length; i < len; i++){
- range.push([configuration.periods[i],configuration.periods[i]]);
- }
-
- this.timefield = new Ext.form.ComboBox({
- id:'timefield'
- ,width:75
- ,store: new Ext.data.Store({
- reader: new Ext.data.ArrayReader({}, [{name: 'display'},{name: 'value'} ]),
- data: range
- })
- ,displayField:'display'
- ,valueField:'value'
- ,triggerAction: 'all'
- ,lazyRender:true
- ,listClass: 'x-combo-list-small'
- ,mode: 'local'
- ,emptyText:this.szPresent
- ,selectOnFocus:false
- ,editable: true
- ,maskRe: /^([0-9\:]+)$/
- ,regex: new RegExp("^([0-9]+\:[0-9]+)|("+this.szFollowing+")$")
- ,maxLengthText: 5
- ,listeners: {
- 'select': {fn:this.reload, scope:this}
- ,'specialkey': {fn:this.onSpecialkey, scope:this}
- }
- });
-
- this.columns = [
- {
- header: this.szColPosition,
- dataIndex: 'rang',
- width: 20,
- hidden: true
- },{
- id:'expand'
- ,header: this.szColTitle
- ,dataIndex: 'title'
- ,width: 150
- ,renderer: { fn: this.formatTitle, scope: this }
- },{
- header: this.szColChannel,
- dataIndex: 'channel',
- width: 50
- },{
- header: this.szColGrpName,
- dataIndex: 'grpname',
- width: 50,
- hidden: true
- },{
- header: this.szColStart,
- dataIndex: 'start',
- width: 50
- },{
- header: this.szColStop,
- dataIndex: 'stop',
- width: 50
- }
- ];
-
- var cm = new Ext.grid.ColumnModel(this.columns);
- cm.defaultSortable = true;
-
- Ext.xxv.NowGrid.superclass.constructor.call(this, {
- region: 'center'
- ,id: 'now-grid'
- ,loadMask: false
- ,autoExpandColumn:'expand'
- ,cm: cm
- ,sm: new Ext.grid.RowSelectionModel({
- singleSelect:true
- })
- ,view: new Ext.grid.GroupingView({
- enableGroupingMenu:false
- ,forceFit:true
- ,showGroupName: false
- })
- ,tbar:new Ext.PagingToolbar({
- pageSize: configuration.pageSize
- ,store: this.store
- ,displayInfo: true
- })
- });
-
- var tbPosition = 15
- var tb = this.topToolbar;
- tb.insert(tbPosition+0, '-');
- tb.insert(tbPosition+1, this.timefield);
-
- this.store.on({
- 'load' : this.onLoad
- ,'beforeload' : this.onBeforeLoad
- ,'loadexception' : this.onLoadException
- ,scope:this
- });
-
- this.on('rowcontextmenu', this.onContextClick, this);
- this.getSelectionModel().on('rowselect', this.preview.select, this.preview, {buffer:50});
- this.on('rowdblclick', this.onSelectProgram, this);
-};
-
-Ext.extend(Ext.xxv.NowGrid, Ext.grid.GridPanel, {
-
- szTitle : "Program guide"
- ,szPresent : "Present"
- ,szFollowing : "Following"
- ,szFindReRun : "Find rerun"
- ,szProgram : "Show program"
- ,szRecord : "Record"
- ,szEditTimer : "Edit timer"
- ,szDeleteTimer : "Delete timer"
- ,szColPosition : "Channel position"
- ,szColTitle : "Title"
- ,szColChannel : "Channel"
- ,szColGrpName : "Group of channel"
- ,szColStart : "Start"
- ,szColStop : "Stop"
- ,szLoadException : "Couldn't get data!\r\n{0}"
- ,szRecordSuccess : "Successful created timer.\r\n{0}"
- ,szRecordFailure : "Couldn't create timer!\r\n{0}"
- ,szDeleteSuccess : "Timer deleted successful.\r\n{0}"
- ,szDeleteFailure : "Couldn't delete timer!\r\n{0}"
-
- ,onLoadException : function( scope, o, arg, e) {
- new Ext.xxv.MessageBox().msgFailure(this.szLoadException, e.message);
- }
- ,onBeforeLoad : function( store, opt ) {
- this.preview.clear();
- }
- ,onLoad : function( store, records, opt ) {
- var l = records.length;
- for (var i = 0; i < l; i++) {
- records[i].data.rang = i;
- }
- if(store.baseParams.data
- && store.baseParams.cmd != 'nx'
- && store.reader.meta
- && store.reader.meta.param
- && store.reader.meta.param.zeit) {
- var datum = new Date(store.reader.meta.param.zeit * 1000);
- this.ownerCt.SetPanelTitle(datum.dateFormat('l - H:i'));
- } else if(store.baseParams.cmd == 'nx')
- this.ownerCt.SetPanelTitle(this.szFollowing + " - " + new Date().dateFormat('H:i'));
- else
- this.ownerCt.SetPanelTitle(this.szPresent + " - " + new Date().dateFormat('H:i'));
- this.getSelectionModel().selectFirstRow();
- }
- ,onSpecialkey : function(f, e) {
- if(e.getKey() == e.ENTER){
- this.reload();
- }
- }
- ,onSelectProgram : function(grid, index, e) {
- e.stopEvent();
- if(this.ctxRow){
- Ext.fly(this.ctxRow).removeClass('x-node-ctx');
- this.ctxRow = null;
- }
- var record = this.store.getAt(index);
- var data = {'id':record.data.chid,'name':record.data.channel};
- this.viewer.openProgram(data);
- }
- ,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:'s'
- ,text: this.szFindReRun
- ,iconCls: 'find-icon'
- ,scope: this
- ,disabled: true
- ,handler: function(){ this.viewer.searchTab(this.ctxRecord); }
- },{
- itemId:'p'
- ,text: this.szProgram
- ,iconCls: 'program-icon'
- ,scope: this
- ,disabled: true
- ,handler: function(){
- var data = {'id':this.ctxRecord.data.chid,'name':this.ctxRecord.data.channel};
- this.viewer.openProgram(data); }
- },{
- itemId:'tn'
- ,text: this.szRecord
- ,iconCls: 'record-icon'
- ,scope:this
- ,disabled: true
- ,handler: function() { this.Record(this.ctxRecord); }
- },{
- itemId:'te'
- ,text: this.szEditTimer
- ,iconCls: 'timer-edit-icon'
- ,scope:this
- ,disabled: true
- ,handler: function() { this.EditTimer(this.ctxRecord, this.store); }
- },{
- itemId:'td'
- ,text: this.szDeleteTimer
- ,iconCls: 'timer-delete-icon'
- ,scope:this
- ,disabled: true
- ,handler: function() { this.DeleteTimer(this.ctxRecord, this.store); }
- },'-',{
- itemId:'lst'
- ,iconCls:'stream-icon'
- ,text: XXV.side.webcastText
- ,scope: this
- ,disabled: true
- ,handler: function(){ XXV.side.onWebCastChannel(this.ctxRecord.data.chid); }
- },{
- itemId:'sw'
- ,iconCls: 'switch-icon'
- ,text: XXV.side.switchText
- ,scope: this
- ,disabled: true
- ,handler: function(){ XXV.side.onSwitchChannel(this.ctxRecord.data.chid); }
- }
- ]
- });
- 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 timerid = this.ctxRecord.data.timerid;
- var follow = this.store.baseParams.cmd != 'n' || this.store.baseParams.data;
- var items = this.menu.items;
- if(items) { items.eachKey(function(key, f) {
- if(follow) {
- if(f.itemId == 'lst')
- return;
- if(f.itemId == 'sw')
- return;
- }
- if(f.itemId == 'tn') { if(timerid) f.hide(); else f.show(); }
- else if(f.itemId == 'te') { if(timerid) f.show(); else f.hide(); }
- else if(f.itemId == 'td') { if(timerid) f.show(); else f.hide(); }
- 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;
- }
- if(this.menu) {
- this.menu.destroy();
- delete this.menu;
- this.menu = null;
- }
- }
- ,reload : function() {
- if(this.store.baseParams.data)
- delete(this.store.baseParams['data']);
-
- var time = this.timefield.lastQuery;
- if(!time || time == '') time = this.timefield.getValue();
- if(!time || time == this.szPresent) {
- this.store.baseParams.cmd = 'n';
- } else if(time == this.szFollowing) {
- this.store.baseParams.cmd = 'nx';
- } else {
- this.store.baseParams.cmd = 'n';
- this.store.baseParams.data = time;
- }
- this.store.load({params:{start:0, limit:configuration.pageSize}});
- }
-
-/******************************************************************************/
- ,onRecordSuccess : function( response,options )
- {
- this.viewer.loadMask.hide();
- var json = response.responseText;
- var o = eval("("+json+")");
- if(!o || !o.data || typeof(o.data) != 'string') {
- throw {message: "Ajax.read: Json message not found"};
- }
- if(o.success) {
- new Ext.xxv.MessageBox().msgSuccess(this.szRecordSuccess, o.data);
- this.updateTimer();
- } else {
- new Ext.xxv.MessageBox().msgFailure(this.szRecordFailure, o.data);
- }
- }
- ,onRecordFailure : function( response,options )
- {
- this.viewer.loadMask.hide();
- new Ext.xxv.MessageBox().msgFailure(this.szRecordFailure, response.statusText);
- }
- ,Record : function(record) {
- this.RecordID(record.data.id);
- }
- ,RecordID : function(id) {
- this.viewer.loadMask.show();
- Ext.Ajax.request({
- scope: this
- ,url: XXV.help.cmdAJAX('tn',{ data: id, '__fast':'1' })
- ,success: this.onRecordSuccess
- ,failure: this.onRecordFailure
- });
- }
- ,updateTimer : function() {
- if(this.viewer.gridTimer) {
- this.viewer.gridTimer.dataDirty = true;
- }
- }
- ,EditTimer : function(record,store) {
- var item;
-
- if(record.data.timerid) {
- item = {
- cmd: 'te'
- ,id: record.data.timerid
- ,title: record.data.title
- };
- } else {
- item = {
- cmd: 'tn'
- ,id: record.data.id
- ,title: this.szEditTimer
- };
- }
-
- if(this.viewer.formwin){
- this.viewer.formwin.close();
- }
- this.viewer.formwin = new Ext.xxv.Question(item,store);
- }
- /******************************************************************************/
- ,onDeleteSuccess : function( response,options )
- {
- this.viewer.loadMask.hide();
-
- var o = eval("("+response.responseText+")");
-
- if(o && o.data && typeof(o.data) == 'string'
- && o.success) {
- new Ext.xxv.MessageBox().msgSuccess(this.szDeleteSuccess, o.data);
-
- var items = options.params.data.split(",");
- for (var j = 0, jlen = options.store.getCount(); j < jlen; j++) {
- var record = options.store.getAt(j);
- for(var i = 0, len = items.length; i < len; i++){
- if(!record || record.data.timerid != items[i]) {
- continue;
- }
- record.data.timerid = 0;
- record.commit();
- }
- }
- this.updateTimer();
- } else {
- var msg = '';
- if(o && o.data && typeof(o.data) == 'string') {
- msg = o.data;
- }
- new Ext.xxv.MessageBox().msgFailure(this.szDeleteFailure, msg);
- }
- }
- ,onDeleteFailure : function( response,options )
- {
- this.viewer.loadMask.hide();
- new Ext.xxv.MessageBox().msgFailure(this.szDeleteFailure, response.statusText);
- }
- ,DeleteTimer : function(record) {
- var gsm = this.getSelectionModel();
- var sel = gsm.getSelections()
- if(sel.length <= 0) {
- gsm.selectRecords([record]);
- sel.push(record);
- }
- var items = "";
- for(var i = 0, len = sel.length; i < len; i++){
- if(i != 0)
- items += ',';
- if(sel[i].data.timerid == 0) {
- continue;
- }
- items += sel[i].data.timerid;
- }
- this.DeleteTimerId(items, this.store);
- }
- ,DeleteTimerId : function( items,store ) {
- if(items.length <= 0)
- return;
- this.viewer.loadMask.show();
-
- Ext.Ajax.request({
- scope: this
- ,url: XXV.help.cmdAJAX('td')
- ,timeout: 15000
- ,success: this.onDeleteSuccess
- ,failure: this.onDeleteFailure
- ,store: store
- ,params:{ data: items }
- });
- }
-
- ,formatTitle: function(value, p, record) {
-
- var style = "";
- if(record.data.timerid) {
- if(record.data.timeractiv != 1) {
- style = " deactive";
- } else if(record.data.running == 1) {
- style = " running";
- } else {
- style = " active";
- }
- }
-
- return String.format(
- '<div class="topic{2}"><b>{0}</b> <span class="subtitle">{1}</span></div>'
- , value, record.data.subtitle, style
- );
- }
-});
-
-Ext.xxv.NowPreview = function(viewer) {
- this.viewer = viewer;
- Ext.xxv.NowPreview.superclass.constructor.call(this, {
- id: 'now-preview',
- region: 'south',
- cls:'preview',
- autoScroll: true,
- stateful:true,
- tbar: [ {
- id:'s',
- tooltip: Ext.xxv.NowGrid.prototype.szFindReRun,
- iconCls: 'find-icon',
- disabled:true,
- scope: viewer,
- handler: function(){ this.searchTab(this.gridNow.getSelectionModel().getSelected()); }
- },{
- id:'tn',
- tooltip: Ext.xxv.NowGrid.prototype.szRecord,
- iconCls: 'record-icon',
- disabled:true,
- scope: viewer,
- handler: function(){ this.Record(this.gridNow.getSelectionModel().getSelected()); }
- },{
- id:'te',
- tooltip: Ext.xxv.NowGrid.prototype.szEditTimer,
- iconCls: 'timer-edit-icon',
- disabled:true,
- scope: viewer,
- handler: function(){
- this.gridNow.EditTimer(this.gridNow.getSelectionModel().getSelected());
- }
- },{
- id:'td',
- tooltip: Ext.xxv.NowGrid.prototype.szDeleteTimer,
- iconCls: 'timer-delete-icon',
- disabled:true,
- scope: viewer,
- handler: function(){
- this.gridNow.DeleteTimer(this.gridNow.getSelectionModel().getSelected());
- }
- } ]
- });
-};
-
-Ext.extend(Ext.xxv.NowPreview, Ext.Panel, {
- select : function(sm, index, record){
- if(this.body)
- XXV.getTemplate().overwrite(this.body, record.data);
-
- // Enable all toolbar buttons
- var items = this.topToolbar.items;
- if(items) {
- items.eachKey(function(key, f) {
- if(f.id == 'tn') { if(record.data.timerid) f.hide(); else f.show(); }
- else if(f.id == 'te') { if(record.data.timerid) f.show(); else f.hide(); }
- else if(f.id == 'td') { if(record.data.timerid) f.show(); else f.hide(); }
- if(XXV.help.cmdAllowed(key)) f.enable();
- },items);
- }
- }
- ,clear: function(){
- if(this) {
- if(this.body)
- this.body.update('');
- // Disable all items
- var items = this.topToolbar.items;
- if(items) { items.eachKey(function(key, f){f.disable();},items); }
- }
- }
-});
-
-function createNowView(viewer,id) {
-
- viewer.gridNow = new Ext.xxv.NowGrid(viewer);
-
- var tab = new Ext.xxv.Panel({
- id:id,
- stateful:true,
- iconCls: 'channel-icon',
- layout:'border',
- items:[
- viewer.gridNow,
- {
- id:'now-bottom-preview',
- layout:'fit',
- items:XXV.BottomPreview ? 0 : viewer.gridNow.preview,
- height: 250,
- split: true,
- border:false,
- region:'south',
- hidden:XXV.BottomPreview
- }, {
- id:'now-right-preview',
- layout:'fit',
- items:XXV.RightPreview ? 0 : viewer.gridNow.preview,
- border:false,
- region:'east',
- width:350,
- split: true,
- hidden:XXV.RightPreview
- }]
- });
-
- return tab;
-}
+/*
+ * jason - Javascript based skin for xxv
+ * Copyright(c) 2008-2010, anbr
+ *
+ * http://xxv.berlios.de/
+ *
+ * $Id$
+ */
+
+Ext.xxv.NowStore = function() {
+ return new Ext.data.GroupingStore({
+ baseParams:{cmd:'n','__cgrp':'all'}
+ ,autoLoad:{params:{start:0, limit:configuration.pageSize}}
+ ,reader: new Ext.xxv.jsonReader({
+ fields: [
+ {name: 'id', type: 'string'}
+ ,{name: 'title', type: 'string'}
+ ,{name: 'subtitle', type: 'string'}
+ ,{name: 'channel', type: 'string'}
+ ,{name: 'chid', type: 'string'}
+ ,{name: 'grpname', type: 'string'}
+ ,{name: 'start', type: 'string' }
+ ,{name: 'stop', type: 'string' }
+ ,{name: 'description', type: 'string'}
+ ,{name: 'prozent', type: 'string'}
+ ,{name: 'timerid', type: 'string'}
+ ,{name: 'timeractiv', type: 'string'}
+ ,{name: 'running', type: 'string'}
+ ,{name: 'vps', type: 'string'} //type:'date', dateFormat:'timestamp'}
+ ,{name: 'order', type: 'int'} //dummy field created after onload
+ ]
+ })
+ ,proxy : new Ext.data.HttpProxy({
+ url: XXV.help.baseURL()
+ ,method: 'GET'
+ })
+ ,groupOnSort:false
+ ,sortInfo:{field:'order', direction:'ASC'}
+ ,groupField:'grpname'
+ ,remoteGroup:true
+ ,hasMultiSort:false
+ ,multiSortInfo:{}
+
+ });
+}
+
+Ext.xxv.NowGrid = function(viewer) {
+
+ this.viewer = viewer;
+ this.preview = new Ext.xxv.NowPreview(viewer);
+
+ // create the data store
+ this.store = new Ext.xxv.NowStore();
+
+ var range = new Array();
+ range.push([this.szPresent,0]);
+ range.push([this.szFollowing,this.szFollowing]);
+ for(var i = 0, len = configuration.periods.length; i < len; i++){
+ range.push([configuration.periods[i],configuration.periods[i]]);
+ }
+
+ this.timefield = new Ext.form.ComboBox({
+ id:'timefield'
+ ,width:75
+ ,store: new Ext.data.Store({
+ reader: new Ext.data.ArrayReader({}, [{name: 'display'},{name: 'value'} ]),
+ data: range
+ })
+ ,displayField:'display'
+ ,valueField:'value'
+ ,triggerAction: 'all'
+ ,lazyRender:true
+ ,listClass: 'x-combo-list-small'
+ ,mode: 'local'
+ ,emptyText:this.szPresent
+ ,selectOnFocus:false
+ ,editable: true
+ ,maskRe: /^([0-9\:]+)$/
+ ,regex: new RegExp("^([0-9]+\:[0-9]+)|("+this.szFollowing+")$")
+ ,maxLengthText: 5
+ ,listeners: {
+ 'select': {fn:this.reload, scope:this}
+ ,'specialkey': {fn:this.onSpecialkey, scope:this}
+ }
+ });
+
+ this.columns = [
+ {
+ header: this.szColPosition,
+ dataIndex: 'order',
+ width: 20,
+ hidden: true
+ },{
+ id:'expand'
+ ,header: this.szColTitle
+ ,dataIndex: 'title'
+ ,width: 150
+ ,renderer: { fn: this.formatTitle, scope: this }
+ },{
+ header: this.szColChannel,
+ dataIndex: 'channel',
+ width: 50
+ },{
+ header: this.szColGrpName,
+ dataIndex: 'grpname',
+ width: 50,
+ hidden: true
+ },{
+ header: this.szColStart,
+ dataIndex: 'start',
+ width: 50
+ },{
+ header: this.szColStop,
+ dataIndex: 'stop',
+ width: 50
+ }
+ ];
+
+ var cm = new Ext.grid.ColumnModel(this.columns);
+ cm.defaultSortable = true;
+
+ Ext.xxv.NowGrid.superclass.constructor.call(this, {
+ region: 'center'
+ ,id: 'now-grid'
+ ,loadMask: false
+ ,autoExpandColumn:'expand'
+ ,cm: cm
+ ,sm: new Ext.grid.RowSelectionModel({
+ singleSelect:true
+ })
+ ,view: new Ext.grid.GroupingView({
+ enableGroupingMenu:false,
+ forceFit:true,
+ showGroupName: false,
+ enableGrouping:true
+ })
+ ,tbar:new Ext.PagingToolbar({
+ pageSize: configuration.pageSize
+ ,store: this.store
+ ,displayInfo: true
+ })
+ });
+
+ var tbPosition = 15
+ var tb = this.topToolbar;
+ tb.insert(tbPosition+0, '-');
+ tb.insert(tbPosition+1, this.timefield);
+
+ this.store.on({
+ 'load' : this.onLoad
+ ,'beforeload' : this.onBeforeLoad
+ ,'loadexception' : this.onLoadException
+ ,scope:this
+ });
+
+ this.on('rowcontextmenu', this.onContextClick, this);
+ this.getSelectionModel().on('rowselect', this.preview.select, this.preview, {buffer:50});
+ this.on('rowdblclick', this.onSelectProgram, this);
+};
+
+Ext.extend(Ext.xxv.NowGrid, Ext.grid.GridPanel, {
+
+ szTitle : "Program guide"
+ ,szPresent : "Present"
+ ,szFollowing : "Following"
+ ,szFindReRun : "Find rerun"
+ ,szProgram : "Show program"
+ ,szRecord : "Record"
+ ,szEditTimer : "Edit timer"
+ ,szDeleteTimer : "Delete timer"
+ ,szColPosition : "Channel position"
+ ,szColTitle : "Title"
+ ,szColChannel : "Channel"
+ ,szColGrpName : "Group of channel"
+ ,szColStart : "Start"
+ ,szColStop : "Stop"
+ ,szLoadException : "Couldn't get data!\r\n{0}"
+ ,szRecordSuccess : "Successful created timer.\r\n{0}"
+ ,szRecordFailure : "Couldn't create timer!\r\n{0}"
+ ,szDeleteSuccess : "Timer deleted successful.\r\n{0}"
+ ,szDeleteFailure : "Couldn't delete timer!\r\n{0}"
+
+ ,onLoadException : function( scope, o, arg, e) {
+ new Ext.xxv.MessageBox().msgFailure(this.szLoadException, e.message);
+ }
+ ,onBeforeLoad : function( store, opt ) {
+ this.preview.clear();
+ }
+ ,onLoad : function( store, records, opt ) {
+ if(store.baseParams.data
+ && store.baseParams.cmd != 'nx'
+ && store.reader.meta
+ && store.reader.meta.param
+ && store.reader.meta.param.zeit) {
+ var datum = new Date(store.reader.meta.param.zeit * 1000);
+ this.ownerCt.SetPanelTitle(datum.dateFormat('l - H:i'));
+ } else if(store.baseParams.cmd == 'nx')
+ this.ownerCt.SetPanelTitle(this.szFollowing + " - " + new Date().dateFormat('H:i'));
+ else
+ this.ownerCt.SetPanelTitle(this.szPresent + " - " + new Date().dateFormat('H:i'));
+ this.getSelectionModel().selectFirstRow();
+ }
+ ,onSpecialkey : function(f, e) {
+ if(e.getKey() == e.ENTER){
+ this.reload();
+ }
+ }
+ ,onSelectProgram : function(grid, index, e) {
+ e.stopEvent();
+ if(this.ctxRow){
+ Ext.fly(this.ctxRow).removeClass('x-node-ctx');
+ this.ctxRow = null;
+ }
+ var record = this.store.getAt(index);
+ var data = {'id':record.data.chid,'name':record.data.channel};
+ this.viewer.openProgram(data);
+ }
+ ,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:'s'
+ ,text: this.szFindReRun
+ ,iconCls: 'find-icon'
+ ,scope: this
+ ,disabled: true
+ ,handler: function(){ this.viewer.searchTab(this.ctxRecord); }
+ },{
+ itemId:'p'
+ ,text: this.szProgram
+ ,iconCls: 'program-icon'
+ ,scope: this
+ ,disabled: true
+ ,handler: function(){
+ var data = {'id':this.ctxRecord.data.chid,'name':this.ctxRecord.data.channel};
+ this.viewer.openProgram(data); }
+ },{
+ itemId:'tn'
+ ,text: this.szRecord
+ ,iconCls: 'record-icon'
+ ,scope:this
+ ,disabled: true
+ ,handler: function() { this.Record(this.ctxRecord); }
+ },{
+ itemId:'te'
+ ,text: this.szEditTimer
+ ,iconCls: 'timer-edit-icon'
+ ,scope:this
+ ,disabled: true
+ ,handler: function() { this.EditTimer(this.ctxRecord, this.store); }
+ },{
+ itemId:'td'
+ ,text: this.szDeleteTimer
+ ,iconCls: 'timer-delete-icon'
+ ,scope:this
+ ,disabled: true
+ ,handler: function() { this.DeleteTimer(this.ctxRecord, this.store); }
+ },'-',{
+ itemId:'lst'
+ ,iconCls:'stream-icon'
+ ,text: XXV.side.webcastText
+ ,scope: this
+ ,disabled: true
+ ,handler: function(){ XXV.side.onWebCastChannel(this.ctxRecord.data.chid); }
+ },{
+ itemId:'sw'
+ ,iconCls: 'switch-icon'
+ ,text: XXV.side.switchText
+ ,scope: this
+ ,disabled: true
+ ,handler: function(){ XXV.side.onSwitchChannel(this.ctxRecord.data.chid); }
+ }
+ ]
+ });
+ 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 timerid = this.ctxRecord.data.timerid;
+ var follow = this.store.baseParams.cmd != 'n' || this.store.baseParams.data;
+ var items = this.menu.items;
+ if(items) { items.eachKey(function(key, f) {
+ if(follow) {
+ if(f.itemId == 'lst')
+ return;
+ if(f.itemId == 'sw')
+ return;
+ }
+ if(f.itemId == 'tn') { if(timerid) f.hide(); else f.show(); }
+ else if(f.itemId == 'te') { if(timerid) f.show(); else f.hide(); }
+ else if(f.itemId == 'td') { if(timerid) f.show(); else f.hide(); }
+ 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;
+ }
+ if(this.menu) {
+ this.menu.destroy();
+ delete this.menu;
+ this.menu = null;
+ }
+ }
+ ,reload : function() {
+ if(this.store.baseParams.data)
+ delete(this.store.baseParams['data']);
+
+ var time = this.timefield.lastQuery;
+ if(!time || time == '') time = this.timefield.getValue();
+ if(!time || time == this.szPresent) {
+ this.store.baseParams.cmd = 'n';
+ } else if(time == this.szFollowing) {
+ this.store.baseParams.cmd = 'nx';
+ } else {
+ this.store.baseParams.cmd = 'n';
+ this.store.baseParams.data = time;
+ }
+ this.store.load({params:{start:0, limit:configuration.pageSize}});
+ }
+
+/******************************************************************************/
+ ,onRecordSuccess : function( response,options )
+ {
+ this.viewer.loadMask.hide();
+ var json = response.responseText;
+ var o = eval("("+json+")");
+ if(!o || !o.data || typeof(o.data) != 'string') {
+ throw {message: "Ajax.read: Json message not found"};
+ }
+ if(o.success) {
+ new Ext.xxv.MessageBox().msgSuccess(this.szRecordSuccess, o.data);
+ this.updateTimer();
+ } else {
+ new Ext.xxv.MessageBox().msgFailure(this.szRecordFailure, o.data);
+ }
+ }
+ ,onRecordFailure : function( response,options )
+ {
+ this.viewer.loadMask.hide();
+ new Ext.xxv.MessageBox().msgFailure(this.szRecordFailure, response.statusText);
+ }
+ ,Record : function(record) {
+ this.RecordID(record.data.id);
+ }
+ ,RecordID : function(id) {
+ this.viewer.loadMask.show();
+ Ext.Ajax.request({
+ scope: this
+ ,url: XXV.help.cmdAJAX('tn',{ data: id, '__fast':'1' })
+ ,success: this.onRecordSuccess
+ ,failure: this.onRecordFailure
+ });
+ }
+ ,updateTimer : function() {
+ if(this.viewer.gridTimer) {
+ this.viewer.gridTimer.dataDirty = true;
+ }
+ }
+ ,EditTimer : function(record,store) {
+ var item;
+
+ if(record.data.timerid) {
+ item = {
+ cmd: 'te'
+ ,id: record.data.timerid
+ ,title: record.data.title
+ };
+ } else {
+ item = {
+ cmd: 'tn'
+ ,id: record.data.id
+ ,title: this.szEditTimer
+ };
+ }
+
+ if(this.viewer.formwin){
+ this.viewer.formwin.close();
+ }
+ this.viewer.formwin = new Ext.xxv.Question(item,store);
+ }
+ /******************************************************************************/
+ ,onDeleteSuccess : function( response,options )
+ {
+ this.viewer.loadMask.hide();
+
+ var o = eval("("+response.responseText+")");
+
+ if(o && o.data && typeof(o.data) == 'string'
+ && o.success) {
+ new Ext.xxv.MessageBox().msgSuccess(this.szDeleteSuccess, o.data);
+
+ var items = options.params.data.split(",");
+ for (var j = 0, jlen = options.store.getCount(); j < jlen; j++) {
+ var record = options.store.getAt(j);
+ for(var i = 0, len = items.length; i < len; i++){
+ if(!record || record.data.timerid != items[i]) {
+ continue;
+ }
+ record.data.timerid = 0;
+ record.commit();
+ }
+ }
+ this.updateTimer();
+ } else {
+ var msg = '';
+ if(o && o.data && typeof(o.data) == 'string') {
+ msg = o.data;
+ }
+ new Ext.xxv.MessageBox().msgFailure(this.szDeleteFailure, msg);
+ }
+ }
+ ,onDeleteFailure : function( response,options )
+ {
+ this.viewer.loadMask.hide();
+ new Ext.xxv.MessageBox().msgFailure(this.szDeleteFailure, response.statusText);
+ }
+ ,DeleteTimer : function(record) {
+ var gsm = this.getSelectionModel();
+ var sel = gsm.getSelections()
+ if(sel.length <= 0) {
+ gsm.selectRecords([record]);
+ sel.push(record);
+ }
+ var items = "";
+ for(var i = 0, len = sel.length; i < len; i++){
+ if(i != 0)
+ items += ',';
+ if(sel[i].data.timerid == 0) {
+ continue;
+ }
+ items += sel[i].data.timerid;
+ }
+ this.DeleteTimerId(items, this.store);
+ }
+ ,DeleteTimerId : function( items,store ) {
+ if(items.length <= 0)
+ return;
+ this.viewer.loadMask.show();
+
+ Ext.Ajax.request({
+ scope: this
+ ,url: XXV.help.cmdAJAX('td')
+ ,timeout: 15000
+ ,success: this.onDeleteSuccess
+ ,failure: this.onDeleteFailure
+ ,store: store
+ ,params:{ data: items }
+ });
+ }
+
+ ,formatTitle: function(value, p, record) {
+
+ var style = "";
+ if(record.data.timerid) {
+ if(record.data.timeractiv != 1) {
+ style = " deactive";
+ } else if(record.data.running == 1) {
+ style = " running";
+ } else {
+ style = " active";
+ }
+ }
+
+ return String.format(
+ '<div class="topic{2}"><b>{0}</b> <span class="subtitle">{1}</span></div>'
+ , value, record.data.subtitle, style
+ );
+ }
+});
+
+Ext.xxv.NowPreview = function(viewer) {
+ this.viewer = viewer;
+ Ext.xxv.NowPreview.superclass.constructor.call(this, {
+ id: 'now-preview',
+ region: 'south',
+ cls:'preview',
+ autoScroll: true,
+ stateful:true,
+ tbar: [ {
+ id:'s',
+ tooltip: Ext.xxv.NowGrid.prototype.szFindReRun,
+ iconCls: 'find-icon',
+ disabled:true,
+ scope: viewer,
+ handler: function(){ this.searchTab(this.gridNow.getSelectionModel().getSelected()); }
+ },{
+ id:'tn',
+ tooltip: Ext.xxv.NowGrid.prototype.szRecord,
+ iconCls: 'record-icon',
+ disabled:true,
+ scope: viewer,
+ handler: function(){ this.Record(this.gridNow.getSelectionModel().getSelected()); }
+ },{
+ id:'te',
+ tooltip: Ext.xxv.NowGrid.prototype.szEditTimer,
+ iconCls: 'timer-edit-icon',
+ disabled:true,
+ scope: viewer,
+ handler: function(){
+ this.gridNow.EditTimer(this.gridNow.getSelectionModel().getSelected());
+ }
+ },{
+ id:'td',
+ tooltip: Ext.xxv.NowGrid.prototype.szDeleteTimer,
+ iconCls: 'timer-delete-icon',
+ disabled:true,
+ scope: viewer,
+ handler: function(){
+ this.gridNow.DeleteTimer(this.gridNow.getSelectionModel().getSelected());
+ }
+ } ]
+ });
+};
+
+Ext.extend(Ext.xxv.NowPreview, Ext.Panel, {
+ select : function(sm, index, record){
+ if(this.body)
+ XXV.getTemplate().overwrite(this.body, record.data);
+
+ // Enable all toolbar buttons
+ var items = this.topToolbar.items;
+ if(items) {
+ items.eachKey(function(key, f) {
+ if(f.id == 'tn') { if(record.data.timerid) f.hide(); else f.show(); }
+ else if(f.id == 'te') { if(record.data.timerid) f.show(); else f.hide(); }
+ else if(f.id == 'td') { if(record.data.timerid) f.show(); else f.hide(); }
+ if(XXV.help.cmdAllowed(key)) f.enable();
+ },items);
+ }
+ }
+ ,clear: function(){
+ if(this) {
+ if(this.body)
+ this.body.update('');
+ // Disable all items
+ var items = this.topToolbar.items;
+ if(items) { items.eachKey(function(key, f){f.disable();},items); }
+ }
+ }
+});
+
+function createNowView(viewer,id) {
+
+ viewer.gridNow = new Ext.xxv.NowGrid(viewer);
+
+ var tab = new Ext.xxv.Panel({
+ id:id,
+ stateful:true,
+ iconCls: 'channel-icon',
+ layout:'border',
+ items:[
+ viewer.gridNow,
+ {
+ id:'now-bottom-preview',
+ layout:'fit',
+ items:XXV.BottomPreview ? 0 : viewer.gridNow.preview,
+ height: 250,
+ split: true,
+ border:false,
+ region:'south',
+ hidden:XXV.BottomPreview
+ }, {
+ id:'now-right-preview',
+ layout:'fit',
+ items:XXV.RightPreview ? 0 : viewer.gridNow.preview,
+ border:false,
+ region:'east',
+ width:350,
+ split: true,
+ hidden:XXV.RightPreview
+ }]
+ });
+
+ return tab;
+}
diff --git a/skins/jason/program.js b/skins/jason/program.js
index add763a..2d88fee 100644
--- a/skins/jason/program.js
+++ b/skins/jason/program.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-2010, anbr
+ *
* http://xxv.berlios.de/
*
* $Id$
@@ -12,61 +12,62 @@ Ext.xxv.programStore = function(data) {
title:data.name
,baseParams:{cmd:'p',data: data.id}
,autoLoad:{params:{start:0, limit:configuration.pageSize}}
- ,reader: new Ext.xxv.jsonReader({
- fields: [
+ ,reader: new Ext.xxv.jsonReader({
+ fields: [
{name: 'id', type: 'string'}
- ,{name: 'title', type: 'string'}
- ,{name: 'subtitle', type: 'string'}
- ,{name: 'start', type: 'string' }
+ ,{name: 'title', type: 'string'}
+ ,{name: 'subtitle', type: 'string'}
+ ,{name: 'start', type: 'string' }
,{name: 'stop', type: 'string' }
- ,{name: 'day', type:'date', dateFormat:'timestamp'}
+ ,{name: 'day', type:'date', dateFormat:'timestamp'}
,{name: 'description', type: 'string'}
,{name: 'video', type: 'string'}
,{name: 'audio', type: 'string'}
- ,{name: 'vps', type:'date', dateFormat:'timestamp'}
+ ,{name: 'vps', type:'date', dateFormat:'timestamp'}
,{name: 'timerid', type: 'string'}
,{name: 'timeractiv', type: 'string'}
,{name: 'running', 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:'day', direction:'ASC'},
groupField:'day'
});
}
-
-Ext.xxv.programGrid = function(viewer, record) {
+
+Ext.xxv.programGrid = function(viewer, record) {
this.viewer = viewer;
- this.preview = new Ext.xxv.programPreview(viewer);
- //Ext.apply(this, config);
+ this.preview = new Ext.xxv.programPreview(viewer);
+ //Ext.apply(this, config);
// create the data store
this.store = new Ext.xxv.programStore(record);
- this.store.setDefaultSort('day', "ASC");
-
+ this.store.setDefaultSort('day', "ASC");
+
this.columns = [{
- id:'expand'
- ,header: this.szColTitle
- ,dataIndex: 'title'
- ,width: 150
+ id:'expand'
+ ,header: this.szColTitle
+ ,dataIndex: 'title'
+ ,width: 150
,renderer: { fn: this.viewer.gridNow.formatTitle, scope: this.viewer.gridNow }
- },{ header: this.szColDay,
- dataIndex: 'day',
+ },{
+ header: this.szColDay,
+ dataIndex: 'day',
width: 50,
- hidden: true,
- renderer: Ext.util.Format.dateRenderer(this.szColDayFormat)
- },{
- header: this.szColStart,
- dataIndex: 'start',
- width: 50
- },{
- header: this.szColStop,
- dataIndex: 'stop',
- width: 50
- }];
+ hidden: true,
+ renderer: Ext.util.Format.dateRenderer(this.szColDayFormat)
+ },{
+ header: this.szColStart,
+ dataIndex: 'start',
+ width: 50
+ },{
+ header: this.szColStop,
+ dataIndex: 'stop',
+ width: 50
+ }];
var cm = new Ext.grid.ColumnModel(this.columns);
cm.defaultSortable = true;
@@ -81,20 +82,21 @@ Ext.xxv.programGrid = function(viewer, record) {
,query:'filter'
}
});
-
- Ext.xxv.programGrid.superclass.constructor.call(this, {
- region: 'center'
- ,id: 'program-grid'
+
+ Ext.xxv.programGrid.superclass.constructor.call(this, {
+ region: 'center'
+ ,id: 'program-grid'
,loadMask: false
,autoExpandColumn:'expand'
- ,cm: cm
- ,sm: new Ext.grid.RowSelectionModel({
- singleSelect:false
- })
- ,view: new Ext.grid.GroupingView({
- enableGroupingMenu:false
- ,forceFit:true
- ,showGroupName: false
+ ,cm: cm
+ ,sm: new Ext.grid.RowSelectionModel({
+ singleSelect:false
+ })
+ ,view: new Ext.grid.GroupingView({
+ enableGroupingMenu:false,
+ forceFit:true,
+ showGroupName: false,
+ enableGrouping:true
})
,tbar:new Ext.PagingToolbar({
pageSize: configuration.pageSize
@@ -102,26 +104,26 @@ Ext.xxv.programGrid = function(viewer, record) {
,displayInfo: true
})
,plugins:[this.filter]
- });
+ });
- this.store.on({
+ this.store.on({
'load' : this.onLoad
- ,'beforeload' : this.onBeforeLoad
- ,'loadexception' : this.onLoadException
- ,scope:this
+ ,'beforeload' : this.onBeforeLoad
+ ,'loadexception' : this.onLoadException
+ ,scope:this
});
this.on('rowcontextmenu', this.onContextClick, this);
this.getSelectionModel().on('rowselect', this.select, this, {buffer:50});
-};
-
-Ext.extend(Ext.xxv.programGrid, Ext.grid.GridPanel, {
+};
+
+Ext.extend(Ext.xxv.programGrid, Ext.grid.GridPanel, {
szTitle : "Program guide"
,szFindReRun : "Find rerun"
,szRecord : "Record"
,szColTitle : "Title"
- ,szColDay : "Day"
- ,szColStart : "Start"
+ ,szColDay : "Day"
+ ,szColStart : "Start"
,szColStop : "Stop"
,szColDayFormat : "l, m/d/Y"
,szLoadException : "Couldn't get program data!\r\n{0}"
@@ -138,53 +140,53 @@ Ext.extend(Ext.xxv.programGrid, Ext.grid.GridPanel, {
this.getSelectionModel().selectFirstRow();
this.ownerCt.SetPanelTitle(store.title);
}
- ,onContextClick : function(grid, index, e){
- if(!this.menu){ // create context menu on first right click
- this.menu = new Ext.menu.Menu({
- id:'grid-ctx',
+ ,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:'s'
- ,text: this.szFindReRun
- ,iconCls: 'find-icon'
+ itemId:'s'
+ ,text: this.szFindReRun
+ ,iconCls: 'find-icon'
,scope:this
- ,disabled: true
+ ,disabled: true
,handler: function(){ this.viewer.searchTab(this.ctxRecord); }
},{
- itemId:'tn'
- ,text: this.szRecord
- ,iconCls: 'record-icon'
+ itemId:'tn'
+ ,text: this.szRecord
+ ,iconCls: 'record-icon'
,scope:this
- ,disabled: true
+ ,disabled: true
,handler: function(){ this.Record(null); }
},{
- itemId:'te'
- ,text: this.viewer.gridNow.szEditTimer
- ,iconCls: 'timer-edit-icon'
+ itemId:'te'
+ ,text: this.viewer.gridNow.szEditTimer
+ ,iconCls: 'timer-edit-icon'
,scope:this
- ,disabled: true
+ ,disabled: true
,handler: function() { this.EditTimer(this.ctxRecord); }
},{
- itemId:'td'
- ,text: this.viewer.gridNow.szDeleteTimer
- ,iconCls: 'timer-delete-icon'
+ itemId:'td'
+ ,text: this.viewer.gridNow.szDeleteTimer
+ ,iconCls: 'timer-delete-icon'
,scope:this
- ,disabled: true
+ ,disabled: true
,handler: function() { this.DeleteTimer(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');
+ ]
+ });
+ 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 timerid = this.ctxRecord.data.timerid;
- var items = this.menu.items;
+ var items = this.menu.items;
if(items) { items.eachKey(function(key, f) {
if(f.itemId == 'tn') { if(timerid) f.hide(); else f.show(); }
else if(f.itemId == 'te') { if(timerid) f.show(); else f.hide(); }
@@ -194,32 +196,32 @@ Ext.extend(Ext.xxv.programGrid, Ext.grid.GridPanel, {
},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;
- }
- }
-
+ }
+ }
+
,reload : function(data) {
if(this.filter.field.isValid()) {
this.filter.field.setValue('');
}
this.store.baseParams = {
- cmd: 'p'
- ,data: data.id
+ cmd: 'p'
+ ,data: data.id
};
- this.store.title = data.name;
- this.store.load({params:{start:0, limit:configuration.pageSize}});
- }
+ this.store.title = data.name;
+ this.store.load({params:{start:0, limit:configuration.pageSize}});
+ }
,Record : function( record ) {
var gsm = this.getSelectionModel();
var sel = gsm.getSelections()
@@ -233,7 +235,7 @@ Ext.extend(Ext.xxv.programGrid, Ext.grid.GridPanel, {
ids += ',';
ids += sel[i].data.id;
}
- this.viewer.RecordID(ids);
+ this.viewer.RecordID(ids);
}
,EditTimer : function(record) {
this.viewer.gridNow.EditTimer(record, this.store);
@@ -258,63 +260,63 @@ Ext.extend(Ext.xxv.programGrid, Ext.grid.GridPanel, {
}
,select : function(sm, index, record){
this.preview.select(record, this.filter.getValue());
- }
+ }
});
Ext.xxv.programPreview = function(viewer) {
this.viewer = viewer;
- Ext.xxv.programPreview.superclass.constructor.call(this, {
- id: 'program-preview',
- region: 'south',
- cls:'preview',
- autoScroll: true,
- stateful:false,
- tbar: [ {
- id:'s',
- tooltip: Ext.xxv.NowGrid.prototype.szFindReRun,
- iconCls: 'find-icon',
- disabled:true,
- scope: this.viewer,
- handler: function(){ this.searchTab(this.gridProgram.getSelectionModel().getSelected()); }
- } ,{
- id:'tn',
- tooltip: this.viewer.gridNow.szRecord,
- iconCls: 'record-icon',
- disabled:true,
- scope: this.viewer,
- handler: function(){ this.Record(this.gridProgram.getSelectionModel().getSelected()); }
- },{
- id:'te',
- tooltip: this.viewer.gridNow.szEditTimer,
- iconCls: 'timer-edit-icon',
- disabled:true,
- scope: viewer,
+ Ext.xxv.programPreview.superclass.constructor.call(this, {
+ id: 'program-preview',
+ region: 'south',
+ cls:'preview',
+ autoScroll: true,
+ stateful:false,
+ tbar: [ {
+ id:'s',
+ tooltip: Ext.xxv.NowGrid.prototype.szFindReRun,
+ iconCls: 'find-icon',
+ disabled:true,
+ scope: this.viewer,
+ handler: function(){ this.searchTab(this.gridProgram.getSelectionModel().getSelected()); }
+ } ,{
+ id:'tn',
+ tooltip: this.viewer.gridNow.szRecord,
+ iconCls: 'record-icon',
+ disabled:true,
+ scope: this.viewer,
+ handler: function(){ this.Record(this.gridProgram.getSelectionModel().getSelected()); }
+ },{
+ id:'te',
+ tooltip: this.viewer.gridNow.szEditTimer,
+ iconCls: 'timer-edit-icon',
+ disabled:true,
+ scope: viewer,
handler: function(){
this.gridProgram.EditTimer(this.gridProgram.getSelectionModel().getSelected());
- }
- },{
- id:'td',
- tooltip: this.viewer.gridNow.szDeleteTimer,
- iconCls: 'timer-delete-icon',
- disabled:true,
- scope: viewer,
+ }
+ },{
+ id:'td',
+ tooltip: this.viewer.gridNow.szDeleteTimer,
+ iconCls: 'timer-delete-icon',
+ disabled:true,
+ scope: viewer,
handler: function(){
this.gridProgram.DeleteTimer(this.gridProgram.getSelectionModel().getSelected());
- }
- } ]
+ }
+ } ]
});
};
Ext.extend(Ext.xxv.programPreview, Ext.Panel, {
select : function(record, lookup){
- if(this.body)
+ if(this.body)
XXV.getTemplate().overwrite(this.body, record.data);
if(lookup)
highlightText(this.body.dom,lookup,'x-highlight',1);
// Enable all toolbar buttons
- var items = this.topToolbar.items;
+ var items = this.topToolbar.items;
if(items) {
items.eachKey(function(key, f) {
if(f.id == 'tn') { if(record.data.timerid) f.hide(); else f.show(); }
@@ -323,13 +325,13 @@ Ext.extend(Ext.xxv.programPreview, Ext.Panel, {
if(XXV.help.cmdAllowed(key)) f.enable();
},items);
}
- }
+ }
,clear: function(){
- if(this) {
+ if(this) {
if(this.body)
- this.body.update('');
+ this.body.update('');
// Disable all items
- var items = this.topToolbar.items;
+ var items = this.topToolbar.items;
if(items) { items.eachKey(function(key, f){f.disable();},items); }
}
}
@@ -339,34 +341,34 @@ function createProgramView(viewer,id, record) {
viewer.gridProgram = new Ext.xxv.programGrid(viewer, record);
- var tab = new Ext.xxv.Panel({
+ var tab = new Ext.xxv.Panel({
id:id,
- iconCls: 'channel-icon',
+ iconCls: 'channel-icon',
layout:'border',
- stateful:true,
- closable:true,
- items:[
+ stateful:true,
+ closable:true,
+ items:[
viewer.gridProgram,
- {
- id:'program-bottom-preview',
- layout:'fit',
- items:XXV.BottomPreview ? 0 : viewer.gridProgram.preview,
- height: 250,
- split: true,
- border:false,
- region:'south',
- hidden:XXV.BottomPreview
- }, {
- id:'program-right-preview',
- layout:'fit',
+ {
+ id:'program-bottom-preview',
+ layout:'fit',
+ items:XXV.BottomPreview ? 0 : viewer.gridProgram.preview,
+ height: 250,
+ split: true,
+ border:false,
+ region:'south',
+ hidden:XXV.BottomPreview
+ }, {
+ id:'program-right-preview',
+ layout:'fit',
items:XXV.RightPreview ? 0 : viewer.gridProgram.preview,
- border:false,
- region:'east',
- width:350,
- split: true,
- hidden:XXV.RightPreview
+ border:false,
+ region:'east',
+ width:350,
+ split: true,
+ hidden:XXV.RightPreview
}]
- });
+ });
viewer.add(tab);
return tab;
diff --git a/skins/jason/reader.js b/skins/jason/reader.js
index 0383348..042a44b 100644
--- a/skins/jason/reader.js
+++ b/skins/jason/reader.js
@@ -1,50 +1,50 @@
-/*
- * 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$
*/
-Ext.xxv.jsonReader = function(meta, recordType){
- meta = meta || {};
- Ext.xxv.jsonReader.superclass.constructor.call(this, meta, recordType || meta.fields);
-};
-Ext.extend(Ext.xxv.jsonReader, Ext.data.DataReader, {
+Ext.xxv.jsonReader = function(meta, recordType){
+ meta = meta || {};
+ Ext.xxv.jsonReader.superclass.constructor.call(this, meta, recordType || meta.fields);
+};
+Ext.extend(Ext.xxv.jsonReader, Ext.data.DataReader, {
- read : function(r){
- if(r.status != 200) {
- throw {message: "XXVReader.read: " . r.statusText };
+ read : function(r){
+ if(r.status != 200) {
+ throw {message: "XXVReader.read: " . r.statusText };
}
- var o = eval('('+r.responseText+')');
+ var o = eval('('+r.responseText+')');
if(!o || !o.data || typeof(o.data) != 'object') {
if(o && o.data && typeof(o.data) == 'string') {
- throw {message: o.data};
- }
- throw {message: "XXVReader.read: Json object not found"};
- }
- return this.readRecords(o.data,o.param);
- },
-
- readRecords : function(o,p){
+ throw {message: o.data};
+ }
+ throw {message: "XXVReader.read: Json object not found"};
+ }
+ return this.readRecords(o.data,o.param);
+ },
+
+ readRecords : function(o,p){
- var Record = this.recordType,
+ var Record = this.recordType,
f = Record.prototype.fields, fi = f.items, fl = f.length;
- var records = [];
+ var records = [];
for (var i = 0; i < o.length; i++) {
- var n = o[i];
- var values = {};
- var id = n[0];
- for(var j = 0; j < fl; j++){
+ var n = o[i];
+ var values = {};
+ var id = n[0];
+ for(var j = 0; j < fl; j++){
f = fi[j];
- var v = n[j];
- values[f.name] = f.convert((v !== undefined) ? v : f.defaultValue);
- }
- var record = new Record(values, id);
- record.json = n;
- records[i] = record;
+ var v = n[j];
+ values[f.name] = f.convert((v !== undefined) ? v : f.defaultValue);
+ }
+ var record = new Record(values, id);
+ record.json = n;
+ records[i] = record;
}
var total = records.length;
if(p && p.rows) {
@@ -55,11 +55,11 @@ Ext.extend(Ext.xxv.jsonReader, Ext.data.DataReader, {
delete this.meta.param;
}
this.meta.param = p;
- }
- return {
- success : true,
- records : records,
- totalRecords : total
+ }
+ return {
+ success : true,
+ records : records,
+ totalRecords : total
};
- }
+ }
});
diff --git a/skins/jason/recordings.js b/skins/jason/recordings.js
index 255de22..f297c6b 100644
--- a/skins/jason/recordings.js
+++ b/skins/jason/recordings.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$
@@ -33,31 +33,31 @@ HMSToSeconds = function(s) {
}
/******************************************************************************/
-Ext.xxv.slider = function(config){
- Ext.xxv.slider.superclass.constructor.call(this, config);
-
- Ext.apply(this, config);
-};
-
-Ext.extend(Ext.xxv.slider, Ext.Component, {
+Ext.xxv.slider = function(config){
+ Ext.xxv.slider.superclass.constructor.call(this, config);
+
+ Ext.apply(this, config);
+};
+
+Ext.extend(Ext.xxv.slider, Ext.Component, {
slider: null
-
- ,initComponent : function(){
- Ext.xxv.slider.superclass.initComponent.call(this);
- this.addEvents({'MoveSlider' : true});
- },
+
+ ,initComponent : function(){
+ Ext.xxv.slider.superclass.initComponent.call(this);
+ this.addEvents({'MoveSlider' : true});
+ },
setvalue : function(marks, duration){
this.marks = marks;
this.duration = duration;
this.modified = 1;
},
-
+
render : function(ct, position){
if(!this.modified)
return;
- this.modified = 0;
+ this.modified = 0;
if(this.slider) {
//this.slider.remove();
ct.dom.innerHTML = '';
@@ -112,20 +112,20 @@ Ext.extend(Ext.xxv.slider, Ext.Component, {
}
this.slider.add(this.ts);
}
-});
-
+});
+
Ext.reg('MarksSlider', Ext.xxv.slider);
/******************************************************************************/
-Ext.xxv.RecHeader = function(config){
- Ext.xxv.RecHeader.superclass.constructor.call(this, config); Ext.apply(this, config);
-};
-
-Ext.extend(Ext.xxv.RecHeader, Ext.Component, {
-
- initComponent : function(){
- Ext.xxv.RecHeader.superclass.initComponent.call(this);
-
+Ext.xxv.RecHeader = function(config){
+ Ext.xxv.RecHeader.superclass.constructor.call(this, config); Ext.apply(this, config);
+};
+
+Ext.extend(Ext.xxv.RecHeader, Ext.Component, {
+
+ initComponent : function(){
+ Ext.xxv.RecHeader.superclass.initComponent.call(this);
+
this.tpl = new Ext.Template(
'<div class="preview-header">',
'<div class="preview-topic">',
@@ -155,7 +155,7 @@ Ext.extend(Ext.xxv.RecHeader, Ext.Component, {
}
}
);
- },
+ },
setvalue : function(data, lookupdata){
@@ -186,149 +186,149 @@ Ext.extend(Ext.xxv.RecHeader, Ext.Component, {
this.tpl.overwrite(ct, this.param);
if(this.param.lookup)
highlightText(ct.dom,this.param.lookup,'x-highlight',1);
- }
+ }
}
-});
-
+});
+
Ext.reg('RecHeader', Ext.xxv.RecHeader);
/******************************************************************************/
-Ext.DataView.LabelEditor = function(cfg, field){
- Ext.DataView.LabelEditor.superclass.constructor.call(this,
- field || new Ext.form.TextField({
- allowBlank: false,
- growMin:90,
- growMax:240,
- grow:true,
- selectOnFocus:true
- }), cfg
- );
-}
-
-Ext.extend(Ext.DataView.LabelEditor, Ext.Editor, {
- alignment: "tl-tl",
- hideEl : false,
- cls: "x-small-editor",
- shim: false,
- completeOnEnter: true,
- cancelOnEsc: true,
- labelSelector: 'span.x-editable',
-
- init : function(view){
- this.view = view;
- view.on('render', this.initEditor, this);
- this.on('complete', this.onSave, this);
- },
-
- initEditor : function(){
- this.view.getEl().on('mousedown', this.onMouseDown, this, {delegate: this.labelSelector});
- },
-
- onMouseDown : function(e, target){
- if(!e.ctrlKey && !e.shiftKey){
- var item = this.view.findItemFromChild(target);
- e.stopEvent();
- var record = this.view.store.getAt(this.view.indexOf(item));
+Ext.DataView.LabelEditor = function(cfg, field){
+ Ext.DataView.LabelEditor.superclass.constructor.call(this,
+ field || new Ext.form.TextField({
+ allowBlank: false,
+ growMin:90,
+ growMax:240,
+ grow:true,
+ selectOnFocus:true
+ }), cfg
+ );
+}
+
+Ext.extend(Ext.DataView.LabelEditor, Ext.Editor, {
+ alignment: "tl-tl",
+ hideEl : false,
+ cls: "x-small-editor",
+ shim: false,
+ completeOnEnter: true,
+ cancelOnEsc: true,
+ labelSelector: 'span.x-editable',
+
+ init : function(view){
+ this.view = view;
+ view.on('render', this.initEditor, this);
+ this.on('complete', this.onSave, this);
+ },
+
+ initEditor : function(){
+ this.view.getEl().on('mousedown', this.onMouseDown, this, {delegate: this.labelSelector});
+ },
+
+ onMouseDown : function(e, target){
+ if(!e.ctrlKey && !e.shiftKey){
+ var item = this.view.findItemFromChild(target);
+ e.stopEvent();
+ var record = this.view.store.getAt(this.view.indexOf(item));
if(record.data[this.allow]) {
- this.startEdit(target, record.data[this.dataIndex]);
+ this.startEdit(target, record.data[this.dataIndex]);
this.activeRecord = record;
- }
- }else{
- e.preventDefault();
- }
- },
-
- onSave : function(ed, value){
- this.activeRecord.set(this.dataIndex, value);
- }
+ }
+ }else{
+ e.preventDefault();
+ }
+ },
+
+ onSave : function(ed, value){
+ this.activeRecord.set(this.dataIndex, value);
+ }
});
/******************************************************************************/
-Ext.DataView.DragSelector = function(cfg){
- cfg = cfg || {};
- var view, regions, proxy, tracker;
- var rs, bodyRegion, dragRegion = new Ext.lib.Region(0,0,0,0);
- var dragSafe = cfg.dragSafe === true;
-
- this.init = function(dataView){
- view = dataView;
- view.on('render', onRender);
- };
-
- function fillRegions(){
- rs = [];
- view.all.each(function(el){
- rs[rs.length] = el.getRegion();
- });
- bodyRegion = view.el.getRegion();
- }
-
- function cancelClick(){
- return false;
- }
-
- function onBeforeStart(e){
- return !dragSafe || e.target == view.el.dom;
- }
-
- function onStart(e){
- view.on('containerclick', cancelClick, view, {single:true});
- if(!proxy){
- proxy = view.el.createChild({cls:'x-view-selector'});
- }else{
- proxy.setDisplayed('block');
- }
- fillRegions();
- view.clearSelections();
- }
-
- function onDrag(e){
- var startXY = tracker.startXY;
- var xy = tracker.getXY();
-
- var x = Math.min(startXY[0], xy[0]);
- var y = Math.min(startXY[1], xy[1]);
- var w = Math.abs(startXY[0] - xy[0]);
- var h = Math.abs(startXY[1] - xy[1]);
-
- dragRegion.left = x;
- dragRegion.top = y;
- dragRegion.right = x+w;
- dragRegion.bottom = y+h;
-
- dragRegion.constrainTo(bodyRegion);
- proxy.setRegion(dragRegion);
-
- for(var i = 0, len = rs.length; i < len; i++){
- var r = rs[i], sel = dragRegion.intersect(r);
- if(sel && !r.selected){
- r.selected = true;
- view.select(i, true);
- }else if(!sel && r.selected){
- r.selected = false;
- view.deselect(i);
- }
- }
- }
-
- function onEnd(e){
- if(proxy){
- proxy.setDisplayed(false);
- }
- }
-
- function onRender(view){
- tracker = new Ext.dd.DragTracker({
- onBeforeStart: onBeforeStart,
- onStart: onStart,
- onDrag: onDrag,
- onEnd: onEnd
- });
- tracker.initEl(view.el);
- }
+Ext.DataView.DragSelector = function(cfg){
+ cfg = cfg || {};
+ var view, regions, proxy, tracker;
+ var rs, bodyRegion, dragRegion = new Ext.lib.Region(0,0,0,0);
+ var dragSafe = cfg.dragSafe === true;
+
+ this.init = function(dataView){
+ view = dataView;
+ view.on('render', onRender);
+ };
+
+ function fillRegions(){
+ rs = [];
+ view.all.each(function(el){
+ rs[rs.length] = el.getRegion();
+ });
+ bodyRegion = view.el.getRegion();
+ }
+
+ function cancelClick(){
+ return false;
+ }
+
+ function onBeforeStart(e){
+ return !dragSafe || e.target == view.el.dom;
+ }
+
+ function onStart(e){
+ view.on('containerclick', cancelClick, view, {single:true});
+ if(!proxy){
+ proxy = view.el.createChild({cls:'x-view-selector'});
+ }else{
+ proxy.setDisplayed('block');
+ }
+ fillRegions();
+ view.clearSelections();
+ }
+
+ function onDrag(e){
+ var startXY = tracker.startXY;
+ var xy = tracker.getXY();
+
+ var x = Math.min(startXY[0], xy[0]);
+ var y = Math.min(startXY[1], xy[1]);
+ var w = Math.abs(startXY[0] - xy[0]);
+ var h = Math.abs(startXY[1] - xy[1]);
+
+ dragRegion.left = x;
+ dragRegion.top = y;
+ dragRegion.right = x+w;
+ dragRegion.bottom = y+h;
+
+ dragRegion.constrainTo(bodyRegion);
+ proxy.setRegion(dragRegion);
+
+ for(var i = 0, len = rs.length; i < len; i++){
+ var r = rs[i], sel = dragRegion.intersect(r);
+ if(sel && !r.selected){
+ r.selected = true;
+ view.select(i, true);
+ }else if(!sel && r.selected){
+ r.selected = false;
+ view.deselect(i);
+ }
+ }
+ }
+
+ function onEnd(e){
+ if(proxy){
+ proxy.setDisplayed(false);
+ }
+ }
+
+ function onRender(view){
+ tracker = new Ext.dd.DragTracker({
+ onBeforeStart: onBeforeStart,
+ onStart: onStart,
+ onDrag: onDrag,
+ onEnd: onEnd
+ });
+ tracker.initEl(view.el);
+ }
};
/******************************************************************************/
@@ -339,14 +339,14 @@ Ext.xxv.recordingsStore = function() {
return new Ext.data.Store({
baseParams:{cmd:'rl'}
,autoLoad:{params:{start:0, limit:configuration.pageSize}}
- ,reader: new Ext.xxv.jsonReader({
- fields: [
+ ,reader: new Ext.xxv.jsonReader({
+ fields: [
{name: 'id', type: 'string'}
,{name: 'eventid', type: 'int'}
- ,{name: 'title', type: 'string'}
- ,{name: 'subtitle', type: 'string'}
+ ,{name: 'title', type: 'string'}
+ ,{name: 'subtitle', type: 'string'}
,{name: 'duration', type: 'int'}
- ,{name: 'day', type:'date', dateFormat:'timestamp'}
+ ,{name: 'day', type:'date', dateFormat:'timestamp'}
,{name: 'unviewed', type: 'int'}
,{name: 'type', type: 'string'}
,{name: 'group', type: 'int'}
@@ -363,22 +363,22 @@ Ext.xxv.recordingsStore = function() {
,{name: 'keywords', type: 'string'}
]
})
- ,proxy : new Ext.data.HttpProxy({
- url: XXV.help.baseURL()
- ,method: 'POST'
+ ,proxy : new Ext.data.HttpProxy({
+ url: XXV.help.baseURL()
+ ,method: 'POST'
})
});
};
Ext.xxv.recordingsDataView = function(viewer, preview, store, config) {
this.viewer = viewer;
- this.preview = preview;
- Ext.apply(this, config);
+ this.preview = preview;
+ Ext.apply(this, config);
// create the data store
this.store = store;
var tpl = new Ext.XTemplate(
- '<tpl for=".">',
- '<div class="thumb-wrap" id="{id}">',
+ '<tpl for=".">',
+ '<div class="thumb-wrap" id="{id}">',
'<div class="thumb">',
'<tpl if="isrecording == 0">',
'<img src="pic/folder.png"<tpl if="group != 0"> ext:qtitle="{shortTitle}" ext:qtip="{ToolTip}"</tpl>/>',
@@ -399,14 +399,14 @@ Ext.xxv.recordingsDataView = function(viewer, preview, store, config) {
'<tpl if="unviewed != 0">',
'<div class="unviewed"></div>',
'</tpl>',
- '</div>',
- '<span class="x-editable">{shortName}</span></div>',
- '</tpl>',
+ '</div>',
+ '<span class="x-editable">{shortName}</span></div>',
+ '</tpl>',
'<div class="x-clear"></div>', {
isRadio: function(name){
return name == 'RADIO';
}
- }
+ }
);
this.filter = new Ext.ux.grid.Search({
@@ -427,7 +427,7 @@ Ext.xxv.recordingsDataView = function(viewer, preview, store, config) {
,cls: 'x-panel-body' // workaround - add missing border
,style: 'overflow:auto'
,multiSelect: true
- ,overClass:'x-view-over'
+ ,overClass:'x-view-over'
,itemSelector:'div.thumb-wrap'
,prepareData: function(data){
if(data.id != 'up' && this.store.baseParams.data && this.store.baseParams.cmd == 'rl') {
@@ -445,11 +445,11 @@ Ext.xxv.recordingsDataView = function(viewer, preview, store, config) {
data.shortName = Ext.util.Format.ellipsis(data.fulltitle, 16);
}
data.shortTitle = Ext.util.Format.ellipsis(data.fulltitle, 40).replace(/\"/g,'\'');
-
+
if(data.isrecording) {
var frames = data.preview.split(",");
if(data.preview.length && frames.length) {
- var item = (frames.length) / 2;
+ var item = (frames.length) / 2;
data.frame = frames[item.toFixed(0)];
} else {
data.frame = -1;
@@ -483,29 +483,29 @@ Ext.xxv.recordingsDataView = function(viewer, preview, store, config) {
String(data.group),
SecondsToHMS(data.duration)
);
- }
+ }
}
- return data;
+ return data;
}
- ,listeners: {
- 'selectionchange': {fn:this.doClick, scope:this, buffer:100}
- ,'contextmenu' : {fn:this.onContextClick, scope:this}
- ,'dblclick' : {fn:this.doDblclick, scope:this}
-// ,'loadexception' : {fn:this.onLoadException, scope:this}
+ ,listeners: {
+ 'selectionchange': {fn:this.doClick, scope:this, buffer:100}
+ ,'contextmenu' : {fn:this.onContextClick, scope:this}
+ ,'dblclick' : {fn:this.doDblclick, scope:this}
+// ,'loadexception' : {fn:this.onLoadException, scope:this}
,'beforeselect' : {fn:function(view){ return view.store.getRange().length > 0; } }
}
- ,plugins: [
- new Ext.DataView.DragSelector() //,new Ext.DataView.LabelEditor({dataIndex: 'fulltitle', allow: 'isrecording'})
+ ,plugins: [
+ new Ext.DataView.DragSelector() //,new Ext.DataView.LabelEditor({dataIndex: 'fulltitle', allow: 'isrecording'})
,this.filter
- ]
+ ]
}
);
this.store.on({
- 'beforeload' : this.onBeforeLoad
- ,'load' : this.onLoad
- ,'loadexception' : this.onLoadException
- ,scope:this
+ 'beforeload' : this.onBeforeLoad
+ ,'load' : this.onLoad
+ ,'loadexception' : this.onLoadException
+ ,scope:this
});
};
@@ -593,21 +593,21 @@ Ext.extend(Ext.xxv.recordingsDataView, Ext.DataView, {
if(tag) {
delete(this.store.baseParams['data']);
this.store.title = tag;
- this.store.baseParams.cmd = 'rk';
- this.store.baseParams.data = tag;
+ this.store.baseParams.cmd = 'rk';
+ this.store.baseParams.data = tag;
this.store.load({params:{start:0, limit:this.store.autoLoad.params.limit}});
}
}
,doDblclick : function() {
- var selNode = this.getSelectedNodes();
+ var selNode = this.getSelectedNodes();
if(selNode && selNode.length > 0){
- var firstNode = selNode[0];
+ var firstNode = selNode[0];
var record = this.store.getById(firstNode.id);
if(record) {
if(record.data.isrecording == 0) {
var data = this.store.baseParams['data'];
delete(this.store.baseParams['data']);
- this.store.baseParams.cmd = 'rl';
+ this.store.baseParams.cmd = 'rl';
if(record.id == 'up') {
if(this.filter.field.isValid()) {
this.filter.field.setValue('');
@@ -616,36 +616,36 @@ Ext.extend(Ext.xxv.recordingsDataView, Ext.DataView, {
Woerter.pop();
var title = Woerter.join('~');
if(title != '') {
- this.store.title = title;
- this.store.baseParams.data = title;
+ this.store.title = title;
+ this.store.baseParams.data = title;
}
} else {
this.store.title = record.data.fulltitle;
- this.store.baseParams.data = record.data.fulltitle;
+ this.store.baseParams.data = record.data.fulltitle;
}
this.store.load({params:{start:0, limit:this.store.autoLoad.params.limit}});
} else {
this.EditItem(record);
}
}
- }
+ }
},
- doClick : function(){
- var selNode = this.getSelectedNodes();
- if(selNode && selNode.length > 0){
+ doClick : function(){
+ var selNode = this.getSelectedNodes();
+ if(selNode && selNode.length > 0){
var record = this.store.getById(selNode[0].id);
this.showDetails(record);
}
},
- showDetails : function(record){
+ showDetails : function(record){
this.preview.content(record,this.filter.getValue());
this.DetailsItem(record);
},
/******************************************************************************/
onDetailsSuccess : function( response,options )
{
- var o = eval("("+response.responseText+")");
+ var o = eval("("+response.responseText+")");
if(o && o.data && typeof(o.data) == 'object'
&& o.param) {
@@ -693,8 +693,8 @@ Ext.extend(Ext.xxv.recordingsDataView, Ext.DataView, {
if(record && record.data) {
toDetails = record.data.id;
} else {
- var selNode = this.getSelectedNodes();
- if(selNode && selNode.length > 0){
+ var selNode = this.getSelectedNodes();
+ if(selNode && selNode.length > 0){
for(var i = 0, len = selNode.length; i < len; i++){
if(selNode[i].id == 'up')
continue;
@@ -724,75 +724,75 @@ Ext.extend(Ext.xxv.recordingsDataView, Ext.DataView, {
}
},
/******************************************************************************/
- onContextClick : function(grid, index, node, e){
- if(!this.menu){ // create context menu on first right click
- this.menu = new Ext.menu.Menu({
- id:'grid-ctx',
+ onContextClick : function(grid, index, node, e){
+ if(!this.menu){ // create context menu on first right click
+ this.menu = new Ext.menu.Menu({
+ id:'grid-ctx',
items: [
- {
+ {
itemId: 're'
- ,text: this.szEdit
- ,iconCls: 'edit-icon'
+ ,text: this.szEdit
+ ,iconCls: 'edit-icon'
,scope:this
- ,disabled: true
+ ,disabled: true
,handler: function() { this.EditItem(this.ctxRecord); }
},{
itemId: 'rcu'
- ,text: this.szCut
- ,iconCls: 'cut-icon'
+ ,text: this.szCut
+ ,iconCls: 'cut-icon'
,scope:this
- ,disabled: true
- ,handler: function() { this.CutItem(null); }
+ ,disabled: true
+ ,handler: function() { this.CutItem(null); }
},{
itemId: 'rc'
- ,text: this.szConvert
- ,iconCls: 'convert-icon'
+ ,text: this.szConvert
+ ,iconCls: 'convert-icon'
,scope:this
- ,disabled: true
- ,handler: function() { this.ConvertItem(this.ctxRecord); }
+ ,disabled: true
+ ,handler: function() { this.ConvertItem(this.ctxRecord); }
},{
itemId: 'rr'
- ,text: this.szDelete
- ,iconCls: 'delete-icon'
+ ,text: this.szDelete
+ ,iconCls: 'delete-icon'
,scope:this
- ,disabled: true
- ,handler: function() { this.DeleteItem(null); }
+ ,disabled: true
+ ,handler: function() { this.DeleteItem(null); }
},'-',{
- itemId: 's'
- ,text: this.szFindReRun
- ,iconCls: 'find-icon'
+ itemId: 's'
+ ,text: this.szFindReRun
+ ,iconCls: 'find-icon'
,scope:this
- ,disabled: true
+ ,disabled: true
,handler: function(){ this.viewer.searchTab(this.ctxRecord);}
- },'-',{
- itemId: 'pre'
- ,text: this.szStream
- ,iconCls: 'stream-icon'
+ },'-',{
+ itemId: 'pre'
+ ,text: this.szStream
+ ,iconCls: 'stream-icon'
,scope:this
- ,disabled: true
+ ,disabled: true
,handler: function(){ this.onStream(this.ctxRecord,'00:00:00');}
- },{
- itemId: 'rpv'
- ,text: this.szPlay
- ,iconCls: 'play-icon'
+ },{
+ itemId: 'rpv'
+ ,text: this.szPlay
+ ,iconCls: 'play-icon'
,scope:this
- ,disabled: true
+ ,disabled: true
,handler: function(){ this.onPlay(this.ctxRecord,'00:00:00');}
- }
- ]
- });
- this.menu.on('hide', this.onContextHide, this);
- }
- e.stopEvent();
- if(this.ctxRow){
- //Ext.fly(this.ctxRow).removeClass('x-view-selected');
- this.ctxRow = null;
- }
+ }
+ ]
+ });
+ this.menu.on('hide', this.onContextHide, this);
+ }
+ e.stopEvent();
+ if(this.ctxRow){
+ //Ext.fly(this.ctxRow).removeClass('x-view-selected');
+ this.ctxRow = null;
+ }
this.ctxRow = node;
- var record = this.store.getById(node.id);
+ var record = this.store.getById(node.id);
this.select(node.id,true,false);
- var items = this.menu.items;
+ var items = this.menu.items;
if(items) {
items.eachKey(
function(key, f) {
@@ -813,20 +813,20 @@ Ext.extend(Ext.xxv.recordingsDataView, Ext.DataView, {
}
this.ctxRecord = record;
- //Ext.fly(this.ctxRow).addClass('x-view-selected');
- this.menu.showAt(e.getXY());
- },
-
- onContextHide : function(){
- if(this.ctxRow){
- Ext.fly(this.ctxRow).removeClass('x-view-selected');
- this.ctxRow = null;
+ //Ext.fly(this.ctxRow).addClass('x-view-selected');
+ this.menu.showAt(e.getXY());
+ },
+
+ onContextHide : function(){
+ if(this.ctxRow){
+ Ext.fly(this.ctxRow).removeClass('x-view-selected');
+ this.ctxRow = null;
}
if(this.menu) {
this.menu.destroy();
delete this.menu;
this.menu = null;
- }
+ }
},
/******************************************************************************/
@@ -834,7 +834,7 @@ Ext.extend(Ext.xxv.recordingsDataView, Ext.DataView, {
{
this.viewer.loadMask.hide();
- var o = eval("("+response.responseText+")");
+ var o = eval("("+response.responseText+")");
if(o && o.data && typeof(o.data) == 'string'
&& o.success) {
@@ -863,8 +863,8 @@ Ext.extend(Ext.xxv.recordingsDataView, Ext.DataView, {
if(record && record.data) {
toCut = record.data.id;
} else {
- var selNode = this.getSelectedNodes();
- if(selNode && selNode.length > 0){
+ var selNode = this.getSelectedNodes();
+ if(selNode && selNode.length > 0){
for(var i = 0, len = selNode.length; i < len; i++){
if(selNode[i].id == 'up')
continue;
@@ -897,7 +897,7 @@ Ext.extend(Ext.xxv.recordingsDataView, Ext.DataView, {
{
this.viewer.loadMask.hide();
- var o = eval("("+response.responseText+")");
+ var o = eval("("+response.responseText+")");
if(o && o.data && typeof(o.data) == 'string'
&& o.success) {
@@ -951,8 +951,8 @@ Ext.extend(Ext.xxv.recordingsDataView, Ext.DataView, {
if(record && record.data) {
todelete = record.data.id;
} else {
- var selNode = this.getSelectedNodes();
- if(selNode && selNode.length > 0){
+ var selNode = this.getSelectedNodes();
+ if(selNode && selNode.length > 0){
for(var i = 0, len = selNode.length; i < len; i++){
if(selNode[i].id == 'up')
continue;
@@ -982,10 +982,10 @@ Ext.extend(Ext.xxv.recordingsDataView, Ext.DataView, {
/******************************************************************************/
onPlaySuccess : function( response,options )
{
- var json = response.responseText;
- var o = eval("("+json+")");
- if(!o || !o.data || typeof(o.data) != 'string') {
- throw {message: "Ajax.read: Json message not found"};
+ var json = response.responseText;
+ var o = eval("("+json+")");
+ if(!o || !o.data || typeof(o.data) != 'string') {
+ throw {message: "Ajax.read: Json message not found"};
}
if(o.success) {
new Ext.xxv.MessageBox().msgSuccess(this.szPlayBackSuccess, o.data);
@@ -1028,9 +1028,9 @@ Ext.extend(Ext.xxv.recordingsDataView, Ext.DataView, {
};
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);
}
,ConvertItem : function(record) {
@@ -1041,9 +1041,9 @@ Ext.extend(Ext.xxv.recordingsDataView, Ext.DataView, {
};
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);
}
,Recover : function() {
@@ -1052,15 +1052,15 @@ Ext.extend(Ext.xxv.recordingsDataView, Ext.DataView, {
};
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);
}
/******************************************************************************/
,onUpgradeSuccess : function( response,options )
{
Ext.MessageBox.hide();
- var o = eval("("+response.responseText+")");
+ var o = eval("("+response.responseText+")");
if(o && o.data && typeof(o.data) == 'string'
&& o.success) {
@@ -1106,8 +1106,8 @@ Ext.extend(Ext.xxv.recordingsDataView, Ext.DataView, {
});
}
,reload : function() {
- this.store.load({params:{start:0, limit:configuration.pageSize}});
- }
+ this.store.load({params:{start:0, limit:configuration.pageSize}});
+ }
});
@@ -1133,11 +1133,11 @@ function createRecordingsView(viewer,id) {
}
});
- var preview = new Ext.Panel({
- id: 'preview-recordings',
- region: 'south',
- cls:'preview',
- autoScroll: true,
+ var preview = new Ext.Panel({
+ id: 'preview-recordings',
+ region: 'south',
+ cls:'preview',
+ autoScroll: true,
stateful:false,
timefield : timefield,
layout: {
@@ -1146,7 +1146,7 @@ function createRecordingsView(viewer,id) {
,align:'stretch'
,autoScroll: true
}
- ,defaults:{margins:'0 0 0 0'}
+ ,defaults:{margins:'0 0 0 0'}
,items: [
{ //header
xtype:'container'
@@ -1172,7 +1172,7 @@ function createRecordingsView(viewer,id) {
}]
},{ //content
id: 'preview-recordings-frame'
- ,cls: 'preview-body'
+ ,cls: 'preview-body'
,xtype: 'box'
,flex: 3
},{ // keywords
@@ -1185,67 +1185,67 @@ function createRecordingsView(viewer,id) {
}]
}],
tbar: [
- {
- id:'s'
- ,iconCls: 'find-icon'
- ,tooltip: Ext.xxv.recordingsDataView.prototype.szFindReRun
- ,scope: viewer
- ,disabled:true
- ,handler: function(){ this.searchTab(this.gridRecordings.preview.record); }
+ {
+ id:'s'
+ ,iconCls: 'find-icon'
+ ,tooltip: Ext.xxv.recordingsDataView.prototype.szFindReRun
+ ,scope: viewer
+ ,disabled:true
+ ,handler: function(){ this.searchTab(this.gridRecordings.preview.record); }
}
- ,'-'
- ,{
- id:'re'
- ,iconCls: 'edit-icon'
- ,tooltip: Ext.xxv.recordingsDataView.prototype.szEdit
- ,scope: viewer
- ,disabled:true
- ,handler: function(){ this.gridRecordings.EditItem(this.gridRecordings.preview.record); }
+ ,'-'
+ ,{
+ id:'re'
+ ,iconCls: 'edit-icon'
+ ,tooltip: Ext.xxv.recordingsDataView.prototype.szEdit
+ ,scope: viewer
+ ,disabled:true
+ ,handler: function(){ this.gridRecordings.EditItem(this.gridRecordings.preview.record); }
}
- ,{
- id:'rcu'
- ,iconCls: 'cut-icon'
- ,tooltip: Ext.xxv.recordingsDataView.prototype.szCut
- ,scope: viewer
- ,disabled:true
- ,handler: function(){ this.gridRecordings.CutItem(this.gridRecordings.preview.record); }
+ ,{
+ id:'rcu'
+ ,iconCls: 'cut-icon'
+ ,tooltip: Ext.xxv.recordingsDataView.prototype.szCut
+ ,scope: viewer
+ ,disabled:true
+ ,handler: function(){ this.gridRecordings.CutItem(this.gridRecordings.preview.record); }
}
- ,{
- id:'rc'
- ,iconCls: 'convert-icon'
- ,tooltip: Ext.xxv.recordingsDataView.prototype.szConvert
- ,scope: viewer
- ,disabled:true
- ,handler: function(){ this.gridRecordings.ConvertItem(this.gridRecordings.preview.record); }
+ ,{
+ id:'rc'
+ ,iconCls: 'convert-icon'
+ ,tooltip: Ext.xxv.recordingsDataView.prototype.szConvert
+ ,scope: viewer
+ ,disabled:true
+ ,handler: function(){ this.gridRecordings.ConvertItem(this.gridRecordings.preview.record); }
}
- ,{
- id:'rr'
- ,iconCls: 'delete-icon'
- ,tooltip: Ext.xxv.recordingsDataView.prototype.szDelete
- ,scope: viewer
- ,disabled:true
- ,handler: function(){ this.gridRecordings.DeleteItem(this.gridRecordings.preview.record); }
+ ,{
+ id:'rr'
+ ,iconCls: 'delete-icon'
+ ,tooltip: Ext.xxv.recordingsDataView.prototype.szDelete
+ ,scope: viewer
+ ,disabled:true
+ ,handler: function(){ this.gridRecordings.DeleteItem(this.gridRecordings.preview.record); }
}
,"->"
- ,{
- id:'pre'
- ,iconCls: 'stream-icon'
- ,tooltip: Ext.xxv.recordingsDataView.prototype.szStream
- ,scope: viewer
- ,disabled:true
- ,handler: function(){ this.gridRecordings.onStream(this.gridRecordings.preview.record, this.gridRecordings.preview.timefield.getValue() ); }
+ ,{
+ id:'pre'
+ ,iconCls: 'stream-icon'
+ ,tooltip: Ext.xxv.recordingsDataView.prototype.szStream
+ ,scope: viewer
+ ,disabled:true
+ ,handler: function(){ this.gridRecordings.onStream(this.gridRecordings.preview.record, this.gridRecordings.preview.timefield.getValue() ); }
}
- ,{
- id:'rpv'
- ,iconCls: 'play-icon'
- ,tooltip: Ext.xxv.recordingsDataView.prototype.szPlay
- ,scope: viewer
- ,disabled:true
- ,handler: function(){ this.gridRecordings.onPlay(this.gridRecordings.preview.record, this.gridRecordings.preview.timefield.getValue() ); }
+ ,{
+ id:'rpv'
+ ,iconCls: 'play-icon'
+ ,tooltip: Ext.xxv.recordingsDataView.prototype.szPlay
+ ,scope: viewer
+ ,disabled:true
+ ,handler: function(){ this.gridRecordings.onPlay(this.gridRecordings.preview.record, this.gridRecordings.preview.timefield.getValue() ); }
}
, timefield
]
- ,content : function(record,lookup){
+ ,content : function(record,lookup){
if(record && this.record != record
&& record.data.isrecording
@@ -1260,7 +1260,7 @@ function createRecordingsView(viewer,id) {
this.timefield.setValue(this.timefield.minValue);
// Enable all toolbar buttons
- var items = this.topToolbar.items;
+ var items = this.topToolbar.items;
if(items) {
items.eachKey(function(key, f)
{
@@ -1354,32 +1354,32 @@ function createRecordingsView(viewer,id) {
var root = Ext.getCmp('preview-recordings-images');
var images = root.select('img');
Ext.each(images, function(image){
- this.get(1).on("click", function(e, ele){
- if (!image.onSelected || !(image.onSelected.call(this, image, e, ele )===false)){
+ this.get(1).on("click", function(e, ele){
+ if (!image.onSelected || !(image.onSelected.call(this, image, e, ele )===false)){
this.fireEvent('selected', this, new Date(minTime().getTime()+(image.frame * 40)), e, ele);
var slider = this.get(2).get(0).getSlider('cutpoint_thumb');
slider.value = pic.frame/25;
this.get(2).get(0).slider.initSliderPosition(slider);
- }
+ }
},this);
});
*/
}
- }
+ }
,clear: function(){
- if(this) {
+ if(this) {
//if(this.body)
// this.body.update('');
this.record = null;
// Disable all toolbar buttons
- var items = this.topToolbar.items;
+ var items = this.topToolbar.items;
if(items) {
items.eachKey(function(key, f){f.disable();},items);
}
}
- }
+ }
});
viewer.gridRecordings = new Ext.xxv.recordingsDataView(
@@ -1388,57 +1388,57 @@ function createRecordingsView(viewer,id) {
new Ext.xxv.recordingsStore(),
{ id: 'recording-view-grid' });
- var tab = new Ext.xxv.Panel({
+ var tab = new Ext.xxv.Panel({
id: id
,iconCls:"recordings-icon"
- ,closable:true
+ ,closable:true
,border:false
- ,layout:'border'
- ,stateful:true
+ ,layout:'border'
+ ,stateful:true
,items:[
viewer.gridRecordings
- ,{
- id:'recording-bottom-preview'
- ,layout:'fit'
- ,items:XXV.BottomPreview ? 0 : viewer.gridRecordings.preview
- ,height: 250
- ,split: true
- ,border:false
- ,region:'south'
- ,hidden:XXV.BottomPreview
- }, {
- id:'recording-right-preview'
- ,layout:'fit'
- ,items:XXV.RightPreview ? 0 : viewer.gridRecordings.preview
- ,border:false
- ,region:'east'
- ,width:350
- ,split: true
- ,hidden:XXV.RightPreview
+ ,{
+ id:'recording-bottom-preview'
+ ,layout:'fit'
+ ,items:XXV.BottomPreview ? 0 : viewer.gridRecordings.preview
+ ,height: 250
+ ,split: true
+ ,border:false
+ ,region:'south'
+ ,hidden:XXV.BottomPreview
+ }, {
+ id:'recording-right-preview'
+ ,layout:'fit'
+ ,items:XXV.RightPreview ? 0 : viewer.gridRecordings.preview
+ ,border:false
+ ,region:'east'
+ ,width:350
+ ,split: true
+ ,hidden:XXV.RightPreview
}]
,tbar:new Ext.PagingToolbar({
pageSize: viewer.gridRecordings.store.autoLoad.params.limit
,store: viewer.gridRecordings.store
,displayInfo: true
,items: [
- {
+ {
id:'ru'
- ,iconCls: 'upgrade-icon'
- ,tooltip: viewer.gridRecordings.szUpgrade
- ,scope: viewer.gridRecordings
- ,disabled:false
- ,handler: function(){ this.UpgradeItem(); }
- },{
- id:'rru'
- ,iconCls: 'recover-icon'
- ,tooltip: viewer.gridRecordings.szRecover
- ,scope: viewer.gridRecordings
- ,disabled:false
- ,handler: function(){ this.Recover(); }
+ ,iconCls: 'upgrade-icon'
+ ,tooltip: viewer.gridRecordings.szUpgrade
+ ,scope: viewer.gridRecordings
+ ,disabled:false
+ ,handler: function(){ this.UpgradeItem(); }
+ },{
+ id:'rru'
+ ,iconCls: 'recover-icon'
+ ,tooltip: viewer.gridRecordings.szRecover
+ ,scope: viewer.gridRecordings
+ ,disabled:false
+ ,handler: function(){ this.Recover(); }
}
]}
)
- });
+ });
viewer.add(tab);
return tab;
diff --git a/skins/jason/remote.js b/skins/jason/remote.js
index 75c3f8a..17aae1f 100644
--- a/skins/jason/remote.js
+++ b/skins/jason/remote.js
@@ -1,30 +1,30 @@
-/*
- * 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$
*/
-
-Ext.xxv.RemoteWindow = function() {
- Ext.xxv.RemoteWindow.superclass.constructor.call(this, {
+Ext.xxv.RemoteWindow = function() {
+
+ Ext.xxv.RemoteWindow.superclass.constructor.call(this, {
title: this.szTitle
- ,iconCls: 'remote-icon'
+ ,iconCls: 'remote-icon'
,id: 'Remote-win'
- ,width: 225
- ,height: 265
- ,resizable: false
- ,plain: false
- ,modal: false
- ,autoScroll: false
+ ,width: 225
+ ,height: 265
+ ,resizable: false
+ ,plain: false
+ ,modal: false
+ ,autoScroll: false
,closeAction: 'hide'
,collapsible: false
,maximizable: false
,items: [
new Ext.form.FormPanel({
- id: 'form-panel'
+ id: 'form-panel'
,stateful: false
,forceLayout: true
,baseCls: 'x-plain'
@@ -82,8 +82,8 @@ Ext.xxv.RemoteWindow = function() {
,{ scale: 'medium', scope: this, width: 32, iconCls: 'remote-yellow-icon', handler: function() { this.onRemote('Yellow'); } }
,{ scale: 'medium', scope: this, width: 32, iconCls: 'remote-blue-icon', handler: function() { this.onRemote('Blue'); } }
,{ xtype: 'spacer', width: 12 }
- ,{ scale: 'medium', scope: this, width: 32, iconCls: 'remote-quiet-icon', handler: function() { this.onRemote('Decrease volume'); } }
- ,{ scale: 'medium', scope: this, width: 32, iconCls: 'remote-loud-icon', handler: function() { this.onRemote('Increase volume'); } }
+ ,{ scale: 'medium', scope: this, width: 32, iconCls: 'remote-quiet-icon', handler: function() { this.onRemote('VolumeMinus'); } }
+ ,{ scale: 'medium', scope: this, width: 32, iconCls: 'remote-loud-icon', handler: function() { this.onRemote('VolumePlus'); } }
]
},{
xtype: 'buttongroup'
@@ -105,9 +105,9 @@ Ext.xxv.RemoteWindow = function() {
});
Ext.xxv.RemoteWindow.superclass.show.apply(this, arguments);
-}
-
-Ext.extend(Ext.xxv.RemoteWindow, Ext.Window, {
+}
+
+Ext.extend(Ext.xxv.RemoteWindow, Ext.Window, {
szTitle : "Remote control"
//,szRemoteSuccess : "Successful transmit remote control data.\r\n{0}"
@@ -121,15 +121,15 @@ Ext.extend(Ext.xxv.RemoteWindow, Ext.Window, {
Ext.xxv.RemoteWindow.superclass.hide.apply(this, arguments);
}
,show : function(){
- Ext.xxv.RemoteWindow.superclass.show.apply(this, arguments);
+ Ext.xxv.RemoteWindow.superclass.show.apply(this, arguments);
}
/******************************************************************************/
,onRemoteSuccess : function( response,options )
{
- var json = response.responseText;
- var o = eval("("+json+")");
- if(!o || !o.data || typeof(o.data) != 'string') {
- throw {message: "Ajax.read: Json message not found"};
+ var json = response.responseText;
+ var o = eval("("+json+")");
+ if(!o || !o.data || typeof(o.data) != 'string') {
+ throw {message: "Ajax.read: Json message not found"};
}
if(o.success) {
//new Ext.xxv.MessageBox().msgSuccess(this.szRemoteSuccess, o.data);
@@ -153,10 +153,10 @@ Ext.extend(Ext.xxv.RemoteWindow, Ext.Window, {
});
Ext.xxv.RemoteWindowOpen = function(){
- var viewer = Ext.getCmp('main-tabs');
- if(!viewer.Remote){
- viewer.Remote = new Ext.xxv.RemoteWindow();
- } else {
+ var viewer = Ext.getCmp('main-tabs');
+ if(!viewer.Remote){
+ viewer.Remote = new Ext.xxv.RemoteWindow();
+ } else {
viewer.Remote.show();
}
}
diff --git a/skins/jason/search.js b/skins/jason/search.js
index 24ce57a..9e327ec 100644
--- a/skins/jason/search.js
+++ b/skins/jason/search.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-2010, anbr
+ *
* http://xxv.berlios.de/
*
* $Id$
@@ -12,15 +12,15 @@ Ext.xxv.searchStore = function(lookup) {
baseParams:{cmd:'s',data: lookup}
,autoLoad:{params:{start:0, limit:configuration.pageSize}}
,reader: new Ext.xxv.jsonReader({
- fields: [
+ fields: [
{name: 'id', type: 'string'},
- {name: 'title', type: 'string'},
- {name: 'subtitle', type: 'string'},
- {name: 'channel', type: 'string'},
- {name: 'pos', type: 'int'},
- {name: 'start', type: 'string' },
- {name: 'stop', type: 'string' },
- {name: 'day', type: 'date', convert : function(x){ return new Date(x * 1000);} },
+ {name: 'title', type: 'string'},
+ {name: 'subtitle', type: 'string'},
+ {name: 'channel', type: 'string'},
+ {name: 'pos', type: 'int'},
+ {name: 'start', type: 'string' },
+ {name: 'stop', type: 'string' },
+ {name: 'day', type: 'date', convert : function(x){ return new Date(x * 1000);} },
{name: 'description', type: 'string'},
{name: 'vps', type: 'string' },
{name: 'timerid', type: 'string'},
@@ -28,91 +28,92 @@ Ext.xxv.searchStore = function(lookup) {
{name: 'running', type: 'string'},
{name: 'video', type: 'string'},
{name: 'audio', type: 'string'}
- ],
- remoteGroup:true,
- remoteSort: true
+ ]
})
- ,proxy : new Ext.data.HttpProxy({
- url: XXV.help.baseURL()
- ,method: 'POST'
+ ,proxy : new Ext.data.HttpProxy({
+ url: XXV.help.baseURL()
+ ,method: 'POST'
})
,sortInfo:{field:'day', direction:'ASC'}
,groupField:'day'
});
};
-Ext.xxv.searchGrid = function(viewer, lookup) {
+Ext.xxv.searchGrid = function(viewer, lookup) {
- this.viewer = viewer;
+ this.viewer = viewer;
this.preview = new Ext.xxv.searchPreview(viewer);
- //Ext.apply(this, config);
+ //Ext.apply(this, config);
// create the data store
this.store = new Ext.xxv.searchStore(lookup);
- this.store.setDefaultSort('day', "ASC");
-
- this.columns = [{
- header: this.szColTitle
- ,dataIndex: 'title'
- ,width: 150
+ this.store.setDefaultSort('day', "ASC");
+
+ this.columns = [{
+ header: this.szColTitle
+ ,dataIndex: 'title'
+ ,width: 150
,renderer: { fn: this.viewer.gridNow.formatTitle, scope: this.viewer.gridNow }
- },{ header: this.szColChannel,
- dataIndex: 'channel',
- width: 100
- },{ header: this.szColDay,
- dataIndex: 'day',
+ },{
+ header: this.szColChannel,
+ dataIndex: 'channel',
+ width: 100
+ },{
+ header: this.szColDay,
+ dataIndex: 'day',
width: 50,
- hidden: true,
- renderer: Ext.util.Format.dateRenderer(this.szColDayFormat)
- },{
- header: this.szColStart,
- dataIndex: 'start',
- width: 50
- },{
- header: this.szColStop,
- dataIndex: 'stop',
- width: 50
+ hidden: true,
+ renderer: Ext.util.Format.dateRenderer(this.szColDayFormat)
+ },{
+ header: this.szColStart,
+ dataIndex: 'start',
+ width: 50
+ },{
+ header: this.szColStop,
+ dataIndex: 'stop',
+ width: 50
}
- ];
-
- Ext.xxv.searchGrid.superclass.constructor.call(this, {
- region: 'center',
- id: 'search-grid',
- loadMask: false,
- sm: new Ext.grid.RowSelectionModel({
- singleSelect:false
- }),
+ ];
+
+ Ext.xxv.searchGrid.superclass.constructor.call(this, {
+ region: 'center',
+ id: 'search-grid',
+ loadMask: false,
+ sm: new Ext.grid.RowSelectionModel({
+ singleSelect:false
+ }),
autoExpandColumn:'title',
- view: new Ext.grid.GroupingView({
+ view: new Ext.grid.GroupingView({
enableGroupingMenu:false,
- forceFit:true,
- showGroupName: false
+ forceFit:true,
+ showGroupName: false,
+ enableGrouping:true
}),
tbar:new Ext.PagingToolbar({
pageSize: this.store.autoLoad.params.limit,
store: this.store,
displayInfo: true })
- });
+ });
- this.store.on({
+ this.store.on({
'load' : this.onLoad
- ,'beforeload' : this.onBeforeLoad
- ,'loadexception' : this.onLoadException
- ,scope:this
+ ,'beforeload' : this.onBeforeLoad
+ ,'loadexception' : this.onLoadException
+ ,scope:this
});
this.on('rowcontextmenu', this.onContextClick, this);
this.getSelectionModel().on('rowselect', this.select, this, {buffer:50});
-};
-
-Ext.extend(Ext.xxv.searchGrid, Ext.grid.GridPanel, {
+};
+
+Ext.extend(Ext.xxv.searchGrid, Ext.grid.GridPanel, {
szTitle : "Search"
,szFindReRun : "Find rerun"
,szRecord : "Record"
,szColTitle : "Title"
- ,szColChannel : "Channel"
- ,szColDay : "Day"
- ,szColStart : "Start"
+ ,szColChannel : "Channel"
+ ,szColDay : "Day"
+ ,szColStart : "Start"
,szColStop : "Stop"
,szColDayFormat : "l, m/d/Y"
,szLoadException : "Couldn't find data!\r\n{0}"
@@ -130,56 +131,56 @@ Ext.extend(Ext.xxv.searchGrid, Ext.grid.GridPanel, {
this.ownerCt.SetPanelTitle(store.baseParams.data);
}
- ,onContextClick : function(grid, index, e){
- if(!this.menu){ // create context menu on first right click
- this.menu = new Ext.menu.Menu({
- id:'grid-ctx',
+ ,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: 's'
- ,iconCls: 'find-icon'
- ,text: this.szFindReRun
+ ,iconCls: 'find-icon'
+ ,text: this.szFindReRun
,scope:this
- ,disabled: true
+ ,disabled: true
,handler: function(){ this.viewer.searchTab(this.ctxRecord); }
}
- ,{
+ ,{
itemId: 'tn'
- ,text: this.szRecord
- ,iconCls: 'record-icon'
+ ,text: this.szRecord
+ ,iconCls: 'record-icon'
,scope:this
- ,disabled: true
+ ,disabled: true
,handler: function(){ this.Record(null); }
},{
- itemId:'te'
- ,text: this.viewer.gridNow.szEditTimer
- ,iconCls: 'timer-edit-icon'
+ itemId:'te'
+ ,text: this.viewer.gridNow.szEditTimer
+ ,iconCls: 'timer-edit-icon'
,scope:this
,disabled: true
- ,handler: function() { this.EditTimer(this.ctxRecord); }
+ ,handler: function() { this.EditTimer(this.ctxRecord); }
},{
- itemId:'td'
- ,text: this.viewer.gridNow.szDeleteTimer
- ,iconCls: 'timer-delete-icon'
+ itemId:'td'
+ ,text: this.viewer.gridNow.szDeleteTimer
+ ,iconCls: 'timer-delete-icon'
,scope:this
,disabled: true
- ,handler: function() { this.DeleteTimer(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);
+ ,handler: function() { this.DeleteTimer(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 timerid = this.ctxRecord.data.timerid;
- var items = this.menu.items;
+ var items = this.menu.items;
if(items) { items.eachKey(function(key, f) {
if(f.itemId == 'tn') { if(timerid) f.hide(); else f.show(); }
else if(f.itemId == 'te') { if(timerid) f.show(); else f.hide(); }
@@ -189,24 +190,24 @@ Ext.extend(Ext.xxv.searchGrid, Ext.grid.GridPanel, {
},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;
- }
- }
+ }
+ }
,loadSearch : function(lookup) {
- this.store.baseParams.data = lookup;
- this.store.load({params:{start:0, limit:this.store.autoLoad.params.limit}});
+ this.store.baseParams.data = lookup;
+ this.store.load({params:{start:0, limit:this.store.autoLoad.params.limit}});
}
,Record : function( record ) {
var gsm = this.getSelectionModel();
@@ -221,7 +222,7 @@ Ext.extend(Ext.xxv.searchGrid, Ext.grid.GridPanel, {
ids += ',';
ids += sel[i].data.id;
}
- this.viewer.RecordID(ids);
+ this.viewer.RecordID(ids);
}
,EditTimer : function(record) {
this.viewer.gridNow.EditTimer(record, this.store);
@@ -251,56 +252,56 @@ Ext.extend(Ext.xxv.searchGrid, Ext.grid.GridPanel, {
Ext.xxv.searchPreview = function(viewer) {
this.viewer = viewer;
- Ext.xxv.searchPreview.superclass.constructor.call(this, {
- id: 'preview-Search',
- region: 'south',
- cls:'preview',
- autoScroll: true,
+ Ext.xxv.searchPreview.superclass.constructor.call(this, {
+ id: 'preview-Search',
+ region: 'south',
+ cls:'preview',
+ autoScroll: true,
stateful:true,
- tbar: [ {
- id:'s',
- tooltip: Ext.xxv.NowGrid.prototype.szFindReRun,
- iconCls: 'find-icon',
- disabled:true,
- scope: viewer,
- handler: function(){ this.searchTab(this.gridSearch.getSelectionModel().getSelected()); }
- } ,{
- id:'tn',
- tooltip: this.viewer.gridNow.szRecord,
- iconCls: 'record-icon',
- disabled:true,
- scope: viewer,
- handler: function(){ this.Record(this.gridSearch.getSelectionModel().getSelected()); }
- },{
- id:'te',
- tooltip: this.viewer.gridNow.szEditTimer,
- iconCls: 'timer-edit-icon',
- disabled:true,
- scope: viewer,
+ tbar: [ {
+ id:'s',
+ tooltip: Ext.xxv.NowGrid.prototype.szFindReRun,
+ iconCls: 'find-icon',
+ disabled:true,
+ scope: viewer,
+ handler: function(){ this.searchTab(this.gridSearch.getSelectionModel().getSelected()); }
+ } ,{
+ id:'tn',
+ tooltip: this.viewer.gridNow.szRecord,
+ iconCls: 'record-icon',
+ disabled:true,
+ scope: viewer,
+ handler: function(){ this.Record(this.gridSearch.getSelectionModel().getSelected()); }
+ },{
+ id:'te',
+ tooltip: this.viewer.gridNow.szEditTimer,
+ iconCls: 'timer-edit-icon',
+ disabled:true,
+ scope: viewer,
handler: function(){
this.gridSearch.EditTimer(this.gridSearch.getSelectionModel().getSelected());
- }
- },{
- id:'td',
- tooltip: this.viewer.gridNow.szDeleteTimer,
- iconCls: 'timer-delete-icon',
- disabled:true,
- scope: viewer,
+ }
+ },{
+ id:'td',
+ tooltip: this.viewer.gridNow.szDeleteTimer,
+ iconCls: 'timer-delete-icon',
+ disabled:true,
+ scope: viewer,
handler: function(){
this.gridSearch.DeleteTimer(this.gridSearch.getSelectionModel().getSelected());
- }
- } ]
+ }
+ } ]
});
};
Ext.extend(Ext.xxv.searchPreview, Ext.Panel, {
select : function(record, lookup){
- if(this.body)
+ if(this.body)
XXV.getTemplate().overwrite(this.body, record.data);
if(lookup)
highlightText(this.body.dom,lookup,'x-highlight',1);
// Enable all toolbar buttons
- var items = this.topToolbar.items;
- var items = this.topToolbar.items;
+ var items = this.topToolbar.items;
+ var items = this.topToolbar.items;
if(items) {
items.eachKey(function(key, f) {
if(f.id == 'tn') { if(record.data.timerid) f.hide(); else f.show(); }
@@ -311,11 +312,11 @@ Ext.extend(Ext.xxv.searchPreview, Ext.Panel, {
}
}
,clear: function(){
- if(this) {
+ if(this) {
if(this.body)
- this.body.update('');
+ this.body.update('');
// Disable all items
- var items = this.topToolbar.items;
+ var items = this.topToolbar.items;
if(items) { items.eachKey(function(key, f){f.disable();},items); }
}
}
@@ -325,37 +326,37 @@ function createSearchView(viewer,id,lookup) {
viewer.gridSearch = new Ext.xxv.searchGrid(viewer, lookup);
- tab = new Ext.xxv.Panel({
+ tab = new Ext.xxv.Panel({
id: id,
- iconCls: 'find-icon',
- closable:true,
- autoScroll:true,
+ iconCls: 'find-icon',
+ closable:true,
+ autoScroll:true,
border:false,
layout:'border',
- stateful:true,
- items:[
+ stateful:true,
+ items:[
viewer.gridSearch,
- {
- id:'search-bottom-preview',
- layout:'fit',
- items:XXV.BottomPreview ? 0 : viewer.gridSearch.preview,
- height: 250,
- split: true,
- border:false,
+ {
+ id:'search-bottom-preview',
+ layout:'fit',
+ items:XXV.BottomPreview ? 0 : viewer.gridSearch.preview,
+ height: 250,
+ split: true,
+ border:false,
region:'south',
- hidden:XXV.BottomPreview
- }, {
- id:'search-right-preview',
- layout:'fit',
+ hidden:XXV.BottomPreview
+ }, {
+ id:'search-right-preview',
+ layout:'fit',
items:XXV.RightPreview ? 0 : viewer.gridSearch.preview,
- border:false,
- region:'east',
- width:350,
- split: true,
- hidden:XXV.RightPreview
+ border:false,
+ region:'east',
+ width:350,
+ split: true,
+ hidden:XXV.RightPreview
}
- ]
- });
+ ]
+ });
viewer.add(tab);
diff --git a/skins/jason/stream.js b/skins/jason/stream.js
index 9d85b03..2978fea 100644
--- a/skins/jason/stream.js
+++ b/skins/jason/stream.js
@@ -1,13 +1,13 @@
-/*
- * 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$
- */
-
-Ext.xxv.StreamWindow = function(item) {
+ */
+
+Ext.xxv.StreamWindow = function(item) {
var tpl = new Ext.XTemplate(
'<object id="player_obj" width="{width}" height="{height}"',
@@ -36,31 +36,31 @@ Ext.xxv.StreamWindow = function(item) {
if(item.title) {
t = item.title;
}
- Ext.xxv.StreamWindow.superclass.constructor.call(this, {
+ Ext.xxv.StreamWindow.superclass.constructor.call(this, {
title: t
- ,streamtpl:tpl
- ,iconCls: 'stream-icon'
+ ,streamtpl:tpl
+ ,iconCls: 'stream-icon'
,id: 'stream-win'
,minWidth: 160
,minHeight: 120
,marginWidth: marginWidth
,marginHeight: marginHeight
- ,width: item.width
- ,height: item.height
- ,resizable: true
- ,plain: true
- ,modal: false
- ,autoScroll: false
+ ,width: item.width
+ ,height: item.height
+ ,resizable: true
+ ,plain: true
+ ,modal: false
+ ,autoScroll: false
,closeAction: 'hide'
- ,maximizable: true
+ ,maximizable: true
,tools:[
{id:'gear',handler:this.aspect, scope:this, qtip:this.szAspect }
- ]
+ ]
,items: [{
id: 'video'
,region: 'center'
- ,width: item.width - marginWidth
- ,height: item.height - marginHeight
+ ,width: item.width - marginWidth
+ ,height: item.height - marginHeight
,html: tpl.apply({
width : item.width - marginWidth,
height : item.height - marginHeight,
@@ -72,8 +72,8 @@ Ext.xxv.StreamWindow = function(item) {
Ext.xxv.StreamWindow.superclass.show.apply(this, arguments);
this.on('resize', this.onresize, this);
-}
-
+}
+
Ext.extend(Ext.xxv.StreamWindow, Ext.Window, {
szTitle : "Streaming"
@@ -112,10 +112,10 @@ Ext.extend(Ext.xxv.StreamWindow, Ext.Window, {
url: item.url
});
video.body.show();
- this.setTitle(item.title);
+ this.setTitle(item.title);
}
- Ext.xxv.StreamWindow.superclass.show.apply(this, arguments);
- }
+ Ext.xxv.StreamWindow.superclass.show.apply(this, arguments);
+ }
});
@@ -136,9 +136,9 @@ Ext.xxv.createStream = function(item,widget) {
window.open(item.url, '_blank', "width=" + item.width + ",height="+ item.height);
return null;
}
- if(!widget){
- return new Ext.xxv.StreamWindow(item);
- } else {
+ if(!widget){
+ return new Ext.xxv.StreamWindow(item);
+ } else {
widget.show(item);
}
};
diff --git a/skins/jason/tabpanel.js b/skins/jason/tabpanel.js
index 392f026..3c26ac8 100644
--- a/skins/jason/tabpanel.js
+++ b/skins/jason/tabpanel.js
@@ -1,74 +1,74 @@
-/*
- * 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$
- */
-
+ */
+
Ext.xxv.tabPanel = function(){
this.initPreview();
var tab = createNowView(this,'n');
if(!tab) return;
- Ext.xxv.tabPanel.superclass.constructor.call(this, {
- id:'main-tabs'
- ,activeTab:0
- ,region:'center'
- ,margins:'0 5 5 0'
- ,resizeTabs:true
- ,tabWidth:150
- ,minTabWidth: 100
+ Ext.xxv.tabPanel.superclass.constructor.call(this, {
+ id:'main-tabs'
+ ,activeTab:0
+ ,region:'center'
+ ,margins:'0 5 5 0'
+ ,resizeTabs:true
+ ,tabWidth:150
+ ,minTabWidth: 100
,enableTabScroll: true
,loadMask: null
//,defaults: {hideMode: 'offsets'}
- ,plugins: [ new Ext.ux.TabCloseMenu() ]
- ,items: [ tab ]
- });
- this.on('render', this.initPanel, this);
-};
-
-Ext.extend(Ext.xxv.tabPanel, Ext.TabPanel, {
+ ,plugins: [ new Ext.ux.TabCloseMenu() ]
+ ,items: [ tab ]
+ });
+ this.on('render', this.initPanel, this);
+};
+
+Ext.extend(Ext.xxv.tabPanel, Ext.TabPanel, {
- initPanel : function(){
+ initPanel : function(){
if(!this.loadMask)
this.loadMask = new Ext.LoadMask(this.id, {msg: Ext.LoadMask.prototype.msg, msgCls:'x-mask-loading'});
- },
- initPreview : function(){
- XXV.BottomPreview = false;
+ },
+ initPreview : function(){
+ XXV.BottomPreview = false;
XXV.RightPreview = true;
if(Ext.state.Manager.getProvider()) {
var previewstate = Ext.state.Manager.get('preview-layout');
if(previewstate) {
- switch(previewstate){
- case 'preview-bottom':
- XXV.BottomPreview = false;
+ switch(previewstate){
+ case 'preview-bottom':
+ XXV.BottomPreview = false;
XXV.RightPreview = true;
- break;
- case 'preview-right':
- XXV.BottomPreview = true;
+ break;
+ case 'preview-right':
+ XXV.BottomPreview = true;
XXV.RightPreview = false;
- break;
- case 'preview-hide':
- XXV.BottomPreview = true;
+ break;
+ case 'preview-hide':
+ XXV.BottomPreview = true;
XXV.RightPreview = true;
break;
}
}
}
}
- ,movePreview : function(m, pressed){
- if(!m || m.group != 'rp-group'){
- return;
- }
- if(pressed){
+ ,movePreview : function(m, pressed){
+ if(!m || m.group != 'rp-group'){
+ return;
+ }
+ if(pressed){
var pages = ['now','program','timer','search','recording','chronicle'];
for(var i = 0, len = pages.length; i < len; i++){
- var page = pages[i];
- var right = Ext.getCmp(page + '-right-preview');
- var bot = Ext.getCmp(page + '-bottom-preview');
- if(right && bot) {
+ var page = pages[i];
+ var right = Ext.getCmp(page + '-right-preview');
+ var bot = Ext.getCmp(page + '-bottom-preview');
+ if(right && bot) {
var preview;
if(page == 'now') {
preview = this.gridNow.preview;
@@ -85,46 +85,46 @@ Ext.extend(Ext.xxv.tabPanel, Ext.TabPanel, {
} else {
continue;
}
- switch(m.iconCls){
- case 'preview-bottom':
- right.hide();
- bot.add(preview);
- bot.show();
- bot.ownerCt.doLayout();
- XXV.BottomPreview = false;
+ switch(m.iconCls){
+ case 'preview-bottom':
+ right.hide();
+ bot.add(preview);
+ bot.show();
+ bot.ownerCt.doLayout();
+ XXV.BottomPreview = false;
XXV.RightPreview = true;
- //btn.setIconClass('preview-bottom');
- break;
- case 'preview-right':
- bot.hide();
- right.add(preview);
- right.show();
- right.ownerCt.doLayout();
- XXV.BottomPreview = true;
+ //btn.setIconClass('preview-bottom');
+ break;
+ case 'preview-right':
+ bot.hide();
+ right.add(preview);
+ right.show();
+ right.ownerCt.doLayout();
+ XXV.BottomPreview = true;
XXV.RightPreview = false;
- //btn.setIconClass('preview-right');
- break;
- case 'preview-hide':
- preview.ownerCt.hide();
- right.hide();
- bot.hide();
+ //btn.setIconClass('preview-right');
+ break;
+ case 'preview-hide':
+ preview.ownerCt.hide();
+ right.hide();
+ bot.hide();
preview.ownerCt.ownerCt.doLayout();
- XXV.BottomPreview = true;
+ XXV.BottomPreview = true;
XXV.RightPreview = true;
- //btn.setIconClass('preview-hide');
+ //btn.setIconClass('preview-hide');
break;
- }
+ }
}
}
if(Ext.state.Manager.getProvider()) {
Ext.state.Manager.set('preview-layout', m.iconCls);
- }
- }
+ }
+ }
}
-
+
,openNow : function(){
- var id = 'n';
- var tab;
+ var id = 'n';
+ var tab;
if(!(tab = this.getItem(id))){
tab = this.createTab(id);
} else {
@@ -134,8 +134,8 @@ Ext.extend(Ext.xxv.tabPanel, Ext.TabPanel, {
this.setActiveTab(tab);
}
,openProgram : function(data){
- var id = 'p';
- var tab;
+ var id = 'p';
+ var tab;
if(!(tab = this.getItem(id))){
tab = createProgramView(this,id,data);
} else {
@@ -144,35 +144,35 @@ Ext.extend(Ext.xxv.tabPanel, Ext.TabPanel, {
}
this.setActiveTab(tab);
}
- ,openSearch : function(lookup){
- var id = 's';
- var tab;
+ ,openSearch : function(lookup){
+ var id = 's';
+ var tab;
if(!(tab = this.getItem(id))){
- tab = createSearchView(this,id,lookup);
+ tab = createSearchView(this,id,lookup);
}else {
tab.LoadTitle();
this.gridSearch.loadSearch(lookup);
}
this.setActiveTab(tab);
}
- ,searchTab : function(record){
+ ,searchTab : function(record){
if(!record || !record.data) return;
- var d = record.data;
+ var d = record.data;
var Woerter = d.title.split("~");
var title = Woerter[0];
this.openSearch(title);
}
- ,Record : function(record){
+ ,Record : function(record){
if(!record || !record.data) return;
this.gridNow.Record(record);
}
- ,RecordID : function(id){
+ ,RecordID : function(id){
if(!id) return;
this.gridNow.RecordID(id);
}
,openTeleText : function(name, data){
- var id = 'vt';
- var tab;
+ var id = 'vt';
+ var tab;
if(!(tab = this.getItem(id))){
tab = createTeleTextView(this,id,name,data);
} else {
@@ -182,17 +182,17 @@ Ext.extend(Ext.xxv.tabPanel, Ext.TabPanel, {
this.setActiveTab(tab);
}
,openTab : function(id){
- var tab;
+ var tab;
if(!(tab = this.getItem(id))){
tab = this.createTab(id);
}
if(tab) {
this.setActiveTab(tab);
this.show();
- }
+ }
}
- ,createTab : function(id){
+ ,createTab : function(id){
switch(id){
case 'n': return createNowView(this,id);
case 'al': return createAutoTimerView(this,id);
@@ -200,11 +200,11 @@ Ext.extend(Ext.xxv.tabPanel, Ext.TabPanel, {
case 'rl': return createRecordingsView(this,id);
case 'chrl': return createChronicleView(this,id);
case 'mtl': return createMoveTimersView(this,id);
- case 'vl': return createVDRView(this,id);
+ case 'vl': return createVDRView(this,id);
case 'ul': return createUsersView(this,id);
case 'ml': return createMusicView(this,id);
}
return 0;
- }
+ }
});
diff --git a/skins/jason/teletext.js b/skins/jason/teletext.js
index 13dfb01..021900d 100644
--- a/skins/jason/teletext.js
+++ b/skins/jason/teletext.js
@@ -1,7 +1,7 @@
-/*
- * jason - Javascript based skin for xxv
- * Copyright(c) 2009, anbr
- *
+/*
+ * jason - Javascript based skin for xxv
+ * Copyright(c) 2009, anbr
+ *
* http://xxv.berlios.de/
*
* $Id$
@@ -15,33 +15,33 @@ Ext.xxv.TeleTextStore = function(name, channel) {
title: name
,baseParams:{cmd:'vt','channel':channel}
,autoLoad:{params:{start:0, limit:99}}
- ,reader: new Ext.xxv.jsonReader({
+ ,reader: new Ext.xxv.jsonReader({
fields: [
- {name: 'id', type: 'string'}
+ {name: 'id', type: 'string'}
,{name: 'page', type: 'string'}
,{name: 'subpage', type: 'string'}
- ,{name: 'channel', type: 'string'}
+ ,{name: 'channel', type: 'string'}
,{name: 'prev', type: 'string'}
,{name: 'next', type: 'string'}
,{name: 'mtime', type: 'string'}
,{name: 'content', type: 'string'}
]
})
- ,proxy : new Ext.data.HttpProxy({
- url: XXV.help.baseURL()
- ,method: 'POST'
+ ,proxy : new Ext.data.HttpProxy({
+ url: XXV.help.baseURL()
+ ,method: 'POST'
})
});
};
Ext.xxv.TeleTextView = function(viewer, store, config) {
this.viewer = viewer;
- Ext.apply(this, config);
+ Ext.apply(this, config);
this.store = store;
var tpl = new Ext.XTemplate(
'<tpl for=".">'
- ,'<div class="thumb-wrap" id="{id}">'
- ,'<div class="thumb">'
+ ,'<div class="thumb-wrap" id="{id}">'
+ ,'<div class="thumb">'
,'{content}'
,'</div>'
,'</div>'
@@ -70,20 +70,20 @@ Ext.xxv.TeleTextView = function(viewer, store, config) {
,overClass:'x-view-over'
,itemSelector:'div.thumb-wrap'
,loadMask:null
- ,listeners: {
+ ,listeners: {
'beforeselect' : {fn:function(view){ return view.store.getRange().length > 0; } }
- ,'selectionchange': {fn:this.doClick, scope:this, buffer:100}
+ ,'selectionchange': {fn:this.doClick, scope:this, buffer:100}
}
- ,plugins: [
+ ,plugins: [
this.filter
- ]
+ ]
}
);
this.store.on({
- 'beforeload' : this.onBeforeLoad
- ,'load' : this.onLoad
- ,'loadexception' : this.onLoadException
- ,scope:this
+ 'beforeload' : this.onBeforeLoad
+ ,'load' : this.onLoad
+ ,'loadexception' : this.onLoadException
+ ,scope:this
});
};
@@ -129,7 +129,7 @@ Ext.extend(Ext.xxv.TeleTextView, Ext.DataView, {
var node = Ext.fly(elem[j]);
node.on("click", function(e, ele){
e.stopEvent();
- this.loadpage(ele.id);
+ this.loadpage(ele.id);
},this);
}
}
@@ -151,9 +151,9 @@ Ext.extend(Ext.xxv.TeleTextView, Ext.DataView, {
tb.get('teletext-refresh').enable();
this.viewer.loadMask.hide();
}
- ,doClick : function(){
- var selNode = this.getSelectedNodes();
- if(selNode && selNode.length > 0){
+ ,doClick : function(){
+ var selNode = this.getSelectedNodes();
+ if(selNode && selNode.length > 0){
var page = this.store.getById(selNode[0].id);
if(page) {
var tb = this.ownerCt.getTopToolbar();
@@ -164,7 +164,7 @@ Ext.extend(Ext.xxv.TeleTextView, Ext.DataView, {
,reload : function(name, channel) {
this.store.title = name;
this.store.baseParams.channel = channel;
- this.moveFirst();
+ this.moveFirst();
}
,loadpage : function(page) {
var f = this.filter.field.getValue();
@@ -173,15 +173,15 @@ Ext.extend(Ext.xxv.TeleTextView, Ext.DataView, {
this.store.baseParams.cmd = 'vt';
}
if(page && page != 0)
- this.store.load({params:{'page':page, start:0, limit:99}});
- }
+ this.store.load({params:{'page':page, start:0, limit:99}});
+ }
,moveFirst : function() {
var f = this.filter.field.getValue();
if(f && f != '') {
this.filter.field.setValue('');
this.store.baseParams.cmd = 'vt';
}
- this.store.load({params:{start:0, limit:99}});
+ this.store.load({params:{start:0, limit:99}});
}
,movePrev : function() {
var node = this.getNode(0);
@@ -190,7 +190,7 @@ Ext.extend(Ext.xxv.TeleTextView, Ext.DataView, {
if(record) {
this.loadpage(record.data.prev);
}
- }
+ }
}
,moveNext : function() {
var node = this.getNode(0);
@@ -199,7 +199,7 @@ Ext.extend(Ext.xxv.TeleTextView, Ext.DataView, {
if(record) {
this.loadpage(record.data.next);
}
- }
+ }
}
,moveLast : function() {
@@ -213,7 +213,7 @@ Ext.extend(Ext.xxv.TeleTextView, Ext.DataView, {
return;
}
}
- moveFirst();
+ moveFirst();
}
,readPage : function(record){
var tb = this.ownerCt.getTopToolbar();
@@ -272,26 +272,26 @@ function createTeleTextView(viewer,id,name, channel) {
new Ext.xxv.TeleTextStore(name, channel),
{ id: 'teletext-view-page' });
- var tab = new Ext.xxv.Panel({
+ var tab = new Ext.xxv.Panel({
id: id
,iconCls:"teletext-icon"
- ,closable:true
+ ,closable:true
,border:false
- ,layout:'border'
+ ,layout:'border'
,stateful:true
,items:[ viewer.pageTeleText ]
,tbar:new Ext.Toolbar({
items: [
{
- id: 'teletext-first' ,iconCls: 'x-tbar-page-first'
- ,tooltip: Ext.PagingToolbar.prototype.firstText
- ,scope: viewer.pageTeleText ,disabled:true
- ,handler: viewer.pageTeleText.moveFirst
+ id: 'teletext-first' ,iconCls: 'x-tbar-page-first'
+ ,tooltip: Ext.PagingToolbar.prototype.firstText
+ ,scope: viewer.pageTeleText ,disabled:true
+ ,handler: viewer.pageTeleText.moveFirst
},{
- id: 'teletext-prev' ,iconCls: 'x-tbar-page-prev'
- ,tooltip: Ext.PagingToolbar.prototype.prevText
- ,scope: viewer.pageTeleText ,disabled:true
- ,handler: viewer.pageTeleText.movePrev
+ id: 'teletext-prev' ,iconCls: 'x-tbar-page-prev'
+ ,tooltip: Ext.PagingToolbar.prototype.prevText
+ ,scope: viewer.pageTeleText ,disabled:true
+ ,handler: viewer.pageTeleText.movePrev
},'-',{
xtype: 'tbtext', text: Ext.PagingToolbar.prototype.beforePageText
},{
@@ -310,26 +310,26 @@ function createTeleTextView(viewer,id,name, channel) {
}
},'-',{
id: 'teletext-next'
- ,iconCls: 'x-tbar-page-next'
- ,tooltip: Ext.PagingToolbar.prototype.nextText
- ,scope: viewer.pageTeleText ,disabled:true
- ,handler: viewer.pageTeleText.moveNext
+ ,iconCls: 'x-tbar-page-next'
+ ,tooltip: Ext.PagingToolbar.prototype.nextText
+ ,scope: viewer.pageTeleText ,disabled:true
+ ,handler: viewer.pageTeleText.moveNext
},{
id: 'teletext-last'
- ,iconCls: 'x-tbar-page-last'
- ,tooltip: Ext.PagingToolbar.prototype.lastText
- ,scope: viewer.pageTeleText ,disabled:true
- ,handler: viewer.pageTeleText.moveLast
+ ,iconCls: 'x-tbar-page-last'
+ ,tooltip: Ext.PagingToolbar.prototype.lastText
+ ,scope: viewer.pageTeleText ,disabled:true
+ ,handler: viewer.pageTeleText.moveLast
},'-',{
id: 'teletext-refresh'
- ,iconCls: 'x-tbar-loading'
- ,tooltip: Ext.PagingToolbar.prototype.refreshText
- ,scope: viewer.pageTeleText ,disabled:false
- ,handler: viewer.pageTeleText.retryPage
+ ,iconCls: 'x-tbar-loading'
+ ,tooltip: Ext.PagingToolbar.prototype.refreshText
+ ,scope: viewer.pageTeleText ,disabled:false
+ ,handler: viewer.pageTeleText.retryPage
},'->'
]
})
- });
+ });
viewer.add(tab);
return tab;
diff --git a/skins/jason/timers.js b/skins/jason/timers.js
index 1a62335..8cf4f7f 100644
--- a/skins/jason/timers.js
+++ b/skins/jason/timers.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-2010, anbr
+ *
* http://xxv.berlios.de/
*
* $Id$
@@ -13,17 +13,17 @@ Ext.xxv.timerStore = function() {
return new Ext.data.GroupingStore({
baseParams:{cmd:'tl'}
,autoLoad:{params:{start:0, limit:configuration.pageSize}}
- ,reader: new Ext.xxv.jsonReader({
- fields: [
+ ,reader: new Ext.xxv.jsonReader({
+ fields: [
{name: 'id', type: 'string'}
,{name: 'flags', type: 'int'}
- ,{name: 'channel', type: 'string'}
- ,{name: 'pos', type: 'string'}
- ,{name: 'day', type:'date', dateFormat:'timestamp'}
- ,{name: 'start', type: 'string'}
- ,{name: 'stop', type: 'string'}
- ,{name: 'title', type: 'string'}
- ,{name: 'priority', type: 'int'}
+ ,{name: 'channel', type: 'string'}
+ ,{name: 'pos', type: 'string'}
+ ,{name: 'day', type:'date', dateFormat:'timestamp'}
+ ,{name: 'start', type: 'string'}
+ ,{name: 'stop', type: 'string'}
+ ,{name: 'title', type: 'string'}
+ ,{name: 'priority', type: 'int'}
,{name: 'collision', type: 'string'}
,{name: 'eventid', type: 'int'}
,{name: 'autotimerid', type: 'int'}
@@ -33,9 +33,9 @@ Ext.xxv.timerStore = function() {
,{name: 'host', 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:'day', direction:'ASC'}
,groupField:'day'
@@ -56,9 +56,9 @@ Ext.extend(Ext.xxv.editingGroupingView, Ext.grid.GroupingView, {
scrollToTop : Ext.emptyFn
});
-Ext.xxv.timerGrid = function(viewer) {
+Ext.xxv.timerGrid = function(viewer) {
- this.viewer = viewer;
+ this.viewer = viewer;
this.preview = new Ext.xxv.timerPreview(viewer);
// create primary data store
@@ -68,32 +68,33 @@ Ext.xxv.timerGrid = function(viewer) {
// create the channels store
var channels = new Ext.xxv.storeChannels;
- // custom columns as plugins
- this.activeColumn = new Ext.grid.CheckColumn({
- header: this.szColActive
- ,dataIndex: 'flags'
+ // custom columns as plugins
+ this.activeColumn = new Ext.grid.CheckColumn({
+ header: this.szColActive
+ ,dataIndex: 'flags'
,width: 50
,bitmask: 1
,editable: false
- ,hidden: true
+ ,hidden: true
});
- this.vpsColumn = new Ext.grid.CheckColumn({
- header: this.szColPDC
- ,dataIndex: 'flags'
+ this.vpsColumn = new Ext.grid.CheckColumn({
+ header: this.szColPDC
+ ,dataIndex: 'flags'
,width: 50
- ,bitmask: 4
+ ,bitmask: 4
,editable: false
- ,hidden: false
+ ,hidden: false
});
- this.ChannelsCombo = new Ext.xxv.ChannelsCombo({ header: this.szColChannel,
- dataIndex: 'pos',
+ this.ChannelsCombo = new Ext.xxv.ChannelsCombo({
+ header: this.szColChannel,
+ dataIndex: 'pos',
width: 200,
store: channels,
- editor: new Ext.form.ComboBox({
+ editor: new Ext.form.ComboBox({
tpl: new Ext.XTemplate('<tpl for=".">',
'<tpl if="this.isNewGroup(grpname)"><div class="x-combo-list-hd">{grpname}</div></tpl>',
- '<div class="x-combo-list-item">{name}</div>',
+ '<div class="x-combo-list-item">{name}</div>',
'</tpl>', {
isNewGroup: function(grpname){
if(!this.lastgroups || grpname != this.lastgroups) { this.lastgroups = grpname; return 1; }
@@ -102,54 +103,55 @@ Ext.xxv.timerGrid = function(viewer) {
}),
store: channels,
displayField:'name',
- valueField:'position',
- triggerAction: 'all', lazyRender:true,
+ valueField:'position',
+ triggerAction: 'all',
+ lazyRender:true,
listClass: 'x-combo-list-small',
mode: 'remote',
emptyText:this.szSelChEmptyText,
selectOnFocus:true,
- editable: false
+ editable: false
})
}
);
this.columns = [
{
- id:'expand'
- ,header: this.szColTitle
- ,dataIndex: 'title'
+ id:'expand'
+ ,header: this.szColTitle
+ ,dataIndex: 'title'
,width: 250
- ,renderer: this.formatTitle
+ ,renderer: this.formatTitle
},
- this.activeColumn,
+ this.activeColumn,
this.vpsColumn,
- this.ChannelsCombo,
- {
- header: this.szColDay
- ,dataIndex: 'day'
- ,width: 50
- ,renderer: Ext.util.Format.dateRenderer(this.szColDayFormat)
+ this.ChannelsCombo,
+ {
+ header: this.szColDay
+ ,dataIndex: 'day'
+ ,width: 50
+ ,renderer: Ext.util.Format.dateRenderer(this.szColDayFormat)
,hidden: true
- },{
- header: this.szColStart
- ,dataIndex: 'start'
+ },{
+ header: this.szColStart
+ ,dataIndex: 'start'
,width: 50
- },{
- header: this.szColStop
- ,dataIndex: 'stop'
- ,width: 50
- },{
- header: this.szColDuration
- ,dataIndex: 'duration'
+ },{
+ header: this.szColStop
+ ,dataIndex: 'stop'
,width: 50
- ,renderer: this.formatDuration
- },{
- header: this.szHost
- ,dataIndex: 'host'
- ,width: 190
- ,hidden: true
- }
- ];
+ },{
+ header: this.szColDuration
+ ,dataIndex: 'duration'
+ ,width: 50
+ ,renderer: this.formatDuration
+ },{
+ header: this.szHost
+ ,dataIndex: 'host'
+ ,width: 190
+ ,hidden: true
+ }
+ ];
var cm = new Ext.grid.ColumnModel(this.columns);
cm.defaultSortable = false;
this.filter = new Ext.ux.grid.Search({
@@ -163,43 +165,45 @@ Ext.xxv.timerGrid = function(viewer) {
}
});
- Ext.xxv.timerGrid.superclass.constructor.call(this, {
- region: 'center'
- ,id: 'timer-view-grid'
+ Ext.xxv.timerGrid.superclass.constructor.call(this, {
+ region: 'center'
+ ,id: 'timer-view-grid'
,loadMask: false
- ,plugins:[this.activeColumn,this.vpsColumn,this.ChannelsCombo]
+ ,plugins:[this.activeColumn,this.vpsColumn,this.ChannelsCombo]
,clicksToEdit:1
,autoExpandColumn:'expand'
,cm: cm
- ,sm: new Ext.grid.RowSelectionModel({
- singleSelect:false
- })
- ,view: new Ext.xxv.editingGroupingView({
+ ,sm: new Ext.grid.RowSelectionModel({
+ singleSelect:false
+ })
+ ,view: new Ext.xxv.editingGroupingView({
enableGroupingMenu:false,
- showGroupName: false
+ forceFit:true,
+ showGroupName: false,
+ enableGrouping:true
})
,tbar:new Ext.PagingToolbar({
pageSize: this.store.autoLoad.params.limit
,store: this.store
,displayInfo: true
,items: [
- {
- id:'tn'
- ,iconCls: 'timer-new-icon'
- ,tooltip: this.szNew
- ,scope: this
- ,disabled:false
- ,handler: function(){ this.EditItem(null); }
+ {
+ id:'tn'
+ ,iconCls: 'timer-new-icon'
+ ,tooltip: this.szNew
+ ,scope: this
+ ,disabled:false
+ ,handler: function(){ this.EditItem(null); }
}
]})
,plugins:[this.filter]
});
- this.store.on({
+ this.store.on({
'load' : this.onLoad
- ,'beforeload' : this.onBeforeLoad
- ,'loadexception' : this.onLoadException
- ,scope:this
+ ,'beforeload' : this.onBeforeLoad
+ ,'loadexception' : this.onLoadException
+ ,scope:this
});
this.on('rowcontextmenu', this.onContextClick, this);
this.on('rowdblclick', this.onEditItem, this);
@@ -217,14 +221,14 @@ Ext.extend(Ext.xxv.timerGrid, Ext.grid.GridPanel, { // Ext.grid.EditorGridPanel
,szColTitle : "Title"
,szColActive : "Active"
,szColPDC : "PDC"
- ,szColDay : "Day"
+ ,szColDay : "Day"
,szColChannel : "Channel"
- ,szColStart : "Start"
+ ,szColStart : "Start"
,szColStop : "Stop"
,szColDuration : "Duration"
,szHost : "Host"
,szColDayFormat : "l, m/d/Y"
- ,szSelChEmptyText: "Select a channel..."
+ ,szSelChEmptyText: "Select a channel..."
,szLoadException : "Couldn't get data about timer!\r\n{0}"
,szDeleteSuccess : "Timer deleted successful.\r\n{0}"
,szDeleteFailure : "Couldn't delete timer!\r\n{0}"
@@ -249,82 +253,82 @@ Ext.extend(Ext.xxv.timerGrid, Ext.grid.GridPanel, { // Ext.grid.EditorGridPanel
if(this.dataDirty)
this.store.reload();
}
- ,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:'te'
- ,text: this.szEdit
- ,iconCls: 'edit-icon'
+ ,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:'te'
+ ,text: this.szEdit
+ ,iconCls: 'edit-icon'
,scope:this
- ,disabled: true
+ ,disabled: true
,handler: function() { this.EditItem(this.ctxRecord); }
- },{
- itemId:'tt'
- ,text: this.szToggle
- ,iconCls: 'timer-toggle-icon'
+ },{
+ itemId:'tt'
+ ,text: this.szToggle
+ ,iconCls: 'timer-toggle-icon'
,scope:this
- ,disabled: true
+ ,disabled: true
,handler: function() { this.ToggleItem(this.ctxRecord); }
- },{
- itemId:'td'
- ,text: this.szDelete
- ,iconCls: 'timer-delete-icon'
+ },{
+ itemId:'td'
+ ,text: this.szDelete
+ ,iconCls: 'timer-delete-icon'
,scope:this
- ,disabled: true
+ ,disabled: true
,handler: function() { this.DeleteItem(this.ctxRecord); }
- },'-',{
- itemId:'ae'
- ,text: Ext.xxv.autotimerGrid.prototype.szEdit
- ,iconCls: 'autotimer-icon'
+ },'-',{
+ itemId:'ae'
+ ,text: Ext.xxv.autotimerGrid.prototype.szEdit
+ ,iconCls: 'autotimer-icon'
,scope:this
- ,disabled: true
+ ,disabled: true
,handler: function() { this.EditAutoTimerItem(this.ctxRecord); }
- },{
- itemId:'s'
- ,text: this.szFindReRun
- ,iconCls: 'find-icon'
+ },{
+ itemId:'s'
+ ,text: this.szFindReRun
+ ,iconCls: 'find-icon'
,scope:this
- ,disabled: true
+ ,disabled: true
,handler: function(){ this.viewer.searchTab(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);
+ ]
+ });
+ 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 hasAutotimer = (this.ctxRecord.data.autotimerid <= 0) ? 0 : 1;
- var items = this.menu.items;
+ var items = this.menu.items;
if(items) { items.eachKey(function(key, f) {
if(f.itemId == 'ae') { if(hasAutotimer) f.show(); else f.hide(); };
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) {
+ ,formatTitle: function(value, p, record) {
var Woerter = value.split("~");
var title = Woerter[0];
var subtitle = '';
@@ -343,25 +347,25 @@ Ext.extend(Ext.xxv.timerGrid, Ext.grid.GridPanel, { // Ext.grid.EditorGridPanel
style = " running";
}
if(subtitle) {
- return String.format(
- '<div class="topic{2}"><b>{0}</b> <span class="subtitle{2}">{1}</span></div>',
- title, subtitle, style
+ return String.format(
+ '<div class="topic{2}"><b>{0}</b> <span class="subtitle{2}">{1}</span></div>',
+ title, subtitle, style
);
- }
- return String.format(
- '<div class="topic{1}"><b>{0}</b></div>',
- title, style
+ }
+ return String.format(
+ '<div class="topic{1}"><b>{0}</b></div>',
+ title, style
);
}
,formatDuration: function(value, p, record) {
return new Date(minTime().getTime()+(value * 1000)).dateFormat('H:i');
- }
+ }
/******************************************************************************/
,onToggleSuccess : function( response,options )
{
this.viewer.loadMask.hide();
- var o = eval("("+response.responseText+")");
+ var o = eval("("+response.responseText+")");
if(o && o.data && typeof(o.data) == 'object'
&& o.param && o.param.state && o.param.state == 'success' ) {
@@ -403,7 +407,7 @@ Ext.extend(Ext.xxv.timerGrid, Ext.grid.GridPanel, { // Ext.grid.EditorGridPanel
}
,ToggleItem : function( record ) {
- this.stopEditing();
+ this.stopEditing();
this.viewer.loadMask.show();
var gsm = this.getSelectionModel();
@@ -432,7 +436,7 @@ Ext.extend(Ext.xxv.timerGrid, Ext.grid.GridPanel, { // Ext.grid.EditorGridPanel
{
this.viewer.loadMask.hide();
- var o = eval("("+response.responseText+")");
+ var o = eval("("+response.responseText+")");
if(o && o.data && typeof(o.data) == 'string'
&& o.success) {
@@ -468,7 +472,7 @@ Ext.extend(Ext.xxv.timerGrid, Ext.grid.GridPanel, { // Ext.grid.EditorGridPanel
}
,DeleteItem : function( record ) {
- this.stopEditing();
+ this.stopEditing();
this.viewer.loadMask.show();
var gsm = this.getSelectionModel();
@@ -496,7 +500,7 @@ Ext.extend(Ext.xxv.timerGrid, Ext.grid.GridPanel, { // Ext.grid.EditorGridPanel
this.stopEditing();
var item;
- if(record != null) {
+ if(record != null) {
var gsmTimer = this.getSelectionModel();
gsmTimer.selectRecords([record]);
@@ -514,16 +518,16 @@ Ext.extend(Ext.xxv.timerGrid, Ext.grid.GridPanel, { // 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);
}
@@ -531,7 +535,7 @@ Ext.extend(Ext.xxv.timerGrid, Ext.grid.GridPanel, { // Ext.grid.EditorGridPanel
this.stopEditing();
var item;
- if(record != null) {
+ if(record != null) {
var gsmTimer = this.getSelectionModel();
gsmTimer.selectRecords([record]);
@@ -545,9 +549,9 @@ Ext.extend(Ext.xxv.timerGrid, Ext.grid.GridPanel, { // 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);
}
,select : function(sm, index, record){
this.preview.select(record, this.filter.getValue());
@@ -556,42 +560,42 @@ Ext.extend(Ext.xxv.timerGrid, Ext.grid.GridPanel, { // Ext.grid.EditorGridPanel
Ext.xxv.timerPreview = function(viewer) {
this.viewer = viewer;
- Ext.xxv.timerPreview.superclass.constructor.call(this, {
- id: 'preview-timer',
- region: 'south',
- cls:'preview',
- autoScroll: true,
- stateful:false,
+ Ext.xxv.timerPreview.superclass.constructor.call(this, {
+ id: 'preview-timer',
+ region: 'south',
+ cls:'preview',
+ autoScroll: true,
+ stateful:false,
tbar: [
- {
- id:'s'
- ,iconCls: 'find-icon'
- ,tooltip: this.szFindReRun
- ,scope: viewer
- ,disabled:true
- ,handler: function(){ this.searchTab(this.gridTimer.getSelectionModel().getSelected()); }
- },{
- id:'te'
- ,iconCls: 'edit-icon'
- ,tooltip: this.szEdit
- ,scope: viewer
- ,disabled:true
- ,handler: function(){ this.gridTimer.EditItem(this.gridTimer.getSelectionModel().getSelected()); }
- },{
- id:'ae'
- ,iconCls: 'autotimer-icon'
- ,tooltip: Ext.xxv.autotimerGrid.prototype.szEdit
- ,scope: viewer
- ,disabled:true
- ,handler: function(){ this.gridTimer.EditAutoTimerItem(this.gridTimer.getSelectionModel().getSelected()); }
- },{
- id:'td'
- ,iconCls: 'timer-delete-icon'
- ,tooltip: this.szDelete
- ,scope: viewer
- ,disabled:true
- ,handler: function(){ this.gridTimer.DeleteItem(this.gridTimer.getSelectionModel().getSelected()); }
- } ]
+ {
+ id:'s'
+ ,iconCls: 'find-icon'
+ ,tooltip: this.szFindReRun
+ ,scope: viewer
+ ,disabled:true
+ ,handler: function(){ this.searchTab(this.gridTimer.getSelectionModel().getSelected()); }
+ },{
+ id:'te'
+ ,iconCls: 'edit-icon'
+ ,tooltip: this.szEdit
+ ,scope: viewer
+ ,disabled:true
+ ,handler: function(){ this.gridTimer.EditItem(this.gridTimer.getSelectionModel().getSelected()); }
+ },{
+ id:'ae'
+ ,iconCls: 'autotimer-icon'
+ ,tooltip: Ext.xxv.autotimerGrid.prototype.szEdit
+ ,scope: viewer
+ ,disabled:true
+ ,handler: function(){ this.gridTimer.EditAutoTimerItem(this.gridTimer.getSelectionModel().getSelected()); }
+ },{
+ id:'td'
+ ,iconCls: 'timer-delete-icon'
+ ,tooltip: this.szDelete
+ ,scope: viewer
+ ,disabled:true
+ ,handler: function(){ this.gridTimer.DeleteItem(this.gridTimer.getSelectionModel().getSelected()); }
+ } ]
});
};
@@ -600,27 +604,27 @@ Ext.extend(Ext.xxv.timerPreview, Ext.Panel, {
,szEdit : "Edit"
,szDelete : "Delete"
,select : function(record, lookup){
- if(this.body)
+ if(this.body)
XXV.getTemplate().overwrite(this.body, record.data);
if(lookup)
highlightText(this.body.dom,lookup,'x-highlight',1);
var hasAutotimer = (record.data.autotimerid <= 0) ? 0 : 1;
// Enable all toolbar buttons
- var items = this.topToolbar.items;
+ var items = this.topToolbar.items;
if(items) {
items.eachKey(function(key, f) {
if(f.id == 'ae') { if(hasAutotimer) f.show(); else f.hide(); };
if(XXV.help.cmdAllowed(key)) f.enable();
},items);
}
- }
+ }
,clear: function(){
- if(this) {
+ if(this) {
if(this.body)
- this.body.update('');
+ this.body.update('');
// Disable all items
- var items = this.topToolbar.items;
+ var items = this.topToolbar.items;
if(items) { items.eachKey(function(key, f){f.disable();},items); }
}
}
@@ -630,42 +634,42 @@ function createTimerView(viewer,id) {
viewer.gridTimer = new Ext.xxv.timerGrid(viewer);
- tab = new Ext.xxv.Panel({
+ tab = new Ext.xxv.Panel({
id: id,
iconCls:"timer-icon",
- closable:true,
- autoScroll:true,
+ closable:true,
+ autoScroll:true,
border:false,
- layout:'border',
- stateful:true,
- items:[
+ layout:'border',
+ stateful:true,
+ items:[
viewer.gridTimer,
- {
- id:'timer-bottom-preview',
- layout:'fit',
- items:XXV.BottomPreview ? 0 : viewer.gridTimer.preview,
- height: 250,
- split: true,
- border:false,
- region:'south',
- hidden:XXV.BottomPreview
- }, {
- id:'timer-right-preview',
- layout:'fit',
- items:XXV.RightPreview ? 0 : viewer.gridTimer.preview,
- border:false,
- region:'east',
- width:350,
- split: true,
- hidden:XXV.RightPreview
+ {
+ id:'timer-bottom-preview',
+ layout:'fit',
+ items:XXV.BottomPreview ? 0 : viewer.gridTimer.preview,
+ height: 250,
+ split: true,
+ border:false,
+ region:'south',
+ hidden:XXV.BottomPreview
+ }, {
+ id:'timer-right-preview',
+ layout:'fit',
+ items:XXV.RightPreview ? 0 : viewer.gridTimer.preview,
+ border:false,
+ region:'east',
+ width:350,
+ split: true,
+ hidden:XXV.RightPreview
}
- ]
+ ]
,listeners: {
activate: function(p){
viewer.gridTimer.refreshPanel(p);
}
}
- });
+ });
viewer.add(tab);
return tab;
diff --git a/skins/jason/users.js b/skins/jason/users.js
index 069388e..57ceec9 100644
--- a/skins/jason/users.js
+++ b/skins/jason/users.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,89 +13,89 @@ Ext.xxv.usersStore = function() {
return new Ext.data.Store({
baseParams:{cmd:'ul'}
,autoLoad:{params:{start:0, limit:configuration.pageSize}}
- ,reader: new Ext.xxv.jsonReader({
- fields: [
+ ,reader: new Ext.xxv.jsonReader({
+ fields: [
{name: 'id', type: 'int'},
{name: 'title', type: 'string'},
{name: 'level', type: 'string'},
{name: 'preferences', type: 'string'},
- {name: 'userpreferences', type: 'string'}
+ {name: 'userpreferences', 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:'title', direction:'ASC'}
});
};
-Ext.xxv.usersGrid = function(viewer) {
- this.viewer = viewer;
- //Ext.apply(this, {}); // Apply config
+Ext.xxv.usersGrid = function(viewer) {
+ this.viewer = viewer;
+ //Ext.apply(this, {}); // Apply config
// create the data store
this.store = new Ext.xxv.usersStore();
this.store.setDefaultSort('title', "ASC");
this.columns = [
- {
- header: this.szColTitle
- ,dataIndex: 'title'
+ {
+ header: this.szColTitle
+ ,dataIndex: 'title'
,width: 200
},
- { header: this.szColLevel
- ,dataIndex: 'level'
+ { header: this.szColLevel
+ ,dataIndex: 'level'
,width: 200
},
- { header: this.szUserPreferences
- ,dataIndex: 'userpreferences'
+ { header: this.szUserPreferences
+ ,dataIndex: 'userpreferences'
,width: 400
,hidden: true
},
- { header: this.szAdminPreferences
- ,dataIndex: 'preferences'
+ { header: this.szAdminPreferences
+ ,dataIndex: 'preferences'
,width: 400
,hidden: true
}
- ];
+ ];
var cm = new Ext.grid.ColumnModel(this.columns);
cm.defaultSortable = true;
- Ext.xxv.usersGrid.superclass.constructor.call(this, {
- region: 'center'
- ,id: 'users-view-grid'
+ Ext.xxv.usersGrid.superclass.constructor.call(this, {
+ region: 'center'
+ ,id: 'users-view-grid'
,loadMask: true
,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:'un'
- ,iconCls: 'new-icon'
- ,tooltip: this.szNew
- ,scope: this
- ,disabled:false
- ,handler: function(){ this.EditItem(null); }
+ {
+ id:'un'
+ ,iconCls: 'new-icon'
+ ,tooltip: 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.usersGrid, Ext.grid.EditorGridPanel, {
@@ -121,64 +121,64 @@ Ext.extend(Ext.xxv.usersGrid, 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:'ue'
- ,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:'ue'
+ ,text: this.szEdit
+ ,iconCls: 'edit-icon'
+ ,scope:this
,disabled: true
,handler: function() { this.EditItem(this.ctxRecord); }
- },{
- itemId:'ud'
- ,text: this.szDelete
- ,iconCls: 'delete-icon'
- ,scope:this
+ },{
+ itemId:'ud'
+ ,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');
+ ]
+ });
+ 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;
+ 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;
- }
+ }
}
/******************************************************************************/
,onDeleteSuccess : function( response,options )
{
this.loadMask.hide();
- var o = eval("("+response.responseText+")");
+ var o = eval("("+response.responseText+")");
if(o && o.data && typeof(o.data) == 'string'
&& o.success) {
@@ -214,7 +214,7 @@ Ext.extend(Ext.xxv.usersGrid, Ext.grid.EditorGridPanel, {
}
,DeleteItem : function( record ) {
- this.stopEditing();
+ this.stopEditing();
this.loadMask.show();
var gsm = this.getSelectionModel();
@@ -244,7 +244,7 @@ Ext.extend(Ext.xxv.usersGrid, Ext.grid.EditorGridPanel, {
this.stopEditing();
var item;
- if(record != null) {
+ if(record != null) {
var gsmTimer = this.getSelectionModel();
gsmTimer.selectRecords([record]);
@@ -262,36 +262,36 @@ Ext.extend(Ext.xxv.usersGrid, 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 createUsersView(viewer,id) {
viewer.gridusers = new Ext.xxv.usersGrid(viewer);
- tab = new Ext.xxv.Panel({
+ tab = new Ext.xxv.Panel({
id: id,
iconCls:"users-icon",
- closable:true,
+ closable:true,
border:false,
layout:'border',
- stateful:true,
- items:[
+ stateful:true,
+ items:[
viewer.gridusers
- ]
- });
+ ]
+ });
viewer.add(tab);
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);