]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Reply popup works now
authorMikael Nordfeldth <mmn@hethane.se>
Sat, 7 Mar 2015 19:35:05 +0000 (20:35 +0100)
committerMikael Nordfeldth <mmn@hethane.se>
Sat, 7 Mar 2015 19:35:05 +0000 (20:35 +0100)
...WHY does javascript let me define the same value twice in the same
definition without warning about it? I hate Javascript. :(

js/util.js

index 85f917b09aeb67f107f20814c0f71166c2396342..84a542bbda3d3f0a728760b27ad304b851842aa4 100644 (file)
@@ -591,14 +591,22 @@ var SN = { // StatusNet
                 e.preventDefault();
                 var noticeEl = $(this).closest('.notice');
                 $.get($(this).attr('href'), {ajax: 1}, function (data, textStatus, xhr) {
-                    SN.U.NoticeOptionPopup($('body', data).html());
+                    SN.U.NoticeOptionPopup(data);
                 });
                 return false;
             });
         },
 
-        NoticeOptionPopup: function (html) {
-            dialog = $(html).dialog();
+        NoticeOptionPopup: function (data) {
+            title = $('head > title', data).text();
+            body = $('body', data).html();
+            dialog = $(body).dialog({
+                    height: "auto",
+                    width: "auto",
+                    modal: true,
+                    resizable: true,
+                    title: title,
+                });
         },
 
         /**
@@ -799,14 +807,6 @@ var SN = { // StatusNet
             });
         },
 
-        NoticeOptionPopup: function (html) {
-            dialog = $(html).dialog({
-                    resizable: false,
-                    height: 150,
-                    modal: true,
-                });
-        },
-
         /**
          * Setup function -- DOES NOT trigger actions immediately.
          *