diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/gigs-calendar/tours.ajax.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/gigs-calendar/tours.ajax.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,312 @@ +search(null, ($options['tours-sort'] == 'custom' ? '`pos`' : '`name`')); + ?> +
+ +
+ + + + + + + + + + + + + + fetch() ) : ?> + "> + + + + + + "> + + + + + +
id; ?>name; ?>notes) ) > 40 ) { + echo substr( strip_tags($t->notes), 0, 40 ) . '...'; + } else { + echo strip_tags($t->notes); + } + ?> +
+ <?php _e('Edit', $gcd) ?> + + <?php _e('Map', $gcd) ?> + + <?php _e('Delete', $gcd) ?> +
+
+ + + + + setupEvents = function() { + + + setupPerformances(); + } + + setupEvents(); + + }(jQuery)); + + + + + name = $_POST['name']; + $t->notes = $_POST['notes']; + + if ( $t->save() ) { + echo '{success:true, tour:' . $t->toJSON() . '}'; + } else { + echo '{success:false}'; + } + break; + case 'getRow': + $t = new tour($_POST['id']); + ?> + "> + id; ?> + name; ?> + notes) ) > 40 ) { + echo substr( strip_tags($t->notes), 0, 40 ) . '...'; + } else { + echo strip_tags($t->notes); + } + ?> + +
+ <?php _e('Edit', $gcd) ?> + + <?php _e('Map', $gcd) ?> + + <?php _e('Delete', $gcd) ?> +
+ + + "> + + + + delete(); + echo '{"success": ' . ($result ? 'true' : 'false') . ',"action":"delete"' . ($result ? '' : ',"error":"db"') . '}'; + break; + case 'edit': + $t = new tour($_POST['id']); + ?> +
+ + + + + + + + + +
+

+
+
+ +
+
+ + + + + +
+
+ + + name = $_POST['name']; + $t->notes = $_POST['notes']; + + $t->save(); + echo '{success:true, tour:' . $t->toJSON() . '}'; + break; + + case 'performance-form': + if ( isset($_POST['id']) ) { + pForm($_POST['id'], false); + } else { + pForm((int) $_POST['count'], true); + } + break; +} +?> \ No newline at end of file