2012-04-15 12:13:37 +00:00
|
|
|
/*
|
|
|
|
...
|
|
|
|
*/
|
|
|
|
|
2012-04-15 12:40:56 +00:00
|
|
|
'use strict';
|
2012-04-15 12:13:37 +00:00
|
|
|
|
2012-04-15 12:40:56 +00:00
|
|
|
Ox.load('UI', function() {
|
2012-04-15 12:13:37 +00:00
|
|
|
|
|
|
|
var groups = [
|
|
|
|
['add', 'remove', 'close', 'center', 'bracket'],
|
|
|
|
['arrowLeft', 'arrowRight', 'arrowUp', 'arrowDown'],
|
|
|
|
['left', 'right', 'up', 'down'],
|
|
|
|
[
|
|
|
|
'play', 'pause', 'playInToOut', 'goToIn', 'goToOut',
|
|
|
|
'setIn', 'setOut', 'goToPoster', 'setPoster'
|
|
|
|
],
|
|
|
|
['open', 'grow', 'shrink', 'fill', 'fit'],
|
|
|
|
['unmute', 'volumeUp', 'volumeDown', 'mute'],
|
|
|
|
[
|
|
|
|
'chat', 'check', 'click', 'delete', 'edit', 'embed',
|
|
|
|
'find', 'flag', 'like', 'locate',
|
|
|
|
'mail', 'map', 'publish', 'star', 'view'
|
|
|
|
],
|
|
|
|
[
|
|
|
|
'list', 'columns', 'grid', 'iconlist',
|
|
|
|
'gridLandscape', 'gridPortrait',
|
|
|
|
'iconlistPortraitList', 'iconlistPortraitIconLandscape'
|
|
|
|
],
|
|
|
|
['info', 'warning', 'help'],
|
|
|
|
['select', 'set'],
|
|
|
|
['undo', 'redo'],
|
|
|
|
['upload', 'download'],
|
|
|
|
['unlock', 'lock'],
|
|
|
|
['copyright', 'noCopyright'],
|
|
|
|
['volume', 'mount', 'unmount', 'sync'],
|
|
|
|
['icon', 'clock', 'user']
|
|
|
|
],
|
|
|
|
symbols = Ox.flatten(groups),
|
2012-04-15 12:40:56 +00:00
|
|
|
$menu = Ox.Bar({size: 24}),
|
|
|
|
$switch = Ox.Button({
|
|
|
|
title: 'Switch Theme'
|
|
|
|
})
|
|
|
|
.attr({id: 'switch'})
|
|
|
|
.bind({
|
|
|
|
click: function() {
|
|
|
|
Ox.Theme(Ox.Theme() == 'classic' ? 'modern' : 'classic');
|
|
|
|
}
|
|
|
|
})
|
|
|
|
.appendTo($menu),
|
|
|
|
$main = Ox.Container(),
|
|
|
|
$buttons = $('<div>').addClass('buttons').appendTo($main),
|
|
|
|
$symbols = $('<div>').addClass('symbols').appendTo($main);
|
2012-04-15 12:13:37 +00:00
|
|
|
|
|
|
|
groups.forEach(function(symbols) {
|
|
|
|
Ox.ButtonGroup({
|
|
|
|
buttons: symbols.map(function(symbol) {
|
|
|
|
return {
|
|
|
|
id: symbol,
|
|
|
|
title: symbol,
|
|
|
|
tooltip: symbol
|
|
|
|
};
|
|
|
|
}),
|
|
|
|
type: 'image'
|
|
|
|
})
|
|
|
|
.appendTo($buttons);
|
|
|
|
});
|
|
|
|
symbols.forEach(function(symbol) {
|
|
|
|
Ox.Element({
|
|
|
|
element: '<div>',
|
|
|
|
tooltip: symbol
|
|
|
|
})
|
|
|
|
.addClass('OxGrid symbol')
|
|
|
|
.append(
|
|
|
|
$('<img>').attr({src: Ox.UI.getImageURL(
|
|
|
|
'symbol' + symbol[0].toUpperCase() + symbol.substr(1))
|
|
|
|
})
|
|
|
|
)
|
|
|
|
.appendTo($symbols);
|
|
|
|
});
|
|
|
|
|
2012-04-15 12:40:56 +00:00
|
|
|
Ox.SplitPanel({
|
|
|
|
elements: [
|
|
|
|
{element: $menu, size: 24},
|
|
|
|
{element: $main}
|
|
|
|
],
|
|
|
|
orientation: 'vertical'
|
|
|
|
})
|
|
|
|
.appendTo(Ox.$body);
|
|
|
|
|
2012-04-15 12:13:37 +00:00
|
|
|
});
|