Moved to high charts.

This commit is contained in:
James Cole
2014-07-15 06:58:08 +02:00
parent 6e7ea89c70
commit 0e09e52e45
26 changed files with 2055 additions and 85 deletions

View File

@@ -1,6 +1,6 @@
<table class="table table-bordered table-striped">
<tr>
<th style="width:25px;">&nbsp;</th>
<th>&nbsp;</th>
<th style="width:30%;">Name</th>
<th>Current balance</th>
</tr>

View File

@@ -7,6 +7,24 @@
<small>What's playing?</small>
@endif
</h1>
<form role="form" class="form-horizontal">
<div class="input-group">
<?php $r = Session::get('range','1M');?>
<span class="input-group-btn input-group-btn">
<button name="range" value="1D" class="btn btn-default @if($r=='1D') btn-info @endif btn-sm" type="submit">1D</button>
<button name="range" value="1W" class="btn btn-default @if($r=='1W') btn-info @endif btn-sm" type="submit">1W</button>
<button name="range" value="1M" class="btn btn-default @if($r=='1M') btn-info @endif btn-sm" type="submit">1M</button>
<button name="range" value="3M" class="btn btn-default @if($r=='3M') btn-info @endif btn-sm" type="submit">3M</button>
<button name="range" value="6M" class="btn btn-default @if($r=='6M') btn-info @endif btn-sm" type="submit">6M</button>
</span>
<input value="{{Session::get('start')->format('Y-m-d')}}" name="start" type="date" style="width:15%;" class="form-control input-sm">
<input value="{{Session::get('end')->format('Y-m-d')}}" name="end" type="date" style="width:15%;" class="form-control input-sm">
<button class="btn btn-default btn-sm @if($r=='custom') btn-info @endif" type="submit" name="range" value="custom">Custom</button>
</div>
</form>
</div>
</div>
@if($count == 0)
@@ -39,8 +57,7 @@
<div class="row">
@foreach($accounts as $index => $account)
<div class="col-lg-6">
<h4>{{{$account->name}}} chart</h4>
<div id="chart_{{{$account->id}}}" data-id="{{{$account->id}}}" class="homeChart" data-title="{{{$account->name}}}"></div>
<div id="chart_{{{$account->id}}}" data-id="{{{$account->id}}}" style="width:100%;" class="homeChart" data-title="{{{$account->name}}}"></div>
<p>
Go to <a href="#" title="Overview for {{{$account->name}}}">{{{$account->name}}}</a>
</p>
@@ -60,7 +77,7 @@
@include('transactions.journals',['journals' => $account->transactionList])
</div>
@if($index % 2 == 1)
</div><div class="row" style="border-top:1px #eee solid;">
</div><div class="row">
@endif
@endforeach
</div>
@@ -80,16 +97,13 @@
<!-- Beneficiaries, categories and budget pie charts: -->
<div class="row">
<div class="col-lg-4 col-sm-6 col-md-6">
<h4>Beneficiaries</h4>
<div id="beneficiaryChart"></div>
<div style="width:80%;margin:0 auto;" id="beneficiaryChart"></div>
</div>
<div class="col-lg-4 col-sm-6 col-md-6">
<h4>Categories</h4>
<div id="categoryChart"></div>
<div style="width:80%;margin:0 auto;" id="categoryChart"></div>
</div>
<div class="col-lg-4 col-sm-6 col-md-6">
<h4>Budgets</h4>
<div id="budgetChart"></div>
<div style="width:80%;margin:0 auto;" id="budgetChart"></div>
</div>
</div>
<br /><br /><br /><br /><br />
@@ -99,7 +113,6 @@
@stop
@section('scripts')
<script src="https://www.google.com/jsapi"></script>
<script src="assets/javascript/charts.js"></script>
<script src="assets/javascript/index.js"></script>
<script src="assets/javascript/highcharts.js"></script>
<script src="assets/javascript/index.new.js"></script>
@stop

View File

@@ -9,6 +9,7 @@
<!-- Bootstrap -->
<link href="assets/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="assets/css/site.css" rel="stylesheet">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
@@ -28,6 +29,7 @@
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="assets/bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" src="assets/javascript/bootstrap3-typeahead.min.js"></script>
@yield('scripts')
</body>
</html>

View File

@@ -9,13 +9,15 @@
</div>
</div>
<!-- form -->
{{Form::open(['class' => 'form-horizontal'])}}
<!-- home screen accounts -->
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12">
<h3>Home screen accounts</h3>
<p class="text-info">Which accounts should be displayed on the home page?</p>
<!-- form -->
{{Form::open(['class' => 'form-horizontal'])}}
@foreach($accounts as $account)
<div class="form-group">
<div class="col-sm-10">
@@ -31,15 +33,74 @@
</div>
</div>
@endforeach
<div class="form-group">
<div class="col-sm-12">
<button type="submit" class="btn btn-default">Save accounts</button>
</div>
</div>
</form>
</div>
</div>
<!-- home screen accounts -->
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12">
<h3>Home view range</h3>
<p class="text-info">By default, Firefly will show you one month of data.</p>
<div class="radio">
<label>
<input type="radio" name="viewRange" value="1D" @if($viewRange == '1D') checked @endif>
One day
</label>
</div>
<div class="radio">
<label>
<input type="radio" name="viewRange" value="1W" @if($viewRange == '1W') checked @endif>
One week
</label>
</div>
<div class="radio">
<label>
<input type="radio" name="viewRange" value="1M" @if($viewRange == '1M') checked @endif>
One month
</label>
</div>
<div class="radio">
<label>
<input type="radio" name="viewRange" value="3M" @if($viewRange == '3M') checked @endif>
Three months
</label>
</div>
<div class="radio">
<label>
<input type="radio" name="viewRange" value="6M" @if($viewRange == '6M') checked @endif>
Six months
</label>
</div>
</div>
</div>
<!-- submit button -->
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12">
<h3>Submit</h3>
<div class="form-group">
<div class="col-sm-12">
<button type="submit" class="btn btn-default">Save settings</button>
</div>
</div>
</div>
</div>
<!-- form close -->
{{Form::close()}}
@stop
@section('scripts')
@stop

View File

@@ -0,0 +1,106 @@
@extends('layouts.default')
@section('content')
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12">
<h1>Firefly
<small>Add a new withdrawal</small>
</h1>
</div>
</div>
<div class="row">
<div class="col-lg-6 col-md-12 col-sm-12">
<p class="text-info">
Technically speaking, withdrawals, deposits and transfers are all transactions, moving money from
account <em>A</em> to account <em>B</em>.
</p>
<p class="text-info">
A withdrawal is when you spend money on something, moving an amount to a <em>beneficiary</em>.
</p>
</div>
</div>
{{Form::open(['class' => 'form-horizontal'])}}
<div class="row">
<div class="col-lg-6 col-md-12 col-sm-12">
<h4>Mandatory fields</h4>
<div class="form-group">
<label for="account" class="col-sm-4 control-label">Description</label>
<div class="col-sm-8">
<input type="text" name="description" value="{{{Input::old('description')}}}" autocomplete="off" class="form-control" placeholder="Description" />
</div>
</div>
<div class="form-group">
<label for="account" class="col-sm-4 control-label">Account</label>
<div class="col-sm-8">
{{Form::select('account_id',$accounts,Input::old('account_id'),['class' => 'form-control'])}}
</div>
</div>
<div class="form-group">
<label for="account" class="col-sm-4 control-label">Beneficiary</label>
<div class="col-sm-8">
<input type="text" name="beneficiary" value="{{{Input::old('beneficiary')}}}" autocomplete="off" class="form-control" placeholder="Beneficiary" />
<span class="help-block">This field will auto-complete your existing beneficiaries (if any), but you can type freely to create new ones.</span>
</div>
</div>
<div class="form-group">
<label for="account" class="col-sm-4 control-label">Amount spent</label>
<div class="col-sm-8">
<input type="number" min="0.01" step="any" class="form-control" />
</div>
</div>
<div class="form-group">
<label for="account" class="col-sm-4 control-label">Date</label>
<div class="col-sm-8">
<input type="date" class="form-control" />
</div>
</div>
<div class="form-group">
<label for="account" class="col-sm-4 control-label">&nbsp;</label>
<div class="col-sm-8">
<input type="submit" name="submit" value="Create withdrawal" class="btn btn-info" />
</div>
</div>
</div>
<div class="col-lg-6 col-md-12 col-sm-12">
<h4>Optional fields</h4>
<div class="form-group">
<label for="account" class="col-sm-4 control-label">Budget</label>
<div class="col-sm-8">
<select class="form-control">
<option>1</option>
</select>
<span class="help-block">Select one of your budgets to make this transaction a part of it.</span>
</div>
</div>
<div class="form-group">
<label for="account" class="col-sm-4 control-label">Category</label>
<div class="col-sm-8">
<input type="text" name="category" value="" autocomplete="off" class="form-control" placeholder="Category" />
<span class="help-block">Add more fine-grained information to this transaction by entering a category.
Like the beneficiary-field, this field will auto-complete existing categories but can also be used
to create new ones.
</span>
</div>
</div>
</div>
@stop
@section('scripts')
<script type="text/javascript" src="assets/javascript/withdrawal.js"></script>
@stop