Changeset 1192062
- Timestamp:
- 07/03/2015 08:50:05 PM (11 years ago)
- Location:
- simple-newsletter-br/trunk
- Files:
-
- 4 edited
-
class_newsletter.php (modified) (1 diff)
-
js/main.js (modified) (3 diffs)
-
simple-newsletter.php (modified) (2 diffs)
-
views/admin_grid.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
simple-newsletter-br/trunk/class_newsletter.php
r1191501 r1192062 9 9 'CHECK_EMAIL' => 'SELECT email FROM simplenewsletter_subscriptions WHERE email = \'%s\'', 10 10 'CONFIRM' => 'UPDATE simplenewsletter_subscriptions SET confirmed = 1 where hash = \'%s\'', 11 'COUNT' => 'SELECT (SELECT COUNT(*) from simplenewsletter_subscriptions WHERE confirmed = 1 ) as qty_confirmed, (SELECT COUNT(*) from simplenewsletter_subscriptions WHERE confirmed = 0) as qty_unconfirmed, (SELECT COUNT(*) from simplenewsletter_subscriptions WHERE DATE _SUB(CURDATE(),INTERVAL 1 DAY) = created ) as yesterday, (SELECT COUNT(*) from simplenewsletter_subscriptions WHERE DATE_SUB(CURDATE(),INTERVAL 0 DAY) <= created ) as today, (SELECT COUNT(*) from simplenewsletter_subscriptions WHERE DATE_SUB(CURDATE(),INTERVAL 7 DAY) <= created) as last_week'11 'COUNT' => 'SELECT (SELECT COUNT(*) from simplenewsletter_subscriptions WHERE confirmed = 1 ) as qty_confirmed, (SELECT COUNT(*) from simplenewsletter_subscriptions WHERE confirmed = 0) as qty_unconfirmed, (SELECT COUNT(*) from simplenewsletter_subscriptions WHERE DATE(created) = DATE_SUB(CURDATE(),INTERVAL 1 DAY) ) as yesterday, (SELECT COUNT(*) from simplenewsletter_subscriptions WHERE DATE_SUB(CURDATE(),INTERVAL 0 DAY) <= DATE(created) ) as today, (SELECT COUNT(*) from simplenewsletter_subscriptions WHERE DATE_SUB(CURDATE(),INTERVAL 7 DAY) <= DATE(created) ) as last_week' 12 12 ); 13 13 private $data = array(); -
simple-newsletter-br/trunk/js/main.js
r1191479 r1192062 6 6 event.preventDefault(); 7 7 _this= this; 8 8 9 loading(_this ,1); 10 9 11 var posting = $.post( '', $(this).serialize() ); 10 12 posting.done(function(e){ … … 26 28 } 27 29 28 function showSucess( message)30 function showSucess(element, message) 29 31 { 30 var showon = $('.simplenewsletter').data('showon'); 32 var showon = $(element).parent().data('showon'); 33 $(element).find('.error').remove(); 31 34 32 if( showon == 'append'){ 33 $('.simplenewsletter').append(message); 34 return 0; 35 } 35 switch(showon){ 36 case 'append': 37 $(element).parent().append(message); 38 return 0; 39 break; 36 40 37 if(showon == 'prepend'){38 $('.simplenewsletter').prepend(message);39 return 0;40 }41 case 'prepend': 42 $(element).parent().prepend(message); 43 return 0; 44 break; 41 45 42 if(showon == 'substitute') 43 { 44 $('.simplenewsletter').html(message); 45 return 0; 46 case 'substitute': 47 default: 48 $(element).parent().html(message); 49 return 0; 50 break; 46 51 } 47 52 … … 56 61 return 0; 57 62 } 63 58 64 $(element).hide(); 59 65 $(element).find('.simplenewsletter_spinner').show(); -
simple-newsletter-br/trunk/simple-newsletter.php
r1191479 r1192062 22 22 add_action( 'admin_menu', array(&$this,'settings')); 23 23 add_action( 'wp_enqueue_scripts', array(&$this,'scripts' )); 24 add_action( 'admin_enqueue_scripts', 'admin_scripts');24 add_action( 'admin_enqueue_scripts', array(&$this,'admin_scripts' ) ); 25 25 add_action( 'init', array(&$this, 'load_sn_tranlate')); 26 26 … … 62 62 return ; 63 63 } 64 die('-------------DIE----------');64 65 65 wp_enqueue_script( 'simplenewsletter-admin', plugins_url('js/admin_main.js', __FILE__), array('jquery')); 66 66 } -
simple-newsletter-br/trunk/views/admin_grid.php
r1191501 r1192062 8 8 <div class="tablenav top"> 9 9 <div class="alignleft actions bulkactions"> 10 <label for="bulk-action-selector-top" class="screen-reader-text"><?php echo __('Export', 'simple-newsletter-br'); ?></label> 11 <select name="action" id="bulk-action-selector-top"> 12 <option value="-1"><?php echo __('Export', 'simple-newsletter-br'); ?></option> 13 <option value="?sn_export_method=EXPORT_ALL"><?php echo __('All', 'simple-newsletter-br'); ?></option> 14 <option value="?sn_export_method=EXPORT_CONFIRMED"><?php echo __('Confirmed', 'simple-newsletter-br'); ?></option> 15 </select> 16 <input type="submit" id="doaction" class="button action" value="<?php echo __('Download', 'simple-newsletter-br'); ?>"> 10 11 <label for="bulk-action-selector-top" class="screen-reader-text"><?php echo __('Export', 'simple-newsletter-br'); ?></label> 12 <select name="action" id="exportMethod"> 13 <option value="-1"><?php echo __('Export', 'simple-newsletter-br'); ?></option> 14 <option value="?sn_export_method=EXPORT_ALL"><?php echo __('All', 'simple-newsletter-br'); ?></option> 15 <option value="?sn_export_method=EXPORT_CONFIRMED"><?php echo __('Confirmed', 'simple-newsletter-br'); ?></option> 16 </select> 17 <input type="submit" id="doExport" class="button" value="<?php echo __('Download', 'simple-newsletter-br'); ?>"> 18 17 19 </div> 18 20 <br class="clear">
Note: See TracChangeset
for help on using the changeset viewer.