systemapic / systemapic.js

Systemapic Javascript API
https://systemapic.com
0 stars 3 forks source link

Create pretty dropdown instead of basic <select> dropdown #42

Closed knutole closed 8 years ago

knutole commented 8 years ago

Need a pretty dropdown - not the default ugly <select> dropdown. Should be created from scratch as Wu.Dropdown class, and take content as options param on creation.

Dropdown should be created thus:

var pretty_dropdown = new Wu.Dropdown({
    content : ['layer1', 'layer2'],
    fn : this._dropdownSelected // function runs when dropdown item selected
})

New file can be put in /js/src/ext/dropdown.js, and built like this:

Wu.Dropdown = Wu.Class.extend({

   // this function will run automatically on new Wu.Dropdown()
   initialize : function (options) {
      Wu.setOptions(this, options); // will put options in this.options

   },

   build : function () {
      var content = this.options.content;
   },
});
IgorZiegler commented 8 years ago

@knutole change old dropdown for baselayers (under Data tab) Do you mean Background layer?

IgorZiegler commented 8 years ago

@knutole https://github.com/systemapic/systemapic.js/pull/88/files

IgorZiegler commented 8 years ago

Also we need add appendTo in option.