Changeset 278
- Timestamp:
- 12/11/06 17:25:16 (2 years ago)
- Files:
-
- branches/0.2.1/sites/demo/index.htm (modified) (1 diff)
- branches/0.2.1/sites/demo/js/demo.css (modified) (2 diffs)
- branches/0.2.1/sites/demo/js/demo.htm (modified) (1 diff)
- branches/0.2.1/sites/demo/js/demo.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/0.2.1/sites/demo/index.htm
r277 r278 28 28 <script src="js/demo_launcher.js"></script> 29 29 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" /> 54 53 55 54 </head> branches/0.2.1/sites/demo/js/demo.css
r276 r278 9 9 #demo dl { margin: 0; padding: 0;} 10 10 #demo dd { margin-left: 3em; padding-left: 0;} 11 11 #demo ul { list-style: none} 12 12 /**/ 13 13 … … 35 35 36 36 .wrapper { padding: 0 20px 20px} 37 branches/0.2.1/sites/demo/js/demo.htm
r276 r278 49 49 <label for="edit_mode-skin">import an existing WYMstyle skin</label> 50 50 <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> 53 53 </div> 54 <div id=" mode_skin" class="panel">54 <div id="edit_mode-skin-options" class="panel"> 55 55 <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> 65 63 </div> 66 <div id=" mode_build" class="panel">64 <div id="edit_mode-build-options" class="panel"> 67 65 <h2>Enable basic WYMstyle modules</h2> 68 66 <div class="row"> 69 67 <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> 72 70 </dl> 73 71 </div> 74 72 <div class="row"> 75 73 <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> 78 76 </dl> 79 77 </div> 80 78 <div class="row"> 81 79 <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> 84 82 </dl> 85 83 </div> 86 84 <div class="row"> 87 85 <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> 90 88 </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 91 132 </div> 92 133 </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> 133 136 134 137 <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> 137 140 </dt> 138 141 </div> 142 139 143 </div> 140 144 </div> branches/0.2.1/sites/demo/js/demo.js
r276 r278 1 function 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 } 5 function 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 } 10 function 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 }; 1 42 $(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( 5 49 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()); 11 77 12 78 }