From 676c59c3184b0aa1e797ee86c050eae88fd48c22 Mon Sep 17 00:00:00 2001 From: Damien Churchill Date: Sat, 27 Mar 2010 14:58:22 +0000 Subject: [PATCH] rename Deluge.Sorters to Deluge.data.SortTypes and reflect this within the file --- deluge/ui/web/js/deluge-all/.build | 2 +- .../{Deluge.Sorters.js => Deluge.data.SortTypes.js} | 12 ++++++------ deluge/ui/web/server.py | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) rename deluge/ui/web/js/deluge-all/{Deluge.Sorters.js => Deluge.data.SortTypes.js} (89%) diff --git a/deluge/ui/web/js/deluge-all/.build b/deluge/ui/web/js/deluge-all/.build index 4eaaec9d7..b780351ab 100644 --- a/deluge/ui/web/js/deluge-all/.build +++ b/deluge/ui/web/js/deluge-all/.build @@ -4,7 +4,7 @@ add_file "Deluge.js" add_file "Deluge.Formatters.js" add_file "Deluge.Keys.js" add_file "Deluge.Menus.js" -add_file "Deluge.Sorters.js" +add_file "Deluge.data.SortTypes.js" add_file "Deluge.EventsManager.js" add_file "Deluge.OptionsManager.js" add_file "Deluge.MultiOptionsManager.js" diff --git a/deluge/ui/web/js/deluge-all/Deluge.Sorters.js b/deluge/ui/web/js/deluge-all/Deluge.data.SortTypes.js similarity index 89% rename from deluge/ui/web/js/deluge-all/Deluge.Sorters.js rename to deluge/ui/web/js/deluge-all/Deluge.data.SortTypes.js index 33ad9d684..2d1a2d05e 100644 --- a/deluge/ui/web/js/deluge-all/Deluge.Sorters.js +++ b/deluge/ui/web/js/deluge-all/Deluge.data.SortTypes.js @@ -1,6 +1,6 @@ /* -Script: Deluge.data.Peer.js - Contains the definition for a Peer record. +Script: Deluge.data.SortTypes.js + Contains some useful sorters for use in data stores. Copyright: (C) Damien Churchill 2009-2010 @@ -31,7 +31,7 @@ Copyright: statement from all source files in the program, then also delete it here. */ -Ext.namespace('Deluge'); +Ext.namespace('Deluge.data'); /** * Common sort functions that can be used for data Stores. @@ -39,11 +39,11 @@ Ext.namespace('Deluge'); * @author Damien Churchill * @version 1.3 * - * @class Deluge.Sorters + * @class Deluge.data.SortTypes * @singleton */ -Deluge.Sorters = { - ipAddress: function(value) { +Deluge.data.SortTypes = { + asIPAddress: function(value) { var d = value.match(/(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\:(\d+)/); return ((((((+d[1])*256)+(+d[2]))*256)+(+d[3]))*256)+(+d[4]); } diff --git a/deluge/ui/web/server.py b/deluge/ui/web/server.py index 1638277a4..66384d8b1 100644 --- a/deluge/ui/web/server.py +++ b/deluge/ui/web/server.py @@ -325,7 +325,7 @@ class TopLevel(resource.Resource): "js/deluge-all/Deluge.js", "js/deluge-all/Deluge.Formatters.js", "js/deluge-all/Deluge.Menus.js", - "js/deluge-all/Deluge.Sorters.js", + "js/deluge-all/Deluge.data.SortTypes.js", "js/deluge-all/Deluge.EventsManager.js", "js/deluge-all/Deluge.OptionsManager.js", "js/deluge-all/Deluge.MultiOptionsManager.js",