[xwiki-users] [myxwiki] new wiki request

2014-06-27 Thread Ronald D. Smith
Hi,

• description: Bristol Action of Bristol Township near Canandaigua, NY USA.  
Bristol Action is an unofficial non-profit group working to protect the 
environment in Bristol Township.  We want to create a web site that augments 
our page on FaceBook.  This site will contain information regarding the latest 
issues regarding High Volume Hydrofracturing, HVHF or ‘Fracking’  in our 
township and New York State.  It will also contain information about 
alternative energy sources available in our area. Ron Smith will be the 
technical person as he has developed computer software for over 40 years.  We 
will also have several people (no more than 5) updating content on the site.  
We would like to use the mywiki community farm to host this web site.

• owner name: smithrond

• wiki name: bristolaction(if this is not available, then 
usanybristolaction)

Please let me know what else you need to set up a wiki on .myxwiki.org.

Thanks, 

Ronald D. Smith
ron.rdssoftw...@gmail.com

PS: Thanks for your patience.






Ronald D. Smith
rdssoftw...@frontier.com
ron.rdssoftw...@icloud.com
ron.rdssoftw...@gmail.com




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


Re: [xwiki-users] xwiki access rights without group

2014-06-27 Thread O.J. Sousa Rodrigues
Yes, i just wanted to be sure.
Is there a way to replay reactivate the upgrade?
Maybe if i begin from the start again...
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] xwiki access rights without group

2014-06-27 Thread Thomas Mortagne
On Fri, Jun 27, 2014 at 2:55 PM, O.J. Sousa Rodrigues
 wrote:
> Hi there!
>
> Thank you for you answer.
>
> It's really seams to be broken / mal-configured. I manually removed the
> users from the allGroup for testing.
> Both properties xwiki.users.initialGroups and
> xwiki.authentication.group.allgroupimplicit are
> commented / deactivated, but new users do land in the allGroup without
> problem.
>
> What worries me the most is that if the user has no group at all and no
> permission at all it still can see and edit the wiki.
>
> Don't see how that is going to help activating those properties since users
> in no group should have no permission granted at all right? And users that
> are not in the allGroup but inside an explicit group should have that
> group's permission, but that is not the case...

There is no reason to enable these properties but you said that the
XWikiAllGroup group was empty which is was I reacted to.

>
> Best regards,
> OJ
> ___
> 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] xwiki access rights without group

2014-06-27 Thread O.J. Sousa Rodrigues
Hi there!

Thank you for you answer.

It's really seams to be broken / mal-configured. I manually removed the
users from the allGroup for testing.
Both properties xwiki.users.initialGroups and
xwiki.authentication.group.allgroupimplicit are
commented / deactivated, but new users do land in the allGroup without
problem.

What worries me the most is that if the user has no group at all and no
permission at all it still can see and edit the wiki.

Don't see how that is going to help activating those properties since users
in no group should have no permission granted at all right? And users that
are not in the allGroup but inside an explicit group should have that
group's permission, but that is not the case...

Best regards,
OJ
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Implement Jsontool.serialize in groovy

2014-06-27 Thread Thomas Mortagne
You should probably use JsonBuilder which is the standard tool to
manipulate JSON in Groovy.

On Fri, Jun 27, 2014 at 10:33 AM, Clemens Klein-Robbenhaar
 wrote:
>
> The velocity tools are not automatically created for groovy scripts
> The closest you can get is to create them manually in your script, like:
>
>  def jsontool = new org.xwiki.velocity.tools.JSONTool()
>
> I feel there should be a better way to do that, but it works this way.
> (it is likely that using groovy.json.JsonBuilder() works, too, but I have not 
> tried)
>
> Clemens
>
> On 06/24/2014 09:21 PM, Eduardo Abritta wrote:
>> Hello Sirs,
>> I need to implement the function "jsontool.serialize" in the code below, 
>> groovy, and I do not understand the error that is accusing, can help me 
>> solve this?
>> {{groovy}}def hql0 = ", BaseObject as obj where doc.fullName = obj.name and 
>> obj.className = 'E-nova.E-novaClass'";def listProjetos = 
>> services.query.hql(hql0).execute();def json = ['totalprojetos': 
>> listProjetos.size(), 'projetos':[1000] , 'edges':[1000] ];def i = 0;
>> for(item in listProjetos){def hql = "select distinct list from 
>> BaseObject as obj, DBStringListProperty as prop join prop.list list where 
>> obj.className='XWiki.TagClass' and obj.id=prop.id.id and prop.id.name='tags' 
>> and obj.name ='$item' ";def tag = services.query.hql(hql).execute();
>> i = i + 1;
>> json.projetos.add({id: xwiki.getDocument(item).getName()})}
>> jsontool.serialize(json);
>> {{/groovy}}
>> Ty.
>> Atenciosamente,
>> Eduardo Abritta
>> e-mail: eduardo.abri...@outlook.com | cel: (32)8472-9631
>>
>>
>> ___
>> 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



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


Re: [xwiki-users] Custom display

2014-06-27 Thread Gerritjan Koekkoek
Hello, 
I’ve made it…
I’ve defined a class by AppWithinMinutes with a numeric property (of type 
INTEGER)
In Custom Display field:
{{include document="tryControls.rangeValueSheet" /}}
{{velocity}}
  #set($range= [5,4,3,2,1])
  #displayRange($range)
{{/velocity}}

Important to make sure once the xForm is saved is to use the right naming 
conventions for the radio button's
In the sheet that is included the following code:
{velocity}}
  #set($discard = $xwiki.ssx.use("tryControls.rangeValueSheet"))
#macro(displayRange $range)
{{html clean=false}}
  #if($value)


#set($field = $object.getxWikiClass().get($name))
#set($controlName = $prefix + $name)
#foreach($rangeValue in $range)
  #set( $countString = $rangeValue - 1 )
  #set($controlID= "xwiki-form-" + $name + "-0-" + $countString)
  #if($type == 'edit')
## In EDIT mode the user selection can be changed
#if($value == $rangeValue)
 
#else
 
#end
  #else
   ## In VIEW mode the user selection can not be changed
   ## set control disabled
   #if($value == $rangeValue)
 
   #else
 
   #end
  #end
 $rangeValue
#end


  #else
No Value known, macro not used in context of a class value
  #end
  {{/html}}
#end
{{/velocity}}

Please review my naming…

Op 26 jun. 2014, om 10:44 heeft Gerritjan Koekkoek 
 het volgende geschreven:

> Hi,
> Thanks a lot Marius, i’ve made a lot of progress…
> I now have a ‘Star rating’ based on a numeric field, type integer, min-value 
> 1 max value of 5 
> In the custom display I have the following code:
> {{velocity}}
>  #set($discard = $xwiki.ssx.use("tryControls.rangeValueSheet"))
> {{html clean=false}}
> 
>Score
> 
> #if($type == 'edit')
>#set($discard = $xwiki.jsfx.use("tryControls.rangeValueSheet"))
>#if($value == 5)
>  checked="checked" />
>#else
> 
>#end
> 5
>#if($value == 4)
>  checked="checked" />
>#else
> 
>#end
> 4
>#if($value == 3)
>  checked="checked"/>
>#else
> 
>#end
> 3
>   #if($value == 2)
>  checked="checked"/>
>#else
> 
>#end
> 2
>#if($value == 1)
>  checked="checked"/>
>#else
> 
>#end
> 1
> #else
>#if($value == 5)
>  checked="checked" />
>#else
> 
>#end
> 5
>#if($value == 4)
>  checked="checked" />
>#else
> 
>#end
> 4
>#if($value == 3)
>  checked="checked"/>
>#else
> 
>#end
> 3
>#if($value == 2)
>  checked="checked"/>
>#else
> 
>#end
> 2
>#if($value == 1)
>  checked="checked"/>
>#else
> 
>#end
> 1
> #end
>
> 
> {{/html}}
> {{/velocity}}
> 
> I feel the code can be ‘shortened’ significantly? Suggestions on how?
> 
> As you could see numeric value is displayed by radio button’s So if $value = 
> 3 the third button is Checked.
> 
> To make it look like a star rating I added a CSS extension sheet: (from 
> http://lea.verou.me/2011/08/accessible-star-rating-widget-with-pure-css/)
> .rating {
>float:left;
> }
> 
> /* :not(:checked) is a filter, so that browsers that don’t support :checked 
> don’t 
>   follow these rules. Every browser that supports :checked also supports 
> :not(), so
>   it doesn’t make the test unnecessarily selective */
> .rating:not(:checked) > input {
>position:absolute;
>top:-px;
>clip:rect(0,0,0,0);
> }
> 
> .rating:not(:checked) > label {
>float:right;
>width:1em;
>padding:0 .1em;
>overflow:hidden;
>white-space:nowrap;
>cursor:pointer;
>font-size:200%;
>line-height:1.2;
>color:#ddd;
>text-shadow:1px 1px #bbb, 2px 2px #666, .1em .1em .2em rgba(0,0,0,.5);
> }
> 
> .rating:not(:checked) > label:before {
>content: '★ ';
> }
> 
> .rating > input:checked ~ label {
>color: #f70;
>text-shadow:1px 1px #c60, 2px 2px #940, .1em .1em .2em rgba(0,0,0,.5);
> }
> 
> .rating:not(:checked) > label:hover,
> .rating:not(:checked) > label:hover ~ label {
>color: gold;
>text-shadow:1px 1px goldenrod, 2px 2px #B57340, .1em .1em .2em 
> rgba(0,0,0,.5);
> }
> 
> .rating > input:checked + label:hover,
> .rating > input:checked + label:hover ~ label,
> .rating > input:checked ~ label:hover,
> .rating > input:checked ~ label:hover ~ label,
> .rating > label:hover ~ input:checked ~ label {
>color: #ea0;
>text-shadow:1px 1px goldenrod, 2px 2px #B57340, .1em .1em .2em 
> rgba(0,0,0,.5);
> }
> 
> .rating > label:active {
>position:relative;
>top:2px;
>left:2px;
> }
> 
> But my remaining problem is to SAVE the selected number? I have a record with 
> a value of 4, so a 4-star rating is selected and displayed perfectly.
> If I select INLINE EDIT i’m able to SELECT 2 STARS (or any other), but as 
> soon as I SAVE the 4 star rating is still there.
> How is this best done?
> 
> 
> Op 19 jun. 2014, om 09:24 heeft Marius Dumitru Florea 
>  het volgende geschreven:
> 
>> On Tue, Jun 17, 2014 at

Re: [xwiki-users] Implement Jsontool.serialize in groovy

2014-06-27 Thread Clemens Klein-Robbenhaar

The velocity tools are not automatically created for groovy scripts
The closest you can get is to create them manually in your script, like:

 def jsontool = new org.xwiki.velocity.tools.JSONTool()

I feel there should be a better way to do that, but it works this way.
(it is likely that using groovy.json.JsonBuilder() works, too, but I have not 
tried)

Clemens

On 06/24/2014 09:21 PM, Eduardo Abritta wrote:
> Hello Sirs,
> I need to implement the function "jsontool.serialize" in the code below, 
> groovy, and I do not understand the error that is accusing, can help me solve 
> this?
> {{groovy}}def hql0 = ", BaseObject as obj where doc.fullName = obj.name and 
> obj.className = 'E-nova.E-novaClass'";def listProjetos = 
> services.query.hql(hql0).execute();def json = ['totalprojetos': 
> listProjetos.size(), 'projetos':[1000] , 'edges':[1000] ];def i = 0;
> for(item in listProjetos){def hql = "select distinct list from BaseObject 
> as obj, DBStringListProperty as prop join prop.list list where 
> obj.className='XWiki.TagClass' and obj.id=prop.id.id and prop.id.name='tags' 
> and obj.name ='$item' ";def tag = services.query.hql(hql).execute();i 
> = i + 1;
> json.projetos.add({id: xwiki.getDocument(item).getName()})}
> jsontool.serialize(json);
> {{/groovy}}
> Ty.
> Atenciosamente,
> Eduardo Abritta
> e-mail: eduardo.abri...@outlook.com | cel: (32)8472-9631
> 
> 
> ___
> 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