Changeset 7484 for main/waeup.sirp/trunk/src/waeup/sirp/applicants
- Timestamp:
- 16 Jan 2012, 07:06:21 (13 years ago)
- Location:
- main/waeup.sirp/trunk/src/waeup/sirp/applicants
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser.py
r7467 r7484 116 116 if len(deleted): 117 117 self.flash('Successfully removed: %s' % ', '.join(deleted)) 118 self.redirect(self.url(self.context, '@@manage') +'#tab-1')118 self.redirect(self.url(self.context, '@@manage')) 119 119 return 120 120 … … 131 131 @action('Add local role', validator=NullValidator) 132 132 def addLocalRole(self, **data): 133 return add_local_role(self, 2, **data)133 return add_local_role(self,3, **data) 134 134 135 135 @action('Remove selected local roles') 136 136 def delLocalRoles(self, **data): 137 return del_local_roles(self, 2,**data)137 return del_local_roles(self,3,**data) 138 138 139 139 class ApplicantsContainerAddFormPage(SIRPAddFormPage): … … 173 173 self.context[code] = container 174 174 self.flash('Added: "%s".' % code) 175 self.redirect(self.url(self.context, u'@@manage') +'#tab-1')175 self.redirect(self.url(self.context, u'@@manage')) 176 176 return 177 177 178 178 @action('Cancel', validator=NullValidator) 179 179 def cancel(self, **data): 180 self.redirect(self.url(self.context, '@@manage') + '#tab-1')180 self.redirect(self.url(self.context, '@@manage')) 181 181 182 182 class ApplicantsRootBreadcrumb(Breadcrumb): … … 252 252 datepicker.need() # Enable jQuery datepicker in date fields. 253 253 tabs.need() 254 self.tab1 = self.tab2 = self.tab3 = '' 255 qs = self.request.get('QUERY_STRING', '') 256 if not qs: 257 qs = 'tab1' 258 setattr(self, qs, 'active') 254 259 warning.need() 255 260 datatable.need() # Enable jQurey datatables for contents listing … … 283 288 else: 284 289 self.flash('No applicant selected!') 285 self.redirect(self.url(self.context, '@@manage')+' #tab-2')290 self.redirect(self.url(self.context, '@@manage')+'?tab2') 286 291 return 287 292 if not isinstance(child_id, list): … … 297 302 if len(deleted): 298 303 self.flash('Successfully removed: %s' % ', '.join(deleted)) 299 self.redirect(self.url(self.context, u'@@manage')+' #tab-2')304 self.redirect(self.url(self.context, u'@@manage')+'?tab2') 300 305 return 301 306 -
main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser_templates/applicantscontainermanagepage.pt
r7477 r7484 2 2 3 3 <ul class="tabs" data-tabs="tabs"> 4 <li class="active">4 <li tal:attributes="class view/tab1"> 5 5 <a href="#tab-1"> 6 6 <span>Settings 7 7 </span></a> 8 8 </li> 9 <li >9 <li tal:attributes="class view/tab2"> 10 10 <a href="#tab-2"> 11 11 <span>Applicants 12 12 </span></a> 13 13 </li> 14 <li >14 <li tal:attributes="class view/tab3"> 15 15 <a href="#tab-3"> 16 16 <span>Local Roles … … 19 19 </ul> 20 20 <div class="tab-content"> 21 <div id="tab-1" class="active">21 <div id="tab-1" tal:attributes="class view/tab1"> 22 22 <table class="form-table"> 23 23 <tbody> … … 53 53 </div> 54 54 </div> 55 <div id="tab-2" > <h3>Applicants</h3>55 <div id="tab-2" tal:attributes="class view/tab2"> <h3>Applicants</h3> 56 56 <table class="display dataTableManage"> 57 57 <thead> … … 100 100 </div> 101 101 </div> 102 <div id="tab-3" > <br />102 <div id="tab-3" tal:attributes="class view/tab3"> <br /> 103 103 <table class="display dataTableManage"> 104 104 <thead> -
main/waeup.sirp/trunk/src/waeup/sirp/applicants/tests/test_browser.py
r7436 r7484 254 254 self.browser.open(self.add_container_path) 255 255 self.browser.getControl("Cancel").click() 256 self.assertEqual(self.browser.url, self.manage_root_path + '#tab-1')256 self.assertEqual(self.browser.url, self.manage_root_path) 257 257 self.browser.open(self.add_container_path) 258 258 self.browser.getControl(name="form.prefix").value = ['app']
Note: See TracChangeset for help on using the changeset viewer.