From 47010d4cd7d280ef9be386cfa2c4d3569314ab23 Mon Sep 17 00:00:00 2001 From: Alexis Metaireau Date: Sun, 27 Nov 2011 04:11:22 +0100 Subject: [PATCH] change the icons, simplify some javascript --- budget/api.py | 7 +++--- budget/static/delete.png | Bin 0 -> 274 bytes budget/static/deleter.png | Bin 0 -> 226 bytes budget/static/edit.png | Bin 0 -> 258 bytes budget/static/main.css | 37 ++++++++++++++++++++++++++----- budget/static/pen.png | Bin 3912 -> 0 bytes budget/static/reactivate.png | Bin 0 -> 259 bytes budget/static/scissors.png | Bin 4312 -> 0 bytes budget/templates/list_bills.html | 17 +++++++++----- budget/web.py | 2 +- 10 files changed, 47 insertions(+), 16 deletions(-) create mode 100644 budget/static/delete.png create mode 100644 budget/static/deleter.png create mode 100644 budget/static/edit.png delete mode 100644 budget/static/pen.png create mode 100644 budget/static/reactivate.png delete mode 100644 budget/static/scissors.png diff --git a/budget/api.py b/budget/api.py index 9d41b3c..4ca04f2 100644 --- a/budget/api.py +++ b/budget/api.py @@ -2,7 +2,7 @@ from flask import * from models import db, Project, Person, Bill -from forms import (ProjectForm, EditProjectForm, MemberForm, BillForm, +from forms import (ProjectForm, EditProjectForm, MemberForm, BillForm, get_billform_for) from utils import for_all_methods @@ -12,6 +12,7 @@ from werkzeug import Response api = Blueprint("api", __name__, url_prefix="/api") + def check_project(*args, **kwargs): """Check the request for basic authentication for a given project. @@ -134,8 +135,8 @@ class BillHandler(object): project_resource = RESTResource( name="project", - route="/projects", - app=api, + route="/projects", + app=api, actions=["add", "update", "delete", "get"], handler=ProjectHandler()) diff --git a/budget/static/delete.png b/budget/static/delete.png new file mode 100644 index 0000000000000000000000000000000000000000..aa786a30bc436276547eb298748fe699447dad77 GIT binary patch literal 274 zcmeAS@N?(olHy`uVBq!ia0vp^d?3uh1|;P@bT0xa$r9IylHmNblJdl&R0hYC{G?O` z&)mfH)S%SFl*+=BsWw1GTRdGHLn>}1r7$qX$Jf^>lrnVa=iJ+4IFXT?Vbx6jB|Hr` z7*{+~R-UBBykZvXi&+b22`#w8t#H;SW0r#g<0^sKYHTZRG3x{f^IV8wyTp^8T=Ct$If*(8AL4jF1R$9ep&E_^~6N}ONTx3l-M~87#=l* Vyb5T3zzcLggQu&X%Q~loCIBIwVNn18 literal 0 HcmV?d00001 diff --git a/budget/static/deleter.png b/budget/static/deleter.png new file mode 100644 index 0000000000000000000000000000000000000000..04a23f37237199f3cdeb9f605719ecb9a9658e10 GIT binary patch literal 226 zcmeAS@N?(olHy`uVBq!ia0vp^d?3uh1|;P@bT0xa$r9IylHmNblJdl&R0hYC{G?O` z&)mfH)S%SFl*+=BsWw1GEuJopAr-ggOuEf`K!L+`;m7;DR?W&cPnImUau(0LxFVBt zQrqkWDiu8X443vct6QHG(g{ia+sn>&_wFSosgG>Qr5a*4Zuf}GFfY>HR8ja<;DE=0 zFRf>|wf3*Ovgu&Cto?(?rfV#D^Oxl&OtB2DE*8O0?@$1)b=9QcdYZyeU7>=;cHqXCv!lUI` zg~C>b_7VnT&RO;hhU~M1xYd+Q;~T8x@2Yb7xMY8rZc#}bE3PZn}k*Pk5p@il|9&VRSri+gsVp3^!$z)>`Q~AcC zan@r^TFlD>^CHf^&}(R9_Q=^YYvZm4k+TX60tpOJeOZs=rfzotx|hMz)z4*}Q$iB} DZX;I8 literal 0 HcmV?d00001 diff --git a/budget/static/main.css b/budget/static/main.css index 9505e88..830ef98 100644 --- a/budget/static/main.css +++ b/budget/static/main.css @@ -130,14 +130,12 @@ div.topbar ul.secondary-nav { padding-right: 75px; } .bill-actions { padding-top: 2px; padding-bottom: 2px; + text-align: center; } -.edit img { - height: 24px; -} - -.delete img { - height: 24px; +.edit img, .delete img{ + height: 16px; + margin-right: 5px; } .balance-value{ @@ -159,3 +157,30 @@ tr.payer_line .balance-name{ color:green; text-indent:5px; } + +.action { + position: absolute; + left: 10px; + width: 220px; + background: #000 ; + opacity: 0.6; + text-align: center; +} +.action a, .action a:hover { + height: 16px; + padding-left: 20px; +} + +.delete a, .delete a:hover { + background: url('deleter.png') left no-repeat; + color: red; +} + +.reactivate a, .reactivate a:hover { + background: url('reactivate.png') left no-repeat; + color: white; +} + +#bill-form > fieldset { + margin-top: 10px; +} diff --git a/budget/static/pen.png b/budget/static/pen.png deleted file mode 100644 index f486e40e73a3e304f29728ea42308f37d95167b0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3912 zcmV-O54Z4%P)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN{S}1|}gUOHJxc?wV3fxuz+mJ4`!F$IZ;mqRrNsHJd##*D~ju=bP7?-?v~|cv>vB zsJ6IeNwVZxrdjT`yl#bBIa#GxRa#xMMy;K#CDyyGyQdMSxlWT#tDe?p!?5wT$+oGt z8L;Kp2HUQ-ZMJ=3XJQ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ydScYWDd^H$FH0SJ%~FxG;E zm<*u)>roUY%>1nDW}vkLDJAObrz~%1nELy{!G3RSY@`^+<9|-mWRH~Uu;*pg&Yjcr z)ftVAXAA9xd$ZYW=UAx(DGAmxB+=vnK~T3XN#dQ3;}w+B#B5g(iAR-k?g_*4@oKfY z-&*rKrF4hqWo}YR?*{npFbYTG@!FbvkbhNc4Iuz26|A*a2k`x1o1>i%3!*l*cD1qQ zqqSPJJ4xal%zRKv8G2q8T05Tvcn34z%*=7MT3HS7ekB#8l<@rwi2etF*3JUQaeift zIcNpMd44=H2oS8frJ2rK*sanc^-^0R|il^ z!5Gs3paLLa20YJ$HN-1AQo$$3~(kTtq~t-Wyu=b#-9os~bY4 zG^{n}Unhd#x*iFM0e%v*&Jm%Z

lLbkdTn=QjK8Pfg(f~vj;LS-AKM+OXT4wvQ5CWM@4%w^^W_z++9{o0emjN;1 zBlBWxd!7f+aUe*5?SH?9?`{-AJS2qJABL3{X1uMnhU0i3k`Mx`k|chvRtpyq$^Hvx zyJ9f|L<0FBfDi<6r6_hB?>{!#*^cA>K}z*QDdj$9t_qUV!S;)3ntUe=tKS9i{6y`) zQa7~L2y(d#H)FzU=w7mc+00W)Kc=-)2Vjhu^GOoNX_~wMhy(8(zV|C4LOuwfq zfD4&#z>Jvy=KwJz1kPS;<77`iX}|}+W;Yt}?*RbrT {% if balance[member.id] > 0 %}+{% endif %}{{ balance[member.id] }} - {% if member.activated %}{{ _("delete") }}{% else %}{{ _("reactivate") }}{% endif %} + {% if member.activated %} + {{ _("delete") }} + {% else %} + {{ _("reactivate") }} + {% endif %} {% endif %} {% endfor %} @@ -130,7 +135,7 @@ {{ "%0.2f"|format(bill.amount) }} ({{ "%0.2f"|format(bill.pay_each()) }} {{ _("each") }}) - + diff --git a/budget/web.py b/budget/web.py index 715a223..31c2ced 100644 --- a/budget/web.py +++ b/budget/web.py @@ -18,7 +18,7 @@ are directly handled in the forms module. Basically, this blueprint takes care of the authentication and provides some shortcuts to make your life better when coding (see `pull_project` -and `add_project_id` for a quick overview +and `add_project_id` for a quick overview) """ main = Blueprint("main", __name__)