devmate 0.0.1 → 0.1.0

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.
Files changed (70) hide show
  1. checksums.yaml +8 -8
  2. data/{LICENSE.txt → MIT-LICENSE} +1 -3
  3. data/README.rdoc +7 -0
  4. data/Rakefile +39 -1
  5. data/app/assets/javascripts/devmate/application.js +35 -0
  6. data/app/assets/javascripts/devmate/noty-2.2.4/LICENSE.txt +20 -0
  7. data/app/assets/javascripts/devmate/noty-2.2.4/js/noty/jquery.noty.js +488 -0
  8. data/app/assets/javascripts/devmate/noty-2.2.4/js/noty/layouts/bottom.js +34 -0
  9. data/app/assets/javascripts/devmate/noty-2.2.4/js/noty/layouts/bottomCenter.js +41 -0
  10. data/app/assets/javascripts/devmate/noty-2.2.4/js/noty/layouts/bottomLeft.js +43 -0
  11. data/app/assets/javascripts/devmate/noty-2.2.4/js/noty/layouts/bottomRight.js +43 -0
  12. data/app/assets/javascripts/devmate/noty-2.2.4/js/noty/layouts/center.js +56 -0
  13. data/app/assets/javascripts/devmate/noty-2.2.4/js/noty/layouts/centerLeft.js +61 -0
  14. data/app/assets/javascripts/devmate/noty-2.2.4/js/noty/layouts/centerRight.js +61 -0
  15. data/app/assets/javascripts/devmate/noty-2.2.4/js/noty/layouts/inline.js +31 -0
  16. data/app/assets/javascripts/devmate/noty-2.2.4/js/noty/layouts/top.js +34 -0
  17. data/app/assets/javascripts/devmate/noty-2.2.4/js/noty/layouts/topCenter.js +41 -0
  18. data/app/assets/javascripts/devmate/noty-2.2.4/js/noty/layouts/topLeft.js +43 -0
  19. data/app/assets/javascripts/devmate/noty-2.2.4/js/noty/layouts/topRight.js +43 -0
  20. data/app/assets/javascripts/devmate/noty-2.2.4/js/noty/packaged/jquery.noty.packaged.js +1180 -0
  21. data/app/assets/javascripts/devmate/noty-2.2.4/js/noty/packaged/jquery.noty.packaged.min.js +1 -0
  22. data/app/assets/javascripts/devmate/noty-2.2.4/js/noty/promise.js +432 -0
  23. data/app/assets/javascripts/devmate/noty-2.2.4/js/noty/themes/default.js +157 -0
  24. data/app/assets/stylesheets/devmate/application.css +13 -0
  25. data/app/controllers/devmate/application_controller.rb +26 -0
  26. data/app/helpers/devmate/application_helper.rb +4 -0
  27. data/app/views/layouts/devmate/application.html.erb +14 -0
  28. data/config/data/quotes.json +36 -0
  29. data/config/routes.rb +3 -0
  30. data/lib/devmate.rb +14 -4
  31. data/lib/devmate/engine.rb +5 -0
  32. data/lib/devmate/version.rb +1 -1
  33. data/lib/generators/devmate_generator.rb +27 -0
  34. data/test/devmate_test.rb +7 -0
  35. data/test/dummy/README.rdoc +261 -0
  36. data/test/dummy/Rakefile +7 -0
  37. data/test/dummy/app/assets/javascripts/application.js +15 -0
  38. data/test/dummy/app/assets/stylesheets/application.css +13 -0
  39. data/test/dummy/app/controllers/application_controller.rb +3 -0
  40. data/test/dummy/app/helpers/application_helper.rb +2 -0
  41. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  42. data/test/dummy/config.ru +4 -0
  43. data/test/dummy/config/application.rb +59 -0
  44. data/test/dummy/config/boot.rb +10 -0
  45. data/test/dummy/config/database.yml +25 -0
  46. data/test/dummy/config/environment.rb +5 -0
  47. data/test/dummy/config/environments/development.rb +37 -0
  48. data/test/dummy/config/environments/production.rb +67 -0
  49. data/test/dummy/config/environments/test.rb +37 -0
  50. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  51. data/test/dummy/config/initializers/inflections.rb +15 -0
  52. data/test/dummy/config/initializers/mime_types.rb +5 -0
  53. data/test/dummy/config/initializers/secret_token.rb +7 -0
  54. data/test/dummy/config/initializers/session_store.rb +8 -0
  55. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  56. data/test/dummy/config/locales/en.yml +5 -0
  57. data/test/dummy/config/routes.rb +4 -0
  58. data/test/dummy/public/404.html +26 -0
  59. data/test/dummy/public/422.html +26 -0
  60. data/test/dummy/public/500.html +25 -0
  61. data/test/dummy/public/favicon.ico +0 -0
  62. data/test/dummy/script/rails +6 -0
  63. data/test/functional/devmate/prompts_controller_test.rb +9 -0
  64. data/test/integration/navigation_test.rb +10 -0
  65. data/test/test_helper.rb +15 -0
  66. metadata +117 -30
  67. data/.gitignore +0 -22
  68. data/Gemfile +0 -4
  69. data/README.md +0 -29
  70. data/devmate.gemspec +0 -24
@@ -0,0 +1 @@
1
+ "function"!=typeof Object.create&&(Object.create=function(a){function b(){}return b.prototype=a,new b}),function(a){var b={init:function(b){return this.options=a.extend({},a.noty.defaults,b),this.options.layout=this.options.custom?a.noty.layouts.inline:a.noty.layouts[this.options.layout],a.noty.themes[this.options.theme]?this.options.theme=a.noty.themes[this.options.theme]:b.themeClassName=this.options.theme,delete b.layout,delete b.theme,this.options=a.extend({},this.options,this.options.layout.options),this.options.id="noty_"+(new Date).getTime()*Math.floor(1e6*Math.random()),this.options=a.extend({},this.options,b),this._build(),this},_build:function(){var b=a('<div class="noty_bar noty_type_'+this.options.type+'"></div>').attr("id",this.options.id);if(b.append(this.options.template).find(".noty_text").html(this.options.text),this.$bar=null!==this.options.layout.parent.object?a(this.options.layout.parent.object).css(this.options.layout.parent.css).append(b):b,this.options.themeClassName&&this.$bar.addClass(this.options.themeClassName).addClass("noty_container_type_"+this.options.type),this.options.buttons){this.options.closeWith=[],this.options.timeout=!1;var c=a("<div/>").addClass("noty_buttons");null!==this.options.layout.parent.object?this.$bar.find(".noty_bar").append(c):this.$bar.append(c);var d=this;a.each(this.options.buttons,function(b,c){var e=a("<button/>").addClass(c.addClass?c.addClass:"gray").html(c.text).attr("id",c.id?c.id:"button-"+b).appendTo(d.$bar.find(".noty_buttons")).bind("click",function(){a.isFunction(c.onClick)&&c.onClick.call(e,d)})})}this.$message=this.$bar.find(".noty_message"),this.$closeButton=this.$bar.find(".noty_close"),this.$buttons=this.$bar.find(".noty_buttons"),a.noty.store[this.options.id]=this},show:function(){var b=this;return b.options.custom?b.options.custom.find(b.options.layout.container.selector).append(b.$bar):a(b.options.layout.container.selector).append(b.$bar),b.options.theme&&b.options.theme.style&&b.options.theme.style.apply(b),"function"===a.type(b.options.layout.css)?this.options.layout.css.apply(b.$bar):b.$bar.css(this.options.layout.css||{}),b.$bar.addClass(b.options.layout.addClass),b.options.layout.container.style.apply(a(b.options.layout.container.selector)),b.showing=!0,b.options.theme&&b.options.theme.style&&b.options.theme.callback.onShow.apply(this),a.inArray("click",b.options.closeWith)>-1&&b.$bar.css("cursor","pointer").one("click",function(a){b.stopPropagation(a),b.options.callback.onCloseClick&&b.options.callback.onCloseClick.apply(b),b.close()}),a.inArray("hover",b.options.closeWith)>-1&&b.$bar.one("mouseenter",function(){b.close()}),a.inArray("button",b.options.closeWith)>-1&&b.$closeButton.one("click",function(a){b.stopPropagation(a),b.close()}),-1==a.inArray("button",b.options.closeWith)&&b.$closeButton.remove(),b.options.callback.onShow&&b.options.callback.onShow.apply(b),b.$bar.animate(b.options.animation.open,b.options.animation.speed,b.options.animation.easing,function(){b.options.callback.afterShow&&b.options.callback.afterShow.apply(b),b.showing=!1,b.shown=!0}),b.options.timeout&&b.$bar.delay(b.options.timeout).promise().done(function(){b.close()}),this},close:function(){if(!(this.closed||this.$bar&&this.$bar.hasClass("i-am-closing-now"))){var b=this;if(this.showing)return b.$bar.queue(function(){b.close.apply(b)}),void 0;if(!this.shown&&!this.showing){var c=[];return a.each(a.noty.queue,function(a,d){d.options.id!=b.options.id&&c.push(d)}),a.noty.queue=c,void 0}b.$bar.addClass("i-am-closing-now"),b.options.callback.onClose&&b.options.callback.onClose.apply(b),b.$bar.clearQueue().stop().animate(b.options.animation.close,b.options.animation.speed,b.options.animation.easing,function(){b.options.callback.afterClose&&b.options.callback.afterClose.apply(b)}).promise().done(function(){b.options.modal&&(a.notyRenderer.setModalCount(-1),0==a.notyRenderer.getModalCount()&&a(".noty_modal").fadeOut("fast",function(){a(this).remove()})),a.notyRenderer.setLayoutCountFor(b,-1),0==a.notyRenderer.getLayoutCountFor(b)&&a(b.options.layout.container.selector).remove(),"undefined"!=typeof b.$bar&&null!==b.$bar&&(b.$bar.remove(),b.$bar=null,b.closed=!0),delete a.noty.store[b.options.id],b.options.theme.callback&&b.options.theme.callback.onClose&&b.options.theme.callback.onClose.apply(b),b.options.dismissQueue||(a.noty.ontap=!0,a.notyRenderer.render()),b.options.maxVisible>0&&b.options.dismissQueue&&a.notyRenderer.render()})}},setText:function(a){return this.closed||(this.options.text=a,this.$bar.find(".noty_text").html(a)),this},setType:function(a){return this.closed||(this.options.type=a,this.options.theme.style.apply(this),this.options.theme.callback.onShow.apply(this)),this},setTimeout:function(a){if(!this.closed){var b=this;this.options.timeout=a,b.$bar.delay(b.options.timeout).promise().done(function(){b.close()})}return this},stopPropagation:function(a){a=a||window.event,"undefined"!=typeof a.stopPropagation?a.stopPropagation():a.cancelBubble=!0},closed:!1,showing:!1,shown:!1};a.notyRenderer={},a.notyRenderer.init=function(c){var d=Object.create(b).init(c);return d.options.killer&&a.noty.closeAll(),d.options.force?a.noty.queue.unshift(d):a.noty.queue.push(d),a.notyRenderer.render(),"object"==a.noty.returns?d:d.options.id},a.notyRenderer.render=function(){var b=a.noty.queue[0];"object"===a.type(b)?b.options.dismissQueue?b.options.maxVisible>0?a(b.options.layout.container.selector+" li").length<b.options.maxVisible&&a.notyRenderer.show(a.noty.queue.shift()):a.notyRenderer.show(a.noty.queue.shift()):a.noty.ontap&&(a.notyRenderer.show(a.noty.queue.shift()),a.noty.ontap=!1):a.noty.ontap=!0},a.notyRenderer.show=function(b){b.options.modal&&(a.notyRenderer.createModalFor(b),a.notyRenderer.setModalCount(1)),b.options.custom?0==b.options.custom.find(b.options.layout.container.selector).length?b.options.custom.append(a(b.options.layout.container.object).addClass("i-am-new")):b.options.custom.find(b.options.layout.container.selector).removeClass("i-am-new"):0==a(b.options.layout.container.selector).length?a("body").append(a(b.options.layout.container.object).addClass("i-am-new")):a(b.options.layout.container.selector).removeClass("i-am-new"),a.notyRenderer.setLayoutCountFor(b,1),b.show()},a.notyRenderer.createModalFor=function(b){if(0==a(".noty_modal").length){var c=a("<div/>").addClass("noty_modal").addClass(b.options.theme).data("noty_modal_count",0);b.options.theme.modal&&b.options.theme.modal.css&&c.css(b.options.theme.modal.css),c.prependTo(a("body")).fadeIn("fast")}},a.notyRenderer.getLayoutCountFor=function(b){return a(b.options.layout.container.selector).data("noty_layout_count")||0},a.notyRenderer.setLayoutCountFor=function(b,c){return a(b.options.layout.container.selector).data("noty_layout_count",a.notyRenderer.getLayoutCountFor(b)+c)},a.notyRenderer.getModalCount=function(){return a(".noty_modal").data("noty_modal_count")||0},a.notyRenderer.setModalCount=function(b){return a(".noty_modal").data("noty_modal_count",a.notyRenderer.getModalCount()+b)},a.fn.noty=function(b){return b.custom=a(this),a.notyRenderer.init(b)},a.noty={},a.noty.queue=[],a.noty.ontap=!0,a.noty.layouts={},a.noty.themes={},a.noty.returns="object",a.noty.store={},a.noty.get=function(b){return a.noty.store.hasOwnProperty(b)?a.noty.store[b]:!1},a.noty.close=function(b){return a.noty.get(b)?a.noty.get(b).close():!1},a.noty.setText=function(b,c){return a.noty.get(b)?a.noty.get(b).setText(c):!1},a.noty.setType=function(b,c){return a.noty.get(b)?a.noty.get(b).setType(c):!1},a.noty.clearQueue=function(){a.noty.queue=[]},a.noty.closeAll=function(){a.noty.clearQueue(),a.each(a.noty.store,function(a,b){b.close()})};var c=window.alert;a.noty.consumeAlert=function(b){window.alert=function(c){b?b.text=c:b={text:c},a.notyRenderer.init(b)}},a.noty.stopConsumeAlert=function(){window.alert=c},a.noty.defaults={layout:"top",theme:"defaultTheme",type:"alert",text:"",dismissQueue:!0,template:'<div class="noty_message"><span class="noty_text"></span><div class="noty_close"></div></div>',animation:{open:{height:"toggle"},close:{height:"toggle"},easing:"swing",speed:500},timeout:!1,force:!1,modal:!1,maxVisible:5,killer:!1,closeWith:["click"],callback:{onShow:function(){},afterShow:function(){},onClose:function(){},afterClose:function(){},onCloseClick:function(){}},buttons:!1},a(window).resize(function(){a.each(a.noty.layouts,function(b,c){c.container.style.apply(a(c.container.selector))})})}(jQuery),window.noty=function(a){return jQuery.notyRenderer.init(a)},function(a){a.noty.layouts.bottom={name:"bottom",options:{},container:{object:'<ul id="noty_bottom_layout_container" />',selector:"ul#noty_bottom_layout_container",style:function(){a(this).css({bottom:0,left:"5%",position:"fixed",width:"90%",height:"auto",margin:0,padding:0,listStyleType:"none",zIndex:9999999})}},parent:{object:"<li />",selector:"li",css:{}},css:{display:"none"},addClass:""}}(jQuery),function(a){a.noty.layouts.bottomCenter={name:"bottomCenter",options:{},container:{object:'<ul id="noty_bottomCenter_layout_container" />',selector:"ul#noty_bottomCenter_layout_container",style:function(){a(this).css({bottom:20,left:0,position:"fixed",width:"310px",height:"auto",margin:0,padding:0,listStyleType:"none",zIndex:1e7}),a(this).css({left:(a(window).width()-a(this).outerWidth(!1))/2+"px"})}},parent:{object:"<li />",selector:"li",css:{}},css:{display:"none",width:"310px"},addClass:""}}(jQuery),function(a){a.noty.layouts.bottomLeft={name:"bottomLeft",options:{},container:{object:'<ul id="noty_bottomLeft_layout_container" />',selector:"ul#noty_bottomLeft_layout_container",style:function(){a(this).css({bottom:20,left:20,position:"fixed",width:"310px",height:"auto",margin:0,padding:0,listStyleType:"none",zIndex:1e7}),window.innerWidth<600&&a(this).css({left:5})}},parent:{object:"<li />",selector:"li",css:{}},css:{display:"none",width:"310px"},addClass:""}}(jQuery),function(a){a.noty.layouts.bottomRight={name:"bottomRight",options:{},container:{object:'<ul id="noty_bottomRight_layout_container" />',selector:"ul#noty_bottomRight_layout_container",style:function(){a(this).css({bottom:20,right:20,position:"fixed",width:"310px",height:"auto",margin:0,padding:0,listStyleType:"none",zIndex:1e7}),window.innerWidth<600&&a(this).css({right:5})}},parent:{object:"<li />",selector:"li",css:{}},css:{display:"none",width:"310px"},addClass:""}}(jQuery),function(a){a.noty.layouts.center={name:"center",options:{},container:{object:'<ul id="noty_center_layout_container" />',selector:"ul#noty_center_layout_container",style:function(){a(this).css({position:"fixed",width:"310px",height:"auto",margin:0,padding:0,listStyleType:"none",zIndex:1e7});var b=a(this).clone().css({visibility:"hidden",display:"block",position:"absolute",top:0,left:0}).attr("id","dupe");a("body").append(b),b.find(".i-am-closing-now").remove(),b.find("li").css("display","block");var c=b.height();b.remove(),a(this).hasClass("i-am-new")?a(this).css({left:(a(window).width()-a(this).outerWidth(!1))/2+"px",top:(a(window).height()-c)/2+"px"}):a(this).animate({left:(a(window).width()-a(this).outerWidth(!1))/2+"px",top:(a(window).height()-c)/2+"px"},500)}},parent:{object:"<li />",selector:"li",css:{}},css:{display:"none",width:"310px"},addClass:""}}(jQuery),function(a){a.noty.layouts.centerLeft={name:"centerLeft",options:{},container:{object:'<ul id="noty_centerLeft_layout_container" />',selector:"ul#noty_centerLeft_layout_container",style:function(){a(this).css({left:20,position:"fixed",width:"310px",height:"auto",margin:0,padding:0,listStyleType:"none",zIndex:1e7});var b=a(this).clone().css({visibility:"hidden",display:"block",position:"absolute",top:0,left:0}).attr("id","dupe");a("body").append(b),b.find(".i-am-closing-now").remove(),b.find("li").css("display","block");var c=b.height();b.remove(),a(this).hasClass("i-am-new")?a(this).css({top:(a(window).height()-c)/2+"px"}):a(this).animate({top:(a(window).height()-c)/2+"px"},500),window.innerWidth<600&&a(this).css({left:5})}},parent:{object:"<li />",selector:"li",css:{}},css:{display:"none",width:"310px"},addClass:""}}(jQuery),function(a){a.noty.layouts.centerRight={name:"centerRight",options:{},container:{object:'<ul id="noty_centerRight_layout_container" />',selector:"ul#noty_centerRight_layout_container",style:function(){a(this).css({right:20,position:"fixed",width:"310px",height:"auto",margin:0,padding:0,listStyleType:"none",zIndex:1e7});var b=a(this).clone().css({visibility:"hidden",display:"block",position:"absolute",top:0,left:0}).attr("id","dupe");a("body").append(b),b.find(".i-am-closing-now").remove(),b.find("li").css("display","block");var c=b.height();b.remove(),a(this).hasClass("i-am-new")?a(this).css({top:(a(window).height()-c)/2+"px"}):a(this).animate({top:(a(window).height()-c)/2+"px"},500),window.innerWidth<600&&a(this).css({right:5})}},parent:{object:"<li />",selector:"li",css:{}},css:{display:"none",width:"310px"},addClass:""}}(jQuery),function(a){a.noty.layouts.inline={name:"inline",options:{},container:{object:'<ul class="noty_inline_layout_container" />',selector:"ul.noty_inline_layout_container",style:function(){a(this).css({width:"100%",height:"auto",margin:0,padding:0,listStyleType:"none",zIndex:9999999})}},parent:{object:"<li />",selector:"li",css:{}},css:{display:"none"},addClass:""}}(jQuery),function(a){a.noty.layouts.top={name:"top",options:{},container:{object:'<ul id="noty_top_layout_container" />',selector:"ul#noty_top_layout_container",style:function(){a(this).css({top:0,left:"5%",position:"fixed",width:"90%",height:"auto",margin:0,padding:0,listStyleType:"none",zIndex:9999999})}},parent:{object:"<li />",selector:"li",css:{}},css:{display:"none"},addClass:""}}(jQuery),function(a){a.noty.layouts.topCenter={name:"topCenter",options:{},container:{object:'<ul id="noty_topCenter_layout_container" />',selector:"ul#noty_topCenter_layout_container",style:function(){a(this).css({top:20,left:0,position:"fixed",width:"310px",height:"auto",margin:0,padding:0,listStyleType:"none",zIndex:1e7}),a(this).css({left:(a(window).width()-a(this).outerWidth(!1))/2+"px"})}},parent:{object:"<li />",selector:"li",css:{}},css:{display:"none",width:"310px"},addClass:""}}(jQuery),function(a){a.noty.layouts.topLeft={name:"topLeft",options:{},container:{object:'<ul id="noty_topLeft_layout_container" />',selector:"ul#noty_topLeft_layout_container",style:function(){a(this).css({top:20,left:20,position:"fixed",width:"310px",height:"auto",margin:0,padding:0,listStyleType:"none",zIndex:1e7}),window.innerWidth<600&&a(this).css({left:5})}},parent:{object:"<li />",selector:"li",css:{}},css:{display:"none",width:"310px"},addClass:""}}(jQuery),function(a){a.noty.layouts.topRight={name:"topRight",options:{},container:{object:'<ul id="noty_topRight_layout_container" />',selector:"ul#noty_topRight_layout_container",style:function(){a(this).css({top:20,right:20,position:"fixed",width:"310px",height:"auto",margin:0,padding:0,listStyleType:"none",zIndex:1e7}),window.innerWidth<600&&a(this).css({right:5})}},parent:{object:"<li />",selector:"li",css:{}},css:{display:"none",width:"310px"},addClass:""}}(jQuery),function(a){a.noty.themes.defaultTheme={name:"defaultTheme",helpers:{borderFix:function(){if(this.options.dismissQueue){var b=this.options.layout.container.selector+" "+this.options.layout.parent.selector;switch(this.options.layout.name){case"top":a(b).css({borderRadius:"0px 0px 0px 0px"}),a(b).last().css({borderRadius:"0px 0px 5px 5px"});break;case"topCenter":case"topLeft":case"topRight":case"bottomCenter":case"bottomLeft":case"bottomRight":case"center":case"centerLeft":case"centerRight":case"inline":a(b).css({borderRadius:"0px 0px 0px 0px"}),a(b).first().css({"border-top-left-radius":"5px","border-top-right-radius":"5px"}),a(b).last().css({"border-bottom-left-radius":"5px","border-bottom-right-radius":"5px"});break;case"bottom":a(b).css({borderRadius:"0px 0px 0px 0px"}),a(b).first().css({borderRadius:"5px 5px 0px 0px"})}}}},modal:{css:{position:"fixed",width:"100%",height:"100%",backgroundColor:"#000",zIndex:1e4,opacity:.6,display:"none",left:0,top:0}},style:function(){switch(this.$bar.css({overflow:"hidden",background:"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABsAAAAoCAYAAAAPOoFWAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAPZJREFUeNq81tsOgjAMANB2ov7/7ypaN7IlIwi9rGuT8QSc9EIDAsAznxvY4pXPKr05RUE5MEVB+TyWfCEl9LZApYopCmo9C4FKSMtYoI8Bwv79aQJU4l6hXXCZrQbokJEksxHo9KMOgc6w1atHXM8K9DVC7FQnJ0i8iK3QooGgbnyKgMDygBWyYFZoqx4qS27KqLZJjA1D0jK6QJcYEQEiWv9PGkTsbqxQ8oT+ZtZB6AkdsJnQDnMoHXHLGKOgDYuCWmYhEERCI5gaamW0bnHdA3k2ltlIN+2qKRyCND0bhqSYCyTB3CAOc4WusBEIpkeBuPgJMAAX8Hs1NfqHRgAAAABJRU5ErkJggg==') repeat-x scroll left top #fff"}),this.$message.css({fontSize:"13px",lineHeight:"16px",textAlign:"center",padding:"8px 10px 9px",width:"auto",position:"relative"}),this.$closeButton.css({position:"absolute",top:4,right:4,width:10,height:10,background:"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/ph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cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAATpJREFUeNoszrFqVFEUheG19zlz7sQ7ijMQBAvfYBqbpJCoZSAQbOwEE1IHGytbLQUJ8SUktW8gCCFJMSGSNxCmFBJO7j5rpXD6n5/P5vM53H3b3T9LOiB5AQDuDjM7BnA7DMPHDGBH0nuSzwHsRcRVRNRSysuU0i6AOwA/02w2+9Fae00SEbEh6SGAR5K+k3zWWptKepCm0+kpyRoRGyRBcpPkDsn1iEBr7drdP2VJZyQXERGSPpiZAViTBACXKaV9kqd5uVzCzO5KKb/d/UZSDwD/eyxqree1VqSu6zKAF2Z2RPJJaw0rAkjOJT0m+SuT/AbgDcmnkmBmfwAsJL1dXQ8lWY6IGwB1ZbrOOb8zs8thGP4COFwx/mE8Ho9Go9ErMzvJOW/1fY/JZIJSypqZfXX3L13X9fcDAKJct1sx3OiuAAAAAElFTkSuQmCC)",display:"none",cursor:"pointer"}),this.$buttons.css({padding:5,textAlign:"right",borderTop:"1px solid #ccc",backgroundColor:"#fff"}),this.$buttons.find("button").css({marginLeft:5}),this.$buttons.find("button:first").css({marginLeft:0}),this.$bar.bind({mouseenter:function(){a(this).find(".noty_close").stop().fadeTo("normal",1)},mouseleave:function(){a(this).find(".noty_close").stop().fadeTo("normal",0)}}),this.options.layout.name){case"top":this.$bar.css({borderRadius:"0px 0px 5px 5px",borderBottom:"2px solid #eee",borderLeft:"2px solid #eee",borderRight:"2px solid #eee",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.1)"});break;case"topCenter":case"center":case"bottomCenter":case"inline":this.$bar.css({borderRadius:"5px",border:"1px solid #eee",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.1)"}),this.$message.css({fontSize:"13px",textAlign:"center"});break;case"topLeft":case"topRight":case"bottomLeft":case"bottomRight":case"centerLeft":case"centerRight":this.$bar.css({borderRadius:"5px",border:"1px solid #eee",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.1)"}),this.$message.css({fontSize:"13px",textAlign:"left"});break;case"bottom":this.$bar.css({borderRadius:"5px 5px 0px 0px",borderTop:"2px solid #eee",borderLeft:"2px solid #eee",borderRight:"2px solid #eee",boxShadow:"0 -2px 4px rgba(0, 0, 0, 0.1)"});break;default:this.$bar.css({border:"2px solid #eee",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.1)"})}switch(this.options.type){case"alert":case"notification":this.$bar.css({backgroundColor:"#FFF",borderColor:"#CCC",color:"#444"});break;case"warning":this.$bar.css({backgroundColor:"#FFEAA8",borderColor:"#FFC237",color:"#826200"}),this.$buttons.css({borderTop:"1px solid #FFC237"});break;case"error":this.$bar.css({backgroundColor:"red",borderColor:"darkred",color:"#FFF"}),this.$message.css({fontWeight:"bold"}),this.$buttons.css({borderTop:"1px solid darkred"});break;case"information":this.$bar.css({backgroundColor:"#57B7E2",borderColor:"#0B90C4",color:"#FFF"}),this.$buttons.css({borderTop:"1px solid #0B90C4"});break;case"success":this.$bar.css({backgroundColor:"lightgreen",borderColor:"#50C24E",color:"darkgreen"}),this.$buttons.css({borderTop:"1px solid #50C24E"});break;default:this.$bar.css({backgroundColor:"#FFF",borderColor:"#CCC",color:"#444"})}},callback:{onShow:function(){a.noty.themes.defaultTheme.helpers.borderFix.apply(this)},onClose:function(){a.noty.themes.defaultTheme.helpers.borderFix.apply(this)}}}}(jQuery);
@@ -0,0 +1,432 @@
1
+ /*!
2
+ * Noty Helpers Javascript From JQuery Javascript Library
3
+ *
4
+ * Ported by Maksim Pecherskiy. Original Licensing:
5
+ *
6
+ * http://jquery.com/
7
+ *
8
+ * Copyright 2011, John Resig
9
+ * Dual licensed under the MIT or GPL Version 2 licenses.
10
+ * http://jquery.org/license
11
+ *
12
+ * Includes Sizzle.js
13
+ * http://sizzlejs.com/
14
+ * Copyright 2011, The Dojo Foundation
15
+ * Released under the MIT, BSD, and GPL Licenses.
16
+ *
17
+ * Date: Mon Nov 21 21:11:03 2011 -0500
18
+ */
19
+
20
+
21
+ (function(){
22
+
23
+ // String to Object flags format cache
24
+ var flagsCache = {};
25
+
26
+ // Convert String-formatted flags into Object-formatted ones and store in cache
27
+ function createFlags( flags ) {
28
+ var object = flagsCache[ flags ] = {},
29
+ i, length;
30
+ flags = flags.split( /\s+/ );
31
+ for ( i = 0, length = flags.length; i < length; i++ ) {
32
+ object[ flags[i] ] = true;
33
+ }
34
+ return object;
35
+ }
36
+
37
+ jQuery.extend({
38
+
39
+ _mark: function( elem, type ) {
40
+ if ( elem ) {
41
+ type = (type || "fx") + "mark";
42
+ jQuery.data( elem, type, (jQuery.data(elem,type,undefined,true) || 0) + 1, true );
43
+ }
44
+ },
45
+
46
+ _unmark: function( force, elem, type ) {
47
+ if ( force !== true ) {
48
+ type = elem;
49
+ elem = force;
50
+ force = false;
51
+ }
52
+ if ( elem ) {
53
+ type = type || "fx";
54
+ var key = type + "mark",
55
+ count = force ? 0 : ( (jQuery.data( elem, key, undefined, true) || 1 ) - 1 );
56
+ if ( count ) {
57
+ jQuery.data( elem, key, count, true );
58
+ } else {
59
+ jQuery.removeData( elem, key, true );
60
+ handleQueueMarkDefer( elem, type, "mark" );
61
+ }
62
+ }
63
+ },
64
+
65
+ queue: function( elem, type, data ) {
66
+ if ( elem ) {
67
+ type = (type || "fx") + "queue";
68
+ var q = jQuery.data( elem, type, undefined, true );
69
+ // Speed up dequeue by getting out quickly if this is just a lookup
70
+ if ( data ) {
71
+ if ( !q || jQuery.isArray(data) ) {
72
+ q = jQuery.data( elem, type, jQuery.makeArray(data), true );
73
+ } else {
74
+ q.push( data );
75
+ }
76
+ }
77
+ return q || [];
78
+ }
79
+ },
80
+
81
+ dequeue: function( elem, type ) {
82
+ type = type || "fx";
83
+
84
+ var queue = jQuery.queue( elem, type ),
85
+ fn = queue.shift(),
86
+ defer;
87
+
88
+ // If the fx queue is dequeued, always remove the progress sentinel
89
+ if ( fn === "inprogress" ) {
90
+ fn = queue.shift();
91
+ }
92
+
93
+ if ( fn ) {
94
+ // Add a progress sentinel to prevent the fx queue from being
95
+ // automatically dequeued
96
+ if ( type === "fx" ) {
97
+ queue.unshift("inprogress");
98
+ }
99
+
100
+ fn.call(elem, function() {
101
+ jQuery.dequeue(elem, type);
102
+ });
103
+ }
104
+
105
+ if ( !queue.length ) {
106
+ jQuery.removeData( elem, type + "queue", true );
107
+ handleQueueMarkDefer( elem, type, "queue" );
108
+ }
109
+ }
110
+ });
111
+
112
+ jQuery.fn.extend({
113
+ queue: function( type, data ) {
114
+ if ( typeof type !== "string" ) {
115
+ data = type;
116
+ type = "fx";
117
+ }
118
+
119
+ if ( data === undefined ) {
120
+ return jQuery.queue( this[0], type );
121
+ }
122
+ return this.each(function() {
123
+ var queue = jQuery.queue( this, type, data );
124
+
125
+ if ( type === "fx" && queue[0] !== "inprogress" ) {
126
+ jQuery.dequeue( this, type );
127
+ }
128
+ });
129
+ },
130
+ dequeue: function( type ) {
131
+ return this.each(function() {
132
+ jQuery.dequeue( this, type );
133
+ });
134
+ },
135
+ // Based off of the plugin by Clint Helfers, with permission.
136
+ // http://blindsignals.com/index.php/2009/07/jquery-delay/
137
+ delay: function( time, type ) {
138
+ time = jQuery.fx ? jQuery.fx.speeds[time] || time : time;
139
+ type = type || "fx";
140
+
141
+ return this.queue( type, function() {
142
+ var elem = this;
143
+ setTimeout(function() {
144
+ jQuery.dequeue( elem, type );
145
+ }, time );
146
+ });
147
+ },
148
+ clearQueue: function( type ) {
149
+ return this.queue( type || "fx", [] );
150
+ },
151
+ // Get a promise resolved when queues of a certain type
152
+ // are emptied (fx is the type by default)
153
+ promise: function( type, object ) {
154
+ if ( typeof type !== "string" ) {
155
+ object = type;
156
+ type = undefined;
157
+ }
158
+ type = type || "fx";
159
+ var defer = jQuery.Deferred(),
160
+ elements = this,
161
+ i = elements.length,
162
+ count = 1,
163
+ deferDataKey = type + "defer",
164
+ queueDataKey = type + "queue",
165
+ markDataKey = type + "mark",
166
+ tmp;
167
+ function resolve() {
168
+ if ( !( --count ) ) {
169
+ defer.resolveWith( elements, [ elements ] );
170
+ }
171
+ }
172
+ while( i-- ) {
173
+ if (( tmp = jQuery.data( elements[ i ], deferDataKey, undefined, true ) ||
174
+ ( jQuery.data( elements[ i ], queueDataKey, undefined, true ) ||
175
+ jQuery.data( elements[ i ], markDataKey, undefined, true ) ) &&
176
+ jQuery.data( elements[ i ], deferDataKey, jQuery._Deferred(), true ) )) {
177
+ count++;
178
+ tmp.done( resolve );
179
+ }
180
+ }
181
+ resolve();
182
+ return defer.promise();
183
+ }
184
+ });
185
+
186
+ function handleQueueMarkDefer( elem, type, src ) {
187
+ var deferDataKey = type + "defer",
188
+ queueDataKey = type + "queue",
189
+ markDataKey = type + "mark",
190
+ defer = jQuery._data( elem, deferDataKey );
191
+ if ( defer &&
192
+ ( src === "queue" || !jQuery._data(elem, queueDataKey) ) &&
193
+ ( src === "mark" || !jQuery._data(elem, markDataKey) ) ) {
194
+ // Give room for hard-coded callbacks to fire first
195
+ // and eventually mark/queue something else on the element
196
+ setTimeout( function() {
197
+ if ( !jQuery._data( elem, queueDataKey ) &&
198
+ !jQuery._data( elem, markDataKey ) ) {
199
+ jQuery.removeData( elem, deferDataKey, true );
200
+ defer.fire();
201
+ }
202
+ }, 0 );
203
+ }
204
+ }
205
+
206
+
207
+
208
+ jQuery.Callbacks = function( flags ) {
209
+
210
+ // Convert flags from String-formatted to Object-formatted
211
+ // (we check in cache first)
212
+ flags = flags ? ( /*flagsCache[ flags ] || */createFlags( flags ) ) : {};
213
+
214
+ var // Actual callback list
215
+ list = [],
216
+ // Stack of fire calls for repeatable lists
217
+ stack = [],
218
+ // Last fire value (for non-forgettable lists)
219
+ memory,
220
+ // Flag to know if list is currently firing
221
+ firing,
222
+ // First callback to fire (used internally by add and fireWith)
223
+ firingStart,
224
+ // End of the loop when firing
225
+ firingLength,
226
+ // Index of currently firing callback (modified by remove if needed)
227
+ firingIndex,
228
+ // Add one or several callbacks to the list
229
+ add = function( args ) {
230
+ var i,
231
+ length,
232
+ elem,
233
+ type,
234
+ actual;
235
+ for ( i = 0, length = args.length; i < length; i++ ) {
236
+ elem = args[ i ];
237
+ type = jQuery.type( elem );
238
+ if ( type === "array" ) {
239
+ // Inspect recursively
240
+ add( elem );
241
+ } else if ( type === "function" ) {
242
+ // Add if not in unique mode and callback is not in
243
+ if ( !flags.unique || !self.has( elem ) ) {
244
+ list.push( elem );
245
+ }
246
+ }
247
+ }
248
+ },
249
+ // Fire callbacks
250
+ fire = function( context, args ) {
251
+ args = args || [];
252
+ memory = !flags.memory || [ context, args ];
253
+ firing = true;
254
+ firingIndex = firingStart || 0;
255
+ firingStart = 0;
256
+ firingLength = list.length;
257
+ for ( ; list && firingIndex < firingLength; firingIndex++ ) {
258
+ if ( list[ firingIndex ].apply( context, args ) === false && flags.stopOnFalse ) {
259
+ memory = true; // Mark as halted
260
+ break;
261
+ }
262
+ }
263
+ firing = false;
264
+ if ( list ) {
265
+ if ( !flags.once ) {
266
+ if ( stack && stack.length ) {
267
+ memory = stack.shift();
268
+ self.fireWith( memory[ 0 ], memory[ 1 ] );
269
+ }
270
+ } else if ( memory === true ) {
271
+ self.disable();
272
+ } else {
273
+ list = [];
274
+ }
275
+ }
276
+ },
277
+ // Actual Callbacks object
278
+ self = {
279
+ // Add a callback or a collection of callbacks to the list
280
+ add: function() {
281
+ if ( list ) {
282
+ var length = list.length;
283
+ add( arguments );
284
+ // Do we need to add the callbacks to the
285
+ // current firing batch?
286
+ if ( firing ) {
287
+ firingLength = list.length;
288
+ // With memory, if we're not firing then
289
+ // we should call right away, unless previous
290
+ // firing was halted (stopOnFalse)
291
+ } else if ( memory && memory !== true ) {
292
+ firingStart = length;
293
+ fire( memory[ 0 ], memory[ 1 ] );
294
+ }
295
+ }
296
+ return this;
297
+ },
298
+ // Remove a callback from the list
299
+ remove: function() {
300
+ if ( list ) {
301
+ var args = arguments,
302
+ argIndex = 0,
303
+ argLength = args.length;
304
+ for ( ; argIndex < argLength ; argIndex++ ) {
305
+ for ( var i = 0; i < list.length; i++ ) {
306
+ if ( args[ argIndex ] === list[ i ] ) {
307
+ // Handle firingIndex and firingLength
308
+ if ( firing ) {
309
+ if ( i <= firingLength ) {
310
+ firingLength--;
311
+ if ( i <= firingIndex ) {
312
+ firingIndex--;
313
+ }
314
+ }
315
+ }
316
+ // Remove the element
317
+ list.splice( i--, 1 );
318
+ // If we have some unicity property then
319
+ // we only need to do this once
320
+ if ( flags.unique ) {
321
+ break;
322
+ }
323
+ }
324
+ }
325
+ }
326
+ }
327
+ return this;
328
+ },
329
+ // Control if a given callback is in the list
330
+ has: function( fn ) {
331
+ if ( list ) {
332
+ var i = 0,
333
+ length = list.length;
334
+ for ( ; i < length; i++ ) {
335
+ if ( fn === list[ i ] ) {
336
+ return true;
337
+ }
338
+ }
339
+ }
340
+ return false;
341
+ },
342
+ // Remove all callbacks from the list
343
+ empty: function() {
344
+ list = [];
345
+ return this;
346
+ },
347
+ // Have the list do nothing anymore
348
+ disable: function() {
349
+ list = stack = memory = undefined;
350
+ return this;
351
+ },
352
+ // Is it disabled?
353
+ disabled: function() {
354
+ return !list;
355
+ },
356
+ // Lock the list in its current state
357
+ lock: function() {
358
+ stack = undefined;
359
+ if ( !memory || memory === true ) {
360
+ self.disable();
361
+ }
362
+ return this;
363
+ },
364
+ // Is it locked?
365
+ locked: function() {
366
+ return !stack;
367
+ },
368
+ // Call all callbacks with the given context and arguments
369
+ fireWith: function( context, args ) {
370
+ if ( stack ) {
371
+ if ( firing ) {
372
+ if ( !flags.once ) {
373
+ stack.push( [ context, args ] );
374
+ }
375
+ } else if ( !( flags.once && memory ) ) {
376
+ fire( context, args );
377
+ }
378
+ }
379
+ return this;
380
+ },
381
+ // Call all the callbacks with the given arguments
382
+ fire: function() {
383
+ self.fireWith( this, arguments );
384
+ return this;
385
+ },
386
+ // To know if the callbacks have already been called at least once
387
+ fired: function() {
388
+ return !!memory;
389
+ }
390
+ };
391
+
392
+ return self;
393
+ };
394
+
395
+
396
+
397
+ jQuery.fn.extend({
398
+ // Get a promise resolved when queues of a certain type
399
+ // are emptied (fx is the type by default)
400
+ promise: function( type, object ) {
401
+ if ( typeof type !== "string" ) {
402
+ object = type;
403
+ type = undefined;
404
+ }
405
+ type = type || "fx";
406
+ var defer = jQuery.Deferred(),
407
+ elements = this,
408
+ i = elements.length,
409
+ count = 1,
410
+ deferDataKey = type + "defer",
411
+ queueDataKey = type + "queue",
412
+ markDataKey = type + "mark",
413
+ tmp;
414
+ function resolve() {
415
+ if ( !( --count ) ) {
416
+ defer.resolveWith( elements, [ elements ] );
417
+ }
418
+ }
419
+ while( i-- ) {
420
+ if (( tmp = jQuery.data( elements[ i ], deferDataKey, undefined, true ) ||
421
+ ( jQuery.data( elements[ i ], queueDataKey, undefined, true ) ||
422
+ jQuery.data( elements[ i ], markDataKey, undefined, true ) ) &&
423
+ jQuery.data( elements[ i ], deferDataKey, jQuery.Callbacks( "once memory" ), true ) )) {
424
+ count++;
425
+ tmp.add( resolve );
426
+ }
427
+ }
428
+ resolve();
429
+ return defer.promise();
430
+ }
431
+ });
432
+ })();
@@ -0,0 +1,157 @@
1
+ (function($) {
2
+
3
+ $.noty.themes.defaultTheme = {
4
+ name: 'defaultTheme',
5
+ helpers: {
6
+ borderFix: function() {
7
+ if (this.options.dismissQueue) {
8
+ var selector = this.options.layout.container.selector + ' ' + this.options.layout.parent.selector;
9
+ switch (this.options.layout.name) {
10
+ case 'top':
11
+ $(selector).css({borderRadius: '0px 0px 0px 0px'});
12
+ $(selector).last().css({borderRadius: '0px 0px 5px 5px'}); break;
13
+ case 'topCenter': case 'topLeft': case 'topRight':
14
+ case 'bottomCenter': case 'bottomLeft': case 'bottomRight':
15
+ case 'center': case 'centerLeft': case 'centerRight': case 'inline':
16
+ $(selector).css({borderRadius: '0px 0px 0px 0px'});
17
+ $(selector).first().css({'border-top-left-radius': '5px', 'border-top-right-radius': '5px'});
18
+ $(selector).last().css({'border-bottom-left-radius': '5px', 'border-bottom-right-radius': '5px'}); break;
19
+ case 'bottom':
20
+ $(selector).css({borderRadius: '0px 0px 0px 0px'});
21
+ $(selector).first().css({borderRadius: '5px 5px 0px 0px'}); break;
22
+ default: break;
23
+ }
24
+ }
25
+ }
26
+ },
27
+ modal: {
28
+ css: {
29
+ position: 'fixed',
30
+ width: '100%',
31
+ height: '100%',
32
+ backgroundColor: '#000',
33
+ zIndex: 10000,
34
+ opacity: 0.6,
35
+ display: 'none',
36
+ left: 0,
37
+ top: 0
38
+ }
39
+ },
40
+ style: function() {
41
+
42
+ this.$bar.css({
43
+ overflow: 'hidden',
44
+ background: "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABsAAAAoCAYAAAAPOoFWAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAPZJREFUeNq81tsOgjAMANB2ov7/7ypaN7IlIwi9rGuT8QSc9EIDAsAznxvY4pXPKr05RUE5MEVB+TyWfCEl9LZApYopCmo9C4FKSMtYoI8Bwv79aQJU4l6hXXCZrQbokJEksxHo9KMOgc6w1atHXM8K9DVC7FQnJ0i8iK3QooGgbnyKgMDygBWyYFZoqx4qS27KqLZJjA1D0jK6QJcYEQEiWv9PGkTsbqxQ8oT+ZtZB6AkdsJnQDnMoHXHLGKOgDYuCWmYhEERCI5gaamW0bnHdA3k2ltlIN+2qKRyCND0bhqSYCyTB3CAOc4WusBEIpkeBuPgJMAAX8Hs1NfqHRgAAAABJRU5ErkJggg==') repeat-x scroll left top #fff"
45
+ });
46
+
47
+ this.$message.css({
48
+ fontSize: '12px',
49
+ lineHeight: '18px',
50
+ textAlign: 'center',
51
+ padding: '8px 10px 9px',
52
+ width: 'auto',
53
+ position: 'relative',
54
+ fontWeight: 'bold'
55
+ });
56
+
57
+ this.$closeButton.css({
58
+ position: 'absolute',
59
+ top: 4, right: 4,
60
+ width: 10, height: 10,
61
+ background: "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEW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dP2VJZyQXERGSPpiZAViTBACXKaV9kqd5uVzCzO5KKb/d/UZSDwD/eyxqree1VqSu6zKAF2Z2RPJJaw0rAkjOJT0m+SuT/AbgDcmnkmBmfwAsJL1dXQ8lWY6IGwB1ZbrOOb8zs8thGP4COFwx/mE8Ho9Go9ErMzvJOW/1fY/JZIJSypqZfXX3L13X9fcDAKJct1sx3OiuAAAAAElFTkSuQmCC)",
62
+ display: 'none',
63
+ cursor: 'pointer'
64
+ });
65
+
66
+ this.$buttons.css({
67
+ padding: 5,
68
+ textAlign: 'right',
69
+ borderTop: '1px solid #ccc',
70
+ backgroundColor: '#fff'
71
+ });
72
+
73
+ this.$buttons.find('button').css({
74
+ marginLeft: 5
75
+ });
76
+
77
+ this.$buttons.find('button:first').css({
78
+ marginLeft: 0
79
+ });
80
+
81
+ this.$bar.on({
82
+ mouseenter: function() { $(this).find('.noty_close').stop().fadeTo('normal',1); },
83
+ mouseleave: function() { $(this).find('.noty_close').stop().fadeTo('normal',0); }
84
+ });
85
+
86
+ switch (this.options.layout.name) {
87
+ case 'top':
88
+ this.$bar.css({
89
+ borderRadius: '0px 0px 5px 5px',
90
+ borderBottom: '2px solid #eee',
91
+ borderLeft: '2px solid #eee',
92
+ borderRight: '2px solid #eee',
93
+ boxShadow: "0 2px 4px rgba(0, 0, 0, 0.1)"
94
+ });
95
+ break;
96
+ case 'topCenter': case 'center': case 'bottomCenter': case 'inline':
97
+ this.$bar.css({
98
+ borderRadius: '5px',
99
+ border: '1px solid #eee',
100
+ boxShadow: "0 2px 4px rgba(0, 0, 0, 0.1)"
101
+ });
102
+ this.$message.css({fontSize: '12px', textAlign: 'center'});
103
+ break;
104
+ case 'topLeft': case 'topRight':
105
+ case 'bottomLeft': case 'bottomRight':
106
+ case 'centerLeft': case 'centerRight':
107
+ this.$bar.css({
108
+ borderRadius: '5px',
109
+ border: '1px solid #eee',
110
+ boxShadow: "0 2px 4px rgba(0, 0, 0, 0.1)"
111
+ });
112
+ this.$message.css({fontSize: '12px', textAlign: 'left'});
113
+ break;
114
+ case 'bottom':
115
+ this.$bar.css({
116
+ borderRadius: '5px 5px 0px 0px',
117
+ borderTop: '2px solid #eee',
118
+ borderLeft: '2px solid #eee',
119
+ borderRight: '2px solid #eee',
120
+ boxShadow: "0 -2px 4px rgba(0, 0, 0, 0.1)"
121
+ });
122
+ break;
123
+ default:
124
+ this.$bar.css({
125
+ border: '2px solid #eee',
126
+ boxShadow: "0 2px 4px rgba(0, 0, 0, 0.1)"
127
+ });
128
+ break;
129
+ }
130
+
131
+ switch (this.options.type) {
132
+ case 'alert': case 'notification':
133
+ this.$bar.css({backgroundColor: '#FFF', borderColor: '#CCC', color: '#444'}); break;
134
+ case 'warning':
135
+ this.$bar.css({backgroundColor: '#FFEAA8', borderColor: '#FFC237', color: '#826200'});
136
+ this.$buttons.css({borderTop: '1px solid #FFC237'}); break;
137
+ case 'error':
138
+ this.$bar.css({backgroundColor: 'red', borderColor: 'darkred', color: '#FFF'});
139
+ this.$message.css({fontWeight: 'bold'});
140
+ this.$buttons.css({borderTop: '1px solid darkred'}); break;
141
+ case 'information':
142
+ this.$bar.css({backgroundColor: '#57B7E2', borderColor: '#0B90C4', color: '#FFF'});
143
+ this.$buttons.css({borderTop: '1px solid #0B90C4'}); break;
144
+ case 'success':
145
+ this.$bar.css({backgroundColor: 'lightgreen', borderColor: '#50C24E', color: 'darkgreen'});
146
+ this.$buttons.css({borderTop: '1px solid #50C24E'});break;
147
+ default:
148
+ this.$bar.css({backgroundColor: '#FFFF', borderColor: '#CCC', color: '#444'}); break;
149
+ }
150
+ },
151
+ callback: {
152
+ onShow: function() { $.noty.themes.defaultTheme.helpers.borderFix.apply(this); },
153
+ onClose: function() { $.noty.themes.defaultTheme.helpers.borderFix.apply(this); }
154
+ }
155
+ };
156
+
157
+ })(jQuery);