Changeset 250 for trunk/web-app/js
- Timestamp:
- Mar 9, 2010, 2:16:07 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/web-app/js/wizard.js
r247 r250 26 26 27 27 // attach Tooltips 28 insertOnRedirectWarning(); 28 29 onWizardPage(); 29 30 }); … … 44 45 // accordeon(s) 45 46 $("#accordion").accordion(); 47 } 48 49 // insert a redirect confirmation dialogue to all anchors leading the 50 // user away from the wizard 51 function insertOnRedirectWarning() { 52 // find all anchors that lie outside the wizard 53 $('a').each(function() { 54 var element = $(this) 55 var re = /^#/gi; 56 57 if (!element.attr('href').match(/^#/gi) && !element.attr('href').match(/\/([^\/]+)\/wizard\/pages/gi)) { 58 // bind a warning to the onclick event 59 element.bind('click',function() { 60 return confirm('Warning: navigating away from the wizard causes loss of work and unsaved data. Are you sure you want to continue?'); 61 }) 62 } 63 }) 46 64 } 47 65 … … 117 135 // add datepickers to date fields 118 136 function attachDatePickers() { 119 $('div#wizard').find("input[type=text][ name$='Date']").each(function() {137 $('div#wizard').find("input[type=text][rel$='date']").each(function() { 120 138 $(this).datepicker({ 121 139 dateFormat : 'dd/mm/yy', … … 128 146 // add datetimepickers to date fields 129 147 function attachDateTimePickers() { 130 $('div#wizard').find("input[type=text][ name$='Time']").each(function() {148 $('div#wizard').find("input[type=text][rel$='datetime']").each(function() { 131 149 $(this).datepicker({ 132 150 dateFormat : 'dd/mm/yy',
Note: See TracChangeset
for help on using the changeset viewer.