Skip to content

Commit

Permalink
0.2.0: Fix pull request
Browse files Browse the repository at this point in the history
  • Loading branch information
eoxia-jimmy committed Aug 21, 2018
1 parent 4aed055 commit dc284a6
Show file tree
Hide file tree
Showing 25 changed files with 772 additions and 236 deletions.
14 changes: 7 additions & 7 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
root = true

[*]
root = true

[*]
charset = utf-8
end_of_line = lf
tab_width = 4
indent_style = tab
end_of_line = lf
tab_width = 4
indent_style = tab
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true

[*.txt]
trim_trailing_whitespace = false

[*.{md,json,yml}]
[*.{md,json,yml}]
trim_trailing_whitespace = false
indent_style = space
indent_size = 2
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
node_modules
npm-debug.log
node_modules
npm-debug.log
42 changes: 21 additions & 21 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
MIT License

Copyright (c) 2018 Eoxia

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
MIT License
Copyright (c) 2018 Eoxia
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Ethos-DashBoard
Ethos-DashBoard allow a simple and fast control of your ETHOS mining farms
# Ethos-DashBoard
Ethos-DashBoard allow a simple and fast control of your ETHOS mining farms
18 changes: 9 additions & 9 deletions core/asset/css/scss/_variables.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/**
* Les couleurs principales pour l'exemple de la page "Hello World".
*
* @since 0.1.0
* @version 0.1.0
*/

$main-color: #389af6;
$second-color: rgba(0,0,0,0.6);
/**
* Les couleurs principales pour l'exemple de la page "Hello World".
*
* @since 0.1.0
* @version 0.1.0
*/

$main-color: #389af6;
$second-color: rgba(0,0,0,0.6);
18 changes: 9 additions & 9 deletions core/asset/css/scss/style.scss
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/**
* CSS générer par GULP grâce à la cmd "npm-start".
*
* Toute modification sur un fichier *.scss lance la compilation de tous les *.scss vers ce fichier.
*
* @since 0.1.0
* @version 0.1.0
*/

/**
* CSS générer par GULP grâce à la cmd "npm-start".
*
* Toute modification sur un fichier *.scss lance la compilation de tous les *.scss vers ce fichier.
*
* @since 0.1.0
* @version 0.1.0
*/

@import "variables";

svg.fa-copy {
Expand Down
24 changes: 12 additions & 12 deletions core/asset/css/style.css
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
@charset "UTF-8";
/**
* CSS générer par GULP grâce à la cmd "npm-start".
*
* Toute modification sur un fichier *.scss lance la compilation de tous les *.scss vers ce fichier.
*
* @since 0.1.0
* @version 0.1.0
/**
* CSS générer par GULP grâce à la cmd "npm-start".
*
* Toute modification sur un fichier *.scss lance la compilation de tous les *.scss vers ce fichier.
*
* @since 0.1.0
* @version 0.1.0
*/
/**
* Les couleurs principales pour l'exemple de la page "Hello World".
*
* @since 0.1.0
* @version 0.1.0
/**
* Les couleurs principales pour l'exemple de la page "Hello World".
*
* @since 0.1.0
* @version 0.1.0
*/
svg.fa-copy {
display: block;
Expand Down
53 changes: 46 additions & 7 deletions core/asset/js/backend.min.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/**
* Ce fichier "init.js" est obligatoire et son nom est très important pour faire fonctionné la lib JS de EO-Framework.
*
* @since 0.1.0
*/
window.eoxiaJS.ethosDashboard = {};
/**
* Ce fichier "init.js" est obligatoire et son nom est très important pour faire fonctionné la lib JS de EO-Framework.
*
* @since 0.1.0
*/
window.eoxiaJS.ethosDashboard = {};

/**
* Initialise l'objet "accident" ainsi que la méthode "init" obligatoire pour la bibliothèque EoxiaJS.
Expand All @@ -18,6 +18,12 @@ window.eoxiaJS.ethosDashboard.RIG.init = function() {
window.eoxiaJS.ethosDashboard.RIG.copyToClipboard( jQuery( this ).closest( '.acf-input' ).find( 'input[type="text"]' )[0] );
jQuery( this ).closest( '.acf-input' ).find( 'input[type="text"]' ).attr( 'disabled', 'disabled' );
} );

if ( jQuery( "body.post-type-rig .wp-heading-inline" ).text() !== 'Edit Post' ) {
jQuery( "body.post-type-rig .wrap .page-title-action").after('<a class="page-title-action wpeo-modal-event" data-action="load_modal_regenerate" data-class="modal-force-display modal-regenerate-txt" data-title="Regenerate TXT in process">Regenerate TXT</a>');
}

jQuery( document ).on( 'modal-opened', '.modal-regenerate-txt', window.eoxiaJS.ethosDashboard.RIG.modalOpened );
};


Expand Down Expand Up @@ -70,4 +76,37 @@ window.eoxiaJS.ethosDashboard.RIG.copyToClipboard = function(elem) {
target.textContent = "";
}
return succeed;
}
};

window.eoxiaJS.ethosDashboard.RIG.modalOpened = function( triggeredElement ) {
var data = {
action: 'regenerate_txt',
_wpnonce: jQuery( '.modal-regenerate-txt li.active:first' ).data( 'nonce' ),
ids: jQuery( '.modal-regenerate-txt li.active:first' ).data( 'ids' ),
number_error: jQuery( '.modal-regenerate-txt .number-error' ).val(),
number_success: jQuery( '.modal-regenerate-txt .number-success' ).val(),
total: jQuery( '.modal-regenerate-txt .total' ).val()
};

window.eoxiaJS.request.send( triggeredElement, data, function( element, response ) {
jQuery( '.modal-regenerate-txt li.active:first' ).find( 'img' ).remove();
jQuery( '.modal-regenerate-txt li.active:first' ).append( '<span class="dashicons dashicons-yes"></span>' );
jQuery( '.modal-regenerate-txt li.active:first' ).removeClass( 'active' );

jQuery( '.modal-regenerate-txt .number-error' ).val( response.data.number_error );
jQuery( '.modal-regenerate-txt .number-success' ).val( response.data.number_success );

for ( var key in response.data.error_message ) {
jQuery( '.modal-regenerate-txt li span[data-id="' + key + '"]' ).css( 'color', 'red' );
jQuery( '.modal-regenerate-txt .log' ).append( '<li>' + response.data.error_message[key] + '</li>' );
}

if ( jQuery( '.modal-regenerate-txt li.active' ).length > 0 ) {
window.eoxiaJS.ethosDashboard.RIG.modalOpened( triggeredElement );
} else {
jQuery( '.modal-regenerate-txt' ).removeClass( 'modal-force-display' );

jQuery( '.modal-regenerate-txt .log' ).append( '<li>' + response.data.final_message + '</li>' );
}
} );
};
12 changes: 6 additions & 6 deletions core/asset/js/init.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Ce fichier "init.js" est obligatoire et son nom est très important pour faire fonctionné la lib JS de EO-Framework.
*
* @since 0.1.0
*/
window.eoxiaJS.ethosDashboard = {};
/**
* Ce fichier "init.js" est obligatoire et son nom est très important pour faire fonctionné la lib JS de EO-Framework.
*
* @since 0.1.0
*/
window.eoxiaJS.ethosDashboard = {};
24 changes: 1 addition & 23 deletions core/asset/json/group_5b43270fefc28.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,28 +56,6 @@
"append": "",
"maxlength": 8
},
{
"key": "field_5b44c76b2be67",
"label": "Rig Group",
"name": "rig_category",
"type": "taxonomy",
"instructions": "",
"required": 1,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"taxonomy": "rig_taxonomy",
"field_type": "radio",
"allow_null": 0,
"add_term": 1,
"save_terms": 0,
"load_terms": 0,
"return_format": "id",
"multiple": 0
},
{
"key": "field_5b43741a3a5e5",
"label": ".txt file link",
Expand Down Expand Up @@ -273,5 +251,5 @@
"hide_on_screen": "",
"active": 1,
"description": "",
"modified": 1532095611
"modified": 1534768585
}
18 changes: 9 additions & 9 deletions core/core.config.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "Core",
"slug": "core",
"version": "0.1.0",
"description": "Main files of my_plugin",
"path": "core/",
"dependencies": {
{
"name": "Core",
"slug": "core",
"version": "0.1.0",
"description": "Main files of my_plugin",
"path": "core/",
"dependencies": {
"class": {},
"util": {},
"helper": {},
"action": {},
"filter": {}
}
}
}
}
16 changes: 8 additions & 8 deletions ethos-dashboard.config.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "ethos-dashboard",
"slug": "ethos-dashboard",
"modules": [
{
"name": "ethos-dashboard",
"slug": "ethos-dashboard",
"modules": [
"core/core.config.json",
"modules/rig/rig.config.json",
"modules/rig-category/rig-category.config.json",
"modules/wallet/wallet.config.json"
],
"version": "0.1.0",
"folder_meta_key": "_ethos_dashboard_folder"
}
],
"version": "0.2.0",
"folder_meta_key": "_ethos_dashboard_folder"
}
2 changes: 1 addition & 1 deletion ethos-dashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: ethos-dashboard
* Plugin URI: http://www.eoxia.com
* Description: Handle ethos config
* Version: 0.1.0
* Version: 0.2.0
* Author: Eoxia <dev@eoxia.com>
* Author URI: http://www.eoxia.com
* License: AGPLv3
Expand Down
Loading

0 comments on commit dc284a6

Please sign in to comment.