social_stream-base 2.0.3 → 2.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/assets/javascripts/social_stream-base.js +1 -0
- data/app/assets/javascripts/social_stream/relation_customs.js +2 -1
- data/app/assets/stylesheets/social_stream-base.css.sass +1 -0
- data/app/assets/stylesheets/social_stream/base/adjust/_adjust.css.sass +1 -4
- data/app/assets/stylesheets/social_stream/base/contacts/layouts/_contacts.css.sass +2 -0
- data/app/assets/stylesheets/social_stream/base/frontpage_devise/_frontpage.css.sass +1 -0
- data/app/assets/stylesheets/social_stream/base/logo/_logo-in.css +8 -7
- data/app/assets/stylesheets/social_stream/base/modals/layout/_modals.css.sass +4 -1
- data/app/assets/stylesheets/social_stream/base/profile/layout/_profile.css.sass +7 -6
- data/app/assets/stylesheets/social_stream/base/timeline/_wrapper_activities.css.sass +14 -6
- data/app/assets/stylesheets/social_stream/base/timeline/layout/_wrapper_activities.css.sass +1 -4
- data/app/views/layouts/_header_dropdown_menu.html.erb +3 -3
- data/app/views/layouts/application.html.erb +3 -3
- data/app/views/profiles/_personal.html.erb +16 -10
- data/app/views/profiles/_tags.html.erb +1 -1
- data/app/views/relation/customs/_index.html.erb +18 -0
- data/app/views/relation/customs/_list.html.erb +2 -1
- data/app/views/relation/customs/index.html.erb +2 -16
- data/config/locales/en.yml +5 -1
- data/config/locales/es.yml +4 -2
- data/config/locales/pt.yml +7 -3
- data/config/locales/zh.yml +5 -2
- data/lib/inherited_resources/social_stream.rb +11 -14
- data/lib/social_stream/base/engine.rb +1 -1
- data/lib/social_stream/base/version.rb +1 -1
- data/lib/social_stream/controllers/objects.rb +2 -4
- data/social_stream-base.gemspec +2 -2
- data/vendor/assets/javascripts/bootstrap-modal.js +1 -0
- data/vendor/assets/javascripts/bootstrap-scroll-modal.js +276 -0
- data/vendor/assets/stylesheets/bootstrap-scroll-modal.css +70 -0
- metadata +10 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2119bb019a0c4d4c11bf902e194e29e5f1274576
|
4
|
+
data.tar.gz: 76e260d1d53acbcf459fe95c1569b54ef9af4a3e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 68ae64af17f88595cad7ce80f1bc657a9d3b75750e38a63a55780efb1c4ff41e866471dd1dbbe635a29bf581c0bac7860d35adc49d2d5a01f1c8e95986057bb3
|
7
|
+
data.tar.gz: 9edc2c246fbc02b66f59926f878134d9da6900b97b1c13ec46d7c73db9a22dc3dd11323ce8835ff877e30b42cc9ebef916327ced09ed03d22e5066ef07fb5099
|
@@ -1,9 +1,10 @@
|
|
1
1
|
//= require social_stream/callback
|
2
|
+
|
2
3
|
SocialStream.RelationCustom = (function(SS, $, undefined){
|
3
4
|
var callback = new SS.Callback();
|
4
5
|
|
5
6
|
var getListEl = function() {
|
6
|
-
return $('
|
7
|
+
return $('.relation_list');
|
7
8
|
};
|
8
9
|
|
9
10
|
var getPermissionsPath = function() {
|
@@ -1,10 +1,11 @@
|
|
1
1
|
.logo-header-in .cube {
|
2
2
|
position:relative;
|
3
|
-
left: -
|
3
|
+
left: -44px;
|
4
|
+
margin-top: 7px;
|
4
5
|
z-index: 2;
|
5
6
|
float: left;
|
6
|
-
-webkit-transform: rotate(
|
7
|
-
-moz-transform: rotate(
|
7
|
+
-webkit-transform: rotate(6deg);
|
8
|
+
-moz-transform: rotate(6deg);
|
8
9
|
}
|
9
10
|
|
10
11
|
.logo-header-in .cube:hover {
|
@@ -12,20 +13,20 @@
|
|
12
13
|
-moz-animation: float 2s infinite ease-in-out;
|
13
14
|
-o-animation: float 2s infinite ease-in-out;
|
14
15
|
animation: float 2s infinite ease-in-out;
|
15
|
-
|
16
|
-
-
|
16
|
+
|
17
|
+
margin-top: 4px;
|
17
18
|
}
|
18
19
|
|
19
20
|
@-webkit-keyframes float {
|
20
21
|
0% {
|
21
|
-
-webkit-transform: translate(0px,
|
22
|
+
-webkit-transform: translate(0px, 2px);
|
22
23
|
}
|
23
24
|
50% {
|
24
25
|
-webkit-transform: translate(0px, 0px);
|
25
26
|
|
26
27
|
}
|
27
28
|
100% {
|
28
|
-
-webkit-transform: translate(0px,
|
29
|
+
-webkit-transform: translate(0px, 2px);
|
29
30
|
}
|
30
31
|
}
|
31
32
|
|
@@ -32,4 +32,7 @@
|
|
32
32
|
padding-bottom: 50px
|
33
33
|
.select2-container-multi
|
34
34
|
.select2-choices
|
35
|
-
@include gradient-directional($startColor: #f9f9f9, $endColor: #f1f1f1, $deg: 45deg)
|
35
|
+
@include gradient-directional($startColor: #f9f9f9, $endColor: #f1f1f1, $deg: 45deg)
|
36
|
+
.modal-wrapper
|
37
|
+
.modal
|
38
|
+
min-height: 600px
|
@@ -32,13 +32,15 @@
|
|
32
32
|
@include grid-core-span(12, $fluidGridColumnWidth, $fluidGridGutterWidth)
|
33
33
|
background-color: $white
|
34
34
|
margin-left: 0px
|
35
|
-
padding: 12px 0px
|
35
|
+
padding: 12px 0px 32px 0px !important
|
36
36
|
form.edit_profile
|
37
37
|
padding: 0 14px
|
38
38
|
input
|
39
39
|
&[type="submit"]
|
40
|
+
@include btn-primary
|
41
|
+
@include border-radius(5px)
|
40
42
|
float: right
|
41
|
-
margin-top:
|
43
|
+
margin-top: 10px
|
42
44
|
margin-right: 9px
|
43
45
|
|
44
46
|
|
@@ -99,14 +101,13 @@
|
|
99
101
|
.update
|
100
102
|
.jcrop-holder
|
101
103
|
width: 100% !important
|
104
|
+
background: $black
|
102
105
|
div
|
103
106
|
img
|
104
|
-
max-width: 90%
|
105
|
-
max-height: 90%
|
106
107
|
margin: 0 auto
|
107
108
|
position: relative
|
108
109
|
div
|
109
|
-
|
110
|
-
|
110
|
+
overflow: hidden
|
111
|
+
|
111
112
|
|
112
113
|
|
@@ -64,12 +64,20 @@
|
|
64
64
|
.new_document
|
65
65
|
display: inline
|
66
66
|
padding: 1px 6px 4px 6px
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
67
|
+
|
68
|
+
.form-privacy
|
69
|
+
display: inline-block
|
70
|
+
@include btn-add
|
71
|
+
.btn-group
|
72
|
+
button
|
73
|
+
padding: 4px 12px 4px 8px
|
74
|
+
label
|
75
|
+
font-size: 14px
|
76
|
+
font-weight: bold
|
77
|
+
letter-spacing: 1px
|
78
|
+
line-height: 20px
|
79
|
+
color: #333
|
80
|
+
|
73
81
|
|
74
82
|
|
75
83
|
#post_text
|
@@ -38,13 +38,10 @@
|
|
38
38
|
display: inline-block
|
39
39
|
.dropdown-menu
|
40
40
|
li
|
41
|
-
margin-left: 0px
|
42
|
-
padding-left: 7px
|
43
41
|
a
|
44
42
|
padding: 0px !important
|
45
43
|
label
|
46
|
-
margin-left:
|
47
|
-
padding: 0px 16px 0px 0px!important
|
44
|
+
margin-left: 7px
|
48
45
|
&:hover
|
49
46
|
background: $principalColor
|
50
47
|
color: $auxiliarColor
|
@@ -7,16 +7,16 @@
|
|
7
7
|
<ul class="dropdown-menu">
|
8
8
|
<%= render :partial => 'layouts/header_dropdown_menu_sessions'%>
|
9
9
|
|
10
|
-
<li>
|
10
|
+
<li class="notifications-menu">
|
11
11
|
<%= link_to t('dropdown.notifications'), notifications_path, :id => "btn_menu_settings" %>
|
12
12
|
</li>
|
13
13
|
|
14
|
-
<li>
|
14
|
+
<li class="settings-menu">
|
15
15
|
<%= link_to t('dropdown.settings'), settings_path, :id => "btn_menu_settings" %>
|
16
16
|
</li>
|
17
17
|
|
18
18
|
<% if SocialStream.relation_model == :custom %>
|
19
|
-
<li>
|
19
|
+
<li class="privacity-menu">
|
20
20
|
<%= link_to t('dropdown.privacy'), relation_customs_path %>
|
21
21
|
</li>
|
22
22
|
<% end %>
|
@@ -3,9 +3,9 @@
|
|
3
3
|
<html lang="<%= I18n.locale.to_s %>">
|
4
4
|
<head>
|
5
5
|
<meta charset="utf-8">
|
6
|
-
<title><%=
|
7
|
-
<meta name="keywords" content="<%=
|
8
|
-
<meta name="description" content= "<%=
|
6
|
+
<title><%= content_for?(:title) ? yield(:title) : t('site.current.title') %></title>
|
7
|
+
<meta name="keywords" content="<%= content_for?(:keywords) ? yield(:keywords) : t('site.current.keywords') %>" >
|
8
|
+
<meta name="description" content= "<%= content_for?(:description) ? yield(:description) : t('site.current.description') %>" >
|
9
9
|
<meta name="generator" content="Social Stream" />
|
10
10
|
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no" />
|
11
11
|
|
@@ -7,6 +7,15 @@
|
|
7
7
|
</header>
|
8
8
|
<div class="briefing">
|
9
9
|
<% if @profile.personal_present? %>
|
10
|
+
<% if @profile.description? %>
|
11
|
+
<h5>
|
12
|
+
<%= t("profile.#{ @profile.subject.class.to_s.downcase }.about") %>:
|
13
|
+
</h5>
|
14
|
+
|
15
|
+
<%= simple_format @profile.description %>
|
16
|
+
<% end %>
|
17
|
+
|
18
|
+
|
10
19
|
<% if @profile.organization? %>
|
11
20
|
<h5>
|
12
21
|
<%= t('profile.organization') %>
|
@@ -50,13 +59,7 @@
|
|
50
59
|
</p>
|
51
60
|
<% end %>
|
52
61
|
|
53
|
-
|
54
|
-
<h5>
|
55
|
-
<%= t("profile.#{ @profile.subject.class.to_s.downcase }.about") %>:
|
56
|
-
</h5>
|
57
|
-
|
58
|
-
<%= simple_format @profile.description %>
|
59
|
-
<% end %>
|
62
|
+
|
60
63
|
|
61
64
|
<% else %>
|
62
65
|
<%= render partial: 'empty' %>
|
@@ -72,6 +75,12 @@
|
|
72
75
|
</h6>
|
73
76
|
|
74
77
|
<%= f.text_field :name, :class => "required" %>
|
78
|
+
|
79
|
+
<h6>
|
80
|
+
<%= f.label :description, t("profile.#{ current_subject.class.to_s.downcase }.about") %>
|
81
|
+
</h6>
|
82
|
+
|
83
|
+
<%= f.text_area :description, :maxlength => 200, :rows => 10 %>
|
75
84
|
|
76
85
|
<h6>
|
77
86
|
<%= f.label :organization, t('profile.organization') %>
|
@@ -93,9 +102,6 @@
|
|
93
102
|
|
94
103
|
<%= f.text_field :country %>
|
95
104
|
|
96
|
-
<%= f.label :description, t("profile.#{ current_subject.class.to_s.downcase }.about") %>
|
97
|
-
|
98
|
-
<%= f.text_area :description, :maxlength => 200, :rows => 10 %>
|
99
105
|
<p>
|
100
106
|
<%= t('required') %>
|
101
107
|
</p>
|
@@ -16,7 +16,7 @@
|
|
16
16
|
<div class="update">
|
17
17
|
<%= form_for(@profile, :url => [ @profile.subject, :profile ]) do |f| %>
|
18
18
|
<%= f.text_field :tag_list, "data-path" => tags_path(format: :json) %>
|
19
|
-
<%= f.submit
|
19
|
+
<%= f.submit %>
|
20
20
|
<% end %>
|
21
21
|
</div>
|
22
22
|
<% end %>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<%= render partial: 'relation/customs/list',
|
2
|
+
object: list %>
|
3
|
+
|
4
|
+
<div id="permissions">
|
5
|
+
<div class="postit rotate">
|
6
|
+
<span class="rotate-int">
|
7
|
+
<%= t 'permission.postit' %>
|
8
|
+
</span>
|
9
|
+
</div>
|
10
|
+
<%= render partial: 'layouts/loading' %>
|
11
|
+
</div>
|
12
|
+
|
13
|
+
<%= javascript_tag do %>
|
14
|
+
$(function() {
|
15
|
+
SocialStream.RelationCustom.index();
|
16
|
+
})
|
17
|
+
<% end %>
|
18
|
+
|
@@ -6,21 +6,7 @@
|
|
6
6
|
<%= t 'relation_custom.title' %>
|
7
7
|
</h2>
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
<div id="permissions">
|
12
|
-
<div class="postit rotate">
|
13
|
-
<span class="rotate-int">
|
14
|
-
<%= t 'permission.postit' %>
|
15
|
-
</span>
|
16
|
-
</div>
|
17
|
-
<%= render partial: 'layouts/loading' %>
|
18
|
-
</div>
|
19
|
-
|
20
|
-
<%= javascript_tag do %>
|
21
|
-
$(function() {
|
22
|
-
SocialStream.RelationCustom.index();
|
23
|
-
})
|
24
|
-
<% end %>
|
9
|
+
<%= render partial: 'relation/customs/index',
|
10
|
+
locals: { list: @customs } %>
|
25
11
|
</section>
|
26
12
|
</section>
|
data/config/locales/en.yml
CHANGED
@@ -266,7 +266,7 @@ en:
|
|
266
266
|
other: '%{count} followers'
|
267
267
|
forgot_password: Forgot you password?
|
268
268
|
frontpage:
|
269
|
-
main_title: Social Stream,
|
269
|
+
main_title: Social Stream, a framework for building distributed social network websites.
|
270
270
|
presentation:
|
271
271
|
modular:
|
272
272
|
header: Modular
|
@@ -610,6 +610,10 @@ en:
|
|
610
610
|
sign_out: Sign out
|
611
611
|
sign_up: Sign up
|
612
612
|
site:
|
613
|
+
current:
|
614
|
+
description: A framework for building distributed social network websites
|
615
|
+
keywords: social stream,social software,framework,ruby on rails
|
616
|
+
title: Social Stream
|
613
617
|
name: Social Stream
|
614
618
|
subject:
|
615
619
|
this_is_you: This is you!
|
data/config/locales/es.yml
CHANGED
@@ -267,8 +267,6 @@ es:
|
|
267
267
|
other: '%{count} seguidores'
|
268
268
|
forgot_password: ¿Olvidaste tu contraseña?
|
269
269
|
frontpage:
|
270
|
-
main_title: Social Stream, el núcleo para construir webs con características de
|
271
|
-
red social distribuída
|
272
270
|
presentation:
|
273
271
|
modular:
|
274
272
|
header: Modular
|
@@ -644,6 +642,10 @@ es:
|
|
644
642
|
sign_out: Salir
|
645
643
|
sign_up: Registrarse
|
646
644
|
site:
|
645
|
+
current:
|
646
|
+
description: Un marco para construir para construir webs con características de red social distribuída
|
647
|
+
keywords: social stream,social software,framework,ruby on rails
|
648
|
+
title: Social Stream
|
647
649
|
name: Social Stream
|
648
650
|
subject:
|
649
651
|
this_is_you: ¡Eres tú!
|
data/config/locales/pt.yml
CHANGED
@@ -218,7 +218,6 @@ pt:
|
|
218
218
|
title: Followings
|
219
219
|
forgot_password: Esqueceu sua senha?
|
220
220
|
frontpage:
|
221
|
-
main_title: Social Stream é a base para a construção de sites de rede social.
|
222
221
|
stats: '%{users} usuários e %{groups} grupos registrados'
|
223
222
|
presentation:
|
224
223
|
modular:
|
@@ -546,8 +545,6 @@ pt:
|
|
546
545
|
sign_in: Entrar
|
547
546
|
sign_out: Sair
|
548
547
|
sign_up: Cadastrar-se
|
549
|
-
site:
|
550
|
-
name: Social Stream
|
551
548
|
subject:
|
552
549
|
this_is_you: Este é você!
|
553
550
|
sure: Você tem certeza?
|
@@ -631,3 +628,10 @@ pt:
|
|
631
628
|
by: Order by
|
632
629
|
last_modified: Last modified
|
633
630
|
most_popular: Most popular
|
631
|
+
site:
|
632
|
+
current:
|
633
|
+
description: A base para a construção de sites de rede social.
|
634
|
+
keywords: social stream,social software,framework,ruby on rails
|
635
|
+
title: Social Stream
|
636
|
+
name: Social Stream
|
637
|
+
|
data/config/locales/zh.yml
CHANGED
@@ -225,7 +225,6 @@ zh:
|
|
225
225
|
other: '%{count} 粉丝'
|
226
226
|
forgot_password: 忘了您的密码吗?
|
227
227
|
frontpage:
|
228
|
-
main_title: 社交视频互动是我们建立社交网的核心.
|
229
228
|
stats: '%{users} 用户 和 %{groups} 已注册的群组'
|
230
229
|
presentation:
|
231
230
|
modular:
|
@@ -546,7 +545,11 @@ zh:
|
|
546
545
|
sign_out: 退出
|
547
546
|
sign_up: 注册
|
548
547
|
site:
|
549
|
-
|
548
|
+
current:
|
549
|
+
description: 社交视频互动是我们建立社交网的核心.
|
550
|
+
keywords: social stream,social software,framework,ruby on rails
|
551
|
+
title: Social Stream
|
552
|
+
name: Social Stream
|
550
553
|
subject:
|
551
554
|
this_is_you: 这是您!
|
552
555
|
sure: 您肯定吗?
|
@@ -1,23 +1,20 @@
|
|
1
1
|
# Monkey path inherited_resources
|
2
2
|
#
|
3
|
-
#
|
4
|
-
#
|
3
|
+
# Patch is already accepted in master
|
4
|
+
# Remove with inherited_resources > 1.4.0
|
5
5
|
module InheritedResources::BaseHelpers
|
6
6
|
private
|
7
7
|
|
8
|
-
|
9
|
-
@resource_params ||=
|
10
|
-
build_resource_params
|
11
|
-
end
|
12
|
-
|
8
|
+
# extract attributes from params
|
13
9
|
def build_resource_params
|
14
|
-
|
15
|
-
rparams
|
16
|
-
|
17
|
-
|
10
|
+
parameters = respond_to?(:permitted_params, true) ? permitted_params : params
|
11
|
+
rparams = [parameters[resource_request_name] || parameters[resource_instance_name] || {}]
|
12
|
+
if without_protection_given?
|
13
|
+
rparams << without_protection
|
14
|
+
else
|
15
|
+
rparams << as_role if role_given?
|
16
|
+
end
|
18
17
|
|
19
|
-
|
20
|
-
whitelist_method = :"#{ resource_request_name }_params"
|
21
|
-
respond_to?(whitelist_method, true) && self.send(whitelist_method)
|
18
|
+
rparams
|
22
19
|
end
|
23
20
|
end
|
@@ -49,10 +49,8 @@ module SocialStream
|
|
49
49
|
|
50
50
|
protected
|
51
51
|
|
52
|
-
def
|
53
|
-
|
54
|
-
|
55
|
-
params.require(self.class.model_class.to_s.underscore.to_sym).permit( *all_allowed_params )
|
52
|
+
def permitted_params
|
53
|
+
params.permit(self.class.model_class.to_s.underscore.to_sym => all_allowed_params)
|
56
54
|
end
|
57
55
|
|
58
56
|
private
|
data/social_stream-base.gemspec
CHANGED
@@ -27,11 +27,11 @@ Gem::Specification.new do |s|
|
|
27
27
|
# Authentication
|
28
28
|
s.add_runtime_dependency('devise', '~> 2.2.3')
|
29
29
|
# CRUD controllers
|
30
|
-
s.add_runtime_dependency('inherited_resources', '~> 1.
|
30
|
+
s.add_runtime_dependency('inherited_resources', '~> 1.4.0')
|
31
31
|
# Slug generation
|
32
32
|
s.add_runtime_dependency('stringex', '~> 1.5.1')
|
33
33
|
# Avatar attachments
|
34
|
-
s.add_runtime_dependency('avatars_for_rails', '~> 1.1.
|
34
|
+
s.add_runtime_dependency('avatars_for_rails', '~> 1.1.1')
|
35
35
|
# jQuery
|
36
36
|
s.add_runtime_dependency('jquery-rails', '>= 3.0.0')
|
37
37
|
# jQuery UI
|
@@ -0,0 +1 @@
|
|
1
|
+
// Overwrite Bootstrap modal, which is replaced with bootstrap-scroll-modal
|
@@ -0,0 +1,276 @@
|
|
1
|
+
/*!
|
2
|
+
* Bootstrap Scroll Modal
|
3
|
+
* Version: 1.2
|
4
|
+
* Made for your convenience by @theericanderson.
|
5
|
+
* A variaton of only small piece of the insanely awesome
|
6
|
+
* Twitter Bootstrap (http://twitter.github.com/bootstrap).
|
7
|
+
*/
|
8
|
+
|
9
|
+
/* =========================================================
|
10
|
+
* bootstrap-modal.js v2.2.1
|
11
|
+
* http://twitter.github.com/bootstrap/javascript.html#modals
|
12
|
+
* =========================================================
|
13
|
+
* Copyright 2012 Twitter, Inc.
|
14
|
+
*
|
15
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
16
|
+
* you may not use this file except in compliance with the License.
|
17
|
+
* You may obtain a copy of the License at
|
18
|
+
*
|
19
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
20
|
+
*
|
21
|
+
* Unless required by applicable law or agreed to in writing, software
|
22
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
23
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
24
|
+
* See the License for the specific language governing permissions and
|
25
|
+
* limitations under the License.
|
26
|
+
* ========================================================= */
|
27
|
+
|
28
|
+
|
29
|
+
!function ($) {
|
30
|
+
|
31
|
+
"use strict"; // jshint ;_;
|
32
|
+
|
33
|
+
/* MODAL CLASS DEFINITION
|
34
|
+
* ====================== */
|
35
|
+
|
36
|
+
var Modal = function (element, options) {
|
37
|
+
this.options = options
|
38
|
+
this.$element = $(element)
|
39
|
+
.delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this))
|
40
|
+
this.options.remote && this.$element.find('.modal-body').load(this.options.remote)
|
41
|
+
}
|
42
|
+
|
43
|
+
Modal.prototype = {
|
44
|
+
|
45
|
+
constructor: Modal
|
46
|
+
|
47
|
+
, toggle: function () {
|
48
|
+
return this[!this.isShown ? 'show' : 'hide']()
|
49
|
+
}
|
50
|
+
|
51
|
+
, show: function () {
|
52
|
+
var that = this
|
53
|
+
, e = $.Event('show')
|
54
|
+
|
55
|
+
if (this.isShown || e.isDefaultPrevented()) return
|
56
|
+
|
57
|
+
this.isShown = true
|
58
|
+
|
59
|
+
this.escape()
|
60
|
+
|
61
|
+
if (this.options.dynamic) {
|
62
|
+
this.$elementWrapper = $('<div class="modal-wrapper" />').insertBefore(this.$element)
|
63
|
+
this.$element.prependTo(this.$elementWrapper)
|
64
|
+
}
|
65
|
+
|
66
|
+
this.backdrop(function () {
|
67
|
+
var transition = $.support.transition && that.$element.hasClass('fade')
|
68
|
+
|
69
|
+
if (!that.$element.parent().length) {
|
70
|
+
that.$element.appendTo(document.body) //don't move modals dom position
|
71
|
+
}
|
72
|
+
|
73
|
+
that.$element
|
74
|
+
.show()
|
75
|
+
|
76
|
+
if (transition) {
|
77
|
+
that.$element[0].offsetWidth // force reflow
|
78
|
+
}
|
79
|
+
|
80
|
+
that.$element
|
81
|
+
.addClass('in')
|
82
|
+
.attr('aria-hidden', false)
|
83
|
+
|
84
|
+
that.enforceFocus()
|
85
|
+
|
86
|
+
transition ?
|
87
|
+
that.$element.one($.support.transition.end, function () { that.$element.trigger('shown') }) :
|
88
|
+
that.$element.focus().trigger('shown')
|
89
|
+
|
90
|
+
})
|
91
|
+
}
|
92
|
+
|
93
|
+
, hide: function ( e ) {
|
94
|
+
e && e.preventDefault()
|
95
|
+
|
96
|
+
var that = this
|
97
|
+
|
98
|
+
e = $.Event('hide')
|
99
|
+
|
100
|
+
this.$element.trigger(e)
|
101
|
+
|
102
|
+
if (!this.isShown || e.isDefaultPrevented()) return
|
103
|
+
|
104
|
+
this.isShown = false
|
105
|
+
|
106
|
+
this.escape()
|
107
|
+
|
108
|
+
$(document).off('focusin.modal')
|
109
|
+
|
110
|
+
this.$element
|
111
|
+
.removeClass('in')
|
112
|
+
.attr('aria-hidden', true)
|
113
|
+
|
114
|
+
$.support.transition && this.$element.hasClass('fade') ?
|
115
|
+
this.hideWithTransition() :
|
116
|
+
this.hideModal()
|
117
|
+
}
|
118
|
+
|
119
|
+
, enforceFocus: function () {
|
120
|
+
var that = this
|
121
|
+
$(document).on('focusin.modal', function (e) {
|
122
|
+
if (that.$element[0] !== e.target && !that.$element.has(e.target).length) {
|
123
|
+
that.$element.focus()
|
124
|
+
}
|
125
|
+
})
|
126
|
+
}
|
127
|
+
|
128
|
+
, escape: function () {
|
129
|
+
var that = this
|
130
|
+
if (this.isShown && this.options.keyboard) {
|
131
|
+
this.$element.on('keyup.dismiss.modal', function ( e ) {
|
132
|
+
e.which == 27 && that.hide()
|
133
|
+
})
|
134
|
+
} else if (!this.isShown) {
|
135
|
+
this.$element.off('keyup.dismiss.modal')
|
136
|
+
}
|
137
|
+
}
|
138
|
+
|
139
|
+
, hideWithTransition: function () {
|
140
|
+
var that = this
|
141
|
+
, timeout = setTimeout(function () {
|
142
|
+
that.$element.off($.support.transition.end)
|
143
|
+
that.hideModal()
|
144
|
+
}, 500)
|
145
|
+
|
146
|
+
this.$element.one($.support.transition.end, function () {
|
147
|
+
clearTimeout(timeout)
|
148
|
+
that.hideModal()
|
149
|
+
})
|
150
|
+
}
|
151
|
+
|
152
|
+
, hideModal: function (that) {
|
153
|
+
this.$element
|
154
|
+
.hide()
|
155
|
+
.trigger('hidden')
|
156
|
+
|
157
|
+
if (this.options.dynamic) {
|
158
|
+
this.$element.insertAfter(this.$elementWrapper)
|
159
|
+
this.$elementWrapper.remove()
|
160
|
+
this.$elementWrapper = null
|
161
|
+
}
|
162
|
+
|
163
|
+
this.backdrop()
|
164
|
+
}
|
165
|
+
|
166
|
+
, removeBackdrop: function () {
|
167
|
+
this.$element.insertAfter(this.$backdrop)
|
168
|
+
this.$backdrop.remove()
|
169
|
+
this.$backdrop = null
|
170
|
+
$('body').css({ 'overflow' : '' })
|
171
|
+
}
|
172
|
+
|
173
|
+
, backdrop: function (callback) {
|
174
|
+
var that = this
|
175
|
+
, animate = this.$element.hasClass('fade') ? 'fade' : ''
|
176
|
+
|
177
|
+
if (this.isShown && this.options.backdrop) {
|
178
|
+
var doAnimate = $.support.transition && animate
|
179
|
+
|
180
|
+
this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
|
181
|
+
.appendTo(document.body)
|
182
|
+
|
183
|
+
// Below are Bootstrap Scroll Modal additions to the backdrop function.
|
184
|
+
|
185
|
+
if (!that.$element.parent().length) {
|
186
|
+
this.$backdrop.appendTo(document.body) // don't move modals dom position
|
187
|
+
} else if (this.options.dynamic) {
|
188
|
+
this.$backdrop.insertBefore(this.$elementWrapper)
|
189
|
+
} else {
|
190
|
+
this.$backdrop.insertBefore(this.$element)
|
191
|
+
}
|
192
|
+
|
193
|
+
if (this.options.dynamic) {
|
194
|
+
this.$elementWrapper.prependTo(this.$backdrop)
|
195
|
+
.delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this))
|
196
|
+
} else {
|
197
|
+
this.$element.prependTo(this.$backdrop)
|
198
|
+
.delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this))
|
199
|
+
}
|
200
|
+
|
201
|
+
$('body').css({ 'overflow' : 'hidden' })
|
202
|
+
|
203
|
+
this.$backdrop.on('click', function(e){
|
204
|
+
if (that.options.backdrop == 'static') {
|
205
|
+
$.proxy(that.$element[0].focus, that.$element[0])
|
206
|
+
} else if (e.target == e.delegateTarget) {
|
207
|
+
that.hide(e)
|
208
|
+
}
|
209
|
+
})
|
210
|
+
|
211
|
+
// end additions
|
212
|
+
|
213
|
+
if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
|
214
|
+
|
215
|
+
this.$backdrop.addClass('in')
|
216
|
+
|
217
|
+
doAnimate ?
|
218
|
+
this.$backdrop.one($.support.transition.end, callback) :
|
219
|
+
callback()
|
220
|
+
|
221
|
+
} else if (!this.isShown && this.$backdrop) {
|
222
|
+
this.$backdrop.removeClass('in')
|
223
|
+
|
224
|
+
$.support.transition && this.$element.hasClass('fade')?
|
225
|
+
this.$backdrop.one($.support.transition.end, $.proxy(this.removeBackdrop, this)) :
|
226
|
+
this.removeBackdrop()
|
227
|
+
|
228
|
+
} else if (callback) {
|
229
|
+
callback()
|
230
|
+
}
|
231
|
+
}
|
232
|
+
}
|
233
|
+
|
234
|
+
|
235
|
+
/* MODAL PLUGIN DEFINITION
|
236
|
+
* ======================= */
|
237
|
+
|
238
|
+
$.fn.modal = function (option) {
|
239
|
+
return this.each(function () {
|
240
|
+
var $this = $(this)
|
241
|
+
, data = $this.data('modal')
|
242
|
+
, options = $.extend({}, $.fn.modal.defaults, $this.data(), typeof option == 'object' && option)
|
243
|
+
if (!data) $this.data('modal', (data = new Modal(this, options)))
|
244
|
+
if (typeof option == 'string') data[option]()
|
245
|
+
else if (options.show) data.show()
|
246
|
+
})
|
247
|
+
}
|
248
|
+
|
249
|
+
$.fn.modal.defaults = {
|
250
|
+
backdrop: true
|
251
|
+
, keyboard: true
|
252
|
+
, show: true
|
253
|
+
}
|
254
|
+
|
255
|
+
$.fn.modal.Constructor = Modal
|
256
|
+
|
257
|
+
|
258
|
+
/* MODAL DATA-API
|
259
|
+
* ============== */
|
260
|
+
|
261
|
+
$(document).on('click.modal.data-api', '[data-toggle="modal"]', function (e) {
|
262
|
+
var $this = $(this)
|
263
|
+
, href = $this.attr('href')
|
264
|
+
, $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7
|
265
|
+
, option = $target.data('modal') ? 'toggle' : $.extend({ remote:!/#/.test(href) && href }, $target.data(), $this.data())
|
266
|
+
|
267
|
+
e.preventDefault()
|
268
|
+
|
269
|
+
$target
|
270
|
+
.modal(option)
|
271
|
+
.one('hide', function () {
|
272
|
+
$this.focus()
|
273
|
+
})
|
274
|
+
})
|
275
|
+
|
276
|
+
}(window.jQuery);
|
@@ -0,0 +1,70 @@
|
|
1
|
+
/*!
|
2
|
+
* Bootstrap Scroll Modal
|
3
|
+
* Version: 1.2
|
4
|
+
* Made for your convenience by @theericanderson
|
5
|
+
* A variaton of but a small piece of the insanely awesome Twitter Bootstrap (http://twitter.github.com/bootstrap)
|
6
|
+
*/
|
7
|
+
|
8
|
+
.modal-backdrop {
|
9
|
+
overflow-x: hidden;
|
10
|
+
overflow-y: auto;
|
11
|
+
background-color: rgba(0, 0, 0, 0.8);
|
12
|
+
}
|
13
|
+
.modal-backdrop.fade {
|
14
|
+
background-color: rgba(0, 0, 0, 0.0);
|
15
|
+
}
|
16
|
+
.modal-backdrop.fade.in {
|
17
|
+
background: rgba(0, 0, 0, 0.8);
|
18
|
+
}
|
19
|
+
.modal-backdrop.in, .modal-backdrop.fade.in {
|
20
|
+
opacity: 1.0;
|
21
|
+
filter: alpha(opacity=100);
|
22
|
+
}
|
23
|
+
.modal-wrapper {
|
24
|
+
position: relative;
|
25
|
+
top: 50px;
|
26
|
+
left: 50%;
|
27
|
+
z-index: 1050;
|
28
|
+
width: 560px;
|
29
|
+
margin-left: -280px;
|
30
|
+
margin-bottom: 100px;
|
31
|
+
overflow: visible;
|
32
|
+
}
|
33
|
+
.modal-wrapper .modal {
|
34
|
+
position: static;
|
35
|
+
margin: 0;
|
36
|
+
z-index: 1060;
|
37
|
+
}
|
38
|
+
/* Some different styling for dynamic height modals */
|
39
|
+
.modal-wrapper .modal .modal-body {
|
40
|
+
overflow-y: visible;
|
41
|
+
max-height: none;
|
42
|
+
z-index: 1060; /* IE8 fix for radio button focus / blur issue */
|
43
|
+
}
|
44
|
+
|
45
|
+
/* Styles to ensure Scroll Modal works on smaller browsers, specifically mobile. */
|
46
|
+
@media (max-width: 767px) {
|
47
|
+
.modal-wrapper {
|
48
|
+
position: relative;
|
49
|
+
top: 50px;
|
50
|
+
left: 20%;
|
51
|
+
z-index: 1050;
|
52
|
+
width: 70%;
|
53
|
+
margin-left: 0px;
|
54
|
+
margin-bottom: 80px;
|
55
|
+
overflow: visible;
|
56
|
+
}
|
57
|
+
}
|
58
|
+
|
59
|
+
@media (max-width : 480px) {
|
60
|
+
.modal-wrapper {
|
61
|
+
position: relative;
|
62
|
+
top: 50px;
|
63
|
+
left: 10%;
|
64
|
+
z-index: 1050;
|
65
|
+
width: 80%;
|
66
|
+
margin-left: 0px;
|
67
|
+
margin-bottom: 80px;
|
68
|
+
overflow: visible;
|
69
|
+
}
|
70
|
+
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: social_stream-base
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GING - DIT - UPM
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-06-
|
11
|
+
date: 2013-06-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: deep_merge
|
@@ -100,14 +100,14 @@ dependencies:
|
|
100
100
|
requirements:
|
101
101
|
- - ~>
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: 1.
|
103
|
+
version: 1.4.0
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - ~>
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: 1.
|
110
|
+
version: 1.4.0
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: stringex
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -128,14 +128,14 @@ dependencies:
|
|
128
128
|
requirements:
|
129
129
|
- - ~>
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: 1.1.
|
131
|
+
version: 1.1.1
|
132
132
|
type: :runtime
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - ~>
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: 1.1.
|
138
|
+
version: 1.1.1
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
140
|
name: jquery-rails
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
@@ -998,6 +998,7 @@ files:
|
|
998
998
|
- app/views/profiles/update.js.erb
|
999
999
|
- app/views/relation/customs/_custom.html.erb
|
1000
1000
|
- app/views/relation/customs/_form.html.erb
|
1001
|
+
- app/views/relation/customs/_index.html.erb
|
1001
1002
|
- app/views/relation/customs/_list.html.erb
|
1002
1003
|
- app/views/relation/customs/create.js.erb
|
1003
1004
|
- app/views/relation/customs/destroy.js.erb
|
@@ -1196,7 +1197,9 @@ files:
|
|
1196
1197
|
- spec/support/mock.rb
|
1197
1198
|
- spec/views/profiles_spec.rb
|
1198
1199
|
- spec/views/settings_spec.rb
|
1200
|
+
- vendor/assets/javascripts/bootstrap-modal.js
|
1199
1201
|
- vendor/assets/javascripts/bootstrap-multiselect.js
|
1202
|
+
- vendor/assets/javascripts/bootstrap-scroll-modal.js
|
1200
1203
|
- vendor/assets/javascripts/colorfont.js
|
1201
1204
|
- vendor/assets/javascripts/d3.geom.js
|
1202
1205
|
- vendor/assets/javascripts/d3.js
|
@@ -1216,6 +1219,7 @@ files:
|
|
1216
1219
|
- vendor/assets/javascripts/jquery.validate.old.js
|
1217
1220
|
- vendor/assets/javascripts/jquery.watermark.js
|
1218
1221
|
- vendor/assets/javascripts/superfish.js
|
1222
|
+
- vendor/assets/stylesheets/bootstrap-scroll-modal.css
|
1219
1223
|
- vendor/assets/stylesheets/carousel.css
|
1220
1224
|
- vendor/assets/stylesheets/chosen-sprite.png
|
1221
1225
|
- vendor/assets/stylesheets/chosen.css
|