Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rewrote the iphone controllers and views to use the new jQTouch libra…
…ry. UI works much better and faster now. [#28]
- Loading branch information
Jonathan Hoyt
authored and
Jonathan Hoyt
committed
Apr 12, 2009
1 parent
a90c2a5
commit 3b2e009
Showing
39 changed files
with
772 additions
and
189 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,43 @@ | ||
<div class="toolbar"> | ||
<h1 id="pageTitle"></h1> | ||
<a id="backButton" class="button" href="#">Back</a> | ||
<a id="blueButton" class="button" href="/iphone/" target="_self">Home</a> | ||
<div id="home" selected="true"> | ||
<div class="toolbar"> | ||
<h1>Suite</h1> | ||
</div> | ||
<ul class="edgetoedge"> | ||
<li><a href="#client_search">Clients</a></li> | ||
<li><a href="/iphone/tickets">Tickets</a></li> | ||
<li><a href="#device_search">Devices</a></li> | ||
<li><a href="/iphone/sentries">Sentries</a></li> | ||
</ul> | ||
</div> | ||
<ul id="home" title="Suite" selected="true"> | ||
<li><a href="#_/iphone/clients/">Clients</a></li> | ||
<li><a href="#_/iphone/tickets/">Tickets</a></li> | ||
<li><a href="#_/iphone/devices/">Devices</a></li> | ||
</ul> | ||
|
||
<% form_tag "/iphone/clients", :method => "get", :class => "panel", :title => "Client Search", :id => "client_search" do %> | ||
<div class="toolbar"> | ||
<h1>Client Search</h1> | ||
<a class="back button" href="#home">Home</a> | ||
</div> | ||
<div class="pad"> | ||
<fieldset> | ||
<div class="row"> | ||
<label>Name</label> | ||
<%= text_field_tag :q %> | ||
</div> | ||
</fieldset> | ||
<input type="submit" /> | ||
</div> | ||
<% end %> | ||
<% form_tag "/iphone/devices", :method => "get", :class => "panel", :title => "Device Search", :id => "device_search" do %> | ||
<div class="toolbar"> | ||
<h1>Device Search</h1> | ||
<a class="back button" href="#home">Home</a> | ||
</div> | ||
<div class="pad"> | ||
<fieldset> | ||
<div class="row"> | ||
<label>Query:</label> | ||
<%= text_field_tag :q %> | ||
</div> | ||
</fieldset> | ||
</div> | ||
<input type="submit" /> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,12 @@ | ||
<% if @clients.length == 0 %> | ||
<% form_tag "/iphone/clients", :method => "get", :class => "panel", :title => "Search", :selected => "true" do %> | ||
<fieldset> | ||
<div class="row"> | ||
<label>Name:</label> | ||
<%= text_field_tag :q %> | ||
</div> | ||
</fieldset> | ||
<input name="commit" type="submit" value="Search" /> | ||
<% end %> | ||
<% else %> | ||
<ul id="searchResults" title="Results" selected="true"> | ||
<div id="clients"> | ||
<div class="toolbar"> | ||
<h1>Search Results</h1> | ||
<a class="back button" href="#client_search">Back</a> | ||
<a class="button" id="infoButton" href="#home">Home</a> | ||
</div> | ||
<ul class="edgetoedge"> | ||
<% @clients.each do |client| %> | ||
<li><a href="#_/iphone/clients/<%= client.id %>"><%= client.lastfirst %></a></li> | ||
<li><a href="/iphone/clients/<%= client.id %>"><%= client.lastfirst %></a></li> | ||
<% end %> | ||
</ul> | ||
<% end %> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,58 @@ | ||
<div class="panel client" title="Client"> | ||
<div id="client<%= @client.id.to_s %>" class="panel client"> | ||
<div class="toolbar"> | ||
<h1>Client</h1> | ||
<a class="back button" href="#">Back</a> | ||
<a class="button" id="infoButton" href="#home">Home</a> | ||
</div> | ||
<div id="clientHeader"> | ||
<%= image_tag @client.mugshot.url(:avatar) %> | ||
<h2 id="fullname"><%= @client.fullname %></h2> | ||
<h3 id="company"><%= @client.company_name %></h3> | ||
</div> | ||
<% if @client.phones.length != 0 || @client.emails.length != 0 || @client.addresses.length != 0 %> | ||
<fieldset> | ||
<% if @client.phones.length != 0 %> | ||
<% @client.phones.each do |phone| %> | ||
<div class="row"> | ||
<label><%= phone.context %>:</label> | ||
<span><a href="tel:<%= phone.number %>"><%= phone.number %></a></span> | ||
</div> | ||
<div class="pad"> | ||
<% if @client.phones.length != 0 || @client.emails.length != 0 || @client.addresses.length != 0 %> | ||
<fieldset class="ss"> | ||
<% if @client.phones.length != 0 %> | ||
<% @client.phones.each do |phone| %> | ||
<div class="row"> | ||
<label><%= phone.context %>:</label> | ||
<span><a href="tel:<%= phone.number %>"><%= phone.number %></a></span> | ||
</div> | ||
<% end %> | ||
<% end %> | ||
<% end %> | ||
<% if @client.emails.length != 0 %> | ||
<% @client.emails.each do |email| %> | ||
<div class="row"> | ||
<label><%= email.context %>:</label> | ||
<span class="overflow"><a href="mailto:<%= email.address %>"><%= email.address %></a></span> | ||
</div> | ||
<% if @client.emails.length != 0 %> | ||
<% @client.emails.each do |email| %> | ||
<div class="row"> | ||
<label><%= email.context %>:</label> | ||
<span><a href="mailto:<%= email.address %>"><%= email.address[0..20] %></a></span> | ||
</div> | ||
<% end %> | ||
<% end %> | ||
<% end %> | ||
<% if @client.addresses.length != 0 %> | ||
<% @client.addresses.each do |address| %> | ||
<div class="row"> | ||
<label><%= address.context %>:</label> | ||
<span class="overflow"><a href="http://maps.google.com/maps?q=<%= address.full_address %>"><%= address.full_address %></a></span> | ||
</div> | ||
<% if @client.addresses.length != 0 %> | ||
<% @client.addresses.each do |address| %> | ||
<div class="row"> | ||
<label><%= address.context %>:</label> | ||
<span><a href="http://maps.google.com/maps?q=<%= address.full_address %>"><%= address.full_address[0..20] %></a></span> | ||
</div> | ||
<% end %> | ||
<% end %> | ||
</fieldset> | ||
<% end %> | ||
</fieldset> | ||
<% end %> | ||
<% if @client.note != nil && @client.note != "" %> | ||
<h2>Notes</h2> | ||
<div class="textbox"> | ||
<%= textile_to_html(@client.note) %> | ||
</div> | ||
<% end %> | ||
<% if @client.tickets.length != 0 %> | ||
<a href="#_/iphone/clients/<%= @client.id %>/tickets" class="grayButton">Tickets</a> | ||
<% end %> | ||
<br /> | ||
<% if @client.devices.length != 0 %> | ||
<a href="#_/iphone/clients/<%= @client.id %>/devices" class="grayButton">Devices</a> | ||
<% end %> | ||
<% if @client.note != nil && @client.note != "" %> | ||
<h2>Notes</h2> | ||
<div class="textbox"> | ||
<%= textile_to_html(@client.note) %> | ||
</div> | ||
<% end %> | ||
<% if @client.tickets.length != 0 %> | ||
<a href="/iphone/clients/<%= @client.id %>/tickets" class="grayButton">Tickets</a> | ||
<% end %> | ||
<br /> | ||
<% if @client.devices.length != 0 %> | ||
<a href="/iphone/clients/<%= @client.id %>/devices" class="grayButton">Devices</a> | ||
<% end %> | ||
</div> | ||
|
||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,37 @@ | ||
<div class="panel device" title="Device"> | ||
<fieldset> | ||
<div class="row"> | ||
<label>sTag:</label> | ||
<span><%= @device.service_tag %></span> | ||
</div> | ||
<div class="row"> | ||
<label>Name:</label> | ||
<span><%= @device.name %></span> | ||
</div> | ||
<div class="row"> | ||
<label>Type:</label> | ||
<span><%= @device.device_type.description %></span> | ||
</div> | ||
<div class="row"> | ||
<label>Client:</label> | ||
<span><a href="#_/iphone/clients/<%= @device.client.id %>"><%= @device.client.fullname[0..20] %>...</a></span> | ||
</div> | ||
</fieldset> | ||
<% if @device.description != nil && @device.description != "" %> | ||
<h2>Description</h2> | ||
<div class="textbox"> | ||
<%= textile_to_html(@device.description) %> | ||
</div> | ||
<% end %> | ||
<div id="device" class="panel"> | ||
<div class="toolbar"> | ||
<h1>Device</h1> | ||
<a class="back button" href="#">Back</a> | ||
<a class="button" id="infoButton" href="#home">Home</a> | ||
</div> | ||
<div class="pad"> | ||
<fieldset class="ss"> | ||
<div class="row"> | ||
<label>sTag:</label> | ||
<span><%= @device.service_tag %></span> | ||
</div> | ||
<div class="row"> | ||
<label>Name:</label> | ||
<span><%= @device.name %></span> | ||
</div> | ||
<div class="row"> | ||
<label>Type:</label> | ||
<span><%= @device.device_type.description %></span> | ||
</div> | ||
<div class="row"> | ||
<label>Client:</label> | ||
<span><a href="/iphone/clients/<%= @device.client.id %>"><%= @device.client.fullname[0..20] %>...</a></span> | ||
</div> | ||
</fieldset> | ||
<% if @device.description != nil && @device.description != "" %> | ||
<h2>Description</h2> | ||
<div class="textbox"> | ||
<%= textile_to_html(@device.description) %> | ||
</div> | ||
<% end %> | ||
<% if @device.tickets.length != 0 %> | ||
<a href="#_/iphone/devices/<%= @device.id %>/tickets" class="grayButton">Tickets</a> | ||
<% end %> | ||
<% if @device.tickets.length != 0 %> | ||
<a href="/iphone/devices/<%= @device.id %>/tickets" class="grayButton">Tickets</a> | ||
<% end %> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,37 @@ | ||
<% if @tickets.length == 0 %> | ||
<ul id="ticketHome" class="tickets" title="Tickets" selected="true"> | ||
<li><a href="#_/iphone/tickets/?status=open&scope=user">Open Tickets <%= totals_helper(:open) %></a></li> | ||
<li><a href="#_/iphone/tickets/?status=scheduled&scope=user">Scheduled Tickets <%= totals_helper(:scheduled) %></a></li> | ||
<li><a href="#_/iphone/tickets/?status=completed&scope=user">Completed Tickets <%= totals_helper(:completed) %></a></li> | ||
<li><a href="#_/iphone/tickets/?status=all">All Tickets <%= totals_helper(:all) %></a></li> | ||
</ul> | ||
<% else %> | ||
<ul id="ticketList" title="<%= params[:status] != nil ? params[:status].capitalize : "Tickets" %>" selected="true"> | ||
<% @tickets.each do |ticket| %> | ||
<li> | ||
<a href="#_/iphone/tickets/<%= ticket.id %>"> | ||
<span><%= ticket.description %></span> | ||
<table> | ||
<tr><td>Client:</td><td><%= ticket.client.fullname[0..20] %></td></tr> | ||
<tr><td>Tech:</td><td><%= ticket.technician.name %></td></tr> | ||
<tr><td>Status:</td><td><%= ticket.status %></td></tr> | ||
</table> | ||
</a> | ||
</li> | ||
<% end %> | ||
</ul> | ||
<% end %> | ||
<div id="tickets_by_status"> | ||
<div class="toolbar"> | ||
<h1>Tickets</h1> | ||
<a class="back button" href="#">Home</a> | ||
</div> | ||
<ul class="edgetoedge"> | ||
<li><a href="/iphone/tickets/?status=open">Open Tickets <%= totals_helper(:open) %></a></li> | ||
<li><a href="/iphone/tickets/?status=scheduled">Scheduled Tickets <%= totals_helper(:scheduled) %></a></li> | ||
<li><a href="/iphone/tickets/?status=completed">Completed Tickets <%= totals_helper(:completed) %></a></li> | ||
<li><a href="/iphone/tickets/?status=all&scope=all">All Tickets <%= totals_helper(:all) %></a></li> | ||
</ul> | ||
</div> | ||
<% else %> | ||
<div id="tickets"> | ||
<div class="toolbar"> | ||
<h1>Tickets</h1> | ||
<a class="back button" href="#">Back</a> | ||
<a class="button" href="#home">Home</a> | ||
</div> | ||
<ul class="edgetoedge"> | ||
<% @tickets.each do |ticket| %> | ||
<li> | ||
<a href="/iphone/tickets/<%= ticket.id %>"> | ||
<span class="description"><%= ticket.description %></span> | ||
<table> | ||
<tr><td>Client:</td><td><%= ticket.client.fullname[0..20] %></td></tr> | ||
<tr><td>Tech:</td><td><%= ticket.technician.name %></td></tr> | ||
<tr><td>Status:</td><td><%= ticket.status %></td></tr> | ||
</table> | ||
</a> | ||
</li> | ||
<% end %> | ||
</ul> | ||
</div> | ||
<% end %> | ||
|
Oops, something went wrong.