split up pandora.js
This commit is contained in:
parent
565b5d35c7
commit
6073a1cd19
41 changed files with 4508 additions and 3931 deletions
44
static/js/pandora/ui/editor.js
Normal file
44
static/js/pandora/ui/editor.js
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
// vim: et:ts=4:sw=4:sts=4:ft=js
|
||||
pandora.ui.annotations = function() {
|
||||
var that = new Ox.Element({
|
||||
id: 'annotations'
|
||||
})
|
||||
.bindEvent({
|
||||
resize: function(event, data) {
|
||||
app.user.ui.annotationsSize = data;
|
||||
},
|
||||
resizeend: function(event, data) {
|
||||
pandora.UI.set({annotationsSize: data});
|
||||
},
|
||||
toggle: function(event, data) {
|
||||
pandora.UI.set({showAnnotations: !data.collapsed});
|
||||
}
|
||||
}),
|
||||
$bins = [];
|
||||
$.each(app.config.layers, function(i, layer) {
|
||||
var $bin = new Ox.CollapsePanel({
|
||||
id: layer.id,
|
||||
size: 16,
|
||||
title: layer.title
|
||||
});
|
||||
$bins.push($bin);
|
||||
$bin.$content.append(
|
||||
$('<div>').css({ height: '20px' }).append(
|
||||
$('<div>').css({ float: 'left', width: '16px', height: '16px', margin: '1px'}).append(
|
||||
$('<img>').attr({ src: Ox.UI.getImagePath('iconFind.svg') }).css({ width: '16px', height: '16px', border: 0, background: 'rgb(64, 64, 64)', WebkitBorderRadius: '2px' })
|
||||
)
|
||||
).append(
|
||||
$('<div>').css({ float: 'left', width: '122px', height: '14px', margin: '2px' }).html('Foo')
|
||||
).append(
|
||||
$('<div>').css({ float: 'left', width: '40px', height: '14px', margin: '2px', textAlign: 'right' }).html('23')
|
||||
)
|
||||
);
|
||||
});
|
||||
$.each($bins, function(i, bin) {
|
||||
that.append(bin);
|
||||
});
|
||||
return that;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue