Changeset 2250
- Timestamp:
- 30/10/08 19:46:20 (1 year ago)
- Files:
-
- cherokee/trunk/ChangeLog (modified) (1 diff)
- cherokee/trunk/admin/Page.py (modified) (4 diffs)
- cherokee/trunk/admin/server.py (modified) (1 diff)
- cherokee/trunk/admin/static/css/cherokee.css (modified) (1 diff)
- cherokee/trunk/admin/static/js/common.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
cherokee/trunk/ChangeLog
r2248 r2250 1 2008-10-29 Taher Shihadeh <taher@unixwars.com> 1 2008-10-30 Antonio Perez <aperez@skarcha.com> 2 3 * admin/server.py, admin/Page.py, admin/static/css/cherokee.css, 4 admin/static/js/common.js: Config changes now use AJAX. 5 http://code.google.com/p/cherokee/issues/detail?id=162 6 7 2008-10-30 Taher Shihadeh <taher@unixwars.com> 2 8 3 9 * admin/Makefile.am: we missed installing a file for the new cherokee/trunk/admin/Page.py
r2205 r2250 12 12 </div> 13 13 <div id="workarea"><div id="workarea-inner"> 14 <div id="save_changes_msg"></div> 14 15 %(content)s 15 16 </div></div> … … 26 27 </div> 27 28 <div id="workarea"><div id="workarea-inner"> 29 <div id="save_changes_msg"></div> 28 30 %(content)s 29 31 </div></div> … … 61 63 62 64 <div style="float: center; padding-top: 4px;"> 63 <a class="button" href="#" onclick=" this.blur(); $('#form-apply').submit(); return false;"><span>Save</span></a>65 <a class="button" href="#" onclick="javascript: save_config()"><span>Save</span></a> 64 66 </div> 65 67 </form> … … 72 74 MENU_SAVE_IS_ALIVE = """ 73 75 <div style="padding-top: 2px;"> 74 <select name="restart" >76 <select name="restart" id="restart"> 75 77 <option value="graceful">Graceful restart</option> 76 78 <option value="hard">Hard restart</option> cherokee/trunk/admin/server.py
r2210 r2250 99 99 elif uri.startswith('/source'): 100 100 page = PageInfoSource(cfg) 101 elif uri.startswith('/apply_ajax'): 102 self.handle_post() 103 post = Post(self.post) 104 post_restart = post.get_val('restart') 105 106 manager = cherokee_management_get (cfg) 107 manager.save (restart = post_restart) 108 cherokee_management_reset() 109 110 body = "Configuration saved." 111 if post_restart == 'graceful': 112 body += ' Server gracefuly restarted.' 113 elif post_restart == 'hard': 114 body += ' Server hard restarted.' 115 101 116 elif uri.startswith('/apply'): 102 117 self.handle_post() cherokee/trunk/admin/static/css/cherokee.css
r2075 r2250 42 42 #workarea-inner { 43 43 padding: 1.5em 1em; 44 } 45 46 #save_changes_msg { 47 display: none; 48 padding: 15px 10px; 49 margin: 0px 0px 5px; 50 background-color: #ffc7c7; 51 color: #000; 52 border-top: 1px solid #b00; 53 border-bottom: 1px solid #b00; 54 font-weight: bold; 55 text-align: center; 44 56 } 45 57 cherokee/trunk/admin/static/js/common.js
r2196 r2250 93 93 } 94 94 ); 95 } 96 97 function save_config() 98 { 99 var post = "restart=" + $("#restart").val(); 100 101 jQuery.post("/apply_ajax", post, 102 function (data, textStatus) { 103 $("#save_changes_msg").html(data); 104 $("#save_changes_msg").fadeIn("slow"); 105 setTimeout('$("#save_changes_msg").fadeOut("slow")', 5000); 106 } 107 ); 95 108 } 96 109