
//  ListPicker.js
//
// Created by Robert Hovhannisyan on 2014-06-12
//
// Copyright 2014 Robert Hovhannisyan. All rights reserved.
// MIT Licensed
var exec = require('cordova/exec');

var ListPicker = function() {}

ListPicker.prototype.showPicker = function(options, callback, error_callback) {
    options || (options = {});
    var scope = options.scope || null;
    
    var config = {
        title: options.title || ' ',
        selectedValue: options.selectedValue || '',
        items: options.items || {},
        style: options.style || 'default',
        doneButtonLabel: options.doneButtonLabel || 'Done',
        cancelButtonLabel: options.cancelButtonLabel || 'Cancel'
    };
    
    var _callback = function() {
        if(typeof callback == 'function') { 
          callback.apply(scope, arguments);
        }
    };
    
    var _error_callback = function() {
        if(typeof error_callback == 'function') { 
          error_callback.apply(scope, arguments);
        }
    };
    cordova.exec(_callback, _error_callback, 'ListPicker', 'showPicker', [config]);
}
module.exports = new ListPicker();
@@ -361,21 +361,17 @@
 %7C null;%0A
-    
 %0A
+
     var 
@@ -470,10 +470,10 @@
  %7C%7C 
-''
+%5B%5D
 ,%0A  
@@ -673,37 +673,33 @@
 'Cancel'%0A    %7D;%0A
-    
 %0A
+
     var _callbac
@@ -750,33 +750,32 @@
 == 'function') %7B
- 
 %0A          callb
@@ -824,13 +824,9 @@
  %7D;%0A
-    
 %0A
+
     
@@ -909,17 +909,16 @@
 tion') %7B
- 
 %0A       
@@ -1063,16 +1063,16 @@
 ig%5D);%0A%7D%0A
-
 module.e
@@ -1097,8 +1097,9 @@
 icker();
+%0A

Set default value of selected value to empty array