Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/rdutra/slinters
Browse files Browse the repository at this point in the history
  • Loading branch information
jrgonzalez committed Sep 12, 2012
2 parents 73fac7b + 48e16e3 commit 1f237b6
Show file tree
Hide file tree
Showing 7 changed files with 70 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
<div class="dashboard_main">
<div class="dashboard_single">

</div>
<div class="dashboard-left">
DASHBOARD !!!
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
</div>
<div class="menu_top">
<ul class="top_menu_ul">
<li class="menu-item"><a href="#" id="home"> Home </a></li>
<li class="menu-item"><a href="#" id="new_transact"> New Transaction</a></li>
<li class="menu-item"> Lorem Ipsum</li>
<li class="menu-item"> Lorem Ipsum</li>
<li class="menu-item"><a href="#" id="transact_list"> Transaction History</a></li>
<li class="menu-item"> Lorem Ipsum</li>
</ul>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<div class="transaction_table">
<table class="transact_tbl">
<thead>
<tr>
<th>Date</th>
<th>Concept</th>
<th>Entity</th>
<th>Amount</th>
<th>Description</th>
</tr>
</thead>
<tbody id="transact_table_bdy">
<tr>
<td> Hola</td>
<td> hola</td>
</tr>
<tr>
<td> Hola</td>
<td> hola</td>
</tr>
</tbody>
</table>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,17 @@ class Slinters.Views.ProfilePageView extends Backbone.View

# the events hash does not work because it's called before the view has rendered :S
events: {
"click #new_transact" : "render_transact"
"click #new_transact" : "render_transact",
"click #transact_list" : "render_list"
}

render_transact: ->
trs = new Slinters.Views.TransactionView
trs.render()

render_list: ->
trsl = new Slinters.Views.TransactionListView
trsl.render()

render_report: ->

Expand All @@ -22,5 +27,6 @@ class Slinters.Views.ProfilePageView extends Backbone.View
$('#bottom_bar').html @.template_bottom
# Binding of events manually
$('#new_transact').click @.render_transact
$('#transact_list').click @.render_list


Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ class Slinters.Views.TransactionView extends Backbone.View
template: JST["backbone/templates/transaction/new_transaction"]

render: ->
$('.dashboard_single').html ''
$('.dashboard-left').html @.template #@model.toJSON()
$('#transaction_submit').click @.submit_transaction

Expand Down Expand Up @@ -42,3 +43,10 @@ class Slinters.Views.TransactionView extends Backbone.View
response = eval(data)
alert('entered successfully')

class Slinters.Views.TransactionListView extends Backbone.View
template: JST["backbone/templates/transaction/transaction_list_big"]

render: ->
$('.dashboard_single').html @.template
$('.dashboard-left').html ''
$('.dashboard-right').html ''
3 changes: 3 additions & 0 deletions app/assets/stylesheets/dashboard.css.sass
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,7 @@
.dashboard-right
float: right
width: 50%

.dashboard_single
padding: 20px

24 changes: 24 additions & 0 deletions app/assets/stylesheets/transaction.css.sass
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,27 @@
.transaction_submit:active
position: relative
top: 1px

table.transact_tbl
float: left
border-width: 2px
border-spacing: 1px
border-style: none
border-color: red
border-collapse: collapse
background-color: rgb(255, 250, 250)

table.transact_tbl th
border-width: 2px
padding: 4px
border-style: inset
border-color: blue
background-color: rgb(250, 240, 230)
-moz-border-radius: 6px

table.transact_tbl td
border-width: 2px
padding: 4px
border-style: inset
border-color: blue
background-color: rgb(250, 240, 230)

0 comments on commit 1f237b6

Please sign in to comment.