Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/ci-build-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ jobs:
env:
URI: ${{steps.tag-dir.outputs.URI}}
run: |
aws cloudfront create-invalidation \
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd say we can drop this whole workflow for uploading on our CI or disable it by changing the triggers

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah i see that is from other commits that were made upstream (or pending in #3), nevermind then, unrelated to this change

--distribution-id ${{ secrets.AWS_DISTRIBUTION_ID }} \
--paths \
"${URI}/*"
API_STATUS=$(aws apigateway test-invoke-method --rest-api-id ${{ secrets.AWS_REST_API_ID }} --resource-id "${{ secrets.AWS_RESOURCE_ID }}" \
--http-method PUT --path-with-query-string "/prod/download-oo-com" --body "$(jq -c -n '.paths = $ARGS.positional' --args "${URI}/*")" \
--region us-east-1 --query 'status' --output text || :)
echo "API Gateway test-invoke status: ${API_STATUS:-<failed>}"
17 changes: 17 additions & 0 deletions apps/api/documents/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,7 @@
'onRequestRefreshFile': <request new file version> // send when file version is updated. use instead of onOutdatedVersion
'onUserActionRequired': <user action callback> // send if the user needs to enter a password or select encoding/delimiters when opening a file
'onRequestFillingStatus': <request filling status for current role> // used in pdf-form fill forms mode
'onRequestSmartPicker': <request to open the Nextcloud Smart Picker>
'onStartFilling': <send when can start filling (form is completed and users are disconnected)> // send after startFilling method, used in pdf-form editing
}
}
Expand Down Expand Up @@ -773,6 +774,20 @@
});
};

var _insertLink = function(data) {
_sendCommand({
command: 'insertLink',
data: data
});
};

var _insertPlainText = function(data) {
_sendCommand({
command: 'insertPlainText',
data: data
});
};

var _setMailMergeRecipients = function(data) {
_sendCommand({
command: 'setMailMergeRecipients',
Expand Down Expand Up @@ -909,6 +924,8 @@
showSharingSettings : _showSharingSettings,
setSharingSettings : _setSharingSettings,
insertImage : _insertImage,
insertLink : _insertLink,
insertPlainText : _insertPlainText,
setMailMergeRecipients: _setMailMergeRecipients,
setRevisedFile : _setRevisedFile,
setFavorite : _setFavorite,
Expand Down
12 changes: 12 additions & 0 deletions apps/common/Gateway.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,14 @@ if (window.Common === undefined) {
$me.trigger('insertimage', data);
},

'insertLink': function(data) {
$me.trigger('insertlink', data);
},

'insertPlainText': function(data) {
$me.trigger('insertplaintext', data);
},

'setMailMergeRecipients': function(data) {
$me.trigger('setmailmergerecipients', data);
},
Expand Down Expand Up @@ -447,6 +455,10 @@ if (window.Common === undefined) {
_postMessage({event: 'onSubmit'});
},

requestSmartPicker: function() {
_postMessage({event: 'onRequestSmartPicker'});
},

on: function(event, handler){
var localHandler = function(event, data){
handler.call(me, data)
Expand Down
2 changes: 1 addition & 1 deletion apps/common/main/lib/component/Mixtbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@ define([
button.cmpEl.closest('.btn-slot').remove();
if (group.children().length<1) {
var in_more = group.closest('.more-container').length>0;
in_more ? group.next('.separator').remove() : group.prev('.separator').remove();
(in_more || group.prev().length===0) ? group.next('.separator').remove() : group.prev('.separator').remove(); // remove separator before empty group or after first empty group
group.remove();
if (in_more && $morepanel.children().filter('.group').length === 0) {
btnsMore[tab.action] && btnsMore[tab.action].isActive() && btnsMore[tab.action].toggle(false);
Expand Down
4 changes: 2 additions & 2 deletions apps/common/main/lib/template/Comments.template
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<div oo_editor_input="true" tabindex="-1" class="user-message user-select"><%=scope.pickLink(comment)%></div>
<% } else { %>
<div class="inner-edit-ct">
<textarea class="msg-reply user-select textarea-control" maxlength="maxCommLength" aria-label="textComment"><%=comment%></textarea>
<textarea class="msg-reply user-select textarea-control" maxlength="maxCommLength" aria-label="textComment"><%-comment%></textarea>
<button class="btn normal dlg-btn primary btn-inner-edit" id="id-comments-change">textEdit</button>
<button class="btn normal dlg-btn btn-inner-close">textCancel</button>
</div>
Expand Down Expand Up @@ -68,7 +68,7 @@
<%}%>
<% } else { %>
<div class="inner-edit-ct">
<textarea class="msg-reply textarea-fix user-select textarea-control" maxlength="maxCommLength" aria-label="textReply"><%=item.get("reply")%></textarea>
<textarea class="msg-reply textarea-fix user-select textarea-control" maxlength="maxCommLength" aria-label="textReply"><%-item.get("reply")%></textarea>
<button class="btn normal dlg-btn primary btn-inner-edit btn-fix" id="id-comments-change">textEdit</button>
<button class="btn normal dlg-btn btn-inner-close">textClose</button>
</div>
Expand Down
4 changes: 2 additions & 2 deletions apps/common/main/lib/template/CommentsPopover.template
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<div oo_editor_input="true" tabindex="-1" class="user-message user-select"><%=scope.pickLink(comment)%></div>
<% } else { %>
<div class="inner-edit-ct">
<textarea class="msg-reply user-select" maxlength="maxCommLength" spellcheck="false" <% if (!!dummy) { %> placeholder="textMentionComment"<% } %> aria-label="textComment"><%=comment%></textarea>
<textarea class="msg-reply user-select" maxlength="maxCommLength" spellcheck="false" <% if (!!dummy) { %> placeholder="textMentionComment"<% } %> aria-label="textComment"><%-comment%></textarea>
<% if (hideAddReply) { %>
<button class="btn normal dlg-btn primary btn-inner-edit" id="id-comments-change-popover">textAdd</button>
<% } else { %>
Expand Down Expand Up @@ -67,7 +67,7 @@
<%}%>
<% } else { %>
<div class="inner-edit-ct">
<textarea class="msg-reply textarea-fix user-select" maxlength="maxCommLength" spellcheck="false" aria-label="textReply"><%=item.get("reply")%></textarea>
<textarea class="msg-reply textarea-fix user-select" maxlength="maxCommLength" spellcheck="false" aria-label="textReply"><%-item.get("reply")%></textarea>
<button class="btn normal dlg-btn primary btn-inner-edit btn-fix" id="id-comments-change-popover">textEdit</button>
<button class="btn normal dlg-btn btn-inner-close">textClose</button>
</div>
Expand Down
29 changes: 29 additions & 0 deletions apps/documenteditor/main/app/controller/Toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,8 @@ define([
this.onBtnChangeState('redo:disabled', toolbar.btnRedo, toolbar.btnRedo.isDisabled());
this.onBtnChangeState('save:disabled', toolbar.btnSave, toolbar.btnSave.isDisabled());
Common.Gateway.on('insertimage', _.bind(this.insertImage, this));
Common.Gateway.on('insertlink', _.bind(this.insertLink, this));
Common.Gateway.on('insertplaintext', _.bind(this.insertPlainText, this));
},

attachUIEvents: function(toolbar) {
Expand Down Expand Up @@ -424,6 +426,7 @@ define([
toolbar.mnuPageNumCurrentPos.on('click', _.bind(this.onPageNumCurrentPosClick, this));
toolbar.mnuInsertPageCount.on('click', _.bind(this.onInsertPageCountClick, this));
toolbar.btnBlankPage.on('click', _.bind(this.onBtnBlankPageClick, this));
toolbar.btnSmartPicker.on('click', _.bind(this.onBtnSmartPickerClick, this));
toolbar.listStyles.on('click', _.bind(this.onListStyleSelect, this));
toolbar.listStyles.on('contextmenu', _.bind(this.onListStyleContextMenu, this));
toolbar.styleMenu.on('hide:before', _.bind(this.onListStyleBeforeHide, this));
Expand All @@ -437,6 +440,8 @@ define([
toolbar.btnHyphenation.menu.on('item:click', _.bind(this.onHyphenationSelect, this));
toolbar.btnHyphenation.menu.on('show:after', _.bind(this.onHyphenationShow, this));
Common.Gateway.on('insertimage', _.bind(this.insertImage, this));
Common.Gateway.on('insertlink', _.bind(this.insertLink, this));
Common.Gateway.on('insertplaintext', _.bind(this.insertPlainText, this));
Common.Gateway.on('setmailmergerecipients', _.bind(this.setMailMergeRecipients, this));
Common.Gateway.on('setrequestedspreadsheet', _.bind(this.setRequestedSpreadsheet, this));
Common.NotificationCenter.on('storage:spreadsheet-load', _.bind(this.openSpreadsheetFromStorage, this));
Expand Down Expand Up @@ -2027,6 +2032,23 @@ define([
Common.NotificationCenter.trigger('storage:image-insert', data);
},

insertLink: function(data) { // gateway

var props = new Asc.CHyperlinkProperty();
props.put_Value(data);
props.put_Bookmark(null);
props.put_Text(data);
this.api.add_Hyperlink(props);

Common.NotificationCenter.trigger('storage:link-insert', data);
},

insertPlainText: function(data) {

this.api.PastePlainText(data)
Common.NotificationCenter.trigger('storage:plain-text-insert', data);
},

onBtnInsertTextClick: function(btn, e) {
btn.menu.getItems(true).forEach(function(item) {
if(item.value == btn.options.textboxType)
Expand Down Expand Up @@ -2681,6 +2703,13 @@ define([
Common.component.Analytics.trackEvent('ToolBar', 'Blank Page');
},

onBtnSmartPickerClick: function(btn) {
Common.Gateway.requestSmartPicker()

Common.NotificationCenter.trigger('edit:complete', this.toolbar);
Common.component.Analytics.trackEvent('ToolBar', 'Smart Picker');
},

onWatermarkSelect: function(menu, item) {
if (this.api) {
if (item.value == 'remove')
Expand Down
1 change: 1 addition & 0 deletions apps/documenteditor/main/app/template/Toolbar.template
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@
<div class="group">
<span class="btn-slot text x-huge slot-comment"></span>
<span class="btn-slot text x-huge slot-inshyperlink"></span>
<span class="btn-slot text x-huge" id="slot-btn-smartpicker"></span>
</div>
<div class="separator long"></div>
<div class="group">
Expand Down
4 changes: 2 additions & 2 deletions apps/documenteditor/main/app/view/ListSettingsDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ define([
[
'<% _.each(items, function(item) { %>',
'<li id="<%= item.id %>" data-value="<%= item.value %>"><a tabindex="-1" type="menuitem">',
'<%= item.displayValue %><% if (item.value === Asc.c_oAscNumberingFormat.Bullet) { %><span style="font-family:<%=item.font%>;"><%=item.symbol%></span><% } %>',
'<%= item.displayValue %><% if (item.value === Asc.c_oAscNumberingFormat.Bullet) { %><span style="font-family:<%-item.font%>;"><%=item.symbol%></span><% } %>',
'</a></li>',
'<% }); %>'
];
Expand Down Expand Up @@ -372,7 +372,7 @@ define([
var formcontrol = $(this.el).find('.form-control');
if (record) {
if (record.get('value')==Asc.c_oAscNumberingFormat.Bullet)
formcontrol[0].innerHTML = record.get('displayValue') + '<span style="font-family:' + (record.get('font') || 'Arial') + '">' + record.get('symbol') + '</span>';
formcontrol[0].innerHTML = record.get('displayValue') + '<span style="font-family:' + (Common.Utils.String.htmlEncode(record.get('font')) || 'Arial') + '">' + record.get('symbol') + '</span>';
else
formcontrol[0].innerHTML = record.get('displayValue');
} else
Expand Down
19 changes: 18 additions & 1 deletion apps/documenteditor/main/app/view/Toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -1040,6 +1040,22 @@ define([
});
this.paragraphControls.push(this.btnInsField);

this.btnSmartPicker = new Common.UI.Button({
id: 'id-toolbar-btn-smartpicker',
cls: 'btn-toolbar x-huge icon-top',
iconCls: 'toolbar__icon btn-big-inserthyperlink',
lock: [_set.paragraphLock, _set.headerLock, _set.hyperlinkLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart, _set.docLockViewIns, _set.docLockForms, _set.docLockCommentsIns, _set.viewMode],
caption: me.capBtnSmartPicker,
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'small'
});
this.paragraphControls.push(this.btnSmartPicker);
this.shortcutHints.SmartPicker = {
btn: this.btnSmartPicker,
label: this.tipSmartPicker
};

this.btnBlankPage = new Common.UI.Button({
id: 'id-toolbar-btn-blankpage',
cls: 'btn-toolbar x-huge icon-top',
Expand Down Expand Up @@ -2288,6 +2304,7 @@ define([
_injectComponent('#slot-btn-datetime', this.btnInsDateTime);
_injectComponent('#slot-btn-insfield', this.btnInsField);
_injectComponent('#slot-btn-blankpage', this.btnBlankPage);
_injectComponent('#slot-btn-smartpicker', this.btnSmartPicker);
_injectComponent('#slot-btn-insshape', this.btnInsertShape);
_injectComponent('#slot-btn-inssmartart', this.btnInsertSmartArt);
_injectComponent('#slot-btn-insequation', this.btnInsertEquation);
Expand Down Expand Up @@ -3601,7 +3618,7 @@ define([
'<span class="color" style="background: <%= color %>;"></span>',
'<% }) %>',
'</span>',
'<span class="text"><%= caption %></span>',
'<span class="text"><%- caption %></span>',
'</a>'
].join(''));

Expand Down
2 changes: 2 additions & 0 deletions apps/documenteditor/main/locale/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -3221,6 +3221,7 @@
"DE.Views.Links.tipContentsUpdate": "Update table of contents",
"DE.Views.Links.tipCrossRef": "Insert cross-reference",
"DE.Views.Links.tipInsertHyperlink": "Add hyperlink",
"DE.Views.Links.tipSmartPicker": "Open the Smart Picker",
"DE.Views.Links.tipNotes": "Insert or edit footnotes",
"DE.Views.Links.tipTableFigures": "Insert table of figures",
"DE.Views.Links.tipTableFiguresUpdate": "Update table of figures",
Expand Down Expand Up @@ -3935,6 +3936,7 @@
"DE.Views.TextToTableDialog.txtAutoText": "Auto",
"DE.Views.Toolbar.capBtnAddComment": "Add Comment",
"DE.Views.Toolbar.capBtnBlankPage": "Blank Page",
"DE.Views.Toolbar.capBtnSmartPicker": "Smart Picker",
"DE.Views.Toolbar.capBtnColumns": "Columns",
"DE.Views.Toolbar.capBtnComment": "Comment",
"DE.Views.Toolbar.capBtnDateTime": "Date & Time",
Expand Down
27 changes: 27 additions & 0 deletions apps/presentationeditor/main/app/controller/Toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,7 @@ define([
toolbar.btnShapesMerge.menu.on('item:click', _.bind(this.onClickMenuShapesMerge, this));
toolbar.btnShapesMerge.menu.on('show:before', _.bind(this.onBeforeShapesMerge, this));
toolbar.btnInsertHyperlink.on('click', _.bind(this.onHyperlinkClick, this));
toolbar.btnSmartPicker.on('click', _.bind(this.onBtnSmartPickerClick, this));
toolbar.mnuTablePicker.on('select', _.bind(this.onTablePickerSelect, this));
toolbar.btnInsertTable.menu.on('item:click', _.bind(this.onInsertTableClick, this));
toolbar.btnClearStyle.on('click', _.bind(this.onClearStyleClick, this));
Expand All @@ -403,6 +404,8 @@ define([
toolbar.btnInsDateTime.on('click', _.bind(this.onEditHeaderClick, this, 'datetime'));
toolbar.btnInsSlideNum.on('click', _.bind(this.onEditHeaderClick, this, 'slidenum'));
Common.Gateway.on('insertimage', _.bind(this.insertImage, this));
Common.Gateway.on('insertlink', _.bind(this.insertLink, this));
Common.Gateway.on('insertplaintext', _.bind(this.insertPlainText, this));
toolbar.btnInsAudio && toolbar.btnInsAudio.on('click', _.bind(this.onAddAudio, this));
toolbar.btnInsVideo && toolbar.btnInsVideo.on('click', _.bind(this.onAddVideo, this));

Expand Down Expand Up @@ -1848,6 +1851,13 @@ define([
Common.component.Analytics.trackEvent('ToolBar', 'Add Hyperlink');
},

onBtnSmartPickerClick: function(btn) {
Common.Gateway.requestSmartPicker()

Common.NotificationCenter.trigger('edit:complete', this.toolbar);
Common.component.Analytics.trackEvent('ToolBar', 'Smart Picker');
},

onTablePickerSelect: function(picker, columns, rows, e) {
if (this.api) {
this.toolbar.fireEvent('inserttable', this.toolbar);
Expand Down Expand Up @@ -1958,6 +1968,23 @@ define([
Common.NotificationCenter.trigger('storage:image-insert', data);
},

insertLink: function(data) { // gateway

var props = new Asc.CHyperlinkProperty();
props.put_Value(data);
props.put_Bookmark(null);
props.put_Text(data);
this.api.add_Hyperlink(props);

Common.NotificationCenter.trigger('storage:link-insert', data);
},

insertPlainText: function(data) {

this.api.PastePlainText(data)
Common.NotificationCenter.trigger('storage:plain-text-insert', data);
},

onBtnInsertTextClick: function(btn, e) {
btn.menu.getItems(true).forEach(function(item) {
if(item.value == btn.options.textboxType)
Expand Down
1 change: 1 addition & 0 deletions apps/presentationeditor/main/app/template/Toolbar.template
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@
<div class="group">
<span class="btn-slot text x-huge slot-comment"></span>
<span class="btn-slot text x-huge" id="slot-btn-insertlink"></span>
<span class="btn-slot text x-huge" id="slot-btn-smartpicker"></span>
</div>
<div class="separator long"></div>
<div class="group">
Expand Down
Loading