From: <die...@us...> - 2011-02-08 17:48:41
|
Revision: 3322 http://openutils.svn.sourceforge.net/openutils/?rev=3322&view=rev Author: diego_schivo Date: 2011-02-08 17:48:33 +0000 (Tue, 08 Feb 2011) Log Message: ----------- MEDIA-214 playlist from search Modified Paths: -------------- trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/playlist/pages/PlaylistBean.java trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/playlist/pages/PlaylistView.java trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/pages/MediaAdvancedSearchFormPage.html trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/pages/MediaFolderViewPage.html trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/playlist/pages/PlaylistView.html Added Paths: ----------- trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/save/PlaylistFromSearchSaveHandler.java trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/playlist/dialog/PlaylistFromSearchDialogMVC.java trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.media.dialogs.playlistAsSearch.xml Removed Paths: ------------- trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/playlist/dialog/SearchPlaylistDialogMVC.java trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/playlist/dialog/SearchPlaylistSaveHandler.java trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.media.dialogs.search-playlist.xml Added: trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/save/PlaylistFromSearchSaveHandler.java =================================================================== --- trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/save/PlaylistFromSearchSaveHandler.java (rev 0) +++ trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/save/PlaylistFromSearchSaveHandler.java 2011-02-08 17:48:33 UTC (rev 3322) @@ -0,0 +1,47 @@ +/** + * + * SimpleMedia Module for Magnolia CMS (http://www.openmindlab.com/lab/products/media.html) + * Copyright(C) 2008-2011, Openmind S.r.l. http://www.openmindonline.it + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +package net.sourceforge.openutils.mgnlmedia.media.save; + +import info.magnolia.cms.core.Content; +import info.magnolia.cms.security.AccessDeniedException; +import info.magnolia.module.admininterface.UUIDSaveHandler; + +import javax.jcr.PathNotFoundException; +import javax.jcr.RepositoryException; + + +/** + * @author ADMIN + * @version $Id: $ + */ +public class PlaylistFromSearchSaveHandler extends UUIDSaveHandler +{ + + /** + * {@inheritDoc} + */ + @Override + protected void processSaveInfo(Content node, String saveInfo) throws PathNotFoundException, RepositoryException, + AccessDeniedException + { + // TODO Auto-generated method stub + super.processSaveInfo(node, saveInfo); + } +} Added: trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/playlist/dialog/PlaylistFromSearchDialogMVC.java =================================================================== --- trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/playlist/dialog/PlaylistFromSearchDialogMVC.java (rev 0) +++ trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/playlist/dialog/PlaylistFromSearchDialogMVC.java 2011-02-08 17:48:33 UTC (rev 3322) @@ -0,0 +1,118 @@ +/** + * + * SimpleMedia Module for Magnolia CMS (http://www.openmindlab.com/lab/products/media.html) + * Copyright(C) 2008-2011, Openmind S.r.l. http://www.openmindonline.it + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +package net.sourceforge.openutils.mgnlmedia.playlist.dialog; + +import info.magnolia.cms.core.Content; +import info.magnolia.cms.gui.misc.Sources; +import info.magnolia.module.admininterface.SaveHandler; +import info.magnolia.module.admininterface.dialogs.ConfiguredDialog; + +import java.io.IOException; +import java.io.PrintWriter; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import net.sourceforge.openutils.mgnlmedia.playlist.PlaylistConstants; + +import org.apache.commons.lang.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + + +/** + * @author ADMIN + * @version $Id: $ + */ +public class PlaylistFromSearchDialogMVC extends ConfiguredDialog +{ + + /** + * Logger. + */ + private Logger log = LoggerFactory.getLogger(PlaylistFromSearchDialogMVC.class); + + /** + * + */ + public PlaylistFromSearchDialogMVC( + String name, + HttpServletRequest request, + HttpServletResponse response, + Content configNode) + { + super(name, request, response, configNode); + } + + /** + * {@inheritDoc} + */ + @Override + protected void configureSaveHandler(SaveHandler saveHandler) + { + super.configureSaveHandler(saveHandler); + saveHandler.setPath(form.getParameter("parentFolder")); + saveHandler.setNodeName(form.getParameter("playlistName")); + saveHandler.setRepository(PlaylistConstants.REPO); + saveHandler.setCreationItemType(PlaylistConstants.PLAYLIST); + } + + /** + * {@inheritDoc} + */ + @Override + protected boolean onPreSave(SaveHandler control) + { + // TODO Auto-generated method stub + return super.onPreSave(control); + } + + /** + * {@inheritDoc} + */ + @Override + protected boolean onPostSave(SaveHandler control) + { + // TODO Auto-generated method stub + return super.onPostSave(control); + } + + /** + * {@inheritDoc} + */ + @Override + public void renderHtml(String view) throws IOException + { + if (VIEW_CLOSE_WINDOW.equals(view)) + { + PrintWriter out = this.getResponse().getWriter(); + + out.println("<html>"); //$NON-NLS-1$ + out.println(new Sources(this.getRequest().getContextPath()).getHtmlJs()); + out.println("<script type=\"text/javascript\">"); //$NON-NLS-1$ + out.println("parent.location.href = '/open/.magnolia/pages/playlistsBrowser.html?openPath=" + form.getParameter("parentFolder") + "/" + form.getParameter("playlistName") + "'"); //$NON-NLS-1$ + out.println("</script></html>"); //$NON-NLS-1$ + } + else + { + super.renderHtml(view); + } + } +} Deleted: trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/playlist/dialog/SearchPlaylistDialogMVC.java =================================================================== --- trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/playlist/dialog/SearchPlaylistDialogMVC.java 2011-02-08 14:38:37 UTC (rev 3321) +++ trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/playlist/dialog/SearchPlaylistDialogMVC.java 2011-02-08 17:48:33 UTC (rev 3322) @@ -1,118 +0,0 @@ -/** - * - * SimpleMedia Module for Magnolia CMS (http://www.openmindlab.com/lab/products/media.html) - * Copyright(C) 2008-2011, Openmind S.r.l. http://www.openmindonline.it - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -package net.sourceforge.openutils.mgnlmedia.playlist.dialog; - -import info.magnolia.cms.core.Content; -import info.magnolia.cms.gui.misc.Sources; -import info.magnolia.module.admininterface.SaveHandler; -import info.magnolia.module.admininterface.dialogs.ConfiguredDialog; - -import java.io.IOException; -import java.io.PrintWriter; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import net.sourceforge.openutils.mgnlmedia.playlist.PlaylistConstants; - -import org.apache.commons.lang.StringUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - - -/** - * @author ADMIN - * @version $Id: $ - */ -public class SearchPlaylistDialogMVC extends ConfiguredDialog -{ - - /** - * Logger. - */ - private Logger log = LoggerFactory.getLogger(SearchPlaylistDialogMVC.class); - - /** - * - */ - public SearchPlaylistDialogMVC( - String name, - HttpServletRequest request, - HttpServletResponse response, - Content configNode) - { - super(name, request, response, configNode); - } - - /** - * {@inheritDoc} - */ - @Override - protected void configureSaveHandler(SaveHandler saveHandler) - { - super.configureSaveHandler(saveHandler); - saveHandler.setPath(form.getParameter("parentFolder")); - saveHandler.setNodeName(form.getParameter("playlistName")); - saveHandler.setRepository(PlaylistConstants.REPO); - saveHandler.setCreationItemType(PlaylistConstants.PLAYLIST); - } - - /** - * {@inheritDoc} - */ - @Override - protected boolean onPreSave(SaveHandler control) - { - // TODO Auto-generated method stub - return super.onPreSave(control); - } - - /** - * {@inheritDoc} - */ - @Override - protected boolean onPostSave(SaveHandler control) - { - // TODO Auto-generated method stub - return super.onPostSave(control); - } - - /** - * {@inheritDoc} - */ - @Override - public void renderHtml(String view) throws IOException - { - if (VIEW_CLOSE_WINDOW.equals(view)) - { - PrintWriter out = this.getResponse().getWriter(); - - out.println("<html>"); //$NON-NLS-1$ - out.println(new Sources(this.getRequest().getContextPath()).getHtmlJs()); - out.println("<script type=\"text/javascript\">"); //$NON-NLS-1$ - out.println("parent.location.href = '/open/.magnolia/pages/playlistsBrowser.html?openPath=" + form.getParameter("parentFolder") + "/" + form.getParameter("playlistName") + "'"); //$NON-NLS-1$ - out.println("</script></html>"); //$NON-NLS-1$ - } - else - { - super.renderHtml(view); - } - } -} Deleted: trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/playlist/dialog/SearchPlaylistSaveHandler.java =================================================================== --- trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/playlist/dialog/SearchPlaylistSaveHandler.java 2011-02-08 14:38:37 UTC (rev 3321) +++ trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/playlist/dialog/SearchPlaylistSaveHandler.java 2011-02-08 17:48:33 UTC (rev 3322) @@ -1,47 +0,0 @@ -/** - * - * SimpleMedia Module for Magnolia CMS (http://www.openmindlab.com/lab/products/media.html) - * Copyright(C) 2008-2011, Openmind S.r.l. http://www.openmindonline.it - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -package net.sourceforge.openutils.mgnlmedia.playlist.dialog; - -import info.magnolia.cms.core.Content; -import info.magnolia.cms.security.AccessDeniedException; -import info.magnolia.module.admininterface.UUIDSaveHandler; - -import javax.jcr.PathNotFoundException; -import javax.jcr.RepositoryException; - - -/** - * @author ADMIN - * @version $Id: $ - */ -public class SearchPlaylistSaveHandler extends UUIDSaveHandler -{ - - /** - * {@inheritDoc} - */ - @Override - protected void processSaveInfo(Content node, String saveInfo) throws PathNotFoundException, RepositoryException, - AccessDeniedException - { - // TODO Auto-generated method stub - super.processSaveInfo(node, saveInfo); - } -} Modified: trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/playlist/pages/PlaylistBean.java =================================================================== --- trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/playlist/pages/PlaylistBean.java 2011-02-08 14:38:37 UTC (rev 3321) +++ trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/playlist/pages/PlaylistBean.java 2011-02-08 17:48:33 UTC (rev 3322) @@ -38,6 +38,8 @@ private List<PlaylistEntryBean> entries; + private boolean readOnly; + /** * Returns the uuid. * @return the uuid @@ -127,4 +129,24 @@ { this.entries = entries; } + + + /** + * Returns the readOnly. + * @return the readOnly + */ + public boolean isReadOnly() + { + return readOnly; + } + + + /** + * Sets the readOnly. + * @param readOnly the readOnly to set + */ + public void setReadOnly(boolean readOnly) + { + this.readOnly = readOnly; + } } Modified: trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/playlist/pages/PlaylistView.java =================================================================== --- trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/playlist/pages/PlaylistView.java 2011-02-08 14:38:37 UTC (rev 3321) +++ trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/playlist/pages/PlaylistView.java 2011-02-08 17:48:33 UTC (rev 3322) @@ -227,12 +227,11 @@ } } - String requestNodeName = "search"; try { - if (node.hasContent(requestNodeName)) + if (node.hasContent("search")) { - Content requestNode = node.getContent(requestNodeName); + Content requestNode = node.getContent("search"); Collection<Content> paramNodes = requestNode.getChildren(ItemType.CONTENTNODE); final Map<String, Object> map = new HashMap<String, Object>(); for (Content paramNode : paramNodes) @@ -275,10 +274,18 @@ } catch (RepositoryException e) { - // TODO Auto-generated catch block - e.printStackTrace(); + // should never happen } playlist.setEntries(entries); + + try + { + playlist.setReadOnly(node.hasContent("search")); + } + catch (RepositoryException e) + { + // should never happen + } } else { Added: trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.media.dialogs.playlistAsSearch.xml =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.media.dialogs.playlistAsSearch.xml (rev 0) +++ trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.media.dialogs.playlistAsSearch.xml 2011-02-08 17:48:33 UTC (rev 3322) @@ -0,0 +1,253 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sv:node sv:name="playlistAsSearch" xmlns:sv="http://www.jcp.org/jcr/sv/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <sv:property sv:name="jcr:primaryType" sv:type="Name"> + <sv:value>mgnl:contentNode</sv:value> + </sv:property> + <sv:property sv:name="jcr:mixinTypes" sv:type="Name" sv:multiple="true"> + <sv:value>mix:lockable</sv:value> + </sv:property> + <sv:property sv:name="jcr:uuid" sv:type="String"> + <sv:value>aa50c92e-cad0-493b-ab7f-facecac2a284</sv:value> + </sv:property> + <sv:property sv:name="class" sv:type="String"> + <sv:value>net.sourceforge.openutils.mgnlmedia.playlist.dialog.PlaylistFromSearchDialogMVC</sv:value> + </sv:property> + <sv:property sv:name="jcr:createdBy" sv:type="String"> + <sv:value>admin</sv:value> + </sv:property> + <sv:property sv:name="label" sv:type="String"> + <sv:value>Playlist</sv:value> + </sv:property> + <sv:property sv:name="saveHandler" sv:type="String"> + <sv:value>net.sourceforge.openutils.mgnlmedia.media.save.PlaylistFromSearchSaveHandler</sv:value> + </sv:property> + <sv:node sv:name="MetaData"> + <sv:property sv:name="jcr:primaryType" sv:type="Name"> + <sv:value>mgnl:metaData</sv:value> + </sv:property> + <sv:property sv:name="jcr:createdBy" sv:type="String"> + <sv:value>admin</sv:value> + </sv:property> + <sv:property sv:name="mgnl:activated" sv:type="Boolean"> + <sv:value>false</sv:value> + </sv:property> + <sv:property sv:name="mgnl:authorid" sv:type="String"> + <sv:value>superuser</sv:value> + </sv:property> + <sv:property sv:name="mgnl:creationdate" sv:type="Date"> + <sv:value>2010-02-04T16:31:25.515+01:00</sv:value> + </sv:property> + <sv:property sv:name="mgnl:lastmodified" sv:type="Date"> + <sv:value>2011-02-08T18:43:46.422+01:00</sv:value> + </sv:property> + </sv:node> + <sv:node sv:name="tabGeneral"> + <sv:property sv:name="jcr:primaryType" sv:type="Name"> + <sv:value>mgnl:contentNode</sv:value> + </sv:property> + <sv:property sv:name="jcr:mixinTypes" sv:type="Name" sv:multiple="true"> + <sv:value>mix:lockable</sv:value> + </sv:property> + <sv:property sv:name="jcr:uuid" sv:type="String"> + <sv:value>301b55cd-e68f-47f3-85a3-9a1b3507b45f</sv:value> + </sv:property> + <sv:property sv:name="controlType" sv:type="String"> + <sv:value>tab</sv:value> + </sv:property> + <sv:property sv:name="jcr:createdBy" sv:type="String"> + <sv:value>admin</sv:value> + </sv:property> + <sv:property sv:name="label" sv:type="String"> + <sv:value>Playlist</sv:value> + </sv:property> + <sv:node sv:name="MetaData"> + <sv:property sv:name="jcr:primaryType" sv:type="Name"> + <sv:value>mgnl:metaData</sv:value> + </sv:property> + <sv:property sv:name="jcr:createdBy" sv:type="String"> + <sv:value>admin</sv:value> + </sv:property> + <sv:property sv:name="mgnl:activated" sv:type="Boolean"> + <sv:value>false</sv:value> + </sv:property> + <sv:property sv:name="mgnl:authorid" sv:type="String"> + <sv:value>superuser</sv:value> + </sv:property> + <sv:property sv:name="mgnl:creationdate" sv:type="Date"> + <sv:value>2010-02-04T16:31:50.312+01:00</sv:value> + </sv:property> + <sv:property sv:name="mgnl:lastmodified" sv:type="Date"> + <sv:value>2011-02-07T20:47:33.255+01:00</sv:value> + </sv:property> + </sv:node> + <sv:node sv:name="parentFolder"> + <sv:property sv:name="jcr:primaryType" sv:type="Name"> + <sv:value>mgnl:contentNode</sv:value> + </sv:property> + <sv:property sv:name="jcr:mixinTypes" sv:type="Name" sv:multiple="true"> + <sv:value>mix:lockable</sv:value> + </sv:property> + <sv:property sv:name="jcr:uuid" sv:type="String"> + <sv:value>f4648ddb-b34b-4cf1-a657-a897159a2721</sv:value> + </sv:property> + <sv:property sv:name="controlType" sv:type="String"> + <sv:value>link</sv:value> + </sv:property> + <sv:property sv:name="jcr:createdBy" sv:type="String"> + <sv:value>admin</sv:value> + </sv:property> + <sv:property sv:name="label" sv:type="String"> + <sv:value>Parent folder</sv:value> + </sv:property> + <sv:property sv:name="saveInfo" sv:type="String"> + <sv:value>false</sv:value> + </sv:property> + <sv:property sv:name="tree" sv:type="String"> + <sv:value>playlist-folders</sv:value> + </sv:property> + <sv:node sv:name="MetaData"> + <sv:property sv:name="jcr:primaryType" sv:type="Name"> + <sv:value>mgnl:metaData</sv:value> + </sv:property> + <sv:property sv:name="jcr:createdBy" sv:type="String"> + <sv:value>admin</sv:value> + </sv:property> + <sv:property sv:name="mgnl:activated" sv:type="Boolean"> + <sv:value>false</sv:value> + </sv:property> + <sv:property sv:name="mgnl:authorid" sv:type="String"> + <sv:value>superuser</sv:value> + </sv:property> + <sv:property sv:name="mgnl:creationdate" sv:type="Date"> + <sv:value>2010-02-04T16:32:31.109+01:00</sv:value> + </sv:property> + <sv:property sv:name="mgnl:lastmodified" sv:type="Date"> + <sv:value>2011-02-08T14:47:19.599+01:00</sv:value> + </sv:property> + </sv:node> + </sv:node> + <sv:node sv:name="playlistName"> + <sv:property sv:name="jcr:primaryType" sv:type="Name"> + <sv:value>mgnl:contentNode</sv:value> + </sv:property> + <sv:property sv:name="jcr:mixinTypes" sv:type="Name" sv:multiple="true"> + <sv:value>mix:lockable</sv:value> + </sv:property> + <sv:property sv:name="jcr:uuid" sv:type="String"> + <sv:value>8174d77e-7be3-43a3-bfe9-babbdac23b19</sv:value> + </sv:property> + <sv:property sv:name="controlType" sv:type="String"> + <sv:value>edit</sv:value> + </sv:property> + <sv:property sv:name="jcr:createdBy" sv:type="String"> + <sv:value>admin</sv:value> + </sv:property> + <sv:property sv:name="label" sv:type="String"> + <sv:value>Playlist name</sv:value> + </sv:property> + <sv:property sv:name="saveInfo" sv:type="String"> + <sv:value>false</sv:value> + </sv:property> + <sv:node sv:name="MetaData"> + <sv:property sv:name="jcr:primaryType" sv:type="Name"> + <sv:value>mgnl:metaData</sv:value> + </sv:property> + <sv:property sv:name="jcr:createdBy" sv:type="String"> + <sv:value>admin</sv:value> + </sv:property> + <sv:property sv:name="mgnl:activated" sv:type="Boolean"> + <sv:value>false</sv:value> + </sv:property> + <sv:property sv:name="mgnl:authorid" sv:type="String"> + <sv:value>superuser</sv:value> + </sv:property> + <sv:property sv:name="mgnl:creationdate" sv:type="Date"> + <sv:value>2010-02-04T16:32:31.109+01:00</sv:value> + </sv:property> + <sv:property sv:name="mgnl:lastmodified" sv:type="Date"> + <sv:value>2011-02-08T14:47:30.384+01:00</sv:value> + </sv:property> + </sv:node> + </sv:node> + <sv:node sv:name="maxResults"> + <sv:property sv:name="jcr:primaryType" sv:type="Name"> + <sv:value>mgnl:contentNode</sv:value> + </sv:property> + <sv:property sv:name="jcr:mixinTypes" sv:type="Name" sv:multiple="true"> + <sv:value>mix:lockable</sv:value> + </sv:property> + <sv:property sv:name="jcr:uuid" sv:type="String"> + <sv:value>1294413b-03fa-43ed-9333-ccbdd8ebd2e1</sv:value> + </sv:property> + <sv:property sv:name="controlType" sv:type="String"> + <sv:value>edit</sv:value> + </sv:property> + <sv:property sv:name="jcr:createdBy" sv:type="String"> + <sv:value>admin</sv:value> + </sv:property> + <sv:property sv:name="label" sv:type="String"> + <sv:value>Max results</sv:value> + </sv:property> + <sv:property sv:name="type" sv:type="String"> + <sv:value>Long</sv:value> + </sv:property> + <sv:node sv:name="MetaData"> + <sv:property sv:name="jcr:primaryType" sv:type="Name"> + <sv:value>mgnl:metaData</sv:value> + </sv:property> + <sv:property sv:name="jcr:createdBy" sv:type="String"> + <sv:value>admin</sv:value> + </sv:property> + <sv:property sv:name="mgnl:activated" sv:type="Boolean"> + <sv:value>false</sv:value> + </sv:property> + <sv:property sv:name="mgnl:authorid" sv:type="String"> + <sv:value>superuser</sv:value> + </sv:property> + <sv:property sv:name="mgnl:creationdate" sv:type="Date"> + <sv:value>2010-02-04T16:32:31.109+01:00</sv:value> + </sv:property> + <sv:property sv:name="mgnl:lastmodified" sv:type="Date"> + <sv:value>2011-02-08T14:48:01.729+01:00</sv:value> + </sv:property> + </sv:node> + </sv:node> + <sv:node sv:name="search"> + <sv:property sv:name="jcr:primaryType" sv:type="Name"> + <sv:value>mgnl:contentNode</sv:value> + </sv:property> + <sv:property sv:name="jcr:mixinTypes" sv:type="Name" sv:multiple="true"> + <sv:value>mix:lockable</sv:value> + </sv:property> + <sv:property sv:name="jcr:uuid" sv:type="String"> + <sv:value>805c4546-515e-48d0-a8ae-20fde5108303</sv:value> + </sv:property> + <sv:property sv:name="controlType" sv:type="String"> + <sv:value>hiddenParameters</sv:value> + </sv:property> + <sv:property sv:name="jcr:createdBy" sv:type="String"> + <sv:value>admin</sv:value> + </sv:property> + <sv:node sv:name="MetaData"> + <sv:property sv:name="jcr:primaryType" sv:type="Name"> + <sv:value>mgnl:metaData</sv:value> + </sv:property> + <sv:property sv:name="jcr:createdBy" sv:type="String"> + <sv:value>admin</sv:value> + </sv:property> + <sv:property sv:name="mgnl:activated" sv:type="Boolean"> + <sv:value>false</sv:value> + </sv:property> + <sv:property sv:name="mgnl:authorid" sv:type="String"> + <sv:value>superuser</sv:value> + </sv:property> + <sv:property sv:name="mgnl:creationdate" sv:type="Date"> + <sv:value>2010-02-04T16:32:31.109+01:00</sv:value> + </sv:property> + <sv:property sv:name="mgnl:lastmodified" sv:type="Date"> + <sv:value>2011-02-08T11:55:44.769+01:00</sv:value> + </sv:property> + </sv:node> + </sv:node> + </sv:node> +</sv:node> Deleted: trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.media.dialogs.search-playlist.xml =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.media.dialogs.search-playlist.xml 2011-02-08 14:38:37 UTC (rev 3321) +++ trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.media.dialogs.search-playlist.xml 2011-02-08 17:48:33 UTC (rev 3322) @@ -1,253 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<sv:node sv:name="search-playlist" xmlns:sv="http://www.jcp.org/jcr/sv/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <sv:property sv:name="jcr:primaryType" sv:type="Name"> - <sv:value>mgnl:contentNode</sv:value> - </sv:property> - <sv:property sv:name="jcr:mixinTypes" sv:type="Name" sv:multiple="true"> - <sv:value>mix:lockable</sv:value> - </sv:property> - <sv:property sv:name="jcr:uuid" sv:type="String"> - <sv:value>aa50c92e-cad0-493b-ab7f-facecac2a284</sv:value> - </sv:property> - <sv:property sv:name="class" sv:type="String"> - <sv:value>net.sourceforge.openutils.mgnlmedia.playlist.dialog.SearchPlaylistDialogMVC</sv:value> - </sv:property> - <sv:property sv:name="jcr:createdBy" sv:type="String"> - <sv:value>admin</sv:value> - </sv:property> - <sv:property sv:name="label" sv:type="String"> - <sv:value>Playlist</sv:value> - </sv:property> - <sv:property sv:name="saveHandler" sv:type="String"> - <sv:value>net.sourceforge.openutils.mgnlmedia.playlist.dialog.SearchPlaylistSaveHandler</sv:value> - </sv:property> - <sv:node sv:name="MetaData"> - <sv:property sv:name="jcr:primaryType" sv:type="Name"> - <sv:value>mgnl:metaData</sv:value> - </sv:property> - <sv:property sv:name="jcr:createdBy" sv:type="String"> - <sv:value>admin</sv:value> - </sv:property> - <sv:property sv:name="mgnl:activated" sv:type="Boolean"> - <sv:value>false</sv:value> - </sv:property> - <sv:property sv:name="mgnl:authorid" sv:type="String"> - <sv:value>superuser</sv:value> - </sv:property> - <sv:property sv:name="mgnl:creationdate" sv:type="Date"> - <sv:value>2010-02-04T16:31:25.515+01:00</sv:value> - </sv:property> - <sv:property sv:name="mgnl:lastmodified" sv:type="Date"> - <sv:value>2011-02-08T11:08:14.971+01:00</sv:value> - </sv:property> - </sv:node> - <sv:node sv:name="tabGeneral"> - <sv:property sv:name="jcr:primaryType" sv:type="Name"> - <sv:value>mgnl:contentNode</sv:value> - </sv:property> - <sv:property sv:name="jcr:mixinTypes" sv:type="Name" sv:multiple="true"> - <sv:value>mix:lockable</sv:value> - </sv:property> - <sv:property sv:name="jcr:uuid" sv:type="String"> - <sv:value>301b55cd-e68f-47f3-85a3-9a1b3507b45f</sv:value> - </sv:property> - <sv:property sv:name="controlType" sv:type="String"> - <sv:value>tab</sv:value> - </sv:property> - <sv:property sv:name="jcr:createdBy" sv:type="String"> - <sv:value>admin</sv:value> - </sv:property> - <sv:property sv:name="label" sv:type="String"> - <sv:value>Playlist</sv:value> - </sv:property> - <sv:node sv:name="MetaData"> - <sv:property sv:name="jcr:primaryType" sv:type="Name"> - <sv:value>mgnl:metaData</sv:value> - </sv:property> - <sv:property sv:name="jcr:createdBy" sv:type="String"> - <sv:value>admin</sv:value> - </sv:property> - <sv:property sv:name="mgnl:activated" sv:type="Boolean"> - <sv:value>false</sv:value> - </sv:property> - <sv:property sv:name="mgnl:authorid" sv:type="String"> - <sv:value>superuser</sv:value> - </sv:property> - <sv:property sv:name="mgnl:creationdate" sv:type="Date"> - <sv:value>2010-02-04T16:31:50.312+01:00</sv:value> - </sv:property> - <sv:property sv:name="mgnl:lastmodified" sv:type="Date"> - <sv:value>2011-02-07T20:47:33.255+01:00</sv:value> - </sv:property> - </sv:node> - <sv:node sv:name="parentFolder"> - <sv:property sv:name="jcr:primaryType" sv:type="Name"> - <sv:value>mgnl:contentNode</sv:value> - </sv:property> - <sv:property sv:name="jcr:mixinTypes" sv:type="Name" sv:multiple="true"> - <sv:value>mix:lockable</sv:value> - </sv:property> - <sv:property sv:name="jcr:uuid" sv:type="String"> - <sv:value>f4648ddb-b34b-4cf1-a657-a897159a2721</sv:value> - </sv:property> - <sv:property sv:name="controlType" sv:type="String"> - <sv:value>link</sv:value> - </sv:property> - <sv:property sv:name="jcr:createdBy" sv:type="String"> - <sv:value>admin</sv:value> - </sv:property> - <sv:property sv:name="label" sv:type="String"> - <sv:value>Parent folder</sv:value> - </sv:property> - <sv:property sv:name="saveInfo" sv:type="String"> - <sv:value>false</sv:value> - </sv:property> - <sv:property sv:name="tree" sv:type="String"> - <sv:value>playlist-folders</sv:value> - </sv:property> - <sv:node sv:name="MetaData"> - <sv:property sv:name="jcr:primaryType" sv:type="Name"> - <sv:value>mgnl:metaData</sv:value> - </sv:property> - <sv:property sv:name="jcr:createdBy" sv:type="String"> - <sv:value>admin</sv:value> - </sv:property> - <sv:property sv:name="mgnl:activated" sv:type="Boolean"> - <sv:value>false</sv:value> - </sv:property> - <sv:property sv:name="mgnl:authorid" sv:type="String"> - <sv:value>superuser</sv:value> - </sv:property> - <sv:property sv:name="mgnl:creationdate" sv:type="Date"> - <sv:value>2010-02-04T16:32:31.109+01:00</sv:value> - </sv:property> - <sv:property sv:name="mgnl:lastmodified" sv:type="Date"> - <sv:value>2011-02-08T14:47:19.599+01:00</sv:value> - </sv:property> - </sv:node> - </sv:node> - <sv:node sv:name="playlistName"> - <sv:property sv:name="jcr:primaryType" sv:type="Name"> - <sv:value>mgnl:contentNode</sv:value> - </sv:property> - <sv:property sv:name="jcr:mixinTypes" sv:type="Name" sv:multiple="true"> - <sv:value>mix:lockable</sv:value> - </sv:property> - <sv:property sv:name="jcr:uuid" sv:type="String"> - <sv:value>8174d77e-7be3-43a3-bfe9-babbdac23b19</sv:value> - </sv:property> - <sv:property sv:name="controlType" sv:type="String"> - <sv:value>edit</sv:value> - </sv:property> - <sv:property sv:name="jcr:createdBy" sv:type="String"> - <sv:value>admin</sv:value> - </sv:property> - <sv:property sv:name="label" sv:type="String"> - <sv:value>Playlist name</sv:value> - </sv:property> - <sv:property sv:name="saveInfo" sv:type="String"> - <sv:value>false</sv:value> - </sv:property> - <sv:node sv:name="MetaData"> - <sv:property sv:name="jcr:primaryType" sv:type="Name"> - <sv:value>mgnl:metaData</sv:value> - </sv:property> - <sv:property sv:name="jcr:createdBy" sv:type="String"> - <sv:value>admin</sv:value> - </sv:property> - <sv:property sv:name="mgnl:activated" sv:type="Boolean"> - <sv:value>false</sv:value> - </sv:property> - <sv:property sv:name="mgnl:authorid" sv:type="String"> - <sv:value>superuser</sv:value> - </sv:property> - <sv:property sv:name="mgnl:creationdate" sv:type="Date"> - <sv:value>2010-02-04T16:32:31.109+01:00</sv:value> - </sv:property> - <sv:property sv:name="mgnl:lastmodified" sv:type="Date"> - <sv:value>2011-02-08T14:47:30.384+01:00</sv:value> - </sv:property> - </sv:node> - </sv:node> - <sv:node sv:name="maxResults"> - <sv:property sv:name="jcr:primaryType" sv:type="Name"> - <sv:value>mgnl:contentNode</sv:value> - </sv:property> - <sv:property sv:name="jcr:mixinTypes" sv:type="Name" sv:multiple="true"> - <sv:value>mix:lockable</sv:value> - </sv:property> - <sv:property sv:name="jcr:uuid" sv:type="String"> - <sv:value>1294413b-03fa-43ed-9333-ccbdd8ebd2e1</sv:value> - </sv:property> - <sv:property sv:name="controlType" sv:type="String"> - <sv:value>edit</sv:value> - </sv:property> - <sv:property sv:name="jcr:createdBy" sv:type="String"> - <sv:value>admin</sv:value> - </sv:property> - <sv:property sv:name="label" sv:type="String"> - <sv:value>Max results</sv:value> - </sv:property> - <sv:property sv:name="type" sv:type="String"> - <sv:value>Long</sv:value> - </sv:property> - <sv:node sv:name="MetaData"> - <sv:property sv:name="jcr:primaryType" sv:type="Name"> - <sv:value>mgnl:metaData</sv:value> - </sv:property> - <sv:property sv:name="jcr:createdBy" sv:type="String"> - <sv:value>admin</sv:value> - </sv:property> - <sv:property sv:name="mgnl:activated" sv:type="Boolean"> - <sv:value>false</sv:value> - </sv:property> - <sv:property sv:name="mgnl:authorid" sv:type="String"> - <sv:value>superuser</sv:value> - </sv:property> - <sv:property sv:name="mgnl:creationdate" sv:type="Date"> - <sv:value>2010-02-04T16:32:31.109+01:00</sv:value> - </sv:property> - <sv:property sv:name="mgnl:lastmodified" sv:type="Date"> - <sv:value>2011-02-08T14:48:01.729+01:00</sv:value> - </sv:property> - </sv:node> - </sv:node> - <sv:node sv:name="search"> - <sv:property sv:name="jcr:primaryType" sv:type="Name"> - <sv:value>mgnl:contentNode</sv:value> - </sv:property> - <sv:property sv:name="jcr:mixinTypes" sv:type="Name" sv:multiple="true"> - <sv:value>mix:lockable</sv:value> - </sv:property> - <sv:property sv:name="jcr:uuid" sv:type="String"> - <sv:value>805c4546-515e-48d0-a8ae-20fde5108303</sv:value> - </sv:property> - <sv:property sv:name="controlType" sv:type="String"> - <sv:value>hiddenParameters</sv:value> - </sv:property> - <sv:property sv:name="jcr:createdBy" sv:type="String"> - <sv:value>admin</sv:value> - </sv:property> - <sv:node sv:name="MetaData"> - <sv:property sv:name="jcr:primaryType" sv:type="Name"> - <sv:value>mgnl:metaData</sv:value> - </sv:property> - <sv:property sv:name="jcr:createdBy" sv:type="String"> - <sv:value>admin</sv:value> - </sv:property> - <sv:property sv:name="mgnl:activated" sv:type="Boolean"> - <sv:value>false</sv:value> - </sv:property> - <sv:property sv:name="mgnl:authorid" sv:type="String"> - <sv:value>superuser</sv:value> - </sv:property> - <sv:property sv:name="mgnl:creationdate" sv:type="Date"> - <sv:value>2010-02-04T16:32:31.109+01:00</sv:value> - </sv:property> - <sv:property sv:name="mgnl:lastmodified" sv:type="Date"> - <sv:value>2011-02-08T11:55:44.769+01:00</sv:value> - </sv:property> - </sv:node> - </sv:node> - </sv:node> -</sv:node> Modified: trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/pages/MediaAdvancedSearchFormPage.html =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/pages/MediaAdvancedSearchFormPage.html 2011-02-08 14:38:37 UTC (rev 3321) +++ trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/pages/MediaAdvancedSearchFormPage.html 2011-02-08 17:48:33 UTC (rev 3322) @@ -33,9 +33,6 @@ <div class="row"> <input type="submit" name="submit" value="${this.msgs['buttons.search']}" class="button-submit" onclick="this.form.command.value = ''"/> <input type="submit" name="saveAsPlaylist" value="${this.msgs['buttons.saveAsPlaylist']}" class="button-submit" onclick="this.form.command.value = 'saveAsPlaylist'"/> - <!-- - <input type="submit" name="saveAsPlaylist" value="${this.msgs['buttons.saveAsPlaylist']}" class="button-submit" onclick="parent.openWindow('.magnolia/dialogs/search-playlist.html?mgnlPath=&mgnlRepository=playlists&mgnlCK=' + (new Date()).getTime()); return false;"/> - --> <input type="hidden" name="command" value="" /> </div> </form> Modified: trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/pages/MediaFolderViewPage.html =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/pages/MediaFolderViewPage.html 2011-02-08 14:38:37 UTC (rev 3321) +++ trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/pages/MediaFolderViewPage.html 2011-02-08 17:48:33 UTC (rev 3322) @@ -39,7 +39,7 @@ new MediaFolderView.EditMenus('li.media .menuitem'); new MediaFolderView.InfoTooltips('li.media .image'); [#if (this.request.getParameter('command')!'') == 'saveAsPlaylist'] - this.openSearchPlaylistDialog(); + this.openPlaylistFromSearchDialog(); [/#if] }, @@ -47,8 +47,8 @@ $('scrollablecontent').setStyle('height', window.getSize().y - 58 + 'px'); }, - openSearchPlaylistDialog: function(){ - parent.openWindow('.magnolia/dialogs/search-playlist.html?mgnlCK=' + (new Date()).getTime() + '[#list this.request.parameterNames as name][#list this.request.getParameterValues(name) as value]&search_${name?js_string}=${value?js_string}[/#list][/#list]'); + openPlaylistFromSearchDialog: function(){ + parent.openWindow('.magnolia/dialogs/playlistAsSearch.html?mgnlCK=' + (new Date()).getTime() + '[#list this.request.parameterNames as name][#list this.request.getParameterValues(name) as value]&search_${name?js_string}=${value?js_string}[/#list][/#list]'); } }); Modified: trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/playlist/pages/PlaylistView.html =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/playlist/pages/PlaylistView.html 2011-02-08 14:38:37 UTC (rev 3321) +++ trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/playlist/pages/PlaylistView.html 2011-02-08 17:48:33 UTC (rev 3322) @@ -52,6 +52,7 @@ text: playlist.msgs.addEntry, icon: contextPath + '/.resources/media/icons/ico16-add.png', iconCls: 'button-add', + disabled: playlist.readOnly, handler: function(){ var mgnlWin = parent.parent; mgnlWin.setNewMedia = function(nodeid, uuid, file, thumb){ @@ -76,6 +77,7 @@ text: playlist.msgs.addEntries, icon: contextPath + '/.resources/media/icons/ico16-addmany.png', iconCls: 'button-addmany', + disabled: playlist.readOnly, handler: function(){ var mgnlWin = parent.parent; parent.openWindow(".magnolia/pages/mediaFolderSelection.html?parentFrame=playlistView&action=addEntries&mgnlCK=" + mgnlWin.mgnlGetCacheKiller()); @@ -287,7 +289,7 @@ }); }); grid.getSelectionModel().on('selectionchange', function(sm){ - Ext.getCmp('removeEntryBtn').setDisabled(sm.getCount() < 1); + Ext.getCmp('removeEntryBtn').setDisabled(playlist.readOnly || sm.getCount() < 1); Ext.getCmp('editMediaBtn').setDisabled(sm.getCount() < 1); }); @@ -390,7 +392,8 @@ addManyEntriesProgressStart: '${this.msgs.get('playlist.entries.addMany.msgBox.progressStart')?js_string}', addManyEntriesProgressEnd: '${this.msgs.get('playlist.entries.addMany.msgBox.progressEnd')?js_string}', addManyEntriesProgress: '${this.msgs.get('playlist.entries.addMany.msgBox.progress')?js_string}' - } + }, + readOnly: ${(this.playlist.readOnly)?string} }; initPlaylistView(); [/#if] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |