Skip to content

Instantly share code, notes, and snippets.

@garyt
garyt / xsl_input
Created January 12, 2012 22:06
xsl input with attributes
<input id="webSearchInput" value="Press Enter to search..." name="query" type="text">
<xsl:attribute name="onblur">
<xsl:text>if (this.value == '') {this.value = 'Press Enter to search...';}</xsl:text>
</xsl:attribute>
<xsl:attribute name="onfocus">
<xsl:text>if (this.value == 'Press Enter to search...') {this.value = '';}</xsl:text>
</xsl:attribute>
</input>
@garyt
garyt / g.compass.config
Created January 13, 2012 21:55
G Compass config
# COMPASS WATCH
desc "Watches and compiles sass to tomcat"
task :watch do
puts Paint["Watching sass", :cyan]
puts "Watching: " + SRC_SCSS
puts "Compile to: " + TOMCAT_SKIN + SCSS_CSS
puts "output-style: " + SCSS_OUTPUT
Dir.chdir(COMPASS) do
system "compass watch #{SRC_SCSS}:#{TOMCAT_SKIN}# --output-style #{SCSS_OUTPUT}"
end
@garyt
garyt / sakai_eval_item_markup.html
Created January 17, 2012 23:49
Sakai Eval Item Markup
<!-- html template for the text item renderer -AZ -->
<div rsf:id="render-text-item:" class="item essay">
<h5 class="title">
<span rsf:id="itemNum" class="number">0</span>
<span class="delineator">)</span>
<span class="required">*</span>
<div rsf:id="itemText" class="label"></div>
</h5>
<div class="content">
<textarea rsf:id="essayBox"></textarea>
@garyt
garyt / gist:1677542
Created January 25, 2012 17:44
UCB evalsys full display markup
<div rsf:id="fullDisplay:" class="display-full horizontal">
<!-- FULL DISPLAY -->
<ol>
<li>
<input type="radio" rsf:id="radioValue" id="full1"/>
<label for="full1" rsf:id="radioLabel">full label</label>
</li>
<li>
<input type="radio" rsf:id="radioValue" id="full2"/>
<label for="full2" rsf:id="radioLabel">full label</label>
@garyt
garyt / gist:1683749
Created January 26, 2012 16:53
UCB evalsys likert scale markup
<div class="item scale">
<div class="compact">
<h5 class="title">
<span class="number">1</span>
<span class="delineator">
<span class="paren">)</span>
<span class="dot">.</span>
</span>
<span class="required">*</span>
<span class="label">Question text.</span>
@garyt
garyt / gist:1691390
Created January 27, 2012 22:50
up4 error
ERROR [main] Jan/27 15:20:18,689 context.ContextLoader.[] - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.beans.factory.config.CustomEditorConfigurer#0' defined in file [/Users/garyt/development/jasig/apache-tomcat-6.0.35/webapps/uPortal/WEB-INF/classes/properties/contexts/applicationContext.xml]: Cannot resolve reference to bean 'portalPropertyEditorRegistrar' while setting bean property 'propertyEditorRegistrars' with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'portalPropertyEditorRegistrar' defined in file [/Users/garyt/development/jasig/apache-tomcat-6.0.35/webapps/uPortal/WEB-INF/classes/properties/contexts/applicationContext.xml]: Error converting typed String value for bean property 'propertyEditors'; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert value of type 'java.lang.String' to required type 'jav
@garyt
garyt / gist:1719795
Created February 1, 2012 22:11
scale item javascript
<script type="text/javascript">
/////////////////////////////////
// Compact Scales
/////////////////////////////////
// To achieve the inline display of the title and the content, both block elements are floated with css.
// This is great except when the title is long enough to overlap the floated content.
// In that scenario, the title is pushing the content to the next line.
// To prevent that, will calculate and set the space available to the title.
@garyt
garyt / gist:1754519
Created February 6, 2012 20:11
up4 error
ERROR [main] Feb/06 13:07:44,791 context.ContextLoader.[] - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.beans.factory.config.CustomEditorConfigurer#0' defined in file [/Users/garyt/development/jasig/apache-tomcat-6.0.35/webapps/uPortal/WEB-INF/classes/properties/contexts/applicationContext.xml]: Cannot resolve reference to bean 'portalPropertyEditorRegistrar' while setting bean property 'propertyEditorRegistrars' with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'portalPropertyEditorRegistrar' defined in file [/Users/garyt/development/jasig/apache-tomcat-6.0.35/webapps/uPortal/WEB-INF/classes/properties/contexts/applicationContext.xml]: Error converting typed String value for bean property 'propertyEditors'; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert value of type 'java.lang.String' to required type 'jav
@garyt
garyt / gist:1754886
Created February 6, 2012 21:09
catalina properties
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
// Touchpoints
var availableTPs = $('#availableTPs a'),
tpList = $('#tpList'),
currentTPs = $('#tpList a');
// Click from a list of available touchpoints to create a user-selected list of touchpoints.
availableTPs.on('click', function(event){
var clickedTPLabel = $(this).children('span').html(),
tpListLength = countTPs(),
newTPMarkup = createNewTP();