From 9433b20670a1eada77e1a4372a8f8ccad6f499c3 Mon Sep 17 00:00:00 2001 From: jules Date: Sat, 25 Jan 2014 23:24:36 -0500 Subject: split out help and whatever else --- shader-api.html | 3 +++ 1 file changed, 3 insertions(+) (limited to 'shader-api.html') diff --git a/shader-api.html b/shader-api.html index aa9d1a6..416f21a 100644 --- a/shader-api.html +++ b/shader-api.html @@ -86,6 +86,7 @@ a { color: #00f; } + @@ -109,6 +110,7 @@ function init(){ $("#pause").click(pause) user.init() + help.init() shader_gallery.init() document.getElementById('shader').addEventListener('input', shader_build); @@ -120,3 +122,4 @@ function init(){ +- \ No newline at end of file -- cgit v1.2.3-70-g09d2 From e873e6c1b0d2f4e06b94138a22d0d4292c52a037 Mon Sep 17 00:00:00 2001 From: jules Date: Sat, 25 Jan 2014 23:42:19 -0500 Subject: logging, error fix, css --- js/api/set.js | 4 ++++ js/error.highlight.js | 2 +- shader-api.html | 10 +++++++++- shader-picker.html | 10 ++++++---- 4 files changed, 20 insertions(+), 6 deletions(-) (limited to 'shader-api.html') diff --git a/js/api/set.js b/js/api/set.js index 92cc071..8732c87 100644 --- a/js/api/set.js +++ b/js/api/set.js @@ -10,14 +10,17 @@ function save_shader(){ } var blob = dataUriToBlob(cc.clone().resize(200,200).canvas.toDataURL("image/png")) + status('saving..') console.log(params) $.post("http://asdf.us/cgi-bin/im/shader/save", params, function(resp){ console.log(resp); data = JSON.parse(resp) if (data.ERROR){ + status('error saving shader') alert(data.ERROR) return false } + status('uploading thumbnail') if (! shader_id_root) { shader_id_root = data.id; } @@ -40,6 +43,7 @@ function save_shader(){ contentType: false, }).done(function(resp){ console.log(resp); + status('') var data = JSON.parse(resp) if (data.success) { $shader.find("img").attr("src", data.url) diff --git a/js/error.highlight.js b/js/error.highlight.js index 0b478e2..f46d0ec 100644 --- a/js/error.highlight.js +++ b/js/error.highlight.js @@ -136,7 +136,7 @@ var init = function(){ create_el_highlight() create_el_textmeasure() scrollbar_width = calc_scrollbar_width() - textarea.addEventListener('scroll', reposition_highlight) + dom.textarea.addEventListener('scroll', reposition_highlight) } // exports diff --git a/shader-api.html b/shader-api.html index 416f21a..b860093 100644 --- a/shader-api.html +++ b/shader-api.html @@ -16,6 +16,13 @@ form { display: inline-block; } #shader-name { width: 75px; } #shader-id { width: 40px; } a { color: #00f; } +#help { float: right; } +.dragging { cursor: -webkit-grabbing !important; } +#instructions { position: absolute;top:20px;right:20px; width:190px;height:465px; box-shadow:5px 5px 10px rgba(0,0,0,0.3); background:rgba(255,255,255,0.8); display: none; cursor: -webkit-grab; } +#instructions iframe {width: 100%;height:100%;margin:0;padding:0;border:0;} +#instructions.dragging iframe { pointer-events: none; } +#instructions .close { position: absolute; top: 5px; right: 5px; color: #f00; padding: 3px; border: 0;background: white; font-size: 10px; line-height: 10px; } + @@ -35,6 +42,7 @@ a { color: #00f; } -->
+ @@ -74,6 +82,7 @@ a { color: #00f; } + @@ -122,4 +131,3 @@ function init(){ -- \ No newline at end of file diff --git a/shader-picker.html b/shader-picker.html index 0896609..7efe39f 100644 --- a/shader-picker.html +++ b/shader-picker.html @@ -130,6 +130,12 @@ a { color: #00f; } + + + - -- cgit v1.2.3-70-g09d2 From 9f1b5a177eee98f64e7581756cd5fdc7635691ca Mon Sep 17 00:00:00 2001 From: jules Date: Sun, 26 Jan 2014 00:58:01 -0500 Subject: css shakeup --- js/gallery.js | 1 + shader-api.html | 1 + shader-combo.html | 57 ++++++++++++++++++++++++++++++++++++++++++------------- 3 files changed, 46 insertions(+), 13 deletions(-) (limited to 'shader-api.html') diff --git a/js/gallery.js b/js/gallery.js index a9430fc..b9acfc0 100644 --- a/js/gallery.js +++ b/js/gallery.js @@ -46,6 +46,7 @@ gallery.image = function(im){ $(thumb.canvas).show() }) $(img).click(gallery.choose); + $("#persist-image").attr("checked", false) } try { img.src = im.url; } catch(e){ return; } diff --git a/shader-api.html b/shader-api.html index b860093..dc96762 100644 --- a/shader-api.html +++ b/shader-api.html @@ -79,6 +79,7 @@ a { color: #00f; }
+
diff --git a/shader-combo.html b/shader-combo.html index aa6edd2..6d402da 100644 --- a/shader-combo.html +++ b/shader-combo.html @@ -3,28 +3,50 @@ @@ -43,8 +65,9 @@ a { color: #00f; } | - - | + + + @@ -53,16 +76,14 @@ a { color: #00f; } - + - -
@@ -79,11 +100,21 @@ a { color: #00f; } + +
+ + + +
+ +
+
+
@@ -148,14 +179,14 @@ function init(){ $("#shader-api-form").show() $(".bold").removeClass("bold") $(this).addClass("bold") - }).trigger("click") + }) // .trigger("click") $("#toggle-images").click(function(){ $("#header .form").hide() $("#gallery-form").show() $(".bold").removeClass("bold") $(this).addClass("bold") }) - $("#toggle-off").click(function(){ + $(".toggle-off").click(function(){ $("#header .form").hide() $(".bold").removeClass("bold") }) -- cgit v1.2.3-70-g09d2