PluginProbe
Social Media Auto Poster – Schedule & Publish to Buffer / trunk
Social Media Auto Poster – Schedule & Publish to Buffer vtrunk
6.2.3 6.2.2 6.2.1 6.2.0 6.1.2 6.1.1 6.1.0 6.0.9 6.0.8 6.0.7 6.0.6 6.0.5 6.0.4 6.0.3 6.0.2 6.0.1 6.0.0 3.8.1 3.8.2 3.8.3 3.8.4 3.8.5 3.8.6 3.8.7 3.8.8 All 124 releases
wp-to-buffer / lib / shared / js / notification.js

notification.js in Social Media Auto Poster – Schedule & Publish to Buffer trunk, at lib/shared/js/notification.js

75 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /**
2 * Inline notification functionality.
3 *
4 * @package WPZincDashboardWidget
5 * @author WP Zinc
6 */
7
8 /**
9 * Show a success message.
10 *
11 * @since 1.0.0
12 *
13 * @param string message Success Message to display.
14 */
15 function wpzinc_notification_show_success_message( message ) {
16
17 wpzinc_notification_show( message, 'success' );
18
19 }
20
21 /**
22 * Show a warning message.
23 *
24 * @since 1.0.0
25 *
26 * @param string message Warning Message to display.
27 */
28 function wpzinc_notification_show_warning_message( message ) {
29
30 wpzinc_notification_show( message, 'warning' );
31
32 }
33
34 /**
35 * Show an error message.
36 *
37 * @since 1.0.0
38 *
39 * @param string message Error Message to display.
40 */
41 function wpzinc_notification_show_error_message( message ) {
42
43 wpzinc_notification_show( message, 'error' );
44
45 }
46
47 /**
48 * Show a message.
49 *
50 * @since 1.0.0
51 *
52 * @param string message Message to display.
53 * @param string type Message Type (success,warning,error)
54 */
55 function wpzinc_notification_show( message, type ) {
56
57 jQuery( '.wpzinc-notification' ).text( message );
58 jQuery( '.wpzinc-notification' ).addClass( 'wpzinc-notification-' + type );
59 jQuery( '.wpzinc-notification' ).fadeIn( 'fast' );
60
61 setTimeout(
62 function () {
63 jQuery( '.wpzinc-notification' ).fadeOut(
64 'fast',
65 function () {
66 jQuery( '.wpzinc-notification' ).removeClass( 'wpzinc-notification-' + type );
67 jQuery( '.wpzinc-notification' ).hide();
68 }
69 );
70 },
71 2000
72 );
73
74 }
75