Changeset 1443


Ignore:
Timestamp:
2010-02-23 11:25:55 (3 years ago)
Author:
freya
Message:

set public uri of static resources needed in datecontrol in headerlinks

Location:
trunk/modules/kauri-forms/kauri-forms-framework/src/main/kauri
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/modules/kauri-forms/kauri-forms-framework/src/main/kauri/static-{build}.key/kauri.forms/date.js

    r1442 r1443  
    344344            var options = { 
    345345                dateFormat: type['user-format'].pattern, 
    346                 // TODO get publicUri('service:/main/static/img/1x1t.gif') here 
    347                 buttonImage: "/kauri/forms/static/img/1x1t.gif", // the image will actually be set with css so just pass a dummy img src 
     346                buttonImage: this.staticResourceUri + "/img/1x1t.gif", // the image will actually be set with css so just pass a dummy img src 
    348347                buttonText: "Choose a date", 
    349348                buttonImageOnly: true, 
    350349                showOn: "button", 
    351350                yearRange: this.yearRange 
    352                 // the buttonText option is removed because is always shown (image is set by css and so the alt is always shown) 
    353351            }; 
    354352         
  • trunk/modules/kauri-forms/kauri-forms-framework/src/main/kauri/templates/snippet/headerlinks.xml

    r1400 r1443  
    7171          })(jQuery); 
    7272]]></script> 
     73 
     74    <!--  configure static resource Uri for date control --> 
     75    <script type="text/javascript"> 
     76        (function(\$){ 
     77            var staticResourceUri = "${publicUri('service:/main/static/')}"; 
     78<![CDATA[    
     79            var kf = $.org.kauriproject.forms; 
     80            var controlDef = kf.controlTypes.get("date-control"); 
     81            controlDef.prototype.staticResourceUri = staticResourceUri; 
     82          })(jQuery); 
     83]]></script> 
     84 
    7385</t:if> 
Note: See TracChangeset for help on using the changeset viewer.