Correct the behavior for creating new events
Do a pushState, if it is a new event and we are really in editing new, rather a replaceStatemaster
parent
4736ddeb82
commit
8e6ec11078
|
|
@ -76,3 +76,5 @@ typings/
|
||||||
# FuseBox cache
|
# FuseBox cache
|
||||||
.fusebox/
|
.fusebox/
|
||||||
|
|
||||||
|
# sessions
|
||||||
|
sessions/
|
||||||
|
|
|
||||||
|
|
@ -132,6 +132,9 @@ var pcalPentryEditManager = function(websocket) {
|
||||||
if(history.state.direction === 'day_show_event' || history.state.direction === 'pentry_edit_main')
|
if(history.state.direction === 'day_show_event' || history.state.direction === 'pentry_edit_main')
|
||||||
parent_event_uuid = history.state.event_uuid;
|
parent_event_uuid = history.state.event_uuid;
|
||||||
console.log('parent_uuid', parent_event_uuid);
|
console.log('parent_uuid', parent_event_uuid);
|
||||||
|
if(_pentrytype === "event" && uuid === "new" && history.state.direction.substr(0,12) !== 'pentry_edit_')
|
||||||
|
history.pushState({direction: 'pentry_edit_main', pentrytype: _pentrytype, uuid: _uuid, event_uuid: parent_event_uuid, date: _date.date}, document.title, location.pathname);
|
||||||
|
else
|
||||||
history.replaceState({direction: 'pentry_edit_main', pentrytype: _pentrytype, uuid: _uuid, event_uuid: parent_event_uuid, date: _date.date}, document.title, location.pathname);
|
history.replaceState({direction: 'pentry_edit_main', pentrytype: _pentrytype, uuid: _uuid, event_uuid: parent_event_uuid, date: _date.date}, document.title, location.pathname);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue