1 | {combine_script id="jquery.tipTip" path='themes/default/js/plugins/jquery.tipTip.minified.js' load='async'} |
---|
2 | |
---|
3 | {combine_css path=$FBP_PATH|@cat:"/css/admin.css"} |
---|
4 | {combine_css path="plugins/FacebookPlug/css/admin.css"} |
---|
5 | |
---|
6 | <div class="titrePage"> |
---|
7 | <h2>FacebookPlug</h2> |
---|
8 | </div> |
---|
9 | <br> |
---|
10 | |
---|
11 | <form method="post" class="properties" action="{$FBP_ACTION}"> |
---|
12 | {if isset($social_plugin)} |
---|
13 | <h3>{'On picture pages'|@translate}</h3> |
---|
14 | <fieldset> |
---|
15 | <legend><a href="{$social_plugin.like_button.FB_PAGE}" onclick="window.open(this.href); return false;">{'Like button'|@translate}</a></legend> |
---|
16 | <ul> |
---|
17 | <li> |
---|
18 | <label> |
---|
19 | <span class="property">{'Enabled'|@translate}</span> |
---|
20 | <input type="checkbox" name="FBP_SOCIAL_PLUGIN_LIKE_BUTTON_ENABLED" {$social_plugin.like_button.ENABLED} /> |
---|
21 | </label> |
---|
22 | </li> |
---|
23 | |
---|
24 | <div id='like_button'> |
---|
25 | <li> |
---|
26 | <label> |
---|
27 | <span class="property">{'Layout style'|@translate}</span> |
---|
28 | <select name="FBP_SOCIAL_PLUGIN_LIKE_BUTTON_LAYOUT" size="1"> |
---|
29 | {html_options options=$social_plugin.like_button.LAYOUT_OPTIONS selected=$social_plugin.like_button.LAYOUT_OPTIONS_SELECTED} |
---|
30 | </select> |
---|
31 | </label> |
---|
32 | </li> |
---|
33 | <li> |
---|
34 | <label> |
---|
35 | <span class="property">{'Show faces'|@translate}</span> |
---|
36 | <input type="checkbox" name="FBP_SOCIAL_PLUGIN_LIKE_BUTTON_SHOW_FACES" {$social_plugin.like_button.SHOW_FACES} /> |
---|
37 | </label> |
---|
38 | </li> |
---|
39 | <li> |
---|
40 | <label> |
---|
41 | <span class="property">{'Verb to display'|@translate}</span> |
---|
42 | <select name="FBP_SOCIAL_PLUGIN_LIKE_BUTTON_ACTION" size="1"> |
---|
43 | {html_options options=$social_plugin.like_button.ACTION_OPTIONS selected=$social_plugin.like_button.ACTION_OPTIONS_SELECTED} |
---|
44 | </select> |
---|
45 | </label> |
---|
46 | </li> |
---|
47 | <li> |
---|
48 | <label> |
---|
49 | <span class="property">{'Color scheme'|@translate}</span> |
---|
50 | <select name="FBP_SOCIAL_PLUGIN_LIKE_BUTTON_COLORSCHEME" size="1"> |
---|
51 | {html_options options=$social_plugin.like_button.COLORSCHEME_OPTIONS selected=$social_plugin.like_button.COLORSCHEME_OPTIONS_SELECTED} |
---|
52 | </select> |
---|
53 | </label> |
---|
54 | </li> |
---|
55 | </div> |
---|
56 | </ul> |
---|
57 | </fieldset> |
---|
58 | |
---|
59 | <fieldset> |
---|
60 | <legend><a href="{$social_plugin.facepile.FB_PAGE}" onclick="window.open(this.href); return false;">{'Facepile'|@translate}</a> {'on slideshow pages'|@translate}</legend> |
---|
61 | <ul> |
---|
62 | <li> |
---|
63 | <label> |
---|
64 | <span class="property">{'Enabled'|@translate}</span> |
---|
65 | <input type="checkbox" name="FBP_SOCIAL_PLUGIN_FACEPILE_ENABLED" {$social_plugin.facepile.ENABLED} /> |
---|
66 | </label> |
---|
67 | </li> |
---|
68 | |
---|
69 | <div id='facepile'> |
---|
70 | <li> |
---|
71 | <label> |
---|
72 | <span class="property">{'Num rows'|@translate}</span> |
---|
73 | <input type="text" size="3" maxlength="4" name="FBP_SOCIAL_PLUGIN_FACEPILE_MAX_ROWS" value="{$social_plugin.facepile.MAX_ROWS}" /> |
---|
74 | </label> |
---|
75 | </li> |
---|
76 | </div> |
---|
77 | </ul> |
---|
78 | </fieldset> |
---|
79 | |
---|
80 | <fieldset> |
---|
81 | <legend><a href="{$social_plugin.comments.FB_PAGE}" onclick="window.open(this.href); return false;">{'Comments'|@translate}</a></legend> |
---|
82 | <ul> |
---|
83 | <li> |
---|
84 | <label> |
---|
85 | <span class="property">{'Enabled'|@translate}</span> |
---|
86 | <input type="checkbox" name="FBP_SOCIAL_PLUGIN_COMMENTS_ENABLED" {$social_plugin.comments.ENABLED} /> |
---|
87 | </label> |
---|
88 | </li> |
---|
89 | |
---|
90 | <div id='comments'> |
---|
91 | <li> |
---|
92 | <label> |
---|
93 | <span class="property">{'Num posts'|@translate}</span> |
---|
94 | <input type="text" size="3" maxlength="4" name="FBP_SOCIAL_PLUGIN_COMMENTS_NUMPOSTS" value="{$social_plugin.comments.NUMPOSTS}" /> |
---|
95 | </label> |
---|
96 | </li> |
---|
97 | <li> |
---|
98 | <label> |
---|
99 | <span class="property">{'Title'|@translate}</span> |
---|
100 | <input type="text" size="39" name="FBP_SOCIAL_PLUGIN_COMMENTS_TITLE" value="{$social_plugin.comments.TITLE}" /> |
---|
101 | </label> |
---|
102 | </li> |
---|
103 | <li> |
---|
104 | <label> |
---|
105 | <span class="property">{'Simple'|@translate}</span> |
---|
106 | <input type="checkbox" name="FBP_SOCIAL_PLUGIN_COMMENTS_SIMPLE" {$social_plugin.comments.SIMPLE} /> |
---|
107 | </label> |
---|
108 | </li> |
---|
109 | <li> |
---|
110 | <label> |
---|
111 | <span class="property">{'Reverse'|@translate}</span> |
---|
112 | <input type="checkbox" name="FBP_SOCIAL_PLUGIN_COMMENTS_REVERSE" {$social_plugin.comments.REVERSE} /> |
---|
113 | </label> |
---|
114 | </li> |
---|
115 | <li> |
---|
116 | <label> |
---|
117 | <span class="property">{'Publish feed'|@translate}</span> |
---|
118 | <input type="checkbox" name="FBP_SOCIAL_PLUGIN_COMMENTS_PUBLISH_FEED" {$social_plugin.comments.PUBLISH_FEED} /> |
---|
119 | </label> |
---|
120 | </li> |
---|
121 | </div> |
---|
122 | </ul> |
---|
123 | </fieldset> |
---|
124 | |
---|
125 | <h3>{'On menu of main pages'|@translate}</h3> |
---|
126 | <fieldset> |
---|
127 | <legend><a href="{$social_plugin.activity_feed.FB_PAGE}" onclick="window.open(this.href); return false;">{'Activity feed'|@translate}</a></legend> |
---|
128 | <ul> |
---|
129 | <li> |
---|
130 | <label> |
---|
131 | <span class="property">{'Enabled'|@translate}</span> |
---|
132 | <input type="checkbox" name="FBP_SOCIAL_PLUGIN_ACTIVITY_FEED_ENABLED" {$social_plugin.activity_feed.ENABLED} /> |
---|
133 | </label> |
---|
134 | </li> |
---|
135 | |
---|
136 | <div id='activity_feed'> |
---|
137 | <li> |
---|
138 | <label> |
---|
139 | <span class="property">{'Color scheme'|@translate}</span> |
---|
140 | <select name="FBP_SOCIAL_PLUGIN_ACTIVITY_FEED_COLORSCHEME" size="1"> |
---|
141 | {html_options options=$social_plugin.activity_feed.COLORSCHEME_OPTIONS selected=$social_plugin.activity_feed.COLORSCHEME_OPTIONS_SELECTED} |
---|
142 | </select> |
---|
143 | </label> |
---|
144 | </li> |
---|
145 | <li> |
---|
146 | <label> |
---|
147 | <span class="property">{'Show header'|@translate}</span> |
---|
148 | <input type="checkbox" name="FBP_SOCIAL_PLUGIN_ACTIVITY_FEED_HEADER" {$social_plugin.activity_feed.HEADER} /> |
---|
149 | </label> |
---|
150 | </li> |
---|
151 | <li> |
---|
152 | <label> |
---|
153 | <span class="property">{'Show recommendations'|@translate}</span> |
---|
154 | <input type="checkbox" name="FBP_SOCIAL_PLUGIN_ACTIVITY_FEED_RECOMMENDATIONS" {$social_plugin.activity_feed.RECOMMENDATIONS} /> |
---|
155 | </label> |
---|
156 | </li> |
---|
157 | <li> |
---|
158 | <label> |
---|
159 | <span class="property">{'Height'|@translate}</span> |
---|
160 | <input type="text" size="3" maxlength="4" name="FBP_SOCIAL_PLUGIN_ACTIVITY_FEED_HEIGHT" value="{$social_plugin.activity_feed.HEIGHT}" /> |
---|
161 | </label> |
---|
162 | </li> |
---|
163 | </div> |
---|
164 | </ul> |
---|
165 | </fieldset> |
---|
166 | |
---|
167 | <fieldset> |
---|
168 | <legend><a href="{$social_plugin.like_box.FB_PAGE}" onclick="window.open(this.href); return false;">{'Like box'|@translate}</a></legend> |
---|
169 | <ul> |
---|
170 | <li> |
---|
171 | <label> |
---|
172 | <span class="property">{'Enabled'|@translate}</span> |
---|
173 | <input type="checkbox" name="FBP_SOCIAL_PLUGIN_LIKE_BOX_ENABLED" {$social_plugin.like_box.ENABLED} /> |
---|
174 | </label> |
---|
175 | </li> |
---|
176 | |
---|
177 | <div id='like_box'> |
---|
178 | <li> |
---|
179 | <label> |
---|
180 | <span class="property">{'Facebook Page URL'|@translate}</span> |
---|
181 | <input type="text" size="39" name="FBP_SOCIAL_PLUGIN_LIKE_BOX_URL" value="{$social_plugin.like_box.URL}" /> |
---|
182 | </label> |
---|
183 | </li> |
---|
184 | <li> |
---|
185 | <label> |
---|
186 | <span class="property">{'Color scheme'|@translate}</span> |
---|
187 | <select name="FBP_SOCIAL_PLUGIN_LIKE_BOX_COLORSCHEME" size="1"> |
---|
188 | {html_options options=$social_plugin.like_box.COLORSCHEME_OPTIONS selected=$social_plugin.like_box.COLORSCHEME_OPTIONS_SELECTED} |
---|
189 | </select> |
---|
190 | </label> |
---|
191 | </li> |
---|
192 | <li> |
---|
193 | <label> |
---|
194 | <span class="property">{'Show faces'|@translate}</span> |
---|
195 | <input type="checkbox" name="FBP_SOCIAL_PLUGIN_LIKE_BOX_SHOW_FACES" {$social_plugin.like_box.SHOW_FACES} /> |
---|
196 | </label> |
---|
197 | </li> |
---|
198 | <li> |
---|
199 | <label> |
---|
200 | <span class="property">{'Show stream'|@translate}</span> |
---|
201 | <input type="checkbox" name="FBP_SOCIAL_PLUGIN_LIKE_BOX_STREAM" {$social_plugin.like_box.STREAM} /> |
---|
202 | </label> |
---|
203 | </li> |
---|
204 | <li> |
---|
205 | <label> |
---|
206 | <span class="property">{'Show header'|@translate}</span> |
---|
207 | <input type="checkbox" name="FBP_SOCIAL_PLUGIN_LIKE_BOX_HEADER" {$social_plugin.like_box.HEADER} /> |
---|
208 | </label> |
---|
209 | </li> |
---|
210 | <li> |
---|
211 | <label> |
---|
212 | <span class="property">{'Height'|@translate}</span> |
---|
213 | <input type="text" size="3" maxlength="4" name="FBP_SOCIAL_PLUGIN_LIKE_BOX_HEIGHT" value="{$social_plugin.like_box.HEIGHT}" /> |
---|
214 | </label> |
---|
215 | </li> |
---|
216 | </div> |
---|
217 | </ul> |
---|
218 | </fieldset> |
---|
219 | <p><i>{'Other options are available by programming'|@translate}</i></p> |
---|
220 | {/if}{* isset $social_plugin*} |
---|
221 | |
---|
222 | {if isset($button)} |
---|
223 | <fieldset> |
---|
224 | <legend>{'Share'|@translate}</legend> |
---|
225 | <ul> |
---|
226 | <li> |
---|
227 | <label> |
---|
228 | <span class="property">{'Share picture page'|@translate}</span> |
---|
229 | <a class="HelptipTip" href="#" title="{'Add a icon link on each picture page to share on Facebook'|@translate}"><sup>{' (?)'|@translate}</sup></a> |
---|
230 | <input type="checkbox" name="FBP_SHARE_PICTURE" {$button.FBP_SHARE_PICTURE} /> |
---|
231 | </label> |
---|
232 | </li> |
---|
233 | <li> |
---|
234 | <label> |
---|
235 | <span class="property">{'Share album page'|@translate}</span> |
---|
236 | <a class="HelptipTip" href="#" title="{'Add a icon link on each album page to share on Facebook'|@translate}"><sup>{' (?)'|@translate}</sup></a> |
---|
237 | <input type="checkbox" name="FBP_SHARE_ALBUM" {$button.FBP_SHARE_ALBUM} /> |
---|
238 | </label> |
---|
239 | </li> |
---|
240 | </ul> |
---|
241 | </fieldset> |
---|
242 | <fieldset> |
---|
243 | <legend>{'Upload'|@translate}</legend> |
---|
244 | <ul> |
---|
245 | <li> |
---|
246 | <label> |
---|
247 | <span class="property">{'Upload picture'|@translate}</span> |
---|
248 | <a class="HelptipTip" href="#" title="{'Add a icon link on each picture page to upload image on Facebook'|@translate}"><sup>{' (?)'|@translate}</sup></a> |
---|
249 | <input type="checkbox" name="FBP_UPLOAD_PICTURE" {$button.FBP_UPLOAD_PICTURE} /> |
---|
250 | </label> |
---|
251 | </li> |
---|
252 | </fieldset> |
---|
253 | {/if}{* isset $button*} |
---|
254 | |
---|
255 | {if isset($advanced)} |
---|
256 | <fieldset> |
---|
257 | <legend>{'Options'|@translate}</legend> |
---|
258 | <ul> |
---|
259 | <li> |
---|
260 | <label> |
---|
261 | <span class="property">{'Facebook application identifient'|@translate}</span> |
---|
262 | <a class="HelptipTip" href="#" title="{'To fill only if you want to use a specific Facebook application. It\'s recommended to leave blank.'|@translate}"><sup>{' (?)'|@translate}</sup></a> |
---|
263 | <input type="text" size="15" name="FBP_FACEBOOK_APP_ID" value="{$advanced.FBP_FACEBOOK_APP_ID}" /> |
---|
264 | </label> |
---|
265 | </li> |
---|
266 | {* <li> |
---|
267 | <label> |
---|
268 | <span class="property">{'Asynchronous Facebook access'|@translate}</span> |
---|
269 | <a class="HelptipTip" href="#" title="{'Todo'|@translate}"><sup>{' (?)'|@translate}</sup></a> |
---|
270 | <input type="checkbox" name="FBP_ASYNC_SCRIPT" {$advanced.FBP_ASYNC_SCRIPT} /> |
---|
271 | </label> |
---|
272 | </li>*} |
---|
273 | <li> |
---|
274 | <label> |
---|
275 | <span class="property">{'Always initialize Facebook'|@translate}</span> |
---|
276 | <a class="HelptipTip" href="#" title="{'Useful for personal templates, plugins. A event if also defined for plugins.'|@translate}"><sup>{' (?)'|@translate}</sup></a> |
---|
277 | <input type="checkbox" name="FBP_FORCE_FACEBOOK_INIT" {$advanced.FBP_FORCE_FACEBOOK_INIT} /> |
---|
278 | </label> |
---|
279 | </li> |
---|
280 | <li> |
---|
281 | <label> |
---|
282 | <span class="property">{'Picture URL type'|@translate}</span> |
---|
283 | <a class="HelptipTip" href="#" title="{'Page type allows to reference the page and Facebook can get informations (title, ...). Image type allows to reference image url and Facebook cannot get informations but works always with private albums.'|@translate}"><sup>{' (?)'|@translate}</sup></a> |
---|
284 | <select name="FBP_PICTURE_URL_TYPE" size="1"> |
---|
285 | {html_options options=$advanced.FBP_PICTURE_URL_TYPE_OPTIONS selected=$advanced.FBP_PICTURE_URL_TYPE_OPTIONS_SELECTED} |
---|
286 | </select> |
---|
287 | </label> |
---|
288 | </li> |
---|
289 | <li> |
---|
290 | <label> |
---|
291 | <span class="property">{'Allow Facebook to see private page'|@translate}</span> |
---|
292 | <a class="HelptipTip" href="#" title="{'Recommended in order to Facebook get title, ... of your pages for wall display'|@translate}"><sup>{' (?)'|@translate}</sup></a> |
---|
293 | <input type="checkbox" name="FBP_ALLOW_FB_ACCESS_PRIVATE_PAGE" {$advanced.FBP_ALLOW_FB_ACCESS_PRIVATE_PAGE} /> |
---|
294 | </label> |
---|
295 | </li> |
---|
296 | </ul> |
---|
297 | </fieldset> |
---|
298 | <fieldset> |
---|
299 | <legend>{'Promote'|@translate}</legend> |
---|
300 | <ul class="OldVersion"> |
---|
301 | <li> |
---|
302 | <label> |
---|
303 | <span class="property">{'Add informations on about page'|@translate}</span> |
---|
304 | <a class="HelptipTip" href="#" title="{'Add a paragraph with Facebook link on about page'|@translate}"><sup>{' (?)'|@translate}</sup></a> |
---|
305 | <input type="checkbox" name="FBP_ADD_ABOUT_INFORMATIONS" {$advanced.FBP_ADD_ABOUT_INFORMATIONS} /> |
---|
306 | </label> |
---|
307 | </li> |
---|
308 | </ul> |
---|
309 | <ul> |
---|
310 | <li> |
---|
311 | <label> |
---|
312 | <span class="property">{'Add Facebook Piwigo group on footer'|@translate}</span> |
---|
313 | <a class="HelptipTip" href="#" title="{'Add a link on each page footer'|@translate}"><sup>{' (?)'|@translate}</sup></a> |
---|
314 | <input type="checkbox" name="FBP_ADD_GROUP_FOOTER" {$advanced.FBP_ADD_GROUP_FOOTER} /> |
---|
315 | </label> |
---|
316 | </li> |
---|
317 | </ul> |
---|
318 | <ul> |
---|
319 | <li> |
---|
320 | <label> |
---|
321 | <span class="property">{'Add Facebook Piwigo application on footer'|@translate}</span> |
---|
322 | <a class="HelptipTip" href="#" title="{'Add a link on each page footer'|@translate}"><sup>{' (?)'|@translate}</sup></a> |
---|
323 | <input type="checkbox" name="FBP_ADD_APPLICATION_FOOTER" {$advanced.FBP_ADD_APPLICATION_FOOTER} /> |
---|
324 | </label> |
---|
325 | </li> |
---|
326 | </ul> |
---|
327 | </fieldset> |
---|
328 | {/if}{* isset $advanced*} |
---|
329 | |
---|
330 | {if isset($activity)} |
---|
331 | <center> |
---|
332 | <div> |
---|
333 | <fb:activity |
---|
334 | width="550" |
---|
335 | height="950" |
---|
336 | recommendations="true" |
---|
337 | header="true" |
---|
338 | ></fb:activity> |
---|
339 | </center> |
---|
340 | {/if}{* isset $activity*} |
---|
341 | |
---|
342 | {if ! isset($activity)} |
---|
343 | <p> |
---|
344 | <input class="submit" type="submit" name="submit" value="{'Submit'|@translate}"> |
---|
345 | <input class="submit" type="reset" name="reset" value="{'Reset'|@translate}"> |
---|
346 | </p> |
---|
347 | {/if}{* isset $activity*} |
---|
348 | |
---|
349 | <p> |
---|
350 | {'Develop by'|@translate} <a href="{$FACEBOOK_PIWIGO_RUB_URL}" target="_bank">Ruben ARNAUD</a> |
---|
351 | - <a href="{$FACEBOOK_PIWIGO_GROUP_URL}" target="_bank">{'Join Facebook Piwigo group'|@translate}</a> |
---|
352 | - <a href="{$FACEBOOK_PIWIGO_APPLICATION_URL}" target="_bank">{'Via Facebook Piwigo application'|@translate}</a> |
---|
353 | <p> |
---|
354 | |
---|
355 | </form> |
---|
356 | |
---|
357 | <div id="dialog_modal_like_button_comments" title="{'Informations'|@translate}">{'Like button and comments cannot be enabled together'|@translate}</div> |
---|
358 | {*<div id="dialog_modal_can_close" title="{'Informations'|@translate}">{'Data are modified but not saved! Are you sure to quit this tabsheet?'|@translate}</div>*} |
---|
359 | |
---|
360 | {footer_script require='jquery.ui.dialog,jquery.tipTip'} |
---|
361 | {literal} |
---|
362 | function show_hide(checkbox_name, div_name) |
---|
363 | { |
---|
364 | if ($("input[name="+checkbox_name+"]").attr('checked')) |
---|
365 | { |
---|
366 | $("#"+div_name).show(); |
---|
367 | } |
---|
368 | else |
---|
369 | { |
---|
370 | $("#"+div_name).hide(); |
---|
371 | } |
---|
372 | } |
---|
373 | |
---|
374 | function inverse_check_value(checkbox_name_1, checkbox_name_2) |
---|
375 | { |
---|
376 | if ($("input[name="+checkbox_name_1+"]").attr('checked') && $("input[name="+checkbox_name_2+"]").attr('checked')) |
---|
377 | { |
---|
378 | $("input[name="+checkbox_name_1+"]").attr('checked', false); |
---|
379 | $("#dialog_modal_like_button_comments").dialog('open'); |
---|
380 | } |
---|
381 | } |
---|
382 | |
---|
383 | function init_checkbox(checkbox_name, div_name) |
---|
384 | { |
---|
385 | $("input[name="+checkbox_name+"]").click( |
---|
386 | function() |
---|
387 | { |
---|
388 | show_hide(checkbox_name, div_name); |
---|
389 | } |
---|
390 | ); |
---|
391 | show_hide(checkbox_name, div_name); |
---|
392 | } |
---|
393 | |
---|
394 | function init_checkbox_with_inverse_value(checkbox_name_1, checkbox_name_2) |
---|
395 | { |
---|
396 | $("input[name="+checkbox_name_1+"]").click( |
---|
397 | function() |
---|
398 | { |
---|
399 | inverse_check_value(checkbox_name_1, checkbox_name_2); |
---|
400 | } |
---|
401 | ); |
---|
402 | $("input[name="+checkbox_name_2+"]").click( |
---|
403 | function() |
---|
404 | { |
---|
405 | inverse_check_value(checkbox_name_2, checkbox_name_1); |
---|
406 | } |
---|
407 | ); |
---|
408 | } |
---|
409 | |
---|
410 | $(document).ready( |
---|
411 | function() |
---|
412 | { |
---|
413 | //Init all main checkbox |
---|
414 | init_checkbox_with_inverse_value("FBP_SOCIAL_PLUGIN_LIKE_BUTTON_ENABLED", "FBP_SOCIAL_PLUGIN_COMMENTS_ENABLED"); |
---|
415 | init_checkbox("FBP_SOCIAL_PLUGIN_LIKE_BUTTON_ENABLED", "like_button"); |
---|
416 | init_checkbox("FBP_SOCIAL_PLUGIN_FACEPILE_ENABLED", "facepile"); |
---|
417 | init_checkbox("FBP_SOCIAL_PLUGIN_COMMENTS_ENABLED", "comments"); |
---|
418 | init_checkbox("FBP_SOCIAL_PLUGIN_ACTIVITY_FEED_ENABLED", "activity_feed"); |
---|
419 | init_checkbox("FBP_SOCIAL_PLUGIN_LIKE_BOX_ENABLED", "like_box"); |
---|
420 | // Init message box |
---|
421 | $("#dialog_modal_like_button_comments").dialog({ |
---|
422 | autoOpen: false, modal: true, dialogClass: 'admin_config', // necessary to have a specific class because there are conflic with main menu accordeon |
---|
423 | buttons: { "{/literal}{'Continue'|@translate}{literal}": function() { $(this).dialog("close"); } }, |
---|
424 | }); |
---|
425 | $("#dialog_modal_can_close").dialog({ |
---|
426 | autoOpen: false, modal: true, dialogClass: 'admin_config', // necessary to have a specific class because there are conflic with main menu accordeon |
---|
427 | buttons: { "Cancel": function() { $(this).dialog("close"); }, "{/literal}{'Submit'|@translate}{literal}": function() { IsDataChanged = false; $(this).dialog("close"); } }, |
---|
428 | }); |
---|
429 | // Init help tips |
---|
430 | $('.HelptipTip').tipTip({ |
---|
431 | 'delay' : 0, |
---|
432 | 'fadeIn' : 200, |
---|
433 | 'fadeOut' : 200, |
---|
434 | }); |
---|
435 | {/literal} |
---|
436 | {if $FBP_OLD_VERSION} |
---|
437 | // Hide non compatible option |
---|
438 | $('.OldVersion').hide(); |
---|
439 | {/if} |
---|
440 | {* // Detect data change |
---|
441 | IsDataChanged = false; |
---|
442 | $("input, select").change(function() { IsDataChanged = true; }); |
---|
443 | //~ $(".tabsheet").click(function() |
---|
444 | $(window).unload(function() |
---|
445 | { |
---|
446 | if (IsDataChanged) |
---|
447 | { |
---|
448 | //~ alert($(this).attr("name")); |
---|
449 | //~ $("#dialog_modal_can_close").dialog( "option", "buttons", { "{/literal}{'Submit'|@translate}{literal}": function() { $(this).dialog("close"); } } ); |
---|
450 | $("#dialog_modal_can_close").dialog('open'); |
---|
451 | |
---|
452 | //~ return true; |
---|
453 | return false |
---|
454 | } |
---|
455 | else |
---|
456 | { |
---|
457 | return true; |
---|
458 | } |
---|
459 | //return ! IsDataChanged; |
---|
460 | }); |
---|
461 | *} |
---|
462 | {literal} |
---|
463 | }); |
---|
464 | {/literal} |
---|
465 | {/footer_script} |
---|