From 0c2554a5a2c3aebf3e99d70fee2075a9b99f9abe Mon Sep 17 00:00:00 2001 From: gebele Date: Mon, 4 Mar 2013 10:28:02 +0100 Subject: first commit --- public/JME.class | Bin 0 -> 26321 bytes public/JME.jar | Bin 0 -> 38760 bytes public/images/arrow_down_float.png | Bin 0 -> 618 bytes public/images/arrow_left_float.png | Bin 0 -> 647 bytes public/images/gray_jean.png | Bin 0 -> 13475 bytes public/javascripts/toxcreate.js | 240 +++++++++++++++++++++++++++++++++++++ public/stylesheets/screen.css | 1 + public/stylesheets/screen.sass | 124 +++++++++++++++++++ 8 files changed, 365 insertions(+) create mode 100644 public/JME.class create mode 100644 public/JME.jar create mode 100644 public/images/arrow_down_float.png create mode 100644 public/images/arrow_left_float.png create mode 100644 public/images/gray_jean.png create mode 100644 public/javascripts/toxcreate.js create mode 100644 public/stylesheets/screen.css create mode 100644 public/stylesheets/screen.sass (limited to 'public') diff --git a/public/JME.class b/public/JME.class new file mode 100644 index 0000000..9efda0e Binary files /dev/null and b/public/JME.class differ diff --git a/public/JME.jar b/public/JME.jar new file mode 100644 index 0000000..d571682 Binary files /dev/null and b/public/JME.jar differ diff --git a/public/images/arrow_down_float.png b/public/images/arrow_down_float.png new file mode 100644 index 0000000..2466c8f Binary files /dev/null and b/public/images/arrow_down_float.png differ diff --git a/public/images/arrow_left_float.png b/public/images/arrow_left_float.png new file mode 100644 index 0000000..07b7b14 Binary files /dev/null and b/public/images/arrow_left_float.png differ diff --git a/public/images/gray_jean.png b/public/images/gray_jean.png new file mode 100644 index 0000000..355fba2 Binary files /dev/null and b/public/images/gray_jean.png differ diff --git a/public/javascripts/toxcreate.js b/public/javascripts/toxcreate.js new file mode 100644 index 0000000..ef2a953 --- /dev/null +++ b/public/javascripts/toxcreate.js @@ -0,0 +1,240 @@ +$(function() { + + jQuery.fn.toggleWarnings = function(id) { + var id = id; + this.bind("click", function() { + if($("a#show_model_" + id + "_warnings").html()=="show") { + $("div#model_" + id + "_warnings").slideDown("slow"); + $("a#show_model_" + id + "_warnings").html("hide"); + }else{ + $("div#model_" + id + "_warnings").slideUp("slow"); + $("a#show_model_" + id + "_warnings").html("show"); + } + return false; + }); + }; + + trim = function() { + return this.replace(/^\s+|\s+$/g, ''); + } + + checkStati = function(stati) { + stati = stati.split(", "); + $("body") + var newstati = new Array; + $.each(stati, function(){ + checkProgress(this); + if(checkStatus(this) > 0) newstati.push(this); + }); + if (newstati.length > 0) var statusCheck = setTimeout('checkStati("' + newstati.join(", ") + '")',10000); + }; + + checkStatus = function(id) { + if(id == "") return -1; + var opts = {method: 'get', action: 'model/' + id + '/status', id: id}; + var status_changed = $.ajax({ + type: opts.method, + url: opts.action, + async: false, + dataType: 'html', + data: { + '_method': 'get' + }, + success: function(data) { + var status_before = ""; + if ($("span#model_" + id + "_status") != null) status_before = $("span#model_" + id + "_status").html().trim(); + if (status_before == "Deleting") return -1; + var status_after = data.trim(); + $("span#model_" + id + "_status").animate({"opacity": "0.2"},1000); + $("span#model_" + id + "_status").animate({"opacity": "1"},1000); + if( status_before != status_after) { + $("span#model_" + id + "_status").html(data); + loadModel(id, 'model'); + if (status_after == "Completed" || status_after == "Error") id = -1; + } + }, + error: function(data) { + //alert("status check error"); + id = -1; + } + }); + return id; + }; + + + checkProgress = function(id) { + var task = $("input#model_" + id + "_task").attr('value'); + var opts = {action: task + "/percentageCompleted" , id: id}; + var progress_changed = $.ajax({ + url: opts.action, + async: false, + dataType: 'html', + data: { + '_method': 'get' + }, + success: function(data) { + var progress = data.trim(); + if (progress == "100") return -1; + $("div#model_" + id + "_progress").progressbar("value", parseInt(progress)); + $("div#model_" + id + "_progress").attr({title: parseInt(progress) + "%"}); + }, + error: function(data) { + id = -1; + } + }); + return id; + }; + + loadModel = function(id, view) { + if(id == "") return -1; + var opts = {method: 'get', action: 'model/' + id + '/' + view, view: view }; + var out = id; + $.ajax({ + type: opts.method, + url: opts.action, + dataType: 'html', + data: { + '_method': 'get' + }, + success: function(data) { + if (view == "model") $("div#model_" + id).html(data); + if (view.match(/validation/)) $("dl#model_validation_" + id).html(data); + addExternalLinks(); + }, + error: function(data) { + //alert("loadModel error"); + } + }); + return false; + }; + +}); + +jQuery.fn.editModel = function(options) { + var defaults = { + method: 'get', + action: this.attr('href'), + trigger_on: 'click' + }; + var opts = $.extend(defaults, options); + this.bind(opts.trigger_on, function() { + $.ajax({ + type: opts.method, + url: opts.action, + dataType: 'html', + data: { + '_method': 'get' + }, + success: function(data) { + $("div#model_" + opts.id + "_name").html(data); + $("input#model_" + opts.id + "_name").focus(); + }, + error: function(data) { + alert("model edit error!"); + } + }); + return false; + }); +}; + +jQuery.fn.cancelEdit = function(options) { + var defaults = { + method: 'get', + action: 'model/' + options.id + '/name?mode=show', + trigger_on: 'click' + }; + var opts = $.extend(defaults, options); + + this.bind(opts.trigger_on, function() { + $.ajax({ + type: opts.method, + url: opts.action, + dataType: 'html', + data: { + '_method': 'get' + }, + success: function(data) { + $("div#model_" + opts.id + "_name").html(data); + }, + error: function(data) { + alert("model cancel error!"); + } + }); + return false; + }); +}; + +jQuery.fn.saveModel = function(options) { + var defaults = { + method: 'put', + action: 'model/' + options.id, + trigger_on: 'click' + }; + var opts = $.extend(defaults, options); + + this.bind(opts.trigger_on, function() { + var name = $("input#model_" + opts.id + "_name").val(); + $.ajax({ + type: opts.method, + url: opts.action, + dataType: 'html', + data: { + '_method': 'put', + 'name': name + }, + success: function(data) { + $("div#model_" + opts.id + "_name").html(data); + }, + error: function(data) { + alert("model save error!"); + } + }); + return false; + }); +}; + + +jQuery.fn.deleteModel = function(type, options) { + var defaults = { + method: 'post', + action: this.attr('href'), + confirm_message: 'Are you sure?', + trigger_on: 'click' + }; + var opts = $.extend(defaults, options); + this.bind(opts.trigger_on, function() { + if(confirm(opts.confirm_message)) { + $("div#model_" + opts.id).fadeTo("slow",0.5); + $("span#model_" + opts.id + "_status").html("Deleting"); + $("a#delete_" + opts.id).html(""); + $.ajax({ + type: opts.method, + url: opts.action, + dataType: 'html', + data: { + '_method': 'delete' + }, + success: function(data) { + $("div#model_" + opts.id).fadeTo("slow",0).slideUp("slow").remove(); + }, + error: function(data) { + $("span#model_" + opts.id + "_status").html("Delete Error"); + //alert("model delete error!"); + } + }); + } + return false; + }); +}; + +$(document).ready(function() { + addExternalLinks(); +}); + +addExternalLinks = function() { + $('A[rel="external"]').each(function() { + $(this).attr('alt', 'Link opens in new window.'); + $(this).attr('title', 'Link opens in new window.'); + $(this).attr('target', '_blank'); + }); +}; diff --git a/public/stylesheets/screen.css b/public/stylesheets/screen.css new file mode 100644 index 0000000..adc0596 --- /dev/null +++ b/public/stylesheets/screen.css @@ -0,0 +1 @@ +body{background-image:url("/images/gray_jean.png");background-color:#ccf;overflow:scroll;font-family:sans-serif;margin:1em;min-width:800px;min-heigth:600px}body a{text-decoration:none;font-weight:bold;color:#000}.logo{text-align:right;font-size:1.5em;text-shadow:#b9dcff 2px 2px}.info{background-color:#b9dcff;margin:1em 0;padding:10px;text-align:center;-moz-border-radius-bottomleft:25px;-webkit-border-bottom-left-radius:25px;border-bottom-left-radius:25px;-moz-border-radius-bottomright:25px;-webkit-border-bottom-right-radius:25px;border-bottom-right-radius:25px;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(70%, #b9dcff));background-image:-webkit-linear-gradient(#ffffff,#b9dcff 70%);background-image:-moz-linear-gradient(#ffffff,#b9dcff 70%);background-image:-o-linear-gradient(#ffffff,#b9dcff 70%);background-image:linear-gradient(#ffffff,#b9dcff 70%);-webkit-box-shadow:1px 1px 1px #fff inset,-1px -1px 1px rgba(0,0,0,0.3) inset;-moz-box-shadow:1px 1px 1px #fff inset,-1px -1px 1px rgba(0,0,0,0.3) inset;box-shadow:1px 1px 1px #fff inset,-1px -1px 1px rgba(0,0,0,0.3) inset}.content{background-image:url("/images/gray_jean.png")}.content h1{margin:0.3em;text-shadow:#fff 0 1px 0;font-size:x-large;font-family:monospace}.content h2{text-shadow:#fff 0 1px 0;font-size:x-large;font-family:monospace}.content .arrow{margin:5px 0px 5px 20px}.content .back{display:inline}.content .close{text-align:right}.content fieldset#top{border:0;margin-top:5em;padding:10px;background-color:#b9dcff;-moz-border-radius-topleft:25px;-webkit-border-top-left-radius:25px;border-top-left-radius:25px;-moz-border-radius-topright:25px;-webkit-border-top-right-radius:25px;border-top-right-radius:25px;-webkit-background-clip:border;-moz-background-clip:border;background-clip:border-box;-webkit-box-shadow:1px 1px 1px #fff inset,-1px -1px 1px rgba(0,0,0,0.3) inset;-moz-box-shadow:1px 1px 1px #fff inset,-1px -1px 1px rgba(0,0,0,0.3) inset;box-shadow:1px 1px 1px #fff inset,-1px -1px 1px rgba(0,0,0,0.3) inset}.content fieldset#top draw{display:block}.content fieldset#middle{border:0;padding:10px;background-color:#b9dcff;-webkit-box-shadow:1px 1px 1px #fff inset,-1px -1px 1px rgba(0,0,0,0.3) inset;-moz-box-shadow:1px 1px 1px #fff inset,-1px -1px 1px rgba(0,0,0,0.3) inset;box-shadow:1px 1px 1px #fff inset,-1px -1px 1px rgba(0,0,0,0.3) inset}.content .model{display:inline;margin:1em}.content fieldset#bottom{border:0;background-color:#b9dcff;padding:10px;margin-bottom:5em;-webkit-box-shadow:1px 1px 1px #fff inset,-1px -1px 1px rgba(0,0,0,0.3) inset;-moz-box-shadow:1px 1px 1px #fff inset,-1px -1px 1px rgba(0,0,0,0.3) inset;box-shadow:1px 1px 1px #fff inset,-1px -1px 1px rgba(0,0,0,0.3) inset;-moz-border-radius-bottomleft:25px;-webkit-border-bottom-left-radius:25px;border-bottom-left-radius:25px;-moz-border-radius-bottomright:25px;-webkit-border-bottom-right-radius:25px;border-bottom-right-radius:25px;-webkit-background-clip:border;-moz-background-clip:border;background-clip:border-box}.content .predictions{background-color:#b9dcff;padding:10px;text-align:justify;margin:0.3em;-webkit-box-shadow:1px 1px 1px #fff inset,-1px -1px 1px rgba(0,0,0,0.3) inset;-moz-box-shadow:1px 1px 1px #fff inset,-1px -1px 1px rgba(0,0,0,0.3) inset;box-shadow:1px 1px 1px #fff inset,-1px -1px 1px rgba(0,0,0,0.3) inset;-moz-border-radius-topleft:25px;-webkit-border-top-left-radius:25px;border-top-left-radius:25px;-moz-border-radius-bottomleft:25px;-webkit-border-bottom-left-radius:25px;border-bottom-left-radius:25px;-moz-border-radius-topright:25px;-webkit-border-top-right-radius:25px;border-top-right-radius:25px;-moz-border-radius-bottomright:25px;-webkit-border-bottom-right-radius:25px;border-bottom-right-radius:25px;-webkit-background-clip:border;-moz-background-clip:border;background-clip:border-box}.content .was{margin-top:2em;padding:1em;background-image:url("/images/gray_jean.png");-webkit-box-shadow:1px 1px 1px #fff inset,-1px -1px 1px rgba(0,0,0,0.3) inset;-moz-box-shadow:1px 1px 1px #fff inset,-1px -1px 1px rgba(0,0,0,0.3) inset;box-shadow:1px 1px 1px #fff inset,-1px -1px 1px rgba(0,0,0,0.3) inset;-moz-border-radius-topleft:25px;-webkit-border-top-left-radius:25px;border-top-left-radius:25px;-moz-border-radius-bottomleft:25px;-webkit-border-bottom-left-radius:25px;border-bottom-left-radius:25px;-moz-border-radius-topright:25px;-webkit-border-top-right-radius:25px;border-top-right-radius:25px;-moz-border-radius-bottomright:25px;-webkit-border-bottom-right-radius:25px;border-bottom-right-radius:25px;-webkit-background-clip:border;-moz-background-clip:border;background-clip:border-box}.content .results{margin-top:2em;padding:1em;background-image:url("/images/gray_jean.png");-webkit-box-shadow:1px 1px 1px #fff inset,-1px -1px 1px rgba(0,0,0,0.3) inset;-moz-box-shadow:1px 1px 1px #fff inset,-1px -1px 1px rgba(0,0,0,0.3) inset;box-shadow:1px 1px 1px #fff inset,-1px -1px 1px rgba(0,0,0,0.3) inset;-moz-border-radius-topleft:25px;-webkit-border-top-left-radius:25px;border-top-left-radius:25px;-moz-border-radius-bottomleft:25px;-webkit-border-bottom-left-radius:25px;border-bottom-left-radius:25px;-moz-border-radius-topright:25px;-webkit-border-top-right-radius:25px;border-top-right-radius:25px;-moz-border-radius-bottomright:25px;-webkit-border-bottom-right-radius:25px;border-bottom-right-radius:25px;-webkit-background-clip:border;-moz-background-clip:border;background-clip:border-box}.footer{margin:20px 0 20px 0} diff --git a/public/stylesheets/screen.sass b/public/stylesheets/screen.sass new file mode 100644 index 0000000..3c5e48c --- /dev/null +++ b/public/stylesheets/screen.sass @@ -0,0 +1,124 @@ +//@import compass/reset, compass/css3, compass/utilities, compass/layout +@import compass/css3 + +//$bg-color: #C5C1A4 +$bg-color: #CCCCFF +$bg-color-div: #C5C1E4 +//$border: 2px solid #C5C1A4 +$ist-blue: #B9DCFF + +body + background-image: url("/images/gray_jean.png") + background-color: $bg-color + overflow: scroll + font-family: sans-serif + margin: 1em + min-width: 800px + min-heigth: 600px + + a + text-decoration: none + font-weight: bold + color: black + +.logo + text-align: right + font-size: 1.5em + +text-shadow($ist-blue 2px 2px) + +.info + background-color: $ist-blue + margin: 1em 0 + padding: 10px + text-align: center + +border-bottom-left-radius(25px) + +border-bottom-right-radius(25px) + +background-image(linear-gradient(#FFFFFF, $ist-blue 70%)) + +box-shadow(1px 1px 1px rgba(white, 1) inset, -1px -1px 1px rgba(black, 0.3) inset) + +.content + + background-image: url("/images/gray_jean.png") + + h1 + margin: 0.3em + text-shadow: #FFF 0 1px 0 + font-size: x-large + font-family: monospace + + h2 + text-shadow: #FFF 0 1px 0 + font-size: x-large + font-family: monospace + + .arrow + margin: 5px 0px 5px 20px + + .back + display: inline + + .close + text-align: right + + fieldset#top + border: 0 + margin-top: 5em + padding: 10px + background-color: $ist-blue + +border-top-left-radius(25px) + +border-top-right-radius(25px) + +background-clip(border-box) + +box-shadow(1px 1px 1px rgba(white, 1) inset, -1px -1px 1px rgba(black, 0.3) inset) + draw + display: block + + fieldset#middle + border: 0 + padding: 10px + background-color: $ist-blue + +box-shadow(1px 1px 1px rgba(white, 1) inset, -1px -1px 1px rgba(black, 0.3) inset) + + .model + display: inline + margin: 1em + + fieldset#bottom + border: 0 + background-color: $ist-blue + padding: 10px + margin-bottom: 5em + +box-shadow(1px 1px 1px rgba(white, 1) inset, -1px -1px 1px rgba(black, 0.3) inset) + +border-bottom-left-radius(25px) + +border-bottom-right-radius(25px) + +background-clip(border-box) + + .predictions + background-color: $ist-blue + padding: 10px + text-align: justify + margin: 0.3em + +box-shadow(1px 1px 1px rgba(white, 1) inset, -1px -1px 1px rgba(black, 0.3) inset) + +border-left-radius(25px) + +border-right-radius(25px) + +background-clip(border-box) + + .was + margin-top: 2em + padding: 1em + background-image: url("/images/gray_jean.png") + +box-shadow(1px 1px 1px rgba(white, 1) inset, -1px -1px 1px rgba(black, 0.3) inset) + +border-left-radius(25px) + +border-right-radius(25px) + +background-clip(border-box) + + .results + margin-top: 2em + padding: 1em + background-image: url("/images/gray_jean.png") + +box-shadow(1px 1px 1px rgba(white, 1) inset, -1px -1px 1px rgba(black, 0.3) inset) + +border-left-radius(25px) + +border-right-radius(25px) + +background-clip(border-box) + +.footer + margin: 20px 0 20px 0 -- cgit v1.2.3