mirror of
https://github.com/jorgevasquezp/wc_helper.git
synced 2026-08-16 15:31:02 +00:00
Cleaned up whitespace and tabs.
This commit is contained in:
+13
-39
@@ -12,6 +12,8 @@
|
||||
TODO:
|
||||
- Get artist initials in Windows too.
|
||||
*/
|
||||
|
||||
// Define the Panel
|
||||
(function wcHelperPanel (thisObj) {
|
||||
/* Build UI */
|
||||
function buildUI(thisObj) {
|
||||
@@ -21,31 +23,22 @@
|
||||
var secondButton = "own";
|
||||
var thirdButton = "render";
|
||||
var fourthButton = "rename";
|
||||
|
||||
var win = (thisObj instanceof Panel)? thisObj : new Window('palette', windowTitle);
|
||||
win.spacing = 0;
|
||||
win.margins = 1;
|
||||
|
||||
var myProjectGroup = win.add ("group");
|
||||
win.projectPathLabel = myProjectGroup.add("statictext");
|
||||
|
||||
var myArtistGroup = win.add ("group");
|
||||
var artistNameLabel= myArtistGroup.add("statictext");
|
||||
win.artistName= myArtistGroup.add("statictext");
|
||||
var artistRoleLabel= myArtistGroup.add("statictext");
|
||||
win.artistRole= myArtistGroup.add("dropdownlist",undefined,["Offline","Finishing"])
|
||||
win.artistRole.selection = 0;
|
||||
|
||||
|
||||
win.projectPathLabel.text = "asdADSASDASDASDASDASDASDASDASDASDASDASDASDASDASDASDASDASDASDASDASDASASDasdADSASDASDASDASDASDASDASDASDASDASDASDASDASDASDASDASDASDASDASDASDASASDasdADSASDASDASDASDASDASDASDASDASDASDASDASDASDASDASDASDASDASDASDASDASASD";
|
||||
|
||||
win.projectPathLabel.text = "000000000000000000000000000000000000000000000000000";
|
||||
artistNameLabel.text = "Artist:";
|
||||
artistRoleLabel.text = "Role:";
|
||||
//****//
|
||||
|
||||
win.artistName.text = system.callSystem("whoami");
|
||||
|
||||
var myButtonGroup = win.add ("group");
|
||||
myButtonGroup.spacing = 4;
|
||||
myButtonGroup.margins = 4;
|
||||
myButtonGroup.orientation = "row";
|
||||
win.checkbox1 = myButtonGroup.add( "checkbox", undefined, "Dupli:")
|
||||
win.checkbox1.value = true;
|
||||
@@ -57,6 +50,11 @@
|
||||
myButtonGroup2.alignment = "center";
|
||||
myButtonGroup2.alignChildren = "center";
|
||||
|
||||
win.spacing = 0;
|
||||
win.margins = 1;
|
||||
myButtonGroup.spacing = 4;
|
||||
myButtonGroup.margins = 4;
|
||||
|
||||
win.button1.onClick = function(){
|
||||
btnPlus1();
|
||||
//versionUpSelectedComps(1);
|
||||
@@ -67,10 +65,8 @@
|
||||
win.button3.onClick = function(){
|
||||
btnRender();
|
||||
}
|
||||
|
||||
win.button4.onClick = function(){
|
||||
btnTest();
|
||||
//alert( getItemByName( getTodayString() ));
|
||||
}
|
||||
win.onResizing = function(){
|
||||
updateProjectPath();
|
||||
@@ -81,7 +77,6 @@
|
||||
return win
|
||||
}
|
||||
|
||||
|
||||
// Show the Panel
|
||||
var w = buildUI(thisObj);
|
||||
if (w.toString() == "[object Panel]") {
|
||||
@@ -91,7 +86,6 @@
|
||||
}
|
||||
|
||||
/* General functions */
|
||||
|
||||
w.pad = function ( n, i ){ //pad n with zeroes up to i places.
|
||||
if (String(n).length>=i){
|
||||
return String(n)
|
||||
@@ -104,10 +98,8 @@
|
||||
return padding+String(n)
|
||||
}
|
||||
}
|
||||
|
||||
function updateProjectPath(){
|
||||
w.projectPathLabel.text = getOutputBasePath();
|
||||
//alert(w.projectPathLabel.text);
|
||||
}
|
||||
function getSelectedProjectItems(){
|
||||
|
||||
@@ -165,6 +157,7 @@
|
||||
}
|
||||
return myItem;
|
||||
}
|
||||
|
||||
/* Project Specific functions */
|
||||
function getOfflineRevCode( myComp ){
|
||||
|
||||
@@ -275,17 +268,13 @@
|
||||
function setRenderToProjectPath( rqItem , extra_path ){
|
||||
updateProjectPath()
|
||||
var uiPath = w.projectPathLabel.text;
|
||||
alert(uiPath);
|
||||
|
||||
//alert(uiPath);
|
||||
//updateProjectPath();
|
||||
|
||||
//alert(rqItem);
|
||||
|
||||
// alert( rqItem );
|
||||
if ( (rqItem.status == 3015) || (rqItem.status == 3013) ){
|
||||
for ( var j = 1 ; j <= rqItem.numOutputModules ; j ++ ){
|
||||
o_module = rqItem.outputModule(j);
|
||||
|
||||
var old_name = rqItem.comp.name.replace(".","_");
|
||||
//alert(old_name);
|
||||
if ( o_module.file != null ){
|
||||
@@ -309,13 +298,9 @@
|
||||
//o_module.file= new_file;
|
||||
|
||||
}
|
||||
|
||||
var p = String( o_module.file.path ).split("/");
|
||||
|
||||
p.splice(0,3);
|
||||
|
||||
var s = "";
|
||||
|
||||
for ( var i = 0 ; i < p.length ; i ++ ){
|
||||
s += "\n"+p[i];
|
||||
}
|
||||
@@ -376,7 +361,6 @@
|
||||
}
|
||||
return indexInCollection;
|
||||
}
|
||||
|
||||
function versiounUpTodaySelectedComp( myComp, inc ){
|
||||
//var my_item = getSelectedProjectItems()[0];
|
||||
|
||||
@@ -452,22 +436,15 @@
|
||||
versionUpSelectedComps( 0 );
|
||||
}
|
||||
}
|
||||
|
||||
function btnRender(){
|
||||
renderSelectedToProjectPath();
|
||||
}
|
||||
|
||||
function btnTest(){
|
||||
compHerder = new CompHerder();
|
||||
compHerder.activate();
|
||||
//alert("Nothing to test right now.")
|
||||
}
|
||||
|
||||
////
|
||||
|
||||
|
||||
|
||||
|
||||
function CompHerder(){
|
||||
this.methods ={
|
||||
pad : function ( n , pad ) {
|
||||
@@ -554,7 +531,6 @@ function CompHerder(){
|
||||
}
|
||||
this.init = function init()
|
||||
{
|
||||
|
||||
// this.btnLauyout =
|
||||
// "button\
|
||||
// {\
|
||||
@@ -696,23 +672,21 @@ function CompHerder(){
|
||||
myUI.window.tabs.search_tab.replaceGrp.replaceString.onActivate = function(){
|
||||
myUI.window.tabs.search_tab.replaceGrp.replaceString.text = "";
|
||||
}
|
||||
|
||||
//EVENT HANDLERS
|
||||
myUI.window.tabs.search_tab.doItBtn.onClick = function(){
|
||||
var search_str = myUI.window.tabs.search_tab.searchGrp.searchString.text;
|
||||
var replace_str = myUI.window.tabs.search_tab.replaceGrp.replaceString.text;
|
||||
myUI.methods.replace( myUI.methods.getSelectedProjectItems() , search_str , replace_str );
|
||||
};
|
||||
|
||||
myUI.window.tabs.suprefix.suprefixGrp.pre.prefixBtn.onClick = function(){
|
||||
var pre = myUI.window.tabs.suprefix.suprefixGrp.pre.prefixString.text;
|
||||
myUI.methods.prefix( myUI.methods.getSelectedProjectItems() , pre );
|
||||
};
|
||||
|
||||
myUI.window.tabs.suprefix.suprefixGrp.su.sufixBtn.onClick = function(){
|
||||
var su = myUI.window.tabs.suprefix.suprefixGrp.su.sufixString.text;
|
||||
myUI.methods.suffix( myUI.methods.getSelectedProjectItems() , su );
|
||||
};
|
||||
|
||||
myUI.window.tabs.rename_tab.renameGrp.renameBtn.onClick = function(){
|
||||
var new_name = myUI.window.tabs.rename_tab.renameGrp.renameString.text;
|
||||
myUI.methods.rename( myUI.methods.getSelectedProjectItems() , new_name );
|
||||
|
||||
Reference in New Issue
Block a user