added guard for missing models error
'
This commit is contained in:
parent
b780bbd42a
commit
0473fdd7ea
@ -18,29 +18,29 @@ $(document).ready(function(){
|
|||||||
});
|
});
|
||||||
|
|
||||||
guiders.createGuider({
|
guiders.createGuider({
|
||||||
attachTo: "#newpage",
|
attachTo: "#newpage",
|
||||||
buttons: [{name: "Close", onclick: guiders.hideAll}],
|
buttons: [{name: "Close", onclick: guiders.hideAll}],
|
||||||
description: "Click above to make a new page",
|
description: "Click above to make a new page",
|
||||||
id: "newpage",
|
id: "newpage",
|
||||||
position: 6,
|
position: 6,
|
||||||
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 />\
|
||||||
This guide will help you get up and running.\
|
This guide will help you get up and running.\
|
||||||
We will walk you through some common tasks of LocomotiveCMS.\
|
We will walk you through some common tasks of LocomotiveCMS.\
|
||||||
This guide can be reached at any time by clicking the \"Help\" link<br /><br />\
|
This guide can be reached at any time by clicking the \"Help\" link<br /><br />\
|
||||||
Lets start by editing a page.",
|
Lets start by editing a page.",
|
||||||
buttons: [{name: "Quit", onclick: guiders.hideAll},
|
buttons: [{name: "Quit", onclick: guiders.hideAll},
|
||||||
{name: "Next"}],
|
{name: "Next"}],
|
||||||
id: "welcome",
|
id: "welcome",
|
||||||
next: "pagewelcome",
|
next: "pagewelcome",
|
||||||
overlay: true,
|
overlay: true,
|
||||||
title: "Welcome to Locomotive CMS"
|
title: "Welcome to Locomotive CMS"
|
||||||
});
|
});
|
||||||
|
|
||||||
guiders.createGuider({
|
guiders.createGuider({
|
||||||
attachTo: "#help",
|
attachTo: "#help",
|
||||||
@ -80,141 +80,147 @@ $(document).ready(function(){
|
|||||||
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>\
|
||||||
For this example we will edit the '"+$(pagehook+' a:first').text()+"' page. To do that you would click on the page name.",
|
For this example we will edit the '"+$(pagehook+' a:first').text()+"' page. To do that you would click on the page name.",
|
||||||
buttons: [{name: "Quit", onclick: guiders.hideAll},
|
buttons: [{name: "Quit", onclick: guiders.hideAll},
|
||||||
{name: "Next"}],
|
{name: "Next"}],
|
||||||
id: "pagewelcome",
|
id: "pagewelcome",
|
||||||
next: "pagepointer",
|
next: "pagepointer",
|
||||||
overlay: true,
|
overlay: true,
|
||||||
title: "What is a page?"// ,
|
title: "What is a page?"// ,
|
||||||
// onShow: function(){
|
// onShow: function(){
|
||||||
// guiders.show('pagepointer')
|
// guiders.show('pagepointer')
|
||||||
// }
|
// }
|
||||||
});
|
});
|
||||||
|
|
||||||
guiders.createGuider({
|
guiders.createGuider({
|
||||||
attachTo: 'li.hoverable:eq(2)',
|
attachTo: (function(){
|
||||||
buttons: [{name: "Quit", onclick: guiders.hideAll},
|
if($('li.hoverable:eq(2)').length > 0){
|
||||||
{name: "Next - Edit an Event",
|
return 'li.hoverable:eq(2)';
|
||||||
onclick: function(){
|
}else{
|
||||||
window.location = $('li.hoverable:eq(2) li:first a').attr('href') + "#guider=editmodelwelcome";
|
return 'li.hoverable:first';
|
||||||
}}],
|
}
|
||||||
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",
|
buttons: [{name: "Quit", onclick: guiders.hideAll},
|
||||||
next: "editpagewelcome",
|
{name: "Next - Edit an Event",
|
||||||
width: 240,
|
onclick: function(){
|
||||||
position: 4,
|
window.location = $('li.hoverable:eq(2) li:first a').attr('href') + "#guider=editmodelwelcome";
|
||||||
title: ""
|
}}],
|
||||||
});
|
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",
|
||||||
|
next: "editpagewelcome",
|
||||||
|
width: 240,
|
||||||
|
position: 4,
|
||||||
|
title: ""
|
||||||
|
});
|
||||||
|
|
||||||
guiders.createGuider({
|
guiders.createGuider({
|
||||||
attachTo: 'div.action span',
|
attachTo: 'div.action span',
|
||||||
buttons: [],
|
buttons: [],
|
||||||
description: "Click here to make a new model",
|
description: "Click here to make a new model",
|
||||||
id: "newmodelpointer",
|
id: "newmodelpointer",
|
||||||
next: "editpagewelcome",
|
next: "editpagewelcome",
|
||||||
position: 6,
|
position: 6,
|
||||||
overlay: true,
|
overlay: true,
|
||||||
width: 200,
|
width: 200,
|
||||||
title: ""
|
title: ""
|
||||||
});
|
});
|
||||||
|
|
||||||
guiders.createGuider({
|
guiders.createGuider({
|
||||||
attachTo: 'div.action span',
|
attachTo: 'div.action span',
|
||||||
buttons: [],
|
buttons: [],
|
||||||
description: "Click here to make a new model",
|
description: "Click here to make a new model",
|
||||||
id: "newmodelpointer-next",
|
id: "newmodelpointer-next",
|
||||||
next: "editpagewelcome",
|
next: "editpagewelcome",
|
||||||
position: 6,
|
position: 6,
|
||||||
width: 200,
|
width: 200,
|
||||||
title: "",
|
title: "",
|
||||||
onShow: function(){
|
onShow: function(){
|
||||||
console.log("updating new model url");
|
console.log("updating new model url");
|
||||||
$('div.action a').attr('href',
|
$('div.action a').attr('href',
|
||||||
$('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},
|
||||||
{name: "Next"}],
|
{name: "Next"}],
|
||||||
// (function(){
|
// (function(){
|
||||||
// if($('li.hoverable').length < 1){
|
// if($('li.hoverable').length < 1){
|
||||||
// return {
|
// return {
|
||||||
// name: "Next - Create a Model",
|
// name: "Next - Create a Model",
|
||||||
// onclick: function(){
|
// onclick: function(){
|
||||||
// guiders.hideAll();
|
// guiders.hideAll();
|
||||||
// guiders.show('newmodelpointer-next');
|
// guiders.show('newmodelpointer-next');
|
||||||
// }
|
// }
|
||||||
// };
|
// };
|
||||||
// }else{
|
// }else{
|
||||||
// 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";
|
||||||
// }
|
// }
|
||||||
// };
|
// };
|
||||||
// }
|
// }
|
||||||
// }())],
|
// }())],
|
||||||
id: "modelwelcome",
|
id: "modelwelcome",
|
||||||
next: (function(){
|
next: (function(){
|
||||||
if($('li.hoverable').length > 1){
|
if($('li.hoverable').length > 1){
|
||||||
return "modelpointer";
|
return "modelpointer";
|
||||||
}
|
}
|
||||||
return 'newmodelpointer';
|
return 'newmodelpointer';
|
||||||
}()),
|
}()),
|
||||||
overlay: true,
|
overlay: true,
|
||||||
title: "Lets talk about Models...",
|
title: "Lets talk about Models...",
|
||||||
// onShow: function(){
|
// onShow: function(){
|
||||||
// if($('li.hoverable').length > 1){
|
// if($('li.hoverable').length > 1){
|
||||||
// guiders.show("modelpointer");
|
// guiders.show("modelpointer");
|
||||||
// }
|
// }
|
||||||
// //guiders.show('newmodelpointer');
|
// //guiders.show('newmodelpointer');
|
||||||
// }
|
// }
|
||||||
});
|
});
|
||||||
|
|
||||||
guiders.createGuider({
|
guiders.createGuider({
|
||||||
attachTo: 'li.settings a',
|
attachTo: 'li.settings a',
|
||||||
buttons: [],
|
buttons: [],
|
||||||
description: "Click this tab to edit your settings.",
|
description: "Click this tab to edit your settings.",
|
||||||
id: "settingspointer",
|
id: "settingspointer",
|
||||||
position: 3,
|
position: 3,
|
||||||
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!",
|
||||||
buttons: [{name: "Quit", onclick: guiders.hideAll},
|
buttons: [{name: "Quit", onclick: guiders.hideAll},
|
||||||
{name: "Next - Goto Settings", onclick: function(){
|
{name: "Next - Goto Settings", onclick: function(){
|
||||||
window.location = $('li.settings a').attr('href') + "#guider=settingseditwelcome";
|
window.location = $('li.settings a').attr('href') + "#guider=settingseditwelcome";
|
||||||
}}],
|
}}],
|
||||||
id: "settingswelcome",
|
id: "settingswelcome",
|
||||||
overlay: true,
|
overlay: true,
|
||||||
title: "How To Change Your Settings",
|
title: "How To Change Your Settings",
|
||||||
onShow: function(){
|
onShow: function(){
|
||||||
guiders.show("settingspointer");
|
guiders.show("settingspointer");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user