Difference between revisions of "JsWidget"

From Creative Commons
Jump to: navigation, search
(Availability)
(Updating text to reflect current state)
Line 1: Line 1:
 
Creative Commons currently provides two methods for integrating license selection into applications: the [[Partner Interface]] and the [[Creative Commons Web Services|web service API]].  The CC Javascript Widget will provide an additional, lightweight method for integrating license selection into web applications.  When complete the widget will be used in [[WpLicense]] as well.
 
Creative Commons currently provides two methods for integrating license selection into applications: the [[Partner Interface]] and the [[Creative Commons Web Services|web service API]].  The CC Javascript Widget will provide an additional, lightweight method for integrating license selection into web applications.  When complete the widget will be used in [[WpLicense]] as well.
  
'''Note that the JsWidget is currently under development but a [http://sourceforge.net/project/showfiles.php?group_id=80503&package_id=239510 0.1 preview is available].'''
+
'''Note that the JsWidget is currently under development but a [http://sourceforge.net/project/showfiles.php?group_id=80503&package_id=239510 0.2 preview is available].'''
  
 
== Sample Usage ==
 
== Sample Usage ==
Line 23: Line 23:
 
       .
 
       .
 
         <div id="cc_widget_container">
 
         <div id="cc_widget_container">
           <script src="http://api.creativecommons.org/jswidget/tags/0.1/complete.js"></script>
+
           <script src="http://api.creativecommons.org/jswidget/tags/0.2/complete.js"></script>
 
         </div>
 
         </div>
 
       .
 
       .
Line 33: Line 33:
 
== Availability ==
 
== Availability ==
  
You can play with a 0.1 pre-release right now!
+
You can play with a 0.2 pre-release right now!
 +
* 2007-07-25: [http://sourceforge.net/project/showfiles.php?group_id=80503&package_id=239510 Released 0.2].  The UI now doesn't ask or contain spurious questions, plus translation is halfway there.
 
* 2007-07-19: [http://sourceforge.net/project/showfiles.php?group_id=80503&package_id=239510 Released 0.1].  Don't try to use this in production, but DO let us know how it fits into your systems and what you would want us to change.
 
* 2007-07-19: [http://sourceforge.net/project/showfiles.php?group_id=80503&package_id=239510 Released 0.1].  Don't try to use this in production, but DO let us know how it fits into your systems and what you would want us to change.
  
== Requirements ==
+
== Goals ==
  
We have identified the following requirements for the Javascript widget:
+
The following list of goals reminds us what we want out of JsWidget.  You can expect most of it for 1.0.
  
 
* Generate HTML suitable for use in a form which presents the basic license selector
 
* Generate HTML suitable for use in a form which presents the basic license selector
 
* Provide compatibility with all [http://developer.yahoo.com/yui/articles/gbs/ A-grade browsers]
 
* Provide compatibility with all [http://developer.yahoo.com/yui/articles/gbs/ A-grade browsers]
* Provide up to date license information by either:
+
* Provide up to date license information by
** Utilizing the [[Creative Commons Web Services]], or
 
 
** Utilizing licenses.xml to generate the appropriate Javascript on the server side.  This may be done using a dynamic language such as PHP or through pre-processing to a static file when licenses are updated.
 
** Utilizing licenses.xml to generate the appropriate Javascript on the server side.  This may be done using a dynamic language such as PHP or through pre-processing to a static file when licenses are updated.
 
* Support new, expanded metadata including attributionName, attributionUrl and morePermissions.
 
* Support new, expanded metadata including attributionName, attributionUrl and morePermissions.
Line 50: Line 50:
 
== Resources ==
 
== Resources ==
  
 +
* [https://cctools.svn.sourceforge.net/viewvc/cctools/jswidget/ JsWidget development in Subversion]
 
* [http://cctools.svn.sourceforge.net/viewvc/cctools/cclib/trunk/js/ cclib/trunk/js] in Subversion contains the Javascript used for the [http://labs.creativecommons.org/dhtmllicense/ DHTML License Selector]
 
* [http://cctools.svn.sourceforge.net/viewvc/cctools/cclib/trunk/js/ cclib/trunk/js] in Subversion contains the Javascript used for the [http://labs.creativecommons.org/dhtmllicense/ DHTML License Selector]
  

Revision as of 18:37, 25 July 2007

Creative Commons currently provides two methods for integrating license selection into applications: the Partner Interface and the web service API. The CC Javascript Widget will provide an additional, lightweight method for integrating license selection into web applications. When complete the widget will be used in WpLicense as well.

Note that the JsWidget is currently under development but a 0.2 preview is available.

Sample Usage

This widget generated will be similar to the chooser currently deployed at CC Labs.

Dhtml chooser screenshot.png

The following is a simple example of how the widget would be included in a page to create a license selector.


  <html>
    <head>
      <title>Example Widget Page</title>
    </head>
    <body>
     .
     .
     .
        <div id="cc_widget_container">
          <script src="http://api.creativecommons.org/jswidget/tags/0.2/complete.js"></script>
     .
     .
     .
    </body>
  </html>

Availability

You can play with a 0.2 pre-release right now!

  • 2007-07-25: Released 0.2. The UI now doesn't ask or contain spurious questions, plus translation is halfway there.
  • 2007-07-19: Released 0.1. Don't try to use this in production, but DO let us know how it fits into your systems and what you would want us to change.

Goals

The following list of goals reminds us what we want out of JsWidget. You can expect most of it for 1.0.

  • Generate HTML suitable for use in a form which presents the basic license selector
  • Provide compatibility with all A-grade browsers
  • Provide up to date license information by
    • Utilizing licenses.xml to generate the appropriate Javascript on the server side. This may be done using a dynamic language such as PHP or through pre-processing to a static file when licenses are updated.
  • Support new, expanded metadata including attributionName, attributionUrl and morePermissions.
  • Provide a robust, scalable serving solution (if any server-side processing is needed) in order to support CC-hosted Javascript resources for the general public

Resources