adding some conditinal functions to tutorial.js to help with no datat off bushido locomotive installs
This commit is contained in:
parent
904bed1c10
commit
7ca3e7fec7
@ -53,9 +53,22 @@ $(document).ready(function(){
|
|||||||
height: 100,
|
height: 100,
|
||||||
title: ""
|
title: ""
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var pagehook = (function(){
|
||||||
|
var possibles = ['ul.folder:first li',
|
||||||
|
'ul#pages-list li'];
|
||||||
|
for(var i = 0; i<possibles.length; i++){
|
||||||
|
console.log("checking possibles", i, possibles[i]);
|
||||||
|
if($(possibles[i]).length > 0){
|
||||||
|
return possibles[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}());
|
||||||
|
|
||||||
|
console.log('lol page hook', pagehook);
|
||||||
|
|
||||||
guiders.createGuider({
|
guiders.createGuider({
|
||||||
attachTo: "ul.folder:first li",
|
attachTo: pagehook,
|
||||||
buttons: [],
|
buttons: [],
|
||||||
description: "These are pages. You can click on the page name to edit it.",
|
description: "These are pages. You can click on the page name to edit it.",
|
||||||
id: "pagepointer",
|
id: "pagepointer",
|
||||||
@ -68,10 +81,10 @@ $(document).ready(function(){
|
|||||||
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 '"+$('ul.folder:first li 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 - Edit "+$('ul.folder:first li a:first').text()+"", onclick: function(){
|
{name: "Next - Edit "+$(pagehook+' a:first').text()+"", onclick: function(){
|
||||||
window.location = $('ul.folder:first li a:first').attr('href') + "#guider=editpagewelcome"
|
window.location = $(pagehook+' a:first').attr('href') + "#guider=editpagewelcome"
|
||||||
}
|
}
|
||||||
}],
|
}],
|
||||||
id: "pagewelcome",
|
id: "pagewelcome",
|
||||||
@ -105,27 +118,47 @@ $(document).ready(function(){
|
|||||||
title: ""
|
title: ""
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
var modelhook = (function(){
|
||||||
|
|
||||||
|
}());
|
||||||
|
|
||||||
guiders.createGuider({
|
guiders.createGuider({
|
||||||
attachTo: "undefined",
|
attachTo: "undefined",
|
||||||
description: "What is a model?<br />\
|
description: (function(){
|
||||||
The concept of a model within locomotiveCMS is a peice of content that you might reuse through out your site.\
|
var ret = "What is a model?<br />\
|
||||||
Some example models could be: Blog posts, Products, Events, Locations, Photos<br /></br />\
|
The concept of a model within locomotiveCMS is a peice of content that you might reuse through out your site.\
|
||||||
For this next section of the guide. We will edit our Event model. '"+$('.inner:eq(3) li:first a').text()+"' ",
|
Some example models could be: Blog posts, Products, Events, Locations, Photos<br /></br />"
|
||||||
|
|
||||||
|
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()+"' ";
|
||||||
|
}else{
|
||||||
|
ret += "For this next section of the guide, lets make a new model";
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}()),
|
||||||
buttons: [{name: "Quit", onclick: guiders.hideAll},
|
buttons: [{name: "Quit", onclick: guiders.hideAll},
|
||||||
{name: "Next - Edit an Event", onclick: function(){
|
{name: "Next - Edit an Event", onclick: function(){
|
||||||
/*
|
if($('li.hoverable').length < 1){
|
||||||
*
|
guiders.next();
|
||||||
* This is really britle
|
}else{
|
||||||
*
|
/*
|
||||||
*/
|
*
|
||||||
window.location = $('.inner:eq(3) li:first a').attr('href') + "#guider=editmodelwelcome";
|
* This is really britle
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
window.location = $('.inner:eq(3) li:first a').attr('href') + "#guider=editmodelwelcome";
|
||||||
|
}
|
||||||
}}],
|
}}],
|
||||||
id: "modelwelcome",
|
id: "modelwelcome",
|
||||||
next: "newmodel",
|
next: "newmodel",
|
||||||
overlay: true,
|
overlay: true,
|
||||||
title: "Lets talk about Models...",
|
title: "Lets talk about Models...",
|
||||||
onShow: function(){
|
onShow: function(){
|
||||||
guiders.show("modelpointer");
|
if($('li.hoverable').length > 1){
|
||||||
|
guiders.show("modelpointer");
|
||||||
|
}
|
||||||
guiders.show('newmodelpointer');
|
guiders.show('newmodelpointer');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user