Hi All,
i want to put a {{warning}} in the header of a page when a specific macro is
not contained. How can i do that. I tried in a Listener when the needed
Macro-Block is not contained with
doc.getXDOM().getRoot().addChild(new WordBlock("{{warning}}Warning
Text.{{/warning}}"));
context.getWiki().saveDocument(doc, context);
This not works. What is the correct way to manipulate the Document DOM on
Load?
Regards,
Matthias
--
View this message in context: http://xwiki.475771.n2.nabble.com/Inject-Warning-in-Page-when-Macro-in-Spac…
Sent from the XWiki- Dev mailing list archive at Nabble.com.
Hi All,
I want to create a component where i can overwrite a method of the component
from velocity or groovy script inside a wiki page. Its also fine if i can
"read" a groovy script to the component so i can use the defined logic.
Maybe i have to use a own programmed macro for that.
Is that possible? Do you use something similar somewhere?
Regards,
Matthias
--
View this message in context: http://xwiki.475771.n2.nabble.com/Overwrite-Method-of-Component-in-Velocity…
Sent from the XWiki- Dev mailing list archive at Nabble.com.
Hi,
Im trying to fix http://jira.xwiki.org/jira/browse/XWIKI-4274
Basically if you do $xwiki.getDocument("someDoc").getRenderedContent()
it'll get executed in the context of the current doc which I believe
is wrong especially since other signatures of getRenderedContent()
execute in the target document's context.
I have fixed this locally but found that admin.vm for example is
assuming that getRenderedContent() will get executed in the context of
the calling doc (i.e. XWiki.Import when doing an import for example).
FYI the chain flow is admin.vm -- getRenderedContent() -->
XWiki.AdminSheet --> XWiki.AdminImportSheet --> importinline.vm, which
requires the current doc to be XWiki.Import (to get/put attachments
from/to it).
I can fix this easily using a new getRenderedContent signature I've
introduced.
However I'm wondering if we have other places that incorrectly use
getRenderedContent() and assume it won't be rendered in the context of
the target document.
Is this change too dangerous to make? If not know, we'll need to it
quickly (2.1M1?) since it's an important bug IMO.
WDYT?
Thanks
-Vincent
Hello,
I would like to request a repository on xwiki-contrib for the Recruitment
Application i am working on.
I'd like the repo to be named application-recruitment and also jira
component.
My github username is chalx.
Thank you,
Alexandru Chelariu
Hi devs,
Problem
=======
This week end I’ve had an idea that solves the following issue:
- Make it easy for the user to be able to change his wiki's home page
- Make it understandable when clicking “edit” on the home page
Solution
=========
At some point in the past, I moved the dashboard which was on the home page to the Dashboard space. My rationale at the time was:
- if the user removes the home page then the user will still be able to navigate to the Dashboard by clicking on the “Dashboard” link in the Applications Panel
- when editing the home page it’s “just” an Include
Said differently, I considered that the home page can be configured to point to any app.
This is what I’d like to push for and make it easy for the user to configure the home page so that it can point to any app.
Implementation
===============
- A HomePage.HomePageClass XClass with one “reference” field which is the reference to the document to include from the home page (the app to point to if you prefer)
- A HomePage.HomePageSheet which is bound to the HomePage.HomePageClass
- One instance of the HomePage.HomePageClass put in Main.WebHome so that when you click “edit” on the home page, HomePage.HomePageSheet is called and displays some instructions about changing the home page. Here’s an example:
https://www.evernote.com/shard/s119/sh/b682040d-6a09-4cfc-b6aa-1eab4b4d8d5e…
Here’s the content of HomePageSheet (not finished, I still need to code the part that changes the “reference” property):
{{velocity}}
#if ($xcontext.action == 'edit')
#set ($previewenabled = 'false')
The content of this home page can be the content of any page you wish.
Right now it is displaying the content of the [[$doc.getValue('reference')>>$doc.getValue('reference')]] page.
In order to change it, click the "Use as Home Page" link in the table below for the page you wish to use as your new home page.
#set($collist = ['doc.name', 'doc.space', 'doc.date', 'doc.author', '_actions'])
#set($colprops = {
'doc.title' : { 'type' : 'text' , 'size' : 30, 'link' : 'view' },
'doc.fullName' : { 'type' : 'text' , 'size' : 30, 'link' : 'view' },
'doc.name' : { 'type' : 'text' , 'size' : 30, 'link' : 'view' },
'doc.space' : { 'type' : 'text', 'link' : 'space' },
'doc.date' : { 'type' : 'date' },
'doc.author' : { 'type' : 'text', 'link' : 'author' },
'_actions': { 'html': true, 'sortable': false, 'actions': ['Use'] }
})
#set($options = {
'translationPrefix' : 'platform.index.'
})
#livetable('documents' $collist $colprops $options)
#else
## If there's content don't use the default app
#if ($doc.content.trim().length() > 0)
$doc.content
#else
{{include reference="$doc.getValue('reference')" context="new"/}}
#end
#end
{{/velocity}}
- Note that if the user forces the edition in wiki mode or WYSIWYG mode of the home page he gets an empty page and he can put content and when he saves his content is displayed! (this is achieved through the following portion of the script in HomePageSheet:
## If there's content don't use the default app
#if ($doc.content.trim().length() > 0)
$doc.content
#else
{{include reference="$doc.getValue('reference')" context="new"/}}
#end
- Also note that I’d like to propose to add the ability to configure the buttons to display in edit mode. ATM I think only the preview one can be hidden but we could do the same for all. In our case here we could decide to only leave the “Cancel” one active since clicking on “use” in the Livetable could set the page to include immediately. The other option is to use a different picker than the livetable and keep the save buttons. Any suggestion for this?
The idea would be to package this as an HomePage Application in xwiki-platform and would be bundled by default in XE.
WDYT?
Thanks
-Vincent
Hello all,
Following the "Start supporting IE10 and IE11" thread I’d like to propose
to vote if we will support IE10 and IE11.
The most important reasons for supporting these versions are:
- Internet Explorer 8 and Internet Explorer 9 are still widely used by
users, but many of them are currently choosing to update to IE10 and IE11.
- according to netmarketshare.com (Browsers -> Desktop Share by Version)
from a total of 100%, IE10 is used by 6.85% users and IE11 by 16.61% users.
It’s true that IE10 is not as popular as the older versions (IE8 - 20.85%
and IE9 - 8.89%), but its usage percentage is still significant.
Here’s my +1.
Andreea
Hello,
i have an idea concerning the icons of base skin colibri or others, we
should integrate "Entypo" on the skin ans delete all image icons, the
advantage is :
1- we win the chargement time of pages
2- reduce the number of code lines in the code.
3- we can add, edit , put color and change the sise of this icons
4- the skin of this icons are in flat design and we can put it in any form
5- its free for any users
for more information http://www.entypo.com/
wordpress have just integrate this solution
Yacine
Hi guys,
I have pushed a first version of flamingo in platform/XE, but it is only a
prototype that need a LOT more do be ready for production.
One of the new things brought by flamingo is the "Applications" left bar,
which is not exactly the same thing as the Applications Panel we already
have.
We can see it more as a "dock" with a list of applications, and in the
future, we could make it customizable by the user. Caty has written a
proposal for this [1].
Right now, for the first implementation, I need to make some choices about
the way we "populate" this bar. We can create new classes to describe the
bar entries, or new UI Extensions (maybe not the good choice regarding the
recent e-mails...), or by re-using the existing AddApplicationUIX... It is
described on
http://design.xwiki.org/xwiki/bin/view/Proposal/AppBar#HImplementationConsi….
Other thing: In my draft, I have created a new VM file on the filesystem
for this concept. Maybe I should create it as an extension point stored in
the database, but it means it won't appear on an empty wiki. WDYT?
I let you make some comments about this.
Thanks,
Caty & Louis-Marie
[1] http://design.xwiki.org/xwiki/bin/view/Proposal/AppBar