Skip to content

Commit

Permalink
deposit: fix trash icon disable condition
Browse files Browse the repository at this point in the history
  • Loading branch information
zzacharo committed Aug 14, 2024
1 parent e433657 commit 2fb185e
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 39 deletions.
79 changes: 41 additions & 38 deletions cds/modules/deposit/static/ckeditor/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,42 +3,45 @@
* For licensing, see https://ckeditor.com/legal/ckeditor-oss-license
*/

CKEDITOR.editorConfig = function( config ) {
// For complete reference see:
// https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html

config.skin = 'moono-lisa';

config.language = 'en';

// The toolbar groups arrangement, optimized for two toolbar rows.
config.toolbarGroups = [
{ name: 'clipboard', groups: [ 'clipboard', 'undo' ] },
{ name: 'editing', groups: [ 'find', 'selection', 'spellchecker' ] },
{ name: 'links' },
{ name: 'insert' },
{ name: 'forms' },
{ name: 'tools' },
{ name: 'document', groups: [ 'mode', 'document', 'doctools' ] },
{ name: 'others' },
'/',
{ name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
{ name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align', 'bidi' ] },
{ name: 'styles' },
{ name: 'colors' },
{ name: 'about' }
];

// Remove some buttons provided by the standard plugins, which are
// not needed in the Standard(s) toolbar.
config.removeButtons = 'Underline,Subscript,Superscript';

// Set the most common block elements.
config.format_tags = 'p;h1;h2;h3;pre';

// Simplify the dialog windows.
config.removeDialogTabs = 'image:advanced;link:advanced';

// Remove some plugins
config.removePlugins = 'maximize';
CKEDITOR.editorConfig = function (config) {
// For complete reference see:
// https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html

config.skin = "moono-lisa";

config.language = "en";

// The toolbar groups arrangement, optimized for two toolbar rows.
config.toolbarGroups = [
{ name: "clipboard", groups: ["clipboard", "undo"] },
{ name: "editing", groups: ["find", "selection", "spellchecker"] },
{ name: "links" },
{ name: "insert" },
{ name: "forms" },
{ name: "tools" },
{ name: "document", groups: ["mode", "document", "doctools"] },
{ name: "others" },
"/",
{ name: "basicstyles", groups: ["basicstyles", "cleanup"] },
{
name: "paragraph",
groups: ["list", "indent", "blocks", "align", "bidi"],
},
{ name: "styles" },
{ name: "colors" },
{ name: "about" },
];

// Remove some buttons provided by the standard plugins, which are
// not needed in the Standard(s) toolbar.
config.removeButtons = "Underline,Subscript,Superscript";

// Set the most common block elements.
config.format_tags = "p;h1;h2;h3;pre";

// Simplify the dialog windows.
config.removeDialogTabs = "image:advanced;link:advanced";

// Remove some plugins
config.removePlugins = "maximize";
};
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
-->
<button
ng-hide='$ctrl.cdsDepositCtrl.record._deposit.status == "published" || $ctrl.cdsDepositCtrl.record._deposit.pid'
ng-disabled="(!$ctrl.cdsDepositCtrl.framesReady || $ctrl.cdsDepositCtrl.cdsDepositsCtrl.loading) && !$ctrl.cdsDepositCtrl.currentMasterFile.size === undefined"
ng-disabled="(!$ctrl.cdsDepositCtrl.framesReady || $ctrl.cdsDepositCtrl.cdsDepositsCtrl.loading) && !($ctrl.cdsDepositCtrl.currentMasterFile.size === undefined)"
class="btn btn-default btn-sm" ng-click="form.infoShown = true">
<i class="fa fa-trash-o"></i>
</button>
Expand Down

0 comments on commit 2fb185e

Please sign in to comment.