Ignore:
Timestamp:
2013-01-16T18:56:21+13:00 (11 years ago)
Author:
davidb
Message:

Can now correctly obtain colours and size of text when generating Expeditee frames. Also accounted for when the web browser being used is Firefox (FF uses "700" instead of the word "bold" for font-weight). The width of text items is also calculated and written to Expeditee. Parameters have also been provided so the user can decide whether they want the correct font information and text width used or to just use default values.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gs3-extensions/html-to-expeditee/trunk/src/src/cgi-bin/html-to-expeditee.pl.in

    r26728 r26731  
    6262
    6363        <input value="$site" name="site" id="site" type="hidden">
    64         <input value="Go" id="go"
    65                class="ui-button ui-widget ui-state-default ui-corner-all"
    66                type="submit">
     64       
     65        <p>
     66        <input type="checkbox" id="checkBoxBrowsing" name="generate_browsing" value="generate_browsing">Generate Browsing Frameset<br/>
     67        </p>
     68       
     69        <p style="font-weight: bold;">Extra Expeditee Frame Output Options:</p>
     70        <input type="checkbox" id="checkBoxFont" name="compute_font" value="compute_font">Compute Font<br/>
     71        <input type="checkbox" id="checkBoxWidth" name="compute_width" value="compute_width">Compute Width<br/>
     72       
     73        <p><input value="Go" id="go" class="ui-button ui-widget ui-state-default ui-corner-all" type="submit"><p>
    6774
    6875    </form>
     
    7077      var docOIDs = [];
    7178      var numDocOIDs;
    72 
     79      var compute_font = false;
     80      var compute_width = false;
     81      var generate_browsing = false;    //whether to generate a matching browsing frameset
     82     
    7383      \$(function() {
    7484      \$('#progress').progressbar();
     
    8999              cl = "CL" + cl;
    90100          }
    91          
     101         
     102          compute_font = document.getElementById("checkBoxFont").checked;
     103          compute_width = document.getElementById("checkBoxWidth").checked;
     104         
     105          generate_browsing = document.getElementById("checkBoxBrowsing").checked;
     106         
    92107          var gs2=$isGSDL2;
    93108
     
    102117              url += "&excerptid=gs_content";
    103118          }
     119         
     120          console.log("*** CHECKING URL: " + url);
    104121
    105122          /* processing animation */
     
    227244          if(frameNum === null){
    228245            frameNum = iter;
    229             console.log("no frameNum found, use iter: " + frameNum);
    230           }else{
    231             console.log("frameNum metadata found: " + frameNum);
    232246          }
    233247         
     
    252266          }
    253267
    254           var expFrameTree = htmlToExpeditee(gsContent);
     268          var expFrameTree = htmlToExpeditee(gsContent,compute_font,compute_width);
    255269
    256270          var expFrame = JSON.stringify(expFrameTree);
    257          
    258           console.log(expFrame);
    259          
     271          //console.log(expFrame);
    260272          //alert(expFrame);
    261273
     
    277289            params += "&assoc=" + assoc;
    278290          }
     291         
     292          params += "&compute-font=" + compute_font;
    279293
    280294          var clHtml = urlPostSync(url,params);
     
    417431    my $collect = $gsdl_cgi->clean_param("collect");   
    418432    my $cl = $gsdl_cgi->clean_param("cl");
    419    
     433       
    420434    # Establish collect_dir using defining 'site' along the way if GS3
    421435
Note: See TracChangeset for help on using the changeset viewer.