diff --git a/webapp/index.html b/webapp/index.html new file mode 100644 index 000000000..f44a1a92f --- /dev/null +++ b/webapp/index.html @@ -0,0 +1,342 @@ + + + + + + + + + Tabula + + + + + + + + + + + + + + + + + + +


+
+ +
+ + + +
+ + + + + + + + + + + + + + + + + + +
+ + diff --git a/webapp/static/css/imgareaselect-default.css b/webapp/static/css/imgareaselect-default.css index bd601ea76..f17d32789 100644 --- a/webapp/static/css/imgareaselect-default.css +++ b/webapp/static/css/imgareaselect-default.css @@ -25,17 +25,24 @@ } .imgareaselect-box{ - /* placeholder */ +/* these properties moved to imgareaselect-area -JBM 8/16/14 + background-color: #000; + filter: alpha(opacity=50); + opacity: 0.3; +*/ +} +.imgareaselect-area{ background-color: #000; filter: alpha(opacity=50); opacity: 0.3; + overflow: hidden; } .imgareaselect-handle { background-color: #fff; border: solid 1px #000; filter: alpha(opacity=50); - opacity: 0.5; + opacity: 0.3; } .imgareaselect-outer { diff --git a/webapp/static/css/tabula_web.css b/webapp/static/css/tabula_web.css index f1f024ffa..d22c18c1e 100644 --- a/webapp/static/css/tabula_web.css +++ b/webapp/static/css/tabula_web.css @@ -99,8 +99,17 @@ display: none; } + .advanced-options-shown #advanced-options{ + display: block; + } + + .advanced-options-shown #basic-options .show-advanced-options{ + display: none; + } + .toggle-advanced-options{ cursor: select; + color: #666; } #data-modal .modal-body { @@ -171,6 +180,13 @@ top: 10px !important; } +/* selections */ +.repeat-lassos.btn { + position: absolute; + right: -165px; + bottom: -35px; +} + /* front page */ ul#uploadedfiles { diff --git a/webapp/static/js/ZeroClipboard.js b/webapp/static/js/ZeroClipboard.js deleted file mode 100644 index 4968be9d2..000000000 --- a/webapp/static/js/ZeroClipboard.js +++ /dev/null @@ -1,303 +0,0 @@ -/*! - * zeroclipboard - * The Zero Clipboard library provides an easy way to copy text to the clipboard using an invisible Adobe Flash movie, and a JavaScript interface. - * Copyright 2012 Jon Rohan, James M. Greene, . - * Released under the MIT license - * http://jonrohan.github.com/ZeroClipboard/ - * v1.1.0 - */(function() { - "use strict"; - var ZeroClipboard = {}; - ZeroClipboard.Client = function(query) { - if (ZeroClipboard._client) return ZeroClipboard._client; - this.handlers = {}; - if (ZeroClipboard.detectFlashSupport()) this.bridge(); - if (query) this.glue(query); - ZeroClipboard._client = this; - }; - function _elementMouseOver() { - ZeroClipboard._client.setCurrent(this); - } - ZeroClipboard.Client.prototype.glue = function(query) { - function _addEventHandler(element, method, func) { - if (element.addEventListener) { - element.addEventListener(method, func, false); - } else if (element.attachEvent) { - element.attachEvent(method, func); - } - } - var elements = ZeroClipboard.$(query); - for (var i = 0; i < elements.length; i++) { - _addEventHandler(elements[i], "mouseover", _elementMouseOver); - } - }; - ZeroClipboard.Client.prototype.unglue = function(query) { - function _removeEventHandler(element, method, func) { - if (element.removeEventListener) { - element.removeEventListener(method, func, false); - } else if (element.detachEvent) { - element.detachEvent(method, func); - } - } - var elements = ZeroClipboard.$(query); - for (var i = 0; i < elements.length; i++) { - _removeEventHandler(elements[i], "mouseover", _elementMouseOver); - } - }; - ZeroClipboard.Client.prototype.bridge = function() { - this.htmlBridge = ZeroClipboard.$("#global-zeroclipboard-html-bridge"); - if (this.htmlBridge.length) { - this.htmlBridge = this.htmlBridge[0]; - this.flashBridge = document["global-zeroclipboard-flash-bridge"]; - return; - } - function noCache(path) { - return (path.indexOf("?") >= 0 ? "&" : "?") + "nocache=" + (new Date).getTime(); - } - var html = ' '; - this.htmlBridge = document.createElement("div"); - this.htmlBridge.id = "global-zeroclipboard-html-bridge"; - this.htmlBridge.setAttribute("class", "global-zeroclipboard-container"); - this.htmlBridge.setAttribute("data-clipboard-ready", false); - this.htmlBridge.style.position = "absolute"; - this.htmlBridge.style.left = "-9999px"; - this.htmlBridge.style.top = "-9999px"; - this.htmlBridge.style.width = "15px"; - this.htmlBridge.style.height = "15px"; - this.htmlBridge.style.zIndex = "9999"; - this.htmlBridge.innerHTML = html; - document.body.appendChild(this.htmlBridge); - this.flashBridge = document["global-zeroclipboard-flash-bridge"]; - }; - ZeroClipboard.Client.prototype.resetBridge = function() { - this.htmlBridge.style.left = "-9999px"; - this.htmlBridge.style.top = "-9999px"; - this.htmlBridge.removeAttribute("title"); - this.htmlBridge.removeAttribute("data-clipboard-text"); - ZeroClipboard.currentElement.removeClass("zeroclipboard-is-active"); - delete ZeroClipboard.currentElement; - }; - ZeroClipboard.Client.prototype.ready = function() { - return !!this.htmlBridge.getAttribute("data-clipboard-ready"); - }; - function _getCursor(el) { - var y = el.style.cursor; - if (el.currentStyle) y = el.currentStyle.cursor; else if (window.getComputedStyle) y = document.defaultView.getComputedStyle(el, null).getPropertyValue("cursor"); - if (y == "auto") { - var possiblePointers = [ "a" ]; - for (var i = 0; i < possiblePointers.length; i++) { - if (el.tagName.toLowerCase() == possiblePointers[i]) { - return "pointer"; - } - } - } - return y; - } - ZeroClipboard.Client.prototype.setCurrent = function(element) { - ZeroClipboard.currentElement = element; - this.reposition(); - if (element.getAttribute("data-clipboard-text")) { - this.setText(element.getAttribute("data-clipboard-text")); - } - if (element.getAttribute("title")) { - this.setTitle(element.getAttribute("title")); - } - if (_getCursor(element) == "pointer") { - this.setHandCursor(true); - } else { - this.setHandCursor(false); - } - }; - ZeroClipboard.Client.prototype.reposition = function() { - var pos = $(ZeroClipboard.currentElement).offset(); - pos.height = $(ZeroClipboard.currentElement).outerHeight(); - pos.width = $(ZeroClipboard.currentElement).outerWidth(); - this.htmlBridge.style.top = pos.top + "px"; - this.htmlBridge.style.left = pos.left + "px"; - this.htmlBridge.style.width = pos.width + "px"; - this.htmlBridge.style.height = pos.height + "px"; - this.htmlBridge.style.zIndex = 9999; - this.setSize(pos.width, pos.height); - }; - ZeroClipboard.Client.prototype.setText = function(newText) { - if (newText && newText !== "") { - this.htmlBridge.setAttribute("data-clipboard-text", newText); - if (this.ready()) this.flashBridge.setText(newText); - } - }; - ZeroClipboard.Client.prototype.setTitle = function(newTitle) { - if (newTitle && newTitle !== "") this.htmlBridge.setAttribute("title", newTitle); - }; - ZeroClipboard.Client.prototype.setSize = function(width, height) { - if (this.ready()) this.flashBridge.setSize(width, height); - }; - ZeroClipboard.Client.prototype.setHandCursor = function(enabled) { - if (this.ready()) this.flashBridge.setHandCursor(enabled); - }; - ZeroClipboard.version = "1.1.0"; - ZeroClipboard.moviePath = "ZeroClipboard.swf"; - ZeroClipboard._client = null; - ZeroClipboard.setMoviePath = function(path) { - this.moviePath = path; - }; - ZeroClipboard.destroy = function() { - var query = ZeroClipboard.$("#global-zeroclipboard-html-bridge"); - if (!query.length) return; - delete ZeroClipboard._client; - var bridge = query[0]; - bridge.parentNode.removeChild(bridge); - }; - ZeroClipboard.detectFlashSupport = function() { - var hasFlash = false; - try { - if (new ActiveXObject("ShockwaveFlash.ShockwaveFlash")) { - hasFlash = true; - } - } catch (error) { - if (navigator.mimeTypes["application/x-shockwave-flash"]) { - hasFlash = true; - } - } - return hasFlash; - }; - ZeroClipboard.dispatch = function(eventName, args) { - ZeroClipboard._client.receiveEvent(eventName, args); - }; - ZeroClipboard.Client.prototype.on = function(eventName, func) { - var events = eventName.toString().split(/\s/g); - for (var i = 0; i < events.length; i++) { - eventName = events[i].toLowerCase().replace(/^on/, ""); - if (!this.handlers[eventName]) this.handlers[eventName] = []; - this.handlers[eventName].push(func); - } - if (this.handlers.noflash && !ZeroClipboard.detectFlashSupport()) { - this.receiveEvent("onNoFlash", null); - } - }; - ZeroClipboard.Client.prototype.addEventListener = function(eventName, func) { - this.on(eventName, func); - }; - ZeroClipboard.Client.prototype.receiveEvent = function(eventName, args) { - eventName = eventName.toString().toLowerCase().replace(/^on/, ""); - switch (eventName) { - case "load": - if (args && parseFloat(args.flashVersion.replace(",", ".").replace(/[^0-9\.]/gi, "")) < 10) { - this.receiveEvent("onWrongFlash", { - flashVersion: args.flashVersion - }); - return; - } - this.htmlBridge.setAttribute("data-clipboard-ready", true); - break; - case "mouseover": - ZeroClipboard.currentElement.addClass("hover"); - break; - case "mouseout": - ZeroClipboard.currentElement.removeClass("hover"); - this.resetBridge(); - break; - case "mousedown": - ZeroClipboard.currentElement.addClass("active"); - break; - case "mouseup": - ZeroClipboard.currentElement.removeClass("active"); - break; - } - if (this.handlers[eventName]) { - for (var idx = 0, len = this.handlers[eventName].length; idx < len; idx++) { - var func = this.handlers[eventName][idx]; - if (typeof func == "function") { - func(this, args); - } else if (typeof func == "string") { - window[func](this, args); - } - } - } - }; - ZeroClipboard.getDOMObjectPosition = function(obj) { - var info = { - left: 0, - top: 0, - width: obj.width ? obj.width : obj.offsetWidth, - height: obj.height ? obj.height : obj.offsetHeight, - zIndex: 9999 - }; - if (obj.style.zIndex) { - info.zIndex = parseInt(element.style.zIndex, 10); - } - while (obj) { - info.left += obj.offsetLeft; - info.left += obj.style.borderLeftWidth ? parseInt(obj.style.borderLeftWidth, 10) : 0; - info.top += obj.offsetTop; - info.top += obj.style.borderTopWidth ? parseInt(obj.style.borderTopWidth, 10) : 0; - obj = obj.offsetParent; - } - return info; - }; - function elementWrapper(element) { - if (!element || element.addClass) return element; - element.addClass = function(value) { - if (value && typeof value === "string") { - var classNames = (value || "").split(/\s+/); - var elem = this; - if (elem.nodeType === 1) { - if (!elem.className) { - elem.className = value; - } else { - var className = " " + elem.className + " ", setClass = elem.className; - for (var c = 0, cl = classNames.length; c < cl; c++) { - if (className.indexOf(" " + classNames[c] + " ") < 0) { - setClass += " " + classNames[c]; - } - } - elem.className = setClass.replace(/^\s+|\s+$/g, ""); - } - } - } - return this; - }; - element.removeClass = function(value) { - if (value && typeof value === "string" || value === undefined) { - var classNames = (value || "").split(/\s+/); - var elem = this; - if (elem.nodeType === 1 && elem.className) { - if (value) { - var className = (" " + elem.className + " ").replace(/[\n\t]/g, " "); - for (var c = 0, cl = classNames.length; c < cl; c++) { - className = className.replace(" " + classNames[c] + " ", " "); - } - elem.className = className.replace(/^\s+|\s+$/g, ""); - } else { - elem.className = ""; - } - } - } - return this; - }; - return element; - } - ZeroClipboard.$ = function(query) { - var ZeroClipboardSelect = function(s, n) { - return n.querySelectorAll(s); - }, result; - if (typeof Sizzle === "function") { - ZeroClipboardSelect = function(s, n) { - return Sizzle.uniqueSort(Sizzle(s, n)); - }; - } - if (typeof query === "string") { - result = ZeroClipboardSelect(query, document); - if (result.length === 0) result = [ document.getElementById(query) ]; - } - var newresult = []; - for (var i = 0; i < result.length; i++) { - if (result[i] !== null) newresult.push(elementWrapper(result[i])); - } - return newresult; - }; - if (typeof module !== "undefined") { - module.exports = ZeroClipboard; - } else { - window.ZeroClipboard = ZeroClipboard; - } -})(); diff --git a/webapp/static/js/backbone-min.js b/webapp/static/js/backbone-min.js deleted file mode 100644 index 3541019c5..000000000 --- a/webapp/static/js/backbone-min.js +++ /dev/null @@ -1,4 +0,0 @@ -(function(){var t=this;var e=t.Backbone;var i=[];var r=i.push;var s=i.slice;var n=i.splice;var a;if(typeof exports!=="undefined"){a=exports}else{a=t.Backbone={}}a.VERSION="1.0.0";var h=t._;if(!h&&typeof require!=="undefined")h=require("underscore");a.$=t.jQuery||t.Zepto||t.ender||t.$;a.noConflict=function(){t.Backbone=e;return this};a.emulateHTTP=false;a.emulateJSON=false;var o=a.Events={on:function(t,e,i){if(!l(this,"on",t,[e,i])||!e)return this;this._events||(this._events={});var r=this._events[t]||(this._events[t]=[]);r.push({callback:e,context:i,ctx:i||this});return this},once:function(t,e,i){if(!l(this,"once",t,[e,i])||!e)return this;var r=this;var s=h.once(function(){r.off(t,s);e.apply(this,arguments)});s._callback=e;return this.on(t,s,i)},off:function(t,e,i){var r,s,n,a,o,u,c,f;if(!this._events||!l(this,"off",t,[e,i]))return this;if(!t&&!e&&!i){this._events={};return this}a=t?[t]:h.keys(this._events);for(o=0,u=a.length;o").attr(t);this.setElement(e,false)}else{this.setElement(h.result(this,"el"),false)}}});a.sync=function(t,e,i){var r=k[t];h.defaults(i||(i={}),{emulateHTTP:a.emulateHTTP,emulateJSON:a.emulateJSON});var s={type:r,dataType:"json"};if(!i.url){s.url=h.result(e,"url")||U()}if(i.data==null&&e&&(t==="create"||t==="update"||t==="patch")){s.contentType="application/json";s.data=JSON.stringify(i.attrs||e.toJSON(i))}if(i.emulateJSON){s.contentType="application/x-www-form-urlencoded";s.data=s.data?{model:s.data}:{}}if(i.emulateHTTP&&(r==="PUT"||r==="DELETE"||r==="PATCH")){s.type="POST";if(i.emulateJSON)s.data._method=r;var n=i.beforeSend;i.beforeSend=function(t){t.setRequestHeader("X-HTTP-Method-Override",r);if(n)return n.apply(this,arguments)}}if(s.type!=="GET"&&!i.emulateJSON){s.processData=false}if(s.type==="PATCH"&&window.ActiveXObject&&!(window.external&&window.external.msActiveXFilteringEnabled)){s.xhr=function(){return new ActiveXObject("Microsoft.XMLHTTP")}}var o=i.xhr=a.ajax(h.extend(s,i));e.trigger("request",e,o,i);return o};var k={create:"POST",update:"PUT",patch:"PATCH","delete":"DELETE",read:"GET"};a.ajax=function(){return a.$.ajax.apply(a.$,arguments)};var S=a.Router=function(t){t||(t={});if(t.routes)this.routes=t.routes;this._bindRoutes();this.initialize.apply(this,arguments)};var $=/\((.*?)\)/g;var T=/(\(\?)?:\w+/g;var H=/\*\w+/g;var A=/[\-{}\[\]+?.,\\\^$|#\s]/g;h.extend(S.prototype,o,{initialize:function(){},route:function(t,e,i){if(!h.isRegExp(t))t=this._routeToRegExp(t);if(h.isFunction(e)){i=e;e=""}if(!i)i=this[e];var r=this;a.history.route(t,function(s){var n=r._extractParameters(t,s);i&&i.apply(r,n);r.trigger.apply(r,["route:"+e].concat(n));r.trigger("route",e,n);a.history.trigger("route",r,e,n)});return this},navigate:function(t,e){a.history.navigate(t,e);return this},_bindRoutes:function(){if(!this.routes)return;this.routes=h.result(this,"routes");var t,e=h.keys(this.routes);while((t=e.pop())!=null){this.route(t,this.routes[t])}},_routeToRegExp:function(t){t=t.replace(A,"\\$&").replace($,"(?:$1)?").replace(T,function(t,e){return e?t:"([^/]+)"}).replace(H,"(.*?)");return new RegExp("^"+t+"$")},_extractParameters:function(t,e){var i=t.exec(e).slice(1);return h.map(i,function(t){return t?decodeURIComponent(t):null})}});var I=a.History=function(){this.handlers=[];h.bindAll(this,"checkUrl");if(typeof window!=="undefined"){this.location=window.location;this.history=window.history}};var N=/^[#\/]|\s+$/g;var P=/^\/+|\/+$/g;var O=/msie [\w.]+/;var C=/\/$/;I.started=false;h.extend(I.prototype,o,{interval:50,getHash:function(t){var e=(t||this).location.href.match(/#(.*)$/);return e?e[1]:""},getFragment:function(t,e){if(t==null){if(this._hasPushState||!this._wantsHashChange||e){t=this.location.pathname;var i=this.root.replace(C,"");if(!t.indexOf(i))t=t.substr(i.length)}else{t=this.getHash()}}return t.replace(N,"")},start:function(t){if(I.started)throw new Error("Backbone.history has already been started");I.started=true;this.options=h.extend({},{root:"/"},this.options,t);this.root=this.options.root;this._wantsHashChange=this.options.hashChange!==false;this._wantsPushState=!!this.options.pushState;this._hasPushState=!!(this.options.pushState&&this.history&&this.history.pushState);var e=this.getFragment();var i=document.documentMode;var r=O.exec(navigator.userAgent.toLowerCase())&&(!i||i<=7);this.root=("/"+this.root+"/").replace(P,"/");if(r&&this._wantsHashChange){this.iframe=a.$('