]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
webui: Fixes in webui/static scripts for Internet Explorer
authorMikael Karlsson <karlsson.rm@gmail.com>
Thu, 6 Nov 2014 14:55:12 +0000 (15:55 +0100)
committerJaroslav Kysela <perex@perex.cz>
Fri, 7 Nov 2014 14:54:52 +0000 (15:54 +0100)
13 files changed:
src/webui/static/app/acleditor.js
src/webui/static/app/caclient.js
src/webui/static/app/config.js
src/webui/static/app/cteditor.js
src/webui/static/app/dvr.js
src/webui/static/app/epg.js
src/webui/static/app/epggrab.js
src/webui/static/app/esfilter.js
src/webui/static/app/idnode.js
src/webui/static/app/mpegts.js
src/webui/static/app/status.js
src/webui/static/app/tvheadend.js
src/webui/static/tv.js

index 672f5aff19aff260f250049ccadd5621e5753328..a16cb2b245bff5df6355298a5578169f1b9871f7 100644 (file)
@@ -26,18 +26,18 @@ tvheadend.acleditor = function(panel, index)
             admin:         { width: 100 },
             conn_limit:    { width: 160 },
             channel_min:   { width: 160 },
-            channel_max:   { width: 160 },
+            channel_max:   { width: 160 }
         },
         tabIndex: index,
         edit: {
             params: {
-                list: list,
-            },
+                list: list
+            }
         },
         add: {
             url: 'api/access/entry',
             params: {
-                list: list,
+                list: list
             },
             create: { }
         },
@@ -46,6 +46,6 @@ tvheadend.acleditor = function(panel, index)
         list: list,
         help: function() {
             new tvheadend.help('Access Control Entries', 'config_access.html');
-        },
+        }
     });
 };
index f605e91c02d95a22995f42e75c383cb1a6bf81f5..adef2563701d0d8d8c593e02974685b4b77ab330 100644 (file)
@@ -51,7 +51,7 @@ tvheadend.caclient = function(panel, index) {
                 propField: 'props',
                 list: list
             },
-            create: { },
+            create: { }
         },
         del: true,
         move: true,
@@ -60,7 +60,7 @@ tvheadend.caclient = function(panel, index) {
         plugins: [actions],
         help: function() {
             new tvheadend.help('Conditional Access Client', 'config_caclient.html');
-        },
+        }
     });
 
     return panel;
index 3ba0bb4bf3688b15d3c5b3b3477d3b34c69d62e0..4469a0ce8f3247be19eaa9df7b1fa54341bd62a7 100644 (file)
@@ -135,7 +135,7 @@ tvheadend.miscconf = function(panel, index) {
 
     var preferPicon = new Ext.ux.form.XCheckbox({
         name: 'prefer_picon',
-        fieldLabel: 'Prefer picons over channel name',
+        fieldLabel: 'Prefer picons over channel name'
     });
 
     var chiconPath = new Ext.form.TextField({
index 9a81a91bde92cc8c6a0a6b18e61cca107c2da320..79e2e96a8d6818014dfd4ed890e389fd887e2958 100644 (file)
@@ -22,7 +22,7 @@ tvheadend.cteditor = function(panel, index)
         },
         help: function() {
             new tvheadend.help('Channel Tags', 'config_tags.html');
-        },
+        }
     });
 
     return panel;
index dd0a3e287805139e8dd934782f4a8824c7323a9c..83aeed7e5fbb16a6bcaffb1ba614224b51b9f475 100644 (file)
@@ -43,7 +43,7 @@ tvheadend.dvrDetails = function(uuid) {
         url: 'api/idnode/load',
         params: {
             uuid: uuid,
-            list: 'channel_icon,disp_title,disp_description,status',
+            list: 'channel_icon,disp_title,disp_description,status'
         },
         success: function(d) {
             d = json_decode(d);
@@ -120,7 +120,7 @@ tvheadend.dvr_upcoming = function(panel, index) {
                 tooltip: 'Abort the selected recording',
                 iconCls: 'cancel',
                 text: 'Abort',
-                disabled: true,
+                disabled: true
             });
         },
         callback: function(conf, e, store, select) {
@@ -167,13 +167,13 @@ tvheadend.dvr_upcoming = function(panel, index) {
         add: {
             url: 'api/dvr/entry',
             params: {
-               list: list,
+               list: list
             },
             create: { }
         },
         edit: {
             params: {
-                list: list,
+                list: list
             }
         },
         del: true,
@@ -191,7 +191,7 @@ tvheadend.dvr_upcoming = function(panel, index) {
         beforeedit: beforeedit,
         help: function() {
             new tvheadend.help('DVR-Upcoming/Current Recordings', 'dvr_upcoming.html');
-        },
+        }
     });
 
     return panel;
@@ -273,7 +273,7 @@ tvheadend.dvr_finished = function(panel, index) {
         selected: selected,
         help: function() {
             new tvheadend.help('DVR-Finished Recordings', 'dvr_finished.html');
-        },
+        }
     });
 
     return panel;
@@ -356,7 +356,7 @@ tvheadend.dvr_failed = function(panel, index) {
         selected: selected,
         help: function() {
             new tvheadend.help('DVR-Failed Recordings', 'dvr_failed.html');
-        },
+        }
     });
 
     return panel;
@@ -382,7 +382,7 @@ tvheadend.dvr_settings = function(panel, index) {
         del: true,
         help: function() {
             new tvheadend.help('DVR', 'config_dvr.html');
-        },
+        }
     });
 
     return panel;
@@ -414,13 +414,13 @@ tvheadend.autorec_editor = function(panel, index) {
             pri:          { width: 80 },
             config_name:  { width: 120 },
             creator:      { width: 200 },
-            comment:      { width: 200 },
+            comment:      { width: 200 }
         },
         add: {
             url: 'api/dvr/autorec',
             params: {
                list: 'enabled,name,title,channel,tag,content_type,minduration,' +
-                     'maxduration,weekdays,start,pri,config_name,comment',
+                     'maxduration,weekdays,start,pri,config_name,comment'
             },
             create: { }
         },
@@ -438,7 +438,7 @@ tvheadend.autorec_editor = function(panel, index) {
         },
         help: function() {
             new tvheadend.help('DVR', 'dvr_autorec.html');
-        },
+        }
     });
 
     return panel;
@@ -467,12 +467,12 @@ tvheadend.timerec_editor = function(panel, index) {
             pri:          { width: 80 },
             config_name:  { width: 120 },
             creator:      { width: 200 },
-            comment:      { width: 200 },
+            comment:      { width: 200 }
         },
         add: {
             url: 'api/dvr/timerec',
             params: {
-               list: 'enabled,name,title,channel,weekdays,start,stop,pri,config_name,comment',
+               list: 'enabled,name,title,channel,weekdays,start,stop,pri,config_name,comment'
             },
             create: { }
         },
@@ -489,7 +489,7 @@ tvheadend.timerec_editor = function(panel, index) {
         },
         help: function() {
             new tvheadend.help('DVR', 'dvr_timerec.html');
-        },
+        }
     });
 
     return panel;
@@ -505,7 +505,7 @@ tvheadend.dvr = function(panel, index) {
         autoScroll: true,
         title: 'Digital Video Recorder',
         iconCls: 'dvr',
-        items: [],
+        items: []
     });
     tvheadend.dvr_upcoming(p, 0);
     tvheadend.dvr_finished(p, 1);
index 91d398e1acbb9d59b3348640e00dc7ad2ce2f1d5..05a01e5288ceb9efa65f3ddee5a1f94acc6f0fde 100644 (file)
@@ -135,7 +135,7 @@ tvheadend.epgDetails = function(event) {
             id: 'key',
             url: 'api/idnode/load',
             baseParams: {
-                enum: 1,
+                'enum': 1,
                 'class': 'dvrconfig'
             },
             sortInfo: {
@@ -277,7 +277,7 @@ tvheadend.epg = function() {
         reader: new Ext.ux.grid.livegrid.JsonReader({
             root: 'entries',
             totalProperty: 'totalCount',
-            id: 'eventId',
+            id: 'eventId'
         },
         [
             { name: 'eventId' },
@@ -304,8 +304,8 @@ tvheadend.epg = function() {
             { name: 'ageRating' },
             { name: 'genre' },
             { name: 'dvrState' },
-            { name: 'serieslinkId' },
-        ]),
+            { name: 'serieslinkId' }
+        ])
     });
 
     function setMetaAttr(meta, record, cursor) {
@@ -405,7 +405,7 @@ tvheadend.epg = function() {
                     setMetaAttr(meta, record, value && clickable);
                     return !value ? '' : (clickable ? lookup : '') + value;
                 },
-                listeners: { click: { fn: clicked } },
+                listeners: { click: { fn: clicked } }
             },
             {
                 width: 250,
@@ -461,7 +461,7 @@ tvheadend.epg = function() {
                     setMetaAttr(meta, record, value && clickable);
                     return !value ? '' : (clickable ? lookup : '') + value;
                 },
-                listeners: { click: { fn: clicked } },
+                listeners: { click: { fn: clicked } }
             },
             {
                 width: 50,
@@ -497,7 +497,7 @@ tvheadend.epg = function() {
                     if (r.length < 1) return "";
                     return (clickable ? lookup : '') + r.join(',');
                 },
-                listeners: { click: { fn: clicked } },
+                listeners: { click: { fn: clicked } }
             }
         ]
     });
@@ -888,7 +888,7 @@ tvheadend.epg = function() {
         /* Really do it */
         var conf = {
           enabled: 1,
-          comment: 'Created from EPG query',
+          comment: 'Created from EPG query'
         };
         if (params.title) conf.title = params.title;
         if (params.channel) conf.channel = params.channel;
index 268332acac86b008552a5638d8ddb06da05faa5d..2cf8090c14ba13b8042ce738f5bfc5a1f1508a9e 100644 (file)
@@ -96,7 +96,7 @@ tvheadend.epggrab = function(panel, index) {
     var internalCron = new Ext.form.TextArea({
         fieldLabel: 'Cron multi-line',
         name: 'cron',
-        width: 300,
+        width: 300
     });
 
     /*
@@ -263,7 +263,7 @@ tvheadend.epggrab = function(panel, index) {
     var otaCron = new Ext.form.TextArea({
         fieldLabel: 'Over-the-air Cron multi-line',
         name: 'ota_cron',
-        width: 300,
+        width: 300
     });
 
     var otaTimeout = new Ext.form.NumberField({
index 68e770455f04e99a453572c4b57e9da8e7661c22..515500962c25677142ad1bc7d9cc515dbce2ed5e 100644 (file)
@@ -34,9 +34,9 @@ tvheadend.esfilter_tab = function(panel)
                 displayField: 'caption',
                 valueField: 'class',
                 propField: 'props',
-                list: list,
+                list: list
             },
-            create: { },
+            create: { }
         },
         del: true,
         help: function() {
index 0b0c292b268fee7ff5194132cc0cd11d477e7c39..b03b7353cc59d5ca03688f0146e317b721b9bff2 100644 (file)
@@ -71,24 +71,24 @@ tvheadend.idnode_enum_store = function(f)
     var store = null;
 
     /* API fetch */
-    if (f.enum.type === 'api') {
+    if (f['enum'].type === 'api') {
         return tvheadend.idnode_get_enum({
-            url: 'api/' + f.enum.uri,
-            params: f.enum.params,
-            event: f.enum.event
+            url: 'api/' + f['enum'].uri,
+            params: f['enum'].params,
+            event: f['enum'].event
         });
     }
 
     switch (f.type) {
         case 'str':
-            if (f.enum.length > 0 && f.enum[0] instanceof Object)
+            if (f['enum'].length > 0 && f['enum'][0] instanceof Object)
                 store = new Ext.data.JsonStore({
                     id: 'key',
                     fields: ['key', 'val'],
-                    data: f.enum
+                    data: f['enum']
                 });
             else
-                store = f.enum;
+                store = f['enum'];
             break;
         case 'int':
         case 'u32':
@@ -97,12 +97,12 @@ tvheadend.idnode_enum_store = function(f)
         case 'dbl':
         case 'time':
             var data = null;
-            if (f.enum.length > 0 && f.enum[0] instanceof Object) {
-                data = f.enum;
+            if (f['enum'].length > 0 && f['enum'][0] instanceof Object) {
+                data = f['enum'];
             } else {
                 data = [];
-                for (i = 0; i < f.enum.length; i++)
-                    data.push({key: i, val: f.enum[i]});
+                for (i = 0; i < f['enum'].length; i++)
+                    data.push({key: i, val: f['enum'][i]});
             }
             store = new Ext.data.JsonStore({
                 id: 'key',
@@ -196,9 +196,9 @@ tvheadend.IdNodeField = function(conf)
     this.intsplit = conf.intsplit;
     this.hexa = conf.hexa;
     this.group = conf.group;
-    this.enum = conf.enum;
+    this['enum'] = conf['enum'];
     this.store = null;
-    if (this.enum)
+    if (this['enum'])
         this.store = tvheadend.idnode_enum_store(this);
     this.ordered = false;
 
@@ -242,7 +242,7 @@ tvheadend.IdNodeField = function(conf)
             ftype = 'boolean';
             w = 60;
         }
-        if (this.enum || this.list)
+        if (this['enum'] || this.list)
             w = 300;
 
         var props = {
@@ -344,7 +344,7 @@ tvheadend.IdNodeField = function(conf)
         };
         
         /* ComboBox */
-        if (this.enum) {
+        if (this['enum']) {
             cons = Ext.form.ComboBox;
             if (this.list) {
                 cons = Ext.ux.form.LovCombo;
@@ -416,7 +416,7 @@ tvheadend.IdNode = function(conf)
     /*
      * Properties
      */
-    this.clazz = conf.class;
+    this.clazz = conf['class'];
     this.text = conf.caption || this.clazz;
     this.event = conf.event;
     this.props = conf.props;
@@ -484,10 +484,10 @@ tvheadend.idnode_editor_field = function(f, conf)
         d = false;
     var value = f.value;
     if (value == null)
-        value = f.default;
+        value = f['default'];
 
     /* Enumerated (combobox) type */
-    if (f.enum) {
+    if (f['enum']) {
         var cons = Ext.form.ComboBox;
         if (f.list)
             cons = Ext.ux.form.LovCombo;
@@ -561,12 +561,12 @@ tvheadend.idnode_editor_field = function(f, conf)
                     timeConfig: {
                         altFormats: 'H:i:s',
                         allowBlank: true,
-                        increment: 10,
+                        increment: 10
                     },
                     dateFormat:'d.n.Y',
                     dateConfig: {
                         altFormats: 'Y-m-d|Y-n-d',
-                        allowBlank: true,
+                        allowBlank: true
                     }
                 });
             /* fall thru!!! */
@@ -583,7 +583,7 @@ tvheadend.idnode_editor_field = function(f, conf)
                     value: '0x' + value.toString(16),
                     disabled: d,
                     width: 300,
-                    maskRe: /[xX0-9a-fA-F\.]/,
+                    maskRe: /[xX0-9a-fA-F\.]/
                 });
             }
             if (f.intsplit) {
@@ -594,7 +594,7 @@ tvheadend.idnode_editor_field = function(f, conf)
                     value: value,
                     disabled: d,
                     width: 300,
-                    maskRe: /[0-9\.]/,
+                    maskRe: /[0-9\.]/
                 });
             }
             return new Ext.form.NumberField({
@@ -798,7 +798,7 @@ tvheadend.idnode_editor = function(item, conf)
         defaultType: 'textfield',
         buttonAlign: 'left',
         autoScroll: true,
-        buttons: buttons,
+        buttons: buttons
     });
 
     tvheadend.idnode_editor_form(item.props || item.params, item.meta, panel,
@@ -1030,7 +1030,7 @@ tvheadend.idnode_grid = function(panel, conf)
             fields: fields,
             remoteSort: true,
             pruneModifiedRecords: true,
-            sortInfo: conf.sort ? conf.sort : null,
+            sortInfo: conf.sort ? conf.sort : null
         });
 
         /* Model */
@@ -1502,7 +1502,7 @@ tvheadend.idnode_form_grid = function(panel, conf)
             root: 'entries',
             url: listurl || 'api/idnode/load',
             baseParams: params || {
-                enum: 1,
+                'enum': 1,
                 'class': conf.clazz
             },
             autoLoad: true,
@@ -1545,7 +1545,7 @@ tvheadend.idnode_form_grid = function(panel, conf)
         /* Model */
         var model = new Ext.grid.ColumnModel({
             defaultSortable: conf.move ? false : true,
-            columns: columns,
+            columns: columns
         });
 
         /* Selection */
index 9d751a7f10845e17b717d5b74674844f6a515667..07b96438003a6bb5b98d9848f5042473ac12cb41 100644 (file)
@@ -7,7 +7,7 @@ tvheadend.networks = function(panel, index)
     if (!tvheadend.network_list) {
         tvheadend.network_list = new Ext.data.JsonStore({
             url: 'api/idnode/load',
-            baseParams: {class: 'mpegts_network', enum: 1},
+            baseParams: { 'class': 'mpegts_network', 'enum': 1 },
             root: 'entries',
             fields: ['key', 'val'],
             id: 'key',
index 66f1e013b5bf41641d19649db931d48c23cffea3..f937b86f30b6d0a8ab6771a6fc160f2f5d3b1606 100644 (file)
@@ -21,7 +21,7 @@ tvheadend.status_subs = function(panel, index)
             r.data.service = m.service;
             r.data.state = m.state;
             r.data.errors = m.errors;
-            r.data.in = m.in;
+            r.data['in'] = m['in'];
             r.data.out = m.out;
 
             store.afterEdit(r);
@@ -126,7 +126,7 @@ tvheadend.status_subs = function(panel, index)
                 header: "Input (kb/s)",
                 dataIndex: 'in',
                 listeners: { click: { fn: clicked } },
-                renderer: renderBw,
+                renderer: renderBw
             },
             {
                 width: 50,
@@ -134,7 +134,7 @@ tvheadend.status_subs = function(panel, index)
                 header: "Output (kb/s)",
                 dataIndex: 'out',
                 listeners: { click: { fn: clicked } },
-                renderer: renderBw,
+                renderer: renderBw
             }
         ]);
         
@@ -313,7 +313,7 @@ tvheadend.status_streams = function(panel, index)
                 header: "Bandwidth (kb/s)",
                 dataIndex: 'bps',
                 renderer: renderBw,
-                listeners: { click: { fn: clicked } },
+                listeners: { click: { fn: clicked } }
             },
             {
                 width: 50,
@@ -465,7 +465,7 @@ tvheadend.status_conns = function(panel, index) {
                                     return;
                                 Ext.Ajax.request({
                                     url: 'api/connections/cancel',
-                                    params: { id: id },
+                                    params: { id: id }
                                 });
                             }
                        );
@@ -538,7 +538,7 @@ tvheadend.status_conns = function(panel, index) {
             viewConfig: {
                 forceFit: true
             },
-            plugins: [actions],
+            plugins: [actions]
         });
         
         dpanel.add(grid);
@@ -573,7 +573,7 @@ tvheadend.status = function() {
         autoScroll: true,
         activeTab: 0,
         iconCls: 'eye',
-        items: [],
+        items: []
     });
     tvheadend.status_streams(panel);
     tvheadend.status_subs(panel);
@@ -660,9 +660,9 @@ tvheadend.subscription_bw_monitor = function(id) {
                 return;
             }
 
-            var input = Math.round(r.data.in / 125);
+            var input = Math.round(r.data['in'] / 125);
             var output = Math.round(r.data.out / 125);
-            var ratio = new Number(r.data.in / r.data.out).toPrecision(3);
+            var ratio = new Number(r.data['in'] / r.data.out).toPrecision(3);
 
             win.setTitle(r.data.channel);
             inputLbl.setText('In: ' + input + ' kb/s');
index 3e6477a4f784eaa75ed6b3b61bbdee0b2d2b8fff..2348fd5c6eef1396064d5c6d26e788db9d32a95b 100644 (file)
@@ -194,7 +194,7 @@ tvheadend.VideoPlayer = function(url) {
     if (!tvheadend.profiles) {
         tvheadend.profiles = tvheadend.idnode_get_enum({
             url: 'api/profile/list',
-            event: 'profile',
+            event: 'profile'
         });
     }
 
@@ -206,7 +206,7 @@ tvheadend.VideoPlayer = function(url) {
         editable: false,
         triggerAction: 'all',
         emptyText: 'Select stream profile...',
-        store: tvheadend.profiles,
+        store: tvheadend.profiles
     });
 
     selectProfile.on('select', function(c, r) {
index 04b9a0c734aba4a59df60b64a01849c50dbe5fa8..bf6fb54b56530aeddd2b4336deff80d603542ce7 100644 (file)
@@ -82,7 +82,7 @@ tv.ui.VideoPlayer = Ext.extend(Ext.Panel, (function() {
             profile:   'webtv-h264-aac-matroska',
             playlist:  false,
             mimetype:  'video/x-matroska; codecs="avc1.42E01E, mp4a.40.2"'
-        },
+        }
     };
 
     return {