minor bug fixes

This commit is contained in:
斟酌 鵬兄 2015-10-21 02:22:49 +08:00
parent 8f05e37ee4
commit 2778e12f38
4 changed files with 37 additions and 18 deletions

View File

@ -23,7 +23,7 @@
, "AS3" , "as3" , "AS3" , "as3"
, "bash" , "bash" , "bash" , "bash"
, "C#" , "csharp" , "C#" , "csharp"
, "C/C++" , "c" , "C/C++" , "cpp"
, "CSS" , "css" , "CSS" , "css"
, "php" , "php" , "php" , "php"
, "Python" , "python" , "Python" , "python"

View File

@ -75,22 +75,22 @@
var keys = [ new IKey( "type", "radio" ), new IKey( "name", "size_grp" + Perf.uuid ) ]; var keys = [ new IKey( "type", "radio" ), new IKey( "name", "size_grp" + Perf.uuid ) ];
var sid; var sid;
var selectionChanged = function () var selectionChanged = function ()
{
_stage.setAttribute( new DataKey( "size", this.size ) );
//// Handles the size selection
switch(this.size)
{ {
_stage.setAttribute( new DataKey( "size", this.size ) ); case "small":
//// Handles the size selection _image.setAttribute( "src", config.path.image.small + _hash + ".jpg" );
switch(this.size) break;
{ case "medium":
case "small": _image.setAttribute( "src", config.path.image.medium + _hash + ".jpg" );
_image.setAttribute( "src", config.path.image.small + _hash + ".jpg" ); break;
break; case "large":
case "medium": _image.setAttribute( "src", config.path.image.large + _hash + ".jpg" );
_image.setAttribute( "src", config.path.image.medium + _hash + ".jpg" ); break;
break; }
case "large": };
_image.setAttribute( "src", config.path.image.large + _hash + ".jpg" );
break;
}
};
this.stage.insertBefore( _image, desc ); this.stage.insertBefore( _image, desc );
@ -111,6 +111,20 @@
IDOMElement(s).addEventListener("Change", selectionChanged.bind({size: "small"})); IDOMElement(s).addEventListener("Change", selectionChanged.bind({size: "small"}));
IDOMElement(m).addEventListener("Change", selectionChanged.bind({size: "medium"})); IDOMElement(m).addEventListener("Change", selectionChanged.bind({size: "medium"}));
IDOMElement(l).addEventListener("Change", selectionChanged.bind({size: "large"})); IDOMElement(l).addEventListener("Change", selectionChanged.bind({size: "large"}));
var hasValue = _stage.getDAttribute( "size" );
if( hasValue )
{
switch( hasValue )
{
case "small": s.checked = 1; break;
case "medium": m.checked = 1; break;
case "large": l.checked = 1; break;
}
selectionChanged.bind({ size: hasValue })();
}
break; break;
case "audio": case "audio":
// TODO // TODO
@ -143,7 +157,7 @@
] ]
, [ , [
new DataKey( "value", hash ) new DataKey( "value", hash )
, new DataKey( "size", "large" ) , new DataKey( "size", override.size || "large" )
, new IKey( "style", "max-height: 150px;" ) , new IKey( "style", "max-height: 150px;" )
] ]
); );

View File

@ -48,6 +48,11 @@
margin-bottom: 0.5em; margin-bottom: 0.5em;
} }
textarea.v_snippet_input {
font-family: monospace;
font-size: 1em;
}
.v_instruction { .v_instruction {
padding: 0.2em 0; padding: 0.2em 0;
} }

View File

@ -4,7 +4,7 @@
width: 225px; width: 225px;
height: 325px; height: 325px;
margin: 1em; margin: 0 2em 2em 0;
position: relative; position: relative;