Permalink
Browse files

Public mailings page now sends you to correct public mailing url. Fixes

  • Loading branch information...
1 parent 41d4a26 commit e774f1b4954c151a3962b724e657ba6d1c8d2f88 @soonick committed Mar 24, 2013
Showing with 16 additions and 18 deletions.
  1. +0 −2 mailings.php
  2. +16 −16 themes/default/user/mailings.php
View
@@ -56,8 +56,6 @@
'page' => 1),
$_REQUEST);
-
-
// if mail_id is passed, display the mailing.
if(isset($_GET['mail_id']) && is_numeric($_GET['mail_id'])) {
$input = current(Pommo_Mailing::get(array('id' => $_GET['mail_id'])));
@@ -29,20 +29,20 @@
<table id="grid" class="scroll" cellpadding="0" cellspacing="0"></table>
<div id="gridPager" class="scroll" style="text-align:center;"></div>
- <ul class="inpage_menu">
- <li>
- <a href="ajax/mailing_preview.php" class="visit">
- <img src="<?php echo $this->url['theme']['shared'];
- ?>images/icons/mailing_small.png"/>
- <?php echo _('View Mailing'); ?>
- </a>
- </li>
- </ul>
+ <ul class="inpage_menu">
+ <li>
+ <a href="mailings.php" class="visit">
+ <img src="<?php echo $this->url['theme']['shared'];
+ ?>images/icons/mailing_small.png"/>
+ <?php echo _('View Mailing'); ?>
+ </a>
+ </li>
+ </ul>
<script type="text/javascript">
- $().ready(function() {
-
- var p = {
+ $().ready(function() {
+
+ var p = {
colNames: [
'ID',
'<?php echo _('Subject'); ?>',
@@ -57,7 +57,7 @@
],
url: 'ajax/mailing.list.php'
};
-
+
poMMo.grid = PommoGrid.init('#grid',p);
});
</script>
@@ -68,12 +68,12 @@
var rows = poMMo.grid.getRowIDs();
if(rows) {
// serialize the data
- var data = $.param({'mailings[]': rows});
-
+ var data = $.param({'mail_id': rows});
+
// rewrite the HREF of the clicked element
var oldHREF = this.href;
this.href += (this.href.match(/\?/) ? "&" : "?") + data
-
+
window.location = this.href;
}
return false;

0 comments on commit e774f1b

Please sign in to comment.