Resolved the issue of jquery tabs not showing up content.

This commit is contained in:
Armanveer Gill 2025-01-22 00:47:58 -05:00
parent 6b2394d4e0
commit a96799d516
8 changed files with 111 additions and 63 deletions

View File

@ -612,26 +612,39 @@ $(document).ready(function() {
});
$("#editor_tabs").tabs({
show: function(event, ui) {
switch(ui.panel.id) {
case 'editor_tab_awardinfo':
update_awardinfo();
break;
case 'editor_tab_eligibility':
update_eligibility();
break;
case 'editor_tab_prizes':
update_prizeinfo();
break;
case 'editor_tab_feeder':
update_feeder();
break;
}
return true;
},
collapsible: true,
selected: -1 /* None selected */
});
create: function( event, ui ) {
update_awardinfo();
update_eligibility();
update_prizeinfo();
update_feeder();
},
collapsible: true,
selected: -1
});
// $("#editor_tabs").tabs({
// show: function(event, ui) {
// switch(ui.panel.id) {
// case 'editor_tab_awardinfo':
// update_awardinfo();
// break;
// case 'editor_tab_eligibility':
// update_eligibility();
// break;
// case 'editor_tab_prizes':
// update_prizeinfo();
// break;
// case 'editor_tab_feeder':
// update_feeder();
// break;
// }
// return true;
// },
// collapsible: true,
// selected: -1 /* None selected */
// });
});

View File

@ -600,27 +600,41 @@ function managecampaignsfinish() {
}
function managecampaignfinish() {
$("#campaign_tabs").tabs({
show: function(event, ui) {
switch(ui.panel.id) {
case 'campaign_tab_overview':
update_tab_overview();
break;
case 'campaign_tab_donations':
update_tab_donations();
break;
case 'campaign_tab_prospects':
$("#editor_tabs").tabs({
create: function( event, ui ) {
update_tab_overview();
update_tab_donations();
update_tab_prospects();
break;
case 'campaign_tab_communications':
update_tab_communications();
break;
}
},
selected: 0
});
update_tab_communications();
},
selected: 0
});}
// function managecampaignfinish() {
// $("#campaign_tabs").tabs({
// show: function(event, ui) {
// switch(ui.panel.id) {
// case 'campaign_tab_overview':
// update_tab_overview();
// break;
// case 'campaign_tab_donations':
// update_tab_donations();
// break;
// case 'campaign_tab_prospects':
// update_tab_prospects();
// break;
// case 'campaign_tab_communications':
// update_tab_communications();
// break;
// }
// },
// selected: 0
// });}
}
function campaigninfo_save(id) {
//if we're creating we need to do the post, and get the id it returns, so we can re-open the popup window with that id

View File

@ -344,23 +344,34 @@
$(document).ready(function() {
$("#editor_tabs").tabs({
show: function(event, ui) {
switch(ui.panel.id) {
case 'editor_tab_levels':
update_levels();
break;
case 'editor_tab_goals':
update_goals();
break;
break;
case 'editor_tab_setup':
update_setup();
break;
break;
}
},
selected: 0
});
create: function( event, ui ) {
update_levels();
update_goals();
update_setup();
},
selected: 0
});
// $("#editor_tabs").tabs({
// show: function(event, ui) {
// switch(ui.panel.id) {
// case 'editor_tab_levels':
// update_levels();
// break;
// case 'editor_tab_goals':
// update_goals();
// break;
// break;
// case 'editor_tab_setup':
// update_setup();
// break;
// break;
// }
// },
// selected: 0
// });
// $("#organizationinfo_fundingselectiondate").datepicker({ dateFormat: 'yy-mm-dd', showOn: 'button', buttonText: "<?=i18n("calendar")?>" });

View File

@ -27,6 +27,8 @@
user_auth_required('committee', 'admin');
require_once('judges.inc.php');
$action = null;
$round_str = array('timeslot' => 'Judging Timeslot',
'divisional1' => 'Divisional Round 1',
'divisional2' => 'Divisional Round 2',

View File

@ -312,8 +312,16 @@ $(document).ready(function() {
});
$("#editor_tabs").tabs({
create: function( event, ui ) {
update_students();
update_project();
update_reg();
},
selected: -1
});
/*$("#editor_tabs").tabs({
show: function(event, ui) {
console.log('hi');
switch(ui.panel.id) {
@ -331,7 +339,7 @@ $(document).ready(function() {
}
},
selected: -1
});
});*/
$("#newproject").on("click", (function() {
popup_editor(-1);

View File

@ -28,9 +28,9 @@ header("Content-Type: text/html; charset=utf8");
include_once("helper.inc.php");
//set error reporting to not show notices, for some reason some people's installation dont set this by default
//so we will set it in the code instead just to make sure
#error_reporting(E_ALL);
error_reporting(E_ALL);
#error_reporting( E_ALL ^ E_WARNING );
error_reporting( E_ALL ^ E_WARNING ^ E_NOTICE ^ E_DEPRECATED );
#error_reporting( E_ALL ^ E_WARNING ^ E_NOTICE ^ E_DEPRECATED );
define('REQUIREDFIELD','<span class="requiredfield">*</span>');

View File

@ -158,7 +158,7 @@ function config_editor_handle_actions($category, $year, $array_name)
switch($config_vars[$k]['type']) {
case 'number':
if(ereg("[0-9]+(\.[0-9]+)?", $val, $regs)) {
if(preg_match("[0-9]+(\.[0-9]+)?", $val, $regs)) {
$val = $regs[0];
} else {
$val = 0;

View File

@ -11,7 +11,7 @@ body
padding: 0;
background: #E0E0FF;
background: #e0e0ff;
overflow-x:hidden;
height:100%;
}
@ -23,7 +23,7 @@ input, textarea, select
}
table{
overflow:scroll;
overflow-x:scroll;
}