diff --git a/application/modules/bulletin/models/RepositoryModel.php b/application/modules/bulletin/models/RepositoryModel.php index eb5eeb1d8aae682e96880b3f1714b6633b20adc7..42b1e0d013529d3631cd37a8c998dcf1e57ffefb 100644 --- a/application/modules/bulletin/models/RepositoryModel.php +++ b/application/modules/bulletin/models/RepositoryModel.php @@ -221,8 +221,6 @@ class Bulletin_RepositoryModel public function getFilePathForCollegeMajorYear($college, $major, $year) { - $college = strtr($college, array('/' => '-')); - $major = strtr($major, array('/' => '-')); $year = intval($year); $xhtmlFiles = array(); diff --git a/application/modules/bulletin/models/SectionModel.php b/application/modules/bulletin/models/SectionModel.php index e0f12838d38f6997d263e5d9a0d25dccfbc56f86..e0e8ca249ef88ee18058e2e7027bedaf3d335c89 100644 --- a/application/modules/bulletin/models/SectionModel.php +++ b/application/modules/bulletin/models/SectionModel.php @@ -473,7 +473,7 @@ class Bulletin_SectionModel extends Unl_Model 'undergraduateTransferCreditPolicy' => 'Undergraduate Transfer Credit Policy', 'transferCreditPractices' => 'Transfer Credit Practices', 'aCreditPresentedForTransferFromWithinTheUniversityOfNebraskaSystem' => 'A. Credit presented for transfer from within the University of Nebraska System', - 'bInterinstitutionalAgreements' => 'B. Inter-institutional Agreements', + 'bInterInstitutionalAgreements' => 'B. Inter-institutional Agreements', 'cCreditPresentedForTransferWhichRequiresAdditionalReviewByTheDegreeCollege' => 'C. Credit presented for transfer which requires additional review by the degree college', 'specialSituationsQualificationsAndLimitationsRelatedToTransferOfCredit' => 'Special Situations, Qualifications, and Limitations related to Transfer of Credit', ), diff --git a/application/modules/fouryearplans/controllers/NewController.php b/application/modules/fouryearplans/controllers/NewController.php index 50251ee9825c8045fdb231dea5961d47c083f92d..27504980982f81cc91b38d9c11a8be56383e43f1 100644 --- a/application/modules/fouryearplans/controllers/NewController.php +++ b/application/modules/fouryearplans/controllers/NewController.php @@ -35,7 +35,7 @@ class FourYearPlans_NewController extends Creq_Controller_Action $request->setOwner($user); $request->setJustification('--None Required--'); - $fourYearPlan = FourYearPlans_FourYearPlanModel::findByMajor($in['major']); + $fourYearPlan = FourYearPlans_FourYearPlanModel::findByMajorId($in['major']); if (!$fourYearPlan) { $fourYearPlan = FourYearPlans_FourYearPlanModel::fetchNew(); $fourYearPlan->setMajorId($in['major']); diff --git a/application/modules/fouryearplans/models/FourYearPlanModel.php b/application/modules/fouryearplans/models/FourYearPlanModel.php index b634c88966f978313168ce5ffd2924e8025cd6cc..3db008bc4227327384e0e8ff6c1dd597150889cf 100644 --- a/application/modules/fouryearplans/models/FourYearPlanModel.php +++ b/application/modules/fouryearplans/models/FourYearPlanModel.php @@ -278,15 +278,14 @@ class FourYearPlans_FourYearPlanModel extends Unl_Model return self::find($generationIds); } - static public function findByMajor($major) + static public function findByMajorId($majorId) { $db = Zend_Registry::get('db'); $select = new Zend_Db_Select($db); $select->from(array('g' => 'creqFourYearPlanGenerations'), array('fourYearPlanGenerationId')); - $select->join(array('m' => 'creqMajors'), 'g.majorId = m.majorId', array('major' => 'name')); $select->join(array('f' => 'creqFourYearPlans'), 'g.fourYearPlanGenerationId = f.currentGeneration', array()); - $select->where('m.name = ?', $major); + $select->where('g.majorId = ?', $majorId); $records = $select->query()->fetchAll(); if (count($records) == 0) { diff --git a/application/modules/fouryearplans/views/scripts/edit/index.phtml b/application/modules/fouryearplans/views/scripts/edit/index.phtml index d22771a68647223d50cf591496f2fe6c7448bf24..3ca18ba6e90c839125fb23f58dc170d2b3a1593a 100644 --- a/application/modules/fouryearplans/views/scripts/edit/index.phtml +++ b/application/modules/fouryearplans/views/scripts/edit/index.phtml @@ -26,7 +26,12 @@ $stubConcentrations = array('stub' => '+'); <ul class="wdn_tabs"> <?php foreach ($this->fourYearPlan->getConcentrations() + $stubConcentrations as $concentrationId => $concentration) { ?> - <li><a href="#concentration-<?php echo $concentrationId; ?>"><?php echo $this->escape($concentration); ?></a></li> + <li> + <a href="#concentration-<?php echo $concentrationId; ?>"> + <span class="name"><?php echo $this->escape($concentration); ?></span> + <span class="minibutton remove">x</span> + </a> + </li> <?php } ?> </ul> <div class="wdn_tabs_content"> diff --git a/document_root/css/fouryearplans/edit.css b/document_root/css/fouryearplans/edit.css index 352a80fecc440b9034b651f32774edf3c270ffda..d5053c1316b6658e67cb173333299e4a636c2c65 100644 --- a/document_root/css/fouryearplans/edit.css +++ b/document_root/css/fouryearplans/edit.css @@ -1,2 +1,15 @@ .input-hours {width: 3em;} .semester td {white-space: nowrap;} +a[href="#concentration-stub"] span.minibutton {display: none;} +.minibutton.remove { + margin-right: -0.4em; + padding: 0 0.4em; + border: 1px solid transparent; + border-radius: 1em; + color: #888; +} +.minibutton.remove:hover { + border-color: #c44; + background-color: #fcc; + color: #c44; +} diff --git a/document_root/javascript/fouryearplans/edit.js b/document_root/javascript/fouryearplans/edit.js index 873cec37c40bcd1f34b4c05f0efc9adba4aa4b09..ac301fc975539ca7b073b2ad84836f08b732b5fa 100644 --- a/document_root/javascript/fouryearplans/edit.js +++ b/document_root/javascript/fouryearplans/edit.js @@ -102,6 +102,7 @@ WDN.jQuery(function() { var newTabIndex = 0; + WDN.tabs.useHashChange = false; WDN.jQuery('ul.wdn_tabs').on('tabchanged', function() { var selectedTab = WDN.jQuery(this).find('.selected'); if (selectedTab.find('a').attr('href') != '#concentration-stub') { @@ -114,7 +115,7 @@ WDN.jQuery(function() { selectedTab.before(newTab); newTab.find('a').attr('href', '#concentration-new' + newTabIndex); - newTab.find('a').text('New Concentration'); + newTab.find('a span.name').text('New Concentration'); var stubContent = WDN.jQuery('#concentration-stub'); var newContent = stubContent.clone(); @@ -138,9 +139,17 @@ WDN.jQuery(function() { newTab.find('a').trigger('click'); }, 50); }); + WDN.jQuery('ul.wdn_tabs').on('click', '.minibutton.remove', function() { + var tab = WDN.jQuery(this).parent().parent(); + var content = WDN.jQuery(tab.find('a').attr('href')); + + tab.remove(); + content.remove(); + return false; + }); WDN.jQuery('.wdn_tabs_content').on('keyup', '.concentration-name', function() { - WDN.jQuery('.wdn_tabs .selected a').text(this.value); + WDN.jQuery('.wdn_tabs .selected a span.name').text(this.value); }) WDN.jQuery('.semester').on('click', '.course-row .text-hours', function() {