Changeset 53ae001


Ignore:
Timestamp:
2014-02-07 09:32:32 (11 years ago)
Author:
jullio <jullio@…>
Branches:
master
Children:
635e370
Parents:
94fc6ce
git-author:
jullio <jullio@…> (2014-02-07 09:32:32)
git-committer:
jullio <jullio@…> (2014-02-07 09:32:32)
Message:

1.9.2 Changed config tab. Made drop downs ordered alphabetically.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified J_OnkyoReceiver1.js

    r94fc6ce r53ae001  
    1111var responseRAW; 
    1212var netIndexcmd; 
    13 var netServiceNames = { 
    14     "?" : "None", 
    15     "00":"DLNA", 
    16     "01": "Favorite", 
    17     "02": "vTuner", 
    18     "03" : "SiriusXM", 
    19     "04" : "Pandora", 
    20     "05" : "Rhapsody", 
    21     "06" : "Last.fm", 
    22     "07" : "Napster", 
    23     "08" : "Slacker", 
    24     "09" : "Mediafly", 
    25     "0A" : "Spotify", 
    26     "0B" : "AUPEO!", 
    27     "0C" : "radiko", 
    28     "0D" : "e-onkyo", 
    29     "0E" : "TuneIn Radio", 
    30     "0F" : "MP3Tunes", 
    31     "10" : "Simfy", 
    32     "11" : "Home Media" 
    33 }; 
    34 var netInputSource = { 
    35     "?" : "None", 
    36     "29" : "USBFront", 
    37     "2A" : "USBRear", 
    38     "2B" : "NET", 
    39     "2D" : "Airplay", 
    40     "31" : "XM", 
    41     "32" : "Sirius" 
    42 }; 
    43  
    44 var InputSource = { 
    45     "?" : "None", 
    46     "00" : "STB/DVR", 
    47     "01" : "CBL/SAT", 
    48     "02" : "GAME/TV", 
    49     "03" : "AUX", 
    50     "05" : "PC", 
    51     "10" : "BD/DVD", 
    52     "20" : "TV/TAPE", 
    53     "22" : "PHONO", 
    54     "23" : "TV/CD", 
    55     "24" : "FM", 
    56     "25" : "AM", 
    57     "29" : "USBFront", 
    58     "2A" : "USBRear", 
    59     "2B" : "NET", 
    60     "2D" : "Airplay", 
    61     "31" : "XM", 
    62     "32" : "Sirius", 
    63     "RAW": "Raw Commands" 
    64 }; 
    65  
    66 var debugModes = { 
    67     "0": "Off", 
    68     "1": "On" 
    69 }; 
    70  
    71 var logLevels = { 
    72     "0": "0:Minimal logs(recomended)", 
    73     "1": "1:Critical feature logging.", 
    74     "2": "2:Advanced feature logging.", 
    75     "3": "3: Log almost everything.", 
    76     "4": "4: Log everything." 
    77 }; 
     13var netServiceNames = [ 
     14    "?:None", 
     15    "0B:AUPEO!", 
     16    "00:DLNA", 
     17    "0D:e-onkyo", 
     18    "01:Favorite", 
     19    "11:Home Media", 
     20    "06:Last.fm", 
     21    "09:Mediafly", 
     22    "0F:MP3Tunes", 
     23    "07:Napster", 
     24    "04:Pandora", 
     25    "0C:radiko", 
     26    "05:Rhapsody", 
     27    "10:Simfy", 
     28    "03:SiriusXM", 
     29    "08:Slacker", 
     30    "0A:Spotify", 
     31    "0E:TuneIn Radio", 
     32    "02:vTuner" 
     33]; 
     34/*var netInputSource = [ 
     35    "?:None", 
     36    "29:USBFront", 
     37    "2A:USBRear", 
     38    "2B:NET", 
     39    "2D:Airplay", 
     40    "31:XM", 
     41    "32:Sirius" 
     42];*/ 
     43 
     44var InputSource = [ 
     45    "?:None", 
     46    "2D:Airplay", 
     47    "25:AM", 
     48    "03:AUX", 
     49    "10:BD/DVD", 
     50    "01:CBL/SAT", 
     51    "24:FM", 
     52    "02:GAME/TV", 
     53    "2B:NET", 
     54    "05:PC", 
     55    "22:PHONO", 
     56    "RAW:Raw Commands", 
     57    "32:Sirius", 
     58    "00:STB/DVR", 
     59    "23:TV/CD", 
     60    "20:TV/TAPE", 
     61    "29:USBFront", 
     62    "2A:USBRear", 
     63    "31:XM" 
     64]; 
     65 
     66var debugModes = [ 
     67    "0:Off", 
     68    "1:On" 
     69]; 
     70 
     71var logLevels = [ 
     72    "0:0-Minimal logs(recomended)", 
     73    "1:1-Critical feature logging.", 
     74    "2:2-Advanced feature logging.", 
     75    "3:3-Log almost everything.", 
     76    "4:4-Log everything." 
     77]; 
    7878 
    7979function config_init(deviceId){ 
     
    102102        if(debugmode == undefined){ debugmode = 0; } 
    103103        if(loglevel == undefined) { loglevel = 0; } 
    104     html += '<br>Dubug Mode: '; 
     104    html += ' Dubug Mode: '; 
    105105        html += generateSelectStatement('DEBUGMODE','warnSave(); set_device_state(' + deviceId + ',\'' + ONK_OIN + '\',\'DEBUGMODE\', $F(this), 0)',debugModes,debugmode,0); 
    106106        html += '  Log Level: ' + generateSelectStatement('LOGLEVEL','warnSave(); set_device_state(' + deviceId + ',\'' + ONK_OIN + '\',\'LOGLEVEL\', $F(this), 0)',logLevels,loglevel,0); 
     
    108108    } 
    109109   html += '<div><p><b>Macro (For Advanced Users) - **Beta**</b></p></div>'; 
    110    html += '<div><p>Macros are a set of commands to play a specific song or select a specific menu item.  You can select any input.  If you select Net as your input you can select any of the listed Net Service.'; 
    111    html += 'The Macro Steps only apply to Net input source and Raw input source. Explanation of Pauses and Raw Commands are in the instructions.</p></div>'; 
     110   html += '<div><p>Macros are a set of commands. You can select any input. '; 
     111   html += 'The Macro Steps only apply to Net input source and Raw input source. Explanation of Pause and Raw Commands are in the instructions.</p></div>'; 
    112112    
    113113   var macroInput1 = get_device_state(deviceId, ONK_OIN, "MacroInput1", 1); 
     
    238238    } 
    239239    select += ' ' + disabled +'>'; 
    240     for (key in OptionNameValues){ 
    241         if(key == selectedValue){ 
    242             select += '<option value="' + key + '" selected="selected">' + OptionNameValues[key] + '</option>'; 
     240    for (var i=0; i<OptionNameValues.length;i++){ 
     241        var keyvalarr = OptionNameValues[i].split(":"); 
     242        if(keyvalarr[0] == selectedValue){ 
     243            select += '<option value="' + keyvalarr[0] + '" selected="selected">' + keyvalarr[1] + '</option>'; 
    243244        }else{ 
    244             select += '<option value="' + key + '">' + OptionNameValues[key] + '</option>'; 
     245            select += '<option value="' + keyvalarr[0] + '">' + keyvalarr[1] + '</option>'; 
    245246        } 
    246247    } 
Note: See TracChangeset for help on using the changeset viewer.