Remove uses of goog.array
authorRobert Sesek <rsesek@bluestatic.org>
Mon, 26 Dec 2011 23:06:58 +0000 (18:06 -0500)
committerRobert Sesek <rsesek@bluestatic.org>
Mon, 26 Dec 2011 23:06:58 +0000 (18:06 -0500)
web_frontend/main.js
web_frontend/path_control.js
web_frontend/tv_renamer.js

index a6821ddd47070401922d1b2ff976079c1ae73a23..f4da15e3bfa07c4505d18fc7d7e5a7d3cc758191 100644 (file)
@@ -12,7 +12,6 @@ goog.provide('armadillo.App');
 
 goog.require('armadillo.File');
 goog.require('armadillo.Version');
-goog.require('goog.array');
 goog.require('goog.string.format');
 
 armadillo.App = function() {
@@ -75,7 +74,7 @@ armadillo.App.prototype.list = function(path) {
 
     // Add a previous directory entry.
     if (path != '/' && path != '')
-      goog.array.insertAt(data, '../', 0);
+      data.splice(0, 1, '../');
 
     // Add items for each entry.
     $.each(data, function(i, file) {
index 3c6e8a2d4615bacda883a4554f4fbbfc916fb4c4..e9d64eadfde6f06c14ae9923b08fb537a21c73b7 100644 (file)
@@ -9,8 +9,6 @@
 
 goog.provide('armadillo.PathControl');
 
-goog.require('goog.array');
-
 /**
  * Creates a new path editing control for a given path.
  * @param  {string}  path  The path to create an editor for
@@ -93,7 +91,7 @@ armadillo.PathControl.prototype.decorateInternal = function(element) {
   // If the last component is emtpy, do not use it because it means a directory
   // is being moved.
   if (components[components.length - 1] == '') {
-    goog.array.removeAt(components, components.length - 1);
+    components.splice(-1);
   }
 
   var path = '';
index a42de8aeeedd54bbae164e23f41484ec59adca77..296a553677b8c78aadf341ec12ec90b1ae276d6e 100644 (file)
@@ -9,31 +9,18 @@
 
 goog.provide('armadillo.TVRenamer');
 
-goog.require('goog.Disposable');
-
 /**
  * Creates a helper to rename a file in a pretty format for TV episodes.
  * @extends  {goog.Disposable}
  * @constructor
  */
 armadillo.TVRenamer = function(file) {
-  goog.base(this);
-
   /**
    * The file object
    * @type  {armadillo.File}
    */
   this.file_ = file;
 }
-goog.inherits(armadillo.TVRenamer, goog.Disposable);
-
-/**
- * @inheritDoc
- */
-armadillo.TVRenamer.prototype.disposeInternal = function() {
-  goog.base(this, 'disposeInternal');
-  this.file_ = null;
-};
 
 /**
  * Performs the information lookup and renames the file if the lookup is