phpBMS

Changeset 427 for trunk/phpbms/common

Show
Ignore:
Timestamp:
08/13/08 12:09:00 (4 years ago)
Author:
nate
Message:
  • Initial implementation of table imports.
  • Tables engine type changed to INNODB to support mysql transactions.
  • Tabledefs and tableoptions tables modified with additional columns.
  • Permits additional commands to be called without records needing to be selected, provided they have the correct property (found in tableoptions sections of the tabledef add edit).
  • Fixes delete button name for tax areas tabledef.
Location:
trunk/phpbms/common
Files:
1 added
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/phpbms/common/javascript/queryfunctions.js

    r308 r427  
    9393        if(!ctrlkeydown && shiftkeydown){ 
    9494                //Need to program shift click in here! 
    95                 var curID=null; 
    96                 var theTable=theTR.parentNode; 
    97                 var searchArray="+"+selIDs.join("+")+"+"; 
    98                 var point1=null; 
    99                 var point2=null; 
     95                var curID = null; 
     96                var theTable = theTR.parentNode; 
     97                var searchArray = "+"+selIDs.join("+")+"+"; 
     98                var point1 = null; 
     99                var point2 = null; 
    100100                 
    101101                for(i=0;i<theTable.childNodes.length;i++){ 
    102102                        if (theTable.childNodes[i].className){                           
    103103                                if(theTable.childNodes[i].className != "queryGroup"){ 
    104                                         theTable.childNodes[i].className="qr"+theTable.childNodes[i].className.charAt(theTable.childNodes[i].className.length-1); 
    105                                         curID=theTable.childNodes[i].id.substr(2); 
    106                                         if(curID==theID) 
    107                                                 point1=i; 
    108                                         if(searchArray.indexOf("+"+curID+"+")!=-1 && point2==null) { 
    109                                                 point2=i; 
     104                                        theTable.childNodes[i].className = "qr"+theTable.childNodes[i].className.charAt(theTable.childNodes[i].className.length-1); 
     105                                        curID = theTable.childNodes[i].id.substr(2); 
     106                                        if(curID == theID) 
     107                                                point1 = i; 
     108                                        if(searchArray.indexOf("+"+curID+"+") != -1 && point2==null) { 
     109                                                point2 = i; 
    110110                                        } 
    111111                                } 
     
    157157} 
    158158 
    159 function chooseOtherCommand(thevalue,thetext){ 
    160         var thediv = getObjectFromID("otherDropDown"); 
    161         var otherField = getObjectFromID("othercommands"); 
    162          
    163         otherField.value = thevalue; 
    164          
    165         if (thevalue != "-1") { 
    166                 setSelIDs(otherField.form); 
    167                 otherField.form.submit(); 
    168         } else { 
    169                 var confirmcommand=thetext 
    170                 confirmDelete(confirmcommand); 
    171                 thediv.style.display = "none"; 
    172         } 
     159function chooseOtherCommand(thevalue, thetext, thesource){ 
     160         
     161        if(!thesource.className.match(/Disabled/)){ 
     162                 
     163                switch(thevalue){ 
     164                        case "-1": 
     165                                var thediv = getObjectFromID("otherDropDown"); 
     166                                var confirmcommand=thetext; 
     167                                confirmDelete(confirmcommand); 
     168                                thediv.style.display = "none"; 
     169                                break; 
     170                         
     171                        case "-2": 
     172                                importRecord(); 
     173                                break; 
     174                         
     175                        default: 
     176                                var otherField = getObjectFromID("othercommands"); 
     177                                setSelIDs(otherField.form); 
     178                                otherField.value = thevalue; 
     179                                otherField.form.submit(); 
     180                                break; 
     181                }//end switch 
     182                 
     183        }//end if 
     184         
    173185} 
    174186 
     
    210222        var printButton=getObjectFromID("print"); 
    211223        var deleteButton=getObjectFromID("deleteRecord"); 
    212         var otherCommands=getObjectFromID("otherCommandButton"); 
     224        //var otherCommands=getObjectFromID("otherCommandButton"); 
    213225        var relationship=getObjectFromID("relationship"); 
     226        var select = getElementsByClassName("needselect"); 
     227        if(!select.length) 
     228                var select = getElementsByClassName("needselectDisabled"); 
    214229                 
    215230        if(editButton) 
     
    218233        if(deleteButton) 
    219234                deleteButton.className = "deleteRecord"+((disabledstatus)?"Disabled":""); 
    220  
    221         if(otherCommands) { 
    222                 otherCommands.className = "otherCommands"+((disabledstatus)?"Disabled":""); 
    223                 var otherDropDown = getObjectFromID("otherDropDown"); 
    224                 otherDropDown.style.display = "none";            
    225         } 
     235                         
     236         
     237        for(i = 0;i < select.length; i++) 
     238                select[i].className = "needselect"+((disabledstatus)?"Disabled":""); 
     239         
     240         
     241        //if(otherCommands) { 
     242        //      otherCommands.className = "otherCommands"+((disabledstatus)?"Disabled":""); 
     243        //      var otherDropDown = getObjectFromID("otherDropDown"); 
     244        //      otherDropDown.style.display = "none"; 
     245        //} 
    226246                 
    227247        if(relationship) relationship.disabled=disabledstatus; 
     
    271291} 
    272292 
     293function importRecord(){ 
     294        var connector; 
     295        if (importFile.indexOf("?")>=0) 
     296                connector="&"; 
     297        else 
     298                connector="?"; 
     299        if(typeof xtraParamaters != "undefined") 
     300                importFile+=connector+(xtraParamaters); 
     301        document.location=importFile; 
     302} 
    273303 
    274304// Select All/None Button 
  • trunk/phpbms/common/stylesheet/mozilla/pages/search.css

    r318 r427  
    4040.otherCommandsDisabled{background-image: url("../image/search-toolbar-cmd-db.png")} 
    4141.searchSelection{background-image: url("../image/search-toolbar-selection.png")} 
    42 .searchSelectionDisabled{background-image: url("../image/search-toolbar-selection-db.png")} 
     42.needselectDisabled{background-image: url("../image/search-toolbar-selection-db.png")} 
     43.needselectDisabled{ 
     44        color:grey; 
     45} 
    4346.sqlUp{background-image: url("../image/search-toolbar-sql.png")} 
    4447.sqlDn{background-image: url("../image/search-toolbar-sql-dn.png")} 
phpBMS vulnerability assesment provided by Orvant Inc. Copyright © 2010 Kreotek, LLC. All Rights reserved.