first commit
This commit is contained in:
@@ -0,0 +1,75 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
||||
<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>{% block title %}Flowers{% endblock %}</title>
|
||||
|
||||
<!-- link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.6.0/pure-min.css" -->
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='pure-min.css') }}">
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='grids-responsive-min.css') }}">
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='font-awesome.css') }}">
|
||||
<link rel=stylesheet type=text/css href="{{ url_for('static', filename='marketing.css') }}">
|
||||
<link rel=stylesheet type=text/css href="{{ url_for('static', filename='flower.css') }}">
|
||||
<script type="text/javascript" src="{{ url_for('static', filename='jquery-min.js') }}"></script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
{% block headandmenu %}
|
||||
|
||||
<div class="header">
|
||||
<div class="home-menu pure-menu pure-menu-horizontal pure-menu-fixed">
|
||||
<a class="pure-menu-heading" href="">Flowers</a>
|
||||
|
||||
<ul class="pure-menu-list">
|
||||
{% block menuoptions %}
|
||||
<input type="text" id="search" placeholder="search..." value="{{filter}}">
|
||||
<li class="pure-menu-item pure-menu-selected"><a href="javascript:DoSubmit('new')" class="pure-menu-link">New</a></li>
|
||||
<li class="pure-menu-item"><a href="javascript:DoSubmit('logout')" class="pure-menu-link">Logout</a></li>
|
||||
<li class="pure-menu-item"><a href="javascript:DoSubmit('rehush')" class="pure-menu-link">Password</a></li>
|
||||
{% endblock menuoptions %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock headandmenu %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
|
||||
<form id="gotopage" action="{{ url_for('application') }}" method="POST">
|
||||
<input type="hidden" id="_action" name="action" value="">
|
||||
<input type="hidden" id="_organization" name="organization" value="">
|
||||
<input type="hidden" id="_myid" name="myid" value="">
|
||||
<input type="hidden" id="_datetime" name="datetime" value="">
|
||||
<input type="hidden" id="_filter" name="filter" value="">
|
||||
</form>
|
||||
|
||||
<script language="javascript">
|
||||
|
||||
function DoSubmit(action, org, datetime, filter) {
|
||||
$('#_action').val(action);
|
||||
$('#_organization').val(org);
|
||||
$('#_datetime').val(datetime);
|
||||
$('#_filter').val( $('#search').val() );
|
||||
$('#gotopage').submit();
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
{% block footer %}
|
||||
<div class="footer l-box is-center">
|
||||
Thank you for using the flowershop.
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
{% extends "common.html" %}
|
||||
|
||||
{% block headandmenu %}
|
||||
<div class="header">
|
||||
<div class="home-menu pure-menu pure-menu-horizontal pure-menu-fixed">
|
||||
<a class="pure-menu-heading" href="">Flowers</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{% endblock headandmenu %}
|
||||
|
||||
{% block content %}
|
||||
<div class="splash-container">
|
||||
<div class="splash">
|
||||
<form class="pure-form pure-form-aligned" action="{{ url_for('create') }}" method="post">
|
||||
<fieldset>
|
||||
<div class="pure-control-group">
|
||||
<input maxlength="32" name="name" type="text" placeholder="make up your username">
|
||||
</div>
|
||||
|
||||
<div class="pure-control-group">
|
||||
<input maxlength="10" name="password" type="password" placeholder="make up you password, the longer the better">
|
||||
</div>
|
||||
|
||||
<div class="pure-controls">
|
||||
<button type="submit" class="pure-button pure-button-primary">Create Vase</button>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
{{ message }}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock content %}
|
||||
@@ -0,0 +1,45 @@
|
||||
{% extends "common.html" %}
|
||||
|
||||
{% block menuoptions %}
|
||||
<li class="pure-menu-item pure-menu-selected"><a href="javascript:$('#newFlower').submit()" class="pure-menu-link">Save</a></li>
|
||||
<li class="pure-menu-item pure-menu-selected"><a href="javascript:DoSubmit('deactivate','{{ flower.organization }}','{{ flower.dateCreated }}','')" class="pure-menu-link">Delete</a></li>
|
||||
<li class="pure-menu-item pure-menu-selected"><a href="javascript:DoSubmit('list','','','')" class="pure-menu-link">Cancel</a></li>
|
||||
{% endblock menuoptions %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
<div class="splash-container">
|
||||
<div class="splash">
|
||||
<form class="pure-form pure-form-stacked" id="newFlower" action="{{ url_for('application') }}" method="post">
|
||||
<fieldset>
|
||||
<div class="pure-control-group">
|
||||
<input maxlength="70" size="50" id="organization" name="organization" type="text" value="{{ flower.organization }}" placeholder="Organization">
|
||||
</div>
|
||||
|
||||
<div class="pure-control-group">
|
||||
<input maxlength="70" id="myname" name="myname" type="text" value="{{ flower.myName }}" placeholder="Your name (optional)">
|
||||
</div>
|
||||
|
||||
<div class="pure-control-group">
|
||||
<input maxlength="70" id="myid" name="myid" type="text" value="{{ flower.myID }}" placeholder="Your Login">
|
||||
</div>
|
||||
|
||||
<div class="pure-control-group">
|
||||
<input maxlength="30" id="secret" name="secret" type="text" placeholder="Your secret">
|
||||
</div>
|
||||
<input type="hidden" id="action" name="action" value="save">
|
||||
<input type="hidden" id="filter" name="filter" value="DoNotSetFilterinCookie">
|
||||
|
||||
</fieldset>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script language="javascript">
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,37 @@
|
||||
{% extends "common.html" %}
|
||||
|
||||
{% block headandmenu %}
|
||||
<div class="header">
|
||||
<div class="home-menu pure-menu pure-menu-horizontal pure-menu-fixed">
|
||||
<a class="pure-menu-heading" href="">Flowers</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{% endblock headandmenu %}
|
||||
|
||||
{% block content %}
|
||||
<div class="splash-container">
|
||||
<div class="splash">
|
||||
<form class="pure-form pure-form-aligned" action="{{ url_for('application') }}" method="post">
|
||||
<fieldset>
|
||||
<div class="pure-control-group">
|
||||
<input name="name" type="text" placeholder="{{ name_suggestion }}">
|
||||
</div>
|
||||
|
||||
<div class="pure-control-group">
|
||||
<input name="password" type="password" placeholder="{{ pwd_suggestion }}">
|
||||
</div>
|
||||
|
||||
<div class="pure-controls">
|
||||
<button type="submit" class="pure-button pure-button-primary">Submit</button>
|
||||
</div>
|
||||
</fieldset>
|
||||
<input type="hidden" id="action" name="action" value="login">
|
||||
<input type="hidden" id="filter" name="filter" value="DoNotSetFilterinCookie">
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock content %}
|
||||
@@ -0,0 +1,51 @@
|
||||
{% extends "common.html" %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="content-wrapper">
|
||||
<div class="content">
|
||||
<div class="pure-g">
|
||||
<div class="l-box pure-u-1 pure-u-md-1-2 pure-u-lg-1-5">
|
||||
|
||||
</div>
|
||||
<div class="l-box pure-u-1 pure-u-md-1-2 pure-u-lg-3-5">
|
||||
<table id="flowerlist" class="flowerlist pure-table pure-table-horizontal">
|
||||
{% for flower in flowers %}
|
||||
<tr class="flowerlist">
|
||||
<td class="flowerlist">
|
||||
<a href="javascript:DoSubmit('show', '{{flower.organization}}', '{{flower.dateCreated}}' , '')">
|
||||
{{ flower.organization }}, {{ flower.myID }}
|
||||
</a>
|
||||
</td>
|
||||
<td class="right"><span style="white-space: nowrap;">{{ flower.dateCreated[:10] }}</span></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div class="l-box pure-u-1 pure-u-md-1-2 pure-u-lg-1-5">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script language="javascript">
|
||||
|
||||
var $rows = $('#flowerlist tr');
|
||||
$('#search').keyup(function() {
|
||||
var val = $.trim($(this).val()).replace(/ +/g, ' ').toLowerCase();
|
||||
|
||||
$rows.show().filter(function() {
|
||||
var text = $(this).text().replace(/\s+/g, ' ').toLowerCase();
|
||||
return !~text.indexOf(val);
|
||||
}).hide();
|
||||
});
|
||||
|
||||
$('#search').keyup();
|
||||
|
||||
</script>
|
||||
|
||||
{% endblock content %}
|
||||
@@ -0,0 +1,40 @@
|
||||
{% extends "common.html" %}
|
||||
|
||||
{% block headandmenu %}
|
||||
<div class="header">
|
||||
<div class="home-menu pure-menu pure-menu-horizontal pure-menu-fixed">
|
||||
<a class="pure-menu-heading" href="">Flowers</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{% endblock headandmenu %}
|
||||
|
||||
{% block content %}
|
||||
<div class="splash-container">
|
||||
<div class="splash">
|
||||
<form class="pure-form pure-form-aligned" action="{{ url_for('update_pwd') }}" method="post">
|
||||
<fieldset>
|
||||
<div class="pure-control-group">
|
||||
<input name="name" type="text" placeholder="your existing name">
|
||||
</div>
|
||||
|
||||
<div class="pure-control-group">
|
||||
<input name="old_password" type="password" placeholder="your existing password">
|
||||
</div>
|
||||
|
||||
<div class="pure-control-group">
|
||||
<input maxlength="10" name="new_password" type="password" placeholder="make up you password, the longer the better">
|
||||
</div>
|
||||
|
||||
|
||||
<div class="pure-controls">
|
||||
<button type="submit" class="pure-button pure-button-primary">Update Password</button>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
{{ message }}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock content %}
|
||||
@@ -0,0 +1,44 @@
|
||||
{% extends "common.html" %}
|
||||
|
||||
{% block menuoptions %}
|
||||
<li class="pure-menu-item pure-menu-selected"><a href="javascript:editFlower()" class="pure-menu-link">Edit</a></li>
|
||||
{% endblock menuoptions %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
<div class="splash-container">
|
||||
<div class="splash">
|
||||
<table class="pure-table" style="width: 100%">
|
||||
<tr><td class="white right">Org</td><td class="white left">{{ flower.organization }}</td> </tr>
|
||||
<tr><td class="white right">You</td><td class="white left">{{ flower.myName }}</td> </tr>
|
||||
<tr><td class="white right">Login</td><td class="white left">{{ flower.myID }}</td> </tr>
|
||||
<tr><td class="white right">Hash</td><td class="white left"><div id="secret" value="{{ flower.mySecret }}" onclick="myCopyFunction()">{{ flower.mySecret }}</div></td></tr>
|
||||
<tr><td class="white">{{ flower.dateCreated[:10] }}</td><td></td> </tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script language="javascript">
|
||||
|
||||
setTimeout(function(){
|
||||
DoSubmit('list', '{{flower.organization}}', '{{flower.dateCreated}}', 'DoNotSetFilterinCookie')
|
||||
}, 5000);
|
||||
|
||||
function editFlower() {
|
||||
DoSubmit('edit', '{{flower.organization}}', '{{flower.dateCreated}}', 'DoNotSetFilterinCookie')
|
||||
}
|
||||
|
||||
function myCopyFunction() {
|
||||
var copyText = document.getElementById("secret");
|
||||
|
||||
// Copy the text inside the text field
|
||||
navigator.clipboard.writeText(copyText.getAttribute("value"));
|
||||
|
||||
//alert("Copied the text: "+copyText.getAttribute("value"));
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user