]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Extended profile - fix regression whereby if there was only one item, you could still...
authorZach Copley <zach@status.net>
Wed, 16 Mar 2011 07:23:34 +0000 (00:23 -0700)
committerZach Copley <zach@status.net>
Wed, 16 Mar 2011 07:23:34 +0000 (00:23 -0700)
plugins/ExtendedProfile/js/profiledetail.js
plugins/ExtendedProfile/profiledetailsettingsaction.php

index 7960cee83fc2714db26aa6315def350b1e78b311..f475046385eb0e66ad766c8d7c935828f3dba325 100644 (file)
@@ -68,19 +68,17 @@ SN_EXTENDED.removeRow = function() {
     var div = $(this).closest('div');
     var id = $(div).attr('id');
     var cls = $(div).attr('class');
-    var cnt = SN_EXTENDED.rowCount(cls);
-
     var that = this;
 
     $("#confirm-dialog").dialog({
         buttons : {
             "Confirm" : function() {
+                $(this).dialog("close");
                 var target = $(that).closest('tr');
                 target.fadeOut("slow", function() {
-                    $(that).remove();
+                    $(target).remove();
+                    SN_EXTENDED.reorder(cls);
                 });
-                SN_EXTENDED.reorder(cls);
-                $(this).dialog("close");
             },
             "Cancel" : function() {
                 $(this).dialog("close");
@@ -88,6 +86,8 @@ SN_EXTENDED.removeRow = function() {
         }
     });
 
+    var cnt = SN_EXTENDED.rowCount(cls);
+
     if (cnt > 1) {
         $("#confirm-dialog").dialog("open");
     }
index b0590f7316f474c084df4e8e2f2e6af90ae608b8..01a8fa9c7bdba5a86001e013d86badbdc4450168 100644 (file)
@@ -60,7 +60,7 @@ class ProfileDetailSettingsAction extends ProfileSettingsAction
         // CSRF protection
         $token = $this->trimmed('token');
         if (!$token || $token != common_session_token()) {
-            $this->show_form(
+            $this->showForm(
                 _m(
                     'There was a problem with your session token. '
                     .   'Try again, please.'