-
Notifications
You must be signed in to change notification settings - Fork 1
/
templates.js
executable file
·1 lines (1 loc) · 11.4 KB
/
templates.js
1
!function(){var a=Handlebars.template,l=Handlebars.templates=Handlebars.templates||{};l["tmpl-es"]=a({compiler:[7,">= 4.0.0"],main:function(a,l,e,t,n){return'<div>\n<div class="form-inline" style="margin-bottom:5px">\n<label class="control-label" for="ssearch">Search</label>\n<input type="text" class="form-control searchOnEnter" name="ssearch" id="search" style="min-width:50%;max-width:60%"><label class="control-label" for="cline">Context Lines</label><input type="number" id="contextlines" name="cline" class="form-control bfh-number searchOnEnter" min="0" max="10" value=5 style="width:80px">\n<button class="btn btn-primary" id="submitSearch">Search <img src="search.png" width="15" height="15"></button>\n</div>\n<div class="form-control" style="margin-bottom:30px;">\n <label class="radio-inline"><input type="radio" class="optradio" name="optradio" value="0" checked>QUERY STRING <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html#query-string-syntax" target="_blank"><img src="question.png" width="20" height="20"></a></label>\n <label class="radio-inline"><input type="radio" class="optradio" name="optradio" value="1">MATCH(AND) <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-match-query.html" target="_blank"><img src="question.png" width="20" height="20"></a></label>\n <label class="radio-inline"><input type="radio" class="optradio" name="optradio" value="2">MATCH PHRASE <a href="https://www.elastic.co/guide/en/elasticsearch/guide/current/phrase-matching.html"target="_blank"><img src="question.png" width="20" height="20"></a></label>\n <label class="radio-inline" style="padding-right:2px"></label><label class="radio-inline" style="padding-left:0px;"><button class="btn btn-sm btn-primary" id="advS" style="padding:2px 6px;" type="button">Filter Options</button></label>\n <label class="radio-inline" style="padding-right:2px"></label></label>\n <div class="checkbox" style="display: none;">\n <label type="text"><strong>SEARCH WITHIN COLUMN: </strong></label>\n <label class="radio-inline"><input type="checkbox" id="title" name="fradio" value="1">TITLE</label>\n <label class="radio-inline"><input type="checkbox" id="sentence" name="fradio" value="2">SENTENCE</label>\n <label class="radio-inline"><input type="checkbox" id="author" name="fradio" value="3">AUTHOR</label>\n <label class="radio-inline"><input type="checkbox" id="era" name="fradio" value="4">ERA</label>\n <label class="radio-inline"><input type="checkbox" id="familiar_name" name="fradio" value="5">FAMILIAR NAME</label>\n </div>\n</div>\n <div class="input-group input-daterange dateRange" style="display: none;">\n <span class="input-group-addon"><input id="sW" class="searchOnEnter" type="checkbox" value="" style="padding-right: 5px;" ><label style="padding-left: 12px;">STOP WORDS: </label></span>\n <input type="text" id="sWords" class="form-control" value="" placeholder="Arma,Armorum" disabled>\n </div>\n\n<div id="paginate-div" style="text-align:center"></div>\n<a id="final" href="#" style="float:right">Save to CSV</a>\n<table class="table table-striped table-bordered table-condensed table-hover" id=\'estable\'>\n <tr>\n <th>Title</th>\n <th>Sentence</th>\n <th>Author</th>\n <th>Era</th>\n <th>Familiar Name</th>\n <th>Select <input id="sall" type="checkbox" value="sall"></th>\n </tr>\n <tr id="stats" style="display:none">\n <th colspan="3"><div id=\'stat_result\'></div></th>\n <th > <div class="dropdown pull-right">\n <button class="btn btn-primary dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">\n Statistics\n <span class="caret"></span>\n </button>\n <ul class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenu1">\n <li><a id="gstat" href="#">General Stats</a></li>\n </ul>\n </div>\n </th>\n \x3c!--<th colspan="2"><button class="btn btn-danger" type="submit" id="final1">Save to CSV!!</button></th>--\x3e\n </tr>\n <tbody id=\'result_tbody\'>\n </tbody>\n</table>\n<div id="paginate-div-bt" style="text-align:center"></div>\n</div>\n'},useData:!0}),l["tmpl-page"]=a({compiler:[7,">= 4.0.0"],main:function(a,l,e,t,n){return'<div class="page-content" style="font-weight:bold;"></div><ul class="sync-pagination pagination-sm pagination"></ul>\n'},useData:!0}),l["tmpl-tr"]=a({compiler:[7,">= 4.0.0"],main:function(a,l,e,t,n){var s,i=null!=l?l:a.nullContext||{},r=e.helperMissing,o=a.escapeExpression;return'<tr><td><a href="#" onclick="showResult(\''+o((s=null!=(s=e.result||(null!=l?l.result:l))?s:r,"function"==typeof s?s.call(i,{name:"result",hash:{},data:n}):s))+'\');return false;" target="_blank">'+o((s=null!=(s=e.task_name||(null!=l?l.task_name:l))?s:r,"function"==typeof s?s.call(i,{name:"task_name",hash:{},data:n}):s))+"</a></td><td>"+o((s=null!=(s=e.timestamp||(null!=l?l.timestamp:l))?s:r,"function"==typeof s?s.call(i,{name:"timestamp",hash:{},data:n}):s))+"</td><td>"+o((e.json_metatags||l&&l.json_metatags||r).call(i,null!=l?l.tags:l,{name:"json_metatags",hash:{},data:n}))+"</td></tr>\n"},useData:!0}),l["tmpl-tres"]=a({compiler:[7,">= 4.0.0"],main:function(a,l,e,t,n){var s,i=null!=l?l:a.nullContext||{},r=e.helperMissing,o="function",d=a.escapeExpression;return'<tr class="tr-all '+d((s=null!=(s=e.PAGE||(null!=l?l.PAGE:l))?s:r,typeof s===o?s.call(i,{name:"PAGE",hash:{},data:n}):s))+'"><td class="tag"><a target="_blank" href="'+d((s=null!=(s=e.url||(null!=l?l.url:l))?s:r,typeof s===o?s.call(i,{name:"url",hash:{},data:n}):s))+'">'+d((s=null!=(s=e.title||(null!=l?l.title:l))?s:r,typeof s===o?s.call(i,{name:"title",hash:{},data:n}):s))+'</a></td><td class="data"><span>'+d((s=null!=(s=e.PRE_DATA||(null!=l?l.PRE_DATA:l))?s:r,typeof s===o?s.call(i,{name:"PRE_DATA",hash:{},data:n}):s))+'</span><span class="es_value_data text-success">'+d((s=null!=(s=e.sentence||(null!=l?l.sentence:l))?s:r,typeof s===o?s.call(i,{name:"sentence",hash:{},data:n}):s))+"</span><span>"+d((s=null!=(s=e.POST_DATA||(null!=l?l.POST_DATA:l))?s:r,typeof s===o?s.call(i,{name:"POST_DATA",hash:{},data:n}):s))+'</span></td><td class="title es_value_data text-success">'+d((s=null!=(s=e.author||(null!=l?l.author:l))?s:r,typeof s===o?s.call(i,{name:"author",hash:{},data:n}):s))+"</td><td>"+d((s=null!=(s=e.era||(null!=l?l.era:l))?s:r,typeof s===o?s.call(i,{name:"era",hash:{},data:n}):s))+"</td><td>"+d((s=null!=(s=e.familiar_name||(null!=l?l.familiar_name:l))?s:r,typeof s===o?s.call(i,{name:"familiar_name",hash:{},data:n}):s))+'</td><td><label><input class="csv" type="checkbox"></label></td></tr>\n'},useData:!0}),l["tmpl-user"]=a({compiler:[7,">= 4.0.0"],main:function(a,l,e,t,n){var s,i=null!=l?l:a.nullContext||{},r=e.helperMissing,o="function",d=a.escapeExpression;return' <h2>User Profile</h2>\n <div id="user_profile">\n <div id="photo" class="col-md-2" style="width:200px ">\n <img src="'+d((s=null!=(s=e.gravator_url||(null!=l?l.gravator_url:l))?s:r,typeof s===o?s.call(i,{name:"gravator_url",hash:{},data:n}):s))+'?s=180&d=mm"><br><br>\n <a href="https://en.gravatar.com/" target="_blank" style="clear:both;">Profile Image</a><br><br>\n <a id="reset_password" style="clear:both;">Reset Password</a>\n </div>\n <form id="view_form" class="form-horizontal col-md-4" onsubmit="return edit_user();">\n <div class="form-group">\n <label class="col-md-3 control-label">Username</label>\n <div class="col-md-09">\n <p class="form-control-static">'+d((s=null!=(s=e.username||(null!=l?l.username:l))?s:r,typeof s===o?s.call(i,{name:"username",hash:{},data:n}):s))+'</p>\n </div>\n </div>\n <div class="form-group">\n <label class="col-md-3 control-label">Name</label>\n <div class="col-md-09">\n <p class="form-control-static">'+d((s=null!=(s=e.name||(null!=l?l.name:l))?s:r,typeof s===o?s.call(i,{name:"name",hash:{},data:n}):s))+'</p>\n </div>\n </div>\n <div class="form-group">\n <label class="col-md-3 control-label">Email</label>\n <div class="col-md-09">\n <p class="form-control-static">'+d((s=null!=(s=e.email||(null!=l?l.email:l))?s:r,typeof s===o?s.call(i,{name:"email",hash:{},data:n}):s))+'</p>\n </div>\n </div>\n <button type="submit" id="form_submit" class="btn btn-default pull-right" style="margin-right:40px;">Edit</button>\n </form>\n <form class="col-md-4" id="user_form" onsubmit="return submit_user();">\n <div style="display:none">\n <input type="hidden" name="csrfmiddlewaretoken" value="'+d((s=null!=(s=e.csrftoken||(null!=l?l.csrftoken:l))?s:r,typeof s===o?s.call(i,{name:"csrftoken",hash:{},data:n}):s))+'"/>\n </div>\n <div class="form-group">\n <label for="first_name">First Name</label>\n <input type="text" class="form-control" name="first_name" placeholder="John" value="'+d((s=null!=(s=e.first_name||(null!=l?l.first_name:l))?s:r,typeof s===o?s.call(i,{name:"first_name",hash:{},data:n}):s))+'">\n </div>\n <div class="form-group">\n <label for="last_name">Last Name</label>\n <input type="text" class="form-control" name="last_name" placeholder="Doe" value="'+d((s=null!=(s=e.last_name||(null!=l?l.last_name:l))?s:r,typeof s===o?s.call(i,{name:"last_name",hash:{},data:n}):s))+'">\n </div>\n <div class="form-group">\n <label for="email">Email address</label>\n <input type="email" class="form-control" name="email" placeholder="Enter email" value="'+d((s=null!=(s=e.email||(null!=l?l.email:l))?s:r,typeof s===o?s.call(i,{name:"email",hash:{},data:n}):s))+'">\n </div>\n <button type="submit" id="form_submit" class="btn btn-default pull-right">Update</button>\n </form>\n <div class="row" style="width:100%;clear:both;"></div>\n <form class="form-inline" id="pass_form" onsubmit="return set_password();" style="display:none">\n <div style="display:none">\n <input type="hidden" name="csrfmiddlewaretoken" value="'+d((s=null!=(s=e.csrftoken||(null!=l?l.csrftoken:l))?s:r,typeof s===o?s.call(i,{name:"csrftoken",hash:{},data:n}):s))+'"/>\n </div>\n <div class="form-group">\n <label for="password">New Password</label>\n <input type="password" class="form-control" name="password" placeholder="New Password">\n </div>\n <div class="form-group">\n <label for="password2">Retype New Password</label>\n <input type="password" class="form-control" name="password2" placeholder="Retype New Password">\n </div>\n <button type="submit" class="btn btn-default">Set Password</button>\n </form>\n </div>\n'},useData:!0})}();