www

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

router.js (630B)


      1 Components.utils.import("resource://zotero/pathparser.js", Zotero);
      2 Zotero.Router = Zotero.PathParser;
      3 delete Zotero.PathParser;
      4 
      5 Zotero.Router.Utilities = {
      6 	convertControllerToObjectType: function (params) {
      7 		if (params.controller !== undefined) {
      8 			params.objectType = Zotero.DataObjectUtilities.getObjectTypeSingular(params.controller);
      9 			delete params.controller;
     10 		}
     11 	}
     12 };
     13 
     14 
     15 Zotero.Router.InvalidPathException = function (path) {
     16 	this.path = path;
     17 }
     18 
     19 
     20 Zotero.Router.InvalidPathException.prototype = {
     21 	name: "InvalidPathException",
     22 	toString: function () {
     23 		return "Path '" + this.path + "' could not be parsed";
     24 	}
     25 };