muck-engine 0.4.2 → 0.4.3
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/VERSION +1 -1
- data/app/controllers/admin/muck/base_controller.rb +0 -13
- data/app/helpers/muck_custom_form_builder.rb +11 -8
- data/app/views/admin/shared/{output_admin_messages.js.erb → _output_admin_messages.js.erb} +0 -0
- data/lib/muck_engine/flash_errors.rb +9 -0
- data/muck-engine.gemspec +3 -3
- data/public/javascripts/jquery/jquery.tips.js +2 -2
- data/public/javascripts/muck.js +15 -8
- data/public/stylesheets/admin.css +4 -2
- data/public/stylesheets/styles.css +1 -1
- data/test/rails_root/public/javascripts/jquery/jquery.tips.js +2 -2
- data/test/rails_root/public/javascripts/muck.js +15 -8
- data/test/rails_root/public/stylesheets/admin.css +4 -2
- data/test/rails_root/public/stylesheets/styles.css +10 -9
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.3
|
@@ -29,17 +29,4 @@ class Admin::Muck::BaseController < ApplicationController
|
|
29
29
|
end
|
30
30
|
end
|
31
31
|
|
32
|
-
# Output a page update that will display messages in the flash
|
33
|
-
def output_admin_messages(fields = nil, title = '', options = { :class => 'notify-box' }, flash_only = false)
|
34
|
-
@fields = fields
|
35
|
-
@title = title
|
36
|
-
@options = options
|
37
|
-
@flash_only = flash_only
|
38
|
-
render :template => 'admin/shared/output_admin_messages', :layout => false
|
39
|
-
end
|
40
|
-
|
41
|
-
def output_admin_messages
|
42
|
-
|
43
|
-
end
|
44
|
-
|
45
32
|
end
|
@@ -45,16 +45,22 @@ class MuckCustomFormBuilder < ActionView::Helpers::FormBuilder
|
|
45
45
|
:css_class => options.delete(:css_class)
|
46
46
|
}
|
47
47
|
# TODO css_class does not appear to be used. Can just use the standard :class in html options to set the class
|
48
|
-
|
48
|
+
|
49
|
+
is_checkbox = false
|
50
|
+
is_checkbox = true if %w(check_box).include?(name)
|
51
|
+
|
49
52
|
type = options.delete(:type)
|
50
53
|
type ||= :tippable if tippable
|
51
54
|
|
52
|
-
|
53
|
-
|
55
|
+
label_class = ''
|
56
|
+
label_class << "checkbox-label" if is_checkbox
|
57
|
+
label_class << " #{options.delete(:label_class)}" if !options[:label_class].nil?
|
58
|
+
if label_class.blank?
|
59
|
+
label_options = {}
|
54
60
|
else
|
55
|
-
label_options = { }
|
61
|
+
label_options = { :class => label_class }
|
56
62
|
end
|
57
|
-
|
63
|
+
|
58
64
|
if local_options[:hide_required]
|
59
65
|
required = false
|
60
66
|
label_text = options[:label]
|
@@ -65,9 +71,6 @@ class MuckCustomFormBuilder < ActionView::Helpers::FormBuilder
|
|
65
71
|
end
|
66
72
|
label_name = options.delete(:label)
|
67
73
|
|
68
|
-
is_checkbox = false
|
69
|
-
is_checkbox = true if %w(check_box).include?(name)
|
70
|
-
|
71
74
|
options[:class] ||= ''
|
72
75
|
options[:class] << add_space_to_css(options) + 'tip-field' if tippable
|
73
76
|
options[:class] << add_space_to_css(options) + "required-value" if required
|
File without changes
|
@@ -30,5 +30,14 @@ class MuckEngine
|
|
30
30
|
end
|
31
31
|
end
|
32
32
|
|
33
|
+
# Output a page update that will display messages in the flash
|
34
|
+
def output_admin_messages(fields = nil, title = '', options = { :class => 'notify-box' }, flash_only = false)
|
35
|
+
@fields = fields
|
36
|
+
@title = title
|
37
|
+
@options = options
|
38
|
+
@flash_only = flash_only
|
39
|
+
render :partial => 'admin/shared/output_admin_messages'
|
40
|
+
end
|
41
|
+
|
33
42
|
end
|
34
43
|
end
|
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.4.
|
8
|
+
s.version = "0.4.3"
|
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-02-
|
12
|
+
s.date = %q{2010-02-04}
|
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 = [
|
@@ -32,7 +32,7 @@ Gem::Specification.new do |s|
|
|
32
32
|
"app/models/language.rb",
|
33
33
|
"app/models/state.rb",
|
34
34
|
"app/views/admin/default/index.html.erb",
|
35
|
-
"app/views/admin/shared/
|
35
|
+
"app/views/admin/shared/_output_admin_messages.js.erb",
|
36
36
|
"app/views/forms/_base_field.html.erb",
|
37
37
|
"app/views/forms/_color_picker_field.html.erb",
|
38
38
|
"app/views/forms/_default.html.erb",
|
@@ -1,5 +1,5 @@
|
|
1
1
|
jQuery(document).ready(function() {
|
2
|
-
jQuery(".tip-field").focus
|
2
|
+
jQuery(".tip-field").live('focus', function() {
|
3
3
|
jQuery(".active").removeClass("active");
|
4
4
|
var tip_key = jQuery('#' + this.id).siblings('.tip-key');
|
5
5
|
var control_id = this.id;
|
@@ -22,7 +22,7 @@ jQuery(document).ready(function() {
|
|
22
22
|
jQuery("#" + help_id + "-container").addClass("active");
|
23
23
|
});
|
24
24
|
|
25
|
-
jQuery(".tip-field").blur
|
25
|
+
jQuery(".tip-field").live('blur', function() {
|
26
26
|
jQuery('#' + this.id + '-tip').hide(1);
|
27
27
|
});
|
28
28
|
});
|
data/public/javascripts/muck.js
CHANGED
@@ -22,9 +22,16 @@ function add_headers(xhr){
|
|
22
22
|
}
|
23
23
|
|
24
24
|
jQuery(document).ready(function() {
|
25
|
-
|
25
|
+
|
26
26
|
jQuery('a.ajax-delete').live('click', function() {
|
27
|
-
jQuery
|
27
|
+
var title = jQuery(this).attr('title');
|
28
|
+
var do_delete = true;
|
29
|
+
if(title.length > 0){
|
30
|
+
do_delete = confirm(title);
|
31
|
+
}
|
32
|
+
if (do_delete){
|
33
|
+
jQuery.post(this.href, { _method: 'delete', format: 'js' }, null, "script");
|
34
|
+
}
|
28
35
|
return false;
|
29
36
|
});
|
30
37
|
|
@@ -33,15 +40,15 @@ jQuery(document).ready(function() {
|
|
33
40
|
return false;
|
34
41
|
});
|
35
42
|
|
36
|
-
|
43
|
+
jQuery(".submit-form").click(function() {
|
37
44
|
jQuery(this).parent('form').submit();
|
38
45
|
});
|
39
46
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
47
|
+
apply_ajax_forms();
|
48
|
+
|
49
|
+
jQuery('a.fancy-pop').fancybox({'hideOnContentClick':false, 'overlayShow':true, 'frameWidth':600, 'frameHeight':500 });
|
50
|
+
|
51
|
+
jQuery('a.dialog-pop').live('click', function() {
|
45
52
|
var d = jQuery('<div class="dialog"></div>').appendTo("body");
|
46
53
|
d.dialog({ modal: true, autoOpen: false, width: 'auto', title: jQuery(this).attr('title') });
|
47
54
|
d.load(jQuery(this).attr('href'), '', function(){
|
@@ -1,5 +1,6 @@
|
|
1
1
|
/* header */
|
2
2
|
a {color:#000;}
|
3
|
+
fieldset {border:none;}
|
3
4
|
#main-navigation{}
|
4
5
|
#account-navigation {}
|
5
6
|
.navigation ul{padding:2px;margin:0;}
|
@@ -26,9 +27,10 @@ ul.admin-list li a{font-size:1.2em;}
|
|
26
27
|
/* errors, message */
|
27
28
|
.notify-box{font-size:1.2em;color:#555;width:100%}
|
28
29
|
.error,.notice,.success {margin:0;}
|
29
|
-
#errorExplanation{margin:0;padding
|
30
|
+
#errorExplanation #field-errors{margin:0;padding:0.4em 1.5em;width:96%;border:2px solid #ddd;background:#FBE3E4;color:#8a1f11;border-color:#FBC2C4;}
|
30
31
|
#admin-messages{display:none;}
|
31
|
-
|
32
|
+
/* ui elements */
|
33
|
+
#ui-datepicker-div{z-index:2005;}
|
32
34
|
/* tables */
|
33
35
|
.adminTable{margin:5px 0 0 0;padding:0 0 40px 0px;width:980px;}
|
34
36
|
.adminTable a{color:#000;text-decoration:none;font-weight:bold;}
|
@@ -37,7 +37,7 @@ ul.icon-list a{display:inline-block;margin:2px 0;padding:2px 0 5px 28px;text-dec
|
|
37
37
|
.availability{color:#b61e12;position:absolute;}
|
38
38
|
.hidden-tips{display:none;}
|
39
39
|
.required-tip{color:#555555;font-size:1.2em;margin:0pt;font-weight:bolder;height:0px;}
|
40
|
-
.tip{position:absolute;z-index:
|
40
|
+
.tip{position:absolute;z-index:2000;border:2px solid #CCCCCC;background-color:#fff;width:400px;}
|
41
41
|
#tip-title{font-size:1.1em;background-color:#CCCCCC;text-align:left;padding:2px 0px 5px 8px;font-weight:bold;}
|
42
42
|
#tip-main{padding:10px;color:#333333;}
|
43
43
|
#tip-main p,#tip-main ul{font-size:1.3em;}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
jQuery(document).ready(function() {
|
2
|
-
jQuery(".tip-field").focus
|
2
|
+
jQuery(".tip-field").live('focus', function() {
|
3
3
|
jQuery(".active").removeClass("active");
|
4
4
|
var tip_key = jQuery('#' + this.id).siblings('.tip-key');
|
5
5
|
var control_id = this.id;
|
@@ -22,7 +22,7 @@ jQuery(document).ready(function() {
|
|
22
22
|
jQuery("#" + help_id + "-container").addClass("active");
|
23
23
|
});
|
24
24
|
|
25
|
-
jQuery(".tip-field").blur
|
25
|
+
jQuery(".tip-field").live('blur', function() {
|
26
26
|
jQuery('#' + this.id + '-tip').hide(1);
|
27
27
|
});
|
28
28
|
});
|
@@ -22,9 +22,16 @@ function add_headers(xhr){
|
|
22
22
|
}
|
23
23
|
|
24
24
|
jQuery(document).ready(function() {
|
25
|
-
|
25
|
+
|
26
26
|
jQuery('a.ajax-delete').live('click', function() {
|
27
|
-
jQuery
|
27
|
+
var title = jQuery(this).attr('title');
|
28
|
+
var do_delete = true;
|
29
|
+
if(title.length > 0){
|
30
|
+
do_delete = confirm(title);
|
31
|
+
}
|
32
|
+
if (do_delete){
|
33
|
+
jQuery.post(this.href, { _method: 'delete', format: 'js' }, null, "script");
|
34
|
+
}
|
28
35
|
return false;
|
29
36
|
});
|
30
37
|
|
@@ -33,15 +40,15 @@ jQuery(document).ready(function() {
|
|
33
40
|
return false;
|
34
41
|
});
|
35
42
|
|
36
|
-
|
43
|
+
jQuery(".submit-form").click(function() {
|
37
44
|
jQuery(this).parent('form').submit();
|
38
45
|
});
|
39
46
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
47
|
+
apply_ajax_forms();
|
48
|
+
|
49
|
+
jQuery('a.fancy-pop').fancybox({'hideOnContentClick':false, 'overlayShow':true, 'frameWidth':600, 'frameHeight':500 });
|
50
|
+
|
51
|
+
jQuery('a.dialog-pop').live('click', function() {
|
45
52
|
var d = jQuery('<div class="dialog"></div>').appendTo("body");
|
46
53
|
d.dialog({ modal: true, autoOpen: false, width: 'auto', title: jQuery(this).attr('title') });
|
47
54
|
d.load(jQuery(this).attr('href'), '', function(){
|
@@ -1,5 +1,6 @@
|
|
1
1
|
/* header */
|
2
2
|
a {color:#000;}
|
3
|
+
fieldset {border:none;}
|
3
4
|
#main-navigation{}
|
4
5
|
#account-navigation {}
|
5
6
|
.navigation ul{padding:2px;margin:0;}
|
@@ -26,9 +27,10 @@ ul.admin-list li a{font-size:1.2em;}
|
|
26
27
|
/* errors, message */
|
27
28
|
.notify-box{font-size:1.2em;color:#555;width:100%}
|
28
29
|
.error,.notice,.success {margin:0;}
|
29
|
-
#errorExplanation{margin:0;padding
|
30
|
+
#errorExplanation #field-errors{margin:0;padding:0.4em 1.5em;width:96%;border:2px solid #ddd;background:#FBE3E4;color:#8a1f11;border-color:#FBC2C4;}
|
30
31
|
#admin-messages{display:none;}
|
31
|
-
|
32
|
+
/* ui elements */
|
33
|
+
#ui-datepicker-div{z-index:2005;}
|
32
34
|
/* tables */
|
33
35
|
.adminTable{margin:5px 0 0 0;padding:0 0 40px 0px;width:980px;}
|
34
36
|
.adminTable a{color:#000;text-decoration:none;font-weight:bold;}
|
@@ -37,7 +37,7 @@ ul.icon-list a{display:inline-block;margin:2px 0;padding:2px 0 5px 28px;text-dec
|
|
37
37
|
.availability{color:#b61e12;position:absolute;}
|
38
38
|
.hidden-tips{display:none;}
|
39
39
|
.required-tip{color:#555555;font-size:1.2em;margin:0pt;font-weight:bolder;height:0px;}
|
40
|
-
.tip{position:absolute;z-index:
|
40
|
+
.tip{position:absolute;z-index:2000;border:2px solid #CCCCCC;background-color:#fff;width:400px;}
|
41
41
|
#tip-title{font-size:1.1em;background-color:#CCCCCC;text-align:left;padding:2px 0px 5px 8px;font-weight:bold;}
|
42
42
|
#tip-main{padding:10px;color:#333333;}
|
43
43
|
#tip-main p,#tip-main ul{font-size:1.3em;}
|
@@ -55,7 +55,7 @@ ul.icon-list a{display:inline-block;margin:2px 0;padding:2px 0 5px 28px;text-dec
|
|
55
55
|
.bottom-tip #tip-header, .right-tip #tip-header{background-position:left top;}
|
56
56
|
|
57
57
|
/*jGrowl*/
|
58
|
-
div.jGrowl{padding:10px;z-index:9999;}
|
58
|
+
div.jGrowl{padding:10px;z-index:9999;color:#fff;font-size:12px;}
|
59
59
|
/** Special IE6 Style Positioning **/
|
60
60
|
div.ie6{position:absolute;}
|
61
61
|
div.ie6.top-right{right:auto;bottom:auto;left:expression( ( 0 - jGrowl.offsetWidth + ( document.documentElement.clientWidth ? document.documentElement.clientWidth :document.body.clientWidth ) + ( ignoreMe2 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft :document.body.scrollLeft ) ) + 'px' );top:expression( ( 0 + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop :document.body.scrollTop ) ) + 'px' );}
|
@@ -72,14 +72,15 @@ body > div.jGrowl.bottom-right{right:0px;bottom:0px;}
|
|
72
72
|
body > div.jGrowl.center{top:0px;width:50%;left:25%;}
|
73
73
|
/** Cross Browser Styling **/
|
74
74
|
div.center div.jGrowl-notification,div.center div.jGrowl-closer{margin-left:auto;margin-right:auto;}
|
75
|
-
div.jGrowl div.jGrowl-notification,div.jGrowl div.jGrowl-closer{background-color:#
|
75
|
+
div.jGrowl div.jGrowl-notification,div.jGrowl div.jGrowl-closer{background-color:#000;opacity:.85;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=85)";filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=85);zoom:1;width:235px;padding:10px;margin-top:5px;margin-bottom:5px;font-family:Tahoma,Arial,Helvetica,sans-serif;font-size:1em;text-align:left;display:none;-moz-border-radius:5px;-webkit-border-radius:5px;}
|
76
76
|
div.jGrowl div.jGrowl-notification{min-height:40px;}
|
77
|
-
div.jGrowl div.jGrowl-notification div.header{font-weight:bold;font-size
|
78
|
-
div.jGrowl div.jGrowl-notification div.close{float:right;font-weight:bold;font-size:
|
79
|
-
div.jGrowl div.jGrowl-
|
80
|
-
|
81
|
-
|
82
|
-
|
77
|
+
div.jGrowl div.jGrowl-notification div.header{font-weight:bold;font-size:.85em;}
|
78
|
+
div.jGrowl div.jGrowl-notification div.close{z-index:99;float:right;font-weight:bold;font-size:1em;cursor:pointer;}
|
79
|
+
div.jGrowl div.jGrowl-closer{padding-top:4px;padding-bottom:4px;cursor:pointer;font-size:.9em;font-weight:bold;text-align:center;}
|
80
|
+
/** Hide jGrowl when printing **/
|
81
|
+
@media print{div.jGrowl{display:none;}
|
82
|
+
}
|
83
|
+
|
83
84
|
|
84
85
|
/* Errors */
|
85
86
|
.help-box{font-size:1.2em;color:#555;}
|
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.4.
|
4
|
+
version: 0.4.3
|
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-02-
|
13
|
+
date: 2010-02-04 00:00:00 -07:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -78,7 +78,7 @@ files:
|
|
78
78
|
- app/models/language.rb
|
79
79
|
- app/models/state.rb
|
80
80
|
- app/views/admin/default/index.html.erb
|
81
|
-
- app/views/admin/shared/
|
81
|
+
- app/views/admin/shared/_output_admin_messages.js.erb
|
82
82
|
- app/views/forms/_base_field.html.erb
|
83
83
|
- app/views/forms/_color_picker_field.html.erb
|
84
84
|
- app/views/forms/_default.html.erb
|