Commit 33c02cd3 authored by Eric Bremner's avatar Eric Bremner
Browse files

ISTWCMS-1983: Fixing search and sort links.

parent 5c4f97a4
......@@ -15,6 +15,42 @@
}
});
//console.log($('#biblio-search-form #edit-search-form'));
if($('#biblio-search-form #edit-search-form').length > 0) {
$('#biblio-search-form #edit-search-form').removeClass('collapsed');
}
var oldhtml = jQuery('#content #biblio-header').html();
var newhtml = oldhtml.replace(/\[/g, '');
newhtml = newhtml.replace(/\]/g, '');
jQuery('#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);
\ No newline at end of file
......@@ -228,9 +228,6 @@ function uw_virtual_site_homepage_form_alter(&$form, &$form_state, $form_id) {
function uw_virtual_site_homepage_form_uw_virtual_site_homepage_node_form_alter(&$form, &$form_state, $form_id) {
global $base_path;
// Adding javascript for the form.
drupal_add_js(drupal_get_path('module', 'uw_virtual_site_homepage') . '/js/uw_virtual_site_homepage.js');
// Get current link.
$url = request_uri();
......@@ -352,10 +349,12 @@ function uw_vitual_site_homepage_site_information_form_submit($form, &$form_stat
'format' => NULL,
);
if(isset($form_state['value']['field_uw_credentials'])) {
$node->field_uw_credentials[LANGUAGE_NONE][0] = array(
'value' => $form_state['value']['field_uw_credentials'],
'format' => NULL,
);
}
// Ensuring that we get a save of the node which is the users vsite.
try {
......
Markdown is supported
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