Hi devs,
I'd like to modify the Box macro in the following manner:
* Deprecate the "title" parameter. I don't believe it's needed right now (it's put below the image and before the content) since it can simply be put in the content
* Add a new parameter for positioning the image with respect to the content. Possible values would be: top (ie before the content) or left (ie left of the content), possibly some others if we want (right)
WDYT?
Thanks
-Vincent
PS: Note that one use case I have is to implement http://jira.xwiki.org/jira/browse/XE-723 where I'd like the image to be aligned with the text, left to it. I also find it a bit strange to be able to add any wiki content to the title and I don't see the title as necessary. Also right now if you have a title but no content the macro doesn't work (content is mandatory).
On 03/28/2011 02:58 PM, vmassol (SVN) wrote:
> Author: vmassol
> Date: 2011-03-28 14:58:12 +0200 (Mon, 28 Mar 2011)
> New Revision: 36066
>
> Added:
> rendering/trunk/xwiki-rendering-macros/xwiki-rendering-macro-message/src/main/java/org/xwiki/rendering/internal/macro/message/SuccessMessageMacro.java
> Modified:
> rendering/trunk/xwiki-rendering-macros/xwiki-rendering-macro-message/src/main/resources/META-INF/components.txt
> rendering/trunk/xwiki-rendering-macros/xwiki-rendering-macro-message/src/test/java/org/xwiki/rendering/macro/message/MessageMacroTest.java
> Log:
> XRENDERING-110: Success Macro
>
> Copied: rendering/trunk/xwiki-rendering-macros/xwiki-rendering-macro-message/src/main/java/org/xwiki/rendering/internal/macro/message/SuccessMessageMacro.java (from rev 36018, rendering/trunk/xwiki-rendering-macros/xwiki-rendering-macro-message/src/main/java/org/xwiki/rendering/internal/macro/message/InfoMessageMacro.java)
> ===================================================================
> --- rendering/trunk/xwiki-rendering-macros/xwiki-rendering-macro-message/src/main/java/org/xwiki/rendering/internal/macro/message/SuccessMessageMacro.java (rev 0)
> +++ rendering/trunk/xwiki-rendering-macros/xwiki-rendering-macro-message/src/main/java/org/xwiki/rendering/internal/macro/message/SuccessMessageMacro.java 2011-03-28 12:58:12 UTC (rev 36066)
> @@ -0,0 +1,41 @@
> +/*
> + * See the NOTICE file distributed with this work for additional
> + * information regarding copyright ownership.
> + *
> + * This is free software; you can redistribute it and/or modify it
> + * under the terms of the GNU Lesser General Public License as
> + * published by the Free Software Foundation; either version 2.1 of
> + * the License, or (at your option) any later version.
> + *
> + * This software 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.
> + *
> + * You should have received a copy of the GNU Lesser General Public
> + * License along with this software; if not, write to the Free
> + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
> + * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
> + */
> +package org.xwiki.rendering.internal.macro.message;
> +
> +import org.xwiki.component.annotation.Component;
> +
> +/**
> + * Displays a success message.
> + *
> + * @version $Id:$
This is not a subversion keyword. So, you don't have a properly
configured environment.
> + * @since 2.0M3
^ Really?
> + */
> +@Component("success")
> +public class SuccessMessageMacro extends AbstractMessageMacro
> +{
> + /**
> + * Create and initialize the descriptor of the macro.
> + */
> + public SuccessMessageMacro()
> + {
> + super("Success Message", "Displays a success message note.");
> + setDefaultCategory(DEFAULT_CATEGORY_FORMATTING);
> + }
> +}
--
Sergiu Dumitriu
http://purl.org/net/sergiu/
Hi All
hi i'm a student at University of Moratuwa, Sri Lanka and i'm currently
doing my internship at WSO2 an open source software development company. I
went through the list of ideas that XWiki had posted and came across a
few interesting projects. The project to create a prototype of XWiki for
the App Engine seemed to be interesting mainly because i'm a big fan of the
App Engine and have done a few projects involving it. I think its a great
idea. would like to know if this is to be implemented using a framework
like objectify or just though the services provided by the App Engine. I'm
still new to XWiki and i'm looking into XWiki these days and hope to learn
about it.
Thanks
--
Pulasthi Supun
www.99gears.com
Hi devs,
One thing that was neglected in the preparation of 3.0 is a fresh
default color theme for this new release cycle.
What I propose is to use by default a theme similar with the current
xwiki.org themes: dark grey menus and panel headers, and a lively
colored page header. Besides bringing a fresh look to the default
wiki, this combination has the advantage of having been used and
tested on xwiki.org for several months, so there will be no unpleasant
surprises (like wrong contrasts) coming with this change. Here are two
themes that follow this pattern, both having a stylish gradient as
header image:
- orange:
http://extensions.xwiki.org/xwiki/bin/Extension/Soft+Orange+ColorTheme
- blue: http://extensions.xwiki.org/xwiki/bin/Extension/Soft+Blue+ColorTheme
My +1 goes for using the orange version as default color theme in 3.0.
--
Sergiu Dumitriu
http://purl.org/net/sergiu/
I need to build and run wysiwyg editor seperately, I have tried downloaded
all the source file from svn:
http://svn.xwiki.org/svnroot/xwiki/platform/web/trunk/ and builded it using
"mvn install", then I got a war file with complied GWT javascript and
related files and two jars: xwiki-web-gwt-wysiwyg-server-3.1-SNAPSHOT.jar,
xwiki-web-gwt-wysiwyg-client-3.1-SNAPSHOT-shared.jar, but I didn't find the
entry to run wysiwyg editor, so that I can run it on my browser seperately
in order to test my own code further.
However I found a document
http://dev.xwiki.org/xwiki/bin/view/Community/Building#HBuildingtheWYSIWYGe…,
it tells to run test on browser using the maven profile -Pmanual, I tried
it, but still can not run it on the browser.
Anyone can tell me how to run the wysiwyg editor so that I can work on the
codes, and test it in my own browser?
--
Best wishes,
许凌志(Jame Xu)
MOE KLINNS Lab and SKLMS Lab, Xi'an Jiaotong University
Department of Computer Science and Technology, Xi’an Jiaotong University
Hi all,
starting from the need of the dashboards, to specify the default edit
mode for a page, here's how I would like to implement it, in the
following days.
Context:
There is already a mechanism for this, which works like this: if,
document A includes sheet B and sheet B has an object of type
"XWiki.SheetClass", then clicking the edit button of document A will
automatically open the edit mode specified in the XWiki.SheetClass
object of the sheet B.
Proposal:
1/ I propose an enhancement of the existing mechanism, to allow such an
XWiki.SheetClass object to be attached to the document A directly.
Namely the edit mode for the document A will be read first from the
objects of type XWiki.SheetClass in document A, then if none found, from
the objects in the included sheet.
2/ XWiki.SheetClass should be renamed to XWiki.EditModeClass, or
XWiki.DefaultEditModeClass, or something alike, that suggests its
purpose. Current class name will be deprecated but still preserved for a
good while. What would be your name proposals for this?
3/ optionally, we could deprecate the current mechanism, and say that
objects should never be attached to sheets anymore, only to pages. This
way, the usecase of a sheet should be implemented by adding the
EditModeClass object in the template from which docs are created, so
that it can be easily propagated to a set of documents.
I am not against the current mechanism, I think it's a nice helper, and
the replacing implementation has the drawback of making it mandatory to
create documents through templates, or manually adding this object in
the doc creation code. Therefore, I would be -0.5 on this.
WDYT?
4/ optionally, add an edit mode panel (or whatever we want to replace
them with) to change this from a nice UI. This can turn out useful in
cases when such an edit object is added automatically (e.g. dashboards)
and when it's no longer needed (dashboard macro call is deleted from the
page), the default edit mode still stays the one set automatically. This
is very optional, as I see little cases when users would delete just
the macro call, and not the page as a whole.
Thanks,
Anca
Hi devs,
I'm currently working on http://jira.xwiki.org/jira/browse/XWIKI-6103
which has two aspects:
1) stored the user as a DocumentReference in the context so that we
stop loosing the user all the time when switching databases
2) provide a DocumentReference oriented API to deal with the current user
For 2 I would like to propose some change in the way to see not logged
in user: I would like to make getUserReference return null when there
is no user logged in instead of some DocumentReference containing
<currentwiki>:XWiki.XWikiGuest. I understand that when dealing with
string "XWikiGuest" hack appear but null when there is actually no
context user makes much more sense at Java level IMO. Make safer to
distinguish between no logged in user and logged in user and you don't
really care what has been chosen as virtual name for not logged in
users at this level.
That will not impact anything which already exist and is just for code
that will use the new API of course but I think it deserve some debate
first since that's another way to see things and well it's an API.
WDYT ?
--
Thomas Mortagne
Dear Marius Florea and Anca Luca:
I am James Xu and I want to contribute to xwiki community through GSoc
project. I am interested in working on the idea "Auto Completion in Content
Editors".
I choose this idea for two reasons:
First, I knew Xwiki since 2009, and that is the first time to use xwiki as
wiki system in our lab, and I think it's time to give something back to
xwiki.
Second, the idea "Auto Completion in Content Editors" attracts me a lot. I
have done some projects related to autocompletion before.
the first project is to implement an autocompletion feature for search input
form for a Web search system of our lab;
the second is to research how to aggregate widgets for a mashup system, and
wired all them up through an autocompletion algorithm.
Though they are different from this idea, they give me some general ideas
for autocompletion, and I want to extend autocompletion function to the
content editors based on the kowledge gained from the previous projects and
research.
Here are my understanding of the requirements of this idea, and I hope you
can give me more tips and feedbacks:
For xwiki editor:
- Implements autocompletion function for content editor, for example, when
user want add link to their wiki page, they first type"[[", and then the
autocompletion function will run to give him the suggestion of some
documents begin with the charactor he types in, the list will narrowed when
he types more. another example can be autosuggest to the attachment link.
- Auto completion for some syntax like eclipse HTML editor. for example,if
user type"{{" which is the syntax for xwiki macros, then it should suggest
him a list of macros name like "box, code..." when user select one, if say
"box", it will insert to xwiki the following:
"{{box cssClass="" title="" width=""}} {{/box}}" , user should not
remember what the attributes for the macros, and would not to close the tag
after a long input.
what should I do is to find out which syntax can be improved by such kind of
autocompletion, and what is the interaction between the editor and the user.
For xwiki WYSIWYG editor:
- Supply the same function as what we have done in xwiki editor, and then
translate automatically into what should it look like for end users. For
example,when user finnish the box macro, it should be transalted to
visualized box module for user, as well as when user type //word//, it will
shows up '*word*'.
I have almost 4 years web development experiences, php for 3 years, and java
for 2 years. I have some knowledge in using SSH(Strust2+spring+hibernate) as
java web framework. I am also practiced in javascript/css/html,and have more
than 3 year development experiences. I use dojo for almost 4 years since
version 0.9, and jquery for 2 years, I am starting to use GWT this year, but
I think I would be a quick learner based on the knowledge I gained from the
other two js toolkits.
Look forward to your feedbacks.
--
Best wishes,
许凌志(James Xu)
MOE KLINNS Lab and SKLMS Lab, Xi'an Jiaotong University
Department of Computer Science and Technology, Xi’an Jiaotong University
Hi All,
I finally got it.
I was trying to create a user without the "XWiki." prefix but when I discovered that if I creates it using the createUser method from the XWiki class, the username must NOT have that prefix, but the new XWikiUser that checkAuth returns must have it.
I followed the XWikiSunSSOAuthenticator code and found the solution.
Again, many thanks you for your help
Marco A. Gonzalez
Date: Fri, 25 Mar 2011 12:46:27 +0100
From: Thomas Mortagne <thomas.mortagne(a)xwiki.com>
Subject: Re: [xwiki-devs] CAS Integration + new User creation
To: XWiki Developers <devs(a)xwiki.org>
Message-ID:
<AANLkTimN8OT5Nr+=5dLJ6WdQ-M3V9tpwGr3KFk9zeB0E(a)mail.gmail.com>
Content-Type: text/plain; charset=UTF-8
On Fri, Mar 25, 2011 at 12:46, Thomas Mortagne
<thomas.mortagne(a)xwiki.com> wrote:
> Hi,
>
> As Kevin suggested it's a good idea to follow existing authenticators
> on http://svn.xwiki.org/svnroot/xwiki/contrib/sandbox/authenticators/
>
> Note that you get reuse some generic abstract classes in
> http://svn.xwiki.org/svnroot/xwiki/contrib/sandbox/authenticators/xwiki-aut…
> to make it easier for you?
Remove the "?" here :)
>
> 2011/3/25 Marco Antonio Gonz?lez <magonzalez(a)grupointermark.com>:
>> Hi,
>>
>>>> Are you sure wikiname (not a very good variable name ;) ) includes the
>>>> "XWiki." prefix?
>>
>> When I try to use createEmptyUser(xwikiname, userRights, context) from an XWiki object (context.getWiki()) if I manually add "XWiki." in the "xwikiname" it creates an "XWiki.mynewuser", but on the Admin Users page it doesn't looks like a normal user, it lacks many of the the user properties and doesn't have the XWiki.XWikiUserSheet in it's content, also when I try to get it's XWikiDocument it appears as XWiki.XWiki.mynewuser.
>>
>> I'm working with XWiki version 2.4 (xwiki-core-2.4.jar
>>
>> Currently, I'm checking how XWikiSunSSOAuthenticator does it, checking what I do wrong.
>>
>> Thank you,
>> Marco A. Gonzalez
>>
>> Date: Fri, 25 Mar 2011 11:44:30 +0200
>> From: Marius Dumitru Florea <mariusdumitru.florea(a)xwiki.com>
>> Subject: Re: [xwiki-devs] CAS Integration + new User creation
>>
>> Hi Marco,
>>
>> On 03/25/2011 10:40 AM, Marco Antonio Gonz?lez wrote:
>>> Hi all,
>>>
>>> I'm new developing with XWiki, and I'm not sure this list is the correct to post this, so sorry in advance for any inconvenience and my bad english.
>>>
>>> I'm trying to get an integration with CAS Auth instead of own XWiki Auth, but when I try to create a user on my own implementation of XWikiAuthServiceImpl, the user is created on XWiki space, but when i log into XWiki and Main is my default Space, the Profile link on top points to /xwiki/bin/view/Main/mynewuser instead of /xwiki/bin/view/XWiki/mynewuser where I can edit his first name, surname, etc. Is this the default behaviour? If not, any suggestions of what I do wrong?
>>>
>>> The autentication code is, in my CASAuthServiceImpl class:
>>>
>>> public XWikiUser checkAuth(XWikiContext context) throws XWikiException {
>>> ? ? String remoteUser = context.getRequest().getRemoteUser();
>>> ? ? String wikiname = "";
>>> ? ? if ((remoteUser == null) || remoteUser.equals("")) {
>>> ? ? ? ?getLogger().warn("checkAuth: User cannot be authenticated (REMOTE_USER is null)");
>>> ? ? ? ?try {
>>> ? ? ? ? ? context.getResponse().sendRedirect("/cas/login");
>>> ? ? ? ?} catch (IOException ioe) {
>>> ? ? ? ? ? getLogger().warn("checkAuth: CAS Error. Let XWiki handle it. ");
>>> ? ? ? ? ? return super.checkAuth(context);
>>> ? ? ? ?}
>>> ? ? } else if (remoteUser.equalsIgnoreCase("xwiki")) {
>>> ? ? ? ?getLogger().warn("checkAuth: User is XWIKI (superadmin)");
>>> ? ? ? ?wikiname = "XWiki.superadmin";
>>> ? ? } else {
>>> ? ? ? ?XWiki wiki = context.getWiki();
>>
>>> ? ? ? ?wikiname = wiki.clearName(remoteUser, true, true, context);
>>
>> Are you sure wikiname (not a very good variable name ;) ) includes the
>> "XWiki." prefix?
>>
>>> ? ? ? ?this.context.getWiki().createEmptyUser(wikiname, "edit", context);
>>> ? ? }
>>
>>> ? ? context.setUser(wikiname);
>>
>> References are resolved relative to the current context:
>>
>> Foo ? ? ? ? ?-> currentWiki:currentSpace.Foo
>> Bar.Foo ? ? ?-> currentWiki:Bar.Foo
>> wiki:Bar.Foo -> wiki:Bar.Foo
>>
>> Hope this helps,
>> Marius
>>
>>> ? ? return new XWikiUser(wikiname);
>>> } catch (XWikiException e) {
>>> ? ? getLogger().error("checkAuth: Cannot validate user. " + e.getMessage());
>>> ? ? throw e;
>>> }
>>>
>>> Thank you,
>>> Marco A. Gonzalez
>>> _______________________________________________
>>> devs mailing list
>>> devs(a)xwiki.org
>>> http://lists.xwiki.org/mailman/listinfo/devs
>> _______________________________________________
>> devs mailing list
>> devs(a)xwiki.org
>> http://lists.xwiki.org/mailman/listinfo/devs
>>
>
>
>
> --
> Thomas Mortagne
>
--
Thomas Mortagne