Commit e95e8bc9 authored by Eric Bremner's avatar Eric Bremner
Browse files

ISTWCMS-1983: Removing unused code and javascript that is no longer required.

parent ded7dc60
...@@ -15,42 +15,15 @@ ...@@ -15,42 +15,15 @@
} }
}); });
//console.log($('#biblio-search-form #edit-search-form')); // If there is a biblio header remove the [ and ].
if($('#biblio-search-form #edit-search-form').length > 0) { if($('#content #biblio-header').length > 0) {
$('#biblio-search-form #edit-search-form').removeClass('collapsed');
}
var oldhtml = jQuery('#content #biblio-header').html(); // Remove the [ and ] from the biblio sort links.
var oldhtml = $('#content #biblio-header').html();
var newhtml = oldhtml.replace(/\[/g, ''); var newhtml = oldhtml.replace(/\[/g, '');
newhtml = newhtml.replace(/\]/g, ''); newhtml = newhtml.replace(/\]/g, '');
jQuery('#content #biblio-header').html(newhtml); $('#content #biblio-header').html(newhtml);
}
//$("#biblio-header a:not([title='Click to download the BibTEX formatted file'], [title='Click to download the EndNote XML formatted file'], [title='Click to download the EndNote Tagged formatted file']), #biblio-header img").not('.ctools-dropdown-link.ctools-dropdown-text-link').wrapAll('<div id="newlinks"></div>');
$('#biblio-header').append($('#newlinks'));
$("#biblio-header a:not([title='Click to download the BibTEX formatted file'], [title='Click to download the EndNote XML formatted file'], [title='Click to download the EndNote Tagged formatted file']), #biblio-header img").not('.ctools-dropdown-link.ctools-dropdown-text-link').wrapAll('<div id="newlinks"></div>');
$('#biblio-header #newlinks').wrap('<fieldset class="" id="edit-sort-form"></fieldset>');
$('#biblio-header #newlinks').before('<legend><span class="fieldset-legend">Sort</span></legend>');
$('#biblio-header').append($(".biblio-export"));
$('#edit-search-form').removeClass('collapsible');
//var newhtml = '<fieldset class="collapsible form-wrapper collapse-processed" id="edit-sort-form"><legend><span class="fieldset-legend"><a class="fieldset-title" href="#"><span class="fieldset-legend-prefix element-invisible">Hide</span> Sort</a><span class="summary"></span></span></legend>' + $("#biblio-header a:not([title='Click to download the BibTEX formatted file'], [title='Click to download the EndNote XML formatted file'], [title='Click to download the EndNote Tagged formatted file']), #biblio-header img").not('.ctools-dropdown-link.ctools-dropdown-text-link').insertAfter('.biblio-export') + '</fieldset>'
//$('#biblio-search-form').after($("#biblio-header a:not([title='Click to download the BibTEX formatted file'], [title='Click to download the EndNote XML formatted file'], [title='Click to download the EndNote Tagged formatted file']), #biblio-header img").not('.ctools-dropdown-link.ctools-dropdown-text-link'));
//var newhtml = '<fieldset class="collapsible form-wrapper collapse-processed" id="edit-sort-form"><legend><span class="fieldset-legend"><a class="fieldset-title" href="#"><span class="fieldset-legend-prefix element-invisible">Hide</span> Sort</a><span class="summary"></span></span></legend>' + $('#biblio-header .biblio-export').html() + '</fieldset>';
//console.log($('#biblio-header .biblio-export').html());
//console.log(newhtml);
//$('#biblio-header .biblio-export').replaceWith(newhtml);
//console.log($('#biblio-header').find('a'));
//var newhtml;
//newhtml = $('#biblio-header').find('a');
//var newhtml = '<fieldset class="collapsible form-wrapper collapse-processed" id="edit-sort-form"><legend><span class="fieldset-legend"><a class="fieldset-title" href="#"><span class="fieldset-legend-prefix element-invisible">Hide</span> Sort</a><span class="summary"></span></span></legend>' + $('#biblio-header a') + '</fieldset>';
//$('#biblio-header .biblio-export').replaceWith(newhtml);
//console.log(newhtml);
//console.log($("#biblio-header a[title!="Click to download the BibTEX formatted file"], #biblio-header img").not('.ctools-dropdown-link.ctools-dropdown-text-link [title="Click to download the BibTEX formatted file"]'));
//$("#biblio-header a:not([title='Click to download the BibTEX formatted file'], [title='Click to download the EndNote XML formatted file'], [title='Click to download the EndNote Tagged formatted file']), #biblio-header img").not('.ctools-dropdown-link.ctools-dropdown-text-link').insertAfter('.biblio-export');
} }
}; };
})(jQuery); })(jQuery);
\ No newline at end of file
...@@ -11,9 +11,7 @@ include_once 'uw_virtual_site_homepage.features.inc'; ...@@ -11,9 +11,7 @@ include_once 'uw_virtual_site_homepage.features.inc';
* Adding process to image types to change title to caption for homepage banners. * Adding process to image types to change title to caption for homepage banners.
*/ */
function uw_virtual_site_homepage_field_widget_form_alter(&$element, &$form_state, $context) { function uw_virtual_site_homepage_field_widget_form_alter(&$element, &$form_state, $context) {
if($context['field']['type'] == 'image') {
//dsm($context['field']['type']);
}
if($context['field']['type'] == 'image') { if($context['field']['type'] == 'image') {
foreach(element_children($element) as $key => $child) { foreach(element_children($element) as $key => $child) {
if($element[$key]['#description'] == 'Provide banner images for virtual site homepages on Scholar at Waterloo sites.') { if($element[$key]['#description'] == 'Provide banner images for virtual site homepages on Scholar at Waterloo sites.') {
...@@ -216,6 +214,17 @@ function uw_virtual_site_homepage_page_alter(&$page) { ...@@ -216,6 +214,17 @@ function uw_virtual_site_homepage_page_alter(&$page) {
* Hide target option field. * Hide target option field.
*/ */
function uw_virtual_site_homepage_form_alter(&$form, &$form_state, $form_id) { function uw_virtual_site_homepage_form_alter(&$form, &$form_state, $form_id) {
if($form_id == "biblio_search_form") {
$form['search_form']['#collapsed'] = FALSE;
$form['search_form']['#collapsible'] = FALSE;
if(isset($form['search_form']['filterform']['filters']['current'][0]['#markup'])) {
if($form['search_form']['filterform']['filters']['current'][0]['#markup'] !== "") {
$form['search_form']['filterform']['filters']['#collapsed'] = FALSE;
}
}
}
if ($form_id == '_os_link_external_form' && isset($form['target_option'])) { if ($form_id == '_os_link_external_form' && isset($form['target_option'])) {
unset($form['target_option']); unset($form['target_option']);
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment