/* Hide the button if we're on the project,newproject or importlyaer page
* or if there are no projects yet defined
*/
- if (ctx.numProjects == 0 || ctx.currentUrl.search('newproject|project/\\d/$|importlayer/$') > 0){
+ if (ctx.numProjects == 0 || ctx.currentUrl.search('newproject|project/\\d$|importlayer$') > 0){
newBuildButton.hide();
return;
}
+ var currentProjectId = libtoaster.ctx.projectId;
+
/* Hide the change project icon when there is only one project */
if (ctx.numProjects == 1){
$('#project .icon-pencil').hide();
_checkProjectBuildable()
_setupNewBuildButton();
- var currentProjectId = libtoaster.ctx.projectId;
function _checkProjectBuildable(){
if (currentProjectId == undefined)