From c358a5bd43e97e4b27509fbd2b18e818b07692ae Mon Sep 17 00:00:00 2001 From: Rufus Pollock Date: Thu, 26 Apr 2012 21:54:10 +0100 Subject: [PATCH] [refactor,util][xs]: remove remaining code in util.js as not used anywhere (position and $.fn.serializeObject). --- src/util.js | 34 ---------------------------------- 1 file changed, 34 deletions(-) diff --git a/src/util.js b/src/util.js index c67d930c..a975d79e 100644 --- a/src/util.js +++ b/src/util.js @@ -1,36 +1,2 @@ /*jshint multistr:true */ -var util = function() { - $.fn.serializeObject = function() { - var o = {}; - var a = this.serializeArray(); - $.each(a, function() { - if (o[this.name]) { - if (!o[this.name].push) { - o[this.name] = [o[this.name]]; - } - o[this.name].push(this.value || ''); - } else { - o[this.name] = this.value || ''; - } - }); - return o; - }; - - function position( thing, elem, offset ) { - var position = $(elem.target).position(); - if (offset) { - if (offset.top) position.top += offset.top; - if (offset.left) position.left += offset.left; - } - $('.' + thing + '-overlay').show().click(function(e) { - $(e.target).hide(); - $('.' + thing).hide(); - }); - $('.' + thing).show().css({top: position.top + $(elem.target).height(), left: position.left}); - } - - return { - position: position - }; -}();