summaryrefslogtreecommitdiff
path: root/program/steps
diff options
context:
space:
mode:
Diffstat (limited to 'program/steps')
-rw-r--r--program/steps/addressbook/edit.inc2
-rw-r--r--program/steps/addressbook/func.inc1
-rw-r--r--program/steps/addressbook/save.inc22
-rw-r--r--program/steps/mail/func.inc1
-rw-r--r--program/steps/settings/identities.inc1
5 files changed, 14 insertions, 13 deletions
diff --git a/program/steps/addressbook/edit.inc b/program/steps/addressbook/edit.inc
index a129d0094..245c02409 100644
--- a/program/steps/addressbook/edit.inc
+++ b/program/steps/addressbook/edit.inc
@@ -94,7 +94,7 @@ function get_form_tags($attrib)
$hiddenfields = new hiddenfield(array('name' => '_task', 'value' => $GLOBALS['_task']));
$hiddenfields->add(array('name' => '_action', 'value' => 'save'));
- if ($_GET['_framed'] || $_POST['_framed'])
+ if ($GLOBALS['_framed'])
$hiddenfields->add(array('name' => '_framed', 'value' => 1));
if ($CONTACT_RECORD['contact_id'])
diff --git a/program/steps/addressbook/func.inc b/program/steps/addressbook/func.inc
index 6d3e95ea2..0df6df3e3 100644
--- a/program/steps/addressbook/func.inc
+++ b/program/steps/addressbook/func.inc
@@ -90,6 +90,7 @@ function rcmail_contacts_list($attrib)
//$javascript .= sprintf("%s.set_env('contacts', %s);", $JS_OBJECT_NAME, array2js($a_js_message_arr));
$OUTPUT->add_script($javascript);
+ $OUTPUT->include_script('list.js');
// add some labels to client
rcube_add_label('deletecontactconfirm');
diff --git a/program/steps/addressbook/save.inc b/program/steps/addressbook/save.inc
index abea316e5..a50d0388a 100644
--- a/program/steps/addressbook/save.inc
+++ b/program/steps/addressbook/save.inc
@@ -62,9 +62,6 @@ if (!empty($_POST['_cid']))
if ($updated)
{
- $_action = 'show';
- show_message('successfullysaved', 'confirmation');
-
if ($_framed)
{
// define list of cols to be displayed
@@ -89,9 +86,11 @@ if (!empty($_POST['_cid']))
$_POST['_cid'],
array2js($a_js_cols)));
- // show confirmation
- show_message('successfullysaved', 'confirmation');
}
+
+ // show confirmation
+ show_message('successfullysaved', 'confirmation');
+ rcmail_overwrite_action('show');
}
else
{
@@ -184,9 +183,6 @@ else
{
if (!$ldap_form)
{
- $_action = 'show';
- $_GET['_cid'] = $insert_id;
-
if ($_framed)
{
// add contact row or jump to the page where it should appear
@@ -198,11 +194,11 @@ else
$_SESSION['user_id']);
$commands .= rcmail_js_contacts_list($sql_result, $JS_OBJECT_NAME);
- $commands .= sprintf("if(parent.%s)parent.%s.select('%d');\n",
+ $commands .= sprintf("if(parent.%s)parent.%s.contact_list.select('%d');\n",
$JS_OBJECT_NAME,
$JS_OBJECT_NAME,
$insert_id);
-
+
// update record count display
$commands .= sprintf("if(parent.%s)parent.%s.set_rowcount('%s');\n",
$JS_OBJECT_NAME,
@@ -213,7 +209,8 @@ else
}
// show confirmation
- show_message('successfullysaved', 'confirmation');
+ show_message('successfullysaved', 'confirmation');
+ $_GET['_cid'] = $insert_id;
}
else
{
@@ -231,7 +228,7 @@ else
}
// display the last insert id
- $commands .= sprintf("if(parent.%s)parent.%s.select('%d');\n",
+ $commands .= sprintf("if(parent.%s)parent.%s.contact_list.select('%d');\n",
$JS_OBJECT_NAME,
$JS_OBJECT_NAME,
$last_id);
@@ -248,6 +245,7 @@ else
// show confirmation
show_message('successfullysaved', 'confirmation');
+ rcmail_overwrite_action('show');
}
else
{
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index bfddb5aa8..18ce9eca8 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -495,6 +495,7 @@ function rcmail_message_list($attrib)
$javascript .= sprintf("%s.set_env('messages', %s);", $JS_OBJECT_NAME, array2js($a_js_message_arr));
$OUTPUT->add_script($javascript);
+ $OUTPUT->include_script('list.js');
return $out;
}
diff --git a/program/steps/settings/identities.inc b/program/steps/settings/identities.inc
index 8bad6859a..caaa45342 100644
--- a/program/steps/settings/identities.inc
+++ b/program/steps/settings/identities.inc
@@ -22,6 +22,7 @@
if ($USER_DATA = $DB->fetch_assoc($sql_result))
$PAGE_TITLE = sprintf('%s (%s@%s)', rcube_label('identities'), $USER_DATA['username'], $USER_DATA['mail_host']);
+$OUTPUT->include_script('list.js');
// similar function as /steps/addressbook/func.inc::rcmail_contact_frame()