added public button to the mobile publisher. make status message mobile redirect to back; also, include minifiyed jququery mobile css
This commit is contained in:
parent
2314c08265
commit
cef10c1228
3 changed files with 12 additions and 864 deletions
|
|
@ -15,7 +15,7 @@ class StatusMessagesController < ApplicationController
|
||||||
photos = Photo.where(:id => [*params[:photos]], :diaspora_handle => current_user.person.diaspora_handle)
|
photos = Photo.where(:id => [*params[:photos]], :diaspora_handle => current_user.person.diaspora_handle)
|
||||||
|
|
||||||
public_flag = params[:status_message][:public]
|
public_flag = params[:status_message][:public]
|
||||||
public_flag.to_s.match(/(true)/) ? public_flag = true : public_flag = false
|
public_flag.to_s.match(/(true)|(on)/) ? public_flag = true : public_flag = false
|
||||||
params[:status_message][:public] = public_flag
|
params[:status_message][:public] = public_flag
|
||||||
|
|
||||||
@status_message = current_user.build_post(:status_message, params[:status_message])
|
@status_message = current_user.build_post(:status_message, params[:status_message])
|
||||||
|
|
@ -51,7 +51,7 @@ class StatusMessagesController < ApplicationController
|
||||||
},
|
},
|
||||||
:status => 201 }
|
:status => 201 }
|
||||||
format.html { respond_with @status_message }
|
format.html { respond_with @status_message }
|
||||||
format.mobile{ redirect_to aspects_path('a_ids' => params[:aspect_ids]) }
|
format.mobile{ redirect_to :back}
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
:javascript
|
:javascript
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
$("#status_message_message").bind("focus", function(){
|
$("#status_message_message").bind("focus", function(){
|
||||||
$("#publisher fieldset").removeClass('hidden');
|
$("#publisher fieldset:first").removeClass('hidden');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -19,6 +19,12 @@
|
||||||
- for aspect_id in @aspect_ids
|
- for aspect_id in @aspect_ids
|
||||||
= hidden_field_tag 'aspect_ids[]', aspect_id.to_s
|
= hidden_field_tag 'aspect_ids[]', aspect_id.to_s
|
||||||
|
|
||||||
%fieldset.hidden{:style => 'text-align:right;'}
|
|
||||||
= status.submit t('.share'), 'data-inline' => 'true', 'data-theme' => 'b'
|
%fieldset.hidden{:style => 'text-align:right;'}
|
||||||
|
%fieldset{:data => {:role => 'controlgroup', :type=>'horizontal'}}
|
||||||
|
- unless params[:a_ids]
|
||||||
|
%input{:type => 'checkbox', :name => 'status_message[public]', :id => 'public', :class => 'custom', :value => 'true'}
|
||||||
|
%label{:for => 'public'}
|
||||||
|
make public?
|
||||||
|
= status.submit t('.share'), 'data-inline' => 'true', 'data-theme' => 'b'
|
||||||
|
|
||||||
|
|
|
||||||
860
public/stylesheets/vendor/jquery_mobile.min.css
vendored
860
public/stylesheets/vendor/jquery_mobile.min.css
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue