muck-engine 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.2
1
+ 0.3.3
@@ -1,7 +1,7 @@
1
1
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
2
  <html xmlns="http://www.w3.org/1999/xhtml" lang="<%= I18n.locale %>" xml:lang="<%= I18n.locale %>">
3
3
  <head>
4
- <%= render :partial => 'layouts/global/head', :locals => { :admin_layout => true } %>
4
+ <%= render :partial => 'layouts/admin/head' %>
5
5
  </head>
6
6
  <body>
7
7
  <div class="container">
@@ -14,8 +14,6 @@
14
14
  </div>
15
15
  </div>
16
16
  </div>
17
- <script type="text/javascript" language="JavaScript">
18
- <%= yield :javascript %>
19
- </script>
17
+ <%= render :partial => 'layouts/admin/footer' %>
20
18
  </body>
21
- </html>
19
+ </html>
@@ -0,0 +1,10 @@
1
+ <div id="footer">
2
+
3
+ </div>
4
+
5
+ <script type="text/javascript" language="JavaScript">
6
+ <%= yield :javascript %>
7
+ </script>
8
+
9
+ <%= yield :messages -%>
10
+ <%= output_flash(:class => 'notify-box') %>
@@ -0,0 +1,17 @@
1
+ <title><%= @page_title || GlobalConfig.application_name %></title>
2
+ <meta http-equiv="content-type" content="text/xhtml; charset=utf-8" />
3
+ <%= stylesheet_link_tag 'blueprint/print.css', :media => "print" %>
4
+ <!--[if IE]><link rel="stylesheet" href="/stylesheets/blueprint/ie.css" type="text/css" media="screen, projection"><![endif]-->
5
+ <%= stylesheet_link_tag %W{ reset styles blueprint/liquid_screen.css admin }, :cache => true %>
6
+ <%= stylesheet_link_tag MuckEngine.muck_admin_css -%>
7
+ <%= google_load_jquery %>
8
+ <%= google_load_jquery_ui %>
9
+ <%= javascript_include_tag %w{
10
+ jquery/jrails.js
11
+ jquery/jquery.jgrowl.js
12
+ jquery/jquery.tips.js
13
+ jquery/jquery.fancybox.js
14
+ muck.js
15
+ application.js }, :cache => 'all_js_cached' %>
16
+ <%= javascript_tag %[const AUTH_TOKEN = #{form_authenticity_token.inspect};] if protect_against_forgery? %>
17
+ <%= yield :head -%>
@@ -6,12 +6,8 @@
6
6
  <meta name="resource-type" content="document" />
7
7
  <meta name="MSSmartTagsPreventParsing" content="true" />
8
8
  <%= stylesheet_link_tag 'blueprint/print.css', :media => "print" %>
9
- <!--[if IE]><link rel="stylesheet" href="/stylesheets/blueprint/ie.css" type="text/css" media="screen, projection"><![endif]-->
10
- <% if defined?(admin_layout) -%>
11
- <%= stylesheet_link_tag %W{ reset styles blueprint/liquid_screen.css admin }, :cache => true %>
12
- <% else -%>
13
- <%= stylesheet_link_tag %W{ reset styles blueprint/screen.css }, :cache => true %>
14
- <% end -%>
9
+ <!--[if IE]><link rel="stylesheet" href="/stylesheets/blueprint/ie.css" type="text/css" media="screen, projection"><![endif]-->
10
+ <%= stylesheet_link_tag %W{ reset styles blueprint/screen.css }, :cache => true %>
15
11
  <%= google_load_jquery %>
16
12
  <%= google_load_jquery_ui %>
17
13
  <%= javascript_include_tag %w{
data/lib/muck_engine.rb CHANGED
@@ -36,6 +36,7 @@ class MuckEngine
36
36
  :image => image)
37
37
  end
38
38
 
39
+
39
40
  def self.muck_dashboard_items
40
41
  @@muck_dashboard_items || []
41
42
  end
@@ -49,6 +50,17 @@ class MuckEngine
49
50
  :locals => locals)
50
51
  end
51
52
 
53
+
54
+ def self.muck_admin_css
55
+ @@muck_admin_css || []
56
+ end
57
+
58
+ # Add css for the admin UI
59
+ def self.add_muck_admin_css(css_file)
60
+ @@muck_admin_css ||= []
61
+ @@muck_admin_css << css_file
62
+ end
63
+
52
64
  end
53
65
 
54
66
  # Add a link to admin home
data/muck-engine.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{muck-engine}
8
- s.version = "0.3.2"
8
+ s.version = "0.3.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"]
@@ -40,6 +40,8 @@ Gem::Specification.new do |s|
40
40
  "app/views/forms/_menu_field.html.erb",
41
41
  "app/views/forms/_tips.html.erb",
42
42
  "app/views/layouts/admin.html.erb",
43
+ "app/views/layouts/admin/_footer.html.erb",
44
+ "app/views/layouts/admin/_head.html.erb",
43
45
  "app/views/layouts/admin/_header.html.erb",
44
46
  "app/views/layouts/admin/_header_nav_item.html.erb",
45
47
  "app/views/layouts/default.html.erb",
@@ -1,2 +1,9 @@
1
- (function($){$.jGrowl=function(m,o){if($('#jGrowl').size()==0)$('<div id="jGrowl"></div>').addClass($.jGrowl.defaults.position).appendTo('body');$('#jGrowl').jGrowl(m,o);};$.fn.jGrowl=function(m,o){if($.isFunction(this.each)){var args=arguments;return this.each(function(){var self=this;if($(this).data('jGrowl.instance')==undefined){$(this).data('jGrowl.instance',new $.fn.jGrowl());$(this).data('jGrowl.instance').startup(this);}
2
- if($.isFunction($(this).data('jGrowl.instance')[m])){$(this).data('jGrowl.instance')[m].apply($(this).data('jGrowl.instance'),$.makeArray(args).slice(1));}else{$(this).data('jGrowl.instance').notification(m,o);}});};};$.extend($.fn.jGrowl.prototype,{defaults:{header:'',sticky:false,position:'top-right',glue:'after',theme:'default',corners:'10px',check:500,life:3000,speed:'normal',easing:'swing',closer:true,log:function(e,m,o){},beforeOpen:function(e,m,o){},open:function(e,m,o){},beforeClose:function(e,m,o){},close:function(e,m,o){},animateOpen:{opacity:'show'},animateClose:{opacity:'hide'}},element:null,interval:null,notification:function(message,o){var self=this;var o=$.extend({},this.defaults,o);o.log.apply(this.element,[this.element,message,o]);var notification=$('<div class="jGrowl-notification"><div class="close">&times;</div><div class="header">'+o.header+'</div><div class="message">'+message+'</div></div>').data("jGrowl",o).addClass(o.theme).children('div.close').bind("click.jGrowl",function(){$(this).unbind('click.jGrowl').parent().trigger('jGrowl.beforeClose').animate(o.animateClose,o.speed,o.easing,function(){$(this).trigger('jGrowl.close').remove();});}).parent();(o.glue=='after')?$('div.jGrowl-notification:last',this.element).after(notification):$('div.jGrowl-notification:first',this.element).before(notification);$(notification).bind("mouseover.jGrowl",function(){$(this).data("jGrowl").pause=true;}).bind("mouseout.jGrowl",function(){$(this).data("jGrowl").pause=false;}).bind('jGrowl.beforeOpen',function(){o.beforeOpen.apply(self.element,[self.element,message,o]);}).bind('jGrowl.open',function(){o.open.apply(self.element,[self.element,message,o]);}).bind('jGrowl.beforeClose',function(){o.beforeClose.apply(self.element,[self.element,message,o]);}).bind('jGrowl.close',function(){o.close.apply(self.element,[self.element,message,o]);}).trigger('jGrowl.beforeOpen').animate(o.animateOpen,o.speed,o.easing,function(){$(this).data("jGrowl").created=new Date();}).trigger('jGrowl.open');if($.fn.corner!=undefined)$(notification).corner(o.corners);if($('div.jGrowl-notification:parent',this.element).size()>1&&$('div.jGrowl-closer',this.element).size()==0&&this.defaults.closer!=false){$('<div class="jGrowl-closer">[ close all ]</div>').addClass(this.defaults.theme).appendTo(this.element).animate(this.defaults.animateOpen,this.defaults.speed,this.defaults.easing).bind("click.jGrowl",function(){$(this).siblings().children('div.close').trigger("click.jGrowl");if($.isFunction(self.defaults.closer))self.defaults.closer.apply($(this).parent()[0],[$(this).parent()[0]]);});};},update:function(){$(this.element).find('div.jGrowl-notification:parent').each(function(){if($(this).data("jGrowl")!=undefined&&$(this).data("jGrowl").created!=undefined&&($(this).data("jGrowl").created.getTime()+$(this).data("jGrowl").life)<(new Date()).getTime()&&$(this).data("jGrowl").sticky!=true&&($(this).data("jGrowl").pause==undefined||$(this).data("jGrowl").pause!=true)){$(this).children('div.close').trigger('click.jGrowl');}});if($(this.element).find('div.jGrowl-notification:parent').size()<2){$(this.element).find('div.jGrowl-closer').animate(this.defaults.animateClose,this.defaults.speed,this.defaults.easing,function(){$(this).remove();});};},startup:function(e){this.element=$(e).addClass('jGrowl').append('<div class="jGrowl-notification"></div>');this.interval=setInterval(function(){jQuery(e).data('jGrowl.instance').update();},this.defaults.check);if($.browser.msie&&parseInt($.browser.version)<7)$(this.element).addClass('ie6');},shutdown:function(){$(this.element).removeClass('jGrowl').find('div.jGrowl-notification').remove();clearInterval(this.interval);}});$.jGrowl.defaults=$.fn.jGrowl.prototype.defaults;})(jQuery);
1
+ (function($){$.jGrowl=function(m,o){if($('#jGrowl').size()==0)
2
+ $('<div id="jGrowl"></div>').addClass($.jGrowl.defaults.position).appendTo('body');$('#jGrowl').jGrowl(m,o);};$.fn.jGrowl=function(m,o){if($.isFunction(this.each)){var args=arguments;return this.each(function(){var self=this;if($(this).data('jGrowl.instance')==undefined){$(this).data('jGrowl.instance',$.extend(new $.fn.jGrowl(),{notifications:[],element:null,interval:null}));$(this).data('jGrowl.instance').startup(this);}
3
+ if($.isFunction($(this).data('jGrowl.instance')[m])){$(this).data('jGrowl.instance')[m].apply($(this).data('jGrowl.instance'),$.makeArray(args).slice(1));}else{$(this).data('jGrowl.instance').create(m,o);}});};};$.extend($.fn.jGrowl.prototype,{defaults:{pool:0,header:'',group:'',sticky:false,position:'top-right',glue:'after',theme:'default',corners:'10px',check:250,life:3000,speed:'normal',easing:'swing',closer:true,closeTemplate:'&times;',closerTemplate:'<div>[ close all ]</div>',log:function(e,m,o){},beforeOpen:function(e,m,o){},open:function(e,m,o){},beforeClose:function(e,m,o){},close:function(e,m,o){},animateOpen:{opacity:'show'},animateClose:{opacity:'hide'}},notifications:[],element:null,interval:null,create:function(message,o){var o=$.extend({},this.defaults,o);this.notifications.push({message:message,options:o});o.log.apply(this.element,[this.element,message,o]);},render:function(notification){var self=this;var message=notification.message;var o=notification.options;var notification=$('<div class="jGrowl-notification ui-state-highlight ui-corner-all'+
4
+ ((o.group!=undefined&&o.group!='')?' '+o.group:'')+'">'+'<div class="close">'+o.closeTemplate+'</div>'+'<div class="header">'+o.header+'</div>'+'<div class="message">'+message+'</div></div>').data("jGrowl",o).addClass(o.theme).children('div.close').bind("click.jGrowl",function(){$(this).parent().trigger('jGrowl.close');}).parent();$(notification).bind("mouseover.jGrowl",function(){$('div.jGrowl-notification',self.element).data("jGrowl.pause",true);}).bind("mouseout.jGrowl",function(){$('div.jGrowl-notification',self.element).data("jGrowl.pause",false);}).bind('jGrowl.beforeOpen',function(){if(o.beforeOpen.apply(notification,[notification,message,o,self.element])!=false){$(this).trigger('jGrowl.open');}}).bind('jGrowl.open',function(){if(o.open.apply(notification,[notification,message,o,self.element])!=false){if(o.glue=='after'){$('div.jGrowl-notification:last',self.element).after(notification);}else{$('div.jGrowl-notification:first',self.element).before(notification);}
5
+ $(this).animate(o.animateOpen,o.speed,o.easing,function(){if($.browser.msie&&(parseInt($(this).css('opacity'),10)===1||parseInt($(this).css('opacity'),10)===0))
6
+ this.style.removeAttribute('filter');$(this).data("jGrowl").created=new Date();});}}).bind('jGrowl.beforeClose',function(){if(o.beforeClose.apply(notification,[notification,message,o,self.element])!=false)
7
+ $(this).trigger('jGrowl.close');}).bind('jGrowl.close',function(){$(this).data('jGrowl.pause',true);$(this).animate(o.animateClose,o.speed,o.easing,function(){$(this).remove();var close=o.close.apply(notification,[notification,message,o,self.element]);if($.isFunction(close))
8
+ close.apply(notification,[notification,message,o,self.element]);});}).trigger('jGrowl.beforeOpen');if($.fn.corner!=undefined)$(notification).corner(o.corners);if($('div.jGrowl-notification:parent',self.element).size()>1&&$('div.jGrowl-closer',self.element).size()==0&&this.defaults.closer!=false){$(this.defaults.closerTemplate).addClass('jGrowl-closer ui-state-highlight ui-corner-all').addClass(this.defaults.theme).appendTo(self.element).animate(this.defaults.animateOpen,this.defaults.speed,this.defaults.easing).bind("click.jGrowl",function(){$(this).siblings().children('div.close').trigger("click.jGrowl");if($.isFunction(self.defaults.closer)){self.defaults.closer.apply($(this).parent()[0],[$(this).parent()[0]]);}});};},update:function(){$(this.element).find('div.jGrowl-notification:parent').each(function(){if($(this).data("jGrowl")!=undefined&&$(this).data("jGrowl").created!=undefined&&($(this).data("jGrowl").created.getTime()+$(this).data("jGrowl").life)<(new Date()).getTime()&&$(this).data("jGrowl").sticky!=true&&($(this).data("jGrowl.pause")==undefined||$(this).data("jGrowl.pause")!=true)){$(this).trigger('jGrowl.beforeClose');}});if(this.notifications.length>0&&(this.defaults.pool==0||$(this.element).find('div.jGrowl-notification:parent').size()<this.defaults.pool))
9
+ this.render(this.notifications.shift());if($(this.element).find('div.jGrowl-notification:parent').size()<2){$(this.element).find('div.jGrowl-closer').animate(this.defaults.animateClose,this.defaults.speed,this.defaults.easing,function(){$(this).remove();});}},startup:function(e){this.element=$(e).addClass('jGrowl').append('<div class="jGrowl-notification"></div>');this.interval=setInterval(function(){$(e).data('jGrowl.instance').update();},this.defaults.check);if($.browser.msie&&parseInt($.browser.version)<7&&!window["XMLHttpRequest"]){$(this.element).addClass('ie6');}},shutdown:function(){$(this.element).removeClass('jGrowl').find('div.jGrowl-notification').remove();clearInterval(this.interval);},close:function(){$(this.element).find('div.jGrowl-notification').each(function(){$(this).trigger('jGrowl.beforeClose');});}});$.jGrowl.defaults=$.fn.jGrowl.prototype.defaults;})(jQuery);
@@ -16,4 +16,5 @@
16
16
  .dashboard-widget h2{font-size:12px;border-bottom:solid 1px #555;}
17
17
  /* themes */
18
18
  #current-theme{clear:both;float:left;width:100%;}
19
- .theme-block{width:250px;height:300px;float:left;clear:none;margin:10px;}
19
+ .theme-block{width:250px;height:300px;float:left;clear:none;margin:10px;}
20
+ .notify-box{font-size:1.2em;color:#555;position:absolute;top:0;left:10%;width:80%;z-index:10;}
@@ -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:#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;}
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:1.6em;}
78
- div.jGrowl div.jGrowl-notification div.close{float:right;font-weight:bold;font-size:2em;cursor:pointer;color:#555;}
79
- div.jGrowl div.jGrowl-notification div.close:hover{color:#ccc;}
80
- div.jGrowl div.jGrowl-closer{height:15px;padding-top:4px;padding-bottom:4px;cursor:pointer;font-size:11px;font-weight:bold;text-align:center;}
81
- div.jGrowl div.jGrowl-notification .notice, div.jGrowl div.jGrowl-notification .error, div.jGrowl div.jGrowl-notification .success{background:none;border:none;}
82
- div.jGrowl div.jGrowl-notification h2{text-align:left;font-weight:bold;padding:5px 5px 5px 15px;font-size:1.1em;}
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.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Ball
@@ -86,6 +86,8 @@ files:
86
86
  - app/views/forms/_menu_field.html.erb
87
87
  - app/views/forms/_tips.html.erb
88
88
  - app/views/layouts/admin.html.erb
89
+ - app/views/layouts/admin/_footer.html.erb
90
+ - app/views/layouts/admin/_head.html.erb
89
91
  - app/views/layouts/admin/_header.html.erb
90
92
  - app/views/layouts/admin/_header_nav_item.html.erb
91
93
  - app/views/layouts/default.html.erb