Skip to content

Instantly share code, notes, and snippets.

View derek's full-sized avatar

Derek Gathright derek

View GitHub Profile
@derek
derek / gist:1500415
Created December 20, 2011 05:35
YUI ScrollView w/ Mousewheel support
diff --git a/src/scrollview/js/scrollview-base.js b/src/scrollview/js/scrollview-base.js
index 394a75d..e967c97 100644
--- a/src/scrollview/js/scrollview-base.js
+++ b/src/scrollview/js/scrollview-base.js
@@ -15,6 +15,7 @@ var getClassName = Y.ClassNameManager.getClassName,
FLICK = EV_SCROLL_FLICK,
DRAG = "drag",
+ MOUSEWHEEL = "mousewheel",
@derek
derek / gist:1597168
Created January 11, 2012 22:30
Y.ButtonGroup

Y.ButtonGroup

Problem

I have multiple Y.Button instances that are logically associated and need to be managed as a group.

For example, you may need a radio group, so when one button becomes selected, the others are unselected. Or a checkbox group, which allows you to select multiple buttons and at some point you need to obtain the values of all selected buttons.

Note: A push group is really just a checkbox group, but with Y.Button instances whose types are push as opposed to toggle.

Methods

@derek
derek / gist:1599415
Created January 12, 2012 08:28
YUI Open Hours - Jan 12th, 2012

YUI Open Hours for Jan 12th, 2012

Buttonpalooza!

stupid lolcat .
.
.
.
.
.

@derek
derek / dabblet.css
Created March 2, 2012 01:59
cssbutton.css
/* cssbutton.css */
.yui3-button {
-moz-transition: -moz-box-shadow 0.1s linear 0s;
-moz-user-select: none;
background-color: #E6E6E6;
background-image: -moz-linear-gradient(center top , rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.15) 40%, transparent);
border: medium none;
border-radius: 4px 4px 4px 4px;
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25) inset, 0 2px 0 rgba(255, 255, 255, 0.3) inset, 0 1px 2px rgba(0, 0, 0, 0.15);
color: rgba(0, 0, 0, 0.8);
@derek
derek / dabblet.css
Created March 2, 2012 22:30
cssbutton.css
/* cssbutton.css */
.yui3-button {
-moz-transition: -moz-box-shadow 0.1s linear 0s;
-moz-user-select: none;
background-color: #E6E6E6;
background-image: -moz-linear-gradient(center top , rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.15) 40%, transparent);
border: medium none;
border-radius: 4px 4px 4px 4px;
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25) inset, 0 2px 0 rgba(255, 255, 255, 0.3) inset, 0 1px 2px rgba(0, 0, 0, 0.15);
color: rgba(0, 0, 0, 0.8);
@derek
derek / index.html
Created March 7, 2012 02:52 — forked from ggoodman/app.js
Plunker YUI template
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<!-- The YUI CSS Reset. Optional -->
<!-- <link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/3.4.1/build/cssreset/cssreset-min.css"> -->
<link rel="stylesheet" href="style.css">
<!-- Load the YUI seed file. http://yuim.in/ always loads the latest version -->
@derek
derek / dabblet.html
Created March 28, 2012 21:53
Untitled
<link rel="stylesheet" href="http://yui.yahooapis.com/combo?3.5.0pr4/build/cssbutton/cssbutton.css">
<button class='yui3-button'>Remove All Items</button>
@derek
derek / dabblet.css
Created July 9, 2012 05:21 — forked from anonymous/dabblet.html
CSS goes here
/* CSS goes here */
@derek
derek / index.html
Created July 17, 2012 18:33
YUI starter - simple
<!DOCTYPE html>
<html>
<meta charset='utf-8'>
<head>
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/3.5.1/build/cssreset/cssreset-min.css">
<style>
/* Styles can go here, in the 'my-css' module, or both! */
</style>
@derek
derek / .gitignore
Created July 19, 2012 00:22
Milo utilities
assets/serverRoutes.json
config.json