Permalink
Browse files

first!

  • Loading branch information...
0 parents commit 34b9d04eea59a6d034d04fa14d75e6d7b7eb85c6 @abrons abrons committed Oct 14, 2009
@@ -0,0 +1,2 @@
+require File.dirname(__FILE__) + '/demo'
+run Sinatra::Application
@@ -0,0 +1,6 @@
+require 'sinatra'
+
+get '/' do
+ redirect '/index.html'
+end
+
@@ -0,0 +1,12 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+ <head>
+ <script src="http://getangular.com/angular-1.0a.js#database=samples" type="text/javascript"></script>
+ </head>
+ <body>
+ Quantity: <input type="text" name="a">
+ *
+ Cost: <input type="text" name="b">
+ = {{a * b | currency}}
+ </body>
+</html>
@@ -0,0 +1,25 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <script src="http://getangular.com/angular-1.0a.js#database=samples" type="text/javascript"></script>
+ </head>
+ <body style="background-color: #DDDDDD;">
+ <div ng-init="dataPie = {title:'Title', series:[{label:['A','a'], values:[75,25]}, {label:['B','b'], values:[25, 75]}]}"></div>
+ <div ng-init="data = {title:['Title','Sub'], series:[{label:'A', color:'FF0000', values:[15,25]}, {label:'B', color:'00FF00', values:[25, 5]}]}"></div>
+ <h1>Google Charts</h1>
+ <h2>Pie</h2>
+ {{ dataPie | chart.pie:300:100 }}
+ {{ dataPie | chart.pie3d:300:100 }}
+ {{ dataPie | chart.pieConcentric:300:100 }}
+
+ <h2>Bars</h2>
+ {{ data | chart.barHorizontalStacked }}
+ {{ data | chart.barHorizontalGrouped }}
+ {{ data | chart.barVerticalGrouped }}
+ {{ data | chart.barVerticalGrouped }}
+ <h2>Line</h2>
+ {{ data | chart.line }}
+ <h2>Scatter</h2>
+ {{ data | chart.scatter }}
+ </body>
+</html>
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <title>Angular Tech Talk Demos</title>
+ <link rel="stylesheet" href="site.css" type="text/css" media="screen" title="no title" charset="utf-8">
+ </head>
+ <body class="home">
+ <h1>Angular Concepts</h1>
+ <ul>
+ <li>Binding: <a href="Calculator.html">Calculator</a></li>
+ <li>Persistence: <a href="persistence/PersonList.html">Basic persistent list of people</a></li>
+ <li>Charts: <a href="charts/charts.html">Example of charts</a></li>
+ </ul>
+ <h1>Angular Sample Applications</h1>
+ <ul>
+ <li><a href="invoice/index.html">Invoice</a></li>
+ <li><a href="task/index.html">Task List</a></li>
+ <li><a href="phonebook/index.html">Phone Book</a></li>
+ </ul>
+ </body>
+</html>
@@ -0,0 +1,59 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+ <head>
+ <title>All Invoices</title>
+ <script src="http://getangular.com/angular-1.0a.js#database=samples" type="text/javascript"></script>
+ <link href="style.css" rel="stylesheet" type="text/css" />
+</head>
+<body ng-entity="customer=Customer" ng-init="customers = Customer.all()">
+ <div id="body">
+
+ <h1>Customers Detail: {{customer.name}}</h1>
+ [ <a href="#">Add Customer</a> ] [ <a href="index.html">List Invoices</a> ]
+ <table border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td>Name:</td>
+ <td><input name="customer.name" /></td>
+ </tr>
+ <tr>
+ <td>Address:</td>
+ <td><input name="customer.address1" /></td>
+ </tr>
+ <tr>
+ <td>&nbsp;</td>
+ <td><input name="customer.address2"/></td>
+ </tr>
+ <tr>
+ <td>Phone</td>
+ <td><input name="customer.phone" ng-validate="phone"/></td>
+ </tr>
+ <tr>
+ <td>Email</td>
+ <td><input name="customer.email" ng-validate="email"/></td>
+ </tr>
+ <tr>
+ <td>Website</td>
+ <td><input name="customer.website" ng-validate="url"/></td>
+ </tr>
+ <tr>
+ <td>&nbsp;</td>
+ <td><input type="submit" value="save"/></td>
+ </tr>
+ </table>
+
+
+ <h1>All Customers</h1>
+ <table width="100%" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <th scope="col">Customer</th>
+ <th scope="col">Address</th>
+ </tr>
+ <tr ng-repeat="customer in customers">
+ <td class="content"><a href="#customer={{customer.$id}}">{{customer.name}}</a></td>
+ <td class="content">{{customer.address1}} <br/> {{customer.address2}}</td>
+ </tr>
+ </table>
+ </div>
+ <div align="center">[ <a href="..">index</a> ] </div>
+</body>
+</html>
@@ -0,0 +1,129 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ <script src="http://getangular.com/angular-1.0a.js#database=samples" type="text/javascript"></script>
+ <title>Invoice Application</title>
+ <link href="style.css" rel="stylesheet" type="text/css" />
+</head>
+
+<body ng-entity="invoice=Invoice:{items:[{}]}; Customer" ng-init="customers = Customer.all()">
+<div id="body">
+[ <a href="index.html">List All Invoices</a> ]
+ <h1>Invoice# {{invoice.no}}</h1>
+ <div ng-eval="customer = customers.findById(invoice.customerId)" style="float: left;">
+ <b>Ship To:</b><br/>
+ {{customer.name}}<br/>
+ {{customer.address1}}<br/>
+ {{customer.address2}}<br/>
+ </div>
+<p class="fields">Invoice#
+ <input type="text" name="invoice.no"/>
+ <br />
+ PO:
+ <input type="text" name="invoice.po"/>
+ <br />
+ Date :
+ <input class="date" type="text" name="invoice.date" ng-widget="datepicker"/> <br/>
+ Ship To: <select name="invoice.customerId">
+ <option value="">-- Select Customer --</option>
+ <option ng-repeat="customer in customers" value="{{customer.$id}}">{{customer.name}}</option>
+ </select>
+ {{cu}}
+</p>
+<table cellspacing="0" cellpadding="3" width="100%">
+ <tr>
+ <th class="content" scope="col">Qty</th>
+ <th width="100%" scope="col">Description</th>
+ <th scope="col">Unit Cost</th>
+ <th scope="col">Discount %</th>
+ <th scope="col">Price</th>
+ <td scope="col"><input type="button" ng-action="invoice.items.add()" value="+"/>
+ &nbsp;</td> </tr>
+ <tr ng-repeat="item in invoice.items">
+ <td class="content"><input name="item.qty" size="4" value="1"></td>
+ <td width="100%" class="content"><input name="item.description" size="20" style="width:98%;"></td>
+ <td class="content"><input name="item.cost" size="10"></td>
+ <td class="content"><input name="item.discount" size="10" value="0"></td>
+ <td class="content">{{item.price = (1-item.discount/100) * (item.qty * item.cost)|currency}}</td>
+ <td><input type="button" ng-action="invoice.items.remove(item)" value="X"/></td>
+ </tr>
+
+ <tr>
+ <td colspan="4">Sub Total:</td>
+ <td class="content">{{invoice.subTotal = invoice.items.sum('price')|currency}}</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td colspan="4">Tax:
+ <input name="invoice.taxRate" size="4"/>
+ %</td>
+ <td class="content">{{invoice.tax = invoice.taxRate / 100 * invoice.subTotal|currency}}</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td colspan="4">Total:</td>
+ <td class="content">{{invoice.total = invoice.subTotal + invoice.tax|currency}}</td>
+ <td></td>
+ </tr>
+</table>
+<p>Options: {{invoice.options}}<br />
+ <select name="invoice.options" size="3" multiple="multiple">
+ <option value="gift">Gift wrap</option>
+ <option value="padding">Extra padding</option>
+ <option value="expedite">Expedite</option>
+ </select>
+</p>
+<ul>
+ <li>Shipped on:<span class="content">
+ <input name="invoice.shipped" size="10" id="invoice.shipped" />
+ </span>Tracking #<span class="content">
+ <input name="invoice.tracking" size="20" id="invoice.tracking" />
+ </span>
+ Track: {{invoice.tracking|trackPackage}}
+ <li>Received on:<span class="content">
+ <input name="invoice.recived" size="10" id="invoice.recived" />
+ </span>
+ by
+ <span class="content">
+ <input name="invoice.receivedBy" size="10" />
+ </span>
+ <ul>
+ <li>
+ <input name="invoice.reciveStatus" type="radio" value="accepted"/>
+ {{invoice.receivedBy}} has accepted the package</li>
+ <li>
+ <input type="radio" name="invoice.reciveStatus" value="rejected" />
+ {{invoice.receivedBy}} has rejected the package due to:
+ <ul>
+ <li>
+ <input name="invoice.rejectDamage" type="checkbox" value="damage"/>
+ Damage.
+ </li>
+ <li>
+ <input name="invoice.rejectIncomplete" type="checkbox" value="incomplete"/>
+ Incomplete.
+ </li>
+ </ul>
+ </li>
+ </ul>
+ </li>
+ <li>Paid on:<span class="content">
+ <input name="invoice.paid" size="10" id="item.paid" />
+ </span>check# <span class="content">
+ <input name="invoice.checkNo" size="5" id="item.checkNo" />
+ </span></li>
+ </ul>
+ Notes: <br />
+ <textarea name="invoice.notes" rows="5"></textarea>
+ <div style="float: right;">
+ {{$window.location|qrcode}}
+ </div>
+ <p>Notes: {{invoice.notes}}</p>
+ <p>&nbsp;</p>
+ <p>Thank you for your business...</p>
+ <input type="submit" value="Save" />
+ <input type="reset" value="Revert" />
+</div>
+</body>
+</html>
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+ <head>
+ <title>All Invoices</title>
+ <script src="http://getangular.com/angular-1.0a.js#database=samples" type="text/javascript"></script>
+ <link href="style.css" rel="stylesheet" type="text/css" />
+</head>
+<body ng-entity="Invoice;Customer" ng-init="invoices = Invoice.all();customers = Customer.all()">
+ <div id="body">
+
+ <h1>Invoices</h1>
+ <table width="100%" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <th scope="col">Seq</th>
+ <th scope="col">Invoice #</th>
+ <th scope="col">Customer</th>
+ <th scope="col">Date</th>
+ <th scope="col">Total</th>
+ </tr>
+ <tr ng-repeat="invoice in invoices">
+ <th scope="row">{{$index + 1}}</th>
+ <td class="content"><a href="Invoice.html#invoice={{invoice.$id}}">{{invoice.no}}</a></td>
+ <td class="content">{{customers.findById(invoice.customerId).name}}</td>
+ <td class="content">{{invoice.date}}</td>
+ <td class="content">{{invoice.total|currency}}</td>
+ </tr>
+ <tr>
+ <td>( <a href="Invoice.html">Create Invoice</a> )</td>
+ <td colspan="3">Total:</td>
+ <td>{{invoices.sum('total')|currency}}</td>
+ </tr>
+ </table>
+ [ <a href="Customers.html">Customers</a> ]
+ </div>
+ <div align="center">[ <a href="..">index</a> ] </div>
+</body>
+</html>
@@ -0,0 +1,35 @@
+h1 {
+ background-color: #000000;
+ color: #FFFFFF;
+ text-align: right;
+}
+body {
+ background-color:#CCCCCC;
+}
+
+#body {
+ background-color:white;
+ width: 700px;
+ margin-left: auto;
+ margin-right: auto;
+ padding-top: 20px;
+ padding-right: 40px;
+ padding-bottom: 40px;
+ padding-left: 40px;
+}
+
+td {
+ text-align:right;
+}
+
+td.content, th {
+ border: 1px solid #000000;
+}
+
+textarea {
+ width: 100%;
+}
+
+.fields {
+ text-align:right;
+}
@@ -0,0 +1,23 @@
+<html>
+ <head>
+ <title>Spike!</title>
+ <script src="http://getangular.com/angular-1.0a.js#database=samples" type="text/javascript"></script>
+ </head>
+ <body style="display:none;" ng-entity="person=Person">
+ <h1>Person</h1>
+ <p>[ <a href="PersonList.html">List All People</a> ]</p>
+ First: <input type="text" name="person.firstName"><br>
+ Last: <input type="text" name="person.lastName"><br>
+ Skill:
+ [ <a href="#" ng-action="person.skills.add()">Add Skill</a> ]
+ <ul>
+ <li ng-repeat="skill in person.skills">
+ <input type="text" name="skill.name"> [ <a href="#" ng-action="person.skills.remove(skill)">X</a> ]
+ </li>
+ </ul>
+ <br>
+ <input type="submit" value="Save"/>
+ <hr>
+ <pre>{{person}}</pre>
+ </body>
+</html>
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+ <head>
+ <title>All People</title>
+ <script src="http://getangular.com/angular-1.0a.js#database=samples" type="text/javascript"></script>
+ </head>
+ <body ng-entity="Person" ng-init="persons = Person.all()">
+ <h1>People</h1>
+ <p>[ <a href="Person.html">Add Person</a> ]</p>
+<ul>
+ <li ng-repeat="person in persons">{{person.firstName}} {{person.lastName}} [<a href="Person.html#person={{person.$id}}">edit</a> | <a href="#" ng-action="person.$delete()">delete</a>]</li>
+ </ul>
+ <p align="right">[ <a href="..">index</a> ]</p>
+ <hr>
+ <pre>{{persons}}</pre>
+</body>
+</html>
Oops, something went wrong.

0 comments on commit 34b9d04

Please sign in to comment.