Changeset 768


Ignore:
Timestamp:
12/30/09 11:50:28 (3 years ago)
Author:
jeroen
Message:

added permalink to testing

Location:
testing
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • testing/files/style.css

    r742 r768  
    106106        text-align: center; 
    107107} 
     108#preview a { 
     109        display: block; 
     110        float: right; 
     111        padding: 5px 10px; 
     112        font-size: 80%; 
     113        color: #666; 
     114} 
    108115#flashvarsform li.active { 
    109116        border-bottom: 2px solid #7A2; 
  • testing/index.html

    r766 r768  
    1616                                if(obj['plugins']) { 
    1717                                        arr = obj['plugins'].split(','); 
     18                                } else if($_GET['plugins']) { 
     19                                        arr = $_GET['plugins'].split(','); 
    1820                                } 
    1921                                $('#plugins').val(arr); 
     
    9597                                evt.preventDefault(); 
    9698                                var vrs = {}; 
     99                                var lnk = 'http://developer.longtailvideo.com/trac/testing/'; 
    97100                                var arr = $("#flashvarsform").find('input'); 
     101                                lnk += '?player='+$('#players').val(); 
    98102                                for(var i=0; i<arr.length; i++) { 
    99103                                        if($(arr[i]).val()) { 
     
    104108                                        vrs['skin'] = settings.skins[$("#skins").val()]; 
    105109                                } 
     110                                for (var itm in vrs) { lnk += '&'+itm+'='+encodeURI(vrs[itm]); } 
    106111                                if($("#plugins").val() != null) { 
    107112                                        var plg = ''; 
    108113                                        var arr = $("#plugins").val(); 
     114                                        lnk += '&plugins='+arr.join(','); 
    109115                                        for(var i=0; i<arr.length; i++) { 
    110116                                                plg += settings.plugins[arr[i]].swf+','; 
     
    125131                                        {id:'player',name:'player'} 
    126132                                ); 
     133                                $('#preview').prepend('<a href="'+lnk+'">permalink</a>'); 
    127134                        }, 
    128135                        /** Get a variable from the player. **/ 
     
    230237                $('#examples').val($_GET['example']); 
    231238                $('#players').val($_GET['player']); 
     239                $('#skins').val($_GET['skin']); 
    232240                $.tabs('sources'); 
    233241                $.insert(); 
     
    318326 
    319327 
    320  
    321328<div id="preview"> 
    322329<p>Testing is simple: choose an example, change the flashvars and see if it works.<br/> 
  • testing/settings.js

    r766 r768  
    112112        /** All the setup examples with their flashvars. **/ 
    113113        examples: { 
     114                0: { 
     115                        width:400, 
     116                        height:240 
     117                }, 
    114118                1: { 
    115119                        title:'FLV video', 
Note: See TracChangeset for help on using the changeset viewer.