diff --git a/scripts/dnd.js b/scripts/dnd.js
new file mode 100644
index 00000000..4875cf89
--- /dev/null
+++ b/scripts/dnd.js
@@ -0,0 +1,31 @@
+/********************************************************************\
+
+ Name: dnd.js
+ Created by: Stefan Ritt
+
+ Contents: JavaScript code for Drag & Drop interface
+
+\********************************************************************/
+
+function XMLHttpRequestGeneric()
+{
+ var request;
+ try {
+ request = new XMLHttpRequest(); // Firefox, Opera 8.0+, Safari
+ }
+ catch (e) {
+ try {
+ request = new ActiveXObject('Msxml2.XMLHTTP'); // Internet Explorer
+ }
+ catch (e) {
+ try {
+ request = new ActiveXObject('Microsoft.XMLHTTP');
+ }
+ catch (e) {
+ alert('Your browser does not support AJAX!');
+ return undefined;
+ }
+ }
+ }
+ return request;
+}
diff --git a/scripts/im.js b/scripts/im.js
index 81644a7c..4f6c2bce 100644
--- a/scripts/im.js
+++ b/scripts/im.js
@@ -10,43 +10,26 @@
\********************************************************************/
var dummy = 0;
-var httpReq;
+var imReq;
var elName;
var thumbName;
function im(name, thumb, image, cmd)
{
- try {
- httpReq = new XMLHttpRequest(); // Firefox, Opera 8.0+, Safari
- }
- catch (e) {
- try {
- httpReq = new ActiveXObject("Msxml2.XMLHTTP"); // Internet Explorer
- }
- catch (e) {
- try {
- httpReq = new ActiveXObject("Microsoft.XMLHTTP");
- }
- catch (e) {
- alert("Your browser does not support AJAX!");
- return false;
- }
- }
- }
-
+ imReq = XMLHttpRequestGeneric();
elName = name;
thumbName = thumb;
- httpReq.onreadystatechange = onReady;
- httpReq.open("GET","?cmd=im&req="+cmd+"&img="+image, true);
- httpReq.send(null);
+ imReq.onreadystatechange = onReady;
+ imReq.open("GET","?cmd=im&req="+cmd+"&img="+image, true);
+ imReq.send(null);
}
function onReady()
{
- if (httpReq.readyState == 4) {
- if (httpReq.responseText != "" &&
- httpReq.responseText.search(/Fonts/) == -1)
- alert(httpReq.responseText);
+ if (imReq.readyState == 4) {
+ if (imReq.responseText != "" &&
+ imReq.responseText.search(/Fonts/) == -1)
+ alert(imReq.responseText);
o = document.getElementsByName(elName);
if (o[0])
o[0].src = thumbName+'?'+dummy;
@@ -61,11 +44,12 @@ function onReady()
}
dummy++;
}
- delete httpReq;
+ delete imReq;
}
function deleteAtt(idx)
{
+ submitted = true;
document.form1.smcmd.value='delatt'+idx;
document.form1.submit();
}
\ No newline at end of file
diff --git a/scripts/load-ckeditor.js b/scripts/load-ckeditor.js
index 4a78a42f..b2329a13 100755
--- a/scripts/load-ckeditor.js
+++ b/scripts/load-ckeditor.js
@@ -218,7 +218,7 @@ $(document).ready(function() {
event.stopPropagation();
event.preventDefault();
console.log("holder-enter")
- holder.css("border", "10px dashed #0c0");
+ holder.css("border", "6px dashed #0c0");
return false;
},
'dragover' : function(event) {
@@ -230,7 +230,7 @@ $(document).ready(function() {
event.stopPropagation();
event.preventDefault();
console.log("holder-leave");
- holder.css("border", "10px dashed #ccc");
+ holder.css("border", "6px dashed #ccc");
return false;
},
'drop' : function(e) {
diff --git a/src/elogd.c b/src/elogd.c
index 364748af..b4ad0538 100755
--- a/src/elogd.c
+++ b/src/elogd.c
@@ -9484,7 +9484,7 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL
{
int i, j, n, index, aindex, size, width, height, fh, length, input_size, input_maxlen,
format_flags[MAX_N_ATTR], year, month, day, hour, min, sec, n_attr, n_disp_attr, n_lines,
- attr_index[MAX_N_ATTR], enc_selected, show_smileys, show_text, n_moptions, display_inline,
+ attr_index[MAX_N_ATTR], enc_selected, show_text, n_moptions, display_inline,
allowed_encoding, thumb_status, max_n_lines, fixed_text, autosave;
char str[2 * NAME_LENGTH], str2[NAME_LENGTH], preset[2 * NAME_LENGTH], *p, *pend, star[80],
comment[10000], reply_string[256], list[MAX_N_ATTR][NAME_LENGTH], file_name[256], *buffer,
@@ -9492,7 +9492,7 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL
attrib[MAX_N_ATTR][NAME_LENGTH], *text, orig_tag[80], reply_tag[MAX_REPLY_TO * 10],
att[MAX_ATTACHMENTS][256], encoding[80], slist[MAX_N_ATTR + 10][NAME_LENGTH],
svalue[MAX_N_ATTR + 10][NAME_LENGTH], owner[256], locked_by[256], class_value[80], class_name[80],
- ua[NAME_LENGTH], mid[80], title[256], login_name[256], full_name[256], cookie[256],
+ ua[NAME_LENGTH], mid[80], title[256], login_name[256], full_name[256],
orig_author[256], attr_moptions[MAX_N_LIST][NAME_LENGTH], ref[256], file_enc[256], tooltip[10000],
enc_attr[NAME_LENGTH], user_email[256], cmd[256], thumb_name[256], thumb_ref[256], **user_list, fid[20],
upwd[80], subdir[256], draft[256], page_title[256];
@@ -9636,20 +9636,6 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL
if (getcfg(lbs->name, "Default Encoding", str, sizeof(str)))
enc_selected = atoi(str);
- /* determine if smiley bar should be displayed */
- show_smileys = 0;
- cookie[0] = 0;
- if (isparam("hsm") && atoi(getparam("hsm")) == 1) /* cookie */
- show_smileys = 0;
- if (isparam("smcmd") && strieq(getparam("smcmd"), "hsm")) { /* turn off */
- show_smileys = 0;
- strcpy(cookie, "hsm=1");
- }
- if (isparam("smcmd") && strieq(getparam("smcmd"), "ssm")) { /* turn on */
- show_smileys = 1;
- strcpy(cookie, "hsm=0");
- }
-
/* Overwrite from current entry */
if (encoding[0]) {
if (encoding[0] == 'E')
@@ -9942,7 +9928,7 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL
} else
sprintf(page_title, "ELOG %s", lbs->name);
- show_html_header(lbs, FALSE, page_title, FALSE, FALSE, cookie, FALSE, 0);
+ show_html_header(lbs, FALSE, page_title, FALSE, FALSE, NULL, FALSE, 0);
/* java script for checking required attributes and to check for cancelled edits */
rsprintf("\n");
rsprintf("\n");
}
-
+
+ /* drag-and-drip script */
+ rsprintf("\n\n");
+
/* external script if requested */
if (isparam("js")) {
rsprintf("