Merge lp:~guiona/bilboplanet/669551 into lp:~greg-theclimber/bilboplanet/testing

Proposed by Gregoire de Hemptinne
Status: Merged
Merged at revision: 154
Proposed branch: lp:~guiona/bilboplanet/669551
Merge into: lp:~greg-theclimber/bilboplanet/testing
Diff against target: 1146 lines (+322/-126) (has conflicts)
21 files modified
admin/api/manage-account_api.php (+5/-8)
admin/api/manage-feed_api.php (+10/-9)
admin/api/manage-moderation_api.php (+7/-5)
admin/api/manage-option_api.php (+10/-13)
admin/api/manage-permissions_api.php (+6/-6)
admin/api/manage-site_api.php (+10/-10)
admin/api/manage-user_api.php (+13/-11)
admin/manage-cache.php (+8/-1)
admin/manage-feed.php (+1/-1)
admin/manage-newsletter.php (+20/-10)
admin/manage-post.php (+10/-1)
admin/manage-useroption.php (+34/-13)
admin/meta/css/styles.css (+57/-0)
admin/meta/js/jquery.bilboplanet.js (+31/-1)
admin/meta/js/jquery.bilboplanet.min.js (+1/-1)
admin/meta/js/manage-account.js (+2/-1)
admin/meta/js/manage-feed.js (+39/-12)
admin/meta/js/manage-moderation.js (+4/-2)
admin/meta/js/manage-option.js (+1/-1)
admin/meta/js/manage-permissions.js (+6/-3)
admin/meta/js/manage-user.js (+47/-17)
Text conflict in admin/meta/js/manage-feed.js
Text conflict in admin/meta/js/manage-user.js
To merge this branch: bzr merge lp:~guiona/bilboplanet/669551
Reviewer Review Type Date Requested Status
Gregoire de Hemptinne Pending
Review via email: mp+44194@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'admin/api/manage-account_api.php'
2--- admin/api/manage-account_api.php 2010-10-28 21:43:47 +0000
3+++ admin/api/manage-account_api.php 2010-12-20 07:46:53 +0000
4@@ -33,11 +33,8 @@
5 $user_id = $core->auth->userID();
6 $user = $core->con->select("SELECT * FROM ".$core->prefix."user WHERE user_id = '$user_id'");
7
8- $new_fullname = !empty($_POST['efullname']) ? $_POST['efullname'] : $user->f('user_fullname');
9- $new_email = !empty($_POST['eemail']) ? $_POST['eemail'] : $user->f('user_email');
10-
11- $new_fullname = check_field('fullname',$new_fullname);
12- $new_email = check_field('email',$new_email,'email');
13+ $new_fullname = check_field(T_('Fullname'), trim($_POST['efullname']));
14+ $new_email = check_field(T_('Email'), trim($_POST['eemail']), 'email');
15 $new_password = check_field('password', array("password" => trim($_POST['password']), "password2" => trim($_POST['password2'])), 'password', false);
16
17 $error = array();
18@@ -92,10 +89,10 @@
19 $output .= "<li>".$value."</li>";
20 }
21 $output .= "</ul>";
22- print '<div class="flash error">'.$output.'</div>';
23+ print '<div class="flash_error">'.$output.'</div>';
24 }
25 else {
26- print '<div class="flash notice">'.$output.'</div>';
27+ print '<div class="flash_notice">'.$output.'</div>';
28 }
29 break;
30
31@@ -104,7 +101,7 @@
32 # DEFAULT RETURN
33 ##########################################################
34 default:
35- print '<div class="flash error">'.T_('User bad call').'</div>';
36+ print '<div class="flash_error">'.T_('User bad call').'</div>';
37 break;
38 }
39 } else {
40
41=== modified file 'admin/api/manage-feed_api.php'
42--- admin/api/manage-feed_api.php 2010-11-15 10:08:04 +0000
43+++ admin/api/manage-feed_api.php 2010-12-20 07:46:53 +0000
44@@ -136,10 +136,10 @@
45 $output .= "<li>".$value."</li>";
46 }
47 $output .= "</ul>";
48- print '<div class="flash error">'.$output.'</div>';
49+ print '<div class="flash_error">'.$output.'</div>';
50 }
51 else {
52- print '<div class="flash notice">'.$output.'</div>';
53+ print '<div class="flash_notice">'.$output.'</div>';
54 }
55 break;
56
57@@ -196,10 +196,10 @@
58 $output .= "<li>".$value."</li>";
59 }
60 $output .= "</ul>";
61- print '<div class="flash error">'.$output.'</div>';
62+ print '<div class="flash_error">'.$output.'</div>';
63 }
64 else {
65- print '<div class="flash notice">'.$output.'</div>';
66+ print '<div class="flash_notice">'.$output.'</div>';
67 }
68 break;
69
70@@ -218,7 +218,7 @@
71 }
72 $cur->update("WHERE feed_id = '$feed_id'");
73
74- print '<div class="flash notice">'.T_('Feed status toggled').'</div>';
75+ print '<div class="flash_notice">'.T_('Feed status toggled').'</div>';
76 break;
77
78 ##########################################################
79@@ -236,7 +236,7 @@
80 }
81 $cur->update("WHERE feed_id = '$feed_id'");
82
83- print '<div class="flash notice">'.T_('Feed trust changed').'</div>';
84+ print '<div class="flash_notice">'.T_('Feed trust changed').'</div>';
85 break;
86
87 ##########################################################
88@@ -253,19 +253,20 @@
89 $confirmation .= "<form id='removeFeedConfirm_form'><input type='hidden' name='feed_id' value='".$feed_id."'/>";
90 $confirmation .= "<div class='button br3px'><input class='notvalide' type='button' onclick=\"javascript:$('#flash-msg').html('')\" value='".T_('Reset')."'/></div>&nbsp;&nbsp;";
91 $confirmation .= "<div class='button br3px'><input class='valide' type='submit' name='confirm' value='".T_('Confirm')."'/></div></form></p>";
92- print '<div class="flash error">'.$confirmation.'</div>';
93+ print '<div class="flash_warning">'.$confirmation.'</div>';
94 break;
95
96 ##########################################################
97 # CONFIRM REMOVE FEED
98 ##########################################################
99 case 'removeConfirm':
100+ sleep(1);
101 $feed_id = trim($_POST['feed_id']);
102 $rs2 = $core->con->select("SELECT * FROM ".$core->prefix."feed WHERE feed_id = '$feed_id'");
103 $core->con->execute("DELETE FROM ".$core->prefix."post WHERE feed_id ='$feed_id'");
104 $core->con->execute("DELETE FROM ".$core->prefix."feed WHERE feed_id ='$feed_id'");
105
106- print '<div class="flash notice">'.sprintf(T_("Delete of feed %s succeeded"),$rs2->f('feed_url')).'</div>';
107+ print '<div class="flash_notice">'.sprintf(T_("Delete of feed %s succeeded"),$rs2->f('feed_url')).'</div>';
108 break;
109
110 ##########################################################
111@@ -328,7 +329,7 @@
112 break;
113
114 default:
115- print '<div class="flash error">'.T_('User bad call').'</div>';
116+ print '<div class="flash_error">'.T_('User bad call').'</div>';
117 break;
118 }
119 } else {
120
121=== modified file 'admin/api/manage-moderation_api.php'
122--- admin/api/manage-moderation_api.php 2010-10-28 21:43:47 +0000
123+++ admin/api/manage-moderation_api.php 2010-12-20 07:46:53 +0000
124@@ -54,10 +54,10 @@
125 $output .= "<li>".$value."</li>";
126 }
127 $output .= "</ul>";
128- print '<div class="flash error">'.$output.'</div>';
129+ print '<div class="flash_error">'.$output.'</div>';
130 }
131 else {
132- print '<div class="flash notice">'.$output.'</div>';
133+ print '<div class="flash_notice">'.$output.'</div>';
134 }
135 break;
136
137@@ -94,6 +94,8 @@
138 }
139 }
140 }
141+
142+ sleep (2);
143
144 if (!empty($error)) {
145 $output .= "<ul>";
146@@ -101,10 +103,10 @@
147 $output .= "<li>".$value."</li>";
148 }
149 $output .= "</ul>";
150- print '<div class="flash error">'.$output.'</div>';
151+ print '<div class="flash_error">'.$output.'</div>';
152 }
153 else {
154- print '<div class="flash notice">'.$output.'</div>';
155+ print '<div class="flash_notice">'.$output.'</div>';
156 }
157 break;
158
159@@ -193,7 +195,7 @@
160 break;
161
162 default:
163- print '<div class="flash error">'.T_('User bad call').'</div>';
164+ print '<div class="flash_warning">'.T_('User bad call').'</div>';
165 break;
166 }
167 } else {
168
169=== modified file 'admin/api/manage-option_api.php' (properties changed: +x to -x)
170--- admin/api/manage-option_api.php 2010-11-28 18:41:24 +0000
171+++ admin/api/manage-option_api.php 2010-12-20 07:46:53 +0000
172@@ -121,22 +121,17 @@
173 $flash[] = array('type' => 'error', 'msg' => T_("Only numeric value are allowed for number of posts by page"));
174 }
175
176- if (isset($_POST['subscription'])) {
177+ if (isset($_POST['subscription']) && !empty($_POST['subscription_content'])) {
178 $blog_settings->put('planet_subscription', '1', "boolean");
179- }
180- else {
181- $blog_settings->put('planet_subscription', '0', "boolean");
182- }
183-
184- if(!empty($_POST['subscription_content'])) {
185 $subscription_content = htmlentities(stripslashes(trim($_POST['subscription_content'])), ENT_QUOTES, 'UTF-8');
186 $blog_settings->put('planet_subscription_content', $subscription_content, "string");
187 }
188- else {
189+ elseif (isset($_POST['subscription']) && empty($_POST['subscription_content'])){
190 $flash[] = array('type' => 'error', 'msg' => T_("Subscription page content can not be empty"));
191 }
192-
193- sleep (2);
194+ else {
195+ $blog_settings->put('planet_subscription', '0', "boolean");
196+ }
197
198 if (!empty($flash)) {
199 $output = '<ul>';
200@@ -144,11 +139,11 @@
201 $output .= "<li>".$value['msg']."</li>";
202 }
203 $output .= '</ul>';
204- print '<div class="flash error">'.$output.'</div>';
205+ print '<div class="flash_error">'.$output.'</div>';
206 }
207 else {
208 $output = T_("Modification succeeded");
209- print '<div class="flash notice">'.$output.'</div>';
210+ print '<div class="flash_notice">'.$output.'</div>';
211 }
212 break;
213 ######################################
214@@ -179,6 +174,7 @@
215 $nb_posts_page = $blog_settings->get('planet_nb_post');
216 $subscription = $blog_settings->get('planet_subscription');
217 $subscription_content = html_entity_decode(stripslashes($blog_settings->get('planet_subscription_content')), ENT_QUOTES, 'UTF-8');
218+ #$subscription_content = html_encode_code_tags($subscription_content);
219
220 # Build an array of available theme
221 $theme_path = dirname(__FILE__)."/../../themes/";
222@@ -412,6 +408,7 @@
223 $nb_posts_page = $blog_settings->get('planet_nb_post');
224 $subscription = $blog_settings->get('planet_subscription');
225 $subscription_content = html_entity_decode(stripslashes($blog_settings->get('planet_subscription_content')), ENT_QUOTES, 'UTF-8');
226+ $subscription_content = html_encode_code_tags($subscription_content);
227
228 $output = "";
229 $output .= '<table id="tbl1" class="table-news">
230@@ -527,6 +524,6 @@
231 }
232 else {
233 $output = T_("Nothing to do");
234- print '<div class="flash notice">'.$output.'</div>';
235+ print '<div class="flash_warning">'.$output.'</div>';
236 }
237 ?>
238
239=== modified file 'admin/api/manage-permissions_api.php'
240--- admin/api/manage-permissions_api.php 2010-10-28 21:43:47 +0000
241+++ admin/api/manage-permissions_api.php 2010-12-20 07:46:53 +0000
242@@ -33,15 +33,15 @@
243 $user_id = urldecode(trim($_POST['user_id']));
244 $user_role = trim($_POST['user_role']);
245 if ($user_id == $core->auth->userID()) {
246- print '<div class="flash error">'.T_('Impossible to change your own role').'</div>';
247+ print '<div class="flash_error">'.T_('Impossible to change your own role').'</div>';
248 }
249 else {
250 if (!empty($user_role)) {
251 $core->setUserRole($user_id, $user_role);
252- print '<div class="flash notice">'.sprintf(T_('User %s is now know as %s'), $user_id, $user_role).'</div>';
253+ print '<div class="flash_notice">'.sprintf(T_('User %s is now know as %s'), $user_id, $user_role).'</div>';
254 }
255 else {
256- print '<div class="flash error">'.T_('There was a problem during toggling user role').'</div>';
257+ print '<div class="flash_error">'.T_('There was a problem during toggling user role').'</div>';
258 }
259 }
260 break;
261@@ -67,11 +67,11 @@
262 }
263
264 if ($user_id == $core->auth->userID()) {
265- print '<div class="flash error">'.T_('Impossible to change your own role').'</div>';
266+ print '<div class="flash_error">'.T_('Impossible to change your own role').'</div>';
267 }
268 else {
269 $core->setUserPermissions($user_id, $manager_perm);
270- print '<div class="flash notice">'.sprintf(T_('User %s has new permissions : %s'), $user_id, '('.implode(',',$manager_perm).')').'</div>';
271+ print '<div class="flash_notice">'.sprintf(T_('User %s has new permissions : %s'), $user_id, '('.implode(',',$manager_perm).')').'</div>';
272 }
273 break;
274
275@@ -184,7 +184,7 @@
276 # DEFAULT RETURN
277 ##########################################################
278 default:
279- print '<div class="flash error">'.T_('User bad call').'</div>';
280+ print '<div class="flash_error">'.T_('User bad call').'</div>';
281 break;
282 }
283 } else {
284
285=== modified file 'admin/api/manage-site_api.php'
286--- admin/api/manage-site_api.php 2010-11-09 14:38:13 +0000
287+++ admin/api/manage-site_api.php 2010-12-20 07:46:53 +0000
288@@ -96,10 +96,10 @@
289 $output .= "<li>".$value."</li>";
290 }
291 $output .= "</ul>";
292- print '<div class="flash error">'.$output.'</div>';
293+ print '<div class="flash_error">'.$output.'</div>';
294 }
295 else {
296- print '<div class="flash notice">'.$output.'</div>';
297+ print '<div class="flash_notice">'.$output.'</div>';
298 }
299 break;
300
301@@ -172,7 +172,7 @@
302 }
303 $cur->update("WHERE site_id = '$site_id'");
304
305- print '<div class="flash notice">'.T_('Site status toggled').'</div>';
306+ print '<div class="flash_notice">'.T_('Site status toggled').'</div>';
307 break;
308
309 ##########################################################
310@@ -186,16 +186,17 @@
311 $confirmation .= "<ul><li>".T_('This action can not be canceled')."</li>";
312 $confirmation .= "<li>".T_('All the posts comming from this site will be removed')."</li>";
313 $confirmation .= "<li>".T_('All the feeds of this site will be removed')."</li></ul><br/>";
314- $confirmation .= "<form id='removeSiteConfirm_form'><input type='hidden' name='site_id' value='".$site_id."'/>";
315- $confirmation .= "<div class='button br3px'><input class='reset' type='button' onclick=\"javascript:$('#flash-msg').html('')\" value='".T_('Reset')."'/></div>&nbsp;&nbsp;";
316+ $confirmation .= "<form id='removeSiteConfirm_form' method='POST'><input type='hidden' name='site_id' value='".$site_id."'/>";
317+ $confirmation .= "<div class='button br3px'><input class='reset' type='button' value='".T_('Reset')."'/></div>&nbsp;&nbsp;";
318 $confirmation .= "<div class='button br3px'><input class='valide' type='submit' name='confirm' value='".T_('Confirm')."'/></div></form></p>";
319- print '<div class="flash error">'.$confirmation.'</div>';
320+ print '<div class="flash_warning">'.$confirmation.'</div>';
321 break;
322
323 ##########################################################
324-# CONFIRM REMOVE USER
325+# CONFIRM REMOVE SITE
326 ##########################################################
327 case 'removeConfirm':
328+ sleep(1);
329 $site_id = trim($_POST['site_id']);
330 $rs2 = $core->con->select("SELECT * FROM ".$core->prefix."site WHERE site_id = '$site_id'");
331 $rs = $core->con->select("SELECT feed_id FROM ".$core->prefix."feed WHERE site_id = '$site_id'");
332@@ -204,8 +205,7 @@
333 $core->con->execute("DELETE FROM ".$core->prefix."feed WHERE feed_id ='$rs->feed_id'");
334 }
335 $core->con->execute("DELETE FROM ".$core->prefix."site WHERE site_id ='$site_id'");
336-
337- print '<div class="flash notice">'.sprintf(T_("Delete of site %s succeeded"),$rs2->f('site_url')).'</div>';
338+ print '<div class="flash_notice">'.sprintf(T_("Delete of site %s succeeded"),$rs2->f('site_url')).'</div>';
339 break;
340
341 ##########################################################
342@@ -224,7 +224,7 @@
343 break;
344
345 default:
346- print '<div class="flash error">'.T_('User bad call').'</div>';
347+ print '<div class="flash_error">'.T_('User bad call').'</div>';
348 break;
349 }
350 } else {
351
352=== modified file 'admin/api/manage-user_api.php'
353--- admin/api/manage-user_api.php 2010-11-09 14:38:13 +0000
354+++ admin/api/manage-user_api.php 2010-12-20 07:46:53 +0000
355@@ -168,10 +168,10 @@
356 $output .= "<li>".$value."</li>";
357 }
358 $output .= "</ul>";
359- print '<div class="flash error">'.$output.'</div>';
360+ print '<div class="flash_error">'.$output.'</div>';
361 }
362 else {
363- print '<div class="flash notice">'.$output.'</div>';
364+ print '<div class="flash_notice">'.$output.'</div>';
365 }
366 break;
367
368@@ -190,7 +190,7 @@
369 }
370 $cur->update("WHERE user_id = '$user_id'");
371
372- print '<div class="flash notice">'.T_('User status toggled').'</div>';
373+ print '<div class="flash_notice">'.T_('User status toggled').'</div>';
374 break;
375
376 ##########################################################
377@@ -259,10 +259,10 @@
378 $output .= "<li>".$value."</li>";
379 }
380 $output .= "</ul>";
381- print '<div class="flash error">'.$output.'</div>';
382+ print '<div class="flash_error">'.$output.'</div>';
383 }
384 else {
385- print '<div class="flash notice">'.$output.'</div>';
386+ print '<div class="flash_notice">'.$output.'</div>';
387 }
388 break;
389
390@@ -273,7 +273,7 @@
391 $user_id = urldecode(trim($_POST['user_id']));
392 $user_perms = $core->getUserRolePermissions($user_id);
393 if ($user_perms->{'role'} == "god") {
394- print '<div class="flash error">'.T_('You are not allowed to remove a super user').'</div>';
395+ print '<div class="flash_error">'.T_('You are not allowed to remove a super user').'</div>';
396 }
397 else {
398 $user = $core->con->select("SELECT user_fullname as fullname FROM ".$core->prefix."user WHERE user_id = '$user_id'");
399@@ -283,9 +283,9 @@
400 $confirmation .= "<li>".T_('All the votes on these posts will be removed')."</li>";
401 $confirmation .= "<li>".T_('All the feeds of this user will be removed')."</li></ul><br/>";
402 $confirmation .= "<form id='removeConfirm_form'><input type='hidden' name='user_id' value='".urlencode($user_id)."'/>";
403- $confirmation .= "<div class='button br3px'><input type='reset' class='reset' onclick=\"javascript:$('#flash-msg').html('')\" value='".T_('Reset')."'/></div>&nbsp;&nbsp;";
404+ $confirmation .= "<div class='button br3px'><input type='button' class='reset' value='".T_('Reset')."'/></div>&nbsp;&nbsp;";
405 $confirmation .= "<div class='button br3px'><input type='submit' class='valide' name='confirm' value='".T_('Confirm')."'/></div></form></p>";
406- print '<div class="flash error">'.$confirmation.'</div>';
407+ print '<div class="flash_warning">'.$confirmation.'</div>';
408 }
409 break;
410
411@@ -293,10 +293,11 @@
412 # CONFIRM REMOVE USER
413 ##########################################################
414 case 'removeConfirm':
415+ sleep(1);
416 $user_id = urldecode(trim($_POST['user_id']));
417 $user_perms = $core->getUserRolePermissions($user_id);
418 if ($user_perms->{'role'} == "god") {
419- print '<div class="flash error">'.T_('You are not allowed to remove a super user').'</div>';
420+ print '<div class="flash_error">'.T_('You are not allowed to remove a super user').'</div>';
421 }
422 else {
423 $user = $core->con->select("SELECT user_fullname as fullname FROM ".$core->prefix."user WHERE user_id = '$user_id'");
424@@ -309,7 +310,8 @@
425 $core->con->execute("DELETE FROM ".$core->prefix."site WHERE user_id ='$user_id'");
426 $core->con->execute("DELETE FROM ".$core->prefix."permissions WHERE user_id = '$user_id'");
427 $core->con->execute("DELETE FROM ".$core->prefix."user WHERE user_id = '$user_id'");
428- print '<div class="flash notice">'.sprintf(T_("Delete of user %s succeeded"),$user->f('fullname')).'</div>';
429+
430+ print '<div class="flash_notice">'.sprintf(T_("Delete of user %s succeeded"),$user->f('fullname')).'</div>';
431 }
432 break;
433
434@@ -377,7 +379,7 @@
435 # DEFAULT RETURN
436 ##########################################################
437 default:
438- print '<div class="flash error">'.T_('User bad call').'</div>';
439+ print '<div class="flash_error">'.T_('User bad call').'</div>';
440 break;
441 }
442 } else {
443
444=== modified file 'admin/manage-cache.php'
445--- admin/manage-cache.php 2010-10-28 21:43:47 +0000
446+++ admin/manage-cache.php 2010-12-20 07:46:53 +0000
447@@ -60,7 +60,14 @@
448 echo '<div id="BP_page" class="page">
449 <div class="inpage">';
450
451-if (!empty($flash)) echo '<div class="flash notice">'.$flash.'</div>';
452+if (!empty($flash)) {
453+ echo '<script type="text/javascript">
454+ $(document).ready(function() {
455+ var msg = "<div class=\"flash_notice\">'.$flash.'</div>";
456+ $(msg).flashmsg();
457+ });
458+</script>';
459+}
460
461 echo '<fieldset><legend>'.T_('Manage cache').'</legend>
462 <div class="message">
463
464=== modified file 'admin/manage-feed.php'
465--- admin/manage-feed.php 2010-11-15 14:11:42 +0000
466+++ admin/manage-feed.php 2010-12-20 07:46:53 +0000
467@@ -140,7 +140,7 @@
468 }
469
470 echo
471-'<div class="button br3px"><input type="reset" class="reset" name="reset" onClick="this.form.reset()" value="'.T_('Reset').'"></div>&nbsp;&nbsp;'.
472+'<div class="button br3px"><input type="reset" class="reset" name="reset" value="'.T_('Reset').'"></div>&nbsp;&nbsp;'.
473 '<div class="button br3px"><input type="submit" name="add_feed" class="valide" value="'.T_('Add').'" /></div>'.
474 '<div class="button br3px close-button"><a class="close" onclick="javascript:closeAdd()">'.T_('Close').'</a></div>'.
475 '</form>';
476
477=== modified file 'admin/manage-newsletter.php'
478--- admin/manage-newsletter.php 2010-10-28 21:43:47 +0000
479+++ admin/manage-newsletter.php 2010-12-20 07:46:53 +0000
480@@ -104,23 +104,23 @@
481 $confirmation .= '<input type="hidden" name="subject" value="'.htmlspecialchars($subject['value']).'" />';
482 $confirmation .= '<input type="hidden" name="message" value="'.htmlspecialchars($message['value']).'" />';
483 $confirmation .= '&nbsp;&nbsp;<input type="submit" class="button br3px" name="confirmSubmit" value="'.T_('Yes').'" />';
484- $confirmation .= '&nbsp;&nbsp;<input type="submit" class="button br3px" name="reset" value="'.T_('No').'" />';
485+ $confirmation .= '&nbsp;&nbsp;<input type="button" class="button br3px" name="reset" value="'.T_('No').'" />';
486 $confirmation .= '</form>';
487 $confirmation .= '</p>';
488- $flash[] = array('type' => 'notice', 'msg' => $confirmation);
489+ $flash['warning'][] = addslashes($confirmation);
490 }
491 else {
492 if(!$sender['success']) {
493- $flash[] = array('type' => 'error', 'msg' => $sender['error']);
494+ $flash['error'][] = htmlspecialchars($sender['error']);
495 }
496 if(!$recipients['success']) {
497- $flash[] = array('type' => 'error', 'msg' => $recipients['error']);
498+ $flash['error'][] = htmlspecialchars($recipients['error']);
499 }
500 if(!$subject['success']) {
501- $flash[] = array('type' => 'error', 'msg' => $subject['error']);
502+ $flash['error'][] = htmlspecialchars($subject['error']);
503 }
504 if(!$message['success']) {
505- $flash[] = array('type' => 'error', 'msg' => $message['error']);
506+ $flash['error'][] = htmlspecialchars($message['error']);
507 }
508 }
509 }
510@@ -129,9 +129,9 @@
511 if(isset($_POST) && isset($_POST['confirmSubmit'])) {
512 $envoi = sendmail($_POST['sender'], $_POST['recipients'], $_POST['subject'], $_POST['message'], 'newsletter');
513 if($envoi) {
514- $flash[] = array('type' => 'notice', 'msg' => T_("Your email has been sent"));
515+ $flash['notice'][] = T_("Your email has been sent");
516 } else {
517- $flash[] = array('type' => 'error', 'msg' => T_("Your request could not be sent for an unknown reason.<br/>Please try again."));
518+ $flash['error'][] = T_("Your request could not be sent for an unknown reason.<br/>Please try again.");
519 }
520 }
521
522@@ -187,9 +187,19 @@
523 <div class="inpage">
524 <?php
525 if (!empty($flash)) {
526- foreach ($flash as $value) {
527- echo '<div class="flash '.$value['type'].'">'.$value['msg'].'</div>';
528+ $msg = '<ul>';
529+ foreach(array_keys($flash) as $key => $msg_type) {
530+ foreach(array_keys($flash[$msg_type]) as $key_msg) {
531+ $msg .= '<li>'.$flash[$msg_type][$key_msg].'</li>';
532+ }
533 }
534+ $msg .= '</ul>';
535+ echo '<script type="text/javascript">
536+ $(document).ready(function() {
537+ var msg = "<div class=\"flash_'.$msg_type.'\">'.$msg.'</div>";
538+ $(msg).flashmsg();
539+ });
540+</script>';
541 }
542 ?>
543 <form name="newsletter_form" id="newsletter_form" method="POST">
544
545=== modified file 'admin/manage-post.php'
546--- admin/manage-post.php 2010-10-28 21:43:47 +0000
547+++ admin/manage-post.php 2010-12-20 07:46:53 +0000
548@@ -110,7 +110,16 @@
549 <div id="BP_page" class="page">
550 <div class="inpage">
551
552-<?php if (!empty($flash)) echo '<div class="flash '.$flash['type'].'">'.$flash['msg'].'</div>';?>
553+<?php
554+if (!empty($flash)) {
555+ echo '<script type="text/javascript">
556+ $(document).ready(function() {
557+ var msg = "<div class=\"flash_'.$flash['type'].'\">'.$flash['msg'].'</div>";
558+ $(msg).flashmsg();
559+ });
560+</script>';
561+}
562+?>
563
564 <fieldset><legend><?php echo T_('Filtering of the posts');?></legend>
565 <div class="message">
566
567=== modified file 'admin/manage-useroption.php'
568--- admin/manage-useroption.php 2010-10-28 21:43:47 +0000
569+++ admin/manage-useroption.php 2010-12-20 07:46:53 +0000
570@@ -35,36 +35,43 @@
571 }
572
573 $email = $planet_author_mail = $blog_settings->get('author_mail');
574+$url = $planet_author_site = $blog_settings->get('author_site');
575 $planet_author = $blog_settings->get('author');
576-$planet_author_site = $blog_settings->get('author_site');
577 $planet_author_jabber = $blog_settings->get('author_jabber');
578 $planet_author_im = $blog_settings->get('author_im');
579-$planet_author_about=$blog_settings->get('author_about');
580-$flash='';
581+$planet_author_about = $blog_settings->get('author_about');
582+$flash = array();
583
584 # On verifie que le formulaire est bien saisie
585 if(isset($_POST) && isset($_POST['submit'])) {
586 # On recupere les infos
587 $email = check_field('email',trim($_POST['email']),'email');
588+ $url = check_field('url',trim($_POST['url']), 'url');
589 $planet_author = trim($_POST['planet_author']);
590- $planet_author_site = trim($_POST['planet_author_site']);
591 $planet_author_jabber = trim($_POST['planet_author_jabber']);
592 $planet_author_im = trim($_POST['planet_author_im']);
593 $planet_author_about = htmlentities(trim($_POST['planet_author_about']));
594
595- if ($email['success']){
596+ if ($email['success'] && $url['success']){
597 $email = $email['value'];
598+ $url = $url['value'];
599 $blog_settings->put('author', $planet_author, "string");
600 $blog_settings->put('author_mail', $email, "string");
601- $blog_settings->put('author_site', $planet_author_site, "string");
602+ $blog_settings->put('author_site', $url, "string");
603 $blog_settings->put('author_jabber', $planet_author_jabber, "string");
604 $blog_settings->put('author_im', $planet_author_im, "string");
605 $blog_settings->put('author_about', $planet_author_about, "string");
606- $flash = array('type' => 'notice', 'msg' => T_("Modification succeeded"));
607+ $flash['notice'][] = T_("Modification succeeded");
608 }
609 else {
610- $email = $planet_author_mail;
611- $flash = array('type' => 'error', 'msg' => T_("Please insert a valid email address"));
612+ if(!$email['success']) {
613+ $flash['error'][] = htmlspecialchars(sprintf(T_('The field "%s" has to be a valid email address'),T_('Reference contact email')));
614+ $email = $planet_author_mail;
615+ }
616+ if(!$url['success']) {
617+ $flash['error'][] = htmlspecialchars(sprintf(T_('The field "%s" %s has to be a valid URL'),T_('Author website'),$url['value']));
618+ $url = $planet_author_site;
619+ }
620 }
621 }
622
623@@ -74,9 +81,23 @@
624
625 <div id="BP_page" class="page">
626 <div class="inpage">
627-
628-<?php if (!empty($flash)) echo '<div class="flash '.$flash['type'].'">'.$flash['msg'].'</div>'; ?>
629-
630+ <?php
631+ if (!empty($flash)) {
632+ $msg = '<ul>';
633+ foreach(array_keys($flash) as $key => $msg_type) {
634+ foreach(array_keys($flash[$msg_type]) as $key_msg) {
635+ $msg .= '<li>'.$flash[$msg_type][$key_msg].'</li>';
636+ }
637+ }
638+ $msg .= '</ul>';
639+ echo '<script type="text/javascript">
640+ $(document).ready(function() {
641+ var msg = "<div class=\"flash_'.$msg_type.'\">'.$msg.'</div>";
642+ $(msg).flashmsg();
643+ });
644+</script>';
645+ }
646+ ?>
647 <fieldset>
648 <legend><?php echo T_('Users Options');?></legend>
649 <div class="message">
650@@ -91,7 +112,7 @@
651 <input type="text" name="email" size="60" class="input" value="<?php echo $email; ?>" /><br /><br />
652
653 <?php echo T_('Author Website');?><br />
654- <input type="text" name="planet_author_site" class="input" size="60" value="<?php echo $planet_author_site; ?>" /><br /><br />
655+ <input type="text" name="url" class="input" size="60" value="<?php echo $url ?>" /><br /><br />
656
657 <?php echo T_('Jabber / GoogleTalk');?><br />
658 <input type="text" name="planet_author_jabber" class="input" size="60" value="<?php echo $planet_author_jabber; ?>" /><br /><br />
659
660=== modified file 'admin/meta/css/styles.css'
661--- admin/meta/css/styles.css 2010-11-09 14:38:13 +0000
662+++ admin/meta/css/styles.css 2010-12-20 07:46:53 +0000
663@@ -873,6 +873,7 @@
664 }
665 #flash-msg.ajax-loading {
666 margin: 10px 5px;
667+ padding-left: 28px;
668 width:95%;
669 background: url(../icons/spinner.gif) no-repeat;
670 background-color: #eaeaea;
671@@ -1336,3 +1337,59 @@
672 color:#585858;
673 background:#E1E1E1;
674 }
675+/* Flash Box */
676+.flash_overlay{
677+ background:transparent url(../icons/overlay.png) repeat top left;
678+ position:fixed;
679+ top:0px;
680+ bottom:0px;
681+ left:0px;
682+ right:0px;
683+ z-index:100;
684+}
685+.flash_box{
686+ position:fixed;
687+ top:-200px;
688+ left:30%;
689+ right:30%;
690+ background-color:#fff;
691+ color:#7F7F7F;
692+ padding:20px;
693+ border:2px solid #ccc;
694+ -moz-border-radius: 20px;
695+ -webkit-border-radius:20px;
696+ -khtml-border-radius:20px;
697+ -moz-box-shadow: 0 1px 5px #333;
698+ -webkit-box-shadow: 0 1px 5px #333;
699+ z-index:101;
700+}
701+.flash_box.flash_error{
702+ background: url(../icons/false.png) 8px no-repeat;
703+ background-color: #ffe3e3;
704+ border-color: #dd0000;
705+ color: #550000;
706+ padding-left: 30px;
707+}
708+.flash_box.flash_notice{
709+ background: url(../icons/true.png) 8px no-repeat;
710+ background-color: #dfffdf;
711+ border-color: #9fcf9f;
712+ color: #005f00;
713+ padding-left: 30px;
714+}
715+.flash_box.flash_warning{
716+ background: url(../icons/warn.png) 8px no-repeat;
717+ background-color: #FFEBC1;
718+ border-color: #FDBF3B;
719+ color: #A6750C;
720+ padding-left: 30px;
721+}
722+a.flash_box_close{
723+ float:right;
724+ width:26px;
725+ height:26px;
726+ background:transparent url(../icons/cancel.png) repeat top left;
727+ margin-top:-30px;
728+ margin-right:-30px;
729+ cursor:pointer;
730+}
731
732=== added file 'admin/meta/icons/cancel.png'
733Binary files admin/meta/icons/cancel.png 1970-01-01 00:00:00 +0000 and admin/meta/icons/cancel.png 2010-12-20 07:46:53 +0000 differ
734=== added file 'admin/meta/icons/overlay.png'
735Binary files admin/meta/icons/overlay.png 1970-01-01 00:00:00 +0000 and admin/meta/icons/overlay.png 2010-12-20 07:46:53 +0000 differ
736=== modified file 'admin/meta/js/jquery.bilboplanet.js'
737--- admin/meta/js/jquery.bilboplanet.js 2010-11-01 21:24:18 +0000
738+++ admin/meta/js/jquery.bilboplanet.js 2010-12-20 07:46:53 +0000
739@@ -207,7 +207,7 @@
740
741 // Generation des div
742 var content = $(document.createElement('div')).addClass('preview_div');
743- var header = $(document.createElement('p')).addClass('preview_header').text($options.text.preview+':');;
744+ var header = $(document.createElement('p')).addClass('preview_header').text($options.text.preview+':');
745 var message = $(document.createElement('div')).addClass('preview_message');
746 var footer = $(document.createElement('div')).addClass('preview_footer');
747
748@@ -287,4 +287,34 @@
749
750 });
751
752+ /************************************************/
753+ /* Flash Box */
754+ /************************************************/
755+ $.fn.flashmsg = function() {
756+ var flash_class = $(this).attr('class');
757+ var flash_content = $(this).html();
758+ var flash_overlay = $(document.createElement('div')).css({
759+ display: 'none'
760+ }).attr('class','flash_overlay').attr('id', 'flash_overlay');
761+
762+ var flash_box = $(document.createElement('div')).attr('class', 'flash_box').attr('id', 'flash_box').addClass(flash_class);
763+ $(flash_box).html('<a class="flash_box_close" id="flash_box_close"></a>\n'+$(this).html());
764+
765+ $('body').append(flash_overlay).append(flash_box);
766+
767+ $('#flash_overlay').fadeIn('fast',function(){
768+ $('#flash_box').animate({'top':'160px'},500);
769+ });
770+
771+ $('#flash_box_close, input[type="button"], input[type="submit"]').click(function(){
772+ $('#flash_box').animate({'top':'-200px'},500,function(){
773+ $('#flash_overlay').fadeOut('fast');
774+ flash_class.empty;
775+ flash_content.empty;
776+ flash_box.remove();
777+ flash_overlay.remove();
778+ });
779+ });
780+ };
781+
782 })
783
784=== modified file 'admin/meta/js/jquery.bilboplanet.min.js'
785--- admin/meta/js/jquery.bilboplanet.min.js 2010-11-01 21:24:18 +0000
786+++ admin/meta/js/jquery.bilboplanet.min.js 2010-12-20 07:46:53 +0000
787@@ -1,1 +1,1 @@
788-$(document).ready(function(d){b();d(window).bind("resize",function(){b()});function b(){var f=d("#BP_head").height();var g=d(window).width();var e=d(window).height();var h=e-f;d("#BP_separator").css("height",h);d("#BP_page").css("height",h);d("#bp_pannel").css("height",h)}d('a[id="BP_Logout"]').click(function(g){g.preventDefault();if(d(this).attr("rel")){var f=d(this).attr("rel");d(location).attr("href",f)}});d("a[name=modal]").click(function(i){i.preventDefault();var k=d(this).attr("href");var g=d(window).height();var j=d(window).width();d("#mask").css({width:j,height:g});d("#mask").fadeTo("slow",0.5);var h=d(window).height();var f=d(window).width();d(k).css("top",h/2-d(k).height()/2);d(k).css("left",f/2-d(k).width()/2);d(k).fadeIn(2000)});d(".window .close").click(function(f){f.preventDefault();d("#mask").hide();d(".window").hide()});d("#mask").click(function(){d(this).hide();d(".window").hide()});d.fn.tips=function(f){e={type:"title",offsetX:10,offsetY:-5,delay:500,baseLine:"middle"};var e=d.extend(e,f);return this.each(function(){var h=d(this);var i=h.attr("title")||"";var g=h.attr("rel")||"";var j="";var k;h.mouseover(function(l){h.attr("title","");if(i){j=d("<div class='tip-text'><span>"+i+"</span></div>")}if(e.type=="rel"){if(g){j=d("<div class='tip-text'><span>"+g+"</span></div>")}}j.appendTo("body").hide().css({position:"absolute",top:0,left:0});h.mousemove(function(m){j.css({left:m.pageX+e.offsetX+"px",top:m.pageY+e.offsetY+"px"})});k=setTimeout(function(){j.show()},e.delay)});h.mouseout(function(l){clearTimeout(k);h.attr("title",i);h.unbind("mousemove");j.remove()})})};d("#checkAllCheckboxes").click(function(){var e=this.checked;d("input[id='checkAll']").each(function(){this.checked=e})});var c=d.fn.preview=function(g){var f={opacity:"0.8",text:{preview:"Preview",close:"Close"}};var e=d.extend(f,g);var h=d(document.createElement("div")).css({display:"none",opacity:e.opacity}).attr("id","overlay");d("body").append(h);return this.each(function(){var i=d(this);var j=d(document.createElement("input")).attr({value:e.text.close,type:"button"}).addClass("button close");var l=d(document.createElement("div")).addClass("preview_div");var n=d(document.createElement("p")).addClass("preview_header").text(e.text.preview+":");var k=d(document.createElement("div")).addClass("preview_message");var m=d(document.createElement("div")).addClass("preview_footer");m.append("<hr />");m.append(j);l.append(n).append(k).append(m);l.fadeIn(4000);h.after(l);h.fadeIn(2000);h.fadeTo("slow",e.opacity);k.hide().html(a(i.val())).fadeIn(6000);d(".preview_message").find("code").each(function(){d(this).html(d(this).html().replace("/&/&amp,").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"))});j.click(function(){h.fadeOut(e.fade);l.fadeOut(e.fade,function(){k.empty()});i.focus();l.empty;n.empty;k.empty;m.empty})})};function a(e){e=e.replace(/\n/g,"<br />");e=e.replace(/\n\n+/g,"<br /><br />");return e}d("#BP_separator").click(function(){var f="#bp_pannel";var e=d("#bp_pannel").width();var g=d(f).css("marginLeft");if(g=="0px"){d(f).animate({marginLeft:"-"+e+"px"},500)}else{d(f).animate({marginLeft:"0px"},500)}})});
789+$(document).ready(function(d){b();d(window).bind("resize",function(){b()});function b(){var f=d("#BP_head").height();var g=d(window).width();var e=d(window).height();var h=e-f;d("#BP_separator").css("height",h);d("#BP_page").css("height",h);d("#bp_pannel").css("height",h)}d('a[id="BP_Logout"]').click(function(g){g.preventDefault();if(d(this).attr("rel")){var f=d(this).attr("rel");d(location).attr("href",f)}});d("a[name=modal]").click(function(i){i.preventDefault();var k=d(this).attr("href");var g=d(window).height();var j=d(window).width();d("#mask").css({width:j,height:g});d("#mask").fadeTo("slow",0.5);var h=d(window).height();var f=d(window).width();d(k).css("top",h/2-d(k).height()/2);d(k).css("left",f/2-d(k).width()/2);d(k).fadeIn(2000)});d(".window .close").click(function(f){f.preventDefault();d("#mask").hide();d(".window").hide()});d("#mask").click(function(){d(this).hide();d(".window").hide()});d.fn.tips=function(f){e={type:"title",offsetX:10,offsetY:-5,delay:500,baseLine:"middle"};var e=d.extend(e,f);return this.each(function(){var h=d(this);var i=h.attr("title")||"";var g=h.attr("rel")||"";var j="";var k;h.mouseover(function(l){h.attr("title","");if(i){j=d("<div class='tip-text'><span>"+i+"</span></div>")}if(e.type=="rel"){if(g){j=d("<div class='tip-text'><span>"+g+"</span></div>")}}j.appendTo("body").hide().css({position:"absolute",top:0,left:0});h.mousemove(function(m){j.css({left:m.pageX+e.offsetX+"px",top:m.pageY+e.offsetY+"px"})});k=setTimeout(function(){j.show()},e.delay)});h.mouseout(function(l){clearTimeout(k);h.attr("title",i);h.unbind("mousemove");j.remove()})})};d("#checkAllCheckboxes").click(function(){var e=this.checked;d("input[id='checkAll']").each(function(){this.checked=e})});var c=d.fn.preview=function(g){var f={opacity:"0.8",text:{preview:"Preview",close:"Close"}};var e=d.extend(f,g);var h=d(document.createElement("div")).css({display:"none",opacity:e.opacity}).attr("id","overlay");d("body").append(h);return this.each(function(){var i=d(this);var j=d(document.createElement("input")).attr({value:e.text.close,type:"button"}).addClass("button close");var l=d(document.createElement("div")).addClass("preview_div");var n=d(document.createElement("p")).addClass("preview_header").text(e.text.preview+":");var k=d(document.createElement("div")).addClass("preview_message");var m=d(document.createElement("div")).addClass("preview_footer");m.append("<hr />");m.append(j);l.append(n).append(k).append(m);l.fadeIn(4000);h.after(l);h.fadeIn(2000);h.fadeTo("slow",e.opacity);k.hide().html(a(i.val())).fadeIn(6000);d(".preview_message").find("code").each(function(){d(this).html(d(this).html().replace("/&/&amp,").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"))});j.click(function(){h.fadeOut(e.fade);l.fadeOut(e.fade,function(){k.empty()});i.focus();l.empty;n.empty;k.empty;m.empty})})};function a(e){e=e.replace(/\n/g,"<br />");e=e.replace(/\n\n+/g,"<br /><br />");return e}d("#BP_separator").click(function(){var f="#bp_pannel";var e=d("#bp_pannel").width();var g=d(f).css("marginLeft");if(g=="0px"){d(f).animate({marginLeft:"-"+e+"px"},500)}else{d(f).animate({marginLeft:"0px"},500)}});d.fn.flashmsg=function(){var h=d(this).attr("class");var g=d(this).html();var f=d(document.createElement("div")).css({display:"none"}).attr("class","flash_overlay").attr("id","flash_overlay");var e=d(document.createElement("div")).attr("class","flash_box").attr("id","flash_box").addClass(h);d(e).html('<a class="flash_box_close" id="flash_box_close"></a>\n'+d(this).html());d("body").append(f).append(e);d("#flash_overlay").fadeIn("fast",function(){d("#flash_box").animate({top:"160px"},500)});d('#flash_box_close, input[type="button"], input[type="submit"]').click(function(){d("#flash_box").animate({top:"-200px"},500,function(){d("#flash_overlay").fadeOut("fast");h.empty;g.empty;e.remove();f.remove()})})}});
790
791=== modified file 'admin/meta/js/manage-account.js'
792--- admin/meta/js/manage-account.js 2010-10-20 13:44:36 +0000
793+++ admin/meta/js/manage-account.js 2010-12-20 07:46:53 +0000
794@@ -10,7 +10,8 @@
795 data: 'ajax=account&action=update&'+data,
796 success: function(msg){
797 $('#flash-msg').removeClass('ajax-loading');
798- $("#flash-msg").html(msg);
799+ $('#flash-log').css('display', 'none');
800+ $(msg).flashmsg();
801 }
802 });
803 return false;
804
805=== modified file 'admin/meta/js/manage-feed.js'
806--- admin/meta/js/manage-feed.js 2010-11-15 14:24:08 +0000
807+++ admin/meta/js/manage-feed.js 2010-12-20 07:46:53 +0000
808@@ -2,7 +2,23 @@
809 $(document).ready(function() {
810 this.isfilter=false;
811 $('#filterfeed_form').submit(function() {
812+<<<<<<< TREE
813 updateFilterList();
814+=======
815+ var data = $('#filterfeed_form').serialize();
816+ $('#flash-log').css('display','');
817+ $('#flash-msg').addClass('ajax-loading');
818+ $.ajax({
819+ type: "POST",
820+ url: "api/",
821+ data: 'ajax=feed&action=filter&'+data,
822+ success: function(msg){
823+ $('#flash-msg').removeClass('ajax-loading');
824+ $('#flash-log').css('display', 'none');
825+ $("#feed-list").html(msg);
826+ }
827+ });
828+>>>>>>> MERGE-SOURCE
829 return false;
830 });
831 $('#addfeed_form').submit(function() {
832@@ -15,9 +31,15 @@
833 url: "api/",
834 data: 'ajax=feed&action=add&'+data,
835 success: function(msg){
836+ $('#addfeed-field').css('display', 'none');
837+ $('#addfeed_form').find('input[type=text]').val('');
838+ $('#user_id').val('');
839+ $('#site_id').val('');
840 updateFeedList();
841+ $('#flash-msg').html('');
842 $('#flash-msg').removeClass('ajax-loading');
843- $('#flash-msg').html(msg);
844+ $('#flash-log').css('display', 'none');
845+ $(msg).flashmsg();
846 }
847 });
848 return false;
849@@ -89,8 +111,9 @@
850 data : {'ajax' : 'feed', 'action' : 'toggle', 'feed_id' : feed_id},
851 success: function(msg){
852 $('#flash-msg').removeClass('ajax-loading');
853- $('#flash-msg').html(msg);
854+ $('#flash-log').css('display', 'none');
855 updateFeedList(num_page, nb_items);
856+ $(msg).flashmsg();
857 }
858 });
859 }
860@@ -105,8 +128,9 @@
861 data : {'ajax' : 'feed', 'action' : 'change-trust', 'feed_id' : feed_id},
862 success: function(msg){
863 $('#flash-msg').removeClass('ajax-loading');
864- $('#flash-msg').html(msg);
865+ $('#flash-log').css('display', 'none');
866 updateFeedList(num_page, nb_items);
867+ $(msg).flashmsg();
868 }
869 });
870 }
871@@ -121,20 +145,23 @@
872 data : {'ajax' : 'feed', 'action' : 'remove', 'feed_id' : feed_id},
873 success: function(msg){
874 $('#flash-msg').removeClass('ajax-loading');
875- $('#flash-msg').html(msg);
876+ $('#flash-msg').html('');
877+ $(msg).flashmsg();
878 $('#removeFeedConfirm_form').submit(function() {
879- var data = $('#removeFeedConfirm_form').serialize();
880- $('#flash-log').css('display','');
881+ var data = $('#removeFeedConfirm_form').serialize().split('=');
882 $('#flash-msg').addClass('ajax-loading');
883 $('#flash-msg').html('Loading');
884 $.ajax({
885 type: "POST",
886 url: "api/",
887- data: 'ajax=feed&action=removeConfirm&'+data,
888+ data : {'ajax' : 'feed', 'action' : 'removeConfirm', 'feed_id' : data[1]},
889 success: function(msg){
890 updateFeedList(num_page, nb_items);
891 $('#flash-msg').removeClass('ajax-loading');
892- $('#flash-msg').html(msg);
893+ $('#flash-msg').html('');
894+ $('#flash-log').css('display', 'none');
895+ updateFeedList(num_page, nb_items);
896+ $(msg).flashmsg();
897 }
898 });
899 return false;
900@@ -152,9 +179,7 @@
901 url: "api/",
902 data: {'ajax' : 'feed', 'action' : 'get', 'feed_id' : feed_id},
903 dataType: 'json',
904- success: function(feed){
905- $('#flash-msg').removeClass('ajax-loading');
906-
907+ success: function(feed){
908 $('#feed-edit-form #ef_id').val(feed.feed_id);
909 $('#feed-edit-form #ef_user_id').val(feed.user_id);
910 $('#feed-edit-form #ef_user_id').attr('disabled', 'true');
911@@ -175,8 +200,10 @@
912 $('#feed-edit-form #ef_id').val('');
913 $('#feed-edit-form #ef_name').val('');
914 $('#feed-edit-form #ef_url').val('');
915+ $('#flash-msg').removeClass('ajax-loading');
916+ $('#flash-log').css('display', 'none');
917 updateFeedList(num_page, nb_items);
918- $("#flash-msg").html(msg);
919+ $(msg).flashmsg();
920 }
921 });
922 }, {
923
924=== modified file 'admin/meta/js/manage-moderation.js'
925--- admin/meta/js/manage-moderation.js 2010-10-08 10:06:17 +0000
926+++ admin/meta/js/manage-moderation.js 2010-12-20 07:46:53 +0000
927@@ -15,7 +15,8 @@
928 $("#action"+post_id)[0].removeAttribute('class','ajax-loading');
929 $("#action"+post_id).html('<span id="action' + post_id + '"><img src="meta/icons/true-light.png" title="Accepter" /> <a href="javascript:refuse(' + post_id + ', \'' + nom + '\', \'' + href + '\')"><img src="meta/icons/warn.png" title="Refuser" /></a></span>');
930 $('#flash-msg').removeClass('ajax-loading');
931- $("#flash-msg").html(msg);
932+ $('#flash-log').css('display', 'none');
933+ $(msg).flashmsg();
934 }
935 });
936 }, {
937@@ -55,7 +56,8 @@
938 $("#action"+post_id)[0].removeAttribute('class','ajax-loading');
939 $("#action"+post_id).html('<span id="action'+post_id+'"><a href="javascript:accept('+post_id+', \'' + user_id + '\')"><img src="meta/icons/true.png" title="Accepter" /></a> <img src="meta/icons/warn-light.png" title="Refuser" /></span>');
940 $('#flash-msg').removeClass('ajax-loading');
941- $("#flash-msg").html(msg);
942+ $('#flash-log').css('display', 'none');
943+ $(msg).flashmsg();
944 }
945 });
946 }, {
947
948=== modified file 'admin/meta/js/manage-option.js'
949--- admin/meta/js/manage-option.js 2010-09-21 14:34:02 +0000
950+++ admin/meta/js/manage-option.js 2010-12-20 07:46:53 +0000
951@@ -62,7 +62,7 @@
952 cache: false,
953 success: function(msg){
954 $('#options-loading').hide();
955- $('#flash-msg').html(msg);
956+ $(msg).flashmsg();
957 listopt();
958 }
959 });
960
961=== modified file 'admin/meta/js/manage-permissions.js'
962--- admin/meta/js/manage-permissions.js 2010-10-19 06:50:44 +0000
963+++ admin/meta/js/manage-permissions.js 2010-12-20 07:46:53 +0000
964@@ -24,7 +24,8 @@
965 success: function(msg){
966 updateUserList();
967 $('#flash-msg').removeClass('ajax-loading');
968- $('#flash-msg').html(msg);
969+ $('#flash-log').css('display', 'none');
970+ $(msg).flashmsg();
971 }
972 });
973 return false;
974@@ -51,7 +52,8 @@
975 data : {'ajax' : 'permissions', 'action' : 'toggleRole', 'user_id' : user_id, 'user_role' : user_role},
976 success: function(msg){
977 $('#flash-msg').removeClass('ajax-loading');
978- $('#flash-msg').html(msg);
979+ $('#flash-log').css('display', 'none');
980+ $(msg).flashmsg();
981 updateUserList(num_page, nb_items);
982 }
983 });
984@@ -90,7 +92,8 @@
985 },
986 success: function(msg){
987 $('#flash-msg').removeClass('ajax-loading');
988- $('#flash-msg').html(msg);
989+ $('#flash-log').css('display', 'none');
990+ $(msg).flashmsg();
991 updateUserList(num_page, nb_items);
992 }
993 });
994
995=== modified file 'admin/meta/js/manage-user.js'
996--- admin/meta/js/manage-user.js 2010-11-15 14:24:08 +0000
997+++ admin/meta/js/manage-user.js 2010-12-20 07:46:53 +0000
998@@ -2,7 +2,23 @@
999 $(document).ready(function() {
1000 this.isfilter=false;
1001 $('#filteruser_form').submit(function() {
1002+<<<<<<< TREE
1003 updateFilterList();
1004+=======
1005+ var data = $('#filteruser_form').serialize();
1006+ $('#flash-log').css('display','');
1007+ $('#flash-msg').addClass('ajax-loading');
1008+ $.ajax({
1009+ type: "POST",
1010+ url: "api/",
1011+ data: 'ajax=user&action=filter&'+data,
1012+ success: function(msg){
1013+ $('#flash-msg').removeClass('ajax-loading');
1014+ $("#users-list").html(msg);
1015+ $('#filteruser-field').css('display', 'none');
1016+ }
1017+ });
1018+>>>>>>> MERGE-SOURCE
1019 return false;
1020 });
1021 $('#adduser_form').submit(function() {
1022@@ -15,9 +31,12 @@
1023 url: "api/",
1024 data: 'ajax=user&action=add&'+data,
1025 success: function(msg){
1026+ $('#adduser-field').css('display', 'none');
1027+ $('#adduser_form').find('input[type=text], input[type=password]').val('');
1028 updateUserList();
1029 $('#flash-msg').removeClass('ajax-loading');
1030- $('#flash-msg').html(msg);
1031+ $('#flash-log').css('display', 'none');
1032+ $(msg).flashmsg();
1033 }
1034 });
1035 return false;
1036@@ -68,7 +87,8 @@
1037 data : {'ajax' : 'user', 'action' : 'toggle', 'user_id' : user_id},
1038 success: function(msg){
1039 $('#flash-msg').removeClass('ajax-loading');
1040- $('#flash-msg').html(msg);
1041+ $('#flash-log').css('display', 'none');
1042+ $(msg).flashmsg();
1043 updateUserList(num_page, nb_items);
1044 }
1045 });
1046@@ -83,27 +103,32 @@
1047 url: "api/",
1048 data : {'ajax' : 'user', 'action' : 'remove', 'user_id' : user_id},
1049 success: function(msg){
1050+ $('#flash-msg').html('');
1051 $('#flash-msg').removeClass('ajax-loading');
1052- $('#flash-msg').html(msg);
1053+ $('#flash-log').css('display','none');
1054+ $(msg).flashmsg();
1055 $('#removeConfirm_form').submit(function() {
1056- var data = $('#removeConfirm_form').serialize();
1057 $('#flash-log').css('display','');
1058 $('#flash-msg').addClass('ajax-loading');
1059 $('#flash-msg').html('Loading');
1060+ var data = $('#removeConfirm_form').serialize().split('=');
1061 $.ajax({
1062 type: "POST",
1063 url: "api/",
1064- data: 'ajax=user&action=removeConfirm&'+data,
1065+ data : {'ajax' : 'user', 'action' : 'removeConfirm', 'user_id' : data[1]},
1066 success: function(msg){
1067+ $('#flash-msg').html('');
1068+ $('#flash-msg').removeClass('ajax-loading');
1069+ $('#flash-log').css('display', 'none');
1070 updateUserList(num_page, nb_items);
1071- $('#flash-msg').removeClass('ajax-loading');
1072- $('#flash-msg').html(msg);
1073+ $(msg).flashmsg();
1074 }
1075 });
1076 return false;
1077 });
1078 }
1079 });
1080+ return false;
1081 }
1082
1083 function removeSite(site_id, num_page, nb_items) {
1084@@ -115,21 +140,25 @@
1085 url: "api/",
1086 data : {'ajax' : 'site', 'action' : 'remove', 'site_id' : site_id},
1087 success: function(msg){
1088+ $('#flash-msg').html('');
1089 $('#flash-msg').removeClass('ajax-loading');
1090- $('#flash-msg').html(msg);
1091+ $('#flash-log').css('display','none');
1092+ $(msg).flashmsg();
1093 $('#removeSiteConfirm_form').submit(function() {
1094- var data = $('#removeSiteConfirm_form').serialize();
1095 $('#flash-log').css('display','');
1096 $('#flash-msg').addClass('ajax-loading');
1097 $('#flash-msg').html('Loading');
1098+ var data = $('#removeSiteConfirm_form').serialize().split('=');
1099 $.ajax({
1100 type: "POST",
1101 url: "api/",
1102- data: 'ajax=site&action=removeConfirm&'+data,
1103+ data : {'ajax' : 'site', 'action' : 'removeConfirm', 'site_id' : data[1]},
1104 success: function(msg){
1105+ $('#flash-msg').html('');
1106+ $('#flash-msg').removeClass('ajax-loading');
1107+ $('#flash-log').css('display','none');
1108 updateUserList(num_page, nb_items);
1109- $('#flash-msg').removeClass('ajax-loading');
1110- $('#flash-msg').html(msg);
1111+ $(msg).flashmsg();
1112 }
1113 });
1114 return false;
1115@@ -148,9 +177,7 @@
1116 url: "api/",
1117 data: {'ajax' : 'user', 'action' : 'profile', 'user_id' : user_id},
1118 dataType: 'json',
1119- success: function(user){
1120- $('#flash-msg').removeClass('ajax-loading');
1121-
1122+ success: function(user){
1123 $('#user-edit-form #euser_id').val(user.user_id);
1124 $('#user-edit-form #euser_id').attr('disabled', 'true');
1125 $('#user-edit-form #efullname').val(unescape(user.user_fullname));
1126@@ -171,7 +198,9 @@
1127 $('#user-edit-form #efullname').val('');
1128 $('#user-edit-form #eemail').val('');
1129 updateUserList(num_page, nb_items);
1130- $("#flash-msg").html(msg);
1131+ $('#flash-msg').removeClass('ajax-loading');
1132+ $('#flash-log').css('display', 'none');
1133+ $(msg).flashmsg();
1134 }
1135 });
1136 }, {
1137@@ -204,7 +233,8 @@
1138 success: function(msg){
1139 $('#add-site-form #suser_id').removeAttr('disabled');
1140 $('#flash-msg').removeClass('ajax-loading');
1141- $("#flash-msg").html(msg);
1142+ $('#flash-log').css('display', 'none');
1143+ $(msg).flashmsg();
1144 $('#add-site-form #suser_id').removeAttr('disabled');
1145 $('#add-site-form #suser_id').val('');
1146 updateUserList(num_page, nb_items);

Subscribers

People subscribed via source and target branches

to all changes: