Skip to content

Commit

Permalink
fix wrong selector, fix wrong use of 'jQuery.each', always return an …
Browse files Browse the repository at this point in the history
…object from getUriObject
  • Loading branch information
okonomiyaki3000 committed Oct 20, 2014
1 parent 67f65be commit 5631666
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions media/media/js/popup-imagemanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
onloadimageview: function()
{
var folder = this.getImageFolder(),
$form = $('uploadForm'),
$form = $('#uploadForm'),
portString = '',
i, l, a, q;

Expand Down Expand Up @@ -221,13 +221,8 @@
var bitsAssociate = {},
bits = u.match(/^(?:([^:\/?#.]+):)?(?:\/\/)?(([^:\/?#]*)(?::(\d*))?)((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[\?#]|$)))*\/?)?([^?#\/]*))?(?:\?([^#]*))?(?:#(.*))?/);

if (!bits)
{
return null;
}

$.each(['uri', 'scheme', 'authority', 'domain', 'port', 'path', 'directory', 'file', 'query', 'fragment'], function(key, index) {
bitsAssociate[key] = bits[index];
bitsAssociate[index] = (!!bits && !!bits[key]) ? bits[key] : '';
});

return bitsAssociate;
Expand Down

0 comments on commit 5631666

Please sign in to comment.