Commit c3b7acf3 authored by Alain Takoudjou's avatar Alain Takoudjou

Fix file management in editor, update fancyTree

parent dc18a423
...@@ -127,7 +127,7 @@ class FileBrowser(object): ...@@ -127,7 +127,7 @@ class FileBrowser(object):
os.unlink(filepath) os.unlink(filepath)
except Exception as e: except Exception as e:
return str(e) return str(e)
return "{result: '1', test: %s}" % '*'.join(lfiles) return "{result: '1'}"
def copyItem(self, dir, files, del_source=False): def copyItem(self, dir, files, del_source=False):
"""Copy a list of files or directory to dir""" """Copy a list of files or directory to dir"""
......
/* Generic context menu styles */ /* Generic context menu styles */
.contextMenu { .contextMenu {
position: absolute; position: absolute;
width: 180px; width: 200px;
z-index: 99999; z-index: 99999;
border: solid 1px #CCC; border: solid 1px #CCC;
background: #ffffff; background: #ffffff;
...@@ -68,3 +68,4 @@ ...@@ -68,3 +68,4 @@
.contextMenu LI.rename A { background-image: url(images/mfile.png); } .contextMenu LI.rename A { background-image: url(images/mfile.png); }
.contextMenu LI.md5sum A { background-image: url(images/selection-select.png); } .contextMenu LI.md5sum A { background-image: url(images/selection-select.png); }
.contextMenu LI.refresh A { background-image: url(images/refresh.png); } .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 { ...@@ -248,6 +248,7 @@ body {
outline:none; outline:none;
font: 13px 'Helvetica Neue', Helvetica, Arial, sans-serif; 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"]{ input[type="radio"], input[type="checkbox"]{
margin: 4px; margin: 4px;
...@@ -653,6 +654,7 @@ a.lshare img{ ...@@ -653,6 +654,7 @@ a.lshare img{
.save_btn{background: url(../images/icon_save.png) center right no-repeat;width: 60px;} .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;} .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;} .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{ #error{
padding: 0px; padding: 0px;
......
...@@ -111,11 +111,10 @@ $(document).ready(function () { ...@@ -111,11 +111,10 @@ $(document).ready(function () {
} }
function setupEditor(editable) { function setupEditor(editable) {
editor = ace.edit('editor'); editor = ace.edit('editorViewer');
editor.setTheme('ace/theme/crimson_editor'); editor.setTheme('ace/theme/crimson_editor');
var CurentMode = require('ace/mode/text').Mode; editor.getSession().setMode("ace/mode/xml");
editor.getSession().setMode(new CurentMode());
editor.getSession().setTabSize(2); editor.getSession().setTabSize(2);
editor.getSession().setUseSoftTabs(true); editor.getSession().setUseSoftTabs(true);
editor.renderer.setHScrollBarAlwaysVisible(false); editor.renderer.setHScrollBarAlwaysVisible(false);
...@@ -215,7 +214,8 @@ $(document).ready(function () { ...@@ -215,7 +214,8 @@ $(document).ready(function () {
return false; return false;
}); });
$('#xmlview').click(function () { $('#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">'; '<input type=submit value="Load" id="loadxml" class="button">';
$.ajax({ $.ajax({
type: 'GET', type: 'GET',
......
{% extends "layout.html" %} {% extends "layout.html" %}
{% block title %}Adding new project{% endblock %} {% block title %}Git repository management{% endblock %}
{% block head %} {% block head %}
{{ super() }} {{ super() }}
<link href="{{ url_for('static', filename='css/gsFileManager.css', _external=False) }}" rel="stylesheet" type="text/css" media="screen" /> <link href="{{ url_for('static', filename='css/gsFileManager.css', _external=False) }}" rel="stylesheet" type="text/css" media="screen" />
......
{% extends "layout.html" %} {% extends "layout.html" %}
{% block title %}Your current software folder{% endblock %} {% block title %}View and edit source code{% endblock %}
{% block head %} {% block head %}
{{ super() }} {{ super() }}
<link href="{{ url_for('static', filename='css/ui.fancytree.css', _external=False) }}" rel="stylesheet" type="text/css" media="screen" /> <link href="{{ url_for('static', filename='css/ui.fancytree.css', _external=False) }}" rel="stylesheet" type="text/css" media="screen" />
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<input type="hidden" name="subfolder" id="subfolder" value="" /> <input type="hidden" name="subfolder" id="subfolder" value="" />
<!-- Definition of context menu --> <!-- 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="#edit">Edit</a></li>
<li class="edit"><a href="#editfull">Open in new editor</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> <li class="view"><a href="#view">Open in viewer</a></li>
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
<li class="delete "><a href="#delete">Delete</a></li> <li class="delete "><a href="#delete">Delete</a></li>
<li class="refresh separator"><a href="#refresh">Refresh</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="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="copy separator"><a href="#copy">Copy</a></li>
<li class="cut"><a href="#cut">Cut</a></li> <li class="cut"><a href="#cut">Cut</a></li>
<li class="paste"><a href="#paste">Paste</a></li> <li class="paste"><a href="#paste">Paste</a></li>
...@@ -46,10 +47,11 @@ ...@@ -46,10 +47,11 @@
<ul class='box_header'> <ul class='box_header'>
<li id="switch"><span class="swith_btn" title="Switch between differents file source">This project</span></li> <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="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> <li>
<h2> <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> <span id="edit_status"></span>
</h2> </h2>
</li> </li>
...@@ -85,8 +87,8 @@ ...@@ -85,8 +87,8 @@
<ul class="inline"> <ul class="inline">
<li><a id='getmd5' href="#">Get or Update md5sum</a></li> <li><a id='getmd5' href="#">Get or Update md5sum</a></li>
<li><a id='addflist' href="#">Add to favourites</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='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;[Ctl+H]</a></li></li> <li><a id='replace' href="#">Replace in file &nbsp;&nbsp;[Ctrl+H]</a></li>
</ul> </ul>
<div class="sep"></div> <div class="sep"></div>
<span class="list">Add project development</span> <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