Backend minimize

This commit is contained in:
sosguns2002 2018-03-13 17:02:55 +02:00
parent f23355f6a4
commit ce73963884
49 changed files with 65 additions and 20661 deletions

View File

@ -40,33 +40,10 @@ from collections import OrderedDict
define("port", default=msettings.WEB_SERVER_PORT, help="run on the given port", type=int)
filteredapps=None
filteredevals=None
smallgif='GIF89a\1\0\1\0\x80\xff\0\xff\xff\xff\0\0\0,\0\0\0\0\1\0\1\0\0\2\2D\1\0;'
viswidgetmap={
'motionchart':'google.visualization.MotionChart',
'table':'google.visualization.Table',
'linechart':'google.visualization.LineChart',
'piechart':'google.visualization.PieChart',
'scatterchart':'google.visualization.ScatterChart',
'intensitymap':'google.visualization.IntensityMap',
'geomap':'google.visualization.GeoMap',
'columnchart':'google.visualization.ColumnChart',
'barchart':'google.visualization.BarChart',
'areachart':'google.visualization.AreaChart',
'annotatedtimeline':'google.visualization.AnnotatedTimeLine',
'termcloud':'TermCloud',
}
queries = {}
msettings.viswidgetmap=viswidgetmap
class Application(tornado.web.Application):
def __init__(self):
handlers = [
(r"/version", VersionHandler),
(r"/initialhandshake", InitialClientHandshakeHandler),
(r"/getuserprofiles", GetUserProfilesHandler),
(r"/loaduserprofile", LoadUserProfileHandler),
@ -85,10 +62,7 @@ class Application(tornado.web.Application):
(r"/runmining", RunMiningHandler),
(r"/preparesavedprofile", PrepareSavedProfileHandler),
(r"/saveprofile", SaveProfileToDatabaseHandler),
(r"/downloadprofile", DownloadProfileHandler),
(r"/?$", madAppBarHandler),
(r"/[^/]+/?$", madAppHandler),
(r"/[^/]+/.+$", madAppDataHandler)
(r"/downloadprofile", DownloadProfileHandler)
]
@ -118,7 +92,7 @@ def getNewProfileId():
def numberOfGrantsUploaded(user_id, cookie_set):
if cookie_set and user_id:
file_name = "/tmp/p%s.tsv" % (user_id)
file_name = "users_files/p%s.tsv" % (user_id)
if os.path.isfile(file_name):
num_lines = sum(1 for line in open(file_name))
if str(num_lines) == cookie_set:
@ -127,7 +101,7 @@ def numberOfGrantsUploaded(user_id, cookie_set):
def numberOfDocsUploaded(user_id):
if user_id:
file_name = "/tmp/docs%s.json" % (user_id)
file_name = "users_files/docs%s.json" % (user_id)
if os.path.isfile(file_name):
num_lines = sum(1 for line in open(file_name))
return num_lines
@ -145,9 +119,9 @@ def loadProfile(profileLocation, user_id):
data = {}
# Write to csv file the grants ids
if len([r for r in cursor.execute("SELECT name FROM sqlite_master WHERE type='table' AND name='grants'")]):
cursor.execute("output '/tmp/p{0}.tsv' select c1,c2 from grants".format(user_id))
cursor.execute("output 'users_files/p{0}.tsv' select c1,c2 from grants".format(user_id))
# Get the number of grants uploaded
file_name = "/tmp/p%s.tsv" % (user_id)
file_name = "users_files/p%s.tsv" % (user_id)
if os.path.isfile(file_name):
numberOfGrants = sum(1 for line in open(file_name))
data['concepts'] = numberOfGrants
@ -170,24 +144,24 @@ def loadProfile(profileLocation, user_id):
def deleteAllUserFiles(user_id):
if user_id:
file_name = "/tmp/p%s.tsv" % (user_id)
file_name = "users_files/p%s.tsv" % (user_id)
if os.path.isfile(file_name):
os.remove(file_name)
file_name = "/tmp/docs%s.json" % (user_id)
file_name = "users_files/docs%s.json" % (user_id)
if os.path.isfile(file_name):
os.remove(file_name)
def loadProfileDocs(user_id, profile_id):
# copy unique profile docs file to a general user docs file
docs_file_name = "/tmp/docs{0}.json".format(user_id)
unique_profile_docs_file_name = "/tmp/OAMiningDocs_{0}_{1}.json".format(user_id,profile_id)
docs_file_name = "users_files/docs{0}.json".format(user_id)
unique_profile_docs_file_name = "users_files/OAMiningDocs_{0}_{1}.json".format(user_id,profile_id)
if os.path.isfile(unique_profile_docs_file_name):
copyfile(unique_profile_docs_file_name, docs_file_name)
def loadExampleDocs(user_id):
sample_file = open("static/exampleDocs.txt", 'r')
# write data to physical file
cname = "/tmp/docs{0}.json".format(user_id)
cname = "users_files/docs{0}.json".format(user_id)
fh = open(cname, 'w')
while 1:
copy_buffer = sample_file.read(1048576)
@ -364,21 +338,30 @@ class BaseHandler(ozhandler.DjangoErrorMixin, ozhandler.BasicAuthMixin, tornado.
self.write(file.read())
finally:
file.close()
class HomeHandler(BaseHandler):
def get(self):
self.render("home.html", settings=msettings)
class madAppBarHandler(BaseHandler):
def get(self):
self.render('madappbar.html', apps=filteredapps, evals=filteredevals, settings=msettings)
trueset = set([1 , 'on', 'true', 'TRUE'])
URIdemultiplex = {r"/" + msettings.APPDIRNAME + "/analyze":'projects'
, r"/" + msettings.APPDIRNAME + "/datacitations":'datacitations'
, r"/" + msettings.APPDIRNAME + "/classifier":'classification'
, r"/" + msettings.APPDIRNAME + "/pdbs":'pdb'
, r"/" + msettings.APPDIRNAME + "/interactivemining":'interactivemining'}
class VersionHandler(BaseHandler):
passwordless=True
def set_default_headers(self):
self.set_header("Access-Control-Allow-Origin", "*")
self.set_header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept")
self.set_header('Access-Control-Allow-Methods', 'GET, OPTIONS')
self.set_header('Access-Control-Allow-Credentials', 'true')
self.set_header('Content-Type', 'application/json')
def options(self):
# no body
self.set_status(204)
self.finish()
def get(self):
try:
self.write({'version': 0.5})
self.finish()
except Exception as ints:
self.set_status(400)
self.write("A server error occurred, please contact administrator!")
self.finish()
print ints
return
class InitialClientHandshakeHandler(BaseHandler):
@ -397,7 +380,7 @@ class InitialClientHandshakeHandler(BaseHandler):
try:
if 'user' in self.request.arguments and self.request.arguments['user'][0] != '':
user_id = self.request.arguments['user'][0]
database_file_name = "/tmp/OAMiningProfilesDatabase_{0}.db".format(user_id)
database_file_name = "users_files/OAMiningProfilesDatabase_{0}.db".format(user_id)
if (not os.path.isfile(database_file_name)):
# create a database where the user stores his profiles info
import sys
@ -448,7 +431,7 @@ class GetUserProfilesHandler(BaseHandler):
sys.path.append(msettings.MADIS_PATH)
import madis
# database file name
database_file_name = "/tmp/OAMiningProfilesDatabase_{0}.db".format(user_id)
database_file_name = "users_files/OAMiningProfilesDatabase_{0}.db".format(user_id)
if not os.path.isfile(database_file_name):
self.set_status(400)
self.write("Missing user\'s database")
@ -504,7 +487,7 @@ class LoadUserProfileHandler(BaseHandler):
sys.path.append(msettings.MADIS_PATH)
import madis
# database file name
database_file_name = "/tmp/OAMiningProfilesDatabase_{0}.db".format(user_id)
database_file_name = "users_files/OAMiningProfilesDatabase_{0}.db".format(user_id)
# get the database cursor
cursor=madis.functions.Connection(database_file_name).cursor()
# check if this profile exists
@ -516,7 +499,7 @@ class LoadUserProfileHandler(BaseHandler):
return
cursor.close()
# check if profile file exists on the disk
file_name = "/tmp/OAMiningProfile_%s_%s.oamp" % (user_id,profile_id)
file_name = "users_files/OAMiningProfile_%s_%s.oamp" % (user_id,profile_id)
if not os.path.isfile(file_name):
self.set_status(400)
self.write("There is no profile file with this name")
@ -569,14 +552,18 @@ class DeleteUserProfileHandler(BaseHandler):
sys.path.append(msettings.MADIS_PATH)
import madis
# database file name
database_file_name = "/tmp/OAMiningProfilesDatabase_{0}.db".format(user_id)
database_file_name = "users_files/OAMiningProfilesDatabase_{0}.db".format(user_id)
# get the database cursor
cursor=madis.functions.Connection(database_file_name).cursor()
# data to be sent
cursor.execute('delete from database where id="{0}"'.format(profile_id), parse=False)
cursor.close()
# delete profile from disk
file_name = "/tmp/OAMiningProfile_%s_%s.oamp" % (user_id,profile_id)
file_name = "users_files/OAMiningProfile_%s_%s.oamp" % (user_id,profile_id)
if os.path.isfile(file_name):
os.remove(file_name)
# delete profile docs from disk
file_name = "users_files/OAMiningDocs_{0}_{1}.json".format(user_id,profile_id)
if os.path.isfile(file_name):
os.remove(file_name)
self.write(json.dumps({}))
@ -717,7 +704,7 @@ class UploadProfileHandler(BaseHandler):
self.write(json.dumps({'respond': "<b style=\"color: red\">File must be .oamp compatible profile</b>"}))
return
# write data to physical file
cname = "/tmp/profile{0}.oamp".format(user_id)
cname = "users_files/profile{0}.oamp".format(user_id)
fh = open(cname, 'w')
fh.write(fileinfo['body'])
fh.close()
@ -754,7 +741,7 @@ class AlreadyConceptsHandler(BaseHandler):
user_id = self.request.arguments['user'][0]
data = {}
data['data'] = {}
file_name = "/tmp/p%s.tsv" % (user_id)
file_name = "users_files/p%s.tsv" % (user_id)
if os.path.isfile(file_name):
codes = {}
num_lines = 0
@ -861,7 +848,7 @@ class UpdateConceptsHandler(BaseHandler):
# get data
concepts = json.loads(json.loads(self.request.body)['concepts'])
# write data to physical file
cname = "/tmp/p{0}.tsv".format(user_id)
cname = "users_files/p{0}.tsv".format(user_id)
fh = open(cname, 'w')
concepts_len = 0
for key, value in concepts.iteritems():
@ -970,7 +957,7 @@ class UploadDocumentsHandler(BaseHandler):
return
return
# write data to physical file
cname = "/tmp/docs{0}{1}".format(user_id, extn)
cname = "users_files/docs{0}{1}".format(user_id, extn)
fh = open(cname, 'w')
fh.write(fileinfo['body'])
fh.close()
@ -984,14 +971,14 @@ class UploadDocumentsHandler(BaseHandler):
self.write("An error occurred when trying to convert .pdf to .txt...")
return
os.remove(cname)
cname = "/tmp/docs{0}.txt".format(user_id)
cname = "users_files/docs{0}.txt".format(user_id)
with open(cname, 'r') as fin:
docData=fin.read().replace('\n', ' ')
if len(docData)==0:
self.set_status(400)
self.write("An error occurred when trying to convert .pdf to text...")
return
with open("/tmp/docs{0}.json".format(user_id), "wb") as fout:
with open("users_files/docs{0}.json".format(user_id), "wb") as fout:
json.dump({"text":docData,"id":os.path.splitext(fname)[0]}, fout)
os.remove(cname)
# else check if txt is in correct json format
@ -1000,14 +987,14 @@ class UploadDocumentsHandler(BaseHandler):
jsonlist = []
for line in open(cname, 'r'):
jsonlist.append(json.loads(line))
os.rename(cname, "/tmp/docs{0}.json".format(user_id))
os.rename(cname, "users_files/docs{0}.json".format(user_id))
except ValueError, e:
self.set_status(400)
self.write("File is not in a valid json format...")
os.remove(cname)
print e
return
file_name = "/tmp/docs%s.json" % (user_id)
file_name = "users_files/docs%s.json" % (user_id)
if os.path.isfile(file_name):
lines = sum(1 for line in open(file_name))
data['respond'] = "<b>{0} Documents</b> loaded successfully!".format(lines)
@ -1047,7 +1034,7 @@ class ChooseDocSampleHandler(BaseHandler):
self.set_status(400)
self.write("A doc sample name must be provided")
return
user_id = request_arguments['docsample']
doc_sample = request_arguments['docsample']
sample_file_name = ""
if doc_sample == "Egi":
sample_file_name = "static/egi_sample.tsv"
@ -1061,7 +1048,7 @@ class ChooseDocSampleHandler(BaseHandler):
return
sample_file = open(sample_file_name, 'r')
# write data to physical file
cname = "/tmp/docs{0}.json".format(user_id)
cname = "users_files/docs{0}.json".format(user_id)
fh = open(cname, 'w')
while 1:
copy_buffer = sample_file.read(1048576)
@ -1115,7 +1102,7 @@ class AlreadyDocumentsHandler(BaseHandler):
data['data'] = -1
else:
data['data'] = 0
file_name = "/tmp/docs%s.json" % (user_id)
file_name = "users_files/docs%s.json" % (user_id)
if os.path.isfile(file_name):
data['data'] = sum(1 for line in open(file_name))
msettings.RESET_FIELDS = 0
@ -1161,7 +1148,7 @@ class RunMiningHandler(BaseHandler):
contextprev = 10
contextnext = 5
# Automatically find middle size from grant codes white spaces
querygrantsize = "select max(p1) from (select regexpcountwords('\s',stripchars(p1)) as p1 from (setschema 'p1,p2' file '/tmp/p{0}.tsv' dialect:tsv))".format(user_id)
querygrantsize = "select max(p1) from (select regexpcountwords('\s',stripchars(p1)) as p1 from (setschema 'p1,p2' file 'users_files/p{0}.tsv' dialect:tsv))".format(user_id)
contextmiddle = [r for r in cursor.execute(querygrantsize)][0][0]+1
if 'contextprev' in mining_parameters and mining_parameters['contextprev'] != '':
contextprev = int(mining_parameters['contextprev'])
@ -1258,10 +1245,10 @@ class RunMiningHandler(BaseHandler):
ackn_filters = 'filterstopwords('+ackn_filters+')'
print "DOCCC", doc_filters
list(cursor.execute("drop table if exists grantstemp"+user_id, parse=False))
query_pre_grants = "create temp table grantstemp{0} as select stripchars(p1) as gt1, case when p2 is null then null else {1} end as gt2 from (setschema 'p1,p2' file '/tmp/p{0}.tsv' dialect:tsv)".format(user_id, ackn_filters)
query_pre_grants = "create temp table grantstemp{0} as select stripchars(p1) as gt1, case when p2 is null then null else {1} end as gt2 from (setschema 'p1,p2' file 'users_files/p{0}.tsv' dialect:tsv)".format(user_id, ackn_filters)
cursor.execute(query_pre_grants)
list(cursor.execute("drop table if exists docs"+user_id, parse=False))
query1 = "create temp table docs{0} as select d1, {1} as d2 from (setschema 'd1,d2' select jsonpath(c1, '$.id', '$.text') from (file '/tmp/docs{0}.json'))".format(user_id, doc_filters)
query1 = "create temp table docs{0} as select d1, {1} as d2 from (setschema 'd1,d2' select jsonpath(c1, '$.id', '$.text') from (file 'users_files/docs{0}.json'))".format(user_id, doc_filters)
cursor.execute(query1)
else:
self.set_status(400)
@ -1344,7 +1331,7 @@ class PrepareSavedProfileHandler(BaseHandler):
import madis
# get the database cursor
# profile file name
profile_file_name = "/tmp/OAMiningProfile_{0}.oamp".format(user_id)
profile_file_name = "users_files/OAMiningProfile_{0}.oamp".format(user_id)
cursor=madis.functions.Connection(profile_file_name).cursor()
# Create poswords table
cursor.execute("drop table if exists poswords", parse=False)
@ -1393,7 +1380,7 @@ class PrepareSavedProfileHandler(BaseHandler):
)
)
if numberOfGrantsUploaded(user_id, request_arguments['concepts']) != 0:
cursor.execute("insert into grants select stripchars(c1) as c1, stripchars(c2) as c2 from (file '/tmp/p{0}.tsv')".format(user_id))
cursor.execute("insert into grants select stripchars(c1) as c1, stripchars(c2) as c2 from (file 'users_files/p{0}.tsv')".format(user_id))
cursor.close()
data = {}
@ -1436,26 +1423,26 @@ class SaveProfileToDatabaseHandler(BaseHandler):
doc_name = request_arguments['docname']
docs_number = request_arguments['docsnumber']
# copy profile file to a unique user profile file
profile_file_name = "/tmp/OAMiningProfile_{0}.oamp".format(user_id)
profile_file_name = "users_files/OAMiningProfile_{0}.oamp".format(user_id)
# check if profile has already an id
old_profile = True
if profile_id == '':
# get unique profile id
profile_id = getNewProfileId()
old_profile = False
unique_profile_file_name = "/tmp/OAMiningProfile_{0}_{1}.oamp".format(user_id,profile_id)
unique_profile_file_name = "users_files/OAMiningProfile_{0}_{1}.oamp".format(user_id,profile_id)
copyfile(profile_file_name, unique_profile_file_name)
# copy profile docs to unique profile docs
if doc_name != '' and docs_number != 0:
docs_file_name = "/tmp/docs{0}.json".format(user_id)
unique_docs_file_name = "/tmp/OAMiningDocs_{0}_{1}.json".format(user_id,profile_id)
docs_file_name = "users_files/docs{0}.json".format(user_id)
unique_docs_file_name = "users_files/OAMiningDocs_{0}_{1}.json".format(user_id,profile_id)
copyfile(docs_file_name, unique_docs_file_name)
# write new profile to database
import sys
sys.path.append(msettings.MADIS_PATH)
import madis
# database file name
database_file_name = "/tmp/OAMiningProfilesDatabase_{0}.db".format(user_id)
database_file_name = "users_files/OAMiningProfilesDatabase_{0}.db".format(user_id)
# get the database cursor
cursor=madis.functions.Connection(database_file_name).cursor()
user_profiles = []
@ -1497,7 +1484,7 @@ class DownloadProfileHandler(BaseHandler):
return
user_id = request_arguments['user']
profile_id = request_arguments['id']
unique_profile_file_name = "/tmp/OAMiningProfile_{0}_{1}.oamp".format(user_id,profile_id)
unique_profile_file_name = "users_files/OAMiningProfile_{0}_{1}.oamp".format(user_id,profile_id)
buf_size = 4096
self.set_header('Content-Type', 'application/octet-stream')
self.set_header('Content-Disposition', 'attachment; filename=' + "OAMiningProfile_{0}_{1}.oamp".format(user_id,profile_id))
@ -1517,57 +1504,7 @@ class DownloadProfileHandler(BaseHandler):
return
class madAppHandler(BaseHandler):
def get(self):
try:
appname=re.match(r'.+/([^/]+)/?$', self.request.uri).groups()[0].lower()
except AttributeError:
raise tornado.web.HTTPError(404)
appobj=None
for ap in madapps.apps:
if ap['link']==appname:
appobj=ap
break
if appobj==None:
raise tornado.web.HTTPError(404)
self.render('madappview.html', app=appobj, apps=filteredapps, evals=filteredevals, settings=msettings)
class madAppDataHandler(BaseHandler):
@tornado.web.asynchronous
def post(self):
try:
appname, queryname=[x.lower() for x in re.match(r'.+/([^/]+)/(.+)$', self.request.uri).groups()]
except AttributeError:
raise tornado.web.HTTPError(404)
appobj=None
query=''
for ap in madapps.apps:
if ap['link']==appname:
if queryname in ap:
appobj=ap
if queryname=='query':
query=appobj['query']
else:
query=appobj[queryname]['query']
break
if appobj==None:
raise tornado.web.HTTPError(404)
params=dict(((x.replace(' ','_'),y[0].replace('\n','')) for x,y in self.request.arguments.iteritems()) )
self.executequery(query, params)
def main():
global filteredapps, filteredevals
def getqtext(query,params):
query=query.strip('\n \s')
query=escape.xhtml_escape(query)
@ -1578,18 +1515,7 @@ def main():
query=re.sub('@'+i, '<b><i>'+escape.xhtml_escape(i)+'</i></b>', query)
return query.replace("\n","<br/>")
if 'initial_queries' in queries:
try:
list(msettings.Connection.cursor().execute(queries['initial_queries']))
except Exception, e:
raise Exception("Error when executing DB_INITIAL_EXECUTE:\n"+queries['initial_queries']+"\nThe error was:\n"+ str(e))
tornado.options.parse_command_line()
logging.info('Completed madApp startup scripts')
filteredapps=filter(lambda x:("eval" not in x),madapps.apps)
filteredevals=filter(lambda x:("eval" in x),madapps.apps)
if not msettings.DEBUG:
sockets = tornado.netutil.bind_sockets(options.port)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.0 KiB

View File

@ -1,214 +0,0 @@
/**
* Copyright Marc J. Schmidt. See the LICENSE file at the top-level
* directory of this distribution and at
* https://github.com/marcj/css-element-queries/blob/master/LICENSE.
*/
;
(function (root, factory) {
if (typeof define === "function" && define.amd) {
define(factory);
} else if (typeof exports === "object") {
module.exports = factory();
} else {
root.ResizeSensor = factory();
}
}(typeof window !== 'undefined' ? window : this, function () {
// Make sure it does not throw in a SSR (Server Side Rendering) situation
if (typeof window === "undefined") {
return null;
}
// Only used for the dirty checking, so the event callback count is limited to max 1 call per fps per sensor.
// In combination with the event based resize sensor this saves cpu time, because the sensor is too fast and
// would generate too many unnecessary events.
var requestAnimationFrame = window.requestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.webkitRequestAnimationFrame ||
function (fn) {
return window.setTimeout(fn, 20);
};
/**
* Iterate over each of the provided element(s).
*
* @param {HTMLElement|HTMLElement[]} elements
* @param {Function} callback
*/
function forEachElement(elements, callback){
var elementsType = Object.prototype.toString.call(elements);
var isCollectionTyped = ('[object Array]' === elementsType
|| ('[object NodeList]' === elementsType)
|| ('[object HTMLCollection]' === elementsType)
|| ('[object Object]' === elementsType)
|| ('undefined' !== typeof jQuery && elements instanceof jQuery) //jquery
|| ('undefined' !== typeof Elements && elements instanceof Elements) //mootools
);
var i = 0, j = elements.length;
if (isCollectionTyped) {
for (; i < j; i++) {
callback(elements[i]);
}
} else {
callback(elements);
}
}
/**
* Class for dimension change detection.
*
* @param {Element|Element[]|Elements|jQuery} element
* @param {Function} callback
*
* @constructor
*/
var ResizeSensor = function(element, callback) {
/**
*
* @constructor
*/
function EventQueue() {
var q = [];
this.add = function(ev) {
q.push(ev);
};
var i, j;
this.call = function() {
for (i = 0, j = q.length; i < j; i++) {
q[i].call();
}
};
this.remove = function(ev) {
var newQueue = [];
for(i = 0, j = q.length; i < j; i++) {
if(q[i] !== ev) newQueue.push(q[i]);
}
q = newQueue;
}
this.length = function() {
return q.length;
}
}
/**
*
* @param {HTMLElement} element
* @param {Function} resized
*/
function attachResizeEvent(element, resized) {
if (!element) return;
if (element.resizedAttached) {
element.resizedAttached.add(resized);
return;
}
element.resizedAttached = new EventQueue();
element.resizedAttached.add(resized);
element.resizeSensor = document.createElement('div');
element.resizeSensor.className = 'resize-sensor';
var style = 'position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;';
var styleChild = 'position: absolute; left: 0; top: 0; transition: 0s;';
element.resizeSensor.style.cssText = style;
element.resizeSensor.innerHTML =
'<div class="resize-sensor-expand" style="' + style + '">' +
'<div style="' + styleChild + '"></div>' +
'</div>' +
'<div class="resize-sensor-shrink" style="' + style + '">' +
'<div style="' + styleChild + ' width: 200%; height: 200%"></div>' +
'</div>';
element.appendChild(element.resizeSensor);
if (element.resizeSensor.offsetParent !== element) {
element.style.position = 'relative';
}
var expand = element.resizeSensor.childNodes[0];
var expandChild = expand.childNodes[0];
var shrink = element.resizeSensor.childNodes[1];
var dirty, rafId, newWidth, newHeight;
var lastWidth = element.offsetWidth;
var lastHeight = element.offsetHeight;
var reset = function() {
expandChild.style.width = '100000px';
expandChild.style.height = '100000px';
expand.scrollLeft = 100000;
expand.scrollTop = 100000;
shrink.scrollLeft = 100000;
shrink.scrollTop = 100000;
};
reset();
var onResized = function() {
rafId = 0;
if (!dirty) return;
lastWidth = newWidth;
lastHeight = newHeight;
if (element.resizedAttached) {
element.resizedAttached.call();
}
};
var onScroll = function() {
newWidth = element.offsetWidth;
newHeight = element.offsetHeight;
dirty = newWidth != lastWidth || newHeight != lastHeight;
if (dirty && !rafId) {
rafId = requestAnimationFrame(onResized);
}
reset();
};
var addEvent = function(el, name, cb) {
if (el.attachEvent) {
el.attachEvent('on' + name, cb);
} else {
el.addEventListener(name, cb);
}
};
addEvent(expand, 'scroll', onScroll);
addEvent(shrink, 'scroll', onScroll);
}
forEachElement(element, function(elem){
attachResizeEvent(elem, callback);
});
this.detach = function(ev) {
ResizeSensor.detach(element, ev);
};
};
ResizeSensor.detach = function(element, ev) {
forEachElement(element, function(elem){
if (!elem) return
if(elem.resizedAttached && typeof ev == "function"){
elem.resizedAttached.remove(ev);
if(elem.resizedAttached.length()) return;
}
if (elem.resizeSensor) {
if (elem.contains(elem.resizeSensor)) {
elem.removeChild(elem.resizeSensor);
}
delete elem.resizeSensor;
delete elem.resizedAttached;
}
});
};
return ResizeSensor;
}));

View File

@ -1,62 +0,0 @@
function accessURL(url, params, method, postCompletionCallback, visname) {
var xhr=null;
if (typeof XMLHttpRequest == "undefined")
XMLHttpRequest = function () {
try { return new ActiveXObject("Msxml2.XMLHTTP.6.0"); }
catch (e) {}
try { return new ActiveXObject("Msxml2.XMLHTTP.3.0"); }
catch (e) {}
try { return new ActiveXObject("Microsoft.XMLHTTP"); }
catch (e) {}
throw new Error("This browser does not support XMLHttpRequest.");
};
xhr = new XMLHttpRequest();
xhr.onreadystatechange = function()
{
try{
// if((xhr.readyState == 3) || (xhr.readyState == 4)){
// alert("Resp text: "+xhr.responseText + "<br></br>Resp XML: "+xhr.responseXML +"<br></br>Status: "+ xhr.status +"<br></br>status Text: "+ xhr.statusText);
// }
if(xhr.readyState == 4)
{
if(xhr.status == 200) {
// document.ajax.dyn="Received:" + xhr.responseText;
var outcome=xhr.responseText;
// alert(xhr.responseText);
postCompletionCallback(outcome, visname);
}
else {
//alert("Error code " + xhr.status);
outcome="Error: "+xhr.responseText;
postCompletionCallback(outcome, visname);
}
} else {
// alert("state is:"+xhr.readyState+" status is"+xhr.status+ "response text is: "+xhr.responseText);
// alert("ready False");
}
}catch(e) {
}
};
if (method=="POST"){
xhr.open("POST", url, true);
xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xhr.setRequestHeader("Content-length", params.length);
xhr.send(params);
}
else {
if (params.length>0){
url+='?'+params;
}
xhr.open("GET", url, true);
xhr.send(null);
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 513 B

View File

@ -1,102 +0,0 @@
/*ANIMATIONS*/
tr.new-item, li.new-item {
opacity:0;
-webkit-animation:fadeIn .1s linear forwards;
-o-animation:fadeIn .1s linear forwards;
animation:fadeIn .1s linear forwards
}
@keyframes fadeIn {
to {
opacity:1
}
}
@keyframes openspace {
to {
height: auto
}
}
tr.removed-item, li.removed-item {
-webkit-animation: removed-item-animation .3s cubic-bezier(.55,-0.04,.91,.94) forwards;
-o-animation: removed-item-animation .3s cubic-bezier(.55,-0.04,.91,.94) forwards;
animation: removed-item-animation .3s cubic-bezier(.55,-0.04,.91,.94) forwards
}
@keyframes removed-item-animation {
from {
opacity: 1;
}
to {
opacity: 0
}
}
@-webkit-keyframes new-item-animation {
from {
opacity: 0;
-webkit-transform: scale(0);
transform: scale(0)
}
to {
opacity: 1;
-webkit-transform: scale(1);
transform: scale(1)
}
}
@-o-keyframes new-item-animation {
from {
opacity: 0;
-o-transform: scale(0);
transform: scale(0)
}
to {
opacity: 1;
-o-transform: scale(1);
transform: scale(1)
}
}
@-webkit-keyframes openspace {
to {
height: auto
}
}
@-o-keyframes openspace {
to {
height: auto
}
}
@-webkit-keyframes removed-item-animation {
from {
opacity: 1;
-webkit-transform: scale(1);
transform: scale(1)
}
to {
-webkit-transform: scale(0);
transform: scale(0);
opacity: 0
}
}
@-o-keyframes removed-item-animation {
from {
opacity: 1;
-o-transform: scale(1);
transform: scale(1)
}
to {
-o-transform: scale(0);
transform: scale(0);
opacity: 0
}
}

View File

@ -1,37 +0,0 @@
.extra {
text-decoration:none;
}
a span.extra {display: none;
text-decoration:none;
}
a:hover span.extra {
text-decoration:none;
display: block;
width:130px;
position: absolute;
padding: 5px;
/*margin: 5px; */
z-index: 10000;
color: #000000;
background: white;
font: 10px Verdana, sans-serif;
left:10px;
top:15px
}
#term-vis {
padding:50px;
margin-left:auto;
margin-right:auto;
width:70%;
border:1px solid rgb(204, 204, 204);
text-align:center;
}

View File

@ -1,215 +0,0 @@
(function(){
function getCookie(name) {
var value = "; " + document.cookie;
var parts = value.split("; " + name + "=");
if (parts.length == 2) return parts.pop().split(";").shift();
}
////////// UPLOAD FUNCTIONS
$( '.inputfile' ).each( function() {
var $input = $( this ),
$label = $input.next( 'label' ),
labelVal = $label.html();
$input.on( 'change', function( e )
{
var fileName = '';
if( this.files && this.files.length > 1 )
fileName = ( this.getAttribute( 'data-multiple-caption' ) || '' ).replace( '{count}', this.files.length );
else if( e.target.value )
fileName = e.target.value.split( '\\' ).pop();
if( fileName )
$label.find( 'span' ).html( fileName );
else
$label.html( labelVal );
});
// Firefox bug fix
$input
.on( 'focus', function(){ $input.addClass( 'has-focus' ); })
.on( 'blur', function(){ $input.removeClass( 'has-focus' ); });
});
//generates a unique id
var generateId = function(is_pos){
if (is_pos) {
return "positive-" + +new Date() + Math.random().toFixed(5).substring(2);
} else {
return "negative-" + +new Date() + Math.random().toFixed(5).substring(2);
}
}
var handleFileUploadButton = function() {
$("form#profile-input-form").on('change', function(){
if ($('#profile-file-input')[0].value === "") {
window.alert("You must specify a data file to import.");
return false;
}
var formData = new FormData($(this)[0]);
$.ajax({
url: "/",
type: 'POST',
data: formData,
async: false,
success: function (data) {
obj = JSON && JSON.parse(data) || $.parseJSON(data);
console.log(obj);
// reset localStorage and store the uploaded profiles data
localStorage.clear();
// set poswords
var poswords = [];
if (obj.hasOwnProperty("poswords")) {
poswords = obj["poswords"];
for (var word in poswords) {
var obj2 = {};
obj2["phrase"] = word;
obj2["weight"] = poswords[word];
localStorage.setItem(generateId(1), JSON.stringify(obj2));
}
}
// set poswords
var negwords = [];
if (obj.hasOwnProperty("negwords")) {
negwords = obj["negwords"];
for (var word in negwords) {
var obj2 = {};
obj2["phrase"] = word;
obj2["weight"] = negwords[word];
localStorage.setItem(generateId(0), JSON.stringify(obj2));
}
}
if (obj.hasOwnProperty("contextprev")) {
localStorage.setItem("contextprev", String(obj["contextprev"]));
}
if (obj.hasOwnProperty("contextmiddle")) {
localStorage.setItem("contextmiddle", String(obj["contextmiddle"]));
}
if (obj.hasOwnProperty("contextnext")) {
localStorage.setItem("contextnext", String(obj["contextnext"]));
}
if (obj.hasOwnProperty("lettercase")) {
localStorage.setItem("lettercase", String(obj["lettercase"]));
}
if (obj.hasOwnProperty("wordssplitnum")) {
localStorage.setItem("wordssplitnum", String(obj["wordssplitnum"]));
}
if (obj.hasOwnProperty("stopwords")) {
localStorage.setItem("stopwords", String(obj["stopwords"]));
}
if (obj.hasOwnProperty("punctuation")) {
localStorage.setItem("punctuation", String(obj["punctuation"]));
}
// set easy mode option to custom
localStorage.setItem("matchlevel", "#c-level");
window.location="upload-codes";
},
error: function (xhr, ajaxOptions, thrownError) {
UIkit.notification({
message: xhr.responseText,
status: 'danger',
pos: 'top-center',
timeout: 0
});
},
cache: false,
contentType: false,
processData: false
});
$("#profile-file-input")[0].value = "";
return false;
});
}
var handleExampleLoadButton = function() {
$("#example-load-btn").on('click', function(){
var formData = new FormData();
formData.append("example", "1");
$.ajax({
url: "/",
type: 'POST',
data: formData,
async: false,
success: function (data) {
obj = JSON && JSON.parse(data) || $.parseJSON(data);
console.log(obj);
// reset localStorage and store the uploaded profiles data
localStorage.clear();
// set poswords
var poswords = [];
if (obj.hasOwnProperty("poswords")) {
poswords = obj["poswords"];
for (var word in poswords) {
var obj2 = {};
obj2["phrase"] = word;
obj2["weight"] = poswords[word];
localStorage.setItem(generateId(1), JSON.stringify(obj2));
}
}
// set poswords
var negwords = [];
if (obj.hasOwnProperty("negwords")) {
negwords = obj["negwords"];
for (var word in negwords) {
var obj2 = {};
obj2["phrase"] = word;
obj2["weight"] = negwords[word];
localStorage.setItem(generateId(0), JSON.stringify(obj2));
}
}
if (obj.hasOwnProperty("contextprev")) {
localStorage.setItem("contextprev", String(obj["contextprev"]));
}
if (obj.hasOwnProperty("contextmiddle")) {
localStorage.setItem("contextmiddle", String(obj["contextmiddle"]));
}
if (obj.hasOwnProperty("contextnext")) {
localStorage.setItem("contextnext", String(obj["contextnext"]));
}
if (obj.hasOwnProperty("lettercase")) {
localStorage.setItem("lettercase", String(obj["lettercase"]));
}
if (obj.hasOwnProperty("wordssplitnum")) {
localStorage.setItem("wordssplitnum", String(obj["wordssplitnum"]));
}
if (obj.hasOwnProperty("stopwords")) {
localStorage.setItem("stopwords", String(obj["stopwords"]));
}
if (obj.hasOwnProperty("punctuation")) {
localStorage.setItem("punctuation", String(obj["punctuation"]));
}
// set easy mode option to custom
localStorage.setItem("matchlevel", "#c-level");
window.location="upload-codes";
},
error: function (xhr, ajaxOptions, thrownError) {
UIkit.notification({
message: xhr.responseText,
status: 'danger',
pos: 'top-center',
timeout: 0
});
},
cache: false,
contentType: false,
processData: false
});
return false;
});
}
var init = function(){
handleFileUploadButton();
handleExampleLoadButton();
};
//start all
init();
})();

View File

@ -1,163 +0,0 @@
.tm-toolbar .uk-subnav-line .custom-discover-li {
color:#05007A !important;
background:#fff;
display: block;
}
.tm-toolbar .uk-subnav-line .custom-discover-li a{
color:#05007A !important;
}
.tm-toolbar .uk-subnav-line .custom-connect-li {
color:#05007A !important;
background:#fff;
display: block;
}
.tm-toolbar .uk-subnav-line .custom-connect-li a{
color:#05007A !important;
}
.custom-discover-toolbar ul.uk-subnav.uk-subnav-line{
background-color: #f25f30 !important;
}
.custom-discover-toolbar .inner {
background-color: #f25f30 !important;
}
.custom-discover-toolbar{
border-top-color:#f25f30 !important;
}
.custom-connect-toolbar ul.uk-subnav.uk-subnav-line{
background-color: #ffc800 !important;
}
.custom-connect-toolbar .inner {
background-color: #ffc800 !important;
}
.custom-connect-toolbar{
border-top-color:#ffc800 !important;
}
.custom-footer{
position:relative;
bottom:0;
left:0;
}
.custom-external {
background: rgba(0, 0, 0, 0) url("/assets/icon_external.png") no-repeat scroll left center;
padding: 0 0 0 16px;
}
.custom-navbar-toggle-icon, .custom-user-mini-panel{
color:#444 !important
}
.custom-user-mini-panel a{
color:rgb(36, 91, 204);
}
.custom-main-content{
min-height: 550px;
}
.custom-autocomplete .uk-nav-autocomplete > li > a:hover {
background: #00a8e6 none repeat scroll 0 0;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.05) inset;
color: #FFF;
outline: medium none;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.1);
}
.custom-autocomplete .uk-nav-navbar > li > a {
color: #444;
}
.custom-description-list-horizontal{ line-height:200%}
.uk-alert-default {
background: #fff none repeat scroll 0 0;
border: 1px solid #ddd;
border-radius: 4px;
color: #444;
height: 30px;
max-width: 100%;
padding: 4px 6px;
}
.custom-hidden-dropdown-menu {position:static !important;}
.searchFilterBoxValues {overflow:auto; max-height:200px; }
.selected-filters-box {margin:5px; background-color:#F8F8F8; }
.search-form {margin:5px; }
.clickable { cursor:pointer; }
.search-filters .uk-accordion-title{
font-size: 14px;
line-height: 18px;
}
.OPEN {
background: rgba(0, 0, 0, 0) url("/static/openAccess.png") no-repeat scroll right center;
padding-right: 18px;
min-height: 18px;
}
.EMBARGO, .CLOSED, .RESTRICTED {
background: rgba(0, 0, 0, 0) url("/static/closedAccess.png") no-repeat scroll right center;
padding-right: 18px;
}
.sc39 {
background: rgba(0, 0, 0, 0) url("/static/sc39.png") no-repeat scroll right center;
padding-right: 24px;
}
.projectIcon {
display: inline-table;
}
.dateFilter .mydp{
margin-top:5px;
}
.tooltip {
max-width: none;
background: rgba(100, 100, 100, 1);
}
.custom-select-mini{
max-width:170px !important;
}
.custom-icon {
line-height: unset;
}
/*.custom-tab-content-large{
min-height: 800px;
}
*/
.custom-tab-content {
min-height: 250px;
}
.custom-dataTable-content {
min-height: 600px;
}
.filterItem span {
display: inline-flex;
}
.filterItem .filterName {
max-width: 71%;
}
.browseFilters .filterItem .filterName {
max-width: 68%;
}
.filterItem .filterNumber {
width: 20%;
}
.filterItem span {
white-space: nowrap;
}
.filterItem span div {
overflow: hidden;
text-overflow: ellipsis;
}
.browseFilters{
overflow-y: auto;
overflow-x: hidden;
max-height:265px;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 410 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,8 +0,0 @@
var displayNotification = function(message, status, timeout) {
UIkit.notification({
message: message,
status: status,
pos: 'top',
timeout: timeout
});
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

View File

@ -1,597 +0,0 @@
function handleConfigDownload() {
var formData = new FormData();
formData.append("poswords", $('#pos-words-text').val());
formData.append("negwords", $('#neg-words-text').val());
filters_list = {};
filters_list["stopwords"] = $('#stop-words-filter').prop('checked')===true?1:0;
filters_list["lowercase"] = $('#lowercase-filter').prop('checked')===true?1:0;
filters_list["keywords"] = $('#keywords-filter').prop('checked')===true?1:0;
formData.append("filters", JSON.stringify(filters_list));
$.ajax({
url: "save-config-controller",
type: 'POST',
data: formData,
async: false,
success: function (data) {
$('#file-upload-response').html(JSON.parse(data).respond)
// if (data.indexOf('successfully!') != -1) {
// $('#file-uploaded')[0].checked = true;
// }
window.location="download-config-controller?saveprofile=1"
},
error: function (xhr, ajaxOptions, thrownError) {
$('#file-upload-response').html('<b style=\"color: red\">File Failed to Upload!</b>'+xhr.status)
// $('#file-uploaded')[0].checked = false;
},
cache: false,
contentType: false,
processData: false
});
}
function handleLoadExampleFile() {
$("#file-input-operation").val('example');
$("#file-title-text").html('');
$('#file-input').val('');
var formData = new FormData($("form#file-input-form")[0]);
$.ajax({
url: "importing-controller",
type: 'POST',
data: formData,
async: false,
success: function (data) {
$('#file-upload-response').html(JSON.parse(data).respond)
// if (data.indexOf('successfully!') != -1) {
// $('#file-uploaded')[0].checked = true;
// }
},
error: function (xhr, ajaxOptions, thrownError) {
$('#file-upload-response').html('<b style=\"color: red\">File Failed to Upload!</b>'+xhr.status)
// $('#file-uploaded')[0].checked = false;
},
cache: false,
contentType: false,
processData: false
});
}
$( window ).resize(function() {
$("#file-input-label").width($(".file-upload-wrapper").width() - 250 +"px");
});
(function(){
function getCookie(name) {
var value = "; " + document.cookie;
var parts = value.split("; " + name + "=");
if (parts.length == 2) return parts.pop().split(";").shift();
}
////////// UPLOAD FUNCTIONS
$( '.inputfile' ).each( function()
{
var $input = $( this ),
$label = $input.next( 'label' ),
labelVal = $label.html();
$input.on( 'change', function( e )
{
var fileName = '';
if( this.files && this.files.length > 1 )
fileName = ( this.getAttribute( 'data-multiple-caption' ) || '' ).replace( '{count}', this.files.length );
else if( e.target.value )
fileName = e.target.value.split( '\\' ).pop();
if( fileName )
$label.find( 'span' ).html( fileName );
else
$label.html( labelVal );
});
// Firefox bug fix
$input
.on( 'focus', function(){ $input.addClass( 'has-focus' ); })
.on( 'blur', function(){ $input.removeClass( 'has-focus' ); });
});
function handleProfileUploadButton() {
$("form#profile-input-form").submit(function(){
if ($('#profile-input')[0].value === "") {
window.alert("You must specify a profile to import.");
return false;
}
// $('#user-id').val(getCookie("madgikmining"));
$("#profile-input-operation").val('normal');
var formData = new FormData($(this)[0]);
$.ajax({
url: "upload-profile-controller",
type: 'POST',
data: formData,
async: false,
success: function (data) {
$('#profile-upload-response').html(JSON.parse(data).respond);
obj = JSON && JSON.parse(data) || $.parseJSON(data);
console.log(obj);
for (var key1 in obj) {
if (obj.hasOwnProperty(key1)) {
if (key1==="poswords") {
// delete all poswords from the lists
deleteAllPosWords(0);
for (var key2 in obj[key1]) {
createWord(1, generateId(1), key2, obj[key1][key2]);
}
} else if (key1 === "negwords") {
deleteAllNegWords(0);
for (var key2 in obj[key1]) {
createWord(0, generateId(0), key2, obj[key1][key2]);
}
} else if (key1 === "filters") {
for (var key2 in obj[key1]) {
console.log(key2, obj[key1][key2]);
}
}
}
}
},
error: function (xhr, ajaxOptions, thrownError) {
$('#profile-upload-response').html('<b style=\"color: red\">File Failed to Upload!</b>'+xhr.status)
// $('#profile-uploaded')[0].checked = false;
},
cache: false,
contentType: false,
processData: false
});
return false;
});
}
function handleFileUploadButton() {
$("form#file-input-form").submit(function(){
if ($('#file-input')[0].value === "") {
window.alert("You must specify a data file to import.");
return false;
}
// $('#user-id').val(getCookie("madgikmining"));
$("#file-input-operation").val('normal');
var formData = new FormData($(this)[0]);
$.ajax({
url: "importing-controller",
type: 'POST',
data: formData,
async: false,
success: function (data) {
$('#file-upload-response').html(JSON.parse(data).respond)
// if (data.indexOf('successfully!') != -1) {
// $('#file-uploaded')[0].checked = true;
// }
},
error: function (xhr, ajaxOptions, thrownError) {
$('#file-upload-response').html('<b style=\"color: red\">File Failed to Upload!</b>'+xhr.status)
// $('#file-uploaded')[0].checked = false;
},
cache: false,
contentType: false,
processData: false
});
return false;
});
}
function handleZipFileUploadButton() {
$("form#zip-file-input-form").submit(function(){
if ($('#zip-file-input')[0].value === "") {
window.alert("You must specify a data file to import.");
return false;
}
// $('#user-id').val(getCookie("madgikmining"));
var formData = new FormData($(this)[0]);
$.ajax({
url: "importing-text-controller",
type: 'POST',
data: formData,
async: false,
success: function (data) {
$('#zip-file-upload-response').html(JSON.parse(data).respond)
if (data.indexOf('successfully!') != -1) {
$('#docs-file-uploaded')[0].checked = true;
}
},
error: function (xhr, ajaxOptions, thrownError) {
$('#zip-file-upload-response').html('<b style=\"color: red\">File Failed to Upload!</b>'+xhr.status);
$('#docs-file-uploaded')[0].checked = false;
},
cache: false,
contentType: false,
processData: false
});
return false;
});
}
function handleDocsUploadSelect() {
$('select#textUploadSelect').change(function(){
$('#docs-file-uploaded')[0].checked = false;
if($(this).val()=="1") {
$('#docUploadText').show();
$('#docUploadText').children(".title").html("Choose <b>.PDF document</b> file to upload");
$('#docPasteExample').css('display', 'none');
$('#docPasteText').html("");
}
else if ($(this).val()=="2") {
$('#docUploadText').show();
$('#docUploadText').children(".title").html("Choose <b>.TXT document with JSON format</b> file to upload");
$('#docPasteExample').css('display', 'none');
$('#docPasteText').html("");
}
else {
$('#docUploadText').css('display', 'none');
$('#docPasteExample').css('display', 'inline');
$('#docPasteText').html('<textarea id="docText" class="textarea" onblur="this.placeholder = \'Paste your citations here, separated by newline\'" onfocus="this.placeholder = \'\'" name="document" rows="20"></textarea>');
}
});
}
/////////// LIST FUNCTIONS
var count_pos = 0, count_neg = 0;
function updatetextereas(){
// Create the positive and negative words input to send to the server with json format
$('#pos-words-text').html('');
$('#neg-words-text').html('');
pos_words_list = {};
neg_words_list = {};
for(var key in localStorage){
if (key === null)
continue;
var json_string = localStorage.getItem(key);
data = JSON.parse(json_string);
if(key.indexOf('positive') === 0){
pos_words_list[data.text] = data.weight;
} else if(key.indexOf('negative') === 0) {
neg_words_list[data.text] = data.weight;
}
}
$('#pos-words-text').html(JSON.stringify(pos_words_list));
$('#neg-words-text').html(JSON.stringify(neg_words_list));
}
function updateCounter(is_pos){
if (is_pos === 1) {
$('#count-pos').text(count_pos);
var deleteButton = $('#clear-all-pos');
if(count_pos === 0){
deleteButton.attr('disabled', 'disabled').addClass('disabled');
}
else{
deleteButton.removeAttr('disabled').removeClass('disabled');
}
} else {
$('#count-neg').text(count_neg);
var deleteButton = $('#clear-all-neg');
if(count_neg === 0){
deleteButton.attr('disabled', 'disabled').addClass('disabled');
}
else{
deleteButton.removeAttr('disabled').removeClass('disabled');
}
}
}
//generates a unique id
function generateId(is_pos){
if (is_pos) {
return "positive-" + +new Date();
} else {
return "negative-" + +new Date();
}
}
//saves a text-weight pair in json format to localStorage
var saveWord = function(id, content_word, content_weight){
var obj = {};
obj["text"] = content_word;
obj["weight"] = content_weight;
localStorage.setItem(id, JSON.stringify(obj));
};
// var editWord = function(is_pos, id){
// var $this = $('#' + id);
// $this.focus()
// .append($('<button />', {
// "class": "btn icon-save save-button",
// click: function(){
// $this.attr('contenteditable', 'false');
// var newcontent = $this.text(), saved = $('.save-notification');
// if(!newcontent) {
// var confirmation = confirm('Delete this item?');
// if(confirmation) {
// removeWord(id);
// }
// }
// else{
// localStorage.setItem(id, newcontent);
// saved.show();
// setTimeout(function(){
// saved.hide();
// },2000);
// $(this).remove();
// $('.icon-pencil').show();
// }
// }
// }));
// };
var clickedElement=null;
var saveEditBox = function(element) {
var new_val = $(".thVal").val();
if (element.hasClass("phrase") || (new_val != '' && !isNaN(new_val) && new_val >= 0 && new_val <= 100)) {
$(element).html($(".thVal").val().trim());
} else {
$(element).html(1);
}
updatetextereas();
}
// a fucntion to catch double click on positive and negative phrases edit boxes
var addDoubleClick = function(element){
$(element).click(function (event) {
if($(event.target).attr('class')!="thVal") {
event.stopPropagation();
// save previous clicked box
if (clickedElement)
saveEditBox(clickedElement);
var currentEle = $(this);
var value = $(this).html();
editValue(currentEle, value, currentEle.hasClass("phrase")?1:0);
}
});
}
var editValue = function(currentEle, value, isPhrase) {
clickedElement = currentEle;
$(document).off('click');
if (isPhrase) {
$(currentEle).html('<input style="width:100%" class="thVal" type="text" value="' + value + '" />');
} else {
$(currentEle).html('<input style="width:100%" class="thVal" type="number" min="0" max="100" value="' + value + '" />');
}
$(".thVal").focus();
$(".thVal").keyup(function (event) {
// Handle Enter key
if (event.keyCode == 13) {
var new_val = $(".thVal").val();
if (isPhrase || (new_val != '' && !isNaN(new_val) && new_val >= 0 && new_val <= 100)) {
$(currentEle).html($(".thVal").val().trim());
} else {
$(currentEle).html(1);
}
updatetextereas();
clickedElement = null;
}
// Handle Esc key
else if (event.keyCode == 27) {
$(currentEle).html(value);
clickedElement = null;
}
});
// Handle clicks outside editboxes
$(document).click(function (event) {
if($(event.target).attr('class')!="thVal") {
saveEditBox(currentEle);
$(document).off('click');
clickedElement = null;
}
});
}
//removes item from localStorage
var deleteWord = function(is_pos, id){
localStorage.removeItem(id);
if (is_pos === 1) {
count_pos--;
} else {
count_neg--;
}
updateCounter(is_pos);
updatetextereas();
};
var removeWord = function(is_pos, id){
var item = $('#' + id );
item.addClass('removed-item')
.one('webkitAnimationEnd oanimationend msAnimationEnd animationend', function(e) {
$(this).remove();
});
deleteWord(is_pos, id);
};
var createWord = function(is_pos, id, content_word, content_weight){
// create added line with content
var word = '<li id="' + id + '"><div class="phrase">' + content_word + '</div><div class="weight">' + content_weight +'</div></li>'
// Choose List to add word (positive or negative)
var list
if (is_pos === 1) {
list = $('#word-pos li');
} else {
list = $('#word-neg li');
}
// if content is correct and not empty append to list
if(!$('#'+ id).length){
word = $(word).addClass('new-item');
if (is_pos === 1) {
$('#word-pos').append(word);
} else {
$('#word-neg').append(word);
}
// add all the item's extra functionality
var createdItem = $('#'+ id);
// delete button
createdItem.append($('<button />', {
"class" :"btn icon-trash delete-button",
"contenteditable" : "false",
click: function(){
var confirmation = confirm('Delete this word?');
if(confirmation) {
removeWord(is_pos, id);
}
}
}));
addDoubleClick($(createdItem).find("div.phrase"))
addDoubleClick($(createdItem).find("div.weight"))
// // edit button
// createdItem.append($('<button />', {
// "class" :"btn icon-pencil edit-button",
// "contenteditable" : "false",
// click: function(){
// createdItem.attr('contenteditable', 'true');
// editWord(is_pos, id);
// $(this).hide();
// }
// }));
createdItem.on('keydown', function(ev){
if(ev.keyCode === 13) return false;
});
// save word to clients local storage
saveWord(id, content_word, content_weight);
if (is_pos === 1) {
count_pos++;
updateCounter(1);
} else {
count_neg++;
updateCounter(0);
}
updatetextereas();
}
};
//handler for input
var handleInput = function(){
$('#word-form-pos').on('submit', function(event){
event.preventDefault();
var input_word = $('#text-pos');
word = input_word.val();
var input_weight = $('#weight-pos');
weight = input_weight.val();
if (word && weight){
var id = generateId(1);
createWord(1, id, word, weight);
input_word.val('');
input_weight.val('1');
}
});
$('#word-form-neg').on('submit', function(event){
event.preventDefault();
var input_word = $('#text-neg');
word = input_word.val();
var input_weight = $('#weight-neg');
weight = input_weight.val();
if (word && weight){
var id = generateId(0);
createWord(0, id, word, weight);
input_word.val('');
input_weight.val('1');
}
});
};
var loadDefaultWords = function(){
localStorage.clear();
// Add some positive words
createWord(1, generateId(1), 'European Commission', 1);
createWord(1, generateId(1), 'FP7', 1);
createWord(1, generateId(1), 'grants', 1);
// Add some negative words
createWord(0, generateId(0), 'FP6', 1);
createWord(0, generateId(0), 'NIH', 1);
createWord(0, generateId(0), 'NSF', 1);
createWord(0, generateId(0), 'Wellcome Trust', 1);
createWord(0, generateId(0), 'po box', 1);
};
// var loadWords = function(){
// if(localStorage.length!==0){
// for(var key in localStorage){
// var text = localStorage.getItem(key);
// if(key.indexOf('positive') === 0){
// createWord(1, key, text);
// } else if(key.indexOf('negative') === 0) {
// createWord(0, key, text);
// }
// }
// }
// };
var deleteAllPosWords = function(warnUser = 1) {
if(!warnUser || confirm('Are you sure you want to delete all the items in the list? There is no turning back after that.')){ //remove items from DOM
var items = $('li[id ^= positive]');
items.addClass('removed-item').one('webkitAnimationEnd oanimationend msAnimationEnd animationend', function(e) {
$(this).remove();
});
//look for items in localStorage that start with word- and remove them
var keys = [];
for(var key in localStorage){
if(key.indexOf('positive') === 0){
localStorage.removeItem(key);
}
}
count_pos = 0;
updateCounter(1);
}
updatetextereas();
};
var deleteAllNegWords = function(warnUser = 1) {
if(!warnUser || confirm('Are you sure you want to delete all the items in the list? There is no turning back after that.')){ //remove items from DOM
var items = $('li[id ^= negative]');
items.addClass('removed-item').one('webkitAnimationEnd oanimationend msAnimationEnd animationend', function(e) {
$(this).remove();
});
//look for items in localStorage that start with word- and remove them
var keys = [];
for(var key in localStorage){
if(key.indexOf('negative') === 0){
localStorage.removeItem(key);
}
}
count_neg = 0;
updateCounter(0);
}
updatetextereas();
};
//handler for the "delete all" button
var handleDeleteButton = function(){
$('#clear-all-pos').on('click', deleteAllPosWords);
$('#clear-all-neg').on('click', deleteAllNegWords);
};
var init = function(){
//$('#text').focus();
//loadWords();
loadDefaultWords();
handleDeleteButton();
handleInput();
updateCounter(1);
updateCounter(0);
updatetextereas();
handleFileUploadButton();
handleZipFileUploadButton();
handleDocsUploadSelect();
handleProfileUploadButton();
};
//start all
init();
})();

View File

@ -1 +0,0 @@
Acknowledgements : This work was supported in part by the European Commission under FP7 grants 246686 and 283595.

View File

@ -1,471 +0,0 @@
@import "http://netdna.bootstrapcdn.com/font-awesome/2.0/css/font-awesome.css";
/*GENERAL*/
h4 {
font-weight: normal;
margin: 20px 4px 0px;
}
.file-upload-wrapper,
.list-wrapper,
.filters-wrapper,
.acknowledgement-wrapper {
margin-right: 30px;
margin-bottom: 30px;
background-color: #f5f5f5;
border: 1px solid #e1e1e1;
padding: 10px;
}
.file-upload-wrapper {
/*float: left;*/
max-width: 850px;
min-width: 500px;
}
.list-wrapper {
float: left;
width: 400px;
}
.filters-wrapper,
.acknowledgement-wrapper {
max-width: 850px;
min-width: 500px;
}
.textarea {
width: 858px;
max-width: 98%;
max-height: 1024px;
height: 112px;
display: block;
background-color: #e8f8d4;
border: 1px solid #cccccc;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
-webkit-transition: border linear 0.1s, box-shadow linear 0.1s;
-moz-transition: border linear 0.1s, box-shadow linear 0.1s;
-o-transition: border linear 0.1s, box-shadow linear 0.1s;
transition: border linear 0.1s, box-shadow linear 0.1s;
padding: 4px 6px;
margin-bottom: 30px;
font-size: 14px;
line-height: 20px;
color: #555555;
vertical-align: middle;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
}
.textarea:focus {
border-color: rgba(82, 168, 236, 0.8);
outline: 0;
outline: thin dotted \9;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
}
/*FILE INPUT*/
.js .inputfile {
width: 0.1px;
height: 0.1px;
opacity: 0;
overflow: hidden;
position: absolute;
z-index: -1;
}
.inputfile {
box-sizing: border-box;
}
.inputfile + label {
display: inline-table;
border-radius: 2px;
width: 70.5%;
/* 20px */
text-overflow: ellipsis;
white-space: nowrap;
cursor: pointer;
overflow: hidden;
/* 10px 20px */
color: #444;
border: 1px solid #c8c6c6;
background-color: #fff;
padding: 0;
}
.no-js .inputfile + label {
display: none;
}
.inputfile:focus + label,
.inputfile.has-focus + label {
outline: 1px dotted #000;
outline: -webkit-focus-ring-color auto 5px;
}
.inputfile + label svg {
width: 1em;
height: 1em;
vertical-align: middle;
fill: currentColor;
margin-top: -0.25em;
/* 4px */
margin-right: 0.25em;
/* 4px */
}
.inputfile:focus + label,
.inputfile.has-focus + label,
.inputfile + label:hover {
border-color: #9095A2;
}
.inputfile + label span,
.inputfile + label strong {
padding: 0.3rem 0.6rem;
/* 10px 20px */
}
.inputfile + label span {
width: 200px;
/*min-height: 2em;*/
display: inline-block;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
vertical-align: top;
}
.inputfile + label strong {
height: 100%;
color: #e5e9f1;
background-color: #5882fa;
display: inline-block;
}
.inputfile:focus + label strong,
.inputfile.has-focus + label strong,
.inputfile + label:hover strong {
background-color: #476DDA;
}
/*LISTS*/
li [class^=icon-],li [class*=" icon-"] {
width: 40px !important;
height: 25px !important;
font-size: 22px;
display: block !important;
position: absolute !important;
float: none !important;
}
header, footer {
width: 100%;
position: relative;
padding: 5px 5px;
}
header .scroll_holder {
float: right;
visibility: hidden;
}
header .scroller {
overflow-y: scroll;
height: 1px;
}
header .word-form input[type='text'] {
width: 45%;
height: 24px;
}
header .word-form input[type='number'] {
width: 27%;
height: 24px;
}
header .word-form input[type='submit'] {
width: 18%;
}
footer button {
float: right;
}
::-webkit-input-placeholder {
color: rgba(255,255,255,0.2);
}
:-moz-placeholder {
color: rgba(255,255,255,0.2);
}
::-moz-placeholder {
color: rgba(255,255,255,0.2);
}
:-ms-input-placeholder {
color: rgba(255,255,255,0.2);
}
.page-header {
width: 100%;
color: #fff;
padding: 5px 30px;
font: normal 18px/1.5 Lato,Arial,sans-serif;
overflow: hidden;
}
.page-header a {
color: inherit;
text-decoration: none;
}
button::-moz-focus-inner {
border: 0;
padding: 0;
}
input[type='text']:focus {
outline: none;
}
.icon-trash,.icon-pencil,.icon-save {
position: absolute;
top: 3px;
color: #aaa;
cursor: pointer;
right: 52px;
}
.icon-trash {
right: 10px;
}
.notification {
position: fixed;
top: 0;
left: 50%;
z-index: 3;
padding: 5px 10px;
color: #fff;
display: none;
box-shadow: 0 4px 0 -2px rgba(0,0,0,0.1);
}
.undo-button {
background-color: orange;
cursor: pointer;
margin-left: -100px;
}
.save-notification {
background-color: #2ecc71;
margin-left: -50px;
}
button.disabled .icon-trash,.clear-all.disabled .icon-trash {
color: #888;
}
button .icon-trash {
float: none;
margin-right: 10px;
opacity: 1 !important;
position: static;
}
.count {
float: left;
}
#count-pos.count:after {
content: " positive word(s)";
}
#count-neg.count:after {
content: " negative word(s)";
}
.words {
list-style-type: none;
max-width: 500px;
width: 100%;
background-color: #EFEFEF;
padding: 2px 5px;
height: 162px;
overflow-y: scroll;
overflow-x: hidden;
list-style: none;
margin: 0;
position: relative;
}
.words li {
z-index: 1;
font-weight: 400;
/*box-shadow: 0 7px 0 -4px rgba(0, 0, 0, 0.2);*/
color: #666;
text-align: left;
line-height: 31px;
/*background-color: #fff;*/
margin-bottom: 2px;
/*padding: 0px 65px 0px 7px;*/
position: relative;
opacity: 0;
word-wrap: break-word;
-webkit-transition: all .1s ease;
-o-transition: all .1s ease;
transition: all .1s ease;
}
.words li:focus {
outline: none;
}
li[contenteditable='true'] {
color: #000;
}
.words li .phrase {
width: 47%;
display: inline-block;
background-color: #fff;
margin-right: 8px;
padding-left: 8px;
border: 1px solid #ccc;
border-radius: 5px;
}
.words li .weight {
width: 29%;
display: inline-block;
background-color: #fff;
padding-left: 8px;
border: 1px solid #ccc;
border-radius: 5px;
}
.words li .phrase:hover, .words li .weight:hover {
background-color: #fefefe;
border: 1px solid #999;
}
/*ANIMATIONS*/
li.new-item {
opacity:0;
-webkit-animation:fadeIn .1s linear forwards;
-o-animation:fadeIn .1s linear forwards;
animation:fadeIn .1s linear forwards
}
@keyframes fadeIn {
to {
opacity:1
}
}
@keyframes openspace {
to {
height: auto
}
}
li.removed-item {
-webkit-animation: removed-item-animation .3s cubic-bezier(.55,-0.04,.91,.94) forwards;
-o-animation: removed-item-animation .3s cubic-bezier(.55,-0.04,.91,.94) forwards;
animation: removed-item-animation .3s cubic-bezier(.55,-0.04,.91,.94) forwards
}
@keyframes removed-item-animation {
from {
opacity: 1;
}
to {
opacity: 0
}
}
@-webkit-keyframes new-item-animation {
from {
opacity: 0;
-webkit-transform: scale(0);
transform: scale(0)
}
to {
opacity: 1;
-webkit-transform: scale(1);
transform: scale(1)
}
}
@-o-keyframes new-item-animation {
from {
opacity: 0;
-o-transform: scale(0);
transform: scale(0)
}
to {
opacity: 1;
-o-transform: scale(1);
transform: scale(1)
}
}
@-webkit-keyframes openspace {
to {
height: auto
}
}
@-o-keyframes openspace {
to {
height: auto
}
}
@-webkit-keyframes removed-item-animation {
from {
opacity: 1;
-webkit-transform: scale(1);
transform: scale(1)
}
to {
-webkit-transform: scale(0);
transform: scale(0);
opacity: 0
}
}
@-o-keyframes removed-item-animation {
from {
opacity: 1;
-o-transform: scale(1);
transform: scale(1)
}
to {
-o-transform: scale(0);
transform: scale(0);
opacity: 0
}
}

View File

@ -1,745 +0,0 @@
/**
* Sticky Sidebar JavaScript Plugin.
* @version 3.3.0
* @author Ahmed Bouhuolia <a.bouhuolia@gmail.com>
* @license The MIT License (MIT)
*/
const StickySidebar = (() => {
// ---------------------------------
// # Define Constants
// ---------------------------------
//
const EVENT_KEY = '.stickySidebar';
const VERSION = '3.2.0';
const DEFAULTS = {
/**
* Additional top spacing of the element when it becomes sticky.
* @type {Numeric|Function}
*/
topSpacing: 0,
/**
* Additional bottom spacing of the element when it becomes sticky.
* @type {Numeric|Function}
*/
bottomSpacing: 0,
/**
* Container sidebar selector to know what the beginning and end of sticky element.
* @type {String|False}
*/
containerSelector: false,
/**
* Inner wrapper selector.
* @type {String}
*/
innerWrapperSelector: '.inner-wrapper-sticky',
/**
* The name of CSS class to apply to elements when they have become stuck.
* @type {String|False}
*/
stickyClass: 'is-affixed',
/**
* Detect when sidebar and its container change height so re-calculate their dimensions.
* @type {Boolean}
*/
resizeSensor: true,
/**
* The sidebar returns to its normal position if its width below this value.
* @type {Numeric}
*/
minWidth: false
};
// ---------------------------------
// # Class Definition
// ---------------------------------
//
/**
* Sticky Sidebar Class.
* @public
*/
class StickySidebar{
/**
* Sticky Sidebar Constructor.
* @constructor
* @param {HTMLElement|String} sidebar - The sidebar element or sidebar selector.
* @param {Object} options - The options of sticky sidebar.
*/
constructor(sidebar, options = {}){
this.options = StickySidebar.extend(DEFAULTS, options);
// Sidebar element query if there's no one, throw error.
this.sidebar = ('string' === typeof sidebar ) ? document.querySelector(sidebar) : sidebar;
if( 'undefined' === typeof this.sidebar )
throw new Error("There is no specific sidebar element.");
this.sidebarInner = false;
this.container = this.sidebar.parentElement;
// Current Affix Type of sidebar element.
this.affixedType = 'STATIC';
this.direction = 'down';
this.support = {
transform: false,
transform3d: false
};
this._initialized = false;
this._reStyle = false;
this._breakpoint = false;
this._resizeListeners = [];
// Dimensions of sidebar, container and screen viewport.
this.dimensions = {
translateY: 0,
topSpacing: 0,
lastTopSpacing: 0,
bottomSpacing: 0,
lastBottomSpacing: 0,
sidebarHeight: 0,
sidebarWidth: 0,
containerTop: 0,
containerHeight: 0,
viewportHeight: 0,
viewportTop: 0,
lastViewportTop: 0,
};
// Bind event handlers for referencability.
['handleEvent'].forEach( (method) => {
this[method] = this[method].bind(this);
});
// Initialize sticky sidebar for first time.
this.initialize();
}
/**
* Initializes the sticky sidebar by adding inner wrapper, define its container,
* min-width breakpoint, calculating dimensions, adding helper classes and inline style.
* @private
*/
initialize(){
this._setSupportFeatures();
// Get sticky sidebar inner wrapper, if not found, will create one.
if( this.options.innerWrapperSelector ){
this.sidebarInner = this.sidebar.querySelector(this.options.innerWrapperSelector);
if( null === this.sidebarInner )
this.sidebarInner = false;
}
if( ! this.sidebarInner ){
let wrapper = document.createElement('div');
wrapper.setAttribute('class', 'inner-wrapper-sticky');
this.sidebar.appendChild(wrapper);
while( this.sidebar.firstChild != wrapper )
wrapper.appendChild(this.sidebar.firstChild);
this.sidebarInner = this.sidebar.querySelector('.inner-wrapper-sticky');
}
// Container wrapper of the sidebar.
if( this.options.containerSelector ){
let containers = document.querySelectorAll(this.options.containerSelector);
containers = Array.prototype.slice.call(containers);
containers.forEach((container, item) => {
if( ! container.contains(this.sidebar) ) return;
this.container = container;
});
if( ! containers.length )
throw new Error("The container does not contains on the sidebar.");
}
// If top/bottom spacing is not function parse value to integer.
if( 'function' !== typeof this.options.topSpacing )
this.options.topSpacing = parseInt(this.options.topSpacing) || 0;
if( 'function' !== typeof this.options.bottomSpacing )
this.options.bottomSpacing = parseInt(this.options.bottomSpacing) || 0;
// Breakdown sticky sidebar if screen width below `options.minWidth`.
this._widthBreakpoint();
// Calculate dimensions of sidebar, container and viewport.
this.calcDimensions();
// Affix sidebar in proper position.
this.stickyPosition();
// Bind all events.
this.bindEvents();
// Inform other properties the sticky sidebar is initialized.
this._initialized = true;
}
/**
* Bind all events of sticky sidebar plugin.
* @protected
*/
bindEvents(){
window.addEventListener('resize', this, {passive: true});
window.addEventListener('scroll', this, {passive: true});
this.sidebar.addEventListener('update' + EVENT_KEY, this);
if( this.options.resizeSensor && 'undefined' !== typeof ResizeSensor ){
new ResizeSensor(this.sidebarInner, this.handleEvent);
new ResizeSensor(this.container, this.handleEvent);
}
}
/**
* Handles all events of the plugin.
* @param {Object} event - Event object passed from listener.
*/
handleEvent(event){
this.updateSticky(event);
}
/**
* Calculates dimensions of sidebar, container and screen viewpoint
* @public
*/
calcDimensions(){
if( this._breakpoint ) return;
var dims = this.dimensions;
// Container of sticky sidebar dimensions.
dims.containerTop = StickySidebar.offsetRelative(this.container).top;
dims.containerHeight = this.container.clientHeight;
dims.containerBottom = dims.containerTop + dims.containerHeight;
// Sidebar dimensions.
dims.sidebarHeight = this.sidebarInner.offsetHeight;
dims.sidebarWidth = this.sidebar.offsetWidth;
// Screen viewport dimensions.
dims.viewportHeight = window.innerHeight;
this._calcDimensionsWithScroll();
}
/**
* Some dimensions values need to be up-to-date when scrolling the page.
* @private
*/
_calcDimensionsWithScroll(){
var dims = this.dimensions;
dims.sidebarLeft = StickySidebar.offsetRelative(this.sidebar).left;
dims.viewportTop = document.documentElement.scrollTop || document.body.scrollTop;
dims.viewportBottom = dims.viewportTop + dims.viewportHeight;
dims.viewportLeft = document.documentElement.scrollLeft || document.body.scrollLeft;
dims.topSpacing = this.options.topSpacing;
dims.bottomSpacing = this.options.bottomSpacing;
if( 'function' === typeof dims.topSpacing )
dims.topSpacing = parseInt(dims.topSpacing(this.sidebar)) || 0;
if( 'function' === typeof dims.bottomSpacing )
dims.bottomSpacing = parseInt(dims.bottomSpacing(this.sidebar)) || 0;
if( 'VIEWPORT-TOP' === this.affixedType ){
// Adjust translate Y in the case decrease top spacing value.
if( dims.topSpacing < dims.lastTopSpacing ){
dims.translateY += dims.lastTopSpacing - dims.topSpacing;
this._reStyle = true;
}
} else if( 'VIEWPORT-BOTTOM' === this.affixedType ){
// Adjust translate Y in the case decrease bottom spacing value.
if( dims.bottomSpacing < dims.lastBottomSpacing ){
dims.translateY += dims.lastBottomSpacing - dims.bottomSpacing;
this._reStyle = true;
}
}
dims.lastTopSpacing = dims.topSpacing;
dims.lastBottomSpacing = dims.bottomSpacing;
}
/**
* Determine whether the sidebar is bigger than viewport.
* @public
* @return {Boolean}
*/
isSidebarFitsViewport(){
return this.dimensions.sidebarHeight < this.dimensions.viewportHeight;
}
/**
* Observe browser scrolling direction top and down.
*/
observeScrollDir(){
var dims = this.dimensions;
if( dims.lastViewportTop === dims.viewportTop ) return;
var furthest = 'down' === this.direction ? Math.min : Math.max;
// If the browser is scrolling not in the same direction.
if( dims.viewportTop === furthest(dims.viewportTop, dims.lastViewportTop) )
this.direction = 'down' === this.direction ? 'up' : 'down';
}
/**
* Gets affix type of sidebar according to current scrollTop and scrollLeft.
* Holds all logical affix of the sidebar when scrolling up and down and when sidebar
* is bigger than viewport and vice versa.
* @public
* @return {String|False} - Proper affix type.
*/
getAffixType(){
var dims = this.dimensions, affixType = false;
this._calcDimensionsWithScroll();
var sidebarBottom = dims.sidebarHeight + dims.containerTop;
var colliderTop = dims.viewportTop + dims.topSpacing;
var colliderBottom = dims.viewportBottom - dims.bottomSpacing;
// When browser is scrolling top.
if( 'up' === this.direction ){
if( colliderTop <= dims.containerTop ){
dims.translateY = 0;
affixType = 'STATIC';
} else if( colliderTop <= dims.translateY + dims.containerTop ){
dims.translateY = colliderTop - dims.containerTop;
affixType = 'VIEWPORT-TOP';
} else if( ! this.isSidebarFitsViewport() && dims.containerTop <= colliderTop ){
affixType = 'VIEWPORT-UNBOTTOM';
}
// When browser is scrolling up.
} else {
// When sidebar element is not bigger than screen viewport.
if( this.isSidebarFitsViewport() ){
if( dims.sidebarHeight + colliderTop >= dims.containerBottom ){
dims.translateY = dims.containerBottom - sidebarBottom;
affixType = 'CONTAINER-BOTTOM';
} else if( colliderTop >= dims.containerTop ){
dims.translateY = colliderTop - dims.containerTop;
affixType = 'VIEWPORT-TOP';
}
// When sidebar element is bigger than screen viewport.
} else {
if( dims.containerBottom <= colliderBottom ){
dims.translateY = dims.containerBottom - sidebarBottom;
affixType = 'CONTAINER-BOTTOM';
} else if( sidebarBottom + dims.translateY <= colliderBottom ){
dims.translateY = colliderBottom - sidebarBottom;
affixType = 'VIEWPORT-BOTTOM';
} else if( dims.containerTop + dims.translateY <= colliderTop ){
affixType = 'VIEWPORT-UNBOTTOM';
}
}
}
// Make sure the translate Y is not bigger than container height.
dims.translateY = Math.max(0, dims.translateY);
dims.translateY = Math.min(dims.containerHeight, dims.translateY);
dims.lastViewportTop = dims.viewportTop;
return affixType;
}
/**
* Gets inline style of sticky sidebar wrapper and inner wrapper according
* to its affix type.
* @private
* @param {String} affixType - Affix type of sticky sidebar.
* @return {Object}
*/
_getStyle(affixType){
if( 'undefined' === typeof affixType ) return;
var style = {inner: {}, outer: {}};
var dims = this.dimensions;
switch( affixType ){
case 'VIEWPORT-TOP':
style.inner = {position: 'fixed', top: dims.topSpacing,
left: dims.sidebarLeft - dims.viewportLeft, width: dims.sidebarWidth};
break;
case 'VIEWPORT-BOTTOM':
style.inner = {position: 'fixed', top: 'auto', left: dims.sidebarLeft,
bottom: dims.bottomSpacing, width: dims.sidebarWidth};
break;
case 'CONTAINER-BOTTOM':
case 'VIEWPORT-UNBOTTOM':
let translate = this._getTranslate(0, dims.translateY + 'px');
if( translate )
style.inner = {transform: translate};
else
style.inner = {position: 'absolute', top: dims.translateY, width: dims.sidebarWidth};
break;
}
switch( affixType ){
case 'VIEWPORT-TOP':
case 'VIEWPORT-BOTTOM':
case 'VIEWPORT-UNBOTTOM':
case 'CONTAINER-BOTTOM':
style.outer = {height: dims.sidebarHeight, position: 'relative'};
break;
}
style.outer = StickySidebar.extend({height: '', position: ''}, style.outer);
style.inner = StickySidebar.extend({position: 'relative', top: '', left: '',
bottom: '', width: '', transform: this._getTranslate()}, style.inner);
return style;
}
/**
* Cause the sidebar to be sticky according to affix type by adding inline
* style, adding helper class and trigger events.
* @function
* @protected
* @param {string} force - Update sticky sidebar position by force.
*/
stickyPosition(force){
if( this._breakpoint ) return;
force = this._reStyle || force || false;
var offsetTop = this.options.topSpacing;
var offsetBottom = this.options.bottomSpacing;
var affixType = this.getAffixType();
var style = this._getStyle(affixType);
if( (this.affixedType != affixType || force) && affixType ){
let affixEvent = 'affix.' + affixType.toLowerCase().replace('viewport-', '') + EVENT_KEY;
StickySidebar.eventTrigger(this.sidebar, affixEvent);
if( 'STATIC' === affixType )
StickySidebar.removeClass(this.sidebar, this.options.stickyClass);
else
StickySidebar.addClass(this.sidebar, this.options.stickyClass);
for( let key in style.outer ){
let _unit = ('number' === typeof style.outer[key]) ? 'px' : '';
this.sidebar.style[key] = style.outer[key];
}
for( let key in style.inner ){
let _unit = ('number' === typeof style.inner[key]) ? 'px' : '';
this.sidebarInner.style[key] = style.inner[key] + _unit;
}
let affixedEvent = 'affixed.'+ affixType.toLowerCase().replace('viewport-', '') + EVENT_KEY;
StickySidebar.eventTrigger(this.sidebar, affixedEvent);
} else {
if( this._initialized ) this.sidebarInner.style.left = style.inner.left;
}
this.affixedType = affixType;
}
/**
* Breakdown sticky sidebar when window width is below `options.minWidth` value.
* @protected
*/
_widthBreakpoint(){
if( window.innerWidth <= this.options.minWidth ){
this._breakpoint = true;
this.affixedType = 'STATIC';
this.sidebar.removeAttribute('style');
StickySidebar.removeClass(this.sidebar, this.options.stickyClass);
this.sidebarInner.removeAttribute('style');
} else {
this._breakpoint = false;
}
}
/**
* Switches between functions stack for each event type, if there's no
* event, it will re-initialize sticky sidebar.
* @public
*/
updateSticky(event = {}){
if( this._running ) return;
this._running = true;
((eventType) => {
requestAnimationFrame(() => {
switch( eventType ){
// When browser is scrolling and re-calculate just dimensions
// within scroll.
case 'scroll':
this._calcDimensionsWithScroll();
this.observeScrollDir();
this.stickyPosition();
break;
// When browser is resizing or there's no event, observe width
// breakpoint and re-calculate dimensions.
case 'resize':
default:
this._widthBreakpoint();
this.calcDimensions();
this.stickyPosition(true);
break;
}
this._running = false;
});
})(event.type);
}
/**
* Set browser support features to the public property.
* @private
*/
_setSupportFeatures(){
var support = this.support;
support.transform = StickySidebar.supportTransform();
support.transform3d = StickySidebar.supportTransform(true);
}
/**
* Get translate value, if the browser supports transfrom3d, it will adopt it.
* and the same with translate. if browser doesn't support both return false.
* @param {Number} y - Value of Y-axis.
* @param {Number} x - Value of X-axis.
* @param {Number} z - Value of Z-axis.
* @return {String|False}
*/
_getTranslate(y = 0, x = 0, z = 0){
if( this.support.transform3d ) return 'translate3d(' + y +', '+ x +', '+ z +')';
else if( this.support.translate ) return 'translate('+ y +', '+ x +')';
else return false;
}
/**
* Destroy sticky sidebar plugin.
* @public
*/
destroy(){
window.removeEventListener('resize', this);
window.removeEventListener('scroll', this);
this.sidebar.classList.remove(this.options.stickyClass);
this.sidebar.style.minHeight = '';
this.sidebar.removeEventListener('update' + EVENT_KEY, this);
var styleReset = {inner: {}, outer: {}};
styleReset.inner = {position: '', top: '', left: '', bottom: '', width: '', transform: ''};
styleReset.outer = {height: '', position: ''};
for( let key in styleReset.outer )
this.sidebar.style[key] = styleReset.outer[key];
for( let key in styleReset.inner )
this.sidebarInner.style[key] = styleReset.inner[key];
if( this.options.resizeSensor && 'undefined' !== typeof ResizeSensor ){
ResizeSensor.detach(this.sidebarInner, this.handleEvent);
ResizeSensor.detach(this.container, this.handleEvent);
}
}
/**
* Determine if the browser supports CSS transform feature.
* @function
* @static
* @param {Boolean} transform3d - Detect transform with translate3d.
* @return {String}
*/
static supportTransform(transform3d){
var result = false,
property = (transform3d) ? 'perspective' : 'transform',
upper = property.charAt(0).toUpperCase() + property.slice(1),
prefixes = ['Webkit', 'Moz', 'O', 'ms'],
support = document.createElement('support'),
style = support.style;
(property + ' ' + prefixes.join(upper + ' ') + upper).split(' ').forEach(function(property, i) {
if (style[property] !== undefined) {
result = property;
return false;
}
});
return result;
}
/**
* Trigger custom event.
* @static
* @param {DOMObject} element - Target element on the DOM.
* @param {String} eventName - Event name.
* @param {Object} data -
*/
static eventTrigger(element, eventName, data){
try{
var event = new CustomEvent(eventName, {detail: data});
} catch(e){
var event = document.createEvent('CustomEvent');
event.initCustomEvent(eventName, true, true, data);
}
element.dispatchEvent(event);
}
/**
* Extend options object with defaults.
* @function
* @static
*/
static extend(defaults, options){
var results = {};
for( let key in defaults ){
if( 'undefined' !== typeof options[key] ) results[key] = options[key];
else results[key] = defaults[key];
}
return results;
}
/**
* Get current coordinates left and top of specific element.
* @static
*/
static offsetRelative(element){
var result = {left: 0, top: 0};
do{
let offsetTop = element.offsetTop;
let offsetLeft = element.offsetLeft;
if( ! isNaN(offsetTop) )
result.top += offsetTop;
if( ! isNaN(offsetLeft) )
result.left += offsetLeft;
element = ( 'BODY' === element.tagName ) ?
element.parentElement : element.offsetParent;
} while(element)
return result;
}
/**
* Add specific class name to specific element.
* @static
* @param {ObjectDOM} element
* @param {String} className
*/
static addClass(element, className){
if( ! StickySidebar.hasClass(element, className) ){
if (element.classList)
element.classList.add(className);
else
element.className += ' ' + className;
}
}
/**
* Remove specific class name to specific element
* @static
* @param {ObjectDOM} element
* @param {String} className
*/
static removeClass(element, className){
if( StickySidebar.hasClass(element, className) ){
if (element.classList)
element.classList.remove(className);
else
element.className = element.className.replace(new RegExp('(^|\\b)' + className.split(' ').join('|') + '(\\b|$)', 'gi'), ' ');
}
}
/**
* Determine weather the element has specific class name.
* @static
* @param {ObjectDOM} element
* @param {String} className
*/
static hasClass(element, className){
if (element.classList)
return element.classList.contains(className);
else
return new RegExp('(^| )' + className + '( |$)', 'gi').test(element.className);
}
}
return StickySidebar;
})();
// Global
// -------------------------
window.StickySidebar = StickySidebar;
(() => {
if( 'undefined' === typeof window ) return;
const plugin = window.$ || window.jQuery || window.Zepto;
const DATA_NAMESPACE = 'stickySidebar';
// Make sure the site has jquery or zepto plugin.
if( plugin ){
/**
* Sticky Sidebar Plugin Defintion.
* @param {Object|String} - config
*/
function _jQueryPlugin(config){
return this.each(function(){
var $this = plugin(this),
data = plugin(this).data(DATA_NAMESPACE);
if( ! data ){
data = new StickySidebar(this, typeof config == 'object' && config);
$this.data(DATA_NAMESPACE, data);
}
if( 'string' === typeof config){
if (data[config] === undefined && ['destroy', 'updateSticky'].indexOf(config) === -1)
throw new Error('No method named "'+ config +'"');
data[config]();
}
});
}
plugin.fn.stickySidebar = _jQueryPlugin;
plugin.fn.stickySidebar.Constructor = StickySidebar;
const old = plugin.fn.stickySidebar;
/**
* Sticky Sidebar No Conflict.
*/
plugin.fn.stickySidebar.noConflict = function(){
plugin.fn.stickySidebar = old;
return this;
};
}
})();

View File

@ -1,15 +0,0 @@
(function(){
function getCookie(name) {
var value = "; " + document.cookie;
var parts = value.split("; " + name + "=");
if (parts.length == 2) return parts.pop().split(";").shift();
}
var init = function(){
};
//start all
init();
})();

View File

@ -1,364 +0,0 @@
/* styles.css for template #124
spyka.net Webmaster */
html {
position: relative;
min-width: 1268px;
height:100%;
}
body {
margin:0 auto;
padding:0;
width:100%;
height:100%;
font-family:Arial, Helvetica, sans-serif;
background-image:url('BG_Footer_2.jpg');
background-repeat:no-repeat;
background-position:bottom right;
background-color:#f9f9f9;
background-attachment:fixed;
}
/* Global */
a {
font-weight:bold;
text-decoration:underline;
color:#333;
position: relative;
}
a:hover {
color:#5882FA;
}
h1 {
font-size:20px;
margin:20px 0 15px 0;
}
h2 {
font-size:1.2em;
font-family:Arial, Helvetica, sans-serif;
font-weight:normal;
border-bottom:1px solid #CCC;
color:#5882FA;
}
h3 {
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:0.9em;
color:#333;
border-bottom:3px solid #5882FA;
}
h4 {
font-size:1.0em;
font-family:Arial, Helvetica, sans-serif;
font-weight:bold;
padding:0;
margin:0 0 0 10px;
color:#5882FA;
}
p {
margin-left:20px;
font-size:0.8em;
}
table.standard-table { border: 1px solid #777; border-collapse: collapse; }
table.standard-table td { padding: 5px; border: 1px solid #888; text-align: left; vertical-align: top; }
table.standard-table td.header, table.standard-table th { border: 1px solid #777; padding: 0 5px; background: #eee; text-align: left; font-weight: bold; }
ul {
list-style-type:square;
padding-left:30px;
margin-left:30px;
font-size:0.8em;
}
li {
margin-top:0.2em;
margin-bottom:0.2em;
}
blockquote {
border:1px solid #ddd;
background-color:#eee;
padding:4px;
font-size:0.9em;
font-style:italic;
}
blockquote p {
margin:3px;
padding:0;
}
/* Layout */
div#container {
margin:auto;
height:100%;
background-color:transparent;
}
div#page {
width:80%;
height:100%;
float:left;
border-left:1px solid #999;
padding-left:10px;
padding-right: 0px;
padding-bottom:0px;
}
div#page p
{
margin-left:0px;
font-size:0.8em;
}
div#fullpage {
width:90%;
float:left;
padding-left:30px;
padding-bottom:30px;
overflow: hidden;
}
div#fullpage p
{
margin-left:0px;
font-size:0.8em;
}
/* Header */
div#header {
padding:1px 0 30px 0;
}
div#header h1 {
font-family:Arial, Helvetica, sans-serif;
color:#5882FA;
font-size:1.6em;
padding:0;
margin:30px 0 0 20px;
font-weight:bold;
}
div#header h2 {
font-family:Arial, Helvetica, sans-serif;
color:#333333;
font-size:1.0em;
padding:0;
margin:0 0 0 20px;
font-weight:bold;
border-bottom:0;
}
/* Navigation menu */
div#menu {
height:20px;
border-bottom:20px solid #5882FA;
}
div#menu ul {
padding:0;
list-style-type:none;
margin:0 0 0 0px;
font-family:Arial, Helvetica, sans-serif;
font-size:0.75em;
}
div#menu ul li {
float:left;
display:inline;
padding:0 7px;
margin:0;
}
div#menu ul li a {
display:block;
float:left;
font-weight:bold;
padding:1px 15px 0 15px;
height:2px;
color:#999;
text-decoration:none;
border:none;
}
div#menu ul li a:hover {
text-decoration:underline;
}
div#menu ul li a.current:hover {
text-decoration:none;
}
div#menu ul li a.current {
position:relative; /* for IE6 */
color:#fff;
margin-top:-5px;
padding-top:5px;
height:20px;
border:1px solid #5882FA;
border-bottom:none;
background-color:#5882FA;
}
/* Content */
div#content {
padding:14px 5px;
}
/* Sidebar */
div#sidebar {
width:18%;
float:left;
padding:0;
margin:0;
}
div#sidebar p {
margin-left:10px;
margin-right:5px;
}
div#sidebar ul {
padding-left:15px;
margin-left:15px;
margin-right:5px;
}
/* Footer */
div#footer {
position:fixed;
bottom:0;
width:100%;
height:40px;
background-color: #f9f9f9;
}
div#footer p {
padding:10px 0 10px 0;
width:100%;
border-top:1px solid #ccc;
margin:5px 0 0 0;
font-size:0.8em;
text-align:center;
}
div#footer p a {
text-decoration:underline;
}
div#info a {position:relative;}
div#info a span {display: none;}
div#info a:hover span {
display: block;
width:200px;
position: absolute;
padding: 5px; margin: 10px; z-index: 100;
color: #333300; background: white;
font: 10px Verdana, sans-serif; text-align: center;}
div#plain {
}
div#plain ul {
padding:0;
list-style-type:none;
margin:10px 0 10px 0;
/* border-top:1px solid #ccc; /* /* uncomment to add table-like border */
}
div#plain ul li {
margin:0;
padding:0;
/* border-bottom:1px solid #ccc; /* /* uncomment to add table-like border */
}
div#plain ul li a {
display:block;
color: black;
padding:7px 10px;
border-right:none;
text-decoration:none;
}
div#plain ul li a:hover {
border-right:none;
text-decoration:underline;
}
a#qbutton{
font-size:11px;
font-weight:lighter;
text-decoration:none;
}
a#qbutton{
font-size:13px;
font-weight:bold;
text-decoration:none;
}
.google-visualization-table-table {
font-family: arial, helvetica;
font-size: 0.80em !important;
}
.btn {
display: inline-block;
padding: 4px 12px;
margin-bottom: 0;
font-size: 14px;
line-height: 20px;
color: #333333;
text-align: center;
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
vertical-align: middle;
cursor: pointer;
background-color: #f5f5f5;
background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));
background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6);
background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
background-image: linear-gradient(to bottom, #ffffff, #e6e6e6);
background-repeat: repeat-x;
border: 1px solid #cccccc;
border-color: #e6e6e6 #e6e6e6 #bfbfbf;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
border-bottom-color: #b3b3b3;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0);
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
-moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
}
.btn:hover {
color: #333333;
background-color: #e6e6e6;
text-decoration: none;
background-position: 0 -15px;
-webkit-transition: background-position 0.1s linear;
-moz-transition: background-position 0.1s linear;
-o-transition: background-position 0.1s linear;
transition: background-position 0.1s linear;
}
.btn:active {
background-image: none;
outline: 0;
-webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
-moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
}
.btn:focus, .btn:hover {
outline: 0;
}
.example {
color: #ffffff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
background-color: #5bb75b;
background-image: -moz-linear-gradient(top, #62c462, #51a351);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351));
background-image: -webkit-linear-gradient(top, #62c462, #51a351);
background-image: -o-linear-gradient(top, #62c462, #51a351);
background-image: linear-gradient(to bottom, #62c462, #51a351);
background-repeat: repeat-x;
border-color: #51a351 #51a351 #387038;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
}
.example:focus {
background-color: #51a351
}
.example:hover {
color: #333333;
background-color: #51a351;
*background-color: #499249;
}

View File

@ -1,152 +0,0 @@
table.top{
border: 0px ;
border-spacing:10px;
font-family:"Bookman Old Style";
}
.usimilar{
display:none;
}
.uprofile{
display:none;
}
div#uprofile td.innerheader{
background-color:#ccff66;
border:1px ridge;
width:110;
/*font-weight: bold; */
}
div#uprofile td.username{
background-color:#ccff66;
}
table.userProfile{
width:100%;
border: 2px ridge;
border-spacing:0px;
border-color:#333333;
background-color:#333333;
}
.username {
font-family:"Bookman Old Style";
font-size:36px;
text-align:center;
}
td.username{
background-color:#999999;
}
tr.username{
border:#333333;
}
table.innerprofile{
/*border-spacing: 0pt;*/
/*padding:3px;*/
width:100%;
border-spacing:0px;
border:1px solid;
border-color:#333333;
}
table.innerprofile td{
/*dding:3px;*/
border-spacing:0px;
border:1px solid;
border-color:#333333;
}
td.innerheader{
background-color:#cccccc;
border:1px ridge;
width:110;
/*font-weight: bold; */
}
tr.innerheader{
border:1px ridge;
}
table.inner{
border:0px;
width:100%;
border-spacing:0px;
background-color:#ffffff;
border-color:#ffffff;
}
td.innerprofile{
background-color:#ffffff;
border-color:#333333;
border:1px solid;
}
html {
}
body {
margin:0 auto;
padding:0;
width:100%;
height:100%;
font-family:Arial, Helvetica, sans-serif;
/*background-color:#999;*/
}
/* Global */
a {
font-weight:bold;
text-decoration:underline;
color:#333;
position: relative;
}
a:hover {
color:#5882FA;
}
.extra {
text-decoration:none;
}
a span.extra {display: none;
text-decoration:none;
}
a:hover span.extra {
text-decoration:none;
display: block;
width:130px;
position: absolute;
padding: 5px;
/*margin: 5px; */
z-index: 10000;
color: #000000;
background: white;
font: 10px Verdana, sans-serif;
left:10px;
top:15px
}
#term-vis {
padding:50px;
margin-left:auto;
margin-right:auto;
width:70%;
border:1px solid rgb(204, 204, 204);
text-align:center;
}

View File

@ -1,169 +0,0 @@
/*
A list of terms, where the size and color of each term is determined
by a number (typically numebr of times it appears in some text).
Uses the Google Visalization API.
Data Format
First column is the text (string)
Second column is the weight (positive number)
Third optional column ia a link (string)
Configuration options:
target Target for link: '_top' (defailt) '_blank'
Methods
none
Events
select
*/
function changecss(theClass,element,value) {
//Last Updated on June 23, 2009
//documentation for this script at
//http://www.shawnolson.net/a/503/altering-css-class-attributes-with-javascript.html
var cssRules;
alert("class is:"+theClass+" element:"+element+"value: "+value);
var added = false;
for (var S = 0; S < document.styleSheets.length; S++){
if (document.styleSheets[S]['rules']) {
cssRules = 'rules';
} else if (document.styleSheets[S]['cssRules']) {
cssRules = 'cssRules';
} else {
//no rules found... browser unknown
}
for (var R = 0; R < document.styleSheets[S][cssRules].length; R++) {
if (document.styleSheets[S][cssRules][R].selectorText == theClass) {
alert("found");
if(document.styleSheets[S][cssRules][R].style[element]){
document.styleSheets[S][cssRules][R].style[element] = value;
added=true;
break;
}
}
}
if(!added){ alert("not added");
if(document.styleSheets[S].insertRule){
document.styleSheets[S].insertRule(theClass+' { '+element+': '+value+'; }',document.styleSheets[S][cssRules].length);
} else if (document.styleSheets[S].addRule) {
document.styleSheets[S].addRule(theClass,element+': '+value+';');
}
}
}
}
TermCloud = function(container) {
this.container = container;
}
TermCloud.MIN_UNIT_SIZE = 1;
TermCloud.MAX_UNIT_SIZE = 7;
TermCloud.RANGE_UNIT_SIZE = TermCloud.MAX_UNIT_SIZE - TermCloud.MIN_UNIT_SIZE;
TermCloud.prototype.draw = function(data, options) {
// var initcolor=168;
// for ( var i=1; i<10;i++){
// changecss('.term-cloud-'+i,'color','rgb('+initcolor+','+initcolor+','+initcolor+')');
// alert("ok");
// initcolor+=16;
// }
var cols = data.getNumberOfColumns();
var valid = (cols >= 2 && cols <= 3 && data.getColumnType(0) == 'string' &&
data.getColumnType(1) == 'number');
if (valid && cols == 3) {
valid = data.getColumnType(2) == 'string';
}
if (!valid) {
this.container.innerHTML = '<span class="term-cloud-error">TermCloud Error: Invalid data format. First column must be a string, second a number, and optional third column a string</span>';
return;
}
options = options || {};
morethanone=false;
var linkTarget = options.target || '_top';
// Compute frequency range
var minFreq = 999999;
var maxFreq = 0;
for (var rowInd = 0; rowInd < data.getNumberOfRows(); rowInd++) {
var f = data.getValue(rowInd, 1);
if (f > 0) {
minFreq = Math.min(minFreq, f);
maxFreq = Math.max(maxFreq, f);
}
var teststr = data.getValue(rowInd, 0);
if (teststr.indexOf(' ')>=0){
morethanone=true;
}
}
var label=data.getColumnLabel(1);
if (minFreq > maxFreq) {
minFreq = maxFreq;
}
if (minFreq == maxFreq) {
minFreq--;
//maxFreq++;
}
var range = maxFreq - minFreq;
range = Math.max(range, 4);
var html = [];
html.push('<div class="term-cloud">');
for (var rowInd = 0; rowInd < data.getNumberOfRows(); rowInd++) {
var f = data.getValue(rowInd, 1);
if (f > 0) {
var text = data.getValue(rowInd, 0);
var link = cols == 3 ? data.getValue(rowInd, 2) : null;
var freq = data.getValue(rowInd, 1);
var size = TermCloud.MIN_UNIT_SIZE +
Math.round((freq - minFreq) / range * TermCloud.RANGE_UNIT_SIZE);
html.push('<a class="term-cloud-link" href="#" >');
html.push('<span class="term-cloud-', size, '">');
html.push(this.escapeHtml(text));
html.push('</span>');
/*ML code */
html.push('<span class="extra">');
if (link!=null){
html.push(label+": "+freq+"<br/>"+this.escapeHtml(link));
}
else{
html.push(label+": "+freq);
}
html.push('</span>');
/**/
html.push('</a>');
if (morethanone==true){
html.push('<br/>');
}
html.push(' ');
}
}
html.push('</div>');
this.container.innerHTML = html.join('');
};
TermCloud.prototype.escapeHtml = function(text) {
if (text == null) {
return '';
}
return text.replace(/&/g, '&amp;').
replace(/</g, '&lt;').
replace(/>/g, '&gt;').
replace(/"/g, '&quot;');
};

View File

@ -1,17 +0,0 @@
.term-cloud {font-family: arial; font-size: 12px; }
.term-cloud-1 {font-size: 12px; color: rgb(128,128,128) ; }
.term-cloud-2 {font-size: 16px; color: rgb(112,112,112); }
.term-cloud-3 {font-size: 18px; color: rgb(96,96,96); }
.term-cloud-4 {font-size: 22px; color: rgb(80,80,80); }
.term-cloud-5 {font-size: 26px; color: rgb(64,64,64); }
.term-cloud-6 {font-size: 32px; color: rgb(48,48,48); }
.term-cloud-7 {font-size: 36px; color: rgb(32,32,32); }
.term-cloud-8 {font-size: 40px; color: rgb(16,16,16); }
.term-cloud-9 {font-size: 44px; color: rgb(0,0,0); }
.term-cloud-error {font-family: arial; font-size: 10px; color: red; }
.term-cloud-link {text-decoration: none; }
a.term-cloud { position: relative;}
a:hover.term-cloud-link {text-decoration:underline } /*border-bottom:1px solid black;*/
/*term-cloud-link:hover {text-decoration: underline; }*/

View File

@ -1,437 +0,0 @@
(function(){
function getCookie(name) {
var value = "; " + document.cookie;
var parts = value.split("; " + name + "=");
if (parts.length == 2) return parts.pop().split(";").shift();
}
////////// UPLOAD FUNCTIONS
$( '.inputfile' ).each( function() {
var $input = $( this ),
$label = $input.next( 'label' ),
labelVal = $label.html();
$input.on( 'change', function( e )
{
var fileName = '';
if( this.files && this.files.length > 1 )
fileName = ( this.getAttribute( 'data-multiple-caption' ) || '' ).replace( '{count}', this.files.length );
else if( e.target.value )
fileName = e.target.value.split( '\\' ).pop();
if( fileName )
$label.find( 'span' ).html( fileName );
else
$label.html( labelVal );
});
// Firefox bug fix
$input
.on( 'focus', function(){ $input.addClass( 'has-focus' ); })
.on( 'blur', function(){ $input.removeClass( 'has-focus' ); });
});
//generates a unique id
var generateId = function(){
return "row-" + +new Date() + Math.random().toFixed(5).substring(2);
}
var onUserStartTyping = function() {
$("#initial-type-input").on( 'keypress', function( e ){
triggerDataTable();
var value = $(this).val();
var newId = generateId();
addDataToTable(newId, value, "");
var currentEle = $('#'+ newId).find("td.code");
editValue(currentEle, value, 0);
});
}
var handleAddRowButton = function() {
$('#add-row-below').on('focus', function( e ) {
var newId = generateId();
addDataToTable(newId, "", "");
$('#'+ newId).find("td.code").trigger("click");
});
}
var handleNextButton = function() {
$('#next-button').on('click', function( e ) {
console.log(JSON.stringify(tableDataToArray()));
var formData = new FormData();
formData.append("concepts", JSON.stringify(tableDataToArray()));
$.ajax({
url: "upload-codes",
type: 'POST',
data: formData,
async: false,
success: function (data) {
console.log(JSON.parse(data).respond)
window.location="configure-profile"
},
error: function (xhr, ajaxOptions, thrownError) {
$('#file-upload-response').html('<b style=\"color: red\">File Failed to Upload!</b>'+xhr.responseText)
// $('#file-uploaded')[0].checked = false;
UIkit.notification({
message: xhr.responseText,
status: 'danger',
pos: 'top-center',
timeout: 0
});
},
cache: false,
contentType: false,
processData: false
});
});
}
var tableDataToArray = function() {
var data = {};
$("#data-table tbody tr").each(function(i, v){
// data[i] = Array();
// $(this).children('td').each(function(ii, vv){
// data[i][ii] = $(this).text();
// });
if ($(v).find("td.code").text() === '')
return true;
data[$(v).find("td.code").text()] = $(v).find("td.acknowl").text();
})
return data
}
var clickedElement=null;
var saveEditBox = function(element) {
codeElement = element.find(".code");
ackowElement = element.find(".acknowl");
codeElement2 = element.find(".code .thVal");
ackowElement2 = element.find(".acknowl .thVal");
var codeValue2 = codeElement2.val().trim();
var ackowValue2 = ackowElement2.val().trim();
$(codeElement).html(codeValue2);
$(ackowElement).html(ackowValue2);
if (codeValue2 == "") {
codeElement.addClass("empty");
}
if (ackowValue2 == "") {
ackowElement.addClass("empty");
}
}
var editValue = function(currentEle, target) {
clickedElement = currentEle;
// Locate code ande acknow
codeElement = currentEle.find(".code");
ackowElement = currentEle.find(".acknowl");
// remove empty class if any
codeElement.removeClass("empty");
ackowElement.removeClass("empty");
$(document).off('click');
// get elements lines number
var divHeight = ackowElement.outerHeight(true);
var lineHeight = parseInt(ackowElement.css('line-height'));
var lines = divHeight / lineHeight;
var codeValue = codeElement.html();
input1 = $('<input style="width:100%" class="thVal" type="text" value="" />');
input1.val(codeValue);
$(codeElement).html(input1);
var ackowValue = ackowElement.html();
input2 = $('<textarea class="uk-textarea thVal" rows="'+lines+'" style="word-break: break-word; width:100%" type="text" value="" />');
input2.val(ackowValue);
$(ackowElement).html(input2);
if (target === "code") {
$(".code .thVal").focus();
} else {
$(".acknowl .thVal").focus();
}
$(".thVal").keyup(function (event) {
// Handle Enter key
if (event.keyCode == 13) {
var parent = $(".thVal").parent().parent();
codeElement2 = parent.find(".code .thVal");
ackowElement2 = parent.find(".acknowl .thVal");
var codeValue2 = codeElement2.val().trim();
var ackowValue2 = ackowElement2.val().trim();
$(codeElement).html(codeValue2);
$(ackowElement).html(ackowValue2);
if (codeValue2 == "") {
codeElement.addClass("empty");
}
if (ackowValue2 == "") {
ackowElement.addClass("empty");
}
clickedElement = null;
}
// Handle Esc key
else if (event.keyCode == 27) {
$(codeElement).html(codeValue);
$(ackowElement).html(ackowValue);
if (codeValue == "") {
codeElement.addClass("empty");
}
if (ackowValue == "") {
ackowElement.addClass("empty");
}
clickedElement = null;
}
});
// Handle clicks outside editboxes
$(document).click(function (event) {
if($(event.target).hasClass('thVal')===false) {
saveEditBox(currentEle);
$(document).off('click');
clickedElement = null;
}
});
}
// a fucntion to catch double click on positive and negative phrases edit boxes
var addDoubleClick = function(element){
$(element).click(function (event) {
console.log($(event.target));
if($(event.target).hasClass('thVal')===false) {
event.stopPropagation();
// save previous clicked box
if (clickedElement)
saveEditBox(clickedElement);
var currentEle = $(this).parent();
editValue(currentEle, $(event.target).hasClass('code')?"code":$(event.target).hasClass('acknowl')?"acknowl":"code");
}
});
}
var removeDataRow = function(id){
var item = $('#' + id );
item.addClass('removed-item')
.one('webkitAnimationEnd oanimationend msAnimationEnd animationend', function(e) {
$(this).remove();
// fix # column numbering
count_table_rows = 1;
$("#data-table tbody tr").each(function(i, v){
// data[i] = Array();
// $(this).children('td').each(function(ii, vv){
// data[i][ii] = $(this).text();
// });
$(v).find("td.num").text(count_table_rows);
count_table_rows++;
})
if (count_table_rows === 1) {
$('#next-button').attr('disabled', 'disabled').addClass('disabled');
}
});
};
var count_table_rows = 1;
var addDataToTable = function(id, code, acknowledgment) {
// <td class="num cm-table-number">'+count_table_rows+'</td>
var row = '<tr id="' + id + '"><td class="code '+(code===''?'empty':'')+'">' + code + '</td><td class="acknowl '+(acknowledgment===''?'empty':'')+'">' + acknowledgment +'</td></tr>'
table = $('#data-table tbody');
// if content is correct and not empty append to table
$('#data-table tbody').append(row);
count_table_rows++;
if (count_table_rows != 1) {
$("#next-button").removeAttr('disabled').removeClass('disabled');
}
// add all the item's extra functionality
var createdItem = $('#'+ id);
// delete button
createdItem.append($('<td />', {"class":"edit"}).append($('<a />', {"class":"uk-icon-link", "uk-icon":"icon: pencil", "contenteditable" : "false"})));
createdItem.append($('<td />', {"class":"delete"}).append($('<a />', {
"class" :"uk-icon-link",
"uk-icon" : "icon: trash",
"contenteditable" : "false",
click: function(){
var confirmation = confirm('Delete this word?');
if(confirmation) {
removeDataRow(id);
}
}
})));
addDoubleClick($(createdItem).find("td.code"));
addDoubleClick($(createdItem).find("td.acknowl"));
addDoubleClick($(createdItem).find("td.edit"));
createdItem.on('keydown', function(ev){
if(ev.keyCode === 13) return false;
});
}
var triggerDataTable = function() {
$("#initial-type-input").remove();
$("#data-table").show();
}
var handleFileUploadButton = function() {
$("form#codes-file-input-form").on('change', function(){
if ($('#codes-file-input')[0].value === "") {
window.alert("You must specify a data file to import.");
return false;
}
var formData = new FormData($(this)[0]);
$.ajax({
url: "upload-codes",
type: 'POST',
data: formData,
async: false,
cache: false,
contentType: false,
processData: false,
success: function (data) {
// TODO check for error
$('#codes-file-upload-response').html(JSON.parse(data).respond)
respond = JSON && JSON.parse(data).respond || $.parseJSON(data).respond;
UIkit.notification({
message: respond,
status: 'success',
pos: 'top-center',
timeout: 5000
});
obj = JSON && JSON.parse(data).data || $.parseJSON(data).data;
// console.log(obj);
for (var key1 in obj) {
if (obj.hasOwnProperty(key1)) {
addDataToTable(generateId(), key1, obj[key1]);
}
}
triggerDataTable();
},
error: function (xhr, ajaxOptions, thrownError) {
$('#codes-file-upload-response').html('<b style=\"color: red\">File Failed to Upload!</b>'+xhr.responseText)
// $('#file-uploaded')[0].checked = false;
UIkit.notification({
message: xhr.responseText,
status: 'danger',
pos: 'top-center',
timeout: 0
});
}
});
$("#codes-file-input")[0].value = "";
return false;
});
var bar = document.getElementById('js-progressbar');
UIkit.upload('.js-upload', {
url: 'upload-codes',
multiple: false,
name: 'upload',
loadStart: function (e) {
bar.removeAttribute('hidden');
bar.max = e.total;
bar.value = e.loaded;
},
progress: function (e) {
bar.max = e.total;
bar.value = e.loaded;
},
loadEnd: function (e) {
bar.max = e.total;
bar.value = e.loaded;
},
completeAll: function (data) {
console.log(data.responseText);
setTimeout(function () {
bar.setAttribute('hidden', 'hidden');
}, 1000);
$('#codes-file-upload-response').html(JSON.parse(data.responseText).respond)
respond = JSON && JSON.parse(data.responseText).respond || $.parseJSON(data.responseText).respond;
obj = JSON && JSON.parse(data.responseText).data || $.parseJSON(data.responseText).data;
// console.log(obj);
// clear already inserted data
$('#data-table tbody').empty();
count_table_rows = 1;
// add newly added data
var dataCounter = 0;
for (var key1 in obj) {
if (obj.hasOwnProperty(key1)) {
addDataToTable(generateId(), key1, obj[key1]);
dataCounter++;
}
}
UIkit.notification({
message: '<b>'+dataCounter+' Codes</b> loaded successfully!',
status: 'success',
pos: 'top-center',
timeout: 5000
});
triggerDataTable();
},
error: function (xhr, ajaxOptions, thrownError) {
$('#codes-file-upload-response').html('<b style=\"color: red\">File Failed to Upload!</b>'+xhr.responseText)
// $('#file-uploaded')[0].checked = false;
UIkit.notification({
message: xhr.responseText,
status: 'danger',
pos: 'top-center',
timeout: 0
});
}
});
}
var checkAlreadyUserState = function() {
var formData = new FormData();
formData.append("already", "");
$.ajax({
url: "upload-codes",
type: 'POST',
data: formData,
async: false,
success: function (data) {
obj = JSON && JSON.parse(data).data || $.parseJSON(data).data;
// console.log(obj);
var numOfCodes = 0;
for (var key1 in obj) {
if (obj.hasOwnProperty(key1)) {
addDataToTable(generateId(), key1, obj[key1]);
}
numOfCodes++
}
if (numOfCodes != 0) {
triggerDataTable();
} else {
localStorage.clear();
}
},
error: function (xhr, ajaxOptions, thrownError) {
$('#codes-file-upload-response').html('<b style=\"color: red\">File Failed to Upload!</b>'+xhr.responseText)
// $('#file-uploaded')[0].checked = false;
UIkit.notification({
message: xhr.responseText,
status: 'danger',
pos: 'top-center',
timeout: 0
});
},
cache: false,
contentType: false,
processData: false
});
}
var init = function(){
checkAlreadyUserState();
handleFileUploadButton();
onUserStartTyping();
handleAddRowButton();
handleNextButton();
};
//start all
init();
})();

View File

@ -1,69 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html><head><meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
<link rel="stylesheet" type="text/css" href="{{ static_url("styles.css") }}" />
{% block jsimports %}{% end %}
{% block loadfun %}
<script type="text/javascript">
function httpGet(theUrl){
var xmlHttp = null;
xmlHttp = new XMLHttpRequest();
xmlHttp.open( "GET", theUrl, false );
xmlHttp.send( null );
return xmlHttp.responseText;
}
function load(){
}
</script>
{% end %}
</head>
<body onload="load()">
<div id="header">
<div style=" float:left; height:100px; left:5px; top:5px;">
<div style="height:100px; float:left;">
<img src="{{ static_url("OpenAIREplus_logo2.png") }}"/>
</div>
<div style="float:right; height:100px;">
<h1 style="position:relative; margin-left: 0px; margin-top:0px; bottom:-69px; " >{% block title %}mining service <font align=left style="font-size:0.9em; color:lightgrey">Beta</font>{% end %}</h1>
</div>
<div style="clear: both"></div>
</div>
<div style="float:right; margin:30px 20px 0 20px;"><blockquote style="font-style: normal; margin:0; background:#E0F8EC"><p align=left style="font-size:0.7em">To contact us, click on:<br>
<a href="http://www.openaire.eu/en/support/helpdesk">http://www.openaire.eu/en/support/helpdesk</a>
<br>select <i>"Submit new question"</i> and then <br><i>"subject: Technical - Mining service"</i></p></blockquote>
</div>
<div style="clear: both"></div>
</div>
<div id="menu" {%if 'color' in globals()%} style="border-bottom: 20px solid {{ color }}" {% end %}>
<ul>
<li><a href="/" title="Interactive project mining" {% block interactive %} {% end %} >Interactive project mining</a></li>
</ul>
</div>
<div id="content">
{% block content %}{% end %}
</div>
<div style="height:40px;"></div>
<div id="footer">
<p>&copy; National and Kapodistrian University of Athens (NKUA) </p>
</div>
</body>
</html>

View File

@ -1,276 +0,0 @@
<!DOCTYPE html>
<html lang="en-gb" dir="ltr" vocab="http://schema.org/">
<head>
<!--link href="http://demo.openaire.eu" rel="canonical" /-->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<base href="/">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="description" content="open access, interactive mining">
<link href="{{ static_url("favicon.ico") }}" rel="shortcut icon" type="image/vnd.microsoft.icon">
<link rel="stylesheet" href="{{ static_url("dl119_files/theme.css") }}">
<link rel="stylesheet" href="{{ static_url("dl119_files/custom.css") }}">
<link rel="stylesheet" href="{{ static_url("custom.css") }}">
<script src="https://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>
<script src="{{ static_url("ResizeSensor.js") }}" type="text/javascript"></script>
<script src="{{ static_url("jquery.sticky-sidebar.js") }}" type="text/javascript"></script>
<script src="{{ static_url("dl119_files/uikit.js") }}"></script>
<script src="{{ static_url("dl119_files/uikit-icons-max.js") }}"></script>
<!-- Google sitename markup-->
<script type="application/ld+json">
{
"@context" : "http://schema.org",
"@type" : "WebSite",
"name" : "OpenAIRE",
"url" : "http://demo.openaire.eu"
}
</script>
<!-- End of Google sitename markup-->
<!-- Google sitelinks search markup-->
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "WebSite",
"url" : "http://demo.openaire.eu",
"potentialAction": {
"@type": "SearchAction",
"target": "http://demo.openaire.eu/search/find/?keyword={search_term_string}",
"query-input": "required name=search_term_string"
}
}
</script>
<script src="//cdn.jsdelivr.net/clipboard.js/1.5.16/clipboard.min.js"></script>
<!--script type='text/javascript' src="node_modules/clipboard/dist/clipboard.min.js"></script-->
<!--script src="https://cdn.jsdelivr.net/clipboard.js/1.5.12/clipboard.min.js"></script-->
<!--script type='text/javascript' src='https://d1bxh8uas1mnw7.cloudfront.net//static/embed.js'></script-->
<!-- End of Google sitelinks search markup-->
{% block jsimports %}{% end %}
{% block loadfun %}
<script type="text/javascript">
function httpGet(theUrl){
var xmlHttp = null;
xmlHttp = new XMLHttpRequest();
xmlHttp.open( "GET", theUrl, false );
xmlHttp.send( null );
return xmlHttp.responseText;
}
function load(){
}
</script>
{% end %}
</head>
<body onload="load()" class="" cz-shortcut-listen="true" style="">
<div class="uk-offcanvas-content uk-height-viewport">
<app _nghost-dc20-1="">
<navbar _ngcontent-dc20-1="">
<div class="tm-header-mobile uk-hidden@m">
<nav class="uk-navbar-container uk-navbar" uk-navbar="">
<div class="uk-navbar-left">
<a class="uk-navbar-toggle" href="#tm-mobile" uk-toggle="">
<div class="uk-navbar-toggle-icon uk-icon custom-navbar-toggle-icon" uk-navbar-toggle-icon=""> <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="navbar-toggle-icon" ratio="1"><rect y="9" width="20" height="2"></rect><rect y="3" width="20" height="2"></rect><rect y="15" width="20" height="2"></rect></svg></div>
</a>
</div>
<div class="uk-navbar-center">
<a class="uk-logo uk-navbar-item" routerlink="/search/find" routerlinkactive="router-link-active" href="/search/find">
<img alt="OpenAIRE" class="uk-responsive-height" src="/static/OA CONNECT_B.png">
</a>
</div>
<div class="uk-navbar-right">
<user-mini>
<!--template bindings={}--><div class=" custom-user-mini-panel uk-margin-top uk-margin-right uk-float-right">
<!--template bindings={}-->
<!--template bindings={}--><a class="loginLink">Sign in</a>
</div>
</user-mini>
</div>
</nav>
<div class="uk-offcanvas" id="tm-mobile" mode="slide" overlay="" uk-offcanvas="">
<div class="uk-offcanvas-bar">
<button class="uk-offcanvas-close uk-close uk-icon" type="button" uk-close=""><svg width="14" height="14" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg" icon="close-icon" ratio="1"><line fill="none" stroke="#000" stroke-width="1.1" x1="1" y1="1" x2="13" y2="13"></line><line fill="none" stroke="#000" stroke-width="1.1" x1="13" y1="1" x2="1" y2="13"></line></svg></button>
</div>
</div>
</div>
<div class="tm-toolbar custom-connect-toolbar uk-visible@m">
<div class="uk-container uk-flex uk-flex-middle uk-container-expand">
<div class="uk-margin-auto-left">
<div class="uk-grid-medium uk-child-width-auto uk-flex-middle uk-grid uk-grid-stack" uk-grid="margin: uk-margin-small-top">
<div class="uk-first-column">
<div class="uk-panel inner" id="module-119">
<ul class="uk-subnav uk-subnav-line">
<li class="uk-active"><a href="http://dl119.madgik.di.uoa.gr/"><img alt="home" class="uk-responsive-height" src="/static/dl119_files/Home-icon.png"></a></li>
<li><a href="#">Discover/Share</a></li>
<li><a href="#">Join</a></li>
<li class="custom-connect-li"><a class="router-link-active" href="#">Connect</a></li>
<li><a href="#">Monitor_</a></li>
<li><a href="#">Develop</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="tm-header uk-visible@m tm-header-transparent" uk-header="">
<div animation="uk-animation-slide-top" class="uk-navbar-container uk-navbar-transparent uk-light" cls-active="uk-active uk-navbar-sticky" cls-inactive="uk-navbar-transparent uk-light" media="768" style="" top=".tm-header + [class*=&quot;uk-section&quot;]" >
<div class="uk-container uk-container-expand">
<nav class="uk-navbar" uk-navbar="{&quot;align&quot;:&quot;left&quot;}">
<div class="uk-navbar-left uk-visible@l ">
<a class="uk-logo uk-navbar-item router-link-active" routerlink="/search/find" routerlinkactive="router-link-active" href="/search/find">
<img alt="OpenAIRE" class="uk-responsive-height" src="/static/OA CONNECT_B.png"></a>
</div>
<div class="uk-navbar-left uk-visible@m uk-hidden@l">
<a class="uk-logo uk-navbar-item router-link-active" routerlink="/search/find" routerlinkactive="router-link-active" href="/search/find">
<img alt="OpenAIRE" class="uk-responsive-height" src="/static/OA CONNECT_A.png"></a>
</div>
<div class="uk-navbar-right">
<user-mini>
<!--template bindings={}--><div class=" custom-user-mini-panel uk-margin-top uk-margin-right uk-float-right">
<!--template bindings={}-->
<!--template bindings={}--><a class="loginLink">Sign in</a>
</div>
</user-mini>
</div>
</nav>
</div>
</div><div class="uk-sticky-placeholder" style="height: 84px; margin: 0px;" hidden="hidden"></div>
<div class="uk-sticky-placeholder" style="height: 80px; margin: 0px;" hidden="hidden"></div>
<div class="uk-sticky-placeholder" style="height: 84px; margin: 0px;" hidden="hidden"></div>
</div>
<div class="first_page_section uk-section-default uk-section uk-padding-remove-vertical">
<div class="first_page_banner_headline uk-grid-collapse uk-flex-middle uk-margin-remove-vertical uk-grid uk-grid-stack" uk-grid="">
</div>
</div>
<div></div>
</navbar>
<div _ngcontent-dc20-1="" class=" uk-section uk-margin-large-top tm-middle custom-main-content" id="tm-main">
<!-- <div _ngcontent-dc20-1="" class="uk-container uk-container-expand">
<div _ngcontent-dc20-1="" uk-grid="">
<div _ngcontent-dc20-1="" class="tm-main uk-width-1-1@s uk-width-1-1@m uk-width-1-1@l uk-row-first "> -->
<main _ngcontent-dc20-1="">
{% block content %}{% end %}
</main>
<!-- </div>
</div>
</div> -->
</div>
<cookie-law _ngcontent-dc20-1="" position="bottom" _nghost-dc20-4="" seen="true">
<!--template bindings={}--><div _ngcontent-9e3d-4="" class="cookie-law-wrapper" style="transform: translateY(100%);">
<div _ngcontent-9e3d-4="" class="copy">
<span _ngcontent-9e3d-4="">
OpenAIRE uses cookies in order to function properly.<br _ngcontent-9e3d-1="">
Cookies are small pieces of data that websites store in your browser to allow us to give you the best browsing experience possible.
By using the OpenAIRE portal you accept our use of cookies. <a _ngcontent-9e3d-1="" href="//ec.europa.eu/ipg/basics/legal/cookies/index_en.htm" target="_blank"> Read more <span _ngcontent-9e3d-1="" uk-icon="icon: chevron-right" class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="chevron-right" ratio="1"><polyline fill="none" stroke="#000" stroke-width="1.03" points="7 4 13 10 7 16"></polyline></svg></span></a>
</span>
<!--template bindings={}-->
<a _ngcontent-9e3d-4="" class="dismiss" href="#" role="button"><span _ngcontent-9e3d-4="" class="uk-icon" uk-icon="icon: close"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="close" ratio="1"><path fill="none" stroke="#000" stroke-width="1.06" d="M16,16 L4,4"></path><path fill="none" stroke="#000" stroke-width="1.06" d="M16,4 L4,16"></path></svg></span></a>
</div>
</div>
</cookie-law>
<bottom _ngcontent-dc20-1="">
<div class="custom-footer">
<div class="uk-section-primary uk-section uk-section-small uk-padding-remove-bottom">
<div class="uk-container">
<div class="uk-grid-margin uk-grid" uk-grid="">
<div class="uk-width-expand@m uk-light uk-first-column">
<div class="uk-margin">
<div uk-grid="" class="uk-child-width-auto uk-grid-small uk-grid">
<div class="uk-first-column">
<a class="el-link uk-icon-link uk-icon" href="http://www.facebook.com/groups/openaire/" target="_blank" uk-icon="icon: facebook"></a>
</div><div>
<a class="el-link uk-icon-link uk-icon" href="http://www.twitter.com/OpenAIRE_eu" target="_blank" uk-icon="icon: twitter"></a>
</div>
<div>
<a class="el-link uk-icon-link uk-icon" href="http://www.linkedin.com/groups/OpenAIRE-3893548" target="_blank" uk-icon="icon: linkedin"></a>
</div>
<div>
<a class="el-link uk-icon-link uk-icon" href="http://www.slideshare.net/OpenAIRE_eu" target="_blank" uk-icon="icon: social"></a>
</div>
<div>
<a class="el-link uk-icon-link uk-icon" href="http://vimeo.com/openaire" target="_blank" uk-icon="icon: vimeo"></a>
</div>
</div>
</div>
<div class="uk-margin uk-margin-remove-top uk-margin-remove-bottom uk-text-left">
<img alt="European Commission" class="el-image" src="/static/dl119_files/ec_logo_inv_small.png">
</div>
</div>
<div class="uk-width-expand@m uk-light">
<div>
<ul class="uk-subnav uk-margin-remove-bottom uk-subnav-divider" uk-margin="">
<li class="el-item uk-first-column">
<a class="el-link" href="http://dl119.madgik.di.uoa.gr/www.cnn.com">About</a>
</li>
<li class="el-item">
<a class="el-content uk-disabled">Services</a>
</li>
<li class="el-item">
<a class="el-content uk-disabled">News</a>
</li>
<li class="el-item">
<a class="el-content uk-disabled">Events</a>
</li>
<li class="el-item">
<a class="el-content uk-disabled">Blog</a>
</li>
<li class="el-item">
<a class="el-content uk-disabled">Contact us</a>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="uk-section-primary uk-section uk-section-small">
<div class="uk-container">
<div class="uk-grid-margin uk-grid uk-grid-stack" uk-grid="">
<div class="uk-width-1-1@m uk-first-column">
<div class="uk-margin uk-margin-remove-top uk-margin-remove-bottom uk-text-center">
<img alt="OpenAIRE" class="el-image" src="/static/dl119_files/Logo_Horizontal_white_small.png">
</div>
<div class="footer-license uk-margin uk-margin-remove-bottom uk-text-center uk-text-lead">
<div><a href="http://creativecommons.org/licenses/by/4.0/" rel="license"><img alt="Creative" src="/static/dl119_files/80x15.png" style="height: auto; max-width: 100%; vertical-align: middle;"></a>&nbsp;UNLESS OTHERWISE INDICATED, ALL MATERIALS CREATED BY THE OPENAIRE CONSORTIUM ARE LICENSED UNDER A&nbsp;<a href="http://creativecommons.org/licenses/by/4.0/" rel="license">CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE</a>.</div>
<div>OPENAIRE IS POWERED BY&nbsp;<a href="http://www.d-net.research-infrastructures.eu/">D-NET</a>.</div>
</div>
<div class="uk-margin uk-margin-remove-top uk-margin-remove-bottom uk-text-right">
<a class="uk-totop uk-icon" href="#" uk-scroll="" uk-totop=""><svg width="15" height="20" viewBox="0 0 15 20" xmlns="http://www.w3.org/2000/svg" icon="totop" ratio="1"><polyline fill="none" stroke="#0000" stroke-width="1.1" points="1,8 7.5,1.5 14,8 "></polyline><rect fill="000" x="7" y="2" width="1" height="20"></rect></svg></a>
</div>
</div>
</div>
</div>
</div>
</div>
</bottom>
</app>
</div>
<script type="text/javascript">
function loadAltmetrics(e,t,n){
var d="createElement",c="getElementsByTagName",m="setAttribute",n=document.getElementById(e);
return n&&n.parentNode&&n.parentNode.removeChild(n),n=document[d+"NS"]&&document.documentElement.namespaceURI,n=n?document[d+"NS"](n,"script"):document[d]("script"),n[m]("id",e),n[m]("src",t),(document[c]("head")[0]||document[c]("body")[0]).appendChild(n),n=new Image,void n[m]("src","https://d1uo4w7k31k5mn.cloudfront.net/donut/0.png")
};
</script>
</body>
</html>

View File

@ -1,270 +0,0 @@
{% extends "base_v2.html" %}
{% block configure_profile %} class="current" {% end %}
{% block content %}
<title>Configure profile</title>
<link rel="stylesheet" href="/static/animations.css"/>
<div class="uk-flex-inline cm-nav-container">
<div class="cm-left-box"><a href="/"><button id="cancel-main-btn" class="uk-close-large" type="button" uk-close></button></a></div>
<div class="cm-navigation cm-nav-toolbar">
<ul class="uk-subnav uk-subnav-line">
<li class="cm-nav-li">
<a class="cm-nav-a" href="upload-codes">
<div class="cm-nav-number-container"><span class="cm-nav-number uk-text-middle">1</span></div>
<span class="cm-nav-title uk-text-middle">Upload your<br>project codes</span>
</a>
</li>
<li class="cm-nav-li cm-nav-active">
<a class="cm-nav-a">
<div class="cm-nav-number-container"><span class="cm-nav-number uk-text-middle">2</span></div>
<span class="cm-nav-title uk-text-middle">Configure the<br>matching proccess</span>
</a>
</li>
<li class="cm-nav-li">
<a class="cm-nav-a" href="save-profile" id="save-profile-option">
<div class="cm-nav-number-container"><span class="cm-nav-number uk-text-middle">3</span></div>
<span class="cm-nav-title uk-text-middle">Save your<br>matching profile</span>
</a>
</li>
</ul>
</div>
</div>
<div class="uk-grid-collapse uk-child-width-expand@s" uk-grid>
<div class="uk-width-large cm-config-settings-section">
<div class="cm-easy-config-section">
<h4>Matching mode <span class="cm-tooltip" uk-icon="icon: info" title="If you want the tooltip to appear with a little delay, just add the delay option to the uk-tooltip attribute with your value in milliseconds." uk-tooltip="pos: bottom"></span></h4>
<div class="cm-config-options-container">
<div class="cm-config-options-connect-line"></div>
<div class="uk-child-width-expand@s uk-text-center" uk-grid>
<div>
<a class="cm-config-option cm-config-light" id="1-level">
<div class="cm-circle-button">
<div class="cm-circle-button-fill"></div>
</div>
<span>Light</span>
</a>
</div>
<div>
<a class="cm-config-option cm-config-medium" id="2-level">
<div class="cm-circle-button">
<div class="cm-circle-button-fill"></div>
</div>
<span>Medium</span>
</a>
</div>
<div>
<a class="cm-config-option cm-config-hard" id="3-level">
<div class="cm-circle-button">
<div class="cm-circle-button-fill"></div>
</div>
<span>Hard</span>
</a>
</div>
<div>
<a class="cm-config-option cm-config-advance" id="c-level">
<div class="cm-circle-button">
<div class="cm-circle-button-fill"></div>
</div>
<span>Advanced</span>
</a>
</div>
</div>
</div>
</div>
<hr>
<div class="cm-advanced-tools-section">
<label class="uk-form-label cm-advaned-tools-label" for="advaned-tools-label"><input id="advaned-tools-label" class="uk-checkbox" type="checkbox"> Show advanced tools <span class="cm-tooltip" uk-icon="icon: info" title="If you want the tooltip to appear with a little delay, just add the delay option to the uk-tooltip attribute with your value in milliseconds." uk-tooltip="pos: bottom"></span></label>
<div id="advaned-tools">
<div class="uk-accordion-content">
<div class="uk-grid-small uk-child-width-expand@s" uk-grid>
<div class="cm-prhases">
<h5>Positive phrases <span class="cm-tooltip" uk-icon="icon: info" title="If you want the tooltip to appear with a little delay, just add the delay option to the uk-tooltip attribute with your value in milliseconds." uk-tooltip="pos: bottom"></span></h5>
<div class="cm-phrases-container">
<header>
<form id="word-form-pos" class="uk-grid-collapse uk-child-width-expand@s uk-text-center" uk-grid>
<div class="cm-number-space uk-width-1-5@m">#</div>
<input class="uk-width-expand uk-text-left cm-text-input cm-text-input-phrase" type="text" id="text-pos" placeholder="Phrase"/>
<input class="uk-width-1-5@m uk-text-left cm-text-input cm-text-input-weight" type="number" name="weight" min="0" max="100" id="weight-pos" placeholder="Weight"/>
<input type="submit" class="btn uk-width-1-4@m cm-main-button cm-phases-button" value="Add"/>
</form>
<div class="scroll_holder">
<div class="scroller"></div>
</div>
</header>
<div style="position: relative;">
<div style="position: absolute; left: 0; top: 0; height: 100%; width: 40px; background-color: #f8d4c7;"></div>
<ul id="word-pos" class="uk-list uk-list-striped">
</ul>
</div>
<footer class="positive">
<div class="uk-grid-collapse uk-child-width-expand@s" uk-grid>
<div>
<span class="count" id="count-pos">0</span>
<span> positive word(s)</span>
</div>
<div class="uk-inline">
<button class="uk-float-right uk-button uk-button-default" disabled id="clear-all-pos">Delete All</button>
</div>
</div>
</footer>
</div>
</div>
<div class="cm-prhases">
<h5>Negative phrases <span class="cm-tooltip" uk-icon="icon: info" title="If you want the tooltip to appear with a little delay, just add the delay option to the uk-tooltip attribute with your value in milliseconds." uk-tooltip="pos: bottom"></span></h5>
<div class="word-container">
<div class="cm-phrases-container">
<header>
<form class="uk-grid-collapse uk-child-width-expand@s uk-text-center" id="word-form-neg" uk-grid>
<div class="cm-number-space uk-width-1-5@m">#</div>
<input class="uk-width-expand uk-text-left cm-text-input cm-text-input-phrase" type="text" id="text-pos" placeholder="Phrase"/>
<input class="uk-width-1-5@m uk-text-left cm-text-input cm-text-input-weight" type="number" name="weight" min="0" max="100" id="weight-pos" placeholder="Weight"/>
<input type="submit" class="btn uk-width-1-4@m cm-main-button cm-phases-button" value="Add"/>
</form>
<div class="scroll_holder">
<div class="scroller"></div>
</div>
</header>
<div style="position: relative;">
<div style="position: absolute; left: 0; top: 0; height: 100%; width: 40px; background-color: #f8d4c7;"></div>
<ul id="word-neg" class="uk-list uk-list-striped">
</ul>
</div>
<footer class="negative">
<div class="uk-grid-collapse uk-child-width-expand@s" uk-grid>
<div>
<span class="count" id="count-neg">0</span>
<span> positive word(s)</span>
</div>
<div class="uk-inline">
<button class="uk-float-right uk-button uk-button-default" disabled id="clear-all-neg">Delete All</button>
</div>
</div>
</footer>
</div>
</div>
</div>
</div>
<h5>Acknowledgement statement proccess <span class="cm-tooltip" uk-icon="icon: info" title="If you want the tooltip to appear with a little delay, just add the delay option to the uk-tooltip attribute with your value in milliseconds." uk-tooltip="pos: bottom"></span></h5>
<form class="uk-form-horizontal">
<div>
<label class="uk-form-label" for="word-split">Length of N-grams <span class="cm-tooltip" uk-icon="icon: info" title="If you want the tooltip to appear with a little delay, just add the delay option to the uk-tooltip attribute with your value in milliseconds." uk-tooltip="pos: bottom"></span></label>
<div class="uk-form-controls">
<input class="uk-input" type="number" name="word-split" min="0" max="10" id="word-split" placeholder="Word pairs" value="2"/>
</div>
</div>
</form>
<h5>Matching area size <span class="cm-tooltip" uk-icon="icon: info" title="If you want the tooltip to appear with a little delay, just add the delay option to the uk-tooltip attribute with your value in milliseconds." uk-tooltip="pos: bottom"></span></h5>
<form class="uk-form-horizontal">
<div class="cm-match-area left">
<label class="uk-form-label" for="context-prev-words">Words left of the match <span class="cm-tooltip" uk-icon="icon: info" title="If you want the tooltip to appear with a little delay, just add the delay option to the uk-tooltip attribute with your value in milliseconds." uk-tooltip="pos: bottom"></span></label>
<div class="uk-form-controls">
<input class="uk-input" type="number" name="context-prev-words" min="0" max="20" id="context-prev-words" placeholder="Prev words number" value="10"/>
</div>
</div>
<div class="cm-match-area middle">
<label class="uk-form-label" for="context-middle-words">Matched words <span class="cm-tooltip" uk-icon="icon: info" title="If you want the tooltip to appear with a little delay, just add the delay option to the uk-tooltip attribute with your value in milliseconds." uk-tooltip="pos: bottom"></span></label>
<div class="uk-form-controls">
<input class="uk-input" type="number" name="context-middle-words" min="1" max="10" id="context-middle-words" placeholder="Middle words number" value="1"/>
</div>
</div>
<div class="cm-match-area right">
<label class="uk-form-label" for="context-next-words">Words right of the match <span class="cm-tooltip" uk-icon="icon: info" title="If you want the tooltip to appear with a little delay, just add the delay option to the uk-tooltip attribute with your value in milliseconds." uk-tooltip="pos: bottom"></span></label>
<div class="uk-form-controls">
<input class="uk-input" type="number" name="context-next-words" min="0" max="20" id="context-next-words" placeholder="Next words number" value="5"/>
</div>
</div>
</form>
<h5>Text proccess <span class="cm-tooltip" uk-icon="icon: info" title="If you want the tooltip to appear with a little delay, just add the delay option to the uk-tooltip attribute with your value in milliseconds." uk-tooltip="pos: bottom"></span></h5>
<form class="uk-form-stacked">
<div class="uk-margin">
<label class="uk-form-label" for="stop-words-filter"><input id="stop-words-filter" class="uk-checkbox" type="checkbox"> Remove stop words <span class="cm-tooltip" uk-icon="icon: info" title="If you want the tooltip to appear with a little delay, just add the delay option to the uk-tooltip attribute with your value in milliseconds." uk-tooltip="pos: bottom"></span></label>
</div>
<div class="uk-margin">
<label class="uk-form-label" for="punctuation-filter"><input id="punctuation-filter" class="uk-checkbox" type="checkbox"> Remove punctuation <span class="cm-tooltip" uk-icon="icon: info" title="If you want the tooltip to appear with a little delay, just add the delay option to the uk-tooltip attribute with your value in milliseconds." uk-tooltip="pos: bottom"></span></label>
</div>
</form>
<h5>Letter case <span class="cm-tooltip" uk-icon="icon: info" title="If you want the tooltip to appear with a little delay, just add the delay option to the uk-tooltip attribute with your value in milliseconds." uk-tooltip="pos: bottom"></span></h5>
<div class="uk-form-controls" id="letter-case-radio">
<label><input class="uk-radio none" type="radio" name="letter-case" value="none" checked="checked"> As it is</label><br>
<label><input class="uk-radio uppercase" type="radio" name="letter-case" value="uppercase"> UPPERCASE</label><br>
<label><input class="uk-radio lowercase" type="radio" name="letter-case" value="lowercase"> lowercase</label>
</div>
</div>
</div>
</div>
</div>
<div>
<div class="cm-results-section uk-padding-medium-top">
<div class="uk-container uk-container-expand">
<div class="uk-grid-collapse uk-child-width-expand@s" uk-grid>
<div>
<h4>Matching results <span class="cm-tooltip" uk-icon="icon: info" title="If you want the tooltip to appear with a little delay, just add the delay option to the uk-tooltip attribute with your value in milliseconds." uk-tooltip="pos: bottom"></span></h4>
</div>
<div id="documents-section" class="uk-inline">
<div id="documents-change-btn" class="uk-float-right">
<span id="docs-number" class="uk-text">0 documents uploaded</span>
<span id="docs-more-btn" class="uk-margin-small-left" uk-icon="icon: more" style="display: none;"></span>
</div>
</div>
</div>
<button id="run-mining-btn" class="uk-button uk-button-primary uk-margin-top" disabled>Run mining</button>
</div>
<div id="initial-docs-upload-form" class="cm-docs-selection-form uk-container uk-container-small">
<h4>Load test documents <span class="cm-tooltip" uk-icon="icon: info" title="If you want the tooltip to appear with a little delay, just add the delay option to the uk-tooltip attribute with your value in milliseconds." uk-tooltip="pos: bottom"></span></h4>
<div class="uk-container uk-container-small uk-margin-medium-top">
<div class="uk-text-center">
<button id="egi-sample" class="uk-button uk-width-extend cm-main-button uk-margin-small">test1 documents</button>
<button id="rcuk-sample" class="uk-button uk-width-extend cm-main-button uk-margin-small">test2 documents</button>
<button id="arxiv-sample" class="uk-button uk-width-extend cm-main-button uk-margin-small">test3 documents</button>
</div>
<div class="uk-heading-line uk-text-center uk-margin-small-top uk-margin-small-bottom"><span>or</span></div>
<div class="js-upload uk-placeholder cm-file-drop-area">
<div class="uk-flex uk-flex-middle uk-grid-collapse uk-child-width-expand@s" uk-grid>
<div>
<div class="cm-coloured-text">
<span uk-icon="icon: cloud-upload"></span>
<span class="uk-text-middle">Upload your documents</span>
<span class="cm-tooltip" title="If you want the tooltip to appear with a little delay, just add the delay option to the uk-tooltip attribute with your value in milliseconds." uk-tooltip="pos: bottom" uk-icon="icon: info"></span>
</div>
<div>
<span class="cm-label">JSON</span><span class="cm-label">PDF</span><span class="cm-label">TXT</span>
<span class="uk-text uk-text-small">file types, maximum 10MB</span>
</div>
</div>
<div uk-form-custom>
<input type="file" name="upload" id="docs-file-input" class="inputfile">
<button class="uk-button uk-button-default cm-main-button" type="button" tabindex="-1">Choose file</button>
</div>
</div>
</div>
<progress id="js-progressbar" class="uk-progress" value="0" max="100" hidden></progress>
</div>
</div>
<div id="results-count" class="uk-inline uk-margin-top">
<span id="results-number" class="uk-text-primary uk-margin-right"></span>
<span id="results-number-previous" class="uk-text-muted"></span>
</div>
<div id="results-section" class="uk-container uk-margin-top cm-results-rows" style="display: none;">
<ul id="docs-results" uk-accordion="multiple: true">
</ul>
</div>
<div class="cm-results-hide-pannel"></div>
</div>
<div class="uk-flex uk-flex-center@m uk-flex-right@l uk-margin-top uk-margin-right ">
<span class="uk-text-primary uk-text-middle">Satisfied with the results?</span>
<button id="next-button" class="uk-button uk-button-primary uk-margin-left">Save your profile</button>
</div>
</div>
</div>
<div id="wait-spinner-modal-center" class="uk-flex-top uk-modal" esc-close="false" bg-close="false" uk-modal>
<div class="uk-modal-dialog uk-modal-body uk-margin-auto-vertical">
<p class="uk-text-center uk-text-middle uk-text-large">Working on it, please wait... <span uk-spinner></span></p>
</div>
</div>
<script src="/static/configure-profile.js" type="text/javascript"></script>
{% end %}

View File

@ -1,308 +0,0 @@
{% extends "base_v2.html" %}
{% block configure_profile %} class="current" {% end %}
{% block content %}
<title>Configure profile</title>
<link rel="stylesheet" href="/static/animations.css"/>
<div class="uk-flex-inline cm-nav-container">
<div class="cm-left-box"><a href="/"><button id="cancel-main-btn" class="uk-close-large cm-close-btn" type="button" uk-close></button></a></div>
<div class="cm-navigation cm-nav-toolbar">
<ul class="uk-subnav uk-subnav-line">
<li class="cm-nav-li">
<a class="cm-nav-a" href="upload-codes">
<div class="cm-nav-number-container"><span class="cm-nav-number uk-text-middle">1</span></div>
<span class="cm-nav-title uk-text-middle">Matching context<br>definition</span>
</a>
</li>
<li class="cm-nav-li cm-nav-active">
<a class="cm-nav-a">
<div class="cm-nav-number-container"><span class="cm-nav-number uk-text-middle">2</span></div>
<span class="cm-nav-title uk-text-middle">Matching proccess<br>configuration</span>
</a>
</li>
<li class="cm-nav-li cm-nav-disabled">
<a class="cm-nav-a" id="save-profile-option">
<div class="cm-nav-number-container"><span class="cm-nav-number uk-text-middle">3</span></div>
<span class="cm-nav-title uk-text-middle">Save your<br>matching profile</span>
</a>
</li>
</ul>
</div>
</div>
<div id="parent">
<div id="child1" class="cm-config-settings-section">
<div id="child1-inner" >
<div class="cm-easy-config-section">
<h4>Preconfigured rules <span class="cm-tooltip" uk-icon="icon: info" title="If you want the tooltip to appear with a little delay, just add the delay option to the uk-tooltip attribute with your value in milliseconds." uk-tooltip="pos: bottom"></span></h4>
<div class="cm-config-options-container">
<div class="cm-config-options-connect-line"></div>
<div class="uk-child-width-expand@s uk-text-center" uk-grid uk-switcher="animation: uk-animation-fade">
<div>
<a class="cm-config-option cm-config-light" id="1-level">
<div class="cm-outer-circle-button">
<div class="cm-circle-button">
<div class="cm-circle-button-fill"><span uk-icon="icon: check" class="cm-config-option-check"></span></div>
</div>
</div>
<span>Loose</span>
</a>
</div>
<div>
<a class="cm-config-option cm-config-medium" id="2-level">
<div class="cm-outer-circle-button">
<div class="cm-circle-button">
<div class="cm-circle-button-fill"><span uk-icon="icon: check" class="cm-config-option-check"></span></div>
</div>
</div>
<span>Medium</span>
</a>
</div>
<div>
<a class="cm-config-option cm-config-hard" id="3-level">
<div class="cm-outer-circle-button">
<div class="cm-circle-button">
<div class="cm-circle-button-fill"><span uk-icon="icon: check" class="cm-config-option-check"></span></div>
</div>
</div>
<span>Tight</span>
</a>
</div>
<!-- <div>
<a class="cm-config-option cm-config-advance" id="c-level">
<div class="cm-circle-button">
<div class="cm-circle-button-fill"></div>
</div>
<span>Advanced</span>
</a>
</div> -->
</div>
<ul class="uk-switcher uk-margin-small-top uk-text-small">
<li>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</li>
<li>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</li>
<li>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur, sed do eiusmod.</li>
</ul>
</div>
</div>
<hr>
<div class="cm-advanced-tools-section">
<label class="uk-form-label cm-advaned-tools-label" for="advaned-tools-label"><input id="advaned-tools-label" class="uk-checkbox" type="checkbox"> Customized rules <span class="cm-tooltip" uk-icon="icon: info" title="If you want the tooltip to appear with a little delay, just add the delay option to the uk-tooltip attribute with your value in milliseconds." uk-tooltip="pos: bottom"></span></label>
<div id="advaned-tools" style="display: none; margin-top: 20px;">
<ul uk-accordion="multiple: true">
<li>
<h6 class="uk-accordion-title">Positive phrases</h6>
<div class="uk-accordion-content">
<p class="uk-text-small">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
<div class="cm-phrases-container">
<header>
<form id="word-form-pos" class="uk-grid-collapse uk-child-width-expand@s uk-text-center" uk-grid>
<!-- <div class="cm-number-space uk-width-1-5@m">#</div> -->
<input class="uk-width-expand uk-text-left cm-text-input cm-text-input-phrase" type="text" id="text-pos" placeholder="Phrase"/>
<input class="uk-width-1-5@m uk-text-left cm-text-input cm-text-input-weight" type="number" name="weight" min="0" max="100" id="weight-pos" placeholder="Weight"/>
<input type="submit" class="btn uk-width-1-4@m cm-main-button cm-phrases-button" value="Add"/>
</form>
<div class="scroll_holder">
<div class="scroller"></div>
</div>
</header>
<div style="position: relative;"><!--
<div style="position: absolute; left: 0; top: 0; height: 100%; width: 40px; background-color: #fafafa; border-right: 1px solid #e8e8e8;"></div> -->
<ul id="word-pos" class="uk-list uk-list-striped">
</ul>
</div>
<footer class="positive">
<div class="uk-grid-collapse uk-child-width-expand@s" uk-grid>
<div>
<span class="count uk-text-middle" id="count-pos">0</span>
<span class="uk-text-middle"> positive word(s)</span>
</div>
<div>
<button class="cm-white-button cm-phrases-button uk-float-right uk-button uk-button-default" disabled id="clear-all-pos">Delete All</button>
</div>
</div>
</footer>
</div>
</div>
</li>
<li>
<h6 class="uk-accordion-title">Negative phrases</h6>
<div class="uk-accordion-content">
<p class="uk-text-small">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
<div class="word-container">
<div class="cm-phrases-container">
<header>
<form class="uk-grid-collapse uk-child-width-expand@s uk-text-center" id="word-form-neg" uk-grid>
<!-- <div class="cm-number-space uk-width-1-5@m">#</div> -->
<input class="uk-width-expand uk-text-left cm-text-input cm-text-input-phrase" type="text" id="text-neg" placeholder="Phrase"/>
<input class="uk-width-1-5@m uk-text-left cm-text-input cm-text-input-weight" type="number" name="weight" min="0" max="100" id="weight-neg" placeholder="Weight"/>
<input type="submit" class="btn uk-width-1-4@m cm-main-button cm-phrases-button" value="Add"/>
</form>
<div class="scroll_holder">
<div class="scroller"></div>
</div>
</header>
<div style="position: relative;">
<!-- <div style="position: absolute; left: 0; top: 0; height: 100%; width: 40px; background-color: #fafafa; border-right: 1px solid #e8e8e8;"></div> -->
<ul id="word-neg" class="uk-list uk-list-striped">
</ul>
</div>
<footer class="negative">
<div class="uk-grid-collapse uk-child-width-expand@s" uk-grid>
<div>
<span class="count uk-text-middle" id="count-neg">0</span>
<span class="uk-text-middle"> negative word(s)</span>
</div>
<div>
<button class="cm-white-button cm-phrases-button uk-float-right uk-button uk-button-default" disabled id="clear-all-neg">Delete All</button>
</div>
</div>
</footer>
</div>
</div>
</div>
</li>
<li>
<h6 class="uk-accordion-title">Acknowledgement statement proccess</h6>
<div class="uk-accordion-content">
<p class="uk-text-small">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
<form class="uk-form-horizontal">
<div>
<label class="uk-form-label" for="word-split">Length of N-grams <span class="cm-tooltip" uk-icon="icon: info" title="If you want the tooltip to appear with a little delay, just add the delay option to the uk-tooltip attribute with your value in milliseconds." uk-tooltip="pos: bottom"></span></label>
<div class="uk-form-controls">
<input class="uk-input" type="number" name="word-split" min="0" max="10" id="word-split" placeholder="Word pairs" value="2"/>
</div>
</div>
</form>
</div>
</li>
<li>
<h6 class="uk-accordion-title">Matching area size</h6>
<div class="uk-accordion-content">
<p class="uk-text-small">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
<form class="uk-form-horizontal">
<div class="cm-match-area left">
<label class="uk-form-label" for="context-prev-words">Words left of the match <span class="cm-tooltip" uk-icon="icon: info" title="If you want the tooltip to appear with a little delay, just add the delay option to the uk-tooltip attribute with your value in milliseconds." uk-tooltip="pos: bottom"></span></label>
<div class="uk-form-controls">
<input class="uk-input" type="number" name="context-prev-words" min="0" max="20" id="context-prev-words" placeholder="Prev words number" value="10"/>
</div>
</div>
<div class="cm-match-area right">
<label class="uk-form-label" for="context-next-words">Words right of the match <span class="cm-tooltip" uk-icon="icon: info" title="If you want the tooltip to appear with a little delay, just add the delay option to the uk-tooltip attribute with your value in milliseconds." uk-tooltip="pos: bottom"></span></label>
<div class="uk-form-controls">
<input class="uk-input" type="number" name="context-next-words" min="0" max="20" id="context-next-words" placeholder="Next words number" value="5"/>
</div>
</div>
</form>
</div>
</li>
<li>
<h6 class="uk-accordion-title">Text proccess</h6>
<div class="uk-accordion-content">
<p class="uk-text-small">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
<form class="uk-form-stacked">
<div class="uk-margin">
<label class="uk-form-label" for="stop-words-filter"><input id="stop-words-filter" class="uk-checkbox" type="checkbox"> Remove stop words <span class="cm-tooltip" uk-icon="icon: info" title="If you want the tooltip to appear with a little delay, just add the delay option to the uk-tooltip attribute with your value in milliseconds." uk-tooltip="pos: bottom"></span></label>
</div>
<div class="uk-margin">
<label class="uk-form-label" for="punctuation-filter"><input id="punctuation-filter" class="uk-checkbox" type="checkbox"> Remove punctuation <span class="cm-tooltip" uk-icon="icon: info" title="If you want the tooltip to appear with a little delay, just add the delay option to the uk-tooltip attribute with your value in milliseconds." uk-tooltip="pos: bottom"></span></label>
</div>
</form>
</div>
</li>
<li>
<h6 class="uk-accordion-title">Letter case</h6>
<div class="uk-accordion-content">
<p class="uk-text-small">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
<div class="uk-form-controls" id="letter-case-radio">
<label><input class="uk-radio none" type="radio" name="letter-case" value="none" checked="checked"> As it is</label><br>
<label><input class="uk-radio uppercase" type="radio" name="letter-case" value="uppercase"> UPPERCASE</label><br>
<label><input class="uk-radio lowercase" type="radio" name="letter-case" value="lowercase"> lowercase</label>
</div>
</div>
</li>
</ul>
</div>
</div>
<hr>
<div class="uk-flex uk-flex-center@m uk-flex-right@l uk-margin-top uk-margin-right cm-save-profile-step">
<span class="uk-text-primary uk-text-middle uk-text-middle">Satisfied with the results?</span>
<button id="next-button" class="uk-button uk-button-primary uk-margin-left">Save your profile</button>
</div>
</div>
</div>
<div id="child2">
<div class="cm-results-section">
<header id="cm-results-section-header" class="uk-container uk-container-expand">
<div class="cm-results-controls">
<div class="uk-grid-collapse uk-child-width-expand@s" uk-grid>
<div>
<h4>Matching results <span class="cm-tooltip" uk-icon="icon: info" title="If you want the tooltip to appear with a little delay, just add the delay option to the uk-tooltip attribute with your value in milliseconds." uk-tooltip="pos: bottom"></span></h4>
</div>
<div id="documents-section" class="uk-inline">
<div id="documents-change-btn" class="uk-float-right" style="padding: 0;">
<span id="docs-number" class="uk-text">0 documents uploaded</span>
<span id="docs-more-btn" class="uk-margin-small-left" uk-icon="icon: more" style="display: none;"></span>
</div>
</div>
</div>
<button id="run-mining-btn" class="uk-button uk-button-primary" disabled>Apply rules</button>
</div>
<div class="cm-results-count-section">
<div id="results-count">
<span id="results-number" class="uk-text-primary uk-margin-right"></span>
<span id="results-number-previous" class="cm-text-muted"></span>
</div>
</div>
<div class="cm-header-hide-pannel"></div>
</header>
<div id="initial-docs-upload-form" class="cm-docs-selection-form uk-container uk-container-small">
<h4>Load test documents <span class="cm-tooltip" uk-icon="icon: info" title="If you want the tooltip to appear with a little delay, just add the delay option to the uk-tooltip attribute with your value in milliseconds." uk-tooltip="pos: bottom"></span></h4>
<div class="uk-container uk-container-small uk-margin-medium-top">
<div class="uk-text-center">
<button id="egi-sample" class="uk-button uk-width-extend cm-main-button uk-margin-small">test1 documents</button>
<button id="rcuk-sample" class="uk-button uk-width-extend cm-main-button uk-margin-small">test2 documents</button>
<button id="arxiv-sample" class="uk-button uk-width-extend cm-main-button uk-margin-small">test3 documents</button>
</div>
<div class="uk-heading-line uk-text-center uk-margin-small-top uk-margin-small-bottom"><span>or</span></div>
<div class="js-upload uk-placeholder cm-file-drop-area">
<div class="uk-flex uk-flex-middle uk-grid-collapse uk-child-width-expand@s" uk-grid>
<div>
<div class="cm-coloured-text">
<span uk-icon="icon: cloud-upload"></span>
<span class="uk-text-middle">Upload your documents</span>
<span class="cm-tooltip" title="If you want the tooltip to appear with a little delay, just add the delay option to the uk-tooltip attribute with your value in milliseconds." uk-tooltip="pos: bottom" uk-icon="icon: info"></span>
</div>
<div>
<span class="cm-label">JSON</span><span class="cm-label">PDF</span><span class="cm-label">TXT</span>
<span class="uk-text uk-text-small">file types, maximum 10MB</span>
</div>
</div>
<div uk-form-custom>
<input type="file" name="upload" id="docs-file-input" class="inputfile">
<button class="uk-button uk-button-default cm-main-button" type="button" tabindex="-1" style="margin-left: 20px;">Choose file</button>
</div>
</div>
</div>
<progress id="js-progressbar" class="uk-progress" value="0" max="100" hidden></progress>
</div>
</div>
<div id="results-section" class="cm-results-rows" style="display: none;">
<ul id="docs-results" uk-accordion="multiple: true">
</ul>
</div>
<div class="cm-results-hide-pannel"></div>
</div>
</div>
<div style="clear: both;"></div>
</div>
<div id="wait-spinner-modal-center" class="uk-flex-top" esc-close="false" bg-close="false" uk-modal>
<div class="uk-modal-dialog uk-modal-body uk-margin-auto-vertical">
<p class="uk-text-center uk-text-middle uk-text-large">Working on it, please wait... <span uk-spinner></span></p>
</div>
</div>
<script src="/static/configure-profile.js" type="text/javascript"></script>
{% end %}

View File

@ -1,28 +0,0 @@
{% extends "base_v2.html" %}
{% block create_upload %} class="current" {% end %}
{% block content %}
<title>Profile create</title>
<div class="uk-section uk-section-default">
<div class="uk-container uk-container-small">
<a class="test-upload uk-button uk-button-default uk-width-1-1 uk-button-large uk-text-center cm-main-button" href="upload-codes?new=1">
<span class="uk-text-middle">Create a new mining profile</span>
</a>
<div class="uk-heading-line uk-text-center uk-margin-small-top uk-margin-small-bottom"><span>or</span></div>
<a id="example-load-btn" class="uk-button uk-button-default uk-width-1-1 uk-button-large uk-text-center">
<span class="uk-text-middle">Load example profile</span>
</a>
<div class="uk-heading-line uk-text-center uk-margin-small-top uk-margin-small-bottom"><span>or</span></div>
<div class="test-upload uk-button uk-button-link uk-width-1-1 uk-text-center" style="font-size: 14px;">
<div uk-form-custom>
<form id="profile-input-form" method="post" enctype="multipart/form-data" accept-charset="UTF-8">
<input type="file" name="upload" id="profile-file-input" class="inputfile">
</form>
<span class="uk-text-middle">UPLOAD your existing profile to edit</span>
</div>
</div>
</div>
</div>
<script src="/static/create-upload-profile.js" type="text/javascript"></script>
{% end %}

View File

@ -1,204 +0,0 @@
{% autoescape None %}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="robots" content="NONE,NOARCHIVE" />
<title>{{escape(str(exception_type))}} at {{escape(request_path)}}</title>
<style type="text/css">
html * { padding:0; margin:0; }
body * { padding:10px 20px; }
body * * { padding:0; }
body { font:small sans-serif; }
body>div { border-bottom:1px solid #ddd; }
h1 { font-weight:normal; }
h2 { margin-bottom:.8em; }
h2 span { font-size:80%; color:#666; font-weight:normal; }
h3 { margin:1em 0 .5em 0; }
h4 { margin:0 0 .5em 0; font-weight: normal; }
table {
border:1px solid #ccc; border-collapse: collapse; background:white; }
tbody td, tbody th { vertical-align:top; padding:2px 3px; }
thead th {
padding:1px 6px 1px 3px; background:#fefefe; text-align:left;
font-weight:normal; font-size:11px; border:1px solid #ddd; }
tbody th { text-align:right; color:#666; padding-right:.5em; }
table.vars { margin:5px 0 2px 40px; }
table.vars td, table.req td { font-family:monospace; }
table td.code { width:100%;}
table td.code div { overflow:hidden; }
table.source th { color:#666; }
table.source td {
font-family:monospace; white-space:pre; border-bottom:1px solid #eee; }
ul.traceback { list-style-type:none; }
ul.traceback li.frame { margin-bottom:1em; }
div.context { margin: 10px 0; }
div.context ol {
padding-left:30px; margin:0 10px; list-style-position: inside; }
div.context ol li {
font-family:monospace; white-space:pre; color:#666; cursor:pointer; }
div.context ol.context-line li { color:black; background-color:#ccc; }
div.context ol.context-line li span { float: right; }
div.commands { margin-left: 40px; }
div.commands a { color:black; text-decoration:none; }
#summary { background: #ffc; }
#summary h2 { font-weight: normal; color: #666; }
#explanation { background:#eee; }
#template, #template-not-exist { background:#f6f6f6; }
#template-not-exist ul { margin: 0 0 0 20px; }
#traceback { background:#eee; }
#requestinfo { background:#f6f6f6; padding-left:120px; }
#summary table { border:none; background:transparent; }
#requestinfo h2, #requestinfo h3 { position:relative; margin-left:-100px; }
#requestinfo h3 { margin-bottom:-1em; }
.error { background: #ffc; }
.specific { color:#cc3300; font-weight:bold; }
</style>
<script type="text/javascript">
//<!--
function getElementsByClassName(oElm, strTagName, strClassName){
// Written by Jonathan Snook, http://www.snook.ca/jon;
// Add-ons by Robert Nyman, http://www.robertnyman.com
var arrElements = (strTagName == "*" && document.all)? document.all :
oElm.getElementsByTagName(strTagName);
var arrReturnElements = new Array();
strClassName = strClassName.replace(/\-/g, "\\-");
var oRegExp = new RegExp("(^|\\s)" + strClassName + "(\\s|$)");
var oElement;
for(var i=0; i<arrElements.length; i++){
oElement = arrElements[i];
if(oRegExp.test(oElement.className)){
arrReturnElements.push(oElement);
}
}
return (arrReturnElements)
}
function hideAll(elems) {
for (var e = 0; e < elems.length; e++) {
elems[e].style.display = 'none';
}
}
window.onload = function() {
hideAll(getElementsByClassName(document, 'table', 'vars'));
hideAll(getElementsByClassName(document, 'ol', 'pre-context'));
hideAll(getElementsByClassName(document, 'ol', 'post-context'));
}
function toggle() {
for (var i = 0; i < arguments.length; i++) {
var e = document.getElementById(arguments[i]);
if (e) {
e.style.display = e.style.display == 'none' ? 'block' : 'none';
}
}
return false;
}
function varToggle(link, id) {
toggle('v' + id);
var s = link.getElementsByTagName('span')[0];
var uarr = String.fromCharCode(0x25b6);
var darr = String.fromCharCode(0x25bc);
s.innerHTML = s.innerHTML == uarr ? darr : uarr;
return false;
}
//-->
</script>
</head>
<body>
<div id="summary">
<h1>{{escape(str(exception_type))}} at {{escape(request_path)}}</h1>
<!--TODO-->
<h2>{{exception_value}}</h2>
<table>
<tr>
<th>Python</th>
<td>{{escape(frames[0].filename)}} in {{escape(frames[0].function)}}, line {{frames[0].lineno}}</td>
</tr>
<tr>
<th>Web</th>
<td>{{escape(request_method)}} {{escape(request_path)}}</td>
</tr>
</table>
</div>
<div id="traceback">
<h2>Traceback <span>(innermost first)</span></h2>
<ul class="traceback">
{%for frame in frames%}
<li class="frame">
<code>{{escape(frame.filename)}}</code> in <code>{{escape(frame.function)}}</code>
{%if frame.context_line%}
<div class="context" id="c{{frame.id}}">
{%if frame.pre_context%}
<ol start="{{frame.pre_context_lineno}}" class="pre-context" id="pre{{frame.id}}">
{%for line in frame.pre_context%}
<li onclick="toggle('pre{{frame.id}}', 'post{{frame.id}}')">{{escape(line)}}</li>
{%end%}
</ol>
{%end%}
<ol start="{{frame.lineno}}" class="context-line">
<li onclick="toggle('pre{{frame.id}}', 'post{{frame.id}}')">{{escape(frame.context_line)}} <span>...</span></li>
</ol>
{%if frame.post_context%}
<ol start='{{frame.lineno + 1}}' class="post-context" id="post{{frame.id}}">
{%for line in frame.post_context%}
<li onclick="toggle('pre{{frame.id}}', 'post{{frame.id}}')">{{escape(line)}}</li>
{%end%}
</ol>
{%end%}
</div>
{%end%}
{%if frame.vars%}
<div class="commands">
<a href='#' onclick="return varToggle(this, '{{frame.id}}')">
<span>&#x25b6;</span> Local vars
</a>
</div>
{%end%}
{{dicttable(frame.vars, kls='vars', id=('v' + str(frame.id)))}}
</li>
{%end%}
</ul>
</div>
<div id="requestinfo">
{%if response_output or response_headers%}
<h2>Response so far</h2>
<h3>HEADERS</h3>
{{dicttable_items(response_headers)}}
<h3>BODY</h3>
<p class="req" style="padding-bottom: 2em">
<code>{{escape(response_output)}}</code>
</p>
<h2>Request information</h2>
<h3>HEADERS</h3>
{{dicttable(request_headers)}}
<h3>BODY</h3>
{{escape(request_input)}}
<h3 id="cookie-info">COOKIES</h3>
{{dicttable(request_cookies)}}
{%end%}
</div>
<div id="explanation">
<p>
You're seeing this because you have the <code>debug</code> setting
set to <code>True</code>. Set that to <code>False</code> if you don't want to see this.
</p>
</div>
</body>
</html>

View File

@ -1,196 +0,0 @@
{% extends "base.html" %}
{% block interactive %} class="current" {% end %}
{% block content %}
<link rel="stylesheet" href="/static/interactivemining_styles.css" />
<title>Query Generator</title>
<div id="sidebar">
<h3>Interactive Project Mining details</h3>
<p>Steps:</p>
<ul>
<li> <p>First <b>upload</b> a text file containing the project codes you want to text mine. The file should contain one project <b>code per line</b>.</p></li>
<li> <p><b>Insert or remove</b> your positive and negative words (or phrases). A positive word (or phrase) is a word that may occur with high possibility around the project code in an actual acknowledgement statement. A negative word is a word that shouldn't exist around a project code.</p></li>
<li> <p>Select the <b>preprocessing steps</b> that have to be applied to the text</p></li>
<li> <p> Provide your <b>UTF-8</b> encoded text in the text area and press submit.</p></li>
<!-- <li><b>document</b>: UTF-8 encoded text</li>
<li><b>projects</b>: Project processing (on/<b>off</b>)</li>
<li><b>datacitations</b>: Data citation processing (on/<b>off</b>)</li>
<li><b>classification</b>: Classification processing (on/<b>off</b>)</li>
<li><b>pdb</b>: Pdb processing (<b>on</b>/off)</li> -->
</ul>
<p>The service will return a <b>JSON</b> encoded result containing the following fields:</p>
<ul>
<li><b>funding_info</b>: Result category</li>
<li><b>code</b>: Matched funding code</li>
</ul>
<p>Result example:</p>
<p>
<code>{"funding_info": [{"code": "246686"}, {"code": "283595"}]}</code>
</p>
<!-- <blockquote style=margin:0;>
<p> <b> Note: </b> </p>
<p>You can also use the form on the right to directly paste your document
<p>
</blockquote> -->
</div>
<div id="page" style="margin:0">
<input id="downloadConfigBtn" class="btn" onclick="handleConfigDownload()" value="Download this profile" type="button">
<div class="file-upload-wrapper js">
<form id="profile-input-form" method="post" enctype="multipart/form-data" accept-charset="UTF-8">
<header>
<input type="file" name="upload" id="profile-input" class="inputfile" />
<label for="profile-input" id="profile-input-label" ><strong><svg xmlns="http://www.w3.org/2000/svg" width="20" height="17" viewBox="0 0 20 17"><path d="M10 0l-5.2 4.9h3.3v5.1h3.8v-5.1h3.3l-5.2-4.9zm9.3 11.5l-3.2-2.1h-2l3.4 2.6h-3.5c-.1 0-.2.1-.2.1l-.8 2.3h-6l-.8-2.2c-.1-.1-.1-.2-.2-.2h-3.6l3.4-2.6h-2l-3.2 2.1c-.4.3-.7 1-.6 1.5l.6 3.1c.1.5.7.9 1.2.9h16.3c.6 0 1.1-.4 1.3-.9l.6-3.1c.1-.5-.2-1.2-.7-1.5z"/></svg> Choose a file&hellip;</strong> <span id="profile-title-text"></span></label>
<button id="profile-upload-button" class="btn" style="float: right; margin-right: 5px;" >Upload profile</button>
</header>
<footer>
<span class="response" id="profile-upload-response"></span>
</footer>
</form>
</div>
<div class="file-upload-wrapper js">
<h2>Add your <b>Text File</b> of codes</h2>
<form id="file-input-form" method="post" enctype="multipart/form-data" accept-charset="UTF-8">
<header>
<input name="operation" id="file-input-operation" hidden />
<input type="file" name="upload" id="file-input" class="inputfile" />
<label for="file-input" id="file-input-label" ><strong><svg xmlns="http://www.w3.org/2000/svg" width="20" height="17" viewBox="0 0 20 17"><path d="M10 0l-5.2 4.9h3.3v5.1h3.8v-5.1h3.3l-5.2-4.9zm9.3 11.5l-3.2-2.1h-2l3.4 2.6h-3.5c-.1 0-.2.1-.2.1l-.8 2.3h-6l-.8-2.2c-.1-.1-.1-.2-.2-.2h-3.6l3.4-2.6h-2l-3.2 2.1c-.4.3-.7 1-.6 1.5l.6 3.1c.1.5.7.9 1.2.9h16.3c.6 0 1.1-.4 1.3-.9l.6-3.1c.1-.5-.2-1.2-.7-1.5z"/></svg> Choose a file&hellip;</strong> <span id="file-title-text"></span></label>
<input type="button" id="example" class="btn example" name="example" value="Load fp7 codes" style="float: right;" onclick="handleLoadExampleFile()">
<button id="upload-button" class="btn" style="float: right; margin-right: 5px;" >Start upload</button>
</header>
<footer>
<span class="response" id="file-upload-response">
{% if numOfGrants %}
<b style="color: #268D26">{{numOfGrants}} Codes</b> loaded successfully!
{% end %}
</span>
</footer>
</form>
</div>
<!--end file-upload-wrapper-->
<div class="list-wrapper">
<h2>Add your <b style="color: #2A56D4;">positive</b> words or phrases</h2>
<div class="word-container">
<header>
<div style="width: 100%; padding: 0 0 5px 5px;">
<div style="width: 48%; display: inline-block;">Phrase</div>
<div style="width: 27%; display: inline-block;">Weight</div>
</div>
<form class="word-form" id="word-form-pos">
<input type="text" id="text-pos" placeholder="Write a positive Word.."/>
<input type="number" name="weight" min="0" max="100" id="weight-pos" placeholder="Weight" value="1"/>
<input type="submit" class="btn" value="Add"/>
</form>
<div class="scroll_holder">
<div class="scroller"></div>
</div>
</header>
<ul class="words" id="word-pos" style="background-color: #EAEDF6">
</ul>
<footer>
<span class="count" id="count-pos"></span>
<button class="btn clear-all" id="clear-all-pos">Delete All</button>
</footer>
</div>
</div>
<!--end list-wrapper-->
<div class="list-wrapper">
<h2 style="color: #FA5858;">Add your <b style="color: #DA2E2E;">negative</b> words or phrases</h2>
<div class="word-container">
<header>
<div style="display: flex; flex-direction: row; padding: 0 0 5px 2px;">
<div style="text-align: left; flex-grow:2;">Phrase</div>
<div style="text-align: left; flex-grow:1;">Weight</div>
<div style="text-align: left; flex-grow:1;"></div>
</div>
<form class="word-form" id="word-form-neg">
<input type="text" id="text-neg" placeholder="Write a negative Word.."/>
<input type="number" name="weight" min="0" max="100" id="weight-neg" placeholder="Weight" value="1"/>
<input type="submit" class="btn" value="Add" />
</form>
<div class="scroll_holder">
<div class="scroller"></div>
</div>
</header>
<ul class="words" id="word-neg" style="background-color: #F6EAEA">
</ul>
<footer>
<span class="count" id="count-neg"></span>
<button class="btn clear-all" id="clear-all-neg">Delete All</button>
</footer>
</div>
</div>
<!--end list-wrapper-->
<div style="clear:both"></div>
<h2>Insert your <b>Text</b> here:</h2>
<select id="textUploadSelect" style="display: inline;">
<option value="1">Upload a single .pdf file containing a document</option>
<option value="2">Upload a single .txt file containing your documents in json format</option>
<option value="3" selected="selected">Paste your custom text</option>
</select>
<input id="docPasteExample" class="btn example" name="example" onclick="getElementById('docText').value = httpGet('/static/interactiveminingExample.txt')" value="Insert example text" style="display: inline;" type="button">
<div id="docUploadText" class="file-upload-wrapper js" style="display: none;">
<h2 class="title">Add your <b>Zip File</b> of .PDF files</h2>
<form id="zip-file-input-form" method="post" enctype="multipart/form-data" accept-charset="UTF-8">
<header>
<input type="file" name="upload" id="zip-file-input" class="inputfile" />
<label for="zip-file-input" id="zip-file-input-label" ><strong><svg xmlns="http://www.w3.org/2000/svg" width="20" height="17" viewBox="0 0 20 17"><path d="M10 0l-5.2 4.9h3.3v5.1h3.8v-5.1h3.3l-5.2-4.9zm9.3 11.5l-3.2-2.1h-2l3.4 2.6h-3.5c-.1 0-.2.1-.2.1l-.8 2.3h-6l-.8-2.2c-.1-.1-.1-.2-.2-.2h-3.6l3.4-2.6h-2l-3.2 2.1c-.4.3-.7 1-.6 1.5l.6 3.1c.1.5.7.9 1.2.9h16.3c.6 0 1.1-.4 1.3-.9l.6-3.1c.1-.5-.2-1.2-.7-1.5z"/></svg> Choose a file&hellip;</strong> <span id="zip-file-title-text"></span></label>
<button id="zip-upload-button" class="btn" style="float: right; margin-right: 5px;" >Start upload</button>
</header>
<footer>
<span class="response" id="zip-file-upload-response"></span>
</footer>
</form>
</div>
<form method="post" name="toanalyze" target="iframe">
<div id="docPasteText">
<textarea id="docText" class="textarea" onblur="this.placeholder = 'Paste your citations here, separated by newline'" onfocus="this.placeholder = ''" name="document" rows="20" placeholder="Paste your citations here, separated by newline"></textarea>
</div>
<div class="filters-wrapper">
<h2>Select the <b>preprocessing</b> steps to clean your text.</h2>
<h4>A filter that removes stop words from the token text.</h4>
<input type="checkbox" name="stopwords" id="stop-words-filter" checked>
<label for="stop-words-filter">Stop Words</label>
<h4>A filter that normalizes token text to lower case.</h4>
<input type="checkbox" name="lowercase" id="lowercase-filter" checked>
<label for="lowercase-filter">Lowercase</label>
<h4>A filter that splits the text into words on intra-word delimiters (all non alpha-numeric characters).</h4>
<input type="checkbox" name="keywords" id="keywords-filter" checked>
<label for="keywords-filter">Keywords</label>
</div>
<div class="acknowledgement-wrapper">
<h2>Select the <b>configuration</b> for the suggested statements.</h2>
<h4>Choose in how many word-pairs each suggested statement will be splitted. (Use 0 to not split the suggested statements).</h4>
<input type="number" name="word-split" min="0" max="10" id="word-split" placeholder="Word pairs" value="0"/>
<h4>Remove stop words from the suggested statements.</h4>
<input type="checkbox" name="ackn-stopwords" id="ackn-stop-words-filter" checked>
<label for="ackn-stop-words-filter">Stop Words</label>
<h4>Normalize suggested statements to lower case.</h4>
<input type="checkbox" name="ackn-lowercase" id="ackn-lowercase-filter" checked>
<label for="ackn-lowercase-filter">Lowercase</label>
<h4>Split the suggested statements into words on intra-word delimiters (all non alpha-numeric characters).</h4>
<input type="checkbox" name="ackn-keywords" id="ackn-keywords-filter" checked>
<label for="ackn-keywords-filter">Keywords</label>
</div>
<!--end filters-wrapper-->
<input id="docs-file-uploaded" type="checkbox" name="docsfileuploaded" hidden>
<textarea id="pos-words-text" name="poswords" hidden></textarea>
<textarea id="neg-words-text" name="negwords" hidden></textarea>
<br>
<input id="submit" type="submit" value="Execute algorithm" class="btn">
</form>
<iframe name="iframe" src="?data=0" width=99% height="200px" style="border:0px"></iframe>
</div>
<script>(function(e,t,n){var r=e.querySelectorAll("html")[0];r.className=r.className.replace(/(^|\s)no-js(\s|$)/,"$1js$2")})(document,window,0);</script>
<script src="https://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>
<script src="/static/interactivemining.js" type="text/javascript"></script>
{% end %}

View File

@ -1,43 +0,0 @@
{% extends "base.html" %}
{% block profileclass %} class="current" {% end %}
{% block content %}
<title>Statistics</title>
<div id="sidebar">
<h4>Metrics & Patterns</h4>
<ul>
{% for a in apps %}
<li><a href="/{{settings.APPDIRNAME}}/{{a['link']}}">{{a['linktitle']}}</a></li>
{% end %}
</ul>
{% if evals %}
<h4>Comparing</h4>
{% end %}
<!--<h4>Comparing</h4>-->
<ul>
{% for a in evals %}
<li><a href="/{{settings.APPDIRNAME}}/{{a['link']}}">{{a['linktitle']}}</a></li>
{% end %}
</ul>
<br>
<blockquote style=padding:2;margin:0;>
<h3> Terms explanation </h3>
<ul> <b>View Count (VC)</b>:<br>Number of times that a publication's metadata has been browsed.</ul>
<ul> <b>Download Counts (DC)</b>:<br>Number of times that a publication has been downloaded.</ul>
<ul> <b>Hit index (HI)</b>:<br>Sum of <i>VC</i> and <i>DC</i>.</ul>
<ul> <b>Popularity Index (PI)</b>:<br>Weighted combination of <i>VC</i> and <i>DC</i>, putting more emphasis on <i>DC</i>.</ul>
</blockquote>
<br>
<br>
<br>
</div>
<div id="page">
{% block service %}
<h1>Welcome to OpenAIRE statistics service</h1>
{% end %}
</div>
{% end %}

View File

@ -1,403 +0,0 @@
{% autoescape None %}
{% extends "madappbar.html" %}
{% block jsimports %}
<title>{{app['title']}}</title>
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<link rel="stylesheet" type="text/css" href="{{ static_url("tcgrey.css") }}">
<link rel="stylesheet" type="text/css" href="{{ static_url("comments.css") }}">
<script type="text/javascript" src="{{ static_url("tc.js") }}"></script>
<script type="text/javascript" src="{{ static_url("accessURL.js") }}"></script>
{% block loadfun %}
<script type="text/javascript">
var vis;
var exparams= new Array();
var datavisualizations={{app['datavisualizations']}};
function load(){
var v= document.getElementsByName('vis');
v[0].checked=true;
vis=v[0].id
{% for ex in app["examples"] %}
exparams["{{ex["name"]}}"]={{ex["paramarray"]}};
{% end %}
}
</script>
{% end %}
<script type="text/javascript">
var query_data={};
var mode=0;
var errormsg="Error";
function toggletype(){
var enable='auto';
var disable='custom';
if(document.getElementById('custom').checked){
enable='custom';
disable='auto';
document.getElementById('example').value="empty";
}
var v=document.getElementsByName(enable);
for(var i=0;i<v.length;i++){
if (v[i].type!='radio') v[i].disabled=false;
}
var v=document.getElementsByName(disable);
for(var i=0;i<v.length;i++){
if (v[i].type!='radio') v[i].disabled=true;
}
}
//Show query when in DEBUG mode
{% if settings.DEBUG %}
function viewquery(){
//if document.getElementById('qbutton').innerHTML;
var re = /Show/i;
if(document.getElementById('qbutton').innerHTML.match( re )){
document.getElementById('qbutton').innerHTML=document.getElementById('qbutton').innerHTML.replace(re,"Hide");
document.getElementById('qtext').innerHTML="{{app["qtext"]}}";
}
else{
document.getElementById('qbutton').innerHTML=document.getElementById('qbutton').innerHTML.replace("Hide","Show");
document.getElementById('qtext').innerHTML="";
}
}
{% end %}
google.load("visualization", "1", {packages:["corechart"]});
{% for vis in app["visualisations"] %}
{% if vis["name"] not in ("areachart", "barchart", "columnchart", "linechart", "piechart", "scatterchart") %}
{% if vis["name"]=="termcloud" %}
google.load("visualization", "1");
{% else %}
google.load('visualization', '1', {'packages': ['{{vis["name"]}}']});
{% end %}
{% end %}
{% end %}
var postCompletionCallback = function(outcome, visname) {
document.getElementById("response").innerHTML="Response";
mode=0;
if (outcome==''){
document.getElementById("response").innerHTML="<b>No results returned.</b><br>";
}
if (outcome.slice(0,errormsg.length)==errormsg){
document.getElementById("response").innerHTML="<b>Response Message:</b><br>"+outcome;
}
else {
{% if 'template' in app %}
document.getElementById("_template_div_").style.visibility="visible";
{% end %}
var data = new google.visualization.DataTable(JSON.parse(outcome),0.5);
query_data[visname]=data;
interpolateData(visname,data);
document.getElementById("response").innerHTML="";
drawChart(visname, data);
}
};
function interpolateData(queryname, data) {
if (datavisualizations[queryname][0]['name']=='motionchart') {
data.sort(1);
var sampleRowTail=[];
for (var i=2; i<data.getNumberOfColumns(); i++){
if (data.getColumnType(i)=='string') sampleRowTail.push('')
else sampleRowTail.push(0)
}
var prevdict={};
var datalen=data.getNumberOfRows()
for (var i=0; i<datalen; i++) {
var axis=data.getValue(i,0);
var date=data.getValue(i,1);
if ( !(axis in prevdict) ) {
prevdict[axis]=getDate(date);
continue;
}
var newd=getDate(date);
var tmpdate=prevdict[axis].slice(0);
var datesdif=getDatesDif(tmpdate, newd);
for (var i1=1; i1<datesdif; i1++) {
tmpdate=getNextDate(tmpdate);
data.addRow([axis, getDateStr(tmpdate)].concat(sampleRowTail));
}
prevdict[axis]=newd;
}
}
}
function getDateStr(d) {
if (d[0]==='w') {
if (d[2]<10) return d[1]+'W0'+d[2];
else return d[1]+'W'+d[2];
} else {
if (d[2]<10) return d[1]+'-0'+d[2];
return d[1]+'-'+d[2];
}
}
function getNextDate(d) {
if (d[0]==='w') {
if (d[2]<52) return ['w', d[1], d[2]+1];
else return ['w', d[1]+1, 1];
} else {
if (d[2]<12) return ['m', d[1], d[2]+1];
else return ['m', d[1]+1, 1];
}
}
function getDate(d) {
if (d.search('W')!=-1) {
return ['w', Number(d.slice(0,4)), Number(d.slice(d.length-2,d.length))]
} else {
var dt=new Date(d);
return ['m', dt.getFullYear(), dt.getMonth()+1]
}
}
function getDatesDif(d1, d2) {
if (d1[0]!=d2[0]) return -1
if (d1[0]==='m') {
return d2[1]*12+d2[2]-(d1[1]*12+d1[2]);
} else if (d1[0]==='w') {
return d2[1]*52+d2[2]-(d1[1]*52+d1[2]);
} else {
return -1
}
}
function sendQuery() {
var params ='';
for (el in parameters){
if (params!='')
params+='\n;'
params += el+"="+parameters[el];
}
// alert(params);
mode=1;
/*if (visobj){
document.getElementById('vis-div').innerHTML='';
visobj=false;
}*/
// alert("send one");
{% for i in app["datavisualizations"] %}
document.getElementById('{{i}}').innerHTML='<b>Loading .....</b><br> <img border="0" vspace="12" alt="loading" src="{{ static_url("ajax-loader.gif") }}">';
accessURL("/{{settings.APPDIRNAME}}/{{app["link"]}}/{{i}}", params,"POST", postCompletionCallback, '{{i}}');
{% end %}
}
function viewChart() {
view=1;
if(mode==2){
drawChart('query', query_data['query']);
view=0;
}
else if (mode==0){
document.getElementById("response").innerHTML="No data to visualise";
view=0;
}
else{
document.getElementById("response").innerHTML+="</br>Waiting for data....";
}
}
function drawChart(queryname, data) {
if (mode==1 || data==null)
return;
var visualization;
var options={};
var foundvis=null;
var queryvis=datavisualizations[queryname][0]['name'];
if (queryname==='query' && vis!==undefined) queryvis=vis;
for (var i=0; i<datavisualizations[queryname].length; i++) {
if (datavisualizations[queryname][i]['name']===queryvis){
foundvis=datavisualizations[queryname][i];
break;
}
}
if (foundvis==null) foundvis=datavisualizations[queryname][0];
if ('options' in foundvis) options=JSON.parse(JSON.stringify(foundvis['options']));
switch(queryvis) {
{% for k,v in settings.viswidgetmap.iteritems() %}
case '{{k}}':
visualization = new {{v}}(document.getElementById(queryname));
break;
{% end %}
default:
break;
}
if (queryvis!='table') {
if (options['height']==undefined) options['height']= 600;
if (options['width']==undefined) options['width']= document.getElementById(queryname).offsetWidth;
if (queryvis=='motionchart') {
document.getElementById(queryname).style.width=options['width']+'px';
}
}
visualization.draw(data, options);
}
var parameters= new Array();
function onexample(example){
if (example=='empty') {
clearvis();
return;
}
parameters= new Array();
for (var el in exparams[example]){
parameters[el]=exparams[example][el];
}
clearvis();
sendQuery();
}
function clearvis(){
document.getElementById("response").innerHTML="";
document.getElementById('query').innerHTML='';
}
function oncustom(){
parameters=new Array();
var v=document.getElementsByName("custom");
for(var i=0;i<v.length;i++){
// alert(v[i].type)
if (v[i].type=="text" || v[i].type=="select-one"){
parameters[v[i].id]=v[i].value;
}
}
// for (var el in parameters){
// alert("Name:"+el+" Value:"+parameters[el]);
// }
clearvis();
sendQuery();
}
function setvis(vs){
vis=vs;
// alert(vis);
clearvis();
drawChart('query', query_data['query']);
/// delete vis if data load chart
}
</script>
{% end %}
{% block service %}
<h3>{{app["title"]}}</h3>
{% if settings.DEBUG %}
<a id="qbutton" href="#" onclick="viewquery()">Show query</a>
<p id="qtext"><p>
{% end %}
<form onsubmit="return false;">
<table width="95%" border="0" >
<tbody>
<tr>
<td align="left">
<h4>Set parameters</h4>
<table border="0" >
<tbody>
<tr>
<td width="250px"> <input type="radio" id="custom" name="inputmode" maxlength="2048" onclick="toggletype();">
<label for="custom">Custom parameters</label>
</td>
<td>
<table cellspacing="0" cellpadding="0" border="0" >
<tbody>
{% for param in app["params"] %}
<tr>
<td align="left">{{param["name"]}}:
</td>
<td align="left">
{% if 'values' in param %}
<select id="{{param["name"]}}" name="custom" disabled>
{% if type(param['values'])==str %}
{% for i in settings.mConnection.cursor().execute(param['values']) %}
<option value="{{i[0]}}">{{''.join(i)}}</option>
{% end %}
{% else %}
{% for i in param['values'] %}
<option value="{{i}}">{{i}}</option>
{% end %}
{% end %}
</select>
{% else %}
<!--onKeyDown="if(event.keyCode==13) oncustom();" -->
<input type="text" id="{{param["name"]}}" name="custom" maxlength="2048" size=
{% if "textsize" in param %}
"{{ param["textsize"] }}"
{% else %}
"10"
{% end %}
disabled/>
{% end %}
</td></tr>
{% end %}
</tbody>
</table>
</td>
</tr>
<tr><td></td><td ><input type="submit" name="custom" value="Apply" onclick="oncustom();" disabled/></td></tr>
<tr>
<td> <input type="radio" id="auto" name="inputmode" maxlength="2048" onclick="toggletype();" checked>
<label for="auto">Examples</label>
</td>
<td>
<select id="example" name="auto" onchange="onexample(document.getElementById('example').value);">
<option value="empty">choose</option>
{% for example in app["examples"] %}
<option value="{{example["name"]}}">{{example["paramstring"]}}</option>
{% end %}
</select>
</td>
</tr>
</tbody>
</table>
</td>
<td align="right">
<h4>Visualisation</h4><br>
{% for vis in app["visualisations"] %}
<label for="{{vis["name"]}}">{{vis["name"]}}</label>
<input type="radio" id="{{vis["name"]}}" name="vis" maxlength="2048" onclick="setvis('{{vis["name"]}}');"/><br>
{% end %}
</td>
</tr>
</tbody>
</table>
</form>
<h3></h3>
</br>
<p id="response">
</p>
{% if 'template' in app %}
<div id="_template_div_" style="width: 100%; height: 80%; visibility: hidden;">
{{ app['template'] }}
</div>
{% else %}
<div id="query" style="width: 95%; height: 80%;"></div>
{% end %}
{% end %}

View File

@ -1,47 +0,0 @@
{% extends "base_v2.html" %}
{% block save_profile %} class="current" {% end %}
{% block content %}
<title>Save profile</title>
<div class="uk-flex-inline cm-nav-container">
<div class="cm-left-box"><a href="/"><button id="cancel-main-btn" class="uk-close-large cm-close-btn" type="button" uk-close></button></a></div>
<div class="cm-navigation cm-nav-toolbar">
<ul class="uk-subnav uk-subnav-line">
<li class="cm-nav-li">
<a class="cm-nav-a" href="upload-codes">
<div class="cm-nav-number-container"><span class="cm-nav-number uk-text-middle">1</span></div>
<span class="cm-nav-title uk-text-middle">Matching context<br>definition</span>
</a>
</li>
<li class="cm-nav-li">
<a class="cm-nav-a" href="configure-profile">
<div class="cm-nav-number-container"><span class="cm-nav-number uk-text-middle">2</span></div>
<span class="cm-nav-title uk-text-middle">Matching proccess<br>configuration</span>
</a>
</li>
<li class="cm-nav-li cm-nav-active">
<a class="cm-nav-a">
<div class="cm-nav-number-container"><span class="cm-nav-number uk-text-middle">3</span></div>
<span class="cm-nav-title uk-text-middle">Save your<br>matching profile</span>
</a>
</li>
</ul>
</div>
</div>
<div class="uk-section uk-section-default">
<div class="uk-container uk-container-small">
<a class="test-upload uk-button uk-button-default uk-width-1-1 uk-button-large uk-text-center cm-main-button" href="save-profile?saveprofile=1">
<span uk-icon="icon: download"></span>
<span class="uk-text-middle">Download profile</span>
</a>
<div class="uk-heading-line uk-text-center uk-margin-small-top uk-margin-small-bottom"><span>or</span></div>
<div class="test-upload uk-button uk-button-link uk-width-1-1 uk-text-center">
<span class="uk-text-middle">LOGIN to save your profile</span>
</div>
</div>
</div>
<script src="/static/save-profile.js" type="text/javascript"></script>
{% end %}

View File

@ -1,112 +0,0 @@
{% extends "base_v2.html" %}
{% block upload_codes %} class="current" {% end %}
{% block content %}
<title>Upload project codes</title>
<link rel="stylesheet" href="/static/animations.css"/>
<div class="uk-flex-inline cm-nav-container uk-margin-medium-bottom">
<div class="cm-left-box"><a href="/"><button id="cancel-main-btn" class="uk-close-large cm-close-btn" type="button" uk-close></button></a></div>
<div class="cm-navigation cm-nav-toolbar">
<ul class="uk-subnav uk-subnav-line">
<li class="cm-nav-li cm-nav-active">
<a class="cm-nav-a">
<div class="cm-nav-number-container"><span class="cm-nav-number uk-text-middle">1</span></div>
<span class="cm-nav-title uk-text-middle">Matching context<br>definition</span>
</a>
</li>
<li class="cm-nav-li cm-nav-disabled">
<a class="cm-nav-a">
<div class="cm-nav-number-container"><span class="cm-nav-number uk-text-middle">2</span></div>
<span class="cm-nav-title uk-text-middle">Matching proccess<br>configuration</span>
</a>
</li>
<li class="cm-nav-li cm-nav-disabled">
<a class="cm-nav-a">
<div class="cm-nav-number-container"><span class="cm-nav-number uk-text-middle">3</span></div>
<span class="cm-nav-title uk-text-middle">Save your<br>matching profile</span>
</a>
</li>
</ul>
</div>
</div>
<div class="uk-container uk-container-small">
<h4>Input options</h4>
<p class="uk-text-small">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
<!-- <form id="codes-file-input-form" method="post" enctype="multipart/form-data" accept-charset="UTF-8">
<div class="uk-margin">
<div uk-form-custom>
<input type="file" name="upload" id="codes-file-input" class="inputfile" />
<strong><svg xmlns="http://www.w3.org/2000/svg" width="20" height="17" viewBox="0 0 20 17"><path d="M10 0l-5.2 4.9h3.3v5.1h3.8v-5.1h3.3l-5.2-4.9zm9.3 11.5l-3.2-2.1h-2l3.4 2.6h-3.5c-.1 0-.2.1-.2.1l-.8 2.3h-6l-.8-2.2c-.1-.1-.1-.2-.2-.2h-3.6l3.4-2.6h-2l-3.2 2.1c-.4.3-.7 1-.6 1.5l.6 3.1c.1.5.7.9 1.2.9h16.3c.6 0 1.1-.4 1.3-.9l.6-3.1c.1-.5-.2-1.2-.7-1.5z"/></svg></strong>
<button class="uk-button uk-button-default" type="button" tabindex="-1">Choose file</button>
</div>
</div>
</form> -->
<div class="js-upload uk-placeholder cm-file-drop-area cm-coloured-text">
<div class="uk-flex uk-flex-middle uk-grid-collapse uk-child-width-expand@s" uk-grid>
<div>
<span uk-icon="icon: cloud-upload"></span>
<span class="uk-text-middle"> Upload matching context .tsv file type</span>
<span class="cm-tooltip" title="If you want the tooltip to appear with a little delay, just add the delay option to the uk-tooltip attribute with your value in milliseconds." uk-tooltip="pos: bottom" uk-icon="icon: info"></span>
</div>
<div uk-form-custom>
<input type="file" name="upload" id="codes-file-input" class="inputfile" />
<button class="uk-button uk-button-default cm-main-button" type="button" tabindex="-1">Choose file</button>
</div>
</div>
</div>
<progress id="js-progressbar" class="uk-progress" value="0" max="100" hidden></progress>
<!-- <div class="test-upload uk-placeholder uk-text-center">
<p><span uk-icon="icon: upload; ratio: 3.5"></span></p>
<p>
<span class="uk-text-middle">Attach project codes by dropping them here or</span>
<div uk-form-custom>
<input type="file">
<span class="uk-link">browse file</span>
</div>
</p>
<p>
<span class="uk-label uk-margin-small-right">TSV</span><span class="uk-label">TXT</span>
<span class="uk-text">file types</span>
</p>
<p class="uk-text-middle">Maximum 10MB upload</p>
</div> -->
<div class="uk-heading-line uk-text-center uk-margin-small-top uk-margin-small-bottom"><span>or</span></div>
<input id="initial-type-input" class="uk-form-width-medium uk-form-large uk-width-1-1 uk-text-center uk-margin-bottom cm-text-input" type="text" style="display: none;" placeholder="Start typing project code or Paste project list">
<table id="data-table" class="uk-table uk-table-striped uk-table-hover cm-table">
<thead>
<tr>
<!-- <th class="uk-table-shrink cm-table-number">#</th> -->
<th class="uk-width-small">Keyword</th>
<th class="uk-table-expand">Context</th>
<th class="uk-table-shrink"></th>
<th class="uk-table-shrink"></th>
</tr>
</thead>
<tfoot>
<tr>
<!-- <td class="cm-table-number"></td> -->
<td colspan="4" class="cm-table-footer"><button id="add-row-below" class="uk-button uk-button-small uk-button-default uk-width-1-1 uk-text-center cm-main-button">
<span class="uk-text-middle"><span uk-icon="icon: plus-circle"></span> Create new</span>
</button></td>
</tr>
</tfoot>
<tbody>
</tbody>
</table>
<button id="next-button" class="uk-button uk-button-primary uk-margin-top uk-float-right" disabled>Next</button>
<div >
</div>
</div>
<script src="/static/upload-codes.js" type="text/javascript"></script>
{% end %}