Posted - 10/16/2017 : 23:05:41
Vince - This is a great improvement however there are still some issues with not being able to select things individually and some updates to the html are required so that a hierarchy is added to each class so we can then style every single individual element e.g. since the function is right there inside the element it is extremely logical to simply add the function:
<div class="addresses"> <div class="yyBilDet address"> <div class="yyBilDet colheading"> <h2><?php print $yyBilDet?>.</h2> </div> <div class="ordextra1 container"> <div class="ordextra1 left"><?php print $extraorderfield1 ?>:</div> <div class="ordextra1 right" id="ordextra1"><?php print editfunc($alldata['ordExtra1'],'extra1',25)?></div> </div> <div class="ordName container"> <div class="ordName left"><?php print $yyName?>:</div> <div class="ordName right" id="ordname"> <?php if(@$usefirstlastname) print editfunc($alldata['ordName'],'name',11).' '.editfunc($alldata['ordLastName'],'lastname',11); else print editfunc($alldata['ordName'],'name',25)?> </div> </div> <div class="ordAddress container"> <div class="ordAddress left"><?php print $xxAddress?>:</div> <div class="ordAddress right" id="ordaddress"> <?php print editfunc($alldata['ordAddress'],'address',25)?></div> </div> <div class="ordAddress2 container"> <div class="ordAddress2 left"><?php print ($isprinter?' ':$xxAddress2.':')?></div> <div class="ordAddress2 right" id="ordaddress2"><?php print editfunc($alldata['ordAddress2'],'address2',25)?></div> </div> <div class="ordCity container"> <div class="ordCity left"><?php print $xxCity?>:</div> <div class="ordCity right" id="ordcity"><?php print editfunc($alldata['ordCity'],'city',25)?></div> </div> <div class="ordState container"> <div class="ordState left"><?php print $xxAllSta?>:</div> <div class="ordState right" id="ordstate"><?php print editspecial($alldata['ordState'],'state',25,'onblur="setstatetax()"')?></div> </div> <div class="ordZip container"> <div class="ordZip left"><?php print ($isprinter?' ':$xxZip.':')?></div> <div class="ordZip right" id="ordzip"><?php print editfunc($alldata['ordZip'],'zip',15)?></div> </div> <div class="ordcountry container"> <div class="ordcountry left"><?php print ($isprinter?' ':$xxCountry.':')?></div> <div class="ordcountry right" id="ordcountry"> </div> </div> <div class="ordPhone container"> <div class="ordPhone left"><?php print $xxPhone?>:</div> <div class="ordPhone right"><?php print editfunc($alldata['ordPhone'],'phone',25)?></div> </div> <div class="ordExtra2 container"> <div class="ordExtra2 left"><?php print @$extraorderfield2 ?>:</div> <div class="ordExtra2 right" id="ordextra2"><?php print editfunc($alldata['ordExtra2'],'extra2',25)?></div> </div> <div class="Clipboard container"> <div class="Clipboard left"></div> <div class="Clipboard right"><input type="button" value="Copy to Clipboard" onclick="popupaddress('')" /></div> </div> </div>
This does not require any CSS changes to the current adminstyle.css which is already out there but it does allow things to be selected and styled on an individual basis on every element, which is an absolutely essential best practice... e.g. if someone wants to hide the telephone number on the packing slip or wants to make it bold or even to move it somewhere else then this can all be achieved with no more code changes.
It should in fact be standard practice to add the function name to every class for everything moving forward... and I do mean everything... since it will completely eliminate code changes where all display issues or formatting can all be re-solved via css.
John

|