Skip to content

fvadon/nuxeo-palette

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DEPRECATED: the main repo is now at https://github.com/nuxeo-sandbox/nuxeo-palette

nuxeo-palette

This plugin enables to order content of a folder on a grid.

About

The project provides a widget template (palette.xhtml) that will create a grid where to order the thumbnails of a folder content on a grid using drag and drop.

The widget template has default properties that can be overridden to control the size and margin of the palette. The properties are:

  • margins_horizontal (default: 10)
  • margins_vertical (default: 10)
  • base_dimensions_width (default: 100)
  • base_dimensions_heigth (default: 100)
  • max_cols (default: 10), for some unknown reason, no value does not seem to work.
  • min_cols (default: 10), for some unknown reason, no value does not seem to work.

Every time the order of a palette is changed, the event PaletteOrderChangedis fired.

The template uses several custom automation operations to get or set the items of the palettes.

  • Services.GetPaletteItemsoperation is the way to get the items, it renders a JSON String containing document ids with order, position X and Y, and size. An order 0 means it's a new element.

Example of JSON String generated by the operation:

[{"id":"85d80ab6-1296-4939-a1d3-9d6da1e7eae2","thumburl":"http://localhost:8080/nuxeo/nxthumb/default/85d80ab6-1296-4939-a1d3-9d6da1e7eae2/thumb:thumbnail/Small_ic_looks_one_grey600_48dp.jpg","order":"0"},{"col":"1","size_y":"1","size_x":"1","id":"f7a78334-8813-46b5-ac26-ed8923f9e7b5","row":"1","thumburl":"http://localhost:8080/nuxeo/nxthumb/default/f7a78334-8813-46b5-ac26-ed8923f9e7b5/thumb:thumbnail/Small_ic_looks_two_grey600_48dp.jpg","order":"1"},{"col":"6","size_y":"1","size_x":"1","id":"1358a39f-efb5-47cd-8352-c91273c69c75","row":"1","thumburl":"http://localhost:8080/nuxeo/nxthumb/default/1358a39f-efb5-47cd-8352-c91273c69c75/thumb:thumbnail/Small_ic_looks_3_grey600_48dp.jpg","order":"6"}]

Build-Install

Assuming maven (min. 3.2.1) is installed on your computer:

# Clone the GitHub repository
cd /path/to/where/you/want/to/clone/this/repository
git clone https://github.com/fvadon/nuxeo-palette
# Compile
cd nuxeo-palette
mvn clean install
  • The plug-in is in nuxeo-palette/nuxeo-palette-core/target/, its name is nuxeo-palette-core-7.4-{version}.jar.
  • The Marketplace Package is in nuxeo-palette/nuxeo-palette-mp/target, its name is nuxeo-palette-mp-7.4-{version}.zip.

TODO

  • Collection support
  • Enable a possibility to get the items in the right order.

Third Party Tools Used

License

(C) Copyright 2014 Nuxeo SA (http://nuxeo.com/) and others.

All rights reserved. This program and the accompanying materials are made available under the terms of the GNU Lesser General Public License (LGPL) version 2.1 which accompanies this distribution, and is available at http://www.gnu.org/licenses/lgpl-2.1.html

This library 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 Lesser General Public License for more details.

Contributors: Frederic Vadon (https://github.com/fvadon)

About Nuxeo

Nuxeo provides a modular, extensible Java-based open source software platform for enterprise content management and packaged applications for Document Management, Digital Asset Management and Case Management. Designed by developers for developers, the Nuxeo platform offers a modern architecture, a powerful plug-in model and extensive packaging capabilities for building content applications.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published