Skip to content

Commit

Permalink
Re-sync project files to CTL branch
Browse files Browse the repository at this point in the history
  • Loading branch information
ioneyez committed Feb 19, 2017
1 parent 8d10eeb commit 322f8b8
Show file tree
Hide file tree
Showing 27 changed files with 4,036 additions and 473 deletions.
18 changes: 11 additions & 7 deletions CREDITS
Original file line number Diff line number Diff line change
Expand Up @@ -55,22 +55,26 @@ Core Software Architecture and Plastic Contributors [pdmk]
Design -

Chief Software Architect - John Woodworth <[email protected]>
Software Consultant - Dean Ballew <[email protected]>
Graphical Consultant - Shashwath Bindinganaveli Raghavan
Software Integration Consultant - Dean Ballew <[email protected]>
Graphical Interface Consultant - Shashwath Bindinganaveli Raghavan

Development -

Lead Software Developer - John Woodworth <[email protected]>
Playbook Consultant - Dean Ballew <[email protected]>
Chief Software Architect - John Woodworth <[email protected]>
Lead Playbook Consultant - Dean Ballew <[email protected]>

Testing -

Chief Test Architect - Dean Ballew <[email protected]>
Test Architect - Shashwath Bindinganaveli Raghavan
Test Architect/ Consultant - Shashwath Bindinganaveli Raghavan

End User Enablement -

Chief Systems Integrator - John Woodworth <[email protected]>
Chief End User Integrator - Dean Ballew <[email protected]>

Official [pdmk] Code Maintainers -

Chief Software Architect - John Woodworth <[email protected]>
Playbook Consultant - Dean Ballew <[email protected]>
Chief End User Integrator - Dean Ballew <[email protected]>


30 changes: 27 additions & 3 deletions MINIFY/minify.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,20 @@ COPYRIGHT='

function dieError() {
echo $0 Ver. $VERSION
echo "Usage: $0"
echo "Usage: $0 [OPTIONS]"
echo " nojq : Disable jQuery Libraries"
echo " nobi : Disable BigInt Libraries"
echo " nora : Disable rangy Libraries"
echo " nocm : Disable contextMenu Libraries"
echo " nosl : Disable SparkLine Libraries"
echo " nody : Disable Dynatree Libraries"
echo " nodt : Disable DataTables Libraries"
echo " nohs : Disable Hash Calculation Libraries"
echo " nopf : Disable JS Pollyfill (<=IE9)"
echo " enqu : Disable QUinit Libraries"
echo " endb : Disable Plastic Debug Messages"
echo " -help : Display this Help Message"
echo "-"
echo "Terminating with exit code ${2-255}:"
echo " ${1-An error has occured}" # Message
exit ${2-255} # Exit Code
Expand Down Expand Up @@ -67,8 +80,16 @@ sweepArgsFor 'nody' $* # Disable Dynatree Libraries ??
OPT_NODY=$?
sweepArgsFor 'nodt' $* # Disable DataTables Libraries ??
OPT_NODT=$?
sweepArgsFor 'nohs' $* # Disable Hash Calculation Libraries ??
OPT_NOHS=$?
sweepArgsFor 'nopf' $* # Disable JS Pollyfill (<=IE9) ??
OPT_NOPF=$?
sweepArgsFor 'enqu' $* # Enable QUinit Libraries ??
OPT_ENQU=$?
sweepArgsFor 'endb' $* # Enable Plastic Debug Messages ??
OPT_ENDB=$?
sweepArgsFor '-help' $* # Help Message Requested ??
[ $? -gt 0 ] && dieError "Help Requested" 240

export COPYRIGHT
[ -e "$(which dirname 2> /dev/null)" ] || dieError "Unable to locate 'dirname' utility" 10
Expand Down Expand Up @@ -100,14 +121,16 @@ echo "Minifying files:"
[ $OPT_NODT -gt 0 ] || echo ../scripts/jquery.dataTables.js
[ $OPT_NODT -gt 0 ] || echo ../scripts/dataTables.scroller.js
[ $OPT_NODT -gt 0 ] || echo ../scripts/ui.multiselect.js
[ $OPT_NOHS -gt 0 ] || echo ../scripts/sha.js
[ $OPT_NOPF -gt 0 ] || echo ../scripts/PlasticBase64Polyfill.js
[ $OPT_ENQU -gt 0 ] && echo ../scripts/qunit.js
) | xargs cat \
| sed 's#/\*!#/\* #g' \
| ( [ $OPT_ENQU -gt 0 ] && cat || grep -v -- '-##QUNIT##-' ) \
| perl -ne 'print $_ unless ($_ =~ /(?<!_[.])_PlasticBug/)' \
| ( [ $OPT_ENDB -gt 0 ] && cat || perl -ne 'print $_ unless ($_ =~ /(?<!_[.])_PlasticBug/)' ) \
| perl -ne 'if ($.==1){print $ENV{COPYRIGHT}.$_;}else{print $_}' \
| java -jar ../NOT-PLASTIC/yuicompressor-2.4.8.jar --type js -o pdmk-min.js
# | cat > pdmk-min.js
## | cat > pdmk-min.js

(
[ $OPT_ENQU -gt 0 ] && echo ../style/qunit.css
Expand All @@ -121,6 +144,7 @@ echo "Minifying files:"
| sed 's#/\*!#/\*#g' \
| perl -ne 'if ($.==1){print $ENV{COPYRIGHT}.$_;}else{print $_}' \
| java -jar ../NOT-PLASTIC/yuicompressor-2.4.8.jar --type css -o pdmk-min.css
## | cat > pdmk-min.css

echo "Copying minified files:"
cp -v pdmk-min.js ../scripts/
Expand Down
2 changes: 1 addition & 1 deletion MINIFY/pdmk-min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion MINIFY/pdmk-min.js

Large diffs are not rendered by default.

125 changes: 125 additions & 0 deletions MINIFY/perlfilepack.pl
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
#!/usr/bin/perl
require 5.6.0; # Make Perl Compatibility Problems More Obvious
#---------------------------------------------------------------------#
#######################################################################
#---------------------------------------------------------------------#
# COPYRIGHT (c) 2016 CenturyLink, Inc.
# SEE LICENSE-MIT FOR LICENSE TERMS
# SEE CREDITS FOR CONTRIBUTIONS AND CREDITS FOR THIS PROJECT
#
# Program: "perlfilepack.pl" => Perl based File Packager
# For Single File RESTful Service [pdmk]
#
# Author: John R B Woodworth <[email protected]>
#
# Support Contact: [email protected]
#
# Created: 15 April, 2016
# Last Updated: 14 December, 2016
#
our $APPNAME = "perlfilepack.pl";
our $VERSION = "0.8.9b";
#
# NOTES:
#
# CHANGES:
#
#---------------------------------------------------------------------#
#######################################################################
#---------------------------------------------------------------------#
# ___
# _______ / /\ ___
# / ___ \ ___/ / \ _ / /\_________
# / /\ ) )__ / / / /__\ / / \ \
# / / \/ / \_\__/__/ / / /\\_ ____ / / _/__ /\
# / /___/ / / ____ / / ___ \/ \ / / _/ _/\ / \
# / _______/ / /\ / / / /\ \___/) /\___ / /_/ _/\\ \ / \
# / /\ \ / / \/ / / / \__\__/ / \ \/ _/\\ \\/ / \
# / / \______/ (__/ / / / / / / / // _ /\\ \\/ / /
# / / / (________/ /__/ / /__/ / // / \ \ \\/ / /
# /__/ / /\ \ /\ \ / \ \ / //__/ \__\/ / /
# \ \ / / /\_______\/ /\__\/ \__\/ / \ \ / \ \ / /
# / \__\/ / / /__________________/ / \_\/ \__\ / /
# / / \___________/ \= \ /____________ / /
# \____________/ \= \ \== \ \= \ /
# \= \ \== \ \=== \ \== \ /
# \== \ \=== \ \====_____________\/\=== \ /
# \=== \ / \====______\/ \====________\/
# \====_______\/
#
#---------------------------------------------------------------------#
#
use strict;
use HTTP::Date;
use File::Type;
use File::Temp qw( tempfile tempdir );
use MIME::Base64;
use Compress::Zlib;

my $DEBUG = 1;
my $typer = File::Type->new();
my (@DIRLIST) = (@ARGV);

deflateInit( -Level => Z_BEST_COMPRESSION ); # Set deflate options
my ($tfh, $tfile) = tempfile();
print {$tfh} "sub _initResources {\n";
print {$tfh} " (%_RES) = (\n";
foreach my $dir (@DIRLIST) {
$dir =~ s#/*$##;
my ($fh) = ();
opendir ($fh, $dir) || do {
print STDERR "Unable to open directory '${dir}' $!\n" if ($DEBUG);
};
&scanDir($dir, $fh);
close ($fh);
}
print {$tfh} " );\n";
print {$tfh} "}\n";
close($tfh);
print STDERR "TFN: '${tfile}'\n";

sub scanDir {
my $dir = shift;
my $fh = shift;
while (my $filename = readdir ($fh)) {
next if ($filename =~ /^[.]{1,2}$/); # Skip parent/ self refs
if (-d "${dir}/${filename}") {
my ($cfh) = ();
opendir ($cfh, "${dir}/${filename}") || do {
print STDERR "Unable to open directory '${dir}/${filename}' $!\n" if ($DEBUG);
};
&scanDir("${dir}/${filename}", $cfh);
} else {
my $mime = $typer->mime_type("${dir}/${filename}");
if ($filename =~ /\.js$/) {
$mime = 'text/javascript';
} elsif ($filename =~ /\.html$/) {
$mime = 'text/html';
} elsif ($filename =~ /\.css$/) {
$mime = 'text/css';
}
print STDERR "FN: ${mime} => '${dir}/${filename}'\n";
open (FILE, "<", "${dir}/${filename}") || do {
print STDERR "Unable to open file '${dir}/${filename}' $!\n" if ($DEBUG);
};
binmode (FILE);
my $fcontents = '';
while (sysread (FILE, my $buffer, 8192)) {
$fcontents .= $buffer;
}
close (FILE);
my (@fdata) = (split (/\n+/s, encode_base64(Compress::Zlib::memGzip($fcontents))));
my $lastModified = time2str((stat("${dir}/${filename}"))[9]);
print {$tfh} " '${dir}/${filename}' => [\n";
print {$tfh} " { 'Content-Type' => '${mime}', 'Content-Encoding' => 'gzip', #->\n";
print {$tfh} " 'Last-Modified' => '${lastModified}' }, \n";
while (scalar (@fdata)) {
my $line = shift(@fdata);
my $lend = (scalar (@fdata)) ? '. #->' : '';
print {$tfh} " '${line}'${lend}\n";
}
print {$tfh} " ], \n";
}
}
}

Binary file added PKGS/dynatree-1.2.4.tar.gz
Binary file not shown.
Binary file added PKGS/jQuery-contextMenu-v1.6.6.zip
Binary file not shown.
Binary file added PKGS/jsSHA-2.2.0.zip
Binary file not shown.
Binary file modified images/add-icon1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/plastic-all.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/plastic-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/plastic-lock.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
127 changes: 127 additions & 0 deletions scripts/PlasticBase64Polyfill.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
//-------------------------------------------------------------------//
///////////////////////////////////////////////////////////////////////
/*!------------------------------------------------------------------//
/ COPYRIGHT (c) 2014 CenturyLink, Inc.
/ SEE LICENSE-MIT FOR LICENSE TERMS
/
/ Program: "PlasticBase64Polyfill.js" => Plastic Data Modeling Kit [pdmk]
/ Base64 Polyfill Functions
/ Author: John R B Woodworth <[email protected]>
/
/ Support Contact: plastic@centurylink.com
/
/ Created: 10 February, 2017
/ Last Updated: 10 February, 2017
/
/ VERSION: 1.0.0b
/
/ NOTES:
/
/ CHANGES:
/
//-------------------------------------------------------------------*/
///////////////////////////////////////////////////////////////////////
//-------------------------------------------------------------------//
/* ___
_______ / /\ ___
/ ___ \ ___/ / \__ / /\_________
/ /\ ) )__ / / / /__\ / / \ \
/ / \/ / \_\__/__/ / / /\\_ ____ / / _/__ /\
/ /___/ / / ____ / / ___ \/ \ / / _/ _/\ / \
/ _______/ / /\ / / / /\ \___/) /\___ / /_/ _/\\ \ / \
/ /\ \ / / \/ / / / \__\__/ / \ \/ _/\\ \\/ / \
/ / \______/ (__/ / / / / / / / // _ /\\ \\/ / /
/ / / (________/ /__/ / /__/ / // / \ \ \\/ / /
/__/ / /\ \ /\ \ / \ \ / //__/ \__\/ / /
\ \ / / /\_______\/ /\__\/ \__\/ / \ \ / \ \ / /
/ \__\/ / / /__________________/ / \_\/ \__\ / /
/ / \___________/ \= \ /____________ / /
\____________/ \= \ \== \ \= \ /
\= \ \== \ \=== \ \== \ /
\== \ \=== \ \====_____________\/\=== \ /
\=== \ / \====______\/ \====________\/
\====_______\/
*/
//-------------------------------------------------------------------//
//
// This was thrown together quickly to support IE9 and older.
// Maybe not the fastest implementation but novel enough to not
// worry about MIT license incompatibilities };{> /JW
//
(function(_){
var InvalidCharacterError = function(msg) {
this.message = msg;
};
InvalidCharacterError.prototype = new Error;
InvalidCharacterError.prototype.name = 'InvalidCharacterError';
_.btoa = _.btoa || function(inStr){
var retVal = '', buf;
if (/[^\x00-\xFF]/.test(inStr)) { // Test for valid input
throw new InvalidCharacterError('String contains an invalid character');
} else {
for (var cntPos = 0; cntPos < inStr.length; cntPos += 3) {
buf = [0];
for (var cntChar = 0; cntChar < 3; cntChar ++) {
var thisCode = ((cntPos+cntChar) < inStr.length) //->
? inStr.charCodeAt(cntPos+cntChar) : null;
buf[cntChar] |= thisCode >> ((cntChar)*2)
buf[cntChar] = buf[cntChar] >> 2
if (thisCode !== null) {
buf[cntChar+1] = (thisCode << (8-((cntChar+1)*2)) & 0xFF)
if (cntChar === 2) { buf[cntChar+1] = buf[cntChar+1] >> 2; };
} else {
buf[2] = (inStr.length-cntPos === 1) ? null : buf[2];
buf[3] = null;
break;
}
}
for (var cntBuf = 0; cntBuf < 4; cntBuf ++) {
buf[cntBuf] = (buf[cntBuf] === null) //->
? 0x3D //->
: (buf[cntBuf] < 26) //->
? buf[cntBuf] + 65 //->
: (buf[cntBuf] < 52) //->
? buf[cntBuf] + 71 //->
: (buf[cntBuf] < 62) //->
? buf[cntBuf] - 4 //->
: (buf[cntBuf] === 62) ? 43 : 47;
retVal += String.fromCharCode(buf[cntBuf]);
}
}
}
return retVal;
};
_.atob = _.atob || function(inStr){
var retVal = '', buf;
if (/[^A-Za-z0-9+\/=]/.test(inStr)) { // Test for valid input
throw new InvalidCharacterError('String contains an invalid character');
} else {
while (inStr.length % 4) { inStr += '='; };
for (var cntPos = 0; cntPos < inStr.length; cntPos += 4) {
buf = [0];
for (var cntChar = 0; cntChar < 4; cntChar ++) {
var thisCode = inStr.charCodeAt(cntPos+cntChar);
thisCode = ((thisCode & 0x5F) === thisCode) //->
? thisCode - 65 //->
: (thisCode === 0x3D) //->
? null //->
: (thisCode === 0x2B) //->
? 62 //->
: (thisCode === 0x2F) //->
? 63 //->
: ((thisCode & 0x3F) === thisCode) //->
? thisCode + 4 //->
: ((thisCode & 0x7F) === thisCode) //->
? thisCode - 71 : null;
thisCode = (thisCode === null) ? null : thisCode << ((cntChar+1)*2);
if ((cntChar) && (buf[cntChar-1] !== null)) { buf[cntChar-1] |= ((thisCode & 0xFF00) >> 8); };
buf[cntChar] = (thisCode === null) ? null : (thisCode & 0xFF);
}
retVal += String.fromCharCode(buf[0]);
retVal += (buf[2] === null) ? '' : String.fromCharCode(buf[1]);
retVal += (buf[3] === null) ? '' : String.fromCharCode(buf[2]);
}
}
return retVal;
};
})(window);
Loading

0 comments on commit 322f8b8

Please sign in to comment.