hallo_rails 0.0.6 → 0.0.7
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.
data/lib/hallo_rails.rb
CHANGED
@@ -23,6 +23,7 @@ module HalloRails
|
|
23
23
|
update_url: "/#{object_name.pluralize}/#{object.to_param}",
|
24
24
|
blank_text: "<i>Click to Edit</i>".html_safe
|
25
25
|
|
26
|
+
options[:content] = sanitize(options[:content]) if options[:sanitize]
|
26
27
|
content_tag options[:tag], options[:content].present? ? options[:content] : options[:blank_text],
|
27
28
|
class: "#{'editable' if !options.has_key?(:editable) or options[:editable]}",
|
28
29
|
id: "#{object_name}_#{method.to_s}",
|
@@ -39,7 +40,7 @@ module HalloRails
|
|
39
40
|
options.reverse_merge! tag: :div,
|
40
41
|
content: object.send(method).try(:html_safe),
|
41
42
|
blank_text: "<i>Click to Edit</i>".html_safe
|
42
|
-
|
43
|
+
options[:content] = sanitize(options[:content]) if options[:sanitize]
|
43
44
|
content_tag( options[:tag], options[:content].present? ? options[:content] : options[:blank_text],
|
44
45
|
class: 'form_editable',
|
45
46
|
id: "#{object_name}_#{method.to_s}",
|
data/lib/hallo_rails/version.rb
CHANGED
@@ -2517,7 +2517,8 @@
|
|
2517
2517
|
return;
|
2518
2518
|
}
|
2519
2519
|
_this._updatePosition(position, data.selection);
|
2520
|
-
|
2520
|
+
if (_this.toolbar.html() != '')
|
2521
|
+
return _this.toolbar.show();
|
2521
2522
|
});
|
2522
2523
|
this.element.bind('hallounselected', function(event, data) {
|
2523
2524
|
return _this.toolbar.hide();
|
@@ -12,10 +12,11 @@ default_plugins =
|
|
12
12
|
'hallo-image-insert-edit': {}
|
13
13
|
|
14
14
|
init = ->
|
15
|
+
context = this
|
15
16
|
$('.editable, .form_editable').each ->
|
16
17
|
$el = $(this)
|
17
|
-
plugins = $el.data('editable-plugins') || default_plugins
|
18
|
-
options = $el.data('editable-options') || default_options
|
18
|
+
plugins = $el.data('editable-plugins') || context.default_plugins
|
19
|
+
options = $el.data('editable-options') || context.default_options
|
19
20
|
$.extend options, { plugins: plugins }
|
20
21
|
$el.hallo options
|
21
22
|
|
@@ -26,6 +27,7 @@ init = ->
|
|
26
27
|
method_data = {}
|
27
28
|
method_data[$el.data('method')] = $el.html()
|
28
29
|
data[ $el.data('model') ] = method_data
|
30
|
+
data.in_place_update = true
|
29
31
|
for property_name of $el.data()
|
30
32
|
if typeof $el.data(property_name) == 'string' and property_name != 'method' and
|
31
33
|
property_name != 'model' and property_name != 'updateUrl'
|
@@ -0,0 +1,148 @@
|
|
1
|
+
.hallotoolbar, .dropdown-menu{
|
2
|
+
@include border-radius;
|
3
|
+
border: 1px solid #AAA;
|
4
|
+
padding: 3px;
|
5
|
+
background-color: #EEE;
|
6
|
+
}
|
7
|
+
|
8
|
+
.dropdown-menu{
|
9
|
+
z-index: 1000;
|
10
|
+
}
|
11
|
+
|
12
|
+
.blockselector{
|
13
|
+
@include border-radius(3px);
|
14
|
+
background-color: #E6E6E6;
|
15
|
+
border: 1px solid #ccc;
|
16
|
+
cursor: pointer;
|
17
|
+
color: #555;
|
18
|
+
|
19
|
+
&:hover{
|
20
|
+
border: 1px solid #777;
|
21
|
+
}
|
22
|
+
}
|
23
|
+
|
24
|
+
.hallo_insert_file_loader{
|
25
|
+
margin: 100px auto;
|
26
|
+
width: 32px;
|
27
|
+
height: 32px;
|
28
|
+
background-image: asset-url('ajax_loader/ajax-loader-bold.gif', 'image');
|
29
|
+
}
|
30
|
+
|
31
|
+
.hallotoolbar{
|
32
|
+
z-index: 10000;
|
33
|
+
}
|
34
|
+
|
35
|
+
.ui-dialog{
|
36
|
+
z-index: 10001 !important;
|
37
|
+
}
|
38
|
+
|
39
|
+
.editable:hover:before, .hallo_updating:before{
|
40
|
+
font-size: 14px;
|
41
|
+
color: orange;
|
42
|
+
display: block;
|
43
|
+
width: 100%;
|
44
|
+
height: 100%;
|
45
|
+
padding-top: 7px;
|
46
|
+
padding-bottom: 7px;
|
47
|
+
position: absolute;
|
48
|
+
top: 0;
|
49
|
+
left: 0;
|
50
|
+
text-align: center;
|
51
|
+
z-index: 1;
|
52
|
+
background-color: white;
|
53
|
+
border: 1px dashed orange;
|
54
|
+
@include opacity(0.9);
|
55
|
+
@include border-radius;
|
56
|
+
}
|
57
|
+
|
58
|
+
.editable:hover:before{
|
59
|
+
content: "Zum Bearbeiten klicken"; /* "Click to edit" Modify to your language */
|
60
|
+
}
|
61
|
+
|
62
|
+
.hallo_updating:before{
|
63
|
+
content: "Speichern..."; /* "Saving..." Modify to your language */
|
64
|
+
}
|
65
|
+
|
66
|
+
.editable.inEditMode:hover:before{
|
67
|
+
display: none;
|
68
|
+
}
|
69
|
+
|
70
|
+
|
71
|
+
/* Hallo-HTML */
|
72
|
+
|
73
|
+
.ui-dialog-content{
|
74
|
+
|
75
|
+
textarea.html_source{
|
76
|
+
width: 98%;
|
77
|
+
height: 94%;
|
78
|
+
min-height: 400px;
|
79
|
+
}
|
80
|
+
|
81
|
+
padding: 10px 15px 10px 0 !important;
|
82
|
+
|
83
|
+
#directory_loader, #no_files{
|
84
|
+
padding-top: 60px;
|
85
|
+
margin-top: 0;
|
86
|
+
}
|
87
|
+
|
88
|
+
#folders{
|
89
|
+
width: 200px;
|
90
|
+
}
|
91
|
+
|
92
|
+
#previews{
|
93
|
+
width: 320px;
|
94
|
+
}
|
95
|
+
}
|
96
|
+
|
97
|
+
|
98
|
+
/* Hallo-Image-Insert-Edit */
|
99
|
+
|
100
|
+
|
101
|
+
#hallo_img_properties{
|
102
|
+
margin-left: 10px;
|
103
|
+
width: 99%;
|
104
|
+
margin-bottom: 15px;
|
105
|
+
padding: 5px;
|
106
|
+
|
107
|
+
display: table;
|
108
|
+
|
109
|
+
.hallo_img_property_row{
|
110
|
+
display: table-row;
|
111
|
+
|
112
|
+
.hallo_img_property_col{
|
113
|
+
display: table-cell;
|
114
|
+
padding-right: 7px;
|
115
|
+
padding-bottom: 5px;
|
116
|
+
|
117
|
+
&:first-child{
|
118
|
+
width: 60px;
|
119
|
+
}
|
120
|
+
|
121
|
+
.img_property_entry{
|
122
|
+
padding-right: 7px;
|
123
|
+
}
|
124
|
+
}
|
125
|
+
}
|
126
|
+
|
127
|
+
#hallo_img_source, #hallo_img_alt{
|
128
|
+
width: 99%;
|
129
|
+
}
|
130
|
+
|
131
|
+
#hallo_img_width, #hallo_img_height{
|
132
|
+
width: 40px;
|
133
|
+
}
|
134
|
+
|
135
|
+
#hallo_img_padding{
|
136
|
+
width: 130px;
|
137
|
+
}
|
138
|
+
}
|
139
|
+
|
140
|
+
#hallo_img_file_select_ui{
|
141
|
+
height: 300px;
|
142
|
+
|
143
|
+
#hallo_img_file_select_title{
|
144
|
+
margin-bottom: 10px;
|
145
|
+
margin-left: 10px;
|
146
|
+
font-size: 14px;
|
147
|
+
}
|
148
|
+
}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hallo_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-11-
|
12
|
+
date: 2012-11-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -45,6 +45,7 @@ files:
|
|
45
45
|
- vendor/assets/javascripts/hallo.js
|
46
46
|
- vendor/assets/javascripts/hallo_rails.js.coffee
|
47
47
|
- vendor/assets/javascripts/rangy-core.js
|
48
|
+
- vendor/assets/stylesheets/hallo_rails.css.scss
|
48
49
|
homepage: ''
|
49
50
|
licenses: []
|
50
51
|
post_install_message:
|
@@ -59,7 +60,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
59
60
|
version: '0'
|
60
61
|
segments:
|
61
62
|
- 0
|
62
|
-
hash:
|
63
|
+
hash: -3252560071223483238
|
63
64
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
64
65
|
none: false
|
65
66
|
requirements:
|
@@ -68,7 +69,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
68
69
|
version: '0'
|
69
70
|
segments:
|
70
71
|
- 0
|
71
|
-
hash:
|
72
|
+
hash: -3252560071223483238
|
72
73
|
requirements: []
|
73
74
|
rubyforge_project:
|
74
75
|
rubygems_version: 1.8.24
|