This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(".more_facets_link a").each(function() { | |
//We use each to let us make a Dialog object for each | |
//a, tied to that a, through the miracle of closures. the second | |
// arg to 'bind' is used to make sure the event handler gets it's | |
// own dialog. | |
var more_facets_dialog = $("<div></div>").dialog({ autoOpen: false }); | |
$(this).bind("click", {dialog: more_facets_dialog}, function( event ) { | |
// Load the original URL on the link into the dialog associated | |
// with it. | |
// Rails app will give us an appropriate partial. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(".more_facets_link a").each(function() { | |
//We use each to let us make a Dialog object for each | |
//a, tied to that a, through the miracle of closures. the second | |
// arg to 'bind' is used to make sure the event handler gets it's | |
// own dialog. | |
var more_facets_dialog = "empty"; | |
$(this).click( function() { | |
//lazy create of dialog | |
if ( more_facets_dialog == "empty") { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
irb(main):011:0> class AutoHash | |
irb(main):012:1> def initialize(*args) | |
irb(main):013:2> super(*args) {|hash, key| hash[key] = AutoHash.new } | |
irb(main):014:2> end | |
irb(main):015:1> end | |
=> nil | |
irb(main):016:0> a = AutoHash.new | |
=> {} | |
irb(main):017:0> a["foo"]["bar"]["baz"] | |
=> {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.marc4j.marc.Record; | |
import org.marc4j.marc.DataField; | |
import org.marc4j.marc.Subfield; | |
import org.solrmarc.tools.Utils; | |
// define the base level indexer so that its methods can be called from the script. | |
// note that the SolrIndexer code will set this value before the script methods are called. | |
org.solrmarc.index.SolrIndexer indexer = null; | |
// Max estimation -- biggest delta of unknown dates that we'll take the |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
==== | |
= config.properties | |
==== | |
# solrmarc.solr.war.path - must point to either a war file for the version of Solr that | |
# you want to use, or to a directory of jar files extracted from a Solr war files. If | |
# this is not provided, SolrMarc can only work by communicating with a running Solr server. | |
# Uncomment war.path and solr.path only if you want solrmarc to manually | |
# write lucene indexes to disk. We do not! We want to use conventional |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module MarcDisplay | |
# in order to get our nice shortcut method, we mix in MarcLogicProcs | |
# as class methods, so we can use them in our class var definition. | |
self.extend(MarcDisplayLogic::MarcLogicProcs) | |
def self.default_presenter_config_list | |
DefaultPresenterConfigList | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.marc4j.marc.Record; | |
import org.marc4j.marc.DataField; | |
import org.marc4j.marc.Subfield; | |
import org.solrmarc.tools.Utils; | |
// define the base level indexer so that its methods can be called from the script. | |
// note that the SolrIndexer code will set this value before the script methods are called. | |
org.solrmarc.index.SolrIndexer indexer = null; | |
/** Transformational hashes **/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# put this in any .rb file in config/initializers , make up your own, put it in an | |
# existing one, whatever works for you. | |
# As with many things in rails/Blacklight, there are many ways to do this, but | |
# this is one, it looks kinda complicated becuase it's trying to deal with | |
# cache_classes=false business. | |
module LocalAssetInclude | |
def add_local_assets | |
# my_local_stylesheet.css should be found in your app's public/stylesheets/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'nokogiri' | |
xml = %Q{ | |
<root xmlns:example="http://example.org"> | |
<example:element> | |
<example:child> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* -------------------------------------------------------------------- | |
* jQuery collapsible plugin | |
* Author: Scott Jehl, [email protected] | |
* Copyright (c) 2009 Filament Group | |
* licensed under MIT (filamentgroup.com/examples/mit-license.txt) | |
* -------------------------------------------------------------------- | |
* | |
* See: http://dwpe.googlecode.com | |
* http://filamentgroup.com/lab/expand_and_collapse_content_accessibly_with_progressive_enhancement_jquery/ |
OlderNewer