Commit b3e99887 authored by Alain Takoudjou's avatar Alain Takoudjou

Fix issues after merging

parent becd5186
...@@ -41,18 +41,5 @@ border-left:1px #E4E4E4 solid; cursor:pointer; color: #5C7077; text-shadow: 0px ...@@ -41,18 +41,5 @@ border-left:1px #E4E4E4 solid; cursor:pointer; color: #5C7077; text-shadow: 0px
#tabContent pre {display: none;} #tabContent pre {display: none;}
#tabContent pre.active {display: block;} #tabContent pre.active {display: block;}
.item-hide{display:none;} .item-hide{display:none;}
.bt_close {
text-decoration: none;
color: #999;
font-weight: bold;
font-size: 1em;
padding: 0 4px;
-webkit-border-radius: .2em;
-moz-border-radius: .2em;
border-radius: .2em;
cursor: pointer;
}
.bt_close:hover {
color: #333;
}
...@@ -410,7 +410,7 @@ padding: 10px;height: 80px;padding-bottom:15px;} ...@@ -410,7 +410,7 @@ padding: 10px;height: 80px;padding-bottom:15px;}
} }
#code{ #code{
float: right; float: right;
width: 680px; width: 692px;
} }
#details_head{margin-bottom: 10px;} #details_head{margin-bottom: 10px;}
...@@ -633,26 +633,6 @@ a.no-right-border:focus{border-right:none} ...@@ -633,26 +633,6 @@ a.no-right-border:focus{border-right:none}
a.lshare img{ a.lshare img{
margin: 5px; margin: 5px;
} }
.box_header{
background: #E4E4E4;
width: 100%;
height: 30px;
padding-top: 2px;
text-indent: 5px;
color: #737373;
text-shadow: 0px 1px #F1F1F1;
border-bottom: 3px solid #6DB9DD;
}
.box_header li{float: left;border: 1px solid #AAB8C2;padding: 1px 5px 1px 0;margin-left: 5px;}
.box_header li:last-child{border:none}
.box_header li > span{cursor: pointer; height: 22px; display: block;line-height: 22px;font-weight: bold;padding: 1px;}
.box_header li:hover{border: 1px solid #57A1D6;background: #C7C7C7;}
.box_header li:last-child:hover{background:none; border: none}
.box_header li>a{font-weight: bold; font-size:15px;display: block;padding: 2px;}
.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;}
#editor, #editorViewer { #editor, #editorViewer {
margin: 0; margin: 0;
...@@ -798,6 +778,21 @@ padding:10px; font-size:14px; color:#03406A} ...@@ -798,6 +778,21 @@ padding:10px; font-size:14px; color:#03406A}
max-width: 350px; max-width: 350px;
} }
.bt_close {
text-decoration: none;
color: #999;
font-weight: bold;
font-size: 1em;
padding: 0 4px;
-webkit-border-radius: .2em;
-moz-border-radius: .2em;
border-radius: .2em;
cursor: pointer;
}
.bt_close:hover {
color: #333;
}
.fullScreen .fullScreen-editor{ .fullScreen .fullScreen-editor{
height: auto!important; height: auto!important;
width: auto!important; width: auto!important;
......
...@@ -251,7 +251,7 @@ function runProcess(urlfor, data) { ...@@ -251,7 +251,7 @@ function runProcess(urlfor, data) {
} }
} }
setInterval('GetStateRegularly()', 800); //setInterval('GetStateRegularly()', 800);
function GetStateRegularly() { function GetStateRegularly() {
getRunningState(); getRunningState();
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
/*global $, document, $SCRIPT_ROOT, ace, window */ /*global $, document, $SCRIPT_ROOT, ace, window */
/*global path: true */ /*global path: true */
/* vim: set et sts=4: */ /* vim: set et sts=4: */
var beforeunload_warning_set = 0;
$(document).ready(function () { $(document).ready(function () {
"use strict"; "use strict";
...@@ -23,6 +23,7 @@ $(document).ready(function () { ...@@ -23,6 +23,7 @@ $(document).ready(function () {
pasteMode = null, pasteMode = null,
favourite_list = new Array(), favourite_list = new Array(),
editorWidth = $("#code").css("width"), editorWidth = $("#code").css("width"),
base_path = function () { base_path = function () {
return softwareDisplay ? currentProject : 'workspace/'; return softwareDisplay ? currentProject : 'workspace/';
}; };
...@@ -88,6 +89,9 @@ $(document).ready(function () { ...@@ -88,6 +89,9 @@ $(document).ready(function () {
if ( !editorlist[hash].changed ) { if ( !editorlist[hash].changed ) {
return; return;
} }
if (editorlist[hash].busy) {
return;
}
editorlist[hash].busy = true; editorlist[hash].busy = true;
$.ajax({ $.ajax({
type: "POST", type: "POST",
...@@ -102,6 +106,9 @@ $(document).ready(function () { ...@@ -102,6 +106,9 @@ $(document).ready(function () {
title = $(currentSpan).html(); title = $(currentSpan).html();
editorlist[hash].changed = false; editorlist[hash].changed = false;
$(currentSpan).html(title.substr(1)); $(currentSpan).html(title.substr(1));
if(--beforeunload_warning_set === 0) {
window.onbeforeunload = function() { return; };
}
} else { } else {
$("#error").Popup(data.result, {type: 'error', duration: 5000}); $("#error").Popup(data.result, {type: 'error', duration: 5000});
} }
...@@ -264,10 +271,10 @@ $(document).ready(function () { ...@@ -264,10 +271,10 @@ $(document).ready(function () {
if (!editorlist[activeToken].busy && !editorlist[activeToken].changed) { if (!editorlist[activeToken].busy && !editorlist[activeToken].changed) {
editorlist[activeToken].changed = true; editorlist[activeToken].changed = true;
$(activeSpan).html("*" + $(activeSpan).html()); $(activeSpan).html("*" + $(activeSpan).html());
if(beforeunload_warning_set === 0) {
window.onbeforeunload = function() { return "You have unsaved changes. Your changes will be lost if you don't save them"; };
} }
if (!beforeunload_warning_set) { beforeunload_warning_set++;
window.onbeforeunload = function() { return "You have unsaved changes"; };
beforeunload_warning_set = true;
} }
}); });
editor.commands.addCommand({ editor.commands.addCommand({
...@@ -410,10 +417,13 @@ $(document).ready(function () { ...@@ -410,10 +417,13 @@ $(document).ready(function () {
files: clipboardNode.data.path, files: clipboardNode.data.path,
dir: node.data.path dir: node.data.path
}; };
// Copy mode: prevent duplicate keys:
var request, cb = clipboardNode.toDict(true, function(dict){
delete dict.key; // Remove key, so a new one will be created
});
if( pasteMode == "cut" ) { if( pasteMode == "cut" ) {
// Cut mode: check for recursion and remove source // Cut mode: check for recursion and remove source
dataForSend.opt = 7; dataForSend.opt = 7;
var cb = clipboardNode.toDict(true);
if( node.isDescendantOf(clipboardNode) ) { if( node.isDescendantOf(clipboardNode) ) {
$("#error").Popup("ERROR: Cannot move a node to it's sub node.", {type: 'error', duration: 5000}); $("#error").Popup("ERROR: Cannot move a node to it's sub node.", {type: 'error', duration: 5000});
return; return;
...@@ -430,6 +440,7 @@ $(document).ready(function () { ...@@ -430,6 +440,7 @@ $(document).ready(function () {
} }
clipboardNode.remove(); clipboardNode.remove();
} }
clipboardNode = pasteMode = null;
}); });
} else { } else {
if (node.key === clipboardNode.getParent().key){ if (node.key === clipboardNode.getParent().key){
...@@ -441,10 +452,6 @@ $(document).ready(function () { ...@@ -441,10 +452,6 @@ $(document).ready(function () {
request = fileBrowserOp(dataForSend); request = fileBrowserOp(dataForSend);
request.always(function() { request.always(function() {
if (ajaxResult){ if (ajaxResult){
// Copy mode: prevent duplicate keys:
var cb = clipboardNode.toDict(true, function(dict){
delete dict.key; // Remove key, so a new one will be created
});
if (dataForSend.opt === 14){ if (dataForSend.opt === 14){
node.lazyLoad(true); node.lazyLoad(true);
node.toggleExpanded(); node.toggleExpanded();
...@@ -454,9 +461,9 @@ $(document).ready(function () { ...@@ -454,9 +461,9 @@ $(document).ready(function () {
node.render(); node.render();
} }
} }
clipboardNode = pasteMode = null;
}); });
} }
clipboardNode = pasteMode = null;
break; break;
} }
}; };
...@@ -839,12 +846,7 @@ $(document).ready(function () { ...@@ -839,12 +846,7 @@ $(document).ready(function () {
if ($("#tabControl div.item").length === 0) { if ($("#tabControl div.item").length === 0) {
return false; return false;
} }
beforeunload_warning_set = false;
window.onbeforeunload = function() { return; };
var hash = getActiveToken(); var hash = getActiveToken();
if (editorlist[hash].busy) {
return false;
}
runSaveFile(hash); runSaveFile(hash);
return false; return false;
}); });
...@@ -915,17 +917,6 @@ $(document).ready(function () { ...@@ -915,17 +917,6 @@ $(document).ready(function () {
$("#option").click(); $("#option").click();
return false; return false;
}); });
$("a#addflist").click(function(){
addToFavourite(current_file);
$("#option").click();
return false;
});
$("a#find").click(function(){
config.loadModule("ace/ext/searchbox", function(e) {e.Search(editor)});
$("#option").click();
return false;
});
$("a#find").click(function () { $("a#find").click(function () {
if ($("#tabControl div.item").length === 0) { if ($("#tabControl div.item").length === 0) {
...@@ -950,9 +941,13 @@ $(document).ready(function () { ...@@ -950,9 +941,13 @@ $(document).ready(function () {
}); });
$("#fullscreen").click(function(){ $("#fullscreen").click(function(){
if ($("#tabControl div.item").length === 0) {
return false;
}
var hash = getActiveToken();
$("body").toggleClass("fullScreen"); $("body").toggleClass("fullScreen");
$("#editor").toggleClass("fullScreen-editor"); $("#tabContent pre.active[rel='"+ hash + "']").toggleClass("fullScreen-editor");
editor.resize(); editorlist[hash].editor.resize();
}); });
}); });
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
<ul> <ul>
<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">&nbsp;</span></li> <li id="save"><span class="save_btn" title="Save current file. Hint: Use Ctrl+S">&nbsp;</span></li>
<li id="expand"><span class="expand_editor" title="Expand or reduce the editor area">&nbsp;</span></li> <li id="expand"><span class="expand_editor" title="Expand or reduce Editor. hint: Ctrl+E for full screen">&nbsp;</span></li>
<li id="filelist"><span class="flist_btn" title="Favourites files list" rel='tooltip'>&nbsp;</span></li> <li id="filelist"><span class="flist_btn" title="Favourites files list" rel='tooltip'>&nbsp;</span></li>
<li id="option"><span class="fmenu_btn" title='Show more option' rel='tooltip'>Menu</span></li> <li id="option"><span class="fmenu_btn" title='Show more option' rel='tooltip'>Menu</span></li>
</ul> </ul>
...@@ -76,7 +76,9 @@ ...@@ -76,7 +76,9 @@
<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='fullscreen' title="Show Editor in Fullscreen. Hint: Use Ctrl+E" href="#">Full screen &nbsp;&nbsp;[Ctrl+E]</a></li> <li><a id='fullscreen' title="Show Editor in Fullscreen. Hint: Use Ctrl+E" href="#">
Full screen &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Ctrl+E]</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='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> <li><a id='replace' href="#">Replace in file &nbsp;&nbsp;[Ctrl+H]</a></li>
</ul> </ul>
......
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