-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
API Support for multiple workflow definitions
* As well as the default worklfow definition, additional workflow definitions can be bound to an object for selection by users
- Loading branch information
Marcus Nyeholt
committed
Dec 5, 2014
1 parent
eb9f653
commit dd56566
Showing
7 changed files
with
185 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
;(function($) { | ||
$(function() { | ||
|
||
$.entwine('ss', function($) { | ||
|
||
$('.cms-edit-form .Actions #ActionMenus_WorkflowOptions .action').entwine({ | ||
onclick: function(e) { | ||
var transitionId = $(this).attr('data-transitionid'); | ||
var buttonName = $(this).attr('name'); | ||
|
||
buttonName = buttonName.replace(/-\d+/, ''); | ||
$(this).attr('name', buttonName); | ||
|
||
$('input[name=TransitionID]').val(transitionId); | ||
|
||
this._super(e); | ||
} | ||
}); | ||
|
||
$('.cms-edit-form .Actions .action.start-workflow').entwine({ | ||
onmouseup: function(e) { | ||
|
||
// Populate the hidden form field with the selected workflow definition. | ||
|
||
var action = $(this); | ||
$('input[name=TriggeredWorkflowID]').val(action.data('workflow')); | ||
|
||
// Update the element name to exclude the ID, therefore submitting correctly. | ||
|
||
var name = action.attr('name'); | ||
action.attr('name', name.replace(/-\d+/, '')); | ||
this._super(e); | ||
} | ||
}); | ||
}); | ||
|
||
}); | ||
})(jQuery); |
This file was deleted.
Oops, something went wrong.