Skip to content

Commit

Permalink
Submittage.
Browse files Browse the repository at this point in the history
  • Loading branch information
shazow committed Aug 4, 2011
1 parent be02a3a commit 07ad75f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
5 changes: 3 additions & 2 deletions static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

<meta charset="utf-8" />
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<meta name="viewport" content="width=device-width,initial-scale=0.5,maximum-scale=0.5">
<meta name="viewport" content="width=device-width,initial-scale=0.4,maximum-scale=0.4">
<meta name="description" content="Ever fire up Photoshop just to multiply a couple of colors? No more." />

<title>ColorBlendy - Blend colors with different modes like multiply, overlay, dodge.</title>
Expand All @@ -31,7 +31,7 @@
</head>
<body>

<form action="#">
<form>

<div id="color-bottom-preview" class="preview">
<h1><a href="./" tabindex="-1">ColorBlendy</a></h1>
Expand All @@ -52,6 +52,7 @@ <h1><a href="./" tabindex="-1">ColorBlendy</a></h1>
<div id="color-top-preview" class="preview">
<p><input type="text" id="color-top" value="#333333" tabindex="2" spellcheck="false" /></p>
</div>
<input type="submit" />

</form>

Expand Down
2 changes: 1 addition & 1 deletion static/index.min.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

<meta charset="utf-8" />
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<meta name="viewport" content="width=device-width,initial-scale=0.5,maximum-scale=0.5">
<meta name="viewport" content="width=device-width,initial-scale=0.4,maximum-scale=0.4">
<meta name="description" content="Ever fire up Photoshop just to multiply a couple of colors? No more." />

<title>ColorBlendy - Blend colors with different modes like multiply, overlay, dodge.</title>
Expand Down
14 changes: 9 additions & 5 deletions static/js/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ function set_mode(mode) {

$(document).ready(function() {
var r = $("form:first").submit(function() {
render_blend(); $('#color-blended').select(); reset_pickers(); return false;
render_blend(); reset_pickers();
body.enableTextSelect();
$('#color-blended').select();
return false;
});
$("input[readonly!=readonly]", r).change(function() {
render_blend(); reset_pickers();
Expand Down Expand Up @@ -84,8 +87,7 @@ $(document).ready(function() {
}
o.container.show();
active_picker = o;
$(this).select();
}).blur(function(e) {
}).blur(function(e){
if(!active_picker || changing_picker) return;
active_picker.container.hide();
active_picker = false;
Expand All @@ -102,7 +104,9 @@ $(document).ready(function() {
render_blend();
});

o.add_listener('dragstart', function(e) { body.disableTextSelect(); changing_picker = true; changed_picker = true; });
o.add_listener('dragstart', function(e) {
console.log('dragstart');
body.disableTextSelect(); changing_picker = true; changed_picker = true; });
o.add_listener('dragstop', function (e) { body.enableTextSelect(); changing_picker = false; });
});

Expand Down Expand Up @@ -138,7 +142,7 @@ $(document).ready(function() {
} else if (e.which == 9) { // Tab
if($(e.target).attr("tabindex") == "3") {
e.preventDefault();
$("input[tabindex=1]").focus();
$("input[tabindex=1]").focus(); // Prevent escaping to the chrome
}
}
});
Expand Down

0 comments on commit 07ad75f

Please sign in to comment.