Merge remote-tracking branch 'origin/develop' into tizen 16/19316/1
authornakyoung2.choi <nakyoung2.choi@samsung.com>
Thu, 10 Apr 2014 08:35:46 +0000 (17:35 +0900)
committernakyoung2.choi <nakyoung2.choi@samsung.com>
Thu, 10 Apr 2014 08:35:46 +0000 (17:35 +0900)
* origin/develop:
  PROJTEMP : Modify predefined animation descriptor Change rotate to rotateZ in rollIn, rollOut Seperate proerty in flip
  DATABIND : Fixed a bug in the code generation.
  PROJTEMP : Modify predefined animation descriptor Add keyframe for bounce. Change property name for rollIn, rollOut(rotate -> rotateZ)
  PROJTEMP: add dataSourceCallhistory class (uibinding.js) a. parameters are changed to the upper case b. add new class that dataSourceCallhistory
  PROJTEMP: fix the Calendar Class a. add device apis ( unified, default, selected calendarId)
  PROJTEMP: add dataSourceCalendar class in the uibinding.js a. rename the parameter, from type to method b. define the new class for dataSourceCalendar that using tizen calendar apis
  UIB : Update ground.js for live dom.

Change-Id: I837f1bbc5bbea99d39fac6997c8bdda857854b94
Signed-off-by: nakyoung2.choi <nakyoung2.choi@samsung.com>
28 files changed:
templates/Template/Tizen Web UI Builder/1.EmptyProject/project/tizen-ui-builder-fw/uibinding.js
templates/Template/Tizen Web UI Builder/1.EmptyProject/project/tizen-ui-builder-tool/res/animator/css/tizen.animator.emphasis.bounce.xml
templates/Template/Tizen Web UI Builder/1.EmptyProject/project/tizen-ui-builder-tool/res/animator/css/tizen.animator.emphasis.flip.xml
templates/Template/Tizen Web UI Builder/1.EmptyProject/project/tizen-ui-builder-tool/res/animator/css/tizen.animator.exit.rollIn.xml
templates/Template/Tizen Web UI Builder/1.EmptyProject/project/tizen-ui-builder-tool/res/animator/css/tizen.animator.exit.rollOut.xml
templates/Template/Tizen Web UI Builder/1.EmptyProject/project/tizen-ui-builder-tool/res/html/ground.js
templates/Template/Tizen Web UI Builder/1.EmptyProject/project/tizen-ui-builder-tool/res/xslt/index_managed_js_ver0_0_1.xslt
templates/Template/Tizen Web UI Builder/2.SinglePageProject/project/tizen-ui-builder-fw/uibinding.js
templates/Template/Tizen Web UI Builder/2.SinglePageProject/project/tizen-ui-builder-tool/res/animator/css/tizen.animator.emphasis.bounce.xml
templates/Template/Tizen Web UI Builder/2.SinglePageProject/project/tizen-ui-builder-tool/res/animator/css/tizen.animator.emphasis.flip.xml
templates/Template/Tizen Web UI Builder/2.SinglePageProject/project/tizen-ui-builder-tool/res/animator/css/tizen.animator.exit.rollIn.xml
templates/Template/Tizen Web UI Builder/2.SinglePageProject/project/tizen-ui-builder-tool/res/animator/css/tizen.animator.exit.rollOut.xml
templates/Template/Tizen Web UI Builder/2.SinglePageProject/project/tizen-ui-builder-tool/res/html/ground.js
templates/Template/Tizen Web UI Builder/2.SinglePageProject/project/tizen-ui-builder-tool/res/xslt/index_managed_js_ver0_0_1.xslt
templates/Template/Tizen Web UI Builder/3.MultiPageProject/project/tizen-ui-builder-fw/uibinding.js
templates/Template/Tizen Web UI Builder/3.MultiPageProject/project/tizen-ui-builder-tool/res/animator/css/tizen.animator.emphasis.bounce.xml
templates/Template/Tizen Web UI Builder/3.MultiPageProject/project/tizen-ui-builder-tool/res/animator/css/tizen.animator.emphasis.flip.xml
templates/Template/Tizen Web UI Builder/3.MultiPageProject/project/tizen-ui-builder-tool/res/animator/css/tizen.animator.exit.rollIn.xml
templates/Template/Tizen Web UI Builder/3.MultiPageProject/project/tizen-ui-builder-tool/res/animator/css/tizen.animator.exit.rollOut.xml
templates/Template/Tizen Web UI Builder/3.MultiPageProject/project/tizen-ui-builder-tool/res/html/ground.js
templates/Template/Tizen Web UI Builder/3.MultiPageProject/project/tizen-ui-builder-tool/res/xslt/index_managed_js_ver0_0_1.xslt
templates/Template/Tizen Web UI Builder/4.NavigationProject/project/tizen-ui-builder-fw/uibinding.js
templates/Template/Tizen Web UI Builder/4.NavigationProject/project/tizen-ui-builder-tool/res/animator/css/tizen.animator.emphasis.bounce.xml
templates/Template/Tizen Web UI Builder/4.NavigationProject/project/tizen-ui-builder-tool/res/animator/css/tizen.animator.emphasis.flip.xml
templates/Template/Tizen Web UI Builder/4.NavigationProject/project/tizen-ui-builder-tool/res/animator/css/tizen.animator.exit.rollIn.xml
templates/Template/Tizen Web UI Builder/4.NavigationProject/project/tizen-ui-builder-tool/res/animator/css/tizen.animator.exit.rollOut.xml
templates/Template/Tizen Web UI Builder/4.NavigationProject/project/tizen-ui-builder-tool/res/html/ground.js
templates/Template/Tizen Web UI Builder/4.NavigationProject/project/tizen-ui-builder-tool/res/xslt/index_managed_js_ver0_0_1.xslt

index 90a0f72..b168a3b 100644 (file)
        /** 
         * dataSourceContact 
         * 
-        * @param addressBookType
-        *   a. all_addressbooks
-        *   b. unified_addressbook
-        *   c. default_addressbook
-        *   d. selected_addressbook
+        * @param method
+        *   a. ALL
+        *   b. UNIFIED
+        *   c. DEFAULT
+        *   d. SELECTED_ADDRESSBOOKID
         * 
         * @param addressBookId
-        *   : set up an addressbookId only when addressBookType was selected_addressbook
+        *   : set up an addressbookId only when 'method' was SELECTED_ADDRESSBOOKID
         **/
        uibinding.dataSourceContact = function () {
                if (arguments.length !== 1) {
 
                var _self = this;
                _self.options = {
-                               addressBookType: "",
+                               method: "ALL",
                                addressBookId: ""
                };
 
                _self.data = {};
                _self.data.addressbooks = [];
 
-               var _addrBookType = _self.options.addressBookType ? _self.options.addressBookType : null;
-               var _addrBookId = (_addrBookType == "selected_addressbook") ? _self.options.addressBookId : null;
+               var _method = _self.options.method ? _self.options.method : null;
+               var _addrBookId = (_method == "SELECTED_ADDRESSBOOKID") ? _self.options.addressBookId : null;
                var _addr = null;
 
                function _error (error) {
                        }
                }
 
-               if (_addrBookType === "all_addressbooks") {
+               if (_method === "ALL") {
                        tizen.contact.getAddressBooks(_addressbooksFound, _error);
                } else {
-                       if (_addrBookType === "unified_addressbook") {
+                       if (_method === "UNIFIED") {
                                _addr = tizen.contact.getUnifiedAddressBook();
-                       } else if (_addrBookType === "default_addressbook") {
+                       } else if (_method === "DEFAULT") {
                                _addr = tizen.contact.getDefaultAddressBook();
-                       } else if (_addrBookType === "selected_addressbook") {
+                       } else if (_method === "SELECTED_ADDRESSBOOKID") {
                                _addr = tizen.contact.getAddressBook(_addrBookId);
                        } else {
                                _error({
                                        name : "InvalidValuesError"
                                });
+                               return;
                        }
                        _addr.contacts = [];
                        _addr.find(_contactsFound, _error, null);
                _self._update();
                return _self;
        };
+
+       /**
+        * dataSourceCalendar
+        * 
+        * @param method
+        *   a. ALL
+        *   b. UNIFIED
+        *   c. DEFAULT
+        *   d. SELECTED_CALENDARID
+        *   
+        * @param calendarId
+        *   : calendar id
+        *   
+        * @param calendarType
+        *   : the type of a calendar
+        *   a. EVENT
+        *   b. TASK
+        */
+       uibinding.dataSourceCalendar = function () {
+               if (arguments.length !== 1) {
+                       return false; 
+               }
+
+               var _self = this;
+               _self.options = {
+                               method: "ALL",
+                               calendarType: "EVENT",
+                               calendarId: ""                          
+               };
+
+               var args = Array.prototype.slice.call(arguments, 0);
+               var new_options = args.shift();
+               _self._create(new_options);
+               return _self;
+       };
+       uibinding.dataSourceCalendar.prototype = new uibinding.dataSource();
+       uibinding.dataSourceCalendar.prototype.constructor = uibinding.dataSourceCalendar;
+       uibinding.dataSourceCalendar.prototype._create = function (obj) {
+               var _self = this;
+               if (arguments.length > 0) {
+                       _self._updateOptions(obj);
+               }
+       };
+       uibinding.dataSourceCalendar.prototype._update = function () {
+               var _self = this;
+               _self.data = {};
+               _self.data.calendars = [];
+
+               var _method = _self.options.method ? _self.options.method : null;
+               var _calendarType = _self.options.calendarType ? _self.options.calendarType : null;
+               var _calendarId = (_method == "SELECTED_CALENDARID") ? _self.options.calendarId : null;
+               var _calendar = null;
+               var _calendarItem = null;
+               var _filter = null;
+
+               function _error (error) {
+                       console.log("Error: " + error.name);
+                       _self.fireHandler("error");
+               }
+
+               function _calendarFound (events) {
+                       var eventsLength = events.length;
+                       for (var i = 0; i < eventsLength; i++) {
+                               var _event = {};
+                               _event = events[i];
+
+                               var event = {};
+
+                               for (var item in _event) {
+                                       if (_event[item] instanceof tizen.TZDate == true) {
+                                               var tzdate = _event[item];
+                                               tzdate["date"] = tzdate.getDate();
+                                               tzdate["fullYear"] = tzdate.getFullYear();
+                                               tzdate["month"] = tzdate.getMonth();
+                                               tzdate["day"] = tzdate.getDay();
+                                               tzdate["hours"] = tzdate.getHours();
+                                               tzdate["minutes"] = tzdate.getMinutes();
+                                               tzdate["seconds"] = tzdate.getSeconds();
+                                               tzdate["milliseconds"] = tzdate.getMilliseconds();
+                                               tzdate["timezone"] = tzdate.getTimezone();
+                                               tzdate["dateString"] = tzdate.toDateString();
+                                               tzdate["string"] = tzdate.toString();
+
+                                               event[item] = tzdate;
+
+                                       } else {
+                                               event[item] = _event[item];
+                                       }
+                               }
+                               _calendar.events.push(event);
+                       }
+               }
+
+               function _calendarsFound (calendars) {
+                       var calendarLength = calendars.length;
+                       if (calendarLength > 0) {
+                               for (var i = 0; i < calendarLength; i++) {
+                                       _calendar = {};
+                                       _calendar = calendars[i];
+                                       _calendar.events = [];
+
+                                       _calendar.find(_calendarFound, _error, _filter);
+
+                                       _self.data.calendars.push(_calendar);
+                               }
+                       }
+               }
+
+               if (_method === "ALL") {
+                       tizen.calendar.getCalendars(_calendarType, _calendarsFound, _error);
+               } else {
+                       if (_method === "UNIFIED") {
+                               _calendar = tizen.calendar.getUnifiedCalendar(_calendarType);
+                       } else if (_method === "DEFAULT") {
+                               _calendar = tizen.calendar.getDefaultCalendar(_calendarType);
+                       } else if (_method === "SELECTED_CALENDARID") {
+                               _calendar = tizen.calendar.getCalendar(_calendarType, _calendarId);
+                       } else {
+                               _error({
+                                       name : "InvalidValuesError"
+                               });
+                               return;
+                       }
+                       _calendar.events = [];
+                       _calendar.find(_calendarFound, _error, null);
+                       _self.data.calendars.push(_calendar);
+               }
+       };
+       uibinding.dataSourceCalendar.prototype.update = function () {
+               var _self = this;
+               _self._update();
+               return _self;
+       };
+
+       /**
+        * dataSourceCallhistory
+        *
+        * @param type
+        *   a. ALL
+        *   b. TEL
+        *   c. XMPP
+        *   d. SIP
+        *
+        * @param direction
+        *   a. ALL
+        *   b. DIALED
+        *   c. RECEIVED
+        *   d. MISSEDNEW
+        *   e. MISSED
+        *   f. BLOCKED
+        *   g. REJECTED
+        */
+       uibinding.dataSourceCallhistory = function () {
+               if (arguments.length !== 1) {
+                       return false;
+               }
+
+               var _self = this;
+               _self.options = {
+                               type: "ALL",
+                               direction: "ALL",
+                               starttimeorder: "DESC"
+               };
+
+               var args = Array.prototype.slice.call(arguments, 0);
+               var new_options = args.shift();
+               _self._create(new_options);
+               return _self;
+       };
+       uibinding.dataSourceCallhistory.prototype = new uibinding.dataSource();
+       uibinding.dataSourceCallhistory.prototype.constructor = uibinding.dataSourceCallhistory;
+       uibinding.dataSourceCallhistory.prototype._create = function (obj) {
+               var _self = this;
+               if (arguments.length > 0) {
+                       _self._updateOptions(obj);
+               }
+       };
+       uibinding.dataSourceCallhistory.prototype._update = function () {
+               var _self = this;
+               _self.data = {};
+               _self.data.callhistory = {};
+
+               var _type = _self.options.type ? _self.options.type : null;
+               var _direction = _self.options.direction ? _self.options.direction : null;
+               var _starttimeorder = _self.options.starttimeorder ? _self.options.starttimeorder : null;
+
+               var _filter = null;
+               var _sortMode = null;
+
+               function _error (error) {
+                       console.log("Error: " + error.name);
+                       _self.fireHandler("error");
+               }
+
+               function _callhistoryFound (results) {
+                       _self.data.callhistory.length = results.length;
+                       _self.data.callhistory.entries = results;
+                       console.log(results.length);
+                       console.log(results);
+               }
+
+               if (_type !== "ALL") {
+                       _filter = new new tizen.AttributeFilter("type", "EXACTLY", _type);
+               }
+               _sortMode = new tizen.SortMode("startTime", _starttimeorder);
+
+               tizen.callhistory.find(_callhistoryFound, _error, _filter, _sortMode);
+       };
+       uibinding.dataSourceCallhistory.prototype.update = function () {
+               var _self = this;
+               _self._update();
+               return _self;
+       };
+
+
 })(jQuery);
 (function($){
        /**
index c281f8f..818a238 100644 (file)
@@ -3,13 +3,13 @@
 <property name="translateY" type="string" displayName="translateY" default="0px"/>
 </property>
 <property name="20%" type="string" displayName="20%">
-<property name="translateY" type="string" displayName="translateY" default="0px"/>
+<property name="translateY" type="string" displayName="translateY" default="-1px"/>
 </property>
 <property name="50%" type="string" displayName="50%">
 <property name="translateY" type="string" displayName="translateY" default="0px"/>
 </property>
 <property name="80%" type="string" displayName="80%">
-<property name="translateY" type="string" displayName="translateY" default="0px"/>
+<property name="translateY" type="string" displayName="translateY" default="-1px"/>
 </property>
 <property name="100%" type="string" displayName="100%">
 <property name="translateY" type="string" displayName="translateY" default="0px"/>
index 24d8aac..ba6e95d 100644 (file)
@@ -1,22 +1,37 @@
 <animation id="tizen.animator.emphasis.flip" displayName="flip" smallIcon="tizen_animator_emphasis_flip.png" icon.16 ="tizen_animator_emphasis_flip.png" category="emphasis" description="TBD">
 <property name="0%" type="string" displayName="0%">
 <property name="-webkit-animation-timing-function" type="string" displayName="-webkit-animation-timing-function" default="ease-out"/>
-<property name="-webkit-transform" type="string" displayName="-webkit-transform" default="perspective(400px) translateZ(0) rotateY(0) scale(1)"/>
+<property name="perspective" type="string" displayName="perspective" default="400px"/>
+<property name="translateZ" type="string" displayName="translateZ" default="0"/>
+<property name="rotateY" type="string" displayName="rotateY" default="0"/>
+<property name="scale" type="string" displayName="scale" default="1"/>
 </property>
 <property name="40%" type="string" displayName="40%">
 <property name="-webkit-animation-timing-function" type="string" displayName="-webkit-animation-timing-function" default="ease-out"/>
-<property name="-webkit-transform" type="string" displayName="-webkit-transform" default="perspective(400px) translateZ(150px) rotateY(170deg) scale(1)"/>
+<property name="perspective" type="string" displayName="perspective" default="400px"/>
+<property name="translateZ" type="string" displayName="translateZ" default="150px"/>
+<property name="rotateY" type="string" displayName="rotateY" default="170deg"/>
+<property name="scale" type="string" displayName="scale" default="1"/>
 </property>
 <property name="50%" type="string" displayName="50%">
 <property name="-webkit-animation-timing-function" type="string" displayName="-webkit-animation-timing-function" default="ease-in"/>
-<property name="-webkit-transform" type="string" displayName="-webkit-transform" default="perspective(400px) translateZ(150px) rotateY(190deg) scale(1)"/>
+<property name="perspective" type="string" displayName="perspective" default="400px"/>
+<property name="translateZ" type="string" displayName="translateZ" default="150px"/>
+<property name="rotateY" type="string" displayName="rotateY" default="190deg"/>
+<property name="scale" type="string" displayName="scale" default="1"/>
 </property>
 <property name="80%" type="string" displayName="80%">
 <property name="-webkit-animation-timing-function" type="string" displayName="-webkit-animation-timing-function" default="ease-in"/>
-<property name="-webkit-transform" type="string" displayName="-webkit-transform" default="perspective(400px) translateZ(0) rotateY(360deg) scale(.95)"/>
+<property name="perspective" type="string" displayName="perspective" default="400px"/>
+<property name="translateZ" type="string" displayName="translateZ" default="0"/>
+<property name="rotateY" type="string" displayName="rotateY" default="360deg"/>
+<property name="scale" type="string" displayName="scale" default=".95"/>
 </property>
 <property name="100%" type="string" displayName="100%">
 <property name="-webkit-animation-timing-function" type="string" displayName="-webkit-animation-timing-function" default="ease-in"/>
-<property name="-webkit-transform" type="string" displayName="-webkit-transform" default="perspective(400px) translateZ(0) rotateY(360deg) scale(1)"/>
+<property name="perspective" type="string" displayName="perspective" default="400px"/>
+<property name="translateZ" type="string" displayName="translateZ" default="0"/>
+<property name="rotateY" type="string" displayName="rotateY" default="360deg"/>
+<property name="scale" type="string" displayName="scale" default="1"/>
 </property>
 <property name="duration" type="string" displayName="Duration" default="1s" /></animation>
\ No newline at end of file
index 42ba550..81c5827 100644 (file)
@@ -2,11 +2,11 @@
 <property name="0%" type="string" displayName="0%">
 <property name="opacity" type="string" displayName="opacity" default="0"/>
 <property name="translateX" type="string" displayName="translateX" default="-100%"/>
-<property name="rotate" type="string" displayName="rotate" default="-120deg"/>
+<property name="rotateZ" type="string" displayName="rotateZ" default="-120deg"/>
 </property>
 <property name="100%" type="string" displayName="100%">
 <property name="opacity" type="string" displayName="opacity" default="1"/>
 <property name="translateX" type="string" displayName="translateX" default="0px"/>
-<property name="rotate" type="string" displayName="rotate" default="0deg"/>
+<property name="rotateZ" type="string" displayName="rotateZ" default="0deg"/>
 </property>
 <property name="duration" type="string" displayName="Duration" default="1s" /></animation>
\ No newline at end of file
index cd740f5..4e5640d 100644 (file)
@@ -2,11 +2,11 @@
 <property name="0%" type="string" displayName="0%">
 <property name="opacity" type="string" displayName="opacity" default="1"/>
 <property name="translateX" type="string" displayName="translateX" default="0px"/>
-<property name="rotate" type="string" displayName="rotate" default="0deg"/>
+<property name="rotateZ" type="string" displayName="rotateZ" default="0deg"/>
 </property>
 <property name="100%" type="string" displayName="100%">
 <property name="opacity" type="string" displayName="opacity" default="0"/>
 <property name="translateX" type="string" displayName="translateX" default="100%"/>
-<property name="rotate" type="string" displayName="rotate" default="120deg"/>
+<property name="rotateZ" type="string" displayName="rotateZ" default="120deg"/>
 </property>
 <property name="duration" type="string" displayName="Duration" default="1s" /></animation>
\ No newline at end of file
index fb790f3..05356d1 100644 (file)
@@ -395,3 +395,9 @@ function excludeWidgets(wids) {
                widget.css("opacity", "0.2");
        }
 }
+
+function getElementDom(id) {
+       var result = document.getElementById(id);
+
+       return result.outerHTML;
+}
index 691a479..5d33f36 100644 (file)
@@ -171,7 +171,7 @@ app.init = function() {
 </xsl:template>
 
 <xsl:template match="dataSource">
-       <xsl:variable name="dataModel_name" select="@name"/>
+       <xsl:variable name="dataModel_name" select="@dataSource"/>
        <xsl:variable name="newDataSource" select="concat($tab, 'app.ds.', $dataModel_name, ' = new uibinding.')"/>
                
        <xsl:choose>
index 90a0f72..b168a3b 100644 (file)
        /** 
         * dataSourceContact 
         * 
-        * @param addressBookType
-        *   a. all_addressbooks
-        *   b. unified_addressbook
-        *   c. default_addressbook
-        *   d. selected_addressbook
+        * @param method
+        *   a. ALL
+        *   b. UNIFIED
+        *   c. DEFAULT
+        *   d. SELECTED_ADDRESSBOOKID
         * 
         * @param addressBookId
-        *   : set up an addressbookId only when addressBookType was selected_addressbook
+        *   : set up an addressbookId only when 'method' was SELECTED_ADDRESSBOOKID
         **/
        uibinding.dataSourceContact = function () {
                if (arguments.length !== 1) {
 
                var _self = this;
                _self.options = {
-                               addressBookType: "",
+                               method: "ALL",
                                addressBookId: ""
                };
 
                _self.data = {};
                _self.data.addressbooks = [];
 
-               var _addrBookType = _self.options.addressBookType ? _self.options.addressBookType : null;
-               var _addrBookId = (_addrBookType == "selected_addressbook") ? _self.options.addressBookId : null;
+               var _method = _self.options.method ? _self.options.method : null;
+               var _addrBookId = (_method == "SELECTED_ADDRESSBOOKID") ? _self.options.addressBookId : null;
                var _addr = null;
 
                function _error (error) {
                        }
                }
 
-               if (_addrBookType === "all_addressbooks") {
+               if (_method === "ALL") {
                        tizen.contact.getAddressBooks(_addressbooksFound, _error);
                } else {
-                       if (_addrBookType === "unified_addressbook") {
+                       if (_method === "UNIFIED") {
                                _addr = tizen.contact.getUnifiedAddressBook();
-                       } else if (_addrBookType === "default_addressbook") {
+                       } else if (_method === "DEFAULT") {
                                _addr = tizen.contact.getDefaultAddressBook();
-                       } else if (_addrBookType === "selected_addressbook") {
+                       } else if (_method === "SELECTED_ADDRESSBOOKID") {
                                _addr = tizen.contact.getAddressBook(_addrBookId);
                        } else {
                                _error({
                                        name : "InvalidValuesError"
                                });
+                               return;
                        }
                        _addr.contacts = [];
                        _addr.find(_contactsFound, _error, null);
                _self._update();
                return _self;
        };
+
+       /**
+        * dataSourceCalendar
+        * 
+        * @param method
+        *   a. ALL
+        *   b. UNIFIED
+        *   c. DEFAULT
+        *   d. SELECTED_CALENDARID
+        *   
+        * @param calendarId
+        *   : calendar id
+        *   
+        * @param calendarType
+        *   : the type of a calendar
+        *   a. EVENT
+        *   b. TASK
+        */
+       uibinding.dataSourceCalendar = function () {
+               if (arguments.length !== 1) {
+                       return false; 
+               }
+
+               var _self = this;
+               _self.options = {
+                               method: "ALL",
+                               calendarType: "EVENT",
+                               calendarId: ""                          
+               };
+
+               var args = Array.prototype.slice.call(arguments, 0);
+               var new_options = args.shift();
+               _self._create(new_options);
+               return _self;
+       };
+       uibinding.dataSourceCalendar.prototype = new uibinding.dataSource();
+       uibinding.dataSourceCalendar.prototype.constructor = uibinding.dataSourceCalendar;
+       uibinding.dataSourceCalendar.prototype._create = function (obj) {
+               var _self = this;
+               if (arguments.length > 0) {
+                       _self._updateOptions(obj);
+               }
+       };
+       uibinding.dataSourceCalendar.prototype._update = function () {
+               var _self = this;
+               _self.data = {};
+               _self.data.calendars = [];
+
+               var _method = _self.options.method ? _self.options.method : null;
+               var _calendarType = _self.options.calendarType ? _self.options.calendarType : null;
+               var _calendarId = (_method == "SELECTED_CALENDARID") ? _self.options.calendarId : null;
+               var _calendar = null;
+               var _calendarItem = null;
+               var _filter = null;
+
+               function _error (error) {
+                       console.log("Error: " + error.name);
+                       _self.fireHandler("error");
+               }
+
+               function _calendarFound (events) {
+                       var eventsLength = events.length;
+                       for (var i = 0; i < eventsLength; i++) {
+                               var _event = {};
+                               _event = events[i];
+
+                               var event = {};
+
+                               for (var item in _event) {
+                                       if (_event[item] instanceof tizen.TZDate == true) {
+                                               var tzdate = _event[item];
+                                               tzdate["date"] = tzdate.getDate();
+                                               tzdate["fullYear"] = tzdate.getFullYear();
+                                               tzdate["month"] = tzdate.getMonth();
+                                               tzdate["day"] = tzdate.getDay();
+                                               tzdate["hours"] = tzdate.getHours();
+                                               tzdate["minutes"] = tzdate.getMinutes();
+                                               tzdate["seconds"] = tzdate.getSeconds();
+                                               tzdate["milliseconds"] = tzdate.getMilliseconds();
+                                               tzdate["timezone"] = tzdate.getTimezone();
+                                               tzdate["dateString"] = tzdate.toDateString();
+                                               tzdate["string"] = tzdate.toString();
+
+                                               event[item] = tzdate;
+
+                                       } else {
+                                               event[item] = _event[item];
+                                       }
+                               }
+                               _calendar.events.push(event);
+                       }
+               }
+
+               function _calendarsFound (calendars) {
+                       var calendarLength = calendars.length;
+                       if (calendarLength > 0) {
+                               for (var i = 0; i < calendarLength; i++) {
+                                       _calendar = {};
+                                       _calendar = calendars[i];
+                                       _calendar.events = [];
+
+                                       _calendar.find(_calendarFound, _error, _filter);
+
+                                       _self.data.calendars.push(_calendar);
+                               }
+                       }
+               }
+
+               if (_method === "ALL") {
+                       tizen.calendar.getCalendars(_calendarType, _calendarsFound, _error);
+               } else {
+                       if (_method === "UNIFIED") {
+                               _calendar = tizen.calendar.getUnifiedCalendar(_calendarType);
+                       } else if (_method === "DEFAULT") {
+                               _calendar = tizen.calendar.getDefaultCalendar(_calendarType);
+                       } else if (_method === "SELECTED_CALENDARID") {
+                               _calendar = tizen.calendar.getCalendar(_calendarType, _calendarId);
+                       } else {
+                               _error({
+                                       name : "InvalidValuesError"
+                               });
+                               return;
+                       }
+                       _calendar.events = [];
+                       _calendar.find(_calendarFound, _error, null);
+                       _self.data.calendars.push(_calendar);
+               }
+       };
+       uibinding.dataSourceCalendar.prototype.update = function () {
+               var _self = this;
+               _self._update();
+               return _self;
+       };
+
+       /**
+        * dataSourceCallhistory
+        *
+        * @param type
+        *   a. ALL
+        *   b. TEL
+        *   c. XMPP
+        *   d. SIP
+        *
+        * @param direction
+        *   a. ALL
+        *   b. DIALED
+        *   c. RECEIVED
+        *   d. MISSEDNEW
+        *   e. MISSED
+        *   f. BLOCKED
+        *   g. REJECTED
+        */
+       uibinding.dataSourceCallhistory = function () {
+               if (arguments.length !== 1) {
+                       return false;
+               }
+
+               var _self = this;
+               _self.options = {
+                               type: "ALL",
+                               direction: "ALL",
+                               starttimeorder: "DESC"
+               };
+
+               var args = Array.prototype.slice.call(arguments, 0);
+               var new_options = args.shift();
+               _self._create(new_options);
+               return _self;
+       };
+       uibinding.dataSourceCallhistory.prototype = new uibinding.dataSource();
+       uibinding.dataSourceCallhistory.prototype.constructor = uibinding.dataSourceCallhistory;
+       uibinding.dataSourceCallhistory.prototype._create = function (obj) {
+               var _self = this;
+               if (arguments.length > 0) {
+                       _self._updateOptions(obj);
+               }
+       };
+       uibinding.dataSourceCallhistory.prototype._update = function () {
+               var _self = this;
+               _self.data = {};
+               _self.data.callhistory = {};
+
+               var _type = _self.options.type ? _self.options.type : null;
+               var _direction = _self.options.direction ? _self.options.direction : null;
+               var _starttimeorder = _self.options.starttimeorder ? _self.options.starttimeorder : null;
+
+               var _filter = null;
+               var _sortMode = null;
+
+               function _error (error) {
+                       console.log("Error: " + error.name);
+                       _self.fireHandler("error");
+               }
+
+               function _callhistoryFound (results) {
+                       _self.data.callhistory.length = results.length;
+                       _self.data.callhistory.entries = results;
+                       console.log(results.length);
+                       console.log(results);
+               }
+
+               if (_type !== "ALL") {
+                       _filter = new new tizen.AttributeFilter("type", "EXACTLY", _type);
+               }
+               _sortMode = new tizen.SortMode("startTime", _starttimeorder);
+
+               tizen.callhistory.find(_callhistoryFound, _error, _filter, _sortMode);
+       };
+       uibinding.dataSourceCallhistory.prototype.update = function () {
+               var _self = this;
+               _self._update();
+               return _self;
+       };
+
+
 })(jQuery);
 (function($){
        /**
index c281f8f..818a238 100644 (file)
@@ -3,13 +3,13 @@
 <property name="translateY" type="string" displayName="translateY" default="0px"/>
 </property>
 <property name="20%" type="string" displayName="20%">
-<property name="translateY" type="string" displayName="translateY" default="0px"/>
+<property name="translateY" type="string" displayName="translateY" default="-1px"/>
 </property>
 <property name="50%" type="string" displayName="50%">
 <property name="translateY" type="string" displayName="translateY" default="0px"/>
 </property>
 <property name="80%" type="string" displayName="80%">
-<property name="translateY" type="string" displayName="translateY" default="0px"/>
+<property name="translateY" type="string" displayName="translateY" default="-1px"/>
 </property>
 <property name="100%" type="string" displayName="100%">
 <property name="translateY" type="string" displayName="translateY" default="0px"/>
index 24d8aac..ba6e95d 100644 (file)
@@ -1,22 +1,37 @@
 <animation id="tizen.animator.emphasis.flip" displayName="flip" smallIcon="tizen_animator_emphasis_flip.png" icon.16 ="tizen_animator_emphasis_flip.png" category="emphasis" description="TBD">
 <property name="0%" type="string" displayName="0%">
 <property name="-webkit-animation-timing-function" type="string" displayName="-webkit-animation-timing-function" default="ease-out"/>
-<property name="-webkit-transform" type="string" displayName="-webkit-transform" default="perspective(400px) translateZ(0) rotateY(0) scale(1)"/>
+<property name="perspective" type="string" displayName="perspective" default="400px"/>
+<property name="translateZ" type="string" displayName="translateZ" default="0"/>
+<property name="rotateY" type="string" displayName="rotateY" default="0"/>
+<property name="scale" type="string" displayName="scale" default="1"/>
 </property>
 <property name="40%" type="string" displayName="40%">
 <property name="-webkit-animation-timing-function" type="string" displayName="-webkit-animation-timing-function" default="ease-out"/>
-<property name="-webkit-transform" type="string" displayName="-webkit-transform" default="perspective(400px) translateZ(150px) rotateY(170deg) scale(1)"/>
+<property name="perspective" type="string" displayName="perspective" default="400px"/>
+<property name="translateZ" type="string" displayName="translateZ" default="150px"/>
+<property name="rotateY" type="string" displayName="rotateY" default="170deg"/>
+<property name="scale" type="string" displayName="scale" default="1"/>
 </property>
 <property name="50%" type="string" displayName="50%">
 <property name="-webkit-animation-timing-function" type="string" displayName="-webkit-animation-timing-function" default="ease-in"/>
-<property name="-webkit-transform" type="string" displayName="-webkit-transform" default="perspective(400px) translateZ(150px) rotateY(190deg) scale(1)"/>
+<property name="perspective" type="string" displayName="perspective" default="400px"/>
+<property name="translateZ" type="string" displayName="translateZ" default="150px"/>
+<property name="rotateY" type="string" displayName="rotateY" default="190deg"/>
+<property name="scale" type="string" displayName="scale" default="1"/>
 </property>
 <property name="80%" type="string" displayName="80%">
 <property name="-webkit-animation-timing-function" type="string" displayName="-webkit-animation-timing-function" default="ease-in"/>
-<property name="-webkit-transform" type="string" displayName="-webkit-transform" default="perspective(400px) translateZ(0) rotateY(360deg) scale(.95)"/>
+<property name="perspective" type="string" displayName="perspective" default="400px"/>
+<property name="translateZ" type="string" displayName="translateZ" default="0"/>
+<property name="rotateY" type="string" displayName="rotateY" default="360deg"/>
+<property name="scale" type="string" displayName="scale" default=".95"/>
 </property>
 <property name="100%" type="string" displayName="100%">
 <property name="-webkit-animation-timing-function" type="string" displayName="-webkit-animation-timing-function" default="ease-in"/>
-<property name="-webkit-transform" type="string" displayName="-webkit-transform" default="perspective(400px) translateZ(0) rotateY(360deg) scale(1)"/>
+<property name="perspective" type="string" displayName="perspective" default="400px"/>
+<property name="translateZ" type="string" displayName="translateZ" default="0"/>
+<property name="rotateY" type="string" displayName="rotateY" default="360deg"/>
+<property name="scale" type="string" displayName="scale" default="1"/>
 </property>
 <property name="duration" type="string" displayName="Duration" default="1s" /></animation>
\ No newline at end of file
index 42ba550..81c5827 100644 (file)
@@ -2,11 +2,11 @@
 <property name="0%" type="string" displayName="0%">
 <property name="opacity" type="string" displayName="opacity" default="0"/>
 <property name="translateX" type="string" displayName="translateX" default="-100%"/>
-<property name="rotate" type="string" displayName="rotate" default="-120deg"/>
+<property name="rotateZ" type="string" displayName="rotateZ" default="-120deg"/>
 </property>
 <property name="100%" type="string" displayName="100%">
 <property name="opacity" type="string" displayName="opacity" default="1"/>
 <property name="translateX" type="string" displayName="translateX" default="0px"/>
-<property name="rotate" type="string" displayName="rotate" default="0deg"/>
+<property name="rotateZ" type="string" displayName="rotateZ" default="0deg"/>
 </property>
 <property name="duration" type="string" displayName="Duration" default="1s" /></animation>
\ No newline at end of file
index cd740f5..4e5640d 100644 (file)
@@ -2,11 +2,11 @@
 <property name="0%" type="string" displayName="0%">
 <property name="opacity" type="string" displayName="opacity" default="1"/>
 <property name="translateX" type="string" displayName="translateX" default="0px"/>
-<property name="rotate" type="string" displayName="rotate" default="0deg"/>
+<property name="rotateZ" type="string" displayName="rotateZ" default="0deg"/>
 </property>
 <property name="100%" type="string" displayName="100%">
 <property name="opacity" type="string" displayName="opacity" default="0"/>
 <property name="translateX" type="string" displayName="translateX" default="100%"/>
-<property name="rotate" type="string" displayName="rotate" default="120deg"/>
+<property name="rotateZ" type="string" displayName="rotateZ" default="120deg"/>
 </property>
 <property name="duration" type="string" displayName="Duration" default="1s" /></animation>
\ No newline at end of file
index fb790f3..05356d1 100644 (file)
@@ -395,3 +395,9 @@ function excludeWidgets(wids) {
                widget.css("opacity", "0.2");
        }
 }
+
+function getElementDom(id) {
+       var result = document.getElementById(id);
+
+       return result.outerHTML;
+}
index 691a479..5d33f36 100644 (file)
@@ -171,7 +171,7 @@ app.init = function() {
 </xsl:template>
 
 <xsl:template match="dataSource">
-       <xsl:variable name="dataModel_name" select="@name"/>
+       <xsl:variable name="dataModel_name" select="@dataSource"/>
        <xsl:variable name="newDataSource" select="concat($tab, 'app.ds.', $dataModel_name, ' = new uibinding.')"/>
                
        <xsl:choose>
index 90a0f72..b168a3b 100644 (file)
        /** 
         * dataSourceContact 
         * 
-        * @param addressBookType
-        *   a. all_addressbooks
-        *   b. unified_addressbook
-        *   c. default_addressbook
-        *   d. selected_addressbook
+        * @param method
+        *   a. ALL
+        *   b. UNIFIED
+        *   c. DEFAULT
+        *   d. SELECTED_ADDRESSBOOKID
         * 
         * @param addressBookId
-        *   : set up an addressbookId only when addressBookType was selected_addressbook
+        *   : set up an addressbookId only when 'method' was SELECTED_ADDRESSBOOKID
         **/
        uibinding.dataSourceContact = function () {
                if (arguments.length !== 1) {
 
                var _self = this;
                _self.options = {
-                               addressBookType: "",
+                               method: "ALL",
                                addressBookId: ""
                };
 
                _self.data = {};
                _self.data.addressbooks = [];
 
-               var _addrBookType = _self.options.addressBookType ? _self.options.addressBookType : null;
-               var _addrBookId = (_addrBookType == "selected_addressbook") ? _self.options.addressBookId : null;
+               var _method = _self.options.method ? _self.options.method : null;
+               var _addrBookId = (_method == "SELECTED_ADDRESSBOOKID") ? _self.options.addressBookId : null;
                var _addr = null;
 
                function _error (error) {
                        }
                }
 
-               if (_addrBookType === "all_addressbooks") {
+               if (_method === "ALL") {
                        tizen.contact.getAddressBooks(_addressbooksFound, _error);
                } else {
-                       if (_addrBookType === "unified_addressbook") {
+                       if (_method === "UNIFIED") {
                                _addr = tizen.contact.getUnifiedAddressBook();
-                       } else if (_addrBookType === "default_addressbook") {
+                       } else if (_method === "DEFAULT") {
                                _addr = tizen.contact.getDefaultAddressBook();
-                       } else if (_addrBookType === "selected_addressbook") {
+                       } else if (_method === "SELECTED_ADDRESSBOOKID") {
                                _addr = tizen.contact.getAddressBook(_addrBookId);
                        } else {
                                _error({
                                        name : "InvalidValuesError"
                                });
+                               return;
                        }
                        _addr.contacts = [];
                        _addr.find(_contactsFound, _error, null);
                _self._update();
                return _self;
        };
+
+       /**
+        * dataSourceCalendar
+        * 
+        * @param method
+        *   a. ALL
+        *   b. UNIFIED
+        *   c. DEFAULT
+        *   d. SELECTED_CALENDARID
+        *   
+        * @param calendarId
+        *   : calendar id
+        *   
+        * @param calendarType
+        *   : the type of a calendar
+        *   a. EVENT
+        *   b. TASK
+        */
+       uibinding.dataSourceCalendar = function () {
+               if (arguments.length !== 1) {
+                       return false; 
+               }
+
+               var _self = this;
+               _self.options = {
+                               method: "ALL",
+                               calendarType: "EVENT",
+                               calendarId: ""                          
+               };
+
+               var args = Array.prototype.slice.call(arguments, 0);
+               var new_options = args.shift();
+               _self._create(new_options);
+               return _self;
+       };
+       uibinding.dataSourceCalendar.prototype = new uibinding.dataSource();
+       uibinding.dataSourceCalendar.prototype.constructor = uibinding.dataSourceCalendar;
+       uibinding.dataSourceCalendar.prototype._create = function (obj) {
+               var _self = this;
+               if (arguments.length > 0) {
+                       _self._updateOptions(obj);
+               }
+       };
+       uibinding.dataSourceCalendar.prototype._update = function () {
+               var _self = this;
+               _self.data = {};
+               _self.data.calendars = [];
+
+               var _method = _self.options.method ? _self.options.method : null;
+               var _calendarType = _self.options.calendarType ? _self.options.calendarType : null;
+               var _calendarId = (_method == "SELECTED_CALENDARID") ? _self.options.calendarId : null;
+               var _calendar = null;
+               var _calendarItem = null;
+               var _filter = null;
+
+               function _error (error) {
+                       console.log("Error: " + error.name);
+                       _self.fireHandler("error");
+               }
+
+               function _calendarFound (events) {
+                       var eventsLength = events.length;
+                       for (var i = 0; i < eventsLength; i++) {
+                               var _event = {};
+                               _event = events[i];
+
+                               var event = {};
+
+                               for (var item in _event) {
+                                       if (_event[item] instanceof tizen.TZDate == true) {
+                                               var tzdate = _event[item];
+                                               tzdate["date"] = tzdate.getDate();
+                                               tzdate["fullYear"] = tzdate.getFullYear();
+                                               tzdate["month"] = tzdate.getMonth();
+                                               tzdate["day"] = tzdate.getDay();
+                                               tzdate["hours"] = tzdate.getHours();
+                                               tzdate["minutes"] = tzdate.getMinutes();
+                                               tzdate["seconds"] = tzdate.getSeconds();
+                                               tzdate["milliseconds"] = tzdate.getMilliseconds();
+                                               tzdate["timezone"] = tzdate.getTimezone();
+                                               tzdate["dateString"] = tzdate.toDateString();
+                                               tzdate["string"] = tzdate.toString();
+
+                                               event[item] = tzdate;
+
+                                       } else {
+                                               event[item] = _event[item];
+                                       }
+                               }
+                               _calendar.events.push(event);
+                       }
+               }
+
+               function _calendarsFound (calendars) {
+                       var calendarLength = calendars.length;
+                       if (calendarLength > 0) {
+                               for (var i = 0; i < calendarLength; i++) {
+                                       _calendar = {};
+                                       _calendar = calendars[i];
+                                       _calendar.events = [];
+
+                                       _calendar.find(_calendarFound, _error, _filter);
+
+                                       _self.data.calendars.push(_calendar);
+                               }
+                       }
+               }
+
+               if (_method === "ALL") {
+                       tizen.calendar.getCalendars(_calendarType, _calendarsFound, _error);
+               } else {
+                       if (_method === "UNIFIED") {
+                               _calendar = tizen.calendar.getUnifiedCalendar(_calendarType);
+                       } else if (_method === "DEFAULT") {
+                               _calendar = tizen.calendar.getDefaultCalendar(_calendarType);
+                       } else if (_method === "SELECTED_CALENDARID") {
+                               _calendar = tizen.calendar.getCalendar(_calendarType, _calendarId);
+                       } else {
+                               _error({
+                                       name : "InvalidValuesError"
+                               });
+                               return;
+                       }
+                       _calendar.events = [];
+                       _calendar.find(_calendarFound, _error, null);
+                       _self.data.calendars.push(_calendar);
+               }
+       };
+       uibinding.dataSourceCalendar.prototype.update = function () {
+               var _self = this;
+               _self._update();
+               return _self;
+       };
+
+       /**
+        * dataSourceCallhistory
+        *
+        * @param type
+        *   a. ALL
+        *   b. TEL
+        *   c. XMPP
+        *   d. SIP
+        *
+        * @param direction
+        *   a. ALL
+        *   b. DIALED
+        *   c. RECEIVED
+        *   d. MISSEDNEW
+        *   e. MISSED
+        *   f. BLOCKED
+        *   g. REJECTED
+        */
+       uibinding.dataSourceCallhistory = function () {
+               if (arguments.length !== 1) {
+                       return false;
+               }
+
+               var _self = this;
+               _self.options = {
+                               type: "ALL",
+                               direction: "ALL",
+                               starttimeorder: "DESC"
+               };
+
+               var args = Array.prototype.slice.call(arguments, 0);
+               var new_options = args.shift();
+               _self._create(new_options);
+               return _self;
+       };
+       uibinding.dataSourceCallhistory.prototype = new uibinding.dataSource();
+       uibinding.dataSourceCallhistory.prototype.constructor = uibinding.dataSourceCallhistory;
+       uibinding.dataSourceCallhistory.prototype._create = function (obj) {
+               var _self = this;
+               if (arguments.length > 0) {
+                       _self._updateOptions(obj);
+               }
+       };
+       uibinding.dataSourceCallhistory.prototype._update = function () {
+               var _self = this;
+               _self.data = {};
+               _self.data.callhistory = {};
+
+               var _type = _self.options.type ? _self.options.type : null;
+               var _direction = _self.options.direction ? _self.options.direction : null;
+               var _starttimeorder = _self.options.starttimeorder ? _self.options.starttimeorder : null;
+
+               var _filter = null;
+               var _sortMode = null;
+
+               function _error (error) {
+                       console.log("Error: " + error.name);
+                       _self.fireHandler("error");
+               }
+
+               function _callhistoryFound (results) {
+                       _self.data.callhistory.length = results.length;
+                       _self.data.callhistory.entries = results;
+                       console.log(results.length);
+                       console.log(results);
+               }
+
+               if (_type !== "ALL") {
+                       _filter = new new tizen.AttributeFilter("type", "EXACTLY", _type);
+               }
+               _sortMode = new tizen.SortMode("startTime", _starttimeorder);
+
+               tizen.callhistory.find(_callhistoryFound, _error, _filter, _sortMode);
+       };
+       uibinding.dataSourceCallhistory.prototype.update = function () {
+               var _self = this;
+               _self._update();
+               return _self;
+       };
+
+
 })(jQuery);
 (function($){
        /**
index c281f8f..818a238 100644 (file)
@@ -3,13 +3,13 @@
 <property name="translateY" type="string" displayName="translateY" default="0px"/>
 </property>
 <property name="20%" type="string" displayName="20%">
-<property name="translateY" type="string" displayName="translateY" default="0px"/>
+<property name="translateY" type="string" displayName="translateY" default="-1px"/>
 </property>
 <property name="50%" type="string" displayName="50%">
 <property name="translateY" type="string" displayName="translateY" default="0px"/>
 </property>
 <property name="80%" type="string" displayName="80%">
-<property name="translateY" type="string" displayName="translateY" default="0px"/>
+<property name="translateY" type="string" displayName="translateY" default="-1px"/>
 </property>
 <property name="100%" type="string" displayName="100%">
 <property name="translateY" type="string" displayName="translateY" default="0px"/>
index 24d8aac..ba6e95d 100644 (file)
@@ -1,22 +1,37 @@
 <animation id="tizen.animator.emphasis.flip" displayName="flip" smallIcon="tizen_animator_emphasis_flip.png" icon.16 ="tizen_animator_emphasis_flip.png" category="emphasis" description="TBD">
 <property name="0%" type="string" displayName="0%">
 <property name="-webkit-animation-timing-function" type="string" displayName="-webkit-animation-timing-function" default="ease-out"/>
-<property name="-webkit-transform" type="string" displayName="-webkit-transform" default="perspective(400px) translateZ(0) rotateY(0) scale(1)"/>
+<property name="perspective" type="string" displayName="perspective" default="400px"/>
+<property name="translateZ" type="string" displayName="translateZ" default="0"/>
+<property name="rotateY" type="string" displayName="rotateY" default="0"/>
+<property name="scale" type="string" displayName="scale" default="1"/>
 </property>
 <property name="40%" type="string" displayName="40%">
 <property name="-webkit-animation-timing-function" type="string" displayName="-webkit-animation-timing-function" default="ease-out"/>
-<property name="-webkit-transform" type="string" displayName="-webkit-transform" default="perspective(400px) translateZ(150px) rotateY(170deg) scale(1)"/>
+<property name="perspective" type="string" displayName="perspective" default="400px"/>
+<property name="translateZ" type="string" displayName="translateZ" default="150px"/>
+<property name="rotateY" type="string" displayName="rotateY" default="170deg"/>
+<property name="scale" type="string" displayName="scale" default="1"/>
 </property>
 <property name="50%" type="string" displayName="50%">
 <property name="-webkit-animation-timing-function" type="string" displayName="-webkit-animation-timing-function" default="ease-in"/>
-<property name="-webkit-transform" type="string" displayName="-webkit-transform" default="perspective(400px) translateZ(150px) rotateY(190deg) scale(1)"/>
+<property name="perspective" type="string" displayName="perspective" default="400px"/>
+<property name="translateZ" type="string" displayName="translateZ" default="150px"/>
+<property name="rotateY" type="string" displayName="rotateY" default="190deg"/>
+<property name="scale" type="string" displayName="scale" default="1"/>
 </property>
 <property name="80%" type="string" displayName="80%">
 <property name="-webkit-animation-timing-function" type="string" displayName="-webkit-animation-timing-function" default="ease-in"/>
-<property name="-webkit-transform" type="string" displayName="-webkit-transform" default="perspective(400px) translateZ(0) rotateY(360deg) scale(.95)"/>
+<property name="perspective" type="string" displayName="perspective" default="400px"/>
+<property name="translateZ" type="string" displayName="translateZ" default="0"/>
+<property name="rotateY" type="string" displayName="rotateY" default="360deg"/>
+<property name="scale" type="string" displayName="scale" default=".95"/>
 </property>
 <property name="100%" type="string" displayName="100%">
 <property name="-webkit-animation-timing-function" type="string" displayName="-webkit-animation-timing-function" default="ease-in"/>
-<property name="-webkit-transform" type="string" displayName="-webkit-transform" default="perspective(400px) translateZ(0) rotateY(360deg) scale(1)"/>
+<property name="perspective" type="string" displayName="perspective" default="400px"/>
+<property name="translateZ" type="string" displayName="translateZ" default="0"/>
+<property name="rotateY" type="string" displayName="rotateY" default="360deg"/>
+<property name="scale" type="string" displayName="scale" default="1"/>
 </property>
 <property name="duration" type="string" displayName="Duration" default="1s" /></animation>
\ No newline at end of file
index 42ba550..81c5827 100644 (file)
@@ -2,11 +2,11 @@
 <property name="0%" type="string" displayName="0%">
 <property name="opacity" type="string" displayName="opacity" default="0"/>
 <property name="translateX" type="string" displayName="translateX" default="-100%"/>
-<property name="rotate" type="string" displayName="rotate" default="-120deg"/>
+<property name="rotateZ" type="string" displayName="rotateZ" default="-120deg"/>
 </property>
 <property name="100%" type="string" displayName="100%">
 <property name="opacity" type="string" displayName="opacity" default="1"/>
 <property name="translateX" type="string" displayName="translateX" default="0px"/>
-<property name="rotate" type="string" displayName="rotate" default="0deg"/>
+<property name="rotateZ" type="string" displayName="rotateZ" default="0deg"/>
 </property>
 <property name="duration" type="string" displayName="Duration" default="1s" /></animation>
\ No newline at end of file
index cd740f5..4e5640d 100644 (file)
@@ -2,11 +2,11 @@
 <property name="0%" type="string" displayName="0%">
 <property name="opacity" type="string" displayName="opacity" default="1"/>
 <property name="translateX" type="string" displayName="translateX" default="0px"/>
-<property name="rotate" type="string" displayName="rotate" default="0deg"/>
+<property name="rotateZ" type="string" displayName="rotateZ" default="0deg"/>
 </property>
 <property name="100%" type="string" displayName="100%">
 <property name="opacity" type="string" displayName="opacity" default="0"/>
 <property name="translateX" type="string" displayName="translateX" default="100%"/>
-<property name="rotate" type="string" displayName="rotate" default="120deg"/>
+<property name="rotateZ" type="string" displayName="rotateZ" default="120deg"/>
 </property>
 <property name="duration" type="string" displayName="Duration" default="1s" /></animation>
\ No newline at end of file
index fb790f3..05356d1 100644 (file)
@@ -395,3 +395,9 @@ function excludeWidgets(wids) {
                widget.css("opacity", "0.2");
        }
 }
+
+function getElementDom(id) {
+       var result = document.getElementById(id);
+
+       return result.outerHTML;
+}
index 691a479..5d33f36 100644 (file)
@@ -171,7 +171,7 @@ app.init = function() {
 </xsl:template>
 
 <xsl:template match="dataSource">
-       <xsl:variable name="dataModel_name" select="@name"/>
+       <xsl:variable name="dataModel_name" select="@dataSource"/>
        <xsl:variable name="newDataSource" select="concat($tab, 'app.ds.', $dataModel_name, ' = new uibinding.')"/>
                
        <xsl:choose>
index 90a0f72..b168a3b 100644 (file)
        /** 
         * dataSourceContact 
         * 
-        * @param addressBookType
-        *   a. all_addressbooks
-        *   b. unified_addressbook
-        *   c. default_addressbook
-        *   d. selected_addressbook
+        * @param method
+        *   a. ALL
+        *   b. UNIFIED
+        *   c. DEFAULT
+        *   d. SELECTED_ADDRESSBOOKID
         * 
         * @param addressBookId
-        *   : set up an addressbookId only when addressBookType was selected_addressbook
+        *   : set up an addressbookId only when 'method' was SELECTED_ADDRESSBOOKID
         **/
        uibinding.dataSourceContact = function () {
                if (arguments.length !== 1) {
 
                var _self = this;
                _self.options = {
-                               addressBookType: "",
+                               method: "ALL",
                                addressBookId: ""
                };
 
                _self.data = {};
                _self.data.addressbooks = [];
 
-               var _addrBookType = _self.options.addressBookType ? _self.options.addressBookType : null;
-               var _addrBookId = (_addrBookType == "selected_addressbook") ? _self.options.addressBookId : null;
+               var _method = _self.options.method ? _self.options.method : null;
+               var _addrBookId = (_method == "SELECTED_ADDRESSBOOKID") ? _self.options.addressBookId : null;
                var _addr = null;
 
                function _error (error) {
                        }
                }
 
-               if (_addrBookType === "all_addressbooks") {
+               if (_method === "ALL") {
                        tizen.contact.getAddressBooks(_addressbooksFound, _error);
                } else {
-                       if (_addrBookType === "unified_addressbook") {
+                       if (_method === "UNIFIED") {
                                _addr = tizen.contact.getUnifiedAddressBook();
-                       } else if (_addrBookType === "default_addressbook") {
+                       } else if (_method === "DEFAULT") {
                                _addr = tizen.contact.getDefaultAddressBook();
-                       } else if (_addrBookType === "selected_addressbook") {
+                       } else if (_method === "SELECTED_ADDRESSBOOKID") {
                                _addr = tizen.contact.getAddressBook(_addrBookId);
                        } else {
                                _error({
                                        name : "InvalidValuesError"
                                });
+                               return;
                        }
                        _addr.contacts = [];
                        _addr.find(_contactsFound, _error, null);
                _self._update();
                return _self;
        };
+
+       /**
+        * dataSourceCalendar
+        * 
+        * @param method
+        *   a. ALL
+        *   b. UNIFIED
+        *   c. DEFAULT
+        *   d. SELECTED_CALENDARID
+        *   
+        * @param calendarId
+        *   : calendar id
+        *   
+        * @param calendarType
+        *   : the type of a calendar
+        *   a. EVENT
+        *   b. TASK
+        */
+       uibinding.dataSourceCalendar = function () {
+               if (arguments.length !== 1) {
+                       return false; 
+               }
+
+               var _self = this;
+               _self.options = {
+                               method: "ALL",
+                               calendarType: "EVENT",
+                               calendarId: ""                          
+               };
+
+               var args = Array.prototype.slice.call(arguments, 0);
+               var new_options = args.shift();
+               _self._create(new_options);
+               return _self;
+       };
+       uibinding.dataSourceCalendar.prototype = new uibinding.dataSource();
+       uibinding.dataSourceCalendar.prototype.constructor = uibinding.dataSourceCalendar;
+       uibinding.dataSourceCalendar.prototype._create = function (obj) {
+               var _self = this;
+               if (arguments.length > 0) {
+                       _self._updateOptions(obj);
+               }
+       };
+       uibinding.dataSourceCalendar.prototype._update = function () {
+               var _self = this;
+               _self.data = {};
+               _self.data.calendars = [];
+
+               var _method = _self.options.method ? _self.options.method : null;
+               var _calendarType = _self.options.calendarType ? _self.options.calendarType : null;
+               var _calendarId = (_method == "SELECTED_CALENDARID") ? _self.options.calendarId : null;
+               var _calendar = null;
+               var _calendarItem = null;
+               var _filter = null;
+
+               function _error (error) {
+                       console.log("Error: " + error.name);
+                       _self.fireHandler("error");
+               }
+
+               function _calendarFound (events) {
+                       var eventsLength = events.length;
+                       for (var i = 0; i < eventsLength; i++) {
+                               var _event = {};
+                               _event = events[i];
+
+                               var event = {};
+
+                               for (var item in _event) {
+                                       if (_event[item] instanceof tizen.TZDate == true) {
+                                               var tzdate = _event[item];
+                                               tzdate["date"] = tzdate.getDate();
+                                               tzdate["fullYear"] = tzdate.getFullYear();
+                                               tzdate["month"] = tzdate.getMonth();
+                                               tzdate["day"] = tzdate.getDay();
+                                               tzdate["hours"] = tzdate.getHours();
+                                               tzdate["minutes"] = tzdate.getMinutes();
+                                               tzdate["seconds"] = tzdate.getSeconds();
+                                               tzdate["milliseconds"] = tzdate.getMilliseconds();
+                                               tzdate["timezone"] = tzdate.getTimezone();
+                                               tzdate["dateString"] = tzdate.toDateString();
+                                               tzdate["string"] = tzdate.toString();
+
+                                               event[item] = tzdate;
+
+                                       } else {
+                                               event[item] = _event[item];
+                                       }
+                               }
+                               _calendar.events.push(event);
+                       }
+               }
+
+               function _calendarsFound (calendars) {
+                       var calendarLength = calendars.length;
+                       if (calendarLength > 0) {
+                               for (var i = 0; i < calendarLength; i++) {
+                                       _calendar = {};
+                                       _calendar = calendars[i];
+                                       _calendar.events = [];
+
+                                       _calendar.find(_calendarFound, _error, _filter);
+
+                                       _self.data.calendars.push(_calendar);
+                               }
+                       }
+               }
+
+               if (_method === "ALL") {
+                       tizen.calendar.getCalendars(_calendarType, _calendarsFound, _error);
+               } else {
+                       if (_method === "UNIFIED") {
+                               _calendar = tizen.calendar.getUnifiedCalendar(_calendarType);
+                       } else if (_method === "DEFAULT") {
+                               _calendar = tizen.calendar.getDefaultCalendar(_calendarType);
+                       } else if (_method === "SELECTED_CALENDARID") {
+                               _calendar = tizen.calendar.getCalendar(_calendarType, _calendarId);
+                       } else {
+                               _error({
+                                       name : "InvalidValuesError"
+                               });
+                               return;
+                       }
+                       _calendar.events = [];
+                       _calendar.find(_calendarFound, _error, null);
+                       _self.data.calendars.push(_calendar);
+               }
+       };
+       uibinding.dataSourceCalendar.prototype.update = function () {
+               var _self = this;
+               _self._update();
+               return _self;
+       };
+
+       /**
+        * dataSourceCallhistory
+        *
+        * @param type
+        *   a. ALL
+        *   b. TEL
+        *   c. XMPP
+        *   d. SIP
+        *
+        * @param direction
+        *   a. ALL
+        *   b. DIALED
+        *   c. RECEIVED
+        *   d. MISSEDNEW
+        *   e. MISSED
+        *   f. BLOCKED
+        *   g. REJECTED
+        */
+       uibinding.dataSourceCallhistory = function () {
+               if (arguments.length !== 1) {
+                       return false;
+               }
+
+               var _self = this;
+               _self.options = {
+                               type: "ALL",
+                               direction: "ALL",
+                               starttimeorder: "DESC"
+               };
+
+               var args = Array.prototype.slice.call(arguments, 0);
+               var new_options = args.shift();
+               _self._create(new_options);
+               return _self;
+       };
+       uibinding.dataSourceCallhistory.prototype = new uibinding.dataSource();
+       uibinding.dataSourceCallhistory.prototype.constructor = uibinding.dataSourceCallhistory;
+       uibinding.dataSourceCallhistory.prototype._create = function (obj) {
+               var _self = this;
+               if (arguments.length > 0) {
+                       _self._updateOptions(obj);
+               }
+       };
+       uibinding.dataSourceCallhistory.prototype._update = function () {
+               var _self = this;
+               _self.data = {};
+               _self.data.callhistory = {};
+
+               var _type = _self.options.type ? _self.options.type : null;
+               var _direction = _self.options.direction ? _self.options.direction : null;
+               var _starttimeorder = _self.options.starttimeorder ? _self.options.starttimeorder : null;
+
+               var _filter = null;
+               var _sortMode = null;
+
+               function _error (error) {
+                       console.log("Error: " + error.name);
+                       _self.fireHandler("error");
+               }
+
+               function _callhistoryFound (results) {
+                       _self.data.callhistory.length = results.length;
+                       _self.data.callhistory.entries = results;
+                       console.log(results.length);
+                       console.log(results);
+               }
+
+               if (_type !== "ALL") {
+                       _filter = new new tizen.AttributeFilter("type", "EXACTLY", _type);
+               }
+               _sortMode = new tizen.SortMode("startTime", _starttimeorder);
+
+               tizen.callhistory.find(_callhistoryFound, _error, _filter, _sortMode);
+       };
+       uibinding.dataSourceCallhistory.prototype.update = function () {
+               var _self = this;
+               _self._update();
+               return _self;
+       };
+
+
 })(jQuery);
 (function($){
        /**
index c281f8f..818a238 100644 (file)
@@ -3,13 +3,13 @@
 <property name="translateY" type="string" displayName="translateY" default="0px"/>
 </property>
 <property name="20%" type="string" displayName="20%">
-<property name="translateY" type="string" displayName="translateY" default="0px"/>
+<property name="translateY" type="string" displayName="translateY" default="-1px"/>
 </property>
 <property name="50%" type="string" displayName="50%">
 <property name="translateY" type="string" displayName="translateY" default="0px"/>
 </property>
 <property name="80%" type="string" displayName="80%">
-<property name="translateY" type="string" displayName="translateY" default="0px"/>
+<property name="translateY" type="string" displayName="translateY" default="-1px"/>
 </property>
 <property name="100%" type="string" displayName="100%">
 <property name="translateY" type="string" displayName="translateY" default="0px"/>
index 24d8aac..ba6e95d 100644 (file)
@@ -1,22 +1,37 @@
 <animation id="tizen.animator.emphasis.flip" displayName="flip" smallIcon="tizen_animator_emphasis_flip.png" icon.16 ="tizen_animator_emphasis_flip.png" category="emphasis" description="TBD">
 <property name="0%" type="string" displayName="0%">
 <property name="-webkit-animation-timing-function" type="string" displayName="-webkit-animation-timing-function" default="ease-out"/>
-<property name="-webkit-transform" type="string" displayName="-webkit-transform" default="perspective(400px) translateZ(0) rotateY(0) scale(1)"/>
+<property name="perspective" type="string" displayName="perspective" default="400px"/>
+<property name="translateZ" type="string" displayName="translateZ" default="0"/>
+<property name="rotateY" type="string" displayName="rotateY" default="0"/>
+<property name="scale" type="string" displayName="scale" default="1"/>
 </property>
 <property name="40%" type="string" displayName="40%">
 <property name="-webkit-animation-timing-function" type="string" displayName="-webkit-animation-timing-function" default="ease-out"/>
-<property name="-webkit-transform" type="string" displayName="-webkit-transform" default="perspective(400px) translateZ(150px) rotateY(170deg) scale(1)"/>
+<property name="perspective" type="string" displayName="perspective" default="400px"/>
+<property name="translateZ" type="string" displayName="translateZ" default="150px"/>
+<property name="rotateY" type="string" displayName="rotateY" default="170deg"/>
+<property name="scale" type="string" displayName="scale" default="1"/>
 </property>
 <property name="50%" type="string" displayName="50%">
 <property name="-webkit-animation-timing-function" type="string" displayName="-webkit-animation-timing-function" default="ease-in"/>
-<property name="-webkit-transform" type="string" displayName="-webkit-transform" default="perspective(400px) translateZ(150px) rotateY(190deg) scale(1)"/>
+<property name="perspective" type="string" displayName="perspective" default="400px"/>
+<property name="translateZ" type="string" displayName="translateZ" default="150px"/>
+<property name="rotateY" type="string" displayName="rotateY" default="190deg"/>
+<property name="scale" type="string" displayName="scale" default="1"/>
 </property>
 <property name="80%" type="string" displayName="80%">
 <property name="-webkit-animation-timing-function" type="string" displayName="-webkit-animation-timing-function" default="ease-in"/>
-<property name="-webkit-transform" type="string" displayName="-webkit-transform" default="perspective(400px) translateZ(0) rotateY(360deg) scale(.95)"/>
+<property name="perspective" type="string" displayName="perspective" default="400px"/>
+<property name="translateZ" type="string" displayName="translateZ" default="0"/>
+<property name="rotateY" type="string" displayName="rotateY" default="360deg"/>
+<property name="scale" type="string" displayName="scale" default=".95"/>
 </property>
 <property name="100%" type="string" displayName="100%">
 <property name="-webkit-animation-timing-function" type="string" displayName="-webkit-animation-timing-function" default="ease-in"/>
-<property name="-webkit-transform" type="string" displayName="-webkit-transform" default="perspective(400px) translateZ(0) rotateY(360deg) scale(1)"/>
+<property name="perspective" type="string" displayName="perspective" default="400px"/>
+<property name="translateZ" type="string" displayName="translateZ" default="0"/>
+<property name="rotateY" type="string" displayName="rotateY" default="360deg"/>
+<property name="scale" type="string" displayName="scale" default="1"/>
 </property>
 <property name="duration" type="string" displayName="Duration" default="1s" /></animation>
\ No newline at end of file
index 42ba550..81c5827 100644 (file)
@@ -2,11 +2,11 @@
 <property name="0%" type="string" displayName="0%">
 <property name="opacity" type="string" displayName="opacity" default="0"/>
 <property name="translateX" type="string" displayName="translateX" default="-100%"/>
-<property name="rotate" type="string" displayName="rotate" default="-120deg"/>
+<property name="rotateZ" type="string" displayName="rotateZ" default="-120deg"/>
 </property>
 <property name="100%" type="string" displayName="100%">
 <property name="opacity" type="string" displayName="opacity" default="1"/>
 <property name="translateX" type="string" displayName="translateX" default="0px"/>
-<property name="rotate" type="string" displayName="rotate" default="0deg"/>
+<property name="rotateZ" type="string" displayName="rotateZ" default="0deg"/>
 </property>
 <property name="duration" type="string" displayName="Duration" default="1s" /></animation>
\ No newline at end of file
index cd740f5..4e5640d 100644 (file)
@@ -2,11 +2,11 @@
 <property name="0%" type="string" displayName="0%">
 <property name="opacity" type="string" displayName="opacity" default="1"/>
 <property name="translateX" type="string" displayName="translateX" default="0px"/>
-<property name="rotate" type="string" displayName="rotate" default="0deg"/>
+<property name="rotateZ" type="string" displayName="rotateZ" default="0deg"/>
 </property>
 <property name="100%" type="string" displayName="100%">
 <property name="opacity" type="string" displayName="opacity" default="0"/>
 <property name="translateX" type="string" displayName="translateX" default="100%"/>
-<property name="rotate" type="string" displayName="rotate" default="120deg"/>
+<property name="rotateZ" type="string" displayName="rotateZ" default="120deg"/>
 </property>
 <property name="duration" type="string" displayName="Duration" default="1s" /></animation>
\ No newline at end of file
index fb790f3..05356d1 100644 (file)
@@ -395,3 +395,9 @@ function excludeWidgets(wids) {
                widget.css("opacity", "0.2");
        }
 }
+
+function getElementDom(id) {
+       var result = document.getElementById(id);
+
+       return result.outerHTML;
+}
index 691a479..5d33f36 100644 (file)
@@ -171,7 +171,7 @@ app.init = function() {
 </xsl:template>
 
 <xsl:template match="dataSource">
-       <xsl:variable name="dataModel_name" select="@name"/>
+       <xsl:variable name="dataModel_name" select="@dataSource"/>
        <xsl:variable name="newDataSource" select="concat($tab, 'app.ds.', $dataModel_name, ' = new uibinding.')"/>
                
        <xsl:choose>