RestActions.js 963 B

12345678910111213141516
  1. MWF.xApplication.ContentManage.Actions = MWF.xApplication.ContentManage.Actions || {};
  2. MWF.require("MWF.xDesktop.Actions.RestActions", null, false);
  3. MWF.xApplication.ContentManage.Actions.RestActions = new Class({
  4. initialize: function(){
  5. this.action = new MWF.xDesktop.Actions.RestActions("/Actions/action.json", "x_contentmanage_assemble_control", "x_component_ContentManage");
  6. },
  7. addNote: function(data, success, failure, async){
  8. this.action.invoke({"name": "addNote","async": async, "data": data, "success": success, "failure": failure});
  9. },
  10. deleteNote: function(id, success, failure, async){
  11. this.action.invoke({"name": "deleteNote","async": async, "parameter": {"id": id}, "success": success, "failure": failure});
  12. },
  13. updateNote: function(id, data, success, failure, async){
  14. this.action.invoke({"name": "updateNote","async": async, "data": data, "parameter": {"id": id}, "success": success, "failure": failure});
  15. }
  16. });