Last active
June 10, 2016 13:48
-
-
Save wizhippo/95c2b9e41c1c942ca7a47aaf50c825bf to your computer and use it in GitHub Desktop.
This file contains hidden or 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
YUI.add('wizhippo-editcontentviewplugin', function (Y) { | |
"use strict"; | |
Y.namespace('Wizhippo.Plugin'); | |
Y.Wizhippo.Plugin.WizhippoContentEditView = Y.Base.create('wizhippoContentEditView', Y.Plugin.Base, [], { | |
initializer: function () { | |
var view = this.get('host'); | |
var actionBar = view.get('actionBar'); | |
var actionsList = actionBar.get('actionsList'); | |
actionsList.unshift( | |
new Y.eZ.ButtonActionView({ | |
actionId: "deferredPublish", | |
disabled: false, | |
label: "Deferred Publish", | |
bubbleTargets: view | |
}) | |
); | |
view.on('*:deferredPublishAction', view._handleSavePublish); | |
}, | |
}, { | |
NS: 'wizhippoContentEditView', | |
}); | |
Y.eZ.PluginRegistry.registerPlugin( | |
Y.Wizhippo.Plugin.WizhippoContentEditView, ['contentEditView', 'contentCreateView'] | |
); | |
}); |
This file contains hidden or 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
YUI.add('wizhippo-deferredpublishdraftplugin', function (Y) { | |
"use strict"; | |
Y.namespace('Wizhippo.Plugin'); | |
Y.Wizhippo.Plugin.DeferredPublishDraft = Y.Base.create('deferredPublishDraft', Y.eZ.Plugin.ViewServiceBase, [], { | |
initializer: function () { | |
this.onHostEvent('*:deferredPublishAction', this._deferredPublish); | |
}, | |
_deferredPublish: function (e) { | |
Y.log('_deferredPublish'); | |
}, | |
}, { | |
NS: 'deferredPublishDraft', | |
}); | |
Y.eZ.PluginRegistry.registerPlugin( | |
Y.Wizhippo.Plugin.DeferredPublishDraft, ['contentEditViewService', 'contentCreateViewService'] | |
); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment