PluginProbe
Timed Content / 2.99
Timed Content v2.99
2.99 trunk 1.0 1.1 1.2 2.0 2.1 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.10 2.11 2.12 2.15 2.2 2.3 2.3.1 2.4 2.5 2.5.1 2.50 2.51 2.52 All 67 releases
timed-content / tinymce_plugin / dialog.php

dialog.php in Timed Content 2.99, at tinymce_plugin/dialog.php

177 lines 11.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml">
3 <head>
4 <title><?php _ex( 'Add Timed Content shortcodes', 'TinyMCE Dialog - Dialog titlebar', 'timed-content' ); ?> </title>
5 <?php wp_print_styles(); ?>
6 <style>
7 .panel_wrapper {
8 height: 370px;
9 }
10 div.ui-datepicker-div {
11 font-size: 10px;
12 }
13 div.ui-timepicker-div {
14 font-size: 10px;
15 }
16 div.tabs ul li {
17 cursor: pointer;
18 }
19 </style>
20 <?php wp_print_scripts(); ?>
21 <script type="text/javascript">
22 <?php echo $this->get_rules_js(); ?>
23 var tags = { 'client': '<?php echo TIMED_CONTENT_SHORTCODE_CLIENT; ?>',
24 'server': '<?php echo TIMED_CONTENT_SHORTCODE_SERVER; ?>',
25 'rule': '<?php echo TIMED_CONTENT_SHORTCODE_RULE; ?>' };
26 var errorMessages = { 'clientNoShow': '<?php _e( 'When using the Show action, the Show time must be at least 1 second.', 'timed-content' ); ?>',
27 'clientNoHide': '<?php _e( 'When using the Hide action, the Hide time must be at least 1 second.', 'timed-content' ); ?>',
28 'clientHideBeforeShow': '<?php _e( 'When using both Show and Hide actions, the Hide time must be later than the Show time.', 'timed-content' ); ?>',
29 'clientNoAction': '<?php _e( 'Please select an action to perform.', 'timed-content' ); ?>',
30 'serverNoShowDate': '<?php _e( 'Please set a date for the Show action.', 'timed-content' ); ?>',
31 'serverNoShowTime': '<?php _e( 'Please set a time for the Show action.', 'timed-content' ); ?>',
32 'serverNoHideDate': '<?php _e( 'Please set a date for the Hide action.', 'timed-content' ); ?>',
33 'serverNoHideTime': '<?php _e( 'Please set a time for the Hide action.', 'timed-content' ); ?>',
34 'serverHideBeforeShow': '<?php _e( 'When using both Show and Hide actions, the Hide time must be later than the Show time.', 'timed-content' ); ?>',
35 'serverNoAction': '<?php _e( 'Please select an action to perform.', 'timed-content' ); ?>' };
36 var datepickParam = { 'dateFormat' : 'yy-mm-dd' };
37 </script>
38 <script type="text/javascript" src="<?php echo TIMED_CONTENT_PLUGIN_URL; ?>/tinymce_plugin/dialog.js"></script>
39 </head>
40 <body style="display: none">
41 <div class="tabs">
42 <ul>
43 <li id="client_tab" class="current" onclick="javascript:mcTabs.displayTab('client_tab','client_panel');">
44 <span><?php _ex( 'Client', 'TinyMCE Dialog - Client tab label', 'timed-content' ); ?> </span></li>
45 <li id="server_tab" onclick="javascript:mcTabs.displayTab('server_tab','server_panel');">
46 <span><?php _ex( 'Server', 'TinyMCE Dialog - Server tab label', 'timed-content' ); ?> </span></li>
47 <li id="rules_tab" onclick="javascript:mcTabs.displayTab('rules_tab','rules_panel');">
48 <span><?php _ex( 'Timed Content Rules', 'TinyMCE Dialog - Rules tab label', 'timed-content' ); ?></span>
49 </li>
50 </ul>
51 </div>
52 <div class="panel_wrapper">
53 <div id="client_panel" class="panel current">
54 <form name="TimedContentDialogClient" id="TimedContentDialogClient" onsubmit="TimedContentDialog.client_action();return false;" action="#">
55 <p><?php _ex( 'Select the actions you wish to perform and the times after the Page/Post is loaded when they should occur.', 'TinyMCE Dialog - Client tab instructions', 'timed-content' ); ?> </p>
56 <fieldset>
57 <legend>
58 <input name="do_client_show" type="checkbox" id="do_client_show" value="show"/>
59 <label for="do_client_show"><?php _ex( 'Show', 'TinyMCE Dialog - Show action label', 'timed-content' ); ?> </label>
60 </legend>
61 <p><label for="client_show_minutes"><?php _ex( 'Time (mm:ss):', 'TinyMCE Dialog - Time count label', 'timed-content' ); ?></label>
62 <input id="client_show_minutes" name="client_show_minutes" type="text" class="text" size="2" disabled="disabled"/>
63 :
64 <input id="client_show_seconds" name="client_show_seconds" type="text" class="text" size="2" disabled="disabled"/>
65 </p>
66
67 <p><label for="client_show_fade"><?php _ex( 'Fade in (ms):', 'TinyMCE Dialog - Fade-in label', 'timed-content' ); ?></label>
68 <input id="client_show_fade" name="client_show_fade" type="text" class="text" size="4" disabled="disabled"/>
69 <em>(<?php _ex( 'Optional', 'TinyMCE Dialog - Optional checkbox HTML label', 'timed-content' ); ?>)</em>
70 </p>
71 </fieldset>
72 <fieldset>
73 <legend>
74 <input name="do_client_hide" type="checkbox" id="do_client_hide" value="hide"/>
75 <label for="do_client_hide"><?php _ex( 'Hide', 'TinyMCE Dialog - Hide action label', 'timed-content' ); ?> </label>
76 </legend>
77 <p><label for="client_hide_minutes"><?php _ex( 'Time (mm:ss):', 'TinyMCE Dialog - Time count label', 'timed-content' ); ?></label>
78 <input id="client_hide_minutes" name="client_hide_minutes" type="text" class="text" size="2" disabled="disabled"/>
79 :
80 <input id="client_hide_seconds" name="client_hide_seconds" type="text" class="text" size="2" disabled="disabled"/>
81 </p>
82
83 <p><label for="client_hide_fade"><?php _ex( 'Fade out (ms):', 'TinyMCE Dialog - Fade-out label', 'timed-content' ); ?></label>
84 <input id="client_hide_fade" name="client_hide_fade" type="text" class="text" size="4" disabled="disabled"/>
85 <em>(<?php _ex( 'Optional', 'TinyMCE Dialog - Optional checkbox HTML label', 'timed-content' ); ?>)</em>
86 </p>
87 </fieldset>
88 <fieldset>
89 <legend>
90 <?php _ex( 'Display Mode', 'TinyMCE Dialog - Display Mode label', 'timed-content' ); ?> </legend>
91 <p><input id="client_display_tag_div" name="client_display_tag" type="radio" class="text" checked="checked"/>
92 <label for="client_display_tag_div"><?php /* translators: %s: tag name */ printf( _x( 'Enclose content using %s tags (block-level)', 'TinyMCE Dialog - Display mode <div> HTML description', 'timed-content' ), '<code>&lt;div&gt;</code>' ); ?></label><br />
93 <input id="client_display_tag_span" name="client_display_tag" type="radio" class="text"/>
94 <label for="client_display_tag_span"><?php /* translators: %s: tag name */ printf( _x( 'Enclose content using %s tags (inline)', 'TinyMCE Dialog - Display mode <span> HTML description', 'timed-content' ), '<code>&lt;span&gt;</code>' ); ?> </label>
95 </p>
96 </fieldset>
97 <div class="mceActionPanel">
98 <input type="button" id="insert" name="insert" value="<?php _ex( 'Insert', 'TinyMCE Dialog - Insert button HTML label', 'timed-content' ); ?> " onclick="TimedContentDialog.client_action();"/>
99 <input type="button" id="cancel" name="cancel" value="<?php _ex( 'Cancel', 'TinyMCE Dialog - Cancel button HTML label', 'timed-content' ); ?> " onclick="tinyMCEPopup.close();"/>
100 </div>
101 </form>
102 </div>
103 <div id="server_panel" class="panel">
104 <form name="TimedContentDialogServer" id="TimedContentDialogServer" onsubmit="TimedContentDialog.server_action();return false;" action="#">
105 <p><?php _ex( 'Select the actions you wish to perform and the dates/times when they should occur.', 'TinyMCE Dialog - Server tab instructions', 'timed-content' ); ?> </p>
106
107 <p>
108 <input name="server_debug" type="checkbox" id="server_debug" value="true"/>
109 <label for="server_debug"><?php _ex( 'Add debugging messages (Only logged-in users who can edit this Post/Page will see them)', 'TinyMCE Dialog - Server debugging label', 'timed-content' ); ?> </label>
110 </p>
111
112 <p><?php _e( 'Current Date/Time:', 'timed-content' ); ?> <?php echo current_time( 'mysql', 0 ); ?></p>
113 <fieldset>
114 <legend>
115 <input name="do_server_show" type="checkbox" id="do_server_show" value="show"/>
116 <label for="do_server_show"><?php _ex( 'Show', 'TinyMCE Dialog - Show action label', 'timed-content' ); ?> </label>
117 </legend>
118 <p><label for="server_show_date"><?php _ex( 'Date:', 'Date field label', 'timed-content' ); ?> </label>
119 <input name="server_show_date" type="text" disabled="disabled" class="text" id="server_show_date" style="width: 175px;"/>
120 <label for="server_show_time"><?php _ex( 'Time:', 'Time field label', 'timed-content' ); ?> </label>
121 <input name="server_show_time" type="text" disabled="disabled" class="text" id="server_show_time" style="width: 125px;"/>
122 </p>
123 </fieldset>
124 <fieldset>
125 <legend>
126 <input name="do_server_hide" type="checkbox" id="do_server_hide" value="hide"/>
127 <label for="do_server_hide"><?php _ex( 'Hide', 'TinyMCE Dialog - Hide action label', 'timed-content' ); ?></label>
128 </legend>
129 <p><label for="server_hide_date"><?php _ex( 'Date:', 'Date field label', 'timed-content' ); ?> </label>
130 <input name="server_hide_date" type="text" disabled="disabled" class="text" id="server_hide_date" style="width: 175px;"/>
131 <label for="server_hide_time"><?php _ex( 'Time:', 'Time field label', 'timed-content' ); ?> </label>
132 <input name="server_hide_time" type="text" disabled="disabled" class="text" id="server_hide_time" style="width: 125px;"/>
133 </p>
134 </fieldset>
135 <fieldset>
136 <legend>
137 <?php _ex( 'Timezone', 'TinyMCE Dialog - Timezone fieldset label', 'timed-content' ); ?>
138 </legend>
139 <p><?php _ex( 'Select a city whose timezone you wish to use:', 'TinyMCE Dialog - Timezone <select> HTML label', 'timed-content' ); ?>
140 <select name="server_tz" id="server_tz" style="width: auto;">
141 <?php echo CustomFieldsInterface::generate_timezone_select_options( get_option( 'timezone_string' ) ); ?>
142 </select>
143 </p>
144
145 <p><?php _e( 'WordPress Timezone:', 'timed-content' ); ?> <?php echo esc_html( get_option( 'timezone_string' ) ); ?></p>
146 </fieldset>
147 <div class="mceActionPanel">
148 <input type="button" id="insert" name="insert" value="<?php _ex( 'Insert', 'TinyMCE Dialog - Insert button HTML label', 'timed-content' ); ?> " onclick="TimedContentDialog.server_action();"/>
149 <input type="button" id="cancel" name="cancel" value="<?php _ex( 'Cancel', 'TinyMCE Dialog - Cancel button HTML label', 'timed-content' ); ?> " onclick="tinyMCEPopup.close();"/>
150 </div>
151 </form>
152 </div>
153 <div id="rules_panel" class="panel">
154 <form name="TimedContentDialogRules" id="TimedContentDialogRules" onsubmit="TimedContentDialog.rules_action();return false;" action="#">
155 <p><?php _ex( 'Select the Timed Content Rule you wish to use. Only rules without any warnings will appear below.', 'TinyMCE Dialog - Timed Content Rules tab instructions', 'timed-content' ); ?> </p>
156
157 <p><?php _ex( 'Rule:', 'TinyMCE Dialog - Timed Content Rules <select> HTML label', 'timed-content' ); ?>
158 <select name="rules_list" id="rules_list" style="width: auto;">
159 <!-- options list generated using $this->getRulesJS() above and TimedContentDialog.init JS function in /tinymce_plugin/js/dialog.js -->
160 </select>
161 </p>
162 <fieldset>
163 <legend>
164 <?php _ex( 'Description', 'TinyMCE Dialog - Timed Content Rules description label', 'timed-content' ); ?> </legend>
165 <p>
166 <span id="rules_desc"></span>
167 </p>
168 </fieldset>
169 <div class="mceActionPanel">
170 <input type="button" id="insert" name="insert" value="<?php _ex( 'Insert', 'TinyMCE Dialog - Insert button HTML label', 'timed-content' ); ?> " onclick="TimedContentDialog.rules_action();"/>
171 <input type="button" id="cancel" name="cancel" value="<?php _ex( 'Cancel', 'TinyMCE Dialog - Cancel button HTML label', 'timed-content' ); ?> " onclick="tinyMCEPopup.close();"/>
172 </div>
173 </form>
174 </div>
175 </div>
176 </body>
177