- control.onAdd = function (map) {
- var $container = $('<div>')
- .attr('class', 'control-key');
-
- $('<a>')
- .attr('class', 'control-button')
- .attr('href', '#')
- .attr('title', I18n.t('javascripts.key.tooltip'))
- .html('<span class="icon key"></span>')
- .on('click', toggle)
- .appendTo($container);
-
- var $ui = $('<div>')
- .attr('class', 'key-ui');
-
- $('<header>')
- .attr('class', 'sidebar_heading')
- .appendTo($ui)
- .append(
- $('<a>')
- .text(I18n.t('javascripts.close'))
- .attr('class', 'sidebar_close')
- .attr('href', '#')
- .bind('click', toggle))
- .append(
- $('<h4>')
- .text(I18n.t('javascripts.key.title')));
-
- var $section = $('<section>')
+ control.onAddPane = function (map, button, $ui) {
+ var $section = $("<div>")
+ .attr("class", "section")