ajout spinning button dans update portfolio button
This commit is contained in:
@@ -12,8 +12,8 @@ def main(global_config, **settings):
|
||||
""" This function returns a Pyramid WSGI application.
|
||||
"""
|
||||
# declarations
|
||||
session_factory = UnencryptedCookieSessionFactoryConfig('Ty6sIUf1')
|
||||
authn_policy = AuthTktAuthenticationPolicy('Ty6sIUe8', callback=groupfinder, hashalg='sha512')
|
||||
session_factory = UnencryptedCookieSessionFactoryConfig('df53ktTE1G')
|
||||
authn_policy = AuthTktAuthenticationPolicy('5D9Phu1xyP', callback=groupfinder, hashalg='sha512')
|
||||
authz_policy = ACLAuthorizationPolicy()
|
||||
mailer_factory_from_settings(settings)
|
||||
|
||||
|
||||
@@ -105,3 +105,44 @@
|
||||
.logo-small {
|
||||
font-size: 50px;
|
||||
}
|
||||
|
||||
.gly-spin {
|
||||
-webkit-animation: spin 2s infinite linear;
|
||||
-moz-animation: spin 2s infinite linear;
|
||||
-o-animation: spin 2s infinite linear;
|
||||
animation: spin 2s infinite linear;
|
||||
}
|
||||
@-moz-keyframes spin {
|
||||
0% {
|
||||
-moz-transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
-moz-transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
@-webkit-keyframes spin {
|
||||
0% {
|
||||
-webkit-transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
-webkit-transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
@-o-keyframes spin {
|
||||
0% {
|
||||
-o-transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
-o-transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
@keyframes spin {
|
||||
0% {
|
||||
-webkit-transform: rotate(0deg);
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
-webkit-transform: rotate(359deg);
|
||||
transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
@@ -6,8 +6,8 @@
|
||||
<form id="actif_list-form" action="${url}" method="post">
|
||||
<div class="form-group">
|
||||
<div class="form-group">
|
||||
<button class="btn btn-primary" type="submit" name="form.submitted">
|
||||
<span class="glyphicon glyphicon-refresh"></span> MAJ du portefeuille</button>
|
||||
<button id="updateButton" class="btn btn-primary" type="submit" name="form.submitted">
|
||||
<i class="glyphicon glyphicon-refresh"></i> MAJ du portefeuille</button>
|
||||
<a href="#" class="btn btn-success" role="button"
|
||||
data-toggle="modal" data-target="#choixTypeActif"><span class="glyphicon glyphicon-plus"></span> Nouvel actif</a>
|
||||
</div>
|
||||
@@ -81,6 +81,13 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$('#updateButton').on('click', function(){
|
||||
$('i.gly-spin').removeClass('gly-spin');
|
||||
$('i').addClass('gly-spin');
|
||||
});
|
||||
</script>
|
||||
|
||||
</div><!-- content -->
|
||||
</metal:block>
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label">Classe</label>
|
||||
<div class="col-xs-2">
|
||||
<select class="form-control" id="allocation" name="allocation">
|
||||
<select class="form-control" id="classe" name="classe">
|
||||
<div tal:repeat="item classes_list">
|
||||
<option value="${item.classe}" tal:attributes="selected allocation.classe==item.classe and 'selected' or None">${item.classe}</option>
|
||||
</div>
|
||||
|
||||
@@ -5,14 +5,14 @@
|
||||
<a href="${request.application_url}/" class="btn btn-default" role="button">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Retour</a>
|
||||
<a href="histo_edit/0" class="btn btn-success" role="button">
|
||||
<span class="glyphicon glyphicon-plus"></span> Maj valeur part</a>
|
||||
<span class="glyphicon glyphicon-plus"></span> Entrée / Sortie cash</a>
|
||||
</p>
|
||||
|
||||
<table id="histo_list" class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Date</th>
|
||||
<th>Mvt Cash</th>
|
||||
<th>E/S Cash</th>
|
||||
<th>Valeur Pf</th>
|
||||
<th>Nb Part</th>
|
||||
<th>Valeur Part</th>
|
||||
@@ -44,7 +44,8 @@
|
||||
return '<a href="/histo_edit/' + data + '">' + data + '</a>';
|
||||
},
|
||||
},
|
||||
]
|
||||
],
|
||||
order: [[ 0, "desc" ]]
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@@ -36,6 +36,7 @@ from ..views.default import (
|
||||
)
|
||||
|
||||
import json
|
||||
import time
|
||||
|
||||
@view_config(route_name='actifs_list', renderer='../templates/actifs/actifs_list.pt', permission='view')
|
||||
def actifs_list(request):
|
||||
@@ -58,6 +59,7 @@ def actifs_list(request):
|
||||
sym = Share(item.symbole)
|
||||
# import pdb;pdb.set_trace()
|
||||
update_actif_valeur(request, item.symbole, sym.get_price())
|
||||
time.sleep(2) # attendre 2 secondes
|
||||
|
||||
# update du portefeuille
|
||||
update_portefeuille(request, logged_in)
|
||||
|
||||
Reference in New Issue
Block a user