restore production settings + fix broken tests + apply the coding convention on the recently modified haml file
This commit is contained in:
parent
13e247691f
commit
e2b68ba861
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
- if can? :create, Page
|
- if can? :create, Page
|
||||||
- content_for :buttons do
|
- content_for :buttons do
|
||||||
= admin_button_tag :new, new_admin_page_url, :class => 'new', :id => "newpage"
|
= admin_button_tag :new, new_admin_page_url, :class => 'new', :id => 'newpage'
|
||||||
|
|
||||||
%p!= t('.help')
|
%p!= t('.help')
|
||||||
|
|
||||||
|
@ -4,12 +4,12 @@
|
|||||||
#global-actions-bar
|
#global-actions-bar
|
||||||
!= t('.welcome', :name => link_to(current_admin.name, edit_admin_my_account_url))
|
!= t('.welcome', :name => link_to(current_admin.name, edit_admin_my_account_url))
|
||||||
%span= '|'
|
%span= '|'
|
||||||
= link_to t('.see'), current_site_url, :id => "viewsite_ele", :target => "_blank"
|
= link_to t('.see'), current_site_url, :id => 'viewsite', :target => '_blank'
|
||||||
- if multi_sites? && current_admin.sites.size > 1
|
- if multi_sites? && current_admin.sites.size > 1
|
||||||
%span= '|'
|
%span= '|'
|
||||||
= link_to t('.switch'), '#', :id => 'sites-picker-link'
|
= link_to t('.switch'), '#', :id => 'sites-picker-link'
|
||||||
%span= '|'
|
%span= '|'
|
||||||
= link_to 'Help', '#', :class => "tutorial", :id => "help"
|
= link_to 'Help', '#', :class => 'tutorial', :id => 'help'
|
||||||
%span= '|'
|
%span= '|'
|
||||||
= link_to t('.logout'), destroy_admin_session_url, :confirm => t('admin.messages.confirm')
|
= link_to t('.logout'), destroy_admin_session_url, :confirm => t('admin.messages.confirm')
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
embed_assets: off
|
embed_assets: off
|
||||||
|
# compress_assets: off
|
||||||
|
# package_assets: off
|
||||||
|
|
||||||
s3_bucket: <%= ENV['S3_BUCKET'] %>
|
s3_bucket: <%= ENV['S3_BUCKET'] %>
|
||||||
s3_access_key_id: <%= ENV['S3_KEY_ID'] %>
|
s3_access_key_id: <%= ENV['S3_KEY_ID'] %>
|
||||||
s3_secret_access_key: <%= ENV['S3_SECRET_KEY'] %>
|
s3_secret_access_key: <%= ENV['S3_SECRET_KEY'] %>
|
||||||
# compress_assets: off
|
|
||||||
# package_assets: off
|
|
||||||
|
|
||||||
javascripts:
|
javascripts:
|
||||||
box:
|
box:
|
||||||
|
@ -7,7 +7,7 @@ Locomotive::Application.configure do
|
|||||||
|
|
||||||
# Full error reports are disabled and caching is turned on
|
# Full error reports are disabled and caching is turned on
|
||||||
config.consider_all_requests_local = false
|
config.consider_all_requests_local = false
|
||||||
config.action_controller.perform_caching = false
|
config.action_controller.perform_caching = true
|
||||||
|
|
||||||
# Specifies the header that your server uses for sending files
|
# Specifies the header that your server uses for sending files
|
||||||
config.action_dispatch.x_sendfile_header = "X-Sendfile"
|
config.action_dispatch.x_sendfile_header = "X-Sendfile"
|
||||||
@ -29,7 +29,7 @@ Locomotive::Application.configure do
|
|||||||
|
|
||||||
# Disable Rails's static asset server
|
# Disable Rails's static asset server
|
||||||
# In production, Apache or nginx will already do this
|
# In production, Apache or nginx will already do this
|
||||||
config.serve_static_assets = true
|
config.serve_static_assets = false
|
||||||
|
|
||||||
# Enable serving of images, stylesheets, and javascripts from an asset server
|
# Enable serving of images, stylesheets, and javascripts from an asset server
|
||||||
# config.action_controller.asset_host = "http://assets.example.com"
|
# config.action_controller.asset_host = "http://assets.example.com"
|
||||||
|
@ -31,4 +31,4 @@ production:
|
|||||||
# uri: <%= ENV['MONGOHQ_URL'] %>
|
# uri: <%= ENV['MONGOHQ_URL'] %>
|
||||||
|
|
||||||
# bushido (mongohq_url will also work)
|
# bushido (mongohq_url will also work)
|
||||||
uri: <%= ENV['MONGODB_URL'] %>
|
uri: <%= ENV['MONGODB_URL'] %>
|
||||||
|
@ -15,8 +15,8 @@ Background:
|
|||||||
Scenario: I do not want my content form to have n duplicated fields if I submit n times the content type form with errors (bug)
|
Scenario: I do not want my content form to have n duplicated fields if I submit n times the content type form with errors (bug)
|
||||||
When I go to the "Projects" model edition page
|
When I go to the "Projects" model edition page
|
||||||
And I fill in "Name" with ""
|
And I fill in "Name" with ""
|
||||||
And I press "Update"
|
And I press "Save"
|
||||||
And I press "Update"
|
And I press "Save"
|
||||||
And I press "Update"
|
And I press "Save"
|
||||||
When I follow "new item"
|
When I follow "new item"
|
||||||
Then I should see once the "Name" field
|
Then I should see once the "Name" field
|
||||||
|
@ -42,7 +42,7 @@ Scenario: Update an existing entry
|
|||||||
When I go to the "Projects" model list page
|
When I go to the "Projects" model list page
|
||||||
And I follow "My sexy project"
|
And I follow "My sexy project"
|
||||||
When I fill in "Name" with "My other sexy project (UPDATED)"
|
When I fill in "Name" with "My other sexy project (UPDATED)"
|
||||||
And I press "Update"
|
And I press "Save"
|
||||||
Then I should see "Content was successfully updated."
|
Then I should see "Content was successfully updated."
|
||||||
When I go to the "Projects" model list page
|
When I go to the "Projects" model list page
|
||||||
Then I should see "My other sexy project (UPDATED)"
|
Then I should see "My other sexy project (UPDATED)"
|
||||||
@ -51,7 +51,7 @@ Scenario: Update an invalid entry
|
|||||||
When I go to the "Projects" model list page
|
When I go to the "Projects" model list page
|
||||||
And I follow "My sexy project"
|
And I follow "My sexy project"
|
||||||
When I fill in "Name" with ""
|
When I fill in "Name" with ""
|
||||||
And I press "Update"
|
And I press "Save"
|
||||||
Then I should not see "Content was successfully updated."
|
Then I should not see "Content was successfully updated."
|
||||||
|
|
||||||
Scenario: Destroy an entry
|
Scenario: Destroy an entry
|
||||||
|
@ -28,6 +28,6 @@ Scenario: Updating a valid page
|
|||||||
And I follow "Home page"
|
And I follow "Home page"
|
||||||
And I fill in "page_title" with "Home page !"
|
And I fill in "page_title" with "Home page !"
|
||||||
And I fill in "Raw template" with "My new content is here"
|
And I fill in "Raw template" with "My new content is here"
|
||||||
And I press "Update"
|
And I press "Save"
|
||||||
Then I should see "Page was successfully updated."
|
Then I should see "Page was successfully updated."
|
||||||
And I should have "My new content is here" in the index page
|
And I should have "My new content is here" in the index page
|
||||||
|
@ -6,11 +6,11 @@ Feature: Snippets
|
|||||||
Background:
|
Background:
|
||||||
Given I have the site: "test site" set up
|
Given I have the site: "test site" set up
|
||||||
And I am an authenticated user
|
And I am an authenticated user
|
||||||
And a page named "home" with the template:
|
And a page named "home" with the template:
|
||||||
"""
|
"""
|
||||||
{% include 'yield' %}
|
{% include 'yield' %}
|
||||||
"""
|
"""
|
||||||
And a snippet named "yield" with the template:
|
And a snippet named "yield" with the template:
|
||||||
"""
|
"""
|
||||||
"yield"
|
"yield"
|
||||||
"""
|
"""
|
||||||
@ -27,13 +27,13 @@ Scenario: Creating a Snippet
|
|||||||
And I should have "banner" in the banner snippet
|
And I should have "banner" in the banner snippet
|
||||||
|
|
||||||
Scenario: Updating a Snippet that includes another snippet
|
Scenario: Updating a Snippet that includes another snippet
|
||||||
Given a snippet named "other" with the template:
|
Given a snippet named "other" with the template:
|
||||||
"""
|
"""
|
||||||
"other"
|
"other"
|
||||||
"""
|
"""
|
||||||
When I go to theme assets
|
When I go to theme assets
|
||||||
And I follow "yield"
|
And I follow "yield"
|
||||||
And I fill in "snippet_template" with "{% include 'other' %}"
|
And I fill in "snippet_template" with "{% include 'other' %}"
|
||||||
And I press "Update"
|
And I press "Save"
|
||||||
Then I should see "Snippet was successfully updated."
|
Then I should see "Snippet was successfully updated."
|
||||||
And I should have "{% include 'other' %}" in the yield snippet
|
And I should have "{% include 'other' %}" in the yield snippet
|
||||||
|
@ -35,7 +35,7 @@ Scenario: Updating a stylesheet
|
|||||||
When I go to theme assets
|
When I go to theme assets
|
||||||
And I follow "stylesheets/application.css"
|
And I follow "stylesheets/application.css"
|
||||||
And I fill in "theme_asset[plain_text]" with "Lorem ipsum (updated)"
|
And I fill in "theme_asset[plain_text]" with "Lorem ipsum (updated)"
|
||||||
And I press "Update"
|
And I press "Save"
|
||||||
Then I should see "File was successfully updated."
|
Then I should see "File was successfully updated."
|
||||||
And I should see "Editing application.css"
|
And I should see "Editing application.css"
|
||||||
And I should see "application.css"
|
And I should see "application.css"
|
||||||
@ -56,7 +56,7 @@ Scenario: Updating a javascript
|
|||||||
When I go to theme assets
|
When I go to theme assets
|
||||||
And I follow "javascripts/application.js"
|
And I follow "javascripts/application.js"
|
||||||
And I fill in "theme_asset[plain_text]" with "Lorem ipsum (updated)"
|
And I fill in "theme_asset[plain_text]" with "Lorem ipsum (updated)"
|
||||||
And I press "Update"
|
And I press "Save"
|
||||||
Then I should see "File was successfully updated."
|
Then I should see "File was successfully updated."
|
||||||
|
|
||||||
Scenario: Uploading an image which already exists
|
Scenario: Uploading an image which already exists
|
||||||
|
@ -11,14 +11,14 @@
|
|||||||
*
|
*
|
||||||
* Questions about Guiders or Optimizely?
|
* Questions about Guiders or Optimizely?
|
||||||
* Email us at jeff+pickhardt@optimizely.com or hello@optimizely.com.
|
* Email us at jeff+pickhardt@optimizely.com or hello@optimizely.com.
|
||||||
*
|
*
|
||||||
* Enjoy!
|
* Enjoy!
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var guiders = (function($){
|
var guiders = (function($){
|
||||||
var guiders = {
|
var guiders = {
|
||||||
version: "1.1.0",
|
version: "1.1.0",
|
||||||
|
|
||||||
_defaultSettings: {
|
_defaultSettings: {
|
||||||
attachTo: null,
|
attachTo: null,
|
||||||
buttons: [{name: "Close"}],
|
buttons: [{name: "Close"}],
|
||||||
@ -136,21 +136,21 @@ var guiders = (function($){
|
|||||||
}
|
}
|
||||||
return guiders._guiders[id];
|
return guiders._guiders[id];
|
||||||
},
|
},
|
||||||
|
|
||||||
_showOverlay: function() {
|
_showOverlay: function() {
|
||||||
$("#guider_overlay").fadeIn("fast");
|
$("#guider_overlay").fadeIn("fast");
|
||||||
},
|
},
|
||||||
|
|
||||||
_hideOverlay: function() {
|
_hideOverlay: function() {
|
||||||
$("#guider_overlay").fadeOut("fast");
|
$("#guider_overlay").fadeOut("fast");
|
||||||
},
|
},
|
||||||
|
|
||||||
_initializeOverlay: function() {
|
_initializeOverlay: function() {
|
||||||
if ($("#guider_overlay").length === 0) {
|
if ($("#guider_overlay").length === 0) {
|
||||||
$("<div id=\"guider_overlay\"></div>").hide().appendTo("body");
|
$("<div id=\"guider_overlay\"></div>").hide().appendTo("body");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
_styleArrow: function(myGuider) {
|
_styleArrow: function(myGuider) {
|
||||||
var position = myGuider.position || 0;
|
var position = myGuider.position || 0;
|
||||||
if (!position) {
|
if (!position) {
|
||||||
@ -215,7 +215,7 @@ var guiders = (function($){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
next: function() {
|
next: function() {
|
||||||
var currentGuider = guiders._guiders[guiders._currentGuiderID];
|
var currentGuider = guiders._guiders[guiders._currentGuiderID];
|
||||||
if (typeof currentGuider === "undefined") {
|
if (typeof currentGuider === "undefined") {
|
||||||
@ -261,7 +261,7 @@ var guiders = (function($){
|
|||||||
|
|
||||||
guiders._guiders[myGuider.id] = myGuider;
|
guiders._guiders[myGuider.id] = myGuider;
|
||||||
guiders._lastCreatedGuiderID = myGuider.id;
|
guiders._lastCreatedGuiderID = myGuider.id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If the URL of the current window is of the form
|
* If the URL of the current window is of the form
|
||||||
* http://www.myurl.com/mypage.html#guider=id
|
* http://www.myurl.com/mypage.html#guider=id
|
||||||
@ -270,7 +270,7 @@ var guiders = (function($){
|
|||||||
if (myGuider.isHashable) {
|
if (myGuider.isHashable) {
|
||||||
guiders._showIfHashed(myGuider);
|
guiders._showIfHashed(myGuider);
|
||||||
}
|
}
|
||||||
|
|
||||||
return guiders;
|
return guiders;
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -288,19 +288,19 @@ var guiders = (function($){
|
|||||||
if (!id && guiders._lastCreatedGuiderID) {
|
if (!id && guiders._lastCreatedGuiderID) {
|
||||||
id = guiders._lastCreatedGuiderID;
|
id = guiders._lastCreatedGuiderID;
|
||||||
}
|
}
|
||||||
|
|
||||||
var myGuider = guiders._guiderById(id);
|
var myGuider = guiders._guiderById(id);
|
||||||
if (myGuider.overlay) {
|
if (myGuider.overlay) {
|
||||||
guiders._showOverlay();
|
guiders._showOverlay();
|
||||||
}
|
}
|
||||||
|
|
||||||
guiders._attach(myGuider);
|
guiders._attach(myGuider);
|
||||||
|
|
||||||
// You can use an onShow function to take some action before the guider is shown.
|
// You can use an onShow function to take some action before the guider is shown.
|
||||||
if (myGuider.onShow) {
|
if (myGuider.onShow) {
|
||||||
myGuider.onShow(myGuider);
|
myGuider.onShow(myGuider);
|
||||||
}
|
}
|
||||||
|
|
||||||
myGuider.elem.fadeIn("fast");
|
myGuider.elem.fadeIn("fast");
|
||||||
|
|
||||||
var windowHeight = $(window).height();
|
var windowHeight = $(window).height();
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
* /admin/pages
|
* /admin/pages
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
if(window.location.pathname == "/admin/pages"){
|
if(window.location.pathname == "/admin/pages"){
|
||||||
|
|
||||||
$('#new_page_tutorial').click(function(){
|
$('#new_page_tutorial').click(function(){
|
||||||
if($('#newpage').length > 0){
|
if($('#newpage').length > 0){
|
||||||
guiders.hideAll();
|
guiders.hideAll();
|
||||||
@ -26,7 +26,7 @@ $(document).ready(function(){
|
|||||||
width: 200,
|
width: 200,
|
||||||
title: "Make a new page",
|
title: "Make a new page",
|
||||||
});
|
});
|
||||||
|
|
||||||
guiders.createGuider({
|
guiders.createGuider({
|
||||||
attachTo: "undefined",
|
attachTo: "undefined",
|
||||||
description: "Thank you for choosing LocomotiveCMS!, <br /><br />\
|
description: "Thank you for choosing LocomotiveCMS!, <br /><br />\
|
||||||
@ -41,7 +41,7 @@ $(document).ready(function(){
|
|||||||
overlay: true,
|
overlay: true,
|
||||||
title: "Welcome to Locomotive CMS"
|
title: "Welcome to Locomotive CMS"
|
||||||
});
|
});
|
||||||
|
|
||||||
guiders.createGuider({
|
guiders.createGuider({
|
||||||
attachTo: "#help",
|
attachTo: "#help",
|
||||||
buttons: [],
|
buttons: [],
|
||||||
@ -53,10 +53,10 @@ $(document).ready(function(){
|
|||||||
height: 100,
|
height: 100,
|
||||||
title: ""
|
title: ""
|
||||||
});
|
});
|
||||||
|
|
||||||
var pagehook = (function(){
|
var pagehook = (function(){
|
||||||
var possibles = ['ul.folder:first li',
|
var possibles = ['ul.folder:first li',
|
||||||
'ul#pages-list li'];
|
'ul#pages-list li'];
|
||||||
for(var i = 0; i<possibles.length; i++){
|
for(var i = 0; i<possibles.length; i++){
|
||||||
console.log("checking possibles", i, possibles[i]);
|
console.log("checking possibles", i, possibles[i]);
|
||||||
if($(possibles[i]).length > 0){
|
if($(possibles[i]).length > 0){
|
||||||
@ -64,7 +64,7 @@ $(document).ready(function(){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}());
|
}());
|
||||||
|
|
||||||
guiders.createGuider({
|
guiders.createGuider({
|
||||||
attachTo: pagehook,
|
attachTo: pagehook,
|
||||||
buttons: [{name: "Quit", onclick: guiders.hideAll},
|
buttons: [{name: "Quit", onclick: guiders.hideAll},
|
||||||
@ -80,7 +80,7 @@ $(document).ready(function(){
|
|||||||
overlay: true,
|
overlay: true,
|
||||||
title: ""
|
title: ""
|
||||||
});
|
});
|
||||||
|
|
||||||
guiders.createGuider({
|
guiders.createGuider({
|
||||||
attachTo: "undefined",
|
attachTo: "undefined",
|
||||||
description: "A page is a collection of content on your site that can be reached at a web address <br /></br>\
|
description: "A page is a collection of content on your site that can be reached at a web address <br /></br>\
|
||||||
@ -95,13 +95,13 @@ $(document).ready(function(){
|
|||||||
// guiders.show('pagepointer')
|
// guiders.show('pagepointer')
|
||||||
// }
|
// }
|
||||||
});
|
});
|
||||||
|
|
||||||
guiders.createGuider({
|
guiders.createGuider({
|
||||||
attachTo: 'li.hoverable:eq(2)',
|
attachTo: 'li.hoverable:eq(2)',
|
||||||
buttons: [{name: "Quit", onclick: guiders.hideAll},
|
buttons: [{name: "Quit", onclick: guiders.hideAll},
|
||||||
{name: "Next - Edit an Event",
|
{name: "Next - Edit an Event",
|
||||||
onclick: function(){
|
onclick: function(){
|
||||||
window.location = $('li.hoverable:eq(2) li:first a').attr('href') + "#guider=editmodelwelcome";
|
window.location = $('li.hoverable:eq(2) li:first a').attr('href') + "#guider=editmodelwelcome";
|
||||||
}}],
|
}}],
|
||||||
description: "These are models.<br /> You can hover over to edit them. For this next section of the guide. We will edit an Event model. '"+$('.inner:eq(3) li:first a').text()+"' ",
|
description: "These are models.<br /> You can hover over to edit them. For this next section of the guide. We will edit an Event model. '"+$('.inner:eq(3) li:first a').text()+"' ",
|
||||||
id: "modelpointer",
|
id: "modelpointer",
|
||||||
@ -110,7 +110,7 @@ $(document).ready(function(){
|
|||||||
position: 4,
|
position: 4,
|
||||||
title: ""
|
title: ""
|
||||||
});
|
});
|
||||||
|
|
||||||
guiders.createGuider({
|
guiders.createGuider({
|
||||||
attachTo: 'div.action span',
|
attachTo: 'div.action span',
|
||||||
buttons: [],
|
buttons: [],
|
||||||
@ -122,7 +122,7 @@ $(document).ready(function(){
|
|||||||
width: 200,
|
width: 200,
|
||||||
title: ""
|
title: ""
|
||||||
});
|
});
|
||||||
|
|
||||||
guiders.createGuider({
|
guiders.createGuider({
|
||||||
attachTo: 'div.action span',
|
attachTo: 'div.action span',
|
||||||
buttons: [],
|
buttons: [],
|
||||||
@ -138,21 +138,21 @@ $(document).ready(function(){
|
|||||||
$('div.action a').attr('href') + "#guider=newmodelwelcome");
|
$('div.action a').attr('href') + "#guider=newmodelwelcome");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
guiders.createGuider({
|
guiders.createGuider({
|
||||||
attachTo: "undefined",
|
attachTo: "undefined",
|
||||||
description: (function(){
|
description: (function(){
|
||||||
var ret = "What is a model?<br />\
|
var ret = "What is a model?<br />\
|
||||||
The concept of a model within locomotiveCMS is a peice of content that you might reuse through out your site.\
|
The concept of a model within locomotiveCMS is a peice of content that you might reuse through out your site.\
|
||||||
Some example models could be: Blog posts, Products, Events, Locations, Photos<br /></br />"
|
Some example models could be: Blog posts, Products, Events, Locations, Photos<br /></br />"
|
||||||
|
|
||||||
if($('li.hoverable').length > 1){
|
if($('li.hoverable').length > 1){
|
||||||
ret += "For this next section of the guide. We will edit our Event model. '"+$('.inner:eq(3) li:first a').text()+"' ";
|
ret += "For this next section of the guide. We will edit our Event model. '"+$('.inner:eq(3) li:first a').text()+"' ";
|
||||||
}else{
|
}else{
|
||||||
ret += "For this next section of the guide, lets make a new model";
|
ret += "For this next section of the guide, lets make a new model";
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}()),
|
}()),
|
||||||
buttons: [{name: "Quit", onclick: guiders.hideAll},
|
buttons: [{name: "Quit", onclick: guiders.hideAll},
|
||||||
@ -170,7 +170,7 @@ $(document).ready(function(){
|
|||||||
// return {
|
// return {
|
||||||
// name: "Next - Edit an Event",
|
// name: "Next - Edit an Event",
|
||||||
// onclick: function(){
|
// onclick: function(){
|
||||||
// window.location = $('li.hoverable:eq(2) li:first a').attr('href') + "#guider=editmodelwelcome";
|
// window.location = $('li.hoverable:eq(2) li:first a').attr('href') + "#guider=editmodelwelcome";
|
||||||
// }
|
// }
|
||||||
// };
|
// };
|
||||||
// }
|
// }
|
||||||
@ -191,7 +191,7 @@ $(document).ready(function(){
|
|||||||
// //guiders.show('newmodelpointer');
|
// //guiders.show('newmodelpointer');
|
||||||
// }
|
// }
|
||||||
});
|
});
|
||||||
|
|
||||||
guiders.createGuider({
|
guiders.createGuider({
|
||||||
attachTo: 'li.settings a',
|
attachTo: 'li.settings a',
|
||||||
buttons: [],
|
buttons: [],
|
||||||
@ -201,7 +201,7 @@ $(document).ready(function(){
|
|||||||
width: 200,
|
width: 200,
|
||||||
title: ""
|
title: ""
|
||||||
});
|
});
|
||||||
|
|
||||||
guiders.createGuider({
|
guiders.createGuider({
|
||||||
attachTo: "undefined",
|
attachTo: "undefined",
|
||||||
description: "LocomotiveCMS has several features that you can adjust in the settings panel. Lets head there now!",
|
description: "LocomotiveCMS has several features that you can adjust in the settings panel. Lets head there now!",
|
||||||
@ -216,16 +216,16 @@ $(document).ready(function(){
|
|||||||
guiders.show("settingspointer");
|
guiders.show("settingspointer");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
* /admin/pages/edit
|
* /admin/pages/edit
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
if(window.location.pathname.match('admin/pages/.+\/edit') != null){
|
if(window.location.pathname.match('admin/pages/.+\/edit') != null){
|
||||||
|
|
||||||
// /*
|
// /*
|
||||||
// * We have to delay the creation of this guider
|
// * We have to delay the creation of this guider
|
||||||
// * so TinyMCE can render it
|
// * so TinyMCE can render it
|
||||||
@ -244,7 +244,7 @@ $(document).ready(function(){
|
|||||||
// });
|
// });
|
||||||
// }, 2000);
|
// }, 2000);
|
||||||
// };
|
// };
|
||||||
|
|
||||||
guiders.createGuider({
|
guiders.createGuider({
|
||||||
attachTo: "undefined",
|
attachTo: "undefined",
|
||||||
description: "You are now editing the '"+$('a.editable:first').text()+"' page. Lets start by changing the title of this page.",
|
description: "You are now editing the '"+$('a.editable:first').text()+"' page. Lets start by changing the title of this page.",
|
||||||
@ -255,10 +255,10 @@ $(document).ready(function(){
|
|||||||
overlay: true,
|
overlay: true,
|
||||||
title: "Editing A Page"
|
title: "Editing A Page"
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
var page_title = 'Guide Demo Page';
|
var page_title = 'Guide Demo Page';
|
||||||
|
|
||||||
guiders.createGuider({
|
guiders.createGuider({
|
||||||
attachTo: "a.editable:first",
|
attachTo: "a.editable:first",
|
||||||
buttons: [],
|
buttons: [],
|
||||||
@ -270,7 +270,7 @@ $(document).ready(function(){
|
|||||||
height: 100,
|
height: 100,
|
||||||
description: "Click here to edit the page title. <br /><br /> Change the title to '"+page_title+"'"
|
description: "Click here to edit the page title. <br /><br /> Change the title to '"+page_title+"'"
|
||||||
});
|
});
|
||||||
|
|
||||||
guiders.createGuider({
|
guiders.createGuider({
|
||||||
attachTo: "undefined",
|
attachTo: "undefined",
|
||||||
description: "You just changed the title of this page. Lets continue by editing the page content.",
|
description: "You just changed the title of this page. Lets continue by editing the page content.",
|
||||||
@ -280,8 +280,8 @@ $(document).ready(function(){
|
|||||||
next: "pageeditcontent",
|
next: "pageeditcontent",
|
||||||
overlay: true,
|
overlay: true,
|
||||||
title: "Great Job!"
|
title: "Great Job!"
|
||||||
});
|
});
|
||||||
|
|
||||||
guiders.createGuider({
|
guiders.createGuider({
|
||||||
buttons: [],
|
buttons: [],
|
||||||
attachTo: "button.light:last",
|
attachTo: "button.light:last",
|
||||||
@ -290,11 +290,11 @@ $(document).ready(function(){
|
|||||||
position: 12,
|
position: 12,
|
||||||
title: "Save Your Work",
|
title: "Save Your Work",
|
||||||
onShow: function(){
|
onShow: function(){
|
||||||
$('form.save-with-shortcut').attr('action',
|
$('form.save-with-shortcut').attr('action',
|
||||||
$('form.save-with-shortcut').attr('action')+"#guider=editsavesuccess");
|
$('form.save-with-shortcut').attr('action')+"#guider=editsavesuccess");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
guiders.createGuider({
|
guiders.createGuider({
|
||||||
attachTo: "undefined",
|
attachTo: "undefined",
|
||||||
description: "Great work! you've update this page. You can review your work by checking out the 'frontend' of the site.",
|
description: "Great work! you've update this page. You can review your work by checking out the 'frontend' of the site.",
|
||||||
@ -302,10 +302,10 @@ $(document).ready(function(){
|
|||||||
{name: "Next"}],
|
{name: "Next"}],
|
||||||
id: "editsavesuccess",
|
id: "editsavesuccess",
|
||||||
next: "viewsite2",
|
next: "viewsite2",
|
||||||
overlay: true,
|
overlay: true,
|
||||||
title: "Page Saved Successfully!"
|
title: "Page Saved Successfully!"
|
||||||
});
|
});
|
||||||
|
|
||||||
function viewSiteClick(e){
|
function viewSiteClick(e){
|
||||||
console.log("viewsite click!");
|
console.log("viewsite click!");
|
||||||
var $this = $(e.target);
|
var $this = $(e.target);
|
||||||
@ -317,9 +317,9 @@ $(document).ready(function(){
|
|||||||
return false;
|
return false;
|
||||||
//should probably unbind this to prevent double clicking
|
//should probably unbind this to prevent double clicking
|
||||||
}
|
}
|
||||||
|
|
||||||
guiders.createGuider({
|
guiders.createGuider({
|
||||||
attachTo: "#viewsite_ele",
|
attachTo: "#viewsite",
|
||||||
buttons: [],
|
buttons: [],
|
||||||
description: "This will open a new tab in your browser and take you to the 'frontend' of your site. The frontend is what other visitors to your site will see. Come back to this tab in your browser to continue the guide.",
|
description: "This will open a new tab in your browser and take you to the 'frontend' of your site. The frontend is what other visitors to your site will see. Come back to this tab in your browser to continue the guide.",
|
||||||
id: "viewsite2",
|
id: "viewsite2",
|
||||||
@ -328,11 +328,11 @@ $(document).ready(function(){
|
|||||||
width: 280,
|
width: 280,
|
||||||
title: "Click Here To View Your Site",
|
title: "Click Here To View Your Site",
|
||||||
onShow: function(){
|
onShow: function(){
|
||||||
console.log("binding click for view site", $('#viewsite_ele'));
|
console.log("binding click for view site", $('#viewsite'));
|
||||||
$('#viewsite_ele').bind('click', viewSiteClick);
|
$('#viewsite').bind('click', viewSiteClick);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
guiders.createGuider({
|
guiders.createGuider({
|
||||||
attachTo: "undefined",
|
attachTo: "undefined",
|
||||||
description: "Congratulations. You've just edited a page using LocomotiveCMS! Moving on, we will now move onto models. Lets return to the admin home.",
|
description: "Congratulations. You've just edited a page using LocomotiveCMS! Moving on, we will now move onto models. Lets return to the admin home.",
|
||||||
@ -344,9 +344,9 @@ $(document).ready(function(){
|
|||||||
overlay: true,
|
overlay: true,
|
||||||
title: "Done editing."
|
title: "Done editing."
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
* New model
|
* New model
|
||||||
@ -354,7 +354,7 @@ $(document).ready(function(){
|
|||||||
*/
|
*/
|
||||||
if(window.location.pathname.match('admin/content_types/new') != null ||
|
if(window.location.pathname.match('admin/content_types/new') != null ||
|
||||||
window.location.pathname.match('admin/content_types/.+/edit')){
|
window.location.pathname.match('admin/content_types/.+/edit')){
|
||||||
|
|
||||||
guiders.createGuider({
|
guiders.createGuider({
|
||||||
attachTo: "undefined",
|
attachTo: "undefined",
|
||||||
description: "A model is how you define the content on your site. Lots of sites have: Blog Posts, Products, Photo Albums, Events.\
|
description: "A model is how you define the content on your site. Lots of sites have: Blog Posts, Products, Photo Albums, Events.\
|
||||||
@ -367,8 +367,8 @@ $(document).ready(function(){
|
|||||||
next: "createmodel",
|
next: "createmodel",
|
||||||
overlay: true,
|
overlay: true,
|
||||||
title: "Lets create a new model!"
|
title: "Lets create a new model!"
|
||||||
});
|
});
|
||||||
|
|
||||||
guiders.createGuider({
|
guiders.createGuider({
|
||||||
buttons: [],
|
buttons: [],
|
||||||
attachTo: "button.light:first",
|
attachTo: "button.light:first",
|
||||||
@ -378,19 +378,19 @@ $(document).ready(function(){
|
|||||||
position: 9,
|
position: 9,
|
||||||
title: "Save Your Work",
|
title: "Save Your Work",
|
||||||
onShow: function(){
|
onShow: function(){
|
||||||
$('#new_content_type').attr('action',
|
$('#new_content_type').attr('action',
|
||||||
$('#new_content_type').attr('action')+"#guider=newmodelsuccess");
|
$('#new_content_type').attr('action')+"#guider=newmodelsuccess");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
guiders.createGuider({
|
guiders.createGuider({
|
||||||
attachTo: "undefined",
|
attachTo: "undefined",
|
||||||
description: (function(){
|
description: (function(){
|
||||||
if($('.inline-errors').length > 0){
|
if($('.inline-errors').length > 0){
|
||||||
return "Looks like you forgot something. Please Check out the errors and try again!";
|
return "Looks like you forgot something. Please Check out the errors and try again!";
|
||||||
}else{
|
}else{
|
||||||
return "You've Successfully created a model! Moving on. Lets adjust the settings of your LocomotiveCMS";
|
return "You've Successfully created a model! Moving on. Lets adjust the settings of your LocomotiveCMS";
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
buttons: [{name: "Quit", onclick: guiders.hideAll},
|
buttons: [{name: "Quit", onclick: guiders.hideAll},
|
||||||
{name: "Next - Settings", onclick: function(){
|
{name: "Next - Settings", onclick: function(){
|
||||||
@ -399,29 +399,29 @@ $(document).ready(function(){
|
|||||||
id: "newmodelsuccess",
|
id: "newmodelsuccess",
|
||||||
next: "editsubdomain",
|
next: "editsubdomain",
|
||||||
overlay: true,
|
overlay: true,
|
||||||
title: (function(){
|
title: (function(){
|
||||||
if($('.inline-errors').length > 0){
|
if($('.inline-errors').length > 0){
|
||||||
return "Uh oh.";
|
return "Uh oh.";
|
||||||
}else{
|
}else{
|
||||||
return "Great Work! You Made A New Model.";
|
return "Great Work! You Made A New Model.";
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
onShow: (function(){
|
onShow: (function(){
|
||||||
if($('.inline-errors').length > 0){
|
if($('.inline-errors').length > 0){
|
||||||
guiders.show('createmodel');
|
guiders.show('createmodel');
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
* Content edits
|
* Content edits
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
if(window.location.pathname.match('admin/content_types/events/contents/.+/edit') != null){
|
if(window.location.pathname.match('admin/content_types/events/contents/.+/edit') != null){
|
||||||
|
|
||||||
guiders.createGuider({
|
guiders.createGuider({
|
||||||
attachTo: "undefined",
|
attachTo: "undefined",
|
||||||
description: "You are now edting an instance of our event model.\
|
description: "You are now edting an instance of our event model.\
|
||||||
@ -433,7 +433,7 @@ $(document).ready(function(){
|
|||||||
overlay: true,
|
overlay: true,
|
||||||
title: "Editing an Event model"
|
title: "Editing an Event model"
|
||||||
});
|
});
|
||||||
|
|
||||||
guiders.createGuider({
|
guiders.createGuider({
|
||||||
buttons: [],
|
buttons: [],
|
||||||
attachTo: "button.light:last",
|
attachTo: "button.light:last",
|
||||||
@ -442,11 +442,11 @@ $(document).ready(function(){
|
|||||||
position: 12,
|
position: 12,
|
||||||
title: "Save Your Work",
|
title: "Save Your Work",
|
||||||
onShow: function(){
|
onShow: function(){
|
||||||
$('form.save-with-shortcut').attr('action',
|
$('form.save-with-shortcut').attr('action',
|
||||||
$('form.save-with-shortcut').attr('action')+"#guider=modelsavesuccess");
|
$('form.save-with-shortcut').attr('action')+"#guider=modelsavesuccess");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
guiders.createGuider({
|
guiders.createGuider({
|
||||||
attachTo: "undefined",
|
attachTo: "undefined",
|
||||||
description: "You've Successfully updated this model",
|
description: "You've Successfully updated this model",
|
||||||
@ -458,17 +458,17 @@ $(document).ready(function(){
|
|||||||
overlay: true,
|
overlay: true,
|
||||||
title: "Great Work!"
|
title: "Great Work!"
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
* Settings page
|
* Settings page
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
if(window.location.pathname.match("admin/current_site/edit") != null){
|
if(window.location.pathname.match("admin/current_site/edit") != null){
|
||||||
|
|
||||||
guiders.createGuider({
|
guiders.createGuider({
|
||||||
attachTo: "undefined",
|
attachTo: "undefined",
|
||||||
description: "Welcome to the Settings page. Here you can create new user accounts to use LocomotiveCMS, Edit SEO options, and more. We will start by changing the subomain of our site.",
|
description: "Welcome to the Settings page. Here you can create new user accounts to use LocomotiveCMS, Edit SEO options, and more. We will start by changing the subomain of our site.",
|
||||||
@ -479,7 +479,7 @@ $(document).ready(function(){
|
|||||||
overlay: true,
|
overlay: true,
|
||||||
title: "The Settings Page"
|
title: "The Settings Page"
|
||||||
});
|
});
|
||||||
|
|
||||||
guiders.createGuider({
|
guiders.createGuider({
|
||||||
attachTo: "#site_subdomain",
|
attachTo: "#site_subdomain",
|
||||||
description: "Edit this field to change the subdomain of your site",
|
description: "Edit this field to change the subdomain of your site",
|
||||||
@ -494,7 +494,7 @@ $(document).ready(function(){
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
guiders.createGuider({
|
guiders.createGuider({
|
||||||
buttons: [],
|
buttons: [],
|
||||||
attachTo: "button.light:last",
|
attachTo: "button.light:last",
|
||||||
@ -503,11 +503,11 @@ $(document).ready(function(){
|
|||||||
position: 12,
|
position: 12,
|
||||||
title: "Save Your Work",
|
title: "Save Your Work",
|
||||||
onShow: function(){
|
onShow: function(){
|
||||||
$('form.save-with-shortcut').attr('action',
|
$('form.save-with-shortcut').attr('action',
|
||||||
$('form.save-with-shortcut').attr('action')+"#guider=settingssavesuccess");
|
$('form.save-with-shortcut').attr('action')+"#guider=settingssavesuccess");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
guiders.createGuider({
|
guiders.createGuider({
|
||||||
attachTo: "undefined",
|
attachTo: "undefined",
|
||||||
title: "Great Work!",
|
title: "Great Work!",
|
||||||
@ -526,11 +526,11 @@ $(document).ready(function(){
|
|||||||
overlay: true
|
overlay: true
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
* Global
|
* Global
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
guiders.createGuider({
|
guiders.createGuider({
|
||||||
@ -547,7 +547,7 @@ $(document).ready(function(){
|
|||||||
width: 200,
|
width: 200,
|
||||||
title: "Locomotive Guides",
|
title: "Locomotive Guides",
|
||||||
});
|
});
|
||||||
|
|
||||||
$(".tutorial").click(function(){
|
$(".tutorial").click(function(){
|
||||||
var $this = $(this);
|
var $this = $(this);
|
||||||
guiders.hideAll();
|
guiders.hideAll();
|
||||||
@ -559,9 +559,9 @@ $(document).ready(function(){
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
guiders.createGuider({
|
guiders.createGuider({
|
||||||
attachTo: "#viewsite_ele",
|
attachTo: "#viewsite",
|
||||||
buttons: [{name: "Close", onclick: guiders.hideAll}],
|
buttons: [{name: "Close", onclick: guiders.hideAll}],
|
||||||
description: "This will take you to the 'frontend' of your site. Where you can see what users visiting your site see.",
|
description: "This will take you to the 'frontend' of your site. Where you can see what users visiting your site see.",
|
||||||
id: "viewsite",
|
id: "viewsite",
|
||||||
@ -569,7 +569,7 @@ $(document).ready(function(){
|
|||||||
width: 280,
|
width: 280,
|
||||||
title: "Click Here To View Your Site",
|
title: "Click Here To View Your Site",
|
||||||
});
|
});
|
||||||
|
|
||||||
guiders.createGuider({
|
guiders.createGuider({
|
||||||
attachTo: "undefined",
|
attachTo: "undefined",
|
||||||
description: "You've gone through the LocomotiveCMS guide! For more info on LocomotiveCMS,\
|
description: "You've gone through the LocomotiveCMS guide! For more info on LocomotiveCMS,\
|
||||||
@ -580,7 +580,7 @@ $(document).ready(function(){
|
|||||||
overlay: true,
|
overlay: true,
|
||||||
title: "Congratulations!"
|
title: "Congratulations!"
|
||||||
});
|
});
|
||||||
|
|
||||||
window.onload = function(){
|
window.onload = function(){
|
||||||
window.setTimeout(function(){
|
window.setTimeout(function(){
|
||||||
guiders.createGuider({
|
guiders.createGuider({
|
||||||
@ -596,5 +596,5 @@ $(document).ready(function(){
|
|||||||
});
|
});
|
||||||
}, 1000);
|
}, 1000);
|
||||||
};
|
};
|
||||||
|
|
||||||
});
|
});
|
@ -1,3 +1,7 @@
|
|||||||
|
if (typeof window.console === 'undefined') {
|
||||||
|
window.console = { log: function() { return false; } };
|
||||||
|
}
|
||||||
|
|
||||||
function makeSlug(val, sep) { // code largely inspired by http://www.thewebsitetailor.com/jquery-slug-plugin/
|
function makeSlug(val, sep) { // code largely inspired by http://www.thewebsitetailor.com/jquery-slug-plugin/
|
||||||
if (typeof val == 'undefined') return('');
|
if (typeof val == 'undefined') return('');
|
||||||
if (typeof sep == 'undefined') sep = '_';
|
if (typeof sep == 'undefined') sep = '_';
|
||||||
|
Loading…
Reference in New Issue
Block a user