Changeset 11024
- Timestamp:
- 01/19/11 14:49:43 (2 years ago)
- Files:
-
- modules/branches/2.9/core/advancedsettings.js (modified) (3 diffs)
- modules/branches/2.9/core/page.advancedsettings.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
modules/branches/2.9/core/advancedsettings.js
r11014 r11024 41 41 if (data.saved) { 42 42 mythis.parent().delay(500).fadeOut(); 43 } 44 43 mythis.unbind('click', savebinder); 44 45 // If they changed the page layout 46 switch (mykey) { 47 case 'AS_DISPLAY_DETAIL_LEVEL': 48 case 'AS_DISPLAY_HIDDEN_SETTINGS': 49 case 'AS_DISPLAY_READONLY_SETTINGS': 50 if (page_reload_check()) { 51 location.href=location.href; 52 } else { 53 alert(msgChangesRefresh); 54 } 55 break; 56 } 57 } 45 58 //reset data-valueinput-orig to new value 46 59 switch (mythis.attr('data-type')) { … … 56 69 alert('Ajax Web ERROR: When saving key ' + mykey + ': ' + textStatus); 57 70 } 58 59 71 }) 60 72 } … … 87 99 } 88 100 }) 89 101 $("#page_reload").click(function(){ 102 if (!page_reload_check()) { 103 if (!confirm(msgUnsavedChanges)) { 104 return false; 105 } 106 } 107 location.href=location.href; 108 }); 90 109 }); 91 110 111 function page_reload_check(msgUnsavedChanges) { 112 var reload = true; 113 $(".save").each(function() { 114 if ($(this).data("events") != undefined) { 115 reload = false; 116 return false; 117 } 118 }); 119 return reload; 120 } modules/branches/2.9/core/page.advancedsettings.php
r11014 r11024 24 24 echo '<script type="text/javascript">'; 25 25 echo 'can_write_amportalconf = ' . $amportal_canwrite . '; '; 26 echo 'amportalconf_error ="' . _("You must run 'amportal restart' from the Linux command line before you can save setting here.") . '"'; 26 echo 'amportalconf_error = "' . _("You must run 'amportal restart' from the Linux command line before you can save setting here.") . '";'; 27 echo 'msgUnsavedChanges = "' . _("You have un-saved changes, press OK to disregard changes and reload page or Cancel to abort.") . '";'; 28 echo 'msgChangesRefresh = "' . _("Your Display settings have been changed, click on 'Refresh Page' to view the affects of your changes once you have saved other outstanding changes that are still un-confirmed.") . '";'; 27 29 echo '</script>'; 28 30 … … 127 129 128 130 // Ugly, but I need to display the whole help text within the page 129 echo "<br><br><br><br></div>"; 131 ?> 132 <br /><br /> <br /> 133 <input type="button" id="page_reload" value="Refresh Page"/> 134 <br /><br /><br /><br /></div> 130 135 131 ?>
