From: Jenkins Date: Tue, 18 Sep 2012 04:31:31 +0000 (+0900) Subject: Merge sources from S-Core's RSA git (release) X-Git-Tag: 2.0_alpha^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;p=sdk%2Fide%2Fweb-sample.git Merge sources from S-Core's RSA git (release) Change-Id: Id561326ec0d48011b101445ef841d8226d434997 --- diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..a43c3a1 --- /dev/null +++ b/AUTHORS @@ -0,0 +1,6 @@ +Jihoon Song +Gyeongseok Seo +Changhyun Lee +Hyeongseok Heo +Kangho Kim +HyunGoo Kang diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..bbe9d02 --- /dev/null +++ b/LICENSE @@ -0,0 +1,206 @@ +Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + + diff --git a/NOTICE b/NOTICE new file mode 100644 index 0000000..ded3804 --- /dev/null +++ b/NOTICE @@ -0,0 +1 @@ +Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. \ No newline at end of file diff --git a/builder/build.properties.clean b/builder/build.properties.clean new file mode 100644 index 0000000..c8d775a --- /dev/null +++ b/builder/build.properties.clean @@ -0,0 +1,259 @@ +############################################################################### +# Copyright (c) 2003, 2006 IBM Corporation and others. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License v1.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-v10.html +# +# Contributors: +# IBM Corporation - initial API and implementation +############################################################################### +##################### +# Parameters describing how and where to execute the build. +# Typical users need only update the following properties: +# baseLocation - where things you are building against are installed +# bootclasspath - The base jars to compile against (typicaly rt.jar) +# configs - the list of {os, ws, arch} configurations to build. +# +# Of course any of the settings here can be overridden by spec'ing +# them on the command line (e.g., -DbaseLocation=d:/eclipse + +#The type of the top level element we are building, generally "feature" +topLevelElementType=feature +#The id of the top level element we are building +topLevelElementId=org.tizen.web.project.sample.feature + +############# PRODUCT/PACKAGING CONTROL ############# +#runPackager=true + +#Set the name of the archive that will result from the product build. +#archiveNamePrefix= + +# The prefix that will be used in the generated archive. +archivePrefix="Do not touch here." + +# The location underwhich all of the build output will be collected. +collectingFolder=${archivePrefix} + +# The list of {os, ws, arch} configurations to build. This +# value is a '&' separated list of ',' separate triples. For example, +# configs=win32,win32,x86 & linux,motif,x86 +# By default the value is *,*,* +configs="Do not touch here." +#configs=win32, win32, x86 & \ +# win32,win32,x86_64 & \ +# win32,win32,wpf & \ +# linux, gtk, ppc & \ +# linux, gtk, x86 & \ +# linux, gtk, x86_64 & \ +# linux, motif, x86 & \ +# solaris, motif, sparc & \ +# solaris, gtk, sparc & \ +# aix, motif, ppc & \ +# hpux, motif, ia64_32 & \ +# macosx, carbon, ppc & \ +# macosx, carbon, x86 & \ +# macosx, cocoa, ppc & \ +# macosx, cocoa, x86 & \ +# macosx, cocoa, x86_64 + +# By default PDE creates one archive (result) per entry listed in the configs property. +# Setting this value to true will cause PDE to only create one output containing all +# artifacts for all the platforms listed in the configs property. +# To control the output format for the group, add a "group, group, group - " entry to the +# archivesFormat. +#groupConfigurations=true + +#The format of the archive. By default a zip is created using antZip. +#The list can only contain the configuration for which the desired format is different than zip. +#archivesFormat=win32, win32, x86 - antZip& \ +# linux, gtk, ppc - antZip &\ +# linux, gtk, x86 - antZip& \ +# linux, gtk, x86_64 - antZip& \ +# linux, motif, x86 - antZip& \ +# solaris, motif, sparc - antZip& \ +# solaris, gtk, sparc - antZip& \ +# aix, motif, ppc - antZip& \ +# hpux, motif, PA_RISC - antZip& \ +# macosx, carbon, ppc - antZip + +#Allow cycles involving at most one bundle that needs to be compiled with the rest being binary bundles. +allowBinaryCycles=true + +#Sort bundles depenedencies across all features instead of just within a given feature. +#flattenDependencies = true + +#Parallel compilation, requires flattenedDependencies=true +#parallelCompilation=true +#parallelThreadCount= +#parallelThreadsPerProcessor= + +#Set to true if you want the output to be ready for an update jar (no site.xml generated) +#outputUpdateJars = false + +#Set to true for Jnlp generation +#codebase should be a URL that will be used as the root of all relative URLs in the output. +#generateJnlp=false +#jnlp.codebase= +#jnlp.j2se= +#jnlp.locale= +#jnlp.generateOfflineAllowed=true or false generate attribute in the generated features +#jnlp.configs=${configs} #uncomment to filter the content of the generated jnlp files based on the configuration being built + +#Set to true if you want to sign jars +#signJars=false +#sign.alias= +#sign.keystore= +#sign.storepass= +#sign.keypass= + +#Arguments to send to the zip executable +#zipargs= + +#Arguments to send to the tar executable +#tarargs= + +#Control the creation of a file containing the version included in each configuration - on by default +#generateVersionsLists=false + +############## BUILD NAMING CONTROL ################ +# The directory into which the build elements are fetched and where +# the build takes place. +buildDirectory="Do not touch here" + +# Type of build. Used in naming the build output. Typically this value is +# one of I, N, M, S, ... +buildType="Do not touch here" + +# ID of the build. Used in naming the build output. +buildId="Do not touch here" + +# Label for the build. Used in naming the build output +buildLabel=${buildType}.${buildId} + +# Timestamp for the build. Used in naming the build output +timestamp=007 + +#The value to be used for the qualifier of a plugin or feature when you want to override the value computed by pde. +#The value will only be applied to plugin or features indicating build.properties, qualifier = context +#forceContextQualifier= + +#Enable / disable the generation of a suffix for the features that use .qualifier. +#The generated suffix is computed according to the content of the feature +#generateFeatureVersionSuffix=true + +############# BASE CONTROL ############# +# Settings for the base Eclipse components and Java class libraries +# against which you are building. +# Base location for anything the build needs to compile against. For example, +# in most RCP app or a plug-in, the baseLocation should be the location of a previously +# installed Eclipse against which the application or plug-in code will be compiled and the RCP delta pack. + +base="Do not touch here" +baseLocation="Do not touch here" + + +#Folder containing repositories whose content is needed to compile against +#repoBaseLocation=${base}/repos +#Folder where the content of the repositories from ${repoBaseLocation} will be made available as a form suitable to be compiled against +#transformedRepoLocation=${base}/transformedRepos + +#Os/Ws/Arch/nl of the eclipse specified by baseLocation +baseos=linux +basews=gtk +basearch=x86 + +#this property indicates whether you want the set of plug-ins and features to be considered during the build to be limited to the ones reachable from the features / plugins being built +filteredDependencyCheck=false + +#this property indicates whether the resolution should be done in development mode (i.e. ignore multiple bundles with singletons) +resolution.devMode=false + +#pluginPath is a list of locations in which to find plugins and features. This list is separated by the platform file separator (; or :) +#a location is one of: +#- the location of the jar or folder that is the plugin or feature : /path/to/foo.jar or /path/to/foo +#- a directory that contains a /plugins or /features subdirectory +#- the location of a feature.xml, or for 2.1 style plugins, the plugin.xml or fragment.xml +#pluginPath= + +skipBase=true +eclipseURL= +eclipseBuildId= +eclipseBaseURL=${eclipseURL}/eclipse-platform-${eclipseBuildId}-win32.zip + + +############# MAP FILE CONTROL ################ +# This section defines CVS tags to use when fetching the map files from the repository. +# If you want to fetch the map file from repository / location, change the getMapFiles target in the customTargets.xml + +skipMaps=true +mapsRepo=:pserver:anonymous@example.com/path/to/repo +mapsRoot=path/to/maps +mapsCheckoutTag=HEAD + +#tagMaps=true +mapsTagTag=v${buildId} + + +############ REPOSITORY CONTROL ############### +# This section defines properties parameterizing the repositories where plugins, fragments +# bundles and features are being obtained from. + +# The tags to use when fetching elements to build. +# By default thebuilder will use whatever is in the maps. +# This value takes the form of a comma separated list of repository identifier (like used in the map files) and the +# overriding value +# For example fetchTag=CVS=HEAD, SVN=v20050101 +# fetchTag=HEAD +skipFetch=true + + +############# P2 OPTIONS ############## +#p2.gathering = true +#p2.compress=true + +############# JAVA COMPILER OPTIONS ############## +# The location of the Java jars to compile against. Typically the rt.jar for your JDK/JRE +#bootclasspath=${java.home}/lib/rt.jar + +# specific JRE locations to compile against. These values are used to compile bundles specifying a +# Bundle-RequiredExecutionEnvironment. Uncomment and set values for environments that you support +#CDC-1.0/Foundation-1.0= /path/to/rt.jar +#CDC-1.1/Foundation-1.1= +#OSGi/Minimum-1.0= +#OSGi/Minimum-1.1= +#JRE-1.1= +#J2SE-1.2= +#J2SE-1.3= +#J2SE-1.4= +#J2SE-1.5= +#JavaSE-1.6= +#PersonalJava-1.1= +#PersonalJava-1.2= +#CDC-1.0/PersonalBasis-1.0= +#CDC-1.0/PersonalJava-1.0= +#CDC-1.1/PersonalBasis-1.1= +#CDC-1.1/PersonalJava-1.1= + +# Specify the output format of the compiler log when eclipse jdt is used +logExtension=.log + +# Whether or not to include debug info in the output jars +javacDebugInfo=true + +# Whether or not to fail the build if there are compiler errors +javacFailOnError=true + +# Enable or disable verbose mode of the compiler +javacVerbose=false + +# Extra arguments for the compiler. These are specific to the java compiler being used. +compilerArg=-encoding\ UTF-8 + +# Default value for the version of the source code. This value is used when compiling plug-ins that do not set the Bundle-RequiredExecutionEnvironment or set javacSource in build.properties +javacSource=1.6 + +# Default value for the version of the byte code targeted. This value is used when compiling plug-ins that do not set the Bundle-RequiredExecutionEnvironment or set javacTarget in build.properties. +javacTarget=1.6 + + diff --git a/builder/customTargets.xml b/builder/customTargets.xml new file mode 100644 index 0000000..6a42e92 --- /dev/null +++ b/builder/customTargets.xml @@ -0,0 +1,187 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/org.tizen.web.project.sample.feature/.project b/org.tizen.web.project.sample.feature/.project new file mode 100644 index 0000000..5b4ecee --- /dev/null +++ b/org.tizen.web.project.sample.feature/.project @@ -0,0 +1,17 @@ + + + org.tizen.web.project.sample.feature + + + + + + org.eclipse.pde.FeatureBuilder + + + + + + org.eclipse.pde.FeatureNature + + diff --git a/org.tizen.web.project.sample.feature/LICENSE-2.0.htm b/org.tizen.web.project.sample.feature/LICENSE-2.0.htm new file mode 100644 index 0000000..f7ca656 --- /dev/null +++ b/org.tizen.web.project.sample.feature/LICENSE-2.0.htm @@ -0,0 +1,191 @@ + + + + Apache License, Version 2.0 + + + + + + + + + + + + + + + + + +
+ + +
+

Apache License

Version 2.0, January 2004

+
http://www.apache.org/licenses/

+

TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

+

1. Definitions.

+

"License" shall mean the terms and conditions for use, reproduction, and +distribution as defined by Sections 1 through 9 of this document.

+

"Licensor" shall mean the copyright owner or entity authorized by the +copyright owner that is granting the License.

+

"Legal Entity" shall mean the union of the acting entity and all other +entities that control, are controlled by, or are under common control with +that entity. For the purposes of this definition, "control" means (i) the +power, direct or indirect, to cause the direction or management of such +entity, whether by contract or otherwise, or (ii) ownership of fifty +percent (50%) or more of the outstanding shares, or (iii) beneficial +ownership of such entity.

+

"You" (or "Your") shall mean an individual or Legal Entity exercising +permissions granted by this License.

+

"Source" form shall mean the preferred form for making modifications, +including but not limited to software source code, documentation source, +and configuration files.

+

"Object" form shall mean any form resulting from mechanical transformation +or translation of a Source form, including but not limited to compiled +object code, generated documentation, and conversions to other media types.

+

"Work" shall mean the work of authorship, whether in Source or Object form, +made available under the License, as indicated by a copyright notice that +is included in or attached to the work (an example is provided in the +Appendix below).

+

"Derivative Works" shall mean any work, whether in Source or Object form, +that is based on (or derived from) the Work and for which the editorial +revisions, annotations, elaborations, or other modifications represent, as +a whole, an original work of authorship. For the purposes of this License, +Derivative Works shall not include works that remain separable from, or +merely link (or bind by name) to the interfaces of, the Work and Derivative +Works thereof.

+

"Contribution" shall mean any work of authorship, including the original +version of the Work and any modifications or additions to that Work or +Derivative Works thereof, that is intentionally submitted to Licensor for +inclusion in the Work by the copyright owner or by an individual or Legal +Entity authorized to submit on behalf of the copyright owner. For the +purposes of this definition, "submitted" means any form of electronic, +verbal, or written communication sent to the Licensor or its +representatives, including but not limited to communication on electronic +mailing lists, source code control systems, and issue tracking systems that +are managed by, or on behalf of, the Licensor for the purpose of discussing +and improving the Work, but excluding communication that is conspicuously +marked or otherwise designated in writing by the copyright owner as "Not a +Contribution."

+

"Contributor" shall mean Licensor and any individual or Legal Entity on +behalf of whom a Contribution has been received by Licensor and +subsequently incorporated within the Work.

+

2. Grant of Copyright License. Subject to the +terms and conditions of this License, each Contributor hereby grants to You +a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable +copyright license to reproduce, prepare Derivative Works of, publicly +display, publicly perform, sublicense, and distribute the Work and such +Derivative Works in Source or Object form.

+

3. Grant of Patent License. Subject to the terms +and conditions of this License, each Contributor hereby grants to You a +perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable +(except as stated in this section) patent license to make, have made, use, +offer to sell, sell, import, and otherwise transfer the Work, where such +license applies only to those patent claims licensable by such Contributor +that are necessarily infringed by their Contribution(s) alone or by +combination of their Contribution(s) with the Work to which such +Contribution(s) was submitted. If You institute patent litigation against +any entity (including a cross-claim or counterclaim in a lawsuit) alleging +that the Work or a Contribution incorporated within the Work constitutes +direct or contributory patent infringement, then any patent licenses +granted to You under this License for that Work shall terminate as of the +date such litigation is filed.

+

4. Redistribution. You may reproduce and +distribute copies of the Work or Derivative Works thereof in any medium, +with or without modifications, and in Source or Object form, provided that +You meet the following conditions:

+
    +
  1. +

    You must give any other recipients of the Work or Derivative Works a +copy of this License; and

    +
  2. +
  3. +

    You must cause any modified files to carry prominent notices stating +that You changed the files; and

    +
  4. +
  5. +

    You must retain, in the Source form of any Derivative Works that You +distribute, all copyright, patent, trademark, and attribution notices from +the Source form of the Work, excluding those notices that do not pertain to +any part of the Derivative Works; and

    +
  6. +
  7. +

    If the Work includes a "NOTICE" text file as part of its distribution, +then any Derivative Works that You distribute must include a readable copy +of the attribution notices contained within such NOTICE file, excluding +those notices that do not pertain to any part of the Derivative Works, in +at least one of the following places: within a NOTICE text file distributed +as part of the Derivative Works; within the Source form or documentation, +if provided along with the Derivative Works; or, within a display generated +by the Derivative Works, if and wherever such third-party notices normally +appear. The contents of the NOTICE file are for informational purposes only +and do not modify the License. You may add Your own attribution notices +within Derivative Works that You distribute, alongside or as an addendum to +the NOTICE text from the Work, provided that such additional attribution +notices cannot be construed as modifying the License. +You may add Your own copyright statement to Your modifications and may +provide additional or different license terms and conditions for use, +reproduction, or distribution of Your modifications, or for any such +Derivative Works as a whole, provided Your use, reproduction, and +distribution of the Work otherwise complies with the conditions stated in +this License.

    +
  8. +
+

5. Submission of Contributions. Unless You +explicitly state otherwise, any Contribution intentionally submitted for +inclusion in the Work by You to the Licensor shall be under the terms and +conditions of this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify the +terms of any separate license agreement you may have executed with Licensor +regarding such Contributions.

+

6. Trademarks. This License does not grant +permission to use the trade names, trademarks, service marks, or product +names of the Licensor, except as required for reasonable and customary use +in describing the origin of the Work and reproducing the content of the +NOTICE file.

+

7. Disclaimer of Warranty. Unless required by +applicable law or agreed to in writing, Licensor provides the Work (and +each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT +WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, +without limitation, any warranties or conditions of TITLE, +NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You +are solely responsible for determining the appropriateness of using or +redistributing the Work and assume any risks associated with Your exercise +of permissions under this License.

+

8. Limitation of Liability. In no event and +under no legal theory, whether in tort (including negligence), contract, or +otherwise, unless required by applicable law (such as deliberate and +grossly negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, +incidental, or consequential damages of any character arising as a result +of this License or out of the use or inability to use the Work (including +but not limited to damages for loss of goodwill, work stoppage, computer +failure or malfunction, or any and all other commercial damages or losses), +even if such Contributor has been advised of the possibility of such +damages.

+

9. Accepting Warranty or Additional Liability. +While redistributing the Work or Derivative Works thereof, You may choose +to offer, and charge a fee for, acceptance of support, warranty, indemnity, +or other liability obligations and/or rights consistent with this License. +However, in accepting such obligations, You may act only on Your own behalf +and on Your sole responsibility, not on behalf of any other Contributor, +and only if You agree to indemnify, defend, and hold each Contributor +harmless for any liability incurred by, or claims asserted against, such +Contributor by reason of your accepting any such warranty or additional +liability.

+

END OF TERMS AND CONDITIONS

+ +
+ +
+ + + diff --git a/org.tizen.web.project.sample.feature/build.properties b/org.tizen.web.project.sample.feature/build.properties new file mode 100644 index 0000000..5001e44 --- /dev/null +++ b/org.tizen.web.project.sample.feature/build.properties @@ -0,0 +1,3 @@ +bin.includes = feature.xml,\ + LICENSE-2.0.htm,\ + license.html diff --git a/org.tizen.web.project.sample.feature/feature.xml b/org.tizen.web.project.sample.feature/feature.xml new file mode 100644 index 0000000..843a884 --- /dev/null +++ b/org.tizen.web.project.sample.feature/feature.xml @@ -0,0 +1,28 @@ + + + + + Web Sample for Tizen SDK. + + + + Copyright (c) 2010-2011, Samsung Electronics Co., LTD. All rights reserved. + + + + [Enter License Description here.] + + + + + diff --git a/org.tizen.web.project.sample.feature/license.html b/org.tizen.web.project.sample.feature/license.html new file mode 100644 index 0000000..2545107 --- /dev/null +++ b/org.tizen.web.project.sample.feature/license.html @@ -0,0 +1,22 @@ + + + + + +Tizen SOFTWARE DEVELOPMENT KIT ("SDK") LICENSE AGREEMENT + + + +

Tizen SDK



+ +Tizen SDK contains software portions licensed under various open source licenses as well as proprietary components. All open source software portions ("Open Source Software") are licensed under the open source licenses that accompany such Open Source Software.

+ +The licenses governing the Open Source Software are available at: http://developer.tizen.org/download/tizen_sdk_opensource_license.html

+ +Except for the Open Source Software contained in Tizen SDK, all other software portions contained in Tizen SDK are governed by the terms and conditions of the Tizen Software Development Kit License Agreement, available at: http://developer.tizen.org/download/samsung_sdk_license.html

+ +You may access and download Tizen SDK Open Source Software at: http://developer.tizen.org/download/tizenopensdk.tar.gz

+ +BY CLICKING THE "I AGREE" BUTTON OR BY USING ANY PART OF TIZEN SDK, YOU AGREE (ON BEHALF OF YOURSELF AND/OR YOUR COMPANY) TO THE OPEN SOURCE SOFTWARE LICENSE TERMS AND THE TIZEN SOFTWARE DEVELOPMENT KIT LICENSE AGREEMENT. IF YOU DO NOT AGREE WITH THE OPEN SOURCE SOFTWARE LICENSE TERMS OR THE TIZEN SOFTWARE DEVELOPMENT KIT LICENSE AGREEMENT, YOU MAY NOT DOWNLOAD OR USE TIZEN SDK.

+ + diff --git a/org.tizen.web.project.sample/.classpath b/org.tizen.web.project.sample/.classpath new file mode 100644 index 0000000..ad32c83 --- /dev/null +++ b/org.tizen.web.project.sample/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/org.tizen.web.project.sample/.project b/org.tizen.web.project.sample/.project new file mode 100644 index 0000000..6d86ff1 --- /dev/null +++ b/org.tizen.web.project.sample/.project @@ -0,0 +1,28 @@ + + + org.tizen.web.project.sample + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/org.tizen.web.project.sample/.settings/org.eclipse.jdt.core.prefs b/org.tizen.web.project.sample/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..9d96d60 --- /dev/null +++ b/org.tizen.web.project.sample/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,8 @@ +#Tue Aug 07 14:20:48 KST 2012 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.6 diff --git a/org.tizen.web.project.sample/META-INF/MANIFEST.MF b/org.tizen.web.project.sample/META-INF/MANIFEST.MF new file mode 100644 index 0000000..76f305f --- /dev/null +++ b/org.tizen.web.project.sample/META-INF/MANIFEST.MF @@ -0,0 +1,12 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Web SDK Project Sample +Bundle-SymbolicName: org.tizen.web.project.sample;singleton:=true +Bundle-Version: 1.0.0.qualifier +Bundle-Activator: org.tizen.web.project.sample.Activator +Bundle-Vendor: Samsung Electronics +Require-Bundle: org.eclipse.core.runtime, + org.tizen.web.project.wizard +Bundle-RequiredExecutionEnvironment: JavaSE-1.6 +Bundle-ActivationPolicy: lazy +Import-Package: org.eclipse.core.resources diff --git a/org.tizen.web.project.sample/build.properties b/org.tizen.web.project.sample/build.properties new file mode 100644 index 0000000..2fd90e1 --- /dev/null +++ b/org.tizen.web.project.sample/build.properties @@ -0,0 +1,6 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + plugin.xml,\ + templates/ diff --git a/org.tizen.web.project.sample/plugin.xml b/org.tizen.web.project.sample/plugin.xml new file mode 100644 index 0000000..8df6ce6 --- /dev/null +++ b/org.tizen.web.project.sample/plugin.xml @@ -0,0 +1,9 @@ + + + + + + + + diff --git a/org.tizen.web.project.sample/src/org/tizen/web/project/sample/Activator.java b/org.tizen.web.project.sample/src/org/tizen/web/project/sample/Activator.java new file mode 100644 index 0000000..6cd66be --- /dev/null +++ b/org.tizen.web.project.sample/src/org/tizen/web/project/sample/Activator.java @@ -0,0 +1,56 @@ +/* + * Web IDE Samples - org.tizen.web.project.sample + * + * Copyright (C) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: + * Jihoon Song + * Hyeongseok Heo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Contributors: + * - S-Core Co., Ltd + * + */ + +package org.tizen.web.project.sample; + +import org.osgi.framework.BundleActivator; +import org.osgi.framework.BundleContext; + +public class Activator implements BundleActivator { + + private static BundleContext context; + + static BundleContext getContext() { + return context; + } + + /* + * (non-Javadoc) + * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext) + */ + public void start(BundleContext bundleContext) throws Exception { + Activator.context = bundleContext; + } + + /* + * (non-Javadoc) + * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext) + */ + public void stop(BundleContext bundleContext) throws Exception { + Activator.context = null; + } + +} diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Alarm/description.xml b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Alarm/description.xml new file mode 100644 index 0000000..0526b3e --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Alarm/description.xml @@ -0,0 +1,10 @@ + + + + Alarm + 1.0 + tutorial-alarm-snapshot.png + + A tutorial sample application demonstrating the tizen alarm device API usage. + + diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Alarm/description.xsl b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Alarm/description.xsl new file mode 100755 index 0000000..1f4f57f --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Alarm/description.xsl @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + +
+ + + +
+ Type: JavaScript +

+ +

+
+ + + + + +
+ + +
+ +
diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Alarm/project/config.xml b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Alarm/project/config.xml new file mode 100755 index 0000000..4e70b75 --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Alarm/project/config.xml @@ -0,0 +1,11 @@ + + + + Alarm + + + + + + + diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Alarm/project/css/style.css b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Alarm/project/css/style.css new file mode 100755 index 0000000..e69de29 diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Alarm/project/icon.png b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Alarm/project/icon.png new file mode 100755 index 0000000..b0979b1 Binary files /dev/null and b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Alarm/project/icon.png differ diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Alarm/project/index.html b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Alarm/project/index.html new file mode 100644 index 0000000..36a99a2 --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Alarm/project/index.html @@ -0,0 +1,112 @@ + + + + + + + Alarm + + + + + + + + + +
+
+

Alarm

+
+ +
+
    +
+
+ +
+ +
+
+ +
+
+

Absolute Alarm Add

+
+ +
+
    +
  • Time
  • +
  • + +
  • +
  • Repeat interval (sec)
  • +
  • + +
  • +
  • Action on alarm expiration
  • +
  • + + Application launch +
  • +
  • + + Appservice launch +
  • +
+
+ +
+
+ +
+
+
+ +
+
+

Relative Alarm Add

+
+ +
+
    +
  • Delay (sec)
  • +
  • + +
  • +
  • Repeat interval (sec)
  • +
  • + +
  • +
  • Action on alarm expiration
  • +
  • + + Application launch +
  • +
  • + + Appservice launch +
+
+ +
+
+ +
+
+
+ + diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Alarm/project/js/config.js b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Alarm/project/js/config.js new file mode 100644 index 0000000..441e1a6 --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Alarm/project/js/config.js @@ -0,0 +1,29 @@ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.tizenopensource.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +//tizen-web-ui-fw configuration +$(document).bind("mobileinit", function() { + $.mobile.loadingMessageTextVisible = false; + $.mobile.defaultPageTransition = "none"; + // Disable context menu + $(document).bind("contextmenu", function(e) { + return false; + }); + // Disable text selection + $(document).delegate("[data-role='page']", "pageinit", function(e) { + $.mobile.tizen.disableSelection($(e.target)); + }); +}); diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Alarm/project/js/main.js b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Alarm/project/js/main.js new file mode 100644 index 0000000..07ae71b --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Alarm/project/js/main.js @@ -0,0 +1,195 @@ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.tizenopensource.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +$(document).delegate("#main", "pageinit", function() { + $("#main .ui-btn-back").bind("vclick", function() { + tizen.application.exit(); + return false; + }); + + $("#main").bind("pagebeforeshow", displayAlarms); + + $("#alarm-remove-all").bind("vclick", function() { + removeAll(); + return false; + }); + + $("#alarm-all-list").delegate("li", "vclick", function() { + alarmInfo($(this).data("id")); + return false; + }); + + $("#alarm-all-list").delegate("div", "vclick", function() { + removeAlarm($(this).parent().data("id")); + return false; + }); +}); + +$(document).delegate("#absolute-alarm-add", "pageinit", function() { + $("#absolute-alarm-save").bind("vclick", function() { + addAlarmAbsolute(); + return false; + }); +}); + +$(document).delegate("#relative-alarm-add", "pageinit", function() { + $("#relative-alarm-save").bind("vclick", function() { + addAlarmRelative(); + return false; + }); +}); + +function displayAlarms() { + // get full list of alarms + var alarmsArray = tizen.alarm.getAll(); + var period, str = ""; + + for (var i = 0; i < alarmsArray.length; i++) { + if (alarmsArray[i].period) { + period = alarmsArray[i].period + " sec"; + } else { + period = "none"; + } + + if (alarmsArray[i] instanceof tizen.AlarmAbsolute) { + var d = alarmsArray[i].date, + m = d.getMinutes(); + + str += '
  • ' + + (d.getMonth() + 1) + + '/' + + d.getDate() + + '/' + + d.getFullYear() + + ' ' + + d.getHours() + + ':' + + ((m < 10) ? "0" + m : m) + + 'Absolute alarm (Period: ' + + period + + ')
    Delete
  • '; + } else if (alarmsArray[i] instanceof tizen.AlarmRelative) { + str += '
  • ' + + alarmsArray[i].delay + + ' secRelative alarm (Period: ' + + period + + ')
    Delete
  • '; + } else { + alert("Wrong alarm instance"); + break; + } + } + $("#alarm-all-list").html(str).trigger("create").listview("refresh"); +} + +function addAlarm(alarm, radioLaunchApp) { + var arg; + + if (radioLaunchApp.prop("checked")) { + /* Launching application case */ + arg = null; + } else { + /* Launching appservice case */ + arg = new tizen.ApplicationService("http://tizen.org/appcontrol/operation/view", + null, + null, + [new tizen.ApplicationServiceData("id",["sampleapp0"])]); + } + + try { + tizen.alarm.add(alarm, "sampleapp0", arg); + } catch (e) { + alert("error: " + e.message); + } +} + +function addAlarmAbsolute() { + var period = parseInt($("#absolute-alarm-period").prop("value")), + time = $("#alarm-time").datetimepicker("value"), + year, month, date, hours, minutes, + splits, d, t; + + if (time == null || period < 0) { + alert("Getting alarm settings failed"); + return; + } + + splits = time.split("T"); + d = splits[0].split("-"); + t = splits[1].split(":"); + + year = parseInt(d[0]); + month = parseInt(d[1]) - 1; + date = parseInt(d[2]); + hours = parseInt(t[0]); + minutes = parseInt(t[1]); + + var inputDate = new Date(year, month, date, hours, minutes, 0, 0); + var myAlarm = new tizen.AlarmAbsolute(inputDate, (period > 0 ? period : null)); + + addAlarm(myAlarm, $("#launch-app-absolute")); + + $.mobile.changePage("#main"); +} + +function addAlarmRelative() { + var period = parseInt($("#relative-alarm-period").prop("value")), + delay = parseInt($("#relative-alarm-delay").prop("value")); + + if ((delay < 0) || (period < 0)) { + alert("Getting alarm settings failed"); + return; + } + + var myAlarm = new tizen.AlarmRelative(delay, period); + + addAlarm(myAlarm, $("#launch-app-relative")); + + $.mobile.changePage("#main"); +} + +function removeAll() { + tizen.alarm.removeAll(); + displayAlarms(); +} + +function removeAlarm(id) { + try { + tizen.alarm.remove(id); + } catch (e) { + console.log("Alarm remove failed. The once alarm might be already removed automatically"); + } + displayAlarms(); +} + +function alarmInfo(id) { + var alarm = tizen.alarm.get(id); + + if (alarm) { + if (alarm instanceof tizen.AlarmAbsolute) { + alert("Next scheduled alarm is " + alarm.getNextScheduledDate()); + } else { + alert("Remaining seconds is " + alarm.getRemainingSeconds() + " SECS"); + } + } else { + alert("Alarm info retrieving failed
    This once alarm might be already removed automatically"); + displayAlarms(); + } +} diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Alarm/tizen-app-template.xml b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Alarm/tizen-app-template.xml new file mode 100644 index 0000000..641bf6c --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Alarm/tizen-app-template.xml @@ -0,0 +1,12 @@ + + + Alarm + TIZEN + + description.xml + + + + + + diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Alarm/tizen_32.png b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Alarm/tizen_32.png new file mode 100755 index 0000000..a37c33e Binary files /dev/null and b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Alarm/tizen_32.png differ diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Alarm/tizen_64.png b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Alarm/tizen_64.png new file mode 100755 index 0000000..f80f2ec Binary files /dev/null and b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Alarm/tizen_64.png differ diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Alarm/tutorial-alarm-snapshot.png b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Alarm/tutorial-alarm-snapshot.png new file mode 100644 index 0000000..20751e0 Binary files /dev/null and b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Alarm/tutorial-alarm-snapshot.png differ diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Application/description.xml b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Application/description.xml new file mode 100644 index 0000000..5050082 --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Application/description.xml @@ -0,0 +1,10 @@ + + + + Application + 1.0 + tutorial-application-snapshot.png + + A tutorial sample application demonstrating the tizen application device API usage. + + diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Application/description.xsl b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Application/description.xsl new file mode 100755 index 0000000..1f4f57f --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Application/description.xsl @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + +
    + + + +
    + Type: JavaScript +

    + +

    +
    + + + + + +
    + + +
    + +
    diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Application/project/appsvc.html b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Application/project/appsvc.html new file mode 100644 index 0000000..406d18b --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Application/project/appsvc.html @@ -0,0 +1,26 @@ + + + + + + + Application + + + + + + + + + +
    +
    +

    Application

    +
    +
    +
    +
    +
    + + diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Application/project/config.xml b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Application/project/config.xml new file mode 100755 index 0000000..88f2d45 --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Application/project/config.xml @@ -0,0 +1,11 @@ + + + + Application + + + + + + + diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Application/project/css/style.css b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Application/project/css/style.css new file mode 100755 index 0000000..e69de29 diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Application/project/icon.png b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Application/project/icon.png new file mode 100755 index 0000000..b0979b1 Binary files /dev/null and b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Application/project/icon.png differ diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Application/project/index.html b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Application/project/index.html new file mode 100644 index 0000000..4feb8e2 --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Application/project/index.html @@ -0,0 +1,38 @@ + + + + + + + Application + + + + + + + + + +
    +
    +

    Application

    +
    + +
    +
      +
    +
    + +
    + +
    +
    + + diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Application/project/js/appsvc.js b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Application/project/js/appsvc.js new file mode 100755 index 0000000..2a68982 --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Application/project/js/appsvc.js @@ -0,0 +1,63 @@ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.tizenopensource.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +$(document).delegate("#appsvc", "pageinit", function() { + var app; + + $("#appsvc .ui-btn-back").bind("vclick", function() { + if (app) { + try { + var appsvcData = [new tizen.ApplicationServiceData("name", [app.name]), + new tizen.ApplicationServiceData("version", [app.version])]; + appsvc.replyResult(appsvcData); + } catch (exc) { + alert("replyResult failed: " + exc.message); + appsvc.replyFailure(); + } + } + tizen.application.exit(); + return false; + }); + + var appsvc = tizen.application.getAppService(); + + if (appsvc) { + var data = appsvc.data; + + for (var i = 0; i < data.length; i++) { + if (data[i].key == "id") { + break; + } + } + if (i == data.length) { + $("#msg").html("Invalid appservice request received"); + appsvc.replyFailure(); + } else { + var appId = data[i].value[0]; + + app = tizen.application.getAppInfo(appId); + + $("#msg").html("The following app information requested through appservice
    [" + + appId + + "]

    The following reply data will be sent when you exit this application

    [Reply Data]
    name: " + + app.name + + " / version: " + + app.version); + } + } else { + $("#msg").html("No Appservice request received"); + } +}); diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Application/project/js/config.js b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Application/project/js/config.js new file mode 100644 index 0000000..441e1a6 --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Application/project/js/config.js @@ -0,0 +1,29 @@ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.tizenopensource.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +//tizen-web-ui-fw configuration +$(document).bind("mobileinit", function() { + $.mobile.loadingMessageTextVisible = false; + $.mobile.defaultPageTransition = "none"; + // Disable context menu + $(document).bind("contextmenu", function(e) { + return false; + }); + // Disable text selection + $(document).delegate("[data-role='page']", "pageinit", function(e) { + $.mobile.tizen.disableSelection($(e.target)); + }); +}); diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Application/project/js/main.js b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Application/project/js/main.js new file mode 100644 index 0000000..9d404f3 --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Application/project/js/main.js @@ -0,0 +1,203 @@ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.tizenopensource.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +var gListenerId; + +$(document).delegate("#main", "pageinit", function() { + $("#main .ui-btn-back").bind("vclick", function() { + exitOrHide(); + return false; + }); + $("#list-running").bind("vclick", function() { + listRunningApps(); + return false; + }); + $("#list-installed").bind("vclick", function() { + listInstalledApps(); + return false; + }); + $("#select-image").bind("vclick", function() { + selectImage(); + return false; + }); + $("#app-list").delegate("div", "vclick", function() { + var id = $(this).parent().data("id"); + + if ($(this).parent().data("app-list-type") == "installed") { + launchApp(id); + } else { + killApp(id); + } + return false; + }); + + gListenerId = tizen.application.addAppInfoEventListener({ + oninstalled: function(app) { + alert("Tracking message :
    " + app.name + " installed"); + }, + onupdated: function(app) { + alert("Tracking message :
    " + app.name + " updated"); + }, + onuninstalled: function(appid) { + alert("Tracking message :
    The app " + appid + " uninstalled"); + } + }); + + listInstalledApps(); +}); + +function exitOrHide() { + if (confirm("Exit or hide?

    (OK:Exit Cancel:Hide)") == true) { + tizen.application.removeAppInfoEventListener(gListenerId); + tizen.application.exit(); + } else { + tizen.application.hide(); + } +} + +function makeListItem(type, id, name, appId, icon) { + return '
  • ' + + name + + '' + + appId + + '
    ' + + (type == "installed" ? "Launch" : "Kill") + + '
  • '; +} + +function onGetAppsInfoSuccess(apps) { + var app, str = '
  • Installed applications
  • '; + + for (var i = 0; i < apps.length; i++) { + app = apps[i]; + if(app.show == true) { + str += makeListItem("installed", app.id, app.name, app.id, app.iconPath); + } + } + + $("#app-list").html(str).trigger("create").listview("refresh"); +} + +function onGetAppsInfoError(err) { + alert("getAppsInfo failed : " + err.message); +} + +function listInstalledApps() { + try { + /* get the list of installed applications */ + tizen.application.getAppsInfo(onGetAppsInfoSuccess, onGetAppsInfoError); + } catch (exc) { + alert("getAppsInfo exc:" + exc.message); + } +} + +function onGetAppsContextSuccess(contexts) { + var app, str = '
  • Running applications
  • '; + + for (var i = 0; i < contexts.length; i++) { + app = tizen.application.getAppInfo(contexts[i].appId); + if(app.show == true) { + str += makeListItem("running", contexts[i].id, app.name, app.id, app.iconPath); + } + } + + $("#app-list").html(str).trigger("create").listview("refresh"); +} + +function onGetAppsContextError(err) { + alert("getAppsContext exc:" + err.message); +} + +function listRunningApps() { + try { + tizen.application.getAppsContext(onGetAppsContextSuccess, onGetAppsContextError); + } catch (exc) { + alert("getAppsContext exc: " + exc.message); + } +} + +function launchApp(id) { + function onSuccess() { + console.log(id + " launched successfully!"); + } + + function onError(err) { + alert("launch failed : " + err.message); + } + + try { + tizen.application.launch(id, onSuccess, onError); + } catch (exc) { + alert("launch exc:" + exc.message); + } +} + +function killApp(id) { + var appName = tizen.application.getAppInfo(tizen.application.getAppContext(id).appId).name; + + function onSuccess() { + console.log(appName + " killed successfully!"); + listRunningApps(); + } + + function onError(err) { + alert("kill failed : " + err.message); + } + + if(confirm("Do you really want to kill " + appName +"?") == false) { + return; + } + + try { + tizen.application.kill(id, onSuccess, onError); + } catch (exc) { + alert("kill exc:" + exc.messagesage); + } +} + +function selectImage() { + var service = new tizen.ApplicationService( + "http://tizen.org/appcontrol/operation/pick", null, "image/*"); + + function onSuccess() { + console.log("Appservice launched"); + } + + function onError() { + alert("Appservice launch failed: " + err.message); + } + + var serviceReply = { + onsuccess : function(reply) { + alert("Selected image path :
    " + reply[0].value[0]); + }, + onfail : function() { + alert("Appservice request failed"); + } + }; + + try { + tizen.application.launchService(service, null, onSuccess, onError, serviceReply); + } catch (exc) { + alert("launchService exc: " + exc.message); + } +} \ No newline at end of file diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Application/tizen-app-template.xml b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Application/tizen-app-template.xml new file mode 100644 index 0000000..d6c0c1c --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Application/tizen-app-template.xml @@ -0,0 +1,12 @@ + + + Application + TIZEN + + description.xml + + + + + + diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Application/tizen_32.png b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Application/tizen_32.png new file mode 100755 index 0000000..a37c33e Binary files /dev/null and b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Application/tizen_32.png differ diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Application/tizen_64.png b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Application/tizen_64.png new file mode 100755 index 0000000..f80f2ec Binary files /dev/null and b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Application/tizen_64.png differ diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Application/tutorial-application-snapshot.png b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Application/tutorial-application-snapshot.png new file mode 100644 index 0000000..697c630 Binary files /dev/null and b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Application/tutorial-application-snapshot.png differ diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Appservice/description.xml b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Appservice/description.xml new file mode 100644 index 0000000..0501fc0 --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Appservice/description.xml @@ -0,0 +1,10 @@ + + + + Appservice + 1.0 + tutorial-appservice-snapshot.png + + A tutorial sample application demonstrating the tizen application service device API usage. + + diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Appservice/description.xsl b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Appservice/description.xsl new file mode 100755 index 0000000..1f4f57f --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Appservice/description.xsl @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + +
    + + + +
    + Type: JavaScript +

    + +

    +
    + + + + + +
    + + +
    + +
    diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Appservice/project/config.xml b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Appservice/project/config.xml new file mode 100755 index 0000000..654c969 --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Appservice/project/config.xml @@ -0,0 +1,10 @@ + + + + Appservice + + + + + + diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Appservice/project/css/style.css b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Appservice/project/css/style.css new file mode 100755 index 0000000..e69de29 diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Appservice/project/icon.png b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Appservice/project/icon.png new file mode 100755 index 0000000..b0979b1 Binary files /dev/null and b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Appservice/project/icon.png differ diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Appservice/project/index.html b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Appservice/project/index.html new file mode 100644 index 0000000..d148cb4 --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Appservice/project/index.html @@ -0,0 +1,28 @@ + + + + + + + Appservice + + + + + + + + + +
    +
    +

    Application Service

    +
    + +
    +
      +
    +
    +
    + + \ No newline at end of file diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Appservice/project/js/config.js b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Appservice/project/js/config.js new file mode 100644 index 0000000..441e1a6 --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Appservice/project/js/config.js @@ -0,0 +1,29 @@ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.tizenopensource.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +//tizen-web-ui-fw configuration +$(document).bind("mobileinit", function() { + $.mobile.loadingMessageTextVisible = false; + $.mobile.defaultPageTransition = "none"; + // Disable context menu + $(document).bind("contextmenu", function(e) { + return false; + }); + // Disable text selection + $(document).delegate("[data-role='page']", "pageinit", function(e) { + $.mobile.tizen.disableSelection($(e.target)); + }); +}); diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Appservice/project/js/main.js b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Appservice/project/js/main.js new file mode 100644 index 0000000..a34d433 --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Appservice/project/js/main.js @@ -0,0 +1,98 @@ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.tizenopensource.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +$(document).delegate("#main", "pageinit", function() { + $("#main .ui-btn-back").bind("vclick", function() { + tizen.application.exit(); + return false; + }); + + $("#app-list").delegate("li", "vclick", function() { + requestAppservice($(this).data("id")); + return false; + }); + + alert("This application requests a service to the \"Application\" sample application.
    It means the \"Application\" sample application should have been installed in this device.
    Select an item then the \"Application\" sample application will be launched and reply with requested item's information"); + listInstalledApps(); +}); + +function serviceReplySuccessCB(reply) { + var msg = "The information from appservice"; + + for(var i = 0; i < reply.length; i++) { + msg += "
    " + reply[i].key + " : " + reply[i].value[0]; + } + alert(msg); +} + +var serviceReply = { + onsuccess : serviceReplySuccessCB, + onfail : function() { + alert("Request failed"); + } +}; + +function requestAppservice(id) { + var svcData = [new tizen.ApplicationServiceData("id",[id])] + var service = new tizen.ApplicationService( + "http://tizen.org/appcontrol/operation/view", null, null, svcData); + + try { + tizen.application.launchService( + service, + "sampleapp0", + function() { + console.log("Service launched"); + }, + function(err) { + alert("Service launch failed: " + err.message); + }, + serviceReply); + } catch (exc) { + alert("launchService exc: " + exc.message); + } +} + +function getAppsInfoSuccessCB(apps) { + var app, str = '
  • Installed applications
  • '; + + for (var i = 0; i < apps.length; i++) { + app = apps[i]; + if(app.show == true) { + str += '
  • ' + + app.id + + '
  • '; + } + } + $("#app-list").empty().append(str).trigger("create").listview("refresh"); +} + +function getAppsInfoErrorCB(err) { + alert("getAppsInfo failed : " + err.message); +} + +function listInstalledApps() { + try { + /* get the list of installed applications */ + tizen.application.getAppsInfo(getAppsInfoSuccessCB, getAppsInfoErrorCB); + } catch (exc) { + alert("getAppsInfo exc:" + exc.message); + } +} \ No newline at end of file diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Appservice/tizen-app-template.xml b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Appservice/tizen-app-template.xml new file mode 100644 index 0000000..361b01c --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Appservice/tizen-app-template.xml @@ -0,0 +1,12 @@ + + + Appservice + TIZEN + + description.xml + + + + + + diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Appservice/tizen_32.png b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Appservice/tizen_32.png new file mode 100755 index 0000000..a37c33e Binary files /dev/null and b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Appservice/tizen_32.png differ diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Appservice/tizen_64.png b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Appservice/tizen_64.png new file mode 100755 index 0000000..f80f2ec Binary files /dev/null and b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Appservice/tizen_64.png differ diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Appservice/tutorial-appservice-snapshot.png b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Appservice/tutorial-appservice-snapshot.png new file mode 100644 index 0000000..0cd5e33 Binary files /dev/null and b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Appservice/tutorial-appservice-snapshot.png differ diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Client/bluetoothclientsample-screenshot.png b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Client/bluetoothclientsample-screenshot.png new file mode 100644 index 0000000..9641f31 Binary files /dev/null and b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Client/bluetoothclientsample-screenshot.png differ diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Client/description.xml b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Client/description.xml new file mode 100644 index 0000000..a8c8017 --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Client/description.xml @@ -0,0 +1,10 @@ + + + + Bluetooth Client + 1.0 + bluetoothclientsample-screenshot.png + + A bluetooth client sample application demonstrating the tizen bluetooth device API usage. + + diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Client/description.xsl b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Client/description.xsl new file mode 100755 index 0000000..1f4f57f --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Client/description.xsl @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + +
    + + + +
    + Type: JavaScript +

    + +

    +
    + + + + + +
    + + +
    + +
    diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Client/project/config.xml b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Client/project/config.xml new file mode 100644 index 0000000..34c4cee --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Client/project/config.xml @@ -0,0 +1,10 @@ + + + BluetoothClient + + + + + + + diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Client/project/createPackage.sh b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Client/project/createPackage.sh new file mode 100755 index 0000000..6bb3848 --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Client/project/createPackage.sh @@ -0,0 +1,40 @@ +#!/bin/sh + +# wrt-plugins +# +# Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. +# +# Contact: Seung Mo Cho +# +# This library is free software; you can redistribute it and/or modify it under +# the terms of the GNU Lesser General Public License as published by the +# Free Software Foundation; either version 2.1 of the License, or (at your +# option) any later version. +# +# This library is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +# License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this library; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# + +test_dir=./ + +cd $test_dir +rm -f BluetoothClientSample.wgt + +# remove vim template files +rm -f `find . -name ".*.swp"` +rm -f `find . -name "*~"` + +#cp wac2_0Config.xml config.xml +zip BluetoothClientSample.wgt -r \ + css \ + js \ + config.xml \ + icon.png \ + *.html + diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Client/project/css/style.css b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Client/project/css/style.css new file mode 100644 index 0000000..25fa51c --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Client/project/css/style.css @@ -0,0 +1,2 @@ +body { +} diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Client/project/icon.png b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Client/project/icon.png new file mode 100755 index 0000000..b0979b1 Binary files /dev/null and b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Client/project/icon.png differ diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Client/project/index.html b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Client/project/index.html new file mode 100644 index 0000000..9ff2239 --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Client/project/index.html @@ -0,0 +1,47 @@ + + + + + + + + Bluetooth Client + + + + + + + + + +
    +
    +

    Bluetooth Client

    +
    + +
    +
    +

    Message Log

    +

    +
    +
    +

    BT state

    +

    no operation

    +
    +
    + + send +
    +
    + + +
    + + diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Client/project/js/config.js b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Client/project/js/config.js new file mode 100644 index 0000000..441e1a6 --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Client/project/js/config.js @@ -0,0 +1,29 @@ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.tizenopensource.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +//tizen-web-ui-fw configuration +$(document).bind("mobileinit", function() { + $.mobile.loadingMessageTextVisible = false; + $.mobile.defaultPageTransition = "none"; + // Disable context menu + $(document).bind("contextmenu", function(e) { + return false; + }); + // Disable text selection + $(document).delegate("[data-role='page']", "pageinit", function(e) { + $.mobile.tizen.disableSelection($(e.target)); + }); +}); diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Client/project/js/main.js b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Client/project/js/main.js new file mode 100644 index 0000000..4952b1e --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Client/project/js/main.js @@ -0,0 +1,233 @@ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.tizenopensource.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +//Initialize function +var init = function () { + // TODO:: Do your initialization job + replaceBtState("no operation"); + serverConnected = false; + + console.log("init() called"); + + $("#main .ui-btn-back").bind("vclick", function() { + disconnectServer(); + }); +}; +$(document).ready(init); + +var serverConnected = false; +var chatLogTableName = "chatLog"; +var chatServerAddress = "00:02:CD:0A:8D:D5"; +var chatServerName = "BTServer"; +var globalSocket = null; +var serviceUUID = "5bce9431-6c75-32ab-afe0-2ec108a30860"; + +var adapter = null; + +function replaceBtState(contents) +{ + $("p#btStatusLog").html(contents); +} + +function updateChatLog(contents) +{ + $("p#chatLogContent").append(contents + "
    "); + console.log(contents); +} + + +function disconnectServer() +{ + if (serverConnected == true && globalSocket != null) { + try { + globalSocket.close(); + } + catch(e) { + console.log(e.message); + } + } + + try { + if (adapter != null) + { + adapter.setPowered(false, function() { + tizen.application.exit(); + }, function(e) { + console.log(e.message); + tizen.application.exit(); + }); + } + else + { + tizen.application.exit(); + } + } + catch(exception) { + console.log(exception.message); + tizen.application.exit(); + } + +} + +function connectToServer() +{ + console.log("connect to Server" + chatServerName); + adapter = tizen.bluetooth.getDefaultAdapter(); + + function onSocketConnected(socket) { + var peerDevice = socket.peer; + replaceBtState("socket state:" + socket.state + ", protocol:" + socket.protocol + " [" + peerDevice.name + "(" + peerDevice.address + ")]"); + console.log("Server connented address(" + socket.peer.address + ")" + "connected service uuid:" + socket.uuid); + serverConnected = true; + + socket.onmessage = function() { + var data = socket.readData(); + var recvmsg = ""; + for (var i = 0; i < data.length;i++) + { + recvmsg += String.fromCharCode(data[i]); + } + updateChatLog("server >> " + recvmsg); + + }; + socket.onerror = function(e) { + replaceBtState("socket error"); + serverConnected = false; + socket.close(); + }; + socket.onclose = function() { + serverConnected = false; + replaceBtState("socket disconnected"); + }; + + globalSocket = socket; // socket save + } + + function onSocketError(e) { + replaceBtState("socket error"); + console.log("socket error"); + serverConnected = false; + socket.close(); + } + function onError(e) { + replaceBtState("operation error"); + console.log("Error"); + serverConnected = false; + } + + + function getDeviceSuccessCB(device) { + if (device != null) { + replaceBtState("get device infomration ok"); + console.log("get device and then try to connect" + serviceUUID); + device.connectToServiceByUUID(serviceUUID, onSocketConnected, onSocketError, "RFCOMM"); + } + else { + replaceBtState("get device infomration error"); + console.log("get device error"); + } + } + + function bondSuccess(device) { + replaceBtState("bond with server ok"); + console.log("bond success!!"); + adapter.getDevice(device.address, getDeviceSuccessCB, onError); + } + + var discoverDevicesSuccessCallback = { + onstarted : function() + { + replaceBtState("device discovery start"); + console.log("device discovery start!"); + }, + ondevicefound: function (device) + { + var msg = device.name + "("+ device.address + ")"; + + if (device.name == chatServerName) + { + adapter.stopDiscovery(function() {}); + + replaceBtState("try to connect"); + if (device.isBonded == true) + { + console.log("try to get device information"); + adapter.getDevice(device.address, getDeviceSuccessCB, onError); + } + else + { + console.log("try to bond"); + adapter.createBonding(device.address, bondSuccess, onError); + } + + } + else + { + replaceBtState(msg + "found"); + } + }, + ondevicedisappeared: function(device) {}, + onfinished : function (devices) + { + replaceBtState("discovery finished"); + console.log("discovery finished"); + console.log(chatServerName + " device not found"); + replaceBtState(chatServerName + " device not found"); + } + }; + + function onSuccess() + { + replaceBtState("bt adpater on ok"); + console.log("turn on success"); + discoveryObject = adapter.discoverDevices(discoverDevicesSuccessCallback, onError); + } + + console.log("try to turn on"); + adapter.setPowered(true, onSuccess, onError); +} + +function sendMsg() +{ + var inputText=document.getElementById("sendText"); + var chatLog = "me      >> " + inputText.value; + var textmsg = inputText.value; + var sendtextmsg = new Array(); + + for (var i = 0; i < textmsg.length; i++) + { + sendtextmsg[i] = textmsg.charCodeAt(i); + } + + if (globalSocket != null && serverConnected == true) + { + var length = globalSocket.writeData(sendtextmsg); + + if (length != 0) + { + updateChatLog(chatLog); + console.log("writeData"); + } + else + { + console.log("writeData fail"); + } + } + else + { + console.log("socket is not set"); + } +} diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Client/tizen-app-template.xml b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Client/tizen-app-template.xml new file mode 100644 index 0000000..d442b84 --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Client/tizen-app-template.xml @@ -0,0 +1,12 @@ + + + Bluetooth Client + TIZEN + + description.xml + + + + + + diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Client/tizen_32.png b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Client/tizen_32.png new file mode 100755 index 0000000..a37c33e Binary files /dev/null and b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Client/tizen_32.png differ diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Client/tizen_64.png b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Client/tizen_64.png new file mode 100755 index 0000000..f80f2ec Binary files /dev/null and b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Client/tizen_64.png differ diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Server/bluetoothserversample-screenshot.png b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Server/bluetoothserversample-screenshot.png new file mode 100644 index 0000000..86b8dc0 Binary files /dev/null and b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Server/bluetoothserversample-screenshot.png differ diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Server/description.xml b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Server/description.xml new file mode 100644 index 0000000..a080727 --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Server/description.xml @@ -0,0 +1,10 @@ + + + + Bluetooth Server + 1.0 + bluetoothserversample-screenshot.png + + A bluetooth server sample application demonstrating the tizen bluetooth device API usage. + + diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Server/description.xsl b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Server/description.xsl new file mode 100755 index 0000000..1f4f57f --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Server/description.xsl @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + +
    + + + +
    + Type: JavaScript +

    + +

    +
    + + + + + +
    + + +
    + +
    diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Server/project/config.xml b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Server/project/config.xml new file mode 100644 index 0000000..9ba69cf --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Server/project/config.xml @@ -0,0 +1,10 @@ + + + BluetoothServer + + + + + + + diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Server/project/createPackage.sh b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Server/project/createPackage.sh new file mode 100755 index 0000000..2499f55 --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Server/project/createPackage.sh @@ -0,0 +1,40 @@ +#!/bin/sh + +# wrt-plugins +# +# Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. +# +# Contact: Seung Mo Cho +# +# This library is free software; you can redistribute it and/or modify it under +# the terms of the GNU Lesser General Public License as published by the +# Free Software Foundation; either version 2.1 of the License, or (at your +# option) any later version. +# +# This library is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +# License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this library; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# + +test_dir=./ + +cd $test_dir +rm -f BluetoothServerSample.wgt + +# remove vim template files +rm -f `find . -name ".*.swp"` +rm -f `find . -name "*~"` + +#cp wac2_0Config.xml config.xml +zip BluetoothServerSample.wgt -r \ + css \ + js \ + config.xml \ + icon.png \ + *.html + diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Server/project/css/style.css b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Server/project/css/style.css new file mode 100644 index 0000000..25fa51c --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Server/project/css/style.css @@ -0,0 +1,2 @@ +body { +} diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Server/project/icon.png b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Server/project/icon.png new file mode 100755 index 0000000..b0979b1 Binary files /dev/null and b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Server/project/icon.png differ diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Server/project/index.html b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Server/project/index.html new file mode 100644 index 0000000..13f782b --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Server/project/index.html @@ -0,0 +1,55 @@ + + + + + + + + Bluetooth Server + + + + + + + + + +
    +
    +

    Bluetooth Server

    +
    + +
    +
    + + +
    +
    +

    Message Log

    +

    +
    +
    +

    BT state

    +

    no operation

    +
    +
    + + send +
    + +
    + +
    + + diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Server/project/js/config.js b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Server/project/js/config.js new file mode 100644 index 0000000..441e1a6 --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Server/project/js/config.js @@ -0,0 +1,29 @@ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.tizenopensource.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +//tizen-web-ui-fw configuration +$(document).bind("mobileinit", function() { + $.mobile.loadingMessageTextVisible = false; + $.mobile.defaultPageTransition = "none"; + // Disable context menu + $(document).bind("contextmenu", function(e) { + return false; + }); + // Disable text selection + $(document).delegate("[data-role='page']", "pageinit", function(e) { + $.mobile.tizen.disableSelection($(e.target)); + }); +}); diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Server/project/js/main.js b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Server/project/js/main.js new file mode 100644 index 0000000..7fa5d0c --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Server/project/js/main.js @@ -0,0 +1,193 @@ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.tizenopensource.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +//Initialize function +var clientConnected = false; +var chatLogTableName = "chatLog"; +var chatServerName = "BTServer"; +var globalSocket = null; +var serviceUUID = "5bce9431-6c75-32ab-afe0-2ec108a30860"; +var adapter = null; + + +var init = function () { + // TODO:: Do your initialization job + replaceBtState("no operation"); + console.log("init() called"); + + $("#main .ui-btn-back").bind("vclick", function() { + disconnectClient(); + }); + +}; +$(document).ready(init); + + +function replaceBtState(contents) +{ + $("p#btStatusLog").html(contents); +} + + +function updateChatLog(contents) +{ + $("p#chatLogContent").append(contents + "
    "); + console.log(contents); +} + + +function disconnectClient() +{ + if (clientConnected == true && globalSocket != null) { + try { + globalSocket.close(); + } + catch(e) { + console.log(e.message); + } + } + + try { + if (adapter != null) + { + adapter.setPowered(false, function() { + tizen.application.exit(); + }, function(e) { + console.log(e.message); + tizen.application.exit(); + }); + } + else + { + tizen.application.exit(); + } + } + catch(exception) { + console.log(exception.message); + tizen.application.exit(); + } +} + +function startServer() +{ + adapter = tizen.bluetooth.getDefaultAdapter(); + + console.log("startServer Name : " + chatServerName); + + function registerSuccessCallback(handler) { + chatServiceHandler = handler; + replaceBtState("wait for client..."); + console.log("chat service register success"); + + chatServiceHandler.onconnect = function(socket) { + globalSocket = socket; // socket save + var peerDevice = socket.peer; + replaceBtState("socket state:" + socket.state + ", protocol:" + socket.protocol + " [" + peerDevice.name + "(" + peerDevice.address + ")]"); + console.log("Server connented address(" + socket.peer.address + ")" + "connected service uuid:" + socket.uuid); + clientConnected = true; + + socket.onmessage = function() { + var data = socket.readData(); + var recvmsg = ""; + for (var i = 0; i < data.length;i++) + { + recvmsg += String.fromCharCode(data[i]); + } + updateChatLog("client >> " + recvmsg); + + }; + socket.onerror = function(e) { + replaceBtState("socket error"); + clientConnected = false; + socket.close(); + }; + socket.onclose = function() { + clientConnected = false; + replaceBtState("socket disconnected"); + }; + }; + }; + + function onError(e) { + replaceBtState("operation error"); + clientConnected = false; + disconnectServer(); + } + + function setVisibleAndRegister() { + adapter.setVisible(true, function() { + adapter.registerRFCOMMServiceByUUID( + serviceUUID, // service uuid + "My service", + registerSuccessCallback, + onError + ); + }); + } + + function setNameWithTimer() { + console.log("set name"); + adapter.setName(chatServerName, function() { + console.log("set name ok"); + setVisibleAndRegister(); + }, onError); + } + + function onSuccess() + { + replaceBtState("bt adpater on ok"); + console.log("turn on success"); + // need to wait for completing to set default bluetooth name as device name. + setTimeout(setNameWithTimer, 5000); + } + + adapter.setPowered(true, onSuccess, function() { + console.log("device is busy"); + onError(); + }); +} + +function sendMsg() +{ + var inputText=document.getElementById("sendText"); + var chatLog = "me      >> " + inputText.value; + var textmsg = inputText.value; + var sendtextmsg = new Array(); + + for (var i = 0; i < textmsg.length; i++) + { + sendtextmsg[i] = textmsg.charCodeAt(i); + } + + if (globalSocket != null && clientConnected == true) + { + var length = globalSocket.writeData(sendtextmsg); + + if (length != 0) + { + updateChatLog(chatLog); + console.log("writeData"); + } + else + { + console.log("writeData fail"); + } + } + else + { + console.log("socket is not set"); + } +} diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Server/tizen-app-template.xml b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Server/tizen-app-template.xml new file mode 100644 index 0000000..aa560f1 --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Server/tizen-app-template.xml @@ -0,0 +1,12 @@ + + + Bluetooth Server + TIZEN + + description.xml + + + + + + diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Server/tizen_32.png b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Server/tizen_32.png new file mode 100755 index 0000000..a37c33e Binary files /dev/null and b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Server/tizen_32.png differ diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Server/tizen_64.png b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Server/tizen_64.png new file mode 100755 index 0000000..f80f2ec Binary files /dev/null and b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Bluetooth Server/tizen_64.png differ diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Calendar/description.xml b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Calendar/description.xml new file mode 100644 index 0000000..067d379 --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Calendar/description.xml @@ -0,0 +1,10 @@ + + + + Calendar + 1.0 + tutorial-calendar-snapshot.png + + A tutorial sample application demonstrating the tizen calendar device API usage. + + diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Calendar/description.xsl b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Calendar/description.xsl new file mode 100755 index 0000000..1f4f57f --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Calendar/description.xsl @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + +
    + + + +
    + Type: JavaScript +

    + +

    +
    + + + + + +
    + + +
    + +
    diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Calendar/project/config.xml b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Calendar/project/config.xml new file mode 100755 index 0000000..f7736be --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Calendar/project/config.xml @@ -0,0 +1,12 @@ + + + + Calendar + + + + + + + + diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Calendar/project/css/style.css b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Calendar/project/css/style.css new file mode 100755 index 0000000..57ec09f --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Calendar/project/css/style.css @@ -0,0 +1,9 @@ +li>label { + color:#646464; +} +label.ui-input-text { + width:20%; +} +#output { + word-wrap:break-word; +} \ No newline at end of file diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Calendar/project/icon.png b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Calendar/project/icon.png new file mode 100755 index 0000000..b0979b1 Binary files /dev/null and b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Calendar/project/icon.png differ diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Calendar/project/index.html b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Calendar/project/index.html new file mode 100644 index 0000000..7363aee --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Calendar/project/index.html @@ -0,0 +1,114 @@ + + + + + + + Calendar + + + + + + + + + +
    +
    +

    Calendar

    +
    + +
    +
      +
    +
    + +
    +
    + +
    +
    +
    + +
    +
    +

    +
    + +
    +
      +
    • + + +
    • +
    • + + +
    • +
    • + + +
    • +
    • Time
    • +
    • + +
    • +
    +
    + +
    +
    + +
    +
    +
    + +
    +
    +

    Recurrence for this month

    +
    + +
    +
      +
    +
    +
    + +
    +
    +

    Batch

    +
    + +
    +
      +
    • + + +
    • +
    • Add three events
    • +
    • Update last three events
    • +
    • Delete last three events
    • +
    +
    +
    + +
    +
    +

    iCalendar

    +
    + +
    +
    +
    +
    + + diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Calendar/project/js/config.js b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Calendar/project/js/config.js new file mode 100644 index 0000000..441e1a6 --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Calendar/project/js/config.js @@ -0,0 +1,29 @@ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.tizenopensource.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +//tizen-web-ui-fw configuration +$(document).bind("mobileinit", function() { + $.mobile.loadingMessageTextVisible = false; + $.mobile.defaultPageTransition = "none"; + // Disable context menu + $(document).bind("contextmenu", function(e) { + return false; + }); + // Disable text selection + $(document).delegate("[data-role='page']", "pageinit", function(e) { + $.mobile.tizen.disableSelection($(e.target)); + }); +}); diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Calendar/project/js/main.js b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Calendar/project/js/main.js new file mode 100644 index 0000000..1f480d8 --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Calendar/project/js/main.js @@ -0,0 +1,472 @@ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.tizenopensource.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +var EDIT_MODE_ADD = 0, EDIT_MODE_UPDATE = 1, + gEditMode = EDIT_MODE_ADD, + gCalendar, + gEventsMap, + gUpdateId = 0, + gICalendarStr, + gListenerId; + +$(document).delegate("#main", "pageinit", function() { + $("#main .ui-btn-back").bind("vclick", function() { + tizen.application.exit(); + return false; + }); + + $("#main").bind("pagebeforeshow", fetchAllEvents); + + $("#list").delegate("input", "change", function() { + if ($(this).prop("checked")) { + gCalendar = tizen.calendar.getCalendar("EVENT", $(this).data("id")); + fetchAllEvents(); + } + }); + + $("#list").delegate("div", "vclick", function() { + if ($(this).parent().data("item-type") != "event") { + return false; + } + try { + gCalendar.remove(gEventsMap[Number($(this).parent().data("id"))].id); + } catch (e) { + alert("Error:" + e.message); + } + fetchAllEvents(); + return false; + }); + + $("#list").delegate("li", "vclick", function() { + if ($(this).data("role") == "list-divider" || $(this).data("item-type") != "event") { + return false; + } + gEditMode = EDIT_MODE_UPDATE; + gUpdateId = Number($(this).data("id")); + $.mobile.changePage("#edit"); + return false; + }); + + $("#add").bind("vclick", function() { + showAddPage(); + return false; + }); + + $("#tracking").bind("vclick", registerListener); + + tizen.calendar.getCalendars("EVENT", onGetCalendarsSuccess, onError); +}); + +$(document).delegate("#batch", "pageinit", function() { + $("#batch-add").bind("vclick", function() { + add3Events(); + return false; + }); + + $("#batch-update").bind("vclick", function() { + update3Events(); + return false; + }); + + $("#batch-delete").bind("vclick", function() { + delete3Events(); + return false; + }); +}); + +$(document).delegate("#edit", "pageinit", function() { + $("#edit").bind("pagebeforeshow", function(event, data) { + if (data.prevPage.attr("id") == "icalendar-output") { + return; + } + setEditPage(); + }); + + $("#save").bind("vclick", function() { + var result; + + if (gEditMode == EDIT_MODE_ADD) { + result = addEvent(); + } else { + result = updateEvent(); + } + if (result == true) { + window.history.back(); + } + return false; + }); + + $("#icalendar").bind("vclick", function() { + convertEvent(); + return false; + }); + + $("#expand").bind("vclick", function() { + expandEvent(); + return false; + }); +}); + +$(document).delegate("#icalendar-output", "pageinit", function() { + $("#icalendar-output").bind("pagebeforeshow", function() { + $("#output").html(gICalendarStr); + }); +}); + +$(document).delegate("#expanded-recurrence", "pageinit", function() { + $("#expanded-recurrence").bind("pagebeforeshow", expandEventRecurrenceForThisMonth); +}); + +function onError(err) { + alert("Error(" + err.code + "): " + err.message); +} + +function fetchAllEvents() { + if(gCalendar) { + gCalendar.find(onEventFindSuccess, onError); + } +} + +function setEditPage() { + if (gEditMode == EDIT_MODE_ADD) { + $("#summary").attr("value", ""); + $("#description").attr("value", ""); + $("#location").attr("value", ""); + $("#edit-title").html("Add"); + } else { + var evt = gEventsMap[gUpdateId], + d = evt.startDate, + datetime = new Date(d.getFullYear(),d.getMonth(),d.getDate(),d.getHours(),d.getMinutes()); + + $("#summary").attr("value", evt.summary); + $("#description").attr("value", evt.description); + $("#location").attr("value", evt.location); + $("#time").datetimepicker("option", "date", datetime); + $("#edit-title").html("Detail"); + } +} + +function showAddPage() { + gEditMode = EDIT_MODE_ADD; + $.mobile.changePage("#edit"); + return false; +} + +function onGetCalendarsSuccess(calendars) { + var str = '
  • Calendars
  • ', + len = calendars.length, + i; + + for (i = 0; i < len; i++) { + str += '
  • ' + + calendars[i].name + + '
  • '; + } + + $("#list").html(str).trigger("create").listview("refresh"); + + var defaultCalendar = tizen.calendar.getDefaultCalendar("EVENT"); + + if (len > 0) { + for (i = 0; i < len; i++) { + if (calendars[i].name == defaultCalendar.name) { + break; + } + } + if(i == len) { + alert("No default calendar found"); + i = 0; + } + gCalendar = calendars[i]; + $("#calendar-" + i).prop("checked", true); + $("#calendar-" + i).checkboxradio("refresh"); + fetchAllEvents(); + } +} + +function onEventFindSuccess(events) { + var str = '
  • Events
  • '; + + gEventsMap = events; + + for (var i = 0; i < events.length; i++) { + str += '
  • ' + + events[i].summary + + '' + + events[i].location + + '
    Delete
  • '; + } + $("#list>li[data-item-type=event]").remove(); + $("#list").append(str).trigger("create").listview("refresh"); +} + +function getCalendarStartDate(){ + var times = $("#time").datetimepicker("value"); + var splits, d, t; + + splits = times.split('T'); + d = splits[0].split("-"); + t = splits[1].split(':'); + + return { + yy: parseInt(d[0]), + mm: parseInt(d[1])-1, + dd: parseInt(d[2]), + h: parseInt(t[0]), + m: parseInt(t[1]) + }; +} + +function isEventChanged(newEvent){ + var evt = gCalendar.get(gEventsMap[gUpdateId].id); + + if (evt.summary == newEvent.summary && + evt.description == newEvent.description && + evt.location == newEvent.location && + evt.startDate.equalsTo(newEvent.startDate)) { + return false; + } else { + return true; + } +} + +function addEvent() { + if ($("#summary").attr("value") == "") { + alert("Input Summary"); + return false; + } + + var d = getCalendarStartDate(); + + try { + gCalendar.add(new tizen.CalendarEvent({ + description : $("#description").attr("value"), + summary : $("#summary").attr("value"), + startDate : new tizen.TZDate(d.yy, d.mm, d.dd, d.h, d.m), + duration : new tizen.TimeDuration(1, "HOURS"), + location : $("#location").attr("value") + })); + } catch (e) { + alert("Error:" + e.message); + return false; + } + return true; +} + +function updateEvent() { + if ($("#summary").attr("value") == "") { + alert("Failed! Input Summary"); + return false; + } + + var d = getCalendarStartDate(); + + gEventsMap[gUpdateId].summary = $("#summary").attr("value"); + gEventsMap[gUpdateId].description = $("#description").attr("value"); + gEventsMap[gUpdateId].location = $("#location").attr("value"); + gEventsMap[gUpdateId].startDate = new tizen.TZDate(d.yy, d.mm, d.dd, d.h, d.m); + + if (isEventChanged(gEventsMap[gUpdateId])){ + try { + gCalendar.update(gEventsMap[gUpdateId]); + } catch (e) { + alert("Error:" + e.message); + return false; + } + } + return true; +} + +function convertEvent() { + var d = getCalendarStartDate(); + + try { + var evt = new tizen.CalendarEvent({ + description : $("#description").attr("value"), + summary : $("#summary").attr("value"), + startDate : new tizen.TZDate(d.yy, d.mm, d.dd, d.h, d.m), + duration : new tizen.TimeDuration(1, "HOURS"), + location : $("#location").attr("value") + }); + gICalendarStr = evt.convertToString("ICALENDAR_20"); + $.mobile.changePage("#icalendar-output"); + } catch (e) { + alert("Error: " + e.message); + } +} + +function expandEvent() { + if (gEditMode != EDIT_MODE_UPDATE) { + alert("This is only for saved events
    Save first then try again") + return; + } + + var d = getCalendarStartDate(), + evt = gEventsMap[gUpdateId]; + + evt.summary = $("#summary").attr("value"); + evt.description = $("#description").attr("value"); + evt.location = $("#location").attr("value"); + evt.startDate = new tizen.TZDate(d.yy, d.mm, d.dd, d.h, d.m); + evt.recurrenceRule = new tizen.CalendarRecurrenceRule("DAILY", { + occurrenceCount : 7 + }); + + try { + gCalendar.update(evt); + } catch (e) { + alert("Error: " + e.message); + } + + $.mobile.changePage("#expanded-recurrence"); +} + +function onExpandRecurrenceSuccess(events) { + var str = '
  • Recurring events expanded for this
    month with freq. DAILY, count 7
  • '; + + for (var i = 0; i < events.length; i++) { + str += '
  • ' + + events[i].summary + + '' + + events[i].startDate.toLocaleString() + + '
  • '; + } + + $("#expand-list").html(str).trigger("create").listview("refresh"); +} + +function expandEventRecurrenceForThisMonth() { + var d = new Date(), + startDate = new tizen.TZDate(d.getFullYear(), d.getMonth(), 1), + endDate = new tizen.TZDate(d.getFullYear(), d.getMonth(), 1); + + endDate.setMonth(endDate.getMonth()+1); + endDate.setMilliseconds(-1); + + gEventsMap[gUpdateId].expandRecurrence(startDate, endDate, onExpandRecurrenceSuccess, onError); +} + +function registerListener() { + var listener = { + onitemsadded : function(items) { + alert("Tracking message :
    " + items.length + " event(s) added"); + }, + onitemsupdated : function(items) { + alert("Tracking message :
    " + items.length + " event(s) updated"); + }, + onitemsremoved : function(items) { + alert("Tracking message :
    " + items.length + " event(s) deleted"); + } + }; + + try { + gListenerId = gCalendar.addChangeListener(listener, onError); + $("#tracking").unbind("vclick", registerListener); + $("#tracking").bind("vclick", unregisterListener); + alert("Tracking started"); + } catch (error) { + alert("error: " + error.message); + } +} + +function unregisterListener() { + gCalendar.removeChangeListener(gListenerId); + $("#tracking").unbind("vclick", unregisterListener); + $("#tracking").bind("vclick", registerListener); + alert("Tracking stopped"); +} + +function onAddBatchSuccess(events) { + alert("Added successfully"); +} + +function add3Events() { + if ($("#batch-summary").attr("value") == "") { + alert("Input Summary"); + return; + } + + var evtArray = []; + + try { + evtArray[0] = new tizen.CalendarEvent({ + summary : $("#batch-summary").attr("value"), + startDate : tizen.time.getCurrentDateTime(), + duration : new tizen.TimeDuration(1, "HOURS"), + }); + + /* clone 1st event to make 2nd, 3rd events. */ + evtArray[1] = evtArray[0].clone(); + evtArray[1].summary += " copy 1"; + evtArray[2] = evtArray[0].clone(); + evtArray[2].summary += " copy 2"; + + gCalendar.addBatch(evtArray, onAddBatchSuccess, onError); + } catch (e) { + alert("Error: " + e.message); + } +} + +function onUpdateBatchSuccess() { + alert("Updated successfully"); +} + +function onUpdate3EventsFindSuccess(events) { + var evtArray = []; + + for (var i = events.length-1, j = 0; i >= 0 && j < 3; i--, j++) { + events[i].summary += " updated"; + evtArray.push(events[i]); + } + + try { + gCalendar.updateBatch(evtArray, onUpdateBatchSuccess, onError); + } catch (e) { + alert("Error: " + e.message); + } +} + +function update3Events() { + gCalendar.find(onUpdate3EventsFindSuccess, onError); +} + +function onRemoveBatchSuccess() { + alert("Deleted successfully"); +} + +function onDelete3EventsFindSuccess(events) { + var evtIdArray = []; + + for (var i = events.length-1, j = 0; i >= 0 && j < 3; i--, j++) { + evtIdArray.push(events[i].id); + } + + try { + gCalendar.removeBatch(evtIdArray, onRemoveBatchSuccess, onError); + } catch (e) { + alert("Error: " + e.message); + } +} + +function delete3Events() { + gCalendar.find(onDelete3EventsFindSuccess, onError); +} diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Calendar/tizen-app-template.xml b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Calendar/tizen-app-template.xml new file mode 100644 index 0000000..fa87c8b --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Calendar/tizen-app-template.xml @@ -0,0 +1,12 @@ + + + Calendar + TIZEN + + description.xml + + + + + + diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Calendar/tizen_32.png b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Calendar/tizen_32.png new file mode 100755 index 0000000..a37c33e Binary files /dev/null and b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Calendar/tizen_32.png differ diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Calendar/tizen_64.png b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Calendar/tizen_64.png new file mode 100755 index 0000000..f80f2ec Binary files /dev/null and b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Calendar/tizen_64.png differ diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Calendar/tutorial-calendar-snapshot.png b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Calendar/tutorial-calendar-snapshot.png new file mode 100644 index 0000000..c1fa095 Binary files /dev/null and b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Calendar/tutorial-calendar-snapshot.png differ diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Call/description.xml b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Call/description.xml new file mode 100644 index 0000000..2131814 --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Call/description.xml @@ -0,0 +1,10 @@ + + + + Call + 1.0 + tutorial-call-snapshot.png + + A tutorial sample application demonstrating the tizen call device API usage. + + diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Call/description.xsl b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Call/description.xsl new file mode 100755 index 0000000..1f4f57f --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Call/description.xsl @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + +
    + + + +
    + Type: JavaScript +

    + +

    +
    + + + + + +
    + + +
    + +
    diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Call/project/config.xml b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Call/project/config.xml new file mode 100755 index 0000000..54acc80 --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Call/project/config.xml @@ -0,0 +1,11 @@ + + + + Call + + + + + + + diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Call/project/css/style.css b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Call/project/css/style.css new file mode 100755 index 0000000..e69de29 diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Call/project/icon.png b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Call/project/icon.png new file mode 100755 index 0000000..b0979b1 Binary files /dev/null and b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Call/project/icon.png differ diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Call/project/index.html b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Call/project/index.html new file mode 100644 index 0000000..aee8fc8 --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Call/project/index.html @@ -0,0 +1,39 @@ + + + + + + + Call + + + + + + + + + +
    +
    +

    Call history

    +
    + +
    +
      +
    +
    + + +
    + + diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Call/project/js/config.js b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Call/project/js/config.js new file mode 100644 index 0000000..441e1a6 --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Call/project/js/config.js @@ -0,0 +1,29 @@ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.tizenopensource.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +//tizen-web-ui-fw configuration +$(document).bind("mobileinit", function() { + $.mobile.loadingMessageTextVisible = false; + $.mobile.defaultPageTransition = "none"; + // Disable context menu + $(document).bind("contextmenu", function(e) { + return false; + }); + // Disable text selection + $(document).delegate("[data-role='page']", "pageinit", function(e) { + $.mobile.tizen.disableSelection($(e.target)); + }); +}); diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Call/project/js/main.js b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Call/project/js/main.js new file mode 100644 index 0000000..61103f6 --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Call/project/js/main.js @@ -0,0 +1,172 @@ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.tizenopensource.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +var gCallHistory, gListenerId = null; + +$(document).delegate("#main", "pageinit", function() { + $("#main .ui-btn-back").bind("vclick", function() { + tizen.application.exit(); + return false; + }); + + $("#call-list").delegate("div", "vclick", function() { + deleteCall(gCallHistory[Number($(this).parent().data("id"))]); + return false; + }); + + $("#delete-all").bind("vclick", function() { + deleteAllCalls(); + return false; + }); + + $("#delete-3").bind("vclick", function() { + deleteLast3Calls(); + return false; + }); + + $("#tracking").bind("vclick", registerListener); + + $("#in-call").bind("vclick", function() { + isInCall(); + return false; + }); + + showCallHistory(); +}); + +function onError(e) { + alert("Error: " + e.message); +} + +function isInCall() { + try { + var calling = tizen.call.isCallInProgress(); + if (calling) { + alert("Call in progress"); + } else { + alert("No call in progress"); + } + } catch (err) { + onError(err); + } +} + +function deleteAllCalls() { + function onSuccess() { + showCallHistory(); + } + + try { + tizen.call.history.removeAll(onSuccess, onError); + } catch (err) { + onError(err); + } +} + +function deleteLast3Calls() { + function onSuccess() { + showCallHistory(); + } + + var calls = []; + + for (var i = gCallHistory.length - 1, j = 0; i >= 0 && j < 3; i--, j++) { + calls.push(gCallHistory[i]); + } + + if (calls.length > 0) { + try { + tizen.call.history.removeBatch(calls, onSuccess, onError); + } catch (err) { + onError(err); + } + } +} + +function onCallHistoryFindSuccess(results) { + gCallHistory = results; + var str = ""; + + if (results.length > 0) { + for (var i = 0; i < results.length; i++) { + str += '
  • ' + + results[i].remoteParties[0].remoteParty + + '' + + results[i].direction + + '
    Delete
  • '; + } + } + $("#call-list").html(str).trigger("create").listview("refresh"); +} + +function onCallHistoryFindError(error) { + alert("Error: Call history query failed: " + error.message); +} + +function showCallHistory() { + var filter = new tizen.AttributeFilter("callType", "EXACTLY", "tizen.tel"), + sortMode = new tizen.SortMode("startTime", "DESC"); + + try { + tizen.call.history.find(onCallHistoryFindSuccess, onCallHistoryFindError, filter, sortMode); + } catch (err) { + alert("Error: Find failed: " + err.code + ": " + err.message); + } +} + +function deleteCall(record) { + try { + tizen.call.history.remove(record); + } catch (err) { + alert("Find failed: " + err.code + ": " + err.message); + } + showCallHistory(); +} + +function registerListener() { + var listener = { + onadded : function(items) { + alert("Tracking message :
    " + items.length + " new item(s) added"); + showCallHistory(); + }, + onchanged : function(items) { + alert("Tracking message :
    " + items.length + " item(s) changed"); + showCallHistory(); + } + }; + + try { + gListenerId = tizen.call.history.addListener(listener); + alert("Call history change tracking started"); + $("#tracking").unbind("vclick"); + $("#tracking").bind("vclick", unregisterListener); + } catch (err) { + onError(err); + } +} + +function unregisterListener() { + try { + tizen.call.history.removeListener(gListenerId); + alert("Call history change tracking stopped"); + $("#tracking").unbind("vclick"); + $("#tracking").bind("vclick", registerListener); + } catch (err) { + onError(err); + } +} diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Call/tizen-app-template.xml b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Call/tizen-app-template.xml new file mode 100644 index 0000000..2cc5745 --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Call/tizen-app-template.xml @@ -0,0 +1,12 @@ + + + Call + TIZEN + + description.xml + + + + + + diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Call/tizen_32.png b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Call/tizen_32.png new file mode 100755 index 0000000..a37c33e Binary files /dev/null and b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Call/tizen_32.png differ diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Call/tizen_64.png b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Call/tizen_64.png new file mode 100755 index 0000000..f80f2ec Binary files /dev/null and b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Call/tizen_64.png differ diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Call/tutorial-call-snapshot.png b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Call/tutorial-call-snapshot.png new file mode 100644 index 0000000..e3c1045 Binary files /dev/null and b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Call/tutorial-call-snapshot.png differ diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Contact/description.xml b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Contact/description.xml new file mode 100644 index 0000000..c7c2839 --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Contact/description.xml @@ -0,0 +1,10 @@ + + + + Contact + 1.0 + tutorial-contact-snapshot.png + + A tutorial sample application demonstrating the tizen contact device API usage. + + diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Contact/description.xsl b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Contact/description.xsl new file mode 100755 index 0000000..1f4f57f --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Contact/description.xsl @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + +
    + + + +
    + Type: JavaScript +

    + +

    +
    + + + + + +
    + + +
    + +
    diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Contact/project/config.xml b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Contact/project/config.xml new file mode 100755 index 0000000..2d4d6f0 --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Contact/project/config.xml @@ -0,0 +1,11 @@ + + + + Contact + + + + + + + diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Contact/project/css/style.css b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Contact/project/css/style.css new file mode 100755 index 0000000..eaed539 --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Contact/project/css/style.css @@ -0,0 +1,9 @@ +li>label { + color: #646464; +} +label.ui-input-text { + width:20%; +} +#output { + word-wrap:break-word; +} diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Contact/project/icon.png b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Contact/project/icon.png new file mode 100755 index 0000000..b0979b1 Binary files /dev/null and b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Contact/project/icon.png differ diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Contact/project/index.html b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Contact/project/index.html new file mode 100644 index 0000000..37deb8f --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Contact/project/index.html @@ -0,0 +1,103 @@ + + + + + + + Contact + + + + + + + + + +
    +
    +

    Contact

    +
    + +
    +
      +
    +
    + +
    +
    + +
    +
    +
    + +
    +
    +

    +
    + +
    +
      +
    • + + +
    • +
    • + + +
    • +
    • + + +
    • +
    • + + +
    • +
    • + + +
    • +
    +
    + +
    +
    + +
    +
    +
    + +
    +
    +

    Batch

    +
    +
    +
      +
    • +
    • Add three contacts
    • +
    • Update last three contacts
    • +
    • Delete last three contacts
    • +
    +
    +
    + +
    +
    +

    vCard

    +
    + +
    +
    +
    +
    + + diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Contact/project/js/config.js b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Contact/project/js/config.js new file mode 100644 index 0000000..441e1a6 --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Contact/project/js/config.js @@ -0,0 +1,29 @@ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.tizenopensource.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +//tizen-web-ui-fw configuration +$(document).bind("mobileinit", function() { + $.mobile.loadingMessageTextVisible = false; + $.mobile.defaultPageTransition = "none"; + // Disable context menu + $(document).bind("contextmenu", function(e) { + return false; + }); + // Disable text selection + $(document).delegate("[data-role='page']", "pageinit", function(e) { + $.mobile.tizen.disableSelection($(e.target)); + }); +}); diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Contact/project/js/main.js b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Contact/project/js/main.js new file mode 100644 index 0000000..98ce86c --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Contact/project/js/main.js @@ -0,0 +1,421 @@ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.tizenopensource.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +var EDIT_MODE_ADD = 0, EDIT_MODE_UPDATE = 1, + gEditMode = EDIT_MODE_ADD, + gAddressbook, + gUpdateId = 0, + gVCardStr, + gListenerId; + +$(document).delegate("#main", "pageinit", function() { + $("#main .ui-btn-back").bind("vclick", function() { + tizen.application.exit(); + return false; + }); + + $("#main").bind("pagebeforeshow", fetchAllContacts); + + $("#list").delegate("input", "change", function() { + if ($(this).prop("checked")) { + gAddressbook = tizen.contact.getAddressBook($(this).data("id")); + } + }); + + $("#list").delegate("li", "vclick", function() { + if ($(this).data("role") == "list-divider" || $(this).data("item-type") != "contact") { + return false; + } + gEditMode = EDIT_MODE_UPDATE; + gUpdateId = $(this).data("id"); + $.mobile.changePage("#edit"); + return false; + }); + + $("#list").delegate("div", "vclick", function() { + if ($(this).parent().data("item-type") != "contact") { + return false; + } + try { + gAddressbook.remove($(this).parent().data("id")); + } catch (e) { + alert("Error: " + e.message); + } + fetchAllContacts(); + return false; + }); + + $("#add").bind("vclick", function() { + showAddPage(); + return false; + }); + + $("#tracking").bind("vclick", registerListener); + + tizen.contact.getAddressBooks(onGetAddressBooksSuccess, onError); +}); + +$(document).delegate("#batch", "pageinit", function() { + $("#batch-add").bind("vclick", function() { + add3Contacts(); + return false; + }); + + $("#batch-update").bind("vclick", function() { + update3Contacts(); + return false; + }); + + $("#batch-delete").bind("vclick", function() { + delete3Contacts(); + return false; + }); +}); + +$(document).delegate("#edit", "pageinit", function() { + $("#edit").bind("pagebeforeshow", function(event, data) { + if (data.prevPage.attr("id") == "vcard-output") { + return; + } + setEditPage(); + }); + + $("#save").bind("vclick", function() { + var result; + + if (gEditMode == EDIT_MODE_ADD) { + result = addContact(); + } else { + result = updateContact(); + } + if (result == true) { + window.history.back(); + } + return false; + }); + + $("#vcard").bind("vclick", function() { + convertContact(); + return false; + }); +}); + +$(document).delegate("#vcard-output", "pageinit", function() { + $("#vcard-output").bind("pagebeforeshow", function() { + $("#output").html(gVCardStr); + }); +}); + +function onError(err) { + alert("Error(" + err.code + "): " + err.message); +} + +function fetchAllContacts() { + if(gAddressbook) { + gAddressbook.find(onContactFindSuccess, onError); + } +} + +function getUserInput() { + var input; + + if ($("#first-name-input").attr("value") == "") { + alert("Input First Name"); + input = null; + } else { + input = { + firstName: $("#first-name-input").attr("value"), + lastName: $("#last-name-input").attr("value"), + nickname: $("#nickname-input").attr("value"), + email: $("#email-input").attr("value"), + phone: $("#phone-number-input").attr("value") + }; + } + return input; +} + +function initUserInput(firstName, lastName, nickname, email, phone) { + $("#first-name-input").attr("value", firstName ? firstName : ""); + $("#last-name-input").attr("value", lastName ? lastName : ""); + $("#nickname-input").attr("value", nickname ? nickname : ""); + $("#email-input").attr("value", email ? email.email : ""); + $("#phone-number-input").attr("value", phone ? phone.number : ""); +} + +function setEditPage() { + if (gEditMode == EDIT_MODE_ADD) { + initUserInput(); + $("#edit-title").html("Add"); + } else { + var contact = gAddressbook.get(gUpdateId); + + initUserInput(contact.name.firstName, contact.name.lastName, + contact.name.nicknames[0], contact.emails[0], contact.phoneNumbers[0]); + $("#edit-title").html("Detail"); + } +} + +function showAddPage() { + gEditMode = EDIT_MODE_ADD; + $.mobile.changePage("#edit"); +} + +function onGetAddressBooksSuccess(addressbooks) { + var str = '
  • Addressbooks
  • ', + len = addressbooks.length, + i; + + for (i = 0; i < len; i++) { + str += '
  • ' + + addressbooks[i].name + + '
  • '; + } + + $("#list").html(str).trigger("create").listview("refresh"); + + if (len > 0) { + var defaultAddressbook = tizen.contact.getDefaultAddressBook(); + + for (i = 0; i < len; i++) { + if (addressbooks[i].name == defaultAddressbook.name) { + break; + } + } + if(i == len) { + alert("No default addressbook found"); + i = 0; + } + gAddressbook = addressbooks[i]; + $("#addressbook-" + i).prop("checked", true); + $("#addressbook-" + i).checkboxradio("refresh"); + fetchAllContacts(); + } +} + +function onContactFindSuccess(contacts) { + var value, str = '
  • Contacts
  • '; + + for (var i = 0; i < contacts.length; i++) { + str += '
  • ' + + ((contacts[i].name == null) ? "" : (value = contacts[i].name.firstName) ? value : "") + + ' ' + + ((contacts[i].name == null) ? "" : (value = contacts[i].name.lastName) ? value : "") + + '' + + ((value = contacts[i].phoneNumbers[0]) ? value.number : "") + + '
    Delete
  • '; + } + + $("#list>li[data-item-type=contact]").remove(); + $("#list").append(str).trigger("create").listview("refresh"); +} + +function addContact() { + var input = getUserInput(); + + if (input == null) { + return false; + } + try { + gAddressbook.add(new tizen.Contact({ + name : new tizen.ContactName({ + firstName : input.firstName, + lastName : input.lastName, + nicknames : [input.nickname] + }), + emails : [new tizen.ContactEmailAddress(input.email)], + phoneNumbers : [new tizen.ContactPhoneNumber(input.phone)] + })); + } catch (e) { + alert("Error: " + e.message); + return false; + } + return true; +} + +function updateContact() { + var contact, input = getUserInput(); + + if (input == null) { + return false; + } + + contact = gAddressbook.get(gUpdateId); + + contact.name.firstName = input.firstName; + contact.name.lastName = input.lastName; + contact.name.nicknames[0] = input.nickname; + contact.emails[0] = new tizen.ContactEmailAddress(input.email); + contact.phoneNumbers[0] = new tizen.ContactPhoneNumber(input.phone); + + try { + gAddressbook.update(contact); + } catch (e) { + alert("Error: " + e.message); + return false; + } + return true; +} + +function convertContact() { + var contact, input = getUserInput(); + + if (input == null) { + return; + } + + contact = new tizen.Contact(); + + if (input.firstName && input.firstName != "") { + if (contact.name == null) { + contact.name = new tizen.ContactName(); + } + contact.name.firstName = input.firstName; + } + if (input.lastName && input.lastName != "") { + if (contact.name == null) { + contact.name = new tizen.ContactName(); + } + contact.name.lastName = input.lastName; + } + if (input.nickname && input.nickname != "") { + if (contact.name == null) { + contact.name = new tizen.ContactName(); + } + contact.name.nicknames = [input.nickname]; + } + if (input.email && input.email != "") { + contact.emails = [new tizen.ContactEmailAddress(input.email)]; + } + if (input.phone && input.phone != "") { + contact.phoneNumbers = [new tizen.ContactPhoneNumber(input.phone)]; + } + gVCardStr = contact.convertToString("VCARD_30"); + $.mobile.changePage("#vcard-output"); +} + +function registerListener() { + var listener = { + oncontactsadded : function(contacts) { + alert("Tracking message :
    " + contacts.length + " contact(s) added"); + }, + oncontactsupdated : function(contacts) { + alert("Tracking message :
    " + contacts.length + " contact(s) updated"); + }, + oncontactsremoved : function(contacts) { + alert("Tracking message :
    " + contacts.length + " contact(s) deleted"); + } + }; + + try { + gListenerId = gAddressbook.addChangeListener(listener, onError); + $("#tracking").unbind("vclick", registerListener); + $("#tracking").bind("vclick", unregisterListener); + alert("Tracking started"); + } catch (e) { + alert("Error: " + e.message); + } +} + +function unregisterListener() { + gAddressbook.removeChangeListener(gListenerId); + $("#tracking").unbind("vclick", unregisterListener); + $("#tracking").bind("vclick", registerListener); + alert("Tracking stopped"); +} + +function onAddBatchSuccess(contacts) { + alert("Added successfully"); +} + +function add3Contacts() { + if ($("#batch-contact-name").attr("value") == "") { + alert("Input Name"); + return; + } + + var contactArray = []; + + try { + contactArray[0] = new tizen.Contact({ + name : new tizen.ContactName({firstName : $("#batch-contact-name").attr("value")}) + }); + + contactArray[1] = contactArray[0].clone(); + contactArray[1].name.firstName += " copy 1"; + contactArray[2] = contactArray[0].clone(); + contactArray[2].name.firstName += " copy 2"; + + gAddressbook.addBatch(contactArray, onAddBatchSuccess, onError); + } catch (e) { + alert("Error: " + e.message); + } +} + +function onUpdateBatchSuccess() { + alert("Updated successfully"); +} + +function onUpdate3ContactsFindSuccess(contacts) { + var firstName, contactArray = []; + + for (var i = contacts.length-1, j = 0; i >= 0 && j < 3; i--, j++) { + if (contacts[i].name == null) { + contacts[i].name = new tizen.ContactName({firstName : "updated"}); + } else { + firstName = contacts[i].name.firstName; + contacts[i].name.firstName = firstName ? firstName + " updated" : "updated"; + } + contactArray.push(contacts[i]); + } + + try { + gAddressbook.updateBatch(contactArray, onUpdateBatchSuccess, onError); + } catch (e) { + alert("Error: " + e.message); + } +} + +function update3Contacts() { + gAddressbook.find(onUpdate3ContactsFindSuccess); +} + +function onRemoveBatchSuccess() { + alert("Deleted successfully"); +} + +function onDelete3ContactsFindSuccess(contacts) { + var contactIdArray = []; + + for (var i = contacts.length-1, j = 0; i >= 0 && j < 3; i--, j++) { + contactIdArray.push(contacts[i].id); + } + + try { + gAddressbook.removeBatch(contactIdArray, onRemoveBatchSuccess, onError); + } catch (e) { + alert("Error: " + e.message); + } +} + +function delete3Contacts() { + gAddressbook.find(onDelete3ContactsFindSuccess); +} diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Contact/tizen-app-template.xml b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Contact/tizen-app-template.xml new file mode 100644 index 0000000..fecd4f9 --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Contact/tizen-app-template.xml @@ -0,0 +1,12 @@ + + + Contact + TIZEN + + description.xml + + + + + + diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Contact/tizen_32.png b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Contact/tizen_32.png new file mode 100755 index 0000000..a37c33e Binary files /dev/null and b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Contact/tizen_32.png differ diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Contact/tizen_64.png b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Contact/tizen_64.png new file mode 100755 index 0000000..f80f2ec Binary files /dev/null and b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Contact/tizen_64.png differ diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Contact/tutorial-contact-snapshot.png b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Contact/tutorial-contact-snapshot.png new file mode 100644 index 0000000..6948788 Binary files /dev/null and b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Contact/tutorial-contact-snapshot.png differ diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Filesystem/description.xml b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Filesystem/description.xml new file mode 100644 index 0000000..7643b66 --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Filesystem/description.xml @@ -0,0 +1,10 @@ + + + + Filesystem + 1.0 + tutorial-filesystem-snapshot.png + + A tutorial sample application demonstrating the tizen filesystem device API usage. + + diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Filesystem/description.xsl b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Filesystem/description.xsl new file mode 100755 index 0000000..1f4f57f --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Filesystem/description.xsl @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + +
    + + + +
    + Type: JavaScript +

    + +

    +
    + + + + + +
    + + +
    + +
    diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Filesystem/project/config.xml b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Filesystem/project/config.xml new file mode 100755 index 0000000..eed9cf0 --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Filesystem/project/config.xml @@ -0,0 +1,11 @@ + + + + Filesystem + + + + + + + diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Filesystem/project/css/style.css b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Filesystem/project/css/style.css new file mode 100755 index 0000000..6b24a1a --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Filesystem/project/css/style.css @@ -0,0 +1,10 @@ +li>label { + color:#646464; +} +label.ui-input-text { + width:20%; +} +#file-op ul[data-role=listview] li { + word-wrap:break-word; + white-space:normal; +} \ No newline at end of file diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Filesystem/project/icon.png b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Filesystem/project/icon.png new file mode 100755 index 0000000..b0979b1 Binary files /dev/null and b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Filesystem/project/icon.png differ diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Filesystem/project/index.html b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Filesystem/project/index.html new file mode 100644 index 0000000..cbee570 --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Filesystem/project/index.html @@ -0,0 +1,144 @@ + + + + + + + Filesystem + + + + + + + + + +
    +
    +

    Filesystem

    +
    + +
    +
      +
      + +
      +
      + +
      +
      +
      + +
      +
      +

      Details

      +
      + +
      +
        +
      • + URI + +
      • +
      • + Size + +
      • +
      • + Created + +
      • +
      • + Is a file + +
      • +
      • + Is a directory + +
      • +
      • + Read only + +
      • +
      +
      +
      + +
      +
      +

      File operations

      +
      + +
      +
        +
      • + + +
      • +
      • + + +
      • +
      • + + +
      • +
      • Choose a write file method
      • +
      • + + write +
      • +
      • + + writeBytes +
      • +
      • + + writeBase64 +
      • +
      • URI
      • +
      • +
      • +
      • Output Text
      • +
      • +
      • +
      • Output (read)
      • +
      • +
      • +
      • Output (readBytes)
      • +
      • +
      • +
      • Output (readBase64)
      • +
      • +
      • +
      +
      + +
      +
      + +
      +
      +
      + +
      +
      +

      Storage

      +
      + +
      +
        +
        +
        + + diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Filesystem/project/js/config.js b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Filesystem/project/js/config.js new file mode 100644 index 0000000..441e1a6 --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Filesystem/project/js/config.js @@ -0,0 +1,29 @@ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.tizenopensource.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +//tizen-web-ui-fw configuration +$(document).bind("mobileinit", function() { + $.mobile.loadingMessageTextVisible = false; + $.mobile.defaultPageTransition = "none"; + // Disable context menu + $(document).bind("contextmenu", function(e) { + return false; + }); + // Disable text selection + $(document).delegate("[data-role='page']", "pageinit", function(e) { + $.mobile.tizen.disableSelection($(e.target)); + }); +}); diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Filesystem/project/js/main.js b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Filesystem/project/js/main.js new file mode 100644 index 0000000..45b1d3b --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Filesystem/project/js/main.js @@ -0,0 +1,480 @@ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.tizenopensource.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +var COPY_TARGET_FILE = "to_be_copied.txt", MOVE_TARGET_FILE = "to_be_moved.txt", + gDocumentsDir, gDocumentsSubdir, gFiles, gSubfiles, gIdForDetail, gListenerId; + +$(document).delegate("#main", "pageinit", function() { + $("#main .ui-btn-back").bind("vclick", function() { + try { + tizen.filesystem.removeStorageStateChangeListener(gListenerId); + } catch (exc) { + alert("removeStorageStateChangeListener exc:" + exc.message); + } + tizen.application.exit(); + return false; + }); + + $("#main").bind("pagebeforeshow", showFileList); + + $("#file-list").delegate("li", "vclick", function() { + if ($(this).data("role") == "list-divider") { + return false; + } + gIdForDetail = $(this).data("id"); + $.mobile.changePage("#file-detail"); + return false; + }); + + $("#file-list").delegate("div", "vclick", function() { + deleteFileFromFolder($(this).parent().data("id")); + return false; + }); + + $("#file-copy").bind("vclick", function() { + copyOrMove(COPY_TARGET_FILE); + return false; + }); + $("#file-move").bind("vclick", function() { + copyOrMove(MOVE_TARGET_FILE); + return false; + }); + + try { + gListenerId = tizen.filesystem.addStorageStateChangeListener(function() { + if (storage.state == "MOUNTED") { + alert("Tracking message :
        " + storage.label + " added"); + } else if (storage.state == "REMOVED") { + alert("Tracking message :
        " + storage.label + " removed"); + } + }); + } catch (exc) { + alert("addStorageStateChangeListener exc:" + exc.message); + } + + prepareDirsAndFiles(); +}); + +$(document).delegate("#file-detail", "pageinit", function() { + $("#file-detail").bind("pagebeforeshow", function() { + showFileDetail(); + }); +}); + +$(document).delegate("#file-op", "pageinit", function() { + $("#file-op").bind("pagebeforeshow", function() { + $("#file-op-uri").html(""); + $("#output-text").html(""); + $("#output-read").html(""); + $("#output-read-bytes").html(""); + $("#output-read-base64").html(""); + }); + + $("#file-create").bind("vclick", function() { + createSampleFile(); + return false; + }); + + $("#file-append").bind("vclick", function() { + var filename = $("#file-name").val(); + if (filename == "") { + alert("Input File name"); + return; + } + writeToFile(filename); + return false; + }); + + $("#file-read").bind("vclick", function() { + OutputFileRead(); + return false; + }); +}); + +$(document).delegate("#storage", "pageinit", function() { + $("#storage").bind("pagebeforeshow", function() { + listAvailableStorages(); + }); + + $("#storage-list").delegate("div", "vclick", function() { + showStorageDetail($(this).parent().children("span:first").text()); + return false; + }); +}); + +function onError(err) { + alert("Error: " + err.message); +} + +function resetSubdirAndFiles() { + var tempFound = false, + copiedFound = false, + movedFound = false, + needRenewalCount = 0; + + try { + for (var i = 0; i < gFiles.length; i++) { + if (gFiles[i].name == "temp" && gFiles[i].isDirectory == true) { + console.log("/documents/temp directory found"); + tempFound = true; + needRenewalCount++; + gDocumentsDir.deleteDirectory(gFiles[i].fullPath, true, function() { + console.log("/documents/temp directory deleted. recreate now"); + gDocumentsSubdir = gDocumentsDir.createDirectory("temp"); + if(--needRenewalCount == 0) { + showFileList(); + } + }); + } else if (gFiles[i].name == COPY_TARGET_FILE) { + console.log(gFiles[i].name + " file found"); + copiedFound = true; + needRenewalCount++; + gDocumentsDir.deleteFile(gFiles[i].fullPath, function() { + console.log(COPY_TARGET_FILE + " deleted. recreate now"); + gDocumentsDir.createFile(COPY_TARGET_FILE); + if(--needRenewalCount == 0) { + showFileList(); + } + }); + } else if (gFiles[i].name == MOVE_TARGET_FILE) { + console.log(gFiles[i].name + " file found"); + movedFound = true; + needRenewalCount++; + gDocumentsDir.deleteFile(gFiles[i].fullPath, function() { + console.log(MOVE_TARGET_FILE + " deleted. recreate now"); + gDocumentsDir.createFile(MOVE_TARGET_FILE); + if(--needRenewalCount == 0) { + showFileList(); + } + }); + } + } + if (tempFound == false) { + console.log("/documents/temp create"); + gDocumentsSubdir = gDocumentsDir.createDirectory("temp"); + } + if (copiedFound == false) { + console.log(COPY_TARGET_FILE + " create"); + gDocumentsDir.createFile(COPY_TARGET_FILE); + } + if (movedFound == false) { + console.log(MOVE_TARGET_FILE + " create"); + gDocumentsDir.createFile(MOVE_TARGET_FILE); + } + } catch (exc) { + alert("resetSubdirAndFiles exc: " + exc.message); + } +} + +function prepareDirsAndFiles() { + try { + tizen.filesystem.resolve("documents", function(dir) { + gDocumentsDir = dir; + gDocumentsDir.listFiles(function(files) { + gFiles = files; + resetSubdirAndFiles(); + showFileList(); + }); + }, onError, "rw"); + } catch (exc) { + alert("tizen.filesystem.resolve(\"documents\") exc: " + exc.message); + } +} + +function makeFileList(files, isSubdir) { + var dividerStr, id, $list; + + if (isSubdir) { + gSubfiles = files; + dividerStr = "documents/temp/"; + id = "subdir-"; + $("#file-list>li[data-id^=subdir-]").remove(); + } else { + gFiles = files; + dividerStr = "documents/"; + id = "dir-"; + $("#file-list>li[data-id^=dir-]").remove(); + } + + var str = '
      • ' + dividerStr + '
      • '; + + for (var i = 0; i < files.length; i++) { + if (files[i].isDirectory == false) { + str += '
      • ' + + files[i].name + + '
        Delete
      • '; + } + } + + if (isSubdir) { + $list = $("#file-list").append(str); + } else { + $list = $("#file-list").prepend(str); + } + $list.trigger("create").listview("refresh"); +} + +function showFileList() { + console.log("showFileList"); + + if(gDocumentsDir) { + gDocumentsDir.listFiles(function(files) { + makeFileList(files, false); + }, onError); + } + + if(gDocumentsSubdir) { + gDocumentsSubdir.listFiles(function(files) { + makeFileList(files, true); + }, onError); + } +} + +function copyOrMove(filename) { + var i; + + alert(filename + " will be " + (filename == COPY_TARGET_FILE ? "copied" : "moved") + + " to document/temp/ directory"); + + for (i = 0; i < gFiles.length; i++) { + if (gFiles[i].name == filename) { + break; + } + } + + if (i == gFiles.length) { + alert("No " + filename + " found in documents directory
        Canceled"); + return; + } + + for (i = 0; i < gSubfiles.length; i++) { + if (gSubfiles[i].name == filename) { + alert(filename + " already exists in documents/temp directory
        Canceled"); + return; + } + } + + try { + if(filename == COPY_TARGET_FILE) { + gDocumentsDir.copyTo("documents/" + COPY_TARGET_FILE, "documents/temp/" + COPY_TARGET_FILE, + false, showFileList, onError); + } else { + gDocumentsDir.moveTo("documents/" + MOVE_TARGET_FILE, "documents/temp/" + MOVE_TARGET_FILE, + false, showFileList, onError); + } + } catch (exc) { + alert("copyTo exc: " + exc.message); + } +} + +function deleteFileFromFolder(id) { + var dirAndIndex = id.split("-"), + dir = dirAndIndex[0], + index = Number(dirAndIndex[1]); + + try { + if (dir == "subdir") { + gDocumentsSubdir.deleteFile(gSubfiles[index].fullPath, showFileList, onError); + } else { + gDocumentsDir.deleteFile(gFiles[index].fullPath, showFileList, onError); + } + } catch (exc) { + alert("deleteFile exc: " + exc.message); + } +} + +function showFileDetail() { + var dirAndIndex = gIdForDetail.split("-"), + dir = dirAndIndex[0], + index = Number(dirAndIndex[1]), + files; + + if (dir == "subdir") { + files = gSubfiles; + } else { + files = gFiles; + } + + $("#uri").html(files[index].fullPath); + $("#size").html(files[index].fileSize); + $("#created").html(files[index].created.toLocaleString()); + $("#is-file").html(files[index].isFile ? "Yes" : "No"); + $("#is-dir").html(files[index].isDirectory ? "Yes" : "No"); + $("#read-only").html(files[index].readOnly ? "Yes" : "No"); +} + +function onReadOpenStreamSuccess(fileStream) { + var readPosition = parseInt($("#read-position").val(), 10); + + try { + fileStream.position = readPosition; + $("#output-read").html(fileStream.read(fileStream.bytesAvailable)); + + fileStream.position = readPosition; + var raw = fileStream.readBytes(fileStream.bytesAvailable), + str = ""; + + for(var i = 0; i < raw.length; i++) { + str += raw[i].toString(16) + " "; + } + $("#output-read-bytes").html(str); + + fileStream.position = readPosition; + $("#output-read-base64").html(fileStream.readBase64(fileStream.bytesAvailable)); + } catch (exc) { + alert("File reading exc: " + exc.message); + } + fileStream.close(); +} + +function OutputFileRead() { + var file, filename = $("#file-name").val(); + + if (filename == "") { + alert("Input File name"); + return; + } + + try { + file = gDocumentsDir.resolve(filename); + } catch (exc) { + alert(filename + " resolve failed"); + return; + } + $("#file-op-uri").html(file.toURI()); + + try { + file.readAsText(function(content) { + $("#output-text").html(content); + }); + } catch (exc) { + alert("readAsText exc:" + exc.message); + } + + try { + file.openStream("r", onReadOpenStreamSuccess, onError); + } catch (exc) { + alert("openStream exc:" + exc.message); + } +} + +function onAppendOpenStreamSuccess(fileStream) { + var method = $(":radio[name='write-choice']:checked").val(), + str = $("#text").val(), + writeOK = true; + + if (method == "write") { + try { + fileStream.write(str); + } catch (exc) { + alert("FileStream.write exc: " + exc.message); + writeOK = false; + } + } else if (method == "writeBytes") { + var raw = []; + for (var i = 0; i < str.length; i++) { + raw[i] = str.charCodeAt(i); + } + try { + fileStream.writeBytes(raw); + } catch (exc) { + alert("FileStream.writeBytes exc: " + exc.message); + writeOK = false; + } + } else if (method == "writeBase64") { + try { + fileStream.writeBase64(str); + } catch (exc) { + alert("FileStream.writeBase64 exc: " + + exc.message + + "

        How about trying this input text
        \"aGVsbG8=\""); + writeOK = false; + } + } + + if(writeOK) { + alert("Done successfully"); + } + + fileStream.close(); +} + +function writeToFile(filename) { + var file; + + try { + file = gDocumentsDir.resolve(filename); + } catch (exc) { + alert(filename + "resolve failed"); + return; + } + + try { + file.openStream("a", onAppendOpenStreamSuccess); + } catch (exc) { + alert("openStream failed: " + exc.message); + } +} + +function createSampleFile() { + var filename = $("#file-name").val(); + + if (filename == "") { + alert("Input File name"); + return; + } + + try { + gDocumentsDir.createFile(filename); + writeToFile(filename); + } catch (exc) { + alert(filename + " already exists"); + } +} + +function onListStoragesSuccess(storages) { + var str = ""; + + for (var i = 0; i < storages.length; i++) { + str += '
      • ' + + storages[i].label + + '
        Show details
      • '; + } + + $("#storage-list").html(str).trigger("create").listview("refresh"); +} + +function listAvailableStorages() { + try { + tizen.filesystem.listStorages(onListStoragesSuccess, onError); + } catch (exc) { + alert("listStorages exc: " + exc.message); + } +} + +function onGetStorageSuccess(storage) { + alert("Type: " + storage.type + "
        State: " + storage.state); +} + +function showStorageDetail(label) { + try { + tizen.filesystem.getStorage(label, onGetStorageSuccess, onError); + } catch (exc) { + alert("showStorageInfo() exception: " + exc.message); + } +} \ No newline at end of file diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Filesystem/tizen-app-template.xml b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Filesystem/tizen-app-template.xml new file mode 100644 index 0000000..ee91c06 --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Filesystem/tizen-app-template.xml @@ -0,0 +1,12 @@ + + + Filesystem + TIZEN + + description.xml + + + + + + diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Filesystem/tizen_32.png b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Filesystem/tizen_32.png new file mode 100755 index 0000000..a37c33e Binary files /dev/null and b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Filesystem/tizen_32.png differ diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Filesystem/tizen_64.png b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Filesystem/tizen_64.png new file mode 100755 index 0000000..f80f2ec Binary files /dev/null and b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Filesystem/tizen_64.png differ diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Filesystem/tutorial-filesystem-snapshot.png b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Filesystem/tutorial-filesystem-snapshot.png new file mode 100644 index 0000000..d9e82e7 Binary files /dev/null and b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Filesystem/tutorial-filesystem-snapshot.png differ diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Geocoder/description.xml b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Geocoder/description.xml new file mode 100644 index 0000000..fa6e6f2 --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Geocoder/description.xml @@ -0,0 +1,10 @@ + + + + Geocoder + 1.0 + tutorial-geocoder-snapshot.png + + A tutorial sample application demonstrating the tizen geocoder device API usage. + + diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Geocoder/description.xsl b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Geocoder/description.xsl new file mode 100755 index 0000000..1f4f57f --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Geocoder/description.xsl @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + +
        + + + +
        + Type: JavaScript +

        + +

        +
        + + + + + +
        + + +
        + +
        diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Geocoder/project/config.xml b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Geocoder/project/config.xml new file mode 100755 index 0000000..a539937 --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Geocoder/project/config.xml @@ -0,0 +1,15 @@ + + + + Geocoder + + + + + + + + + + + diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Geocoder/project/css/style.css b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Geocoder/project/css/style.css new file mode 100755 index 0000000..6a7ec97 --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Geocoder/project/css/style.css @@ -0,0 +1,10 @@ +li>label { + color:#646464; +} +label.ui-input-text { + width:20%; +} +#json-output, #json-output-ff { + word-wrap:break-word; + white-space:normal; +} \ No newline at end of file diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Geocoder/project/icon.png b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Geocoder/project/icon.png new file mode 100755 index 0000000..b0979b1 Binary files /dev/null and b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Geocoder/project/icon.png differ diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Geocoder/project/index.html b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Geocoder/project/index.html new file mode 100644 index 0000000..6d94483 --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Geocoder/project/index.html @@ -0,0 +1,221 @@ + + + + + + + Geocoder + + + + + + + + + +
        +
        +

        Geocoder

        +
        +
        +
          +
        • Operation
        • +
        • Position to address
        • +
        • Address to position
        • +
        • Free-formed address to position
        • +
        • Provider
        • +
        +
        + +
        +
        + +
        +
        +
        + +
        +
        +

        Position to address

        +
        + +
        +
          +
        • Position
        • +
        • + + +
        • +
        • + + +
        • +
        • Address
        • +
        • + Country + +
        • +
        • + Region + +
        • +
        • + County + +
        • +
        • + City + +
        • +
        • + Street + +
        • +
        • + Premises + +
        • +
        • + Postal code + +
        • +
        +
        + + +
        + +
        +
        +

        Address to position

        +
        + +
        +
          +
        • Address
        • +
        • + + +
        • +
        • + + +
        • +
        • + + +
        • +
        • Position
        • +
        • + Latitude + +
        • +
        • + Longitude + +
        • +
        • GeoJSON
        • +
        • Position as GeoJSON representation
        • +
        +
        + + +
        + +
        +
        +

        Free-formed addr. to pos.

        +
        + +
        +
          +
        • Free-formed Address
        • +
        • + +
        • +
        • Position
        • +
        • + Latitude + +
        • +
        • + Longitude + +
        • +
        • GeoJSON
        • +
        • Position as GeoJSON representation
        • +
        +
        + + +
        + +
        +
        +

        Provider

        +
        + +
        +
          +
        • + Name + +
        • +
        • + Attribution + +
        • +
        • + Connectivity + +
        • +
        +
        +
        + +
        +
        +

        Account

        +
        +
        +
        + + +
        +
        + + +
        +
        + +
        +
        + +
        +
        +
        + + diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Geocoder/project/js/config.js b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Geocoder/project/js/config.js new file mode 100644 index 0000000..441e1a6 --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Geocoder/project/js/config.js @@ -0,0 +1,29 @@ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.tizenopensource.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +//tizen-web-ui-fw configuration +$(document).bind("mobileinit", function() { + $.mobile.loadingMessageTextVisible = false; + $.mobile.defaultPageTransition = "none"; + // Disable context menu + $(document).bind("contextmenu", function(e) { + return false; + }); + // Disable text selection + $(document).delegate("[data-role='page']", "pageinit", function(e) { + $.mobile.tizen.disableSelection($(e.target)); + }); +}); diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Geocoder/project/js/main.js b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Geocoder/project/js/main.js new file mode 100644 index 0000000..8ba67cb --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Geocoder/project/js/main.js @@ -0,0 +1,208 @@ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.tizenopensource.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +var gProvider, gProviderArray, gProviderId; +var gOptionAccount = { + ID : "", + PASSWORD : "" +}; + +$(document).delegate("#main", "pageinit", function() { + $("#main .ui-btn-back").bind("vclick", function() { + tizen.application.exit(); + return false; + }); + $("#pos2addr").bind("vclick", function() { + $.mobile.changePage("#pos-to-addr"); + return false; + }); + $("#addr2pos").bind("vclick", function() { + $.mobile.changePage("#addr-to-pos"); + return false; + }); + $("#ff-addr2pos").bind("vclick", function() { + $.mobile.changePage("#freeform-addr-to-pos"); + return false; + }); + $("#list").delegate("input", "change", function() { + if ($(this).prop("checked")) { + gProvider = gProviderArray[Number($(this).data("id"))]; + } + return false; + }); + $("#list").delegate("li", "vclick", function() { + gProviderId = Number($(this).data("id")); + if (gProviderId != null) { + $.mobile.changePage("#provider"); + } + return false; + }); + + initProviderList(); +}); + +$(document).delegate("#pos-to-addr", "pageinit", function() { + $("#pos-to-addr-convert").bind("vclick", function() { + positionToAddress(); + return false; + }); +}); + +$(document).delegate("#addr-to-pos", "pageinit", function() { + $("#addr-to-pos-convert").bind("vclick", function() { + structuredAddressToPosition(); + return false; + }); +}); + +$(document).delegate("#freeform-addr-to-pos", "pageinit", function() { + $("#ff-addr-to-pos-convert").bind("vclick", function() { + formattedAddressToPosition(); + return false; + }); +}); + +$(document).delegate("#provider", "pagebeforeshow", function() { + $("#provider-name").text(gProviderArray[gProviderId].name); + $("#provider-attribution").text(gProviderArray[gProviderId].attribution); + $("#provider-connectivity").text(gProviderArray[gProviderId].connectivity); +}); + +$(document).delegate("#account", "pageinit", function() { + $("#account").bind("pagebeforeshow", function() { + $("#id").val(gOptionAccount.ID); + $("#password").val(gOptionAccount.PASSWORD); + }); + + $("#ok").bind("vclick", function() { + gOptionAccount.ID = $("#id").val(); + gOptionAccount.PASSWORD = $("#password").val(); + gProvider.setOptions(gOptionAccount, function(response) { + alert("Account set successfully"); + }, function(err) { + alert("Account set failed: " + err.message); + }); + window.history.back(); + return false; + }); +}); + +function initProviderList() { + var len, i, str = ''; + + gProviderArray = tizen.lbs.geocoder.getProviders(); + len = gProviderArray.length; + + for (i = 0; i < len; i++) { + str += '
      • ' + + gProviderArray[i].name + + '
      • '; + } + + $("#list").append(str).trigger("create").listview("refresh"); + + if (len > 0) { + var defaultProvider = tizen.lbs.geocoder.getDefaultProvider(); + + for (i = 0; i < len; i++) { + if (gProviderArray[i].name == defaultProvider.name) { + break; + } + } + if (i == len) { + alert("Default provider not found"); + i = 0; + } + gProvider = gProviderArray[i]; + $("#provider-" + i).prop("checked", true); + $("#provider-" + i).checkboxradio("refresh"); + } +} + +function onError(e) { + alert("Error: " + e.message + "
        Check the account setting and network availability"); +} + +function onReverseGeocodeSuccess(results) { + var address = results[0]; + + $("#country-output").text(address.country); + $("#region-output").text(address.region); + $("#county-output").text(address.county); + $("#city-output").text(address.city); + $("#street-output").text(address.street); + $("#premises-output").text(address.premises); + $("#postal-code-output").text(address.postalCode); +} + +function positionToAddress() { + var lat = parseFloat($("#latitude").attr("value")), + lon = parseFloat($("#longitude").attr("value")), + coordinates = new tizen.SimpleCoordinates(lat, lon), + options = {resultType : "STRUCTURED"}; + + try { + gProvider.reverseGeocode(coordinates, onReverseGeocodeSuccess, onError, options); + } catch (exc) { + alert("reverseGeocode() exception:" + exc.message); + } +} + +function onGeocodeStructuredAddressSuccess(results) { + var pos = results[0].coordinates, + json = results[0].toGeoJSON(); + + $("#latitude-output").text(pos.latitude); + $("#longitude-output").text(pos.longitude); + $("#json-output").text(json); +} + +function structuredAddressToPosition() { + var address = { + country : $("#country").attr("value"), + city : $("#city").attr("value"), + street : $("#street").attr("value") + }; + + try { + gProvider.geocode(address, onGeocodeStructuredAddressSuccess, onError); + } catch (exc) { + alert("structuredAddressToPosition(), geocode() exception:" + exc.message); + } +} + +function onGeocodeFormattedAddressSuccess(results) { + var pos = results[0].coordinates; + var json = results[0].toGeoJSON(); + + $("#latitude-output-ff").text(pos.latitude); + $("#longitude-output-ff").text(pos.longitude); + $("#json-output-ff").text(json); +} + +function formattedAddressToPosition() { + var address = $("#freeform-address").attr("value"); + + try { + gProvider.geocode(address, onGeocodeFormattedAddressSuccess, onError); + } catch (exc) { + alert("formattedAddressToPosition(), geocode() exception:" + exc.message); + } +} diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Geocoder/tizen-app-template.xml b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Geocoder/tizen-app-template.xml new file mode 100644 index 0000000..32b0fa7 --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Geocoder/tizen-app-template.xml @@ -0,0 +1,12 @@ + + + Geocoder + TIZEN + + description.xml + + + + + + diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Geocoder/tizen_32.png b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Geocoder/tizen_32.png new file mode 100755 index 0000000..a37c33e Binary files /dev/null and b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Geocoder/tizen_32.png differ diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Geocoder/tizen_64.png b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Geocoder/tizen_64.png new file mode 100755 index 0000000..f80f2ec Binary files /dev/null and b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Geocoder/tizen_64.png differ diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Geocoder/tutorial-geocoder-snapshot.png b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Geocoder/tutorial-geocoder-snapshot.png new file mode 100644 index 0000000..9bf62bd Binary files /dev/null and b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Geocoder/tutorial-geocoder-snapshot.png differ diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/description.xml b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/description.xml new file mode 100644 index 0000000..e84860a --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/description.xml @@ -0,0 +1,10 @@ + + + + Kitchen Sink + 1.0 + kitchen-sink.png + + A tutorial sample application demonstrating "some" of the Tizen APIs. It's an introduction to the framework by providing the live source of each demo. + + diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/description.xsl b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/description.xsl new file mode 100755 index 0000000..1f4f57f --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/description.xsl @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + +
        + + + +
        + Type: JavaScript +

        + +

        +
        + + + + + +
        + + +
        + +
        diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/kitchen-sink.png b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/kitchen-sink.png new file mode 100644 index 0000000..0caa1c5 Binary files /dev/null and b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/kitchen-sink.png differ diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/project/alarm.html b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/project/alarm.html new file mode 100644 index 0000000..9e104df --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/project/alarm.html @@ -0,0 +1,91 @@ + + + + + + Tizen API Demos + + + + + + + + + +
        +
        +

        Kitchen Sink

        + Home + Exit +
        + +
        +
        +

        Alarm

        +

        API that provides functionality for setting and unsetting alarms.

        + +
          +
        • add +

          Create relative alarm and add an alarm

          + Demo +
          + Run Code +
          +	var alarm = new tizen.AlarmRelative(5); 
          +	tizen.alarm.add(alarm, "com.samsung.browser"); 
          +	alert("Alarm added with id: " + alarm.id + "\n" + 
          +	"browser application will be launched after 5 seconds");
          +	// remove all alarm
          +	tizen.alarm.removeAll();
          +
          +
          + +
        • getAll +

          Returns the alarms in the storage.

          + Demo +
          + Run Code +
          +var alarm = new tizen.AlarmRelative(5); 
          +tizen.alarm.add(alarm, "com.samsung.browser");
          +var alarms = tizen.alarm.getAll();
          +alert(alarms.length + " alarms present in the storage."); 
          +// remove all alarm
          +tizen.alarm.removeAll();
          +
          +
          + +
        • remove +

          Removes an alarm from the storage.

          + Demo +
          + Run Code +
          +var alarm = new tizen.AlarmRelative(5);
          +tizen.alarm.add(alarm, "com.samsung.browser");
          +var alarms = tizen.alarm.getAll();
          +if (alarms.length > 0) { 
          +	tizen.alarm.remove(alarms[0].id);
          +	alert("Successfully removed the first alarm."); 
          +}
          +
          +
          +
        +
        + +
        +
        +

        API Demos

        +
          +
        +
        +
        +
        + + +
        + + diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/project/application.html b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/project/application.html new file mode 100644 index 0000000..1b4e08f --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/project/application.html @@ -0,0 +1,104 @@ + + + + + + Tizen API Demos + + + + + + + + + +
        +
        +

        Kitchen Sink

        + Home + Exit +
        + +
        +
        +

        Application

        +

        API that manages application states, lifecycle, management and service launching.

        + +
          +
        • getAppsInfo +

          Gets the list of installed applications.

          + Demo +
          + Run Code +
          +function appInfoSuccessCB(appInfoArray) {
          +    for(var num=0; num < appInfoArray.length; num++)
          +    {
          +        alert("installed Application ["+num+"]\n" +
          +            "name = "+appInfoArray[num].name + "\n" +
          +            "version = "+appInfoArray[num].version);
          +    }
          +}
          + 
          +tizen.application.getAppsInfo(
          +    appInfoSuccessCB, 
          +    function(e) {
          +        alert ("getAppsInfo failed. reason : " + e.message);
          +    } );
          +
          +
          + +
        • getAppsContext +

          Gets the list of running applications.

          + Demo +
          + Run Code +
          +function appContextSuccessCB(appContextArray) {
          +    for(var num=0; num < appContextArray.length; num++)
          +    {
          +        alert("Running Application ["+num+"]\n" +
          +            "contextId = "+appContextArray[num].id + "\n" +
          +            "appId = "+appContextArray[num].appId);
          +    }
          +}
          + 
          +tizen.application.getAppsContext(
          +    appContextSuccessCB, 
          +    function(e) {
          +        alert ("getAppsContext failed. reason : " + e.message);
          +    } );
          +
          +
          + +
        • getAppInfo +

          Gets the appliction information based on the application id.

          + Demo +
          + Run Code +
          +var appInfo = tizen.application.getAppInfo("org.tizen.browser");
          +alert("browser application\n" +
          +    "icon: " + appInfo.iconPath + "\n" +
          +    "version: " + appInfo.version);
          +
          +
          +
        +
        + +
        +
        +

        API Demos

        +
          +
        +
        +
        +
        + + +
        + + diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/project/calendar.html b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/project/calendar.html new file mode 100644 index 0000000..b8f7833 --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/project/calendar.html @@ -0,0 +1,88 @@ + + + + + + Tizen API Demos + + + + + + + + + +
        +
        +

        Kitchen Sink

        + Home + Exit +
        + +
        +
        +

        Calendar

        +

        API that enables the management of calendar information.

        + +
          +
        • getDefaultCalendar +

          Gets the default calendar, which should be used for new items.

          + add +

          Adds an item to the calendar synchronously.

          + update +

          Updates an existing item in the calendar synchronously.

          + Demo +
          + Run Code +
          +   // Define the error callback for all the asynchronous calls
          +   function errorCallback(response) {
          +     alert( 'The following error occurred: ' +  response.message);
          +   }
          +
          +  function eventFoundCB(events) {
          +    // The event has been successfully found
          +    // Let's try to change the summary
          +    events[0].summary = 'HTML6 Webinar'; 
          +    myCalendar.update(events[0]);
          +    alert('Today\'s first event was updated.\n' +
          +      'Check Calendar! (Summary: ' + events[0].summary + ')');
          +   }
          +
          +   // Get a list of available calendars.
          +   myCalendar = tizen.calendar.getDefaultCalendar("EVENT");   
          +
          +   var ev = new tizen.CalendarEvent({description:'HTML5 Introduction',
          +                  summary:'HTML5 Webinar ', 
          +                  startDate: tizen.time.getCurrentDateTime(), 
          +                  duration: new tizen.TimeDuration(1, "HOURS"),
          +                  location:'Huesca'});
          +
          +   myCalendar.add(ev);
          +
          +   // The event has been added
          +   // Let's try to check if we can retrieve the added event from the calendar 
          +   // If the calendar was empty only the item added through add should
          +   // be returned
          +   myCalendar.find(eventFoundCB, errorCallback);
          +
          +
          +
        +
        + +
        +
        +

        API Demos

        +
          +
        +
        +
        +
        + + +
        + + diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/project/call.html b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/project/call.html new file mode 100644 index 0000000..f36b2f2 --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/project/call.html @@ -0,0 +1,118 @@ + + + + + + Tizen API Demos + + + + + + + + + +
        +
        +

        Kitchen Sink

        + Home + Exit +
        + +
        +
        +

        Call

        +

        API that enables the management of call history information.

        + +
          +
        • isCallInProgress +

          Fetch call history items.

          + Demo +
          + Run Code +
          +var status = tizen.call.isCallInProgress();
          +alert("call status :" + status);        
          +
          +
          + +
        • find +

          Fetch call history items.

          + Demo +
          + Run Code +
          +// Define success callback
          +function onSuccess(results) {
          + 	alert(results.length + " call history item(s) found!");        
          +}
          +
          +// Define error callback
          +function onError(error) {
          +	alert("Query failed " + error.code);
          +}
          +
          +// Define filter: list CS calls, most recent first
          +var filter = new tizen.AttributeFilter("callType", "EXACTLY", "tizen.tel");
          +
          +// Define sort mode: descending on call start time.
          +var sortMode = new tizen.SortMode("startTime", "DESC");
          +
          +// Make the query and wire up the callbacks
          +tizen.call.history.find(onSuccess, onError, filter, sortMode);
          +
          +
          + +
        • addListener/removeListener +

          Register/Unregister a callback for observing CallHistory changes.

          + Demo +
          + Run Code +
          +var onListenerCB = {
          +	onadded: function(newItems) {
          +		alert("New Item added");
          +		for (var i in newItems) {
          +			alert("Item " + i + " startTime: " + newItems[i].startTime);
          +		}
          +	},
          +	onchanged: function(changedItems) {
          +		alert("Items changed");
          +		for (var i in changedItems) {
          +			alert("Item " + i + " direction: " + changedItems[i].direction);
          +		}
          +	}};
          +
          +try {
          +	// register a call history callback
          +	var handle = tizen.call.history.addListener(onListenerCB);
          +
          +	alert("register listener handle : " + handle);
          +
          +	// unregister a previously registered listener
          +	tizen.call.history.removeListener(handle);
          +	alert("Success unregister listener");
          +} catch (err) {
          +	consloe.log("Exception - name: " + err.code + " message: " + err.message);
          +}
          +
          +
          +
        +
        + +
        +
        +

        API Demos

        +
          +
        +
        +
        +
        + + +
        + + diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/project/config.xml b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/project/config.xml new file mode 100644 index 0000000..24f3d10 --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/project/config.xml @@ -0,0 +1,33 @@ + + + KitchenSink + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/project/contact.html b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/project/contact.html new file mode 100644 index 0000000..c3cf79a --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/project/contact.html @@ -0,0 +1,94 @@ + + + + + + Tizen API Demos + + + + + + + + + +
        +
        +

        Kitchen Sink

        + Home + Exit +
        + +
        +
        +

        Contact

        +

        API that enables the management of contact information.

        + +
          +
        • getDefaultAddressBook +

          Gets default address book.

          + add +

          Adds a contact to the address book synchronously.

          + update +

          Updates a contact in the address book synchronously.

          + Demo +
          + Run Code +
          +  var myAddressbook;
          +
          +  // Define the error callback for all the asynchronous calls
          +  function errorCallback(response) {
          +    alert( 'The following error occurred: ' +  response.message);
          +  }
          +
          +  function contactsFoundCB(contacts) {
          +    // The contact has been successfully found
          +    // Let's try to change the first name
          +    contacts[0].name.firstName = 'Lee';
          +    myAddressbook.update(contacts[0]);
          +    alert('First contact was updated.\n' +
          +      'Check Contacts! (Name: ' + contacts[0].name.firstName + ')');
          +  }
          +
          +  // Get default address book.
          +  myAddressbook = tizen.contact.getDefaultAddressBook();
          +
          +  // Add a new contact
          +  var contact = new tizen.Contact( {
          +                  name: new tizen.ContactName ( {
          +                       firstName:'Jeffrey',
          +                       lastName:'Hyman',
          +                       nicknames:['joey ramone'] } ),
          +                  emails:[ new tizen.ContactEmailAddress('user@domain.com')],
          +                  phoneNumbers:[ new tizen.ContactPhoneNumber('12345678') ] } );
          +
          +  myAddressbook.add(contact);
          +
          +  // The contact has been successfully added
          +  // Let's try to check if we can retrieve the added
          +  // contact from the address book. If the address book
          +  // was empty only the item added through saveContact should
          +  // be returned
          +  myAddressbook.find(contactsFoundCB, errorCallback);
          +
          +
          +
        +
        + +
        +
        +

        API Demos

        +
          +
        +
        +
        +
        + + +
        + + diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/project/createPackage.sh b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/project/createPackage.sh new file mode 100755 index 0000000..cd8b4d7 --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/project/createPackage.sh @@ -0,0 +1,41 @@ +#!/bin/sh + +# wrt-plugins +# +# Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. +# +# Contact: Seung Mo Cho +# +# This library is free software; you can redistribute it and/or modify it under +# the terms of the GNU Lesser General Public License as published by the +# Free Software Foundation; either version 2.1 of the License, or (at your +# option) any later version. +# +# This library is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +# License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this library; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# + +test_dir=./ + +cd $test_dir +rm -f kitchenSink.wgt + +# remove vim template files +rm -f `find . -name ".*.swp"` +rm -f `find . -name "*~"` + +#cp wac2_0Config.xml config.xml +zip kitchenSink.wgt -r \ + css \ + js \ + config.xml \ + signature1.xml \ + icon.png \ + *.html + diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/project/css/demo.css b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/project/css/demo.css new file mode 100644 index 0000000..2cbb73f --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/project/css/demo.css @@ -0,0 +1,34 @@ +li { + margin: .8em; +} +.desc { + font-size:.8em; + font-style:italic; + margin:4px; +} +pre { + border: 1px solid #888; + border-radius:2px 2px 2px 2px; + margin:0; + overflow:auto; + padding:10px; + font-size:1.0em; +} +.examplecode a { + font-size:.8em; +} +.heading:before { + content:""; +} +.heading { + font-size:.9em; + color:#C93213; + padding:2px; + margin:4px; + font-weight:bold; + cursor:hand; + border:1px solid; +} +.content { + margin:4px; +} diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/project/css/images/ajax-loader.png b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/project/css/images/ajax-loader.png new file mode 100644 index 0000000..0973ae0 Binary files /dev/null and b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/project/css/images/ajax-loader.png differ diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/project/css/images/icons-18-black.png b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/project/css/images/icons-18-black.png new file mode 100644 index 0000000..7739286 Binary files /dev/null and b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/project/css/images/icons-18-black.png differ diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/project/css/images/icons-18-white.png b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/project/css/images/icons-18-white.png new file mode 100644 index 0000000..f4e6787 Binary files /dev/null and b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/project/css/images/icons-18-white.png differ diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/project/css/images/icons-36-black.png b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/project/css/images/icons-36-black.png new file mode 100644 index 0000000..7469906 Binary files /dev/null and b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/project/css/images/icons-36-black.png differ diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/project/css/images/icons-36-white.png b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/project/css/images/icons-36-white.png new file mode 100644 index 0000000..3f342cc Binary files /dev/null and b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/project/css/images/icons-36-white.png differ diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/project/css/jqm-docs.css b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/project/css/jqm-docs.css new file mode 100644 index 0000000..21afed2 --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/project/css/jqm-docs.css @@ -0,0 +1,343 @@ +/* jqm docs css + +Beware: lots of last-minute CSS going on in here +cobblers, shoes, +*/ + +body { background: #dddddd; } +.ui-mobile .type-home .ui-content { margin: 0; background: #e5e5e5 url(../images/jqm-sitebg.png) top center repeat-x; } +.ui-mobile #jqm-homeheader { padding: 40px 10px 0; text-align: center; margin: 0 auto; } +.ui-mobile #jqm-homeheader h1 { margin: 0 0 ; } +.ui-mobile #jqm-homeheader p { margin: .3em 0 0; line-height: 1.3; font-size: .9em; font-weight: bold; color: #666; } +.ui-mobile #jqm-version { text-indent: -99999px; background: url(../images/version.png) top right no-repeat; width: 119px; height: 122px; overflow: hidden; position: absolute; z-index: 50; top: -11px; right: 0; } +.ui-mobile .jqm-themeswitcher { margin: 10px 25px 10px 10px; } + +h2 { margin:1.2em 0 .4em 0; } +p code { font-size:1.2em; font-weight:bold; } + +dt { font-weight: bold; margin: 2em 0 .5em; } +dt code, dd code { font-size:1.3em; line-height:150%; } +pre { white-space: pre; white-space: pre-wrap; word-wrap: break-word; } + +#jqm-homeheader img { width: 235px; } +img { max-width: 100%; } + +.ui-header .jqm-home { top:0.65em; } +nav { margin: 0; } + +p.intro { + font-size: .96em; + line-height: 1.3; + border-top: 1px solid #75ae18; + border-bottom: 0; + background: none; + margin: 1.5em 0; + padding: 1.5em 15px 0; + +} +p.intro strong { + color: #558e08; +} +.footer-docs { + padding: 5px 0; +} +.footer-docs p { + float: left; + margin-left:15px; + font-weight: normal; + font-size: .9em; +} + +.type-interior .content-secondary { + border-right: 0; + border-left: 0; + margin: 10px -15px 0; + background: #fff; + border-top: 1px solid #ccc; +} +.type-home .ui-content { + margin-top: 5px; +} +.type-interior .ui-content { + padding-bottom: 0; +} +.content-secondary .ui-collapsible { + padding: 0 15px 10px; + +} +.content-secondary .ui-collapsible-content { + padding: 0 0 6px; + background: none; + border-bottom: 1px solid #ccc; +} +.content-secondary .ui-listview { + margin: 0; +} +/* new API additions */ + +dt { + margin: 35px 0 15px 0; + background-color:#ddd; + font-weight:normal; +} +dt code { + display:inline-block; + font-weight:bold; + color:#56A00E; + padding:3px 7px; + margin-right:10px; + background-color:#fff; +} +dd { + margin-bottom:10px; +} +dd .default { font-weight:bold; } +dd pre { + margin:0 0 0 0; +} +dd code { font-weight: normal; } +dd pre code { + margin:0; + border:none; + font-weight:normal; + font-size:100%; + background-color:transparent; +} +dd h4 { margin:15px 0 0 0; } + +.localnav { + margin:0 0 20px 0; + overflow:hidden; +} +.localnav li { + float:left; +} +.localnav .ui-btn-inner { + padding: .6em 10px; + font-size:80%; +} + + +/* F bar theme - just for the docs overview headers */ +.ui-bar-f { + border-top: 1px solid #56A00E; + border-bottom: 1px solid #56A00E; + background: #74b042; + color: #fff; + font-weight: bold; + text-shadow: 0 -1px 1px #234403; + background-image: -webkit-gradient(linear, left top, left bottom, from(#74b042), to(#56A00E)); /* Saf4+, Chrome */ + background-image: -webkit-linear-gradient(#74b042, #56A00E); /* Chrome 10+, Saf5.1+ */ + background-image: -moz-linear-gradient(#74b042, #56A00E); /* FF3.6 */ + background-image: -ms-linear-gradient(#74b042, #56A00E); /* IE10 */ + background-image: -o-linear-gradient(#74b042, #56A00E); /* Opera 11.10+ */ + background-image: linear-gradient(#74b042, #56A00E); +} +.ui-bar-f, +.ui-bar-f .ui-link-inherit { + color: #fff; +} +.ui-bar-f .ui-link { + color: #fff; + font-weight: bold; +} +.ui-btn-up-f { + border: 1px solid #3B6F07; + background: #56A00E; + font-weight: bold; + color: #fff; + text-shadow: 0 -1px 1px #234403; + background-image: -webkit-gradient(linear, left top, left bottom, from(#74b042), to(#56A00E)); /* Saf4+, Chrome */ + background-image: -webkit-linear-gradient(#74b042, #56A00E); /* Chrome 10+, Saf5.1+ */ + background-image: -moz-linear-gradient(#74b042, #56A00E); /* FF3.6 */ + background-image: -ms-linear-gradient(#74b042, #56A00E); /* IE10 */ + background-image: -o-linear-gradient(#74b042, #56A00E); /* Opera 11.10+ */ + background-image: linear-gradient(#74b042, #56A00E); +} +.ui-btn-up-f a.ui-link-inherit { + color: #fff; +} +.ui-btn-hover-f { + border: 1px solid #3B6F07; + background: #6EBC1F; + font-weight: bold; + color: #fff; + text-shadow: 0 -1px 1px #234403; + background-image: -webkit-gradient(linear, left top, left bottom, from(#8FC963), to(#6EBC1F)); /* Saf4+, Chrome */ + background-image: -webkit-linear-gradient(#8FC963, #6EBC1F); /* Chrome 10+, Saf5.1+ */ + background-image: -moz-linear-gradient(#8FC963, #6EBC1F); /* FF3.6 */ + background-image: -ms-linear-gradient(#8FC963, #6EBC1F); /* IE10 */ + background-image: -o-linear-gradient(#8FC963, #6EBC1F); /* Opera 11.10+ */ + background-image: linear-gradient(#8FC963, #6EBC1F); +} +.ui-btn-hover-f a.ui-link-inherit { + color: #fff; +} +.ui-btn-down-f { + border: 1px solid #3B6F07; + background: #3d3d3d; + font-weight: bold; + color: #fff; + text-shadow: 0 -1px 1px #234403; + background-image: -webkit-gradient(linear, left top, left bottom, from(#56A00E), to(#64A234)); /* Saf4+, Chrome */ + background-image: -webkit-linear-gradient(#56A00E, #64A234); /* Chrome 10+, Saf5.1+ */ + background-image: -moz-linear-gradient(#56A00E, #64A234); /* FF3.6 */ + background-image: -ms-linear-gradient(#56A00E, #64A234); /* IE10 */ + background-image: -o-linear-gradient(#56A00E, #64A234); /* Opera 11.10+ */ + background-image: linear-gradient(#56A00E, #64A234); +} +.ui-btn-down-f a.ui-link-inherit { + color: #fff; +} +.ui-btn-up-f, +.ui-btn-hover-f, +.ui-btn-down-f { + font-family: Helvetica, Arial, sans-serif; + text-decoration: none; +} + + + + +/* docs site layout */ + +@media all and (min-width: 650px){ + + .jqm-home { + position: absolute; + left: 10px; + top: 0; + } + .type-home .ui-content { + margin-top: 5px; + } + .ui-mobile #jqm-homeheader { + max-width: 340px; + } + .ui-mobile .jqm-themeswitcher { + float: right; + } + p.intro { + margin: 2em 0; + } + .type-home .ui-content, + .type-interior .ui-content { + padding: 0; + background: url(../images/px-ccc.gif) 50% 0 repeat-y; + } + .type-interior .ui-content { + background-position: 45%; + overflow: hidden; + } + .content-secondary { + text-align: left; + float: left; + width: 45%; + background: none; + } + .content-secondary, + .type-interior .content-secondary { + margin: 30px 0 20px 2%; + padding: 20px 4% 0 0; + background: none; + border-top: none; + } + .type-index .content-secondary { + padding: 0; + } + .content-secondary .ui-collapsible { + margin: 0; + padding: 0; + } + .content-secondary .ui-collapsible-content { + border: none; + } + .type-index .content-secondary .ui-listview { + margin: 0; + } + + .ui-mobile #jqm-homeheader { + padding: 0; + } + .content-primary { + width: 45%; + float: right; + margin-top: 30px; + margin-right: 1%; + padding-right: 1%; + } + .content-primary ul:first-child { + margin-top: 0; + } + .content-secondary h2 { + position: absolute; + left: -9999px; + } + .type-interior .content-primary { + padding: 1.5em 6% 3em 0; + margin: 0; + } + /* fix up the collapsibles - expanded on desktop */ + .content-secondary .ui-collapsible-heading { + display: none; + } + .content-secondary .ui-collapsible-contain { + margin:0; + } + .content-secondary .ui-collapsible-content { + display: block; + margin: 0; + padding: 0; + } + .type-interior .content-secondary .ui-li-divider { + padding-top: 1em; + padding-bottom: 1em; + } + .type-interior .content-secondary { + margin: 0; + padding: 0; + } + +} +@media all and (min-width: 750px){ + .type-home .ui-content, + .type-interior .ui-content { + background-position: 39%; + } + .content-secondary { + width: 34%; + } + .content-primary { + width: 56%; + padding-right: 1%; + } + .type-interior .ui-content { + background-position: 34%; + } +} + +@media all and (min-width: 1200px){ + .type-home .ui-content{ + background-position: 38.5%; + } + .type-interior .ui-content { + background-position: 30%; + } + .content-secondary { + width: 30%; + padding-right:6%; + margin: 30px 0 20px 5%; + } + .type-interior .content-secondary { + margin: 0; + padding: 0; + } + .content-primary { + width: 50%; + margin-right: 5%; + padding-right: 3%; + } + .type-interior .content-primary { + width: 60%; + } +} diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/project/css/jquery.mobile-1.0.min.css b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/project/css/jquery.mobile-1.0.min.css new file mode 100644 index 0000000..ab4e0b8 --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/project/css/jquery.mobile-1.0.min.css @@ -0,0 +1,2 @@ +/*! jQuery Mobile v1.0 jquerymobile.com | jquery.org/license */ +.ui-bar-a{border:1px solid #2a2a2a;background:#111;color:#fff;font-weight:bold;text-shadow:0 -1px 1px #000;background-image:-webkit-gradient(linear,left top,left bottom,from(#3c3c3c),to(#111));background-image:-webkit-linear-gradient(#3c3c3c,#111);background-image:-moz-linear-gradient(#3c3c3c,#111);background-image:-ms-linear-gradient(#3c3c3c,#111);background-image:-o-linear-gradient(#3c3c3c,#111);background-image:linear-gradient(#3c3c3c,#111)}.ui-bar-a,.ui-bar-a input,.ui-bar-a select,.ui-bar-a textarea,.ui-bar-a button{font-family:Helvetica,Arial,sans-serif}.ui-bar-a .ui-link-inherit{color:#fff}.ui-bar-a .ui-link{color:#7cc4e7;font-weight:bold}.ui-bar-a .ui-link:hover{color:#2489ce}.ui-bar-a .ui-link:active{color:#2489ce}.ui-bar-a .ui-link:visited{color:#2489ce}.ui-body-a,.ui-dialog.ui-overlay-a{border:1px solid #2a2a2a;background:#222;color:#fff;text-shadow:0 1px 0 #000;font-weight:normal;background-image:-webkit-gradient(linear,left top,left bottom,from(#666),to(#222));background-image:-webkit-linear-gradient(#666,#222);background-image:-moz-linear-gradient(#666,#222);background-image:-ms-linear-gradient(#666,#222);background-image:-o-linear-gradient(#666,#222);background-image:linear-gradient(#666,#222)}.ui-body-a,.ui-body-a input,.ui-body-a select,.ui-body-a textarea,.ui-body-a button{font-family:Helvetica,Arial,sans-serif}.ui-body-a .ui-link-inherit{color:#fff}.ui-body-a .ui-link{color:#2489ce;font-weight:bold}.ui-body-a .ui-link:hover{color:#2489ce}.ui-body-a .ui-link:active{color:#2489ce}.ui-body-a .ui-link:visited{color:#2489ce}.ui-btn-up-a{border:1px solid #222;background:#333;font-weight:bold;color:#fff;text-shadow:0 -1px 1px #000;background-image:-webkit-gradient(linear,left top,left bottom,from(#555),to(#333));background-image:-webkit-linear-gradient(#555,#333);background-image:-moz-linear-gradient(#555,#333);background-image:-ms-linear-gradient(#555,#333);background-image:-o-linear-gradient(#555,#333);background-image:linear-gradient(#555,#333)}.ui-btn-up-a a.ui-link-inherit{color:#fff}.ui-btn-hover-a{border:1px solid #000;background:#444;font-weight:bold;color:#fff;text-shadow:0 -1px 1px #000;background-image:-webkit-gradient(linear,left top,left bottom,from(#666),to(#444));background-image:-webkit-linear-gradient(#666,#444);background-image:-moz-linear-gradient(#666,#444);background-image:-ms-linear-gradient(#666,#444);background-image:-o-linear-gradient(#666,#444);background-image:linear-gradient(#666,#444)}.ui-btn-hover-a a.ui-link-inherit{color:#fff}.ui-btn-down-a{border:1px solid #000;background:#3d3d3d;font-weight:bold;color:#fff;text-shadow:0 -1px 1px #000;background-image:-webkit-gradient(linear,left top,left bottom,from(#333),to(#5a5a5a));background-image:-webkit-linear-gradient(#333,#5a5a5a);background-image:-moz-linear-gradient(#333,#5a5a5a);background-image:-ms-linear-gradient(#333,#5a5a5a);background-image:-o-linear-gradient(#333,#5a5a5a);background-image:linear-gradient(#333,#5a5a5a)}.ui-btn-down-a a.ui-link-inherit{color:#fff}.ui-btn-up-a,.ui-btn-hover-a,.ui-btn-down-a{font-family:Helvetica,Arial,sans-serif;text-decoration:none}.ui-bar-b{border:1px solid #456f9a;background:#5e87b0;color:#fff;font-weight:bold;text-shadow:0 -1px 1px #254f7a;background-image:-webkit-gradient(linear,left top,left bottom,from(#81a8ce),to(#5e87b0));background-image:-webkit-linear-gradient(#81a8ce,#5e87b0);background-image:-moz-linear-gradient(#81a8ce,#5e87b0);background-image:-ms-linear-gradient(#81a8ce,#5e87b0);background-image:-o-linear-gradient(#81a8ce,#5e87b0);background-image:linear-gradient(#81a8ce,#5e87b0)}.ui-bar-b,.ui-bar-b input,.ui-bar-b select,.ui-bar-b textarea,.ui-bar-b button{font-family:Helvetica,Arial,sans-serif}.ui-bar-b .ui-link-inherit{color:#fff}.ui-bar-b .ui-link{color:#ddf0f8;font-weight:bold}.ui-bar-b .ui-link:hover{color:#ddf0f8}.ui-bar-b .ui-link:active{color:#ddf0f8}.ui-bar-b .ui-link:visited{color:#ddf0f8}.ui-body-b,.ui-dialog.ui-overlay-b{border:1px solid #c6c6c6;background:#ccc;color:#333;text-shadow:0 1px 0 #fff;font-weight:normal;background-image:-webkit-gradient(linear,left top,left bottom,from(#e6e6e6),to(#ccc));background-image:-webkit-linear-gradient(#e6e6e6,#ccc);background-image:-moz-linear-gradient(#e6e6e6,#ccc);background-image:-ms-linear-gradient(#e6e6e6,#ccc);background-image:-o-linear-gradient(#e6e6e6,#ccc);background-image:linear-gradient(#e6e6e6,#ccc)}.ui-body-b,.ui-body-b input,.ui-body-b select,.ui-body-b textarea,.ui-body-b button{font-family:Helvetica,Arial,sans-serif}.ui-body-b .ui-link-inherit{color:#333}.ui-body-b .ui-link{color:#2489ce;font-weight:bold}.ui-body-b .ui-link:hover{color:#2489ce}.ui-body-b .ui-link:active{color:#2489ce}.ui-body-b .ui-link:visited{color:#2489ce}.ui-btn-up-b{border:1px solid #145072;background:#2567ab;font-weight:bold;color:#fff;text-shadow:0 -1px 1px #145072;background-image:-webkit-gradient(linear,left top,left bottom,from(#5f9cc5),to(#396b9e));background-image:-webkit-linear-gradient(#5f9cc5,#396b9e);background-image:-moz-linear-gradient(#5f9cc5,#396b9e);background-image:-ms-linear-gradient(#5f9cc5,#396b9e);background-image:-o-linear-gradient(#5f9cc5,#396b9e);background-image:linear-gradient(#5f9cc5,#396b9e)}.ui-btn-up-b a.ui-link-inherit{color:#fff}.ui-btn-hover-b{border:1px solid #00516e;background:#4b88b6;font-weight:bold;color:#fff;text-shadow:0 -1px 1px #014d68;background-image:-webkit-gradient(linear,left top,left bottom,from(#72b0d4),to(#4b88b6));background-image:-webkit-linear-gradient(#72b0d4,#4b88b6);background-image:-moz-linear-gradient(#72b0d4,#4b88b6);background-image:-ms-linear-gradient(#72b0d4,#4b88b6);background-image:-o-linear-gradient(#72b0d4,#4b88b6);background-image:linear-gradient(#72b0d4,#4b88b6)}.ui-btn-hover-b a.ui-link-inherit{color:#fff}.ui-btn-down-b{border:1px solid #225377;background:#4e89c5;font-weight:bold;color:#fff;text-shadow:0 -1px 1px #225377;background-image:-webkit-gradient(linear,left top,left bottom,from(#396b9e),to(#4e89c5));background-image:-webkit-linear-gradient(#396b9e,#4e89c5);background-image:-moz-linear-gradient(#396b9e,#4e89c5);background-image:-ms-linear-gradient(#396b9e,#4e89c5);background-image:-o-linear-gradient(#396b9e,#4e89c5);background-image:linear-gradient(#396b9e,#4e89c5)}.ui-btn-down-b a.ui-link-inherit{color:#fff}.ui-btn-up-b,.ui-btn-hover-b,.ui-btn-down-b{font-family:Helvetica,Arial,sans-serif;text-decoration:none}.ui-bar-c{border:1px solid #b3b3b3;background:#e9eaeb;color:#3e3e3e;font-weight:bold;text-shadow:0 1px 1px #fff;background-image:-webkit-gradient(linear,left top,left bottom,from(#f0f0f0),to(#e9eaeb));background-image:-webkit-linear-gradient(#f0f0f0,#e9eaeb);background-image:-moz-linear-gradient(#f0f0f0,#e9eaeb);background-image:-ms-linear-gradient(#f0f0f0,#e9eaeb);background-image:-o-linear-gradient(#f0f0f0,#e9eaeb);background-image:linear-gradient(#f0f0f0,#e9eaeb)}.ui-bar-c .ui-link-inherit{color:#3e3e3e}.ui-bar-c .ui-link{color:#7cc4e7;font-weight:bold}.ui-bar-c .ui-link:hover{color:#2489ce}.ui-bar-c .ui-link:active{color:#2489ce}.ui-bar-c .ui-link:visited{color:#2489ce}.ui-bar-c,.ui-bar-c input,.ui-bar-c select,.ui-bar-c textarea,.ui-bar-c button{font-family:Helvetica,Arial,sans-serif}.ui-body-c,.ui-dialog.ui-overlay-c{border:1px solid #b3b3b3;color:#333;text-shadow:0 1px 0 #fff;background:#f0f0f0;background-image:-webkit-gradient(linear,left top,left bottom,from(#eee),to(#ddd));background-image:-webkit-linear-gradient(#eee,#ddd);background-image:-moz-linear-gradient(#eee,#ddd);background-image:-ms-linear-gradient(#eee,#ddd);background-image:-o-linear-gradient(#eee,#ddd);background-image:linear-gradient(#eee,#ddd)}.ui-body-c,.ui-body-c input,.ui-body-c select,.ui-body-c textarea,.ui-body-c button{font-family:Helvetica,Arial,sans-serif}.ui-body-c .ui-link-inherit{color:#333}.ui-body-c .ui-link{color:#2489ce;font-weight:bold}.ui-body-c .ui-link:hover{color:#2489ce}.ui-body-c .ui-link:active{color:#2489ce}.ui-body-c .ui-link:visited{color:#2489ce}.ui-btn-up-c{border:1px solid #ccc;background:#eee;font-weight:bold;color:#444;text-shadow:0 1px 1px #f6f6f6;background-image:-webkit-gradient(linear,left top,left bottom,from(#fdfdfd),to(#eee));background-image:-webkit-linear-gradient(#fdfdfd,#eee);background-image:-moz-linear-gradient(#fdfdfd,#eee);background-image:-ms-linear-gradient(#fdfdfd,#eee);background-image:-o-linear-gradient(#fdfdfd,#eee);background-image:linear-gradient(#fdfdfd,#eee)}.ui-btn-up-c a.ui-link-inherit{color:#2f3e46}.ui-btn-hover-c{border:1px solid #bbb;background:#dadada;font-weight:bold;color:#101010;text-shadow:0 1px 1px #fff;background-image:-webkit-gradient(linear,left top,left bottom,from(#ededed),to(#dadada));background-image:-webkit-linear-gradient(#ededed,#dadada);background-image:-moz-linear-gradient(#ededed,#dadada);background-image:-ms-linear-gradient(#ededed,#dadada);background-image:-o-linear-gradient(#ededed,#dadada);background-image:linear-gradient(#ededed,#dadada)}.ui-btn-hover-c a.ui-link-inherit{color:#2f3e46}.ui-btn-down-c{border:1px solid #808080;background:#fdfdfd;font-weight:bold;color:#111;text-shadow:0 1px 1px #fff;background-image:-webkit-gradient(linear,left top,left bottom,from(#eee),to(#fdfdfd));background-image:-webkit-linear-gradient(#eee,#fdfdfd);background-image:-moz-linear-gradient(#eee,#fdfdfd);background-image:-ms-linear-gradient(#eee,#fdfdfd);background-image:-o-linear-gradient(#eee,#fdfdfd);background-image:linear-gradient(#eee,#fdfdfd)}.ui-btn-down-c a.ui-link-inherit{color:#2f3e46}.ui-btn-up-c,.ui-btn-hover-c,.ui-btn-down-c{font-family:Helvetica,Arial,sans-serif;text-decoration:none}.ui-bar-d{border:1px solid #ccc;background:#bbb;color:#333;text-shadow:0 1px 0 #eee;background-image:-webkit-gradient(linear,left top,left bottom,from(#ddd),to(#bbb));background-image:-webkit-linear-gradient(#ddd,#bbb);background-image:-moz-linear-gradient(#ddd,#bbb);background-image:-ms-linear-gradient(#ddd,#bbb);background-image:-o-linear-gradient(#ddd,#bbb);background-image:linear-gradient(#ddd,#bbb)}.ui-bar-d,.ui-bar-d input,.ui-bar-d select,.ui-bar-d textarea,.ui-bar-d button{font-family:Helvetica,Arial,sans-serif}.ui-bar-d .ui-link-inherit{color:#333}.ui-bar-d .ui-link{color:#2489ce;font-weight:bold}.ui-bar-d .ui-link:hover{color:#2489ce}.ui-bar-d .ui-link:active{color:#2489ce}.ui-bar-d .ui-link:visited{color:#2489ce}.ui-body-d,.ui-dialog.ui-overlay-d{border:1px solid #ccc;color:#333;text-shadow:0 1px 0 #fff;background:#fff;background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#fff));background-image:-webkit-linear-gradient(#fff,#fff);background-image:-moz-linear-gradient(#fff,#fff);background-image:-ms-linear-gradient(#fff,#fff);background-image:-o-linear-gradient(#fff,#fff);background-image:linear-gradient(#fff,#fff)}.ui-body-d,.ui-body-d input,.ui-body-d select,.ui-body-d textarea,.ui-body-d button{font-family:Helvetica,Arial,sans-serif}.ui-body-d .ui-link-inherit{color:#333}.ui-body-d .ui-link{color:#2489ce;font-weight:bold}.ui-body-d .ui-link:hover{color:#2489ce}.ui-body-d .ui-link:active{color:#2489ce}.ui-body-d .ui-link:visited{color:#2489ce}.ui-btn-up-d{border:1px solid #ccc;background:#fff;font-weight:bold;color:#444;text-shadow:0 1px 1px #fff;background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#fff));background-image:-webkit-linear-gradient(#fff,#fff);background-image:-moz-linear-gradient(#fff,#fff);background-image:-ms-linear-gradient(#fff,#fff);background-image:-o-linear-gradient(#fff,#fff);background-image:linear-gradient(#fff,#fff)}.ui-btn-up-d a.ui-link-inherit{color:#333}.ui-btn-hover-d{border:1px solid #aaa;background:#eee;font-weight:bold;color:#222;cursor:pointer;text-shadow:0 1px 1px #fff;background-image:-webkit-gradient(linear,left top,left bottom,from(#fdfdfd),to(#eee));background-image:-webkit-linear-gradient(#fdfdfd,#eee);background-image:-moz-linear-gradient(#fdfdfd,#eee);background-image:-ms-linear-gradient(#fdfdfd,#eee);background-image:-o-linear-gradient(#fdfdfd,#eee);background-image:linear-gradient(#fdfdfd,#eee)}.ui-btn-hover-d a.ui-link-inherit{color:#222}.ui-btn-down-d{border:1px solid #aaa;background:#fff;font-weight:bold;color:#111;text-shadow:0 1px 1px #fff;background-image:-webkit-gradient(linear,left top,left bottom,from(#eee),to(#fff));background-image:-webkit-linear-gradient(#eee,#fff);background-image:-moz-linear-gradient(#eee,#fff);background-image:-ms-linear-gradient(#eee,#fff);background-image:-o-linear-gradient(#eee,#fff);background-image:linear-gradient(#eee,#fff)}.ui-btn-down-d a.ui-link-inherit{color:#111}.ui-btn-up-d,.ui-btn-hover-d,.ui-btn-down-d{font-family:Helvetica,Arial,sans-serif;text-decoration:none}.ui-bar-e{border:1px solid #f7c942;background:#fadb4e;color:#333;text-shadow:0 1px 0 #fff;background-image:-webkit-gradient(linear,left top,left bottom,from(#fceda7),to(#fadb4e));background-image:-webkit-linear-gradient(#fceda7,#fadb4e);background-image:-moz-linear-gradient(#fceda7,#fadb4e);background-image:-ms-linear-gradient(#fceda7,#fadb4e);background-image:-o-linear-gradient(#fceda7,#fadb4e);background-image:linear-gradient(#fceda7,#fadb4e)}.ui-bar-e,.ui-bar-e input,.ui-bar-e select,.ui-bar-e textarea,.ui-bar-e button{font-family:Helvetica,Arial,sans-serif}.ui-bar-e .ui-link-inherit{color:#333}.ui-bar-e .ui-link{color:#2489ce;font-weight:bold}.ui-bar-e .ui-link:hover{color:#2489ce}.ui-bar-e .ui-link:active{color:#2489ce}.ui-bar-e .ui-link:visited{color:#2489ce}.ui-body-e,.ui-dialog.ui-overlay-e{border:1px solid #f7c942;color:#333;text-shadow:0 1px 0 #fff;background:#faeb9e;background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#faeb9e));background-image:-webkit-linear-gradient(#fff,#faeb9e);background-image:-moz-linear-gradient(#fff,#faeb9e);background-image:-ms-linear-gradient(#fff,#faeb9e);background-image:-o-linear-gradient(#fff,#faeb9e);background-image:linear-gradient(#fff,#faeb9e)}.ui-body-e,.ui-body-e input,.ui-body-e select,.ui-body-e textarea,.ui-body-e button{font-family:Helvetica,Arial,sans-serif}.ui-body-e .ui-link-inherit{color:#333}.ui-body-e .ui-link{color:#2489ce;font-weight:bold}.ui-body-e .ui-link:hover{color:#2489ce}.ui-body-e .ui-link:active{color:#2489ce}.ui-body-e .ui-link:visited{color:#2489ce}.ui-btn-up-e{border:1px solid #f7c942;background:#fadb4e;font-weight:bold;color:#333;text-shadow:0 1px 0 #fff;background-image:-webkit-gradient(linear,left top,left bottom,from(#fceda7),to(#fadb4e));background-image:-webkit-linear-gradient(#fceda7,#fadb4e);background-image:-moz-linear-gradient(#fceda7,#fadb4e);background-image:-ms-linear-gradient(#fceda7,#fadb4e);background-image:-o-linear-gradient(#fceda7,#fadb4e);background-image:linear-gradient(#fceda7,#fadb4e)}.ui-btn-up-e a.ui-link-inherit{color:#333}.ui-btn-hover-e{border:1px solid #e79952;background:#fbe26f;font-weight:bold;color:#111;text-shadow:0 1px 1px #fff;background-image:-webkit-gradient(linear,left top,left bottom,from(#fcf0b5),to(#fbe26f));background-image:-webkit-linear-gradient(#fcf0b5,#fbe26f);background-image:-moz-linear-gradient(#fcf0b5,#fbe26f);background-image:-ms-linear-gradient(#fcf0b5,#fbe26f);background-image:-o-linear-gradient(#fcf0b5,#fbe26f);background-image:linear-gradient(#fcf0b5,#fbe26f)}.ui-btn-hover-e a.ui-link-inherit{color:#333}.ui-btn-down-e{border:1px solid #f7c942;background:#fceda7;font-weight:bold;color:#111;text-shadow:0 1px 1px #fff;background-image:-webkit-gradient(linear,left top,left bottom,from(#fadb4e),to(#fceda7));background-image:-webkit-linear-gradient(#fadb4e,#fceda7);background-image:-moz-linear-gradient(#fadb4e,#fceda7);background-image:-ms-linear-gradient(#fadb4e,#fceda7);background-image:-o-linear-gradient(#fadb4e,#fceda7);background-image:linear-gradient(#fadb4e,#fceda7)}.ui-btn-down-e a.ui-link-inherit{color:#333}.ui-btn-up-e,.ui-btn-hover-e,.ui-btn-down-e{font-family:Helvetica,Arial,sans-serif;text-decoration:none}a.ui-link-inherit{text-decoration:none!important}.ui-btn-active{border:1px solid #155678;background:#4596ce;font-weight:bold;color:#fff;cursor:pointer;text-shadow:0 -1px 1px #145072;text-decoration:none;background-image:-webkit-gradient(linear,left top,left bottom,from(#85bae4),to(#5393c5));background-image:-webkit-linear-gradient(#85bae4,#5393c5);background-image:-moz-linear-gradient(#85bae4,#5393c5);background-image:-ms-linear-gradient(#85bae4,#5393c5);background-image:-o-linear-gradient(#85bae4,#5393c5);background-image:linear-gradient(#85bae4,#5393c5);font-family:Helvetica,Arial,sans-serif}.ui-btn-active a.ui-link-inherit{color:#fff}.ui-btn-inner{border-top:1px solid #fff;border-color:rgba(255,255,255,.3)}.ui-corner-tl{-moz-border-radius-topleft:.6em;-webkit-border-top-left-radius:.6em;border-top-left-radius:.6em}.ui-corner-tr{-moz-border-radius-topright:.6em;-webkit-border-top-right-radius:.6em;border-top-right-radius:.6em}.ui-corner-bl{-moz-border-radius-bottomleft:.6em;-webkit-border-bottom-left-radius:.6em;border-bottom-left-radius:.6em}.ui-corner-br{-moz-border-radius-bottomright:.6em;-webkit-border-bottom-right-radius:.6em;border-bottom-right-radius:.6em}.ui-corner-top{-moz-border-radius-topleft:.6em;-webkit-border-top-left-radius:.6em;border-top-left-radius:.6em;-moz-border-radius-topright:.6em;-webkit-border-top-right-radius:.6em;border-top-right-radius:.6em}.ui-corner-bottom{-moz-border-radius-bottomleft:.6em;-webkit-border-bottom-left-radius:.6em;border-bottom-left-radius:.6em;-moz-border-radius-bottomright:.6em;-webkit-border-bottom-right-radius:.6em;border-bottom-right-radius:.6em}.ui-corner-right{-moz-border-radius-topright:.6em;-webkit-border-top-right-radius:.6em;border-top-right-radius:.6em;-moz-border-radius-bottomright:.6em;-webkit-border-bottom-right-radius:.6em;border-bottom-right-radius:.6em}.ui-corner-left{-moz-border-radius-topleft:.6em;-webkit-border-top-left-radius:.6em;border-top-left-radius:.6em;-moz-border-radius-bottomleft:.6em;-webkit-border-bottom-left-radius:.6em;border-bottom-left-radius:.6em}.ui-corner-all{-moz-border-radius:.6em;-webkit-border-radius:.6em;border-radius:.6em}.ui-corner-none{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.ui-br{border-bottom:#828282;border-bottom:rgba(130,130,130,.3);border-bottom-width:1px;border-bottom-style:solid}.ui-disabled{opacity:.3}.ui-disabled,.ui-disabled a{pointer-events:none;cursor:default}.ui-icon,.ui-icon-searchfield:after{background:#666;background:rgba(0,0,0,.4);background-image:url(images/icons-18-white.png);background-repeat:no-repeat;-moz-border-radius:9px;-webkit-border-radius:9px;border-radius:9px}.ui-icon-alt{background:#fff;background:rgba(255,255,255,.3);background-image:url(images/icons-18-black.png);background-repeat:no-repeat}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (min--moz-device-pixel-ratio:1.5),only screen and (min-resolution:240dpi){.ui-icon-plus,.ui-icon-minus,.ui-icon-delete,.ui-icon-arrow-r,.ui-icon-arrow-l,.ui-icon-arrow-u,.ui-icon-arrow-d,.ui-icon-check,.ui-icon-gear,.ui-icon-refresh,.ui-icon-forward,.ui-icon-back,.ui-icon-grid,.ui-icon-star,.ui-icon-alert,.ui-icon-info,.ui-icon-home,.ui-icon-search,.ui-icon-searchfield:after,.ui-icon-checkbox-off,.ui-icon-checkbox-on,.ui-icon-radio-off,.ui-icon-radio-on{background-image:url(images/icons-36-white.png);-moz-background-size:776px 18px;-o-background-size:776px 18px;-webkit-background-size:776px 18px;background-size:776px 18px}.ui-icon-alt{background-image:url(images/icons-36-black.png)}}.ui-icon-plus{background-position:-0 50%}.ui-icon-minus{background-position:-36px 50%}.ui-icon-delete{background-position:-72px 50%}.ui-icon-arrow-r{background-position:-108px 50%}.ui-icon-arrow-l{background-position:-144px 50%}.ui-icon-arrow-u{background-position:-180px 50%}.ui-icon-arrow-d{background-position:-216px 50%}.ui-icon-check{background-position:-252px 50%}.ui-icon-gear{background-position:-288px 50%}.ui-icon-refresh{background-position:-324px 50%}.ui-icon-forward{background-position:-360px 50%}.ui-icon-back{background-position:-396px 50%}.ui-icon-grid{background-position:-432px 50%}.ui-icon-star{background-position:-468px 50%}.ui-icon-alert{background-position:-504px 50%}.ui-icon-info{background-position:-540px 50%}.ui-icon-home{background-position:-576px 50%}.ui-icon-search,.ui-icon-searchfield:after{background-position:-612px 50%}.ui-icon-checkbox-off{background-position:-684px 50%}.ui-icon-checkbox-on{background-position:-648px 50%}.ui-icon-radio-off{background-position:-756px 50%}.ui-icon-radio-on{background-position:-720px 50%}.ui-checkbox .ui-icon{-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}.ui-icon-checkbox-off,.ui-icon-radio-off{background-color:transparent}.ui-checkbox-on .ui-icon,.ui-radio-on .ui-icon{background-color:#4596ce}.ui-icon-loading{background-image:url(images/ajax-loader.png);width:40px;height:40px;-moz-border-radius:20px;-webkit-border-radius:20px;border-radius:20px;background-size:35px 35px}.ui-btn-corner-tl{-moz-border-radius-topleft:1em;-webkit-border-top-left-radius:1em;border-top-left-radius:1em}.ui-btn-corner-tr{-moz-border-radius-topright:1em;-webkit-border-top-right-radius:1em;border-top-right-radius:1em}.ui-btn-corner-bl{-moz-border-radius-bottomleft:1em;-webkit-border-bottom-left-radius:1em;border-bottom-left-radius:1em}.ui-btn-corner-br{-moz-border-radius-bottomright:1em;-webkit-border-bottom-right-radius:1em;border-bottom-right-radius:1em}.ui-btn-corner-top{-moz-border-radius-topleft:1em;-webkit-border-top-left-radius:1em;border-top-left-radius:1em;-moz-border-radius-topright:1em;-webkit-border-top-right-radius:1em;border-top-right-radius:1em}.ui-btn-corner-bottom{-moz-border-radius-bottomleft:1em;-webkit-border-bottom-left-radius:1em;border-bottom-left-radius:1em;-moz-border-radius-bottomright:1em;-webkit-border-bottom-right-radius:1em;border-bottom-right-radius:1em}.ui-btn-corner-right{-moz-border-radius-topright:1em;-webkit-border-top-right-radius:1em;border-top-right-radius:1em;-moz-border-radius-bottomright:1em;-webkit-border-bottom-right-radius:1em;border-bottom-right-radius:1em}.ui-btn-corner-left{-moz-border-radius-topleft:1em;-webkit-border-top-left-radius:1em;border-top-left-radius:1em;-moz-border-radius-bottomleft:1em;-webkit-border-bottom-left-radius:1em;border-bottom-left-radius:1em}.ui-btn-corner-all{-moz-border-radius:1em;-webkit-border-radius:1em;border-radius:1em}.ui-corner-tl,.ui-corner-tr,.ui-corner-bl,.ui-corner-br,.ui-corner-top,.ui-corner-bottom,.ui-corner-right,.ui-corner-left,.ui-corner-all,.ui-btn-corner-tl,.ui-btn-corner-tr,.ui-btn-corner-bl,.ui-btn-corner-br,.ui-btn-corner-top,.ui-btn-corner-bottom,.ui-btn-corner-right,.ui-btn-corner-left,.ui-btn-corner-all{-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box}.ui-overlay{background:#666;opacity:.5;filter:Alpha(Opacity=50);position:absolute;width:100%;height:100%}.ui-overlay-shadow{-moz-box-shadow:0 0 12px rgba(0,0,0,.6);-webkit-box-shadow:0 0 12px rgba(0,0,0,.6);box-shadow:0 0 12px rgba(0,0,0,.6)}.ui-shadow{-moz-box-shadow:0 1px 4px rgba(0,0,0,.3);-webkit-box-shadow:0 1px 4px rgba(0,0,0,.3);box-shadow:0 1px 4px rgba(0,0,0,.3)}.ui-bar-a .ui-shadow,.ui-bar-b .ui-shadow,.ui-bar-c .ui-shadow{-moz-box-shadow:0 1px 0 rgba(255,255,255,.3);-webkit-box-shadow:0 1px 0 rgba(255,255,255,.3);box-shadow:0 1px 0 rgba(255,255,255,.3)}.ui-shadow-inset{-moz-box-shadow:inset 0 1px 4px rgba(0,0,0,.2);-webkit-box-shadow:inset 0 1px 4px rgba(0,0,0,.2);box-shadow:inset 0 1px 4px rgba(0,0,0,.2)}.ui-icon-shadow{-moz-box-shadow:0 1px 0 rgba(255,255,255,.4);-webkit-box-shadow:0 1px 0 rgba(255,255,255,.4);box-shadow:0 1px 0 rgba(255,255,255,.4)}.ui-focus{-moz-box-shadow:0 0 12px #387bbe;-webkit-box-shadow:0 0 12px #387bbe;box-shadow:0 0 12px #387bbe}.ui-mobile-nosupport-boxshadow *{-moz-box-shadow:none!important;-webkit-box-shadow:none!important;box-shadow:none!important}.ui-mobile-nosupport-boxshadow .ui-focus{outline-width:2px}.ui-mobile,.ui-mobile body{height:100%}.ui-mobile fieldset,.ui-page{padding:0;margin:0}.ui-mobile a img,.ui-mobile fieldset{border:0}.ui-mobile-viewport{margin:0;overflow-x:visible;-webkit-text-size-adjust:none;-ms-text-size-adjust:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}body.ui-mobile-viewport,div.ui-mobile-viewport{overflow-x:hidden}.ui-mobile [data-role=page],.ui-mobile [data-role=dialog],.ui-page{top:0;left:0;width:100%;min-height:100%;position:absolute;display:none;border:0}.ui-mobile .ui-page-active{display:block;overflow:visible}.ui-page{outline:0}@media screen and (orientation:portrait){.ui-mobile,.ui-mobile .ui-page{min-height:420px}}@media screen and (orientation:landscape){.ui-mobile,.ui-mobile .ui-page{min-height:300px}}.ui-page.ui-mobile-touch-overflow,.ui-mobile-touch-overflow.ui-native-fixed .ui-content{overflow:auto;height:100%;-webkit-overflow-scrolling:touch;-moz-overflow-scrolling:touch;-o-overflow-scrolling:touch;-ms-overflow-scrolling:touch;overflow-scrolling:touch}.ui-page.ui-mobile-touch-overflow,.ui-page.ui-mobile-touch-overflow *{-webkit-transform:rotateY(0)}.ui-page.ui-mobile-pre-transition{display:block}.ui-loading .ui-mobile-viewport{overflow:hidden!important}.ui-loading .ui-loader{display:block}.ui-loading .ui-page{overflow:hidden}.ui-loader{display:none;position:absolute;opacity:.85;z-index:100;left:50%;width:200px;margin-left:-130px;margin-top:-35px;padding:10px 30px}.ui-loader h1{font-size:15px;text-align:center}.ui-loader .ui-icon{position:static;display:block;opacity:.9;margin:0 auto;width:35px;height:35px;background-color:transparent}.ui-mobile-rendering>*{visibility:hidden}.ui-bar,.ui-body{position:relative;padding:.4em 15px;overflow:hidden;display:block;clear:both}.ui-bar{font-size:16px;margin:0}.ui-bar h1,.ui-bar h2,.ui-bar h3,.ui-bar h4,.ui-bar h5,.ui-bar h6{margin:0;padding:0;font-size:16px;display:inline-block}.ui-header,.ui-footer{display:block}.ui-page .ui-header,.ui-page .ui-footer{position:relative}.ui-header .ui-btn-left{position:absolute;left:10px;top:.4em}.ui-header .ui-btn-right{position:absolute;right:10px;top:.4em}.ui-header .ui-title,.ui-footer .ui-title{min-height:1.1em;text-align:center;font-size:16px;display:block;margin:.6em 90px .8em;padding:0;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;outline:0!important}.ui-footer .ui-title{margin:.6em 15px .8em}.ui-content{border-width:0;overflow:visible;overflow-x:hidden;padding:15px}.ui-page-fullscreen .ui-content{padding:0}.ui-mobile-touch-overflow.ui-page.ui-native-fixed,.ui-mobile-touch-overflow.ui-page.ui-native-fullscreen{overflow:visible}.ui-mobile-touch-overflow.ui-native-fixed .ui-header,.ui-mobile-touch-overflow.ui-native-fixed .ui-footer{position:fixed;left:0;right:0;top:0;z-index:200}.ui-mobile-touch-overflow.ui-page.ui-native-fixed .ui-footer{top:auto;bottom:0}.ui-mobile-touch-overflow.ui-native-fixed .ui-content{padding-top:2.5em;padding-bottom:3em;top:0;bottom:0;height:auto;position:absolute}.ui-mobile-touch-overflow.ui-native-fullscreen .ui-content{padding-top:0;padding-bottom:0}.ui-mobile-touch-overflow.ui-native-fullscreen .ui-header,.ui-mobile-touch-overflow.ui-native-fullscreen .ui-footer{opacity:.9}.ui-native-bars-hidden{display:none}.ui-icon{width:18px;height:18px}.ui-fullscreen img{max-width:100%}.ui-nojs{position:absolute;left:-9999px}.ui-hide-label label,.ui-hidden-accessible{position:absolute!important;left:-9999px;clip:rect(1px 1px 1px 1px);clip:rect(1px,1px,1px,1px)}.spin{-webkit-transform:rotate(360deg);-webkit-animation-name:spin;-webkit-animation-duration:1s;-webkit-animation-iteration-count:infinite;-webkit-animation-timing-function:linear}@-webkit-keyframes spin{from{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(360deg)}}.in,.out{-webkit-animation-timing-function:ease-in-out;-webkit-animation-duration:350ms}.slide.out{-webkit-transform:translateX(-100%);-webkit-animation-name:slideouttoleft}.slide.in{-webkit-transform:translateX(0);-webkit-animation-name:slideinfromright}.slide.out.reverse{-webkit-transform:translateX(100%);-webkit-animation-name:slideouttoright}.slide.in.reverse{-webkit-transform:translateX(0);-webkit-animation-name:slideinfromleft}.slideup.out{-webkit-animation-name:dontmove;z-index:0}.slideup.in{-webkit-transform:translateY(0);-webkit-animation-name:slideinfrombottom;z-index:10}.slideup.in.reverse{z-index:0;-webkit-animation-name:dontmove}.slideup.out.reverse{-webkit-transform:translateY(100%);z-index:10;-webkit-animation-name:slideouttobottom}.slidedown.out{-webkit-animation-name:dontmove;z-index:0}.slidedown.in{-webkit-transform:translateY(0);-webkit-animation-name:slideinfromtop;z-index:10}.slidedown.in.reverse{z-index:0;-webkit-animation-name:dontmove}.slidedown.out.reverse{-webkit-transform:translateY(-100%);z-index:10;-webkit-animation-name:slideouttotop}@-webkit-keyframes slideinfromright{from{-webkit-transform:translateX(100%)}to{-webkit-transform:translateX(0)}}@-webkit-keyframes slideinfromleft{from{-webkit-transform:translateX(-100%)}to{-webkit-transform:translateX(0)}}@-webkit-keyframes slideouttoleft{from{-webkit-transform:translateX(0)}to{-webkit-transform:translateX(-100%)}}@-webkit-keyframes slideouttoright{from{-webkit-transform:translateX(0)}to{-webkit-transform:translateX(100%)}}@-webkit-keyframes slideinfromtop{from{-webkit-transform:translateY(-100%)}to{-webkit-transform:translateY(0)}}@-webkit-keyframes slideinfrombottom{from{-webkit-transform:translateY(100%)}to{-webkit-transform:translateY(0)}}@-webkit-keyframes slideouttobottom{from{-webkit-transform:translateY(0)}to{-webkit-transform:translateY(100%)}}@-webkit-keyframes slideouttotop{from{-webkit-transform:translateY(0)}to{-webkit-transform:translateY(-100%)}}@-webkit-keyframes fadein{from{opacity:0}to{opacity:1}}@-webkit-keyframes fadeout{from{opacity:1}to{opacity:0}}.fade.out{z-index:0;-webkit-animation-name:fadeout}.fade.in{opacity:1;z-index:10;-webkit-animation-name:fadein}.viewport-flip{-webkit-perspective:1000;position:absolute}.ui-mobile-viewport-transitioning,.ui-mobile-viewport-transitioning .ui-page{width:100%;height:100%;overflow:hidden}.flip{-webkit-animation-duration:.65s;-webkit-backface-visibility:hidden;-webkit-transform:translateX(0)}.flip.out{-webkit-transform:rotateY(-180deg) scale(.8);-webkit-animation-name:flipouttoleft}.flip.in{-webkit-transform:rotateY(0) scale(1);-webkit-animation-name:flipinfromleft}.flip.out.reverse{-webkit-transform:rotateY(180deg) scale(.8);-webkit-animation-name:flipouttoright}.flip.in.reverse{-webkit-transform:rotateY(0) scale(1);-webkit-animation-name:flipinfromright}@-webkit-keyframes flipinfromright{from{-webkit-transform:rotateY(-180deg) scale(.8)}to{-webkit-transform:rotateY(0) scale(1)}}@-webkit-keyframes flipinfromleft{from{-webkit-transform:rotateY(180deg) scale(.8)}to{-webkit-transform:rotateY(0) scale(1)}}@-webkit-keyframes flipouttoleft{from{-webkit-transform:rotateY(0) scale(1)}to{-webkit-transform:rotateY(-180deg) scale(.8)}}@-webkit-keyframes flipouttoright{from{-webkit-transform:rotateY(0) scale(1)}to{-webkit-transform:rotateY(180deg) scale(.8)}}@-webkit-keyframes dontmove{from{opacity:1}to{opacity:1}}.pop{-webkit-transform-origin:50% 50%}.pop.in{-webkit-transform:scale(1);opacity:1;-webkit-animation-name:popin;z-index:10}.pop.in.reverse{z-index:0;-webkit-animation-name:dontmove}.pop.out.reverse{-webkit-transform:scale(.2);opacity:0;-webkit-animation-name:popout;z-index:10}@-webkit-keyframes popin{from{-webkit-transform:scale(.2);opacity:0}to{-webkit-transform:scale(1);opacity:1}}@-webkit-keyframes popout{from{-webkit-transform:scale(1);opacity:1}to{-webkit-transform:scale(.2);opacity:0}}.ui-grid-a,.ui-grid-b,.ui-grid-c,.ui-grid-d{overflow:hidden}.ui-block-a,.ui-block-b,.ui-block-c,.ui-block-d,.ui-block-e{margin:0;padding:0;border:0;float:left;min-height:1px}.ui-grid-solo .ui-block-a{width:100%;float:none}.ui-grid-a .ui-block-a,.ui-grid-a .ui-block-b{width:50%}.ui-grid-a .ui-block-a{clear:left}.ui-grid-b .ui-block-a,.ui-grid-b .ui-block-b,.ui-grid-b .ui-block-c{width:33.333%}.ui-grid-b .ui-block-a{clear:left}.ui-grid-c .ui-block-a,.ui-grid-c .ui-block-b,.ui-grid-c .ui-block-c,.ui-grid-c .ui-block-d{width:25%}.ui-grid-c .ui-block-a{clear:left}.ui-grid-d .ui-block-a,.ui-grid-d .ui-block-b,.ui-grid-d .ui-block-c,.ui-grid-d .ui-block-d,.ui-grid-d .ui-block-e{width:20%}.ui-grid-d .ui-block-a{clear:left}.ui-header,.ui-footer,.ui-page-fullscreen .ui-header,.ui-page-fullscreen .ui-footer{position:absolute;overflow:hidden;width:100%;border-left-width:0;border-right-width:0}.ui-header-fixed,.ui-footer-fixed{z-index:1000;-webkit-transform:translateZ(0)}.ui-footer-duplicate,.ui-page-fullscreen .ui-fixed-inline{display:none}.ui-page-fullscreen .ui-header,.ui-page-fullscreen .ui-footer{opacity:.9}.ui-navbar{overflow:hidden}.ui-navbar ul,.ui-navbar-expanded ul{list-style:none;padding:0;margin:0;position:relative;display:block;border:0}.ui-navbar-collapsed ul{float:left;width:75%;margin-right:-2px}.ui-navbar-collapsed .ui-navbar-toggle{float:left;width:25%}.ui-navbar li.ui-navbar-truncate{position:absolute;left:-9999px;top:-9999px}.ui-navbar li .ui-btn,.ui-navbar .ui-navbar-toggle .ui-btn{display:block;font-size:12px;text-align:center;margin:0;border-right-width:0}.ui-navbar li .ui-btn{margin-right:-1px}.ui-navbar li .ui-btn:last-child{margin-right:0}.ui-header .ui-navbar li .ui-btn,.ui-header .ui-navbar .ui-navbar-toggle .ui-btn,.ui-footer .ui-navbar li .ui-btn,.ui-footer .ui-navbar .ui-navbar-toggle .ui-btn{border-top-width:0;border-bottom-width:0}.ui-navbar .ui-btn-inner{padding-left:2px;padding-right:2px}.ui-navbar-noicons li .ui-btn .ui-btn-inner,.ui-navbar-noicons .ui-navbar-toggle .ui-btn-inner{padding-top:.8em;padding-bottom:.9em}.ui-navbar-expanded .ui-btn{margin:0;font-size:14px}.ui-navbar-expanded .ui-btn-inner{padding-left:5px;padding-right:5px}.ui-navbar-expanded .ui-btn-icon-top .ui-btn-inner{padding:45px 5px 15px;text-align:center}.ui-navbar-expanded .ui-btn-icon-top .ui-icon{top:15px}.ui-navbar-expanded .ui-btn-icon-bottom .ui-btn-inner{padding:15px 5px 45px;text-align:center}.ui-navbar-expanded .ui-btn-icon-bottom .ui-icon{bottom:15px}.ui-navbar-expanded li .ui-btn .ui-btn-inner{min-height:2.5em}.ui-navbar-expanded .ui-navbar-noicons .ui-btn .ui-btn-inner{padding-top:1.8em;padding-bottom:1.9em}.ui-btn{display:block;text-align:center;cursor:pointer;position:relative;margin:.5em 5px;padding:0}.ui-header .ui-btn,.ui-footer .ui-btn,.ui-bar .ui-btn{display:inline-block;font-size:13px;margin:0}.ui-btn-inline{display:inline-block}.ui-btn-inner{padding:.6em 25px;display:block;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;position:relative;zoom:1}.ui-btn input,.ui-btn button{z-index:2}.ui-header .ui-btn-inner,.ui-footer .ui-btn-inner,.ui-bar .ui-btn-inner{padding:.4em 8px .5em}.ui-btn-icon-notext{width:24px;height:24px}.ui-btn-icon-notext .ui-btn-inner{padding:2px 1px 2px 3px}.ui-btn-text{position:relative;z-index:1}.ui-btn-icon-notext .ui-btn-text{position:absolute;left:-9999px}.ui-btn-icon-left .ui-btn-inner{padding-left:33px}.ui-header .ui-btn-icon-left .ui-btn-inner,.ui-footer .ui-btn-icon-left .ui-btn-inner,.ui-bar .ui-btn-icon-left .ui-btn-inner{padding-left:27px}.ui-btn-icon-right .ui-btn-inner{padding-right:33px}.ui-header .ui-btn-icon-right .ui-btn-inner,.ui-footer .ui-btn-icon-right .ui-btn-inner,.ui-bar .ui-btn-icon-right .ui-btn-inner{padding-right:27px}.ui-btn-icon-top .ui-btn-inner{padding-top:33px}.ui-header .ui-btn-icon-top .ui-btn-inner,.ui-footer .ui-btn-icon-top .ui-btn-inner,.ui-bar .ui-btn-icon-top .ui-btn-inner{padding-top:27px}.ui-btn-icon-bottom .ui-btn-inner{padding-bottom:33px}.ui-header .ui-btn-icon-bottom .ui-btn-inner,.ui-footer .ui-btn-icon-bottom .ui-btn-inner,.ui-bar .ui-btn-icon-bottom .ui-btn-inner{padding-bottom:27px}.ui-btn-icon-notext .ui-icon{display:block;z-index:0}.ui-btn-icon-left .ui-icon,.ui-btn-icon-right .ui-icon{position:absolute;top:50%;margin-top:-9px}.ui-btn-icon-top .ui-icon,.ui-btn-icon-bottom .ui-icon{position:absolute;left:50%;margin-left:-9px}.ui-btn-icon-left .ui-icon{left:10px}.ui-btn-icon-right .ui-icon{right:10px}.ui-btn-icon-top .ui-icon{top:10px}.ui-btn-icon-bottom .ui-icon{bottom:10px}.ui-header .ui-btn-icon-left .ui-icon,.ui-footer .ui-btn-icon-left .ui-icon,.ui-bar .ui-btn-icon-left .ui-icon{left:4px}.ui-header .ui-btn-icon-right .ui-icon,.ui-footer .ui-btn-icon-right .ui-icon,.ui-bar .ui-btn-icon-right .ui-icon{right:4px}.ui-header .ui-btn-icon-top .ui-icon,.ui-footer .ui-btn-icon-top .ui-icon,.ui-bar .ui-btn-icon-top .ui-icon{top:4px}.ui-header .ui-btn-icon-bottom .ui-icon,.ui-footer .ui-btn-icon-bottom .ui-icon,.ui-bar .ui-btn-icon-bottom .ui-icon{bottom:4px}.ui-btn-hidden{position:absolute;top:0;left:0;width:100%;height:100%;-webkit-appearance:button;opacity:.1;cursor:pointer;background:#fff;background:rgba(255,255,255,0);filter:Alpha(Opacity=.0001);font-size:1px;border:0;line-height:999px}.ui-collapsible{margin:.5em 0}.ui-collapsible-heading{font-size:16px;display:block;margin:0 -8px;padding:0;border-width:0 0 1px 0;position:relative}.ui-collapsible-heading a{text-align:left;margin:0}.ui-collapsible-heading a .ui-btn-inner{padding-left:40px}.ui-collapsible-heading a span.ui-btn{position:absolute;left:6px;top:50%;margin:-12px 0 0 0;width:20px;height:20px;padding:1px 0 1px 2px;text-indent:-9999px}.ui-collapsible-heading a span.ui-btn .ui-btn-inner{padding:10px 0}.ui-collapsible-heading a span.ui-btn .ui-icon{left:0;margin-top:-10px}.ui-collapsible-heading-status{position:absolute;top:-9999px;left:0}.ui-collapsible-content{display:block;margin:0 -8px;padding:10px 16px;border-top:0;background-image:none;font-weight:normal}.ui-collapsible-content-collapsed{display:none}.ui-collapsible-set{margin:.5em 0}.ui-collapsible-set .ui-collapsible{margin:-1px 0 0}.ui-controlgroup,fieldset.ui-controlgroup{padding:0;margin:.5em 0 1em}.ui-bar .ui-controlgroup{margin:0 .3em}.ui-controlgroup-label{font-size:16px;line-height:1.4;font-weight:normal;margin:0 0 .3em}.ui-controlgroup-controls{display:block;width:100%}.ui-controlgroup li{list-style:none}.ui-controlgroup-vertical .ui-btn,.ui-controlgroup-vertical .ui-checkbox,.ui-controlgroup-vertical .ui-radio{margin:0;border-bottom-width:0}.ui-controlgroup-controls label.ui-select{position:absolute;left:-9999px}.ui-controlgroup-vertical .ui-controlgroup-last{border-bottom-width:1px}.ui-controlgroup-horizontal{padding:0}.ui-controlgroup-horizontal .ui-btn,.ui-controlgroup-horizontal .ui-select{display:inline-block;margin:0 -5px 0 0}.ui-controlgroup-horizontal .ui-checkbox,.ui-controlgroup-horizontal .ui-radio{float:left;margin:0 -1px 0 0}.ui-controlgroup-horizontal .ui-checkbox .ui-btn,.ui-controlgroup-horizontal .ui-radio .ui-btn,.ui-controlgroup-horizontal .ui-checkbox:last-child,.ui-controlgroup-horizontal .ui-radio:last-child{margin-right:0}.ui-controlgroup-horizontal .ui-controlgroup-last{margin-right:0}.ui-controlgroup .ui-checkbox label,.ui-controlgroup .ui-radio label{font-size:16px}@media all and (min-width:450px){.ui-field-contain .ui-controlgroup-label{vertical-align:top;display:inline-block;width:20%;margin:0 2% 0 0}.ui-field-contain .ui-controlgroup-controls{width:60%;display:inline-block}.ui-field-contain .ui-controlgroup .ui-select{width:100%}.ui-field-contain .ui-controlgroup-horizontal .ui-select{width:auto}}.ui-dialog{min-height:480px}.ui-dialog .ui-header,.ui-dialog .ui-content,.ui-dialog .ui-footer{max-width:500px;margin:10% auto 15px auto;width:85%;position:relative}.ui-dialog .ui-header,.ui-dialog .ui-footer{padding:0 15px;z-index:10}.ui-dialog .ui-content{padding:15px}.ui-dialog .ui-content,.ui-dialog .ui-footer{margin-top:-15px}.ui-checkbox,.ui-radio{position:relative;margin:.2em 0 .5em;z-index:1}.ui-checkbox .ui-btn,.ui-radio .ui-btn{margin:0;text-align:left;z-index:2}.ui-checkbox .ui-btn-inner,.ui-radio .ui-btn-inner{white-space:normal}.ui-checkbox .ui-btn-icon-left .ui-btn-inner,.ui-radio .ui-btn-icon-left .ui-btn-inner{padding-left:45px}.ui-checkbox .ui-btn-icon-right .ui-btn-inner,.ui-radio .ui-btn-icon-right .ui-btn-inner{padding-right:45px}.ui-checkbox .ui-icon,.ui-radio .ui-icon{top:1.1em}.ui-checkbox .ui-btn-icon-left .ui-icon,.ui-radio .ui-btn-icon-left .ui-icon{left:15px}.ui-checkbox .ui-btn-icon-right .ui-icon,.ui-radio .ui-btn-icon-right .ui-icon{right:15px}.ui-checkbox input,.ui-radio input{position:absolute;left:20px;top:50%;width:10px;height:10px;margin:-5px 0 0 0;outline:0!important;z-index:1}.ui-field-contain{padding:1.5em 0;margin:0;border-bottom-width:1px;overflow:visible}.ui-field-contain:first-child{border-top-width:0}@media all and (min-width:450px){.ui-field-contain{border-width:0;padding:0;margin:1em 0}}.ui-select{display:block;position:relative}.ui-select select{position:absolute;left:-9999px;top:-9999px}.ui-select .ui-btn{overflow:hidden}.ui-select .ui-btn{opacity:1}.ui-select .ui-btn select{cursor:pointer;-webkit-appearance:button;left:0;top:0;width:100%;min-height:1.5em;min-height:100%;height:3em;max-height:100%;opacity:0;-ms-filter:"alpha(opacity=0)";filter:alpha(opacity=0);z-index:2}.ui-select .ui-disabled{opacity:.3}@-moz-document url-prefix(){.ui-select .ui-btn select{opacity:.0001}}.ui-select .ui-btn select.ui-select-nativeonly{opacity:1;text-indent:0}.ui-select .ui-btn-icon-right .ui-btn-inner{padding-right:45px}.ui-select .ui-btn-icon-right .ui-icon{right:15px}label.ui-select{font-size:16px;line-height:1.4;font-weight:normal;margin:0 0 .3em;display:block}.ui-select .ui-btn-text,.ui-selectmenu .ui-btn-text{display:block;min-height:1em;overflow:hidden}.ui-select .ui-btn-text{text-overflow:ellipsis}.ui-selectmenu{position:absolute;padding:0;z-index:1100!important;width:80%;max-width:350px;padding:6px}.ui-selectmenu .ui-listview{margin:0}.ui-selectmenu .ui-btn.ui-li-divider{cursor:default}.ui-selectmenu-hidden{top:-9999px;left:-9999px}.ui-selectmenu-screen{position:absolute;top:0;left:0;width:100%;height:100%;z-index:99}.ui-screen-hidden,.ui-selectmenu-list .ui-li .ui-icon{display:none}.ui-selectmenu-list .ui-li .ui-icon{display:block}.ui-li.ui-selectmenu-placeholder{display:none}.ui-selectmenu .ui-header .ui-title{margin:.6em 46px .8em}@media all and (min-width:450px){.ui-field-contain label.ui-select{vertical-align:top;display:inline-block;width:20%;margin:0 2% 0 0}.ui-field-contain .ui-select{width:60%;display:inline-block}}.ui-selectmenu .ui-header h1:after{content:'.';visibility:hidden}label.ui-input-text{font-size:16px;line-height:1.4;display:block;font-weight:normal;margin:0 0 .3em}input.ui-input-text,textarea.ui-input-text{background-image:none;padding:.4em;line-height:1.4;font-size:16px;display:block;width:97%}input.ui-input-text{-webkit-appearance:none}textarea.ui-input-text{height:50px;-webkit-transition:height 200ms linear;-moz-transition:height 200ms linear;-o-transition:height 200ms linear;transition:height 200ms linear}.ui-input-search{padding:0 30px;background-image:none;position:relative}.ui-icon-searchfield:after{position:absolute;left:7px;top:50%;margin-top:-9px;content:"";width:18px;height:18px;opacity:.5}.ui-input-search input.ui-input-text{border:0;width:98%;padding:.4em 0;margin:0;display:block;background:transparent none;outline:0!important}.ui-input-search .ui-input-clear{position:absolute;right:0;top:50%;margin-top:-13px}.ui-input-search .ui-input-clear-hidden{display:none}@media all and (min-width:450px){.ui-field-contain label.ui-input-text{vertical-align:top;display:inline-block;width:20%;margin:0 2% 0 0}.ui-field-contain input.ui-input-text,.ui-field-contain textarea.ui-input-text,.ui-field-contain .ui-input-search{width:60%;display:inline-block}.ui-field-contain .ui-input-search{width:50%}.ui-hide-label input.ui-input-text,.ui-hide-label textarea.ui-input-text,.ui-hide-label .ui-input-search{padding:.4em;width:97%}.ui-input-search input.ui-input-text{width:98%}}.ui-listview{margin:0;counter-reset:listnumbering}.ui-content .ui-listview{margin:-15px}.ui-content .ui-listview-inset{margin:1em 0}.ui-listview,.ui-li{list-style:none;padding:0}.ui-li,.ui-li.ui-field-contain{display:block;margin:0;position:relative;overflow:visible;text-align:left;border-width:0;border-top-width:1px}.ui-li .ui-btn-text a.ui-link-inherit{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.ui-li-divider,.ui-li-static{padding:.5em 15px;font-size:14px;font-weight:bold}.ui-li-divider{counter-reset:listnumbering}ol.ui-listview .ui-link-inherit:before,ol.ui-listview .ui-li-static:before,.ui-li-dec{font-size:.8em;display:inline-block;padding-right:.3em;font-weight:normal;counter-increment:listnumbering;content:counter(listnumbering) ". "}ol.ui-listview .ui-li-jsnumbering:before{content:""!important}.ui-listview-inset .ui-li{border-right-width:1px;border-left-width:1px}.ui-li:last-child,.ui-li.ui-field-contain:last-child{border-bottom-width:1px}.ui-li>.ui-btn-inner{display:block;position:relative;padding:0}.ui-li .ui-btn-inner a.ui-link-inherit,.ui-li-static.ui-li{padding:.7em 15px .7em 15px;display:block}.ui-li-has-thumb .ui-btn-inner a.ui-link-inherit,.ui-li-static.ui-li-has-thumb{min-height:60px;padding-left:100px}.ui-li-has-icon .ui-btn-inner a.ui-link-inherit,.ui-li-static.ui-li-has-icon{min-height:20px;padding-left:40px}.ui-li-has-count .ui-btn-inner a.ui-link-inherit,.ui-li-static.ui-li-has-count{padding-right:45px}.ui-li-has-arrow .ui-btn-inner a.ui-link-inherit,.ui-li-static.ui-li-has-arrow{padding-right:30px}.ui-li-has-arrow.ui-li-has-count .ui-btn-inner a.ui-link-inherit,.ui-li-static.ui-li-has-arrow.ui-li-has-count{padding-right:75px}.ui-li-has-count .ui-btn-text{padding-right:15px}.ui-li-heading{font-size:16px;font-weight:bold;display:block;margin:.6em 0;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.ui-li-desc{font-size:12px;font-weight:normal;display:block;margin:-.5em 0 .6em;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.ui-li-thumb,.ui-listview .ui-li-icon{position:absolute;left:1px;top:0;max-height:80px;max-width:80px}.ui-listview .ui-li-icon{max-height:40px;max-width:40px;left:10px;top:.9em}.ui-li-thumb,.ui-listview .ui-li-icon,.ui-li-content{float:left;margin-right:10px}.ui-li-aside{float:right;width:50%;text-align:right;margin:.3em 0}@media all and (min-width:480px){.ui-li-aside{width:45%}}.ui-li-divider{cursor:default}.ui-li-has-alt .ui-btn-inner a.ui-link-inherit,.ui-li-static.ui-li-has-alt{padding-right:95px}.ui-li-has-count .ui-li-count{position:absolute;font-size:11px;font-weight:bold;padding:.2em .5em;top:50%;margin-top:-.9em;right:38px}.ui-li-divider .ui-li-count,.ui-li-static .ui-li-count{right:10px}.ui-li-has-alt .ui-li-count{right:55px}.ui-li-link-alt{position:absolute;width:40px;height:100%;border-width:0;border-left-width:1px;top:0;right:0;margin:0;padding:0;z-index:2}.ui-li-link-alt .ui-btn{overflow:hidden;position:absolute;right:8px;top:50%;margin:-11px 0 0 0;border-bottom-width:1px;z-index:-1}.ui-li-link-alt .ui-btn-inner{padding:0;height:100%;position:absolute;width:100%;top:0;left:0}.ui-li-link-alt .ui-btn .ui-icon{right:50%;margin-right:-9px}.ui-listview * .ui-btn-inner>.ui-btn>.ui-btn-inner{border-top:0}.ui-listview-filter{border-width:0;overflow:hidden;margin:-15px -15px 15px -15px}.ui-listview-filter .ui-input-search{margin:5px;width:auto;display:block}.ui-listview-filter-inset{margin:-15px -5px -15px -5px;background:transparent}.ui-li.ui-screen-hidden{display:none}@media only screen and (min-device-width:768px) and (max-device-width:1024px){.ui-li .ui-btn-text{overflow:visible}}label.ui-slider{font-size:16px;line-height:1.4;font-weight:normal;margin:0 0 .3em;display:block}input.ui-slider-input,.ui-field-contain input.ui-slider-input{display:inline-block;width:50px}select.ui-slider-switch{display:none}div.ui-slider{position:relative;display:inline-block;overflow:visible;height:15px;padding:0;margin:0 2% 0 20px;top:4px;width:60%}div.ui-slider-switch{width:99.8%}a.ui-slider-handle{position:absolute;z-index:10;top:50%;width:28px;height:28px;margin-top:-15px;margin-left:-15px}a.ui-slider-handle .ui-btn-inner{padding-left:0;padding-right:0}@media all and (min-width:480px){.ui-field-contain label.ui-slider{vertical-align:top;display:inline-block;width:20%;margin:0 2% 0 0}.ui-field-contain div.ui-slider{width:43%}}div.ui-slider-switch{height:32px;overflow:hidden;margin-left:0}div.ui-slider-inneroffset{margin-left:50%;position:absolute;top:1px;height:100%;width:50%}a.ui-slider-handle-snapping{-webkit-transition:left 70ms linear}div.ui-slider-labelbg{position:absolute;top:0;margin:0;border-width:0}div.ui-slider-switch div.ui-slider-labelbg-a{width:60%;height:100%;left:0}div.ui-slider-switch div.ui-slider-labelbg-b{width:60%;height:100%;right:0}.ui-slider-switch-a div.ui-slider-labelbg-a,.ui-slider-switch-b div.ui-slider-labelbg-b{z-index:-1}.ui-slider-switch-a div.ui-slider-labelbg-b,.ui-slider-switch-b div.ui-slider-labelbg-a{z-index:0}div.ui-slider-switch a.ui-slider-handle{z-index:20;width:101%;height:32px;margin-top:-18px;margin-left:-101%}span.ui-slider-label{width:100%;position:absolute;height:32px;font-size:16px;text-align:center;line-height:2;background:0;border-color:transparent}span.ui-slider-label-a{left:-100%;margin-right:-1px}span.ui-slider-label-b{right:-100%;margin-left:-1px} \ No newline at end of file diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/project/filesystem.html b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/project/filesystem.html new file mode 100644 index 0000000..3d27b34 --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/project/filesystem.html @@ -0,0 +1,109 @@ + + + + + + Tizen API Demos + + + + + + + + + +
        +
        +

        Kitchen Sink

        + Home + Exit +
        + +
        +
        +

        Filesystem

        +

        API that allows accessing the device file system.

        + +
          +
        • resolve +

          Resolves a location to a File handle.

          +
        • listFiles +

          Returns list of all files of this directory.

          + Demo +
          + Run Code +
          + function successCB(files) {
          +   
          +   alert("There are " + files.length  + "files in the selected folder");
          +   
          +   var result = new Array();
          +   for (var i = 0; i < files.length; i++) {
          +      if (files[i].isDirectory == true) {   
          +         result[i] = "directory name : " + files[i].name;
          +      }
          +      else {
          +         result[i] = "file name : " + files[i].name;
          +      }
          +   }
          +   if (result.length)
          +      alert(result.join("\n"));
          +
          + }
          +
          + function errorCB(error) {
          +   alert("The error " + error.message + " occurred when listing the files in the selected folder");
          + }
          +
          + tizen.filesystem.resolve(
          +      "images",
          +     function(dir){
          +       dir.listFiles(successCB, errorCB)
          +     }, function(e){
          +       alert("Error " + e.message);
          +     }, "r"
          + );
          +
          +
          + +
        • listStorages +

          List the available storages on the device.

          + Demo +
          + Run Code +
          +        function on_success(storages)
          +        {
          +                for (var i in storages) {
          +                        alert("Storage[" + i + 
          +                                        "] Label[" + storages[i].label + 
          +                                        "] Type[" + storages[i].type +
          +                                        "] State[" + storages[i].state + "]");
          +                }
          +        }
          +        function on_error(err)
          +        {
          +                alert("Error occurred: [" + err.message +"]");
          +        }
          +        tizen.filesystem.listStorages(on_success, on_error);
          +
          +
          +
        +
        + +
        +
        +

        API Demos

        +
          +
        +
        +
        +
        + + +
        + + diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/project/geocoder.html b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/project/geocoder.html new file mode 100644 index 0000000..88dd2cd --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/project/geocoder.html @@ -0,0 +1,117 @@ + + + + + + Tizen API Demos + + + + + + + + + + +
        +
        +

        Kitchen Sink

        + Home + Exit +
        + +
        +
        +

        Geocoder

        +

        This API provides interface and methods for transforming an address to a coordinate.

        + +
          +
        • getDefaultProvider +

          Get the default GeocoderProvider

          + geocode +

          Transform address to coordinates

          + ID + PASSWORD + + Demo +
          + Run Code +
          +function geocoding()
          +{
          +	try
          +	{
          +		addr = 'Seoul';
          +		ret = tizen.lbs.geocoder.getDefaultProvider().geocode(addr, onsuccess, errorcb, null);
          +	}catch(err)
          +	{
          +		alert('error : '+ err.message);
          +	}
          +}
          +
          +function onsuccess(results)
          +{
          +	for(i =0 ; results.length;  i++)
          +	{
          +		alert("latitude: "+results[i].coordinates.latitude+", longitude: "+ results[i].coordinates.longitude);
          +	}
          +}
          +
          +function errorcb()
          +{
          +	alert('Converting fail !!!!');
          +}
          +
          +geocoding();
          +
          +
          +
          +
        +
        + +
        +
        +

        API Demos

        +
          +
        +
        +
        +
        + + +
        + + + diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/project/icon.png b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/project/icon.png new file mode 100755 index 0000000..b0979b1 Binary files /dev/null and b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/project/icon.png differ diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/project/index.html b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/project/index.html new file mode 100644 index 0000000..b598e95 --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/project/index.html @@ -0,0 +1,47 @@ + + + + + + + + Tizen Web IDE - Tizen - Kitchen Sink + + + + + + + + + + + +
        +
        +

        Kitchen Sink

        + Home + Exit +
        + +
        +
        +

        Kitchen Sink

        +

        The Kitchen Sink is an app that demonstrates some of the Tizen APIs.

        +
        + +
        +
        +

        API Demos

        +
          +
        +
        +
        +
        + + +
        + + diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/project/js/demo.js b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/project/js/demo.js new file mode 100644 index 0000000..97a7b58 --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/project/js/demo.js @@ -0,0 +1,64 @@ +function run(o) { + var code = $(o).parent().find('pre').text(); + eval(code); +} + +// disable ajax to call ready() for each document +$.mobile.ajaxEnabled = false; + +//Initialize function +var init = function () { + console.log("init() called"); + + $('#toc').load('toc.html', function() { + $('#toc').listview('refresh'); + }); + + $(".content").hide(); + // toggle the component with class msg_body + $(".heading").hover(function() { + $(this).css("cursor", "pointer"); + }); + $(".heading").click(function () { + $(this).next(".content").slideToggle(300); + }); + + $('#closeBt').click(function () { + tizen.application.exit(); + }); +}; +$(document).ready(init); + +/** +* Shows a toast message. +* +* @param msg +* @param options { duration: , fadeOut: } +*/ +jQuery.fn.toast = function (msg, options) { + var settings = jQuery.extend({ + duration: 1500, fadeOut: 1000 + }, options); + + $("

        " + msg + "

        ").css({ + "display": "block", + "top": $(window).scrollTop() + 150 + }) + .appendTo($.mobile.pageContainer) + .delay(settings.duration) + .fadeOut(settings.fadeOut, function() { + $(this).remove(); + } + ); +}; + +// Override alert function +/* It must be sequential. For example, toast() in for loop can not display each information. +function alert(s) { + $().toast(s); +} +*/ +function toastMessage(s) { + $().toast(s); +} + diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/project/js/jqm-docs.js b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/project/js/jqm-docs.js new file mode 100644 index 0000000..ffe9526 --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/project/js/jqm-docs.js @@ -0,0 +1,55 @@ +//set up the theme switcher on the homepage +$('div').live('pagecreate',function(event){ + if( !$(this).is('.ui-dialog')){ + var appendEl = $(this).find('.ui-footer:last'); + + if( !appendEl.length ){ + appendEl = $(this).find('.ui-content'); + } + + if( appendEl.is("[data-position]") ){ + return; + } + + $('Switch theme') + .buttonMarkup({ + 'icon':'gear', + 'inline': true, + 'shadow': false, + 'theme': 'd' + }) + .appendTo( appendEl ) + .wrap('
        ') + .bind( "vclick", function(){ + $.themeswitcher(); + }); + } + +}); + +//collapse page navs after use +$(function(){ + $('body').delegate('.content-secondary .ui-collapsible-content', 'click', function(){ + $(this).trigger("collapse") + }); +}); + +function setDefaultTransition(){ + var winwidth = $( window ).width(), + trans ="slide"; + + if( winwidth >= 1000 ){ + trans = "none"; + } + else if( winwidth >= 650 ){ + trans = "fade"; + } + + $.mobile.defaultPageTransition = trans; +} + + +$(function(){ + setDefaultTransition(); + $( window ).bind( "throttledresize", setDefaultTransition ); +}); \ No newline at end of file diff --git a/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/project/js/jquery.mobile-1.0.min.js b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/project/js/jquery.mobile-1.0.min.js new file mode 100644 index 0000000..0fca54b --- /dev/null +++ b/org.tizen.web.project.sample/templates/Sample/Tizen/Device API/Kitchen Sink/project/js/jquery.mobile-1.0.min.js @@ -0,0 +1,172 @@ +/*! jQuery Mobile v1.0 jquerymobile.com | jquery.org/license */ +(function(a,e){if(a.cleanData){var b=a.cleanData;a.cleanData=function(f){for(var c=0,h;(h=f[c])!=null;c++)a(h).triggerHandler("remove");b(f)}}else{var d=a.fn.remove;a.fn.remove=function(b,c){return this.each(function(){c||(!b||a.filter(b,[this]).length)&&a("*",this).add([this]).each(function(){a(this).triggerHandler("remove")});return d.call(a(this),b,c)})}}a.widget=function(b,c,h){var d=b.split(".")[0],e,b=b.split(".")[1];e=d+"-"+b;if(!h)h=c,c=a.Widget;a.expr[":"][e]=function(c){return!!a.data(c, +b)};a[d]=a[d]||{};a[d][b]=function(a,b){arguments.length&&this._createWidget(a,b)};c=new c;c.options=a.extend(true,{},c.options);a[d][b].prototype=a.extend(true,c,{namespace:d,widgetName:b,widgetEventPrefix:a[d][b].prototype.widgetEventPrefix||b,widgetBaseClass:e},h);a.widget.bridge(b,a[d][b])};a.widget.bridge=function(b,c){a.fn[b]=function(d){var g=typeof d==="string",i=Array.prototype.slice.call(arguments,1),k=this,d=!g&&i.length?a.extend.apply(null,[true,d].concat(i)):d;if(g&&d.charAt(0)==="_")return k; +g?this.each(function(){var c=a.data(this,b);if(!c)throw"cannot call methods on "+b+" prior to initialization; attempted to call method '"+d+"'";if(!a.isFunction(c[d]))throw"no such method '"+d+"' for "+b+" widget instance";var g=c[d].apply(c,i);if(g!==c&&g!==e)return k=g,false}):this.each(function(){var e=a.data(this,b);e?e.option(d||{})._init():a.data(this,b,new c(d,this))});return k}};a.Widget=function(a,b){arguments.length&&this._createWidget(a,b)};a.Widget.prototype={widgetName:"widget",widgetEventPrefix:"", +options:{disabled:false},_createWidget:function(b,c){a.data(c,this.widgetName,this);this.element=a(c);this.options=a.extend(true,{},this.options,this._getCreateOptions(),b);var d=this;this.element.bind("remove."+this.widgetName,function(){d.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){var b={};a.metadata&&(b=a.metadata.get(element)[this.widgetName]);return b},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName); +this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(b,c){var d=b;if(arguments.length===0)return a.extend({},this.options);if(typeof b==="string"){if(c===e)return this.options[b];d={};d[b]=c}this._setOptions(d);return this},_setOptions:function(b){var c=this;a.each(b,function(a,b){c._setOption(a,b)});return this},_setOption:function(a,b){this.options[a]=b;a==="disabled"&& +this.widget()[b?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",b);return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(b,c,d){var e=this.options[b],c=a.Event(c);c.type=(b===this.widgetEventPrefix?b:this.widgetEventPrefix+b).toLowerCase();d=d||{};if(c.originalEvent)for(var b=a.event.props.length,i;b;)i=a.event.props[--b],c[i]=c.originalEvent[i];this.element.trigger(c, +d);return!(a.isFunction(e)&&e.call(this.element[0],c,d)===false||c.isDefaultPrevented())}}})(jQuery); +(function(a,e){a.widget("mobile.widget",{_createWidget:function(){a.Widget.prototype._createWidget.apply(this,arguments);this._trigger("init")},_getCreateOptions:function(){var b=this.element,d={};a.each(this.options,function(a){var c=b.jqmData(a.replace(/[A-Z]/g,function(a){return"-"+a.toLowerCase()}));c!==e&&(d[a]=c)});return d},enhanceWithin:function(b){var d=a(b).closest(":jqmData(role='page')").data("page"),d=d&&d.keepNativeSelector()||"";a(this.options.initSelector,b).not(d)[this.widgetName]()}})})(jQuery); +(function(a){a(window);var e=a("html");a.mobile.media=function(){var b={},d=a("
        "),f=a("").append(d);return function(a){if(!(a in b)){var h=document.createElement("style"),g="@media "+a+" { #jquery-mediatest { position:absolute; } }";h.type="text/css";h.styleSheet?h.styleSheet.cssText=g:h.appendChild(document.createTextNode(g));e.prepend(f).prepend(h);b[a]=d.css("position")==="absolute";f.add(h).remove()}return b[a]}}()})(jQuery); +(function(a,e){function b(a){var b=a.charAt(0).toUpperCase()+a.substr(1),a=(a+" "+c.join(b+" ")+b).split(" "),d;for(d in a)if(f[a[d]]!==e)return true}var d=a("").prependTo("html"),f=d[0].style,c=["Webkit","Moz","O"],h="palmGetResource"in window,g=window.operamini&&{}.toString.call(window.operamini)==="[object OperaMini]",i=window.blackberry;a.mobile.browser={};a.mobile.browser.ie=function(){for(var a=3,b=document.createElement("div"),c=b.all||[];b.innerHTML="<\!--[if gt IE "+ ++a+"]>
        ", +c[0];);return a>4?a:!a}();a.extend(a.support,{orientation:"orientation"in window&&"onorientationchange"in window,touch:"ontouchend"in document,cssTransitions:"WebKitTransitionEvent"in window,pushState:"pushState"in history&&"replaceState"in history,mediaquery:a.mobile.media("only all"),cssPseudoElement:!!b("content"),touchOverflow:!!b("overflowScrolling"),boxShadow:!!b("boxShadow")&&!i,scrollTop:("pageXOffset"in window||"scrollTop"in document.documentElement||"scrollTop"in d[0])&&!h&&!g,dynamicBaseTag:function(){var b= +location.protocol+"//"+location.host+location.pathname+"ui-dir/",c=a("head base"),f=null,e="",h;c.length?e=c.attr("href"):c=f=a("",{href:b}).appendTo("head");h=a("").prependTo(d)[0].href;c[0].href=e||location.pathname;f&&f.remove();return h.indexOf(b)===0}()});d.remove();h=function(){var a=window.navigator.userAgent;return a.indexOf("Nokia")>-1&&(a.indexOf("Symbian/3")>-1||a.indexOf("Series60/5")>-1)&&a.indexOf("AppleWebKit")>-1&&a.match(/(BrowserNG|NokiaBrowser)\/7\.[0-3]/)}(); +a.mobile.ajaxBlacklist=window.blackberry&&!window.WebKitPoint||g||h;h&&a(function(){a("head link[rel='stylesheet']").attr("rel","alternate stylesheet").attr("rel","stylesheet")});a.support.boxShadow||a("html").addClass("ui-mobile-nosupport-boxshadow")})(jQuery); +(function(a,e,b,d){function f(a){for(;a&&typeof a.originalEvent!=="undefined";)a=a.originalEvent;return a}function c(b){for(var c={},f,d;b;){f=a.data(b,n);for(d in f)if(f[d])c[d]=c.hasVirtualBinding=true;b=b.parentNode}return c}function h(){v&&(clearTimeout(v),v=0);v=setTimeout(function(){E=v=0;u.length=0;D=false;y=true},a.vmouse.resetTimerDuration)}function g(b,c,r){var e,h;if(!(h=r&&r[b])){if(r=!r)a:{for(r=c.target;r;){if((h=a.data(r,n))&&(!b||h[b]))break a;r=r.parentNode}r=null}h=r}if(h){e=c;var r= +e.type,j,g;e=a.Event(e);e.type=b;h=e.originalEvent;j=a.event.props;if(h)for(g=j.length;g;)b=j[--g],e[b]=h[b];if(r.search(/mouse(down|up)|click/)>-1&&!e.which)e.which=1;if(r.search(/^touch/)!==-1&&(b=f(h),r=b.touches,b=b.changedTouches,r=r&&r.length?r[0]:b&&b.length?b[0]:d))for(h=0,len=z.length;he||Math.abs(d.pageY- +t)>e;flags=c(b.target);w&&!r&&g("vmousecancel",b,flags);g("vmousemove",b,flags);h()}}function m(a){if(!y){y=true;var b=c(a.target),d;g("vmouseup",a,b);if(!w&&(d=g("vclick",a,b))&&d.isDefaultPrevented())d=f(a).changedTouches[0],u.push({touchID:E,x:d.clientX,y:d.clientY}),D=true;g("vmouseout",a,b);w=false;h()}}function p(b){var b=a.data(b,n),c;if(b)for(c in b)if(b[c])return true;return false}function j(){}function q(b){var c=b.substr(1);return{setup:function(){p(this)||a.data(this,n,{});a.data(this, +n)[b]=true;s[b]=(s[b]||0)+1;s[b]===1&&B.bind(c,i);a(this).bind(c,j);if(C)s.touchstart=(s.touchstart||0)+1,s.touchstart===1&&B.bind("touchstart",k).bind("touchend",m).bind("touchmove",o).bind("scroll",l)},teardown:function(){--s[b];s[b]||B.unbind(c,i);C&&(--s.touchstart,s.touchstart||B.unbind("touchstart",k).unbind("touchmove",o).unbind("touchend",m).unbind("scroll",l));var d=a(this),f=a.data(this,n);f&&(f[b]=false);d.unbind(c,j);p(this)||d.removeData(n)}}}var n="virtualMouseBindings",A="virtualTouchID", +e="vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel".split(" "),z="clientX clientY pageX pageY screenX screenY".split(" "),s={},v=0,x=0,t=0,w=false,u=[],D=false,y=false,C="addEventListener"in b,B=a(b),r=1,E=0;a.vmouse={moveDistanceThreshold:10,clickDistanceThreshold:10,resetTimerDuration:1500};for(var F=0;Fa.event.special.swipe.scrollSupressionThreshold&& +b.preventDefault()}}var e=c.originalEvent.touches?c.originalEvent.touches[0]:c,m={time:(new Date).getTime(),coords:[e.pageX,e.pageY],origin:a(c.target)},p;d.bind(g,f).one(h,function(){d.unbind(g,f);m&&p&&p.time-m.timea.event.special.swipe.horizontalDistanceThreshold&&Math.abs(m.coords[1]-p.coords[1])p.coords[0]?"swipeleft":"swiperight"); +m=p=b})})}};(function(a,b){function c(){var a=f();a!==e&&(e=a,d.trigger("orientationchange"))}var d=a(b),f,e;a.event.special.orientationchange={setup:function(){if(a.support.orientation&&a.mobile.orientationChangeEnabled)return false;e=f();d.bind("throttledresize",c)},teardown:function(){if(a.support.orientation&&a.mobile.orientationChangeEnabled)return false;d.unbind("throttledresize",c)},add:function(a){var b=a.handler;a.handler=function(a){a.orientation=f();return b.apply(this,arguments)}}};a.event.special.orientationchange.orientation= +f=function(){var c=true,c=document.documentElement;return(c=a.support.orientation?b.orientation%180==0:c&&c.clientWidth/c.clientHeight<1.1)?"portrait":"landscape"}})(jQuery,e);(function(){a.event.special.throttledresize={setup:function(){a(this).bind("resize",b)},teardown:function(){a(this).unbind("resize",b)}};var b=function(){f=(new Date).getTime();e=f-c;e>=250?(c=f,a(this).trigger("throttledresize")):(d&&clearTimeout(d),d=setTimeout(b,250-e))},c=0,d,f,e})();a.each({scrollstop:"scrollstart",taphold:"tap", +swipeleft:"swipe",swiperight:"swipe"},function(b,c){a.event.special[b]={setup:function(){a(this).bind(c,a.noop)}}})})(jQuery,this); +(function(a,e,b){function d(a){a=a||location.href;return"#"+a.replace(/^[^#]*#?(.*)$/,"$1")}var f="hashchange",c=document,h,g=a.event.special,i=c.documentMode,k="on"+f in e&&(i===b||i>7);a.fn[f]=function(a){return a?this.bind(f,a):this.trigger(f)};a.fn[f].delay=50;g[f]=a.extend(g[f],{setup:function(){if(k)return false;a(h.start)},teardown:function(){if(k)return false;a(h.stop)}});h=function(){function h(){var b=d(),c=n(p);if(b!==p)q(p=b,c),a(e).trigger(f);else if(c!==p)location.href=location.href.replace(/#.*/, +"")+c;i=setTimeout(h,a.fn[f].delay)}var g={},i,p=d(),j=function(a){return a},q=j,n=j;g.start=function(){i||h()};g.stop=function(){i&&clearTimeout(i);i=b};a.browser.msie&&!k&&function(){var b,e;g.start=function(){if(!b)e=(e=a.fn[f].src)&&e+d(),b=a('