Árvore de páginas

Versões comparadas

Chave

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

...

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

	width: null,
	docTypeId: null,
	
	bindings: {
		local: {
			'search-document': ['click_searchDocument']
		}
	},
	
	init: function() {
		this.width = 900;
		this.docTypeId= '1-2';
	},
	
	searchDocument: function(el, ev) {
		var that = this;
		ECMBC.searchDocument({
			width: that.width,
			docTypeId: that.docTypeId
		}, function(err, data) {
			if(err) {
				return alert(err.responseText);
			}
			
			that.someFunc(data);
		});
	},
	
	someFunc: function(data) {
		//Qualquer coisa com o retorno de sucesso...
	}
});

...