inline_forms 1.4.1 → 1.4.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/app/assets/javascripts/inline_forms.js +34 -0
- data/lib/app/assets/javascripts/inline_forms_application.js +3 -2
- data/lib/app/assets/javascripts/jquery.qtip.js +3395 -0
- data/lib/app/assets/stylesheets/inline_forms.css +14 -0
- data/lib/app/assets/stylesheets/inline_forms_application.css +1 -1
- data/lib/app/assets/stylesheets/jquery.qtip.css +567 -0
- data/lib/app/views/inline_forms/_new.html.erb +4 -10
- data/lib/inline_forms/version.rb +1 -1
- metadata +5 -5
- data/lib/app/assets/javascripts/jquery.tools/jquery.tools.min.js +0 -13
- data/lib/app/assets/javascripts/validation_tooltips.js +0 -19
- data/lib/app/assets/stylesheets/validation_tooltips.css +0 -26
@@ -11,6 +11,7 @@
|
|
11
11
|
<script type="text/javascript">
|
12
12
|
$(function() { $("#flash").delay(1000).fadeTo('slow', 0.33); } );
|
13
13
|
</script>
|
14
|
+
<span class="tfdssdfsdfsdranslation_missing" title="translation missing: en.activerecord.attributes.apartment.name">Name</span>
|
14
15
|
<%= form_tag send(@Klass.to_s.underscore.pluralize + '_path', :update => @update_span,
|
15
16
|
:parent_class => @parent_class,
|
16
17
|
:parent_id => @parent_id ),
|
@@ -29,17 +30,10 @@
|
|
29
30
|
<% unless form_element.to_sym == :associated -%>
|
30
31
|
<% css_class_id = "attribute_#{attribute}_#{@object.id}" -%>
|
31
32
|
<tr>
|
32
|
-
<td valign="top">
|
33
|
-
<div class='<%=
|
34
|
-
<%=
|
33
|
+
<td valign="top" class="<%= 'has_validations ' if @object.has_validations_for?(attribute) -%>" validation-hint="<%= validation_hints_as_list_for(@object, attribute) -%>">
|
34
|
+
<div class='<%= "attribute_name attribute_#{attribute} form_element_#{form_element}" -%>' >
|
35
|
+
<%= @object.class.human_attribute_name(attribute) -%>
|
35
36
|
</div>
|
36
|
-
<% if @object.has_validations_for?(attribute) %>
|
37
|
-
<div class='validation_help_tooltip'>
|
38
|
-
<div class='validation_help_content'>
|
39
|
-
<%= validation_hints_as_list_for(@object, attribute) -%>
|
40
|
-
</div>
|
41
|
-
</div>
|
42
|
-
<% end -%>
|
43
37
|
</td>
|
44
38
|
<td valign="top">
|
45
39
|
<div class='<%= "attribute_value attribute_#{attribute} form_element_#{form_element}" -%>' >
|
data/lib/inline_forms/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: inline_forms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.2
|
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-07-
|
12
|
+
date: 2012-07-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rvm
|
@@ -180,14 +180,14 @@ files:
|
|
180
180
|
- lib/app/assets/images/tooltip-bubble-up-right.png
|
181
181
|
- lib/app/assets/images/trash.png
|
182
182
|
- lib/app/assets/javascripts/ckeditor/config.js
|
183
|
+
- lib/app/assets/javascripts/inline_forms.js
|
183
184
|
- lib/app/assets/javascripts/inline_forms_application.js
|
184
|
-
- lib/app/assets/javascripts/jquery.
|
185
|
-
- lib/app/assets/javascripts/validation_tooltips.js
|
185
|
+
- lib/app/assets/javascripts/jquery.qtip.js
|
186
186
|
- lib/app/assets/stylesheets/devise.css
|
187
187
|
- lib/app/assets/stylesheets/inline_forms.css
|
188
188
|
- lib/app/assets/stylesheets/inline_forms_application.css
|
189
|
+
- lib/app/assets/stylesheets/jquery.qtip.css
|
189
190
|
- lib/app/assets/stylesheets/ui-lightness/jquery-ui-1.8.17.custom.css
|
190
|
-
- lib/app/assets/stylesheets/validation_tooltips.css
|
191
191
|
- lib/app/controllers/geo_code_curacao_controller.rb
|
192
192
|
- lib/app/controllers/inline_forms_application_controller.rb
|
193
193
|
- lib/app/controllers/inline_forms_controller.rb
|
@@ -1,13 +0,0 @@
|
|
1
|
-
/*!
|
2
|
-
* jQuery Tools v1.2.6 - The missing UI library for the Web
|
3
|
-
*
|
4
|
-
* tooltip/tooltip.js
|
5
|
-
* tooltip/tooltip.slide.js
|
6
|
-
*
|
7
|
-
* NO COPYRIGHTS OR LICENSES. DO WHAT YOU LIKE.
|
8
|
-
*
|
9
|
-
* http://flowplayer.org/tools/
|
10
|
-
*
|
11
|
-
*/
|
12
|
-
(function(a){a.tools=a.tools||{version:"v1.2.6"},a.tools.tooltip={conf:{effect:"toggle",fadeOutSpeed:"fast",predelay:0,delay:30,opacity:1,tip:0,fadeIE:!1,position:["top","center"],offset:[0,0],relative:!1,cancelDefault:!0,events:{def:"mouseenter,mouseleave",input:"focus,blur",widget:"focus mouseenter,blur mouseleave",tooltip:"mouseenter,mouseleave"},layout:"<div/>",tipClass:"tooltip"},addEffect:function(a,c,d){b[a]=[c,d]}};var b={toggle:[function(a){var b=this.getConf(),c=this.getTip(),d=b.opacity;d<1&&c.css({opacity:d}),c.show(),a.call()},function(a){this.getTip().hide(),a.call()}],fade:[function(b){var c=this.getConf();!a.browser.msie||c.fadeIE?this.getTip().fadeTo(c.fadeInSpeed,c.opacity,b):(this.getTip().show(),b())},function(b){var c=this.getConf();!a.browser.msie||c.fadeIE?this.getTip().fadeOut(c.fadeOutSpeed,b):(this.getTip().hide(),b())}]};function c(b,c,d){var e=d.relative?b.position().top:b.offset().top,f=d.relative?b.position().left:b.offset().left,g=d.position[0];e-=c.outerHeight()-d.offset[0],f+=b.outerWidth()+d.offset[1],/iPad/i.test(navigator.userAgent)&&(e-=a(window).scrollTop());var h=c.outerHeight()+b.outerHeight();g=="center"&&(e+=h/2),g=="bottom"&&(e+=h),g=d.position[1];var i=c.outerWidth()+b.outerWidth();g=="center"&&(f-=i/2),g=="left"&&(f-=i);return{top:e,left:f}}function d(d,e){var f=this,g=d.add(f),h,i=0,j=0,k=d.attr("title"),l=d.attr("data-tooltip"),m=b[e.effect],n,o=d.is(":input"),p=o&&d.is(":checkbox, :radio, select, :button, :submit"),q=d.attr("type"),r=e.events[q]||e.events[o?p?"widget":"input":"def"];if(!m)throw"Nonexistent effect \""+e.effect+"\"";r=r.split(/,\s*/);if(r.length!=2)throw"Tooltip: bad events configuration for "+q;d.bind(r[0],function(a){clearTimeout(i),e.predelay?j=setTimeout(function(){f.show(a)},e.predelay):f.show(a)}).bind(r[1],function(a){clearTimeout(j),e.delay?i=setTimeout(function(){f.hide(a)},e.delay):f.hide(a)}),k&&e.cancelDefault&&(d.removeAttr("title"),d.data("title",k)),a.extend(f,{show:function(b){if(!h){l?h=a(l):e.tip?h=a(e.tip).eq(0):k?h=a(e.layout).addClass(e.tipClass).appendTo(document.body).hide().append(k):(h=d.next(),h.length||(h=d.parent().next()));if(!h.length)throw"Cannot find tooltip for "+d}if(f.isShown())return f;h.stop(!0,!0);var o=c(d,h,e);e.tip&&h.html(d.data("title")),b=a.Event(),b.type="onBeforeShow",g.trigger(b,[o]);if(b.isDefaultPrevented())return f;o=c(d,h,e),h.css({position:"absolute",top:o.top,left:o.left}),n=!0,m[0].call(f,function(){b.type="onShow",n="full",g.trigger(b)});var p=e.events.tooltip.split(/,\s*/);h.data("__set")||(h.unbind(p[0]).bind(p[0],function(){clearTimeout(i),clearTimeout(j)}),p[1]&&!d.is("input:not(:checkbox, :radio), textarea")&&h.unbind(p[1]).bind(p[1],function(a){a.relatedTarget!=d[0]&&d.trigger(r[1].split(" ")[0])}),e.tip||h.data("__set",!0));return f},hide:function(c){if(!h||!f.isShown())return f;c=a.Event(),c.type="onBeforeHide",g.trigger(c);if(!c.isDefaultPrevented()){n=!1,b[e.effect][1].call(f,function(){c.type="onHide",g.trigger(c)});return f}},isShown:function(a){return a?n=="full":n},getConf:function(){return e},getTip:function(){return h},getTrigger:function(){return d}}),a.each("onHide,onBeforeShow,onShow,onBeforeHide".split(","),function(b,c){a.isFunction(e[c])&&a(f).bind(c,e[c]),f[c]=function(b){b&&a(f).bind(c,b);return f}})}a.fn.tooltip=function(b){var c=this.data("tooltip");if(c)return c;b=a.extend(!0,{},a.tools.tooltip.conf,b),typeof b.position=="string"&&(b.position=b.position.split(/,?\s/)),this.each(function(){c=new d(a(this),b),a(this).data("tooltip",c)});return b.api?c:this}})(jQuery);
|
13
|
-
(function(a){var b=a.tools.tooltip;a.extend(b.conf,{direction:"up",bounce:!1,slideOffset:10,slideInSpeed:200,slideOutSpeed:200,slideFade:!a.browser.msie});var c={up:["-","top"],down:["+","top"],left:["-","left"],right:["+","left"]};b.addEffect("slide",function(a){var b=this.getConf(),d=this.getTip(),e=b.slideFade?{opacity:b.opacity}:{},f=c[b.direction]||c.up;e[f[1]]=f[0]+"="+b.slideOffset,b.slideFade&&d.css({opacity:0}),d.show().animate(e,b.slideInSpeed,a)},function(b){var d=this.getConf(),e=d.slideOffset,f=d.slideFade?{opacity:0}:{},g=c[d.direction]||c.up,h=""+g[0];d.bounce&&(h=h=="+"?"-":"+"),f[g[1]]=h+"="+e,this.getTip().animate(f,d.slideOutSpeed,function(){a(this).hide(),b.call()})})})(jQuery);
|
@@ -1,19 +0,0 @@
|
|
1
|
-
//http://flowplayer.org/tools/forum/30/37281
|
2
|
-
$(document).ready(function() {
|
3
|
-
$(document).delegate(".has_validations", "mouseover", function() {
|
4
|
-
if (!$(this).data("tooltip")) {
|
5
|
-
$(this).tooltip({
|
6
|
-
effect: "fade",
|
7
|
-
fadeInSpeed: 300,
|
8
|
-
fadeOutSpeed: 150,
|
9
|
-
opacity: 0.9,
|
10
|
-
position: 'top right',
|
11
|
-
offset: [ 25, 20 ],
|
12
|
-
// positioning is NOT according to documentation! Should be relative to parent element but it is not.'
|
13
|
-
relative: true,
|
14
|
-
delay: 100
|
15
|
-
});
|
16
|
-
$(this).trigger("mouseover");
|
17
|
-
}
|
18
|
-
});
|
19
|
-
});
|
@@ -1,26 +0,0 @@
|
|
1
|
-
.validation_help_tooltip {
|
2
|
-
display: none;
|
3
|
-
width: 250px;
|
4
|
-
height: 175px;
|
5
|
-
background-image: url('/assets/tooltip-bubble-up-left.png');
|
6
|
-
background-color: transparent;
|
7
|
-
}
|
8
|
-
|
9
|
-
.validation_help_content {
|
10
|
-
margin-top: 18px;
|
11
|
-
margin-left: 18px;
|
12
|
-
font-size: 9pt;
|
13
|
-
color: #3399cc;
|
14
|
-
height: 100px;
|
15
|
-
width: 215px;
|
16
|
-
overflow: auto;
|
17
|
-
}
|
18
|
-
|
19
|
-
.validation_help_content ul {
|
20
|
-
}
|
21
|
-
|
22
|
-
.validation_help_content ul li {
|
23
|
-
padding: 0;
|
24
|
-
margin: 0;
|
25
|
-
margin-bottom: 3px;
|
26
|
-
}
|