Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
PW.FormActions.create('message', {
	
	// domyślne akcje
	defaultActions: {
		button: function(button){
			this.showMsg();
		},
		variable: function(variable, newValue, oldValue){
			this.showMsg();
		},
		variableSet: function(variableSet, added, updated, removed){
			this.showMsg();
		}
	},	
	
	showMsg: function(){
		ServiceFactory.getMessageService().showSuccess(this.get('msg'));
	}
});

 

Code Block
PW.FormActions.create('message', {
	
	buttonInit: function(button){
		this.button.on('click', this.showMsg);
	},
 
	variableInit: function(button){
		this.button.on('click', this.showMsg);
	},
 
	variableSetInit: function(button){
		this.button.on('click', this.showMsg);
	},
	showMsg: function(){
		if(this.isEnabled){
			ServiceFactory.getMessageService().showSuccess(this.get('msg'));
		}		
	}
});

 

 



Własności

  • id - unikalny w obrębie całego systemu identyfikator akcji,
  • name - nazwa akcji (obsługuje tłumaczenia),
  • description - opis akcji (obsługuje tłumaczenia),
  • icon - ikona akcji,
  • category - kategoria, do której należy akcja (może być wiele),
  • destination - element formularza, dla którego dostępna jest akcja (może być wiele)
  • parameters - parametry akcji.

...