Skip to content
Permalink
Browse files

Update gulp workflow and minor widget layout fix

Wrapped widget content inside of div with enom_pro_widget class.
This adds a bit of padding for the widget content.
  • Loading branch information...
ronnytomasetti committed Jan 4, 2017
1 parent 0a2c1e3 commit 933ca29c5d4bc7ea25ad28ca6a8fde397b99be5c
@@ -6,42 +6,57 @@
*/
var gulp = require('gulp'),
run = require('gulp-run'),
wait = require('gulp-wait'),
less = require('gulp-less'),
livereload = require('gulp-livereload');

/**
* Project source directory
*/
var src = './src';
var src = './src',
src_css = src + '/modules/addons/enom_pro/css';

/**
* Task uses ssh to login into local development pv and auto
* executes phing local target build inside of enom_pro directory.
* Pipes results through livereload to refresh page.
*/
gulp.task('run-phing', function() {
run("ssh vagrant@127.0.0.1 -p 2222 'cd enom_pro; vendor/bin/phing;'").exec()
gulp.task('run-phing', function () {
return run("ssh vagrant@127.0.0.1 -p 2222 'cd enom_pro; vendor/bin/phing;'")
.exec()
.on('error', onError)
.pipe(wait(4000))
.pipe(livereload());
});

gulp.task('less', function () {
return gulp.src(src_css + '/admin.less')
.pipe(less({
paths: [src_css]
}))
.pipe(gulp.dest(src_css));
});

/**
* Task to watch src directory for any changes refreshing page with livereload.
* If changes are detected, executes 'run-phing' task to rebuild project.
*/
gulp.task('watch', function() {
gulp.task('watch', function () {
livereload.listen();
gulp.watch( src + '/**/*', ['run-phing'] );
gulp.watch(src + '/**/*', ['run-phing']);
gulp.watch(src_css + '/admin.less', ['less']);
return;
});

/**
* Default gulp task runs when executing 'gulp'
*/
gulp.task('default', ['watch', 'run-phing']);
gulp.task('default', ['watch', 'less', 'run-phing']);

/**
* Error handler that keeps gulp from crashing when it encounters an error.
*/
function onError(err) {
console.log(err);
this.emit('end');
return;
}
@@ -1,24 +1,26 @@
{
"name": "enom_pro",
"version": "0.0.1",
"description": "Gulp workflow setup for rapid Enom Pro module development.",
"author": "CircleTree",
"main": "gulpfile.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/CircleTree/enom_pro.git"
},
"bugs": {
"url": "https://github.com/CircleTree/enom_pro/issues"
},
"dependencies": {
"gulp": "3.9.1",
"gulp-livereload": "3.8.1",
"gulp-run": "1.7.1"
},
"license": "UNLICENSED",
"private": true
"name": "enom_pro",
"version": "0.0.1",
"description": "Gulp workflow setup for rapid Enom Pro module development.",
"author": "CircleTree",
"main": "gulpfile.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/CircleTree/enom_pro.git"
},
"bugs": {
"url": "https://github.com/CircleTree/enom_pro/issues"
},
"devDependencies": {
"gulp": "3.9.1",
"gulp-less": "^3.3.0",
"gulp-livereload": "3.8.1",
"gulp-run": "1.7.1",
"gulp-wait": "0.0.2"
},
"license": "UNLICENSED",
"private": true
}
@@ -10,6 +10,10 @@ Licensed from Orion IP Ventures, LLC
.clearfix:after {
clear: both;
}
.enom_pro_widget {
padding: 20px;
min-height: 150px;
}
.enom_pro_output {
box-sizing: border-box;
/**
@@ -65,7 +69,7 @@ Licensed from Orion IP Ventures, LLC
}
.enom_pro_output #homeHelpContent ul li {
box-sizing: border-box;
width: calc(50% - 5px);
width: calc(45%);
float: left;
padding: 5px;
border-bottom: 1px solid #dddddd;
@@ -185,7 +189,6 @@ Licensed from Orion IP Ventures, LLC
text-align: center;
overflow: auto;
}
.enom_pro_output .enom_pro_widget TABLE,
.enom_pro_output.sidebar table {
width: 100%;
}
@@ -571,7 +574,7 @@ Licensed from Orion IP Ventures, LLC
margin-top: 5px;
}
.enom_pro_output .fixedBulk #bulkRightWrap {
width: 100% - 25%;
width: 75%;
left: 25%;
background-color: #ffffff;
}
@@ -632,24 +635,6 @@ Licensed from Orion IP Ventures, LLC
top: -2px;
left: 35px;
}
.enom_pro_output .enom-pro-widget-icon {
font-size: 13pt;
vertical-align: text-bottom;
width: 15pt;
display: inline-block;
}
.enom_pro_output .enom_pro_widget_title {
position: relative;
width: calc(100% - 20px);
display: block;
}
.enom_pro_output .enom_pro_widget_title .refreshbutton {
vertical-align: bottom;
/*+placement:anchor-top-right 0px -2px;*/
position: absolute;
right: 2px;
top: -2px;
}
.enom_pro_output .fa-spin {
-webkit-animation: fa-spin 2s infinite linear;
animation: fa-spin 2s infinite linear;
@@ -900,12 +885,6 @@ Top level DOM items
height: 100%;
border: none;
}
.contentarea .enom_pro_output {
min-height: 600px;
}
.contentarea .widget-content .enom_pro_output {
min-height: inherit;
}
/**Swiftmods admin tweaks */
.content-container {
overflow: auto;
@@ -42,6 +42,11 @@ Licensed from Orion IP Ventures, LLC
}
}

.enom_pro_widget {
padding: 20px;
min-height: 150px;
}

.enom_pro_output {
box-sizing: border-box;

@@ -229,7 +234,7 @@ Licensed from Orion IP Ventures, LLC
overflow: auto;
}

.enom_pro_widget TABLE,
// .enom_pro_widget TABLE,
&.sidebar table {
width: 100%;
}
@@ -704,24 +709,25 @@ Licensed from Orion IP Ventures, LLC
left: 35px;
}

.enom-pro-widget-icon {
font-size: 13pt;
vertical-align: text-bottom;
width: 15pt;
display: inline-block;
}
.enom_pro_widget_title {
position: relative;
width: calc(100% - 20px);
display: block;
.refreshbutton {
vertical-align: bottom;
/*+placement:anchor-top-right 0px -2px;*/
position: absolute;
right: 2px;
top: -2px;
}
}
// .enom-pro-widget-icon {
// font-size: 13pt;
// vertical-align: text-bottom;
// width: 15pt;
// display: inline-block;
// }

// .enom_pro_widget_title {
// position: relative;
// width: calc(100% - 20px);
// display: block;
// .refreshbutton {
// vertical-align: bottom;
// /*+placement:anchor-top-right 0px -2px;*/
// position: absolute;
// right: 2px;
// top: -2px;
// }
// }

.fa-spin {
-webkit-animation: fa-spin 2s infinite linear;
@@ -14,19 +14,27 @@
require_once ENOM_PRO_ROOT . 'enom_pro.php';
require_once ENOM_PRO_ROOT . 'hooks_compatible.php';
add_hook( "AdminHomeWidgets", 1, "enom_pro_admin_balance" );
add_hook( "AdminHomeWidgets", 1, "enom_pro_admin_ssl_certs" );
add_hook( "AdminHomeWidgets", 1, "enom_pro_admin_expiring_domains" );
add_hook( "AdminHomeWidgets", 1, "enom_pro_admin_pending_domain_verification" );
add_hook( "AdminHomeWidgets", 1, "enom_pro_admin_transfers" );
// add_hook("AdminHomeWidgets", 1, array("fuck_hook"));
add_hook( "AdminAreaHeadOutput", - 89512, "enom_pro_admin_head_output" );
add_hook( "AdminAreaPage", - 284917, "enom_pro_admin_actions" );
add_hook( "ClientAreaPage", - 30101, "enom_pro_srv_page" );
add_hook( "ClientAreaPage", - 10101, "enom_pro_namespinner" );
add_hook( "ClientAreaPage", - 20291, "enom_pro_clientarea_transfers" );
add_hook( "DailyCronJob", 10101, "enom_pro_cron" );
/**
* [enom_pro_admin_balance description]
* @method enom_pro_admin_balance
* @param [type] $vars [description]
* @return [array] $widget [description]
*/
function enom_pro_admin_balance( $vars ) {
unset( $vars );
@@ -38,9 +46,10 @@ function enom_pro_admin_balance( $vars ) {
}
/**
* @param $vars
*
* @return array
* [enom_pro_admin_ssl_certs description]
* @method enom_pro_admin_ssl_certs
* @param [type] $vars [description]
* @return [array] $widget [description]
*/
function enom_pro_admin_ssl_certs( $vars ) {
@@ -63,7 +72,12 @@ function enom_pro_admin_ssl_certs( $vars ) {
return $widget->toArray();
}
/**
* [enom_pro_admin_expiring_domains description]
* @method enom_pro_admin_expiring_domains
* @param [type] $vars [description]
* @return [array] $widget [description]
*/
function enom_pro_admin_expiring_domains( $vars ) {
unset( $vars );
@@ -79,7 +93,12 @@ function enom_pro_admin_expiring_domains( $vars ) {
return $widget->toArray();
}
/**
* [enom_pro_admin_pending_domain_verification description]
* @method enom_pro_admin_pending_domain_verification
* @param [type] $vars [description]
* @return [array] $widget [description]
*/
function enom_pro_admin_pending_domain_verification( $vars ) {
unset( $vars );
@@ -104,7 +123,12 @@ function enom_pro_admin_pending_domain_verification( $vars ) {
return $widget->toArray();
}
/**
* [enom_pro_admin_transfers description]
* @method enom_pro_admin_transfers
* @param [type] $vars [description]
* @return [array] $widget [description]
*/
function enom_pro_admin_transfers( $vars ) {
if ( ! class_exists( 'enom_pro' ) ) {
@@ -146,7 +170,13 @@ function enom_pro_admin_transfers( $vars ) {
return $widget->toArray();
}
/**
* [get_enom_pro_widget_form description]
* @method get_enom_pro_widget_form
* @param [type] $action [description]
* @param [type] $id [description]
* @return [type] [description]
*/
function get_enom_pro_widget_form( $action, $id ) {
if ( 'configadminroles.php' == basename( $_SERVER['PHP_SELF'] ) ) {
@@ -168,12 +198,12 @@ function get_enom_pro_widget_form( $action, $id ) {
}
/**
* Admin Page CSS
* Admin page css
* @method enom_pro_admin_head_output
* @return [type] [description]
*/
function enom_pro_admin_head_output() {
// Only load on applicable pages
$pages = array( 'index.php', 'addonmodules.php', 'configadminroles.php' );
$scriptName = basename( $_SERVER['SCRIPT_NAME'] );
@@ -220,11 +250,10 @@ function version_compare(left, right) {
console.warn('Please upgrade your WHMCS theme to a newer version of jQuery (v 1.9.1+). Using Google CDN for an up-to-date version of jQuery. ');
document.write('<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"><\/script>');
document.write('<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"><\/script>');
}
</script>
<script
src="<?php echo enom_pro::MODULE_LINK ?>&action=getAdminJS&version=<?php echo urlencode( ENOM_PRO_VERSION ) ?>"></script>
<script src="<?php echo enom_pro::MODULE_LINK ?>&action=getAdminJS&version=<?php echo urlencode( ENOM_PRO_VERSION ) ?>">
</script>
<?php if ( isset( $_GET['module'] ) && 'enom_pro' == $_GET['module'] ) : ?>
<?php //Don't include these on the admin roles page to prevent unintended conflicts / regressions ?>
<?php if ( isset( $_GET['view'] ) && 'domain_import' == $_GET['view'] ) : ?>
Oops, something went wrong.

0 comments on commit 933ca29

Please sign in to comment.
You can’t perform that action at this time.