Skip to content

Commit 3fadcb9

Browse files
committed
Merge pull request browsermedia#676 from jamesprior/master
* Specify ruby version in Gemfile instead of a named rvm installation. * Wrap JQuery ready functions to avoid conflicts.
2 parents b9b4aa1 + ce9d893 commit 3fadcb9

File tree

8 files changed

+14
-12
lines changed

8 files changed

+14
-12
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,5 @@ test/dummy/.rvmrc
2727
test/dummy/public/assets/*
2828
.sass-cache
2929
.rvmrc
30+
.ruby-version
3031
db/backups

.ruby-version

Lines changed: 0 additions & 1 deletion
This file was deleted.

Gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
source 'http://rubygems.org'
22

3+
ruby '2.0.0'
4+
35
# Load this project as a gem.
46
gemspec
57
gem "mysql2"

app/assets/javascripts/cms/core_library.js.erb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ jQuery(function($) {
113113
// .slug-dest - The input field to set the slug value in.
114114
// @options data-prefix An optional prefix (on slug-dest) that should be added in front of autogenerated slugs
115115
// (i.e. <input class='slug-dest' data-prefix="/products" />)
116-
$(function() {
116+
jQuery(function($){
117117
if ($('.slug-dest').length && $('.slug-source').length) {
118118
$('.slug-source').keyup(function() {
119119
var name = $('.slug-source').val();
@@ -134,14 +134,14 @@ $(function() {
134134
});
135135

136136
// Automatically enable date_picker controls
137-
$(function() {
137+
jQuery(function($){
138138
if ($.datepicker) {
139139
$('input.date_picker').datepicker({ changeFirstDay: false, changeMonth: true, changeYear: true, closeText: '', showButtonPanel: true, dateFormat: '<%= Cms::DatePicker.jquery_format %>' });
140140
}
141141
});
142142

143143
// UI Enhancement to suggest paths for uploaded files
144-
$(function() {
144+
jQuery(function($){
145145
var path_input = $('.suggest_file_path');
146146
if (path_input.length) {
147147
$('select[data-purpose=section_selector], input[data-purpose=cms_file_field]').change(function() {

app/assets/javascripts/cms/form_builder.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ FormBuilder.prototype.setupConfirmationBehavior = function() {
241241
var formBuilder = new FormBuilder();
242242

243243
// Register FormBuilder handlers on page load.
244-
$(function() {
244+
jQuery(function($){
245245
formBuilder.setup();
246246

247247

app/assets/javascripts/cms/page_editor.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
//= require 'cms/ajax'
88

99
// Since we are within the page editing iframe, add a 'target=_top' to all links so they refresh the entire page.
10-
$(function() {
10+
jQuery(function($){
1111
$('a').attr('target', '_top');
1212
});
1313

14-
$(function() {
14+
jQuery(function($){
1515
$.cms_editor = {
1616
// Returns the widget that a user has currently selected.
1717
// @return [JQuery.Element]
@@ -123,7 +123,7 @@ $(function() {
123123
});
124124

125125
// On Ready
126-
$(function() {
126+
jQuery(function($){
127127

128128
// Click the 'Add Content' button (PLUS) when editing content.
129129
$('.cms-add-content').click(function() {

app/assets/javascripts/cms/sitemap.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ Sitemap.prototype.updateDepth = function(element, newDepth) {
138138
var sitemap = new Sitemap();
139139

140140
// Enable dragging of items around the sitemap.
141-
$(function() {
141+
jQuery(function($){
142142
if ($('#sitemap').exists()) {
143143

144144
$('#sitemap .draggable').draggable({
@@ -188,7 +188,7 @@ $(function() {
188188
});
189189

190190
// Open/close folders when rows are clicked.
191-
$(function() {
191+
jQuery(function($){
192192
// Ensure this only loads on sitemap page.
193193
if ($('#sitemap').exists()) {
194194
sitemap.restoreOpenState();
@@ -201,7 +201,7 @@ $(function() {
201201
});
202202

203203
// Make Sitemap filters show specific content types.
204-
$(function() {
204+
jQuery(function($){
205205
$('#sitemap li[data-nodetype]').hide();
206206
$('#filtershow').change(function() {
207207
$('#sitemap li[data-nodetype]').slideUp();

app/assets/javascripts/cms/user.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Cms.User.current = function(handler) {
2626
};
2727

2828
// Default Handler for login portlet. Hide the form, show 'Hello $first_name'
29-
$(function() {
29+
jQuery(function($){
3030
if ($('.login-portlet').exists()) {
3131
Cms.User.current({
3232
authenticated: function(user) {

0 commit comments

Comments
 (0)