Skip to content

Commit

Permalink
Merge pull request arnaud-lb#11 from formapro/allow-call-init-several…
Browse files Browse the repository at this point in the history
…-times

allow call init method several times.
  • Loading branch information
arnaud-lb committed Jul 3, 2013
2 parents 6b48ce4 + 3174898 commit 83c640b
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
define(function() {

var namespace = 'fselectmenu';

var intialized = false;

var keyCode = {
UP: 38
Expand Down Expand Up @@ -331,6 +333,10 @@ define(function() {

function init(options) {

if (intialized) {
return;
}

options = options || {};

if (options.namespace) {
Expand All @@ -345,6 +351,8 @@ define(function() {
delegate('native', 'disable', 'disable');
delegate('native', 'enable', 'enable');
delegate('native', 'readonly', 'setReadonly');

intialized = true;
}

return {
Expand Down

0 comments on commit 83c640b

Please sign in to comment.