Skip to content

Commit

Permalink
JS lint errors detected by minifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
slusarz committed Jan 22, 2014
1 parent fb44569 commit df89b8c
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 25 deletions.
2 changes: 1 addition & 1 deletion framework/Core/js/growler-jquery.js
Expand Up @@ -20,7 +20,7 @@
methods = {

// opts: (object) Options [NONE currently]
init: function(opts)
init: function()
{
return this.each(function() {
$(document).on('vclick.growler', '#' + $(this).attr('id') + ' DIV', function(e) {
Expand Down
2 changes: 1 addition & 1 deletion framework/Core/js/growler.js
Expand Up @@ -81,7 +81,7 @@
info: 'This is the notification backlog'
};

function removeNotice(n, so)
function removeNotice(n)
{
n.fade({
afterFinish: function() {
Expand Down
17 changes: 10 additions & 7 deletions framework/Core/js/hordecore.js
Expand Up @@ -99,7 +99,7 @@ var HordeCore = {

this.initLoading(opts.loading);

ajaxopts.onSuccess = function(t, o) {
ajaxopts.onSuccess = function(t) {
this.doActionComplete(form, t, opts);
}.bind(this);
ajaxopts.parameters = $H(ajaxopts.parameters || {});
Expand Down Expand Up @@ -313,7 +313,7 @@ var HordeCore = {
}

msgs.find(function(m) {
var alarm, audio, growl, message, subtitle, select;
var alarm, growl, message, subtitle, select;

if (!Object.isString(m.message)) {
return;
Expand Down Expand Up @@ -395,7 +395,7 @@ var HordeCore = {
}
}.bindAsEventListener(this))
.observe('click', Event.stop);
message.down('input[type=button]').observe('click', function(e) {
message.down('input[type=button]').observe('click', function() {
var ajax_params = $H({
alarm: alarm.id,
snooze: -1
Expand All @@ -405,7 +405,7 @@ var HordeCore = {
new Ajax.Request(this.conf.URI_SNOOZE, {
parameters: ajax_params
});
}.bindAsEventListener(this));
}.bind(this));
}
}
break;
Expand Down Expand Up @@ -455,16 +455,19 @@ var HordeCore = {
} else if (window.Notification) {
f = function() {
var n = new window.Notification(msg.title, { body: msg.text, icon: msg.icon });
n.onclick = function(e) {
n.onclick = function() {
var ajax_params = $H({
alarm: msg.id,
snooze: -1
});
this.addRequestParams(ajax_params);
new Ajax.Request(this.conf.URI_SNOOZE, {
parameters: ajax_params,
onSuccess: function(r) {
var n = new window.Notification(msg.title, { body: HordeCore.text['dismised'], icon: msg.icon });
onSuccess: function() {
new window.Notification(msg.title, {
body: HordeCore.text['dismised'],
icon: msg.icon
});
if (msg.url) {
window.open(msg.url, '__blank');
}
Expand Down
3 changes: 1 addition & 2 deletions framework/Core/js/jquery.mobile/plugins/autocomplete.js
Expand Up @@ -98,8 +98,7 @@ $.widget('mobile.autocomplete', $.mobile.widget, {

keyupHandler = function()
{
var id = el.attr("id"),
text = el.val();
var text = el.val();

timeout = null;

Expand Down
4 changes: 2 additions & 2 deletions framework/Core/js/smartmobile.js
Expand Up @@ -77,7 +77,7 @@ var HordeMobile = {
opts = $.extend({
data: params,
error: $.noop,
success: function(d, t, x) {
success: function(d) {
HordeMobile.doActionComplete(action, d, callback);
},
type: 'post',
Expand Down Expand Up @@ -320,7 +320,7 @@ var HordeMobile = {
{
// Global ajax options.
$.ajaxSetup({
dataFilter: function(data, type) {
dataFilter: function(data) {
// Remove json security token
filter = /^\/\*-secure-([\s\S]*)\*\/s*$/;
return data.replace(filter, "$1");
Expand Down
6 changes: 3 additions & 3 deletions imp/js/dimpbase.js
Expand Up @@ -712,11 +712,11 @@ var DimpBase = {
this.setMsgHash();
}.bindAsEventListener(this));

container.observe('ViewPort:fetch', function(e) {
container.observe('ViewPort:fetch', function() {
if (!this.isSearch()) {
this.showSearchbar(false);
}
}.bindAsEventListener(this));
}.bind(this));

container.observe('ViewPort:remove', function(e) {
e.memo.get('dataob').each(function(d) {
Expand Down Expand Up @@ -3031,7 +3031,7 @@ var DimpBase = {
break;

case 'empty':
this.viewaction = function(e) {
this.viewaction = function() {
DimpCore.doAction('emptyMailbox', {
mbox: elt.retrieve('mbox')
});
Expand Down
2 changes: 1 addition & 1 deletion imp/js/imp.js
Expand Up @@ -30,7 +30,7 @@ var IMP_JS = {
} else {
a = new Element('A')
.insert(IMP_JS.unblock_image_text)
.observe('click', function(e) {
.observe('click', function() {
HordeCore.doAction('imageUnblockAdd', {
muid: elt.readAttribute('muid')
});
Expand Down
12 changes: 6 additions & 6 deletions imp/js/smartmobile.js
Expand Up @@ -319,7 +319,7 @@ var ImpMobile = {

/**
*/
beforeShow: function(e, data)
beforeShow: function(undefined, data)
{
switch (HordeMobile.currentPage()) {
case 'compose':
Expand All @@ -345,7 +345,7 @@ var ImpMobile = {

/**
*/
pageShow: function(e, opts)
pageShow: function()
{
switch (HordeMobile.currentPage()) {
case 'mailbox':
Expand Down Expand Up @@ -1293,7 +1293,7 @@ var ImpMobile = {
ob = tmp;
}
if (v.remove) {
ob = $.grep(ob, function(n, i) {
ob = $.grep(ob, function(n) {
return $.inArray(n, v.remove) < 0;
});
}
Expand Down Expand Up @@ -1556,7 +1556,7 @@ var ImpMobile = {
}

if (IMP.conf.allow_folders) {
$('#imp-copymove-list').change(function(e) {
$('#imp-copymove-list').change(function() {
$.fn[$(this[this.selectedIndex]).hasClass('flistCreate') ? 'show' : 'hide'].call($('#imp-copymove-newdiv'));
});
}
Expand Down Expand Up @@ -1595,7 +1595,7 @@ var ImpMobileMbox = {
{
var ids = [];

$.each(this.data, function(key, value) {
$.each(this.data, function(key) {
ids.push(key);
});

Expand Down Expand Up @@ -1623,7 +1623,7 @@ var ImpMobileMbox = {
return { sort: value, buid: key };
}).sort(function(a, b) {
return (a.sort < b.sort) ? -1 : 1;
}), function(value, key) {
}), function(value) {
return {
buid: value.buid,
data: mbox_data[value.buid]
Expand Down
4 changes: 2 additions & 2 deletions imp/js/viewport.js
Expand Up @@ -1141,7 +1141,7 @@ var ViewPort = Class.create({
constraint: 'vertical',
ghosting: true,
nodrop: true,
snap: function(x, y, elt) {
snap: function(x, y) {
var sp = this.split_pane,
l = parseInt((y - sp.pos) / sp.lh, 10);
if (l < 1) {
Expand Down Expand Up @@ -1621,7 +1621,7 @@ ViewPort_Buffer = Class.create({

UIDsToRows: function(uids)
{
return rows.collect(this.rowlist.index.bind(this.rowlist)).compact();
return uids.collect(this.rowlist.index.bind(this.rowlist)).compact();
},

// vs = (ViewPort_Selection) TODO
Expand Down

0 comments on commit df89b8c

Please sign in to comment.