Skip to content

Commit

Permalink
Merge branch '1.9.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
eoxia-corentin-settelen committed Feb 21, 2019
2 parents 5526b52 + bca705e commit 210907a
Show file tree
Hide file tree
Showing 481 changed files with 48,140 additions and 33,858 deletions.
38 changes: 38 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
sudo: false
dist: trusty

language: php

notifications:
email:
on_success: never
on_failure: change

cache:
directories:
- $HOME/.composer/cache

matrix:
include:
- php: 5.6
env: WP_TRAVISCI=phpcs

before_script:
- export PATH="$HOME/.composer/vendor/bin:$PATH"
- |
if [ -f ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini ]; then
phpenv config-rm xdebug.ini
else
echo "xdebug.ini does not exist"
fi
- |
if [[ "$WP_TRAVISCI" == "phpcs" ]] ; then
composer global require wp-coding-standards/wpcs
phpcs --config-set installed_paths $HOME/.composer/vendor/wp-coding-standards/wpcs
fi
script:
- |
if [[ "$WP_TRAVISCI" == "phpcs" ]] ; then
phpcs
fi
2 changes: 2 additions & 0 deletions core/action/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?php
// Silence is golden.
81 changes: 53 additions & 28 deletions core/action/task_manager.action.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,15 @@ public function __construct() {

add_action( 'wp_ajax_close_tm_change_log', array( $this, 'callback_close_change_log' ) );

add_action( 'load-toplevel_page_wpeomtm-dashboard', function() {
if ( strpos( $_SERVER['REQUEST_URI'], 'page=wpeomtm-dashboard' ) != FALSE && strpos( $_SERVER['REQUEST_URI'], 'page=wpeomtm-dashboard&' ) == FALSE ) {
wp_redirect( admin_url( 'admin.php?page=wpeomtm-dashboard&user_id=' . get_current_user_id() ) );
exit;
add_action(
'load-toplevel_page_wpeomtm-dashboard',
function() {
if ( strpos( $_SERVER['REQUEST_URI'], 'page=wpeomtm-dashboard' ) != false && strpos( $_SERVER['REQUEST_URI'], 'page=wpeomtm-dashboard&' ) == false ) {
wp_redirect( admin_url( 'admin.php?page=wpeomtm-dashboard&user_id=' . get_current_user_id() ) );
exit;
}
}
});
);
}

/**
Expand Down Expand Up @@ -71,7 +74,7 @@ public function callback_admin_enqueue_scripts() {
if ( false !== strpos( $screen->id, $insert_script_page ) ) {

if ( 'toplevel_page_wpeomtm-dashboard' != $screen->id ) {
add_filter('admin_body_class', array( $this, 'callback_body_class' ) );
add_filter( 'admin_body_class', array( $this, 'callback_body_class' ) );
}

wp_register_style( 'task-manager-style', PLUGIN_TASK_MANAGER_URL . 'core/assets/css/style.min.css', array(), \eoxia\config_util::$init['task-manager']->version );
Expand All @@ -85,27 +88,39 @@ public function callback_admin_enqueue_scripts() {
wp_enqueue_script( 'task-manager-chart', 'https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.3/Chart.min.js' );
wp_enqueue_script( 'task-manager-colcade', PLUGIN_TASK_MANAGER_URL . 'core/assets/js/colcade.js', array(), \eoxia\Config_Util::$init['task-manager']->version );
wp_enqueue_script( 'task-manager-script', PLUGIN_TASK_MANAGER_URL . 'core/assets/js/backend.min.js', array(), \eoxia\Config_Util::$init['task-manager']->version );
wp_localize_script( 'task-manager-script', 'taskManager', array(
'updateManagerUrlPage' => 'admin_page_' . \eoxia\Config_Util::$init['task-manager']->update_page_url,
'updateManagerconfirmExit' => __( 'Your data are being updated. If you confirm that you want to leave this page, your data could be corrupted', 'task-manager' ),
'updateManagerloader' => '<img src=' . admin_url( '/images/loading.gif' ) . ' />',
// Translators: %s is the version number with strong markup.
'updateManagerInProgress' => sprintf( __( 'Update %s in progress', 'task-manager' ), '<strong>{{ versionNumber }}</strong>' ),
// Translators: %s is the version number with strong markup.
'updateManagerErrorOccured' => sprintf( __( 'An error occured. Please take a look at %s logs', 'task-manager' ), '<strong>{{ versionNumber }}</strong>' ),
'data' => \eoxia\JSON_Util::g()->open_and_decode( PLUGIN_TASK_MANAGER_PATH . 'core/assets/json/data.json' ),
'search' => \eoxia\JSON_Util::g()->open_and_decode( PLUGIN_TASK_MANAGER_PATH . 'core/assets/json/search.json' ),
) );
wp_localize_script(
'task-manager-script',
'taskManager',
array(
'updateManagerUrlPage' => 'admin_page_' . \eoxia\Config_Util::$init['task-manager']->update_page_url,
'updateManagerconfirmExit' => __( 'Your data are being updated. If you confirm that you want to leave this page, your data could be corrupted', 'task-manager' ),
'updateManagerloader' => '<img src=' . admin_url( '/images/loading.gif' ) . ' />',
// Translators: %s is the version number with strong markup.
'updateManagerInProgress' => sprintf( __( 'Update %s in progress', 'task-manager' ), '<strong>{{ versionNumber }}</strong>' ),
// Translators: %s is the version number with strong markup.
'updateManagerErrorOccured' => sprintf( __( 'An error occured. Please take a look at %s logs', 'task-manager' ), '<strong>{{ versionNumber }}</strong>' ),
'data' => \eoxia\JSON_Util::g()->open_and_decode( PLUGIN_TASK_MANAGER_PATH . 'core/assets/json/data.json' ),
'search' => \eoxia\JSON_Util::g()->open_and_decode( PLUGIN_TASK_MANAGER_PATH . 'core/assets/json/search.json' ),
)
);
wp_enqueue_script( 'task-manager-datetimepicker-script', PLUGIN_TASK_MANAGER_URL . 'core/assets/js/jquery.datetimepicker.full.js', array(), \eoxia\Config_Util::$init['task-manager']->version );

wp_localize_script( 'task-manager-script', 'indicatorString', array(
'time_work' => __( 'Time work', 'task-manager' ),
'time_day' => __( 'Time Day', 'task-manager' ),
'minute' => __( 'minute(s)', 'task-manager' ),
'planning' => __( 'Planning', 'task-manager' ),
'date_error' => __( 'Invalid date' , 'task-manager' ),
'person_error' => __( 'Choose a user' , 'task-manager' )
));
wp_localize_script(
'task-manager-script',
'indicatorString',
array(
'time_work' => __( 'Time work', 'task-manager' ),
'time_day' => __( 'Time Day', 'task-manager' ),
'minute' => __( 'minute(s)', 'task-manager' ),
'planning' => __( 'Planning', 'task-manager' ),
'date_error' => __( 'Invalid date', 'task-manager' ),
'person_error' => __( 'Choose a user', 'task-manager' ),
'nodata' => __( 'No data, please configure your planning settings !', 'task-manager' ),
'from' => __( 'From', 'task-manager' ),
'to' => __( 'to', 'task-manager' ),
'plan_week' => __( 'Stats of the week', 'task-manager' ),
)
);
break;
}
}
Expand All @@ -132,9 +147,13 @@ public function callback_enqueue_scripts() {
wp_enqueue_style( 'task-manager-frontend-style' );

wp_enqueue_script( 'task-manager-frontend-script', PLUGIN_TASK_MANAGER_URL . 'core/assets/js/frontend.min.js', array(), \eoxia\Config_Util::$init['task-manager']->version, false );
wp_localize_script( 'task-manager-frontend-script', 'taskManagerFrontend', array(
'wpeo_project_delete_comment_time' => __( 'Delete this comment ?', 'task-manager' ),
) );
wp_localize_script(
'task-manager-frontend-script',
'taskManagerFrontend',
array(
'wpeo_project_delete_comment_time' => __( 'Delete this comment ?', 'task-manager' ),
)
);
}

/**
Expand Down Expand Up @@ -211,6 +230,12 @@ public function callback_close_change_log() {
wp_send_json_success( array() );
}

/**
* Renvois le corps de la class
*
* @param [type] $classes [description].
* @return [type] [description]
*/
public function callback_body_class( $classes ) {
$classes .= ' tm-wrap ';
return $classes;
Expand Down
6 changes: 6 additions & 0 deletions core/assets/css/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,9 @@ z-index: 26; }
display: block;
content: '';
clear: both; }

.popup-quick-time .modal-container {
max-width: 1200px;
width: 100%;
max-height: 1200px;
height: 80%; }
2 changes: 2 additions & 0 deletions core/assets/css/scss/element/activity/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?php
// Silence is golden.
2 changes: 2 additions & 0 deletions core/assets/css/scss/element/comment/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?php
// Silence is golden.
2 changes: 2 additions & 0 deletions core/assets/css/scss/element/import/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?php
// Silence is golden.
2 changes: 2 additions & 0 deletions core/assets/css/scss/element/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?php
// Silence is golden.
2 changes: 2 additions & 0 deletions core/assets/css/scss/element/metabox/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?php
// Silence is golden.
2 changes: 2 additions & 0 deletions core/assets/css/scss/element/navigation/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?php
// Silence is golden.
2 changes: 2 additions & 0 deletions core/assets/css/scss/element/point/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?php
// Silence is golden.
2 changes: 2 additions & 0 deletions core/assets/css/scss/element/shortcut/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?php
// Silence is golden.
2 changes: 2 additions & 0 deletions core/assets/css/scss/element/task/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?php
// Silence is golden.
2 changes: 2 additions & 0 deletions core/assets/css/scss/element/user/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?php
// Silence is golden.
2 changes: 2 additions & 0 deletions core/assets/css/scss/external/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?php
// Silence is golden.
2 changes: 2 additions & 0 deletions core/assets/css/scss/external/module/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?php
// Silence is golden.
2 changes: 2 additions & 0 deletions core/assets/css/scss/font/fontawesome/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?php
// Silence is golden.
2 changes: 2 additions & 0 deletions core/assets/css/scss/font/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?php
// Silence is golden.
2 changes: 2 additions & 0 deletions core/assets/css/scss/mixins/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?php
// Silence is golden.
2 changes: 2 additions & 0 deletions core/assets/css/scss/module/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?php
// Silence is golden.
2 changes: 2 additions & 0 deletions core/assets/css/scss/variable/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?php
// Silence is golden.
Loading

0 comments on commit 210907a

Please sign in to comment.