diff options
| -rw-r--r-- | photoblaster/config.py | 2 | ||||
| -rwxr-xr-x | share/frontend/im/index.html | 2 | ||||
| -rw-r--r-- | share/frontend/im/js/main.js | 13 |
3 files changed, 11 insertions, 6 deletions
diff --git a/photoblaster/config.py b/photoblaster/config.py index 440c819..8712910 100644 --- a/photoblaster/config.py +++ b/photoblaster/config.py @@ -6,7 +6,7 @@ if os.environ.get("PB_PRODUCTION"): MAX_SIZE = 1024 * 1024 * 1.2 * 1.5 if LOCAL: - MAX_SIZE = 1024 * 1024 * 1.2 * 12 + MAX_SIZE = 1024 * 1024 * 1.2 * 18 # PATHS BIN_CONVERT = "/usr/bin/convert" diff --git a/share/frontend/im/index.html b/share/frontend/im/index.html index 8170b6c..9bb71eb 100755 --- a/share/frontend/im/index.html +++ b/share/frontend/im/index.html @@ -235,7 +235,7 @@ </div> <div id="result"> - → <input type="text" id="output-url"/><br/> + <span id="result-rarr">→ </span><input type="text" id="output-url"/><br/> <span id="output-cmd"></span><br/> <img id="output-img" /> diff --git a/share/frontend/im/js/main.js b/share/frontend/im/js/main.js index 36ae071..e1fa59e 100644 --- a/share/frontend/im/js/main.js +++ b/share/frontend/im/js/main.js @@ -1,4 +1,4 @@ -var Main = +window.Main = { API_HEADER: "#@im", generating: false, @@ -56,23 +56,27 @@ var Main = data: form, success: function(data){ Main.callback(data) }, error: function(data){ + console.log("in error") switch(data.status){ case 500: - alert("Problem with server") + Main.error("Problem with server") console.log(data) break; case 410: - alert(JSON.parse(data.responseText).message) + Main.error(JSON.parse(data.responseText).message) break; default: + Main.error("Something went wrong") console.log(data) } Main.generating = false + Main.init() } }); }, error: function (s) { + $("#result-rarr").hide() $("#output-cmd").html("<span class='error'>ERROR: " + s + "</span>").show() $("#output-url").hide() $("#output-img").hide() @@ -80,10 +84,11 @@ var Main = callback: function (data) { Main.generating = false + $("#result-rarr").show() $("#output-cmd").html("size: "+Main.filesize(data.size)+"<br/>" + data.width + " x " + data.height); - $("#output-url").val(data.url); + $("#output-url").show().val(data.url); $("#output-img").hide().attr("src", data.url).fadeIn(700) $("#sendtoinput").html(" send to input <img src=\"img/arrow_pointing_left.png\"/> ").css({"border": "1px solid gray", "cursor" : "pointer"}).click(function(){ $("#img-url").val(data.url); |
