Permalink
Browse files

przed dodanie usuwania maili i klientów

  • Loading branch information...
1 parent b566f26 commit b14b8a2bd12db12792415561363de4e8c0672b02 @thyforhtian committed Sep 5, 2011
View
@@ -1,3 +1,4 @@
/nbproject/private/
/MM/.idea/
-/.idea/
+/.idea/
+/doc/
@@ -62,6 +62,9 @@ function deleteClient()
$this->mm_model->deleteClient($data);
}
+ /**
+ * @return void
+ */
function getEmails()
{
//Pagination
@@ -178,6 +181,21 @@ function readFromFile()
$this->load->view('dodane_z_pliku', $read);
$this->load->view('footer');
}
+
+ function sendEmail()
+ {
+ if (!$this->input->post('submit'))
+ {
+ $id = $this->input->post('id');
+ $data['email'] = $this->mm_model->getSingleEmail($id);
+ $data['grupy'] = $this->mm_model->getGroups();
+ $this->load->view('header');
+ $this->load->view('send_email_view',$data);
+ $this->load->view('footer');
+ } else {
+
+ }
+ }
}
?>
@@ -9,12 +9,21 @@ function __construct()
parent::__construct();
}
+ /**
+ * @param int $num
+ * @param int $offset
+ * @return
+ */
function getClients($num, $offset)
{
$q = $this->db->get('clients', $num, $offset);
return $q->result();
}
+ /**
+ * @param $data
+ * @return
+ */
function addClient($data)
{
$this->db->insert('clients', $data);
@@ -10,10 +10,23 @@
<label for="mailBody">Treść wiadomości:</label>
<?php echo form_textarea('mailBody'); ?>
</p>
- <p>
- <?php echo form_submit('','Zapisz'); ?>
+
+ <p>
+ <?php echo form_submit('', 'Zapisz'); ?>
</p>
<?php echo form_close(); ?></td>
</div>
-</section>
+</section>
+<script type="text/javascript" src="<?php echo base_url() ?>/assets/ckeditor/ckeditor.js"></script>
+<script type="text/javascript" src="<?php echo base_url() ?>/assets/ckeditor/adapters/jquery.js"></script>
+<script type="text/javascript">
+ $(document).ready(function() {
+ $("textarea.[name='mailBody']").ckeditor({
+ skin: 'office2003',
+ autoParagraph: false,
+ autoGrow_minHeight: 400
+ });
+ });
+</script>
+<?php ?>
@@ -10,6 +10,8 @@
src="<?php echo base_url() ?>assets/img/delete.png"></td>
<td width="50px"><img class="preview" id="<?php echo $row->id; ?>"
src="<?php echo base_url() ?>assets/img/options.png"></td>
+ <td width="50px"><a href="<?php echo site_url() ?>/home/sendEmail"><img class="send" id="<?php echo $row->id; ?>"
+ src="<?php echo base_url() ?>assets/img/mail_small.png"></a></td>
</tr>
<?php $content = str_replace(array("\n\r", "\n", "\r"), "", addslashes($row->content)); ?>
<script type="text/javascript">
@@ -8,6 +8,7 @@
<?php echo link_tag('assets/css/basic.css'); ?>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/jquery-1.6.2.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/jquery.jgrowl_minimized.js"></script>
+ <script type="text/javascript" src="<?php echo base_url(); ?>assets/js/jquery-ui-.custom.min.js"></script>
</head>
<body>
@@ -0,0 +1,41 @@
+ <table class='addClient'>
+ <?php foreach($email as $mail): ?>
+ <h2><?php echo $mail->title; ?></h2>
+ <?php endforeach ?>
+ <tr>
+ <td id="grupy">
+ <ul>
+ <?php foreach($grupy as $grupa): ?>
+ <li id="<?php echo $grupa->id ?>">
+ <?php echo $grupa->name; ?>
+ </li>
+ <?php endforeach ?>
+ </ul>
+
+
+ </td>
+ <td id="grupywybrane">
+ <p id="bgText">Przenieś grupy do których chcesz wysłać wiadomość</p>
+ <ul>
+ <li class="placeholder"></li>
+ </ul>
+ </td>
+ </tr>
+ </table>
+ <script type="text/javascript">
+ $("td#grupy li").draggable({
+ revert: true,
+ appendTo: 'body'
+ });
+ $("td#grupywybrane").droppable({
+ hoverClass: 'liHover',
+ drop: function(event,ui) {
+ $("p#bgText").fadeOut('slow');
+ $(this).find(".placeholder").remove();
+ $("<li></li>").text(ui.draggable.text()).appendTo(this).attr("id",(ui.draggable).attr('id'));
+ setTimeout(function() {
+ $(ui.draggable).fadeOut('slow');
+ },100);
+ }
+ });
+ </script>
@@ -30,7 +30,10 @@
$(document).ready(function() {
$("textarea.[name='mailBody']").ckeditor({
skin: 'office2003',
- autoParagraph: false
+ autoParagraph: false,
+ autoGrow_minHeight: 400
});
});
-</script>
+</script>
+
+
@@ -0,0 +1,136 @@
+
+div.jGrowl {
+ z-index: 9999;
+ color: #fff;
+ font-size: 12px;
+}
+
+/** Special IE6 Style Positioning **/
+div.ie6 {
+ position: absolute;
+}
+
+div.ie6.top-right {
+ right: auto;
+ bottom: auto;
+ left: expression( ( 0 - jGrowl.offsetWidth + ( document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body.clientWidth ) + ( ignoreMe2 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) ) + 'px' );
+ top: expression( ( 0 + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) ) + 'px' );
+}
+
+div.ie6.top-left {
+ left: expression( ( 0 + ( ignoreMe2 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) ) + 'px' );
+ top: expression( ( 0 + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) ) + 'px' );
+}
+
+div.ie6.bottom-right {
+ left: expression( ( 0 - jGrowl.offsetWidth + ( document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body.clientWidth ) + ( ignoreMe2 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) ) + 'px' );
+ top: expression( ( 0 - jGrowl.offsetHeight + ( document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) ) + 'px' );
+}
+
+div.ie6.bottom-left {
+ left: expression( ( 0 + ( ignoreMe2 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) ) + 'px' );
+ top: expression( ( 0 - jGrowl.offsetHeight + ( document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) ) + 'px' );
+}
+
+div.ie6.center {
+ left: expression( ( 0 + ( ignoreMe2 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) ) + 'px' );
+ top: expression( ( 0 + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) ) + 'px' );
+ width: 100%;
+}
+
+/** Normal Style Positions **/
+div.jGrowl {
+ position: absolute;
+}
+
+body > div.jGrowl {
+ position: fixed;
+}
+
+div.jGrowl.top-left {
+ left: 0px;
+ top: 0px;
+}
+
+div.jGrowl.top-right {
+ right: 0px;
+ top: 0px;
+}
+
+div.jGrowl.bottom-left {
+ left: 0px;
+ bottom: 0px;
+}
+
+div.jGrowl.bottom-right {
+ right: 0px;
+ bottom: 0px;
+}
+
+div.jGrowl.center {
+ top: 0px;
+ width: 50%;
+ left: 25%;
+}
+
+/** Cross Browser Styling **/
+div.center div.jGrowl-notification, div.center div.jGrowl-closer {
+ margin-left: auto;
+ margin-right: auto;
+}
+
+div.jGrowl div.jGrowl-notification, div.jGrowl div.jGrowl-closer {
+ background-color: #000;
+ opacity: .85;
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=85)";
+ filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=85);
+ zoom: 1;
+ width: 235px;
+ padding: 10px;
+ margin-top: 5px;
+ margin-bottom: 5px;
+ font-family: Tahoma, Arial, Helvetica, sans-serif;
+ font-size: 1em;
+ text-align: left;
+ display: none;
+ -moz-border-radius: 5px;
+ -webkit-border-radius: 5px;
+}
+
+div.jGrowl div.jGrowl-notification {
+ min-height: 40px;
+}
+
+div.jGrowl div.jGrowl-notification,
+div.jGrowl div.jGrowl-closer {
+ margin: 10px;
+}
+
+div.jGrowl div.jGrowl-notification div.jGrowl-header {
+ font-weight: bold;
+ font-size: .85em;
+}
+
+div.jGrowl div.jGrowl-notification div.jGrowl-close {
+ z-index: 99;
+ float: right;
+ font-weight: bold;
+ font-size: 1em;
+ cursor: pointer;
+}
+
+div.jGrowl div.jGrowl-closer {
+ padding-top: 4px;
+ padding-bottom: 4px;
+ cursor: pointer;
+ font-size: .9em;
+ font-weight: bold;
+ text-align: center;
+}
+
+/** Hide jGrowl when printing **/
+@media print {
+ div.jGrowl {
+ display: none;
+ }
+}
View
@@ -152,8 +152,30 @@ div.addEmail textarea {
min-height: 500px
}
-img.preview, img.delete {
+img.preview, img.delete, img.send {
cursor: pointer;
}
+.liHover {
+ border: 1px solid blue;
+}
+
+td ul {
+ list-style: none;
+}
+
+td#grupy ul li {
+ cursor: move;
+}
+
+td#grupywybrane ul li {
+ position: inherit;
+}
+
+p#bgText {
+ font-size: 18px;
+ color: #777;
+ text-shadow: 0px 0px 1px #777;
+}
+
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.

0 comments on commit b14b8a2

Please sign in to comment.