Widget Examples‎ > ‎

JQeury Calendar


Create a new project

Choose File >>New>>Project under eclipse menu.
Then from the New Project Dialog, Select Droidget Wizard>>Project
Fill necessary fields including project name..etc.. and Click Finish
Project with the given name will appear in the Eclipse project explorer.

JQuery is a Javascript library which is an implementation Google AJAX Libraries API(http://code.google.com/intl/ja/apis/ajaxlibs/).



config.xml
<?xml version="1.0" encoding="UTF-8"?>
<widget id="CalendarJQuery_1279599093544" version="1.0" width="300" height="300">
    <content src="index.html" type="text/html"/>
    <name>CalendarJQuery</name>
    <description>The sample of JQuery</description>
    <author url="http://www.gclue.com">GClue</author>
    <icon src="icon.png"/>
    <license></license>
    <access uri="http://googleapis.com/" subdomains="true"/>
</widget>

Edit index.html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="Content-Style-Type" content="text/css" />
    <meta http-equiv="Content-Script-Type" content="text/javascript" />
    <title>The Sample of JQuery</title>
    <link rel="stylesheet"
        type="text/css"
        href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/redmond/jquery-ui.css"/>
    <script type="text/javascript"
            src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
    <script type="text/javascript"
            src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js"></script>
    <script>
        $(document).ready(function(){
            $("#datepicker").datepicker();
        });
    </script>
</head>
<body>
    <div style="width:220px" id="datepicker"></div>
</body>
</html>

Deploy the Widget

Now save and deploy the project
  • From the eclipse menu select Droidget --> packaging
  • Then Droidget-->install packaging
Or 
  • upload the Widget to web server and update the download.html file as follows. Then access the download.html from the smart phone and install the widget from URI.
Download.html
<html>
<head>
    <title>Download</title>
</head>
<body>
    <a href="droidget://www.example.com/JQeurySample.wgt">JQuerySample</a><br>
</body>
</html>

Preview


サブページ (1): More
ċ
JQueryCalendar.wgt
(106k)
ユーザー不明,
2010/09/03 2:08
Comments