From 7ac0e9eb499f5dba49fea35fbcef2c74a67fd973 Mon Sep 17 00:00:00 2001 From: danielvincent <danielgrippi@gmail.com> Date: Sun, 23 Jan 2011 20:18:16 -0800 Subject: [PATCH] wip --- Gemfile.lock | 32 +++++++++++++---------- app/controllers/aspects_controller.rb | 1 + app/views/layouts/application.mobile.haml | 11 +++++++- app/views/shared/_publisher.mobile.haml | 9 ++++++- public/stylesheets/sass/mobile.sass | 6 ++--- 5 files changed, 39 insertions(+), 20 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 1055c8e60e..2f35328cab 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -58,6 +58,7 @@ PATH GEM remote: http://rubygems.org/ specs: + SystemTimer (1.2.1) abstract (1.0.0) actionmailer (3.0.3) actionpack (= 3.0.3) @@ -86,7 +87,6 @@ GEM activesupport (= 3.0.3) activesupport (3.0.3) addressable (2.2.2) - archive-tar-minitar (0.5.2) arel (2.0.7) aws (2.3.32) activesupport @@ -103,6 +103,7 @@ GEM rack (>= 1.0.0) rack-test (>= 0.5.4) selenium-webdriver (>= 0.0.3) + cgi_multipart_eof_fix (2.5.0) chef (0.9.12) bunny (>= 0.6.0) erubis @@ -158,6 +159,7 @@ GEM faraday_middleware (0.3.1) faraday (~> 0.5.3) fastercsv (1.5.4) + fastthread (1.0.7) ffi (0.6.3) rake (>= 0.8.7) fixture_builder (0.2.0) @@ -171,6 +173,7 @@ GEM nokogiri (~> 1.4.3.1) ruby-hmac formatador (0.0.16) + gem_plugin (0.2.3) gherkin (2.3.3) json (~> 1.4.6) googlecharts (1.6.0) @@ -187,8 +190,7 @@ GEM launchy (0.3.7) configuration (>= 0.0.5) rake (>= 0.8.1) - linecache19 (0.5.11) - ruby_core_source (>= 0.1.4) + linecache (0.43) mail (2.2.14) activesupport (>= 2.3.6) i18n (>= 0.4.0) @@ -205,6 +207,11 @@ GEM mocha (0.9.10) rake moneta (0.6.0) + mongrel (1.1.5) + cgi_multipart_eof_fix (>= 2.4) + daemons (>= 1.0.3) + fastthread (>= 1.0.1) + gem_plugin (>= 0.2.3) multi_json (0.0.5) multi_xml (0.2.0) multipart-post (1.1.0) @@ -300,20 +307,15 @@ GEM activesupport (~> 3.0) railties (~> 3.0) rspec (~> 2.4.0) - ruby-debug-base19 (0.11.24) - columnize (>= 0.3.1) - linecache19 (>= 0.5.11) - ruby_core_source (>= 0.1.4) - ruby-debug19 (0.11.6) - columnize (>= 0.3.1) - linecache19 (>= 0.5.11) - ruby-debug-base19 (>= 0.11.19) + ruby-debug (0.10.4) + columnize (>= 0.1) + ruby-debug-base (~> 0.10.4.0) + ruby-debug-base (0.10.4) + linecache (>= 0.3) ruby-hmac (0.4.0) ruby-openid (2.1.8) ruby-openid-apps-discovery (1.2.0) ruby-openid (>= 2.1.7) - ruby_core_source (0.1.4) - archive-tar-minitar (>= 0.5.2) rubyntlm (0.1.1) rubyzip (0.9.4) selenium-client (1.2.18) @@ -356,6 +358,7 @@ PLATFORMS ruby DEPENDENCIES + SystemTimer (= 1.2.1) addressable (= 2.2.2) aws (= 2.3.32) bundler (>= 1.0.0) @@ -381,6 +384,7 @@ DEPENDENCIES launchy mini_magick (= 3.2) mocha + mongrel mysql2 (= 0.2.6) nokogiri (= 1.4.3.1) omniauth (= 0.1.6) @@ -391,7 +395,7 @@ DEPENDENCIES rspec (>= 2.0.0) rspec-instafail rspec-rails (>= 2.0.0) - ruby-debug19 + ruby-debug thin (= 1.2.7) twitter! webmock diff --git a/app/controllers/aspects_controller.rb b/app/controllers/aspects_controller.rb index 2bec15c4a9..68c72f8061 100644 --- a/app/controllers/aspects_controller.rb +++ b/app/controllers/aspects_controller.rb @@ -30,6 +30,7 @@ class AspectsController < ApplicationController @contacts = current_user.contacts.includes(:person => :profile).where(:pending => false) @aspect = :all unless params[:a_ids] + @aspect ||= @aspects.first #used in mobile end end diff --git a/app/views/layouts/application.mobile.haml b/app/views/layouts/application.mobile.haml index 36eed2ecff..4349616b88 100644 --- a/app/views/layouts/application.mobile.haml +++ b/app/views/layouts/application.mobile.haml @@ -35,5 +35,14 @@ = link_to current_user.name, current_user.person %br - = link_to 'logout', '#' + %br + %b your aspects + %br + - for aspect in @all_aspects + = link_to aspect, aspects_path('a_ids[]' => aspect.id) + | + %br + + %br + = link_to 'logout', destroy_user_session_path diff --git a/app/views/shared/_publisher.mobile.haml b/app/views/shared/_publisher.mobile.haml index 335176b546..e9a98412ac 100644 --- a/app/views/shared/_publisher.mobile.haml +++ b/app/views/shared/_publisher.mobile.haml @@ -2,12 +2,19 @@ -# licensed under the Affero General Public License version 3 or later. See -# the COPYRIGHT file. +:javascript + $(document).ready(function(){ + $("#status_message_message").bind("focus", function(){ + $("#publisher fieldset").removeClass('hidden'); + }); + }); + #publisher = form_for StatusMessage.new, :remote => true do |status| #publisher_text = t('.whats_on_your_mind') - = status.text_area :message, :class => 'scrunch', 'data-inline' => 'true' + = status.text_area :message - for aspect_id in @aspect_ids = hidden_field_tag 'aspect_ids[]', aspect_id.to_s diff --git a/public/stylesheets/sass/mobile.sass b/public/stylesheets/sass/mobile.sass index fed2543948..ee73d7dc52 100644 --- a/public/stylesheets/sass/mobile.sass +++ b/public/stylesheets/sass/mobile.sass @@ -235,15 +235,12 @@ ul .hidden :display none -textarea.scrunch - :height 1em - .grey_back :background :color #eee :border :bottom 1px solid #999 - :padding 4px + :padding 8px :top 3px :margin :bottom 12px @@ -287,6 +284,7 @@ textarea.scrunch :position absolute :top 0 :padding 6px + :top 5px :right 0 #footer_sauce -- GitLab