Commit 1c61592a authored by Alain Takoudjou's avatar Alain Takoudjou Committed by Nicolas Wavrant

Fix empty repository status

parent 2976d8f7
......@@ -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){
......
......@@ -304,11 +304,13 @@ def getProjectStatus():
#view for current software release files
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