forked from 0x2620/pandora
text names
This commit is contained in:
parent
775003c298
commit
0ef598195c
4 changed files with 16 additions and 7 deletions
|
|
@ -65,10 +65,12 @@ pandora.URL = (function() {
|
|||
: []
|
||||
);
|
||||
} else if (pandora.user.ui.section == 'texts') {
|
||||
var position = pandora.user.ui.texts[state.item]
|
||||
? pandora.user.ui.texts[state.item].position
|
||||
: 0;
|
||||
if (position) {
|
||||
var textState = pandora.user.ui.texts[state.item],
|
||||
position = textState.position || 0;
|
||||
|
||||
if (textState.name) {
|
||||
state.span = textState.name;
|
||||
} else {
|
||||
state.span = [position];
|
||||
}
|
||||
}
|
||||
|
|
@ -217,7 +219,10 @@ pandora.URL = (function() {
|
|||
} else if (state.type == 'texts') {
|
||||
|
||||
if (state.span) {
|
||||
set['texts.' + pandora.UI.encode(state.item) + '.position'] = state.span[0];
|
||||
set['texts.' + pandora.UI.encode(state.item)] = {
|
||||
position: Ox.isArray(state.span) ? state.span[0] : 0,
|
||||
name: Ox.isArray(state.span) ? '' : state.span
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue