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
#!/bin/sh | |
if git rev-parse --verify HEAD >/dev/null 2>&1; then | |
against=HEAD | |
else | |
# put the first changeset hash value in your project here (I think) | |
against=facf87a3fa1c853a7dd8dde8cba32e1fc8fde3ea | |
fi | |
for FILE in `git diff-index --name-status $against -- | cut -c3-` ; do |
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/routes.rb | |
BrowsercmsDemo::Application.routes.draw do | |
... | |
mount_bcms_my401k | |
mount_browsercms | |
end | |
... | |
BcmsMy401k::Engine.routes.draw do |
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 'rubygems' | |
require 'spork' | |
#uncomment the following line to use spork with the debugger | |
#require 'spork/ext/ruby-debug' | |
... | |
require File.expand_path("./config/environment.rb") | |
... |
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
# db/my401k.seeds.rb | |
require 'cms/data_loader' | |
extend Cms::DataLoader | |
if(Cms::Category.count == 0) | |
my401k_product_type = create_category_type(:guest, :name => 'My401k Product') | |
create_category(:about_plan, :name => 'About Plan', :category_type => my401k_product_type) | |
create_category(:manage_account, :name => 'Manage Account', :category_type => my401k_product_type) | |
create_category(:helpful_resources, :name => 'Helpful Resources', :category_type => my401k_product_type) |
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
Feature: Content Pages | |
Editors should be able to manage their own pages | |
Background: | |
Given I am a guest | |
... | |
@javascript | |
Scenario: An editor saves the selected category and navigates next to select the desired lay | |
When a registered user visits "/my401k/plan_sponsor/create_new_content" |
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
Feature: Content Pages | |
Editors should be able to manage their own pages | |
Background: | |
# make sure user is logged out | |
Given I am a guest | |
When I visit "/my401k/plan_sponsor/create_new_content" | |
And login as a plan sponsor | |
... |
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
Before('@no-txn,@selenium,@culerity,@celerity') do | |
# I added this block and changed to transaction because @javascript was truncating most of my tables | |
#DatabaseCleaner.strategy = :truncation, {:except => %w[groups]} | |
DatabaseCleaner.strategy = :truncation | |
end | |
Before('@javascript') do | |
#DatabaseCleaner.strategy = :truncation, {:except => %w[groups categories category_types content_types content_type_groups bcms_my401k_layouts]} | |
DatabaseCleaner.strategy = :transaction | |
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(); | |
} | |
} |
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
# 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 = {}) |
OlderNewer