Skip to content

Instantly share code, notes, and snippets.

YUI.add('myoverlay', function(Y) {
Y.MyOverlay = Y.Base.create('myOverlay', Y.Overlay, [], {}, {});
}, '1', {requires: ['overlay']});
Y.use('myoverlay', function() {
var dialog1 = new Y.MyOverlay({contentBox:'#widget1',width:'12em',height:'12em', centered:true, zIndex:10}).render();
});
YUI.add('paginator', function(Y) {
Y.Test = Y.Base.create('test', Y.Widget, [Y.WidgetParent, Y.WidgetChild], {
initializer: function (config) { ... }
}, {
CONTENT_TEMPLATE: '<ul></ul>',
ATTRS: { ... }
});
}, '0.1', {requires: ['widget', 'selector-css3', 'widget-parent', 'widget-child'] });
We couldn’t find that file to show.
Caption.ATTRS = {
title_element: {},
edit_input: {},
edit_button: {},
save_button: {}
};
Caption.HTML_PARSER = {
title_element: '.view h3',
edit_input: '.edit input',
.yui-caption-content .edit { display: none; }
.yui-caption-content.editing .edit { display: block; }
.yui-caption-content.editing .view { display: none: } /* if you like */
<div id="caption1" class="yui-caption-content">
<div class="view">
<h3>Title</h3>
</div>
<div class="edit">
<input value="" name="title" />
<button type="button">Save</button>
</div>
</div>
<html>
<head>
<title>Test</title>
<script src="http://yui.yahooapis.com/3.0.0b1/build/yui/yui-min.js" type="text/javascript"></script>
</head>
<body>
<form>
<div class="thediv">
<textarea name="textarea">Foo</textarea>
</div>
diff --git a/lib/hoptoad_notifier.rb b/lib/hoptoad_notifier.rb
index 1301daa..5b568d2 100644
--- a/lib/hoptoad_notifier.rb
+++ b/lib/hoptoad_notifier.rb
@@ -256,7 +256,10 @@ module HoptoadNotifier
private
def public_environment? #nodoc:
- defined?(RAILS_ENV) and !['development', 'test'].include?(RAILS_ENV)
+ if defined?(RAILS_ENV)
// From http://developer.yahoo.com/yui/3/examples/overlay/overlay-io-plugin.html
YUI3.use('overlay', 'io', function(Y) {
function Lightbox(config) {
arguments.callee.superclass.constructor.call(this, config);
};
Lightbox.NAME = "lightbox";
Lightbox.NS = "lightbox";
Y.extend(Lightbox, Y.Overlay, {
diff --git a/activerecord_base_without_table/lib/active_record/base_without_table.rb b/activerecord_base_without_table/lib/active_record/base_without_table.rb
index 429d121..c6af6eb 100644
--- a/activerecord_base_without_table/lib/active_record/base_without_table.rb
+++ b/activerecord_base_without_table/lib/active_record/base_without_table.rb
@@ -1,6 +1,8 @@
module ActiveRecord
class BaseWithoutTable < Base
self.abstract_class = true
+ class_inheritable_array :columns
+ self.columns = []