Skip to content
Browse files

Add barcode app

  • Loading branch information...
1 parent 7d7b7ab commit ab8ad1a7547683654acbc8af989e443ddaa9045b Brian Moore committed Aug 5, 2010
Showing with 2,045 additions and 0 deletions.
  1. +28 −0 bars/Rakefile
  2. +23 −0 bars/app/Scanner/index.erb
  3. +7 −0 bars/app/Scanner/scanner.rb
  4. +29 −0 bars/app/Scanner/scanner_controller.rb
  5. +75 −0 bars/app/Settings/controller.rb
  6. +17 −0 bars/app/Settings/home.bb.erb
  7. +23 −0 bars/app/Settings/home.erb
  8. +32 −0 bars/app/Settings/index.bb.erb
  9. +46 −0 bars/app/Settings/index.erb
  10. +35 −0 bars/app/Settings/login.bb.erb
  11. +31 −0 bars/app/Settings/login.erb
  12. +15 −0 bars/app/Settings/reset.bb.erb
  13. +18 −0 bars/app/Settings/reset.erb
  14. +3 −0 bars/app/Settings/wait.bb.erb
  15. +5 −0 bars/app/Settings/wait.erb
  16. +24 −0 bars/app/Signature/edit.bb.erb
  17. +23 −0 bars/app/Signature/edit.erb
  18. +21 −0 bars/app/Signature/index.bb.erb
  19. +31 −0 bars/app/Signature/index.erb
  20. +24 −0 bars/app/Signature/new.bb.erb
  21. +22 −0 bars/app/Signature/new.erb
  22. +21 −0 bars/app/Signature/show.bb.erb
  23. +19 −0 bars/app/Signature/show.erb
  24. +8 −0 bars/app/Signature/signature.rb
  25. +36 −0 bars/app/Signature/signature_controller.rb
  26. +12 −0 bars/app/application.rb
  27. +108 −0 bars/app/helpers/application_helper.rb
  28. +18 −0 bars/app/helpers/browser_helper.rb
  29. +26 −0 bars/app/index.bb.erb
  30. +29 −0 bars/app/index.erb
  31. +25 −0 bars/app/layout.erb
  32. +11 −0 bars/app/loading.html
  33. +7 −0 bars/app/test/scanner_spec.rb
  34. +7 −0 bars/app/test/signature_spec.rb
  35. +18 −0 bars/build.yml
  36. BIN bars/icon/icon.ico
  37. BIN bars/icon/icon.png
  38. +296 −0 bars/public/css/android.css
  39. +115 −0 bars/public/css/blackberry.css
  40. +382 −0 bars/public/css/iphone.css
  41. +41 −0 bars/public/css/webkit.css
  42. +212 −0 bars/public/css/windows_mobile.css
  43. +21 −0 bars/public/images/IUI_LICENSE.txt
  44. BIN bars/public/images/android/btn_check_off.png
  45. BIN bars/public/images/android/btn_check_on.png
  46. BIN bars/public/images/android/btn_radio_off.png
  47. BIN bars/public/images/android/btn_radio_on.png
  48. BIN bars/public/images/android/disclosure.png
  49. BIN bars/public/images/android/ic_menu_more.png
  50. BIN bars/public/images/backButton.png
  51. BIN bars/public/images/blueButton.png
  52. BIN bars/public/images/cancel.png
  53. BIN bars/public/images/grayButton.png
  54. BIN bars/public/images/iphone/disclosure.png
  55. BIN bars/public/images/iphone/disclosure_detail.png
  56. BIN bars/public/images/iphone/radiobutton.png
  57. BIN bars/public/images/iphone/select.png
  58. BIN bars/public/images/iphone/switch.png
  59. BIN bars/public/images/iui-logo-touch-icon.png
  60. BIN bars/public/images/listArrow.png
  61. BIN bars/public/images/listArrowDown.png
  62. BIN bars/public/images/listArrowSel.png
  63. BIN bars/public/images/listGroup.png
  64. BIN bars/public/images/loading.gif
  65. BIN bars/public/images/pinstripes.png
  66. BIN bars/public/images/right_button.png
  67. BIN bars/public/images/selection.png
  68. BIN bars/public/images/thumb.png
  69. BIN bars/public/images/toggle.png
  70. BIN bars/public/images/toggleOn.png
  71. BIN bars/public/images/toolButton.png
  72. BIN bars/public/images/toolButton_new.png
  73. BIN bars/public/images/toolbar.png
  74. BIN bars/public/images/whiteButton.png
  75. +1 −0 bars/public/js/application.js
  76. +4 −0 bars/public/js/rho.js
  77. +59 −0 bars/public/js/rhogeolocation-wm.js
  78. +11 −0 bars/public/js/rhogeolocation.js
  79. +26 −0 bars/rhoconfig.txt
View
28 bars/Rakefile
@@ -0,0 +1,28 @@
+require 'yaml'
+
+unless File.exists? "build.yml"
+ puts "Cannot find build.yml"
+ exit 1
+end
+
+
+$app_config = YAML::load_file("build.yml")
+$app_path = File.expand_path(File.dirname(__FILE__))
+
+if ENV["RHO_HOME"].nil?
+ rakefilepath = "#{$app_config["sdk"]}/Rakefile"
+else
+ rakefilepath = "#{ENV["RHO_HOME"]}/Rakefile"
+end
+
+unless File.exists? rakefilepath
+ puts "\nCannot find your Rhodes gem or source path."
+ puts "\nIf you have the sdk on your path or have installed the gem this"
+ puts "can be resolved by running 'set-rhodes-sdk'"
+ puts "\nYou can also set this manually by modifying your build.yml or"
+ puts "setting the environment variable RHO_HOME"
+ exit 1
+end
+
+load rakefilepath
+
View
23 bars/app/Scanner/index.erb
@@ -0,0 +1,23 @@
+<div id="pageTitle">
+ <h1>Scanners</h1>
+</div>
+
+<div id="toolbar">
+ <div id="leftItem" class="regularButton"><%= link_to "Home", Rho::RhoConfig.start_path %></div>
+ <div id="rightItem" class="regularButton"><%= link_to "New", :controller => :Scanner, :action => :new %></div>
+</div>
+
+<div id="content">
+ <ul>
+ <% if System::get_property('has_camera') %>
+
+ <li>
+ <a href="<%= url_for :action => :new %>">
+ <span class="title">Scan Barcode</span>
+ <span class="disclosure_indicator"></span>
+ </a>
+ </li>
+
+ <% end %>
+ </ul>
+</div>
View
7 bars/app/Scanner/scanner.rb
@@ -0,0 +1,7 @@
+# The model has already been created by the framework, and extends Rhom::RhomObject
+# You can add more methods here
+class Scanner
+ include Rhom::PropertyBag
+
+ #add model specifc code here
+end
View
29 bars/app/Scanner/scanner_controller.rb
@@ -0,0 +1,29 @@
+require 'rho/rhocontroller'
+require 'helpers/browser_helper'
+
+class ScannerController < Rho::RhoController
+ include BrowserHelper
+
+ #GET /Scanner
+ def index
+ end
+
+ # GET /Scanner/new
+ def new
+ Camera::take_picture(url_for :action => :camera_callback)
+ redirect :action => :index
+ end
+
+ def show_barcode_info(recognized_code)
+ Alert.show_popup('Barcode['+recognized_code+']')
+ end
+
+ def camera_callback
+ WebView.navigate(url_for :action => :index)
+ barcode = Barcode::barcode_recognize(Rho::RhoApplication::get_blob_path(@params['image_uri']))
+ show_barcode_info(barcode)
+ ""
+ end
+
+
+end
View
75 bars/app/Settings/controller.rb
@@ -0,0 +1,75 @@
+require 'rho'
+require 'rho/rhocontroller'
+require 'rho/rhoerror'
+require 'helpers/browser_helper'
+
+class SettingsController < Rho::RhoController
+ include BrowserHelper
+
+ def index
+ @msg = @params['msg']
+ render
+ end
+
+ def login
+ @msg = @params['msg']
+ render :action => :login, :back => '/app'
+ end
+
+ def login_callback
+ errCode = @params['error_code'].to_i
+ if errCode == 0
+ # run sync if we were successful
+ WebView.navigate Rho::RhoConfig.options_path
+ SyncEngine.dosync
+ else
+ if errCode == Rho::RhoError::ERR_CUSTOMSYNCSERVER
+ @msg = @params['error_message']
+ end
+
+ if !@msg || @msg.length == 0
+ @msg = Rho::RhoError.new(errCode).message
+ end
+
+ WebView.navigate ( url_for :action => :login, :query => {:msg => @msg} )
+ end
+ end
+
+ def do_login
+ if @params['login'] and @params['password']
+ begin
+ SyncEngine.login(@params['login'], @params['password'], (url_for :action => :login_callback) )
+ render :action => :wait
+ rescue Rho::RhoError => e
+ @msg = e.message
+ render :action => :login
+ end
+ else
+ @msg = Rho::RhoError.err_message(Rho::RhoError::ERR_UNATHORIZED) unless @msg && @msg.length > 0
+ render :action => :login
+ end
+ end
+
+ def logout
+ SyncEngine.logout
+ @msg = "You have been logged out."
+ render :action => :login
+ end
+
+ def reset
+ render :action => :reset
+ end
+
+ def do_reset
+ Rhom::Rhom.database_full_reset
+ SyncEngine.dosync
+ @msg = "Database has been reset."
+ redirect :action => :index, :query => {:msg => @msg}
+ end
+
+ def do_sync
+ SyncEngine.dosync
+ @msg = "Sync has been triggered."
+ redirect :action => :index, :query => {:msg => @msg}
+ end
+end
View
17 bars/app/Settings/home.bb.erb
@@ -0,0 +1,17 @@
+<div id="pageTitle">
+ <h1>Home</h1>
+</div>
+
+<div id="toolbar">
+ <% if SyncEngine::logged_in > 0 %>
+ <%= link_to "Logout", :action => :logout %>
+ <% else %>
+ <%= link_to "Login", :action => :login %>
+ <% end %>
+</div>
+
+<div id="content">
+ <ul>
+ <li>Add links here...</li>
+ </ul>
+</div>
View
23 bars/app/Settings/home.erb
@@ -0,0 +1,23 @@
+<div id="pageTitle">>
+ <h1>Home</h1>
+</div>
+
+<div id="toolbar">
+ <div id="leftItem" class="blueButton"><%%= link_to "Sync", :action => :do_sync %></div>
+ <%% if SyncEngine::logged_in > 0 %>
+ <div id="rightItem" class="regularButton"><%%= link_to "Logout", :action => :logout %></div>
+ <%% else %>
+ <div id="rightItem" class="regularButton"><%%= link_to "Login", :action => :login %></div>
+ <%% end %>
+</div>
+
+<div id="content">
+ <ul>
+ <li>
+ <a href="#">
+ <span class="title">Add Links Here...</span>
+ <span class="disclosure_indicator"></span>
+ </a>
+ </li>
+ </ul>
+</div>
View
32 bars/app/Settings/index.bb.erb
@@ -0,0 +1,32 @@
+<div id="pageTitle">
+ <h1>Settings</h1>
+</div>
+
+<div id="content">
+ <% if @msg %>
+ <div class="alert" align="center"><%= @msg %></div>
+ <% end %>
+
+ <ul>
+ <li>
+ <p>Client ID: <span class="cid"><%= Rhom::Rhom::client_id %></span></p>
+ </li>
+ <li>
+ <%= link_to "Reset Database", :action => :reset %>
+ </li>
+ <li>
+ <%= link_to "Sync", :action => :do_sync %>
+ </li>
+
+ <% if SyncEngine::logged_in > 0 %>
+ <li>
+ <%= link_to "Logout", :action => :logout %>
+ </li>
+ <% else %>
+ <li>
+ <%= link_to "Login", :action => :login %>
+ </li>
+ <% end %>
+ </ul>
+
+</div>
View
46 bars/app/Settings/index.erb
@@ -0,0 +1,46 @@
+<div id="pageTitle">
+ <h1>Settings</h1>
+</div>
+
+<div id="toolbar"></div>
+
+<div id="content">
+ <ul id="settings">
+ <% if @msg %>
+ <li class="alertMessage">
+ <span class="message"><%= @msg %></span>
+ </li>
+ <% end %>
+ <li>
+ <div class="itemLabel">
+ <span class="title">Client ID:</span>
+ </div>
+ <div class="itemValue">
+ <span class="clientID"><%= Rhom::Rhom::client_id %></span>
+ </div>
+ </li>
+ <li>
+ <a href="<%= url_for :action => :reset %>">
+ <span class="title">Reset Database</span>
+ </a>
+ </li>
+ <li>
+ <a href="<%= url_for :action => :do_sync %>">
+ <span class="title">Perform Sync</span>
+ </a>
+ </li>
+ <% if SyncEngine::logged_in > 0 %>
+ <li>
+ <a href="<%= url_for :action => :logout %>">
+ <span class="title">Logout</span>
+ </a>
+ </li>
+ <% else %>
+ <li>
+ <a href="<%= url_for :action => :login %>">
+ <span class="title">Login</span>
+ </a>
+ </li>
+ <% end %>
+ </ul>
+</div>
View
35 bars/app/Settings/login.bb.erb
@@ -0,0 +1,35 @@
+<div id="pageTitle">
+ <h1>Login</h1>
+</div>
+
+<div id="toolbar">
+ <%= link_to "Back", :action => :index %>
+</div>
+
+<div id="content">
+ <form method="POST" action="<%= url_for :action => :do_login %>">
+
+ <% if @msg %>
+ <div class="alert" align="center"><%= @msg %></div>
+ <% end %>
+
+ <table>
+
+ <tr>
+ <td width="125" class="fieldLabel">Login</td>
+ <td><input type="text" maxlength="100" name="login"/></td>
+ </tr>
+
+ <tr>
+ <td width="125" class="fieldLabel">Password</td>
+ <td><input type="password" maxlength="100" name="password"/></td>
+ </tr>
+ </table>
+
+ <input type="submit" class="standardButton" value="Login" />
+ </form>
+</div>
+
+
+
+
View
31 bars/app/Settings/login.erb
@@ -0,0 +1,31 @@
+<div id="pageTitle">
+ <h1>Login</h1>
+</div>
+
+
+<div id="toolbar">
+ <div id="leftItem" class="regularButton"><%= link_to "Cancel", :action => :index %></div>
+</div>
+
+
+
+<div id="content">
+ <form method="POST" action="<%= url_for :action => :do_login %>">
+
+ <% if @msg %>
+ <p style="color:#ff0000"><%= @msg %></p>
+ <% end %>
+ <ul>
+ <li>
+ <label for="login" class="fieldLabel">Login</label>
+ <input type="text" name="login" <%= placeholder( "Login" ) %> />
+ </li>
+
+ <li>
+ <label for="password" class="fieldLabel">Password</label>
+ <input type="password" name="password" <%= placeholder( "Password" ) %> />
+ </li>
+ </ul>
+ <input type="submit" class="standardButton" value="Login" />
+ </form>
+</div>
View
15 bars/app/Settings/reset.bb.erb
@@ -0,0 +1,15 @@
+<div id="pageTitle">
+ <h1>Reset Database</h1>
+</div>
+
+<div id="toolbar">
+ <%= link_to "Confirm", :action => :do_reset %>
+ <%= link_to "Cancel", Rho::RhoConfig.options_path %>
+</div>
+
+<div id="content">
+ <div class="warning">
+ <h2>Are you sure?</h2>
+ <p> Resetting removes all objects from your device.</p>
+ </div>
+</div>
View
18 bars/app/Settings/reset.erb
@@ -0,0 +1,18 @@
+<div id="pageTitle">
+ <h1>Reset Database</h1>
+</div>
+
+
+
+<div id="toolbar">
+ <div id="leftItem" class="regularButton"><%= link_to "Cancel", :action => :index %></div>
+ <div id="rightItem" class="blueButton"><%= link_to "Confirm", :action => :do_reset %></div>
+</div>
+
+
+<div id="content">
+ <div id="reset">
+ <h4>Are you sure?<br/>
+ Resetting removes all objects from your device.</h4>
+ </div>
+</div>
View
3 bars/app/Settings/wait.bb.erb
@@ -0,0 +1,3 @@
+<div id="pageTitle">
+ <h1>Wait</h1>
+</div>
View
5 bars/app/Settings/wait.erb
@@ -0,0 +1,5 @@
+<div id="pageTitle">
+ <h1>Wait</h1>
+</div>
+
+<div id="toolbar"></div>
View
24 bars/app/Signature/edit.bb.erb
@@ -0,0 +1,24 @@
+<div id="pageTitle">
+ <h1>Edit <%= @signature.foo%></h1>
+</div>
+
+<div id="toolbar">
+ <%= link_to "Back", :action => :show, :id => @signature.object %>
+ <%= link_to "Delete", :action => :delete, :id => @signature.object %>
+</div>
+
+
+<div id="content">
+ <form method="POST" action="<%= url_for :action => :update %>">
+ <input type="hidden" name="id" value="<%= @signature.object %>"/>
+ <table>
+
+ <tr>
+ <td class="itemLabel">Foo: </td>
+ <td class="itemValue"><input type="text" name="signature[foo]" value="<%= @signature.foo %>"/></td>
+ </tr>
+
+ </table>
+ <input type="submit" class="standardButton" value="Update" />
+ </form>
+</div>
View
23 bars/app/Signature/edit.erb
@@ -0,0 +1,23 @@
+<div id="pageTitle">
+ <h1>Edit <%= @signature.foo%></h1>
+</div>
+
+<div id="toolbar">
+ <div id="leftItem" class="backButton"><%= link_to "Cancel", :action => :show, :id => @signature.object %></div>
+ <div id="rightItem" class="regularButton"><%= link_to "Delete", :action => :delete, :id => @signature.object %></div>
+</div>
+
+<div id="content">
+ <form method="POST" action="<%= url_for :action => :update %>">
+ <input type="hidden" name="id" value="<%= @signature.object %>"/>
+ <ul>
+
+ <li>
+ <label for="signature[foo]" class="fieldLabel">Foo</label>
+ <input type="text" name="signature[foo]" value="<%= @signature.foo%>" <%= placeholder( "Foo" ) %> />
+ </li>
+
+ </ul>
+ <input type="submit" class="standardButton" value="Update" />
+ </form>
+</div>
View
21 bars/app/Signature/index.bb.erb
@@ -0,0 +1,21 @@
+<div id="pageTitle">
+ <h1>Signatures</h1>
+</div>
+
+
+<div id="toolbar">
+ <%= link_to "New", :action => :new %>
+ <%= link_to "Home", RhoConfig::start_path %>
+</div>
+
+<div id="content">
+ <table>
+ <tr>
+ <% @signatures.each do |obj| %>
+
+ <td class="recordLabel"><%= link_to "#{obj.foo}", :action => :show, :id => obj.object %></td>
+
+ <% end %>
+ </tr>
+ </table>
+</div>
View
31 bars/app/Signature/index.erb
@@ -0,0 +1,31 @@
+<div id="pageTitle">
+ <h1>Signatures</h1>
+</div>
+
+<div id="toolbar">
+ <div id="leftItem" class="regularButton"><%= link_to "Home", Rho::RhoConfig.start_path %></div>
+ <div id="rightItem" class="regularButton"><%= link_to "New", :controller => :Signature, :action => :new %></div>
+</div>
+
+<div id="content">
+ <ul>
+ <li>
+ <a href="<%= url_for :action => :new %>">
+ <span class="title">Capture Sig</span>
+ <span class="disclosure_indicator"></span>
+ </a>
+ </li>
+ <% @signatures.each do |obj| %>
+ <li>
+ <img src="<%=obj.signature_uri%>" width="300px"></img>
+ </li>
+ <li>
+ <a href="<%= url_for :action => :delete, :id => obj.object %>">
+ <span class="title">Delete above signature</span>
+ <span class="disclosure_indicator"></span>
+ </a>
+ </li>
+
+ <% end %>
+ </ul>
+</div>
View
24 bars/app/Signature/new.bb.erb
@@ -0,0 +1,24 @@
+<div id="pageTitle">
+ <h1>New Signature</h1>
+</div>
+
+<div id="toolbar">
+ <%= link_to "Back", :action => :index %>
+</div>
+
+
+<div id="content">
+
+ <form method="POST" action="<%= url_for :action => :create %>">
+ <input type="hidden" name="id" value="<%= @signature.object %>"/>
+ <table>
+
+ <tr>
+ <td class="itemLabel">Foo: </td>
+ <td class="itemValue"><input type="text" name="signature[foo]"/></td>
+ </tr>
+
+ </table>
+ <input type="submit" class="standardButton" value="Create" />
+ </form>
+</div>
View
22 bars/app/Signature/new.erb
@@ -0,0 +1,22 @@
+<div id="pageTitle">
+ <h1>New <%= @signature.title %></h1>
+</div>
+
+<div id="toolbar">
+ <div id="leftItem" class="backButton"><%= link_to "Cancel", :action => :index %></div>
+</div>
+
+<div id="content">
+ <form method="POST" action="<%= url_for :action => :create %>">
+ <input type="hidden" name="id" value="<%= @signature.object %>"/>
+ <ul>
+
+ <li>
+ <label for="signature[foo]" class="fieldLabel">Foo</label>
+ <input type="text" name="signature[foo]" <%= placeholder( "Foo" ) %> />
+ </li>
+
+ </ul>
+ <input type="submit" class="standardButton" value="Create" />
+ </form>
+</div>
View
21 bars/app/Signature/show.bb.erb
@@ -0,0 +1,21 @@
+<div id="pageTitle">
+ <h1><%= @signature.foo%></h1>
+</div>
+
+<div id="toolbar">
+ <%= link_to "Back", :action => :index %>
+ <%= link_to "Edit", :action => :edit, :id => @signature.object %>
+</div>
+
+
+<div id="content">
+
+ <table>
+
+ <tr>
+ <td class="itemLabel">Foo</td>
+ <td class="itemValue"><%= @signature.foo%></td>
+ </tr>
+
+ </table>
+</div>
View
19 bars/app/Signature/show.erb
@@ -0,0 +1,19 @@
+<div id="pageTitle">
+ <h1><%= @signature.foo%></h1>
+</div>
+
+<div id="toolbar">
+ <div id="leftItem" class="backButton"><%= link_to "Back", :action => :index %></div>
+ <div id="rightItem" class="regularButton"><%= link_to "Edit", :action => :edit, :id => @signature.object %></div>
+</div>
+
+<div id="content">
+ <ul>
+
+ <li>
+ <div class="itemLabel">Foo</div>
+ <div class="itemValue"><%= @signature.foo%></div>
+ </li>
+
+ </ul>
+</div>
View
8 bars/app/Signature/signature.rb
@@ -0,0 +1,8 @@
+# The model has already been created by the framework, and extends Rhom::RhomObject
+# You can add more methods here
+class Signature
+ include Rhom::PropertyBag
+
+ #add model specifc code here
+ property :signature_uri, :blob
+end
View
36 bars/app/Signature/signature_controller.rb
@@ -0,0 +1,36 @@
+require 'rho/rhocontroller'
+require 'helpers/browser_helper'
+
+class SignatureController < Rho::RhoController
+ include BrowserHelper
+
+ #GET /Signature
+ def index
+ @signatures = Signature.find(:all)
+ render
+ end
+
+
+ # GET /Signature/new
+ def new
+ SignatureTool::take_signature(url_for :action => :signature_callback)
+ redirect :action => :index
+ end
+
+ def signature_callback
+ if @params['status'] == 'ok'
+ signature = Signature.new({'signature_uri' => @params['signature_uri']})
+ signature.save
+ end
+ WebView.navigate(url_for :action => :index)
+ ""
+ end
+
+
+ # POST /Signature/{1}/delete
+ def delete
+ @signature = Signature.find(@params['id'])
+ @signature.destroy if @signature
+ redirect :action => :index
+ end
+end
View
12 bars/app/application.rb
@@ -0,0 +1,12 @@
+require 'rho/rhoapplication'
+
+class AppApplication < Rho::RhoApplication
+ def initialize
+ # Tab items are loaded left->right, @tabs[0] is leftmost tab in the tab-bar
+ @tabs = nil
+
+ @@tabbar = nil
+ # Important to call super _after_ you define @tabs!
+ super
+ end
+end
View
108 bars/app/helpers/application_helper.rb
@@ -0,0 +1,108 @@
+module ApplicationHelper
+ def strip_braces(str=nil)
+ str ? str.gsub(/\{/,"").gsub(/\}/,"") : nil
+ end
+
+ def strike_if(str, condition=true)
+ condition ? "<s>#{str}</s>" : str
+ end
+
+ def display_blanks(value)
+ if blank?(value)
+ "---"
+ else
+ value
+ end
+ end
+
+ def blank?(value)
+ value.nil? || value == "" || value.length==0
+ end
+
+ def display_blankstr(value)
+ if blank?(value)
+ " "
+ else
+ value
+ end
+ end
+
+ def display_newline()
+ "<br>"
+ end
+
+ def display_space()
+ " "
+ end
+
+ def display_dollars(value)
+ if blank?(value)
+ " "
+ else
+ number = "$" + sprintf("%.2f", value)
+
+ # use a commify algorithm -- http://snippets.dzone.com/tag/commify
+ number.reverse!
+ number.gsub!(/(\d\d\d)(?=\d)(?!\d*\.)/, '\1,')
+ number.reverse!
+ end
+ end
+
+ def display_number(value)
+ if blank?(value)
+ " "
+ else
+ sprintf("%.2f", value)
+ end
+ end
+
+ def both_items_present?(value1, value2)
+ !blank?(value1) && !blank?(value2)
+ end
+
+ def replace_newlines(value)
+ if blank?(value)
+ " "
+ else
+ value.gsub('\n', ' ')
+ end
+ end
+
+ def format_address_for_mapping(street, city, state, zip, tagforurl)
+ # handle case where fields could be nil
+ mystreet = !street.nil? ? street : ""
+ mycity = !city.nil? ? city : ""
+ mystate = !state.nil? ? state : ""
+ myzip = !zip.nil? ? zip : ""
+
+ result = ""
+ if !tagforurl
+ # build up address string
+ result += (mystreet + ", ") if mystreet.length > 0
+ result += (mycity + ", ") if mycity.length > 0
+ result += (mystate + " ") if mystate.length > 0
+ result += myzip if myzip.length > 0
+ else
+ # need to URL encode data too
+ result += ("&street=" + Rho::RhoSupport.url_encode(mystreet)) if mystreet.length > 0
+ result += ("&city=" + Rho::RhoSupport.url_encode(mycity)) if mycity.length > 0
+ result += ("&state=" + Rho::RhoSupport.url_encode(mystate)) if mystate.length > 0
+ result += ("&zip=" + Rho::RhoSupport.url_encode(myzip)) if myzip.length > 0
+ end
+ # remove any extraneous characters that could interfere with proper address matching
+ result = replace_newlines(result)
+ end
+
+ def has_valid_mapping_address(street, city, state, zip)
+ # at a minimum, an address must have a state or a zip
+ (!state.nil? && state.length > 0) || (!zip.nil? && zip.length > 0)
+ end
+
+ def format_latlon_for_mapping(latitude, longitude)
+ result = ""
+ result += ("&latitude=" + Rho::RhoSupport.url_encode(latitude)) if latitude.length > 0
+ result += ("&longitude=" + Rho::RhoSupport.url_encode(longitude)) if longitude.length > 0
+ result
+ end
+
+end
View
18 bars/app/helpers/browser_helper.rb
@@ -0,0 +1,18 @@
+module BrowserHelper
+
+ def placeholder(label=nil)
+ "placeholder='#{label}'" if platform == 'apple'
+ end
+
+ def platform
+ System::get_property('platform').downcase
+ end
+
+ def selected(option_value,object_value)
+ "selected=\"yes\"" if option_value == object_value
+ end
+
+ def checked(option_value,object_value)
+ "checked=\"yes\"" if option_value == object_value
+ end
+end
View
26 bars/app/index.bb.erb
@@ -0,0 +1,26 @@
+<div id="pageTitle">
+ <h1>Bars</h1>
+</div>
+
+<div id="toolbar">
+ <%= link_to "Sync", :controller => :Settings, :action => :do_sync %>
+ <% if SyncEngine::logged_in > 0 %>
+ <%= link_to "Logout", :controller => :Settings, :action => :logout %>
+ <% else %>
+ <%= link_to "Login", :controller => :Settings, :action => :login %>
+ <% end %>
+</div>
+
+
+<div id="content">
+ <table>
+ <tr>
+ <td class="recordLabel">Add links here...</td>
+ </tr>
+ </table>
+</div>
+
+
+
+
+
View
29 bars/app/index.erb
@@ -0,0 +1,29 @@
+<div id="pageTitle">
+ <h1>Bars</h1>
+</div>
+
+<div id="toolbar">
+ <div id="leftItem" class="blueButton"><%= link_to "Sync", :controller => :Settings, :action => :do_sync %></div>
+ <% if SyncEngine::logged_in > 0 %>
+ <div id="rightItem" class="regularButton"><%= link_to "Logout", :controller => :Settings, :action => :logout %></div>
+ <% else %>
+ <div id="rightItem" class="regularButton"><%= link_to "Login", :controller => :Settings, :action => :login %></div>
+ <% end %>
+</div>
+
+<div id="content">
+ <ul>
+ <li>
+ <a href="Scanner">
+ <span class="title">Barcode Scanner</span>
+ <span class="disclosure_indicator"></span>
+ </a>
+ </li>
+ <li>
+ <a href="Signature">
+ <span class="title">Signature Capture</span>
+ <span class="disclosure_indicator"></span>
+ </a>
+ </li>
+ </ul>
+</div>
View
25 bars/app/layout.erb
@@ -0,0 +1,25 @@
+<!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">
+ <head>
+ <title>Bars</title>
+
+ <% if System::get_property('platform') == 'APPLE' %>
+ <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;"/>
+ <link href="/public/css/webkit.css" type="text/css" rel="stylesheet"/>
+ <link href="/public/css/iphone.css" type="text/css" rel="stylesheet"/>
+ <% elsif System::get_property('platform') == 'Blackberry' %>
+ <link href="/public/css/blackberry.css" type="text/css" rel="stylesheet"/>
+ <% elsif System::get_property('platform') == 'ANDROID' %>
+ <link href="/public/css/webkit.css" type="text/css" rel="stylesheet"/>
+ <link href="/public/css/android.css" type="text/css" rel="stylesheet"/>
+ <% else %>
+ <link href="/public/css/windows_mobile.css" type="text/css" rel="stylesheet"/>
+ <% end %>
+
+
+ </head>
+ <body>
+ <%= @content %>
+ </body>
+</html>
View
11 bars/app/loading.html
@@ -0,0 +1,11 @@
+<html>
+ <head>
+ <title>Home</title>
+ <meta name="viewport" content="initial-scale=1.0, width=device-width"/>
+ </head>
+ <body>
+ <div align="center">
+ <h3>Loading...</h3>
+ </div>
+ </body>
+</html>
View
7 bars/app/test/scanner_spec.rb
@@ -0,0 +1,7 @@
+describe "Scanner" do
+ #this test always fails, you really should have tests!
+
+ it "should have tests" do
+ true.should == false
+ end
+end
View
7 bars/app/test/signature_spec.rb
@@ -0,0 +1,7 @@
+describe "Signature" do
+ #this test always fails, you really should have tests!
+
+ it "should have tests" do
+ true.should == false
+ end
+end
View
18 bars/build.yml
@@ -0,0 +1,18 @@
+sdk: "/Users/brian/work/rhodes"
+sdkversion: 2.0.0
+name: bars
+version: 1.0
+vendor: rhomobile
+build: debug
+bbver: 4.6
+wmsdk: "Windows Mobile 6 Professional SDK (ARMV4I)"
+applog: rholog.txt
+iphone:
+ configuration: Debug
+ sdk: iphonesimulator4.0
+ provisionprofile:
+ codesignidentity:
+ entitlements:
+extensions: ["barcode"]
+capabilities:
+ - camera
View
BIN bars/icon/icon.ico
Binary file not shown.
View
BIN bars/icon/icon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
296 bars/public/css/android.css
@@ -0,0 +1,296 @@
+/* Common css */
+
+body {
+ margin: 0;
+ height: 100%;
+ width: inherit;
+ font-family: "Droid",sans-serif;
+ background: black;
+ color: white;
+}
+h1 {
+ font-size: 1em;
+}
+
+div#content {
+ background-color:black;
+ width: 100%;
+ padding:0;
+ margin:0;
+}
+
+/* Toolbar */
+
+div#toolbar {
+ height: 60px;
+ width: 100%;
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0.0, #2B2B2B),color-stop(0.2, #585858),color-stop(1.0, #2B2B2B));
+ display: table;
+ text-align: center;
+ border-spacing: 10px;
+}
+
+div#toolbar div#leftItem,
+div#toolbar div#centerItem,
+div#toolbar div#rightItem {
+ display: table-cell;
+}
+
+div#toolbar a {
+ line-height: 40px;
+ color: black;
+ display: block;
+}
+
+div#toolbar .deleteButton,
+div#toolbar .regularButton,
+div#toolbar .blueButton,
+div#toolbar .backButton {
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0.0, white),color-stop(0.5, #ccc), color-stop(1.0, #bdbebd));
+ -webkit-border-radius: 5px;
+ font-size: .9em;
+ border: 1px solid white;
+}
+
+
+/* Header */
+
+div#pageTitle {
+ height: 25px;
+ margin:0;
+ width: 100%;
+ display:none;
+}
+
+div#pageTitle h1 {
+ position: absolute;
+ top: 0;
+ text-align: left;
+ width: 100%;
+ margin: 0;
+ padding-left: 5px;
+ color: white;
+ text-shadow: 1px 1px 1px #000;
+ line-height: 25px;
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0.0, #999),color-stop(0.5, #848684));
+}
+
+
+/* lists */
+
+div#content ul {
+ background: black;
+}
+
+div#content ul li {
+ border-bottom: 1px solid #666;
+ font-size: 20px;
+}
+
+div#content ul li a {
+ display: block;
+ text-decoration: none;
+ color: white;
+ font-size: 20px;
+ height: 100%;
+ width: 100%;
+ padding: 15px 0 15px 0;
+ background:url("../images/android/disclosure.png") no-repeat center right;
+}
+
+div#content ul li a:hover {
+ background-color:#3399cc;
+}
+div#content ul li a img {
+ float: left;
+ height: 100%;
+ max-width: 100px;
+}
+
+div#content ul li span.title {
+ padding: 0 50px 0 10px;
+}
+
+div#content ul li span.disclosure_indicator {
+ display: none;
+}
+
+div#content ul li div.itemLabel {
+ float: left;
+ width: 45%;
+ padding: 15px 0 15px 10px;
+}
+
+div#content ul li div.itemValue {
+ float: right;
+ width: 45%;
+ padding: 15px 10px 15px 0;
+}
+
+
+/* Forms */
+
+div#content form button {
+ -webkit-appearance:push-button;
+ width: 300px;
+ height: 40px;
+ margin-left: 10px;
+}
+
+div#content form ul {
+ font-size: 20px;
+ list-style-type: none;
+ padding: 0;
+ margin: 0;
+}
+
+div#content form ul li {
+ border-bottom: 1px solid #666;
+ display: block;
+ list-style-type: none;
+}
+
+div#content form label {
+ float: left;
+ display:block;
+ color: white;
+ line-height: 64px;
+ padding: 0 10px 0 5px;
+ margin: 0;
+ width: 40%;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
+
+div#content h2 {
+ margin: 0;
+}
+
+div#content h2.groupTitle{
+ width:inherit;
+ margin: 0;
+ padding: 8px 0 8px 8px;
+ font-size:10px;
+ color:white;
+ background-color:#666;
+}
+div#content form {
+ background-color: black;
+ }
+div#content form input[type="checkbox"] {
+ -webkit-appearance: none;
+ background: url(/public/images/android/btn_check_off.png) no-repeat;
+ float: right;
+ height: 31px;
+ width: 31px;
+ margin-top:15px;
+ margin-right: 20px;
+}
+div#content form input[type="checkbox"]:checked {
+ background: url(/public/images/android/btn_check_on.png) no-repeat;
+ float: right;
+ height: 31px;
+ width: 31px;
+ margin-top:15px;
+ margin-right: 20px;
+}
+
+div#content form input[type="radio"] {
+ background: url(/public/images/android/btn_radio_off.png) no-repeat;
+ -webkit-appearance: none;
+ -webkit-box-sizing: border-box;
+ border: none;
+ height: 32px;
+ margin: 0px;
+ width: 32px;
+ float: right;
+ margin-right: 20px;
+ margin-top: 15px;
+}
+div#content form input[type="radio"]:checked {
+ background: url(/public/images/android/btn_radio_on.png) no-repeat;
+ margin-top:15px;
+ margin-right: 20px;
+}
+
+div#content form select {
+ -webkit-appearance: none;
+ border: 0px;
+ width: 100%;
+ padding-left: 20px;
+ height: 60px;
+ color:white;
+ background: url('/public/images/android/ic_menu_more.png') no-repeat center right;
+}
+
+div#content form textarea {
+ -webkit-appearance: none;
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0.0125, #d6d7d6),color-stop(0.25, #efefef),color-stop(0.95, #f7f7f7),color-stop(1.0, #f7f3f7));
+ border: 1px solid #d6d7d6;
+ -webkit-border-radius: 4px;
+ margin: 10px 0 2px 10px;
+ font-size: 0.9em;
+ padding: 5px 0 2px 2px;
+ box-shadow:0 -1px 3px #000000;
+}
+
+div#content form input[type="text"],
+div#content form input[type="password"] {
+ float: right;
+ height: 40px;
+ margin: 10px 10px 10px 0;
+ padding-left: 5px;
+ font-size:26px;
+ width: 150px;
+ -webkit-appearance: none;
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0.0125, #d6d7d6),color-stop(0.25, #efefef),color-stop(0.95, #f7f7f7),color-stop(1.0, #f7f3f7));
+ border: 1px solid #d6d7d6;
+ -webkit-border-radius: 4px;
+ box-shadow:0 -1px 3px #000000;
+}
+
+div#content form input.standardButton {
+ height: 45px;
+ margin: 2px 0 2px 0;
+ -webkit-border: 2px;
+ width:100%;
+}
+
+/* Settings */
+
+div#content ul#settings {
+ padding: 0;
+ margin: 0;
+}
+
+
+div#content div#reset h4 {
+ margin:20px;
+ color:white;
+}
+
+div#content div.standardButton {
+ margin: 10px 10px 10px 10px;
+ height: 45px;
+ width: 284px;
+ line-height: 45px;
+ -webkit-appearance:push-button;
+}
+
+div#content div.standardButton a {
+ display: block;
+ width: 100%;
+ color: black;
+ text-align: center;
+}
+
+div#content ul#settings li.alertMessage{
+ text-align: center;
+ height: 45px;
+ line-height:45px;
+}
+
+div#content ul#settings li.alertMessage span.message{
+ color: red;
+}
View
115 bars/public/css/blackberry.css
@@ -0,0 +1,115 @@
+/* bb main containers */
+body {
+ margin: 0;
+ font-family: Arial, Helvetica;
+ font-size:16px;
+ background: white;
+ color: black;
+ overflow-x: hidden;
+}
+
+div#pageTitle {
+ background: black;
+ width: auto;
+}
+
+div#pageTitle h1 {
+ margin: 0;
+ padding: 4px;
+ width: auto;
+ font-size: 16px;
+ max-height: 16px;
+ font-weight: normal;
+ text-align: left;
+ white-space: nowrap;
+ color: white;
+ font-weight: bold;
+}
+
+/*toolbar */
+div#toolbar{
+ border-bottom:1px solid lightgray;
+ height: 25px;
+ line-height: 25px;
+ padding-left: 4px;
+ width:100%;
+}
+
+div#toolbar .noButton {
+ display:hidden;
+}
+
+/*content div styling*/
+div#content h2 {
+ font-size:15px;
+ display:block;
+ margin:4px;
+}
+
+div#content h2.groupTitle{
+ background:black;
+ height:14px;
+ font-size:10px;
+ padding:5px;
+ border-bottom:1px solid lightgray;
+}
+
+div#content div.alert{
+ color:red;
+}
+
+div#content div.warning{
+ margin-left:4px;
+}
+
+div#content p{
+ font-size:14px;
+}
+
+/* bb table styles */
+
+div#content table {
+ display:block;
+ border:none;
+ border-spacing:0;
+ font-size: 80%;
+ width:100%;
+}
+
+div#content table th {
+ width:100%;
+ display: block;
+ border-bottom:1px solid #BBBBBB;
+}
+
+div#content table tr {
+ width:100%;
+}
+div#content table tr td {
+ margin:0;
+ border-bottom:1px solid lightgray;
+ height: 25px;
+ line-height:25px;
+}
+
+div#content table tr td a {
+ text-decoration: none;
+ font-weight:bold;
+ color:black;
+ display:block;
+ overflow: hidden;
+}
+
+div#content table tr td.recordLabel {
+ width:100%;
+ padding: 5px;
+}
+
+div#content table tr td.itemLabel {
+ width:50%;
+ font-weight:bold;
+}
+
+div#content table tr td.itemValue {
+ width:50%;
+}
View
382 bars/public/css/iphone.css
@@ -0,0 +1,382 @@
+/* Common css */
+
+body {
+ margin: 0;
+ font-family: Helvetica;
+}
+
+h1 {
+ font-size: 1.4em;
+}
+
+
+/* header */
+
+div#pageTitle h1 {
+ position: absolute;
+ text-align: center;
+ width: 100%;
+ margin: 0 auto 0 auto;
+ line-height: 50px;
+ color: white;
+ text-shadow: 1px 1px 1px #000;
+}
+
+
+/* toolbar */
+
+div#toolbar {
+ width: 100%;
+ height: 50px;
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0.0, #aebbcb),color-stop(0.5, #8094ae), color-stop(1.0, #6e84a2));
+}
+
+div#toolbar div {
+ position: absolute;
+ overflow: hidden;
+ text-align: center;
+}
+
+div#toolbar div#leftItem {
+ top: 10px;
+ left: 10px;
+ width: 50px;
+}
+
+div#toolbar div#centerItem {
+ bottom: 20px;
+ width:100%;
+ margin-left: 10px;
+ height: 30px;
+}
+
+div#toolbar div#rightItem {
+ top: 10px;
+ right: 10px;
+ width: 50px;
+}
+
+div#toolbar a {
+ color:white;
+ display: block;
+ line-height: 30px;
+}
+
+div#toolbar .backButton {
+ -webkit-border-bottom-left-radius: 16px 16px;
+ -webkit-border-bottom-right-radius: 6px 6px;
+ -webkit-border-image: url(/public/images/backButton.png) 0 5 0 13 stretch stretch;
+ -webkit-border-top-left-radius: 16px 16px;
+ -webkit-border-top-right-radius: 6px 6px;
+ border-width: 0 5px 0 13px;
+ width: auto;
+ font-size: .9em;
+ z-index: 3;
+}
+
+div#toolbar .deleteButton,
+div#toolbar .regularButton,
+div#toolbar .blueButton {
+ -webkit-border-radius: 5px;
+ overflow: hidden;
+ text-align: center;
+ width: auto;
+ height: 30px;
+ font-size: .9em;
+ border-left: #5e7088 1px solid;
+ border-right: #5e7088 1px solid;
+ border-top: #34404e 1px solid;
+ border-bottom: #34404e 1px solid;
+ padding: 0 2px 0 2px;
+}
+
+div#toolbar .deleteButton {
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0.0, #aebbcb),color-stop(0.5, #8094ae), color-stop(1.0, #6e84a2));
+}
+
+div#toolbar .regularButton {
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0.0, #92a4bc),color-stop(0.5, #476997), color-stop(1.0, #4e6c92));
+}
+
+div#toolbar .blueButton {
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0.0, #6f96e9),color-stop(0.5, #3366cc), color-stop(1.0, #3366cc));
+ border: #1a49b3 1px solid;
+}
+
+div#content {
+ background: url('/public/images/pinstripes.png');
+ min-height:480px;
+}
+
+div#content form button.createButton {
+ position: absolute;
+ bottom: 20px;
+ height: 35px;
+}
+
+div#content .standardButton {
+ -webkit-appearance: none;
+ -webkit-border-radius: 8px;
+ background: white;
+ color: #436395;
+ font-size: 15px;
+ font-weight: bold;
+ width:100%;
+ height: 40px;
+ border: 1px solid black;
+ margin-top:10px;
+}
+
+div#content .standardButton a {
+ display: block;
+ width: 100%;
+ color: #436395;
+ text-align: center;
+ line-height: 40px;
+}
+
+
+/* text styles */
+
+.darkBlue {
+ color:#7287A4;
+}
+
+div#content h2.groupTitle{
+ font-size:16px;
+ margin: 8px;
+ color:#565E70;
+}
+
+
+/* lists */
+
+div#content ul {
+ border-top: 1px solid #848284;
+ background-color: white;
+ margin-bottom:50px;
+}
+
+div#content ul li {
+ border-bottom: 1px solid #848284;
+ min-height: 40px;
+}
+
+div#content ul li a {
+ display: block;
+ color: black;
+ font-size: 20px;
+ height: 100%;
+ width: 100%;
+ padding: 15px 0 15px 0;
+}
+div#content ul li > span {
+ padding: 15px 0 15px 0;
+}
+
+div#content ul li a:hover {
+ background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgb(5, 140, 245)), to(rgb(1, 95, 230)));
+}
+
+div#content ul li span.title {
+ padding: 0 10px 0 10px;
+ font-size: 20px;
+ font-weight: bold;
+ display: inline;
+}
+
+div#content ul li div.itemLabel {
+ float: left;
+ width: 45%;
+ padding: 15px 0 15px 10px;
+}
+
+div#content ul li div.itemValue {
+ float: right;
+ width: 45%;
+ padding: 15px 10px 15px 0;
+}
+
+div#content ul li a span.disclosure_indicator {
+ background: url('/public/images/iphone/disclosure.png') no-repeat center right;
+ height: 25px;
+ width: 35px;
+ float: right;
+ margin-right: 10px;
+ display: inline;
+}
+
+div#content ul li a span.detail_disclosure {
+ background: url('/public/images/iphone/disclosure_detail.png') no-repeat center right;
+ height: 27px;
+ width: 34px;
+ float: right;
+ margin-right: 10px;
+ display: inline;
+}
+
+div#content ul li a img {
+ float: left;
+ height: 100%;
+ max-width: 100px;
+}
+
+
+/* Forms */
+
+div#content form {
+ padding: 5px 0 75px 0;
+ border: none;
+ width:300px;
+ margin:0 auto;
+ font-size: medium;
+}
+
+div#content form ul {
+ -webkit-border-radius: 8px;
+ background-color: white;
+ border: 1px solid #878787;
+ display: block;
+ font-size: 16px;
+ list-style-type: none;
+ margin: 0 auto 15px auto;
+ overflow: hidden;
+ padding: 0;
+}
+
+div#content form ul li {
+ display: block;
+ border-bottom: 1px solid #848284;
+ line-height: 40px;
+ min-height: 40px;
+ width: 300px;
+ overflow:hidden;
+}
+
+div#content form ul li:last-child {
+ border:none;
+}
+
+
+div#content form ul li label {
+ float: left;
+ display:block;
+ color: black;
+ line-height: 40px;
+ padding: 0;
+ margin: 0 20px 0 10px;
+ width: 40%;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ font-weight:bold;
+}
+
+div#content form ul li label.fieldLabel {
+ display:none;
+}
+
+div#content form input {
+ -webkit-appearance: none;
+ width: 45%;
+ border: 0;
+}
+
+div#content form input, div#content form select{
+ height:40px;
+ font-size: medium;
+ font-weight: bold;
+}
+
+div#content form input[type="text"], div#content form input[type="password"] {
+ width:289px;
+ background: transparent;
+ padding: 0 5px 0 10px;
+}
+
+div#content form input[type="checkbox"] {
+ background: url('/public/images/iphone/switch.png') no-repeat center;
+ background-position-y: -27px;
+ float: right;
+ display:block;
+ margin:7px 10px 7px 10px;
+ line-height:40px;
+ height: 27px;
+ width: 94px;
+}
+
+div#content form input[type="checkbox"]:checked {
+ background-position-y: 0;
+}
+
+div#content form input[type="radio"] {
+ position: relative;
+ display:block;
+ width:290px;
+ height: 40px;
+ line-height:40px;
+ margin:0;
+ -webkit-border-radius: 8px;
+}
+
+div#content form input[type="radio"]:checked {
+ background: url('/public/images/iphone/radiobutton.png') no-repeat;
+ background-position-x: 100%;
+ background-position-y: 50%;
+}
+
+div#content form select {
+ background: url('/public/images/iphone/select.png') no-repeat right;
+ border: 0px;
+ width:100%;
+}
+
+div#content form textarea {
+ -webkit-appearance: none;
+ border: none;
+ font-size: medium;
+ width:280px;
+ line-height:20px;
+}
+
+
+/* Settings */
+
+div#content ul#settings {
+ padding: 0;
+ margin: 0;
+}
+
+div#content ul#settings li.alertMessage{
+ text-align: center;
+}
+
+div#content ul#settings li span {
+ line-height:40px;
+}
+
+div#content ul#settings li.alertMessage span.message{
+ color: red;
+}
+
+div#content ul#settings li span.clientID{
+ margin-left:4px;
+ font-size:10px;
+}
+div#content ul#settings li div.itemLabel span.title{
+ padding: 0;
+ margin:0;
+}
+div#content div#reset {
+ height: 100%;
+ width:300px;
+ padding:10px;
+}
+
+div#content div#reset h4 {
+ width: 100%;
+ padding:0;
+ margin:0;
+ margin: 0 8px;
+ color:#565E70;
+}
View
41 bars/public/css/webkit.css
@@ -0,0 +1,41 @@
+/* Common CSS */
+
+a{
+ text-decoration:none;
+}
+
+div#content {
+ width: inherit;
+ height: 100%;
+}
+
+/* Toolbar */
+
+div#toolbar .noButton {
+ display:hidden;
+}
+
+
+/* Lists */
+
+div#content ul {
+ -webkit-padding-start: 0;
+ margin: 0;
+ padding:0;
+ list-style-type:none;
+}
+
+div#content ul li {
+ overflow:hidden;
+ clear:both;
+}
+
+div#content ul li span {
+ display:block;
+}
+
+
+div#content ul#settings li div.itemLabel span.title{
+ padding: 0;
+ margin:0;
+}
View
212 bars/public/css/windows_mobile.css
@@ -0,0 +1,212 @@
+body {
+ margin: 0;
+ width:100%;
+ height:100%;
+ font-family: tahoma;
+}
+
+/* page title */
+div#pageTitle {
+ display:none;
+}
+
+/* toolbar */
+div#toolbar {
+ width:100%;
+ height: 30px;
+ background: black;
+ border-bottom:1px solid gray;
+}
+div#toolbar a {
+ text-decoration:none;
+ color: white;
+ font-weight: bold;
+}
+
+div#toolbar div#leftItem,div#toolbar div#rightItem {
+ margin-top:6px;
+}
+div#toolbar div#leftItem {
+ float:left;
+ width: 40px;
+ margin-left:5px;
+}
+div#toolbar div#rightItem {
+ float:right;
+ text-align: right;
+ width: 40px;
+ margin-right:5px;
+}
+
+div#toolbar .noButton {
+ display:hidden;
+}
+
+
+/* content */
+div#content {
+ width: 100%;
+ height: 100%;
+ padding:0;
+ margin:0;
+}
+
+div#content h2.groupTitle{
+ width:inherit;
+ margin: 0;
+ padding: 4px;
+ margin:0;
+ font-size:10px;
+ color:white;
+ background-color:black;
+}
+
+
+/* Lists */
+div#content ul {
+ margin: 0;
+ padding: 0;
+ width: 100%;
+}
+
+div#content ul li {
+ list-style-type:none;
+ height: 30px;
+ width: 100%;
+ border-bottom: 1px solid black;
+ margin:0;
+ padding:0;
+ overflow: hidden;
+ clear:both;
+}
+
+div#content ul li a span.title {
+ margin: 0 5px 0 5px;
+ padding: 0;
+ font-size: 12px;
+ font-weight: bold;
+ line-height: 30px;
+ height: 30px;
+ display:block;
+}
+
+div#content ul li a {
+ text-decoration:none;
+ display:block;
+ color: black;
+ height:30px;
+ line-height:30px;
+}
+
+div#content ul li a span.disclosure_indicator {
+ display:none;
+ height:0;
+ visibility:hidden;
+}
+
+div#content ul li div {
+ width: 45%;
+ line-height:30px;
+ margin: 0 5px;
+}
+div#content ul li div.itemLabel {
+ float:left;
+ font-weight:bold;
+}
+div#content ul li div.itemValue {
+ float: right;
+ text-align:right;
+}
+
+
+/* Settings */
+
+div#content ul#settings li {
+ height:60px;
+}
+div#content ul#settings li div {
+ line-height:60px;
+ margin:0;
+}
+
+div#content ul#settings li span.clientID {
+ font-size:60%;
+ float:right;
+ display:block;
+ height:20px;
+}
+div#content ul#settings li.alertMessage{
+ text-align: center;
+}
+div#content ul#settings li.alertMessage span.message{
+ color: red;
+ line-height: 60px;
+}
+
+div#content ul#settings li div.itemLabel span.title {
+ padding-top:5px;
+}
+/* reset */
+div#content div#reset {
+ padding:10px;
+}
+
+/* forms */
+div#content form {
+ margin: 0;
+ padding:0;
+}
+
+div#content form h4 {
+ background-color:black;
+ color:white;
+ display:block;
+ padding: 5px;
+ margin:0;
+}
+
+
+div#content form ul {
+ margin: 0;
+ padding:0;
+}
+
+div#content form ul li {
+ height: 40px;
+}
+div#content form ul li.textarea {
+ height:110px;
+}
+div#content form ul li label {
+ float:left;
+ margin: 10px 0 0 5px;
+ width: 40%;
+
+}
+
+div#content form ul li input {
+ float:right;
+ margin: 10px 5px 0 0;
+ width: 40%;
+}
+div#content form ul li input[type="checkbox"] {
+ float:right;
+ margin: 10px 10px 0 0;
+ width: 15px;
+}
+div#content form ul li input[type="radio"] {
+ float:right;
+ margin: 10px 10px 0 0;
+ width: 15px;
+}
+
+div#content form select,
+div#content form textarea{
+ float:right;
+ margin:10px;
+}
+div#content form input[type="submit"] {
+ float:right;
+ width: 50px;
+ margin: 10px 10px 0 0;
+}
View
21 bars/public/images/IUI_LICENSE.txt
@@ -0,0 +1,21 @@
+Copyright (c) 2007, iUI Project Members
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+ * Neither the name of the iUI Project nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
View
BIN bars/public/images/android/btn_check_off.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN bars/public/images/android/btn_check_on.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.