From: <jon...@us...> - 2015-02-22 16:59:58
|
Revision: 54050 http://sourceforge.net/p/tikiwiki/code/54050 Author: jonnybradley Date: 2015-02-22 16:59:49 +0000 (Sun, 22 Feb 2015) Log Message: ----------- [FIX] elfinder: Skip elements without an href in the navbar like Chosen menus when updating the galleryId Modified Paths: -------------- trunk/templates/tiki-list_file_gallery.tpl Modified: trunk/templates/tiki-list_file_gallery.tpl =================================================================== --- trunk/templates/tiki-list_file_gallery.tpl 2015-02-22 16:57:33 UTC (rev 54049) +++ trunk/templates/tiki-list_file_gallery.tpl 2015-02-22 16:59:49 UTC (rev 54050) @@ -261,6 +261,7 @@ }); var elFinderInstnce = $(".elFinderDialog").elfinder(elfoptions).elfinder('instance'); +// when changing folders update the buttons in the navebar above elFinderInstnce.bind("open", function (data) { $.getJSON($.service('file_finder', 'finder'), { cmd: "tikiFileFromHash", @@ -269,8 +270,10 @@ var href = ''; $(".t_navbar a").each(function () { href = $(this).attr("href"); - href = href.replace(/(galleryId|objectId|parentId|watch_object)=\d+/, '$1=' + data.galleryId); - $(this).attr("href", href); + if (href) { // avoid chosen select replacements + href = href.replace(/(galleryId|objectId|parentId|watch_object)=\d+/, '$1=' + data.galleryId); + $(this).attr("href", href); + } }); }); }); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |