more squared ui elements

This commit is contained in:
rlx 2016-01-12 11:03:41 +05:30
parent ab3ba433fa
commit 8d250cb1b2
2 changed files with 17 additions and 0 deletions

View file

@ -122,6 +122,7 @@ oml.ui.appDialog = function() {
orientation: 'horizontal' orientation: 'horizontal'
}); });
}, },
style: 'squared',
tabs: tabs tabs: tabs
}) })
.bindEvent({ .bindEvent({
@ -146,6 +147,7 @@ oml.ui.appDialog = function() {
fixedSize: true, fixedSize: true,
height: 384, height: 384,
removeOnClose: true, removeOnClose: true,
style: 'squared',
title: 'Open Media Library', title: 'Open Media Library',
width: 768 width: 768
}) })

View file

@ -187,6 +187,7 @@ oml.ui.preferencesDialog = function() {
.appendTo($main), .appendTo($main),
$formLabel = Ox.Label({ $formLabel = Ox.Label({
style: 'squared',
width: 512 width: 512
}) })
.hide() .hide()
@ -203,11 +204,13 @@ oml.ui.preferencesDialog = function() {
.appendTo($main), .appendTo($main),
$helpLabel = Ox.Label({ $helpLabel = Ox.Label({
style: 'squared',
width: 176 width: 176
}), }),
$closeButton = Ox.Button({ $closeButton = Ox.Button({
overlap: 'left', overlap: 'left',
style: 'squared',
title: 'close', title: 'close',
tooltip: Ox._('Hide'), tooltip: Ox._('Hide'),
type: 'image' type: 'image'
@ -244,6 +247,7 @@ oml.ui.preferencesDialog = function() {
$usersButton = Ox.Button({ $usersButton = Ox.Button({
id: 'users', id: 'users',
style: 'squared',
title: Ox._('Users...') title: Ox._('Users...')
}) })
.bindEvent({ .bindEvent({
@ -254,6 +258,7 @@ oml.ui.preferencesDialog = function() {
$notificationsButton = Ox.Button({ $notificationsButton = Ox.Button({
id: 'notifications', id: 'notifications',
style: 'squared',
title: Ox._('Notifications...') title: Ox._('Notifications...')
}) })
.bindEvent({ .bindEvent({
@ -280,6 +285,7 @@ oml.ui.preferencesDialog = function() {
{}, {},
Ox.Button({ Ox.Button({
id: 'done', id: 'done',
style: 'squared',
title: Ox._('Done') title: Ox._('Done')
}) })
.bindEvent({ .bindEvent({
@ -330,11 +336,13 @@ oml.ui.preferencesDialog = function() {
$formTitle = Ox.FormElementGroup({ $formTitle = Ox.FormElementGroup({
elements: [ elements: [
Ox.Label({ Ox.Label({
style: 'squared',
title: Ox._(formItems[0].title), title: Ox._(formItems[0].title),
width: 384 width: 384
}), }),
Ox.Button({ Ox.Button({
overlap: 'left', overlap: 'left',
style: 'squared',
title: 'help', title: 'help',
type: 'image' type: 'image'
}) })
@ -359,6 +367,7 @@ oml.ui.preferencesDialog = function() {
elements: [ elements: [
item.click item.click
? Ox.Button({ ? Ox.Button({
style: 'squared',
title: Ox._(item.title), title: Ox._(item.title),
width: 256 width: 256
}) })
@ -370,18 +379,21 @@ oml.ui.preferencesDialog = function() {
items: item.items, items: item.items,
label: Ox._(item.title), label: Ox._(item.title),
labelWidth: 128, labelWidth: 128,
style: 'squared',
value: item.value, value: item.value,
width: 384 - !!item.unit * 48 width: 384 - !!item.unit * 48
}) })
: item.type == 'textarea' : item.type == 'textarea'
? Ox.Input({ ? Ox.Input({
height: 328, height: 328,
style: 'squared',
type: 'textarea', type: 'textarea',
value: oml.user.preferences[item.id] || item.value, value: oml.user.preferences[item.id] || item.value,
width: 400 width: 400
}) })
: Ox.isBoolean(item.value) : Ox.isBoolean(item.value)
? Ox.Checkbox({ ? Ox.Checkbox({
style: 'squared',
title: Ox._(item.title), title: Ox._(item.title),
value: item.value, value: item.value,
width: 384 width: 384
@ -392,6 +404,7 @@ oml.ui.preferencesDialog = function() {
label: Ox._(item.title), label: Ox._(item.title),
labelWidth: 128, labelWidth: 128,
placeholder: item.placeholder || '', placeholder: item.placeholder || '',
style: 'squared',
value: oml.user.preferences[item.id] || item.value || '', value: oml.user.preferences[item.id] || item.value || '',
width: 384 - !!item.unit * 48 width: 384 - !!item.unit * 48
}) })
@ -399,12 +412,14 @@ oml.ui.preferencesDialog = function() {
].concat(item.unit ? [ ].concat(item.unit ? [
Ox.Label({ Ox.Label({
overlap: 'left', overlap: 'left',
style: 'squared',
title: item.unit, title: item.unit,
width: 48 width: 48
}) })
] : []).concat(item.type != 'textarea' ? [ ] : []).concat(item.type != 'textarea' ? [
Ox.Button({ Ox.Button({
overlap: 'left', overlap: 'left',
style: 'squared',
title: 'help', title: 'help',
type: 'image' type: 'image'
}) })