muck-engine 0.1.2 → 0.1.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.
data/README.rdoc CHANGED
@@ -24,7 +24,24 @@ If you build your own layout be sure to include the following script in your lay
24
24
  <%= yield :javascript %>
25
25
  </script>
26
26
 
27
+ == CSS
27
28
 
29
+ The css provided by the muck engine comes from blueprint:
30
+ http://www.blueprintcss.org/
31
+
32
+ We've also included a liquid version:
33
+ http://www.ixda.org/discuss.php?post=23298&search=blueprint
34
+
35
+ And icons:
36
+ http://www.ajaxbestiary.com/Labs/SilkSprite/
37
+
38
+ == Javascript
39
+
40
+ The muck engine uses jRails and thus jQuery for javascript:
41
+ http://ennerchi.com/projects/jrails
42
+
43
+ jGrowl is optional but included in case you'd like to use it for flash and error messages:
44
+ http://www.stanlemon.net/projects/jgrowl.html
28
45
 
29
46
 
30
47
  Copyright (c) 2009 Justin Ball, released under the MIT license
data/Rakefile CHANGED
@@ -40,7 +40,8 @@ begin
40
40
  locales/*
41
41
  rails/*
42
42
  test/*
43
- lib/**/* )
43
+ lib/**/*
44
+ public/javascripts/* )
44
45
  end
45
46
  rescue LoadError
46
47
  puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
@@ -62,7 +63,7 @@ begin
62
63
  )
63
64
 
64
65
  host = "#{config['username']}@rubyforge.org"
65
- remote_dir = "/var/www/gforge-projects/muck_engine/"
66
+ remote_dir = "/var/www/gforge-projects/muck-engine/"
66
67
  local_dir = 'rdoc'
67
68
 
68
69
  Rake::SshDirPublisher.new(host, remote_dir, local_dir).upload
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.2
1
+ 0.1.4
@@ -13,6 +13,7 @@ module MuckEngineHelper
13
13
  def output_errors(title, options = {}, fields = nil)
14
14
  fields = [fields] unless fields.is_a?(Array)
15
15
  flash_html = render(:partial => 'shared/flash_messages')
16
+ flash.clear
16
17
  field_errors = render(:partial => 'shared/field_error', :collection => fields)
17
18
  css_class = "class=\"#{options[:class]}\"" unless options[:class].nil?
18
19
 
@@ -31,12 +32,6 @@ module MuckEngineHelper
31
32
  ''
32
33
  end
33
34
  end
34
-
35
- def error_styles
36
- if GlobalConfig.growl_all_messages
37
- ' style="display:none;" '
38
- end
39
- end
40
35
 
41
36
  def icon(object, size = :icon)
42
37
  return "" if object.blank? || object.photo.blank?
@@ -1,7 +1,7 @@
1
- <div <%=css_class%> id="errorExplanation" <%=error_styles%>>
2
- <h2><%= title %></h2>
1
+ <div <%=css_class%> id="errorExplanation">
2
+ <h2><%= title %></h2>
3
3
  <%= flash_html %>
4
- <%= field_errors %>
5
- <%= extra_html %>
4
+ <%= field_errors %>
5
+ <%= extra_html %>
6
6
  </div>
7
7
  <%= render(:partial => 'shared/growl') -%>
@@ -1,3 +1,3 @@
1
1
  <% if !field_error.nil? && field_error.errors.length > 0 -%>
2
- <ul><%=field_error.errors.full_messages.map {|msg| content_tag(:li, msg)} %></ul>
2
+ <ul id="field-errors"><%=field_error.errors.full_messages.map {|msg| content_tag(:li, msg)} %></ul>
3
3
  <% end -%>
@@ -1,4 +1,4 @@
1
- <div <%=css_class%> id="errorExplanation" <%=error_styles%>>
1
+ <div <%=css_class%> id="errorExplanation">
2
2
  <%= flash_html %>
3
3
  </div>
4
4
  <%= render(:partial => 'shared/growl') -%>
@@ -1,7 +1,7 @@
1
1
  <% if flash.keys.any? {|key| flash[key].length > 0} -%>
2
- <div id="flashMessage" class="message">
3
- <% flash.each do |key, msg| -%>
4
- <%= content_tag :div, msg, :class => [key, " message"], :id => "notice_#{key}" %>
5
- <% end -%>
6
- </div>
2
+ <div id="flashMessage" class="message">
3
+ <% flash.each do |key, msg| -%>
4
+ <%= content_tag :div, msg, :class => [key, " message"], :id => "notice_#{key}" %>
5
+ <% end -%>
6
+ </div>
7
7
  <% end -%>
@@ -1,11 +1,16 @@
1
- <% if GlobalConfig.growl -%>
1
+ <% if GlobalConfig.growl_enabled -%>
2
2
  <script type="text/javascript">
3
3
  jQuery(document).ready(function() {
4
+ jQuery('#errorExplanation').hide();
4
5
  var message = jQuery('#errorExplanation').html();
5
6
  var title = jQuery('#errorExplanation h2').html();
6
7
  if(message) {
7
- jQuery.jGrowl.info(message, {header:title});
8
+ if (jQuery('#field-errors').length > 0){
9
+ jQuery.jGrowl.error(message, {header:title});
10
+ } else {
11
+ jQuery.jGrowl.info(message, {header:title});
12
+ }
8
13
  }
9
- });
14
+ });
10
15
  </script>
11
16
  <% end -%>
data/muck-engine.gemspec CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{muck-engine}
5
- s.version = "0.1.2"
5
+ s.version = "0.1.4"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Justin Ball"]
9
- s.date = %q{2009-06-12}
9
+ s.date = %q{2009-06-13}
10
10
  s.description = %q{The base engine for the muck system. Contains common tables, custom for, css and javascript.}
11
11
  s.email = %q{justinball@gmail.com}
12
12
  s.extra_rdoc_files = [
@@ -91,13 +91,14 @@ Gem::Specification.new do |s|
91
91
  "public/images/icons/vote.png",
92
92
  "public/images/loading.gif",
93
93
  "public/images/spinner.gif",
94
- "public/javascripts/application.js",
94
+ "public/javascripts/fancyzoom.min.js",
95
95
  "public/javascripts/fancyzoom.min.js",
96
96
  "public/javascripts/jquery/jquery-ui.js",
97
97
  "public/javascripts/jquery/jquery.form.js",
98
98
  "public/javascripts/jquery/jquery.jgrowl.js",
99
99
  "public/javascripts/jquery/jquery.js",
100
100
  "public/javascripts/jquery/jquery.tips.js",
101
+ "public/javascripts/muck.js",
101
102
  "public/stylesheets/admin.css",
102
103
  "public/stylesheets/blueprint/ie.css",
103
104
  "public/stylesheets/blueprint/liquid_screen.css",
@@ -50,7 +50,7 @@ function show_hide_obj (ary_objs_to_show, ary_objs_to_hide)
50
50
  jQuery.jGrowl.defaults.position = 'center';
51
51
 
52
52
  jQuery.jGrowl.info = function(msg){
53
- jQuery.jGrowl(msg, {sticky:true});
53
+ jQuery.jGrowl(msg);
54
54
  }
55
55
 
56
56
  jQuery.jGrowl.warn = function(msg){
@@ -12,6 +12,7 @@ fieldset{border:none;margin:0;padding:0;}
12
12
  form fieldset{margin:0 0 2px;padding:0px;}
13
13
  form fieldset input[type="text"],form fieldset input[type="password"]{width:500px;}
14
14
  .common-form{width:500px;margin:40px auto;}
15
+ .common-form h1{font-size:1.8em;}
15
16
  .form-item{float:left;}
16
17
  .common-content{width:500px;margin:40px auto;font-size:1.2em;color:#555;}
17
18
  .button-link {background-color:transparent;border-top-width: 0px;border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;}
@@ -60,13 +61,15 @@ body > div.jGrowl.bottom-right{right:0px;bottom:0px;}
60
61
  body > div.jGrowl.center{top:0px;width:50%;left:25%;}
61
62
  /** Cross Browser Styling **/
62
63
  div.center div.jGrowl-notification,div.center div.jGrowl-closer{margin-left:auto;margin-right:auto;}
63
- div.jGrowl div.jGrowl-notification,div.jGrowl div.jGrowl-closer{background-color:#FCFAE1;color:#000;opacity:.95;filter:alpha(opacity = 95);zoom:1;width:550px;padding:10px;margin-top:5px;margin-bottom:5px;
64
- font-size:1.5em;text-align:left;display:none;-moz-border-radius:5px;-webkit-border-radius:5px;border:solid 3px #555;}
64
+ div.jGrowl div.jGrowl-notification,div.jGrowl div.jGrowl-closer{background-color:#F0F7F9;color:#000;opacity:.95;filter:alpha(opacity = 95);zoom:1;width:550px;padding:10px;margin-top:5px;margin-bottom:5px;font-size:1.5em;text-align:left;display:none;-moz-border-radius:5px;-webkit-border-radius:5px;border:solid 3px #555;}
65
65
  div.jGrowl div.jGrowl-notification{min-height:40px;}
66
66
  div.jGrowl div.jGrowl-notification div.header{font-weight:bold;font-size:1.6em;}
67
67
  div.jGrowl div.jGrowl-notification div.close{float:right;font-weight:bold;font-size:2em;cursor:pointer;color:#555;}
68
68
  div.jGrowl div.jGrowl-notification div.close:hover{color:#ccc;}
69
69
  div.jGrowl div.jGrowl-closer{height:15px;padding-top:4px;padding-bottom:4px;cursor:pointer;font-size:11px;font-weight:bold;text-align:center;}
70
+ div.jGrowl div.jGrowl-notification .notice, div.jGrowl div.jGrowl-notification .error, div.jGrowl div.jGrowl-notification .success{background:none;border:none;}
71
+ div.jGrowl div.jGrowl-notification h2{text-align:left;font-weight:bold;padding:5px 5px 5px 15px;font-size:1.1em;}
72
+
70
73
  /* Errors */
71
74
  .help-box{font-size:1.2em;color:#555;}
72
75
  .fieldWithErrors input{border:solid 2px #B61E12;}
data/rdoc/created.rid CHANGED
@@ -1 +1 @@
1
- Thu, 11 Jun 2009 23:55:40 -0600
1
+ Fri, 12 Jun 2009 00:13:06 -0600
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.1.2
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Ball
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-06-12 00:00:00 -06:00
12
+ date: 2009-06-13 00:00:00 -06:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -69,13 +69,13 @@ files:
69
69
  - public/images/icons/vote.png
70
70
  - public/images/loading.gif
71
71
  - public/images/spinner.gif
72
- - public/javascripts/application.js
73
72
  - public/javascripts/fancyzoom.min.js
74
73
  - public/javascripts/jquery/jquery-ui.js
75
74
  - public/javascripts/jquery/jquery.form.js
76
75
  - public/javascripts/jquery/jquery.jgrowl.js
77
76
  - public/javascripts/jquery/jquery.js
78
77
  - public/javascripts/jquery/jquery.tips.js
78
+ - public/javascripts/muck.js
79
79
  - public/stylesheets/admin.css
80
80
  - public/stylesheets/blueprint/ie.css
81
81
  - public/stylesheets/blueprint/liquid_screen.css