Changeset 384
- Timestamp:
- 05/04/08 17:18:08
- Files:
-
- trunk/phpbms/autofill.php (deleted)
- trunk/phpbms/common/javascript/common.js (modified) (9 diffs)
- trunk/phpbms/common/javascript/datepicker.js (modified) (1 diff)
- trunk/phpbms/common/javascript/smartsearch.js (added)
- trunk/phpbms/common/stylesheet/mozilla/base.css (modified) (1 diff)
- trunk/phpbms/common/stylesheet/mozilla/forms.css (modified) (1 diff)
- trunk/phpbms/common/stylesheet/mozilla/image/button-map.png (added)
- trunk/phpbms/common/stylesheet/mozilla/image/button-www.png (modified) (previous)
- trunk/phpbms/common/stylesheet/mozilla/pages/base (added)
- trunk/phpbms/common/stylesheet/mozilla/pages/base/smartsearches.css (added)
- trunk/phpbms/common/stylesheet/mozilla/pages/bms (added)
- trunk/phpbms/common/stylesheet/mozilla/pages/bms/addresses.css (added)
- trunk/phpbms/common/stylesheet/mozilla/pages/bms/clientaddresses.css (added)
- trunk/phpbms/common/stylesheet/mozilla/pages/client.css (modified) (2 diffs)
- trunk/phpbms/common/stylesheet/mozilla/pages/invoice.css (modified) (5 diffs)
- trunk/phpbms/common/stylesheet/mozilla/pages/quickview.css (modified) (3 diffs)
- trunk/phpbms/header.php (modified) (1 diff)
- trunk/phpbms/include/common_functions.php (modified) (3 diffs)
- trunk/phpbms/include/fields.php (modified) (6 diffs)
- trunk/phpbms/include/session.php (modified) (3 diffs)
- trunk/phpbms/include/tables.php (modified) (7 diffs)
- trunk/phpbms/install/createtables.sql (modified) (4 diffs)
- trunk/phpbms/install/installxml.php (modified) (1 diff)
- trunk/phpbms/install/menu.sql (modified) (1 diff)
- trunk/phpbms/install/smartsearches.sql (added)
- trunk/phpbms/install/tablecolumns.sql (modified) (1 diff)
- trunk/phpbms/install/tabledefs.sql (modified) (1 diff)
- trunk/phpbms/install/tablefindoptions.sql (modified) (1 diff)
- trunk/phpbms/install/tableoptions.sql (modified) (1 diff)
- trunk/phpbms/install/tablesearchablefields.sql (modified) (1 diff)
- trunk/phpbms/install/updatev0.96.sql (added)
- trunk/phpbms/install/updatexml.php (modified) (1 diff)
- trunk/phpbms/install/version.php (modified) (1 diff)
- trunk/phpbms/modules/base/files_addedit.php (modified) (2 diffs)
- trunk/phpbms/modules/base/include/tabledefs.php (modified) (1 diff)
- trunk/phpbms/modules/base/notes_addedit.php (modified) (2 diffs)
- trunk/phpbms/modules/base/smartsearches_addedit.php (added)
- trunk/phpbms/modules/base/tabledefs_addedit.php (modified) (2 diffs)
- trunk/phpbms/modules/base/tabledefs_columns.php (modified) (1 diff)
- trunk/phpbms/modules/bms/addresses_addedit.php (added)
- trunk/phpbms/modules/bms/adminsettings.php (modified) (3 diffs)
- trunk/phpbms/modules/bms/clients_addedit.php (modified) (7 diffs)
- trunk/phpbms/modules/bms/clients_addresses.php (added)
- trunk/phpbms/modules/bms/clients_email.php (modified) (1 diff)
- trunk/phpbms/modules/bms/discounts_addedit.php (modified) (1 diff)
- trunk/phpbms/modules/bms/include/addresses.php (added)
- trunk/phpbms/modules/bms/include/addresstorecord.php (added)
- trunk/phpbms/modules/bms/include/clients.php (modified) (4 diffs)
- trunk/phpbms/modules/bms/include/clients_addresses.php (added)
- trunk/phpbms/modules/bms/include/clients_email_include.php (modified) (1 diff)
- trunk/phpbms/modules/bms/include/invoices.php (modified) (12 diffs)
- trunk/phpbms/modules/bms/include/receipts.php (modified) (1 diff)
- trunk/phpbms/modules/bms/install/createtables.sql (modified) (2 diffs)
- trunk/phpbms/modules/bms/install/install.php (modified) (1 diff)
- trunk/phpbms/modules/bms/install/settings.sql (modified) (1 diff)
- trunk/phpbms/modules/bms/install/smartsearches.sql (added)
- trunk/phpbms/modules/bms/install/tabledefs.sql (modified) (1 diff)
- trunk/phpbms/modules/bms/install/tabs.sql (modified) (1 diff)
- trunk/phpbms/modules/bms/install/update.php (modified) (3 diffs)
- trunk/phpbms/modules/bms/install/updatev0.96.sql (added)
- trunk/phpbms/modules/bms/install/version.php (modified) (1 diff)
- trunk/phpbms/modules/bms/invoices_addedit.php (modified) (12 diffs)
- trunk/phpbms/modules/bms/invoices_addresses_ajax.php (added)
- trunk/phpbms/modules/bms/invoices_client_ajax.php (modified) (3 diffs)
- trunk/phpbms/modules/bms/invoices_lineitem_ajax.php (modified) (1 diff)
- trunk/phpbms/modules/bms/invoices_statushistory.php (modified) (1 diff)
- trunk/phpbms/modules/bms/invoicestatuses_addedit.php (modified) (1 diff)
- trunk/phpbms/modules/bms/javascript/addresstorecord.js (added)
- trunk/phpbms/modules/bms/javascript/client.js (modified) (1 diff)
- trunk/phpbms/modules/bms/javascript/invoice.js (modified) (11 diffs)
- trunk/phpbms/modules/bms/javascript/invoiceaddress.js (added)
- trunk/phpbms/modules/bms/javascript/prereq.js (modified) (1 diff)
- trunk/phpbms/modules/bms/javascript/quickview.js (modified) (2 diffs)
- trunk/phpbms/modules/bms/prereqitemlookup.php (deleted)
- trunk/phpbms/modules/bms/products_prereq.php (modified) (4 diffs)
- trunk/phpbms/modules/bms/quickview.php (modified) (3 diffs)
- trunk/phpbms/modules/bms/quickview_ajax.php (modified) (1 diff)
- trunk/phpbms/modules/bms/receipts_addedit.php (modified) (2 diffs)
- trunk/phpbms/modules/bms/report/clients_folderlabels.php (modified) (2 diffs)
- trunk/phpbms/modules/bms/report/clients_mailinglabels.php (modified) (3 diffs)
- trunk/phpbms/modules/bms/report/clients_shippinglabels.php (modified) (3 diffs)
- trunk/phpbms/modules/bms/report/invoices_pdf_class.php (modified) (4 diffs)
- trunk/phpbms/modules/bms/report/invoices_shippinglabels.php (modified) (2 diffs)
- trunk/phpbms/modules/bms/report/invoices_totals.php (modified) (1 diff)
- trunk/phpbms/modules/bms/report/lineitems_totals.php (modified) (1 diff)
- trunk/phpbms/modules/bms/snapshot.php (modified) (2 diffs)
- trunk/phpbms/modules/recurringinvoices/install/update.php (modified) (1 diff)
- trunk/phpbms/modules/recurringinvoices/install/version.php (modified) (2 diffs)
- trunk/phpbms/modules/recurringinvoices/invoices_recurrence.php (modified) (2 diffs)
- trunk/phpbms/modules/recurringinvoices/scheduler_recurr.php (modified) (1 diff)
- trunk/phpbms/modules/sample/sampletable_addedit.php (modified) (1 diff)
- trunk/phpbms/smartsearch.php (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/phpbms/common/javascript/common.js
r383 r384 108 108 } 109 109 } 110 }//endfunction 111 110 },//endfunction 111 112 113 htmlDecode: function(string){ 114 115 var ret, tarea = document.createElement('textarea'); 116 tarea.innerHTML = string; 117 ret = tarea.value; 118 return ret; 119 120 },//end function 121 122 123 reportError: function(error){ 124 125 if(console){ 126 if(console.log) 127 console.log(error); 128 } else 129 alert(error); 130 131 }//end method - reportError 132 133 112 134 });//end update 113 135 … … 115 137 "update", 116 138 "nameFunctions", 117 "loadXMLDoc" 139 "loadXMLDoc", 140 "htmlDecode", 141 "reportError" 118 142 ]; 119 143 … … 171 195 return retVal; 172 196 }//endMethod 173 197 174 198 })//end update 175 199 … … 297 321 _listener: function(srcObj, func){ 298 322 var E = phpBMS.signal.e; 323 324 if(!srcObj || !func){ 325 326 reportError("ListnerError srcObj:" + srcObj + " func:" + func); 327 return false; 328 329 }//endif 330 299 331 return function (nativeEvent) { 300 332 return func.apply(srcObj, [new E(srcObj, nativeEvent)]); … … 304 336 305 337 connect: function(srcObj, eventName, func){ 338 339 if(!srcObj || !eventName || !func){ 340 341 var err = "Invalid Entry for connect: srcObj:" + srcObj + " eventName:" + eventName + " func:" + func 342 reportError(err); 343 344 return false; 345 346 }//endif 347 306 348 var self = phpBMS.signal; 307 349 … … 316 358 var ident = [srcObj, eventName, listener]; 317 359 self._observers.push(ident); 318 319 360 return ident; 320 361 … … 339 380 var self = phpBMS.signal; 340 381 var observers = self._observers; 341 342 self._disconnect(ident); 343 observers.splice(ident, 1); 344 345 return true; 346 } 382 383 for (var i = 0; i < observers.length; i++) { 384 var pident = observers[i]; 385 if(pident == ident){ 386 387 388 self._disconnect(ident); 389 observers.splice(i, 1) 390 return true; 391 } 392 } 393 return false; 394 }, 395 396 trigger: function(src, sig){ 397 398 var self = phpBMS.signal; 399 var observers = self._observers; 400 401 var E = phpBMS.signal.e; 402 for (var i = 0; i < observers.length; i++) { 403 var ident = observers[i]; 404 if (ident[0] === src && ident[1] === sig) { 405 try { 406 ident[2].apply([new E(src, sig)]); 407 } catch (err) { 408 reportError(err) 409 } 410 }//endif 411 }//endfor 412 413 }//end method - signal 347 414 348 415 })//end class … … 351 418 "connect", 352 419 "disconnect", 353 "getIdent" 420 "getIdent", 421 "trigger" 354 422 ] 355 423 … … 856 924 showModal(text,"Alert",250); 857 925 } 926 927 /* Function Overloads and Extensions --------------------- */ 928 /* ------------------------------------------------------- */ 929 String.prototype.trim = function() { 930 a = this.replace(/^\s+/, ''); 931 return a.replace(/\s+$/, ''); 932 }; 933 858 934 window.alert = function(txt) {modalAlert(txt);} 859 935 trunk/phpbms/common/javascript/datepicker.js
r311 r384 101 101 var thedate=new Date(parseInt(year,10),parseInt(month,10)-1,parseInt(day,10)); 102 102 thefield.value=dateToString(thedate); 103 103 104 if(thefield.onchange) thefield.onchange.call(thefield); 105 trigger(thefield,"onchange"); 106 104 107 closeDPBox(); 105 108 } trunk/phpbms/common/stylesheet/mozilla/base.css
r308 r384 86 86 #saveButton1,#saveButton2{width:68px;margin-right:3px;} 87 87 #cancelButton1,#cancelButton2{width:68px;} 88 89 /* ============================================================================== */ 90 /* Smart Searches */ 91 /* ============================================================================== */ 92 .inputSmartSearch{ 93 background-image:url("image/magnify.gif"); 94 background-position:right; 95 background-repeat:no-repeat; 96 padding-right:10px; 97 } 98 99 .smartSearchBox{ 100 border:1px solid #999999; 101 background:white; 102 position:absolute; 103 } 104 105 .SBResults{ 106 overflow:auto; 107 } 108 109 .SBResults DIV{ 110 color:#666666; 111 padding:5px; 112 font-style:italic; 113 } 114 115 .SBResults A{ 116 /* width:245px;/* 295 - 5 - 30 */ 117 display:block; 118 color:#663366; 119 font-weight:normal; 120 padding:6px 5px 6px 5px; 121 background-repeat:no-repeat; 122 background-position:8px 8px; 123 } 124 125 .SBResults A:hover, .SBResults A.SBSelected{ 126 text-decoration:none; 127 background-color:#663366; 128 color:white; 129 } 130 131 .SBAddNewButton{ 132 width:70px; 133 text-align:right; 134 } 135 136 .SBResults SPAN{ 137 display:block; 138 } 139 140 .SBMain{ 141 font-weight:bold; 142 } 143 144 .SBExtra{ 145 font-size:9px; 146 padding-left:5px; 147 } 148 149 .SBHeader{ 150 background:#EEEEEE; 151 text-align:right; 152 padding:5px; 153 height:16px; 154 } 155 156 .SBFooter{ 157 background:#EEEEEE; 158 text-align:right; 159 font-size:10px; 160 padding:5px; 161 } trunk/phpbms/common/stylesheet/mozilla/forms.css
r375 r384 93 93 .buttonDown{background:url(image/button-down.png) 0 0 no-repeat;} 94 94 .buttonDownDisabled{background:url(image/button-down-disabled.png) 0 0 no-repeat;} 95 .buttonMap{background:url(image/button-map.png) 0 0 no-repeat;} 95 96 .buttonWWW{background:url(image/button-www.png) 0 0 no-repeat;} 96 97 .buttonX{background:url(image/button-x.png) 0 0 no-repeat;} trunk/phpbms/common/stylesheet/mozilla/pages/client.css
r219 r384 8 8 #leftSideDiv{padding-top:1px;margin-right:210px;} 9 9 10 #id, #becameclient, # ds-salesmanagerid, #ccnumber, #ds-taxareaid, #comments{width:98%}10 #id, #becameclient, #ccnumber, #ds-taxareaid, #comments{width:98%} 11 11 #type, #category, #leadsource,#paymentmethodid,#shippingmethodid,#discountid,#taxareaid{width:99%} 12 #ds-salesmanagerid{ 13 width:90% 14 } 12 15 13 16 #backtoorderP{padding-top:9px;} … … 17 20 18 21 .phonelefts{float:left} 19 #address1 ,#shiptoaddress1{margin-bottom:2px;}22 #address1{margin-bottom:2px;} 20 23 21 24 .csz{float:left} trunk/phpbms/common/stylesheet/mozilla/pages/invoice.css
r375 r384 2 2 /* $LastChangedDate$ */ 3 3 4 #clientdisplay{ 5 background-image:url("../image/search.gif"); 6 background-repeat:no-repeat; 7 background-position:left; 8 padding-left:17px; 9 } 10 11 #clientSearchBox{ 12 border:1px solid #999999; 13 background:white; 14 width:300px; 15 position:absolute; 16 } 17 18 #CSBResults{ 19 overflow:auto; 20 } 21 22 #CSBResults DIV{ 23 color:#666666; 24 padding:5px; 25 font-style:italic; 26 } 27 28 #CSBResults A{ 29 width:245px;/* 295 - 5 - 30 */ 30 display:block; 31 color:#663366; 32 font-weight:normal; 33 padding:5px 3px 5px 30px; 34 background-repeat:no-repeat; 35 background-position:8px 8px; 36 } 37 38 #CSBResults A:hover, #CSBResults A.CSBSelected{ 39 text-decoration:none; 40 background-color:#663366; 41 color:white; 42 } 43 44 #CSBAddNewButton{ 45 width:70px; 46 text-align:right; 47 } 48 49 .client{ 4 .SBResults A.client{ 5 padding-left:30px; 50 6 background-image:url("../image/client.png"); 51 7 } 52 8 53 .prospect{ 9 .SBResults A.prospect{ 10 padding-left:30px; 54 11 background-image:url("../image/prospect.png"); 55 }56 57 #CSBResults SPAN{58 display:block;59 }60 61 .CSBMain{62 font-weight:bold;63 }64 65 .CSBExtra{66 font-size:9px;67 }68 69 #CSBHeader{70 background:#EEEEEE;71 text-align:right;72 padding:5px;73 height:16px;74 }75 76 #CSBFooter{77 background:#EEEEEE;78 text-align:right;79 font-size:10px;80 padding:5px;81 12 } 82 13 … … 87 18 #printButton{ text-align:right;float:left;} 88 19 #printButton input{width:75px;} 89 90 #address1,#address2,#country,#leadsource{width:364px;}91 20 92 21 #fsAttributes{clear:both;float:right;width:260px;} … … 94 23 #type{width:90px} 95 24 #statusid{width:98%} 96 #ds-assignedtoid{width:99%} 25 #leadsource{ 26 width:98% 27 } 97 28 98 29 99 30 #fsTops{margin-right:270px;} 100 #address1{margin-bottom:2px;} 101 .cszP{float:left;} 102 #countryP{clear:left;} 31 32 #billingAddressDiv, #shiptoAddressDiv{ 33 clear:left; 34 border:1px solid #ACB7C4; 35 padding:8px; 36 margin:0 4px 4px; 37 } 38 39 .addressButtons{ 40 width:75px; 41 } 42 43 #shiptoAddressDiv{ 44 display:none; 45 } 46 47 #address1, #shiptoaddress1{ 48 margin-top:2px; 49 margin-bottom:2px; 50 } 51 52 #fsAddresses{ 53 display:block; 54 border:0; 55 margin:0; 56 padding:0; 57 } 58 59 #fsAddresses legend{ 60 display:none; 61 } 62 63 .cityState{ 64 float:left; 65 } 66 67 68 .showoptions{ 69 width:100px; 70 } 71 72 .showoptions span{ 73 display:inline; 74 padding-left:15px; 75 color : #455372; 76 font-weight:bold; 77 } 78 79 #addressOptionsDivBilling, #addressOptionsDivShipTo { 80 display:none; 81 } 82 83 #LAPickDiv{ 84 height:200px; 85 overflow:auto; 86 background:white; 87 border:1px solid #abb1b1;; 88 } 89 90 .LAPickAs { 91 display:block; 92 padding:8px; 93 border-bottom:1px solid #CCCCCC; 94 font-weight:normal; 95 color:black; 96 } 97 98 .LAPickAs:hover{ 99 text-decoration:none; 100 background: #CCCCCC; 101 } 102 103 .LASel{ 104 color:white; 105 background:black; 106 } 107 108 .LASel:Hover{ 109 background:black; 110 } 103 111 104 112 #lineItemsFS{clear:both;} … … 120 128 #ds-partname{width:135px;} 121 129 122 #partnameHeader div{width:120px;} 123 #memoHeader{width:100%} 130 #memoHeader{ 131 width:100%; 132 } 133 124 134 125 135 #memo, .lineitemMemos{width:100%;padding-right:0;border-right:0;} … … 177 187 .invoiceTotalLabels div{height:24px; line-height:24px;vertical-align:bottom;} 178 188 179 #parenInfo div{height:25px;clear:right;} 180 #parenInfo div span{ 181 display:block; 182 float:right; 183 line-height:24px;height:24px; 184 padding:0 4px; 189 #parenInfo{ 190 margin:0; 191 padding:0; 192 border:0; 193 border-collapse:separate; 194 } 195 196 #parenInfo td{ 197 text-align:right; 198 line-height:24px; 185 199 color:#666666; 200 padding:0 4px 0 4px; 201 border:0; 202 border-bottom:1px solid #CCCCCC; 203 } 204 205 #parenInfo td.blanks{ 206 line-height:25px; 207 border:0; 208 } 209 210 #parenInfo td#parenSpacer{ 211 height:55px; 186 212 } 187 213 188 214 #totalSpacer{height:55px;line-height:55px;border:0;} 189 215 #totalSpacer span{border:0;} 190 div #parenSpacer{height:55px;clear:right}191 div #parenSpacer span{height:55px;line-height:55px;border:0;}192 193 216 194 217 .vTabs,.vTabsHover{cursor:pointer;color:#455372;background:url(../image/button-rew.png) 5px 4px no-repeat;} trunk/phpbms/common/stylesheet/mozilla/pages/quickview.css
r146 r384 2 2 /* $LastChangedDate$ */ 3 3 4 #lookupByP{float:left; width:100px;padding-top:2px;} 5 #lookupButtonsP{float:right;width:148px;padding-top:12px;text-align:right;} 6 #dolookup,#addnew{width:70px} 7 #lookupWhatP{margin:0 154px 0 108px;} 8 .lookupWhats{width:90%;} 4 .SBResults A.client{ 5 padding-left:30px; 6 background-image:url("../image/client.png"); 7 } 8 9 .SBResults A.prospect{ 10 padding-left:30px; 11 background-image:url("../image/prospect.png"); 12 } 13 14 #viewButton, #addButton{ 15 width:70px 16 } 17 18 #clientIDDiv{ 19 width:100%; 20 margin-right:200px; 21 margin-left: 170px; 22 background:red; 23 } 24 #ds-clientid{ 25 width:55%; 26 } 27 28 29 30 31 #crTile.fsclient{ 32 background-image:url("../image/client.png"); 33 } 34 35 #crTile.fsprospect{ 36 background-image:url("../image/prospect.png"); 37 } 38 39 #crTile{ 40 background:white no-repeat 13px 13px; 41 } 42 43 #crTile H1 { 44 background:none; 45 padding-left:26px; 46 font-weight:bold; 47 } 48 49 #crTile P{ 50 margin: 5px 0 5px 42px; 51 padding: 0; 52 } 53 54 #crName{ 55 font-size:14px; 56 font-weight:bold; 57 margin-top:0; 58 } 59 60 #crLocation{ 61 font-size:10px; 62 } 63 64 .RDNames{ 65 float:left; 66 width:100px; 67 text-align:right; 68 font-weight:bold; 69 } 70 71 .RDData{ 72 margin-left:120px; 73 } 74 75 .RDData UL { 76 margin:0; 77 padding:0; 78 padding-left:15px; 79 } 80 81 .RDData LI { 82 margin:0; 83 padding:0px 0px 5px 0; 84 } 85 86 #theclear{ 87 clear:both; 88 } 89 90 9 91 .disabledP{display:none;} 10 92 11 93 #theDetails{margin-top:15px;} 12 94 #rightSideDiv{float:right;width:300px;margin-top:0;} 13 #leftSideDiv{margin-right:3 28px;padding-top:1px;}95 #leftSideDiv{margin-right:308px;padding-top:1px;} 14 96 15 97 H2{margin-top:5px;} … … 17 99 .RDNames{float:left; width:100px;text-align:right;} 18 100 .RDData{margin-left:120px;} 19 .Uppers{font-size:15px;}20 #RDMemo{height:100px;overflow:auto;}21 101 22 102 #editClient{display:block;width:75px;float:right;} … … 31 111 } 32 112 33 #salesTable{height:1 90px;overflow:auto;}34 #notesTable{height:1 50px;overflow:auto;}113 #salesTable{height:140px;overflow:auto;} 114 #notesTable{height:140px;overflow:auto;} trunk/phpbms/header.php
r308 r384 24 24 25 25 $phpbms->showExtraJs($phpbms->topJS); 26 27 if($phpbms->onload) { 28 ?><script language="JavaScript" type="text/javascript"> 29 connect(window,"onload",function() { 30 <?php 31 foreach($phpbms->onload as $theextra) 32 echo $theextra."\n"; 33 ?> 34 }) 35 </script><?php 36 }//end if onload 26 37 ?> 27 38 </head> 28 <body <?php if($phpbms->onload) echo "onload=\"".$phpbms->onload."\""?>>39 <body> 29 40 <?php 30 41 trunk/phpbms/include/common_functions.php
r370 r384 47 47 var $topJS = array(); 48 48 var $bottomJS = array(); 49 50 var $onload = ""; 51 49 var $onload = array(); 50 52 51 var $showFooter = true; 53 52 var $showMenu = true; … … 84 83 }//endid 85 84 }//end method 85 86 86 87 87 function getModules(){ … … 579 579 case "noencoding": 580 580 $value=$value; 581 break; 581 break; 582 583 584 case "bbcode": 585 $value=htmlQuotes($value); 586 587 // This list needs to be expanded 588 $bbcodelist["[b]"] = "<strong>"; 589 $bbcodelist["[/b]"] = "</strong>"; 590 $bbcodelist["[br]"] = "<br />"; 591 $bbcodelist["[space]"] = " "; 592 593 foreach($bbcodelist as $bbcode => $translation) 594 $value = str_replace($bbcode, $translation, $value); 595 596 break; 597 582 598 default: 583 599 $value=htmlQuotes($value); trunk/phpbms/include/fields.php
r308 r384 55 55 var $fields = array(); 56 56 57 var $onload = array(); 57 58 58 59 function phpbmsForm($action = NULL, $method="post", $name="record", $onsubmit="return validateForm(this);", $dontSubmit = true){ … … 145 146 $phpbms->topJS = array_merge($this->topJS,$phpbms->topJS); 146 147 $phpbms->bottomJS = array_merge($this->bottomJS,$phpbms->bottomJS); 148 $phpbms->onload = array_merge($this->onload,$phpbms->onload); 147 149 148 150 //next we go through the list of fields 149 151 foreach($this->fields as $field){ 152 150 153 $toAdd = $field->getJSMods(); 151 154 … … 156 159 $phpbms->topJS = array_merge($phpbms->topJS,$toAdd["topJS"]); 157 160 $phpbms->bottomJS = array_merge($phpbms->bottomJS,$toAdd["bottomJS"]); 158 } 159 } 160 } 161 $phpbms->onload = array_merge($phpbms->onload,$toAdd["onload"]); 162 163 }//endforeach 164 165 }//end method - jsMerge 166 }//end class 161 167 162 168 … … 244 250 245 251 function getJSMods(){ 246 $thereturn = array("jsIncludes" => array(), "topJS" => array(), "bottomJS" => array() );252 $thereturn = array("jsIncludes" => array(), "topJS" => array(), "bottomJS" => array(), "onload" => array()); 247 253 248 254 foreach($this->jsIncludes as $theinclude) … … 709 715 710 716 711 //============================================================================================ 712 class inputAutofill extends inputField{ 717 class inputSmartSearch extends inputField{ 718 713 719 /* 714 initialvalue = Value for get field (usually and id) 715 tabledefid = id of table to pull information from 716 getfield = Field to match value from 717 displayfield = Field to display 718 extrafield = Extra table information to display on drop down 719 whereclause = SQL where clause (without WHERE) narrowing search lookup 720 blankout = Wether to blank out invlaid entries 720 *db = (dbObj) Database Object 721 *id = (string) name of hidden field to be created 722 *searchName = (string) unique name of a stored search 723 initialvalue = (var) initial value for field (blank) 724 displayName = (string) Name to display (uses id by default) 725 displayName = (string) Name to display (uses id by default) 726 size = (int) size attribute for displayed input tag (32) 727 maxlength = (int) max length attribute for displayed input tag (255) 728 displayLabel (boolean) Show label tag with displayName (true) 729 730 The JS used by this field type requires that the field NOT be implemented inside a p tag, 731 inline element, or any tag that should not contain a div tag. In IE, if the field placed 732 inside an element that should not be able to handle a DIV tag inside it (standards-wise), 733 IE will report a Javascript error. 721 734 */ 722 function inputAutofill($db, $id, $initialvalue, $tabledefid, $getfield, $displayfield, 723 $extrafield="", $whereclause="", $displayName = NULL, $required=false, 724 $blankout=true, $displayLabel = true) { 725 $size = 32; 726 $maxlength = 128; 735 function inputSmartSearch($db, $id, $searchName, $initialvalue = "", $displayName = NULL, $required=false, 736 $size = 32, $maxlength = 255, $displayLabel = true) { 737 $this->db = $db; 727 738 728 739 parent::inputField($id, $initialvalue, $displayName,$required, NULL, $size, $maxlength, $displayLabel); 729 730 $this->db = $db; 731 732 $this->tabledefid = $tabledefid; 733 $this->getfield = $getfield; 734 $this->displayfield = $displayfield; 735 $this->extrafield = $extrafield; 736 $this->whereclause = $whereclause; 737 738 $this->blankout = $blankout; 739