Revert "Add getEditUrlForDiff fn to gr-navigation"
This reverts commit 0f37ca3b16.
Reason for revert: Edit must be a new field in the View enum.
Change-Id: Idf2b222ca6e541258c0a453199820d7a72312a53
			
			
This commit is contained in:
		@@ -47,8 +47,6 @@ limitations under the License.
 | 
			
		||||
    //    - `leftSide`, optional, Boolean, if a `lineNum` is provided, a value
 | 
			
		||||
    //        of true selects the line from base of the patch range. False by
 | 
			
		||||
    //        default.
 | 
			
		||||
    //    - `edit`, optional, Boolean, whether or not the editor view of the
 | 
			
		||||
    //        diff should be loaded.
 | 
			
		||||
 | 
			
		||||
    window.Gerrit = window.Gerrit || {};
 | 
			
		||||
 | 
			
		||||
@@ -227,21 +225,6 @@ limitations under the License.
 | 
			
		||||
            opt_patchNum, opt_basePatchNum);
 | 
			
		||||
      },
 | 
			
		||||
 | 
			
		||||
      /**
 | 
			
		||||
       * Gets the link to load a file in an editor.
 | 
			
		||||
       *
 | 
			
		||||
       * @param {{ _number: number, project: string }} change The change object.
 | 
			
		||||
       * @param {string} path The file path.
 | 
			
		||||
       * @param {number=} opt_patchNum
 | 
			
		||||
       * @param {number|string=} opt_basePatchNum The string 'PARENT' can be
 | 
			
		||||
       *     used for none.
 | 
			
		||||
       * @return {string}
 | 
			
		||||
       */
 | 
			
		||||
      getEditUrlForDiff(change, path, opt_patchNum, opt_basePatchNum) {
 | 
			
		||||
        return this.getUrlForDiffById(change._number, change.project, path,
 | 
			
		||||
            opt_patchNum, opt_basePatchNum, null, null, true);
 | 
			
		||||
      },
 | 
			
		||||
 | 
			
		||||
      /**
 | 
			
		||||
       * @param {number} changeNum
 | 
			
		||||
       * @param {string} project The name of the project.
 | 
			
		||||
@@ -251,11 +234,10 @@ limitations under the License.
 | 
			
		||||
       *     used for none.
 | 
			
		||||
       * @param {number=} opt_lineNum
 | 
			
		||||
       * @param {boolean=} opt_leftSide
 | 
			
		||||
       * @param {boolean=} opt_edit
 | 
			
		||||
       * @return {string}
 | 
			
		||||
       */
 | 
			
		||||
      getUrlForDiffById(changeNum, project, path, opt_patchNum,
 | 
			
		||||
          opt_basePatchNum, opt_lineNum, opt_leftSide, opt_edit) {
 | 
			
		||||
          opt_basePatchNum, opt_lineNum, opt_leftSide) {
 | 
			
		||||
        if (opt_basePatchNum === PARENT_PATCHNUM) {
 | 
			
		||||
          opt_basePatchNum = undefined;
 | 
			
		||||
        }
 | 
			
		||||
@@ -270,7 +252,6 @@ limitations under the License.
 | 
			
		||||
          basePatchNum: opt_basePatchNum,
 | 
			
		||||
          lineNum: opt_lineNum,
 | 
			
		||||
          leftSide: opt_leftSide,
 | 
			
		||||
          edit: opt_edit,
 | 
			
		||||
        });
 | 
			
		||||
      },
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user