Commit b8c15775 authored by Alain Takoudjou's avatar Alain Takoudjou Committed by Nicolas Wavrant

Fix file management in editor, update fancyTree

parent c74951fa
......@@ -73,7 +73,7 @@ class FileBrowser(object):
ff = os.path.join(dir, f)
realfile = os.path.join(realdir, f)
identity = "%s%s" % (key, i)
if os.path.isdir(realfile):
if os.path.isdir(realfile):
dirList.append({"title": f, "key": identity,
"folder":True, "lazy":True, "path": ff})
elif listfiles:
......@@ -127,7 +127,7 @@ class FileBrowser(object):
os.unlink(filepath)
except Exception as e:
return str(e)
return "{result: '1', test: %s}" % '*'.join(lfiles)
return "{result: '1'}"
def copyItem(self, dir, files, del_source=False):
"""Copy a list of files or directory to dir"""
......
/* Generic context menu styles */
.contextMenu {
position: absolute;
width: 180px;
width: 200px;
z-index: 99999;
border: solid 1px #CCC;
background: #ffffff;
......@@ -67,4 +67,5 @@
.contextMenu LI.view A { background-image: url(images/mpicture.png); }
.contextMenu LI.rename A { background-image: url(images/mfile.png); }
.contextMenu LI.md5sum A { background-image: url(images/selection-select.png); }
.contextMenu LI.refresh A { background-image: url(images/refresh.png); }
\ No newline at end of file
.contextMenu LI.refresh A { background-image: url(images/refresh.png); }
.contextMenu LI.favorite A { background-image: url(images/knewstuff.png); }
\ No newline at end of file
......@@ -248,6 +248,7 @@ body {
outline:none;
font: 13px 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
.fancytree-edit-input{background:#fff; border: solid 1px #678dad; outline:none; padding:2px;}
input[type="radio"], input[type="checkbox"]{
margin: 4px;
......@@ -657,6 +658,7 @@ a.lshare img{
.save_btn{background: url(../images/icon_save.png) center right no-repeat;width: 60px;}
.swith_btn{background: url(../images/gnome-session-switch.png) center right no-repeat;width: 105px;}
.flist_btn{background: url(../images/list2_down.png) center right no-repeat;width: 26px;}
.fmenu_btn{background: url(../images/ui_menu_blue.png) center right no-repeat;width: 58px;}
#error{
padding: 0px;
......
......@@ -111,11 +111,10 @@ $(document).ready(function () {
}
function setupEditor(editable) {
editor = ace.edit('editor');
editor = ace.edit('editorViewer');
editor.setTheme('ace/theme/crimson_editor');
var CurentMode = require('ace/mode/text').Mode;
editor.getSession().setMode(new CurentMode());
editor.getSession().setMode("ace/mode/xml");
editor.getSession().setTabSize(2);
editor.getSession().setUseSoftTabs(true);
editor.renderer.setHScrollBarAlwaysVisible(false);
......@@ -215,7 +214,8 @@ $(document).ready(function () {
return false;
});
$('#xmlview').click(function () {
var content = '<div class="main_content" style="height:230px"><pre id="editor"></pre></div>' +
var content = '<p id="xmllog" class="message"><br/></p>' +
'<div class="main_content" style="height:230px"><pre id="editorViewer"></pre></div>' +
'<input type=submit value="Load" id="loadxml" class="button">';
$.ajax({
type: 'GET',
......
{% extends "layout.html" %}
{% block title %}Adding new project{% endblock %}
{% block title %}Git repository management{% endblock %}
{% block head %}
{{ super() }}
<link href="{{ url_for('static', filename='css/gsFileManager.css', _external=False) }}" rel="stylesheet" type="text/css" media="screen" />
......
{% extends "layout.html" %}
{% block title %}Your current software folder{% endblock %}
{% block title %}View and edit source code{% endblock %}
{% block head %}
{{ super() }}
<link href="{{ url_for('static', filename='css/ui.fancytree.css', _external=False) }}" rel="stylesheet" type="text/css" media="screen" />
......@@ -26,7 +26,7 @@
<input type="hidden" name="subfolder" id="subfolder" value="" />
<!-- Definition of context menu -->
<ul id="myMenu" class="contextMenu">
<ul id="fileTreeMenu" class="contextMenu">
<li class="edit"><a href="#edit">Edit</a></li>
<li class="edit"><a href="#editfull">Open in new editor</a></li>
<li class="view"><a href="#view">Open in viewer</a></li>
......@@ -34,6 +34,7 @@
<li class="delete "><a href="#delete">Delete</a></li>
<li class="refresh separator"><a href="#refresh">Refresh</a></li>
<li class="md5sum"><a href="#md5sum">File md5 sum</a></li>
<li class="favorite"><a href="#favorite">Add file to favorites</a></li>
<li class="copy separator"><a href="#copy">Copy</a></li>
<li class="cut"><a href="#cut">Cut</a></li>
<li class="paste"><a href="#paste">Paste</a></li>
......@@ -46,10 +47,11 @@
<ul class='box_header'>
<li id="switch"><span class="swith_btn" title="Switch between differents file source">This project</span></li>
<li id="save"><span class="save_btn" title="Save current file. Hint: Use Ctrl+S">Save</span></li>
<li id="flist"><span class="flist_btn" id="filelist" title="Recently opened files and favourites" rel='tooltip'>&nbsp;</span></li>
<li id="filelist"><span class="flist_btn" title="Recently opened files and favourites" rel='tooltip'>&nbsp;</span></li>
<li id="option"><span class="fmenu_btn" title='Show more option' rel='tooltip'>Menu</span></li>
<li>
<h2>
<a style="display:none" id='option' href='#' rel='tooltip' title='Show more option'>[Menu]</a><span id="edit_info">No file in editor</span>
<span id="edit_info">No file in editor</span>
<span id="edit_status"></span>
</h2>
</li>
......@@ -85,8 +87,8 @@
<ul class="inline">
<li><a id='getmd5' href="#">Get or Update md5sum</a></li>
<li><a id='addflist' href="#">Add to favourites</a></li>
<li><a id='find' href="#">Find in file &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Ctl+F]</a></li>
<li><a id='replace' href="#">Replace in file &nbsp;&nbsp;[Ctl+H]</a></li></li>
<li><a id='find' href="#">Find in file &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Ctrl+F]</a></li>
<li><a id='replace' href="#">Replace in file &nbsp;&nbsp;[Ctrl+H]</a></li>
</ul>
<div class="sep"></div>
<span class="list">Add project development</span>
......
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