Move style to style section
[infodrom.org/service.infodrom.org] / src / InfoCon / stempel / status.wml
index 9e738b6..4497d1c 100644 (file)
@@ -210,18 +210,20 @@ function check(id, value)
            add_sum(id, checkbox);
        }
     });
+
+    return false;
 }
 
 function plant(form, rate)
 {
   document.write('<div class="jscode">');
-  document.write('<input class="filter" id="filter_'+form+'" size="10" value="" style="font-size: 90%; position: relative; bottom: 2px;">');
+  document.write('<input class="filter" id="filter_'+form+'" size="10" value="">');
   document.write('<img class="filter" id="img_'+form+'" src="/pix/Actions-edit-delete-icon.png" border="0" ' +
-                'style="position: relative; bottom: -3px; margin-left: 1px; margin-right: 10px;" title="Filter löschen">');
+                'title="Filter löschen">');
   document.write('<input type="hidden" id="rate_'+form+'" value="'+rate+'">');
-  document.write('<a href="javascript:check('+form+',true)">Check all</a>');
+  document.write('<a href="#" onclick="return check('+form+',true)">Check all</a>');
   document.write("&nbsp;/&nbsp;");
-  document.write('<a href="javascript:check('+form+',false)">Uncheck all</a>');
+  document.write('<a href="#" onclick="return check('+form+',false)">Uncheck all</a>');
   document.write("&nbsp;");
   document.write('<span id="time_'+form+'" class="sum">0:00</span>' );
   document.write('<span id="sum_'+form+'" class="sum">&euro;0.00</span>');
@@ -263,14 +265,11 @@ function edit_task(obj)
        task_title = obj.innerHTML;
        task_oid = obj.parentNode.children[0].children[0].value;
 
-       var input = document.createElement('input');
-       input.value = obj.innerHTML
-       input.style.fontSize = '100%';
-       input.style.width = '100%';
-       input.style.background = 'yellow';
-
+       var input = $('<input>');
+       input.val(obj.innerHTML.replace('&gt;', '>').replace('&lt;', '<').replace('&amp;', '&'));
+       input.css('fontSize', '100%').css('width', '100%').css('background', 'yellow');
        obj.innerHTML = '';
-       obj.appendChild(input);
+       $(obj).append(input);
        input.focus();
     }
 }
@@ -280,7 +279,7 @@ function edit_task_save()
     if (!task_parent) return;
 
     if (task_parent.children[0].value != task_title)
-       ajax_request('save','oid='+task_oid+'&task='+encodeURIComponent(task_parent.children[0].value));
+       $.invoke('Sales/Text', {id: task_oid, text: task_parent.children[0].value});
 
     task_parent.innerHTML = task_parent.children[0].value;
     task_parent = null;
@@ -347,6 +346,17 @@ div.jscode {
   margin-top: -13px;
   font-size: 12px;
 }
+div.jscode input.filter {
+  font-size: 90%;
+  position: relative;
+  bottom: 2px;
+}
+div.jscode img.filter {
+  position: relative;
+  bottom: -3px;
+  margin-left: 1px;
+  margin-right: 10px;
+}
 span.sum {
   display: inline;
   border: 1px solid #9b9b9b;