+
+
+
@@ -50,4 +100,4 @@ function propel_is_parent_coauthor( $user_id ) {
if($coauthor->ID == $user_id) return true;
}
return false;
-}
\ No newline at end of file
+}?>
diff --git a/metaboxes/list-authors2.php b/metaboxes/list-authors2.php
new file mode 100644
index 0000000..5bcf14a
--- /dev/null
+++ b/metaboxes/list-authors2.php
@@ -0,0 +1,93 @@
+
+
+ 'display_name', 'order' => 'ASC' ) ); ?>
+
+
+
+ID == $user_id) return true;
+ }
+ return false;
+}
+
+function propel_is_parent_coauthor( $user_id ) {
+ $post = get_post( get_the_ID() );
+ if( $post->post_type != 'propel_task' || $post->post_parent == 0 ) return false;
+
+ $coauthors = Propel_Authors::get_coauthors( $post->post_parent );
+ foreach($coauthors as $coauthor) {
+ if($coauthor->ID == $user_id) return true;
+ }
+ return false;
+}?>
+
+
+
+
+
+
+
+
+
diff --git a/metaboxes/list-authors_ajax.php b/metaboxes/list-authors_ajax.php
new file mode 100644
index 0000000..872a47c
--- /dev/null
+++ b/metaboxes/list-authors_ajax.php
@@ -0,0 +1,100 @@
+prefix}users WHERE user_login LIKE '%$user%'";
+ $users = $wpdb->get_results($sql, OBJECT);
+
+} else {
+ $users = get_users( array('orderby' => 'display_name',
+ 'order' => 'ASC' ) );
+}
+?>
+
+
+
+ID;
+
+$defaults = array( 'orderby' => 'term_order', 'order' => 'ASC' );
+$args = wp_parse_args( $args, $defaults );
+
+if($post_id) {
+ $coauthor_terms = wp_get_post_terms( $post_id, $COAUTHOR_TAXONOMY, $args );
+
+ if(is_array($coauthor_terms) && !empty($coauthor_terms)) {
+ foreach($coauthor_terms as $coauthor) {
+ $post_author = get_user_by( 'login', $coauthor->name );
+ // In case the user has been deleted while plugin was deactivated
+ if(!empty($post_author)) $coauthors[] = $post_author;
+ }
+ } else {
+ if($post) {
+ $post_author = get_userdata($post->post_author);
+ } else {
+ $post_author = get_userdata($wpdb->get_var($wpdb->prepare("SELECT post_author FROM $wpdb->posts WHERE ID = %d", $post_id)));
+ }
+ if(!empty($post_author)) $coauthors[] = $post_author;
+ }
+}
+return $coauthors;
+}
+
+wp_nonce_field( 'coauthors-edit', 'coauthors-nonce' );
+function propel_is_coauthor( $user_id ) {
+ $coauthors = get_coauthors();
+ foreach($coauthors as $coauthor) {
+ if($coauthor->ID == $user_id) return true;
+ }
+ return false;
+}
+
+function propel_is_parent_coauthor( $user_id ) {
+ $post = get_post( get_the_ID() );
+ if( $post->post_type != 'propel_task' || $post->post_parent == 0 ) return false;
+
+ $coauthors = get_coauthors( $post->post_parent );
+ foreach($coauthors as $coauthor) {
+ if($coauthor->ID == $user_id) return true;
+ }
+ return false;
+}
\ No newline at end of file
diff --git a/metaboxes/owner_ajax.php b/metaboxes/owner_ajax.php
new file mode 100644
index 0000000..ec50ce2
--- /dev/null
+++ b/metaboxes/owner_ajax.php
@@ -0,0 +1,27 @@
+prefix}users WHERE user_login LIKE '%$user%'";
+ $users = $wpdb->get_results($sql, OBJECT);
+ } else {
+ $sql = "SELECT * FROM {$wpdb->prefix}users";
+ $users = $wpdb->get_results($sql, OBJECT);
+ }
+?>
+
+
Select Owner
+
+
+
+
+
display_name); ?>
+
+
+
+
diff --git a/metaboxes/project-deleted.php b/metaboxes/project-deleted.php
new file mode 100644
index 0000000..4090cd2
--- /dev/null
+++ b/metaboxes/project-deleted.php
@@ -0,0 +1,154 @@
+
+
+
+
+
+
+
+
+
+
+ Title
+ Contributors
+
+
+ Started
+
+
+
+ Due
+
+
+ Progress
+
+
+
+ ID);
+ $progress = get_post_meta( $task->ID, '_propel_complete', true );
+ $start = get_post_meta( $task->ID, '_propel_start_date', true );
+ if( $start ){
+ //$start = date( get_option( 'date_format' ), $start );
+ $start = date("m-d-y h:i a", $start);
+ }
+
+ $end = get_post_meta( $task->ID, '_propel_end_date', true );
+ if( $end ){
+
+ $day = date('d'); // Day of the countdown
+ $month = date('m'); // Month of the countdown
+ $year = date('Y'); // Year of the countdown
+ $hour = date('H'); // Hour of the day (east coast time)
+
+ $calculation = ( $end - time() ) / 3600;
+ $hours = (int)$calculation + 24;
+ $days = (int)( $hours / 24 ) - 1;
+
+ $hours_remaining = $hours-($days*24)-24;
+
+ if ( $hours < 0 && $hours > -24 ) {
+ $status = "due";
+ }else if ( $hours < -24 ) {
+ $status = "past-due";
+ }else{
+ $status = "published";
+ }
+
+ if ($task->post_status == 'trash'){
+ $status = "deleted";
+ }
+
+ $end = date("m-d-y h:i a", $end);
+
+ }
+
+ if( $task->post_author ) {
+ $userdata = get_userdata( $task->post_author );
+ $authid = $userdata->ID;
+ $author = $userdata->display_name;
+ } else {
+ $authid = '-1';
+ $author = "Unassigned";
+ }
+
+ $x = ($progress == 100) ? "" : "un";
+ $nonce = wp_create_nonce('propel-trash');
+ $completed = ($progress == 100) ? "style='width:0;margin:0;padding:0;'" : "";
+
+ /*
+ * rob_eyouth : added by rob to show task for the current user and if user is admin
+ */
+ //if user is admin
+ //$current_user = wp_get_current_user();
+ //if ( $current_user->ID == $userdata->ID || $current_user->ID == 1) {
+ ?>
+
+
+
+
+ Delete
+
+
+ >
+
+ title="deleted">
+
+
+ Restore
+
+
+
+
+
+
+ post_content);
+ $len <= 0 ? $pad = "style='padding-bottom:10px;'" : $pad ='';
+ ?>
+ >post_title); ?>
+ 75 ) :
+ ?>
+ post_content,0,75).' ...'); ?>
+
+ post_content); ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/metaboxes/project-tasks.php b/metaboxes/project-tasks.php
new file mode 100644
index 0000000..93c53f9
--- /dev/null
+++ b/metaboxes/project-tasks.php
@@ -0,0 +1,241 @@
+
+
+
+
+
+
+
+
+
+
+ Title
+ Contributors
+
+
+ Started
+
+
+
+ Due
+
+
+ Progress
+
+
+
+ post_id);
+ $progress = get_post_meta( $task->ID, '_propel_complete', true );
+ $start = get_post_meta( $task->ID, '_propel_start_date', true );
+ if( $start ){
+ //$start = date( get_option( 'date_format' ), $start );
+ $start = date("m-d-y h:i a", $start);
+ }
+
+ $end = get_post_meta( $task->ID, '_propel_end_date', true );
+ if( $end ){
+
+ $day = date('d'); // Day of the countdown
+ $month = date('m'); // Month of the countdown
+ $year = date('Y'); // Year of the countdown
+ $hour = date('H'); // Hour of the day (east coast time)
+
+ $calculation = ( $end - time() ) / 3600;
+ $hours = (int)$calculation + 24;
+ $days = (int)( $hours / 24 ) - 1;
+
+ $hours_remaining = $hours-($days*24)-24;
+
+ if ( $hours < 0 && $hours > -24 ) {
+ $status = "due";
+ }else if ( $hours < -24 ) {
+ $status = "past-due";
+ }else{
+ $status = "published";
+ }
+
+ $end = date("m-d-y h:i a", $end);
+
+ }
+
+ if( $task->post_author ) {
+ $userdata = get_userdata( $task->post_author );
+ $authid = $userdata->ID;
+ $author = $userdata->display_name;
+ } else {
+ $authid = '-1';
+ $author = "Unassigned";
+ }
+
+ $x = ($progress == 100) ? "" : "un";
+ $nonce = wp_create_nonce('propel-trash');
+ $completed = ($progress == 100) ? "style='width:0;margin:0;padding:0;'" : "";
+
+ $usercnt = get_post_meta($task->ID,'_propel_user',true);
+
+ $html='';
+ for ($i=0; $i < $usercnt; $i++){
+ $contributor = get_post_meta($task->ID,'_propel_user_'.$i,true);
+ if ( $contributor == 'Undefined' || $contributor == 'undefined' ){
+ $html .= 'Undefined ';
+ }else{
+ $user = get_userdatabylogin($contributor);
+ if ( $i == ($usercnt-1)){
+ $html .= ''.$user->display_name.' ';
+ }else{
+ $html .= ''.$user->display_name.', ';
+ }
+ }
+ }
+
+ /*
+ * rob_eyouth : added by rob to show task for the current user and if user is admin
+ */
+ //if user is admin
+ //$current_user = wp_get_current_user();
+ //if ( $current_user->ID == $userdata->ID || $current_user->ID == 1) {
+ ?>
+
+
+
+ Delete
+
+ >
+
+ title="">
+
+
+ Complete
+
+
+ ID,'_propel_task_image', true);
+ if ( !empty($imagecnt) || $imagecnt > 0 ) :
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ post_content);
+ $len <= 0 ? $pad = "style='padding-bottom:10px;'" : $pad ='';
+ ?>
+ >post_title); ?>
+ 75 ) :
+ ?>
+ post_content,0,75).' ...'); ?>
+
+ post_content); ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/metaboxes/project-tasks.php.bak b/metaboxes/project-tasks.php.bak
new file mode 100644
index 0000000..c2dc042
--- /dev/null
+++ b/metaboxes/project-tasks.php.bak
@@ -0,0 +1,164 @@
+
+
+
+
+
+
+
+
+ Title
+ Contributors
+
+
+ Started
+
+
+
+ Due
+
+
+ Progress
+
+
+
+ post_id);
+ $progress = get_post_meta( $task->ID, '_propel_complete', true );
+ $start = get_post_meta( $task->ID, '_propel_start_date', true );
+ if( $start ){
+ //$start = date( get_option( 'date_format' ), $start );
+ $start = date("m-d-y h:i a", $start);
+ }
+
+ $end = get_post_meta( $task->ID, '_propel_end_date', true );
+ if( $end ){
+
+ $day = date('d'); // Day of the countdown
+ $month = date('m'); // Month of the countdown
+ $year = date('Y'); // Year of the countdown
+ $hour = date('H'); // Hour of the day (east coast time)
+
+ $calculation = ( $end - time() ) / 3600;
+ $hours = (int)$calculation + 24;
+ $days = (int)( $hours / 24 ) - 1;
+
+ $hours_remaining = $hours-($days*24)-24;
+
+ if ( $hours < 0 && $hours > -24 ) {
+ $status = "due";
+ }else if ( $hours < -24 ) {
+ $status = "past-due";
+ }else{
+ $status = "published";
+ }
+
+ $end = date("m-d-y h:i a", $end);
+
+ }
+
+ if( $task->post_author ) {
+ $userdata = get_userdata( $task->post_author );
+ $authid = $userdata->ID;
+ $author = $userdata->display_name;
+ } else {
+ $authid = '-1';
+ $author = "Unassigned";
+ }
+
+ $x = ($progress == 100) ? "" : "un";
+ $nonce = wp_create_nonce('propel-trash');
+ $completed = ($progress == 100) ? "style='width:0;margin:0;padding:0;'" : "";
+
+ /*
+ * rob_eyouth : added by rob to show task for the current user and if user is admin
+ */
+ //if user is admin
+ //$current_user = wp_get_current_user();
+ //if ( $current_user->ID == $userdata->ID || $current_user->ID == 1) {
+ ?>
+
+
+
+ Delete
+
+ >
+
+ title="">
+
+
+ Complete
+
+
+ post_content);
+ $len <= 0 ? $pad = "style='padding-bottom:10px;'" : $pad ='';
+ ?>
+ >post_title); ?>
+ 75 ) :
+ ?>
+ post_content,0,75).' ...'); ?>
+
+ post_content); ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/metaboxes/task-meta.php b/metaboxes/task-meta.php
index 1d8ebbc..35b7111 100644
--- a/metaboxes/task-meta.php
+++ b/metaboxes/task-meta.php
@@ -1,7 +1,7 @@
'propel_project', 'numberposts' => -1 ) );
- if( count( $projects ) > 0 ) :
+ if( count( $projects ) > 0 ) :
?>
Project
@@ -81,12 +81,15 @@
Manager
- 'propel_post_author',
+ 'show_option_none' => 'Unassigned',
+ 'orderby' => 'display_name',
'selected' => $post->post_author
);
- wp_dropdown_users( $args ); ?>
+ wp_dropdown_users( $args );
+ ?>
diff --git a/metaboxes/tasks.php b/metaboxes/tasks.php
index 300daa5..9d0b686 100644
--- a/metaboxes/tasks.php
+++ b/metaboxes/tasks.php
@@ -1,93 +1,121 @@
+
+
+
Name
- Priority
Owner
+
- Start
+ Start
+
- Due
+ Due
+
Progress
-
-
-
+
+
+
+
+ post_parent);
+ $parent_obj = get_post($parent);
+ esc_html_e($parent_obj->post_title);
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
post_id);
$progress = get_post_meta( $task->ID, '_propel_complete', true );
- $priority = get_post_meta( $task->ID, '_propel_priority', true );
$start = get_post_meta( $task->ID, '_propel_start_date', true );
-
if( $start )
$start = date( get_option( 'date_format' ), $start );
$end = get_post_meta( $task->ID, '_propel_end_date', true );
-
if( $end )
$end = date( get_option( 'date_format' ), $end);
if( $task->post_author ) {
$userdata = get_userdata( $task->post_author );
+ $authid = $userdata->ID;
$author = $userdata->display_name;
} else {
+ $authid = '-1';
$author = "Unassigned";
- }
-
+ }
+
$x = ($progress == 100) ? "" : "un";
$nonce = wp_create_nonce('propel-trash');
+
+
+
+ /*
+ * rob_eyouth : added by rob to show task for the current user and if user is admin
+ */
+ //if user is admin
+ $current_user = wp_get_current_user();
+ if ( $current_user->ID == $userdata->ID || $current_user->ID == 1) {
?>
-
-
- post_title); ?>
+
+
+
+ Delete
-
-
+
+ Edit
-
+
+ Complete
+
+
+ post_title); ?>
+
+
-
+
-
+
%
-
-
- Delete
-
-
- Edit
-
-
- Complete
-
-
+
+
+
+
+
+
+ Enable Email Notifications';
+ echo ' ';
+ echo ' Enable Contributors';
+ echo ' ';
+ echo ' Enable User Restrictions';
+ }
+
+ /**
+ * When user restrictions are enabled, add each task author
+ * to the author taxonomy for each task, and add each project
+ * author to the author taxonomy for each project and each
+ * task associated with the project
+ */
+ public static function user_restrictions_enabled() {
+ global $wpdb;
+ // get_posts cannot be used since the pre_get_posts filter is called
+ $tasks_querystr = "
+ SELECT $wpdb->posts.ID, $wpdb->posts.post_author, $wpdb->posts.post_title
+ FROM $wpdb->posts
+ WHERE $wpdb->posts.post_type = 'propel_task'";
+ $tasks = $wpdb->get_results( $tasks_querystr, OBJECT );
+ foreach( $tasks as $task ) {
+ $user = get_userdata($task->post_author);
+ self::add_coauthors( $task->ID, array( $user->user_login ), true );
+ }
+
+ $projects_querystr = "
+ SELECT $wpdb->posts.ID, $wpdb->posts.post_author, $wpdb->posts.post_title
+ FROM $wpdb->posts
+ WHERE $wpdb->posts.post_type = 'propel_project'";
+ $projects = $wpdb->get_results( $projects_querystr, OBJECT );
+ foreach( $projects as $project ) {
+ $user = get_userdata($project->post_author);
+ self::add_coauthors( $project->ID, array( $user->user_login ), true );
+ $tasks_querystr = "
+ SELECT $wpdb->posts.ID, $wpdb->posts.post_author, $wpdb->posts.post_title
+ FROM $wpdb->posts
+ WHERE $wpdb->posts.post_type = 'propel_task'
+ AND $wpdb->posts.post_parent = '$project->ID'";
+ $tasks = $wpdb->get_results( $tasks_querystr, OBJECT );
+ foreach( $tasks as $task ) {
+ $user = get_userdata($project->post_author);
+ self::add_coauthors( $task->ID, array( $user->user_login ) );
+ $user = get_userdata($task->post_author);
+ self::add_coauthors( $task->ID, array( $user->user_login ) );
+ }
+ }
+ }
+
+ /**
+ * If this plugin is enabled remove the author metabox
+ * from the propel_project and propel_task post type since
+ * the author functionality is replaced by author taxonomy
+ */
+ public static function admin_menu() {
+ remove_meta_box( 'authordiv', 'propel_project', 'normal' );
+ remove_meta_box( 'authordiv', 'propel_task', 'normal' );
+ }
+
+ /**
+ *
+ */
+ public static function post_wp_ajax_add_task( $post_id ) {
+ $post = get_post( $post_id );
+ $user = get_userdata( $post->post_author );
+ $coauthors = array( $user->user_login );
+
+ $project_managers = self::get_coauthors( $post->post_parent );
+ foreach( $project_managers as $project_manager ) {
+ $coauthors[] = $project_manager->user_login;
+ }
+ $coauthors = array_unique( $coauthors );
+
+ self::add_coauthors( $post_id, $coauthors );
+ }
+
+ /**
+ * @param $comment_ID
+ * @todo: do emails get sent for projects?
+ * @todo: I believe they should. If a project's status, title, description or other data is updated the contributors should be notified.
+ */
+ public static function comment_post( $comment_ID ) {
+ if( Propel_Options::get_option('email_notifications') ) {
+
+ $comment = get_comment( $comment_ID );
+ $post = get_post( $comment->comment_post_ID );
+ $parent = get_post( $post->post_parent );
+
+ $domain = preg_replace('/^www\./','',$_SERVER['HTTP_HOST']);
+
+ if( $post->post_type == "propel_task" ) {
+ $headers = "From: $comment->comment_author " . "\r\n";
+ $subject = "New Comment ($parent->post_title): $post->post_title";
+ $message = "\n\n";
+ $message .= "$comment->comment_author said: "$comment->comment_content"
";
+ $message .= "Respond ⇒
";
+ $coauthors = wp_get_post_terms( $post->ID, self::COAUTHOR_TAXONOMY );
+
+ foreach($coauthors as $login) {
+ $user = get_user_by( 'login', $login->slug );
+
+ if ( $comment->comment_author_email != $user->user_email ) {
+ add_filter('wp_mail_content_type',create_function('', 'return "text/html";'));
+ wp_mail($user->user_email, $subject, $message, $headers);
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * @param $columns an array of registered columns
+ * @return $columns an array of registered columns
+ * This function adds the 'Contributors' column on the
+ * edit.php screen for propel_task and propel_project
+ * post types
+ */
+ public static function register_columns( $columns ) {
+ $columns = array_slice($columns, 0, 4, true) +
+ array('contributor' => __( 'Contributors', 'propel' )) +
+ array_slice($columns, 4, count($columns) - 1, true) ;
+ return $columns;
+ }
+
+ /**
+ *
+ */
+ public static function get_coauthors( $post_id = 0, $args = array() ) {
+ global $post, $post_ID, $coauthors_plus, $wpdb;
+
+ $coauthors = array();
+ $post_id = (int)$post_id;
+ if( !$post_id && $post_ID ) $post_id = $post_ID;
+ if( !$post_id && $post ) $post_id = $post->ID;
+
+ $defaults = array( 'orderby' => 'term_order', 'order' => 'ASC' );
+ $args = wp_parse_args( $args, $defaults );
+
+ if($post_id) {
+ $coauthor_terms = wp_get_post_terms( $post_id, self::COAUTHOR_TAXONOMY, $args );
+
+ if(is_array($coauthor_terms) && !empty($coauthor_terms)) {
+ foreach($coauthor_terms as $coauthor) {
+ $post_author = get_user_by( 'login', $coauthor->name );
+ // In case the user has been deleted while plugin was deactivated
+ if(!empty($post_author)) $coauthors[] = $post_author;
+ }
+ } else {
+ if($post) {
+ $post_author = get_userdata($post->post_author);
+ } else {
+ $post_author = get_userdata($wpdb->get_var($wpdb->prepare("SELECT post_author FROM $wpdb->posts WHERE ID = %d", $post_id)));
+ }
+ if(!empty($post_author)) $coauthors[] = $post_author;
+ }
+ }
+ return $coauthors;
+ }
+
+ /**
+ *
+ */
+ public static function manage_columns($column_name, $id) {
+ if( $column_name == 'contributor' ) {
+ $authors = self::get_coauthors( $id );
+ $count = 1;
+ foreach( $authors as $author ) :
+ ?>
+ display_name ?>
+ false,
+ 'update_count_callback' => '_update_post_term_count',
+ 'label' => false,
+ 'query_var' => false,
+ 'rewrite' => false,
+ 'sort' => true,
+ 'show_ui' => false)
+ );
+ }
+
+ /**
+ *
+ */
+ public static function add_meta_boxes() {
+ add_meta_box( 'propel_list_authors', __( 'Contributors' ),
+ array( __CLASS__, 'list_authors'), 'propel_project', 'side' );
+ add_meta_box( 'propel_list_authors', __( 'Contributors' ),
+ array( __CLASS__, 'list_authors'), 'propel_task', 'side' );
+ }
+
+ /**
+ *
+ */
+ public static function list_authors() {
+ require_once( dirname(__FILE__) . '/../metaboxes/list-authors.php');
+ }
+
+ /**
+ *
+ */
+ public static function pre_get_posts( $query ) {
+ global $post_id;
+
+ $pr1 = get_post_meta( $post_id, '_propel_complete',true);
+ $pr2 = get_post_meta( $post_id, '_propel_complete_before',true);
+
+ if ($pr2 == 0){
+ update_post_meta( $post_id, '_propel_complete_before',$pr1);
+ }
+
+ return $query;
+ }
+
+ /**
+ *
+ */
+ public static function wp_insert_post_data( $data, $post ) {
+
+ // bail on autosave
+ if ( defined( 'DOING_AUTOSAVE' ) && !DOING_AUTOSAVE )
+ return $data;
+
+ // bail on revisions
+ if( $data['post_type'] == 'revision' )
+ return $data;
+
+ if( isset( $_REQUEST['coauthors-nonce'] ) && is_array( $_POST['coauthors'] ) ) {
+ $author = $_POST['coauthors'][0];
+ if( $author ) {
+ $data['post_author'] = $post['propel_post_author'];
+ }
+ } else {
+ // if for some reason we don't have the coauthors fields set
+ if( ! isset( $data['post_author'] ) ) {
+ $data['post_author'] = $post['propel_post_author'];
+ }
+ }
+ return $data;
+ }
+
+ /**
+ *
+ */
+ public static function save_post($post_id, $post) {
+ global $typenow;
+
+ // sanity checks
+ if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )
+ return;
+
+ if ( wp_is_post_revision( $post_id ) )
+ return;
+
+ if ( !current_user_can( 'edit_post', $post_id ) )
+ return;
+
+ $post_type = $post->post_type;
+ if( isset( $_POST['coauthors-nonce'] ) ) {
+
+ if( !isset( $_POST['coauthors'] ) ) {
+ $user = wp_get_current_user();
+ $coauthors = array( $user->user_login );
+ } else {
+ $coauthors = (array) $_POST['coauthors'];
+ }
+
+ check_admin_referer( 'coauthors-edit', 'coauthors-nonce' );
+ $coauthors = array_map( 'esc_html', $coauthors );
+
+ // if a contributor is added/removed from a project, add/remove to/from
+ // ALL THE TASKS associated with that project
+ if( 'propel_project' == $typenow ) {
+ $project_managers = self::get_coauthors( $post_id );
+ $p = array();
+ foreach( $project_managers as $pm) {
+ $p[] = $pm->data->user_login;
+ }
+
+ $p = array_diff( $p, $coauthors );
+ $posts = get_posts( array( 'post_type' => 'propel_task', 'post_parent' => $post_id ) );
+
+ foreach( $posts as $post ) {
+ self::add_coauthors( $post->ID, $p );
+ }
+ }
+
+ // add project contributors to new tasks
+ if( 'propel_task' == $typenow ) {
+ $project_managers = self::get_coauthors( $post->post_parent );
+ foreach( $project_managers as $project_manager ) {
+ $coauthors[] = $project_manager->user_login;
+ }
+ $author = get_userdata($post->post_author);
+ $coauthors[] = $author->user_login;
+ $coauthors = array_unique( $coauthors );
+ }
+
+ return self::add_coauthors( $post_id, $coauthors );
+ }
+ }
+
+ /*
+ * Added by : rob - Ajax post to save co-author
+ */
+ public function wp_ajax_add_user_to_project(){
+
+ check_ajax_referer('add-user-to-project','security');
+
+ if ( isset($_POST['coauthors']) && isset($_POST['post_id']) ){
+
+ $coauthors = (array) $_POST['coauthors'];
+ //check_admin_referer( 'coauthors-edit', 'coauthors-nonce' );
+ $coauthors = array_map( 'esc_html', $coauthors );
+
+ $post_id = (int)$_POST['post_id'];
+// $project_managers = self::get_coauthors( $post_id );
+//
+// $p = array();
+// foreach( $project_managers as $pm) {
+// $p[] = $pm->data->user_login;
+// }
+//
+// $p = array_diff( $p );
+// print_r($project_managers);
+
+// $coauthors = array_unique( $coauthors );
+
+ $posts = get_posts( array( 'post_type' => 'propel_task', 'post_parent' => $post_id ) );
+ foreach( $posts as $post ) {
+ //self::add_coauthors( $post->ID, $coauthors );
+ foreach( array_unique( $coauthors ) as $author ) {
+ $name = $author;
+ if( !term_exists( $name, self::COAUTHOR_TAXONOMY ) ) {
+ $args = array( 'slug' => sanitize_title( $name ) );
+ $insert = wp_insert_term( $name, self::COAUTHOR_TAXONOMY, $args );
+ }
+ }
+
+ if( !is_wp_error( $insert ) ) {
+ $set = wp_set_post_terms( $post_id, $coauthors, self::COAUTHOR_TAXONOMY, $append );
+ }
+ }
+
+ }
+
+ die();
+ }
+
+ /**
+ * @param $post_id int
+ * @param $coauthors mixed array or integer
+ * @param $append bool
+ * @param $notify bool
+ */
+ public static function add_coauthors( $post_id, $coauthors, $append = false, $notify = true ) {
+ global $current_user, $post;
+ $notify = array();
+ $post_id = (int) $post_id;
+ $insert = false;
+
+ if ( !is_array( $coauthors ) || 0 == count( $coauthors ) || empty( $coauthors ) ) {
+ $coauthors = array( $current_user->user_login );
+ }
+
+ $terms = wp_get_post_terms( $post_id, self::COAUTHOR_TAXONOMY );
+
+ foreach( array_unique( $coauthors ) as $author ) {
+ $name = $author;
+ if( !term_exists( $name, self::COAUTHOR_TAXONOMY ) ) {
+ $args = array( 'slug' => sanitize_title( $name ) );
+ $insert = wp_insert_term( $name, self::COAUTHOR_TAXONOMY, $args );
+ }
+ $notify[] = $name;
+ }
+
+ if( !is_wp_error( $insert ) ) {
+ $set = wp_set_post_terms( $post_id, $coauthors, self::COAUTHOR_TAXONOMY, $append );
+ }
+
+ $notify = self::select_notifications($post_id, $notify);
+
+ if( $notify ) {
+ self::notify_coauthors( $notify, $post_id );
+ }
+ }
+
+ /**
+ * aps2012 updates
+ *
+ */
+ public static function pre_post_update($post_id) {
+ global $wpdb;
+ $p = get_post($post_id);
+ $u = get_userdata($p->post_author);
+ update_post_meta($post_id,'_propel_before_author', $u->user_login);
+ }
+ /**
+ * aps2012 updates
+ *
+ */
+ public static function transition_post_status($new_status, $old_status=null, $post=null){
+ $static_id = self::set_id();
+ if ($new_status == "draft"){
+ update_post_meta( $static_id, '_propel_before_author_new',"New");
+ }
+ }
+
+ /**
+ * aps2012 updates
+ *
+ */
+ public static function set_id(){
+ $part1 = "999999999999";
+ $current_user = wp_get_current_user();
+ $part2 = $current_user->ID;
+ $id = $part1 . $part2;
+ return (int)($id);
+ }
+
+ /**
+ * aps2012 updates
+ *
+ */
+ public static function select_notifications($post_id, $notified) {
+ global $wpdb;
+
+ $b4_complete = get_post_meta( $post_id, '_propel_complete_before',true);
+ $now_complete = get_post_meta( $post_id, '_propel_complete',true);
+
+ if(!$complete_tag){
+ $complete_tag = get_post_meta( $post_id, '_propel_complete_tag',true);
+ }
+
+ if(!$before_author){
+ $before_author = get_post_meta( $post_id, '_propel_before_author',true);
+ }
+
+ $current_user = wp_get_current_user();
+ $currname = $current_user->display_name;
+
+ if (($b4_complete < 100) && ($now_complete == 100)){
+ update_post_meta( $post_id, '_propel_complete_tag','completed');
+ } elseif(($b4_complete == 100) && ($now_complete == 100)){
+ update_post_meta( $post_id, '_propel_complete_tag','sent');
+ } elseif(($b4_complete == 100) && ($now_complete < 100)){
+ update_post_meta( $post_id, '_propel_complete_tag','reverse');
+ } else {
+ update_post_meta( $post_id, '_propel_complete_tag','null');
+ }
+
+ $p = get_post($post_id);
+ $u = get_userdata($p->post_author);
+
+ if(($before_author != $u->user_login) && ($before_author != 'NULL')){
+ update_post_meta( $post_id, '_propel_notify','proceed');
+ } elseif ($before_author == $u->user_login) {
+ update_post_meta( $post_id, '_propel_notify','sent');
+ } elseif($before_author == 'NULL'){
+ update_post_meta( $post_id, '_propel_notify','new');
+ } else {
+ update_post_meta( $post_id, '_propel_notify','null');
+ }
+
+ $static_id = self::set_id();
+ $new = get_post_meta( $static_id, '_propel_before_author_new',true);
+ if($new == 'New'){
+ update_post_meta( $post_id, '_propel_notify','new');
+ }
+
+ delete_post_meta( $static_id, '_propel_before_author_new');
+ update_post_meta($post_id, '_propel_complete_before', $now_complete);
+ $pos = array_search($currname, $notified);
+ unset($notified[$pos]);
+ return $notified;
+ }
+ /**
+ * When a user is deleted, remove the term information and reassign
+ * if requested.
+ */
+ public static function delete_user( $delete_id ) {
+ global $wpdb;
+
+ $reassign_id = absint( $_POST['reassign_user'] );
+
+ if($reassign_id) {
+ $reassign_user = get_user_by( 'id', $reassign_id );
+ if( $reassign_user ) {
+ $post_ids = $wpdb->get_col( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_author = %d", $delete_id ) );
+
+ if ( $post_ids ) {
+ foreach ( $post_ids as $post_id ) {
+ self::add_coauthors( $post_id, array( $reassign_user->user_login ), true, false );
+ }
+ }
+ }
+ }
+
+ $delete_user = get_user_by( 'id', $delete_id );
+ if( $delete_user ) {
+ wp_delete_term( $delete_user->user_login, self::COAUTHOR_TAXONOMY );
+ }
+ }
+
+ /**
+ * @completed email when assigned to a task
+ * @todo email when unassigned a task
+ * @todo email when task was updated (exclude users from the aforementioned two)
+ * @todo email when the task status is modified (if it's completed say that in the message, if it's pending review, etc...)
+ */
+ public static function notify_coauthors( $to, $post_id ) {
+
+ if( Propel_Options::get_option('email_notifications') ) {
+ $post = get_post( $post_id );
+ $parent = get_post( $post->post_parent );
+ $domain = preg_replace('/^www\./','',$_SERVER['HTTP_HOST']);
+ $current_user = wp_get_current_user();
+
+ $post_owner = get_userdata( $post->post_author );
+ $complete_tag = get_post_meta( $post_id, '_propel_complete_tag',true);
+ $pnotify = get_post_meta( $post_id, '_propel_notify',true);
+ $headers = "From: $current_user->display_name " . "\r\n";
+ $subject = "";
+ $subject = self::set_subject($pnotify, $complete_tag, $parent->post_title, $post->post_title);
+ $message = self::set_message($pnotify, $complete_tag, $current_user->display_name,
+ $post_owner->user_login, $parent->post_title,
+ $post->guid,$post->post_title,$post->post_content);
+
+
+ if($subject != ""){
+ foreach( $to as $login ) {
+ $user = get_user_by( 'login', $login );
+ add_filter('wp_mail_content_type',create_function('', 'return "text/html";'));
+ wp_mail($user->user_email, $subject, $message, $headers);
+ }
+ }
+
+ }
+
+ }
+ public static function set_subject($pnotify, $complete_tag, $parent_title, $post_title){
+ if($pnotify == 'new'){
+ $subject = "New Task Assigned ($parent_title): $post_title";
+ } elseif($pnotify == 'proceed'){
+ $subject = " - Task is Re-Assigned ($parent_title): $post_title";
+ }
+
+ if($complete_tag == 'completed'){
+ $subject .= " - Task Completed ($parent_title): $post_title";
+ } elseif($complete_tag == 'reverse'){
+ $subject .= " - Task is Re-Opened ($parent_title): $post_title";
+ }
+
+ return $subject;
+ }
+ public static function set_message($pnotify, $complete_tag, $dname, $ulogin,
+ $parent_title, $guid, $post_title, $content){
+ if ($pnotify == 'new'){
+ $message = "
+
+
$dname assigned the following to $ulogin on the "$parent_title" project:
+
"$post_title "
+
Details: "$content"
+
+ ";
+ } elseif ($pnotify == 'proceed'){
+ $message = "
+
+
$dname re-assigned the following to $ulogin on the "$post_title" project:
+
"$post_title "
+
Details: "$content"
+
+ ";
+ }
+
+ if($complete_tag == 'completed'){
+ $message .= "
+
+
$dname has updated the project as 100% complete "$parent_title" project:
+
"$post_title "
+
Details: "$content"
+
+ ";
+ } elseif($complete_tag == 'reverse'){
+ $message .= "
+
+
$dname has reopened the project "$parent_title" project:
+
"$post_title "
+
Details: "$content"
+
+ ";
+ }
+
+
+ return $message;
+ }
+
+ /**
+ *
+ */
+ public static function views_edit_post( $views ) {
+ global $wpdb, $avail_post_stati, $typenow;
+ if( $typenow != 'propel_project' && $typenow != 'propel_task' ) return $views;
+
+ $user = wp_get_current_user();
+
+ $query = "SELECT P.post_status, COUNT(*) AS num_posts FROM {$wpdb->terms} AS T
+ LEFT JOIN {$wpdb->term_taxonomy} AS TT ON T.term_id = TT.term_id
+ LEFT JOIN {$wpdb->term_relationships} AS TR ON TT.term_taxonomy_id = TR.term_taxonomy_id
+ LEFT JOIN {$wpdb->posts} AS P ON TR.object_id = P.id
+ WHERE T.name = (SELECT U.user_login FROM {$wpdb->users} AS U WHERE U.ID = {$user->ID})
+ AND TT.taxonomy = 'author'
+ AND P.post_type = '{$typenow}'
+ AND P.post_status <> 'auto-draft'
+ AND P.post_status <> 'inherit'
+ GROUP BY P.post_status";
+
+ /**
+ * @todo cache $count
+ */
+ $count = $wpdb->get_results( $query, ARRAY_A );
+
+ $stats = array();
+ foreach ( get_post_stati() as $state ) {
+ $stats[$state] = 0;
+ }
+
+ foreach ( (array) $count as $row ) {
+ $stats[$row['post_status']] = $row['num_posts'];
+ }
+
+ $num_posts = (object)$stats;
+
+
+ $class = '';
+ $allposts = '';
+
+ $current_user_id = get_current_user_id();
+
+ $total_posts = array_sum( (array) $num_posts );
+
+
+ $class = empty( $class ) && empty( $_REQUEST['post_status'] ) && empty( $_REQUEST['show_sticky'] ) ? ' class="current"' : '';
+ $status_links['all'] = "" . sprintf( _nx( 'All (%s) ', 'All (%s) ', $total_posts, 'posts' ), number_format_i18n( $total_posts ) ) . ' ';
+
+ foreach ( get_post_stati(array('show_in_admin_status_list' => true), 'objects') as $status ) {
+ $class = '';
+
+ $status_name = $status->name;
+
+ if ( !in_array( $status_name, $avail_post_stati ) )
+ continue;
+
+ if ( empty( $num_posts->$status_name ) )
+ continue;
+
+ if ( isset($_REQUEST['post_status']) && $status_name == $_REQUEST['post_status'] )
+ $class = ' class="current"';
+
+ $status_links[$status_name] = "" . sprintf( translate_nooped_plural( $status->label_count, $num_posts->$status_name ), number_format_i18n( $num_posts->$status_name ) ) . ' ';
+ }
+ return $status_links;
+ }
+}
+
?>
\ No newline at end of file
diff --git a/post-types/project.php b/post-types/project.php
index 00e62ff..7df5f00 100644
--- a/post-types/project.php
+++ b/post-types/project.php
@@ -15,13 +15,27 @@ public static function init() {
add_action( 'add_meta_boxes', array( __CLASS__, 'add_meta_boxes' ) );
add_action( 'admin_menu', array( __CLASS__, 'admin_menu' ) );
add_action( 'save_post', array( __CLASS__, 'save_post' ) );
- add_action( 'admin_footer', array( __CLASS__, 'admin_footer' ) );
+ add_action( 'admin_footer', array( __CLASS__, 'admin_footer' ) );
add_filter( 'manage_edit-' . self::POST_TYPE . '_sortable_columns', array( __CLASS__, 'register_sortable_columns' ) );
add_filter( 'manage_edit-' . self::POST_TYPE . '_columns', array( __CLASS__, 'register_columns' ) );
add_filter( 'parse_query', array( __CLASS__, 'parse_query' ) );
+ add_action( 'project_get_task', array( __CLASS__, 'project_get_task' ) );
add_action( 'wp_ajax_add_task', array( __CLASS__, 'wp_ajax_add_task' ) );
+ add_action( 'wp_ajax_get_update', array( __CLASS__, 'wp_ajax_get_update' ) );
+ add_action( 'wp_ajax_check_update', array( __CLASS__, 'wp_ajax_check_update' ) );
+ add_action( 'wp_ajax_update_task', array( __CLASS__, 'wp_ajax_update_task' ) );
+ add_action( 'wp_ajax_get_task_detail', array( __CLASS__, 'wp_ajax_get_task_detail' ) );
+ add_action( 'wp_ajax_restore_task', array( __CLASS__, 'wp_ajax_restore_task' ) ); // aps2012
+ add_action( 'wp_ajax_delete_task', array( __CLASS__, 'wp_ajax_delete_task' ) ); // aps2012
+ add_action( 'wp_ajax_trash_task', array( __CLASS__, 'wp_ajax_trash_task' ) ); // aps2012
+ add_action( 'wp_ajax_delete_task_image', array( __CLASS__, 'wp_ajax_delete_task_image' ) );
+ add_action( 'wp_ajax_single_task_image', array( __CLASS__, 'wp_ajax_single_task_image' ) );
+ add_action( 'wp_ajax_propel_post_comment', array( __CLASS__, 'wp_ajax_propel_post_comment' ) );
+ add_action( 'wp_ajax_propel_get_comment', array( __CLASS__, 'wp_ajax_propel_get_comment' ) );
add_action( 'load-post.php', array( __CLASS__, 'post' ) );
+ add_action( 'admin_head', array( __CLASS__, 'tooltip_css' ) );
add_filter( 'request', array( __CLASS__, 'request' ) );
+
}
/**
@@ -68,9 +82,10 @@ public static function post() {
if( isset($_GET['_wpnonce'], $_GET['action'], $_GET['post'] ) && $_GET['action'] == "propel-delete" ) {
if ( !wp_verify_nonce($_GET['_wpnonce'], 'propel-trash') ) die('Security check');
- wp_delete_post($_GET['post']);
- wp_redirect( $_SERVER['HTTP_REFERER'] );
- die();
+ // aps2012 : deleted because ajax submit is used instead
+ //wp_delete_post($_GET['post']);
+ //wp_redirect( $_SERVER['HTTP_REFERER'] );
+ //die();
}
}
@@ -127,12 +142,18 @@ public static function register_post_type() {
));
unset($labels);
+ if (isset($_REQUEST['post'])){
+ $pst = get_post($_REQUEST['post']);
+ $title = "Edit ".$pst->post_title;
+ }else{
+ $title = "Edit Project";
+ }
$labels = array(
'name' => _x( 'Propel', 'post type general name' ),
'singular_name' => _x( 'Propel', 'post type singular name' ),
'add_new' => _x( 'Add New', 'project' ),
'add_new_item' => __( 'Add New Project' ),
- 'edit_item' => __( 'Edit Project' ),
+ 'edit_item' => __( $title ),
'new_item' => __( 'New Project' ),
'all_items' => __( 'All Projects' ),
'view_item' => __( 'View Project' ),
@@ -180,6 +201,7 @@ public static function action_complete( $post_id ) {
update_post_meta( $post_id, '_propel_complete', 100 );
$tasks = get_children( "post_parent=$post_id" );
+
foreach( $tasks as $task ) {
$end = get_post_meta( $task->ID, '_propel_end_date', true);
if( !$end && empty( $_POST['end_date'] ) ) {
@@ -327,10 +349,11 @@ public static function add_meta_boxes() {
add_meta_box( 'propel_project_meta', __('Project', 'propel' ),
array( __CLASS__, 'edit_project_meta'), 'propel_project', 'side' );
- if( isset($_GET['action']) && $_GET['action'] == "edit" ) {
+ if( isset($_GET['action']) && $_GET['action'] == "edit" ) {
+ add_meta_box('propel_add_task', __('Add Task', 'propel'), array( __CLASS__, 'add_task' ), 'propel_project', 'normal', 'high', 10, 2);
add_meta_box('propel_project_tasks', __('Project Tasks', 'propel'), array( __CLASS__, 'project_tasks'), 'propel_project', 'normal', 'high', 10, 2 );
add_meta_box('propel_completed_tasks', __('Completed Tasks', 'propel'), array( __CLASS__, 'completed_tasks'), 'propel_project', 'normal', 'high', 10, 2 );
- add_meta_box('propel_add_task', __('Add Task', 'propel'), array( __CLASS__, 'add_task' ), 'propel_project', 'side');
+ add_meta_box('propel_deleted_tasks', __('Deleted Tasks', 'propel'), array( __CLASS__, 'deleted_tasks'), 'propel_project', 'normal', 'high', 10, 2 ); // aps2012 deleted meta box
}
}
@@ -350,7 +373,7 @@ public static function completed_tasks( $post, $id ) {
ORDER BY `meta_value` DESC, `post_id` DESC;";
$posts = $wpdb->get_results($query);
- require( dirname(__FILE__) . '/../metaboxes/tasks.php');
+ require( dirname(__FILE__) . '/../metaboxes/project-tasks.php');
}
/**
@@ -368,10 +391,23 @@ public static function project_tasks( $post, $id ) {
WHERE `post_parent`={$parent} AND `post_status` = 'publish')
ORDER BY `meta_value` DESC, `post_id` DESC;";
- $posts = $wpdb->get_results($query);
- require( dirname(__FILE__) . '/../metaboxes/tasks.php' );
+ $posts = $wpdb->get_results($query);
+ require( dirname(__FILE__) . '/../metaboxes/project-tasks.php' );
}
+/**
+* aps2012 : select deleted task under a parent ID
+*/
+ public static function deleted_tasks( $post, $id ) {
+ global $wpdb;
+ $parent = get_the_ID();
+ //@todo: profile query / use WP_Query
+ $query = "SELECT * FROM {$wpdb->posts}
+ WHERE `post_parent`={$parent} AND `post_status` = 'trash'
+ ORDER BY `ID` DESC;";
+ $posts = $wpdb->get_results($query);
+ require( dirname(__FILE__) . '/../metaboxes/project-deleted.php');
+ }
/**
* @since 2.0
*/
@@ -407,8 +443,8 @@ public static function edit_project_meta() {
* @since 2.0
*/
public static function save_post($post_id) {
- if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )
- return;
+ //if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )
+ // return;
if ( !isset( $_POST['propel_nonce'] ) )
return;
@@ -454,23 +490,43 @@ public static function add_task() {
public static function wp_ajax_add_task() {
check_ajax_referer( 'add-task', 'security' );
+
+ $curr_user = get_current_user();
+
$post = array(
'post_title' => $_POST['title'],
'post_content' => $_POST['description'],
'post_parent' => $_POST['parent'],
- 'post_author' => $_POST['user'],
+ 'post_author' => $curr_user->ID,
'post_type' => 'propel_task',
'post_status' => 'publish'
- );
-
- $id = wp_insert_post( $post );
+ );
+
+ $id = wp_insert_post( stripslashes_deep($post) );
if( !$id ) die(0);
-
+ $cnt = 0;
+ foreach($_POST['user'] as $user){
+ update_post_meta( $id, '_propel_user_'.$cnt, $user );
+ $cnt++;
+ }
+ $cntn = 0;
+ if (is_array($_POST['taskimage']) || is_object($_POST['taskimage'])){
+ foreach($_POST['taskimage'] as $timg){
+ update_post_meta( $id, '_propel_task_image_'.$cntn, $timg );
+ $cntn++;
+ }
+ }
+ update_post_meta( $id, '_propel_task_image', $cntn );
+ update_post_meta( $id, '_propel_user', $cnt );
update_post_meta( $id, '_propel_start_date', time() );
update_post_meta( $id, '_propel_end_date', strtotime( $_POST['end_date'] ) );
update_post_meta( $id, '_propel_complete', 0 );
- update_post_meta( $id, '_propel_priority', $_POST['priority'] );
+ update_post_meta( $id, '_propel_priority', $_POST['priority'] );
+
do_action( 'post_wp_ajax_add_task', $id );
+ self::auto_notify($id,'new-assign');
+ do_action( 'project_get_task', $id);
+
die($id);
}
@@ -478,29 +534,3008 @@ public static function wp_ajax_add_task() {
* @since 2.0
*/
public static function admin_footer() { ?>
+
+
+ var data = {
+ action : 'add_task',
+ security : '',
+ parent : '',
+ title : jQuery('input[name=task_title]').val(),
+ description : jQuery('textarea[name=task_description]').val(),
+ end_date : jQuery('input[name=task_end_date]').val(),
+ priority : jQuery('select[name=task_priority]').val(),
+ user : _arrdata,
+ taskimage : _arrimage
+ };
+ //jQuery('#propel_post_author').val()
+
+ var task_id = "";
+ var task_authid = jQuery('#propel_post_author').val();
+ var task_author = jQuery('#propel_post_author option:selected').text();
+ var task_title = jQuery('input[name=task_title]').val();
+ var task_content = jQuery('textarea[name=task_description]').val();
+ var today = "";
+ var task_end = jQuery('input[name=task_end_date]').val();
+
+ var _img = "";
+ var is_start = "";
+ var is_end = "";
+
+ var _html = "";
+ var len = task_content.length;
+ if (len > 75 ) {
+ var _content = task_content.substr(0,75)+' ...';
+ _html = ''+ _content +'
';
+ }else{
+ var _content = task_content.substr(0,75);
+ _html = ''+ _content +'
';
+ }
+
+ _html_media = ' ';
+ _html_media += '';
+
+ _html_cmt = '';
+ _html_cmt += '
';
+
+
+ if ( is_start == 1 && is_end != 1 ){
+ //aps2012
+ var _json = Array(
+ 'Delete ',
+ '
',
+ 'Complete ',
+ _html_media,
+ _html_cmt,
+ ''+ task_title +'
',
+ ''+ _html_author +'
',
+ ''+ today +'
',
+ '
'
+ );
+ jQuery('#propel_project_tasks tbody #no-data').css('border','none').hide();
+ var a = jQuery('#propel-tasks').dataTable().fnAddData( _json );
+ var nTr = oTable.fnSettings().aoData[ a[0] ].nTr;
+ jQuery(nTr).attr('id',task_id);
+ jQuery(nTr).find('td:eq(0)').addClass('gen-icon gen-delete-icon');
+ jQuery(nTr).find('td:eq(1)').addClass('gen-icon gen-published-icon db-updated');
+ jQuery(nTr).find('td:eq(2)').addClass('gen-icon gen-unchecked-icon');
+ jQuery(nTr).find('td:eq(5)').addClass('title').attr('data-value', task_title).css({"width":"400px"}).find('p').after(_html);
+ //jQuery(nTr).find('td:eq(5)').prepend('
').css({ 'padding-left' : '20px' });
+ jQuery(nTr).find('td:eq(6)').addClass('owner').attr('data-value', task_author);
+ jQuery(nTr).find('td:eq(7)').attr('data-value', today );
+ jQuery(nTr).find('td:eq(8)').attr('data-value', 0 );
+ jQuery(nTr).animate({'backgroundColor':'#0F3'},'slow',function(){
+ jQuery(nTr).animate({'backgroundColor':'transparent'},7000);
+ });
+ }else if ( is_start != 1 && is_end == 1 ){
+ //aps2012
+ var _json = Array(
+ 'Delete ',
+ '
',
+ 'Complete ',
+ _html_media,
+ _html_cmt,
+ ''+ task_title +'
',
+ ''+ _html_author +'
',
+ ''+ task_end +'
',
+ '
'
+ );
+ jQuery('#propel_project_tasks tbody #no-data').css('border','none').hide();
+ var a = jQuery('#propel-tasks').dataTable().fnAddData( _json );
+ var nTr = oTable.fnSettings().aoData[ a[0] ].nTr;
+ jQuery(nTr).attr('id',task_id);
+ jQuery(nTr).find('td:eq(0)').addClass('gen-icon gen-delete-icon');
+ jQuery(nTr).find('td:eq(1)').addClass('gen-icon gen-published-icon db-updated');
+ jQuery(nTr).find('td:eq(2)').addClass('gen-icon gen-unchecked-icon');
+ jQuery(nTr).find('td:eq(5)').addClass('title').attr('data-value', task_title).css({"width":"400px"}).find('p').after(_html);
+ //jQuery(nTr).find('td:eq(5)').prepend('
').css({ 'padding-left' : '20px' });
+ jQuery(nTr).find('td:eq(6)').addClass('owner').attr('data-value', task_author);
+ jQuery(nTr).find('td:eq(7)').attr('data-value', task_end);
+ jQuery(nTr).find('td:eq(8)').attr('data-value', 0 );
+ jQuery(nTr).animate({'backgroundColor':'#0F3'},'slow',function(){
+ jQuery(nTr).animate({'backgroundColor':'transparent'},7000);
+ });
+ }else if( is_start == 1 && is_end == 1 ){
+ //aps2012
+ var _json = Array(
+ 'Delete ',
+ '
',
+ 'Complete ',
+ _html_media,
+ _html_cmt,
+ ''+ task_title +'
',
+ ''+ _html_author +'
',
+ ''+ today +'
',
+ ''+ task_end +'
',
+ '
'
+ );
+ jQuery('#propel_project_tasks tbody #no-data').css('border','none').hide();
+ var a = jQuery('#propel-tasks').dataTable().fnAddData( _json );
+ var nTr = oTable.fnSettings().aoData[ a[0] ].nTr;
+ jQuery(nTr).attr('id',task_id);
+ jQuery(nTr).find('td:eq(0)').addClass('gen-icon gen-delete-icon');
+ jQuery(nTr).find('td:eq(1)').addClass('gen-icon gen-published-icon db-updated');
+ jQuery(nTr).find('td:eq(2)').addClass('gen-icon gen-unchecked-icon');
+ jQuery(nTr).find('td:eq(5)').addClass('title').attr('data-value', task_title).css({"width":"400px"}).find('p').after(_html);
+ //jQuery(nTr).find('td:eq(5)').prepend('
').css({ 'padding-left' : '20px' });
+ jQuery(nTr).find('td:eq(6)').addClass('owner').attr('data-value', task_author);
+ jQuery(nTr).find('td:eq(7)').attr('data-value', today );
+ jQuery(nTr).find('td:eq(8)').attr('data-value', task_end);
+ jQuery(nTr).find('td:eq(9)').attr('data-value', 0 );
+ jQuery(nTr).animate({'backgroundColor':'#0F3'},'slow',function(){
+ jQuery(nTr).animate({'backgroundColor':'transparent'},7000);
+ });
+ }else {
+ //aps2012
+ var _json = Array(
+ 'Delete ',
+ '
',
+ 'Complete ',
+ _html_media,
+ _html_cmt,
+ ''+ task_title +'
',
+ ''+ _html_author +'
',
+ '
'
+ );
+ jQuery('#propel_project_tasks tbody #no-data').css('border','none').hide();
+ var a = jQuery('#propel-tasks').dataTable().fnAddData( _json );
+ var nTr = oTable.fnSettings().aoData[ a[0] ].nTr;
+ jQuery(nTr).attr('id',task_id);
+ jQuery(nTr).find('td:eq(0)').addClass('gen-icon gen-delete-icon');
+ jQuery(nTr).find('td:eq(1)').addClass('gen-icon gen-published-icon db-updated');
+ jQuery(nTr).find('td:eq(2)').addClass('gen-icon gen-unchecked-icon');
+ jQuery(nTr).find('td:eq(5)').addClass('title').attr('data-value', task_title).css({"width":"400px"}).find('p').after(_html);
+ //jQuery(nTr).find('td:eq(5)').prepend('
').css({ 'padding-left' : '20px' });
+ jQuery(nTr).find('td:eq(6)').addClass('owner').attr('data-value', task_author);
+ jQuery(nTr).find('td:eq(7)').attr('data-value', 0 );
+ jQuery(nTr).animate({'backgroundColor':'#0F3'},'slow',function(){
+ jQuery(nTr).animate({'backgroundColor':'transparent'},7000);
+ });
+
+ }
+
+
+ jQuery.post(ajaxurl, data, function(response) {
+ //rob_eyouth:added this...
+
+ var _obj = jQuery.parseJSON(response);
+ var nonce = "";
+ jQuery('.saving').fadeOut('slow',function(){
+ jQuery(this).remove();
+ jQuery(nTr).attr('id',_obj.task_id);
+ //aps2012 change
+ jQuery(nTr).find('td:eq(0)').find('a').attr('href','javascript:;');
+ jQuery(nTr).find('td:eq(0)').find('a').attr('alt', _obj.task_id);
+ jQuery(nTr).find('td:eq(2)').find('a').attr('href','post.php?action=complete&post='+ _obj.task_id);
+ //jQuery(nTr).find('td:eq(5)').animate({ 'padding-left' : 0 },'slow');
+ jQuery(nTr).find('td:eq(5)').find('p').attr('id','edit_title_'+_obj.task_id);
+ if ( is_start == 1 && is_end != 1 ){
+ jQuery(nTr).find('td:eq(6)').find('p').attr('id','edit_contr_'+_obj.task_id);
+ jQuery(nTr).find('td:eq(7)').find('p').attr('id','edit_sdate_'+_obj.task_id).html(_obj.task_start);
+ jQuery(nTr).find('td:eq(8)').find('p').attr('id','edit_progr_'+_obj.task_id);
+ }else if( is_start != 1 && is_end == 1 ){
+ jQuery(nTr).find('td:eq(6)').find('p').attr('id','edit_contr_'+_obj.task_id);
+ jQuery(nTr).find('td:eq(7)').find('p').attr('id','edit_edate_'+_obj.task_id).html(_obj.task_end);
+ jQuery(nTr).find('td:eq(8)').find('p').attr('id','edit_progr_'+_obj.task_id);
+ }else if( is_start == 1 && is_end == 1 ){
+ jQuery(nTr).find('td:eq(6)').find('p').attr('id','edit_contr_'+_obj.task_id);
+ jQuery(nTr).find('td:eq(7)').find('p').attr('id','edit_sdate_'+_obj.task_id).html(_obj.task_start);
+ jQuery(nTr).find('td:eq(8)').find('p').attr('id','edit_edate_'+_obj.task_id).html(_obj.task_end);
+ jQuery(nTr).find('td:eq(9)').find('p').attr('id','edit_progr_'+_obj.task_id);
+ }else{
+ jQuery(nTr).find('td:eq(6)').find('p').attr('id','edit_contr_'+_obj.task_id);
+ jQuery(nTr).find('td:eq(7)').find('p').attr('id','edit_progr_'+_obj.task_id);
+ }
+
+ jQuery('#edit_edate_'+ task_id).html(_obj.task_end);
+ jQuery('.propel_task_comment').fadeIn('slow','swing');
+ jQuery(nTr).find('td:eq(3)').find('div.image_propel_container').attr('id','propel_media_'+_obj.task_id);
+ if ( _obj.attachment.length > 0 ){
+ jQuery.each(_obj.attachment, function(i,el){
+ jQuery(nTr).find('td:eq(3)').find('ul').append("
"+el.split(/(\\|\/)/g).pop()+" ");
+
+ });
+ }else{
+ jQuery(nTr).find('td:eq(3)').find('img').attr('src','/propel/images/attachment.png');
+ }
+
+ });
+
+ jQuery('#_task_title').val('');
+ jQuery('#_task_desc').val('');
+ jQuery('#propel_ul_img_attach').empty();
+
+ jQuery('#selected_task_contributor').find('li').remove();
+ jQuery('#task_contributor_list li').each(function(){
+ if (jQuery(this).hasClass('propel_is_added')){
+ jQuery(this).removeClass().addClass('propel_not_added');
+ jQuery(this).find('div').removeClass().addClass('add_contributor');
+ }
+ });
+
+ jQuery('.propel_task_comment').click(function(e){
+ var _cnt = jQuery(this).find('p').text();
+ var _id = jQuery(this).parent().closest('tr').attr('id');
+ jQuery(this).propelcomment({
+ id : _id,
+ list : _cnt
+ });
+ });
+
+ });
+
+ //check_Existence();
+
+ jQuery('.propeltooltip').each(function(){
+ var _content = jQuery(this).attr('title');
+ var _id = jQuery(this).attr('id');
+ jQuery(this).propeltooltip({
+ id : _id,
+ content : _content
+ });
+ });
+
+ }
+
+ jQuery.fn.propeltooltip = function(settings){
+
+ var xOffset = 30;
+ var yOffset = 20;
+ var _title="";
+ var task_id;
+ var _divtooltip;
+
+ var opts = jQuery.extend({ id : '', content : '' },settings);
+
+ //return this.each(function() {
+
+ var $this = jQuery(this);
+
+ $this.live('mouseenter',function(e){
+
+ _title = opts.content;
+
+ $this.attr('title',"");
+
+ jQuery("body").append(' '+ _title +'
');
+
+ e.pageX > 750 ? e.pageX = 600 : e.pageX;
+
+ jQuery("#tooltips")
+ .css("top",(e.pageY - xOffset) + "px")
+ .css("left",(e.pageX + yOffset + 10) + "px")
+ .fadeIn("slow");
+
+ });
+
+ $this.live('mouseleave',function(){
+ $this.attr('title',_title);
+ jQuery("#tooltips").fadeOut('fast','swing');
+ jQuery("#tooltips").remove();
+ });
+
+ $this.live('mousemove',function(e){
+ jQuery("#tooltips")
+ .css("top",(e.pageY - 30) + "px")
+ .css("left",(e.pageX + (yOffset)) + "px");
+
+ }).live('click',function(){
+
+ _divtooltip = $this.attr('id');
+ task_id = jQuery.trim(_divtooltip.substr(5,10));
+
+ jQuery("#tooltips").fadeOut('slow',function(){
+ jQuery("#tooltips").remove();
+ jQuery("#"+_divtooltip).find('small').hide('fast','linear',function(){
+ jQuery("#"+_divtooltip).removeClass('propeltooltip').append('');
+
+ jQuery('#desc_edit_'+task_id).focus();
+
+ jQuery('#desc_edit_'+task_id).live('focusout',function(e) {
+ jQuery('#desc_edit_'+task_id).fadeOut('fast',function(){
+ jQuery('#desc_edit_'+task_id).remove();
+ });
+ jQuery("#"+_divtooltip).addClass('propeltooltip').find('small').css("display","block").fadeIn('slow','swing');
+
+ })
+
+ jQuery('#desc_edit_'+task_id).live('focusin',function(e) {
+ jQuery("#tooltips").fadeOut('slow','swing');
+ });
+
+ jQuery('#desc_edit_'+task_id).live('keyup',function(event){
+ if ( event.which === 13 ){
+ var data = {
+ action: 'update_task',
+ security: '',
+ parent: '',
+ postid: task_id,
+ content: jQuery('#desc_edit_'+task_id).val(),
+ };
+ jQuery(this).fadeOut('slow','swing',function(){
+ jQuery('#desc_'+task_id).find('small').text('Updating, please wait...');
+ });
+ jQuery.post(ajaxurl, data, function(response) {
+ var _obj = jQuery.parseJSON(response);
+ jQuery('tr#'+task_id).fadeIn('slow',function(){
+ var aPos = oTable.fnGetPosition( this );
+ var _html ="";
+ var len = _obj.task_content.length;
+ if (len > 75 ) {
+ var _content = _obj.task_content.substr(0,75)+' ...';
+ _html = ''+ _content +'
';
+ }else{
+ var _content = _obj.task_content.substr(0,75);
+ _html = ''+ _content +'
';
+ }
+ oTable.fnUpdate( ''+ _obj.task_title +'
'+_html, aPos, 5 );
+ jQuery('.propeltooltip').each(function(){
+ var _content = jQuery(this).attr('title');
+ var _id = jQuery(this).attr('id');
+ jQuery(this).propeltooltip({
+ id : _id,
+ content : _content
+ });
+ });
+ });
+
+ });
+
+ jQuery("#"+_divtooltip).addClass('propeltooltip').find('small').css("display","block").fadeIn('slow');
+
+ }//end of event == 13
+
+ });//end of desc_edit
+
+ });
+ });
+ });
+
+ //});//end of each
+
+ };
+
+ jQuery.fn.propelcomment = function(settings){
+
+ var xOffset = 30;
+ var yOffset = 20;
+
+ var opts = jQuery.extend({ id:'', list:'' },settings);
+ var $this = jQuery(this);
+
+ if ( opts.list !== '0' ) {
+
+ var data = {
+ action : 'propel_get_comment',
+ security : '',
+ comment_post_ID : opts.id
+ }
+
+ jQuery.post(ajaxurl, data, function(res){
+
+ var _obj = jQuery.parseJSON(res);
+ var html;
+
+ var style = "position: absolute; top: 879px; left: 312px; width: 300px; height:auto; min-height: 100px; background: white; border: 1px solid #DFDFDF;border-radius:3px 3px 0 0; -moz-border-radius:3px 3px 0 0; -webkit-border-radius:3px 3px 0 0;";
+
+ html = '';
+
+ jQuery('body').append(html);
+
+ $this.offset().left > 750 ? $this.offset().left = 600 : $this.offset().left;
+
+ jQuery(".comment_propel_container")
+ .css("top",($this.offset().top - 50) + "px")
+ .css("left",($this.offset().left + 33) + "px")
+ .fadeIn("slow","swing");
+
+ });//end of post get_comment
+
+ }else{
+
+ var html;
+ var style = "position: absolute; top: 879px; left: 312px; width: 300px; height:auto; min-height: 100px; background: white; border: 1px solid #DFDFDF;border-radius:3px 3px 0 0; -moz-border-radius:3px 3px 0 0; -webkit-border-radius:3px 3px 0 0;";
+
+ html = '';
+
+ jQuery('body').append(html);
+
+ $this.offset().left > 750 ? $this.offset().left = 600 : $this.offset().left;
+
+ jQuery(".comment_propel_container")
+ .css("top",($this.offset().top - 50) + "px")
+ .css("left",($this.offset().left + 33) + "px")
+ .fadeIn("slow","swing");
+
+ }
+
+ jQuery('#propel_add_row').live('click',function(){
+ jQuery('#propel_li_comment_entry').fadeIn('slow','swing');
+ jQuery('#propel_post_comment').fadeIn('slow', 'swing');
+ });
+
+ jQuery('.comment_propel_x').live('click', function(){
+ jQuery(".comment_propel_container").fadeOut('fast','swing', function(){
+ jQuery(this).remove();
+ });
+ });
+
+ jQuery('#propel_li_comment_entry').live('focusout',function(){
+ jQuery(this).fadeOut('fast', 'swing');
+ jQuery('#propel_post_comment').fadeOut('fast', 'swing');
+ });
+
+ jQuery('#propel_post_comment').live('click', function(){
+ var _comment = jQuery('#propel_li_comment_entry').find('textarea').val();
+ if ( _comment !== '' ){
+ var data = {
+ action : 'propel_post_comment',
+ security : '',
+ comment_post_ID : opts.id,
+ comment_content: _comment,
+ }
+ jQuery.post(ajaxurl, data, function(response){
+ var _obj = jQuery.parseJSON(response);
+ var _html;
+ _html = '';
+
+ jQuery(_html).insertBefore(jQuery('#propel_li_comment_entry')).fadeIn('slow','swing');
+ });
+ }else{
+ alert('Must enter comment to post.');
+ }
+
+ });
+
+// $this.live('mouseleave',function(){
+// jQuery(".comment_propel_container").fadeOut('fast','swing');
+// jQuery(".comment_propel_container").remove();
+// });
+
+// $this.live('mousemove',function(e){
+// jQuery(".comment_propel_container")
+// .css("top",(e.pageY - 30) + "px")
+// .css("left",(e.pageX + (yOffset)) + "px");
+//
+// })
+
+ }
+
+
+
+
+ ID, '_propel_complete', true );
+ $priority = get_post_meta( $task->ID, '_propel_priority', true );
+ $start = get_post_meta( $task->ID, '_propel_start_date', true );
+ $post_created = $task->post_date;
+ $post_modified = $task->post_modified;
+ //if( $start )
+ //$start = date( get_option( 'date_format' ), $start );
+
+ $end = get_post_meta( $task->ID, '_propel_end_date', true );
+
+ if( $end ){
+ $day = date('d'); // Day of the countdown
+ $month = date('m'); // Month of the countdown
+ $year = date('Y'); // Year of the countdown
+ $hour = date('H'); // Hour of the day (east coast time)
+
+ $calculation = ( $end - time() ) / 3600;
+ $hours = (int)$calculation + 24;
+ $days = (int)( $hours / 24 ) - 1;
+
+ $hours_remaining = $hours-($days*24)-24;
+
+ if ( $hours < 0 && $hours > -24 ) {
+ $data->task_status = "due";
+ self::auto_notify($post_id,'task-due');
+ }else if ( $hours < -24 ) {
+ $data->task_status = "past-due";
+ }else{
+ $data->task_status = "published";
+ }
+ }
+
+ if( $task->post_author ) {
+ $userdata = get_userdata( $task->post_author );
+ $authid = $userdata->ID;
+ $author = $userdata->display_name;
+ } else {
+ $authid = '-1';
+ $author = "Unassigned";
+ }
+
+ $x = ($progress == 100) ? "" : "un";
+ $nonce = wp_create_nonce('propel-trash');
+ if ($post_created !== $post_modified):
+ $data->is_updated = 0;
+ else:
+ $data->is_updated = 1;
+ endif;
+ $data->task_id= $task->ID;
+ $data->task_title = $task->post_title;
+ $data->task_author = $author;
+ $data->task_nonce = $nonce;
+ $data->task_progress = $progress;
+ $data->task_authid = $authid;
+ $data->task_author = $author;
+ $data->task_content = $task->post_content;
+
+ if( Propel_Options::option('show_start_date' ) ) :
+ $data->is_start = 1;
+ $data->task_start = date("m-d-y h:i a", (int)$start);
+ else:
+ $data->is_start = 0;
+ $data->task_start = 0;
+ endif;
+
+ if( Propel_Options::option('show_end_date' ) ) :
+ $data->is_end = 1;
+ $data->task_end = date("m-d-y h:i a", (int)$end);
+ else:
+ $data->is_end = 0;
+ $data->task_end = 0;
+ endif;
+
+ $cnt = get_post_meta( $task->ID, '_propel_task_image', true );
+ $images = array();
+ for ($i=0; $i < $cnt; $i++){
+ $imgid = get_post_meta( $task->ID, '_propel_task_image_'.$i, true );
+ $images[$i] = wp_get_attachment_url($imgid);
+ }
+ $data->attachment = $images;
+ echo json_encode($data);
+
+ remove_action( 'project_get_task', array( __CLASS__, 'project_get_task' ) );
+
+ die();
+ }
+ /**
+ * aps2012
+ */
+ public static function wp_ajax_restore_task() {
+
+ $postval = array();
+ $postval['ID'] = $_POST['postid'];
+ $postval['post_status'] = 'publish';
+ wp_update_post((int)$postval);
+ do_action( 'project_get_task', $_POST['postid']);
+
+ }
+ /**
+ * aps2012
+ */
+ public static function wp_ajax_trash_task() {
+
+ if ( isset( $_POST['postid'] ) ){
+ $post_id = $_POST['postid'];
+ }
+ $postval = array();
+ $postval['ID'] = (int)$_POST['postid'];
+ $postval['post_status'] = 'trash';
+
+ wp_update_post($postval);
+ self::auto_notify($post_id,'trash');
+ do_action( 'project_get_task', $_POST['postid']);
+
}
-}
+ /**
+ * aps2012 physical delete
+ */
+ public static function wp_ajax_delete_task() {
+
+ wp_delete_post((int)$_POST['postid']);
+
+ if ( isset( $_POST['taskimgid'] ) ){
+ wp_delete_post((int)$_POST['taskimgid']);
+ }
+ }
+
+
+ /**
+ * @since 2.0
+ * added by rob :
+ */
+ public static function wp_ajax_delete_task_image() {
+
+ check_ajax_referer( 'delete-task-image', 'security' );
+
+ if ( isset( $_POST['taskimgid'] ) && isset( $_POST['taskid'] ) ){
+ $cnt = get_post_meta($_POST['taskid'],'_propel_task_image',true);
+
+ $cnt = (int)$cnt - 1;
+ delete_post_meta($_POST['taskid'],$_POST['taskmeta']);
+ for($i=0; $i < $cnt; $i++){
+ update_post_meta($_POST['taskid'],'_propel_task_image_'.$i,(int)$cnt);
+ }
+ update_post_meta($_POST['taskid'],'_propel_task_image',(int)$cnt);
+ wp_delete_post((int)$_POST['taskimgid']);
+ }else if( isset( $_POST['taskimgid'] ) ){
+ wp_delete_post((int)$_POST['taskimgid']);
+ }
+ die();
+ }
+
+ public static function wp_ajax_update_task() {
+
+ check_ajax_referer( 'update-task', 'security' );
+
+ $post_id = $_POST['postid'];
+
+ if ( isset($_POST['pID']) ){
+ $pid = $_POST['pID'];
+ do_action('project_get_task',$pid);
+ die($pid);
+ }
+
+ if ( isset($_POST["title"]) && isset($_POST["content"]) ){
+ $post = array(
+ 'ID' => (int)$post_id,
+ 'post_title' => $_POST['title'],
+ 'post_content' => $_POST['content'],
+ 'post_parent' => $_POST['parent'],
+ );
+
+ wp_update_post( stripslashes_deep($post) );
+
+ self::auto_notify($post_id,'task-update');
+
+ }else if ( isset($_POST["title"]) && !isset($_POST["content"]) ) {
+ $post = array(
+ 'ID' => (int)$post_id,
+ 'post_title' => $_POST['title'],
+ 'post_parent' => $_POST['parent'],
+ );
+
+ wp_update_post( stripslashes_deep($post) );
+ self::auto_notify($post_id,'task-update');
+
+ }else if ( !isset($_POST["title"]) && isset($_POST["content"]) ) {
+ $post = array(
+ 'ID' => (int)$post_id,
+ 'post_content' => $_POST['content'],
+ 'post_parent' => $_POST['parent'],
+ );
+
+ wp_update_post( stripslashes_deep($post) );
+ self::auto_notify($post_id,'task-update');
+
+ }
+
+ if( isset( $_POST['user'] ) ){
+ $post = array(
+ 'ID' => (int)$post_id,
+ 'post_author' => (int)$_POST['user']
+ );
+ wp_update_post( $post );
+ $usercnt = get_post_meta((int)$post_id,'_propel_user',true);
+ $olduser = get_userdata((int)$_POST['olduser']);
+ for ($i =0; $i < $usercnt; $i++){
+ $user = get_post_meta((int)$post_id,'_propel_user_'.$i,true);
+ if ( $olduser->user_login == $user ){
+ $newuser = get_userdata((int)$_POST['user']);
+ update_post_meta( (int)$post_id, '_propel_user_'.$i, $newuser->user_login );
+ }
+ }
+ //aps
+ if((int)$_POST['user'] = -1){
+ self::auto_notify($post_id,'unassign');
+ } else {
+ self::auto_notify($post_id,'assign');
+ }
+ }
+
+ if ( isset($_POST['start_date']) ){
+ $start = !empty( $_POST['start_date'] ) ? strtotime( $_POST['start_date'] ) : time();
+ update_post_meta( (int)$post_id, '_propel_start_date', $start );
+ }
+
+ if ( isset($_POST['end_date']) ){
+ $end = strtotime($_POST['end_date']);
+ if( empty( $_POST['end_date'] ) && $_POST['complete'] == 100 ) {
+ $end = time();
+ }
+
+ update_post_meta( (int)$post_id, '_propel_end_date', $end );
+ self::auto_notify( (int)$post_id,'task-due');
+ }
+
+ if ( isset( $_POST['priority'] ) ){
+ update_post_meta( (int)$post_id, '_propel_priority', (int)$_POST['priority'] );
+ }
+
+ if ( isset( $_POST['complete'] ) ){
+ update_post_meta( (int)$post_id, '_propel_complete', (int)$_POST['complete'] );
+ // aps
+ if ( isset( $_POST['complete'] ) && (int)$_POST['complete'] == 100 ){
+ self::auto_notify( (int)$post_id,'complete');
+ }
+ }
+
+ do_action('project_get_task', (int)$post_id);
+
+ die($post_id);
+ }
+
+ /**
+ * aps
+ * notify users when complete
+ */
+ public static function auto_notify($post_id, $type ) {
+ global $post, $wpdb;
+ if( Propel_Options::get_option('email_notifications') ) {
+ $post = get_post( $post_id );
+ $parent = get_post( $post->post_parent );
+ $domain = preg_replace('/^www\./','',$_SERVER['HTTP_HOST']);
+ $current_user = wp_get_current_user();
+ $post_owner = get_userdata( $post->post_author );
+ $end = get_post_meta( $post_id, '_propel_end_date', true );
+ //$headers = "From: $current_user->display_name " . "\r\n";
+ if($type == 'complete'){
+ $subject = "Task Completed: ".$post->post_title;
+ $message .= "
+
+
$current_user->display_name has updated the project as 100% complete "$parent->post_title" project:
+
"$post->post_title "
+
Details: "$post->post_content"
+
+ ";
+ } elseif($type == 'new-assign'){
+ $subject = "New Task: ".$post->post_title;
+ $message = "
+
+
New Task Assigned to you {$post->post_title}.
+
"$post->post_title "
+
Details: "$post->post_content"
+
+ ";
+ } elseif($type == 'task-update'){
+ $subject = "Task Modified: ".$post->post_title;
+ $message = "
+
+
The task {$post->post_title} has been modified by $current_user->display_name.
+
"$post->post_title "
+
Details: "$post->post_content"
+
+ ";
+ } elseif($type == 'assign'){
+ $subject = "Task Reassigned to ".$post_owner->user_login." : ".$post->post_title;
+ $message = "
+
+
$current_user->display_name re-assigned the following task to $post_owner->user_login on the "$post->post_title" project:
+
"$post->post_title "
+
Details: "$post->post_content"
+
+ ";
+ } elseif($type == 'unassign'){
+ $subject = "Reassignment Notification: ".$post->post_title; //"Task is UnAssigned ($parent->post_title): $post->post_title";
+ $message = "
+
+
{$current_user->display_name} has reassigned the following task to {$post_owner->user_login}:
+
"$post->post_title "
+
Details: "$post->post_content"
+
+ ";
+ } elseif($type == 'trash'){
+ $subject = "Task Deleted: ".$post->post_title;
+ $message = "
+
+
{$current_user->display_name} has deleted the following on the {$post->post_title} project:
+
"$post->post_title "
+
Details: "$post->post_content"
+
+ ";
+ } elseif($type == 'task-due'){
+ $subject = "Task Due Date Change to ".$end." for ".$post->post_title;
+ $message = "
+
+
The following task due date was changed to {$end}
+
"$post->post_title "
+
Details: "$post->post_content"
+
+ ";
+ }
+
+ if($post_id) {
+
+ $coauthors = array();
+ $defaults = array( 'orderby' => 'term_order', 'order' => 'ASC' );
+ $args = wp_parse_args( $args, $defaults );
+ $coauthor_terms = wp_get_post_terms( $post_id, 'author', $args );
+
+ if(is_array($coauthor_terms) && !empty($coauthor_terms)) {
+ foreach($coauthor_terms as $coauthor) {
+ $post_author = get_user_by( 'login', $coauthor->name );
+ if(!empty($post_author)) $coauthors[] = $post_author;
+ }
+ //wp_mail('robertopanes@theportlandcompany.com', 'is_array($coauthor_terms)', $post_author->ID, '');
+ $usercnt = get_post_meta( $post_id, '_propel_user',true );
+ foreach( $coauthors as $login ) {
+ //$user = get_userdata( $login );
+ //add_filter('wp_mail_content_type',create_function('', 'return "text/html";'));
+ //wp_mail($login->user_email, $subject, $message, $headers);
+ for ($i =0; $i < $usercnt; $i++ ){
+ $userlogin = get_post_meta( $post_id, '_propel_user_'.$i, true );
+ //$author = get_user_by( 'login', $userlogin );
+ if ( $userlogin == $login->user_login ){
+ add_filter('wp_mail_content_type',create_function('', 'return "text/html";'));
+ wp_mail($login->user_email, $subject, $message, $headers);
+ }
+ }
+
+ }
+ } else {
+
+ $usercnt = get_post_meta( $post_id, '_propel_user',true );
+ for ($i =0; $i < $usercnt; $i++ ){
+ $userlogin = get_post_meta( $post_id, '_propel_user_'.$i, true );
+ $author = get_user_by( 'login', $userlogin );
+ add_filter('wp_mail_content_type',create_function('', 'return "text/html";'));
+ wp_mail($author->user_email, $subject, $message, $headers);
+ }
+
+ }
+
+ }
+
+ } //End of email option
+ }
+
+
+ /**
+ * @since 2.0
+ * rob: added this function..
+ */
+ public static function wp_ajax_get_task_detail() {
+
+ check_ajax_referer( 'get-task-detail', 'security' );
+
+ if (isset($_POST["postid"])){
+
+ $id = $_POST["postid"];
+
+ switch($_POST['retnum']){
+
+ case 1:
+ global $wpdb;
+ $parent = get_the_ID();
+ //@todo: profile query / use WP_Query?
+ $query = "SELECT `post_id`, `meta_value` AS `progress`
+ FROM `{$wpdb->postmeta}`
+ WHERE `meta_key` = '_propel_complete'
+ AND `meta_value` < 100 AND `{$wpdb->postmeta}`.`post_id`
+ IN (SELECT `ID` FROM {$wpdb->posts}
+ WHERE `post_parent`={$parent} AND `post_status` = 'publish')
+ ORDER BY `meta_value` DESC, `post_id` DESC;";
+ $posts = $wpdb->get_results($query);
+ ?>
+
+
+
+ ID;
+ }
+ ?>
+ ;
+ post_author ) {
+ $userdata = get_userdata( $task->post_author );
+ $authid = $userdata->ID;
+ $author = $userdata->display_name;
+ } else {
+ $authid = '-1';
+ $author = "Unassigned";
+ }
+ $args = array(
+ 'class' => 'metabox-add-task-user',
+ 'name' => 'propel_post_author',
+ 'show_option_none' => 'Unassigned',
+ 'orderby' => 'display_name',
+ 'selected' => $userdata->ID
+ );
+ wp_dropdown_users( $args );
+ die(0);
+ break;
+ case 3:
+ ?>
+
+ $i";
+ endfor;
+ ?>
+
+ postmeta}` JOIN `{$wpdb->posts}` ON `post_id` = `ID`
+ WHERE `meta_key` = '_propel_complete'
+ AND `meta_value` < 100 AND `{$wpdb->postmeta}`.`post_id`
+ IN (SELECT `ID` FROM {$wpdb->posts}
+ WHERE `post_parent`={$parent} AND (`post_status` = 'publish' OR `post_status` = 'trash'))
+ ORDER BY `meta_value` DESC, `post_id` DESC";
+
+ $posts = $wpdb->get_results($query);
+ echo json_encode($posts);
+ die();
+ }
+
+ public static function wp_ajax_check_update() {
+ check_ajax_referer( 'check-update', 'security' );
+ global $wpdb;
+ $postid = $_POST['pID'];
+ $curDate = date("Y-m-d h:i:s");
+ //@todo: profile query / use WP_Query?
+ $query = "SELECT `ID`, `post_date`, `post_modified`, `post_status` FROM {$wpdb->posts}
+ WHERE `ID`={$postid} AND `post_modified` >= {$curDate} ";
+ $posts = $wpdb->get_results($query);
+ echo json_encode($posts);
+ die();
+ }
+
+ public static function wp_ajax_single_task_image() {
+
+ check_ajax_referer( 'single-task-image', 'security' );
+
+ if ( isset($_POST['taskimage']) && isset($_POST['taskid']) ){
+ $cnt = get_post_meta($_POST['taskid'],'_propel_task_image',true);
+ if ( !empty($cnt) ){
+ $ncnt = (int)$cnt + 1;
+ update_post_meta( $_POST['taskid'],'_propel_task_image',(int)$ncnt);
+ update_post_meta( $_POST['taskid'], '_propel_task_image_'.$cnt, $_POST['taskimage']);
+ }else{
+ update_post_meta( $_POST['taskid'],'_propel_task_image',1);
+ update_post_meta( $_POST['taskid'], '_propel_task_image_0', $_POST['taskimage']);
+ }
+ }
+
+ die();
+ }
+
+ public static function wp_ajax_propel_post_comment(){
+ check_ajax_referer( 'propel-post-comment', 'security' );
+ if ( isset($_POST['comment_post_ID']) ){
+
+ global $current_user;
+ get_currentuserinfo();
+ $time = current_time('mysql');
+ $data = array(
+ 'comment_post_ID' => $_POST['comment_post_ID'],
+ 'comment_author' => $current_user->user_login,
+ 'comment_author_email' => $current_user->user_email,
+ 'comment_content' => $_POST['comment_content'],
+ 'comment_type' => '',
+ 'comment_parent' => 0,
+ 'user_id' => $current_user->ID,
+ 'comment_date' => $time,
+ 'comment_approved' => 1,
+ );
+
+ $post = wp_insert_comment($data);
+
+ if ($post){
+
+ $comments = get_comment($post);
+ foreach($comments as $comment):
+ $headers[] = 'From: '.$comment->comment_author.' <'.$comments->comment_author_email.'>';
+ $content = $comment->comment_content;
+ endforeach;
+
+ $pid = (int)$_POST['comment_post_ID'];
+
+ $post_comment = get_post($pid);
+
+ $coauthors = array();
+ $defaults = array( 'orderby' => 'term_order', 'order' => 'ASC' );
+ $args = wp_parse_args( $args, $defaults );
+ $coauthor_terms = wp_get_post_terms( $pid, 'author', $args );
+
+ if(is_array($coauthor_terms) && !empty($coauthor_terms)) {
+ foreach($coauthor_terms as $coauthor) {
+ $post_author = get_user_by( 'login', $coauthor->name );
+ if(!empty($post_author)) $coauthors[] = $post_author;
+ }
+ $usercnt = get_post_meta( $pid, '_propel_user',true );
+ foreach( $coauthors as $login ) {
+ for ($i =0; $i < $usercnt; $i++ ){
+ $userlogin = get_post_meta( $pid, '_propel_user_'.$i, true );
+ if ( $userlogin == $login->user_login ){
+ $headers[] = 'Cc: '.$login->user_login.' <'.$login->user_email.'>';
+ }
+ }
+
+ }
+ add_filter('wp_mail_content_type',create_function('', 'return "text/html";'));
+ wp_mail($login->user_email, $post_comment->post_title, $content, $headers);
+
+ }else {
+
+ $usercnt = get_post_meta( $post_id, '_propel_user',true );
+ for ($i =0; $i < $usercnt; $i++ ){
+ $userlogin = get_post_meta( $post_id, '_propel_user_'.$i, true );
+ $author = get_user_by( 'login', $userlogin );
+ $headers[] = 'Cc: '.$author->user_login.' <'.$author->user_email.'>';
+ }
+ add_filter('wp_mail_content_type',create_function('', 'return "text/html";'));
+ wp_mail($author->user_email, $post_comment->post_title, $content, $headers);
+
+ }
+
+ echo json_encode($comments);
+ }
+ }
+ die();
+ }
+
+ public static function wp_ajax_propel_get_comment(){
+ check_ajax_referer( 'propel-get-comment', 'security' );
+ if ( isset($_POST['comment_post_ID']) ){
+ $args = array(
+ 'post_id' => $_POST['comment_post_ID'],
+ 'orderby' => 'comment_date_gmt',
+ 'order' => 'ASC'
+ );
+ $comments = get_comments($args);
+ echo json_encode($comments);
+ }
+ die();
+ }
+
+
+} //End of class
?>
\ No newline at end of file
diff --git a/post-types/task.php b/post-types/task.php
index 707dadf..1d1b74e 100644
--- a/post-types/task.php
+++ b/post-types/task.php
@@ -1,448 +1,452 @@
-
-
- ID, '_propel_complete', true );
- $priority = get_post_meta( $post->ID, '_propel_priority', true );
- $actions['inline hide-if-no-js'] = '";
- $actions['inline hide-if-no-js'] .= __( 'Quick Edit' );
- $actions['inline hide-if-no-js'] .= ' ';
-
- return $actions;
- }
-
- public static function quick_edit_custom_box($column_name, $post_type) {
- if ($column_name != 'complete') return;
- ?>
-
-
- Progress
-
- $i%";
- }
- ?>
-
-
-
- Priority
-
- Low
- Medium
- High
-
-
-
-
- post_content;
- die();
- }
-
- /**
- * @since 2.0
- */
- public static function admin_menu() {
- remove_meta_box( 'postcustom', 'propel_task', 'core' );
- }
-
- /**
- * @since 2.0
- */
- public static function parse_query($query) {
- global $pagenow;
- if ( !isset( $_GET['post_type'] ) )
- return $query;
-
- if( $pagenow != "edit.php" && $_GET['post_type'] != self::POST_TYPE )
- return $query;
-
- if( isset( $_GET['project'] ) ) {
- $query->query_vars['post_parent'] = (int)$_GET['project'];
- return $query;
- }
-
- return $query;
- }
-
- /**
- * @since 2.0
- */
- public static function save_post($post_id) {
- if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )
- return;
-
- if ( !isset( $_POST['propel_nonce'] ) )
- return;
-
- if ( !wp_verify_nonce( $_POST['propel_nonce'], plugin_basename( __FILE__ ) ) )
- return;
-
- if ( 'page' == $_POST['post_type'] ) {
- if ( !current_user_can( 'edit_page', $post_id ) )
- return;
- } else {
- if ( !current_user_can( 'edit_post', $post_id ) )
- return;
- }
-
- $start = !empty( $_POST['start_date'] ) ? strtotime( $_POST['start_date'] ) : time();
- update_post_meta( $post_id, '_propel_start_date', $start );
-
- $end = strtotime($_POST['end_date']);
- if( empty( $_POST['end_date'] ) && $_POST['complete'] == 100 ) {
- $end = time();
- }
- update_post_meta( $post_id, '_propel_end_date', $end );
-
- update_post_meta( $post_id, '_propel_priority', (int)$_POST['priority'] );
- update_post_meta( $post_id, '_propel_complete', (int)$_POST['complete'] );
- }
-
- public static function register_taxonomy() {
-
- $labels = array(
- 'name' => _x( 'States', 'taxonomy general name' ),
- 'singular_name' => _x( 'States', 'taxonomy singular name' ),
- 'search_items' => __( 'Search states' ),
- 'all_items' => __( 'All States' ),
- 'parent_item' => __( 'Parent State' ),
- 'parent_item_colon' => __( 'Parent State:' ),
- 'edit_item' => __( 'Edit State' ),
- 'update_item' => __( 'Update State' ),
- 'add_new_item' => __( 'Add New State' ),
- 'new_item_name' => __( 'New State Name' ),
- 'menu_name' => __( 'States' ));
-
- register_taxonomy( 'propel_status', 'propel_project', array(
- 'public' => false,
- 'labels' => $labels,
- // 'show_ui' => true,
- // 'query_var' => true,
- ) );
-
- $state = array( 'Not Yet Started', 'Started', 'Finished', 'Delievered', 'Accepted', 'Rejected' );
-
- foreach($state as $status) {
- if( !term_exists($status, 'propel_status')) {
- wp_insert_term($status, 'propel_status');
- }
- }
-
- $labels = array(
- 'name' => _x( 'Type', 'taxonomy general name' ),
- 'singular_name' => _x( 'Types', 'taxonomy singular name' ),
- 'search_items' => __( 'Search types' ),
- 'all_items' => __( 'All Types' ),
- 'parent_item' => __( 'Parent Type' ),
- 'parent_item_colon' => __( 'Parent Type:' ),
- 'edit_item' => __( 'Edit Type' ),
- 'update_item' => __( 'Update Type' ),
- 'add_new_item' => __( 'Add New Type' ),
- 'new_item_name' => __( 'New Type Name' ),
- 'menu_name' => __( 'Types' ));
-
- register_taxonomy( 'propel_type', 'propel_task', array(
- 'public' => false,
- 'labels' => $labels,
- // 'show_ui' => true,
- // 'query_var' => true,
- // 'show_in_nav_menus' => true,
-
- ) );
-
- $type = array( 'Feature', 'Bug' );
-
- foreach($type as $t) {
- if( !term_exists($t, 'propel_type')) {
- wp_insert_term($t, 'propel_type');
- }
- }
- }
-
- /**
- * @since 2.0
- */
- public static function register_post_type() {
-
- $labels = array(
- 'name' => _x('Tasks', 'post type general name'),
- 'singular_name' => _x('Tasks', 'post type singular name'),
- 'add_new' => _x('Add New', 'propel'),
- 'add_new_item' => __('Add New Task'),
- 'edit_item' => __('Edit Task'),
- 'new_item' => __('New Task'),
- 'all_items' => __('All Tasks'),
- 'view_item' => __('View Task'),
- 'search_items' => __('Search Tasks'),
- 'not_found' => __('No tasks found'),
- 'not_found_in_trash' => __('No tasks found in Trash'),
- 'parent_item_colon' => '',
- 'menu_name' => 'Propel');
-
- $args = array(
- 'labels' => $labels,
- 'public' => true,
- 'publicly_queryable' => true,
- 'show_ui' => (wp_count_posts('propel_project')->publish > 0) ? true : false,
- 'show_in_menu' => 'edit.php?post_type=propel_project',
- 'query_var' => true,
- 'rewrite' => true,
- 'taxonomies' => array('propel_category', 'post_tag'),
- 'capability_type' => 'post',
- 'has_archive' => true,
- 'hierarchical' => false,
- 'menu_position' => null,
- 'supports' => array('title','editor','comments', 'author', 'custom-fields', 'revisions'));
-
- register_post_type(self::POST_TYPE, $args);
-
- $argz = array(
- 'post_type' => 'propel_task',
- 'action' => 'complete',
- 'label' => 'Complete' );
- Propel_Functions::add_post_action( $argz, array( __CLASS__, 'action_complete' ) );
- }
-
- public static function default_hidden_meta_boxes( $hidden, $screen ) {
- if($screen->id == 'propel_project') {
- $hidden[] = 'postcustom';
- }
-
- if( $screen->id == 'propel_task') {
- $hidden[] = 'custom-fields';
- }
-
- return $hidden;
- }
-
- /**
- * @since 2.0
- */
- public static function register_columns($columns) {
- $new_columns['cb'] = ' ';
- $new_columns['title'] = _x( 'Task Name', 'column name' );
- $new_columns['project'] = __( 'Project', 'propel' );
- $new_columns['author'] = __( 'Owner', 'propel' );
- if( Propel_Options::option('show_start_date' ) )
- $new_columns['start'] = __( 'Start Date', 'propel' );
- if( Propel_Options::option('show_end_date' ) )
- $new_columns['end'] = __( 'End Date', 'propel' );
- $new_columns['priority'] = __( 'Priority', 'propel' );
- $new_columns['type'] = __( 'Type', 'propel' );
- $new_columns['complete'] = __( 'Progress', 'propel' );
- $new_columns['propel_categories'] = __( 'Categories', 'propel' );
- $new_columns['tags'] = $columns['tags'];
- $new_columns['comments'] = $columns['comments'];
- return $new_columns;
- }
-
- /**
- * @since 2.0
- */
- public static function register_sortable_columns( $x ) {
- $columns['start'] = 'start';
- $columns['end'] = 'end';
- $columns['project'] = 'project';
- $columns['priority'] = 'priority';
- $columns['complete'] = 'complete';
- $columns['author'] = 'author';
- return $columns;
- }
-
- /**
- * @since 2.0
- */
- public static function manage_columns($column_name, $id) {
- global $wpdb;
-
- switch ($column_name) {
- case 'id':
- echo $id;
- break;
-
- case 'project':
- $id = get_post( $id );
- $project = get_post( $id->post_parent );
- echo "" . $project->post_title . " ";
- break;
-
- case 'type':
- $terms = wp_get_post_terms( $id, 'propel_type' );
- if( is_array( $terms ) )
- echo $terms[0]->name;
- break;
-
- case 'start':
- $date = get_post_meta( $id, '_propel_start_date', true );
- if($date) {
- echo date( "M. jS, Y" , $date );
- }
- break;
-
- case 'end':
- $date = get_post_meta( $id, '_propel_end_date', true );
- if($date) {
- echo date( "M. jS, Y" , $date );
- }
- break;
-
- case 'priority':
- $priorities = propel_get_priorities();
- echo $priorities[get_post_meta( $id, '_propel_priority', true )];
- break;
-
- case 'complete':
- echo get_post_meta( $id, '_propel_complete', true ) . "%";
- break;
-
- case 'propel_categories':
- $categories = get_the_terms(0, "propel_category");
- $categories_html = array();
- if(is_array($categories)) {
- foreach ($categories as $category) {
- array_push($categories_html, '' . $category->name . ' ');
- }
- echo implode($categories_html, ", ");
- }
- break;
-
- default:
- break;
- }
- }
-
- /**
- * @since 2.0
- */
- public static function add_meta_boxes() {
- add_meta_box('custom-fields', __('Custom Fields'),
- 'post_custom_meta_box', self::POST_TYPE, 'normal', 'low');
-
- add_meta_box( 'propel_task_meta', __( 'Task', 'propel' ),
- array( __CLASS__, 'edit_task_meta'), self::POST_TYPE, 'side' );
- }
-
- /**
- * @since 2.0
- */
- public static function edit_task_meta() {
- wp_nonce_field( plugin_basename( __FILE__ ), 'propel_nonce' );
-
- $start = get_post_meta( get_the_ID(), '_propel_start_date', true );
- if($start)
- $start = date("M. jS, Y", $start);
-
- $end = get_post_meta( get_the_ID(), '_propel_end_date', true );
- if($end)
- $end = date("M. jS, Y", $end);
-
- $priority = get_post_meta( get_the_ID(), '_propel_priority', true );
- if(!$priority)
- $priority = 0;
-
- $complete = get_post_meta( get_the_ID(), '_propel_complete', true );
- if(!$complete)
- $complete = 0;
-
- $post = get_post( get_the_ID() );
- $parent = $post->post_parent;
-
- $types = wp_get_post_terms( get_the_ID(), 'propel_type' );
- if( is_array( $types ) && isset( $types[0] ) ) {
- $type = $types[0]->term_id;
- } else {
- $type = 0;
- }
-
- require_once( dirname(__FILE__) . '/../metaboxes/task-meta.php' );
- }
-
- /**
- * @since 2.0
- */
- public static function action_complete( $post_id ) {
- $end = get_post_meta( $post_id, '_propel_end_date', true);
- if( !$end && empty( $_POST['end_date'] ) ) {
- update_post_meta( $post_id, '_propel_end_date', time() );
- }
- update_post_meta( $post_id, '_propel_complete', 100 );
- }
-
+
+
+ ID, '_propel_complete', true );
+ $priority = get_post_meta( $post->ID, '_propel_priority', true );
+ $actions['inline hide-if-no-js'] = '";
+ $actions['inline hide-if-no-js'] .= __( 'Quick Edit' );
+ $actions['inline hide-if-no-js'] .= ' ';
+
+ return $actions;
+ }
+
+ public static function quick_edit_custom_box($column_name, $post_type) {
+ if ($column_name != 'complete') return;
+ ?>
+
+
+ Progress
+
+ $i%";
+ }
+ ?>
+
+
+
+ Priority
+
+ Low
+ Mediumx
+ High
+
+
+
+
+ post_content;
+ die();
+ }
+
+ /**
+ * @since 2.0
+ */
+ public static function admin_menu() {
+ remove_meta_box( 'postcustom', 'propel_task', 'core' );
+ }
+
+ /**
+ * @since 2.0
+ */
+ public static function parse_query($query) {
+ global $pagenow;
+ if ( !isset( $_GET['post_type'] ) )
+ return $query;
+
+ if( $pagenow != "edit.php" && $_GET['post_type'] != self::POST_TYPE )
+ return $query;
+
+ if( isset( $_GET['project'] ) ) {
+ $query->query_vars['post_parent'] = (int)$_GET['project'];
+ return $query;
+ }
+
+ return $query;
+ }
+
+ /**
+ * @since 2.0
+ */
+ public static function save_post($post_id) {
+ if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )
+ return;
+
+ if ( !isset( $_POST['propel_nonce'] ) )
+ return;
+
+ if ( !wp_verify_nonce( $_POST['propel_nonce'], plugin_basename( __FILE__ ) ) )
+ return;
+
+ if ( 'page' == $_POST['post_type'] ) {
+ if ( !current_user_can( 'edit_page', $post_id ) )
+ return;
+ } else {
+ if ( !current_user_can( 'edit_post', $post_id ) )
+ return;
+ }
+
+ $start = !empty( $_POST['start_date'] ) ? strtotime( $_POST['start_date'] ) : time();
+ update_post_meta( $post_id, '_propel_start_date', $start );
+
+ $end = strtotime($_POST['end_date']);
+ if( empty( $_POST['end_date'] ) && $_POST['complete'] == 100 ) {
+ $end = time();
+ }
+ update_post_meta( $post_id, '_propel_end_date', $end );
+
+ update_post_meta( $post_id, '_propel_priority', (int)$_POST['priority'] );
+ update_post_meta( $post_id, '_propel_complete', (int)$_POST['complete'] );
+
+
+ }
+
+ public static function register_taxonomy() {
+
+ $labels = array(
+ 'name' => _x( 'States', 'taxonomy general name' ),
+ 'singular_name' => _x( 'States', 'taxonomy singular name' ),
+ 'search_items' => __( 'Search states' ),
+ 'all_items' => __( 'All States' ),
+ 'parent_item' => __( 'Parent State' ),
+ 'parent_item_colon' => __( 'Parent State:' ),
+ 'edit_item' => __( 'Edit State' ),
+ 'update_item' => __( 'Update State' ),
+ 'add_new_item' => __( 'Add New State' ),
+ 'new_item_name' => __( 'New State Name' ),
+ 'menu_name' => __( 'States' ));
+
+ register_taxonomy( 'propel_status', 'propel_project', array(
+ 'public' => false,
+ 'labels' => $labels,
+ // 'show_ui' => true,
+ // 'query_var' => true,
+ ) );
+
+ $state = array( 'Not Yet Started', 'Started', 'Finished', 'Delievered', 'Accepted', 'Rejected' );
+
+ foreach($state as $status) {
+ if( !term_exists($status, 'propel_status')) {
+ wp_insert_term($status, 'propel_status');
+ }
+ }
+
+ $labels = array(
+ 'name' => _x( 'Type', 'taxonomy general name' ),
+ 'singular_name' => _x( 'Types', 'taxonomy singular name' ),
+ 'search_items' => __( 'Search types' ),
+ 'all_items' => __( 'All Types' ),
+ 'parent_item' => __( 'Parent Type' ),
+ 'parent_item_colon' => __( 'Parent Type:' ),
+ 'edit_item' => __( 'Edit Type' ),
+ 'update_item' => __( 'Update Type' ),
+ 'add_new_item' => __( 'Add New Type' ),
+ 'new_item_name' => __( 'New Type Name' ),
+ 'menu_name' => __( 'Types' ));
+
+ register_taxonomy( 'propel_type', 'propel_task', array(
+ 'public' => false,
+ 'labels' => $labels,
+ // 'show_ui' => true,
+ // 'query_var' => true,
+ // 'show_in_nav_menus' => true,
+
+ ) );
+
+ $type = array( 'Feature', 'Bug' );
+
+ foreach($type as $t) {
+ if( !term_exists($t, 'propel_type')) {
+ wp_insert_term($t, 'propel_type');
+ }
+ }
+ }
+
+ /**
+ * @since 2.0
+ */
+ public static function register_post_type() {
+
+ $labels = array(
+ 'name' => _x('Tasks', 'post type general name'),
+ 'singular_name' => _x('Tasks', 'post type singular name'),
+ 'add_new' => _x('Add New', 'propel'),
+ 'add_new_item' => __('Add New Task'),
+ 'edit_item' => __('Edit Task'),
+ 'new_item' => __('New Task'),
+ 'all_items' => __('All Tasks'),
+ 'view_item' => __('View Task'),
+ 'search_items' => __('Search Tasks'),
+ 'not_found' => __('No tasks found'),
+ 'not_found_in_trash' => __('No tasks found in Trash'),
+ 'parent_item_colon' => '',
+ 'menu_name' => 'Propel');
+
+ $args = array(
+ 'labels' => $labels,
+ 'public' => true,
+ 'publicly_queryable' => true,
+ 'show_ui' => (wp_count_posts('propel_project')->publish > 0) ? true : false,
+ 'show_in_menu' => 'edit.php?post_type=propel_project',
+ 'query_var' => true,
+ 'rewrite' => true,
+ 'taxonomies' => array('propel_category', 'post_tag'),
+ 'capability_type' => 'post',
+ 'has_archive' => true,
+ 'hierarchical' => false,
+ 'menu_position' => null,
+ 'supports' => array('title','editor','comments', 'author', 'custom-fields', 'revisions'));
+
+ register_post_type(self::POST_TYPE, $args);
+
+ $argz = array(
+ 'post_type' => 'propel_task',
+ 'action' => 'complete',
+ 'label' => 'Complete' );
+ Propel_Functions::add_post_action( $argz, array( __CLASS__, 'action_complete' ) );
+ }
+
+ public static function default_hidden_meta_boxes( $hidden, $screen ) {
+ if($screen->id == 'propel_project') {
+ $hidden[] = 'postcustom';
+ }
+
+ if( $screen->id == 'propel_task') {
+ $hidden[] = 'custom-fields';
+ }
+
+ return $hidden;
+ }
+
+ /**
+ * @since 2.0
+ */
+ public static function register_columns($columns) {
+ $new_columns['cb'] = ' ';
+ $new_columns['title'] = _x( 'Task Name', 'column name' );
+ $new_columns['project'] = __( 'Project', 'propel' );
+ $new_columns['author'] = __( 'Owner', 'propel' );
+ if( Propel_Options::option('show_start_date' ) )
+ $new_columns['start'] = __( 'Start Date', 'propel' );
+ if( Propel_Options::option('show_end_date' ) )
+ $new_columns['end'] = __( 'End Date', 'propel' );
+ $new_columns['priority'] = __( 'Priority', 'propel' );
+ $new_columns['type'] = __( 'Type', 'propel' );
+ $new_columns['complete'] = __( 'Progress', 'propel' );
+ $new_columns['propel_categories'] = __( 'Categories', 'propel' );
+ $new_columns['tags'] = $columns['tags'];
+ $new_columns['comments'] = $columns['comments'];
+ return $new_columns;
+ }
+
+ /**
+ * @since 2.0
+ */
+ public static function register_sortable_columns( $x ) {
+ $columns['start'] = 'start';
+ $columns['end'] = 'end';
+ $columns['project'] = 'project';
+ $columns['priority'] = 'priority';
+ $columns['complete'] = 'complete';
+ $columns['author'] = 'author';
+ return $columns;
+ }
+
+ /**
+ * @since 2.0
+ */
+ public static function manage_columns($column_name, $id) {
+ global $wpdb;
+
+ switch ($column_name) {
+ case 'id':
+ echo $id;
+ break;
+
+ case 'project':
+ $id = get_post( $id );
+ $project = get_post( $id->post_parent );
+ echo "" . $project->post_title . " ";
+ break;
+
+ case 'type':
+ $terms = wp_get_post_terms( $id, 'propel_type' );
+ if( is_array( $terms ) )
+ echo $terms[0]->name;
+ break;
+
+ case 'start':
+ $date = get_post_meta( $id, '_propel_start_date', true );
+ if($date) {
+ echo date( "M. jS, Y" , $date );
+ }
+ break;
+
+ case 'end':
+ $date = get_post_meta( $id, '_propel_end_date', true );
+ if($date) {
+ echo date( "M. jS, Y" , $date );
+ }
+ break;
+
+ case 'priority':
+ $priorities = propel_get_priorities();
+ echo $priorities[get_post_meta( $id, '_propel_priority', true )];
+ break;
+
+ case 'complete':
+ echo get_post_meta( $id, '_propel_complete', true ) . "%";
+ break;
+
+ case 'propel_categories':
+ $categories = get_the_terms(0, "propel_category");
+ $categories_html = array();
+ if(is_array($categories)) {
+ foreach ($categories as $category) {
+ array_push($categories_html, '' . $category->name . ' ');
+ }
+ echo implode($categories_html, ", ");
+ }
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ /**
+ * @since 2.0
+ */
+ public static function add_meta_boxes() {
+ add_meta_box('custom-fields', __('Custom Fields'),
+ 'post_custom_meta_box', self::POST_TYPE, 'normal', 'low');
+
+ add_meta_box( 'propel_task_meta', __( 'Edit Task', 'propel' ),
+ array( __CLASS__, 'edit_task_meta'), self::POST_TYPE, 'side' );
+ }
+
+ /**
+ * @since 2.0
+ */
+ public static function edit_task_meta() {
+ wp_nonce_field( plugin_basename( __FILE__ ), 'propel_nonce' );
+
+ $start = get_post_meta( get_the_ID(), '_propel_start_date', true );
+ if($start)
+ $start = date("M. jS, Y", $start);
+
+ $end = get_post_meta( get_the_ID(), '_propel_end_date', true );
+ if($end)
+ $end = date("M. jS, Y", $end);
+
+ $priority = get_post_meta( get_the_ID(), '_propel_priority', true );
+ if(!$priority)
+ $priority = 0;
+
+ $complete = get_post_meta( get_the_ID(), '_propel_complete', true );
+ if(!$complete)
+ $complete = 0;
+
+ $post = get_post( get_the_ID() );
+ $parent = $post->post_parent;
+
+ $types = wp_get_post_terms( get_the_ID(), 'propel_type' );
+ if( is_array( $types ) && isset( $types[0] ) ) {
+ $type = $types[0]->term_id;
+ } else {
+ $type = 0;
+ }
+
+ require_once( dirname(__FILE__) . '/../metaboxes/edit-task.php' );
+ }
+
+ /**
+ * @since 2.0
+ */
+ public static function action_complete( $post_id ) {
+ $end = get_post_meta( $post_id, '_propel_end_date', true);
+ if( !$end && empty( $_POST['end_date'] ) ) {
+ update_post_meta( $post_id, '_propel_end_date', time() );
+ }
+ update_post_meta( $post_id, '_propel_complete', 100 );
+ }
+
}
\ No newline at end of file
diff --git a/post-types/time.php b/post-types/time.php
index 0062a83..2690c5e 100644
--- a/post-types/time.php
+++ b/post-types/time.php
@@ -1,279 +1,279 @@
- _x('Time', 'post type general name'),
- 'singular_name' => _x('Time', 'post type singular name'),
- 'add_new' => _x('Add New', 'time'),
- 'add_new_item' => __('Add New Time'),
- 'edit_item' => __('Edit Time'),
- 'new_item' => __('New Time'),
- 'all_items' => __('All Time'),
- 'view_item' => __('View Time'),
- 'search_items' => __('Search Time'),
- 'not_found' => __('No time found'),
- 'not_found_in_trash' => __('No time found in Trash'),
- 'parent_item_colon' => 'Propel',
- 'menu_name' => 'Time');
-
- $args = array(
- 'labels' => $labels,
- 'public' => true,
- 'publicly_queryable' => true,
- 'show_ui' => true,
- 'show_in_menu' => 'edit.php?post_type=propel_project',
- 'query_var' => true,
- 'rewrite' => true,
- 'capability_type' => 'post',
- 'has_archive' => true,
- 'hierarchical' => false,
- 'menu_position' => null,
- 'supports' => array(''));
-
- register_post_type(self::POST_TYPE, $args );
-
- $argv = array(
- 'label' => "Billed",
- 'public' => true,
- 'exclude_from_search' => false,
- 'show_in_admin_all_list' => true,
- 'show_in_admin_status_list' => true,
- 'post_type' => 'propel_time' );
-
- Propel_Functions::register_post_status( 'billed', $argv );
-
- $argz = array(
- 'post_type' => 'propel_time',
- 'action' => 'bill',
- 'label' => 'Bill' );
- Propel_Functions::add_post_action( $argz, array( __CLASS__, 'bill' ) );
- }
-
-
- /**
- * Add metaboxes
- * @since 2.0
- */
- public static function add_meta_boxes() {
- add_meta_box( 'edit_task_meta', __( 'Time', 'propel' ),
- array( __CLASS__, 'edit_task_meta'), 'propel_time', 'normal', 'high' );
- }
-
- /**
- * @since 2.0
- * @param $post
- */
- public static function edit_task_meta( $post ) {
- wp_nonce_field( plugin_basename( __FILE__ ), 'propel_nonce' );
-
- $projects = query_posts( 'post_type=propel_project&post_status=publish' );
- echo "";
- foreach($projects as $project) {
- echo "" . $project->post_title . " ";
- /**
- * @todo: optimize query
- */
- $tasks = query_posts( 'post_type=propel_task&post_status=publish&post_parent=' . $project->ID );
- foreach($tasks as $task) {
- echo "  - " . $task->post_title . " ";
- }
- }
- echo " ";
- echo " ";
-
- wp_reset_query();
- }
-
- /**
- * Add custom columns in the table
- * @since 2.0
- * @param $columns
- * @return $new_columns
- */
- public static function register_columns( $columns ) {
- $new_columns['cb'] = ' ';
- $new_columns['title'] = __('Title', 'propel');
- $new_columns['action'] = __('Action', 'propel');
- $new_columns['client'] = __('Client', 'propel');
- $new_columns['project'] = __('Project', 'propel');
- $new_columns['task'] = __('Task', 'propel');
- $new_columns['start'] = __('Start', 'propel');
- $new_columns['end'] = __('End', 'propel');
- $new_columns['duration'] = __('Duration', 'propel');
- $new_columns['author'] = __('User', 'propel');
- return $new_columns;
- }
-
- /**
- * Make columns sortable
- * @since 2.0
- * @param $columns
- * @return $new_columns
- */
- public static function register_sortable_columns( $columns ) {
- $new_columns['client'] = 'client';
- $new_columns['project'] = 'project';
- $new_columns['task'] = 'task';
- $new_columns['start'] = 'start';
- $new_columns['end'] = 'end';
- $new_columns['duration'] = 'duration';
- $new_columns['user'] = 'user';
- return $new_columns;
- }
-
-
- /**
- * Output table data
- * @since 2.0
- * @param $column_name
- * @param $id
- */
- public static function manage_columns( $column_name, $id ) {
- global $wpdb;
-
- $post = get_post( $id );
-
- $parent = get_post( $post->post_parent );
-
- if( $parent->post_type == "propel_project" ) {
- $project = $parent;
- } else {
- $task = $parent;
- $project = get_post( $task->post_parent );
- }
-
- $client = get_post_meta( $project->ID, '_propel_project_owner', true );
-
- switch ( $column_name ) {
- case 'id':
- echo $id;
- break;
-
- case 'action':
- if( !get_post_meta( $id, '_propel_time_start', true) )
- echo "Start ";
- else if(! get_post_meta( $id, '_propel_time_end', true) )
- echo "End ";
- else
- echo "";
-
- break;
-
- case 'client':
- $user = get_userdata( $client );
- if($user)
- echo "" . $user->user_nicename . " ";
- break;
-
- case 'project':
- echo $project->post_title;
- break;
-
- case 'task':
- if( isset( $task->post_title ) )
- echo $task->post_title;
- break;
-
- case 'start':
- $start = get_post_meta( $id, '_propel_time_end', true );
- if($start)
- echo date('G:i:s', $start );
- break;
-
- case 'end':
- $end = get_post_meta( $id, '_propel_time_end', true );
- if($end)
- echo date('G:i:s', $end );
- break;
-
- case 'duration':
- $start = get_post_meta( $id, '_propel_time_start', true );
- $end = get_post_meta( $id, '_propel_time_end', true );
- echo date('G:i:s', $end-$start );
- break;
-
- default:
- break;
- }
- }
-
- /**
- * Create a WP-Invoice
- * @since 2.0
- */
- public static function bill() {
- die("Sorry, not implemented yet...");
- }
-}
-
+ _x('Time', 'post type general name'),
+ 'singular_name' => _x('Time', 'post type singular name'),
+ 'add_new' => _x('Add New', 'time'),
+ 'add_new_item' => __('Add New Time'),
+ 'edit_item' => __('Edit Time'),
+ 'new_item' => __('New Time'),
+ 'all_items' => __('All Time'),
+ 'view_item' => __('View Time'),
+ 'search_items' => __('Search Time'),
+ 'not_found' => __('No time found'),
+ 'not_found_in_trash' => __('No time found in Trash'),
+ 'parent_item_colon' => 'Propel',
+ 'menu_name' => 'Time');
+
+ $args = array(
+ 'labels' => $labels,
+ 'public' => true,
+ 'publicly_queryable' => true,
+ 'show_ui' => true,
+ 'show_in_menu' => 'edit.php?post_type=propel_project',
+ 'query_var' => true,
+ 'rewrite' => true,
+ 'capability_type' => 'post',
+ 'has_archive' => true,
+ 'hierarchical' => false,
+ 'menu_position' => null,
+ 'supports' => array(''));
+
+ register_post_type(self::POST_TYPE, $args );
+
+ $argv = array(
+ 'label' => "Billed",
+ 'public' => true,
+ 'exclude_from_search' => false,
+ 'show_in_admin_all_list' => true,
+ 'show_in_admin_status_list' => true,
+ 'post_type' => 'propel_time' );
+
+ Propel_Functions::register_post_status( 'billed', $argv );
+
+ $argz = array(
+ 'post_type' => 'propel_time',
+ 'action' => 'bill',
+ 'label' => 'Bill' );
+ Propel_Functions::add_post_action( $argz, array( __CLASS__, 'bill' ) );
+ }
+
+
+ /**
+ * Add metaboxes
+ * @since 2.0
+ */
+ public static function add_meta_boxes() {
+ add_meta_box( 'edit_task_meta', __( 'Time', 'propel' ),
+ array( __CLASS__, 'edit_task_meta'), 'propel_time', 'normal', 'high' );
+ }
+
+ /**
+ * @since 2.0
+ * @param $post
+ */
+ public static function edit_task_meta( $post ) {
+ wp_nonce_field( plugin_basename( __FILE__ ), 'propel_nonce' );
+
+ $projects = query_posts( 'post_type=propel_project&post_status=publish' );
+ echo "";
+ foreach($projects as $project) {
+ echo "" . $project->post_title . " ";
+ /**
+ * @todo: optimize query
+ */
+ $tasks = query_posts( 'post_type=propel_task&post_status=publish&post_parent=' . $project->ID );
+ foreach($tasks as $task) {
+ echo "  - " . $task->post_title . " ";
+ }
+ }
+ echo " ";
+ echo " ";
+
+ wp_reset_query();
+ }
+
+ /**
+ * Add custom columns in the table
+ * @since 2.0
+ * @param $columns
+ * @return $new_columns
+ */
+ public static function register_columns( $columns ) {
+ $new_columns['cb'] = ' ';
+ $new_columns['title'] = __('Title', 'propel');
+ $new_columns['action'] = __('Action', 'propel');
+ $new_columns['client'] = __('Client', 'propel');
+ $new_columns['project'] = __('Project', 'propel');
+ $new_columns['task'] = __('Task', 'propel');
+ $new_columns['start'] = __('Start', 'propel');
+ $new_columns['end'] = __('End', 'propel');
+ $new_columns['duration'] = __('Duration', 'propel');
+ $new_columns['author'] = __('User', 'propel');
+ return $new_columns;
+ }
+
+ /**
+ * Make columns sortable
+ * @since 2.0
+ * @param $columns
+ * @return $new_columns
+ */
+ public static function register_sortable_columns( $columns ) {
+ $new_columns['client'] = 'client';
+ $new_columns['project'] = 'project';
+ $new_columns['task'] = 'task';
+ $new_columns['start'] = 'start';
+ $new_columns['end'] = 'end';
+ $new_columns['duration'] = 'duration';
+ $new_columns['user'] = 'user';
+ return $new_columns;
+ }
+
+
+ /**
+ * Output table data
+ * @since 2.0
+ * @param $column_name
+ * @param $id
+ */
+ public static function manage_columns( $column_name, $id ) {
+ global $wpdb;
+
+ $post = get_post( $id );
+
+ $parent = get_post( $post->post_parent );
+
+ if( $parent->post_type == "propel_project" ) {
+ $project = $parent;
+ } else {
+ $task = $parent;
+ $project = get_post( $task->post_parent );
+ }
+
+ $client = get_post_meta( $project->ID, '_propel_project_owner', true );
+
+ switch ( $column_name ) {
+ case 'id':
+ echo $id;
+ break;
+
+ case 'action':
+ if( !get_post_meta( $id, '_propel_time_start', true) )
+ echo "Start ";
+ else if(! get_post_meta( $id, '_propel_time_end', true) )
+ echo "End ";
+ else
+ echo "";
+
+ break;
+
+ case 'client':
+ $user = get_userdata( $client );
+ if($user)
+ echo "" . $user->user_nicename . " ";
+ break;
+
+ case 'project':
+ echo $project->post_title;
+ break;
+
+ case 'task':
+ if( isset( $task->post_title ) )
+ echo $task->post_title;
+ break;
+
+ case 'start':
+ $start = get_post_meta( $id, '_propel_time_end', true );
+ if($start)
+ echo date('G:i:s', $start );
+ break;
+
+ case 'end':
+ $end = get_post_meta( $id, '_propel_time_end', true );
+ if($end)
+ echo date('G:i:s', $end );
+ break;
+
+ case 'duration':
+ $start = get_post_meta( $id, '_propel_time_start', true );
+ $end = get_post_meta( $id, '_propel_time_end', true );
+ echo date('G:i:s', $end-$start );
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ /**
+ * Create a WP-Invoice
+ * @since 2.0
+ */
+ public static function bill() {
+ die("Sorry, not implemented yet...");
+ }
+}
+
?>
\ No newline at end of file
diff --git a/propel.php b/propel.php
index 91748d5..6aec1b8 100644
--- a/propel.php
+++ b/propel.php
@@ -87,6 +87,7 @@ public static function admin_init () {
plugins_url( '/propel/js/jquery.dataTables.min.js' ), array('jquery', 'jquery-ui-core') );
wp_enqueue_script('propel-functions',
plugins_url( '/propel/js/functions.js' ), array( 'jquery-datatables' ) );
+ wp_enqueue_script('propel-keys', plugins_url( '/propel/js/keys.js' ) );
wp_register_style("propel-admin-jquery-ui", plugins_url( '/propel/themes/smoothness/jquery-ui-1.8.6.custom.css' ) );
wp_enqueue_style('propel-admin-jquery-ui');
}
@@ -107,13 +108,17 @@ public static function init () {
wp_enqueue_script('jquery-ui-tabs');
wp_enqueue_script('jquery-ui-datepicker',
plugins_url( '/propel/js/jquery.ui.datepicker.min.js' ), array('jquery', 'jquery-ui-core') );
+ wp_enqueue_script('jquery-ui-sliderAccess',
+ plugins_url( '/propel/js/jquery-ui-sliderAccess.js' ), array('jquery', 'jquery-ui-core') );
+ wp_enqueue_script('jquery-ui-timepicker-addon',
+ plugins_url( '/propel/js/jquery-ui-timepicker-addon.js' ), array('jquery', 'jquery-ui-core', 'jquery-ui-datepicker', 'jquery-ui-slider'));
wp_enqueue_script('jquery-ui-progressbar',
plugins_url( '/propel/js/jquery.ui.progressbar.min.js' ), array('jquery', 'jquery-ui-core', 'jquery-ui-widget') );
$options = get_option( 'propel_options' );
wp_register_style("propel-jquery-ui", $options['theme'] );
- wp_register_style("genesis-ui", plugins_url( '/propel/gen/ui.css' ) );
- wp_register_style("propel-ui", plugins_url( '/propel/style.css' ) );
+ wp_register_style("genesis-ui", plugins_url( '/propel/ui/gen/ui.css' ) );
+ wp_register_style("propel-ui", plugins_url( '/propel/ui/style.css' ) );
wp_enqueue_style('genesis-ui');
wp_enqueue_style('propel-jquery-ui');
diff --git a/readme.txt b/readme.txt
index 096fe5c..29572f7 100644
--- a/readme.txt
+++ b/readme.txt
@@ -1,8 +1,8 @@
=== Propel ===
-Contributors: johnciacia, sidewindernet
-Tags: project, management, collaboration, tasks, project management, task management, basecamp
+Contributors: johnciacia, The Portland Company, sidewindernet
+Tags: project, management, collaboration, tasks, project management, task management, basecamp, mavenlink, do, crm, invoicing, invoices, estimates, estimating, task manager, project manager
Requires at least: 3.0
-Tested up to: 3.3.1
+Tested up to: 3.4
Stable tag: 2.0.4
This plugin allows users to manage projects and tasks.
@@ -13,12 +13,9 @@ This plugin enables you to manage your projects from the
WordPress interface you are already comfortable with. Easily
create and track the progress of projects and tasks.
-If you are having issues with this plugin you may submit a comment here or ask on the WordPress forum .
-
-== Installation ==
+It seamlessly integrates with WP-CRM and WP-Invoice, provided by Usability Dynamics .
-1. Download propel.zip and unzip it.
-2. Upload the plugin folder to wp-content/plugins/ and activate from the Plugin administrative menu.
+If you are having issues with this plugin you may submit a comment here or ask on the WordPress forum .
== Screenshots ==
1. Front-end interface displaying one project. This is done using [pl-projects id=x]. To display all your projects use [pl-projects]
diff --git a/style.css b/style.css
index 4d09d3d..82565ba 100644
--- a/style.css
+++ b/style.css
@@ -47,4 +47,42 @@
.metaboxes-add-task .task-owner {
width: 200px;
float: right;
-}
\ No newline at end of file
+}
+
+.tasks-table p {
+ margin: 5px 0;
+}
+.tasks-table td {
+ padding: 0 0 0 1px;
+ min-width: auto;
+ color: #666;
+ text-shadow: 1px 1px #fff;
+}
+.tasks-table .title {
+ padding: 0 15px 0 0;
+}
+.tasks-table .author {
+ font-size: 10px;
+}
+.tasks-table .odd {
+ background: #fdfdfd;
+}
+.gen-icon {
+ margin: 0;
+ padding: 0;
+}
+.metabox-add-task-title {
+ width: 270px;
+}
+.metabox-add-task-description {
+ float: left;
+ clear: both;
+ height: 23px;
+ margin: 0 0 2px 0;
+ width: 100%;
+}
+
+/*
+* rob tooltip css - other
+*/
+
diff --git a/themes/smoothness/jquery-ui-1.8.6.custom.css b/themes/smoothness/jquery-ui-1.8.6.custom.css
index 09814c6..3ef0c6f 100644
--- a/themes/smoothness/jquery-ui-1.8.6.custom.css
+++ b/themes/smoothness/jquery-ui-1.8.6.custom.css
@@ -1,572 +1,572 @@
-/*
- * jQuery UI CSS Framework 1.8.6
- *
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Theming/API
- */
-
-/* Layout helpers
-----------------------------------*/
-.ui-helper-hidden { display: none; }
-.ui-helper-hidden-accessible { position: absolute; left: -99999999px; }
-.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
-.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
-.ui-helper-clearfix { display: inline-block; }
-/* required comment for clearfix to work in Opera \*/
-* html .ui-helper-clearfix { height:1%; }
-.ui-helper-clearfix { display:block; }
-/* end clearfix */
-.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
-
-
-/* Interaction Cues
-----------------------------------*/
-.ui-state-disabled { cursor: default !important; }
-
-
-/* Icons
-----------------------------------*/
-
-/* states and images */
-.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
-
-
-/* Misc visuals
-----------------------------------*/
-
-/* Overlays */
-.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
-
-
-/*
- * jQuery UI CSS Framework 1.8.6
- *
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Theming/API
- *
- * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana,Arial,sans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=03_highlight_soft.png&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=01_flat.png&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=02_glass.png&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=02_glass.png&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=02_glass.png&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=01_flat.png&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px
- */
-
-
-/* Component containers
-----------------------------------*/
-.ui-widget { font-family: Verdana,Arial,sans-serif; font-size: 1.1em; }
-.ui-widget .ui-widget { font-size: 1em; }
-.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif; font-size: 1em; }
-.ui-widget-content { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x; color: #222222; }
-.ui-widget-content a { color: #222222; }
-.ui-widget-header { border: 1px solid #aaaaaa; background: #cccccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x; color: #222222; font-weight: bold; }
-.ui-widget-header a { color: #222222; }
-
-/* Interaction states
-----------------------------------*/
-.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d3d3d3; background: #e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #555555; }
-.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555; text-decoration: none; }
-.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #999999; background: #dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; }
-.ui-state-hover a, .ui-state-hover a:hover { color: #212121; text-decoration: none; }
-.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; }
-.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121; text-decoration: none; }
-.ui-widget :active { outline: none; }
-
-/* Interaction Cues
-----------------------------------*/
-.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fcefa1; background: #fbf9ee url(images/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x; color: #363636; }
-.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; }
-.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x; color: #cd0a0a; }
-.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a; }
-.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a; }
-.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
-.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
-.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
-
-/* Icons
-----------------------------------*/
-
-/* states and images */
-.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); }
-.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); }
-.ui-widget-header .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); }
-.ui-state-default .ui-icon { background-image: url(images/ui-icons_888888_256x240.png); }
-.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); }
-.ui-state-active .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); }
-.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png); }
-.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cd0a0a_256x240.png); }
-
-/* positioning */
-.ui-icon-carat-1-n { background-position: 0 0; }
-.ui-icon-carat-1-ne { background-position: -16px 0; }
-.ui-icon-carat-1-e { background-position: -32px 0; }
-.ui-icon-carat-1-se { background-position: -48px 0; }
-.ui-icon-carat-1-s { background-position: -64px 0; }
-.ui-icon-carat-1-sw { background-position: -80px 0; }
-.ui-icon-carat-1-w { background-position: -96px 0; }
-.ui-icon-carat-1-nw { background-position: -112px 0; }
-.ui-icon-carat-2-n-s { background-position: -128px 0; }
-.ui-icon-carat-2-e-w { background-position: -144px 0; }
-.ui-icon-triangle-1-n { background-position: 0 -16px; }
-.ui-icon-triangle-1-ne { background-position: -16px -16px; }
-.ui-icon-triangle-1-e { background-position: -32px -16px; }
-.ui-icon-triangle-1-se { background-position: -48px -16px; }
-.ui-icon-triangle-1-s { background-position: -64px -16px; }
-.ui-icon-triangle-1-sw { background-position: -80px -16px; }
-.ui-icon-triangle-1-w { background-position: -96px -16px; }
-.ui-icon-triangle-1-nw { background-position: -112px -16px; }
-.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
-.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
-.ui-icon-arrow-1-n { background-position: 0 -32px; }
-.ui-icon-arrow-1-ne { background-position: -16px -32px; }
-.ui-icon-arrow-1-e { background-position: -32px -32px; }
-.ui-icon-arrow-1-se { background-position: -48px -32px; }
-.ui-icon-arrow-1-s { background-position: -64px -32px; }
-.ui-icon-arrow-1-sw { background-position: -80px -32px; }
-.ui-icon-arrow-1-w { background-position: -96px -32px; }
-.ui-icon-arrow-1-nw { background-position: -112px -32px; }
-.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
-.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
-.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
-.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
-.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
-.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
-.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
-.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
-.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
-.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
-.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
-.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
-.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
-.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
-.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
-.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
-.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
-.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
-.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
-.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
-.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
-.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
-.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
-.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
-.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
-.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
-.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
-.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
-.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
-.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
-.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
-.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
-.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
-.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
-.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
-.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
-.ui-icon-arrow-4 { background-position: 0 -80px; }
-.ui-icon-arrow-4-diag { background-position: -16px -80px; }
-.ui-icon-extlink { background-position: -32px -80px; }
-.ui-icon-newwin { background-position: -48px -80px; }
-.ui-icon-refresh { background-position: -64px -80px; }
-.ui-icon-shuffle { background-position: -80px -80px; }
-.ui-icon-transfer-e-w { background-position: -96px -80px; }
-.ui-icon-transferthick-e-w { background-position: -112px -80px; }
-.ui-icon-folder-collapsed { background-position: 0 -96px; }
-.ui-icon-folder-open { background-position: -16px -96px; }
-.ui-icon-document { background-position: -32px -96px; }
-.ui-icon-document-b { background-position: -48px -96px; }
-.ui-icon-note { background-position: -64px -96px; }
-.ui-icon-mail-closed { background-position: -80px -96px; }
-.ui-icon-mail-open { background-position: -96px -96px; }
-.ui-icon-suitcase { background-position: -112px -96px; }
-.ui-icon-comment { background-position: -128px -96px; }
-.ui-icon-person { background-position: -144px -96px; }
-.ui-icon-print { background-position: -160px -96px; }
-.ui-icon-trash { background-position: -176px -96px; }
-.ui-icon-locked { background-position: -192px -96px; }
-.ui-icon-unlocked { background-position: -208px -96px; }
-.ui-icon-bookmark { background-position: -224px -96px; }
-.ui-icon-tag { background-position: -240px -96px; }
-.ui-icon-home { background-position: 0 -112px; }
-.ui-icon-flag { background-position: -16px -112px; }
-.ui-icon-calendar { background-position: -32px -112px; }
-.ui-icon-cart { background-position: -48px -112px; }
-.ui-icon-pencil { background-position: -64px -112px; }
-.ui-icon-clock { background-position: -80px -112px; }
-.ui-icon-disk { background-position: -96px -112px; }
-.ui-icon-calculator { background-position: -112px -112px; }
-.ui-icon-zoomin { background-position: -128px -112px; }
-.ui-icon-zoomout { background-position: -144px -112px; }
-.ui-icon-search { background-position: -160px -112px; }
-.ui-icon-wrench { background-position: -176px -112px; }
-.ui-icon-gear { background-position: -192px -112px; }
-.ui-icon-heart { background-position: -208px -112px; }
-.ui-icon-star { background-position: -224px -112px; }
-.ui-icon-link { background-position: -240px -112px; }
-.ui-icon-cancel { background-position: 0 -128px; }
-.ui-icon-plus { background-position: -16px -128px; }
-.ui-icon-plusthick { background-position: -32px -128px; }
-.ui-icon-minus { background-position: -48px -128px; }
-.ui-icon-minusthick { background-position: -64px -128px; }
-.ui-icon-close { background-position: -80px -128px; }
-.ui-icon-closethick { background-position: -96px -128px; }
-.ui-icon-key { background-position: -112px -128px; }
-.ui-icon-lightbulb { background-position: -128px -128px; }
-.ui-icon-scissors { background-position: -144px -128px; }
-.ui-icon-clipboard { background-position: -160px -128px; }
-.ui-icon-copy { background-position: -176px -128px; }
-.ui-icon-contact { background-position: -192px -128px; }
-.ui-icon-image { background-position: -208px -128px; }
-.ui-icon-video { background-position: -224px -128px; }
-.ui-icon-script { background-position: -240px -128px; }
-.ui-icon-alert { background-position: 0 -144px; }
-.ui-icon-info { background-position: -16px -144px; }
-.ui-icon-notice { background-position: -32px -144px; }
-.ui-icon-help { background-position: -48px -144px; }
-.ui-icon-check { background-position: -64px -144px; }
-.ui-icon-bullet { background-position: -80px -144px; }
-.ui-icon-radio-off { background-position: -96px -144px; }
-.ui-icon-radio-on { background-position: -112px -144px; }
-.ui-icon-pin-w { background-position: -128px -144px; }
-.ui-icon-pin-s { background-position: -144px -144px; }
-.ui-icon-play { background-position: 0 -160px; }
-.ui-icon-pause { background-position: -16px -160px; }
-.ui-icon-seek-next { background-position: -32px -160px; }
-.ui-icon-seek-prev { background-position: -48px -160px; }
-.ui-icon-seek-end { background-position: -64px -160px; }
-.ui-icon-seek-start { background-position: -80px -160px; }
-/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
-.ui-icon-seek-first { background-position: -80px -160px; }
-.ui-icon-stop { background-position: -96px -160px; }
-.ui-icon-eject { background-position: -112px -160px; }
-.ui-icon-volume-off { background-position: -128px -160px; }
-.ui-icon-volume-on { background-position: -144px -160px; }
-.ui-icon-power { background-position: 0 -176px; }
-.ui-icon-signal-diag { background-position: -16px -176px; }
-.ui-icon-signal { background-position: -32px -176px; }
-.ui-icon-battery-0 { background-position: -48px -176px; }
-.ui-icon-battery-1 { background-position: -64px -176px; }
-.ui-icon-battery-2 { background-position: -80px -176px; }
-.ui-icon-battery-3 { background-position: -96px -176px; }
-.ui-icon-circle-plus { background-position: 0 -192px; }
-.ui-icon-circle-minus { background-position: -16px -192px; }
-.ui-icon-circle-close { background-position: -32px -192px; }
-.ui-icon-circle-triangle-e { background-position: -48px -192px; }
-.ui-icon-circle-triangle-s { background-position: -64px -192px; }
-.ui-icon-circle-triangle-w { background-position: -80px -192px; }
-.ui-icon-circle-triangle-n { background-position: -96px -192px; }
-.ui-icon-circle-arrow-e { background-position: -112px -192px; }
-.ui-icon-circle-arrow-s { background-position: -128px -192px; }
-.ui-icon-circle-arrow-w { background-position: -144px -192px; }
-.ui-icon-circle-arrow-n { background-position: -160px -192px; }
-.ui-icon-circle-zoomin { background-position: -176px -192px; }
-.ui-icon-circle-zoomout { background-position: -192px -192px; }
-.ui-icon-circle-check { background-position: -208px -192px; }
-.ui-icon-circlesmall-plus { background-position: 0 -208px; }
-.ui-icon-circlesmall-minus { background-position: -16px -208px; }
-.ui-icon-circlesmall-close { background-position: -32px -208px; }
-.ui-icon-squaresmall-plus { background-position: -48px -208px; }
-.ui-icon-squaresmall-minus { background-position: -64px -208px; }
-.ui-icon-squaresmall-close { background-position: -80px -208px; }
-.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
-.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
-.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
-.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
-.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
-.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
-
-
-/* Misc visuals
-----------------------------------*/
-
-/* Corner radius */
-.ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; }
-.ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; }
-.ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; }
-.ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
-.ui-corner-top { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; }
-.ui-corner-bottom { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
-.ui-corner-right { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
-.ui-corner-left { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; }
-.ui-corner-all { -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; }
-
-/* Overlays */
-.ui-widget-overlay { background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); }
-.ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }/*
- * jQuery UI Resizable 1.8.6
- *
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Resizable#theming
- */
-.ui-resizable { position: relative;}
-.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;}
-.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
-.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; }
-.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; }
-.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; }
-.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; }
-.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }
-.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
-.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
-.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/*
- * jQuery UI Selectable 1.8.6
- *
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Selectable#theming
- */
-.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; }
-/*
- * jQuery UI Accordion 1.8.6
- *
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Accordion#theming
- */
-/* IE/Win - Fix animation bug - #4615 */
-.ui-accordion { width: 100%; }
-.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; }
-.ui-accordion .ui-accordion-li-fix { display: inline; }
-.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; }
-.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; }
-.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; }
-.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
-.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; }
-.ui-accordion .ui-accordion-content-active { display: block; }/*
- * jQuery UI Autocomplete 1.8.6
- *
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Autocomplete#theming
- */
-.ui-autocomplete { position: absolute; cursor: default; }
-
-/* workarounds */
-* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
-
-/*
- * jQuery UI Menu 1.8.6
- *
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Menu#theming
- */
-.ui-menu {
- list-style:none;
- padding: 2px;
- margin: 0;
- display:block;
- float: left;
-}
-.ui-menu .ui-menu {
- margin-top: -3px;
-}
-.ui-menu .ui-menu-item {
- margin:0;
- padding: 0;
- zoom: 1;
- float: left;
- clear: left;
- width: 100%;
-}
-.ui-menu .ui-menu-item a {
- text-decoration:none;
- display:block;
- padding:.2em .4em;
- line-height:1.5;
- zoom:1;
-}
-.ui-menu .ui-menu-item a.ui-state-hover,
-.ui-menu .ui-menu-item a.ui-state-active {
- font-weight: normal;
- margin: -1px;
-}
-/*
- * jQuery UI Button 1.8.6
- *
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Button#theming
- */
-.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */
-.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */
-button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */
-.ui-button-icons-only { width: 3.4em; }
-button.ui-button-icons-only { width: 3.7em; }
-
-/*button text element */
-.ui-button .ui-button-text { display: block; line-height: 1.4; }
-.ui-button-text-only .ui-button-text { padding: .4em 1em; }
-.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; }
-.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; }
-.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; }
-.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; }
-/* no icon support for input elements, provide padding by default */
-input.ui-button { padding: .4em 1em; }
-
-/*button icon element(s) */
-.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; }
-.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; }
-.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; }
-.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
-.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
-
-/*button sets*/
-.ui-buttonset { margin-right: 7px; }
-.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; }
-
-/* workarounds */
-button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */
-/*
- * jQuery UI Dialog 1.8.6
- *
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Dialog#theming
- */
-.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; }
-.ui-dialog .ui-dialog-titlebar { padding: .5em 1em .3em; position: relative; }
-.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .2em 0; }
-.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
-.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
-.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
-.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
-.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
-.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; }
-.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; }
-.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
-.ui-draggable .ui-dialog-titlebar { cursor: move; }
-/*
- * jQuery UI Slider 1.8.6
- *
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Slider#theming
- */
-.ui-slider { position: relative; text-align: left; }
-.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
-.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
-
-.ui-slider-horizontal { height: .8em; }
-.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
-.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
-.ui-slider-horizontal .ui-slider-range-min { left: 0; }
-.ui-slider-horizontal .ui-slider-range-max { right: 0; }
-
-.ui-slider-vertical { width: .8em; height: 100px; }
-.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
-.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
-.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
-.ui-slider-vertical .ui-slider-range-max { top: 0; }/*
- * jQuery UI Tabs 1.8.6
- *
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Tabs#theming
- */
-.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
-.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }
-.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }
-.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; }
-.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; }
-.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
-.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
-.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; }
-.ui-tabs .ui-tabs-hide { display: none !important; }
-/*
- * jQuery UI Datepicker 1.8.6
- *
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Datepicker#theming
- */
-.ui-datepicker { width: 17em; padding: .2em .2em 0; }
-.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
-.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
-.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
-.ui-datepicker .ui-datepicker-prev { left:2px; }
-.ui-datepicker .ui-datepicker-next { right:2px; }
-.ui-datepicker .ui-datepicker-prev-hover { left:1px; }
-.ui-datepicker .ui-datepicker-next-hover { right:1px; }
-.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; }
-.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
-.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
-.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
-.ui-datepicker select.ui-datepicker-month,
-.ui-datepicker select.ui-datepicker-year { width: 49%;}
-.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
-.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
-.ui-datepicker td { border: 0; padding: 1px; }
-.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
-.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
-.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
-.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
-
-/* with multiple calendars */
-.ui-datepicker.ui-datepicker-multi { width:auto; }
-.ui-datepicker-multi .ui-datepicker-group { float:left; }
-.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
-.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
-.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
-.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
-.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
-.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
-.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
-.ui-datepicker-row-break { clear:both; width:100%; }
-
-/* RTL support */
-.ui-datepicker-rtl { direction: rtl; }
-.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
-.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
-.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
-.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
-.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
-.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
-.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
-.ui-datepicker-rtl .ui-datepicker-group { float:right; }
-.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
-.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
-
-/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
-.ui-datepicker-cover {
- display: none; /*sorry for IE5*/
- display/**/: block; /*sorry for IE5*/
- position: absolute; /*must have*/
- z-index: -1; /*must have*/
- filter: mask(); /*must have*/
- top: -4px; /*must have*/
- left: -4px; /*must have*/
- width: 200px; /*must have*/
- height: 200px; /*must have*/
-}/*
- * jQuery UI Progressbar 1.8.6
- *
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Progressbar#theming
- */
-.ui-progressbar { height:2em; text-align: left; }
+/*
+ * jQuery UI CSS Framework 1.8.6
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Theming/API
+ */
+
+/* Layout helpers
+----------------------------------*/
+.ui-helper-hidden { display: none; }
+.ui-helper-hidden-accessible { position: absolute; left: -99999999px; }
+.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
+.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
+.ui-helper-clearfix { display: inline-block; }
+/* required comment for clearfix to work in Opera \*/
+* html .ui-helper-clearfix { height:1%; }
+.ui-helper-clearfix { display:block; }
+/* end clearfix */
+.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
+
+
+/* Interaction Cues
+----------------------------------*/
+.ui-state-disabled { cursor: default !important; }
+
+
+/* Icons
+----------------------------------*/
+
+/* states and images */
+.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
+
+
+/* Misc visuals
+----------------------------------*/
+
+/* Overlays */
+.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
+
+
+/*
+ * jQuery UI CSS Framework 1.8.6
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Theming/API
+ *
+ * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana,Arial,sans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=03_highlight_soft.png&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=01_flat.png&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=02_glass.png&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=02_glass.png&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=02_glass.png&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=01_flat.png&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px
+ */
+
+
+/* Component containers
+----------------------------------*/
+.ui-widget { font-family: Verdana,Arial,sans-serif; font-size: 1.1em; }
+.ui-widget .ui-widget { font-size: 1em; }
+.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif; font-size: 1em; }
+.ui-widget-content { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x; color: #222222; }
+.ui-widget-content a { color: #222222; }
+.ui-widget-header { border: 1px solid #aaaaaa; background: #cccccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x; color: #222222; font-weight: bold; }
+.ui-widget-header a { color: #222222; }
+
+/* Interaction states
+----------------------------------*/
+.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d3d3d3; background: #e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #555555; }
+.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555; text-decoration: none; }
+.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #999999; background: #dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; }
+.ui-state-hover a, .ui-state-hover a:hover { color: #212121; text-decoration: none; }
+.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; }
+.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121; text-decoration: none; }
+.ui-widget :active { outline: none; }
+
+/* Interaction Cues
+----------------------------------*/
+.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fcefa1; background: #fbf9ee url(images/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x; color: #363636; }
+.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; }
+.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x; color: #cd0a0a; }
+.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a; }
+.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a; }
+.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
+.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
+.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
+
+/* Icons
+----------------------------------*/
+
+/* states and images */
+.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); }
+.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); }
+.ui-widget-header .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); }
+.ui-state-default .ui-icon { background-image: url(images/ui-icons_888888_256x240.png); }
+.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); }
+.ui-state-active .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); }
+.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png); }
+.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cd0a0a_256x240.png); }
+
+/* positioning */
+.ui-icon-carat-1-n { background-position: 0 0; }
+.ui-icon-carat-1-ne { background-position: -16px 0; }
+.ui-icon-carat-1-e { background-position: -32px 0; }
+.ui-icon-carat-1-se { background-position: -48px 0; }
+.ui-icon-carat-1-s { background-position: -64px 0; }
+.ui-icon-carat-1-sw { background-position: -80px 0; }
+.ui-icon-carat-1-w { background-position: -96px 0; }
+.ui-icon-carat-1-nw { background-position: -112px 0; }
+.ui-icon-carat-2-n-s { background-position: -128px 0; }
+.ui-icon-carat-2-e-w { background-position: -144px 0; }
+.ui-icon-triangle-1-n { background-position: 0 -16px; }
+.ui-icon-triangle-1-ne { background-position: -16px -16px; }
+.ui-icon-triangle-1-e { background-position: -32px -16px; }
+.ui-icon-triangle-1-se { background-position: -48px -16px; }
+.ui-icon-triangle-1-s { background-position: -64px -16px; }
+.ui-icon-triangle-1-sw { background-position: -80px -16px; }
+.ui-icon-triangle-1-w { background-position: -96px -16px; }
+.ui-icon-triangle-1-nw { background-position: -112px -16px; }
+.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
+.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
+.ui-icon-arrow-1-n { background-position: 0 -32px; }
+.ui-icon-arrow-1-ne { background-position: -16px -32px; }
+.ui-icon-arrow-1-e { background-position: -32px -32px; }
+.ui-icon-arrow-1-se { background-position: -48px -32px; }
+.ui-icon-arrow-1-s { background-position: -64px -32px; }
+.ui-icon-arrow-1-sw { background-position: -80px -32px; }
+.ui-icon-arrow-1-w { background-position: -96px -32px; }
+.ui-icon-arrow-1-nw { background-position: -112px -32px; }
+.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
+.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
+.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
+.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
+.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
+.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
+.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
+.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
+.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
+.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
+.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
+.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
+.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
+.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
+.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
+.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
+.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
+.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
+.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
+.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
+.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
+.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
+.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
+.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
+.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
+.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
+.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
+.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
+.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
+.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
+.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
+.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
+.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
+.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
+.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
+.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
+.ui-icon-arrow-4 { background-position: 0 -80px; }
+.ui-icon-arrow-4-diag { background-position: -16px -80px; }
+.ui-icon-extlink { background-position: -32px -80px; }
+.ui-icon-newwin { background-position: -48px -80px; }
+.ui-icon-refresh { background-position: -64px -80px; }
+.ui-icon-shuffle { background-position: -80px -80px; }
+.ui-icon-transfer-e-w { background-position: -96px -80px; }
+.ui-icon-transferthick-e-w { background-position: -112px -80px; }
+.ui-icon-folder-collapsed { background-position: 0 -96px; }
+.ui-icon-folder-open { background-position: -16px -96px; }
+.ui-icon-document { background-position: -32px -96px; }
+.ui-icon-document-b { background-position: -48px -96px; }
+.ui-icon-note { background-position: -64px -96px; }
+.ui-icon-mail-closed { background-position: -80px -96px; }
+.ui-icon-mail-open { background-position: -96px -96px; }
+.ui-icon-suitcase { background-position: -112px -96px; }
+.ui-icon-comment { background-position: -128px -96px; }
+.ui-icon-person { background-position: -144px -96px; }
+.ui-icon-print { background-position: -160px -96px; }
+.ui-icon-trash { background-position: -176px -96px; }
+.ui-icon-locked { background-position: -192px -96px; }
+.ui-icon-unlocked { background-position: -208px -96px; }
+.ui-icon-bookmark { background-position: -224px -96px; }
+.ui-icon-tag { background-position: -240px -96px; }
+.ui-icon-home { background-position: 0 -112px; }
+.ui-icon-flag { background-position: -16px -112px; }
+.ui-icon-calendar { background-position: -32px -112px; }
+.ui-icon-cart { background-position: -48px -112px; }
+.ui-icon-pencil { background-position: -64px -112px; }
+.ui-icon-clock { background-position: -80px -112px; }
+.ui-icon-disk { background-position: -96px -112px; }
+.ui-icon-calculator { background-position: -112px -112px; }
+.ui-icon-zoomin { background-position: -128px -112px; }
+.ui-icon-zoomout { background-position: -144px -112px; }
+.ui-icon-search { background-position: -160px -112px; }
+.ui-icon-wrench { background-position: -176px -112px; }
+.ui-icon-gear { background-position: -192px -112px; }
+.ui-icon-heart { background-position: -208px -112px; }
+.ui-icon-star { background-position: -224px -112px; }
+.ui-icon-link { background-position: -240px -112px; }
+.ui-icon-cancel { background-position: 0 -128px; }
+.ui-icon-plus { background-position: -16px -128px; }
+.ui-icon-plusthick { background-position: -32px -128px; }
+.ui-icon-minus { background-position: -48px -128px; }
+.ui-icon-minusthick { background-position: -64px -128px; }
+.ui-icon-close { background-position: -80px -128px; }
+.ui-icon-closethick { background-position: -96px -128px; }
+.ui-icon-key { background-position: -112px -128px; }
+.ui-icon-lightbulb { background-position: -128px -128px; }
+.ui-icon-scissors { background-position: -144px -128px; }
+.ui-icon-clipboard { background-position: -160px -128px; }
+.ui-icon-copy { background-position: -176px -128px; }
+.ui-icon-contact { background-position: -192px -128px; }
+.ui-icon-image { background-position: -208px -128px; }
+.ui-icon-video { background-position: -224px -128px; }
+.ui-icon-script { background-position: -240px -128px; }
+.ui-icon-alert { background-position: 0 -144px; }
+.ui-icon-info { background-position: -16px -144px; }
+.ui-icon-notice { background-position: -32px -144px; }
+.ui-icon-help { background-position: -48px -144px; }
+.ui-icon-check { background-position: -64px -144px; }
+.ui-icon-bullet { background-position: -80px -144px; }
+.ui-icon-radio-off { background-position: -96px -144px; }
+.ui-icon-radio-on { background-position: -112px -144px; }
+.ui-icon-pin-w { background-position: -128px -144px; }
+.ui-icon-pin-s { background-position: -144px -144px; }
+.ui-icon-play { background-position: 0 -160px; }
+.ui-icon-pause { background-position: -16px -160px; }
+.ui-icon-seek-next { background-position: -32px -160px; }
+.ui-icon-seek-prev { background-position: -48px -160px; }
+.ui-icon-seek-end { background-position: -64px -160px; }
+.ui-icon-seek-start { background-position: -80px -160px; }
+/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
+.ui-icon-seek-first { background-position: -80px -160px; }
+.ui-icon-stop { background-position: -96px -160px; }
+.ui-icon-eject { background-position: -112px -160px; }
+.ui-icon-volume-off { background-position: -128px -160px; }
+.ui-icon-volume-on { background-position: -144px -160px; }
+.ui-icon-power { background-position: 0 -176px; }
+.ui-icon-signal-diag { background-position: -16px -176px; }
+.ui-icon-signal { background-position: -32px -176px; }
+.ui-icon-battery-0 { background-position: -48px -176px; }
+.ui-icon-battery-1 { background-position: -64px -176px; }
+.ui-icon-battery-2 { background-position: -80px -176px; }
+.ui-icon-battery-3 { background-position: -96px -176px; }
+.ui-icon-circle-plus { background-position: 0 -192px; }
+.ui-icon-circle-minus { background-position: -16px -192px; }
+.ui-icon-circle-close { background-position: -32px -192px; }
+.ui-icon-circle-triangle-e { background-position: -48px -192px; }
+.ui-icon-circle-triangle-s { background-position: -64px -192px; }
+.ui-icon-circle-triangle-w { background-position: -80px -192px; }
+.ui-icon-circle-triangle-n { background-position: -96px -192px; }
+.ui-icon-circle-arrow-e { background-position: -112px -192px; }
+.ui-icon-circle-arrow-s { background-position: -128px -192px; }
+.ui-icon-circle-arrow-w { background-position: -144px -192px; }
+.ui-icon-circle-arrow-n { background-position: -160px -192px; }
+.ui-icon-circle-zoomin { background-position: -176px -192px; }
+.ui-icon-circle-zoomout { background-position: -192px -192px; }
+.ui-icon-circle-check { background-position: -208px -192px; }
+.ui-icon-circlesmall-plus { background-position: 0 -208px; }
+.ui-icon-circlesmall-minus { background-position: -16px -208px; }
+.ui-icon-circlesmall-close { background-position: -32px -208px; }
+.ui-icon-squaresmall-plus { background-position: -48px -208px; }
+.ui-icon-squaresmall-minus { background-position: -64px -208px; }
+.ui-icon-squaresmall-close { background-position: -80px -208px; }
+.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
+.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
+.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
+.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
+.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
+.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
+
+
+/* Misc visuals
+----------------------------------*/
+
+/* Corner radius */
+.ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; }
+.ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; }
+.ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; }
+.ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
+.ui-corner-top { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; }
+.ui-corner-bottom { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
+.ui-corner-right { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
+.ui-corner-left { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; }
+.ui-corner-all { -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; }
+
+/* Overlays */
+.ui-widget-overlay { background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); }
+.ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }/*
+ * jQuery UI Resizable 1.8.6
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Resizable#theming
+ */
+.ui-resizable { position: relative;}
+.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;}
+.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
+.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; }
+.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; }
+.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; }
+.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; }
+.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }
+.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
+.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
+.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/*
+ * jQuery UI Selectable 1.8.6
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Selectable#theming
+ */
+.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; }
+/*
+ * jQuery UI Accordion 1.8.6
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Accordion#theming
+ */
+/* IE/Win - Fix animation bug - #4615 */
+.ui-accordion { width: 100%; }
+.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; }
+.ui-accordion .ui-accordion-li-fix { display: inline; }
+.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; }
+.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; }
+.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; }
+.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
+.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; }
+.ui-accordion .ui-accordion-content-active { display: block; }/*
+ * jQuery UI Autocomplete 1.8.6
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Autocomplete#theming
+ */
+.ui-autocomplete { position: absolute; cursor: default; }
+
+/* workarounds */
+* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
+
+/*
+ * jQuery UI Menu 1.8.6
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Menu#theming
+ */
+.ui-menu {
+ list-style:none;
+ padding: 2px;
+ margin: 0;
+ display:block;
+ float: left;
+}
+.ui-menu .ui-menu {
+ margin-top: -3px;
+}
+.ui-menu .ui-menu-item {
+ margin:0;
+ padding: 0;
+ zoom: 1;
+ float: left;
+ clear: left;
+ width: 100%;
+}
+.ui-menu .ui-menu-item a {
+ text-decoration:none;
+ display:block;
+ padding:.2em .4em;
+ line-height:1.5;
+ zoom:1;
+}
+.ui-menu .ui-menu-item a.ui-state-hover,
+.ui-menu .ui-menu-item a.ui-state-active {
+ font-weight: normal;
+ margin: -1px;
+}
+/*
+ * jQuery UI Button 1.8.6
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Button#theming
+ */
+.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */
+.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */
+button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */
+.ui-button-icons-only { width: 3.4em; }
+button.ui-button-icons-only { width: 3.7em; }
+
+/*button text element */
+.ui-button .ui-button-text { display: block; line-height: 1.4; }
+.ui-button-text-only .ui-button-text { padding: .4em 1em; }
+.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; }
+.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; }
+.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; }
+.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; }
+/* no icon support for input elements, provide padding by default */
+input.ui-button { padding: .4em 1em; }
+
+/*button icon element(s) */
+.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; }
+.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; }
+.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; }
+.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
+.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
+
+/*button sets*/
+.ui-buttonset { margin-right: 7px; }
+.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; }
+
+/* workarounds */
+button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */
+/*
+ * jQuery UI Dialog 1.8.6
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Dialog#theming
+ */
+.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; }
+.ui-dialog .ui-dialog-titlebar { padding: .5em 1em .3em; position: relative; }
+.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .2em 0; }
+.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
+.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
+.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
+.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
+.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
+.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; }
+.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; }
+.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
+.ui-draggable .ui-dialog-titlebar { cursor: move; }
+/*
+ * jQuery UI Slider 1.8.6
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Slider#theming
+ */
+.ui-slider { position: relative; text-align: left; }
+.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
+.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
+
+.ui-slider-horizontal { height: .8em; }
+.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
+.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
+.ui-slider-horizontal .ui-slider-range-min { left: 0; }
+.ui-slider-horizontal .ui-slider-range-max { right: 0; }
+
+.ui-slider-vertical { width: .8em; height: 100px; }
+.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
+.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
+.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
+.ui-slider-vertical .ui-slider-range-max { top: 0; }/*
+ * jQuery UI Tabs 1.8.6
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Tabs#theming
+ */
+.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
+.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }
+.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }
+.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; }
+.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; }
+.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
+.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
+.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; }
+.ui-tabs .ui-tabs-hide { display: none !important; }
+/*
+ * jQuery UI Datepicker 1.8.6
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Datepicker#theming
+ */
+.ui-datepicker { width: 17em; padding: .2em .2em 0; }
+.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
+.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
+.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
+.ui-datepicker .ui-datepicker-prev { left:2px; }
+.ui-datepicker .ui-datepicker-next { right:2px; }
+.ui-datepicker .ui-datepicker-prev-hover { left:1px; }
+.ui-datepicker .ui-datepicker-next-hover { right:1px; }
+.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; }
+.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
+.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
+.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
+.ui-datepicker select.ui-datepicker-month,
+.ui-datepicker select.ui-datepicker-year { width: 49%;}
+.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
+.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
+.ui-datepicker td { border: 0; padding: 1px; }
+.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
+.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
+.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
+.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
+
+/* with multiple calendars */
+.ui-datepicker.ui-datepicker-multi { width:auto; }
+.ui-datepicker-multi .ui-datepicker-group { float:left; }
+.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
+.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
+.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
+.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
+.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
+.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
+.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
+.ui-datepicker-row-break { clear:both; width:100%; }
+
+/* RTL support */
+.ui-datepicker-rtl { direction: rtl; }
+.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
+.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
+.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
+.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
+.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
+.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
+.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
+.ui-datepicker-rtl .ui-datepicker-group { float:right; }
+.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
+.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
+
+/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
+.ui-datepicker-cover {
+ display: none; /*sorry for IE5*/
+ display/**/: block; /*sorry for IE5*/
+ position: absolute; /*must have*/
+ z-index: -1; /*must have*/
+ filter: mask(); /*must have*/
+ top: -4px; /*must have*/
+ left: -4px; /*must have*/
+ width: 200px; /*must have*/
+ height: 200px; /*must have*/
+}/*
+ * jQuery UI Progressbar 1.8.6
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Progressbar#theming
+ */
+.ui-progressbar { height:2em; text-align: left; }
.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }
\ No newline at end of file
diff --git a/ui/gen/images/checked.png b/ui/gen/images/checked.png
new file mode 100644
index 0000000..8ca5395
Binary files /dev/null and b/ui/gen/images/checked.png differ
diff --git a/ui/gen/images/delete.png b/ui/gen/images/delete.png
new file mode 100644
index 0000000..55e388b
Binary files /dev/null and b/ui/gen/images/delete.png differ
diff --git a/ui/gen/images/edit.png b/ui/gen/images/edit.png
new file mode 100644
index 0000000..957ff73
Binary files /dev/null and b/ui/gen/images/edit.png differ
diff --git a/ui/gen/images/info.png b/ui/gen/images/info.png
new file mode 100644
index 0000000..733ab31
Binary files /dev/null and b/ui/gen/images/info.png differ
diff --git a/ui/gen/images/unchecked.png b/ui/gen/images/unchecked.png
new file mode 100644
index 0000000..1176521
Binary files /dev/null and b/ui/gen/images/unchecked.png differ
diff --git a/ui/gen/ui.css b/ui/gen/ui.css
new file mode 100644
index 0000000..41f55b0
--- /dev/null
+++ b/ui/gen/ui.css
@@ -0,0 +1,115 @@
+.gen-table {
+ background-color: #F9F9F9;
+ border-color: #DFDFDF;
+ border-radius: 3px;
+ border-spacing: 0;
+ border-style: solid;
+ border-width: 1px;
+ text-align: left;
+}
+
+.gen-table thead tr {
+ background-color: #F1F1F1;
+}
+
+.gen-table .gen-hidden {
+ display: none;
+}
+/*
+.gen-table tbody:hover {
+ background-color: #F1F1F1;
+ cursor: pointer;
+}
+*/
+
+.gen-table td {
+ border-top: 1px solid #DFDFDF;
+ padding-left: 10px;
+}
+
+.gen-icon {
+ width: 24px;
+ text-align: center;
+}
+
+.gen-icon a:hover {
+ opacity: 1;
+}
+
+.gen-icon a {
+ text-align: center;
+ height: 16px;
+ margin-top: 1px;
+ opacity: 0.5;
+ text-indent: -9999px;
+ width: 16px;
+ display: block;
+ background-position: center;
+}
+
+.gen-delete-icon a {
+ background: url('images/delete.png') no-repeat;
+}
+
+.gen-edit-icon a {
+ background: url('images/edit.png') no-repeat;
+}
+
+.gen-unchecked-icon a {
+ background: url('images/unchecked.png') no-repeat;
+}
+
+.gen-checked-icon a {
+ background: url('images/checked.png') no-repeat;
+}
+
+.gen-table th.sortable {
+ color: #000;
+ cursor: pointer;
+ text-decoration: underline;
+ padding-left: 10px;
+}
+
+
+.dataTables_length {
+ width: 40%;
+ float: left;
+ margin: 5px;
+}
+
+.dataTables_filter {
+ width:30%;
+ float: right;
+ text-align: right;
+ margin: 5px;
+}
+
+.dataTables_info {
+ width:40%;
+ float: left;
+ margin: 5px;
+ margin-top: 15px;
+}
+
+.dataTables_paginate {
+ float: right;
+ text-align: right;
+ margin: 5px;
+ margin-top: 15px;
+}
+
+.paginate_active, .paginate_button {
+ margin: 2px;
+ border: 1px solid lightGrey;
+ font-weight: normal;
+ color: #555;
+ padding: 4px;
+ cursor: pointer;
+ background: #E6E6E6;
+}
+
+.paginate_active {
+ font-weight: bold;
+ border: 1px solid darkGrey;
+
+}
\ No newline at end of file
diff --git a/ui/style.css b/ui/style.css
new file mode 100644
index 0000000..ce9c1e3
--- /dev/null
+++ b/ui/style.css
@@ -0,0 +1,112 @@
+/* There appears to be a div in the lower left of WordPress that displays with this class, can't tell what it's related to so this should get figured out at some point. */
+#ui-datepicker-div {
+ display: none;
+}
+
+
+/* beginning of metaboxes-project-meta */
+/* beginning of metaboxes-project-meta */
+.metaboxes-project-meta {
+ width: 100%;
+}
+.metaboxes-project-meta .first-column {
+ font-size: 12px;
+ color: #999;
+}
+.metaboxes-project-meta .second-column {
+ width: 100px;
+}
+.metaboxes-project-meta select {
+ float: right;
+ width: 170px;
+}
+.metaboxes-project-meta input {
+ float: right;
+}
+
+
+
+/* beginning of metaboxes-add-task */
+/* beginning of metaboxes-add-task */
+.metaboxes-add-task {
+ width: 100%;
+}
+.metaboxes-add-task .widefat {
+ width: 100% !important;
+}
+.metaboxes-add-task label {
+ float: left;
+ margin: 5px 0 0 0;
+ font-size: 12px;
+ color: #999;
+}
+.metaboxes-add-task .task-priority {
+ width: 200px;
+ float: right;
+}
+.metaboxes-add-task .task-owner {
+ float: right;
+}
+.metabox-add-task-title {
+ width: 270px;
+}
+.metabox-add-task-date {
+ width: 150px;
+}
+.metabox-add-task-description {
+ height: 33px;
+ margin: 5px 0 2px 0;
+ width: 100%;
+}
+
+.tasks-table thead tr th {
+ padding: 0 !important;
+}
+.tasks-table thead p {
+ color: #666;
+ font-weight: bold;
+ text-shadow: 1px 1px #fff;
+}
+.tasks-table .start-date, .tasks-table .end-date {
+ font-size: 10px;
+ color: #999;
+}
+.tasks-table p {
+ margin: 5px 0;
+}
+.tasks-table td {
+ padding: 0 0 0 1px;
+ min-width: auto;
+ color: #666;
+ text-shadow: 1px 1px #fff;
+}
+.tasks-table .title {
+ padding: 0 15px 0 0;
+}
+.tasks-table .author {
+ font-size: 10px;
+}
+.tasks-table .odd {
+ background: #fdfdfd;
+}
+.gen-icon {
+ margin: 0;
+ padding: 0;
+}
+#propel_add_task .inside p {
+ margin:0;
+}
+#propel_project_tasks .inside table, #propel_completed_tasks .inside table {
+ border: none;
+}
+#propel_project_tasks .inside, #propel_completed_tasks .inside {
+ margin: 0;
+ padding: 0;
+}
+.dataTables_empty p {
+ color: #999;
+ padding: 0 0 0 5px;
+}
+#propel_project_tasks input[type='text'] {
+ width: 100%;
+}
\ No newline at end of file
diff --git a/widgets/all-tasks.php b/widgets/all-tasks.php
new file mode 100644
index 0000000..e69de29
$task->ID, // use post_id, not post_ID + 'count' => true //return only the count + ); + $comments = get_comments($args); + echo $comments; + ?>
+