summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorSteven Wittens <steven@10.no-reply.drupal.org>2007-06-01 09:05:45 +0000
committerSteven Wittens <steven@10.no-reply.drupal.org>2007-06-01 09:05:45 +0000
commit7f8b191781017f2212ca547b8d0e1fac7990e9a4 (patch)
treefe2520049124f942677e65141ced3e40e4cd1471 /misc
parent21e3e4b490dc99fecaca9ddf79c4b186fc3b4f4a (diff)
downloadbrdo-7f8b191781017f2212ca547b8d0e1fac7990e9a4.tar.gz
brdo-7f8b191781017f2212ca547b8d0e1fac7990e9a4.tar.bz2
#119441: JavaScript aggregator/compressor by m3avrck and others.
Diffstat (limited to 'misc')
-rw-r--r--misc/autocomplete.js32
-rw-r--r--misc/batch.js4
-rw-r--r--misc/collapse.js6
-rw-r--r--misc/drupal.js14
-rw-r--r--misc/farbtastic/farbtastic.js34
-rw-r--r--misc/progress.js12
-rw-r--r--misc/tableheader.js2
-rw-r--r--misc/tableselect.js4
-rw-r--r--misc/teaser.js2
-rw-r--r--misc/textarea.js2
-rw-r--r--misc/upload.js10
11 files changed, 61 insertions, 61 deletions
diff --git a/misc/autocomplete.js b/misc/autocomplete.js
index 166192891..fc0e96b2c 100644
--- a/misc/autocomplete.js
+++ b/misc/autocomplete.js
@@ -15,7 +15,7 @@ Drupal.autocompleteAutoAttach = function () {
$(input.form).submit(Drupal.autocompleteSubmit);
new Drupal.jsAC(input, acdb[uri]);
});
-}
+};
/**
* Prevents the form from submitting if the suggestions popup is open
@@ -25,7 +25,7 @@ Drupal.autocompleteSubmit = function () {
return $('#autocomplete').each(function () {
this.owner.hidePopup();
}).size() == 0;
-}
+};
/**
* An AutoComplete object
@@ -59,7 +59,7 @@ Drupal.jsAC.prototype.onkeydown = function (input, e) {
default: // all other keys
return true;
}
-}
+};
/**
* Handler for the "keyup" event
@@ -96,14 +96,14 @@ Drupal.jsAC.prototype.onkeyup = function (input, e) {
this.hidePopup(e.keyCode);
return true;
}
-}
+};
/**
* Puts the currently highlighted suggestion into the autocomplete field
*/
Drupal.jsAC.prototype.select = function (node) {
this.input.value = node.autocompleteValue;
-}
+};
/**
* Highlights the next suggestion
@@ -118,7 +118,7 @@ Drupal.jsAC.prototype.selectDown = function () {
this.highlight(lis.get(0));
}
}
-}
+};
/**
* Highlights the previous suggestion
@@ -127,7 +127,7 @@ Drupal.jsAC.prototype.selectUp = function () {
if (this.selected && this.selected.previousSibling) {
this.highlight(this.selected.previousSibling);
}
-}
+};
/**
* Highlights a suggestion
@@ -138,7 +138,7 @@ Drupal.jsAC.prototype.highlight = function (node) {
}
$(node).addClass('selected');
this.selected = node;
-}
+};
/**
* Unhighlights a suggestion
@@ -146,7 +146,7 @@ Drupal.jsAC.prototype.highlight = function (node) {
Drupal.jsAC.prototype.unhighlight = function (node) {
$(node).removeClass('selected');
this.selected = false;
-}
+};
/**
* Hides the autocomplete suggestions
@@ -163,7 +163,7 @@ Drupal.jsAC.prototype.hidePopup = function (keycode) {
$(popup).fadeOut('fast', function() { $(popup).remove(); });
}
this.selected = false;
-}
+};
/**
* Positions the suggestions popup and starts a search
@@ -187,7 +187,7 @@ Drupal.jsAC.prototype.populatePopup = function () {
// Do search
this.db.owner = this;
this.db.search(this.input.value);
-}
+};
/**
* Fills the suggestion popup with any matches received
@@ -222,7 +222,7 @@ Drupal.jsAC.prototype.found = function (matches) {
this.hidePopup();
}
}
-}
+};
Drupal.jsAC.prototype.setStatus = function (status) {
switch (status) {
@@ -235,7 +235,7 @@ Drupal.jsAC.prototype.setStatus = function (status) {
$(this.input).removeClass('throbbing');
break;
}
-}
+};
/**
* An AutoComplete DataBase object
@@ -244,7 +244,7 @@ Drupal.ACDB = function (uri) {
this.uri = uri;
this.delay = 300;
this.cache = {};
-}
+};
/**
* Performs a cached and delayed search
@@ -286,7 +286,7 @@ Drupal.ACDB.prototype.search = function (searchString) {
}
});
}, this.delay);
-}
+};
/**
* Cancels the current autocomplete request
@@ -295,7 +295,7 @@ Drupal.ACDB.prototype.cancel = function() {
if (this.owner) this.owner.setStatus('cancel');
if (this.timer) clearTimeout(this.timer);
this.searchString = '';
-}
+};
// Global Killswitch
if (Drupal.jsEnabled) {
diff --git a/misc/batch.js b/misc/batch.js
index 43117e243..8cf1f910f 100644
--- a/misc/batch.js
+++ b/misc/batch.js
@@ -12,7 +12,7 @@ if (Drupal.jsEnabled) {
pb.stopMonitoring();
window.location = uri+'&op=finished';
}
- }
+ };
var errorCallback = function (pb) {
var div = document.createElement('p');
@@ -20,7 +20,7 @@ if (Drupal.jsEnabled) {
$(div).html(errorMessage);
$(holder).prepend(div);
$('#wait').hide();
- }
+ };
var progress = new Drupal.progressBar('updateprogress', updateCallback, "POST", errorCallback);
progress.setProgress(-1, initMessage);
diff --git a/misc/collapse.js b/misc/collapse.js
index 5abe06c14..58aae89fa 100644
--- a/misc/collapse.js
+++ b/misc/collapse.js
@@ -14,7 +14,7 @@ Drupal.toggleFieldset = function(fieldset) {
Drupal.collapseScrollIntoView(this.parentNode);
this.parentNode.animating = false;
});
- if (typeof Drupal.textareaAttach != 'undefined') {
+ if (typeof(Drupal.textareaAttach) != 'undefined') {
// Initialize resizable textareas that are now revealed
Drupal.textareaAttach(null, fieldset);
}
@@ -25,7 +25,7 @@ Drupal.toggleFieldset = function(fieldset) {
this.parentNode.animating = false;
});
}
-}
+};
/**
* Scroll a given fieldset into view as much as possible.
@@ -42,7 +42,7 @@ Drupal.collapseScrollIntoView = function (node) {
window.scrollTo(0, pos.y + node.offsetHeight - h + fudge);
}
}
-}
+};
// Global Killswitch
if (Drupal.jsEnabled) {
diff --git a/misc/drupal.js b/misc/drupal.js
index c4fa5d8ab..8d46fea58 100644
--- a/misc/drupal.js
+++ b/misc/drupal.js
@@ -50,7 +50,7 @@ Drupal.redirectFormButton = function (uri, button, handler) {
// Restore form submission
button.form.action = action;
button.form.target = target;
-
+
// Get response from iframe body
try {
response = (iframe.contentWindow || iframe.contentDocument || iframe).document.body.innerHTML;
@@ -64,7 +64,7 @@ Drupal.redirectFormButton = function (uri, button, handler) {
catch (e) {
response = null;
}
-
+
response = Drupal.parseJson(response);
// Check response code
if (response.status == 0) {
@@ -74,14 +74,14 @@ Drupal.redirectFormButton = function (uri, button, handler) {
handler.oncomplete(response.data);
return true;
- }
+ };
return true;
- }
- }
+ };
+ };
button.onmouseout = button.onblur = function() {
button.onclick = null;
- }
+ };
};
/**
@@ -218,7 +218,7 @@ Drupal.getSelection = function (element) {
return { 'start': start, 'end': end };
}
return { 'start': element.selectionStart, 'end': element.selectionEnd };
-}
+};
// Global Killswitch on the <html> element
if (Drupal.jsEnabled) {
diff --git a/misc/farbtastic/farbtastic.js b/misc/farbtastic/farbtastic.js
index f37df7d72..c89e94029 100644
--- a/misc/farbtastic/farbtastic.js
+++ b/misc/farbtastic/farbtastic.js
@@ -9,7 +9,7 @@ jQuery.fn.farbtastic = function (callback) {
jQuery.farbtastic = function (container, callback) {
var container = $(container).get(0);
return container.farbtastic || (container.farbtastic = new jQuery._farbtastic(container, callback));
-}
+};
jQuery._farbtastic = function (container, callback) {
// Store farbtastic object
@@ -62,12 +62,12 @@ jQuery._farbtastic = function (container, callback) {
}
}
return this;
- }
+ };
fb.updateValue = function (event) {
if (this.value && this.value != fb.color) {
fb.setColor(this.value);
}
- }
+ };
/**
* Change color with HTML syntax #123456
@@ -81,7 +81,7 @@ jQuery._farbtastic = function (container, callback) {
fb.updateDisplay();
}
return this;
- }
+ };
/**
* Change color with HSL triplet [0..1, 0..1, 0..1]
@@ -92,7 +92,7 @@ jQuery._farbtastic = function (container, callback) {
fb.color = fb.pack(fb.rgb);
fb.updateDisplay();
return this;
- }
+ };
/////////////////////////////////////////////////////
@@ -121,7 +121,7 @@ jQuery._farbtastic = function (container, callback) {
// Look for the coordinates starting from the wheel widget.
var e = reference;
- var offset = { x: 0, y: 0 }
+ var offset = { x: 0, y: 0 };
while (e) {
if (typeof e.mouseX != 'undefined') {
x = e.mouseX - offset.x;
@@ -149,7 +149,7 @@ jQuery._farbtastic = function (container, callback) {
}
// Subtract distance to middle
return { x: x - fb.width / 2, y: y - fb.width / 2 };
- }
+ };
/**
* Mousedown handler
@@ -168,7 +168,7 @@ jQuery._farbtastic = function (container, callback) {
// Process
fb.mousemove(event);
return false;
- }
+ };
/**
* Mousemove handler
@@ -189,7 +189,7 @@ jQuery._farbtastic = function (container, callback) {
fb.setHSL([fb.hsl[0], sat, lum]);
}
return false;
- }
+ };
/**
* Mouseup handler
@@ -199,7 +199,7 @@ jQuery._farbtastic = function (container, callback) {
$(document).unbind('mousemove', fb.mousemove);
$(document).unbind('mouseup', fb.mouseup);
document.dragging = false;
- }
+ };
/**
* Update the markers and styles
@@ -238,7 +238,7 @@ jQuery._farbtastic = function (container, callback) {
else if (typeof fb.callback == 'function') {
fb.callback.call(fb, fb.color);
}
- }
+ };
/**
* Get absolute position of element
@@ -262,7 +262,7 @@ jQuery._farbtastic = function (container, callback) {
return '#' + (r < 16 ? '0' : '') + r.toString(16) +
(g < 16 ? '0' : '') + g.toString(16) +
(b < 16 ? '0' : '') + b.toString(16);
- }
+ };
fb.unpack = function (color) {
if (color.length == 7) {
@@ -275,7 +275,7 @@ jQuery._farbtastic = function (container, callback) {
parseInt('0x' + color.substring(2, 3)) / 15,
parseInt('0x' + color.substring(3, 4)) / 15];
}
- }
+ };
fb.HSLToRGB = function (hsl) {
var m1, m2, r, g, b;
@@ -285,7 +285,7 @@ jQuery._farbtastic = function (container, callback) {
return [this.hueToRGB(m1, m2, h+0.33333),
this.hueToRGB(m1, m2, h),
this.hueToRGB(m1, m2, h-0.33333)];
- }
+ };
fb.hueToRGB = function (m1, m2, h) {
h = (h < 0) ? h + 1 : ((h > 1) ? h - 1 : h);
@@ -293,7 +293,7 @@ jQuery._farbtastic = function (container, callback) {
if (h * 2 < 1) return m2;
if (h * 3 < 2) return m1 + (m2 - m1) * (0.66666 - h) * 6;
return m1;
- }
+ };
fb.RGBToHSL = function (rgb) {
var min, max, delta, h, s, l;
@@ -314,7 +314,7 @@ jQuery._farbtastic = function (container, callback) {
h /= 6;
}
return [h, s, l];
- }
+ };
// Install mousedown handler (the others are set on the document on-demand)
$('*', e).mousedown(fb.mousedown);
@@ -326,4 +326,4 @@ jQuery._farbtastic = function (container, callback) {
if (callback) {
fb.linkTo(callback);
}
-} \ No newline at end of file
+}; \ No newline at end of file
diff --git a/misc/progress.js b/misc/progress.js
index cf5c12017..e9e07ee48 100644
--- a/misc/progress.js
+++ b/misc/progress.js
@@ -23,7 +23,7 @@ Drupal.progressBar = function (id, updateCallback, method, errorCallback) {
$(this.element).html('<div class="bar"><div class="filled"></div></div>'+
'<div class="percentage"></div>'+
'<div class="message">&nbsp;</div>');
-}
+};
/**
* Set the percentage and status message for the progressbar.
@@ -37,7 +37,7 @@ Drupal.progressBar.prototype.setProgress = function (percentage, message) {
if (this.updateCallback) {
this.updateCallback(percentage, message, this);
}
-}
+};
/**
* Start monitoring progress via Ajax.
@@ -46,7 +46,7 @@ Drupal.progressBar.prototype.startMonitoring = function (uri, delay) {
this.delay = delay;
this.uri = uri;
this.sendPing();
-}
+};
/**
* Stop monitoring progress via Ajax.
@@ -55,7 +55,7 @@ Drupal.progressBar.prototype.stopMonitoring = function () {
clearTimeout(this.timer);
// This allows monitoring to be stopped from within the callback
this.uri = null;
-}
+};
/**
* Request progress data from server.
@@ -90,7 +90,7 @@ Drupal.progressBar.prototype.sendPing = function () {
}
});
}
-}
+};
/**
* Display errors on the page.
@@ -105,4 +105,4 @@ Drupal.progressBar.prototype.displayError = function (string) {
if (this.errorCallback) {
this.errorCallback(this);
}
-}
+};
diff --git a/misc/tableheader.js b/misc/tableheader.js
index 470d890cf..5b84126ca 100644
--- a/misc/tableheader.js
+++ b/misc/tableheader.js
@@ -86,7 +86,7 @@ if (Drupal.jsEnabled) {
// Precalculate table heights
$('table.sticky-table').each(function () {
this.height = $(this).height();
- })
+ });
$(cells).each(function () {
// Get position.
diff --git a/misc/tableselect.js b/misc/tableselect.js
index 052af02dd..5020f7931 100644
--- a/misc/tableselect.js
+++ b/misc/tableselect.js
@@ -40,7 +40,7 @@ Drupal.tableSelect = function() {
// Keep track of the last checked checkbox.
lastChecked = e.target;
});
-}
+};
Drupal.tableSelectRange = function(from, to, state) {
// We determine the looping mode based on the the order of from and to.
@@ -65,7 +65,7 @@ Drupal.tableSelectRange = function(from, to, state) {
else if (jQuery.filter(to, [i]).r.length) break;
}
-}
+};
// Global Killswitch
if (Drupal.jsEnabled) {
diff --git a/misc/teaser.js b/misc/teaser.js
index 12275fc39..eeb847305 100644
--- a/misc/teaser.js
+++ b/misc/teaser.js
@@ -73,7 +73,7 @@ Drupal.teaserAttach = function() {
}
});
-}
+};
if (Drupal.jsEnabled) {
$(document).ready(Drupal.teaserAttach);
diff --git a/misc/textarea.js b/misc/textarea.js
index 8e523235e..9cd5a1c84 100644
--- a/misc/textarea.js
+++ b/misc/textarea.js
@@ -36,7 +36,7 @@ Drupal.textareaAttach = function() {
textarea.css('opacity', 1);
}
});
-}
+};
if (Drupal.jsEnabled) {
$(document).ready(Drupal.textareaAttach);
diff --git a/misc/upload.js b/misc/upload.js
index 5dd32cf81..bcc1e6acc 100644
--- a/misc/upload.js
+++ b/misc/upload.js
@@ -13,7 +13,7 @@ Drupal.uploadAutoAttach = function() {
var hide = base + '-hide';
var upload = new Drupal.jsUpload(uri, button, wrapper, hide);
});
-}
+};
/**
* JS upload object.
@@ -25,7 +25,7 @@ Drupal.jsUpload = function(uri, button, wrapper, hide) {
this.wrapper = '#'+ wrapper;
this.hide = '#'+ hide;
Drupal.redirectFormButton(uri, $(this.button).get(0), this);
-}
+};
/**
* Handler for the form redirection submission.
@@ -49,7 +49,7 @@ Drupal.jsUpload.prototype.onsubmit = function () {
$(hide).after(el);
$(el).fadeIn('slow');
$(hide).fadeOut('slow');
-}
+};
/**
* Handler for the form redirection completion.
@@ -92,7 +92,7 @@ Drupal.jsUpload.prototype.oncomplete = function (data) {
Drupal.uploadAutoAttach();
}
Drupal.unfreezeHeight();
-}
+};
/**
* Handler for the form redirection error.
@@ -107,7 +107,7 @@ Drupal.jsUpload.prototype.onerror = function (error) {
position: 'static',
left: '0px'
});
-}
+};
// Global killswitch