From 34d0172a1fd05e59b92ac8d8ba2f7f19eacdc595 Mon Sep 17 00:00:00 2001 From: redboul Date: Mon, 15 Feb 2016 17:33:46 +0100 Subject: [PATCH] feat(fileViewer): Add file viewer widget Create a file viewer widget that allows to view Bonita document or files via a URL. A preview can be displayed under the file name and cilc on a PDF or image file opens a fullscreen overlay thanks to fancybo jquery plugin. Closes [BS-14978](https://bonitasoft.atlassian.net/browse/BS-14978) Closes [BS-14979](https://bonitasoft.atlassian.net/browse/BS-14979) Closes [BS-14980](https://bonitasoft.atlassian.net/browse/BS-14980) Closes [BS-14983](https://bonitasoft.atlassian.net/browse/BS-14983) Closes [BS-14984](https://bonitasoft.atlassian.net/browse/BS-14984) --- .../src/main/resources/widgets/pbButton/pbButton.json | 2 +- .../src/main/resources/widgets/pbImage/pbImage.json | 2 +- .../src/main/resources/widgets/pbLink/pbLink.json | 2 +- .../src/main/resources/widgets/pbTable/pbTable.json | 2 +- .../src/main/resources/widgets/pbText/pbText.json | 2 +- .../src/main/resources/widgets/pbTitle/pbTitle.json | 2 +- frontend/app/js/editor/editor.less | 11 +++++++++++ 7 files changed, 17 insertions(+), 6 deletions(-) diff --git a/backend/webapp/src/main/resources/widgets/pbButton/pbButton.json b/backend/webapp/src/main/resources/widgets/pbButton/pbButton.json index ad65387a..c3a779a4 100644 --- a/backend/webapp/src/main/resources/widgets/pbButton/pbButton.json +++ b/backend/webapp/src/main/resources/widgets/pbButton/pbButton.json @@ -5,7 +5,7 @@ "template": "@pbButton.tpl.html", "controller": "@pbButton.ctrl.js", "description": "Trigger for an action in a page or form", - "order": "11", + "order": "10", "icon": "", "properties": [ { diff --git a/backend/webapp/src/main/resources/widgets/pbImage/pbImage.json b/backend/webapp/src/main/resources/widgets/pbImage/pbImage.json index fc6c6473..2f050567 100644 --- a/backend/webapp/src/main/resources/widgets/pbImage/pbImage.json +++ b/backend/webapp/src/main/resources/widgets/pbImage/pbImage.json @@ -5,7 +5,7 @@ "template": "@pbImage.tpl.html", "description": "Display an image from assets or from a URL", "icon": "", - "order": "14", + "order": "17", "properties": [{ "label": "Source Type", "name": "srcType", diff --git a/backend/webapp/src/main/resources/widgets/pbLink/pbLink.json b/backend/webapp/src/main/resources/widgets/pbLink/pbLink.json index 075436ce..f89f22b0 100644 --- a/backend/webapp/src/main/resources/widgets/pbLink/pbLink.json +++ b/backend/webapp/src/main/resources/widgets/pbLink/pbLink.json @@ -4,7 +4,7 @@ "type": "widget", "template": "@pbLink.tpl.html", "description": "Navigation link to another page or form, or for file download", - "order": "10", + "order": "12", "icon": "", "properties": [ { diff --git a/backend/webapp/src/main/resources/widgets/pbTable/pbTable.json b/backend/webapp/src/main/resources/widgets/pbTable/pbTable.json index e68c66f2..2a754648 100644 --- a/backend/webapp/src/main/resources/widgets/pbTable/pbTable.json +++ b/backend/webapp/src/main/resources/widgets/pbTable/pbTable.json @@ -5,7 +5,7 @@ "template": "@pbTable.tpl.html", "controller": "@pbTable.ctrl.js", "description": "Tabular presentation of data from an array", - "order": "14", + "order": "15", "icon": "", "properties": [ { diff --git a/backend/webapp/src/main/resources/widgets/pbText/pbText.json b/backend/webapp/src/main/resources/widgets/pbText/pbText.json index 13eb8c92..791eb34c 100644 --- a/backend/webapp/src/main/resources/widgets/pbText/pbText.json +++ b/backend/webapp/src/main/resources/widgets/pbText/pbText.json @@ -4,7 +4,7 @@ "type": "widget", "template": "@pbText.tpl.html", "description": "Short string or paragraph of text to be displayed. Can include HTML tags", - "order": "13", + "order": "14", "icon": "", "properties": [ { diff --git a/backend/webapp/src/main/resources/widgets/pbTitle/pbTitle.json b/backend/webapp/src/main/resources/widgets/pbTitle/pbTitle.json index d3131a20..1b422461 100644 --- a/backend/webapp/src/main/resources/widgets/pbTitle/pbTitle.json +++ b/backend/webapp/src/main/resources/widgets/pbTitle/pbTitle.json @@ -4,7 +4,7 @@ "type": "widget", "template": "@pbTitle.tpl.html", "description": "Text used to structure the page or form content", - "order": "12", + "order": "13", "icon": "", "properties": [ { diff --git a/frontend/app/js/editor/editor.less b/frontend/app/js/editor/editor.less index 11ec0f20..e9fa7364 100644 --- a/frontend/app/js/editor/editor.less +++ b/frontend/app/js/editor/editor.less @@ -48,3 +48,14 @@ padding:0 2em; } + +.FileViewer-fileName { + display: inline-block; + padding-top: 7px; + margin-right: 5px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + vertical-align: top; +} + -- GitLab