diff --git a/app/controllers/status_messages_controller.rb b/app/controllers/status_messages_controller.rb index 547fbe3725ec8c85859810e7a1ab3ea136c8c5f2..1eae9744878fc2628c842d7946fc221bf52b7210 100644 --- a/app/controllers/status_messages_controller.rb +++ b/app/controllers/status_messages_controller.rb @@ -72,7 +72,7 @@ class StatusMessagesController < ApplicationController respond_to do |format| format.js { render :create, :status => 201} format.html { redirect_to :back} - format.mobile{ redirect_to :back} + format.mobile{ redirect_to root_url} end else if !photos.empty? diff --git a/app/views/aspects/index.mobile.haml b/app/views/aspects/index.mobile.haml index da3c6a4537b4b150fa90c8fec1140ab44d895ff3..94a60e396a4f27db5f5bd2740ceef4d10cc72e43 100644 --- a/app/views/aspects/index.mobile.haml +++ b/app/views/aspects/index.mobile.haml @@ -8,11 +8,12 @@ - else = @aspect -.grey_back - = render 'shared/publisher', :aspect_ids => @aspect_ids - +%h1 + = link_to 'post a message >> ', '#publisher_page', :id => 'publisher_button' #main_stream.stream = render 'shared/stream', :posts => @fakes %a.more-link.paginate{:href => '#'} %h2= t("more") = will_paginate @posts +- content_for :subpages do + = render 'shared/publisher', :aspect_ids => @aspect_ids diff --git a/app/views/aspects/show.mobile.haml b/app/views/aspects/show.mobile.haml index 91ddc6dbad5b794c9d2974ca79fe189667f43af0..77a9be5de8e8c3ff5aa06f8d939a6801d698ad17 100644 --- a/app/views/aspects/show.mobile.haml +++ b/app/views/aspects/show.mobile.haml @@ -9,3 +9,5 @@ #pagination = will_paginate @posts +- content_for :subpages do + = render 'shared/publisher', :aspect_ids => @aspect_ids diff --git a/app/views/layouts/application.mobile.haml b/app/views/layouts/application.mobile.haml index 67ff5313ef40e3f44cac6457ffcd089667dfc950..85ffedfa9312675049cac4da4c2def185b23af72 100644 --- a/app/views/layouts/application.mobile.haml +++ b/app/views/layouts/application.mobile.haml @@ -89,3 +89,6 @@ = render :partial =>'shared/footer' + + = yield :subpages + diff --git a/app/views/shared/_publisher.mobile.haml b/app/views/shared/_publisher.mobile.haml index eeedb044a8d5ebb346e2d00283dd910f24d3d32e..f78d8a524f9801ddba224aa4a48d428ba654fab8 100644 --- a/app/views/shared/_publisher.mobile.haml +++ b/app/views/shared/_publisher.mobile.haml @@ -9,22 +9,45 @@ }); }); -#publisher - = form_for StatusMessage.new do |status| - #publisher_text - = t('.whats_on_your_mind') +#publisher_page{:data => {:role => 'page', :theme => 'c'}} + #header + - if current_user + .left + = link_to(image_tag('icons/list_white.png'), '/aspects/#menu', :id => "menu_button") - = status.text_area :text + .right + = link_to(image_tag('icons/search_white.png'), people_path) + = link_to(image_tag('white.png'), aspects_path) + %div{:data => {:role => 'content'}} + = form_for StatusMessage.new, {:data => {:ajax => false}} do |status| + #publisher_text + = t('.whats_on_your_mind') - - for aspect_id in @aspect_ids - = hidden_field_tag 'aspect_ids[]', aspect_id.to_s + = status.text_area :text + - for aspect_id in @aspect_ids + = hidden_field_tag 'aspect_ids[]', aspect_id.to_s - %fieldset.hidden{:style => 'text-align:right;'} - %fieldset{:data => {:role => 'controlgroup', :type=>'horizontal'}} + + %fieldset - unless params[:a_ids] %input{:type => 'checkbox', :name => 'status_message[public]', :id => 'public', :class => 'custom', :value => 'true'} %label{:for => 'public'} = t('.make_public') - = status.submit t('.share'), 'data-inline' => 'true', 'data-theme' => 'b' + - unless current_user.services.empty? + %div{:data => {:role => 'fieldcontain'}} + %label{:for => 'services', :class => 'select'} + choose services + + - current_user.services.each do |service| + %input{:type => 'checkbox', :name => "services[]", :id => "#{service.provider}", :class => 'custom', :value => "#{service.provider}"} + %label{:for => "#{service.provider}"} + = "#{service.provider}" + -#%select{:name => 'services', :multiple => 'multiple', :id => "services"} + -#%option + -#Choose a Service + -#- current_user.services.each do |service| + -#%option{:value => "#{service.provider}"} + -#= service.provider.titleize + = status.submit t('.share'), 'data-theme' => 'c' diff --git a/public/javascripts/custom-mobile-scripting.js b/public/javascripts/custom-mobile-scripting.js index 1ee6cbcf9f76c867a035cb743f01435271e92bf5..4c47c3c6d397c227ba1cc1748aeac294693c26d9 100644 --- a/public/javascripts/custom-mobile-scripting.js +++ b/public/javascripts/custom-mobile-scripting.js @@ -7,5 +7,7 @@ $(document).bind("mobileinit", function() { $.extend($.mobile, { ajaxLinksEnabled: false, ajaxFormsEnabled: false + }); + $.mobile.selectmenu.prototype.options.nativeMenu = false; });