Árvore de páginas

Versões comparadas

Chave

  • Esta linha foi adicionada.
  • Esta linha foi removida.
  • A formatação mudou.

...

Bloco de código
themeEclipse
languagejs
titleminhawidget.js
var EcmDocumentUpdate = SuperWidget.extend({

	id: null,
	version: null,
	types: null,
	
	bindings: {
		local: {
			'rename-document': ['click_renameDocument']
		}
	},
	
	init: function() {
		this.id = 10;
		this.version = 1000;
	},
	
	renameDocument: function(el, ev) {
		var that = this;
		ECMBC.updateDocument({
			id: that.id,
			version: that.version
		}, function(err, data) {
			if(err) {
				return alert(err.responseText);
			}
			
			that.someFunc(data);
		});
	},
	
	someFunc: function(data) {
		//Qualquer coisa com o retorno de sucesso...
	}
});

 

No application.info de sua Widget adicione o componente como dependência

Bloco de código
themeEclipse
languagebash
titleapplication.info
application.resource.component.1=ecm/renamedocument

 

...