<
From version < 49.1 >
edited by Guillaume Delhumeau
on 2015/09/24
To version < 52.1 >
edited by Guillaume Delhumeau
on 2015/09/24
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -41,8 +41,6 @@
41 41  
42 42  A new Script Right has been added to allow controlling who has the right to write Scripts. Specifically anyone with Edit rights can edit a page and write a Script in it. However, when the page is rendered the script will only execute if the last author of the page has the Script right.
43 43  
44 -{{image reference="[email protected]"/}}
45 -
46 46  Example when the author of a script doesn't have the Script right:
47 47  
48 48  {{image reference="scriptRightsErrorNotAllowed.png"/}}
... ... @@ -51,7 +51,7 @@
51 51  
52 52  However, for backward-compatibility reasons, the standard XWiki Enterprise distribution comes with the Script Right being allowed for all users at the main wiki level, so that, unless you (as an Admin) explicitly revoke the right for some users or explicitly deny it, they will be able to execute the scripts they wrote, just like before.
53 53  
54 -{{image reference="Releas[email protected]criptRightsExplicitlyAllowedInXWikiPreferences.png"/}}
52 +{{image reference="scriptRightsExplicitlyAllowedInXWikiPreferences.png"/}}
55 55  
56 56  == Hiding of the Parent-Child Relationship ==
57 57  
... ... @@ -183,7 +183,7 @@
183 183  * When using the XWiki Jetty distribution, a memory dump is automatically created in XWiki's ##data/## folder when an ##Out Of Memory## error occurs.
184 184  * The Activity Stream now also displays activity for Nested Spaces.
185 185  
186 -See the [[full list of JIRA issues>>http://jira.xwiki.org/sr/jira.issueviews:searchrequest-printable/temp/SearchRequest.html?jqlQuery=project+in+%28XCOMMONS%2C+XRENDERING%2C+XWIKI%2C+XE%29+and+status+%3D+Closed+and+resolution+%3D+Fixed+and+fixVersion+%3D+%22<version>%22&tempMax=1000]] fixed in this release.
184 +See the [[full list of JIRA issues>>http://jira.xwiki.org/issues/?filter=14213]] fixed in this release.
187 187  
188 188  = For Developers =
189 189  
... ... @@ -323,6 +323,70 @@
323 323  
324 324  As explained previously, these logic is also available in the improved create UI, with the terminal pages option appearing only for advanced users and being checked or unchecked by default, depending on the type of the current page.
325 325  
324 +== JS API Improvements ==
325 +
326 +* It's now possible to create a Nested Spaces Reference using XWiki's Javascript API. For example:(((
327 +{{code language="javascript"}}
328 +// Construct a Nested Space reference
329 +var reference = new XWiki.SpaceReference('wiki', ['space1', 'space2']);
330 +expect(XWiki.Model.serialize(reference)).toEqual('wiki:space1.space2');
331 +reference = new XWiki.DocumentReference('wiki', ['space1', 'space2'], 'page');
332 +expect(XWiki.Model.serialize(reference)).toEqual('wiki:space1.space2.page');
333 +// Construct a non-Nested Space reference
334 +reference = new XWiki.SpaceReference('wiki', 'space');
335 +expect(XWiki.Model.serialize(reference)).toEqual('wiki:space');
336 +// Try passing non-valid space parameters
337 +expect(function() {new XWiki.SpaceReference('wiki', [])}).toThrow('Missing mandatory space name or invalid type for: []');
338 +expect(function() {new XWiki.SpaceReference('wiki', 12)}).toThrow('Missing mandatory space name or invalid type for: [12]');
339 +{{/code}}
340 +)))
341 +* A new ##XWiki.EntityReference.equals()## method has been added. For example:(((
342 +{{code language="javascript"}}
343 +var reference1 = new XWiki.DocumentReference('wiki', ['space1', 'space2'], 'page');
344 +var reference2 = new XWiki.DocumentReference('wiki', ['space1', 'space2'], 'page');
345 +var reference3 = new XWiki.DocumentReference('wiki2', ['space1', 'space2'], 'page');
346 +expect(reference1.equals(reference2)).toBe(true);
347 +expect(reference1.equals(reference3)).toBe(false);
348 +{{/code}}
349 +)))
350 +* A new ##XWiki.EntityReference.fromJSONObject(obejct)## has been added to create a Javascript ##XWiki.EntityReference## from a Java ##EntityReference## directly serialized as JSON:(((
351 +{{code language="javascript"}}
352 +var reference = XWiki.EntityReference.fromJSONObject(jsonText.evalJSON());
353 +{{/code}}
354 +)))
355 +* A new ##XWiki.EntityReferenceTree## JS class has been added, which partially mimics the Java ##EntityReferenceTree## Class. It's still missing features though as it was introduced mostly to make it easier to manipulate a serialized Java ##EntityReferenceTree##.
356 +
357 +== Updated Document Tree Macro ==
358 +
359 +The [[Document Tree Macro>>extensions:Extension.Document Tree Macro]] now supports Nested Pages and Nested Spaces modes. Specifically, the following changes have been made:
360 +
361 +* removed the ##showSpaceAsDocument## parameter (was introduced recently in 7.2M1)
362 +* deprecated the ##showChildDocuments## parameter
363 +* added the ##hierarchyMode## parameter with two supported values: ##reference## (default) and ##parentchild##
364 +
365 +As a result, you can use the document tree macro like this:
366 +
367 +* Nested Page Tree(((
368 +{{code language="none"}}
369 +{{documentTree/}}
370 +{{/code}}
371 +)))
372 +* Nested Space + Page Tree(((
373 +{{code language="none"}}
374 +{{documentTree showSpaces="true" /}}
375 +{{/code}}
376 +)))
377 +* Parent-Child Page Tree(((
378 +{{code language="none"}}
379 +{{documentTree hierarchyMode="parentchild" /}}
380 +{{/code}}
381 +)))
382 +* Old Page Index Tree (i.e. Parent-Child mixed with space grouping)(((
383 +{{code language="none"}}
384 +{{documentTree hierarchyMode="parentchild" showSpaces="true" /}}
385 +{{/code}}
386 +)))
387 +
326 326  == New Reference-related APIs ==
327 327  
328 328  Various new API around References has been introduced while adding support for nested spaces.
... ... @@ -404,6 +404,18 @@
404 404  * The component ##RestURLGenerator## has been added. Its role, in the long term, is to generate a REST URL for any kind of EntityReference. It currently handles ##DocumentReference## and ##SpaceReference##.
405 405  * The corresponding script service has been added: ##$services.rest## with the method ##$services.rest.url($entityReference)##.
406 406  
469 +== Reference Scripting API for Nested Spaces ==
470 +
471 +The Script API for Entity References has been updated with new APIs to support creating Nested Spaces references. For example:
472 +
473 +{{code language="none"}}
474 +{{velocity}}
475 +$services.model.createDocumentReference("wiki", ["space1", "space2"], "page")
476 +$services.model.createDocumentReference("wiki", ["space1", "space2"], "page", "default")
477 +$services.model.createSpaceReference(["space1", "space2"], $services.model.createWikiReference("wiki"))
478 +{{/velocity}}
479 +{{/code}}
480 +
407 407  === Resolve nested spaces in JavaScript ===
408 408  
409 409  {{code language="js"}}
... ... @@ -452,82 +452,6 @@
452 452  * ##checkCurrentAuthor()##: indicate if the current author right should be checked
453 453  * ##checkCurrentUser()##: indicate if the result should be filtered based on current user Right (only implemented by SOLR right now)
454 454  
455 -== JS API Improvements ==
456 -
457 -* It's now possible to create a Nested Spaces Reference using XWiki's Javascript API. For example:(((
458 -{{code language="javascript"}}
459 -// Construct a Nested Space reference
460 -var reference = new XWiki.SpaceReference('wiki', ['space1', 'space2']);
461 -expect(XWiki.Model.serialize(reference)).toEqual('wiki:space1.space2');
462 -reference = new XWiki.DocumentReference('wiki', ['space1', 'space2'], 'page');
463 -expect(XWiki.Model.serialize(reference)).toEqual('wiki:space1.space2.page');
464 -// Construct a non-Nested Space reference
465 -reference = new XWiki.SpaceReference('wiki', 'space');
466 -expect(XWiki.Model.serialize(reference)).toEqual('wiki:space');
467 -// Try passing non-valid space parameters
468 -expect(function() {new XWiki.SpaceReference('wiki', [])}).toThrow('Missing mandatory space name or invalid type for: []');
469 -expect(function() {new XWiki.SpaceReference('wiki', 12)}).toThrow('Missing mandatory space name or invalid type for: [12]');
470 -{{/code}}
471 -)))
472 -* A new ##XWiki.EntityReference.equals()## method has been added. For example:(((
473 -{{code language="javascript"}}
474 -var reference1 = new XWiki.DocumentReference('wiki', ['space1', 'space2'], 'page');
475 -var reference2 = new XWiki.DocumentReference('wiki', ['space1', 'space2'], 'page');
476 -var reference3 = new XWiki.DocumentReference('wiki2', ['space1', 'space2'], 'page');
477 -expect(reference1.equals(reference2)).toBe(true);
478 -expect(reference1.equals(reference3)).toBe(false);
479 -{{/code}}
480 -)))
481 -* A new ##XWiki.EntityReference.fromJSONObject(obejct)## has been added to create a Javascript ##XWiki.EntityReference## from a Java ##EntityReference## directly serialized as JSON:(((
482 -{{code language="javascript"}}
483 -var reference = XWiki.EntityReference.fromJSONObject(jsonText.evalJSON());
484 -{{/code}}
485 -)))
486 -* A new ##XWiki.EntityReferenceTree## JS class has been added, which partially mimics the Java ##EntityReferenceTree## Class. It's still missing features though as it was introduced mostly to make it easier to manipulate a serialized Java ##EntityReferenceTree##.
487 -
488 -== Updated Document Tree Macro ==
489 -
490 -The [[Document Tree Macro>>extensions:Extension.Document Tree Macro]] now supports Nested Pages and Nested Spaces modes. Specifically, the following changes have been made:
491 -
492 -* removed the ##showSpaceAsDocument## parameter (was introduced recently in 7.2M1)
493 -* deprecated the ##showChildDocuments## parameter
494 -* added the ##hierarchyMode## parameter with two supported values: ##reference## (default) and ##parentchild##
495 -
496 -As a result, you can use the document tree macro like this:
497 -
498 -* Nested Page Tree(((
499 -{{code language="none"}}
500 -{{documentTree/}}
501 -{{/code}}
502 -)))
503 -* Nested Space + Page Tree(((
504 -{{code language="none"}}
505 -{{documentTree showSpaces="true" /}}
506 -{{/code}}
507 -)))
508 -* Parent-Child Page Tree(((
509 -{{code language="none"}}
510 -{{documentTree hierarchyMode="parentchild" /}}
511 -{{/code}}
512 -)))
513 -* Old Page Index Tree (i.e. Parent-Child mixed with space grouping)(((
514 -{{code language="none"}}
515 -{{documentTree hierarchyMode="parentchild" showSpaces="true" /}}
516 -{{/code}}
517 -)))
518 -
519 -== Reference Scripting API for Nested Spaces ==
520 -
521 -The Script API for Entity References has been updated with new APIs to support creating Nested Spaces references. For example:
522 -
523 -{{code language="none"}}
524 -{{velocity}}
525 -$services.model.createDocumentReference("wiki", ["space1", "space2"], "page")
526 -$services.model.createDocumentReference("wiki", ["space1", "space2"], "page", "default")
527 -$services.model.createSpaceReference(["space1", "space2"], $services.model.createWikiReference("wiki"))
528 -{{/velocity}}
529 -{{/code}}
530 -
531 531  == XWiki Select Widget ==
532 532  
533 533  A [[new widget has been introduced>>platform:DevGuide.XWikiSelect]], to have a rich select box:
... ... @@ -671,3 +671,4 @@
671 671  {{code language="none"}}
672 672  <clirr output here>
673 673  {{/code}}
672 +

Get Connected