Hello Brian,
I'm glad that its working now.. ;-) With regards to your modifications, I
guess you have to run 'mvn clean package' so that your changes will be
copied to your [dspace-source]/dspace/target/dspace-[version]-build.dir.
Please see this link and see the difference between 'mvn package' and 'mvn
clean package': https://wiki.duraspace.org/display/DSDOC3x/Rebuild+DSpace.
I'd still advice you to make your customizations in the
[dspace-src]/dspace/modules/ to retain your modifications because your
changes in
[dspace-src]\dspace-xmlui\src\main\webapp\WEB-INF\classes\aspects\aspects\BrowseArtifacts\sitemap.xmap
will be overwritten in case you make a full rebuild of your dspace. (Can
someone from the list correct me if I'm wrong about this? I'm not so sure.)
Cheers!
On Mon, Aug 5, 2013 at 11:18 AM, Brian Aljer B. Coballes <
[email protected]> wrote:
> Hi Elvi,
>
> My expand/collapse buttons for community/collection list are all working
> now. Here are some of the gocha's that I've done.
> 1. Complete list of communities not shown in dspace home page:
> For some reasons, modifying the [dspace-src]\dspace-xmlui\src\
> main\resources\aspects\BrowseArtifacts\sitemap.xmap did not work for me.
> The changes doesn't reflect the
> [dspace]\WEB-INF\classes\aspects\BrowseArtifacts\sitemap.xmap.
> So I modify the
> [dspace-src]\dspace-xmlui\src\main\webapp\WEB-INF\classes\aspects\aspects\BrowseArtifacts\sitemap.xmap
> instead and it worked.
> 2. Collapse/Expand buttons not functioning:
> Apparently, they need the jquery.cookie.js. It is being required by
> jquery.treeview.js in line 180. Again, the import file did not work so I
> copied who whole jquery.cookie.js in jquery.treeview.js. Well, it is not
> really neat but I made it working.
>
> Many thanks Elvi! I could not made it possible without your help.
>
>
> On Fri, Aug 2, 2013 at 6:08 PM, Nemiz, Elvi <[email protected]>wrote:
>
>> Hi Brian,
>>
>> Please see this link:
>> https://wiki.duraspace.org/display/DSPACE/Manakin+theme+tutorial.
>> Customizations should be made inside the modules directory, AFAIK, not in
>> [dspace-src]\dspace-xmlui. With regards to the treeview functionality,
>> please check if you have the correct path in your sitemap.xmap (e.g.
>> value="lib/*js*/jquery.treeview.js" should be
>> "lib/*treeview*/jquery.treeview.js").
>> We sometimes tend to overlook small details like this. Here's a snippet of
>> sitemap.xmap of our live repository:
>>
>>
>> <map:transform type="IncludePageMeta">
>> <map:parameter name="stylesheet#1"
>> value="lib/treeview/jquery.treeview.css"/>
>> <map:parameter name="javascript#1"
>> value="lib/js/jquery-ui-1.8.15.custom.min.js"/>
>> <map:parameter name="javascript#2"
>> value="lib/jquery/jquery.cookie.js"/>
>> <map:parameter name="javascript#3"
>> value="lib/treeview/jquery.treeview.js"/>
>> <map:parameter name="stylesheet.all"
>> value="lib/css/media.css"/>
>> <map:parameter name="theme.path"
>> value="{global:theme-path}"/>
>> <map:parameter name="theme.name"
>> value="{global:theme-name}"/>
>> </map:transform>
>> Just check if we have the same set of files that were needed for the
>> treeview functionality. It can also help by looking at our site's page
>> source.
>>
>> Regarding the counter beside communities and collections, in your
>> dspace.cfg, look for ##### Settings for content count/strength information
>> #### and then set the values for 'webui.strengths.show' and
>> 'webui.strengths.cache' = true. You should also set up a cron job/sheduled
>> task to run [dspace]/bin/itemcounter periodically to update the count.
>>
>> I am always willing to help in any that I can, so no problem at all, ;-)
>>
>> Cheers and regards,
>>
>>
>> On Fri, Aug 2, 2013 at 5:16 PM, Brian Aljer B. Coballes <
>> [email protected]> wrote:
>> >
>> > Hi Elvi,
>> >
>> > I am building my customization in [dspace-src]\dspace-xmlui. I noticed
>> that my [dspace]\WEB-INF\classes\aspects\ArtifactBrowser is not updating so
>> I deleted everything inside [dspace] except assetstore/.
>> >
>> > Regarding the treeview functionality, I've done what you suggested but
>> I got the javascript error Uncaught TypeError: Object function (a,b){return
>> new e.fn.init(a,b,h)} has no method 'cookie' in jquery.treeview.js. I
>> thought that it lacked a javascript plugin so I tried importing
>> jquery.cookie.js but the same error appears. BTW, the counter beside the
>> communities (e.g. ) is also missing. I think I am almost done with this.
>> Please bear a little bit more. Thanks for your time and patience.
>>
>> >
>> >
>> > On Thu, Aug 1, 2013 at 4:20 PM, Nemiz, Elvi <[email protected]>
>> wrote:
>> >>
>> >> Hi Brian,
>> >>
>> >> Did you copy the whole text including the <script> tags? If you
>> created an external javascript, you don't need to include the
>> <script></script> tags, just copy the contents inside the script tags.
>> Regarding the sub-communities and collections that do not appear in the
>> front page, copy the sitemap.xmap to
>> [dspace-src]\dspace\modules\xmlui\src\main\resources\aspects\BrowseArtifacts.
>> Create appropriate directories if its missing. Rebuild dspace. My guess is
>> that it was overwritten when you rebuild dspace. The modules directory
>> under [dspace-src]\dspace is for your local customizations, changes under
>> this folder will not be overwritten in case you perform dspace update or
>> rebuild.
>> >>
>> >> Hope this helped.
>> >>
>> >> Regards,
>> >>
>> >>
>> >> On Thu, Aug 1, 2013 at 3:32 PM, Brian Aljer B. Coballes <
>> [email protected]> wrote:
>> >>>
>> >>> Hi Elvi, I tried your suggestions:
>> >>>
>> >>> 1. I remove the jquery.js from my sitemap. You're correct, the
>> treeview is working fine since dspace has already imported its default
>> jquery-ui-1.8.15.custom.min.js.
>> >>> 2. I created a new javascript file "treeview.js" and inserted theses
>> codes,
>> >>>
>> >>> <script type="text/javascript">
>> >>> (function ($) {
>> >>> $("#tree").treeview({
>> >>> collapsed:true,
>> >>> animated:"medium",
>> >>> control:"#sidetreecontrol",
>> >>> persist:"cookie"
>> >>> });
>> >>> })(jQuery);
>> >>> </script>
>> >>>
>> >>> I updated the sitemap to include the the javascript. But still, the
>> "Collapse All", "Expand All" buttons are not functioning. I inspected the
>> elements in chrome and I received the error "uncaught syntaxerror:
>> unexpected token < >" from treeview.js.
>> >>>
>> >>> Further, the sub-communities and collections do not appear in the
>> frontpage, just the main communities even though I already edited out my
>> [dspace-src]\dspace-xmlui\src\main\resources\aspects\BrowseArtifacts\sitemap.xmap
>> to "<map:parameter name="depth" value="999"/>".
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>> On Tue, Jul 30, 2013 at 10:28 PM, Nemiz, Elvi <[email protected]>
>> wrote:
>> >>>>
>> >>>> Hello Brian,
>> >>>>
>> >>>> Perhaps the file treeview.js is missing from your code and this is
>> what you are referring to. This is the script:
>> >>>>
>> >>>> <script type="text/javascript">
>> >>>> (function ($) {
>> >>>> $("#tree").treeview({
>> >>>> collapsed:true,
>> >>>> animated:"medium",
>> >>>> control:"#sidetreecontrol",
>> >>>> persist:"cookie"
>> >>>> });
>> >>>> })(jQuery);
>> >>>> </script>
>> >>>>
>> >>>> You can copy/paste this inside the <xsl:template
>> name="addJavascript"> template in page-structure.xsl OR you can copy the
>> whole <xsl:template name="addJavascript"> template into Mirage.xsl to keep
>> the original page-structure.xsl intact OR you can just create an external
>> javascript file (e.g. treeview.js) and update your sitemap.xmap to import
>> your newly created javascript file.
>> >>>>
>> >>>> Hope this answers your query about the Expand All, Collapse All
>> button not working. ;-)
>> >>>>
>> >>>> Cheers!
>> >>>>
>> >>>>
>> >>>> On Tue, Jul 30, 2013 at 5:50 PM, Nemiz, Elvi <[email protected]>
>> wrote:
>> >>>>>
>> >>>>> Hello Brian,
>> >>>>>
>> >>>>> I suspect that you have conflicts in your javascript, that's why I
>> suggested that you look for javascript errors in the console of google
>> chrome if you clicked the "Expand All, Collapse All" button. What is the
>> output of the console if you clicked the "Expand All.." button? I have
>> updated my treeview functionality code and I don't have the jquery.js file.
>> I removed that since dspace 3.x code is importing jquery.min.js (1.6.2).
>> AFAIK, jquery is needed for the treeview functionality to work (
>> http://jquery.bassistance.de/treeview/demo/) but since dspace have
>> jquery already, importing another jquery would likely cause conflicts in
>> your javascript code. Here is the link of my commit in my github account
>> about the treeview functionality and compare the files that I have changed
>> to your code: (Note: I have made a new theme named sair under the
>> [dspace-src]/dspace/modules/xmlui/src/main/webapp/themes/ directory)
>> https://github.com/eulereadgbe/DSpace/commit/097db46d4d52e4099bb418e5d940d4d769bd0b04#dspace/modules/xmlui/src/main/webapp/themes/sair/lib/treeview
>> >>>>>
>> >>>>> Hope this helps.
>> >>>>>
>> >>>>> Regards,
>> >>>>> Elvi
>> >>>>>
>> >>>>>
>> >>>>> On Tue, Jul 30, 2013 at 4:49 PM, Brian Aljer B. Coballes <
>> [email protected]> wrote:
>> >>>>>>
>> >>>>>> Hi Elvi, thanks for the input. The treeview for community is
>> working now. I tried to copy the code:
>> >>>>>>
>> >>>>>> <xsl:template match="dri:referenceSet[@type = 'summaryList' and
>> @n='community-browser']" priority="3">
>> >>>>>> <div id="sidetree">
>> >>>>>> <div class="treeheader"> </div>
>> >>>>>> <div id="sidetreecontrol"><a href="?#">Collapse
>> All</a> 
>> >>>>>> <a href="?#">Expand All</a>
>> >>>>>> </div>
>> >>>>>> <ul id="tree">
>> >>>>>> <xsl:apply-templates
>> select="*[not(name()='head')]" mode="summaryList"/>
>> >>>>>> </ul>
>> >>>>>> </div>
>> >>>>>> </xsl:template>
>> >>>>>>
>> >>>>>> to
>> [dspace-src]\dspace-xmlui\src\main\webapp\themes\dri2xhtml\structural.xsl
>> before and I noticed that it was not imported in the Mirage.xsl so that is
>> why nothing is happening.
>> >>>>>>
>> >>>>>> Just one more thing, I can't make the Expand All and Collapse All
>> button to work. I guess I'm missing javascript code to target div
>> id="sidetree", "treeheader", and "sidecontrol"? I already looked into the
>> javascript codes in "lib/treeview/jquery.treeview.js",
>> "lib/jquery/jquery.js", lib/treeview/treeview-handlers.js" but I can't find
>> anything. Did you use a separate javascript? Thanks a lot. (^_^)
>> >>>>>>
>> >>>>>>
>> >>>>>> On Tue, Jul 30, 2013 at 11:16 AM, Nemiz, Elvi <
>> [email protected]> wrote:
>> >>>>>>>
>> >>>>>>> Hello Brian,
>> >>>>>>>
>> >>>>>>> On Mon, Jul 29, 2013 at 1:29 PM, Brian Aljer B. Coballes <
>> [email protected]> wrote:
>> >>>>>>>>
>> >>>>>>>> Hi Elvi, sorry to disturb you. I'm implementing the
>> expand/collapse button in communities/collection. I'e seen you're post in
>> dspace nabble. I'm trying to patch the code (err manually) so that I'm sure
>> where the changes will go. But apparently, I cannot have it work. All the
>> js and css are in their respective folders in Mirage template. Any advise?
>> Thanks.
>> >>>>>>>
>> >>>>>>>
>> >>>>>>> To display the full list of your communities and collections in
>> the front page, edit line 48:
>> >>>>>>>
>> >>>>>>> "<map:parameter name="depth" value="1"/>"
>> >>>>>>>
>> >>>>>>> change the value from 1 to 999 in
>> [dspace-src]\dspace-xmlui\src\main\resources\aspects\BrowseArtifacts\sitemap.xmap.
>> >>>>>>>
>> >>>>>>> If you are using mirage, copy this line and paste it in the
>> mirage.xsl file before the closing tag "</xsl:stylesheet>:
>> >>>>>>>
>> >>>>>>> <xsl:template match="dri:referenceSet[@type = 'summaryList'
>> and @n='community-browser']" priority="3">
>> >>>>>>> <div id="sidetree">
>> >>>>>>> <div class="treeheader"> </div>
>> >>>>>>> <div id="sidetreecontrol"><a href="?#">Collapse
>> All</a> 
>> >>>>>>> <a href="?#">Expand All</a>
>> >>>>>>> </div>
>> >>>>>>> <ul id="tree">
>> >>>>>>> <xsl:apply-templates
>> select="*[not(name()='head')]" mode="summaryList"/>
>> >>>>>>> </ul>
>> >>>>>>> </div>
>> >>>>>>> </xsl:template>
>> >>>>>>>
>> >>>>>>> Also, you must edit
>> [dspace-src]\dspace-xmlui\src\main\webapp\themes\Mirage\sitemap.xmap to
>> make sure all the necessary css and javascripts were imported. E.g.:
>> >>>>>>>
>> >>>>>>> <map:transform type="IncludePageMeta">
>> >>>>>>> <map:parameter name="stylesheet#1"
>> value="lib/treeview/jquery.treeview.css"/>
>> >>>>>>> <map:parameter name="javascript#1"
>> value="lib/js/jquery-ui-1.8.15.custom.min.js"/>
>> >>>>>>> <map:parameter name="javascript#2"
>> value="lib/jquery/jquery.cookie.js"/>
>> >>>>>>> <map:parameter name="javascript#3"
>> value="lib/treeview/jquery.treeview.js"/>
>> >>>>>>> <map:parameter name="javascript#4"
>> value="lib/treeview/treeview.js"/>
>> >>>>>>> <map:parameter name="stylesheet.all"
>> value="lib/css/media.css"/>
>> >>>>>>> <map:parameter name="theme.path"
>> value="{global:theme-path}"/>
>> >>>>>>> <map:parameter name="theme.name"
>> value="{global:theme-name}"/>
>> >>>>>>> </map:transform>
>> >>>>>>>
>> >>>>>>> Note that the number sequence (e.g. javascript#3, etc.) are
>> crucial, I always made the mistake of not updating these numbers which in
>> turn failed to import or link these files.
>> >>>>>>>
>> >>>>>>> Rebuild DSpace.
>> >>>>>>>
>> >>>>>>> If you're using chrome, always try to use the 'inspect element'
>> feature and view the console, this well help you monitor and fix any errors
>> that you might encounter. You can also add firebug if you are using firefox
>> and view the console tab for any errors. Look for javascript errors (e.g.
>> 'treeview is not a function') in the console, these could be one of the
>> reasons that you can't get to work. I'm not a javascript expert but based
>> from my experience, these errors were caused by jQuery conflicts (see my
>> post about these, answered by helix:
>> http://www.mail-archive.com/[email protected]/msg22855.html
>> ).
>> >>>>>>>
>> >>>>>>> As suggested by dspace experts, it is highly recommended to
>> create a new theme if you want to try theme customizations to avoid
>> overwriting your customizations the next time you update/build your dspace.
>> Please see this link:
>> https://wiki.duraspace.org/pages/viewpage.action?pageId=19006130.
>> >>>>>>>
>> >>>>>>> Please cc dspace-tech in asking questions about technical details
>> in dspace, I might not answer your query satisfactorily and someone from
>> the list could advise or have a better solution. I can also be wrong and
>> someone can correct that or point it out, an added advantage to all of us
>> dspace users. ;-) And this will also help other users who may encounter the
>> same problems.
>> >>>>>>>
>> >>>>>>> Cheers and Regards,
>> >>>>>>>
>> >>>>>>> --
>> >>>>>>> Elvi S. Nemiz
>> >>>>>>> Information Assistant
>> >>>>>>> Library and Data Bank Services Section
>> >>>>>>> Training and Information Division
>> >>>>>>> SEAFDEC Aquaculture Department
>> >>>>>>> Tigbauan, Iloilo
>> >>>>>>> Philippines
>> >>>>>>
>> >>>>>>
>> >>>>>>
>> >>>>>>
>> >>>>>> --
>> >>>>>> Brian Aljer B. Coballes
>> >>>>>> Instructional Technology Center
>> >>>>>> Ateneo de Manila High School
>> >>>>>> Loyola Heights, Quezon City
>> >>>>>> Philippines
>> >>>>>>
>> >>>>>> (063) 426-6001 loc. 6203
>> >>>>>>
>> >>>>>>
>> >>>>>> "En todo amar y servir."
>> >>>
>> >>>
>> >>>
>> >>>
>> >>> --
>> >>> Brian Aljer B. Coballes
>> >>> Instructional Technology Center
>> >>> Ateneo de Manila High School
>> >>> Loyola Heights, Quezon City
>> >>> Philippines
>> >>>
>> >>> (063) 426-6001 loc. 6203
>> >>>
>> >>>
>> >>> "En todo amar y servir."
>> >
>> >
>> >
>> >
>> > --
>> > Brian Aljer B. Coballes
>> > Instructional Technology Center
>> > Ateneo de Manila High School
>> > Loyola Heights, Quezon City
>> > Philippines
>> >
>> > (063) 426-6001 loc. 6203
>> >
>> >
>> > "En todo amar y servir."
>>
>>
>>
>>
>> --
>> Elvi S. Nemiz
>> Information Assistant
>> Library and Data Bank Services Section
>> Training and Information Division
>> SEAFDEC Aquaculture Department
>> Tigbauan, Iloilo
>> Philippines
>>
>> Access and download SEAFDEC/AQD publications for FREE
>>
>> http://repository.seafdec.org.ph
>>
>> [SEAFDEC/AQD Institutional Repository (SAIR)]
>>
>> - the official digital repository of scholarly and research information
>> of the department
>>
>>
>>
>> Search our library collection
>>
>> http://opac.seafdec.org.ph
>>
>> [SEAFDEC/AQD Library Online Public Access Catalog]
>>
>>
>>
>> Questions? Ask a Librarian!
>>
>> Email: [email protected] | [email protected]|
>> [email protected]
>>
>> Chat: [Google Talk] seafdecaqdlibrary |
>> [email protected]
>>
>> [Yahoo Messenger] seafdecaqdlibrary
>>
>> Call: 63 33 5119170, 63 33 5119171 local 409 and 413
>>
>> Visit: Library, SEAFDEC Aquaculture Department, Tigbauan,
>> Iloilo, Philippines
>>
>>
>>
>> Like us on Facebook facebook.com/seafdecaqdlib
>> Follow us on Twitter: twitter.com/seafdecaqdlib
>> Follow us on Google +: gplus.to/seafdecaqdlibrary
>>
>
>
>
> --
> *Brian Aljer B. Coballes
> Instructional Technology Center
> Ateneo de Manila High School
> Loyola Heights, Quezon City*
> *Philippines*
> *
> *
> *(063) 426-6001 loc. 6203
> *
> *
> *
>
> *"En todo amar y servir."*
>
------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent
caught up. So what steps can you take to put your SQL databases under
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette