Skip to content

Commit

Permalink
Merge branch '6' into 7
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli committed Jun 20, 2024
2 parents acf1a90 + c308179 commit 0e0b893
Show file tree
Hide file tree
Showing 11 changed files with 20 additions and 33 deletions.
2 changes: 1 addition & 1 deletion client/dist/styles/advancedworkflow.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion client/src/styles/AdvancedWorkflowAdmin.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
}

// Embargo & expiry badge styling
//
// 3 different statuses - embargo, expiry, embargo & expiry (both assigned)
// Note: CSS nesting convention based on SilverStripe admin styling
.cms-tree.jstree {
Expand Down
16 changes: 3 additions & 13 deletions client/src/styles/WorkflowField.scss
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,14 @@

.workflow-field-action-disabled {
opacity: 0.35;
filter: Alpha(Opacity=35);
filter: alpha(Opacity=35);
cursor: default;

// These default styles are taken from .ss-ui-button (_forms.scss) so we don't end up with mousover/focus states on disabled buttons.
// @todo These styles need to be dynamcally included from CMS, they are obviousely "hard-coded" for now.
&.ui-state-hover,
&.ui-state-focus {
text-decoration: none;
background-color: #e6e6e6;
background: url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2Q5ZDlkOSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==");
background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, $white), color-stop(100%, $grey-lightish));
background: -webkit-linear-gradient($white, $grey-lightish);
background: -moz-linear-gradient($white, $grey-lightish);
background: -o-linear-gradient($white, $grey-lightish);
background: -ms-linear-gradient($white, $grey-lightish);
background: linear-gradient($white, $grey-lightish);
text-shadow: $white 0 1px 1px;
-webkit-box-shadow: none;
Expand Down Expand Up @@ -89,7 +82,7 @@
.workflow-field-action-icon {
width: 16px;
height: 16px;
margin: calc($wf-height / 4) $wf-grid 0 $wf-grid;
margin: calc($wf-height / 4) $wf-grid 0;
}

h4 {
Expand Down Expand Up @@ -150,12 +143,9 @@
.workflow-field-loading {
background: rgba(0, 0, 0, .15) url("../images/spinner.gif") no-repeat center center;
border-radius: 0 0 $wf-radius $wf-radius;
bottom: 0;
inset: 0;
display: none;
left: 0;
position: absolute;
right: 0;
top: 0;
z-index: 999;
}
}
Expand Down
2 changes: 1 addition & 1 deletion client/src/styles/WorkflowGridField.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
.disabled {
a.action {
opacity: 0.35;
filter: Alpha(Opacity=35);
filter: alpha(Opacity=35);
cursor: default;
}
}
Expand Down
2 changes: 0 additions & 2 deletions client/src/styles/bundle.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// See includePaths in webpack.config.js
@import "variables";

@import "workflow-variables";

@import "AdvancedWorkflowAdmin";
@import "WorkflowField";
@import "WorkflowGridField";
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"dev": "NODE_ENV=development webpack --progress",
"watch": "yarn && NODE_ENV=development webpack --watch --progress",
"css": "WEBPACK_CHILD=css npm run build",
"lint": "eslint client/src; stylelint client/src/**/*.scss"
"lint": "eslint client/src; stylelint client/src"
},
"repository": {
"type": "git",
Expand All @@ -25,7 +25,7 @@
"homepage": "https://github.com/symbiote/silverstripe-advancedworkflow#readme",
"dependencies": {},
"devDependencies": {
"@silverstripe/eslint-config": "^1.2.1",
"@silverstripe/eslint-config": "^1.3.0",
"@silverstripe/webpack-config": "^2.1.0",
"webpack": "^5.74.0",
"webpack-cli": "^5.0.0"
Expand Down
2 changes: 1 addition & 1 deletion src/DataObjects/WorkflowDefinition.php
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ public function incomingTitle()
} elseif (isset($req['Title']) && !empty($req['Title'])) {
$incomingTitle = $req['Title'];
} else {
$incomingTitle = self::$default_workflow_title_base;
$incomingTitle = WorkflowDefinition::$default_workflow_title_base;
}
return $incomingTitle;
}
Expand Down
10 changes: 5 additions & 5 deletions src/DataObjects/WorkflowTransition.php
Original file line number Diff line number Diff line change
Expand Up @@ -282,19 +282,19 @@ public function extendedRequiredFieldsNotSame($data = null)
$check = array('ActionID','NextActionID');
foreach ($check as $fieldName) {
if (!isset($data[$fieldName])) {
return self::$extendedMethodReturn;
return WorkflowTransition::$extendedMethodReturn;
}
}
// Have we found some identical values?
if ($data[$check[0]] == $data[$check[1]]) {
// Used to display to the user, so the first of the array is fine
self::$extendedMethodReturn['fieldName'] = $check[0];
self::$extendedMethodReturn['fieldValid'] = false;
self::$extendedMethodReturn['fieldMsg'] = _t(
WorkflowTransition::$extendedMethodReturn['fieldName'] = $check[0];
WorkflowTransition::$extendedMethodReturn['fieldValid'] = false;
WorkflowTransition::$extendedMethodReturn['fieldMsg'] = _t(
'WorkflowTransition.TRANSITIONLOOP',
'A transition cannot lead back to its parent action.'
);
}
return self::$extendedMethodReturn;
return WorkflowTransition::$extendedMethodReturn;
}
}
Loading

0 comments on commit 0e0b893

Please sign in to comment.