muck-engine 0.3.0 → 0.3.1
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/README.rdoc +17 -0
- data/VERSION +1 -1
- data/app/helpers/muck_engine_helper.rb +6 -6
- data/muck-engine.gemspec +2 -2
- data/test/rails_root/public/javascripts/muck.js +0 -14
- metadata +2 -2
data/README.rdoc
CHANGED
@@ -89,6 +89,23 @@ easing - http://gsgd.co.uk/sandbox/jquery/easing/
|
|
89
89
|
fancyzoom - http://orderedlist.com/articles/fancyzoom-meet-jquery
|
90
90
|
|
91
91
|
|
92
|
+
=== jGrowl
|
93
|
+
If you wish to enable jgrowl then add the following lines to application.js and customize each as desired:
|
94
|
+
|
95
|
+
jQuery.jGrowl.defaults.position = 'center';
|
96
|
+
|
97
|
+
jQuery.jGrowl.info = function(msg){
|
98
|
+
jQuery.jGrowl(msg);
|
99
|
+
}
|
100
|
+
|
101
|
+
jQuery.jGrowl.warn = function(msg){
|
102
|
+
jQuery.jGrowl(msg);
|
103
|
+
}
|
104
|
+
|
105
|
+
jQuery.jGrowl.error = function(msg){
|
106
|
+
jQuery.jGrowl(msg, {sticky:true});
|
107
|
+
}
|
108
|
+
|
92
109
|
== Rake tasks
|
93
110
|
The muck engine comes with an abundance of rake tasks mostly meant for development of muck engines. If you want to use these tasks
|
94
111
|
be sure that you first do a sudo install muck-engine. Next define the muck gems you are using in a file RAILS_ROOT/lib/tasks/muck.rake.
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.1
|
@@ -37,21 +37,21 @@ module MuckEngineHelper
|
|
37
37
|
end
|
38
38
|
|
39
39
|
def output_flash(options = {})
|
40
|
-
output_errors('', options)
|
40
|
+
output_errors('', options, nil, true)
|
41
41
|
end
|
42
42
|
|
43
|
-
def output_errors(title, options = {}, fields = nil)
|
43
|
+
def output_errors(title, options = {}, fields = nil, flash_only = false)
|
44
44
|
fields = [fields] unless fields.is_a?(Array)
|
45
45
|
flash_html = render(:partial => 'shared/flash_messages')
|
46
46
|
flash.clear
|
47
|
-
field_errors = render(:partial => 'shared/field_error', :collection => fields)
|
48
47
|
css_class = "class=\"#{options[:class]}\"" unless options[:class].nil?
|
48
|
+
field_errors = render(:partial => 'shared/field_error', :collection => fields)
|
49
49
|
|
50
|
-
if !flash_html.empty? && field_errors.empty?
|
51
|
-
#
|
50
|
+
if flash_only || (!flash_html.empty? && field_errors.empty?)
|
51
|
+
# Only flash. Don't render errors for any fields
|
52
52
|
render(:partial => 'shared/flash_error_box', :locals => {:flash_html => flash_html, :css_class => css_class})
|
53
53
|
elsif !field_errors.empty?
|
54
|
-
#
|
54
|
+
# Field errors and/or flash
|
55
55
|
render(:partial => 'shared/error_box', :locals => {:title => title,
|
56
56
|
:flash_html => flash_html,
|
57
57
|
:field_errors => field_errors,
|
data/muck-engine.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{muck-engine}
|
8
|
-
s.version = "0.3.
|
8
|
+
s.version = "0.3.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Justin Ball", "Joel Duffin"]
|
12
|
-
s.date = %q{2010-01-
|
12
|
+
s.date = %q{2010-01-22}
|
13
13
|
s.description = %q{The base engine for the muck system. Contains common tables, custom for, css and javascript.}
|
14
14
|
s.email = %q{justin@tatemae.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -92,20 +92,6 @@ function setup_country(force_load){
|
|
92
92
|
}
|
93
93
|
}
|
94
94
|
|
95
|
-
jQuery.jGrowl.defaults.position = 'center';
|
96
|
-
|
97
|
-
jQuery.jGrowl.info = function(msg){
|
98
|
-
jQuery.jGrowl(msg);
|
99
|
-
}
|
100
|
-
|
101
|
-
jQuery.jGrowl.warn = function(msg){
|
102
|
-
jQuery.jGrowl(msg);
|
103
|
-
}
|
104
|
-
|
105
|
-
jQuery.jGrowl.error = function(msg){
|
106
|
-
jQuery.jGrowl(msg, {sticky:true,header:"Please correct the following errors:"});
|
107
|
-
}
|
108
|
-
|
109
95
|
jQuery(document).ready(function() {
|
110
96
|
jQuery("#global-login").focus(function() {
|
111
97
|
jQuery("#global-login").val("");
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: muck-engine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Ball
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2010-01-
|
13
|
+
date: 2010-01-22 00:00:00 -07:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|