提交 d44d3345 编写于 作者: D dwebster

Fixes: ACT-21, ACT-22, ACT-144.

Extends Activiti.widget.DataTable with support for exposing bubbled events
Adds core i18n date/time formats
上级 66cf95f4
<#assign el=args.htmlid/> <#assign el=args.htmlid/>
<div id="processesContainer"> <div class="processes">
<table id="processesTable"> <div id="${el}-paginator"></div>
<thead> <div id="${el}-datatable"></div>
<tr>
<th>${msg("processes.name")}</th>
<th>${msg("processes.key")}</th>
<th>${msg("processes.version")}</th>
<th>${msg("processes.actions")}</th>
</tr>
</thead>
<tbody>
<#list processDefinitions as processDefinition>
<tr>
<td>${processDefinition.name!processDefinition.id}</td>
<td>${processDefinition.key}</td>
<td>${processDefinition.version}</td>
<td>
<a href="#start?id=${processDefinition.id}" class="processAction startProcess">
<#if processDefinition.startFormResourceKey??>
${msg("processes.startForm")}
<#else>
${msg("processes.start")}
</#if>
</a>
</td>
</tr>
</#list>
</tbody>
</table>
</div> </div>
<script type="text/javascript">//<![CDATA[ <script type="text/javascript">//<![CDATA[
new Activiti.component.Processes("${el}").setMessages(${messages}); new Activiti.component.Processes("${el?js_string}").setMessages(${messages});
//]]></script> //]]></script>
\ No newline at end of file
/* Licensed under the Apache License, Version 2.0 (the "License"); /* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
/** /**
* Activiti.component.Processes * Activiti.component.Processes
* *
* Controls the Process List * Controls the Process List
* *
* @namespace Activiti * @namespace Activiti
* @class Activiti.component.Processes * @class Activiti.component.Processes
*/ */
(function() (function()
{ {
/** /**
* Shortcuts * Shortcuts
*/ */
var Dom = YAHOO.util.Dom, Selector = YAHOO.util.Selector, Event = YAHOO.util.Event, $html = Activiti.util.decodeHTML; var Dom = YAHOO.util.Dom, Selector = YAHOO.util.Selector, Event = YAHOO.util.Event, $html = Activiti.util.decodeHTML;
/** /**
* Processes constructor. * Processes constructor.
* *
* @param {String} htmlId The HTML id of the parent element * @param {String} htmlId The HTML id of the parent element
* @return {Activiti.component.Processes} The new component.Navigation instance * @return {Activiti.component.Processes} The new component.Navigation instance
* @constructor * @constructor
*/ */
Activiti.component.Processes = function Processes_constructor(htmlId) Activiti.component.Processes = function Processes_constructor(htmlId)
{ {
Activiti.component.Processes.superclass.constructor.call(this, "Activiti.component.Processes", htmlId); Activiti.component.Processes.superclass.constructor.call(this, "Activiti.component.Processes", htmlId);
// Create new service instances and set this component to receive the callbacks // Create new service instances and set this component to receive the callbacks
this.services.processService = new Activiti.service.ProcessService(this); this.services.processService = new Activiti.service.ProcessService(this);
// Listen for events that interest this component
this.onEvent(Activiti.event.processActionClick, this.onProcessActionClick);
return this; return this;
}; };
YAHOO.extend(Activiti.component.Processes, Activiti.component.Base, YAHOO.extend(Activiti.component.Processes, Activiti.component.Base,
{ {
/** /**
* Fired by YUI when parent element is available for scripting. * Fired by YUI when parent element is available for scripting.
* Template initialisation, including instantiation of YUI widgets and event listener binding. * Template initialisation, including instantiation of YUI widgets and event listener binding.
* *
* @method onReady * @method onReady
*/ */
onReady: function Processes_onReady() onReady: function Processes_onReady()
{ {
this.widgets.dataTable = new Activiti.widget.DataTable(
// YOU ARE HERE: DATATABLE Upgrade this.id + "-processes",
/* New Code, not working yet
this.widgets.dataList = new Activiti.widget.DataList(this.id + "-task-list",
this, this,
[ { event: Activiti.event.selectTaskFilter, value: {} }], [
{ event: Activiti.event.displayProcesses, value: {} },
{ event: "linkClickEvent", subscribe: true, trigger: Activiti.event.processActionClick}
],
this.id + "-datatable", this.id + "-datatable",
[ this.id + "-paginator" ], [ this.id + "-paginator" ],
[ [
{key:"Name",label:"Name",sortable:true}, {key:"id", sortable:true},
{key:"Key",label:"Key",sortable:true}, {key:"key",sortable:true},
{key:"Version",label:"Version",sortable:true}, {key:"version",sortable:true},
{key:"Action",label:"Actions"} {key:"action"}
]; ]
); );
*/
var columnDefs = [
{key:"Name",label:"Name",sortable:true},
{key:"Key",label:"Key",sortable:true},
{key:"Version",label:"Version",sortable:true},
{key:"Action",label:"Actions"}
];
this.dataSource = new YAHOO.util.DataSource(YAHOO.util.Dom.get("processesTable"));
this.dataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE;
this.dataSource.responseSchema = {
fields: [{key:"Name"},
{key:"Key"},
{key:"Version"},
{key:"Action"}
]
};
this.myDataTable = new YAHOO.widget.DataTable("processesContainer", columnDefs, this.dataSource,
{sortedBy:{key:"Name",dir:"asc"}}
);
// Bind Ready Event
var linkElements = Dom.getElementsByClassName("startProcess", "a");
for (var i = 0; i < linkElements.length; i++)
{
YAHOO.util.Event.addListener(linkElements[i], "click", this.onStartProcessClick)
}
},
/** // Needed to load data and set up other events
* Called when a process has been selected from the process list. if (!Activiti.event.isInitEvent(Activiti.event.displayProcesses))
* Will start new process based on the option. {
* this.fireEvent(Activiti.event.displayProcesses, {}, null, true);
* @method onStartProcessMenuClick }   
* @param eventType The name of the event
* @param eventArgs Event arguments // Display form if url
*/ var processId = Activiti.util.getQueryStringParameter("id");
onStartProcessClick: function Processes_onStartProcessClick(e) if (processId != null)
{ {
var id = this.href.split("?id=")[1] this.startProcess(processId);
if (id)
{
new Activiti.widget.StartProcessInstanceForm(this.id + "-startProcessInstanceForm", id);
YAHOO.util.Event.preventDefault(e)
}
} }
}); },
/**
* Activiti.widget.DataTable-callback to construct the url to use to load data into the data table.
*
* @method onDataTableCreateURL
* @param dataTable {Activiti.widget.DataTable} The data table that is invoking the callback
* @param eventName The name of the event to create a url from
* @param eventValue The event values to create a url from
* @return A url, based on the event, to use when loading data into the data table
*/
onDataTableCreateURL: function Processes_onDataTableCreateURL(dataTable, eventName, eventValue)
{
return this.services.processService.loadProcessDefinitionsURL(eventValue);
},
/**
*
* Activiti.widget.DataTable-callback that is called to render the content of each cell in the Actions row
*
* @method onDataTableRenderCellAction
* @param {Object} dataTable
* @param {Object} el
* @param {Object} oRecord
* @param {Object} oColumn
* @param {Object} oData
*/
onDataTableRenderCellAction: function Processes_onDataTableRenderCellAssignee(dataTable, el, oRecord, oColumn, oData) {
var actions = [],
linkOpen = '<a href="#start?id=' + oRecord.getData().id + '" rel="' + oRecord.getData().id + '" class="processAction startProcess">',
linkClose = "</a>";
if (oRecord.getData().startFormResourceKey != null) {
actions.push(linkOpen + this.msg("processes.startForm") + linkClose);
}
else {
actions.push(linkOpen + this.msg("processes.start") + linkClose);
}
// TODO: Add Other Actions (View XML, View Image, etc.)
//actions.push('<a href="#start?id=' + oRecord.getData().id + '" rel="' + oRecord.getData().id + '" class="processAction viewProcess">'+this.msg("processes.viewProcess")+'</a>');
el.innerHTML = actions.join(" ");
},
/**
* Called when a process start link has been clicked
* Will start new process based on the element
*
* @method startProcess
* @param eventType The name of the event
* @param eventArgs Event arguments
*/
startProcess: function Processes_onStartProcessClick(processId)
{
if (processId)
{
new Activiti.widget.StartProcessInstanceForm(this.id + "-startProcessInstanceForm", processId);
}
},
/**
*
* Triggered when an action link on a process is clicked
*
* @method
*/
onProcessActionClick: function Processes_onProcessActionClick(event, args, me)
{
var el = args[1].e.target,
commonClasses = "processAction ",
processId = el.rel;
switch (el.className.replace(commonClasses, ""))
{
case "startProcess":
me.startProcess(processId)
break;
case "viewProcess":
break;
case "viewXML":
break;
default:
}
},
/**
* Triggers every time the Processes table is reloaded
*
* @method onDisplayProcesses
* @param {Object} event
* @param {Object} args
*/
onDisplayProcesses: function Processes_onDisplayProcesses(event, args)
{
this.widgets.dataTable.reload();
}
});
})(); })();
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* Activiti.component.TaskList * Activiti.component.TaskList
* *
* Will display a list of tasks based on the filter from the Activiti.event.TASKS_FILTER_CLICKED event. * Will display a list of tasks based on the filter from the Activiti.event.TASKS_FILTER_CLICKED event.
* Will also let user clain and complete taks in the list. * Will also let user claim and complete tasks in the list.
* *
* @namespace Activiti * @namespace Activiti
* @class Activiti.component.TaskList * @class Activiti.component.TaskList
......
...@@ -33,15 +33,19 @@ h1 { ...@@ -33,15 +33,19 @@ h1 {
background-color:#CFE7CB; background-color:#CFE7CB;
} }
.processAction { #Activiti .processAction {
display:block; display:block;
padding-left:20px; padding-left:20px;
} }
.startProcess { #Activiti .startProcess {
background: url("../images/process-start-icon.png") no-repeat 0 3px; background: url("../images/process-start-icon.png") no-repeat 0 3px;
} }
.viewProcess, #Activiti .viewProcess,
.viewXML { #Activiti .viewXML {
background: url("../images/process-view-icon.png") no-repeat 0 3px; background: url("../images/process-view-icon.png") no-repeat 0 3px;
} }
\ No newline at end of file
#Activiti .activiti-datatable table {
width:auto;
}
...@@ -15,5 +15,13 @@ ...@@ -15,5 +15,13 @@
<dest-id>database</dest-id> <dest-id>database</dest-id>
<assoc-type>child</assoc-type> <assoc-type>child</assoc-type>
</page-association> </page-association>
<page-association>
<dest-id>deployments</dest-id>
<assoc-type>child</assoc-type>
</page-association>
<page-association>
<dest-id>jobs</dest-id>
<assoc-type>child</assoc-type>
</page-association>
</associations> </associations>
</page> </page>
\ No newline at end of file
...@@ -14,8 +14,7 @@ ...@@ -14,8 +14,7 @@
/** /**
* Activiti.component.DatabaseTable * Activiti.component.DatabaseTable
* *
* Will display a list of tasks based on the filter from the Activiti.event.TASKS_FILTER_CLICKED event. * Displays the contents of the selected Database Table.
* Will also let user clain and complete taks in the list.
* *
* @namespace Activiti * @namespace Activiti
* @class Activiti.component.DatabaseTable * @class Activiti.component.DatabaseTable
......
...@@ -13,4 +13,34 @@ h1 { ...@@ -13,4 +13,34 @@ h1 {
/* Override Core style for long DB table names */ /* Override Core style for long DB table names */
.yui-gf div.yui-u.first { .yui-gf div.yui-u.first {
min-width:18em; min-width:18em;
}
#Activiti .deployments,
#Activiti .jobs {
padding-bottom:10px;
}
#Activiti .jobs .activiti-datatable table,
#Activiti .deployments .activiti-datatable table {
width:auto;
}
#Activiti .jobAction {
display:block;
padding-left:20px;
}
#Activiti .executeJob {
background: url("../images/process-start-icon.png") no-repeat 0 3px;
}
#Activiti .viewException{
background: url("../images/process-view-icon.png") no-repeat 0 3px;
}
#Activiti .viewException .exception{
display:none;
}
/* Bug fix for close button overlapping text */
.yui-skin-sam #prompt.yui-panel .bd {
padding-top:25px;
} }
\ No newline at end of file
...@@ -32,3 +32,26 @@ Activiti.widget.DataTable.paginator.lastPageLinkLabel=>> ...@@ -32,3 +32,26 @@ Activiti.widget.DataTable.paginator.lastPageLinkLabel=>>
Activiti.service.TaskService.claimTaskSuccess=Task was successfully claimed. Activiti.service.TaskService.claimTaskSuccess=Task was successfully claimed.
Activiti.service.TaskService.completeTaskSuccess=Task was successfully completed. Activiti.service.TaskService.completeTaskSuccess=Task was successfully completed.
Activiti.service.ProcessService.startProcessSuccess=Process was successfully started. Activiti.service.ProcessService.startProcessSuccess=Process was successfully started.
## Dates
days.initial=S,M,T,W,T,F,S
days.short=Su,Mo,Tu,We,Th,Fr,Sa
days.medium=Sun,Mon,Tue,Wed,Thu,Fri,Sat
days.long=Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday
months.short=Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec
months.long=January,February,March,April,May,June,July,August,September,October,November,December
## Date Formats
Activiti.date-format.default=ddd d mmm yyyy HH:MM:ss
Activiti.date-format.defaultFTL=EEE d MMM yyyy HH:mm:ss
Activiti.date-format.defaultDateOnly=ddd d mmm yyyy
Activiti.date-format.shortDate=d/m/yy
Activiti.date-format.mediumDate=d mmm, yyyy
Activiti.date-format.mediumDateFTL=d MMM, yyyy
Activiti.date-format.longDate=dd mmmm, yyyy
Activiti.date-format.fullDate=dddd, d mmmm, yyyy
Activiti.date-format.shortTime=h:MM TT
Activiti.date-format.mediumTime=h:MM:ss TT
Activiti.date-format.longTime=h:MM:ss TT Z
Activiti.date-format.am=am
Activiti.date-format.pm=pm
\ No newline at end of file
...@@ -70,7 +70,6 @@ ...@@ -70,7 +70,6 @@
<@script type="text/javascript" src="${resource}/yui/bubbling.v2.1.js"></@script> <@script type="text/javascript" src="${resource}/yui/bubbling.v2.1.js"></@script>
<script type="text/javascript" src="${url.context}/service/messages.js?locale=${locale}"></script> <script type="text/javascript" src="${url.context}/service/messages.js?locale=${locale}"></script>
<script type="text/javascript" src="${resource}/js/activiti-core.js"></script> <script type="text/javascript" src="${resource}/js/activiti-core.js"></script>
<script type="text/javascript" src="${resource}/js/activiti-form.js"></script>
<script type="text/javascript" src="${resource}/js/activiti-widget.js"></script> <script type="text/javascript" src="${resource}/js/activiti-widget.js"></script>
<script type="text/javascript" src="${resource}/js/activiti-service.js"></script> <script type="text/javascript" src="${resource}/js/activiti-service.js"></script>
<script type="text/javascript">//<![CDATA[ <script type="text/javascript">//<![CDATA[
......
...@@ -14,3 +14,21 @@ function getTables(connector) ...@@ -14,3 +14,21 @@ function getTables(connector)
} }
return null; return null;
} }
/**
* Gets a list of the Deployments from the server
*
* @method getDeployments
* @param connector
* @return {Array} A list with deployment objects
*/
function getDeployments(connector)
{
var result = connector.get("/management/deployments");
if (result.status == 200)
{
return eval('(' + result + ')').data;
}
return null;
}
...@@ -1075,6 +1075,68 @@ Activiti.event = function() { ...@@ -1075,6 +1075,68 @@ Activiti.event = function() {
collapseTreeNode: "collapseTreeNode", collapseTreeNode: "collapseTreeNode",
/**
* Fires when the Processes Table is ready
*
* @property displayProcesses
* @type string
*/
displayProcesses: "displayProcesses",
/**
* Fires when the Deployments Table is ready
*
* @property displayDeployments
* @type string
*/
displayDeployments: "displayDeployments",
/**
* Fires when the Jobs Table is ready
*
* @property displayJobs
* @type string
*/
displayJobs: "displayJobs",
/**
* Fires when a process Action in the Activiti Explorer is clicked on
*
* @property processActionClick
* @type string
*/
processActionClick: "processActionClick",
/**
* Fires when a deployment is deleted
*
* @property deleteDeployment
* @type string
*/
deleteDeployment: "deleteDeployment",
/**
* Fires when a job Action is triggered
*
* @property jobAction
* @type {String}
*/
jobAction: "jobAction",
/**
* Fires when a job is sent for executed
*
* @property executeJob
* @type {String}
*/
executeJob: "executeJob",
/** /**
* Called from the activiti initializer when the first body element is ready. * Called from the activiti initializer when the first body element is ready.
* *
......
...@@ -923,6 +923,20 @@ Activiti.service.Ajax = function() { ...@@ -923,6 +923,20 @@ Activiti.service.Ajax = function() {
*/ */
loadProcessInstanceFormURL: function ProcessService_loadProcessInstanceFormURL(processDefinitionId) { loadProcessInstanceFormURL: function ProcessService_loadProcessInstanceFormURL(processDefinitionId) {
return Activiti.service.REST_PROXY_URI_RELATIVE + "process-definition/" + encodeURIComponent(processDefinitionId) + "/form"; return Activiti.service.REST_PROXY_URI_RELATIVE + "process-definition/" + encodeURIComponent(processDefinitionId) + "/form";
},
/**
* Returns the url to load the process definitions from the server
*
* @method loadProcessDefinitionsURL
* @param {Object} eventValue an object of URL parameters
* @return {string} the URL
*/
loadProcessDefinitionsURL: function ProcessService_loadProcessDefinitionsURL(eventValue)
{
var url = Activiti.service.REST_PROXY_URI_RELATIVE + "process-definitions",
params = Activiti.util.objectToArgumentString(eventValue);
return (params) ? url + "?" + params : url;
} }
...@@ -1133,7 +1147,11 @@ Activiti.service.Ajax = function() { ...@@ -1133,7 +1147,11 @@ Activiti.service.Ajax = function() {
{ {
event: { event: {
loadTables: "loadTables", loadTables: "loadTables",
loadTable: "loadTable" loadTable: "loadTable",
deleteDeployments: "deleteDeployments",
loadJob: "loadJob",
executeJob: "executeJob",
jobAction: "jobAction"
} }
}); });
...@@ -1215,6 +1233,129 @@ Activiti.service.Ajax = function() { ...@@ -1215,6 +1233,129 @@ Activiti.service.Ajax = function() {
{ {
return Activiti.service.REST_PROXY_URI_RELATIVE + "management/table/" + encodeURIComponent(table) + "/data?" + return Activiti.service.REST_PROXY_URI_RELATIVE + "management/table/" + encodeURIComponent(table) + "/data?" +
Activiti.util.Pagination.args(filters); Activiti.util.Pagination.args(filters);
},
/**
* Returns the url to load the deployments from the server
*
* @method loadDeploymentsURL
* @param {Object} eventValue an object of URL parameters
* @return {string} the URL
*/
loadDeploymentsURL: function ManagementService_loadDeploymentsURL(eventValue)
{
var url = Activiti.service.REST_PROXY_URI_RELATIVE + "deployments",
params = Activiti.util.objectToArgumentString(eventValue);
return (params) ? url + "?" + params : url;
},
/**
* Returns the url to delete the deployments from the server
*
* @method deleteDeploymentsURL
* @param {Array} deploymentIds
* @param {Boolean} cascade
* @return {String} the URL
*/
deleteDeploymentsURL: function ManagementService_deleteDeploymentsURL(cascade)
{
return Activiti.service.REST_PROXY_URI_RELATIVE + "deployments/delete?cascade=" + cascade;
},
/**
* Calls the url to delete the deployments from the server
*
* @method deleteDeployments
* @param {Array} deploymentIds
* @param {Boolean} cascade
* @return {String} the URL
*/
deleteDeployments: function ManagementService_deleteDeployments(deploymentIds, cascade, obj)
{
deploymentsObj = {deploymentIds: deploymentIds};
this.jsonPost(this.deleteDeploymentsURL(cascade), deploymentsObj, obj, "deleteDeployment");
},
/**
* Returns the URL needed to get a list of jobs
*
* @method loadJobsURL
* @param {Object} eventValue - parameters needed for the URL
* @return {String} URL
*/
loadJobsURL: function ManagementService_loadJobsURL(eventValue)
{
var url = Activiti.service.REST_PROXY_URI_RELATIVE + "management/jobs",
params = Activiti.util.objectToArgumentString(eventValue);
return (params) ? url + "?" + params : url;
},
/**
* Returns URL for job details
*
* @method loadJobURL
* @param {String} jobId
* @return {String} URL
*/
loadJobURL: function ManagementService_loadJobURL(jobId)
{
return Activiti.service.REST_PROXY_URI_RELATIVE + "management/job/" + jobId;
},
/**
* Returns URL to execute a job
*
* @method executeJobURL
* @param {String} jobId
* @return {String} URL
*/
executeJobURL: function ManagementService_executeJobURL(jobId)
{
return this.loadJobURL(jobId) + "/execute";
},
/**
* Returns URL to execute multiple jobs
*
* @method executeJobsURL
* @return {String} URL
*/
executeJobsURL: function ManagementService_executeJobsURL()
{
return Activiti.service.REST_PROXY_URI_RELATIVE + "management/jobs/execute"
},
/**
* Loads the JSON for a job details and triggers a callback function
*
* @method loadJob
* @param {String} jobId
* @param {Object} obj - helper object for callback function
* @return {String} URL
*/
loadJob: function ManagementService_loadJob(jobId, obj)
{
this.jsonGet(this.loadJobURL(jobId), obj, "loadJob");
},
/**
* Executes a job via the REST API and triggers a callback function
*
* @method executeJob
* @param {String} jobId
* @param {Object} obj - helper object for callback function
* @return {String} URL
*/
executeJob: function ManagementService_executeJob(jobId, obj)
{
this.jsonPut(this.executeJobURL(jobId),{}, obj, "executeJob");
},
executeJobs: function ManagementService_executeJobs(jobIds, obj)
{
jobsObj = {jobIds: jobIds};
this.jsonPost(this.executeJobsURL(), jobsObj, obj, "executeJob");
} }
}); });
......
...@@ -671,10 +671,18 @@ Activiti.widget.PopupManager = function() ...@@ -671,10 +671,18 @@ Activiti.widget.PopupManager = function()
return true; return true;
}; };
// Now that we are ready we may start to listen for events // Now that we are ready we may handle events
for (var ei = 0, eil = events.length; ei < eil; ei++) { for (var ei = 0, eil = events.length; ei < eil; ei++)
this._eventPatterns[events[ei].event] = events[ei].value; {
Activiti.event.on(events[ei].event, this.onEvent, this) //Subscribe to events bubbled up to the YAHOO.widget.dataTable object
if (events[ei].subscribe && events[ei].subscribe === true)
{
me._dataTable.subscribe(events[ei].event, me.trigger, {event: events[ei].trigger});
} else // Listen for the event
{
this._eventPatterns[events[ei].event] = events[ei].value;
Activiti.event.on(events[ei].event, this.onEvent, this)
}
} }
}, },
...@@ -690,7 +698,7 @@ Activiti.widget.PopupManager = function() ...@@ -690,7 +698,7 @@ Activiti.widget.PopupManager = function()
* Called when table is paginated or sorted and will fire an event so it gets put in the browser history. * Called when table is paginated or sorted and will fire an event so it gets put in the browser history.
* Afterwards onEvent will be called so the actual data can be loaded. * Afterwards onEvent will be called so the actual data can be loaded.
* *
* @method onEvent * @method fireEvent
* @param start {int} * @param start {int}
* @param sort {string} * @param sort {string}
* @param order {string} * @param order {string}
...@@ -725,6 +733,19 @@ Activiti.widget.PopupManager = function() ...@@ -725,6 +733,19 @@ Activiti.widget.PopupManager = function()
} }
}, },
/**
* Triggers a non Filter/Pagination event
*
* @param {Object} e Event Object
* @param {Object} args Object of arguments
* @param {String} args.event Name of event to trigger
*/
trigger: function(e, args)
{
args.e = e; // Ensure the event object is passed through to the listening function
YAHOO.Bubbling.fire(args.event, args);
},
/** /**
* Reloads the datatable with the current pagination settings * Reloads the datatable with the current pagination settings
*/ */
...@@ -1270,4 +1291,4 @@ Activiti.widget.PopupManager = function() ...@@ -1270,4 +1291,4 @@ Activiti.widget.PopupManager = function()
}); });
})(); })();
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册