<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[BuddyPress] [2799] trunk/bp-xprofile:
IE7 fixes for xprofile field group reorder.</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd>2799</dd>
<dt>Author</dt> <dd>johnjamesjacoby</dd>
<dt>Date</dt> <dd>2010-03-03 09:28:01 +0000 (Wed, 03 Mar 2010)</dd>
</dl>
<h3>Log Message</h3>
<pre>IE7 fixes for xprofile field group reorder. Also fix issue with nested sortables.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbpxprofileadmincssadmincss">trunk/bp-xprofile/admin/css/admin.css</a></li>
<li><a href="#trunkbpxprofileadminjsadminjs">trunk/bp-xprofile/admin/js/admin.js</a></li>
<li><a href="#trunkbpxprofilebpxprofileadminphp">trunk/bp-xprofile/bp-xprofile-admin.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbpxprofileadmincssadmincss"></a>
<div class="modfile"><h4>Modified: trunk/bp-xprofile/admin/css/admin.css (2798 => 2799)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-xprofile/admin/css/admin.css        2010-03-03 06:53:59 UTC (rev 2798)
+++ trunk/bp-xprofile/admin/css/admin.css        2010-03-03 09:28:01 UTC (rev 2799)
</span><span class="lines">@@ -1,36 +1,33 @@
</span><del>-
-div.sortable {
-        margin-bottom: 20px;
-}
-
</del><ins>+/* Profile field group main admin page */
</ins><span class="cx"> table.field-group {
</span><span class="cx">         margin-bottom: 20px;
</span><del>-}
-table.field-group.ui-sortable-helper {
-        filter: alpha(opacity=50);
-        opacity: 0.5;
-}
-table.field-group.ui-sortable-placeholder {
-        border: 2px dashed #ddd;
-        visibility: visible !important;
-        margin-bottom: 22px;
-        background-color: transparent;
-}
-
-table.field-group thead tr.grabber {
-        cursor: move;
-}
-
-table.field-group tbody {
-        cursor: move;
-}
</del><ins>+        background-color: #fafafa;
+        }
+        table.field-group.ui-sortable-placeholder {
+                border: 2px dashed #ddd;
+                visibility: visible !important;
+                background-color: transparent;
+                width: 100%;
+                margin-bottom: 20px;
+        }
+        table.field-group thead tr.grabber,
+        table.field-group tbody {
+                cursor: move;
+        }
</ins><span class="cx">         table.field-group tbody tr.nodrag {
</span><span class="cx">                 cursor: default !important;
</span><span class="cx">         }
</span><del>-
-table.field-group tbody tr:hover {
-        background-color: #fffee9;
-}
</del><ins>+        table.field-group tbody tr.ui-sortable-placeholder {
+                visibility: visible !important;
+                display: block !important;
+                background-color: #fafafa;
+        }
+        table.field-group td {
+                background-color: #fff;
+        }
+        table.field-group tbody tr:hover td {
+                background-color: #fffee9;
+        }
</ins><span class="cx">         
</span><span class="cx"> tr.header td {
</span><span class="cx">         border-bottom: 2px solid #eee;
</span><span class="lines">@@ -42,7 +39,7 @@
</span><span class="cx"> thead tr th {
</span><span class="cx">         font-size: 16px;
</span><span class="cx"> }
</span><del>-        
</del><ins>+
</ins><span class="cx">         ul.forTab {
</span><span class="cx">                 list-style: none;
</span><span class="cx">                 padding: 0;
</span><span class="lines">@@ -54,7 +51,6 @@
</span><span class="cx">         
</span><span class="cx">                         ul.forTab li label {
</span><span class="cx">                                 display: block;
</span><del>-                                
</del><span class="cx">                         }
</span><span class="cx">         
</span><span class="cx">                         ul.forTab li input {
</span><span class="lines">@@ -77,23 +73,23 @@
</span><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         select.multi-select{
</span><del>-         width:90%;
-         height:10em !important;
</del><ins>+                width:90%;
+                height:10em !important;
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx"> ul.multi-checkbox {
</span><del>- margin: 0 5px 0 0px;
- padding: .5em .9em;
- height: 10em;
- overflow: auto;
- list-style: none;
- border: solid 1px #ccc;
- width:90%;
</del><ins>+        margin: 0 5px 0 0px;
+        padding: .5em .9em;
+        height: 10em;
+        overflow: auto;
+        list-style: none;
+        border: solid 1px #ccc;
+        width: 90%;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> ul.multi-checkbox li{
</span><del>- padding: 0;
- margin: 0;
</del><ins>+        padding: 0;
+        margin: 0;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> div.options-box {
</span></span></pre></div>
<a id="trunkbpxprofileadminjsadminjs"></a>
<div class="modfile"><h4>Modified: trunk/bp-xprofile/admin/js/admin.js (2798 => 2799)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-xprofile/admin/js/admin.js        2010-03-03 06:53:59 UTC (rev 2798)
+++ trunk/bp-xprofile/admin/js/admin.js        2010-03-03 09:28:01 UTC (rev 2799)
</span><span class="lines">@@ -109,8 +109,10 @@
</span><span class="cx">                 cursor: 'move',
</span><span class="cx">                 axis: 'y',
</span><span class="cx">                 helper: fixHelper,
</span><del>-                distance: 1,
-                cancel: 'table.nodrag',
</del><ins>+                opacity: 0.6,
+                items: 'table',
+                cancel: 'tbody,tfoot',
+                tolerance: 'pointer',
</ins><span class="cx">                 update: function() {
</span><span class="cx">                         jQuery.post( ajaxurl, {
</span><span class="cx">                                 action: 'xprofile_reorder_groups',
</span><span class="lines">@@ -121,13 +123,17 @@
</span><span class="cx">                         function(response){});
</span><span class="cx">                 }
</span><span class="cx">         });
</span><ins>+        jQuery("form#profile-field-form div#field-groups").disableSelection();
</ins><span class="cx">
</span><span class="cx">         jQuery("table.field-group tbody").sortable( {
</span><span class="cx">                 cursor: 'move',
</span><span class="cx">                 axis: 'y',
</span><span class="cx">                 helper: fixHelper,
</span><del>-                distance: 1,
</del><ins>+                opacity: 0.6,
+                items: 'tr',
</ins><span class="cx">                 cancel: 'tr.nodrag',
</span><ins>+                connectWith: 'table.field-group tbody',
+                tolerance: 'pointer',
</ins><span class="cx">                 update: function() {
</span><span class="cx">                         jQuery.post( ajaxurl, {
</span><span class="cx">                                 action: 'xprofile_reorder_fields',
</span><span class="lines">@@ -138,4 +144,5 @@
</span><span class="cx">                         function(response){});
</span><span class="cx">                 }
</span><span class="cx">         });
</span><ins>+        jQuery("table.field-group tbody").disableSelection();
</ins><span class="cx"> } );
</span><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkbpxprofilebpxprofileadminphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-xprofile/bp-xprofile-admin.php (2798 => 2799)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-xprofile/bp-xprofile-admin.php        2010-03-03 06:53:59 UTC (rev 2798)
+++ trunk/bp-xprofile/bp-xprofile-admin.php        2010-03-03 09:28:01 UTC (rev 2799)
</span><span class="lines">@@ -66,7 +66,7 @@
</span><span class="cx">                                                 <table id="group_<?php echo $group->id;?>" class="widefat field-group sortable">
</span><span class="cx">                                                         <thead>
</span><span class="cx">                                                                 <tr class="grabber">
</span><del>-                                                                        <th scope="col" width="10">&nbsp;</th>
</del><ins>+                                                                        <th scope="col" width="10"><img src="<?php echo BP_PLUGIN_URL ?>/bp-xprofile/admin/images/move.gif" alt="<?php _e( 'Drag', 'buddypress' ) ?>" /></th>
</ins><span class="cx">                                                                         <th scope="col" colspan="<?php if ( $group->can_delete ) { ?>3<?php } else { ?>5<?php } ?>"><?php echo attribute_escape( $group->name ); ?></th>
</span><span class="cx"> <?php
</span><span class="cx">                                                                         if ( $group->can_delete ) :
</span></span></pre>
</div>
</div>
</body>
</html>