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
$(function() { | |
//run the accordion plugin, set height of sections to height of content | |
$("#accordion").accordion({ autoHeight: false }); | |
}); | |
;(function($) { | |
//write new sammy application | |
var app = new Sammy.Application(function() { | |
with(this) { | |
//corresponds to routes such as #/section/1 | |
get('#/section/:section_id', function() { with(this) { |
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
//get first part of current url, without hash | |
var base_path = window.location.href.split("#")[0]; | |
var real_id = 0; | |
var current_page; | |
;(function($) { | |
//create new sammy app | |
var app = new Sammy.Application(function() { | |
with(this) { | |
//corresponds to routes like #/slide/1 | |
get('#/slide/:page_id', function() { with(this) { |
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
var next_path; | |
var form_stages; | |
var check_a; | |
var check_s; | |
var prev_path; | |
var field_val; | |
;(function($) { | |
var app = new Sammy.Application(function() { | |
with(this) { | |
get('#/stage/:id', function() { with(this) { |
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
require 'sinatra' | |
require 'pathname' | |
get "/" do | |
html = "<h1>Your files, sir.</h1>" | |
dir = "./files/" | |
Dir[dir+"*"].each do |file| | |
html+=file_link(file) | |
end | |
html |
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
stop(); | |
// this sets the component's pageName param to | |
// something we'll define in the next step | |
cmp_omn.pageName = _root.clickedItem; | |
// check it's working | |
trace(cmp_omn.pageName); | |
// this waits for 0.3 seconds and then calls 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
// declare your variable | |
var clickedItem:String; | |
// clickable_mc can obviously be the | |
// instance name of anything you want | |
// the user to click | |
clickable_mc.onRelease = function() { | |
// set the variable to anything - this | |
// will be grabbed in mc_omn and assigned |
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
stop(); |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" | |
"http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd"> |
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
<div xmlns:dc="http://purl.org/dc/elements/1.1/#" about="http://www.example.com/books/my_great_book.pdf"> | |
<p> | |
<span property="dc:title">My Great Book</span> by | |
<span property="dc:creator">Joe Corcoran</span>, published | |
<span property="dc:date">2009-10-01</span>. | |
</p> | |
</div> |
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
def multi_select(id, name, objects, selected_objects, value, content = {}) | |
options = "" | |
objects.each do |o| | |
selected = selected_objects.include?(o) ? " selected=\"selected\"" : "" | |
option_value = escape_once(o.send(value)) | |
text = [option_value] | |
unless content[:text].nil? | |
text = [] | |
content[:text].each do |t| | |
text << o.send(t) |
OlderNewer