You are here: Foswiki>Tasks Web>Item14218 (18 Feb 2017, GeorgeClark)Edit Attach

Item14218: EditRowPlugin: edit button does not work when using Internet Explorer.

pencil
Priority: Urgent
Current State: Closed
Released In: 2.1.3
Target Release: patch
Applies To: Extension
Component: EditRowPlugin
Branches: Release02x01 master
Reported By: PhilippFleischer
Waiting For:
Last Change By: GeorgeClark
-- PhilippFleischer - 16 Nov 2016

/*With the code below it seems to work again*/

$(window).load(function() {
    var btn  = $(".erp-edittable");
    var link = $(btn).parent();
    var href = $(link).attr("href");
   $(btn).click(function() {
       window.location.assign(href);
   });

});

-- PhilippFleischer - 16 Nov 2016

Can you provide a bit more context? The file you changed, and the line number, or better yet a diff, so we can better understand the fix? Thanks.

Also, please expand on "doesn't work" ... are you seeing a javascript error?

Thanks

-- GeorgeClark - 16 Nov 2016

Also, what version of IE are you using? And what version of Foswiki?

-- GeorgeClark - 16 Nov 2016

Sure I use Internet Explorer 11 and edited the erp.uncompressed.js file, afterwards exchanged erp.uncompressed.js with erp.js.

With does not work I mean, that if you hit the button then nothing did happen, there was no javascript error. In my opinion Internet Explorer does not understand if a button is child node of a hyperlink tag, it just ignores the href.

We use foswiki version 2.1

Following our diff,


Author: Wiki-Team <wiki@zedat.fu-berlin.de>
Date:   Wed Nov 16 12:04:35 2016 +0100
     Item14218:EditRowPlugin, edit button works again in Internet Explorer

diff --git a/pub/System/EditRowPlugin/erp.js b/pub/System/EditRowPlugin/erp.js
index d4c26f9..5b2a0a4 100644
--- a/pub/System/EditRowPlugin/erp.js
+++ b/pub/System/EditRowPlugin/erp.js
@@ -692,13 +692,10 @@
+  $(window).load(function() {
+    var btn  = $(".erp-edittable");
+    var link = $(btn).parent();
+    var href = $(link).attr("href");
+   $(btn).click(function() {
+       window.location.assign(href);
+   }); 
+  });

-- PhilippFleischer - 21 Nov 2016

Thanks for the patch. We'll get it applied for the upcoming 2.1.3 release.

-- GeorgeClark - 21 Nov 2016

Are you sure the diff is correct, and you don't have other changes to the file? The file shipped with Foswiki 2.1.2 is only 689 lines.

Could you try to fit your patch against the version here: https://github.com/foswiki/distro/blob/Release02x01/EditRowPlugin/pub/System/EditRowPlugin/erp.uncompressed.js

Or, please attached your patched version to this task and I'll try to figure out why the diff isn't matching.

Thanks

-- GeorgeClark - 22 Nov 2016

Hi sorry hopefully it works now,

added a format-patch in the attachment section

-- PhilippFleischer - 25 Nov 2016

Patch applied. Thanks.

-- GeorgeClark - 26 Nov 2016

nice thanks

-- PhilippFleischer - 28 Nov 2016
 
Topic revision: r13 - 18 Feb 2017, GeorgeClark
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy