Added private conversation for mobile
This commit is contained in:
parent
03858a07f7
commit
9913f40a38
5 changed files with 63 additions and 8 deletions
|
|
@ -6,6 +6,7 @@
|
|||
//= require mbp-modernizr-custom
|
||||
//= require mbp-respond.min
|
||||
//= require mbp-helper
|
||||
//= require jquery.autoSuggest.custom
|
||||
$(document).ready(function(){
|
||||
|
||||
$('.shield a').click(function(){
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
@import 'bootstrap';
|
||||
@import 'bootstrap-responsive';
|
||||
@import "_mixins.css.scss";
|
||||
@import 'vendor/autoSuggest';
|
||||
|
||||
$blue: #3f8fba;
|
||||
|
||||
|
|
@ -702,3 +703,52 @@ form#new_message.new_message input.button.creation{
|
|||
float: right;
|
||||
margin: 0 5px 5px;
|
||||
}
|
||||
|
||||
form#new_conversation.new_conversation {
|
||||
background-color: #FFFFFF;
|
||||
border-bottom: 1px solid #999999;
|
||||
box-shadow: 0 2px 3px #999999;
|
||||
margin: 5px 20px;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.span-2 {
|
||||
margin: 5px 5px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.span-10 {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
textarea#conversation_text {
|
||||
border: 0.2s;
|
||||
border-radius: 0 0 0 0;
|
||||
font-size: larger;
|
||||
left: 0;
|
||||
margin: 10px 0;
|
||||
width: 218px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.bottom_submit_section {
|
||||
display: block;
|
||||
position: relative;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.button.creation {
|
||||
color: #333;
|
||||
text-decoration: none;
|
||||
background-color: #E6E6E6;
|
||||
background-position: 0 -15px;
|
||||
-webkit-transition: background-position 0.1s linear;
|
||||
-webkit-transition-property: background-position;
|
||||
-webkit-transition-duration: 0.1s;
|
||||
-webkit-transition-timing-function: linear;
|
||||
-webkit-transition-delay: initial;
|
||||
-moz-transition: background-position 0.1s linear;
|
||||
-ms-transition: background-position 0.1s linear;
|
||||
-o-transition: background-position 0.1s linear;
|
||||
transition: background-position 0.1s linear;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ ul.as-selections {
|
|||
-webkit-border-radius: 3px;
|
||||
-moz-border-radius: 3px;
|
||||
|
||||
width: 383px;
|
||||
width: 214px;
|
||||
}
|
||||
|
||||
ul.as-selections.loading {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
class ConversationsController < ApplicationController
|
||||
before_filter :authenticate_user!
|
||||
|
||||
respond_to :html, :json, :js
|
||||
respond_to :html, :mobile, :json, :js
|
||||
|
||||
def index
|
||||
@conversations = Conversation.joins(:conversation_visibilities).where(
|
||||
|
|
@ -82,7 +82,10 @@ class ConversationsController < ApplicationController
|
|||
elsif params[:aspect_id]
|
||||
@contact_ids = current_user.aspects.find(params[:aspect_id]).contacts.map{|c| c.id}.join(',')
|
||||
end
|
||||
if session[:mobile_view] == true && request.format.html?
|
||||
render :layout => true
|
||||
elsif
|
||||
render :layout => false
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -2,6 +2,10 @@
|
|||
-# licensed under the Affero General Public License version 3 or later. See
|
||||
-# the COPYRIGHT file.
|
||||
|
||||
- if in_mobile_view?
|
||||
= javascript_include_tag :jquery
|
||||
= javascript_include_tag :mobile
|
||||
|
||||
:javascript
|
||||
$(document).ready(function () {
|
||||
var data = $.parseJSON( "#{escape_javascript(@contacts_json)}" ),
|
||||
|
|
@ -29,7 +33,6 @@
|
|||
= t('conversations.index.new_message')
|
||||
|
||||
= form_for Conversation.new do |conversation|
|
||||
%br
|
||||
|
||||
.span-2
|
||||
%h4
|
||||
|
|
@ -37,17 +40,15 @@
|
|||
.span-10.last
|
||||
= text_field_tag "contact_autocomplete"
|
||||
.clearfix
|
||||
|
||||
%br
|
||||
.span-2
|
||||
%h4
|
||||
= t('.subject')
|
||||
.span-10.last
|
||||
= conversation.text_field :subject
|
||||
|
||||
%br
|
||||
.span-10.prepend-2.last
|
||||
= text_area_tag "conversation[text]", '', :rows => 5
|
||||
|
||||
.clearfix
|
||||
|
||||
.bottom_submit_section
|
||||
= conversation.submit t('.send'), 'data-disable-with' => t('.sending'), :class => 'button creation'
|
||||
|
|
|
|||
Loading…
Reference in a new issue