Commit 6c344b60 authored by Alain Takoudjou's avatar Alain Takoudjou

Fix empty repository status

parent b14ab77a
......@@ -229,7 +229,7 @@ $(document).ready(function () {
node.setFocus();
node.setActive();
if (srcElement.hasClass('fancytree-folder')){
menu.disableContextMenuItems("#edit,#editfull,#view,#md5sum");
menu.disableContextMenuItems("#edit,#editfull,#view,#md5sum,#favorite");
}
else{
menu.disableContextMenuItems("#nfile,#nfolder,#refresh,#paste");
......@@ -550,6 +550,9 @@ $(document).ready(function () {
}
function addToFavourite(filepath){
if (! filepath ) {
return;
}
var i = favourite_list.length,
filename = filepath.replace(/^.*(\\|\/|\:)/, '');
if (i === 0){
......
......@@ -330,11 +330,13 @@ def getProjectStatus():
@login_required()
def editCurrentProject():
project = os.path.join(app.config['etc_dir'], ".project")
if os.path.exists(project):
projectList = listFolder(app.config, 'workspace')
if os.path.exists(project) and projectList:
return render_template('softwareFolder.html', workDir='workspace',
project=open(project).read(),
projectList=listFolder(app.config, 'workspace'))
return redirect(url_for('configRepo'))
projectList=projectList)
flash('Please clone slapos repository and then, <br/>open or create a software to start with your project!!')
return redirect(url_for('manageRepository'))
#create file or directory
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment