Commit a1bedb8b authored by Romain Bioteau's avatar Romain Bioteau

Merge remote-tracking branch 'origin/release-7.9.0'

parents 45795304 bb5d68fa
......@@ -16,13 +16,13 @@ package org.bonitasoft.web.designer.config;
import org.springframework.context.annotation.Configuration;
import org.springframework.messaging.simp.config.MessageBrokerRegistry;
import org.springframework.web.socket.config.annotation.AbstractWebSocketMessageBrokerConfigurer;
import org.springframework.web.socket.config.annotation.EnableWebSocketMessageBroker;
import org.springframework.web.socket.config.annotation.StompEndpointRegistry;
import org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer;
@Configuration
@EnableWebSocketMessageBroker
public class WebSocketConfig extends AbstractWebSocketMessageBrokerConfigurer {
public class WebSocketConfig implements WebSocketMessageBrokerConfigurer {
public static final String PREVIEWABLE_UPDATE = "/previewableUpdates";
public static final String PREVIEWABLE_REMOVAL= "/previewableRemoval";
......
......@@ -223,4 +223,8 @@ public abstract class AbstractRepository<T extends Identifiable> implements Repo
throw new RepositoryException(format("Failed to gerenrate object ID"), e);
}
}
public JsonFileBasedPersister<T> getPersister() {
return persister;
}
}
......@@ -14,6 +14,7 @@
*/
package org.bonitasoft.web.designer.studio.repository;
import java.io.IOException;
import java.nio.file.Path;
import javax.inject.Inject;
......@@ -23,9 +24,10 @@ import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.bonitasoft.web.designer.model.Identifiable;
import org.bonitasoft.web.designer.repository.AbstractRepository;
import org.bonitasoft.web.designer.repository.JsonFileBasedPersister;
import org.bonitasoft.web.designer.repository.Repository;
import org.bonitasoft.web.designer.repository.exception.RepositoryException;
import org.bonitasoft.web.designer.studio.workspace.LockedResourceException;
import org.bonitasoft.web.designer.studio.workspace.ResourceNotFoundException;
import org.bonitasoft.web.designer.studio.workspace.WorkspaceResourceHandler;
import org.springframework.context.annotation.Profile;
......@@ -48,21 +50,6 @@ public class RepositoryAspect {
this.handler = handler;
}
/*
* BS-14120
* Useless numerous notfications may lead to a localized studio crash,
* we decided to deactivate them until we find a proper solution for
* workspace management shared between studio and UIDesigner
*/
//@Before("execution(* org.bonitasoft.web.designer.repository.Repository+.get(String))")
public void preOpen(JoinPoint joinPoint) {
try {
handler.preOpen(filePath(joinPoint));
} catch (ResourceNotFoundException | LockedResourceException e) {
throw new RepositoryException("An error occured while proceeding pre open action.", e);
}
}
@After("execution(* org.bonitasoft.web.designer.repository.Repository+.updateLastUpdateAndSave(..)) ")
public void postSaveAndUpdateDate(JoinPoint joinPoint) {
try {
......@@ -80,8 +67,10 @@ public class RepositoryAspect {
@Around("execution(* org.bonitasoft.web.designer.repository.AbstractRepository.delete(String))")
public void delete(JoinPoint joinPoint) {
try {
Object component = get(joinPoint);
handler.delete(filePath(joinPoint));
} catch (ResourceNotFoundException e) {
getPersister(joinPoint).delete(resolvePathFolder(joinPoint), (Identifiable) component);
} catch (ResourceNotFoundException | IOException e) {
throw new RepositoryException("An error occured while proceeding delete action.", e);
}
}
......@@ -98,6 +87,18 @@ public class RepositoryAspect {
private Path filePath(JoinPoint joinPoint) {
return ((Repository<?>) joinPoint.getThis()).resolvePath(artifactId(joinPoint));
}
private Path resolvePathFolder(JoinPoint joinPoint) {
return ((Repository<?>) joinPoint.getThis()).resolvePathFolder(artifactId(joinPoint));
}
private Identifiable get(JoinPoint joinPoint){
return ((Repository<?>) joinPoint.getThis()).get(artifactId(joinPoint));
}
private JsonFileBasedPersister getPersister(JoinPoint joinPoint){
return ((AbstractRepository) joinPoint.getThis()).getPersister();
}
private String artifactId(JoinPoint joinPoint) {
Object[] args = joinPoint.getArgs();
......
......@@ -104,7 +104,7 @@ public class RepositoryAspectTest {
@Test
public void should_trigger_delete_on_workspaceResourceHandler_when_deleting_a_widget() throws Exception {
widgetRepository.save(aWidget().id("widgetId1").build());
widgetRepository.save(aWidget().id("widgetId1").custom().build());
widgetRepository.delete("widgetId1");
......
......@@ -34,7 +34,7 @@
ng-click="incrementOrderAsset({'asset': asset})"
title="{{ 'Move asset down' | translate }}"
ng-if="vm.isPageAsset(asset) && vm.type.orderable"
ng-disabled="$last || vm.assetAlreadyOnMove || searchTerm">
ng-disabled="!vm.isPageAsset(results[$index + 1]) || vm.assetAlreadyOnMove || searchTerm">
<i class="fa fa-arrow-down"></i>
</button>
<button class="btn btn-bonita-asset" ng-click="decrementOrderAsset({'asset': asset})"
......
......@@ -74,42 +74,88 @@
</p>
</uib-tab>
<uib-tab heading="{{ 'Noteworthy changes' | translate }}" class="shaker">
<h2 translate>Bonita 7.8</h2>
<dt translate>New modal container to create pop-ins</dt>
<p translate>
Available in the palette, it opens over the content of a page/form/layout. To manage such containers,
the Button widget gains two actions: "Open modal" and "Close modal".
</p>
<dt translate>Change the type of a UI Designer artifact (page/form)</dt>
<p translate>
From the page or form editors, right by the "Save" button, a click on the arrow displays a new option
"Convert to...". It has also been added in the "Save as" option to, for example, save a form as a case
overview page.
</p>
<dt translate>Edit the display name and display description of a page, form, or layout from the Editor</dt>
<p translate>
Display name and description are used when the page, form, or layout are imported in the portal's
Resources page. To edit them, click on the new "Tag" button.
</p>
<dt translate>Summary of the calls to Bonita REST API made in a page, form, or layout</dt>
<p translate>
The same "Tag" button displays a summary of all REST API calls made by the current artifact to the
Bonita REST API."
</p>
<h2 translate>Bonita 7.7</h2>
<dt translate>Identifier</dt>
<p translate>
Starting with version 7.7.0, the name of a UI artifact becomes its unique identifier, instead of a
randomized identifier. This will make them easier to find in Bonita repositories.
You may rename existing artifacts so they benefit from this change too.
</p>
<p class="alert alert-warning" translate>
Because of this change, if you receive a fragment, rename it and then share it back, it will be
considered as a new file by the other Bonita Studios or UI Designers.
</p>
<p translate>
For more information, consult the official UI Designer overview documentation.
</p>
<uib-accordion>
<uib-accordion-group is-open="status.bonita79open" heading="true">
<uib-accordion-heading>
Bonita 7.9 <i class="pull-right glyphicon" ng-class="{'glyphicon-chevron-down': status.bonita79open, 'glyphicon-chevron-right': !status.bonita79open}"></i>
</uib-accordion-heading>
<dt translate>Easily create forms to edit business variables or documents, or display business variables in read-only
</dt>
<p translate>
This improvement is visible when creating the form from Bonita Studio. It will automatically create new variables in the UI Designer and bind them with the related widgets. For more information, read the dedicated documentation." Et là tu dois faire un .bos redirect vers la bonne URL.
</p>
<dt translate>Use provided UID widgets as a template for a custom widget</dt>
<p translate>
Extend Bonita standard widgets to fulfill the specific needs of your project, using the menu option <b>View</b> in the Properties panel of every standard widget. From there, save as your custom widget and implement the extension you need.
</p>
<dt translate>New embedded AngularJS filter to resolve the lazy references of a business object</dt>
<p translate>
To improve the management of embedded objects with lazy references, create a variable using the | lazyRef filter for the object to retrieve. For more information, read the dedicated documentation. (idem, bos redirect)
</p>
<dt translate>Switch widget</dt>
<p translate>
Directly from the whiteboard or from the widget properties section, switch from your current widget to another one and keep the properties already configured.
</p>
<dt translate>Render a UID page ot form in the end-user browser</dt>
<p translate>
Open your preview in a browser tab to set new URL parameters, play with dynamic browser sizing, and to reuse the same URL in another browser for testing purposes.
</p>
</uib-accordion-group>
<uib-accordion-group is-open="status.bonita78open">
<uib-accordion-heading>
Bonita 7.8 <i class="pull-right glyphicon" ng-class="{'glyphicon-chevron-down': status.bonita78open, 'glyphicon-chevron-right': !status.bonita78open}"></i>
</uib-accordion-heading>
<dt translate>New modal container to create pop-ins</dt>
<p translate>
Available in the palette, it opens over the content of a page/form/layout. To manage such
containers,
the Button widget gains two actions: "Open modal" and "Close modal".
</p>
<dt translate>Change the type of a UI Designer artifact (page/form)</dt>
<p translate>
From the page or form editors, right by the "Save" button, a click on the arrow displays a new
option
"Convert to...". It has also been added in the "Save as" option to, for example, save a form as
a case
overview page.
</p>
<dt translate>Edit the display name and display description of a page, form, or layout from the
Editor
</dt>
<p translate>
Display name and description are used when the page, form, or layout are imported in the
portal's
Resources page. To edit them, click on the new "Tag" button.
</p>
<dt translate>Summary of the calls to Bonita REST API made in a page, form, or layout</dt>
<p translate>
The same "Tag" button displays a summary of all REST API calls made by the current artifact to
the
Bonita REST API."
</p>
</uib-accordion-group>
<uib-accordion-group is-open="status.bonita77open">
<uib-accordion-heading>
Bonita 7.7 <i class="pull-right glyphicon" ng-class="{'glyphicon-chevron-down': status.bonita77open, 'glyphicon-chevron-right': !status.bonita77open}"></i>
</uib-accordion-heading>
<dt translate>Identifier</dt>
<p translate>
Starting with version 7.7.0, the name of a UI artifact becomes its unique identifier, instead of
a
randomized identifier. This will make them easier to find in Bonita repositories.
You may rename existing artifacts so they benefit from this change too.
</p>
<p class="alert alert-warning" translate>
Because of this change, if you receive a fragment, rename it and then share it back, it will be
considered as a new file by the other Bonita Studios or UI Designers.
</p>
<p translate>
For more information, consult the official UI Designer overview documentation.
</p>
</uib-accordion-group>
</uib-accordion>
</uib-tab>
</uib-tabset>
</div>
......
......@@ -241,3 +241,7 @@ body {
color: @bonita-light-grey;
}
}
.tab-content{
width: 100%;
}
......@@ -37,7 +37,7 @@ angular.module('bonitasoft.designer.preview').factory('webSocket', function($roo
var connect = function() {
let deferred = $q.defer();
client.connect('', (frame) => deferred.resolve(frame), (err) => deferred.reject(err));
client.connect({}, (frame) => deferred.resolve(frame), (err) => deferred.reject(err));
return deferred.promise;
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment