openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

navigator.min.js (384B)


      1 export default class WorkbenchNavigator {
      2 'use strict';
      3 static navigateToNew(obj) {
      4 window.history.pushState(obj,obj.name,WorkbenchNavigator.createShortUrl(obj.action,obj.id) );
      5 }
      6 static toActualHistory(obj) {
      7 window.history.replaceState(obj,obj.name,WorkbenchNavigator.createShortUrl(obj.action,obj.id) );
      8 }
      9 static createShortUrl(action,id) {
     10 return './#/'+action+(id?'/'+id:'');
     11 }
     12 }