Changeset 8331 for extensions/FacebookPlug/Plugin/tpl/admin.config.tpl
- Timestamp:
- Dec 28, 2010, 12:15:48 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/FacebookPlug/Plugin/tpl/admin.config.tpl
r8298 r8331 1 {known_script id="jquery" src=$ROOT_URL|@cat:"themes/default/js/jquery.packed.js"} 2 {known_script id="jquery.ui" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.core.packed.js"} 3 {known_script id="jquery.ui.dialog" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.dialog.packed.js"} 4 5 {* 6 {html_head} 7 <link rel="stylesheet" type="text/css" href="{$FBP_PATH|@cat:'/css/admin.config.css'}"> 8 {/html_head} 9 *} 10 11 {*html_head} 12 <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/base/jquery-ui.css"> 13 {/html_head*} 14 1 15 <div class="titrePage"> 2 16 <h2>FacebookPlug</h2> … … 4 18 <br> 5 19 6 <form method="post" class="properties"> 7 20 <form method="post" class="properties" action="{$FBP_ACTION}"> 8 21 {if isset($social_plugin)} 9 <fieldset> 10 <ul> 11 <h3><a href="{$social_plugin.like_button.FB_PAGE}" onclick="window.open(this.href); return false;">{'Like button'|@translate}</a> {'on picture pages'|@translate}</h3> 22 <h3>{'On picture pages'|@translate}</h3> 23 <fieldset> 24 <legend><a href="{$social_plugin.like_button.FB_PAGE}" onclick="window.open(this.href); return false;">{'Like button'|@translate}</a></legend> 25 <ul> 12 26 <li> 13 27 <label> … … 53 67 54 68 <fieldset> 55 < ul>56 <h3><a href="{$social_plugin.facepile.FB_PAGE}" onclick="window.open(this.href); return false;">{'Facepile'|@translate}</a> {'on slideshow pages'|@translate}</h3>69 <legend><a href="{$social_plugin.facepile.FB_PAGE}" onclick="window.open(this.href); return false;">{'Facepile'|@translate}</a> {'on slideshow pages'|@translate}</legend> 70 <ul> 57 71 <li> 58 72 <label> … … 74 88 75 89 <fieldset> 76 < ul>77 <h3><a href="{$social_plugin.comments.FB_PAGE}" onclick="window.open(this.href); return false;">{'Comments'|@translate}</a> {'on picture pages'|@translate}</h3>90 <legend><a href="{$social_plugin.comments.FB_PAGE}" onclick="window.open(this.href); return false;">{'Comments'|@translate}</a></legend> 91 <ul> 78 92 <li> 79 93 <label> … … 118 132 </fieldset> 119 133 120 <fieldset> 121 <ul> 122 <h3><a href="{$social_plugin.like_box.FB_PAGE}" onclick="window.open(this.href); return false;">{'Like box'|@translate}</a> {'on main pages'|@translate}</h3> 134 <h3>{'On menu of main pages'|@translate}</h3> 135 <fieldset> 136 <legend><a href="{$social_plugin.like_box.FB_PAGE}" onclick="window.open(this.href); return false;">{'Like box'|@translate}</a></legend> 137 <ul> 123 138 <li> 124 139 <label> … … 168 183 {if isset($advanced)} 169 184 <fieldset> 185 <legend>{'Options'|@translate}</legend> 170 186 <ul> 171 187 <li> … … 207 223 </form> 208 224 225 <div id="dialog_modal_like_button_comments" title="{'Informations'|@translate}">{'Like button and comments cannot be enabled together'|@translate}</div> 226 {*<div id="dialog_modal_can_close" title="{'Informations'|@translate}">{'Data are modified but not saved! Are you sure to quit this tabsheet?'|@translate}</div>*} 227 209 228 {literal} 210 229 <script type="text/javascript"> 211 230 function show_hide(checkbox_name, div_name) 212 231 { 213 if ( jQuery("input[name="+checkbox_name+"]").attr('checked'))232 if ($("input[name="+checkbox_name+"]").attr('checked')) 214 233 { 215 jQuery("#"+div_name).show();234 $("#"+div_name).show(); 216 235 } 217 236 else 218 237 { 219 jQuery("#"+div_name).hide();238 $("#"+div_name).hide(); 220 239 } 221 240 } 222 241 242 function inverse_check_value(checkbox_name_1, checkbox_name_2) 243 { 244 if ($("input[name="+checkbox_name_1+"]").attr('checked') && $("input[name="+checkbox_name_2+"]").attr('checked')) 245 { 246 $("input[name="+checkbox_name_1+"]").attr('checked', false); 247 $("#dialog_modal_like_button_comments").dialog('open'); 248 } 249 } 250 223 251 function init_checkbox(checkbox_name, div_name) 224 252 { 225 jQuery("input[name="+checkbox_name+"]").click(253 $("input[name="+checkbox_name+"]").click( 226 254 function() 227 255 { … … 232 260 } 233 261 234 jQuery(document).ready( 262 function init_checkbox_with_inverse_value(checkbox_name_1, checkbox_name_2) 263 { 264 $("input[name="+checkbox_name_1+"]").click( 265 function() 266 { 267 inverse_check_value(checkbox_name_1, checkbox_name_2); 268 } 269 ); 270 $("input[name="+checkbox_name_2+"]").click( 271 function() 272 { 273 inverse_check_value(checkbox_name_2, checkbox_name_1); 274 } 275 ); 276 } 277 278 $(document).ready( 235 279 function() 236 280 { 237 281 //Init all main checkbox 282 init_checkbox_with_inverse_value("FBP_SOCIAL_PLUGIN_LIKE_BUTTON_ENABLED", "FBP_SOCIAL_PLUGIN_COMMENTS_ENABLED"); 238 283 init_checkbox("FBP_SOCIAL_PLUGIN_LIKE_BUTTON_ENABLED", "like_button"); 239 284 init_checkbox("FBP_SOCIAL_PLUGIN_FACEPILE_ENABLED", "facepile"); 240 285 init_checkbox("FBP_SOCIAL_PLUGIN_COMMENTS_ENABLED", "comments"); 241 286 init_checkbox("FBP_SOCIAL_PLUGIN_LIKE_BOX_ENABLED", "like_box"); 287 // Init message box 288 $("#dialog_modal_like_button_comments").dialog({ 289 autoOpen: false, modal: true, dialogClass: 'admin_config', // necessary to have a specific class because there are conflic with main menu accordeon 290 buttons: { "{/literal}{'Continue'|@translate}{literal}": function() { $(this).dialog("close"); } }, 291 }); 292 $("#dialog_modal_can_close").dialog({ 293 autoOpen: false, modal: true, dialogClass: 'admin_config', // necessary to have a specific class because there are conflic with main menu accordeon 294 buttons: { "Cancel": function() { $(this).dialog("close"); }, "{/literal}{'Submit'|@translate}{literal}": function() { IsDataChanged = false; $(this).dialog("close"); } }, 295 }); 296 // Detect data change 297 /*IsDataChanged = false; 298 $("input, select").change(function() { IsDataChanged = true; }); 299 //~ $(".tabsheet").click(function() 300 $(window).unload(function() 301 { 302 if (IsDataChanged) 303 { 304 //~ alert($(this).attr("name")); 305 //~ $("#dialog_modal_can_close").dialog( "option", "buttons", { "{/literal}{'Submit'|@translate}{literal}": function() { $(this).dialog("close"); } } ); 306 $("#dialog_modal_can_close").dialog('open'); 307 308 //~ return true; 309 return false 310 } 311 else 312 { 313 return true; 314 } 315 //return ! IsDataChanged; 316 });*/ 242 317 }); 243 318
Note: See TracChangeset
for help on using the changeset viewer.