Example #1
0
        ?>
							<br/>
							<button class="acymailing_button"
									onclick="if(confirm('<?php 
        echo str_replace("'", "\\'", JText::sprintf('ACY_VALID_DELETE_FROM_QUEUE', $row->countqueued));
        ?>
')){ window.location.href = '<?php 
        echo JURI::base();
        ?>
index.php?option=com_acymailing&ctrl=<?php 
        if (!JFactory::getApplication()->isAdmin()) {
            echo 'front';
        }
        ?>
newsletter&task=cancelNewsletter&<?php 
        echo acymailing_getFormToken();
        ?>
=1&mailid=<?php 
        echo $row->mailid;
        ?>
'; } return false;"><?php 
        echo JText::_('ACY_CANCEL');
        ?>
</button>
						<?php 
    }
    ?>
					</td>
					<td align="center" style="text-align:center">
						<?php 
    if (empty($row->fromname)) {
Example #2
0
 function delete($lineId, $elementids, $table, $confirm = false, $text = '', $extraJsOnClick = '')
 {
     static $deleteJS = false;
     if (!$deleteJS) {
         $deleteJS = true;
         $js = "function joomDelete(lineid,elementids,table,reqconfirm){\r\n\t\t\t\tif(reqconfirm){\r\n\t\t\t\t\tif(!confirm('" . JText::_('ACY_VALIDDELETEITEMS', true) . "')) return false;\r\n\t\t\t\t}\r\n\t\t\t\ttry{\r\n\t\t\t\t\tnew Ajax('index.php?option=com_acymailing&tmpl=component&ctrl=" . $this->ctrl . $this->extra . "&task=delete&value='+elementids+'&table='+table+'&" . acymailing_getFormToken() . "=1', { method: 'get', onComplete: function() {window.document.getElementById(lineid).style.display = 'none';}}).request();\r\n\t\t\t\t}catch(err){\r\n\t\t\t\t\tnew Request({url:'index.php?option=com_acymailing&tmpl=component&ctrl=" . $this->ctrl . $this->extra . "&task=delete&value='+elementids+'&table='+table+'&" . acymailing_getFormToken() . "=1',method: 'get', onComplete: function() { window.document.getElementById(lineid).style.display = 'none'; }}).send();\r\n\t\t\t\t}\r\n\t\t\t}";
         $doc = JFactory::getDocument();
         $doc->addScriptDeclaration($js);
     }
     if (empty($text)) {
         $app = JFactory::getApplication();
         if ($app->isAdmin()) {
             $text = '<span class="hasTooltip acyicon-delete" data-original-title="' . JText::_('ACY_DELETE') . '" title="' . JText::_('ACY_DELETE') . '"/>';
         } else {
             $text = '<img src="media/com_acymailing/images/delete.png" title="Delete">';
         }
     }
     return '<a href="javascript:void(0);" onclick="joomDelete(\'' . $lineId . '\',\'' . $elementids . '\',\'' . $table . '\',' . ($confirm ? 'true' : 'false') . '); ' . $extraJsOnClick . '">' . $text . '</a>';
 }