site-webscripts \ org \ alfresco \ components \ rules \ config에있는 rule-config-action.get.config.xml은 동일한 파일 구조를 사용하여 동일한 파일을 web-extension에 복사하여 사용자 정의해야합니다. < 메뉴> < 그룹>에 맞춤 작업을 추가 한 다음 < 맞춤>에 추가하십시오. 는
<!--Custom javascript file include for detail mode -->
<@script type="text/javascript" src="${page.url.context}/test/components/rules/config/rule-config-action-custom.js"></@script>
하는 규칙 설정 - 액션 정의를 만들
<group>
<action name="copy"/>
<action name="move"/>
<action name="xcopy"/>
</group>
<customise>
<item id="select">Select</item>
......
<action name="copy">Copy</action>
<action name="move">Move</action>
<action name="xcopy">CreateLinkToDocument</action> <!--xcopy should be id of spring bean configured as action-executer -->
</customise>
이 규칙 details.get.head.ftl 및 규칙 edit.get.head.ftl 사용자 지정 자바 스크립트 JS 추가를 말한다. 주 루트 폴더에 테스트/구성 요소/규칙/config 폴더에있는 JS는
, 공유에서 파일 선택을 여는 경우에 코드 아래에있는 추가
if (typeof SomeCo == "undefined" || !SomeCo)
{
var SomeCo = {};
}
/**
* RuleConfigActionCustom.
*
* @namespace SomeCo
* @class SomeCo.RuleConfigActionCustom
*/
(function()
{
/**
* YUI Library aliases
*/
var Dom = YAHOO.util.Dom,
Selector = YAHOO.util.Selector,
Event = YAHOO.util.Event;
/**
* Alfresco Slingshot aliases
*/
var $html = Alfresco.util.encodeHTML,
$hasEventInterest = Alfresco.util.hasEventInterest;
SomeCo.RuleConfigActionCustom = function(htmlId)
{
SomeCo.RuleConfigActionCustom.superclass.constructor.call(this, htmlId);
// Re-register with our own name
this.name = "SomeCo.RuleConfigActionCustom";
Alfresco.util.ComponentManager.reregister(this);
// Instance variables
this.customisations = YAHOO.lang.merge(this.customisations, SomeCo.RuleConfigActionCustom.superclass.customisations);
this.renderers = YAHOO.lang.merge(this.renderers, SomeCo.RuleConfigActionCustom.superclass.renderers);
return this;
};
YAHOO.extend(SomeCo.RuleConfigActionCustom, Alfresco.RuleConfigAction,
{
/**
* CUSTOMISATIONS
*/
customisations:
{
CreateLinkToDocument:
{
text: function(configDef, ruleConfig, configEl)
{
// Display as path
this._getParamDef(configDef, "destination-folder")._type = "path";
return configDef;
},
edit: function(configDef, ruleConfig, configEl)
{
// Hide all parameters since we are using a cusotm ui but set default values
this._hideParameters(configDef.parameterDefinitions);
// Make parameter renderer create a "Destination" button that displays an destination folder browser
configDef.parameterDefinitions.push({
type: "arca:destination-dialog-button",
displayLabel: this.msg("label.to"),
_buttonLabel: this.msg("button.select-folder"),
_destinationParam: "destination-folder"
});
return configDef;
}
},
},
});
})();
참조
확인이 : http://ecmarchitect.com/images/articles/alfresco-actions/actions-article-2ed.pdf
날 당신이 필요한 모든 단계를 설명하는 좋은 예와 같은
우수 답변을 더 이상 도움을 필요로하는 경우에 알려 주시기 바랍니다. – Zlatko