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
#tabContent pre {display: none;}
#tabContent pre.active {display: block;}
.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;}
}
#code{
float: right;
width: 680px;
width: 692px;
}
#details_head{margin-bottom: 10px;}
......@@ -633,26 +633,6 @@ a.no-right-border:focus{border-right:none}
a.lshare img{
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 {
margin: 0;
......@@ -798,6 +778,21 @@ padding:10px; font-size:14px; color:#03406A}
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{
height: auto!important;
width: auto!important;
......
......@@ -251,7 +251,7 @@ function runProcess(urlfor, data) {
}
}
setInterval('GetStateRegularly()', 800);
//setInterval('GetStateRegularly()', 800);
function GetStateRegularly() {
getRunningState();
}
......
......@@ -2,7 +2,7 @@
/*global $, document, $SCRIPT_ROOT, ace, window */
/*global path: true */
/* vim: set et sts=4: */
var beforeunload_warning_set = 0;
$(document).ready(function () {
"use strict";
......@@ -23,6 +23,7 @@ $(document).ready(function () {
pasteMode = null,
favourite_list = new Array(),
editorWidth = $("#code").css("width"),
base_path = function () {
return softwareDisplay ? currentProject : 'workspace/';
};
......@@ -88,6 +89,9 @@ $(document).ready(function () {
if ( !editorlist[hash].changed ) {
return;
}
if (editorlist[hash].busy) {
return;
}
editorlist[hash].busy = true;
$.ajax({
type: "POST",
......@@ -102,6 +106,9 @@ $(document).ready(function () {
title = $(currentSpan).html();
editorlist[hash].changed = false;
$(currentSpan).html(title.substr(1));
if(--beforeunload_warning_set === 0) {
window.onbeforeunload = function() { return; };
}
} else {
$("#error").Popup(data.result, {type: 'error', duration: 5000});
}
......@@ -264,10 +271,10 @@ $(document).ready(function () {
if (!editorlist[activeToken].busy && !editorlist[activeToken].changed) {
editorlist[activeToken].changed = true;
$(activeSpan).html("*" + $(activeSpan).html());
}
if (!beforeunload_warning_set) {
window.onbeforeunload = function() { return "You have unsaved changes"; };
beforeunload_warning_set = true;
if(beforeunload_warning_set === 0) {
window.onbeforeunload = function() { return "You have unsaved changes. Your changes will be lost if you don't save them"; };
}
beforeunload_warning_set++;
}
});
editor.commands.addCommand({
......@@ -410,10 +417,13 @@ $(document).ready(function () {
files: clipboardNode.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" ) {
// Cut mode: check for recursion and remove source
dataForSend.opt = 7;
var cb = clipboardNode.toDict(true);
if( node.isDescendantOf(clipboardNode) ) {
$("#error").Popup("ERROR: Cannot move a node to it's sub node.", {type: 'error', duration: 5000});
return;
......@@ -430,6 +440,7 @@ $(document).ready(function () {
}
clipboardNode.remove();
}
clipboardNode = pasteMode = null;
});
} else {
if (node.key === clipboardNode.getParent().key){
......@@ -441,10 +452,6 @@ $(document).ready(function () {
request = fileBrowserOp(dataForSend);
request.always(function() {
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){
node.lazyLoad(true);
node.toggleExpanded();
......@@ -454,9 +461,9 @@ $(document).ready(function () {
node.render();
}
}
clipboardNode = pasteMode = null;
});
}
clipboardNode = pasteMode = null;
break;
}
};
......@@ -839,12 +846,7 @@ $(document).ready(function () {
if ($("#tabControl div.item").length === 0) {
return false;
}
beforeunload_warning_set = false;
window.onbeforeunload = function() { return; };
var hash = getActiveToken();
if (editorlist[hash].busy) {
return false;
}
runSaveFile(hash);
return false;
});
......@@ -915,17 +917,6 @@ $(document).ready(function () {
$("#option").click();
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 () {
if ($("#tabControl div.item").length === 0) {
......@@ -950,9 +941,13 @@ $(document).ready(function () {
});
$("#fullscreen").click(function(){
$("body").toggleClass("fullScreen");
$("#editor").toggleClass("fullScreen-editor");
editor.resize();
if ($("#tabControl div.item").length === 0) {
return false;
}
var hash = getActiveToken();
$("body").toggleClass("fullScreen");
$("#tabContent pre.active[rel='"+ hash + "']").toggleClass("fullScreen-editor");
editorlist[hash].editor.resize();
});
});
......@@ -46,7 +46,7 @@
<ul>
<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="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="option"><span class="fmenu_btn" title='Show more option' rel='tooltip'>Menu</span></li>
</ul>
......@@ -76,7 +76,9 @@
<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='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='replace' href="#">Replace in file &nbsp;&nbsp;[Ctrl+H]</a></li>
</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