From 83f7077ec930952cdc9cfc8982b80cd4dad06b5f Mon Sep 17 00:00:00 2001 From: Aleksander Machniak <alec@alec.pl> Date: Mon, 07 Jan 2013 08:21:25 -0500 Subject: [PATCH] Fix searching by date in address book (#1488888) --- program/js/app.js | 18 ++++++++++-------- 1 files changed, 10 insertions(+), 8 deletions(-) diff --git a/program/js/app.js b/program/js/app.js index 4935dce..c627983 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -361,7 +361,7 @@ if (this.gui_objects.editform) { this.enable_command('save', true); - if (this.env.action == 'add' || this.env.action == 'edit') + if (this.env.action == 'add' || this.env.action == 'edit' || this.env.action == 'search') this.init_contact_form(); } @@ -441,10 +441,11 @@ this.enable_command('login', true); break; + } - default: - break; - } + // unset contentframe variable if preview_pane is enabled + if (this.env.contentframe && !$('#' + this.env.contentframe).is(':visible')) + this.env.contentframe = null; // prevent from form submit with Enter key in file input fields if (bw.ie) @@ -4395,10 +4396,11 @@ { var ref = this, col; - this.set_photo_actions($('#ff_photo').val()); - - for (col in this.env.coltypes) - this.init_edit_field(col, null); + if (this.env.coltypes) { + this.set_photo_actions($('#ff_photo').val()); + for (col in this.env.coltypes) + this.init_edit_field(col, null); + } $('.contactfieldgroup .row a.deletebutton').click(function() { ref.delete_edit_field(this); -- Gitblit v1.9.1