forked from 0x2620/pandora
update UI and URL controllers (text position)
This commit is contained in:
parent
d044138d43
commit
4f5bb21a21
2 changed files with 12 additions and 1 deletions
|
@ -40,6 +40,7 @@ pandora.UI = (function() {
|
||||||
listSettings = pandora.site.listSettings,
|
listSettings = pandora.site.listSettings,
|
||||||
listView,
|
listView,
|
||||||
set = {},
|
set = {},
|
||||||
|
textSettings = pandora.site.textSettings,
|
||||||
trigger = {},
|
trigger = {},
|
||||||
triggerEvents;
|
triggerEvents;
|
||||||
|
|
||||||
|
@ -170,6 +171,14 @@ pandora.UI = (function() {
|
||||||
: value;
|
: value;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
if (args.text) {
|
||||||
|
add['texts.' + that.encode(args.text)] = Ox.map(textSettings, function(value, key) {
|
||||||
|
var textsKey = 'texts.' + that.encode(args.text) + '.' + key;
|
||||||
|
return textsKey in args ? args[editextsKeytsKey]
|
||||||
|
: pandora.user.ui.texts[args.text] ? pandora.user.ui.texts[args.text][key]
|
||||||
|
: value;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// items in args trigger events, items in add do not
|
// items in args trigger events, items in add do not
|
||||||
[args, add].forEach(function(obj, isAdd) {
|
[args, add].forEach(function(obj, isAdd) {
|
||||||
|
|
|
@ -65,7 +65,9 @@ pandora.URL = (function() {
|
||||||
: []
|
: []
|
||||||
);
|
);
|
||||||
} else if (pandora.user.ui.section == 'texts') {
|
} else if (pandora.user.ui.section == 'texts') {
|
||||||
var position = pandora.user.ui.texts[pandora.user.ui.text].position;
|
var position = pandora.user.ui.texts[state.text]
|
||||||
|
? pandora.user.ui.texts[state.text].position
|
||||||
|
: 0;
|
||||||
if (position) {
|
if (position) {
|
||||||
state.span = position;
|
state.span = position;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue