Changeset 278

Show
Ignore:
Timestamp:
12/11/06 17:25:16 (2 years ago)
Author:
d.reszka
Message:

some progress

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/0.2.1/sites/demo/index.htm

    r277 r278  
    2828<script src="js/demo_launcher.js"></script> 
    2929 
    30 <link rel="stylesheet" type="text/css" media="print"    href="../../core/print.css" /> 
    31  
    32 <link rel="stylesheet" type="text/css" media="screen"   href="../../core/typo-reset.css" /> 
    33 <link rel="stylesheet" type="text/css" media="screen"   href="../../core/layout-fixed.css" /> 
    34 <link rel="stylesheet" type="text/css" media="screen"   href="../../core/cols-2-xm.css" /> 
    35 <link rel="stylesheet" type="text/css" media="screen"   href="../../core/cols-2-mx.css" /> 
    36 <link rel="stylesheet" type="text/css" media="screen"   href="../../core/cols-3-msn.css" /> 
    37 <link rel="stylesheet" type="text/css" media="screen"   href="../../core/cols-3-smn.css" /> 
    38 <link rel="stylesheet" type="text/css" media="screen"   href="../../core/cols-equal.css" /> 
    39 <link rel="stylesheet" type="text/css" media="screen"   href="../../core/navpri-horizontal.css" /> 
    40 <link rel="stylesheet" type="text/css" media="screen"   href="../../core/navpri-horizontal-menudown.css" /> 
    41 <link rel="stylesheet" type="text/css" media="screen"   href="../../core/navlang-topright.css" /> 
    42 <link rel="stylesheet" type="text/css" media="screen"   href="../../core/colors-branding.css" /> 
    43 <link rel="stylesheet" type="text/css" media="screen"   href="../../core/dev.css" /> 
    44  
    45 <link rel="stylesheet" type="text/css" media="screen"   href="../../addons/forms/form01.css" /> 
    46 <link rel="stylesheet" type="text/css" media="screen"   href="../../addons/forms/form02.css" /> 
    47  
    48 <link rel="stylesheet" type="text/css" media="screen"   href="../../skins/flexible01/all.css" /> 
    49 <link rel="stylesheet" type="text/css" media="screen"   href="../../skins/wymstyle01/all.css" /> 
    50 <link rel="stylesheet" type="text/css" media="screen"   href="../../skins/wymstyle02/all.css" /> 
    51 <link rel="stylesheet" type="text/css" media="screen"   href="../../skins/wymstyle03/all.css" /> 
    52 <link rel="stylesheet" type="text/css" media="screen"   href="../../skins/wymstyle04/all.css" /> 
    53  
     30<link rel="alternate stylesheet" type="text/css" media="print"  title="demo" href="../../core/print.css" /> 
     31 
     32<link rel="alternate stylesheet" type="text/css" media="screen" title="demo" href="../../core/typo-reset.css" /> 
     33<link rel="alternate stylesheet" type="text/css" media="screen" title="demo" href="../../core/layout-fixed.css" /> 
     34<link rel="alternate stylesheet" type="text/css" media="screen" title="demo" href="../../core/cols-2-xm.css" /> 
     35<link rel="alternate stylesheet" type="text/css" media="screen" title="demo" href="../../core/cols-2-mx.css" /> 
     36<link rel="alternate stylesheet" type="text/css" media="screen" title="demo" href="../../core/cols-3-msn.css" /> 
     37<link rel="alternate stylesheet" type="text/css" media="screen" title="demo" href="../../core/cols-3-smn.css" /> 
     38<link rel="alternate stylesheet" type="text/css" media="screen" title="demo" href="../../core/cols-equal.css" /> 
     39<link rel="alternate stylesheet" type="text/css" media="screen" title="demo" href="../../core/navpri-horizontal.css" /> 
     40<link rel="alternate stylesheet" type="text/css" media="screen" title="demo" href="../../core/navpri-horizontal-menudown.css" /> 
     41<link rel="alternate stylesheet" type="text/css" media="screen" title="demo" href="../../core/navlang-topright.css" /> 
     42<link rel="alternate stylesheet" type="text/css" media="screen" title="demo" href="../../core/colors-branding.css" /> 
     43<link rel="alternate stylesheet" type="text/css" media="screen" title="demo" href="../../core/dev.css" /> 
     44 
     45<link rel="alternate stylesheet" type="text/css" media="screen" title="demo" href="../../addons/forms/form01.css" /> 
     46<link rel="alternate stylesheet" type="text/css" media="screen" title="demo" href="../../addons/forms/form02.css" /> 
     47 
     48<link rel="alternate stylesheet" type="text/css" media="screen" title="demo" href="../../skins/flexible01/all.css" /> 
     49<link rel="alternate stylesheet" type="text/css" media="screen" title="demo" href="../../skins/wymstyle01/all.css" /> 
     50<link rel="alternate stylesheet" type="text/css" media="screen" title="demo" href="../../skins/wymstyle02/all.css" /> 
     51<link rel="alternate stylesheet" type="text/css" media="screen" title="demo" href="../../skins/wymstyle03/all.css" /> 
     52<link rel="alternate stylesheet" type="text/css" media="screen" title="demo" href="../../skins/wymstyle04/all.css" /> 
    5453 
    5554</head> 
  • branches/0.2.1/sites/demo/js/demo.css

    r276 r278  
    99#demo dl                     { margin: 0; padding: 0;} 
    1010#demo dd                     { margin-left: 3em; padding-left: 0;} 
    11  
     11#demo ul                        { list-style: none} 
    1212/**/ 
    1313 
     
    3535 
    3636.wrapper        { padding: 0 20px 20px} 
     37 
  • branches/0.2.1/sites/demo/js/demo.htm

    r276 r278  
    4949                <label for="edit_mode-skin">import an existing WYMstyle skin</label> 
    5050                <br /> 
    51                 <input type="radio" value="modules" name="edit_mode" id="edit_mode-modules" /> 
    52                 <label for="edit_mode-modules">build my own layout with WYMstyle</label> 
     51                <input type="radio" value="modules" name="edit_mode" id="edit_mode-build" /> 
     52                <label for="edit_mode-build">build my own layout with WYMstyle</label> 
    5353        </div>   
    54         <div id="mode_skin" class="panel"> 
     54        <div id="edit_mode-skin-options" class="panel"> 
    5555                <h2>Choose a skin</h2> 
    56                         <input type="radio" value="flexible01" name="choosen_skin">flexible01</input> 
    57                         <br /> 
    58                         <input type="radio" value="wymstyle01" name="choosen_skin">wymstyle01</input> 
    59                         <br /> 
    60                         <input type="radio" value="wymstyle02" name="choosen_skin">wymstyle02</input> 
    61                         <br /> 
    62                         <input type="radio" value="wymstyle03" name="choosen_skin">wymstyle03</input> 
    63                         <br /> 
    64                         <input type="radio" value="wymstyle04" name="choosen_skin">wymstyle04</input> 
     56                <ul> 
     57                        <li><input type="radio" value="flexible01" id="flexible01" name="choosen_skin" />flexible skin</li> 
     58                        <li><input type="radio" value="wymstyle01" name="choosen_skin" />wymstyle01</li> 
     59                        <li><input type="radio" value="wymstyle02" name="choosen_skin" />wymstyle02</li> 
     60                        <li><input type="radio" value="wymstyle03" name="choosen_skin" />wymstyle03</li> 
     61                        <li><input type="radio" value="wymstyle04" name="choosen_skin" />wymstyle04</li> 
     62                </ul> 
    6563        </div> 
    66         <div id="mode_build" class="panel"> 
     64        <div id="edit_mode-build-options" class="panel"> 
    6765                <h2>Enable basic WYMstyle modules</h2> 
    6866                <div class="row"> 
    6967                        <dl> 
    70                         <dt><input id="typo-reset" name="typo-reset" type="checkbox">typo-reset.css</input></dt>  
    71                         <dd><label for="typo-reset">reset typography across browsers + hide accessibility elements</label> (recommended, should always be enabled)</dd> 
     68                        <dt><input id="typo-reset" name="typo-reset" type="checkbox" /><label for="typo-reset">typo-reset.css</label></dt>  
     69                        <dd>reset typography across browsers + hide accessibility elements<br />(recommended, should always be enabled)</dd> 
    7270                        </dl> 
    7371                </div> 
    7472                <div class="row"> 
    7573                        <dl> 
    76                         <dt><input id="dev" name="dev" type="checkbox">dev.css</input></dt>  
    77                         <dd><label for="dev">reveal elements using colors</label> (useful while creating CSS layouts and for this demo to color the different parts)</dd> 
     74                        <dt><input id="dev" name="dev" type="checkbox" /><label for="dev">dev.css</label></dt>  
     75                        <dd>reveal elements using colors<br /> (very useful while creating CSS layouts and for this demo)</dd> 
    7876                        </dl> 
    7977                </div>                 
    8078                <div class="row"> 
    8179                        <dl> 
    82                         <dt><input id="print" name="print" type="checkbox">print.css</input></dt>  
    83                         <dd><label for="print">print media support</label> (when printing, hides menus, header, footer,...)</dd> 
     80                        <dt><input id="print" name="print" type="checkbox" /><label for="print">print.css</label></dt>  
     81                        <dd>print media support (when printing, hides menus, header, footer,...)</dd> 
    8482                        </dl> 
    8583                </div> 
    8684                <div class="row"> 
    8785                        <dl> 
    88                         <dt><input id="layout-fixed" name="layout-fixed" type="checkbox">layout-fixed.css</input></dt>  
    89                         <dd><label for="layout-fixed">load basic fixed-width layout</label></dd> 
     86                        <dt><input id="layout-fixed" name="layout-fixed" type="checkbox" /><label for="layout-fixed">layout-fixed.css</label></dt>  
     87                        <dd>fixed-width layout</dd> 
    9088                        </dl> 
     89                         
     90                        <div id="layout-fixed-options" class="panel"> 
     91                                <h2>Options for the choosen layout</h2> 
     92                                <div class="row"> 
     93                                        <dl> 
     94                                                <dt>choose a column disposition:</dt> 
     95                                                <dd><input id="cols-1" type="radio" value="cols-1" name="cols" checked="checked" /><label for="cols-1">no columns</label></dd> 
     96                                                <dd><input id="cols-2-mx" type="radio" value="cols-2-mx" name="cols" /><label for="cols-2-mx">cols-2-mx.css</label></dd> 
     97                                                <dd><input id="cols-2-xm" type="radio" value="cols-2-xm" name="cols" /><label for="cols-2-xm">cols-2-xm.css</label></dd> 
     98                                                <dd><input id="cols-3-msn" type="radio" value="cols-3-msn" name="cols" /><label for="cols-3-msn">cols-3-msn.css</label></dd> 
     99                                                <dd><input id="cols-3-smn" type="radio" value="cols-3-smn" name="cols" /><label for="cols-3-smn">cols-3-smn.css</label></dd> 
     100                                        </dl> 
     101                                </div> 
     102                                <br /> 
     103                                <div class="row"> 
     104                                        <dl> 
     105                                        <dt><input id="branding" name="branding" type="checkbox" /><label for="branding">colors-branding.css</label></dt> 
     106                                        <dd><label for="branding">insert the logo using image replacement</label></dd> 
     107                                        </dl> 
     108                                </div> 
     109                                <div class="row"> 
     110                                        <dl> 
     111                                                <dt><input id="navlang-topright" name="navlang-topright" type="checkbox" /><label for="navlang-topright">navlang-topright.css</label></dt> 
     112                                                <dd>move language menu to top right of page</dd> 
     113                                        </dl> 
     114                                </div>                                                                         
     115                                <div class="row"> 
     116                                        <dl> 
     117                                        <dt><input id="navpri-horizontal" name="navpri-horizontal" type="checkbox"><label for="navpri-horizontal">navpri-horizontal.css</label></dt> 
     118                                        <dd>move primary navigation to top of content</dd> 
     119                                        </dl> 
     120                                        <div id="navpri-horizontal-options" class="panel row"> 
     121                                                <dl> 
     122                                                        <dt><input id="navpri-horizontal-menudown" name="navpri-horizontal-menudown" type="checkbox" /><label for="navpri-horizontal-menudown">navpri-horizontal-menudown.css</label></dt> 
     123                                                        <dd>use dropdown menus (hover menu links to see the effect)</dd> 
     124                                                </dl> 
     125                                        </div> 
     126                                         
     127                                </div> 
     128                 
     129                 
     130                        </div> 
     131                         
    91132                </div>                 
    92133        </div>         
    93         <div id="layout_fixed-options" class="panel"> 
    94                 <h2>Options for the choosen layout</h2> 
    95                 <div class="row"> 
    96                         <dl> 
    97                                 <dt>choose a column disposition:</dt> 
    98                                 <dd><input id="cols-1" type="radio" value="cols-1" name="cols" checked="checked">no columns</input></dd> 
    99                                 <dd><input id="cols-2-mx" type="radio" value="cols-2-mx" name="cols">cols-2-mx.css</input></dd> 
    100                                 <dd><input id="cols-2-xm" type="radio" value="cols-2-xm" name="cols">cols-2-xm.css</input></dd> 
    101                                 <dd><input id="cols-3-msn" type="radio" value="cols-3-msn" name="cols">cols-3-msn.css</input></dd> 
    102                                 <dd><input id="cols-3-smn" type="radio" value="cols-3-smn" name="cols">cols-3-smn.css</input></dd> 
    103                         </dl> 
    104                 </div> 
    105                 <br /> 
    106                 <div class="row"> 
    107                         <dl> 
    108                         <dt><input id="branding" name="branding" type="checkbox">colors-branding.css</input></dt> 
    109                         <dd><label for="branding">insert the logo using image replacement</label></dd> 
    110                         </dl> 
    111                 </div> 
    112                 <div class="row"> 
    113                         <dl> 
    114                                 <dt><input id="navlang-topright" name="navlang-topright" type="checkbox">navlang-topright.css</input></dt> 
    115                                 <dd><label for="navlang-topright">move language menu to top right of page</label></dd> 
    116                         </dl> 
    117                 </div>                                                                         
    118                 <div class="row"> 
    119                         <dl> 
    120                         <dt><input id="navpri-horizontal" name="navpri-horizontal" type="checkbox">navpri-horizontal.css</input></dt> 
    121                         <dd><label for="navpri-horizontal">move primary navigation to top of content</label></dd> 
    122                         </dl> 
    123                 </div> 
    124         </div> 
    125         <div id="navpri-horizontal-options" class="panel row"> 
    126                 <dl> 
    127                         <dt><input id="navpri-horizontal-menudown" name="navpri-horizontal-menudown" type="checkbox">navpri-horizontal-menudown.css</input></dt> 
    128                         <dd><label for="navpri-horizontal-menudown">use dropdown menus (hover menu links to see the effect)</label></dd> 
    129                 </dl> 
    130         </div> 
    131         <div class="row panel"> 
    132         <h2>Addons</h2> 
     134        <div> 
     135                <h2>Addons</h2> 
    133136 
    134137                <dt>         
    135                         <dt><input id="form01" name="form01" type="checkbox">form01.css</input></dt> 
    136                         <dd><label for="form01">form layout 01</label></dd> 
     138                        <dt><input id="form01" name="form01" type="checkbox" /><label for="form01">form01.css</label></dt> 
     139                        <dd>form layout 01</dd> 
    137140                </dt> 
    138141        </div> 
     142                  
    139143</div> 
    140144</div> 
  • branches/0.2.1/sites/demo/js/demo.js

    r276 r278  
     1function showStylesheetContaining(string) { 
     2        window.opener.jQuery("link[@rel*=style][@href*="+string+".css]").each(function(){this.disabled=false;}); 
     3        window.opener.jQuery("link[@rel*=style][@href*="+string+"/all.css]").each(function(){this.disabled=false;}); 
     4}        
     5function hideStylesheetContaining(string) { 
     6        window.opener.jQuery("link[@rel*=style][@href*="+string+".css]").each(function(){this.disabled=true;}); 
     7        window.opener.jQuery("link[@rel*=style][@href*="+string+"/all.css]").each(function(){this.disabled=true;}); 
     8 
     9} 
     10function init() { 
     11        //hide demo launcher div 
     12        window.opener.jQuery("p#demo_launcher").hide(); 
     13        //disable all css 
     14        hideStylesheetContaining("css"); 
     15        //disable all inputs     
     16        $("input").each(function(){this.checked=false}); 
     17        //and hide all panels 
     18        $("div.panel").hide(); 
     19        //keep demo window always on top 
     20        //window.onblur = function(){window.focus(); window.onblur = ''}; 
     21} 
     22$.fn.check = function(mode) { 
     23        var mode = mode || 'on';  
     24        return this.each(function() { 
     25                switch(mode) { 
     26                case 'on': 
     27                        this.checked = true; 
     28                        alert("test1"); 
     29                        alert($(this).id()); 
     30                        break; 
     31                case 'off': 
     32                        this.checked = false; 
     33                        alert("OFF" + $(this).id()); 
     34                        window.opener.jQuery("link[@rel*=style][@href*="+$(this).id()+"]").each(function(){this.disabled=true;}); 
     35                        break; 
     36                case 'toggle': 
     37                        this.checked = !this.checked; 
     38                        break; 
     39                } 
     40        }); 
     41}; 
    142$(document).ready(function() { 
    2         window.opener.jQuery("p#demo_launcher").hide(); 
    3         $("div.panel").hide(); 
    4         $("input[@type='radio'][@name='edit_mode']").click( 
     43 
     44        //INIT 
     45        init();         
     46 
     47        //CHECKBOXES 
     48        $("input[@type='checkbox']").click( 
    549                function(){ 
    6                          
    7                         //radioName = $(this).name(); 
    8                         //$("input[@type='radio'][@name='"+radioName+"']").hide(); 
    9                         //window.opener.jQuery("body").hide(); 
    10                         //alert(this.getAttribute('class')); 
     50                        idname= $(this).id(); 
     51                        switch (this.checked){ 
     52                                case true: 
     53                                        $("div#"+idname+"-options").show(); 
     54                                        showStylesheetContaining($(this).id()); 
     55                                break; 
     56                                case false: 
     57                                        $("div#"+idname+"-options").hide().find("input").check("off"); 
     58                                        hideStylesheetContaining($(this).id()); 
     59                                         
     60                                break; 
     61                        } 
     62                } 
     63        ); 
     64 
     65        //RADIOS 
     66        $("input[@type='radio']").click( 
     67                function(){ 
     68                        $(this).parent().parent().find("input[@type='radio']").each( 
     69                                function(){ 
     70                                        hideStylesheetContaining($(this).id()); 
     71                                        $("div#" + $(this).id() + "-options").hide(); 
     72   
     73                                } 
     74                        );                                
     75                        $("div#" + $(this).id() + "-options").show(); 
     76                        showStylesheetContaining($(this).id()); 
    1177 
    1278                }