SPEEDY use Rake and closure-compile to generate maborak.js
This commit is contained in:
@@ -260,26 +260,26 @@ function toMaskNumber(iNumber,dec)
|
||||
iNumber = fix(iNumber.toString(),dec || 2);
|
||||
var t=iNumber.split(".");
|
||||
var arrayResult=iNumber.replace(/\D/g,'').replace(/^0*/,'').split("").reverse();
|
||||
var final="";
|
||||
var result="";
|
||||
var aux=0;
|
||||
var sep=0;
|
||||
for(var i=0;i<arrayResult.length;i++)
|
||||
{
|
||||
if(i==1)
|
||||
{
|
||||
final="."+arrayResult[i]+final;
|
||||
result="."+arrayResult[i]+result;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(i>1 && aux>=3 && ((aux%3)==0))
|
||||
{
|
||||
final=arrayResult[i]+","+final;
|
||||
result=arrayResult[i]+","+result;
|
||||
aux+=1;
|
||||
sep+=1;
|
||||
}
|
||||
else
|
||||
{
|
||||
final=arrayResult[i]+final;
|
||||
result=arrayResult[i]+result;
|
||||
if(i>1)
|
||||
{
|
||||
aux+=1;
|
||||
@@ -287,7 +287,7 @@ function toMaskNumber(iNumber,dec)
|
||||
}
|
||||
}
|
||||
}
|
||||
return final;
|
||||
return result;
|
||||
}
|
||||
|
||||
function fix(val, dec)
|
||||
|
||||
File diff suppressed because one or more lines are too long
307
workflow/engine/bin/tasks/Rakefile
Normal file
307
workflow/engine/bin/tasks/Rakefile
Normal file
File diff suppressed because it is too large
Load Diff
1
workflow/engine/bin/tasks/VERSION.js.txt
Normal file
1
workflow/engine/bin/tasks/VERSION.js.txt
Normal file
@@ -0,0 +1 @@
|
||||
0.1
|
||||
46
workflow/engine/bin/tasks/cliRake.php
Normal file
46
workflow/engine/bin/tasks/cliRake.php
Normal file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
/**
|
||||
* cliUpgrade.php
|
||||
*
|
||||
* ProcessMaker Open Source Edition
|
||||
* Copyright (C) 2011 Colosa Inc.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*
|
||||
* @author Alexandre Rosenfeld <alexandre@colosa.com>
|
||||
* @package workflow-engine-bin-tasks
|
||||
*/
|
||||
|
||||
CLI::taskName('build-js');
|
||||
CLI::taskDescription(<<<EOT
|
||||
Generate Javascript Files
|
||||
|
||||
This command should be run after any modification of javascript files in
|
||||
folder gulliver/js/*.
|
||||
EOT
|
||||
);
|
||||
//CLI::taskOpt("minify", "If the option is enabled, performs the build only with minified files", "min", "buildmin");
|
||||
CLI::taskRun(minify_javascript);
|
||||
|
||||
function minify_javascript($command, $args)
|
||||
{
|
||||
CLI::logging("BUILD-JS", PROCESSMAKER_PATH . "upgrade.log");
|
||||
CLI::logging("Checking if rake is installed...\n");
|
||||
$rakeFile = PROCESSMAKER_PATH . "workflow/engine/bin/tasks/Rakefile";
|
||||
system('rake -f ' . $rakeFile);
|
||||
}
|
||||
|
||||
108
workflow/engine/bin/tasks/libraries.json
Normal file
108
workflow/engine/bin/tasks/libraries.json
Normal file
@@ -0,0 +1,108 @@
|
||||
[
|
||||
{
|
||||
"name": "maborak",
|
||||
"libraries": [
|
||||
{
|
||||
"name": "maborak",
|
||||
"version": "0.6",
|
||||
"homepage": "http://www.maborak.com",
|
||||
"full": "gulliver/js/maborak/core/maborak.old.js",
|
||||
"mini": "gulliver/js/maborak/core/maborak.old.js"
|
||||
},
|
||||
{
|
||||
"name": "common",
|
||||
"version": "0.6",
|
||||
"homepage": "http://www.maborak.com",
|
||||
"full": "gulliver/js/common/core/common.js",
|
||||
"mini": "gulliver/js/common/core/common.js"
|
||||
},
|
||||
{
|
||||
"name": "effects",
|
||||
"version": "0.6",
|
||||
"homepage": "http://www.maborak.com",
|
||||
"full": "gulliver/js/common/core/effects.js",
|
||||
"mini": "gulliver/js/common/core/effects.js"
|
||||
},
|
||||
{
|
||||
"name": "webResource",
|
||||
"version": "0.6",
|
||||
"homepage": "http://www.maborak.com",
|
||||
"full": "gulliver/js/common/core/webResource.js",
|
||||
"mini": "gulliver/js/common/core/webResource.js"
|
||||
},
|
||||
{
|
||||
"name": "dveditor",
|
||||
"version": "0.6",
|
||||
"homepage": "http://www.maborak.com",
|
||||
"full": "gulliver/js/dveditor/core/dveditor.js",
|
||||
"mini": "gulliver/js/dveditor/core/dveditor.js"
|
||||
},
|
||||
{
|
||||
"name": "tree",
|
||||
"version": "0.6",
|
||||
"homepage": "http://www.maborak.com",
|
||||
"full": "gulliver/js/common/tree/tree.js",
|
||||
"mini": "gulliver/js/common/tree/tree.js"
|
||||
},
|
||||
{
|
||||
"name": "json",
|
||||
"version": "0.6",
|
||||
"homepage": "http://www.maborak.com",
|
||||
"full": "gulliver/js/json/core/json.js",
|
||||
"mini": "gulliver/js/json/core/json.js"
|
||||
},
|
||||
{
|
||||
"name": "form",
|
||||
"version": "0.6",
|
||||
"homepage": "http://www.maborak.com",
|
||||
"full": "gulliver/js/form/core/form.js",
|
||||
"mini": "gulliver/js/form/core/form.js"
|
||||
},
|
||||
{
|
||||
"name": "pagedTable",
|
||||
"version": "0.6",
|
||||
"homepage": "http://www.maborak.com",
|
||||
"full": "gulliver/js/form/core/pagedTable.js",
|
||||
"mini": "gulliver/js/form/core/pagedTable.js"
|
||||
},
|
||||
{
|
||||
"name": "grid",
|
||||
"version": "0.6",
|
||||
"homepage": "http://www.maborak.com",
|
||||
"full": "gulliver/js/grid/core/grid.js",
|
||||
"mini": "gulliver/js/grid/core/grid.js"
|
||||
},
|
||||
{
|
||||
"name": "js-calendar",
|
||||
"version": "0.6",
|
||||
"homepage": "http://www.maborak.com",
|
||||
"full": "gulliver/js/widgets/js-calendar/js-calendar.js",
|
||||
"mini": "gulliver/js/widgets/js-calendar/js-calendar.js"
|
||||
},
|
||||
{
|
||||
"name": "bsn.AutoSuggest",
|
||||
"version": "2.1.3",
|
||||
"homepage": "http://www.maborak.com",
|
||||
"full": "gulliver/js/widgets/suggest/bsn.AutoSuggest_2.1.3.js",
|
||||
"mini": "gulliver/js/widgets/suggest/bsn.AutoSuggest_2.1.3.js"
|
||||
},
|
||||
{
|
||||
"name": "pmtooltip",
|
||||
"version": "0.6",
|
||||
"homepage": "http://www.maborak.com",
|
||||
"full": "gulliver/js/widgets/tooltip/pmtooltip.js",
|
||||
"mini": "gulliver/js/widgets/tooltip/pmtooltip.js"
|
||||
},
|
||||
{
|
||||
"name": "module.panel",
|
||||
"version": "0.6",
|
||||
"homepage": "http://www.maborak.com",
|
||||
"full": "gulliver/js/maborak/core/module.panel.js",
|
||||
"mini": "gulliver/js/maborak/core/module.panel.js"
|
||||
}
|
||||
],
|
||||
"build" : true,
|
||||
"build_js_to" : "gulliver/js/maborak/core/",
|
||||
"build_css_to" : "gulliver/css-min/"
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user