Fixes for AJAX/JS stuff in Konqueror:
- Fix collapsible fieldsets (broken since to 'IE5 icons alignment' fix) - Fix JS upload (broken due to mysterious form submission abortion bug) Thanks Bèr for letting me use VNC :).4.7.x
parent
e6f4f5ab14
commit
7f73c2bfb2
|
@ -619,10 +619,13 @@ html.js fieldset.collapsed legend * {
|
|||
}
|
||||
html.js fieldset.collapsible legend a {
|
||||
padding-left: 15px;
|
||||
display: block;
|
||||
background: url('menu-expanded.png') 5px 50% no-repeat;
|
||||
}
|
||||
html.js fieldset.collapsed legend a {
|
||||
background-image: url('menu-collapsed.png');
|
||||
}
|
||||
// Note: IE-only fix due to '* html' (breaks Konqueror otherwise).
|
||||
* html.js fieldset.collapsible legend a {
|
||||
display: block;
|
||||
}
|
||||
|
||||
|
|
|
@ -108,9 +108,19 @@ function HTTPPost(uri, object, callbackFunction, callbackParameter) {
|
|||
*/
|
||||
function redirectFormButton(uri, button, handler) {
|
||||
// Insert the iframe
|
||||
var div = document.createElement('div');
|
||||
div.innerHTML = '<iframe name="redirect-target" id="redirect-target" src="" style="width:0px;height:0px;border:0;"></iframe>';
|
||||
button.parentNode.appendChild(div);
|
||||
var iframe = document.createElement('iframe');
|
||||
with (iframe) {
|
||||
name = 'redirect-target';
|
||||
setAttribute('name', 'redirect-target');
|
||||
id = 'redirect-target';
|
||||
}
|
||||
with (iframe.style) {
|
||||
position = 'absolute';
|
||||
height = '1px';
|
||||
width = '1px';
|
||||
visibility = 'hidden';
|
||||
}
|
||||
document.body.appendChild(iframe);
|
||||
|
||||
// Trap the button
|
||||
button.onfocus = function() {
|
||||
|
@ -119,10 +129,13 @@ function redirectFormButton(uri, button, handler) {
|
|||
var button = this;
|
||||
var action = button.form.action;
|
||||
var target = button.form.target;
|
||||
|
||||
// Redirect form submission
|
||||
this.form.action = uri;
|
||||
this.form.target = 'redirect-target';
|
||||
|
||||
handler.onsubmit();
|
||||
|
||||
// Set iframe handler for later
|
||||
window.iframeHandler = function (data) {
|
||||
// Restore form submission
|
||||
|
@ -130,6 +143,8 @@ function redirectFormButton(uri, button, handler) {
|
|||
button.form.target = target;
|
||||
handler.oncomplete(data);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
button.onblur = function() {
|
||||
|
|
|
@ -22,7 +22,8 @@ function progressBar(id) {
|
|||
*/
|
||||
progressBar.prototype.setProgress = function (percentage, status) {
|
||||
var divs = this.element.getElementsByTagName('div');
|
||||
for (i in divs) {
|
||||
var div;
|
||||
for (var i = 0; div = divs[i]; ++i) {
|
||||
if (percentage >= 0) {
|
||||
if (hasClass(divs[i], 'filled')) {
|
||||
divs[i].style.width = percentage + '%';
|
||||
|
|
|
@ -42,8 +42,10 @@ jsUpload.prototype.onsubmit = function () {
|
|||
this.progress.element.style.width = '28em';
|
||||
this.progress.element.style.height = hide.offsetHeight +'px';
|
||||
hide.parentNode.insertBefore(this.progress.element, hide);
|
||||
// Hide file form
|
||||
hide.style.display = 'none';
|
||||
// Hide file form (cannot use display: none, this mysteriously aborts form
|
||||
// submission in Konqueror)
|
||||
hide.style.position = 'absolute';
|
||||
hide.style.left = '-2000px';
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue