Re: [xwiki-users] showing/hiding annotations entry in contentmenu

2010-11-15 Thread Sergiu Dumitriu
On 11/16/2010 12:06 AM, Ricardo Rodriguez [eBioTIC.] wrote:
>
>
> Raluca Stavro wrote:
>> Hi,
>>
>> On Mon, Nov 15, 2010 at 3:05 PM, Sergiu Dumitriu  wrote:
>>
>>> On 11/15/2010 09:18 AM, Raluca Stavro wrote:
>>>
 Hello Ricardo,

 Yes, you can use velocity code inside SSX and JSX objects. What you
 need to do is to set the 'Parse content' property to 'Yes'. You can
 take a look at the SSX documentation:
 http://code.xwiki.org/xwiki/bin/view/Plugins/SkinExtensionsPlugin#HTip:Howtoreferafilefromaskinextension
 .

 Example of usage:
 #if(!$hasEdit)
 #body{
   background-color: red;
 }
 #end

>>> This is problematic, since the extension is cached on the clientside
>>> (browser cache). So if a user visits the wiki once unauthenticated,
>>> after he logs in the same CSS file (already parsed) is used, so nothing
>>> will change in the UI.
>>>
>>> To load the re-parsed CSS, either refresh the browser cache, or you can
>>> set the Cache property of the extension to "Forbid", which is bad for
>>> performance.
>>>
>>
>> You are right, Sergiu. Another solution would be to use different ssx
>> objects from different documents (supposing that the SSX are being
>> used on demand). For example:
>> * Space1.Page1 having an SSX object - for common styles
>> * Space2.Page2 having another SSX object - for users that have edit rights
>>
>> In the velocity code (a template or a page in wiki mode), you can do this:
>> $xwiki.ssx.use('Space1.Page1')## common styles
>> #if($hasEdit)
>>$xwiki.ssx.use('Space2.Page2')## styles for users that have edit rights
>> #end
>>
>> Raluca.
>>
>>
>>
>
> OK! Please, one question here. I see in AnnotationCode.Script two
> XWiki.JavaScriptExtension objects. AnnotationCode.Style has only one
> XWiki.StyleSheetExtension object and you are proposing two documents,
> each of them holding one SSX object. So, I understand that only one SSX
> could be hold by a document or at least only one SSX can be addressed by
> each document. Am I right?
>
> Thanks!

A document can have as many ssx or jsx object as it needs, but a skin 
extension is identified by the name of the document, so in the end an 
extension is a document. The content of a skin extension is the 
concatenation of the objects in that document, so it's impossible to 
write two different extensions in a single document, only different 
parts of the same extension.

>>
>>
 Raluca.

 On Mon, Nov 15, 2010 at 12:36 AM, Ricardo Rodriguez [eBioTIC.]
wrote:

> Ricardo Rodriguez [eBioTIC.] wrote:
>
>> Hi,
>>
>> I see how to control edit, export, action and watch appearance in
>> contentmenu div by tweaking contentmenu.vm. But, please, how could I get
>> the same control over Annotations entry in the same are?
>>
>> I want to show annotations only to users with edit rights in a given doc.
>>
>> Thanks!
>>
>> Ricardo
>>
>>
>>
> The object of type XWiki.StyleSheetExtension in AnnotationCode.Style
> holds the code that seems to control how the action menu entry is shown.
>
> Currently, to hide the annotation icon on this menu will be enough for me.
>
> I can add visibility:hidden; to the concerned .actionmenu elements, but
> this also hides them for users with edit rights.
>
> Please, is it possible to add ##if($hasEdit)...#else...#end structures
> in a SSE? My bet is that this is not possible: this extensions holds CSS
> code, not a script. So, please, how could I introduce conditional
> structures to control how page elements are show?
>
> I guess I must tweak AnnotationCode.Script but, please, how?
>
> Any help will be welcome! Thanks.
>
> Best,
>
> Ricardo


-- 
Sergiu Dumitriu
http://purl.org/net/sergiu/
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Automatically list and link files in a directory with Groovy

2010-11-15 Thread Ricardo Rodriguez [eBioTIC.]


Lockie wrote:
> Okay I got it working and I'm very happy with the result! I'll share what I
> did incase anyone else is interested in doing this. Note that the links
> don't work in Firefox (the file:// part doesn't seem to generate). My users
> only use IE so I didn't really explore this problem, but you can play around
> with it to get it working. Also, the user has to have access to the
> directory so this is only useful on an Intranet with networked drives.
>
> First step install the PHP Macro, then copy/paste this code in your page
> making sure you change the desired drive.
>
>
> {{velocity}}
>   $xwiki.jsfx.use("js/xwiki/table/tablefilterNsort.js")
>   $xwiki.ssfx.use("js/xwiki/table/table.css")
> {{/velocity}}
>
> {{php}}
> {{html}}
>  cellpadding="0" cellspacing="0" border="0"> 
>  
> Form Name
> Path
> 
>  $dirname = "R:/Quality/FORMS/";
> $dir = opendir($dirname);
>
> while(false != ($file = readdir($dir)))
> {
> if(($file != ".") and ($file != ".."))
> {
> echo(" $file ");
> echo("  $dirname$file Open Form   ");
> }
> }
> ?>
> 
> {{/html}}
> {{/php}}
>
>
> This results in a filterable table with a list of all the files in the
> directory and subfolders of it with the file names in the left column and a
> link to open the file in the right column.
>
> Regards,
>
> -
> 
> Lockie
>   

Thanks, Lockie. I've not used this yet. If I'm not wrong, I think that 
some PHP developer here will be happy to use some of the scripts they 
have programmed within XWiki :-)

Greetings,

Ricardo

-- 
Ricardo Rodríguez
CTO
eBioTIC.
Life Sciences, Data Modeling and Information Management Systems

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] [myxwiki] new wiki request

2010-11-15 Thread Sergiu Dumitriu
On 11/16/2010 12:12 AM, Jonathan Hansford wrote:
> Hi,
>
> I would like to set up a wiki for my local church. I am registered on 
> myxwiki.org; my user name is Dangthrimble. My preferred server name is 
> crindau.myxwiki.org.
>
> I requested a wiki on Friday, as did Dan Weinstein (apparently after me); his 
> request was granted on Sunday whereas mine is still outstanding.

Sorry, didn't see your original mail.

Your wiki is ready.

-- 
Sergiu Dumitriu
http://purl.org/net/sergiu/
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] showing/hiding annotations entry in contentmenu

2010-11-15 Thread Ricardo Rodriguez [eBioTIC.]


Vincent Massol wrote:
> On Nov 15, 2010, at 10:12 PM, Ricardo Rodriguez [eBioTIC.] wrote:
>
>   
>> Sergiu Dumitriu wrote:
>> 
>>> On 11/15/2010 01:15 PM, Ricardo Rodriguez [eBioTIC.] wrote:
>>>
>>>   
 Hi Raluca!

 Raluca Stavro wrote:

 
> Hello Ricardo,
>
> Yes, you can use velocity code inside SSX and JSX objects. What you
> need to do is to set the 'Parse content' property to 'Yes'. You can
> take a look at the SSX documentation:
> http://code.xwiki.org/xwiki/bin/view/Plugins/SkinExtensionsPlugin#HTip:Howtoreferafilefromaskinextension
> .
>
> Example of usage:
> #if(!$hasEdit)
>   #body{
> background-color: red;
>   }
> #end
>
>
>   
 Thanks! It is great to be able to use Velocity inside SSX and JSX!

 But I'm facing some problems. Please, see this:

 #set( $fruit = "orange" )
 /* Menu */
 .actionmenu #tmAnnotations {
   background-image: #imgURL('note') !important;
   /* Padding, margin and bg-position are adjusted in order to give this
 element
  the 'tab' look when active and the settings panel is displayed */
   background-position: 0 1px;
   padding-right: 5px !important;
   padding-top: 0 !important;
   padding-bottom: 4px;
   margin-right: 5px !important;
   margin-top: 2px !important;
   #if($fruit == "apple")visibility:hidden;#end
 }

 This evaluates correctly. But I'm not able to get this working:

 #if($isGuest)visibility:hidden;#end

 or

 #if(!$hasEdit)visibility:hidden;#end

 I've never get visibility:hidden; in. Those same expressions work fine
 in a simple XWiki 1.0 syntax doc. I get visibility:hidden; printed out
 when expected.

 Please, do you know why these two expressions don't work inside a
 XWiki.StyleSheetExtension object?

 
>>> These variables are defined in xwikivars.vm, which is parsed when 
>>> rendering a document with the surrounding UI. You can either use the API 
>>> code that was used to set those variables, or you can add this line at 
>>> the top:
>>>
>>> #template('xwikivars.vm')
>>>
>>>   
>> Thanks, Sergiu. I clearly keeps failing at getting a clear general idea 
>> about how XWiki produces the output of a document.
>>
>> Time ago I started to create a kind of "flowchart" showing the 
>> relationships among templates, templates and actions and actions. 
>> Please, could you tell me if this is an good actual starting point to 
>> understanding this process?
>>
>> http://dev.xwiki.org/xwiki/bin/view/Design/FrontEndArchitecture
>> 
>
> This is a design document for the future. This hasn't been really discussed 
> yet and it represents how Thomas and me see how the front end architecture 
> could be modeled in the future.
>
> Right now it's:
> http://platform.xwiki.org/xwiki/bin/view/DevGuide/Architecture#HHTTPRequestAnalysis
>
> Thanks
> -Vincent
>   

Thanks!
>   
>> Thanks!
>>
>>
>> 
 Thanks!

 
> Raluca.
>
> On Mon, Nov 15, 2010 at 12:36 AM, Ricardo Rodriguez [eBioTIC.]
>   wrote:
>
>
>   
>> Ricardo Rodriguez [eBioTIC.] wrote:
>>
>>
>> 
>>> Hi,
>>>
>>> I see how to control edit, export, action and watch appearance in
>>> contentmenu div by tweaking contentmenu.vm. But, please, how could I get
>>> the same control over Annotations entry in the same are?
>>>
>>> I want to show annotations only to users with edit rights in a given 
>>> doc.
>>>
>>> Thanks!
>>>
>>> Ricardo
>>>
>>>
>>>
>>>
>>>   
>> The object of type XWiki.StyleSheetExtension in AnnotationCode.Style
>> holds the code that seems to control how the action menu entry is shown.
>>
>> Currently, to hide the annotation icon on this menu will be enough for 
>> me.
>>
>> I can add visibility:hidden; to the concerned .actionmenu elements, but
>> this also hides them for users with edit rights.
>>
>> Please, is it possible to add ##if($hasEdit)...#else...#end structures
>> in a SSE? My bet is that this is not possible: this extensions holds CSS
>> code, not a script. So, please, how could I introduce conditional
>> structures to control how page elements are show?
>>
>> I guess I must tweak AnnotationCode.Script but, please, how?
>>
>> Any help will be welcome! Thanks.
>>
>> Best,
>>
>> Ricardo
>> 
>
> ___
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
>
>   

-- 
Ricardo Rodríguez
CTO
eBioTIC.
Life Sciences, Data Modeling and Information Management Systems

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] showing/hiding annotations entry in contentmenu

2010-11-15 Thread Ricardo Rodriguez [eBioTIC.]


Marius Dumitru Florea wrote:
> On 11/15/2010 03:05 PM, Sergiu Dumitriu wrote:
>   
>> On 11/15/2010 09:18 AM, Raluca Stavro wrote:
>> 
>>> Hello Ricardo,
>>>
>>> Yes, you can use velocity code inside SSX and JSX objects. What you
>>> need to do is to set the 'Parse content' property to 'Yes'. You can
>>> take a look at the SSX documentation:
>>> http://code.xwiki.org/xwiki/bin/view/Plugins/SkinExtensionsPlugin#HTip:Howtoreferafilefromaskinextension
>>> .
>>>
>>> Example of usage:
>>> #if(!$hasEdit)
>>> #body{
>>>   background-color: red;
>>> }
>>> #end
>>>   
>> This is problematic, since the extension is cached on the clientside
>> (browser cache). So if a user visits the wiki once unauthenticated,
>> after he logs in the same CSS file (already parsed) is used, so nothing
>> will change in the UI.
>>
>> To load the re-parsed CSS, either refresh the browser cache, or you can
>> set the Cache property of the extension to "Forbid", which is bad for
>> performance.
>> 
>
> In this particular case changing the JavaScript code that loads the 
> annotation feature is better IMO. 

I tried but failed to do that.

> Ricardo, did you check 
> AnnotationCode.Script ? I can see these lines at the end of the second 
> JSX (named "Annotation Javascript -- Annotation application"):
>
> // if the action on the current document is not view, don't load annotations
> if (XWiki.contextaction != "view") {
>return;
> }
>
> I'm sure you can extend the test for your needs.
>
> Hope this helps,
> Marius
>
>   

I think I get the point. Even though I'm not able to understand this 
script now or how to tweak it, I understand that this option blocks the 
loading process of the annotation feature. It is "cheaper" to do that as 
it stops a process not required for a given type of users.

But, please, one more question. When is this script executed? Each time 
a document is loaded or even reloaded?

Thanks!

>>> Raluca.
>>>
>>> On Mon, Nov 15, 2010 at 12:36 AM, Ricardo Rodriguez [eBioTIC.]
>>>wrote:
>>>   
 Ricardo Rodriguez [eBioTIC.] wrote:
 
> Hi,
>
> I see how to control edit, export, action and watch appearance in
> contentmenu div by tweaking contentmenu.vm. But, please, how could I get
> the same control over Annotations entry in the same are?
>
> I want to show annotations only to users with edit rights in a given doc.
>
> Thanks!
>
> Ricardo
>
>
>   
 The object of type XWiki.StyleSheetExtension in AnnotationCode.Style
 holds the code that seems to control how the action menu entry is shown.

 Currently, to hide the annotation icon on this menu will be enough for me.

 I can add visibility:hidden; to the concerned .actionmenu elements, but
 this also hides them for users with edit rights.

 Please, is it possible to add ##if($hasEdit)...#else...#end structures
 in a SSE? My bet is that this is not possible: this extensions holds CSS
 code, not a script. So, please, how could I introduce conditional
 structures to control how page elements are show?

 I guess I must tweak AnnotationCode.Script but, please, how?

 Any help will be welcome! Thanks.

 Best,

 Ricardo

 --
 Ricardo Rodríguez
 CTO
 eBioTIC.
 Life Sciences, Data Modeling and Information Management Systems

 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users

 
>>> ___
>>> users mailing list
>>> users@xwiki.org
>>> http://lists.xwiki.org/mailman/listinfo/users
>>>
>>>   
>> 
> ___
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
>   

-- 
Ricardo Rodríguez
CTO
eBioTIC.
Life Sciences, Data Modeling and Information Management Systems

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] [myxwiki] new wiki request

2010-11-15 Thread Jonathan Hansford
Hi,

I would like to set up a wiki for my local church. I am registered on 
myxwiki.org; my user name is Dangthrimble. My preferred server name is 
crindau.myxwiki.org.

I requested a wiki on Friday, as did Dan Weinstein (apparently after me); his 
request was granted on Sunday whereas mine is still outstanding.

Thanks,

Jonathan

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] showing/hiding annotations entry in contentmenu

2010-11-15 Thread Ricardo Rodriguez [eBioTIC.]


Raluca Stavro wrote:
> Hi,
>
> On Mon, Nov 15, 2010 at 3:05 PM, Sergiu Dumitriu  wrote:
>   
>> On 11/15/2010 09:18 AM, Raluca Stavro wrote:
>> 
>>> Hello Ricardo,
>>>
>>> Yes, you can use velocity code inside SSX and JSX objects. What you
>>> need to do is to set the 'Parse content' property to 'Yes'. You can
>>> take a look at the SSX documentation:
>>> http://code.xwiki.org/xwiki/bin/view/Plugins/SkinExtensionsPlugin#HTip:Howtoreferafilefromaskinextension
>>> .
>>>
>>> Example of usage:
>>> #if(!$hasEdit)
>>>#body{
>>>  background-color: red;
>>>}
>>> #end
>>>   
>> This is problematic, since the extension is cached on the clientside
>> (browser cache). So if a user visits the wiki once unauthenticated,
>> after he logs in the same CSS file (already parsed) is used, so nothing
>> will change in the UI.
>>
>> To load the re-parsed CSS, either refresh the browser cache, or you can
>> set the Cache property of the extension to "Forbid", which is bad for
>> performance.
>> 
>
> You are right, Sergiu. Another solution would be to use different ssx
> objects from different documents (supposing that the SSX are being
> used on demand). For example:
> * Space1.Page1 having an SSX object - for common styles
> * Space2.Page2 having another SSX object - for users that have edit rights
>
> In the velocity code (a template or a page in wiki mode), you can do this:
> $xwiki.ssx.use('Space1.Page1')## common styles
> #if($hasEdit)
>   $xwiki.ssx.use('Space2.Page2')## styles for users that have edit rights
> #end
>
> Raluca.
>
>
>   

OK! Please, one question here. I see in AnnotationCode.Script two 
XWiki.JavaScriptExtension objects. AnnotationCode.Style has only one 
XWiki.StyleSheetExtension object and you are proposing two documents, 
each of them holding one SSX object. So, I understand that only one SSX 
could be hold by a document or at least only one SSX can be addressed by 
each document. Am I right?

Thanks!


>
>   
>>> Raluca.
>>>
>>> On Mon, Nov 15, 2010 at 12:36 AM, Ricardo Rodriguez [eBioTIC.]
>>>   wrote:
>>>   
 Ricardo Rodriguez [eBioTIC.] wrote:
 
> Hi,
>
> I see how to control edit, export, action and watch appearance in
> contentmenu div by tweaking contentmenu.vm. But, please, how could I get
> the same control over Annotations entry in the same are?
>
> I want to show annotations only to users with edit rights in a given doc.
>
> Thanks!
>
> Ricardo
>
>
>   
 The object of type XWiki.StyleSheetExtension in AnnotationCode.Style
 holds the code that seems to control how the action menu entry is shown.

 Currently, to hide the annotation icon on this menu will be enough for me.

 I can add visibility:hidden; to the concerned .actionmenu elements, but
 this also hides them for users with edit rights.

 Please, is it possible to add ##if($hasEdit)...#else...#end structures
 in a SSE? My bet is that this is not possible: this extensions holds CSS
 code, not a script. So, please, how could I introduce conditional
 structures to control how page elements are show?

 I guess I must tweak AnnotationCode.Script but, please, how?

 Any help will be welcome! Thanks.

 Best,

 Ricardo

 --
 Ricardo Rodríguez
 CTO
 eBioTIC.
 Life Sciences, Data Modeling and Information Management Systems

 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users

 
>>> ___
>>> users mailing list
>>> users@xwiki.org
>>> http://lists.xwiki.org/mailman/listinfo/users
>>>
>>>   
>> --
>> Sergiu Dumitriu
>> http://purl.org/net/sergiu/
>> ___
>> users mailing list
>> users@xwiki.org
>> http://lists.xwiki.org/mailman/listinfo/users
>>
>> 
> ___
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
>
>   

-- 
Ricardo Rodríguez
CTO
eBioTIC.
Life Sciences, Data Modeling and Information Management Systems

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] showing/hiding annotations entry in contentmenu

2010-11-15 Thread Ricardo Rodriguez [eBioTIC.]


Sergiu Dumitriu wrote:
> On 11/15/2010 09:18 AM, Raluca Stavro wrote:
>   
>> Hello Ricardo,
>>
>> Yes, you can use velocity code inside SSX and JSX objects. What you
>> need to do is to set the 'Parse content' property to 'Yes'. You can
>> take a look at the SSX documentation:
>> http://code.xwiki.org/xwiki/bin/view/Plugins/SkinExtensionsPlugin#HTip:Howtoreferafilefromaskinextension
>> .
>>
>> Example of usage:
>> #if(!$hasEdit)
>>#body{
>>  background-color: red;
>>}
>> #end
>> 
>
> This is problematic, since the extension is cached on the clientside 
> (browser cache). So if a user visits the wiki once unauthenticated, 
> after he logs in the same CSS file (already parsed) is used, so nothing 
> will change in the UI.
>
> To load the re-parsed CSS, either refresh the browser cache, or you can 
> set the Cache property of the extension to "Forbid", which is bad for 
> performance.
>
>   

I adopted this solution here sacrificing performance as I need the 
described behaviour (Annotation shown only for registered users). But I 
still get see some weird thing I've not been able to consistently 
reproduce yet.

I'm using a XE/XEM 2.4.30451 in production and a XE 2.7-SNAPSHOT.32908 
as trial environment. I'll keep this thread updated or open new ones as 
required when I gather more information!

An example:

Working with a virtual wiki. I've modified AnnotationCode.Style 
(XWiki.StyleSheetExtension) this way...

## Defining global variables; added by Ricardo Rodriguez on November the 
15th to apply conditional rules to CSS
#template('xwikivars.vm')

/* Menu */
.actionmenu #tmAnnotations {
  background-image: #imgURL('note') !important;
  /* Padding, margin and bg-position are adjusted in order to give this 
element
 the 'tab' look when active and the settings panel is displayed */
  background-position: 0 1px;
  padding-right: 5px !important;
  padding-top: 0 !important;
  padding-bottom: 4px;
  margin-right: 5px !important;
  margin-top: 2px !important;
  #if($isGuest)visibility:hidden;#end
}
.actionmenu #tmAnnotations a {
  padding-top: 0 !important;
}
.actionmenu .active {
  background-color: $theme.pageContentBackgroundColor; 
##$theme.backgroundSecondaryColor;
}
.actionmenu .active a {
  color: $theme.menuSelectedEntryLinkColor !important;
}

I never see "Annotations" in the right side of the action bar when 
browsing the site as Guest. When I log in, Annotations appears. And it 
persists consistently throughout the site for all spaces but those set 
as exceptions in the Annotations configuration panel.

BUT, if I reload a page, any page, Annotations disappears. I cleaned the 
cache, restarted the browser, restarted the computer,... Nothing. By 
reloading the page several times, it ends appearing again. But I'm not 
able to find a pattern.

ONE "FUNNY" THING: if Firebug Console is on, the reload is OK. 
Annotations persists.

Those are the errors logged by Firebug:

*
xpected end of value but found ':'. Error in parsing value for 
'text-transform'. Declaration dropped.
[Break on this error] .actionmenu #tmAnnotations{background-...ontent 
blockquote{margin-bottom:10px;}
Style?language=en (line 1)
Unknown property 'border-radius'. Declaration dropped.
[Break on this error] border-radius: 1.2em;
colibri.css (line 205)
Unknown property 'border-radius'. Declaration dropped.
[Break on this error] border-radius: 1.2em;
*

XE 2.7-SNAPSHOT.32908 doesn't show this behaviour.

Please, any idea? I don't know if this relates with any know issue or it 
relates with any error on my side. Any idea will be welcome!

Thanks!

>> Raluca.
>>
>> On Mon, Nov 15, 2010 at 12:36 AM, Ricardo Rodriguez [eBioTIC.]
>>   wrote:
>> 
>>> Ricardo Rodriguez [eBioTIC.] wrote:
>>>   
 Hi,

 I see how to control edit, export, action and watch appearance in
 contentmenu div by tweaking contentmenu.vm. But, please, how could I get
 the same control over Annotations entry in the same are?

 I want to show annotations only to users with edit rights in a given doc.

 Thanks!

 Ricardo


 
>>> The object of type XWiki.StyleSheetExtension in AnnotationCode.Style
>>> holds the code that seems to control how the action menu entry is shown.
>>>
>>> Currently, to hide the annotation icon on this menu will be enough for me.
>>>
>>> I can add visibility:hidden; to the concerned .actionmenu elements, but
>>> this also hides them for users with edit rights.
>>>
>>> Please, is it possible to add ##if($hasEdit)...#else...#end structures
>>> in a SSE? My bet is that this is not possible: this extensions holds CSS
>>> code, not a script. So, please, how could I introduce conditional
>>> structures to control how page elements are show?
>>>
>>> I guess I must tweak AnnotationCode.Script but, please, how?
>>>
>>> Any help will be welcome! Thanks.
>>>
>>> Best,
>>>
>>> Ricardo
>>>
>>> --
>>> Ricardo Rodríguez
>>> CTO
>>> eBioTIC.
>>> Life Sciences, Data Modeli

Re: [xwiki-users] showing/hiding annotations entry in contentmenu

2010-11-15 Thread Vincent Massol

On Nov 15, 2010, at 10:12 PM, Ricardo Rodriguez [eBioTIC.] wrote:

> 
> 
> Sergiu Dumitriu wrote:
>> On 11/15/2010 01:15 PM, Ricardo Rodriguez [eBioTIC.] wrote:
>> 
>>> Hi Raluca!
>>> 
>>> Raluca Stavro wrote:
>>> 
 Hello Ricardo,
 
 Yes, you can use velocity code inside SSX and JSX objects. What you
 need to do is to set the 'Parse content' property to 'Yes'. You can
 take a look at the SSX documentation:
 http://code.xwiki.org/xwiki/bin/view/Plugins/SkinExtensionsPlugin#HTip:Howtoreferafilefromaskinextension
 .
 
 Example of usage:
 #if(!$hasEdit)
   #body{
 background-color: red;
   }
 #end
 
 
>>> Thanks! It is great to be able to use Velocity inside SSX and JSX!
>>> 
>>> But I'm facing some problems. Please, see this:
>>> 
>>> #set( $fruit = "orange" )
>>> /* Menu */
>>> .actionmenu #tmAnnotations {
>>>   background-image: #imgURL('note') !important;
>>>   /* Padding, margin and bg-position are adjusted in order to give this
>>> element
>>>  the 'tab' look when active and the settings panel is displayed */
>>>   background-position: 0 1px;
>>>   padding-right: 5px !important;
>>>   padding-top: 0 !important;
>>>   padding-bottom: 4px;
>>>   margin-right: 5px !important;
>>>   margin-top: 2px !important;
>>>   #if($fruit == "apple")visibility:hidden;#end
>>> }
>>> 
>>> This evaluates correctly. But I'm not able to get this working:
>>> 
>>> #if($isGuest)visibility:hidden;#end
>>> 
>>> or
>>> 
>>> #if(!$hasEdit)visibility:hidden;#end
>>> 
>>> I've never get visibility:hidden; in. Those same expressions work fine
>>> in a simple XWiki 1.0 syntax doc. I get visibility:hidden; printed out
>>> when expected.
>>> 
>>> Please, do you know why these two expressions don't work inside a
>>> XWiki.StyleSheetExtension object?
>>> 
>> 
>> These variables are defined in xwikivars.vm, which is parsed when 
>> rendering a document with the surrounding UI. You can either use the API 
>> code that was used to set those variables, or you can add this line at 
>> the top:
>> 
>> #template('xwikivars.vm')
>> 
> 
> 
> Thanks, Sergiu. I clearly keeps failing at getting a clear general idea 
> about how XWiki produces the output of a document.
> 
> Time ago I started to create a kind of "flowchart" showing the 
> relationships among templates, templates and actions and actions. 
> Please, could you tell me if this is an good actual starting point to 
> understanding this process?
> 
> http://dev.xwiki.org/xwiki/bin/view/Design/FrontEndArchitecture

This is a design document for the future. This hasn't been really discussed yet 
and it represents how Thomas and me see how the front end architecture could be 
modeled in the future.

Right now it's:
http://platform.xwiki.org/xwiki/bin/view/DevGuide/Architecture#HHTTPRequestAnalysis

Thanks
-Vincent

> Thanks!
> 
> 
>> 
>>> Thanks!
>>> 
 Raluca.
 
 On Mon, Nov 15, 2010 at 12:36 AM, Ricardo Rodriguez [eBioTIC.]
   wrote:
 
 
> Ricardo Rodriguez [eBioTIC.] wrote:
> 
> 
>> Hi,
>> 
>> I see how to control edit, export, action and watch appearance in
>> contentmenu div by tweaking contentmenu.vm. But, please, how could I get
>> the same control over Annotations entry in the same are?
>> 
>> I want to show annotations only to users with edit rights in a given doc.
>> 
>> Thanks!
>> 
>> Ricardo
>> 
>> 
>> 
>> 
> The object of type XWiki.StyleSheetExtension in AnnotationCode.Style
> holds the code that seems to control how the action menu entry is shown.
> 
> Currently, to hide the annotation icon on this menu will be enough for me.
> 
> I can add visibility:hidden; to the concerned .actionmenu elements, but
> this also hides them for users with edit rights.
> 
> Please, is it possible to add ##if($hasEdit)...#else...#end structures
> in a SSE? My bet is that this is not possible: this extensions holds CSS
> code, not a script. So, please, how could I introduce conditional
> structures to control how page elements are show?
> 
> I guess I must tweak AnnotationCode.Script but, please, how?
> 
> Any help will be welcome! Thanks.
> 
> Best,
> 
> Ricardo

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] showing/hiding annotations entry in contentmenu

2010-11-15 Thread Ricardo Rodriguez [eBioTIC.]


Sergiu Dumitriu wrote:
> On 11/15/2010 01:15 PM, Ricardo Rodriguez [eBioTIC.] wrote:
>   
>> Hi Raluca!
>>
>> Raluca Stavro wrote:
>> 
>>> Hello Ricardo,
>>>
>>> Yes, you can use velocity code inside SSX and JSX objects. What you
>>> need to do is to set the 'Parse content' property to 'Yes'. You can
>>> take a look at the SSX documentation:
>>> http://code.xwiki.org/xwiki/bin/view/Plugins/SkinExtensionsPlugin#HTip:Howtoreferafilefromaskinextension
>>> .
>>>
>>> Example of usage:
>>> #if(!$hasEdit)
>>>#body{
>>>  background-color: red;
>>>}
>>> #end
>>>
>>>   
>> Thanks! It is great to be able to use Velocity inside SSX and JSX!
>>
>> But I'm facing some problems. Please, see this:
>>
>> #set( $fruit = "orange" )
>> /* Menu */
>> .actionmenu #tmAnnotations {
>>background-image: #imgURL('note') !important;
>>/* Padding, margin and bg-position are adjusted in order to give this
>> element
>>   the 'tab' look when active and the settings panel is displayed */
>>background-position: 0 1px;
>>padding-right: 5px !important;
>>padding-top: 0 !important;
>>padding-bottom: 4px;
>>margin-right: 5px !important;
>>margin-top: 2px !important;
>>#if($fruit == "apple")visibility:hidden;#end
>> }
>>
>> This evaluates correctly. But I'm not able to get this working:
>>
>> #if($isGuest)visibility:hidden;#end
>>
>> or
>>
>> #if(!$hasEdit)visibility:hidden;#end
>>
>> I've never get visibility:hidden; in. Those same expressions work fine
>> in a simple XWiki 1.0 syntax doc. I get visibility:hidden; printed out
>> when expected.
>>
>> Please, do you know why these two expressions don't work inside a
>> XWiki.StyleSheetExtension object?
>> 
>
> These variables are defined in xwikivars.vm, which is parsed when 
> rendering a document with the surrounding UI. You can either use the API 
> code that was used to set those variables, or you can add this line at 
> the top:
>
> #template('xwikivars.vm')
>   


Thanks, Sergiu. I clearly keeps failing at getting a clear general idea 
about how XWiki produces the output of a document.

Time ago I started to create a kind of "flowchart" showing the 
relationships among templates, templates and actions and actions. 
Please, could you tell me if this is an good actual starting point to 
understanding this process?

http://dev.xwiki.org/xwiki/bin/view/Design/FrontEndArchitecture

Thanks!


>   
>> Thanks!
>> 
>>> Raluca.
>>>
>>> On Mon, Nov 15, 2010 at 12:36 AM, Ricardo Rodriguez [eBioTIC.]
>>>   wrote:
>>>
>>>   
 Ricardo Rodriguez [eBioTIC.] wrote:

 
> Hi,
>
> I see how to control edit, export, action and watch appearance in
> contentmenu div by tweaking contentmenu.vm. But, please, how could I get
> the same control over Annotations entry in the same are?
>
> I want to show annotations only to users with edit rights in a given doc.
>
> Thanks!
>
> Ricardo
>
>
>
>   
 The object of type XWiki.StyleSheetExtension in AnnotationCode.Style
 holds the code that seems to control how the action menu entry is shown.

 Currently, to hide the annotation icon on this menu will be enough for me.

 I can add visibility:hidden; to the concerned .actionmenu elements, but
 this also hides them for users with edit rights.

 Please, is it possible to add ##if($hasEdit)...#else...#end structures
 in a SSE? My bet is that this is not possible: this extensions holds CSS
 code, not a script. So, please, how could I introduce conditional
 structures to control how page elements are show?

 I guess I must tweak AnnotationCode.Script but, please, how?

 Any help will be welcome! Thanks.

 Best,

 Ricardo
 
>
>
>   

-- 
Ricardo Rodríguez
CTO
eBioTIC.
Life Sciences, Data Modeling and Information Management Systems

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] where put macros?

2010-11-15 Thread afrey

Ok, I did figure out the problem: after downloading and uploading the xar,
what I needed to do was click on the xar file. That displays a Page content
panel on the right side of the Import page, describing the macro. Then click
"Import". After this I can see the imported macro in the WYSIWYG macro
editor. 
-- 
View this message in context: 
http://xwiki.475771.n2.nabble.com/where-put-macros-tp5696249p5741135.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] [myxwiki] XWiki Enterprise 2.6 RC2 Upgrade

2010-11-15 Thread Sergiu Dumitriu
Hello,

myxwiki.org has been upgraded to XWiki Enterprise 2.6 RC2, if you own a 
wiki hosted there you should have a look at:
http://www.xwiki.org/xwiki/bin/Main/ReleaseNotesXWikiEnterprise26RC2

We also strongly recommend an upgrade to the latest wiki version. To 
upgrade you must download the 2.6 RC2 XWiki XAR from:
http://www.xwiki.org/xwiki/bin/Main/Download
And follow the upgrade guide available at :
http://platform.xwiki.org/xwiki/bin/AdminGuide/Installation#HUpgradingwikidocuments

To be notified of the myxwiki.org server upgrade you can follow myxwiki 
on twitter:
http://twitter.com/myxwiki

Thanks,
-- 
Sergiu Dumitriu
http://purl.org/net/sergiu/
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] [xwiki-devs] [ANN] XWiki Enterprise 2.6 RC2 Released

2010-11-15 Thread Ecaterina Moraru (Valica)
On Mon, Nov 15, 2010 at 14:28, Vincent Massol  wrote:

> The XWiki development team is pleased to announce the release of XWiki
> Enterprise 2.6 RC2.
>
> Go grab it at http://www.xwiki.org/xwiki/bin/view/Main/Download
>
> Changes from 2.5:
>
> • Revamped Recent Activity Dashboard, which is now called Activity Stream
> • Share page by mail feature
> • Icon/Emoticon Support
> • Auto linking of WikiWords
> • New Recent Activity Macro
>

New Activity Macro


>
> For more information see the Release notes at:
> http://www.xwiki.org/xwiki/bin/view/Main/ReleaseNotesXWikiEnterprise26RC2
>
> Thanks
> -The XWiki dev team
> ___
> devs mailing list
> d...@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/devs
>
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] showing/hiding annotations entry in contentmenu

2010-11-15 Thread Marius Dumitru Florea
On 11/15/2010 03:05 PM, Sergiu Dumitriu wrote:
> On 11/15/2010 09:18 AM, Raluca Stavro wrote:
>> Hello Ricardo,
>>
>> Yes, you can use velocity code inside SSX and JSX objects. What you
>> need to do is to set the 'Parse content' property to 'Yes'. You can
>> take a look at the SSX documentation:
>> http://code.xwiki.org/xwiki/bin/view/Plugins/SkinExtensionsPlugin#HTip:Howtoreferafilefromaskinextension
>> .
>>
>> Example of usage:
>> #if(!$hasEdit)
>> #body{
>>   background-color: red;
>> }
>> #end
>
> This is problematic, since the extension is cached on the clientside
> (browser cache). So if a user visits the wiki once unauthenticated,
> after he logs in the same CSS file (already parsed) is used, so nothing
> will change in the UI.
>
> To load the re-parsed CSS, either refresh the browser cache, or you can
> set the Cache property of the extension to "Forbid", which is bad for
> performance.

In this particular case changing the JavaScript code that loads the 
annotation feature is better IMO. Ricardo, did you check 
AnnotationCode.Script ? I can see these lines at the end of the second 
JSX (named "Annotation Javascript -- Annotation application"):

// if the action on the current document is not view, don't load annotations
if (XWiki.contextaction != "view") {
   return;
}

I'm sure you can extend the test for your needs.

Hope this helps,
Marius

>
>> Raluca.
>>
>> On Mon, Nov 15, 2010 at 12:36 AM, Ricardo Rodriguez [eBioTIC.]
>>wrote:
>>>
>>>
>>> Ricardo Rodriguez [eBioTIC.] wrote:
 Hi,

 I see how to control edit, export, action and watch appearance in
 contentmenu div by tweaking contentmenu.vm. But, please, how could I get
 the same control over Annotations entry in the same are?

 I want to show annotations only to users with edit rights in a given doc.

 Thanks!

 Ricardo


>>>
>>> The object of type XWiki.StyleSheetExtension in AnnotationCode.Style
>>> holds the code that seems to control how the action menu entry is shown.
>>>
>>> Currently, to hide the annotation icon on this menu will be enough for me.
>>>
>>> I can add visibility:hidden; to the concerned .actionmenu elements, but
>>> this also hides them for users with edit rights.
>>>
>>> Please, is it possible to add ##if($hasEdit)...#else...#end structures
>>> in a SSE? My bet is that this is not possible: this extensions holds CSS
>>> code, not a script. So, please, how could I introduce conditional
>>> structures to control how page elements are show?
>>>
>>> I guess I must tweak AnnotationCode.Script but, please, how?
>>>
>>> Any help will be welcome! Thanks.
>>>
>>> Best,
>>>
>>> Ricardo
>>>
>>> --
>>> Ricardo Rodríguez
>>> CTO
>>> eBioTIC.
>>> Life Sciences, Data Modeling and Information Management Systems
>>>
>>> ___
>>> users mailing list
>>> users@xwiki.org
>>> http://lists.xwiki.org/mailman/listinfo/users
>>>
>> ___
>> users mailing list
>> users@xwiki.org
>> http://lists.xwiki.org/mailman/listinfo/users
>>
>
>
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] where put macros?

2010-11-15 Thread Thomas Mortagne
On Mon, Nov 15, 2010 at 15:45, afrey  wrote:
>
> Does that mean I have to create a macro out of the xar file that I imported
> ( -> edit -> objects -> New Object -> Select
> XWiki.WikiMacroClass)? If that is the case, how do I do that? Where do I
> specify the xar file for the macro that I may need to create?
> What I did so far is download the xar file, then,imported the file using
> Wiki Preferences -> Import -> Browse to downloaded xar. On the "Import" page
> I can see all the xar files that I downloaded for macros or applications.
> The problem is that I don't know what to do from here. How do I use these
> xar files?

If the macro is done properly that's all you have to do. What macro
are you trying to install exactly ?

>
> Thank you,
>
> Alina.
> --
> View this message in context: 
> http://xwiki.475771.n2.nabble.com/where-put-macros-tp5696249p5740061.html
> Sent from the XWiki- Users mailing list archive at Nabble.com.
> ___
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
>



-- 
Thomas Mortagne
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] where put macros?

2010-11-15 Thread afrey

And yes, I did stop and restart xwiki.
-- 
View this message in context: 
http://xwiki.475771.n2.nabble.com/where-put-macros-tp5696249p5740065.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] where put macros?

2010-11-15 Thread afrey

Does that mean I have to create a macro out of the xar file that I imported
( -> edit -> objects -> New Object -> Select
XWiki.WikiMacroClass)? If that is the case, how do I do that? Where do I
specify the xar file for the macro that I may need to create?
What I did so far is download the xar file, then,imported the file using
Wiki Preferences -> Import -> Browse to downloaded xar. On the "Import" page
I can see all the xar files that I downloaded for macros or applications.
The problem is that I don't know what to do from here. How do I use these
xar files?

Thank you,

Alina.
-- 
View this message in context: 
http://xwiki.475771.n2.nabble.com/where-put-macros-tp5696249p5740061.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] This object is currently locked by - section editing

2010-11-15 Thread Piotr Dziubecki


W dniu 10-11-15 14:18, Ricardo Rodriguez [eBioTIC.] wrote:
>
>
> Piotr Dziubecki wrote:
>> W dniu 10-11-13 09:50, Ricardo Rodriguez [eBioTIC.] wrote:
>>
>>> Piotr Dziubecki wrote:
>>>
 W dniu 10-11-04 21:28, [Ricardo Rodriguez] eBioTIC. wrote:


> Piotr Dziubecki wrote:
>
>
>> W dniu 10-11-04 12:13, [Ricardo Rodriguez] eBioTIC. wrote:
>>
>>
>>
>>> Piotr Dziubecki wrote:
>>>
>>>
>>>
 Hi :)


 W dniu 10-11-04 11:08, [Ricardo Rodriguez] eBioTIC. wrote:




> Hi!
>
> Piotr Dziubecki wrote:
>
>
>
>
>> Hello :)
>>
>> I configured my XWiki instance in the following way:
>>
>>
>>
>> #-# This parameter will activate the sectional editing.
>> xwiki.section.edit=1
>>
>> #-# This parameter controls the depth of sections that have section 
>> editing.
>> #-# By default level 1 and level 2 sections have section editing.
>> xwiki.section.depth=6
>>
>>
>> I have many users working on documents simultaneously and in order 
>> to minimize document locking and possible
>> merging I encourage them to edit sections/paragraphs instead. I 
>> noticed that when, for instance, two users
>> edit different sections within the same page, the latter gets the 
>> message:
>>
>> This object is currently locked by user1
>>
>> I checked and it's possible to force editing and save both of 
>> concurrent changes to that document, but the
>> message itself is a bit confusing to the users. I'm asking if it's 
>> possible to change xwiki configuration to
>> not display that message when the users edit different paragraphs 
>> within the same page ?
>>
>>
>>
>>
> To the best of my understanding locking is set a document level. So, 
> if
> any user edits a section, all other users will receive that message.
>
> I think what you are doing is a bit risky. I've had here some problems
> following the same problem. When an user received this message, 
> although
> she/he is editing only a section, there is no way of knowing if they 
> are
> in the same section or in a different one. Even more, if you edit a
> document using the same user at two different locations, you won't
> receive the locking message.
>
>
>
>
 Yes, I came from the Media Wiki and section editing is pretty popular 
 way of collaborative editing (
 avoiding the whole page locks ).



>>> I also arrives to XWiki from MediaWiki years ago. So, with the current
>>> MediaWiki release, is it possible to do section edition and get a
>>> warning only if two users edit the same section?
>>>
>>> Thanks!
>>>
>>>
>>>
>> To be sure, I did some tests here:
>>
>> http://www.mediawiki.org/wiki/Sandbox
>>
>> no warnings, you can even edit the same section but then you'll need to 
>> get through the merge phase. In that
>> case you see such a message:
>>
>> Someone else has changed this page since you started editing it. The 
>> upper text area contains the page text
>> as it currently exists. Your changes are shown in the lower text area. 
>> You will have to merge your changes
>> into the existing text.
>>
>>
>>
>>
>>
> Well, I don't see this blocking behaviour working with MediaWiki
> sandbox... I don't know why! In any case, MediaWiki is not the case here!
>
> Just summing up:
>
>
 Thanks for that summary, let me comment on your thoughts:




> 1. Simultaneous edition is possible, but not advisable with the current
> XWiki release.
>
>
 Yes, especially that there is no merge phase after concurrent editing ( or 
 maybe there is a 'merge plugin' -
 I'd be grateful for any info on that ). In that case you end up with the 
 article content overridden by
 someone else and your only hope is to dig in the document's history and 
 try to fix edits manually.



> 2. Locking is done at document level.
>
>
 Is that going to change in the future ? In my opinion that basically 
 blocks user groups/communities from
 working on the documents in a collaborative way. Is it much work to make 
 that lock 'section sensitive',
 architecture-wise ?  If someone could describe what should be done / 
 changed in order to achieve that, maybe
 we could figure out a solution for that issue.




> 3. A true real-time edition editor for XWiki is on its way 

Re: [xwiki-users] This object is currently locked by - section editing

2010-11-15 Thread Piotr Dziubecki


W dniu 10-11-15 12:14, Sergiu Dumitriu wrote:
> On 11/15/2010 12:03 PM, Piotr Dziubecki wrote:
>>
>>
>> W dniu 10-11-15 11:34, Sergiu Dumitriu wrote:
>>> On 11/15/2010 11:23 AM, Piotr Dziubecki wrote:


 W dniu 10-11-13 09:50, Ricardo Rodriguez [eBioTIC.] wrote:
>
>
> Piotr Dziubecki wrote:
>> W dniu 10-11-04 21:28, [Ricardo Rodriguez] eBioTIC. wrote:
>>
>>> Piotr Dziubecki wrote:
>>>
 W dniu 10-11-04 12:13, [Ricardo Rodriguez] eBioTIC. wrote:


> Piotr Dziubecki wrote:
>
>
>> Hi :)
>>
>>
>> W dniu 10-11-04 11:08, [Ricardo Rodriguez] eBioTIC. wrote:
>>
>>
>>
>>> Hi!
>>>
>>> Piotr Dziubecki wrote:
>>>
>>>
>>>
 Hello :)

 I configured my XWiki instance in the following way:



 #-# This parameter will activate the sectional editing.
 xwiki.section.edit=1

 #-# This parameter controls the depth of sections that have 
 section editing.
 #-# By default level 1 and level 2 sections have section editing.
 xwiki.section.depth=6


 I have many users working on documents simultaneously and in order 
 to minimize document locking and possible
 merging I encourage them to edit sections/paragraphs instead. I 
 noticed that when, for instance, two users
 edit different sections within the same page, the latter gets the 
 message:

 This object is currently locked by user1

 I checked and it's possible to force editing and save both of 
 concurrent changes to that document, but the
 message itself is a bit confusing to the users. I'm asking if it's 
 possible to change xwiki configuration to
 not display that message when the users edit different paragraphs 
 within the same page ?



>>> To the best of my understanding locking is set a document level. 
>>> So, if
>>> any user edits a section, all other users will receive that message.
>>>
>>> I think what you are doing is a bit risky. I've had here some 
>>> problems
>>> following the same problem. When an user received this message, 
>>> although
>>> she/he is editing only a section, there is no way of knowing if 
>>> they are
>>> in the same section or in a different one. Even more, if you edit a
>>> document using the same user at two different locations, you won't
>>> receive the locking message.
>>>
>>>
>>>
>> Yes, I came from the Media Wiki and section editing is pretty 
>> popular way of collaborative editing (
>> avoiding the whole page locks ).
>>
>>
> I also arrives to XWiki from MediaWiki years ago. So, with the current
> MediaWiki release, is it possible to do section edition and get a
> warning only if two users edit the same section?
>
> Thanks!
>
>
 To be sure, I did some tests here:

 http://www.mediawiki.org/wiki/Sandbox

 no warnings, you can even edit the same section but then you'll need 
 to get through the merge phase. In that
 case you see such a message:

 Someone else has changed this page since you started editing it. The 
 upper text area contains the page text
 as it currently exists. Your changes are shown in the lower text area. 
 You will have to merge your changes
 into the existing text.




>>> Well, I don't see this blocking behaviour working with MediaWiki
>>> sandbox... I don't know why! In any case, MediaWiki is not the case 
>>> here!
>>>
>>> Just summing up:
>>>
>>
>> Thanks for that summary, let me comment on your thoughts:
>>
>>
>>
>>> 1. Simultaneous edition is possible, but not advisable with the current
>>> XWiki release.
>>>
>>
>> Yes, especially that there is no merge phase after concurrent editing ( 
>> or maybe there is a 'merge plugin' -
>> I'd be grateful for any info on that ). In that case you end up with the 
>> article content overridden by
>> someone else and your only hope is to dig in the document's history and 
>> try to fix edits manually.
>>
>>
>>> 2. Locking is done at document level.
>>>
>>
>> Is that going to change in the future ? In my opinion that basically 
>> blocks user groups/communities from
>> working on the documents in a collaborative way. Is it much 

Re: [xwiki-users] showing/hiding annotations entry in contentmenu

2010-11-15 Thread Raluca Stavro
Hi,

On Mon, Nov 15, 2010 at 3:05 PM, Sergiu Dumitriu  wrote:
> On 11/15/2010 09:18 AM, Raluca Stavro wrote:
>> Hello Ricardo,
>>
>> Yes, you can use velocity code inside SSX and JSX objects. What you
>> need to do is to set the 'Parse content' property to 'Yes'. You can
>> take a look at the SSX documentation:
>> http://code.xwiki.org/xwiki/bin/view/Plugins/SkinExtensionsPlugin#HTip:Howtoreferafilefromaskinextension
>> .
>>
>> Example of usage:
>> #if(!$hasEdit)
>>    #body{
>>      background-color: red;
>>    }
>> #end
>
> This is problematic, since the extension is cached on the clientside
> (browser cache). So if a user visits the wiki once unauthenticated,
> after he logs in the same CSS file (already parsed) is used, so nothing
> will change in the UI.
>
> To load the re-parsed CSS, either refresh the browser cache, or you can
> set the Cache property of the extension to "Forbid", which is bad for
> performance.

You are right, Sergiu. Another solution would be to use different ssx
objects from different documents (supposing that the SSX are being
used on demand). For example:
* Space1.Page1 having an SSX object - for common styles
* Space2.Page2 having another SSX object - for users that have edit rights

In the velocity code (a template or a page in wiki mode), you can do this:
$xwiki.ssx.use('Space1.Page1')## common styles
#if($hasEdit)
  $xwiki.ssx.use('Space2.Page2')## styles for users that have edit rights
#end

Raluca.




>
>> Raluca.
>>
>> On Mon, Nov 15, 2010 at 12:36 AM, Ricardo Rodriguez [eBioTIC.]
>>   wrote:
>>>
>>>
>>> Ricardo Rodriguez [eBioTIC.] wrote:
 Hi,

 I see how to control edit, export, action and watch appearance in
 contentmenu div by tweaking contentmenu.vm. But, please, how could I get
 the same control over Annotations entry in the same are?

 I want to show annotations only to users with edit rights in a given doc.

 Thanks!

 Ricardo


>>>
>>> The object of type XWiki.StyleSheetExtension in AnnotationCode.Style
>>> holds the code that seems to control how the action menu entry is shown.
>>>
>>> Currently, to hide the annotation icon on this menu will be enough for me.
>>>
>>> I can add visibility:hidden; to the concerned .actionmenu elements, but
>>> this also hides them for users with edit rights.
>>>
>>> Please, is it possible to add ##if($hasEdit)...#else...#end structures
>>> in a SSE? My bet is that this is not possible: this extensions holds CSS
>>> code, not a script. So, please, how could I introduce conditional
>>> structures to control how page elements are show?
>>>
>>> I guess I must tweak AnnotationCode.Script but, please, how?
>>>
>>> Any help will be welcome! Thanks.
>>>
>>> Best,
>>>
>>> Ricardo
>>>
>>> --
>>> Ricardo Rodríguez
>>> CTO
>>> eBioTIC.
>>> Life Sciences, Data Modeling and Information Management Systems
>>>
>>> ___
>>> users mailing list
>>> users@xwiki.org
>>> http://lists.xwiki.org/mailman/listinfo/users
>>>
>> ___
>> users mailing list
>> users@xwiki.org
>> http://lists.xwiki.org/mailman/listinfo/users
>>
>
>
> --
> Sergiu Dumitriu
> http://purl.org/net/sergiu/
> ___
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
>
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] This object is currently locked by - section editing

2010-11-15 Thread Ricardo Rodriguez [eBioTIC.]


Piotr Dziubecki wrote:
> W dniu 10-11-13 09:50, Ricardo Rodriguez [eBioTIC.] wrote:
>   
>> Piotr Dziubecki wrote:
>> 
>>> W dniu 10-11-04 21:28, [Ricardo Rodriguez] eBioTIC. wrote:
>>>
>>>   
 Piotr Dziubecki wrote:

 
> W dniu 10-11-04 12:13, [Ricardo Rodriguez] eBioTIC. wrote:
>
>
>   
>> Piotr Dziubecki wrote:
>>
>>
>> 
>>> Hi :)
>>>
>>>
>>> W dniu 10-11-04 11:08, [Ricardo Rodriguez] eBioTIC. wrote:
>>>
>>>
>>>
>>>   
 Hi!

 Piotr Dziubecki wrote:



 
> Hello :)
>
> I configured my XWiki instance in the following way:
>
>
>
> #-# This parameter will activate the sectional editing.
> xwiki.section.edit=1
>
> #-# This parameter controls the depth of sections that have section 
> editing.
> #-# By default level 1 and level 2 sections have section editing.
> xwiki.section.depth=6
>
>
> I have many users working on documents simultaneously and in order to 
> minimize document locking and possible
> merging I encourage them to edit sections/paragraphs instead. I 
> noticed that when, for instance, two users
> edit different sections within the same page, the latter gets the 
> message:
>
> This object is currently locked by user1
>
> I checked and it's possible to force editing and save both of 
> concurrent changes to that document, but the
> message itself is a bit confusing to the users. I'm asking if it's 
> possible to change xwiki configuration to
> not display that message when the users edit different paragraphs 
> within the same page ?
>
>
>
>   
 To the best of my understanding locking is set a document level. So, if
 any user edits a section, all other users will receive that message.

 I think what you are doing is a bit risky. I've had here some problems
 following the same problem. When an user received this message, 
 although
 she/he is editing only a section, there is no way of knowing if they 
 are
 in the same section or in a different one. Even more, if you edit a
 document using the same user at two different locations, you won't
 receive the locking message.



 
>>> Yes, I came from the Media Wiki and section editing is pretty popular 
>>> way of collaborative editing (
>>> avoiding the whole page locks ).
>>>
>>>
>>>   
>> I also arrives to XWiki from MediaWiki years ago. So, with the current
>> MediaWiki release, is it possible to do section edition and get a
>> warning only if two users edit the same section?
>>
>> Thanks!
>>
>>
>> 
> To be sure, I did some tests here:
>
> http://www.mediawiki.org/wiki/Sandbox
>
> no warnings, you can even edit the same section but then you'll need to 
> get through the merge phase. In that
> case you see such a message:
>
> Someone else has changed this page since you started editing it. The 
> upper text area contains the page text
> as it currently exists. Your changes are shown in the lower text area. 
> You will have to merge your changes
> into the existing text.
>
>
>
>
>   
 Well, I don't see this blocking behaviour working with MediaWiki
 sandbox... I don't know why! In any case, MediaWiki is not the case here!

 Just summing up:

 
>>> Thanks for that summary, let me comment on your thoughts:
>>>
>>>
>>>
>>>   
 1. Simultaneous edition is possible, but not advisable with the current
 XWiki release.

 
>>> Yes, especially that there is no merge phase after concurrent editing ( or 
>>> maybe there is a 'merge plugin' -
>>> I'd be grateful for any info on that ). In that case you end up with the 
>>> article content overridden by
>>> someone else and your only hope is to dig in the document's history and try 
>>> to fix edits manually.
>>>
>>>
>>>   
 2. Locking is done at document level.

 
>>> Is that going to change in the future ? In my opinion that basically blocks 
>>> user groups/communities from
>>> working on the documents in a collaborative way. Is it much work to make 
>>> that lock 'section sensitive',
>>> architecture-wise ?  If someone could describe what should be done / 
>>> changed in order to achieve that, maybe
>>> we could figure out a solution for that issue.
>>>
>>>
>>>
>>>   
 3. A true real-time edition editor for XWiki is on its way and will
 solve all th

Re: [xwiki-users] showing/hiding annotations entry in contentmenu

2010-11-15 Thread Sergiu Dumitriu
On 11/15/2010 09:18 AM, Raluca Stavro wrote:
> Hello Ricardo,
>
> Yes, you can use velocity code inside SSX and JSX objects. What you
> need to do is to set the 'Parse content' property to 'Yes'. You can
> take a look at the SSX documentation:
> http://code.xwiki.org/xwiki/bin/view/Plugins/SkinExtensionsPlugin#HTip:Howtoreferafilefromaskinextension
> .
>
> Example of usage:
> #if(!$hasEdit)
>#body{
>  background-color: red;
>}
> #end

This is problematic, since the extension is cached on the clientside 
(browser cache). So if a user visits the wiki once unauthenticated, 
after he logs in the same CSS file (already parsed) is used, so nothing 
will change in the UI.

To load the re-parsed CSS, either refresh the browser cache, or you can 
set the Cache property of the extension to "Forbid", which is bad for 
performance.

> Raluca.
>
> On Mon, Nov 15, 2010 at 12:36 AM, Ricardo Rodriguez [eBioTIC.]
>   wrote:
>>
>>
>> Ricardo Rodriguez [eBioTIC.] wrote:
>>> Hi,
>>>
>>> I see how to control edit, export, action and watch appearance in
>>> contentmenu div by tweaking contentmenu.vm. But, please, how could I get
>>> the same control over Annotations entry in the same are?
>>>
>>> I want to show annotations only to users with edit rights in a given doc.
>>>
>>> Thanks!
>>>
>>> Ricardo
>>>
>>>
>>
>> The object of type XWiki.StyleSheetExtension in AnnotationCode.Style
>> holds the code that seems to control how the action menu entry is shown.
>>
>> Currently, to hide the annotation icon on this menu will be enough for me.
>>
>> I can add visibility:hidden; to the concerned .actionmenu elements, but
>> this also hides them for users with edit rights.
>>
>> Please, is it possible to add ##if($hasEdit)...#else...#end structures
>> in a SSE? My bet is that this is not possible: this extensions holds CSS
>> code, not a script. So, please, how could I introduce conditional
>> structures to control how page elements are show?
>>
>> I guess I must tweak AnnotationCode.Script but, please, how?
>>
>> Any help will be welcome! Thanks.
>>
>> Best,
>>
>> Ricardo
>>
>> --
>> Ricardo Rodríguez
>> CTO
>> eBioTIC.
>> Life Sciences, Data Modeling and Information Management Systems
>>
>> ___
>> users mailing list
>> users@xwiki.org
>> http://lists.xwiki.org/mailman/listinfo/users
>>
> ___
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
>


-- 
Sergiu Dumitriu
http://purl.org/net/sergiu/
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Watchlist issuie (page links give localhost)

2010-11-15 Thread Sergiu Dumitriu
On 11/14/2010 12:40 PM, Eugen Colesnicov wrote:
>
> After updating XWiki to 2.5.1 (before was 2.2.6), in watchlist emais, in page
> links, instead of network name of a resoure (servername or local domain
> synonym) shows "localhost". Is it some bug in 2.5.1 or I can setup this by
> some parameters? XWiki uses inside local network as a intranet.

I think this is a kind of configuration issue. The watchlist uses a 
URLFactory which is initialized in the first request, and which 
remembers the hostname/port used in that request. So to fix this it 
should be enough to restart the server and make the first request using 
the external URL.

I'm not sure, but you can also configure this using xwiki.home in 
WEB-INF/xwiki.cfg.

-- 
Sergiu Dumitriu
http://purl.org/net/sergiu/
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] showing/hiding annotations entry in contentmenu

2010-11-15 Thread Sergiu Dumitriu
On 11/15/2010 01:15 PM, Ricardo Rodriguez [eBioTIC.] wrote:
> Hi Raluca!
>
> Raluca Stavro wrote:
>> Hello Ricardo,
>>
>> Yes, you can use velocity code inside SSX and JSX objects. What you
>> need to do is to set the 'Parse content' property to 'Yes'. You can
>> take a look at the SSX documentation:
>> http://code.xwiki.org/xwiki/bin/view/Plugins/SkinExtensionsPlugin#HTip:Howtoreferafilefromaskinextension
>> .
>>
>> Example of usage:
>> #if(!$hasEdit)
>>#body{
>>  background-color: red;
>>}
>> #end
>>
>
> Thanks! It is great to be able to use Velocity inside SSX and JSX!
>
> But I'm facing some problems. Please, see this:
>
> #set( $fruit = "orange" )
> /* Menu */
> .actionmenu #tmAnnotations {
>background-image: #imgURL('note') !important;
>/* Padding, margin and bg-position are adjusted in order to give this
> element
>   the 'tab' look when active and the settings panel is displayed */
>background-position: 0 1px;
>padding-right: 5px !important;
>padding-top: 0 !important;
>padding-bottom: 4px;
>margin-right: 5px !important;
>margin-top: 2px !important;
>#if($fruit == "apple")visibility:hidden;#end
> }
>
> This evaluates correctly. But I'm not able to get this working:
>
> #if($isGuest)visibility:hidden;#end
>
> or
>
> #if(!$hasEdit)visibility:hidden;#end
>
> I've never get visibility:hidden; in. Those same expressions work fine
> in a simple XWiki 1.0 syntax doc. I get visibility:hidden; printed out
> when expected.
>
> Please, do you know why these two expressions don't work inside a
> XWiki.StyleSheetExtension object?

These variables are defined in xwikivars.vm, which is parsed when 
rendering a document with the surrounding UI. You can either use the API 
code that was used to set those variables, or you can add this line at 
the top:

#template('xwikivars.vm')

>
> Thanks!
>> Raluca.
>>
>> On Mon, Nov 15, 2010 at 12:36 AM, Ricardo Rodriguez [eBioTIC.]
>>   wrote:
>>
>>> Ricardo Rodriguez [eBioTIC.] wrote:
>>>
 Hi,

 I see how to control edit, export, action and watch appearance in
 contentmenu div by tweaking contentmenu.vm. But, please, how could I get
 the same control over Annotations entry in the same are?

 I want to show annotations only to users with edit rights in a given doc.

 Thanks!

 Ricardo



>>> The object of type XWiki.StyleSheetExtension in AnnotationCode.Style
>>> holds the code that seems to control how the action menu entry is shown.
>>>
>>> Currently, to hide the annotation icon on this menu will be enough for me.
>>>
>>> I can add visibility:hidden; to the concerned .actionmenu elements, but
>>> this also hides them for users with edit rights.
>>>
>>> Please, is it possible to add ##if($hasEdit)...#else...#end structures
>>> in a SSE? My bet is that this is not possible: this extensions holds CSS
>>> code, not a script. So, please, how could I introduce conditional
>>> structures to control how page elements are show?
>>>
>>> I guess I must tweak AnnotationCode.Script but, please, how?
>>>
>>> Any help will be welcome! Thanks.
>>>
>>> Best,
>>>
>>> Ricardo


-- 
Sergiu Dumitriu
http://purl.org/net/sergiu/
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] [ANN] XWiki Enterprise 2.6 RC2 Released

2010-11-15 Thread Vincent Massol
The XWiki development team is pleased to announce the release of XWiki 
Enterprise 2.6 RC2.

Go grab it at http://www.xwiki.org/xwiki/bin/view/Main/Download

Changes from 2.5:

• Revamped Recent Activity Dashboard, which is now called Activity Stream
• Share page by mail feature
• Icon/Emoticon Support
• Auto linking of WikiWords
• New Recent Activity Macro

For more information see the Release notes at:
http://www.xwiki.org/xwiki/bin/view/Main/ReleaseNotesXWikiEnterprise26RC2

Thanks
-The XWiki dev team
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] showing/hiding annotations entry in contentmenu

2010-11-15 Thread Ricardo Rodriguez [eBioTIC.]
Hi Raluca!

Raluca Stavro wrote:
> Hello Ricardo,
>
> Yes, you can use velocity code inside SSX and JSX objects. What you
> need to do is to set the 'Parse content' property to 'Yes'. You can
> take a look at the SSX documentation:
> http://code.xwiki.org/xwiki/bin/view/Plugins/SkinExtensionsPlugin#HTip:Howtoreferafilefromaskinextension
> .
>
> Example of usage:
> #if(!$hasEdit)
>   #body{
> background-color: red;
>   }
> #end
>   

Thanks! It is great to be able to use Velocity inside SSX and JSX!

But I'm facing some problems. Please, see this:

#set( $fruit = "orange" )
/* Menu */
.actionmenu #tmAnnotations {
  background-image: #imgURL('note') !important;
  /* Padding, margin and bg-position are adjusted in order to give this 
element
 the 'tab' look when active and the settings panel is displayed */
  background-position: 0 1px;
  padding-right: 5px !important;
  padding-top: 0 !important;
  padding-bottom: 4px;
  margin-right: 5px !important;
  margin-top: 2px !important;
  #if($fruit == "apple")visibility:hidden;#end
}

This evaluates correctly. But I'm not able to get this working:

#if($isGuest)visibility:hidden;#end

or

#if(!$hasEdit)visibility:hidden;#end

I've never get visibility:hidden; in. Those same expressions work fine 
in a simple XWiki 1.0 syntax doc. I get visibility:hidden; printed out 
when expected.

Please, do you know why these two expressions don't work inside a 
XWiki.StyleSheetExtension object?

Thanks!
> Raluca.
>
> On Mon, Nov 15, 2010 at 12:36 AM, Ricardo Rodriguez [eBioTIC.]
>  wrote:
>   
>> Ricardo Rodriguez [eBioTIC.] wrote:
>> 
>>> Hi,
>>>
>>> I see how to control edit, export, action and watch appearance in
>>> contentmenu div by tweaking contentmenu.vm. But, please, how could I get
>>> the same control over Annotations entry in the same are?
>>>
>>> I want to show annotations only to users with edit rights in a given doc.
>>>
>>> Thanks!
>>>
>>> Ricardo
>>>
>>>
>>>   
>> The object of type XWiki.StyleSheetExtension in AnnotationCode.Style
>> holds the code that seems to control how the action menu entry is shown.
>>
>> Currently, to hide the annotation icon on this menu will be enough for me.
>>
>> I can add visibility:hidden; to the concerned .actionmenu elements, but
>> this also hides them for users with edit rights.
>>
>> Please, is it possible to add ##if($hasEdit)...#else...#end structures
>> in a SSE? My bet is that this is not possible: this extensions holds CSS
>> code, not a script. So, please, how could I introduce conditional
>> structures to control how page elements are show?
>>
>> I guess I must tweak AnnotationCode.Script but, please, how?
>>
>> Any help will be welcome! Thanks.
>>
>> Best,
>>
>> Ricardo
>>
>> --
>> Ricardo Rodríguez
>> CTO
>> eBioTIC.
>> Life Sciences, Data Modeling and Information Management Systems
>>
>> ___
>> users mailing list
>> users@xwiki.org
>> http://lists.xwiki.org/mailman/listinfo/users
>>
>> 
> ___
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
>
>   

-- 
Ricardo Rodríguez
CTO
eBioTIC.
Life Sciences, Data Modeling and Information Management Systems

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] This object is currently locked by - section editing

2010-11-15 Thread Sergiu Dumitriu
On 11/15/2010 12:03 PM, Piotr Dziubecki wrote:
>
>
> W dniu 10-11-15 11:34, Sergiu Dumitriu wrote:
>> On 11/15/2010 11:23 AM, Piotr Dziubecki wrote:
>>>
>>>
>>> W dniu 10-11-13 09:50, Ricardo Rodriguez [eBioTIC.] wrote:


 Piotr Dziubecki wrote:
> W dniu 10-11-04 21:28, [Ricardo Rodriguez] eBioTIC. wrote:
>
>> Piotr Dziubecki wrote:
>>
>>> W dniu 10-11-04 12:13, [Ricardo Rodriguez] eBioTIC. wrote:
>>>
>>>
 Piotr Dziubecki wrote:


> Hi :)
>
>
> W dniu 10-11-04 11:08, [Ricardo Rodriguez] eBioTIC. wrote:
>
>
>
>> Hi!
>>
>> Piotr Dziubecki wrote:
>>
>>
>>
>>> Hello :)
>>>
>>> I configured my XWiki instance in the following way:
>>>
>>>
>>>
>>> #-# This parameter will activate the sectional editing.
>>> xwiki.section.edit=1
>>>
>>> #-# This parameter controls the depth of sections that have section 
>>> editing.
>>> #-# By default level 1 and level 2 sections have section editing.
>>> xwiki.section.depth=6
>>>
>>>
>>> I have many users working on documents simultaneously and in order 
>>> to minimize document locking and possible
>>> merging I encourage them to edit sections/paragraphs instead. I 
>>> noticed that when, for instance, two users
>>> edit different sections within the same page, the latter gets the 
>>> message:
>>>
>>> This object is currently locked by user1
>>>
>>> I checked and it's possible to force editing and save both of 
>>> concurrent changes to that document, but the
>>> message itself is a bit confusing to the users. I'm asking if it's 
>>> possible to change xwiki configuration to
>>> not display that message when the users edit different paragraphs 
>>> within the same page ?
>>>
>>>
>>>
>> To the best of my understanding locking is set a document level. So, 
>> if
>> any user edits a section, all other users will receive that message.
>>
>> I think what you are doing is a bit risky. I've had here some 
>> problems
>> following the same problem. When an user received this message, 
>> although
>> she/he is editing only a section, there is no way of knowing if they 
>> are
>> in the same section or in a different one. Even more, if you edit a
>> document using the same user at two different locations, you won't
>> receive the locking message.
>>
>>
>>
> Yes, I came from the Media Wiki and section editing is pretty popular 
> way of collaborative editing (
> avoiding the whole page locks ).
>
>
 I also arrives to XWiki from MediaWiki years ago. So, with the current
 MediaWiki release, is it possible to do section edition and get a
 warning only if two users edit the same section?

 Thanks!


>>> To be sure, I did some tests here:
>>>
>>> http://www.mediawiki.org/wiki/Sandbox
>>>
>>> no warnings, you can even edit the same section but then you'll need to 
>>> get through the merge phase. In that
>>> case you see such a message:
>>>
>>> Someone else has changed this page since you started editing it. The 
>>> upper text area contains the page text
>>> as it currently exists. Your changes are shown in the lower text area. 
>>> You will have to merge your changes
>>> into the existing text.
>>>
>>>
>>>
>>>
>> Well, I don't see this blocking behaviour working with MediaWiki
>> sandbox... I don't know why! In any case, MediaWiki is not the case here!
>>
>> Just summing up:
>>
>
> Thanks for that summary, let me comment on your thoughts:
>
>
>
>> 1. Simultaneous edition is possible, but not advisable with the current
>> XWiki release.
>>
>
> Yes, especially that there is no merge phase after concurrent editing ( 
> or maybe there is a 'merge plugin' -
> I'd be grateful for any info on that ). In that case you end up with the 
> article content overridden by
> someone else and your only hope is to dig in the document's history and 
> try to fix edits manually.
>
>
>> 2. Locking is done at document level.
>>
>
> Is that going to change in the future ? In my opinion that basically 
> blocks user groups/communities from
> working on the documents in a collaborative way. Is it much work to make 
> that lock 'section sensitive',
> architecture-wise ?  If someone could describe what should be done / 
> changed in order to achieve that, maybe
> we could figure out

Re: [xwiki-users] This object is currently locked by - section editing

2010-11-15 Thread Piotr Dziubecki


W dniu 10-11-15 11:34, Sergiu Dumitriu wrote:
> On 11/15/2010 11:23 AM, Piotr Dziubecki wrote:
>>
>>
>> W dniu 10-11-13 09:50, Ricardo Rodriguez [eBioTIC.] wrote:
>>>
>>>
>>> Piotr Dziubecki wrote:
 W dniu 10-11-04 21:28, [Ricardo Rodriguez] eBioTIC. wrote:

> Piotr Dziubecki wrote:
>
>> W dniu 10-11-04 12:13, [Ricardo Rodriguez] eBioTIC. wrote:
>>
>>
>>> Piotr Dziubecki wrote:
>>>
>>>
 Hi :)


 W dniu 10-11-04 11:08, [Ricardo Rodriguez] eBioTIC. wrote:



> Hi!
>
> Piotr Dziubecki wrote:
>
>
>
>> Hello :)
>>
>> I configured my XWiki instance in the following way:
>>
>>
>>
>> #-# This parameter will activate the sectional editing.
>> xwiki.section.edit=1
>>
>> #-# This parameter controls the depth of sections that have section 
>> editing.
>> #-# By default level 1 and level 2 sections have section editing.
>> xwiki.section.depth=6
>>
>>
>> I have many users working on documents simultaneously and in order 
>> to minimize document locking and possible
>> merging I encourage them to edit sections/paragraphs instead. I 
>> noticed that when, for instance, two users
>> edit different sections within the same page, the latter gets the 
>> message:
>>
>> This object is currently locked by user1
>>
>> I checked and it's possible to force editing and save both of 
>> concurrent changes to that document, but the
>> message itself is a bit confusing to the users. I'm asking if it's 
>> possible to change xwiki configuration to
>> not display that message when the users edit different paragraphs 
>> within the same page ?
>>
>>
>>
> To the best of my understanding locking is set a document level. So, 
> if
> any user edits a section, all other users will receive that message.
>
> I think what you are doing is a bit risky. I've had here some problems
> following the same problem. When an user received this message, 
> although
> she/he is editing only a section, there is no way of knowing if they 
> are
> in the same section or in a different one. Even more, if you edit a
> document using the same user at two different locations, you won't
> receive the locking message.
>
>
>
 Yes, I came from the Media Wiki and section editing is pretty popular 
 way of collaborative editing (
 avoiding the whole page locks ).


>>> I also arrives to XWiki from MediaWiki years ago. So, with the current
>>> MediaWiki release, is it possible to do section edition and get a
>>> warning only if two users edit the same section?
>>>
>>> Thanks!
>>>
>>>
>> To be sure, I did some tests here:
>>
>> http://www.mediawiki.org/wiki/Sandbox
>>
>> no warnings, you can even edit the same section but then you'll need to 
>> get through the merge phase. In that
>> case you see such a message:
>>
>> Someone else has changed this page since you started editing it. The 
>> upper text area contains the page text
>> as it currently exists. Your changes are shown in the lower text area. 
>> You will have to merge your changes
>> into the existing text.
>>
>>
>>
>>
> Well, I don't see this blocking behaviour working with MediaWiki
> sandbox... I don't know why! In any case, MediaWiki is not the case here!
>
> Just summing up:
>

 Thanks for that summary, let me comment on your thoughts:



> 1. Simultaneous edition is possible, but not advisable with the current
> XWiki release.
>

 Yes, especially that there is no merge phase after concurrent editing ( or 
 maybe there is a 'merge plugin' -
 I'd be grateful for any info on that ). In that case you end up with the 
 article content overridden by
 someone else and your only hope is to dig in the document's history and 
 try to fix edits manually.


> 2. Locking is done at document level.
>

 Is that going to change in the future ? In my opinion that basically 
 blocks user groups/communities from
 working on the documents in a collaborative way. Is it much work to make 
 that lock 'section sensitive',
 architecture-wise ?  If someone could describe what should be done / 
 changed in order to achieve that, maybe
 we could figure out a solution for that issue.



> 3. A true real-time edition editor for XWiki is on its way and will
> solve all these issues!
>

 Well, it could be, but it's based on th

Re: [xwiki-users] This object is currently locked by - section editing

2010-11-15 Thread Sergiu Dumitriu
On 11/15/2010 11:23 AM, Piotr Dziubecki wrote:
>
>
> W dniu 10-11-13 09:50, Ricardo Rodriguez [eBioTIC.] wrote:
>>
>>
>> Piotr Dziubecki wrote:
>>> W dniu 10-11-04 21:28, [Ricardo Rodriguez] eBioTIC. wrote:
>>>
 Piotr Dziubecki wrote:

> W dniu 10-11-04 12:13, [Ricardo Rodriguez] eBioTIC. wrote:
>
>
>> Piotr Dziubecki wrote:
>>
>>
>>> Hi :)
>>>
>>>
>>> W dniu 10-11-04 11:08, [Ricardo Rodriguez] eBioTIC. wrote:
>>>
>>>
>>>
 Hi!

 Piotr Dziubecki wrote:



> Hello :)
>
> I configured my XWiki instance in the following way:
>
>
>
> #-# This parameter will activate the sectional editing.
> xwiki.section.edit=1
>
> #-# This parameter controls the depth of sections that have section 
> editing.
> #-# By default level 1 and level 2 sections have section editing.
> xwiki.section.depth=6
>
>
> I have many users working on documents simultaneously and in order to 
> minimize document locking and possible
> merging I encourage them to edit sections/paragraphs instead. I 
> noticed that when, for instance, two users
> edit different sections within the same page, the latter gets the 
> message:
>
> This object is currently locked by user1
>
> I checked and it's possible to force editing and save both of 
> concurrent changes to that document, but the
> message itself is a bit confusing to the users. I'm asking if it's 
> possible to change xwiki configuration to
> not display that message when the users edit different paragraphs 
> within the same page ?
>
>
>
 To the best of my understanding locking is set a document level. So, if
 any user edits a section, all other users will receive that message.

 I think what you are doing is a bit risky. I've had here some problems
 following the same problem. When an user received this message, 
 although
 she/he is editing only a section, there is no way of knowing if they 
 are
 in the same section or in a different one. Even more, if you edit a
 document using the same user at two different locations, you won't
 receive the locking message.



>>> Yes, I came from the Media Wiki and section editing is pretty popular 
>>> way of collaborative editing (
>>> avoiding the whole page locks ).
>>>
>>>
>> I also arrives to XWiki from MediaWiki years ago. So, with the current
>> MediaWiki release, is it possible to do section edition and get a
>> warning only if two users edit the same section?
>>
>> Thanks!
>>
>>
> To be sure, I did some tests here:
>
> http://www.mediawiki.org/wiki/Sandbox
>
> no warnings, you can even edit the same section but then you'll need to 
> get through the merge phase. In that
> case you see such a message:
>
> Someone else has changed this page since you started editing it. The 
> upper text area contains the page text
> as it currently exists. Your changes are shown in the lower text area. 
> You will have to merge your changes
> into the existing text.
>
>
>
>
 Well, I don't see this blocking behaviour working with MediaWiki
 sandbox... I don't know why! In any case, MediaWiki is not the case here!

 Just summing up:

>>>
>>> Thanks for that summary, let me comment on your thoughts:
>>>
>>>
>>>
 1. Simultaneous edition is possible, but not advisable with the current
 XWiki release.

>>>
>>> Yes, especially that there is no merge phase after concurrent editing ( or 
>>> maybe there is a 'merge plugin' -
>>> I'd be grateful for any info on that ). In that case you end up with the 
>>> article content overridden by
>>> someone else and your only hope is to dig in the document's history and try 
>>> to fix edits manually.
>>>
>>>
 2. Locking is done at document level.

>>>
>>> Is that going to change in the future ? In my opinion that basically blocks 
>>> user groups/communities from
>>> working on the documents in a collaborative way. Is it much work to make 
>>> that lock 'section sensitive',
>>> architecture-wise ?  If someone could describe what should be done / 
>>> changed in order to achieve that, maybe
>>> we could figure out a solution for that issue.
>>>
>>>
>>>
 3. A true real-time edition editor for XWiki is on its way and will
 solve all these issues!

>>>
>>> Well, it could be, but it's based on the js/ajax - it could be tricky to 
>>> achieve a good level of
>>> compatibility between browsers ( of course it could be done, Google docs is 
>>> a good example here ). Of course
>>> I'd take that right a

Re: [xwiki-users] This object is currently locked by - section editing

2010-11-15 Thread Piotr Dziubecki


W dniu 10-11-13 09:50, Ricardo Rodriguez [eBioTIC.] wrote:
>
>
> Piotr Dziubecki wrote:
>> W dniu 10-11-04 21:28, [Ricardo Rodriguez] eBioTIC. wrote:
>>
>>> Piotr Dziubecki wrote:
>>>
 W dniu 10-11-04 12:13, [Ricardo Rodriguez] eBioTIC. wrote:


> Piotr Dziubecki wrote:
>
>
>> Hi :)
>>
>>
>> W dniu 10-11-04 11:08, [Ricardo Rodriguez] eBioTIC. wrote:
>>
>>
>>
>>> Hi!
>>>
>>> Piotr Dziubecki wrote:
>>>
>>>
>>>
 Hello :)

 I configured my XWiki instance in the following way:



 #-# This parameter will activate the sectional editing.
 xwiki.section.edit=1

 #-# This parameter controls the depth of sections that have section 
 editing.
 #-# By default level 1 and level 2 sections have section editing.
 xwiki.section.depth=6


 I have many users working on documents simultaneously and in order to 
 minimize document locking and possible
 merging I encourage them to edit sections/paragraphs instead. I 
 noticed that when, for instance, two users
 edit different sections within the same page, the latter gets the 
 message:

 This object is currently locked by user1

 I checked and it's possible to force editing and save both of 
 concurrent changes to that document, but the
 message itself is a bit confusing to the users. I'm asking if it's 
 possible to change xwiki configuration to
 not display that message when the users edit different paragraphs 
 within the same page ?



>>> To the best of my understanding locking is set a document level. So, if
>>> any user edits a section, all other users will receive that message.
>>>
>>> I think what you are doing is a bit risky. I've had here some problems
>>> following the same problem. When an user received this message, although
>>> she/he is editing only a section, there is no way of knowing if they are
>>> in the same section or in a different one. Even more, if you edit a
>>> document using the same user at two different locations, you won't
>>> receive the locking message.
>>>
>>>
>>>
>> Yes, I came from the Media Wiki and section editing is pretty popular 
>> way of collaborative editing (
>> avoiding the whole page locks ).
>>
>>
> I also arrives to XWiki from MediaWiki years ago. So, with the current
> MediaWiki release, is it possible to do section edition and get a
> warning only if two users edit the same section?
>
> Thanks!
>
>
 To be sure, I did some tests here:

 http://www.mediawiki.org/wiki/Sandbox

 no warnings, you can even edit the same section but then you'll need to 
 get through the merge phase. In that
 case you see such a message:

 Someone else has changed this page since you started editing it. The upper 
 text area contains the page text
 as it currently exists. Your changes are shown in the lower text area. You 
 will have to merge your changes
 into the existing text.




>>> Well, I don't see this blocking behaviour working with MediaWiki
>>> sandbox... I don't know why! In any case, MediaWiki is not the case here!
>>>
>>> Just summing up:
>>>
>>
>> Thanks for that summary, let me comment on your thoughts:
>>
>>
>>
>>> 1. Simultaneous edition is possible, but not advisable with the current
>>> XWiki release.
>>>
>>
>> Yes, especially that there is no merge phase after concurrent editing ( or 
>> maybe there is a 'merge plugin' -
>> I'd be grateful for any info on that ). In that case you end up with the 
>> article content overridden by
>> someone else and your only hope is to dig in the document's history and try 
>> to fix edits manually.
>>
>>
>>> 2. Locking is done at document level.
>>>
>>
>> Is that going to change in the future ? In my opinion that basically blocks 
>> user groups/communities from
>> working on the documents in a collaborative way. Is it much work to make 
>> that lock 'section sensitive',
>> architecture-wise ?  If someone could describe what should be done / changed 
>> in order to achieve that, maybe
>> we could figure out a solution for that issue.
>>
>>
>>
>>> 3. A true real-time edition editor for XWiki is on its way and will
>>> solve all these issues!
>>>
>>
>> Well, it could be, but it's based on the js/ajax - it could be tricky to 
>> achieve a good level of
>> compatibility between browsers ( of course it could be done, Google docs is 
>> a good example here ). Of course
>> I'd take that right away in the stable form. But I think merging/lock on the 
>> section level could be more
>> than enough for the ordinary wiki users ( Wikipedia is basing on that model 
>> on a huge scale and it's doing
>> fine ;) )

Re: [xwiki-users] showing/hiding annotations entry in contentmenu

2010-11-15 Thread Raluca Stavro
Hello Ricardo,

Yes, you can use velocity code inside SSX and JSX objects. What you
need to do is to set the 'Parse content' property to 'Yes'. You can
take a look at the SSX documentation:
http://code.xwiki.org/xwiki/bin/view/Plugins/SkinExtensionsPlugin#HTip:Howtoreferafilefromaskinextension
.

Example of usage:
#if(!$hasEdit)
  #body{
background-color: red;
  }
#end

Raluca.

On Mon, Nov 15, 2010 at 12:36 AM, Ricardo Rodriguez [eBioTIC.]
 wrote:
>
>
> Ricardo Rodriguez [eBioTIC.] wrote:
>> Hi,
>>
>> I see how to control edit, export, action and watch appearance in
>> contentmenu div by tweaking contentmenu.vm. But, please, how could I get
>> the same control over Annotations entry in the same are?
>>
>> I want to show annotations only to users with edit rights in a given doc.
>>
>> Thanks!
>>
>> Ricardo
>>
>>
>
> The object of type XWiki.StyleSheetExtension in AnnotationCode.Style
> holds the code that seems to control how the action menu entry is shown.
>
> Currently, to hide the annotation icon on this menu will be enough for me.
>
> I can add visibility:hidden; to the concerned .actionmenu elements, but
> this also hides them for users with edit rights.
>
> Please, is it possible to add ##if($hasEdit)...#else...#end structures
> in a SSE? My bet is that this is not possible: this extensions holds CSS
> code, not a script. So, please, how could I introduce conditional
> structures to control how page elements are show?
>
> I guess I must tweak AnnotationCode.Script but, please, how?
>
> Any help will be welcome! Thanks.
>
> Best,
>
> Ricardo
>
> --
> Ricardo Rodríguez
> CTO
> eBioTIC.
> Life Sciences, Data Modeling and Information Management Systems
>
> ___
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
>
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users