Here is a proposal to reduce all get...Block to 2 methods which
support matching any Block.
interface Block
{
enum TraversalStrategy
{
/** Search in parents **/
PARENT,
/** Search in children **/
CHILD,
/** Search recursively in children (and children of children etc...) **/
CHILDRECURSE,
/** Search in previous siblings **/
PREVIOUS,
/** Search recursively in previous siblings (and parent previous
sibling etc...) **/
PREVIOUSRECURSE,
/** Search in next siblings**/
NEXT,
/** Search recursively in next siblings (and children etc...)**/
NEXTRECURSE
}
[...]
List<Block> getBlocks(BlockMatcher matcher, TraversalStrategy
traversalStrategy, boolean recurse);
Block getFirstBlock(BlockMatcher matcher, TraversalStrategy
traversalStrategy, boolean recurse);
}
interface BlockMatcher
{
boolean match(Block block);
}
et on refactor tous les autres get*Block basé sur ceux la avec des
BlockMatcher prédéfinis (ClassBlockMatcher, MetaDataBlockMatcher,
etc...).
Note: the main use case for this change is to support MetaData search.
WDYT (especially on the vocabulary like "TraversalStrategy") ?
--
Thomas Mortagne
On Tue, Feb 15, 2011 at 2:55 PM, lucaa <platform-notifications(a)xwiki.org>wrote:
> Author: lucaa
> Date: 2011-02-15 14:55:47 +0100 (Tue, 15 Feb 2011)
> New Revision: 34685
>
> Added:
>
> platform/web/trunk/standard/src/main/webapp/resources/uicomponents/dashboard/dashboard.js
> Modified:
>
> platform/core/trunk/xwiki-core/src/main/resources/ApplicationResources.properties
>
> platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-dashboard/src/main/java/org/xwiki/rendering/internal/macro/dashboard/ColumnsDashboardRenderer.java
>
> platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-dashboard/src/main/java/org/xwiki/rendering/internal/macro/dashboard/DashboardMacro.java
>
> platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-dashboard/src/test/java/org/xwiki/rendering/RenderingTests.java
>
> platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-dashboard/src/test/resources/macrodashboard1.test
>
> platform/web/trunk/standard/src/main/webapp/resources/uicomponents/container/columns.css
>
> platform/web/trunk/standard/src/main/webapp/resources/uicomponents/dashboard/dashboard.css
> Log:
> XWIKI-5939: Allow to edit the positions of gadgets on a dashboard with drag
> & drop
> XWIKI-5941: Allow to remove a gadget from a dashboard
> * Added dashboard visual editor in edit inline mode, with drag & drop for
> gadgets positions and remove button
> Fixed the columns layout to use columns spacing on both sides of columns
> (instead of only the right side), and to handle empty columns
>
>
>
>
[snip]
> Added:
> platform/web/trunk/standard/src/main/webapp/resources/uicomponents/dashboard/dashboard.js
> ===================================================================
> ---
> platform/web/trunk/standard/src/main/webapp/resources/uicomponents/dashboard/dashboard.js
> (rev 0)
> +++
> platform/web/trunk/standard/src/main/webapp/resources/uicomponents/dashboard/dashboard.js
> 2011-02-15 13:55:47 UTC (rev 34685)
> @@ -0,0 +1,280 @@
> +var XWiki = (function (XWiki) {
> +// Start XWiki augmentation.
> +XWiki.Dashboard = Class.create( {
> + initialize : function(element) {
> + //the class of the gadget objects
> + this.gadgetsClass = "XWiki.GadgetClass";
> + // the source of the dashboard, the document where the objects are
> stored and which needs to be updated
> + // TODO: put me here, but it's a bit tough because we don't know if as
> URL or as fullname or space, page, wiki vars
> + // flag to know if the dashboard was edited or not, to know if
> requests should be sent on save or not
> + this.edited = false;
> + // the list of removed gadgets, to really remove when the inline form
> is submitted
> + this.removed = new Array();
> + this.element = element;
> + // add an extra class to this element, to know that it's editing, for
> css that needs to be special on edit
> + this.element.addClassName("dashboard-edit");
> + // find out all the gadget-containers in element and add them ids
> + this.containers = element.select(".gadget-container");
> + this.createDragAndDrops();
> + this.addGadgetsHandlers();
> +
> + // add save listener, to save the dashboard before submit of the form
> + document.observe("xwiki:actions:save",
> this.saveChanges.bindAsEventListener(this));
> + },
> +
> + /**
> + * @param container the container to get the id of
> + * @return the original container id, parsed from the HTML id of this
> container.
> + * This is used to be able to have unique ids of containers in
> the HTML, and at the same time be able to match
> + * containers ids to the model.
> + * FIXME: this will cause issues with multiple dashboards, add the name
> of the dashboard to the ids
> + */
> + _getContainerId : function (container) {
> + // the gadget container id is of the form
> gadgetcontainer_<containerId>, so parse it back
> + return container.readAttribute('id').substring(16);
> + },
> +
> + /**
> + * @param gadget the gadget to get the id of
> + * @return the original gadget id, parsed from the HTML id of this
> gadget.
> + * This is used to be able to have unique ids of gadgets in the
> HTML, and at the same time be able to match
> + * gadgets ids to the model.
> + * FIXME: this will cause issues with multiple dashboards, add the name
> of the dashboard to the ids
> + */
> + _getGadgetId : function(gadget) {
> + // gadget ids are of the form gadget_<id>
> + return gadget.readAttribute('id').substring(7);
> + },
> +
> + /*
> + * Drag & drop decorators functions, to display nice placeholders when
> dragging & dropping.
> + */
> + _insertPlaceholder: function (container) {
> + if ( container.down('.gadget') ||
> container.down('.gadget-placeholder')) {
> + return;
> + }
> + var placeholder = new Element('div', {'class' : 'gadget-placeholder'})
> + .update('$msg.get("dashboard.gadget.actions.drop")');
> + container.insert(placeholder);
> + },
> +
> + _removePlaceholder: function (container) {
> + var placeholders = container.select('.gadget-placeholder');
> + placeholders.each(function (el) {
> + el.remove();
> + });
> + },
> +
> + _doOnStartDrag: function() {
> + this.containers.each(this._insertPlaceholder);
> + },
> + _doOnEndDrag: function() {
> + this.containers.each(this._removePlaceholder);
> + },
> +
> + /**
> + * Creates drag and drops for the gadgets inside the gadget containers.
> + */
> + createDragAndDrops : function() {
> + // put all the container ids in a list, to be able to pass it to the
> sortables
> + var containerIds = new Array();
> + this.containers.each(function(container) {
> + containerIds.push(container.readAttribute('id'));
> + });
> +
> + // create a sortable for each gadget container
> + containerIds.each(function(containerId) {
> + Sortable.create(containerId, {
> + tag:'div',
> + only:'gadget',
> + handle:'gadget-title',
> + overlap: 'vertical',
> + scroll: window,
> + containment: containerIds,
> + dropOnEmpty: true,
> + constraint: false,
> + ghosting:false,
> + hoverclass: 'gadget-container-hover-highlight',
> + onUpdate: this.onMoveGadget.bind(this)
> + });
> + }.bind(this));
> + },
> +
> + /**
> + * Adds handlers to the gadgets on the dashboard, the remove.
> + */
> + addGadgetsHandlers : function() {
> + // iterate through all the gadgets and add settings handlers
> + this.element.select('.gadget').each(function(gadget){
> + // create a settings menu button and add it to the gadget-title
> + var itemMenu = new Element('div', {'class' : 'settings', 'title' :
> '$msg.get("dashboard.gadget.actions.tooltip")'});
> + var gadgetTitle = gadget.down('.gadget-title');
> + if (!gadgetTitle) {
> + return;
> + }
> + // create a remove button in the settings menu
> + var removeLink = new Element('div', {'class' : 'remove', 'title' :
> '$msg.get("dashboard.gadget.action.delete.tooltip")'});
> + removeLink.observe('click',
> this.onRemoveGadget.bindAsEventListener(this));
> + var actionsContainer = new Element('div', {'class' :
> 'settings-menu'})
> + actionsContainer.hide();
> + actionsContainer.insert(removeLink);
> + itemMenu.hide();
> + gadgetTitle.insert(itemMenu);
> + gadgetTitle.insert(actionsContainer);
> + // and listen to the click to open the menu
> + itemMenu.observe('click', function(event){
> + // toggle actions container
> + actionsContainer.toggle();
> + // and add a class to the item menu, to be able to color it
> properly
> + itemMenu.toggleClassName('settings-open');
> + });
> +
> + // display the link remove link only when the gadget is hovered
> + gadget.observe('mouseover', function() {
> + itemMenu.show();
> + });
> + gadget.observe('mouseout', function(event) {
> + var relatedTarget = event.relatedTarget || event.toElement;
> + if ((event.element() == gadget || event.element().up('.gadget'))
> && (relatedTarget == null || relatedTarget.up('.gadget') == null)) {
> + // enough propagation
> + event.stop();
> + itemMenu.hide();
> + actionsContainer.hide();
> + itemMenu.removeClassName('settings-open');
> + }
> + });
> + }.bind(this));
> +
> + // add the decorators to the gadgets on drag & drop
> + var doOnStartDrag = this._doOnStartDrag.bind(this);
> + var doOnEndDrag = this._doOnEndDrag.bind(this);
> + Draggables.addObserver({
> + onStart: doOnStartDrag,
> + onEnd: doOnEndDrag
> + });
> + },
> +
> + /**
> + * Removes the gadget passed by its id.
> + *
> + * @param event the click event on the remove button for a gadget
> + */
> + onRemoveGadget : function(event) {
> + // get the clicked button
> + var item = event.element();
> + // get the gadget to remove
> + var gadget = item.up(".gadget");
> + if (!gadget) {
> + return;
> + }
> + var gadgetId = this._getGadgetId(gadget);
> + this.removed.push(gadgetId);
> + // send a request to the REST url to remove the object corresponding
> to this gadget
> + // TODO: this should be the URI to the dashboard source, not to the
> current page
> + var gadgetObjectURL = XWiki.contextPath + '/rest/wikis/' +
> encodeURIComponent(XWiki.currentWiki) + '/spaces/' +
> + encodeURIComponent(XWiki.currentSpace) +
> '/pages/' + encodeURIComponent(XWiki.currentPage) +
> + '/objects/' +
> encodeURIComponent(this.gadgetsClass) + '/' + gadgetId +
> '?media=json&method=DELETE';
>
Why not use XWiki.currentDocument.getRestUrl ?
> + new XWiki.widgets.ConfirmedAjaxRequest(
> + gadgetObjectURL,
> + {
> + onCreate : function() {
> + // Disable the button, to avoid a cascade of clicks from
> impatient users
> + item.disabled = true;
> + },
> + onSuccess : function(response) {
> + // remove the gadget from the page
> + gadget.remove();
> + }.bind(this)
> + },
> + /* Interaction parameters */
> + {
> + confirmationText:
> "$msg.get('dashboard.gadget.action.delete.confirm')",
> + progressMessageText :
> "$msg.get('dashboard.gadget.action.delete.inProgress')",
> + successMessageText :
> "$msg.get('dashboard.gadget.action.delete.done')",
> + failureMessageText :
> "$msg.get('dashboard.gadget.action.delete.failed')"
> + }
> + );
> + },
> +
> + /**
> + * Function called when a gadget has been moved from a container to
> another.
> + *
> + * @param container the source and target container for the move,
> depending on the particular call of this function
> + */
> + onMoveGadget : function(container) {
> + // just flag that the dashboard was edited, actual changes were
> performed when the save button will be clicked
> + this.edited = true;
> + },
> +
> + /**
> + * Saves the changes on the dashboard in this document: perform all
> removes and injects the object edit fields in the
> + * inline edit form.
> + */
> + saveChanges : function(event) {
> + if (!this.edited) {
> + return;
> + }
> +
> + var editFields = this.prepareEditParameters();
> + // get the edit form
> + var editForm = event.memo.form;
> + // put the fields in a dashboard layout fieldset, to be able to update
> them on subsequent saves
> + // (in case of save & continue)
> + // FIXME: add the name of the dashboard in here, will cause issues
> when there are multiple dashboards
> + var dashboardFieldSet = editForm.down('.dashboard-layout-fieldset');
> + if (dashboardFieldSet) {
> + // empty the dashboard field set, to fill in with the new fields
> after
> + dashboardFieldSet.update('');
> + } else {
> + // create the dashboard field set, to fill in with the new fields
> + dashboardFieldSet = new Element('fieldset', {'class' :
> 'dashboard-layout-fieldset'});
> + editForm.insert(dashboardFieldSet);
> + }
> + editFields.each(function(editField) {
> + // create a hidden input for the update of the position of the
> gadget object and append it to the form
> + var fieldInput = new Element('input', {'name' : editField.key,
> 'value' : editField.value, 'type' : 'hidden'});
> + dashboardFieldSet.insert(fieldInput);
> + }.bind(this));
> + },
> +
> + /**
> + * Prepares a hashmap of parameters that would update the positions of
> the gadget fields.
> + * @return the hash of parameters to submit to the object edit URL, to
> update the gadget object positions in this
> + * dashboard
> + */
> + prepareEditParameters : function() {
> + var parameters = new Hash();
> + // for each gadget in the containers, put it in the map, along with
> its new position
> + this.element.select('.gadget-container').each(function(container) {
> + // get the id of the container
> + var containerId = this._getContainerId(container);
> + // foreach of its gadget children, get the position and compose the
> position update field
> + container.select('.gadget').each(function(gadget, index) {
> + // get the id of the current gadget -> object number, actually
> + var gadgetId = this._getGadgetId(gadget);
> + // the position field name as in the inline form edit
> XWiki.GadgetClass_0_position
> + var positionFieldName = this.gadgetsClass + '_' + gadgetId + '_' +
> 'position';
> + // compose the position field value as container, index (1 based,
> though)
> + var positionFieldValue = containerId + ', ' + (index + 1);
> + // and put these in the prepared hash
> + parameters.set(positionFieldName, positionFieldValue);
> + }, this);
> + }, this);
> +
> + return parameters;
> + }
> +});
> +//End XWiki augmentation.
> +return XWiki;
> +}(XWiki || {}));
> +
> +document.observe('xwiki:dom:loaded', function(event) {
> + // editable dashboard only in inline mode
> + if (XWiki.contextaction == 'inline') {
> + // edit first dashboard FIXME: to create a dashboard editor for all
> dashboards
> + var dashboardRootElt = $$('.dashboard')[0];
>
You can use $('mainContentArea').down('.dashboard') which should be less
greedy
Jerome.
> + if (dashboardRootElt) {
> + var dashboard = new XWiki.Dashboard(dashboardRootElt);
> + }
> + }
> +});
> \ No newline at end of file
>
>
> Property changes on:
> platform/web/trunk/standard/src/main/webapp/resources/uicomponents/dashboard/dashboard.js
> ___________________________________________________________________
> Added: svn:keywords
> + Author Id Revision HeadURL
> Added: svn:eol-style
> + native
>
> _______________________________________________
> notifications mailing list
> notifications(a)xwiki.org
> http://lists.xwiki.org/mailman/listinfo/notifications
>
Hello devs,
I'm working on some project outside XWiki which uses your rendering API.
Managed to wire everything and to define my custom macro, wrote some unit
tests but when I use another wiki dialect except XWIKI_2_0 (for instance
Creole) in the Converter, my macro is not recognized.
See sample code below:
// Initialize Rendering components and allow getting instances
ecm = new EmbeddableComponentManager();
ecm.initialize(this.getClass().getClassLoader());
Converter converter = ecm.lookup(Converter.class);
//Register my special custom macros
ComponentAnnotationLoader loader = new ComponentAnnotationLoader();
List<ComponentDescriptor> compDescriptors =
loader.getComponentsDescriptors(MySpecialMacro.class);
ecm.registerComponent(compDescriptors.get(0));
Converter converter = ecm.lookup(Converter.class);
WikiPrinter printer = new DefaultWikiPrinter();
// HERE IS THE PROBLEM WITH MY CUSTOM MACRO
converter.convert(new StringReader("{{link path='foo'}}"),
Syntax.CREOLE_1_0, Syntax.XHTML_1_0, printer);
So my problem is that I'd like to instruct the Creole parser or any other
parser except XWIKI_2 to correctly parse my custom macro.
I might be wrong, but I guess I'll have to implement some new parser to suit
my needs. In respect to that I've dug into the Converter class, saw it's
instantiation strategy, then followed the story until I've encountered
IWikiParser and all its subclasses (XWikiParser, CreoleParser etc ) which
I'm unable to find on the repository.
Could you please point me in the right direction?
Thank you
--
ing. Bogdan Flueras
Hello devs,
I'm working on some project outside XWiki which uses your rendering API.
Managed to wire everything and to define my custom macro, wrote some unit
tests but when I use another wiki dialect except XWIKI_2_0 (for instance
Creole) in the Converter, my macro is not recognized.
See sample code below:
// Initialize Rendering components and allow getting instances
ecm = new EmbeddableComponentManager();
ecm.initialize(this.getClass().getClassLoader());
Converter converter = ecm.lookup(Converter.class);
//Register my special custom macros
ComponentAnnotationLoader loader = new ComponentAnnotationLoader();
List<ComponentDescriptor> compDescriptors =
loader.getComponentsDescriptors(MySpecialMacro.class);
ecm.registerComponent(compDescriptors.get(0));
Converter converter = ecm.lookup(Converter.class);
WikiPrinter printer = new DefaultWikiPrinter();
// HERE IS THE PROBLEM WITH MY CUSTOM MACRO
converter.convert(new StringReader("{{link path='foo'}}"),
Syntax.CREOLE_1_0, Syntax.XHTML_1_0, printer);
So my problem is that I'd like to instruct the Creole parser or any other
parser except XWIKI_2 to correctly parse my custom macro. How can I do that?
I might be wrong, but I guess I'll have to implement some new parser to suit
my needs. In respect to that I've dug into the Converter class, saw it's
instantiation strategy, then followed the story until I've encountered
IWikiParser and all its subclasses (XWikiParser, CreoleParser etc ) which
I'm unable to find thier sources on the repository.
Could you please point me in the right direction?
Thank you!
--
View this message in context: http://xwiki.475771.n2.nabble.com/How-to-instruct-a-wiki-parser-to-render-m…
Sent from the XWiki- Dev mailing list archive at Nabble.com.
Hello all,
I would like to know whether XWiki is using any HTML filter for purifying
generated HTML.
JTidy seems old and not maintained...
Best regards
YB DEV
Hi everyone,
I have been working with the application strings a fair bit lately when
doing the German Translation for XWiki. While doing that I noticed a lot of
the stuff says "OpenOffice". Now, this term is problematic, IMO.
1. "OpenOffice" is trademarked in the Netherlands and UK so the office suite
opted for "OpenOffice.org", so if we were talking about this particular
office suite, it should actually be "OpenOffice.org".
2. Since Sun was acquired by Oracle there was a major fork which created
LibreOffice. The latter is going to be redistributed with Linux
distributions such as Ubuntu. That means to say that using "OpenOffice" is
kind of pointing to only one product, when more products are available.
What I would like to discuss is if you would like to see a replacement of
this very specific (and at least a little faulty) term and if so, what
should it be? I thought about "Open Office" which is getting a little
further away but I am really not happy with it either. "Open office suite"
would be a little more generic and would include all OOo derivatives with
the downside of including other potential open source office suites that got
nothing to do with OOo at all (such as GNOME Office).
Any comments on that?
Regards,
Johannes
--
View this message in context: http://xwiki.475771.n2.nabble.com/Replacing-mentions-of-OpenOffice-tp601553…
Sent from the XWiki- Dev mailing list archive at Nabble.com.
Hi devs,
I'd like to add a gallery macro that will be used like this:
{{gallery}}
any wiki content
{{/gallery}}
and which is equivalent to:
{{velocity output="false"}}
$xwiki.jsfx.use('uicomponents/widgets/gallery/gallery.js')
$xwiki.ssfx.use('uicomponents/widgets/gallery/gallery.css')
{{/velocity}}
(% class="gallery" %)
(((
any wiki content
)))
Some technical details:
* it won't support in-line mode
* it will have two optional parameters: width and height, both expressed
in pixel units (i.e. both are positive integers)
* it will handle its content as box macro does (using a
MacroContentParser without running transformations)
* it will be placed in xwiki-rendering-macros/xwiki-rendering-macro-gallery/
* images will be displayed as in
http://incubator.myxwiki.org/xwiki/bin/view/Improvements/OfficePresentation…
Further more, I will change the office importer module to generate:
{{gallery}}
image:presentation-slide1.jpg
image:presentation-slide2.jpg
...
image:presentation-slideN.jpg
{{/gallery}}
when importing an office presentation file. As a consequence the office
viewer macro will use the gallery macro behind the curtains (i.e.
{{office attachment="presentation.odp"/}} will display the presentation
slides using the gallery macro).
WDYT?
Note that the gallery macro could be based on a generic macro that:
* wraps the content with a GroupBlock and adds a CSS class name
* uses the SkinExtension component to import some JS/CSS resources
but there is no such macro right now. Another thing to note is that I
can't make gallery macro a wiki macro because the office importer module
will depend on it.
Thanks,
Marius
On Feb 10, 2011, at 8:50 PM, jvelociter (SVN) wrote:
> Author: jvelociter
> Date: 2011-02-10 20:50:06 +0100 (Thu, 10 Feb 2011)
> New Revision: 34616
>
> Added:
> enterprise/trunk/wiki/src/main/resources/XWiki/RequiredRightClass.xml
> Modified:
> enterprise/trunk/wiki/src/main/resources/Main/Activity.xml
> enterprise/trunk/wiki/src/main/resources/Main/Spaces.xml
> enterprise/trunk/wiki/src/main/resources/XWiki/AllAttachmentsResults.xml
> enterprise/trunk/wiki/src/main/resources/XWiki/DeletedAttachments.xml
> enterprise/trunk/wiki/src/main/resources/XWiki/DeletedDocuments.xml
> Log:
> XE-831 Provide a XClass that allow to mark pages that require to be saved by a user with certain rights
> XE-832 Add XWiki.RequiredRightClass to XE documents that require to be saved with certain rights
>
[snip]
> Modified: enterprise/trunk/wiki/src/main/resources/Main/Spaces.xml
> ===================================================================
> --- enterprise/trunk/wiki/src/main/resources/Main/Spaces.xml 2011-02-10 19:49:34 UTC (rev 34615)
> +++ enterprise/trunk/wiki/src/main/resources/Main/Spaces.xml 2011-02-10 19:50:06 UTC (rev 34616)
> @@ -1,5 +1,4 @@
> <?xml version="1.0" encoding="UTF-8"?>
[snip]
> +<className>XWiki.RequiredRightClass</className>
> +<guid>eb832884-79a9-4e96-b1fa-55fdbb06b0a5</guid>
> +<property>
> +<level>edit</level>
I don't understand the point of settings RequiredRightClass with level = edit. Editing a page always requires edit rights anyway, no?
(I'm sure I'm missing something though...)
Note: Wiki/TagCloud.xml also has an "edit" level
> Added: enterprise/trunk/wiki/src/main/resources/XWiki/RequiredRightClass.xml
> ===================================================================
> --- enterprise/trunk/wiki/src/main/resources/XWiki/RequiredRightClass.xml (rev 0)
> +++ enterprise/trunk/wiki/src/main/resources/XWiki/RequiredRightClass.xml 2011-02-10 19:50:06 UTC (rev 34616)
Hmm do we consider the RequiredRightClass a "core" class or not? If so I think we should create it programmatically if it doesn't exist in the wiki at startup.
Thanks
-Vincent
On Feb 9, 2011, at 10:42 AM, lucaa (SVN) wrote:
> Author: lucaa
> Date: 2011-02-09 10:42:42 +0100 (Wed, 09 Feb 2011)
> New Revision: 34581
>
> Added:
> enterprise/trunk/wiki/src/main/resources/XWiki/GadgetClass.xml
> Modified:
> enterprise/trunk/wiki/src/main/resources/Main/Dashboard.xml
> Log:
> XE-828: Main.Dashboard dashboard must be updated to store its gadgets in objects
> * Refactored the Main.Dashboard to store the gadgets in objects
>
>
> Modified: enterprise/trunk/wiki/src/main/resources/Main/Dashboard.xml
> ===================================================================
> --- enterprise/trunk/wiki/src/main/resources/Main/Dashboard.xml 2011-02-09 09:38:29 UTC (rev 34580)
> +++ enterprise/trunk/wiki/src/main/resources/Main/Dashboard.xml 2011-02-09 09:42:42 UTC (rev 34581)
> @@ -11,8 +11,8 @@
[snip]
Another option would be to have an Initializer component in the Dashboard macro module which would listen to the application started event (note that this event needs the DB to be ready we need to talk about doing this one since we're in need of it) and would create the GadgetClass if it doesn't already exist (or update it if it's missing some fields for example).
This would allow to:
1) remove the dependency this commit is creating with the default XE XAR
2) removes the need for a gadget application
3) make the dashboard macro work even when the default XE XAR is not installed or if the user hasn't updated to the newest XAR
Notes:
* Since we don't have the app started event coupled with the app ready, we could FTM have the dashboard macro implement Initializable and perform the init there.
* Maybe we can think of other pages that would be needed for the gadget "feature" (for ex listing all dashboards available in the current wiki, etc). In this case we would need a specific gadget appilcation in platform/applications IMO. Note that even if we need this application we still don't need to have a GadgetClass.xml file.
WDYT?
Thanks
-Vincent
Hi everyone,
Thanks to everyone who contributed to the bugfixingday of yesterday.
I've blogged the results:
http://www.xwiki.org/xwiki/bin/view/Blog/BugFixingDayFebruary2011
Please let me know if I've forgotten someone.
Let's have even more contributions next time!
Thanks
-Vincent
I would like to propose another round of storage deprecations, the goal of these is to remove and
decrease visibility of code in order to simplify storage and move as much as possible over from API
to implementation details. I am proposing deprecation of each of the following, after 2 releases
this may be revisited and they may be removed or altered. The following are changes I have made
locally and found xwiki-core does compile and test with those changes.
For now I propose adding deprecation comments and annotations to each class or method.
WDYT?
Caleb
XWikiAttachmentStoreInterface.java
saveAttachmentContent(XWikiAttachment attachment, XWikiContext context, boolean bTransaction)
remove
cleanUp(XWikiContext context)
remove
XWikiBatcher.java
remove entirely
XWikiBatcherFactory.java
remove entirely
XWikiBatcherStats.java
remove entirely
XWikiDefaultStore.java
remove entirely
XWikiHibernateBaseStore.java
getDatabaseProductName(XWikiContext context)
public --> protected
shutdownHibernate(XWikiContext context)
remove
updateSchema(XWikiContext context)
public --> private
getSchemaFromWikiName(String wikiName, DatabaseProduct databaseProduct, XWikiContext context)
protected --> private
getSchemaFromWikiName(XWikiContext context)
protected --> private
getSchemaUpdateScript(Configuration config, XWikiContext context)
public --> private
updateSchema(String[] createSQL, XWikiContext context)
public --> private
updateSchema(BaseClass bclass, XWikiContext context)
remove
isVirtual(XWikiContext context)
public --> protected
beginTransaction(SessionFactory sfactory, XWikiContext context)
public --> protected
beginTransaction(SessionFactory sfactory, boolean withTransaction, XWikiContext context)
public --> protected
endTransaction(XWikiContext context, boolean commit, boolean withTransaction)
public --> protected
execute(XWikiContext context, boolean bTransaction, boolean doCommit, HibernateCallback<T> cb)
public --> private
XWikiHibernateStore.java
getContent(XWikiDocument doc, StringBuffer buf)
remove
public List search(Query query, int nb, int start, XWikiContext context)
remove
injectCustomMappingsInSessionFactory(BaseClass bclass, XWikiContext context)
public --> private
injectCustomMappingsInSessionFactory(XWikiContext context)
public --> private
XWikiHibernateVersioningStore.java
loadAllRCSNodeInfo(XWikiContext context, final long id, boolean bTransaction)
protected --> private
Hi community,
As previously announced, today is a Bugfixing Day, and everyone is
welcome to participate with bug reporting, patching, or issue cleanup.
The rules are simple:
- First try to synchronize on the IRC channel (#xwiki on irc.freenode.org)
- When closing an issue, add a "bugfixingday" keyword to it, so that it
can be correctly assigned to this group effort
- The status is available at
http://jira.xwiki.org/jira/secure/IssueNavigator.jspa?reset=true&jqlQuery=r…
Have fun!
--
Sergiu Dumitriu
http://purl.org/net/sergiu/
The XWiki development team is pleased to announce the release of XWiki
Enterprise 3.0 Milestone 2.
Go grab it at http://www.xwiki.org/xwiki/bin/Main/Download
This is the second milestone of the XWiki Enterprise 3.0 version. There
will be a third milestone, the last, in about three weeks in which we
hope to introduce a dashboard editor and support for XAR handling to the
Extension Manager.
The highlights of this release are:
* Full UI redesign of the administration application
* Experimental filesystem attachment storage
* PDF export improvements
* WYSIWYG content editor bug fixes and improvements
* More standardized UI forms
For more information, see the release notes at
http://www.xwiki.org/xwiki/bin/ReleaseNotes/ReleaseNotesXWikiEnterprise30M2
Thanks
-The XWiki dev team
Hi devs,
Adding the notion of Workspaces is a feature required by the Wiki3.0 (
http://wiki30.xwikisas.com ) research project that XWiki is currently
involved in.
To read the proposal and several use cases, please see
http://dev.xwiki.org/xwiki/bin/view/Design/Workspaces
Your feedback is appreciated.
Thanks,
Eduard Moraru
According to my records (fool I was I didn't use @since)
r30719 [misc.] Deprecated XWikiHibernateStore functions which should be internal.
was prior to 2.5M1 which means that they have been deprecated for 2.5, 2.6, and 2.7.
The original mail:
http://lists.xwiki.org/pipermail/devs/2010-August/019620.html
I propose removing:
saveXWikiClassProperty
used nowhere.
deleteXWikiClass
used nowhere.
getBatcherStats
used nowhere.
resetBatcherStats
used nowhere.
and making private:
loadXWikiProperty
used nowhere (outside of XWikiHibernateStore).
saveXWikiClass
used nowhere (outside of XWikiHibernateStore).
loadXWikiClass
used nowhere (outside of XWikiHibernateStore).
loadAttachmentList
used nowhere (outside of XWikiHibernateStore).
saveAttachmentList
used nowhere (outside of XWikiHibernateStore).
saveAttachment
used nowhere (outside of XWikiHibernateStore).
injectCustomMappingsInSessionFactory
used nowhere (outside of XWikiHibernateStore).
injectInSessionFactory
used nowhere (outside of XWikiHibernateStore).
isValidCustomMapping
used nowhere (outside of XWikiHibernateStore).
Others may be made private or removed as dependencies in the platform are retired or refactored.
WDYT?
Caleb
Hi devs,
XE 3.0M2 release was planned for today. I'd like to start the release
process at 2PM EET. Let me know if there are critical bugs that could
delay the release.
Thanks,
Marius
Hi devs,
currently the rendering macros are added to the build as runtime
dependencies to the old core, which would pull them further in
web-standard so that they are packed in the war.
I propose to change this and add them as dependencies to the standard
web war, just like the other core components that need to be packed in
the platform by default (e.g. annotations), for the following reasons:
* core does not depend on these macros, they're there only for packaging
purposes. Semantically speaking this is a little odd since the
"packaging" module is the war, not the core jar.
* it would allow sinner macros take the wrong way and depend on
xwiki-core (the old core), without creating circular dependencies.
my +1 (I will do it as soon as I get 3 votes since I already added this
circular dep in the build and I need to fix it).
WDYT?
Thanks,
Anca
On Feb 8, 2011, at 11:59 PM, sdumitriu (SVN) wrote:
> Author: sdumitriu
> Date: 2011-02-08 23:59:14 +0100 (Tue, 08 Feb 2011)
> New Revision: 34570
>
> Added:
> platform/web/trunk/standard/src/main/webapp/templates/deprecatedMacros.vm
> Modified:
> platform/web/trunk/standard/src/main/webapp/templates/macros.vm
> Log:
> XWIKI-5972: Remove deprecated macros
Sergiu, have you checked extensions.xwiki.org? I think some of the macros you removed or that you marked deprecated are documented there and I believe we need to update their docs accordingly too.
Thanks
-Vincent
[snip]
Hi,
I have a question about managing object rights.
Suppose that I have a document with two Objects: Object_1 and Object_2. How
could I set up access rights for admin users group can edit both Objects,
but regular users group could only edit Object_2?
Best regards,
Luís Braga
--
View this message in context: http://xwiki.475771.n2.nabble.com/Set-access-rights-for-specific-object-in-…
Sent from the XWiki- Dev mailing list archive at Nabble.com.
Hi,
I have created a class with some properties, including a Database List. What
I want to do is check if some element has been selected for a particular
object of that class.
I'm currently using this velocity code:
#set($obj = $doc.getObject('Space.Class'))
#set($property = $obj.get('propertyName'))
* $property
where propertyName is the name of the Database List property. The result is
a string with all the selected elements in that object.
How could I check if some particular element exists in that property? Could
I iterate over that property?
Thanks in advance.
Best regards,
Luís Braga
--
View this message in context: http://xwiki.475771.n2.nabble.com/Access-Database-List-elements-tp5992777p5…
Sent from the XWiki- Dev mailing list archive at Nabble.com.