Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

In this manual we'll setup and enable jQuery javascript libraries instead of default scriptaculous ones.,  they both have beautiful great effects and functionalities so we can choose the one that best fits our interest, or knowledge.

...

Doing a litle browsing we can check that this libraries (prototype) are used in a library function:

...

No Format

...

[dspace-source

...

]/dspace-jspui/dspace-jspui-webapp/src/main/webapp/static/js/choice-support.js
Code Block
languagejavascript
titlefunction DSpaceChoiceLookup(...)
collapsetrue
// Create popup window with authority choices for value of an input field.
// This is intended to be called by onClick of a "Lookup" or "Add" button.
function DSpaceChoiceLookup(url, field, formID, valueInput, authInput,
confIndicatorID, collectionID, isName, isRepeating)
{
...
cOffset = $(inputField).cumulativeOffset();
...}

This function is called on the following java server pages:

...

By now we know which pages use scriptaculous. We'll keep them in mind to later come back and modify them.

jQuery libraries

Note: DSpace already uses a copy of jQuery, but in a local form. Used by library function:

...

No Format

...

[dspace-source

...

]/dspace-jspui/dspace-jspui-webapp/src/main/webapp/dspace-admin/js/bitstream-ordering.js
Code Block
languagejavascript
titlefunction ($)
collapsetrue
function ($) {
    $(document).ready(function() {
        var bitstreamTable = $("table#bitstream-edit-form-table");
	...


})(jQuery);

This function is called on the following java server page:

...