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
class CreateBcmsMy401kWidgets < ActiveRecord::Migration | |
def self.up | |
Cms::ContentType.create!(:name => "BcmsMy401k::Widget", :group_name => "BcmsMy401k::Widget") | |
create_content_table :bcms_my401k_widgets, :prefix=>false do |t| | |
t.integer :user_id | |
t.string :name | |
t.text :description | |
t.timestamps | |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!-- | |
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 | |
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.apache.cxf.Bus; | |
import org.apache.cxf.BusFactory; | |
import org.apache.cxf.bus.spring.SpringBusFactory; | |
public final class UCIDMServicesClient { | |
private UCIDMServicesClient() { | |
} | |
public static void main(String args[]) throws java.lang.Exception { |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5"> | |
<display-name>UCPath-WS</display-name> | |
<welcome-file-list> | |
<welcome-file>index.html</welcome-file> | |
<welcome-file>index.htm</welcome-file> | |
<welcome-file>index.jsp</welcome-file> | |
<welcome-file>default.html</welcome-file> | |
<welcome-file>default.htm</welcome-file> |
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 cms_namespace = "<%= link_to("xxx", block_path(@block)).match(/href=\"\/([^\/]+)/)[1] %>"; |
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
# download html summaries | |
# paste in html reference to stockphoto summary page | |
# use wget to download a static page | |
wget http://www.shutterstock.com/pic-12539920/stock-photo-pretty-young-woman-with-arms-raised-standing-on-beach.html?src=1pUEJjjRjtTVA1C8FaQDfw-2-41 | |
wget http://www.shutterstock.com/pic.mhtml?id=97713707 | |
wget http://www.shutterstock.com/pic.mhtml?id=123208630 | |
wget http://www.shutterstock.com/pic.mhtml?id=111719192 | |
wget http://www.shutterstock.com/pic.mhtml?id=59363377 | |
wget http://www.shutterstock.com/pic.mhtml?id=53308978 |
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
%w[bcms_my401k_articles bcms_my401k_article_versions].each do |t| | |
ActiveRecord::Base.connection.execute("truncate table #{t}") | |
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
# rails-app/browsercms/app/helpers/cms/form_builder.rb | |
# | |
# Adds additional form fields to the Rails FormBuilder which can be used to create CMS forms. | |
# | |
class Cms::FormBuilder < ActionView::Helpers::FormBuilder | |
... | |
# Renders a WYWIWYG rich text editor. | |
def cms_richtext_editor(method, options = {}) |
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
<%# rails-app/browsercms/app/views/cms/form_builder/_cms_richtext_editor.html.erb %> | |
<% tds = Time.now.strftime("%H%M%S") %> | |
<% id_with_tds = "#{id}_#{tds}" %> | |
<%= content_for :html_head do %> | |
<%= javascript_tag do %> | |
jQuery(function($) { setup_select_box_<%= id_with_tds %>(); }) | |
<% end %> | |
<% 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
/* | |
updates form controls with the content of the editors | |
typically called just before persisting to the database | |
*/ | |
function CKupdate(){ | |
if(typeof(CKEDITOR) != "undefined"){ | |
for ( instance in CKEDITOR.instances ) | |
CKEDITOR.instances[instance].updateElement(); | |
} | |
} |