Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: TracksApp/tracks
...
head fork: myles/tracks
compare: master
Checking mergeability… Don't worry, you can still create the pull request.
  • 4 commits
  • 6 files changed
  • 0 commit comments
  • 1 contributor
View
4 .gitignore
@@ -1,3 +1,4 @@
+*~
*.tmproj
config/database.yml
config/environment.rb
@@ -10,4 +11,5 @@ vendor/plugins/query_trace/
db/schema.rb
.dotest
public/javascripts/cache
-public/stylesheets/cache
+public/stylesheets/cache
+db/*.db
View
28 app/views/layouts/standard.html.erb
@@ -12,26 +12,19 @@
accesskey-hints todo-items niftycube
protoload flashobject lowpro
] %>
- <%= stylesheet_link_tag *%w[ standard calendar-system niftyCorners] %>
+ <%= stylesheet_link_tag *%w[ standard calendar-system niftyCorners ] %>
<% end %>
<%= javascript_include_tag :unobtrusive %>
<%= stylesheet_link_tag "print", :media => "print" %>
<link rel="shortcut icon" href="<%= url_for(:controller => 'favicon.ico') %>" />
<%= auto_discovery_link_tag(:rss, {:controller => "todos", :action => "index", :format => 'rss', :token => "#{current_user.token}"}, {:title => "RSS feed of next actions"}) %>
-<link rel="search" type="application/opensearchdescription+xml"
+ <link rel="search" type="application/opensearchdescription+xml"
title="Tracks"
href="<%= search_plugin_path %>" />
-
-<script type="text/javascript">
-window.onload=function(){
- Nifty("div#todo_new_action_container","normal");
- if ($('flash').visible()) { new Effect.Fade("flash",{duration:5.0}); }
-}
-</script>
-
-<title><%= @page_title %></title>
-
+
+ <title><%= @page_title %></title>
+
</head>
<body class="<%= @controller.controller_name %>">
<div id="topbar">
@@ -70,6 +63,7 @@ window.onload=function(){
<li><%= navigation_link(image_tag("menustar.gif", :size => "16X16", :border => 0), tag_path("starred"), :title => "See your starred actions" ) %></li>
<li><%= navigation_link(image_tag("stats.gif", :size => "16X16", :border => 0), {:controller => "stats", :action => "index"}, :title => "See your statistics" ) %></li>
<li><%= navigation_link(image_tag("system-search.png", :size => "16X16", :border => 0), {:controller => "search", :action => "index"}, :title => "Search All Items" ) %></li>
+ <li><%= image_tag("database_gear.png", :size => "16x16", :border => 0) %><!-- TODO --></li>
</ul>
</div>
@@ -89,5 +83,15 @@ window.onload=function(){
</div>
<%= render :partial => "shared/footer" %>
+
+<%= javascript_include_tag "gears_init" %>
+<%= javascript_include_tag "gears" %>
+<script type="text/javascript">
+ window.onload=function(){
+ Nifty("div#todo_new_action_container","normal");
+ if ($('flash').visible()) { new Effect.Fade("flash",{duration:5.0}); }
+ }
+ var gears = Gears;
+</script>
</body>
</html>
View
BIN  public/images/database_gear.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
64 public/javascripts/gears.js
@@ -0,0 +1,64 @@
+Gears = {
+ createStore : function() {
+ if ( 'undefined' == typeof google || ! google.gears ) return;
+
+ if ( 'undefined' == typeof localServer )
+ localServer = google.gears.factory.create("beta.localserver");
+
+ store = localServer.createManagedStore(this.storeName());
+ store.manifestUrl = "/manifest.json";
+ store.checkForUpdate();
+ },
+
+ getPermission : function() {
+ var perm = true;
+
+ if ( 'undefined' != typeof google && google.gears ) {
+ if ( ! google.gears.factory.hasPermission )
+ perm = google.gears.factory.getPermission( 'Tracks', '/apple-touch-icon.png' );
+
+ if ( perm )
+ try { this.createStore(); } catch(e) { this.message(); } // silence if canceled
+ else
+ alert()
+
+ }
+ },
+
+ storeName : function() {
+ var name = window.location.protocol + window.location.host;
+
+ name = name.replace(/[\/\\:*"?<>|;,]+/g, '_'); // gears beta doesn't allow certain chars in the store name
+ name = 'tracks_' + name.substring(0, 56);
+
+ return name;
+ }
+};
+
+(function() {
+ if ( 'undefined' != typeof google && google.gears ) return;
+
+ var gf = false;
+ if ( 'undefined' != typeof GearsFactory ) {
+ gf = new GearsFactory();
+ } else {
+ try {
+ gf = new ActiveXObject('Gears.Factory');
+ if ( factory.getBuildInfo().indexOf('ie_mobile') != -1 )
+ gf.privateSetGlobalObject(this);
+ } catch (e) {
+ if ( ( 'undefined' != typeof navigator.mimeTypes ) && navigator.mimeTypes['application/x-googlegears'] ) {
+ gf = document.createElement("object");
+ gf.style.display = "none";
+ gf.width = 0;
+ gf.height = 0;
+ gf.type = "application/x-googlegears";
+ document.documentElement.appendChild(gf);
+ }
+ }
+ }
+
+ if ( ! gf ) return;
+ if ( 'undefined' == typeof google ) google = {};
+ if ( ! google.gears ) google.gears = { factory : gf };
+})();
View
87 public/javascripts/gears_init.js
@@ -0,0 +1,87 @@
+// Copyright 2007, Google Inc.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice,
+// this list of conditions and the following disclaimer.
+// 2. 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.
+// 3. Neither the name of Google Inc. 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 AUTHOR ``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 AUTHOR 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.
+//
+// Sets up google.gears.*, which is *the only* supported way to access Gears.
+//
+// Circumvent this file at your own risk!
+//
+// In the future, Gears may automatically define google.gears.* without this
+// file. Gears may use these objects to transparently fix bugs and compatibility
+// issues. Applications that use the code below will continue to work seamlessly
+// when that happens.
+
+(function() {
+ // We are already defined. Hooray!
+ if (window.google && google.gears) {
+ return;
+ }
+
+ var factory = null;
+
+ // Firefox
+ if (typeof GearsFactory != 'undefined') {
+ factory = new GearsFactory();
+ } else {
+ // IE
+ try {
+ factory = new ActiveXObject('Gears.Factory');
+ // privateSetGlobalObject is only required and supported on IE Mobile on
+ // WinCE.
+ if (factory.getBuildInfo().indexOf('ie_mobile') != -1) {
+ factory.privateSetGlobalObject(this);
+ }
+ } catch (e) {
+ // Safari
+ if ((typeof navigator.mimeTypes != 'undefined')
+ && navigator.mimeTypes["application/x-googlegears"]) {
+ factory = document.createElement("object");
+ factory.style.display = "none";
+ factory.width = 0;
+ factory.height = 0;
+ factory.type = "application/x-googlegears";
+ document.documentElement.appendChild(factory);
+ }
+ }
+ }
+
+ // *Do not* define any objects if Gears is not installed. This mimics the
+ // behavior of Gears defining the objects in the future.
+ if (!factory) {
+ return;
+ }
+
+ // Now set up the objects, being careful not to overwrite anything.
+ //
+ // Note: In Internet Explorer for Windows Mobile, you can't add properties to
+ // the window object. However, global objects are automatically added as
+ // properties of the window object in all browsers.
+ if (!window.google) {
+ google = {};
+ }
+
+ if (!google.gears) {
+ google.gears = {factory: factory};
+ }
+})();
View
91 public/manifest.json
@@ -0,0 +1,91 @@
+{
+ "betaManifestVersion": 1,
+ "version": "1.7RC",
+ "entries": [
+ { "url": "/javascripts/cache/bundle.js" },
+ { "url": "/stylesheets/cache/bundle.css" },
+ { "url": "/javascripts/gears_init.js" },
+ { "url": "/favicon.ico" },
+ { "url": "/apple-touch-icon.png" },
+ { "url": "/robots.txt" },
+ { "url": "/_doc/index.html" },
+ { "url": "/images/database_gear.png" },
+ { "url": "/images/accept.png" },
+ { "url": "/images/add.png" },
+ { "url": "/images/bigBlackWaiting.gif" },
+ { "url": "/images/bigWaiting.gif" },
+ { "url": "/images/blackWaiting.gif" },
+ { "url": "/images/blank.png" },
+ { "url": "/images/bottom_off.png" },
+ { "url": "/images/bottom_on.png" },
+ { "url": "/images/cancel.png" },
+ { "url": "/images/close.gif" },
+ { "url": "/images/collapse.png" },
+ { "url": "/images/container-gradient.png" },
+ { "url": "/images/defer_1.png" },
+ { "url": "/images/defer_7.png" },
+ { "url": "/images/delete_off.png" },
+ { "url": "/images/delete_on.png" },
+ { "url": "/images/done.png" },
+ { "url": "/images/down_off.png" },
+ { "url": "/images/down_on.png" },
+ { "url": "/images/edit_off.png" },
+ { "url": "/images/edit_on.png" },
+ { "url": "/images/expand.png" },
+ { "url": "/images/feed-icon.png" },
+ { "url": "/images/menuarrow.gif" },
+ { "url": "/images/menustar.gif" },
+ { "url": "/images/menustar_small.gif" },
+ { "url": "/images/new-action-gradient.png" },
+ { "url": "/images/notes_off.png" },
+ { "url": "/images/notes_on.png" },
+ { "url": "/images/open-id-login-bg.gif" },
+ { "url": "/images/recurring16x16.png" },
+ { "url": "/images/recurring24x24.png" },
+ { "url": "/images/recurring_menu16x16.png" },
+ { "url": "/images/recurring_menu24x24.png" },
+ { "url": "/images/spinner.gif" },
+ { "url": "/images/staricons.png" },
+ { "url": "/images/stats.gif" },
+ { "url": "/images/system-search.png" },
+ { "url": "/images/top_off.png" },
+ { "url": "/images/top_on.png" },
+ { "url": "/images/trans70.png" },
+ { "url": "/images/up_off.png" },
+ { "url": "/images/up_on.png" },
+ { "url": "/images/waiting.gif" },
+ { "url": "/images/x-office-calendar.png" },
+ { "url": "/images/lightwindow/ajax-loading.gif" },
+ { "url": "/images/lightwindow/arrow-down.gif" },
+ { "url": "/images/lightwindow/arrow-up.gif" },
+ { "url": "/images/lightwindow/black-70.png" },
+ { "url": "/images/lightwindow/black.png" },
+ { "url": "/images/lightwindow/nextlabel.gif" },
+ { "url": "/images/lightwindow/pattern_148-70.png" },
+ { "url": "/images/lightwindow/pattern_148.gif" },
+ { "url": "/images/lightwindow/prevlabel.gif" },
+ { "url": "/javascripts/accesskey-hints.js" },
+ { "url": "/javascripts/application.js" },
+ { "url": "/javascripts/calendar-en.js" },
+ { "url": "/javascripts/calendar-setup.js" },
+ { "url": "/javascripts/calendar.js" },
+ { "url": "/javascripts/controls.js" },
+ { "url": "/javascripts/dragdrop.js" },
+ { "url": "/javascripts/effects.js" },
+ { "url": "/javascripts/flashobject.js" },
+ { "url": "/javascripts/lowpro.js" },
+ { "url": "/javascripts/niftycube.js" },
+ { "url": "/javascripts/protoload.js" },
+ { "url": "/javascripts/prototype.js" },
+ { "url": "/javascripts/scriptaculous.js" },
+ { "url": "/javascripts/slider.js" },
+ { "url": "/javascripts/todo-items.js" },
+ { "url": "/swf/open-flash-chart.swf" },
+ { "url": "/stylesheets/calendar-system.css" },
+ { "url": "/stylesheets/mobile.css" },
+ { "url": "/stylesheets/niftyCorners.css" },
+ { "url": "/stylesheets/print.css" },
+ { "url": "/stylesheets/scaffold.css" },
+ { "url": "/stylesheets/standard.css" }
+ ]
+}

No commit comments for this range

Something went wrong with that request. Please try again.