From 5a375412993c175e040a2aa2f4203c46e3702643 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Tue, 22 May 2012 15:15:16 +0200 Subject: [PATCH] s/.find/find --- static/js/pandora/account.js | 2 +- static/js/pandora/itemClips.js | 2 +- static/js/pandora/list.js | 4 ++-- static/js/pandora/listDialog.js | 2 +- static/js/pandora/logsDialog.js | 2 +- static/js/pandora/namesDialog.js | 5 ++--- static/js/pandora/statisticsDialog.js | 6 +++--- static/js/pandora/titlesDialog.js | 5 ++--- static/js/pandora/usersDialog.js | 2 +- static/js/pandora/utils.js | 8 ++++---- 10 files changed, 18 insertions(+), 20 deletions(-) diff --git a/static/js/pandora/account.js b/static/js/pandora/account.js index 892711d4..21faf4d8 100644 --- a/static/js/pandora/account.js +++ b/static/js/pandora/account.js @@ -291,7 +291,7 @@ pandora.ui.accountForm = function(action, value) { validate: pandora.validateUser(data.value, true), value: '' }).focusInput(true); - that.$element.find('.OxFormMessage:visible').html('').hide(); + that.find('.OxFormMessage:visible').html('').hide(); pandora.$ui.accountDialog.disableButton('submitReset'); } }), diff --git a/static/js/pandora/itemClips.js b/static/js/pandora/itemClips.js index e67b747f..788f55de 100644 --- a/static/js/pandora/itemClips.js +++ b/static/js/pandora/itemClips.js @@ -57,7 +57,7 @@ pandora.ui.itemClips = function(options) { .data(Ox.extend(annotations.length ? { annotation: annotations[0].id.split('/')[1], } : {}, {'in': clip['in'], out: clip.out})); - $item.$element.find('.OxTarget').addClass('OxSpecialTarget'); + $item.find('.OxTarget').addClass('OxSpecialTarget'); that.append($item); }); diff --git a/static/js/pandora/list.js b/static/js/pandora/list.js index f6ad54b4..02654881 100644 --- a/static/js/pandora/list.js +++ b/static/js/pandora/list.js @@ -566,8 +566,8 @@ pandora.ui.list = function() { ); previousSrc = Ox.UI.getImageURL( data.previousValue == 'posters' ? 'symbolSetPoster' : 'symbolIcon' - ) - that.$element.find('img[src="' + previousSrc + '"]').attr({src: src}); + ); + that.find('img[src="' + previousSrc + '"]').attr({src: src}); } else { that.options({ borderRadius: data.value == 'posters' ? 0 : 16, diff --git a/static/js/pandora/listDialog.js b/static/js/pandora/listDialog.js index 46c4d50c..b0e5ae67 100644 --- a/static/js/pandora/listDialog.js +++ b/static/js/pandora/listDialog.js @@ -39,7 +39,7 @@ pandora.ui.listDialog = function(section) { $findElement[data.selected == 'icon' ? 'show' : 'hide'](); } }); - pandora.$ui.listDialogTabPanel.$element.find('.OxButtonGroup').css({width: '256px'}); + pandora.$ui.listDialogTabPanel.find('.OxButtonGroup').css({width: '256px'}); var $findElement = Ox.FormElementGroup({ elements: [ diff --git a/static/js/pandora/logsDialog.js b/static/js/pandora/logsDialog.js index 40a493d8..4414570d 100644 --- a/static/js/pandora/logsDialog.js +++ b/static/js/pandora/logsDialog.js @@ -209,7 +209,7 @@ pandora.ui.logsDialog = function() { fontSize: '9px', textAlign: 'center', }) - .appendTo(that.$element.find('.OxButtonsbar')); + .appendTo(that.find('.OxButtonsbar')); that.superClose = that.close; that.close = function() { diff --git a/static/js/pandora/namesDialog.js b/static/js/pandora/namesDialog.js index 7fc8d3c3..59b99103 100644 --- a/static/js/pandora/namesDialog.js +++ b/static/js/pandora/namesDialog.js @@ -84,8 +84,7 @@ pandora.ui.namesDialog = function() { ); }, open: function(data) { - $list.$element - .find('.OxItem.OxSelected > .OxCell.OxColumnSortname') + $list.find('.OxItem.OxSelected > .OxCell.OxColumnSortname') .trigger('mousedown') .trigger('mouseup'); }, @@ -179,7 +178,7 @@ pandora.ui.namesDialog = function() { fontSize: '9px', textAlign: 'center', }) - .appendTo(that.$element.find('.OxButtonsbar')); + .appendTo(that.find('.OxButtonsbar')); return that; diff --git a/static/js/pandora/statisticsDialog.js b/static/js/pandora/statisticsDialog.js index 4bab8554..835878fa 100644 --- a/static/js/pandora/statisticsDialog.js +++ b/static/js/pandora/statisticsDialog.js @@ -387,7 +387,7 @@ pandora.ui.statisticsDialog = function() { keyWidth: 128, sort: {key: 'value', operator: '-'}, title: Ox.endsWith(key, 'y') - ? Ox.sub(Ox.toTitleCase(key), 0, -1) + 'ies' + ? Ox.toTitleCase(key).slice(0, -1) + 'ies' : Ox.toTitleCase(key) + 's', width: chartWidth }) @@ -558,7 +558,7 @@ pandora.ui.statisticsDialog = function() { tabs: tabs }); - $tabPanel.$element.find('.OxButtonGroup').css({width: '512px'}); + $tabPanel.find('.OxButtonGroup').css({width: '512px'}); $guestsCheckbox.appendTo($tabPanel.children('.OxBar')); $dialog.options({content: $tabPanel}); @@ -578,4 +578,4 @@ pandora.ui.statisticsDialog = function() { return $dialog; -}; \ No newline at end of file +}; diff --git a/static/js/pandora/titlesDialog.js b/static/js/pandora/titlesDialog.js index e0661ab9..8b1a26fc 100644 --- a/static/js/pandora/titlesDialog.js +++ b/static/js/pandora/titlesDialog.js @@ -73,8 +73,7 @@ pandora.ui.titlesDialog = function() { ); }, open: function(data) { - $list.$element - .find('.OxItem.OxSelected > .OxCell.OxColumnSorttitle') + $list.find('.OxItem.OxSelected > .OxCell.OxColumnSorttitle') .trigger('mousedown') .trigger('mouseup'); }, @@ -168,7 +167,7 @@ pandora.ui.titlesDialog = function() { fontSize: '9px', textAlign: 'center', }) - .appendTo(that.$element.find('.OxButtonsbar')); + .appendTo(that.find('.OxButtonsbar')); return that; diff --git a/static/js/pandora/usersDialog.js b/static/js/pandora/usersDialog.js index c9521957..aa4745ed 100644 --- a/static/js/pandora/usersDialog.js +++ b/static/js/pandora/usersDialog.js @@ -580,7 +580,7 @@ pandora.ui.usersDialog = function() { fontSize: '9px', textAlign: 'center' }) - .appendTo(that.$element.find('.OxButtonsbar')); + .appendTo(that.find('.OxButtonsbar')); that.superClose = that.close; that.close = function() { diff --git a/static/js/pandora/utils.js b/static/js/pandora/utils.js index bd1de891..2de2ae60 100644 --- a/static/js/pandora/utils.js +++ b/static/js/pandora/utils.js @@ -228,7 +228,7 @@ pandora.enableDragAndDrop = function($list, canMove) { drag.source = pandora.getListData(), drag.targets = {}; Ox.forEach(pandora.$ui.folderList, function($list) { - $list.addClass('OxDroppable').$element.find('.OxItem').each(function() { + $list.addClass('OxDroppable').find('.OxItem').each(function() { var $item = $(this), id = $item.data('id'), data = $list.value(id); @@ -289,8 +289,8 @@ pandora.enableDragAndDrop = function($list, canMove) { : isAtListsBottom(event) ? 16 : 0 if (scroll) { scrollInterval = setInterval(function() { - pandora.$ui.folders.$element.scrollTop( - pandora.$ui.folders.$element.scrollTop() + scroll + pandora.$ui.folders.scrollTop( + pandora.$ui.folders.scrollTop() + scroll ); }, 100); } @@ -875,7 +875,7 @@ pandora.getVideoOptions = function(data) { pandora.getVideoPartsAndPoints = function(durations, points) { var parts = durations.length, offsets = Ox.range(parts).map(function(i) { - return Ox.sum(Ox.sub(durations, 0, i)); + return Ox.sum(durations.slice(0, i)); }), ret = { parts: [],