Changeset 1056 for trunk/web-app
- Timestamp:
- Nov 3, 2010, 12:58:27 PM (12 years ago)
- Location:
- trunk/web-app
- Files:
-
- 6 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/web-app/css/templateEditor.css
r1027 r1056 110 110 } 111 111 112 .sorting_asc { 113 background:url("../images/icons/sort_asc.png") no-repeat scroll right center transparent; 114 } 115 .sorting_desc { 116 background:url("../images/icons/sort_desc.png") no-repeat scroll right center transparent; 117 } 118 .sorting { 119 background:url("../images/icons/sort_both.png") no-repeat scroll right center transparent; 120 } 121 .sorting_asc_disabled { 122 background:url("../images/icons/sort_asc_disabled.png") no-repeat scroll right center transparent; 123 } 124 .sorting_desc_disabled { 125 background:url("../images/icons/sort_desc_disabled.png") no-repeat scroll right center transparent; 126 } 127 128 #compare_templates th {white-space: nowrap;} 129 .longTitle { display: none; } 112 130 113 131 -
trunk/web-app/js/templateEditor.js
r996 r1056 55 55 } 56 56 57 58 /** 59 * Clears the form after adding a template 60 */ 61 function clearTemplateForm( id ) { 62 $( '#template_' + id + '_form input#name' ).val( "" ); 63 $( '#template_' + id + '_form textarea' ).val( "" ); 64 } 65 57 66 /** 58 67 * Creates a new template using AJAX … … 70 79 type: "POST", 71 80 success: function(data, textStatus, request) { 72 hideTemplateForm( id ); 81 clearTemplateForm( id ); 82 hideTemplateForm( id ); 73 83 addTemplateListItem( data.id, data.html ); 74 84 }, … … 236 246 237 247 /** 248 * Clears the form to add a template field after adding one 249 */ 250 function clearTemplateFieldForm( id ) { 251 $( '#templateField_' + id + '_form input#name' ).val( "" ); 252 $( '#templateField_' + id + '_form input#unit' ).val( "" ); 253 $( '#templateField_' + id + '_form input#required' ).attr( "checked", "" ); 254 $( '#templateField_' + id + '_form textarea' ).val( "" ); 255 $( '#templateField_' + id + '_form select' ).attr( 'selectedIndex', 0 ); 256 $( '#templateField_' + id + '_form .extra' ).hide(); 257 } 258 259 /** 238 260 * Adds a new template field using AJAX 239 261 */ … … 251 273 type: "POST", 252 274 success: function(data, textStatus, request) { 275 clearTemplateFieldForm( id ); 253 276 hideTemplateFieldForm( id ); 254 277 addFieldListItem( data.id, data.html );
Note: See TracChangeset
for help on using the changeset viewer.