f1320cca by Kevin Burton

updating styling on merge users

1 parent 9833e4db
...@@ -474,4 +474,6 @@ input.dp-applied { ...@@ -474,4 +474,6 @@ input.dp-applied {
474 .cbv-report-list tbody td { text-align:left; font-size: 11px; word-wrap: normal; padding: 3px 5px; } 474 .cbv-report-list tbody td { text-align:left; font-size: 11px; word-wrap: normal; padding: 3px 5px; }
475 .cbv-report-list tbody tr.odd td { background-color: #f5f5f5; } 475 .cbv-report-list tbody tr.odd td { background-color: #f5f5f5; }
476 .cbv-report-list thead th { background-color: #e1e1e1;border-bottom:1px solid #e8e8e8; } 476 .cbv-report-list thead th { background-color: #e1e1e1;border-bottom:1px solid #e8e8e8; }
477 .cbv-report-list tbody td { border-bottom:1px solid #e8e8e8; min-width: 120px;}
...\ No newline at end of file ...\ No newline at end of file
477 .cbv-report-list tbody td { border-bottom:1px solid #e8e8e8; min-width: 120px;}
478
479 #user-list-from { display: block; }
......
...@@ -1012,7 +1012,7 @@ class Actions { ...@@ -1012,7 +1012,7 @@ class Actions {
1012 } 1012 }
1013 1013
1014 // Initialize 1014 // Initialize
1015 $html = '<table><thead><tr><th>First Name</th><th>Last Name</th><th>Member ID</th><th>Email</th></tr></thead><tbody>'; 1015 $html = '<table cellspacing="0" class="widefat post fixed merge-table" width="100%"><thead><tr><th>First Name</th><th>Last Name</th><th>Member ID</th><th>Email</th></tr></thead><tbody>';
1016 $i = 0; 1016 $i = 0;
1017 1017
1018 // Check for search term in first_name, last_name, user_login, and user_email, but only if user status is not 'terminated' 1018 // Check for search term in first_name, last_name, user_login, and user_email, but only if user status is not 'terminated'
...@@ -1044,7 +1044,7 @@ class Actions { ...@@ -1044,7 +1044,7 @@ class Actions {
1044 $html .= <<<HTML 1044 $html .= <<<HTML
1045 1045
1046 <tr> 1046 <tr>
1047 <td><input type="radio" name="merge_user_{$direction}" value="{$user['ID']}" />{$user['first_name']}</td> 1047 <td><input type="radio" name="merge_user_{$direction}" value="{$user['ID']}" />&nbsp;{$user['first_name']}</td>
1048 <td>{$user['last_name']}</td> 1048 <td>{$user['last_name']}</td>
1049 <td>{$user['member_id']}</td> 1049 <td>{$user['member_id']}</td>
1050 <td>{$user['user_email']}</td> 1050 <td>{$user['user_email']}</td>
...@@ -1152,7 +1152,7 @@ HTML; ...@@ -1152,7 +1152,7 @@ HTML;
1152 update_user_meta($to_user->ID, $key, $val); 1152 update_user_meta($to_user->ID, $key, $val);
1153 1153
1154 // Build a table of data 1154 // Build a table of data
1155 $html .= "\n\t<tr><td>$key: $val</td></tr>"; 1155 $html .= "\n\t<tr><td width='150'>$key</td><td>$val</td></tr>";
1156 } 1156 }
1157 if (! empty($from_user->user_email)) { 1157 if (! empty($from_user->user_email)) {
1158 // Transfer old user's profile preference email address (work, home, etc.) to new user's user_email field 1158 // Transfer old user's profile preference email address (work, home, etc.) to new user's user_email field
...@@ -1173,7 +1173,7 @@ HTML; ...@@ -1173,7 +1173,7 @@ HTML;
1173 update_user_meta($from_user->ID, 'merged_to', $to_user->ID); 1173 update_user_meta($from_user->ID, 'merged_to', $to_user->ID);
1174 update_user_meta($from_user->ID, 'datetime_merged', time()); 1174 update_user_meta($from_user->ID, 'datetime_merged', time());
1175 1175
1176 $html = '<thead><tr><th>Changed:</th></tr></thead><tbody>' . 1176 $html = '<thead><tr><th colspan="2">Merge successful. Here are all the changes:</th></tr></thead><tbody>' .
1177 $html . 1177 $html .
1178 '</tbody>'; 1178 '</tbody>';
1179 1179
......
...@@ -54,10 +54,7 @@ h4 { ...@@ -54,10 +54,7 @@ h4 {
54 } 54 }
55 55
56 .changed { 56 .changed {
57 float: left;
58 width: 250px;
59 margin-top: 5px; 57 margin-top: 5px;
60 border: 1px solid green;
61 clear: both; 58 clear: both;
62 display: none; 59 display: none;
63 } 60 }
...@@ -99,8 +96,8 @@ h4 { ...@@ -99,8 +96,8 @@ h4 {
99 <table cellspacing="0" class="widefat post fixed merge-table"> 96 <table cellspacing="0" class="widefat post fixed merge-table">
100 <thead> 97 <thead>
101 <tr> 98 <tr>
102 <th><label for="search_user_from">Merge <strong><em>FROM</em></strong> User:</label></th> 99 <th width="50%"><label for="search_user_from">Merge <strong><em>FROM</em></strong> User:</label></th>
103 <th><label for="search_user_to">Merge <strong><em>TO</em></strong> User:</label></th> 100 <th width="50%"><label for="search_user_to">Merge <strong><em>TO</em></strong> User:</label></th>
104 </tr> 101 </tr>
105 </thead> 102 </thead>
106 <tbody> 103 <tbody>
...@@ -108,24 +105,26 @@ h4 { ...@@ -108,24 +105,26 @@ h4 {
108 <td> 105 <td>
109 <div class="merge-users"> 106 <div class="merge-users">
110 <input class="clear" type="text" name="search_user_from" value="<?php echo $_POST['search_user_from'] ?>" /> 107 <input class="clear" type="text" name="search_user_from" value="<?php echo $_POST['search_user_from'] ?>" />
111 <input type="button" name="btn_user_from" value="Search" /> 108 <input type="button" name="btn_user_from" value="Search" />&nbsp;<img id="search_user_from_spinner" class="spinners" src="/wp-content/tz-tools/com/Branding/images/spinner.gif" style="display:none;" />
112 <div id="user-list-from"></div> 109
113 </div> 110 </div>
114 </td> 111 </td>
115 <td> 112 <td>
116 <div class="merge-users"> 113 <div class="merge-users">
117 <input class="clear" type="text" name="search_user_to" value="<?php echo $_POST['search_user_to'] ?>" /> 114 <input class="clear" type="text" name="search_user_to" value="<?php echo $_POST['search_user_to'] ?>" />
118 <input type="button" name="btn_user_to" value="Search" /> 115 <input type="button" name="btn_user_to" value="Search" />&nbsp;<img id="search_user_to_spinner" class="spinners" src="/wp-content/tz-tools/com/Branding/images/spinner.gif" style="display:none;" />
119 <div id="user-list-to"></div>
120 </div> 116 </div>
121 </td> 117 </td>
122 </tr> 118 </tr>
119 <tr>
120 <td><div id="user-list-from"></div></td>
121 <td><div id="user-list-to"></div></td>
122 </tr>
123 </tbody> 123 </tbody>
124 </table> 124 </table>
125 125
126 <div id="field-list" class="changed"> 126 <div id="field-list" class="changed">
127 <h6>Success!</h6> 127 <table cellspacing="0" class="widefat post fixed merge-table"></table>
128 <table></table>
129 </div> 128 </div>
130 129
131 <div style="clear:both;"></div> 130 <div style="clear:both;"></div>
...@@ -153,14 +152,18 @@ var $form = $('#admin-search-merge-form'); ...@@ -153,14 +152,18 @@ var $form = $('#admin-search-merge-form');
153 var $field_list = $('#field-list'); 152 var $field_list = $('#field-list');
154 var $error_container = $('.validation-errors'); 153 var $error_container = $('.validation-errors');
155 154
155 var $from_spinner = $('#search_user_from_spinner');
156 var $to_spinner = $('#search_user_to_spinner');
156 157
157 $('[name=btn_user_from]').click(function() { 158 $('[name=btn_user_from]').click(function() {
159 $from_spinner.show();
158 $which_user_search.val("from"); 160 $which_user_search.val("from");
159 $do_search.val("yes"); 161 $do_search.val("yes");
160 $form.submit(); 162 $form.submit();
161 }); 163 });
162 164
163 $('[name=btn_user_to]').click(function() { 165 $('[name=btn_user_to]').click(function() {
166 $to_spinner.show();
164 $which_user_search.val("to"); 167 $which_user_search.val("to");
165 $do_search.val("yes"); 168 $do_search.val("yes");
166 $form.submit(); 169 $form.submit();
...@@ -183,6 +186,7 @@ $(function() { ...@@ -183,6 +186,7 @@ $(function() {
183 type: 'post', 186 type: 'post',
184 data: ({ajax:"yes", action: 'admin_search_merge_users'}), 187 data: ({ajax:"yes", action: 'admin_search_merge_users'}),
185 success: function(data) { 188 success: function(data) {
189 $('.spinners').hide();
186 if (data.success == "false") { 190 if (data.success == "false") {
187 $('h6', $error_container).html("OOPS..."); 191 $('h6', $error_container).html("OOPS...");
188 $('ul', $error_container).html(data.msg); 192 $('ul', $error_container).html(data.msg);
......