Merge branch 'master' into tizen_2.1 2.1b_release accepted/tizen_2.1/20130426.150549 submit/tizen_2.1/20130426.150521
authorYoumin Ha <youmin.ha@samsung.com>
Fri, 26 Apr 2013 05:50:34 +0000 (14:50 +0900)
committerYoumin Ha <youmin.ha@samsung.com>
Fri, 26 Apr 2013 05:50:34 +0000 (14:50 +0900)
25 files changed:
demos/tizen-winsets/widgets/checkbox/checkbox.html
demos/tizen-winsets/widgets/checkbox/styles.css
demos/tizen-winsets/widgets/ctxpopup.html
demos/tizen-winsets/widgets/naviframe/naviframe_footer_more.html
demos/tizen-winsets/widgets/naviframe/naviframe_footer_more_button.html
demos/tizen-winsets/widgets/popupwindow/popupwindow.js
demos/tizen-winsets/widgets/tabbar/tabbar_footer_more.html
demos/tizen-winsets/widgets/tabbar/tabbar_footer_segment_more.html
libs/js/gl-matrix.js
libs/patch/0020-JQM-Apply-tizen-style-context-popup.patch
libs/patch/0044-JQM-Delegate-init-of-popup-widget-with-delegateSelfInitW.patch [new file with mode: 0644]
packaging/web-ui-fw.spec
src/js/jquery.mobile.tizen.loader.js
src/js/jquery.mobile.tizen.scrollview.js
src/js/widgets/jquery.mobile.tizen.datetimepicker.js
src/js/widgets/jquery.mobile.tizen.fastscroll.js
src/js/widgets/jquery.mobile.tizen.gallery3d.js
src/js/widgets/jquery.mobile.tizen.listdivider.js
src/js/widgets/jquery.mobile.tizen.pagelayout.js
src/js/widgets/jquery.mobile.tizen.popupwindow.ctxpopup.js
src/js/widgets/jquery.mobile.tizen.splitview.js
src/themes/tizen/tizen-black/images/controls/button/00_icon_SIP_close_press_web.png [changed mode: 0755->0644]
src/themes/tizen/tizen-black/images/controls/button/00_icon_SIP_close_web_web.png [changed mode: 0755->0644]
src/themes/tizen/tizen-white/images/controls/button/00_icon_SIP_close_press_web.png
src/themes/tizen/tizen-white/images/controls/button/00_icon_SIP_close_web_web.png

index b32c10d..1c2a8e2 100644 (file)
@@ -25,7 +25,7 @@
                                <div class="content-primary">
                                        <div class="my-check-button-style"><a id="check-1" data-role="button" data-inline="true">Check/UnCheck</a></div>
                                        <div class="my-check-button-style my-check-inline-style"><a id="get-check-value" data-role="button" data-inline="true">Get Check Value</a></div>
-                                       <p>First checkbox check value :
+                                       <p>First checkbox check value : <br>
                                                <span class="checked-value">
                                                        <em>(click the button! )</em>
                                                </span>
                                                </span>
                                        </p>
                                        <hr/>
-                                       <fieldset data-role="controlgroup">
+                                       <fieldset data-role="controlgroup" class="my-check-controlgroup">
                                                <input type="checkbox" name="checkbox-1" id="checkbox-1"/>
                                                <label for="checkbox-1">Normal</label>
                                                <input type="checkbox" name="checkbox-2" id="checkbox-2" checked="checked" disabled="disabled" />
                                                <label for="checkbox-2">Checked, Disabled</label>
                                                <input type="checkbox" name="checkbox-3" id="checkbox-3" disabled="disabled" />
-                                               <label for="checkbox-3">Disabled</label>
+                                               <label for="checkbox-3">Disabled</label><br>
                                                <input type="checkbox" name="checkbox-4" id="checkbox-4" class="favorite" />
                                                <label for="checkbox-4">Favorite</label>
                                                <input type="checkbox" name="checkbox-5" id="checkbox-5" checked="checked" disabled="disabled" class="favorite" />
                                                <label for="checkbox-5">Favorite Checked, Disabled</label>
                                                <input type="checkbox" name="checkbox-6" id="checkbox-6" disabled="disabled" class="favorite" />
-                                               <label for="checkbox-6">Favorite, Disabled</label>
+                                               <label for="checkbox-6">Favorite, Disabled</label><br>
                                                <input type="checkbox" name="checkbox-7" id="checkbox-7" />
                                                <input type="checkbox" name="checkbox-8" id="checkbox-8" />
                                        </fieldset>
index e577ed2..b38fdba 100644 (file)
@@ -3,4 +3,9 @@
 }
 .my-check-inline-style {
        display: inline;
+}
+
+.my-check-controlgroup div.ui-checkbox {
+       margin-top : 3px;
+       margin-bottom : 3px;
 }
\ No newline at end of file
index 93a79e4..dc41eb2 100644 (file)
                                                <li><a href="#" data-rel="back">Add to contact</a></li>
                                                <li><a href="#" data-rel="back">Call log</a></li>
                                                <li><a href="#" data-rel="back">Music</a></li>
-                                               <li><a href="#" data-rel="back">File manager</a></li>
-                                               <li><a href="#" data-rel="back">Internal Link</a></li>
                                        </ul>
                                </div>
                        </div>
index fb60016..b074648 100644 (file)
@@ -34,8 +34,6 @@
                        <li><a href="#" data-rel="back">Add to contact</a></li>
                        <li><a href="#" data-rel="back">Call log</a></li>
                        <li><a href="#" data-rel="back">Music</a></li>
-                       <li><a href="#" data-rel="back">File manager</a></li>
-                       <li><a href="#" data-rel="back">Internal Link</a></li>
                </ul>
        </div>
 </div>
index 1a4c8ea..01a63ac 100644 (file)
@@ -37,7 +37,6 @@
                        <li><a href="#" data-rel="back">Add to contact</a></li>
                        <li><a href="#" data-rel="back">Call log</a></li>
                        <li><a href="#" data-rel="back">Music</a></li>
-                       <li><a href="#" data-rel="back">File manager</a></li>
                </ul>
        </div>
 </div>
index 16f93dd..f62f272 100644 (file)
@@ -4,6 +4,13 @@ $( document ).one( "pageinit", "#popupwindow-demo", function () {
                $("#textbox_popup").popup("close");
                return false;
        });
+
+       if ( $.tizen.__tizen__.util.isMobileBrowser() ) {
+                var direction = window.screen.orientation;
+                if ( direction === "landscape-primary" || direction === "landscape-secondary" ) {
+                        $( "#go_textbox_popup a" ).attr( "href", "#textbox_popup_landscape" );
+                }
+        }
 });
 
 function onSuccessPopupCallback ( ori ) {
index 69fb63b..deba94c 100644 (file)
        </div>
 
        <div data-role="footer">
-               <a href="#pop_js" data-role="button"  data-icon="naviframe-more" data-rel="popupwindow"></a>
+               <a href="#pop_js" data-role="button"  data-icon="naviframe-more" data-rel="popup"></a>
 
-               <div id="pop_js" data-role="popupwindow" data-show-arrow="true">
+               <div id="pop_js" data-role="popup>
                        <ul data-role="listview">
-                               <li><a href="#" class="ui-btn-ctxpopup-close">Settings</a></li>
-                               <li><a href="#" class="ui-btn-ctxpopup-close">Add to contact</a></li>
-                               <li><a href="#" class="ui-btn-ctxpopup-close">Call log</a></li>
-                               <li><a href="#" class="ui-btn-ctxpopup-close">Music</a></li>
-                               <li><a href="#" class="ui-btn-ctxpopup-close">File manager</a></li>
-                               <li><a href="#" class="ui-btn-ctxpopup-close">Internal Link</a></li>
+                               <li><a href="#" data-rel="back">Settings</a></li>
+                               <li><a href="#" data-rel="back">Add to contact</a></li>
+                               <li><a href="#" data-rel="back">Call log</a></li>
+                               <li><a href="#" data-rel="back">Music</a></li>
                        </ul>
                </div>
                <div data-role="tabbar">
@@ -44,7 +42,6 @@
                                <li><a href="#"class="ui-btn-active">MENU</a></li>
                                <li><a href="#">SAVE</a></li>
                                <li><a href="#">SHARE</a></li>
-
                        </ul>
                </div>
        </div>
index 34be34d..30d4b8e 100644 (file)
        </div>
 
        <div data-role="footer">
-               <a href="#pop_js" data-role="button"  data-icon="naviframe-more" data-rel="popupwindow"></a>
+               <a href="#pop_js" data-role="button"  data-icon="naviframe-more" data-rel="popup"></a>
 
-               <div id="pop_js" data-role="popupwindow" data-show-arrow="true">
+               <div id="pop_js" data-role="popup">
                <ul data-role="listview">
-                       <li><a href="#" class="ui-btn-ctxpopup-close">Settings</a></li>
-                       <li><a href="#" class="ui-btn-ctxpopup-close">Add to contact</a></li>
-                       <li><a href="#" class="ui-btn-ctxpopup-close">Call log</a></li>
-                       <li><a href="#" class="ui-btn-ctxpopup-close">Music</a></li>
-                       <li><a href="#" class="ui-btn-ctxpopup-close">File manager</a></li>
-                       <li><a href="#" class="ui-btn-ctxpopup-close">Internal Link</a></li>
-               </ul>
-
+                               <li><a href="#" data-rel="back">Settings</a></li>
+                               <li><a href="#" data-rel="back">Add to contact</a></li>
+                               <li><a href="#" data-rel="back">Call log</a></li>
+                               <li><a href="#" data-rel="back">Music</a></li>
+                       </ul>
                </div>
                <div data-role="controlgroup" data-type="horizontal">
                        <a href="#" data-role="button">BACK</a>
index 5718055..c7f1006 100644 (file)
             return factory(root);
         });
     } else {
-        // Browser globals
-        factory(root);
+        // Specific initialization for TIZEN Web UI Framework
+        root.initGlMatrix = function ( targetRoot ) {
+            factory( targetRoot || root );
+        };
     }
 }(this, function (root) {
     "use strict";
index c467f7b..00ed2bd 100644 (file)
@@ -1,18 +1,18 @@
-From 3a3b8ea37dbe26879cac7861e4478856bcf91d6e Mon Sep 17 00:00:00 2001
+From d96db7f8a2ab691ca92492ac3b0c253afea40250 Mon Sep 17 00:00:00 2001
 From: "hjnim.kim" <hjnim.kim@samsung.com>
-Date: Wed, 10 Apr 2013 13:22:06 +0900
-Subject: [PATCH] JQM Applied tizen style popup, context popup
+Date: Thu, 25 Apr 2013 12:38:27 +0900
+Subject: [PATCH] JQM Apply Tizen style context popup and window popup
 
-Apply tizen style popup, context popup
+Apply tizen style and operation
 
-Change-Id: I757bdf622e4ee106aa3ace5ab6665633879b740f
+Change-Id: I73884fd8bd78e4704b1d6357d1c2a10bc6609a4f
 Signed-off-by: hyunjung kim <hjnim.kim@samsung.com>
 ---
- libs/js/jquery-mobile-1.2.0/js/widgets/popup.js |  113 +++++++++++++++++++++--
- 1 files changed, 103 insertions(+), 10 deletions(-)
+ libs/js/jquery-mobile-1.2.0/js/widgets/popup.js |  129 +++++++++++++++++++++--
+ 1 files changed, 119 insertions(+), 10 deletions(-)
 
 diff --git a/libs/js/jquery-mobile-1.2.0/js/widgets/popup.js b/libs/js/jquery-mobile-1.2.0/js/widgets/popup.js
-index 8174055..203599d 100644
+index 8174055..c4d6a22 100644
 --- a/libs/js/jquery-mobile-1.2.0/js/widgets/popup.js
 +++ b/libs/js/jquery-mobile-1.2.0/js/widgets/popup.js
 @@ -58,7 +58,7 @@ define( [ "jquery",
@@ -138,7 +138,44 @@ index 8174055..203599d 100644
                },
  
                _createPrereqs: function( screenPrereq, containerPrereq, whenDone ) {
-@@ -569,7 +622,7 @@ define( [ "jquery",
+@@ -461,6 +514,8 @@ define( [ "jquery",
+               _desiredCoords: function( x, y, positionTo ) {
+                       var dst = null, offset, winCoords = windowCoords();
++                      self.positionTo = positionTo;
++
+                       // Establish which element will serve as the reference
+                       if ( positionTo && positionTo !== "origin" ) {
+                               if ( positionTo === "window" ) {
+@@ -499,6 +554,19 @@ define( [ "jquery",
+                       return { x: x, y: y };
+               },
++              _reposition: function() {
++                      var self = this,
++                                      coords;
++
++                      if( self._isOpen
++                              && self.link
++                              && self.positionTo !== "window") {
++                                      coords = self._placementCoords( self._desiredCoords( $(self.link).offset().left + $(self.link).outerWidth() /2 , $(self.link).offset().top + $(self.link).outerHeight() /2 , self.positionTo || self.options.positionTo || "origin" ) );
++                                      self._ui.container
++                                              .offset( { top : coords.top } );
++                      }
++              },
++
+               _openPrereqsComplete: function() {
+                       var self = this;
+@@ -512,6 +580,7 @@ define( [ "jquery",
+                       setTimeout(function(){
+                               self._ui.container.attr( "tabindex", "0" ).focus();
+                               self._trigger( "afteropen" );
++                              self._reposition();
+                       });
+               },
+@@ -569,7 +638,7 @@ define( [ "jquery",
                        this._ui.container
                                .removeClass( "ui-selectmenu-hidden" )
                                .offset( coords );
@@ -147,7 +184,7 @@ index 8174055..203599d 100644
                        if ( this.options.overlayTheme && androidBlacklist ) {
                                /* TODO:
                                The native browser on Android 4.0.X ("Ice Cream Sandwich") suffers from an issue where the popup overlay appears to be z-indexed
-@@ -694,15 +747,55 @@ define( [ "jquery",
+@@ -694,15 +763,55 @@ define( [ "jquery",
                // what should be in _open. Seems to be "visual" vs "history" for now
                open: function( options ) {
                        var self = this, opts = this.options, url, hashkey, activePage, currentIsDialog, hasHash, urlHistory;
@@ -163,7 +200,7 @@ index 8174055..203599d 100644
 +                      if( !options ) {
 +                              options = [];
 +                      }
++
 +                      if ( !options.link ) {
 +                              if ( !event ) {
 +                                      self.positionTo = "window";
@@ -176,7 +213,7 @@ index 8174055..203599d 100644
 +                      if ( event ) {
 +                              self.positionTo = ( options != null && options.positionTo != null ) ? options.positionTo : "origin";
 +                      }
-+
 +                      if ( $(self.link).jqmData("position-to") !== "window"
 +                                      && self.positionTo !== "window" ) {
 +
diff --git a/libs/patch/0044-JQM-Delegate-init-of-popup-widget-with-delegateSelfInitW.patch b/libs/patch/0044-JQM-Delegate-init-of-popup-widget-with-delegateSelfInitW.patch
new file mode 100644 (file)
index 0000000..f21db42
--- /dev/null
@@ -0,0 +1,30 @@
+From b9a95ce6a3ede8c3ca3f06b2f949bb92a88f6dd8 Mon Sep 17 00:00:00 2001
+From: maciej moczulski <m.moczulski@samsung.com>
+Date: Tue, 16 Apr 2013 11:07:17 +0200
+Subject: [PATCH] Delegate init of popup widget with
+ delegateSelfInitWithSingleSelector
+
+Change-Id: If9a9d923bb30bb1a866eb9f3e0c960856626f311
+---
+ libs/js/jquery-mobile-1.2.0/js/widgets/popup.js |    5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/libs/js/jquery-mobile-1.2.0/js/widgets/popup.js b/libs/js/jquery-mobile-1.2.0/js/widgets/popup.js
+index de2af2c..65d5615 100644
+--- a/libs/js/jquery-mobile-1.2.0/js/widgets/popup.js
++++ b/libs/js/jquery-mobile-1.2.0/js/widgets/popup.js
+@@ -814,9 +814,8 @@ define( [ "jquery",
+               }
+       });
+-      $.mobile.$document.bind( "pagecreate create", function( e )  {
+-              $.mobile.popup.prototype.enhanceWithin( e.target, true );
+-      });
++      //delegate self-init widgets
++      $.delegateSelfInitWithSingleSelector( $.mobile.popup, true );
+ })( jQuery );
+ //>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
+-- 
+1.7.9.5
+
index 0c43b58..dad719a 100644 (file)
@@ -1,5 +1,5 @@
 Name:       web-ui-fw
-Version:    0.2.25
+Version:    0.2.26
 Release:    0
 Summary:    Tizen Web UI Framework Library
 Group:      Development/Other
@@ -97,6 +97,25 @@ Summary:    Tizen Web UI Framework Demo Application: tizen winset demo
 
 ###############################
 %changelog
+* Fri Apr 26 2013 Youmin Ha <youmin.ha@samsung.com> 0.2.26
+       - PageLayout : bug fix
+       - Gallery3d: Change timing of 'gl-matrix' library's execution
+       - Replace in LoadTheme function strings build with array join with the string concat
+       - Contextpopup: context popup reposition module has been added
+       - Pagelayout : skip to calculate min-height using data-scroll="none"(Issue: DCM-1453)
+       - Splitview: Fix the touchend event error.
+       - Gallery3d: Change event registration method from $.bind() to $.on()
+       - Scrollview : remove useless setTimeout in case scrolls go outside
+       - Naviframe : adjust new SIP down button
+       - Timepicker: Added return false; after vclick
+       - Popupwindow: reserved words has been removed
+       - minor changes: replace one occurrence of array.join with string concat and simplify jQuery arguments
+       - TizenWinset : set default margin for checkbox demo
+       - Tizenwinset: Context popup demo has been changed
+       - TizenDemo : add initial orientation mode to popup demo
+       - Widgets: removed parsing error for legacy javascript engine
+       - Delegate init of popup widget with delegateSelfInitWithSingleSelector
+
 * Tue Apr 18 2013 Youmin Ha <youmin.ha@samsung.com> 0.2.25
        - Pinch: pinch event re-implementation to use size
        - Pagelayout : prevent code inserting window.innerHeight when content calculate
index 5d94c8e..dc14f89 100644 (file)
@@ -214,25 +214,21 @@ If developers do not give a viewport meta tag, Tizen Web UI Framework automatica
 
                loadTheme: function ( theme ) {
                        var themePath,
-                               cssPath,
-                               jsPath;
+                       cssPath,
+                       jsPath;
 
                        if ( ! theme ) {
                                theme = tizen.frameworkData.theme;
                        }
-                       themePath = [
-                               tizen.frameworkData.rootDir,
-                               tizen.frameworkData.version,
-                               'themes',
-                               theme
-                       ].join( '/' );
-
-                       jsPath = [ themePath, 'theme.js' ].join( '/' );
-
+                       
+                       themePath = tizen.frameworkData.rootDir + '/' + tizen.frameworkData.version + '/themes/' + theme;
+                       
+                       jsPath = themePath + '/theme.js';
+       
                        if ( tizen.frameworkData.minified ) {
-                               cssPath = [themePath, 'tizen-web-ui-fw-theme.min.css'].join( '/' );
+                               cssPath = themePath + '/tizen-web-ui-fw-theme.min.css';
                        } else {
-                               cssPath = [themePath, 'tizen-web-ui-fw-theme.css'].join( '/' );
+                               cssPath = themePath + '/tizen-web-ui-fw-theme.css';
                        }
                        tizen.css.load( cssPath );
                        tizen.util.loadScriptSync( jsPath );
@@ -296,7 +292,7 @@ If developers do not give a viewport meta tag, Tizen Web UI Framework automatica
                                                self.frameworkData.version,
                                                'js',
                                                'cultures',
-                                               ['globalize.culture.', lang, '.js'].join( '' ),
+                                               ['globalize.culture.', lang, '.js'].join( '' )
                                        ].join( '/' );
                                }
                                return cFPath;
@@ -411,7 +407,7 @@ If developers do not give a viewport meta tag, Tizen Web UI Framework automatica
                                meta = document.createElement( "meta" );
                                if ( meta ) {
                                        meta.name = "viewport";
-                                       content = [ "width=", viewportWidth, ", user-scalable=no" ].join( "" );
+                                       content = "width=" + viewportWidth + ", user-scalable=no";
                                        if ( ! isNaN( viewportWidth ) ) {
                                                // Fix scale to 1.0, if viewport width is set to fixed value.
                                                // NOTE: Works wrong in Tizen browser!
@@ -433,7 +429,7 @@ If developers do not give a viewport meta tag, Tizen Web UI Framework automatica
                        tizen.log.debug( "themedefaultfont size: " + themeDefaultFontSize + ", ratio: " + ratio );
                        var scaledFontSize = Math.max( Math.floor( themeDefaultFontSize * ratio ), 4 );
 
-                       $( 'html.ui-mobile' ).css( { 'font-size': scaledFontSize + "px" } );
+                       $( 'html' ).css( { 'font-size': scaledFontSize + "px" } );
                        tizen.log.debug( 'html:font size is set to ' + scaledFontSize );
                        $( document ).ready( function ( ) {
                                $( '.ui-mobile' ).children( 'body' ).css( { 'font-size': scaledFontSize + "px" } );
@@ -477,7 +473,7 @@ If developers do not give a viewport meta tag, Tizen Web UI Framework automatica
                                ratio = parseFloat( viewportWidth / this.frameworkData.defaultViewportWidth );
                                this.scaleBaseFontSize( themeDefaultFontSize, ratio );
                        }
-               },
+               }
        };
 
        function export2TizenNS ( $, tizen ) {
index 414cef4..ede55f6 100644 (file)
@@ -69,7 +69,7 @@ define( [ ], function ( ) {
                        overshootEnable:   false,
                        outerScrollEnable: false,
                        overflowEnable:    true,
-                       scrollJump:        false,
+                       scrollJump:        false
                },
 
                _getViewHeight: function () {
@@ -208,16 +208,6 @@ define( [ ], function ( ) {
                                y = 0,
                                scroll_height = 0,
                                self = this,
-                               end_effect = function ( dir ) {
-                                       setTimeout( function () {
-                                               self._effect_dir = dir;
-                                               self._setEndEffect( "in" );
-                                       }, 100 );
-
-                                       setTimeout( function () {
-                                               self._setEndEffect( "out" );
-                                       }, 350 );
-                               },
                                vt = this._vTracker,
                                ht = this._hTracker;
 
@@ -242,15 +232,8 @@ define( [ ], function ( ) {
                                        } else if ( vt.isMin() ) {
                                                this._outerScroll( y - vt.getRemained() / 3, scroll_height );
 
-                                               if ( scroll_height > 0 ) {
-                                                       end_effect( 1 );
-                                               }
                                        } else if ( vt.isMax() ) {
                                                this._outerScroll( vt.getRemained() / 3, scroll_height );
-
-                                               if ( scroll_height > 0 ) {
-                                                       end_effect( 0 );
-                                               }
                                        }
                                }
                        }
@@ -367,17 +350,13 @@ define( [ ], function ( ) {
                                if ( y > 0 ) {
                                        this._sy = 0;
 
-                                       if ( this._didDrag && scroll_height > 0 ) {
-                                               this._effect_dir = 0;
-                                               this._setEndEffect( "in" );
-                                       }
+                                       this._effect_dir = 0;
+                                       this._setEndEffect( "in" );
                                } else if ( y < -scroll_height ) {
                                        this._sy = -scroll_height;
 
-                                       if ( this._didDrag && scroll_height > 0 ) {
-                                               this._effect_dir = 1;
-                                               this._setEndEffect( "in" );
-                                       }
+                                       this._effect_dir = 1;
+                                       this._setEndEffect( "in" );
                                } else {
                                        if ( this._endEffect && this._sy !== y ) {
                                                this._setEndEffect();
index e4c9de7..a8be763 100644 (file)
@@ -258,6 +258,7 @@ define( [ 'jquery.mobile.tizen.widgetex', 'jquery.mobile.tizen.popupwindow', 'jq
 
                        this.ui.find('.ui-datefield-period').buttonMarkup().bind( 'vclick', function ( e ) {
                                obj._switchAmPm( obj );
+                               return false;
                        });
 
                        this.element.attr( "data-" + ( $.mobile.ns ? $.mobile.ns + "-" : "" ) + "format", this.options.format );
@@ -554,6 +555,7 @@ define( [ 'jquery.mobile.tizen.widgetex', 'jquery.mobile.tizen.popupwindow', 'jq
                        this._popup_open = false;
                        this.ui.bind('vclick', function ( e ) {
                                obj._showDataSelector( obj, this, e.target );
+                               return false;
                        });
 
                        $.extend( this, {
index a8e89b0..a9f9d53 100644 (file)
@@ -97,7 +97,7 @@ define( [ '../jquery.mobile.tizen.scrollview' ], function ( ) {
 
        $.widget( "tizen.fastscroll", $.mobile.widget, {
                options: {
-                       initSelector: ":jqmData(fastscroll)",
+                       initSelector: ":jqmData(fastscroll)"
                },
 
                _primaryLanguage: null,
index 83dc2e2..832c69e 100644 (file)
@@ -242,7 +242,7 @@ define( [ "components/imageloader", "components/motionpath", "components/webgl"
  *             select ( [number] )
  *                     : When the "select" method is called with an argument, the method selects the image of given index.
  *                     If the method is called with no argument, it will return the Javascript object having "src"
- *                     attribute having the selected image’s URL.
+ *                     attribute having the selected image's URL.
  *             add ( object or string [, number] )
  *                     This method adds an image to Gallery3D widget.
  *                     If the second argument isn't inputted, the image is added at the 0th position.
@@ -340,7 +340,7 @@ define( [ "components/imageloader", "components/motionpath", "components/webgl"
 /**
        @method select
        When the "select" method is called with an argument, the method selects the image of given index.
-       If the method is called with no argument, it will return the Javascript object having "src" attribute having the selected image’s URL.
+       If the method is called with no argument, it will return the Javascript object having "src" attribute having the selected image's URL.
 
                <script>
                        $( "#gallery3d" ).on( "gallery3dcreate", function () {
@@ -449,90 +449,6 @@ define( [ "components/imageloader", "components/motionpath", "components/webgl"
 */
 
 ( function ( $, document, window, undefined ) {
-       window.requestAnimationFrame = ( function () {
-               return function ( callback ) {
-                       var id = window.setTimeout( callback, 1000 / 60 );
-                       return id;
-               };
-       } () );
-
-       window.cancelAnimationFrame = ( function () {
-               return function ( id ) {
-                       window.clearTimeout( id );
-               };
-       } () );
-
-       var vec3 = window.vec3,
-               mat3 = window.mat3,
-               mat4 = window.mat4,
-               GlArray32 = ( typeof window.Float32Array !== "undefined" ? window.Float32Array : ( typeof window.WebGLFloatArray !== "undefined" ? window.WebGLFloatArray : Array ) ),
-               GlArray16 = ( typeof window.Uint16Array !== "undefined" ? window.Uint16Array : Array ),
-               getContext3D = function ( canvas ) {
-                       var gl, i,
-                               contextNames = [ "experimental-webgl", "webkit-3d", "webgl", "moz-webgl" ];
-
-                       for ( i = 0; i < contextNames.length; i += 1 ) {
-                               try {
-                                       gl = canvas.getContext( contextNames[i] );
-                                       if ( gl ) {
-                                               break;
-                                       }
-                               } catch ( e ) {
-                                       window.alert( "Unfortunately, there's a WebGL compatibility problem. </br> You may want to check your system settings." );
-                                       return;
-                               }
-                       }
-                       return gl;
-               },
-               VERTEX_SHADER = [
-                       "attribute vec3 aVertexPosition;",
-                       "attribute vec2 aTextureCoord;",
-                       "attribute vec3 aVertexNormal;",
-                       "uniform mat4 uMoveMatrix;",
-                       "uniform mat4 uPerspectiveMatrix;",
-                       "uniform mat3 nNormalMatrix;",
-                       "uniform vec3 uAmbientColor;",
-                       "uniform vec3 uLightDirection;",
-                       "uniform vec3 uDirectionColor;",
-                       "uniform vec3 uLightDirection_first;",
-                       "uniform vec3 uLightDirection_second;",
-                       "varying vec2 vTextureCoord;",
-                       "varying vec3 vLightWeight;",
-                       "varying vec4 vFogWeight;",
-
-                       "void main(void) {",
-                       "       vec4 v_Position = uMoveMatrix * vec4(aVertexPosition, 1.0);",
-                       "       gl_Position = uPerspectiveMatrix * v_Position;",
-                       "       vTextureCoord = aTextureCoord;",
-                       "       float fog = 1.0 - ((gl_Position.z + 1.5) / 60.0);",
-                       "       vFogWeight = clamp( vec4( fog, fog, fog, 1.0), 0.6, 1.0);",
-                       "       vec3 transNormalVector = nNormalMatrix * aVertexNormal;",
-
-                       "       float vLightWeightFirst = 0.0;",
-                       "       float vLightWeightSecond = max( dot(transNormalVector, uLightDirection_second), 0.0 );",
-
-                       "       vLightWeight = uAmbientColor + uDirectionColor * vLightWeightSecond;",
-                       "}"
-               ].join( "\n" ),
-               FRAGMENT_SHADER = [
-                       "precision mediump float;",
-                       "varying vec2 vTextureCoord;",
-                       "varying vec3 vLightWeight;",
-                       "uniform sampler2D uSampler;",
-                       "varying vec4 vFogWeight;",
-
-                       "void main(void) {",
-                       "       vec4 TextureColor;",
-                       "       if ( vTextureCoord.s <= 0.01 || vTextureCoord.s >= 0.99 || vTextureCoord.t <= 0.01 || vTextureCoord.t >= 0.99 ) {",
-                       "               TextureColor = vec4(1.0, 1.0, 1.0, 0.5);",
-                       "       } else {",
-                       "               TextureColor = texture2D(uSampler, vec2(vTextureCoord.s, vTextureCoord.t));",
-                       "       }",
-                       "       TextureColor *= vFogWeight;",
-                       "       gl_FragColor = vec4(TextureColor.rgb * vLightWeight, TextureColor.a);",
-                       "}"
-               ].join( "\n" );
-
        function Node() {
                this.vertices = [
                        -1.0, -1.0, 0.0,
@@ -564,6 +480,105 @@ define( [ "components/imageloader", "components/motionpath", "components/webgl"
                this.imageID = 0;
        }
 
+       var isPreInitailization  = false,
+               glMatrix = {},
+               VERTEX_SHADER,
+               FRAGMENT_SHADER,
+               GlArray32,
+               GlArray16,
+               preInitialize = function () {
+                       if ( isPreInitailization ) {
+                               return;
+                       }
+
+                       window.initGlMatrix( glMatrix );
+
+                       VERTEX_SHADER = [
+                               "attribute vec3 aVertexPosition;",
+                               "attribute vec2 aTextureCoord;",
+                               "attribute vec3 aVertexNormal;",
+                               "uniform mat4 uMoveMatrix;",
+                               "uniform mat4 uPerspectiveMatrix;",
+                               "uniform mat3 nNormalMatrix;",
+                               "uniform vec3 uAmbientColor;",
+                               "uniform vec3 uLightDirection;",
+                               "uniform vec3 uDirectionColor;",
+                               "uniform vec3 uLightDirection_first;",
+                               "uniform vec3 uLightDirection_second;",
+                               "varying vec2 vTextureCoord;",
+                               "varying vec3 vLightWeight;",
+                               "varying vec4 vFogWeight;",
+
+                               "void main(void) {",
+                               "       vec4 v_Position = uMoveMatrix * vec4(aVertexPosition, 1.0);",
+                               "       gl_Position = uPerspectiveMatrix * v_Position;",
+                               "       vTextureCoord = aTextureCoord;",
+                               "       float fog = 1.0 - ((gl_Position.z + 1.5) / 60.0);",
+                               "       vFogWeight = clamp( vec4( fog, fog, fog, 1.0), 0.6, 1.0);",
+                               "       vec3 transNormalVector = nNormalMatrix * aVertexNormal;",
+
+                               "       float vLightWeightFirst = 0.0;",
+                               "       float vLightWeightSecond = max( dot(transNormalVector, uLightDirection_second), 0.0 );",
+
+                               "       vLightWeight = uAmbientColor + uDirectionColor * vLightWeightSecond;",
+                               "}"
+                       ].join( "\n" );
+
+                       FRAGMENT_SHADER = [
+                               "precision mediump float;",
+                               "varying vec2 vTextureCoord;",
+                               "varying vec3 vLightWeight;",
+                               "uniform sampler2D uSampler;",
+                               "varying vec4 vFogWeight;",
+
+                               "void main(void) {",
+                               "       vec4 TextureColor;",
+                               "       if ( vTextureCoord.s <= 0.01 || vTextureCoord.s >= 0.99 || vTextureCoord.t <= 0.01 || vTextureCoord.t >= 0.99 ) {",
+                               "               TextureColor = vec4(1.0, 1.0, 1.0, 0.5);",
+                               "       } else {",
+                               "               TextureColor = texture2D(uSampler, vec2(vTextureCoord.s, vTextureCoord.t));",
+                               "       }",
+                               "       TextureColor *= vFogWeight;",
+                               "       gl_FragColor = vec4(TextureColor.rgb * vLightWeight, TextureColor.a);",
+                               "}"
+                       ].join( "\n" );
+
+                       GlArray32 = ( typeof window.Float32Array !== "undefined" ?
+                                       window.Float32Array :
+                                               ( typeof window.WebGLFloatArray !== "undefined" ? window.WebGLFloatArray : Array ) );
+
+                       GlArray16 = ( typeof window.Uint16Array !== "undefined" ? window.Uint16Array : Array );
+
+                       isPreInitailization = true;
+               },
+               degreeToRadian = function ( degree ) {
+                       return degree * Math.PI / 180;
+               },
+               getContext3D = function ( canvas ) {
+                       var gl, i,
+                               contextNames = [ "experimental-webgl", "webkit-3d", "webgl", "moz-webgl" ];
+
+                       for ( i = 0; i < contextNames.length; i += 1 ) {
+                               try {
+                                       gl = canvas.getContext( contextNames[i] );
+                                       if ( gl ) {
+                                               break;
+                                       }
+                               } catch ( e ) {
+                                       $( canvas ).html( "Unfortunately, there's a WebGL compatibility problem. </br> You may want to check your system settings." );
+                                       return;
+                               }
+                       }
+                       return gl;
+               },
+               requestAnimationFrame = function ( callback ) {
+                       var id = window.setTimeout( callback, 1000 / 60 );
+                       return id;
+               },
+               cancelAnimationFrame = function ( id ) {
+                       window.clearTimeout( id );
+               };
+
        $.widget( "tizen.gallery3d", $.mobile.widget, {
                options: {
                        thumbnailCache: false
@@ -607,6 +622,8 @@ define( [ "components/imageloader", "components/motionpath", "components/webgl"
                                view = self.element,
                                option = self.options;
 
+                       preInitialize();
+
                        self._canvas = $( "<canvas class='ui-gallery3d-canvas'></canvas>" );
 
                        view.addClass( "ui-gallery3d" ).append( self._canvas );
@@ -618,7 +635,11 @@ define( [ "components/imageloader", "components/motionpath", "components/webgl"
                                self.options[ key ] = undefined;
                                self._setOption( key, value );
                        });
+               },
 
+               destroy: function () {
+                       this._final();
+                       $.mobile.widget.prototype.destroy.call( this );
                },
 
                _setOption: function ( key, value ) {
@@ -725,27 +746,11 @@ define( [ "components/imageloader", "components/motionpath", "components/webgl"
                                touchEndEvt = ( $.support.touch ? "touchend" : "mouseup" ) + ".gallery3d",
                                touchLeaveEvt = ( $.support.touch ? "touchleave" : "mouseout" ) + ".gallery3d";
 
-                       $( document ).unbind( ".gallery3d" ).bind( "pagechange.gallery3d", function ( e ) {
-                               $( e.target ).find( ".ui-gallery3d" ).gallery3d( "refresh" );
-                       }).bind( "pageremove.gallery3d", function ( e ) {
-                               $( e.target ).find( ".ui-gallery3d" ).trigger( "_destory" );
-                       });
-
-                       $( window ).unbind( ".gallery3d" ).bind( "resize.gallery3d orientationchange.gallery3d", function ( e ) {
-                               $( ".ui-page-active" ).find( ".ui-gallery3d" ).gallery3d( "refresh" );
-                       }).bind( "unload.gallery3d", function ( e ) {
-                               $( e.target ).find( ".ui-gallery3d" ).trigger( "_destory" );
-                       });
-
-                       view.bind( "_destory", function ( e ) {
-                               self._final();
-                       });
-
-                       canvas.bind( "webglcontextlost", function ( e ) {
+                       canvas.on( "webglcontextlost", function ( e ) {
                                e.preventDefault();
-                       }).bind( "webglcontextrestored", function ( e ) {
+                       }).on( "webglcontextrestored", function ( e ) {
                                self._init();
-                       }).bind( touchStartEvt, function ( e ) {
+                       }).on( touchStartEvt, function ( e ) {
                                var i = 0,
                                        startX = 0,
                                        deltaMaxSteps = 20,
@@ -775,7 +780,7 @@ define( [ "components/imageloader", "components/motionpath", "components/webgl"
 
                                deltaIndex += 1;
 
-                               view.bind( touchMoveEvt, function ( e ) {
+                               view.on( touchMoveEvt, function ( e ) {
                                        var x, dx, interval;
 
                                        e.preventDefault();
@@ -808,7 +813,7 @@ define( [ "components/imageloader", "components/motionpath", "components/webgl"
                                                startX = x;
                                                prevTime = $.now();
                                        }
-                               }).bind( touchEndEvt, function ( e ) {
+                               }).on( touchEndEvt, function ( e ) {
                                        var baseTime = 0,
                                                recent = -1,
                                                index = 0,
@@ -871,7 +876,7 @@ define( [ "components/imageloader", "components/motionpath", "components/webgl"
                                        }
 
                                        view.unbind( ".gallery3d" );
-                               }).bind( touchLeaveEvt, function ( e ) {
+                               }).on( touchLeaveEvt, function ( e ) {
                                        view.trigger( touchEndEvt );
                                });
                        });
@@ -882,11 +887,11 @@ define( [ "components/imageloader", "components/motionpath", "components/webgl"
                // ----------------------------------------------------------
                _initGL: function ( canvas ) {
                        var self = this,
+                               mat4 = glMatrix.mat4,
                                gl;
 
                        gl = getContext3D( canvas );
                        if ( !gl ) {
-                               window.alert( "There's no WebGL context available!!!" );
                                return null;
                        }
 
@@ -1083,6 +1088,7 @@ define( [ "components/imageloader", "components/motionpath", "components/webgl"
                // ----------------------------------------------------------
                _setPosition: function ( progress, direction ) {
                        var self = this,
+                               mat4 = glMatrix.mat4,
                                nodes = self._nodes,
                                imageList = self._imageList,
                                imageListLength = imageList.length,
@@ -1130,7 +1136,7 @@ define( [ "components/imageloader", "components/motionpath", "components/webgl"
 
                                mat4.identity( nodes[i].mvMatrix );
                                mat4.translate( nodes[i].mvMatrix, [-2.0, -2.0, 1.0] );
-                               mat4.rotate( nodes[i].mvMatrix, self._degreeToRadian( 19 ), [1, 0, 0] );
+                               mat4.rotate( nodes[i].mvMatrix, degreeToRadian( 19 ), [1, 0, 0] );
 
                                t = ( current + ( next - current ) * ( ( progress > 1 ) ? 1 : progress ) );
 
@@ -1204,6 +1210,9 @@ define( [ "components/imageloader", "components/motionpath", "components/webgl"
                _drawElement: function ( perspectiveMatrix, targetNode ) {
                        var self = this,
                                gl = self._gl,
+                               vec3 = glMatrix.vec3,
+                               mat3 = glMatrix.mat3,
+                               mat4 = glMatrix.mat4,
                                shaderProgram = self._shaderProgram,
                                moveMatrix = targetNode.mvMatrix,
                                texture = targetNode.texture,
@@ -1292,7 +1301,7 @@ define( [ "components/imageloader", "components/motionpath", "components/webgl"
                                self._setPosition( progress - _removeCount, direction );
                        }
 
-                       self._animationID = window.requestAnimationFrame( function () {
+                       self._animationID = requestAnimationFrame( function () {
                                self._animate( easingType, duration, direction, repeatCount, startValue, _removeCount );
                        });
                },
@@ -1329,7 +1338,7 @@ define( [ "components/imageloader", "components/motionpath", "components/webgl"
 
                _stop: function () {
                        if ( this._animationID ) {
-                               window.cancelAnimationFrame( this._animationID );
+                               cancelAnimationFrame( this._animationID );
                        }
                        this._animationID = 0;
 
@@ -1337,10 +1346,6 @@ define( [ "components/imageloader", "components/motionpath", "components/webgl"
                        this._sumTime = 0;
                },
 
-               _degreeToRadian: function ( degree ) {
-                       return degree * Math.PI / 180;
-               },
-
                next: function () {
                        this._run( this._DIRECTION_LEFT , 0 );
                },
@@ -1455,12 +1460,18 @@ define( [ "components/imageloader", "components/motionpath", "components/webgl"
                }
        });
 
-       $( document ).bind( "pagecreate create", function ( e ) {
+       $( document ).on( "pagecreate create", function ( e ) {
                $( ":jqmData(role='gallery3d')" ).gallery3d();
+       }).on( "pagechange", function ( e ) {
+               $( e.target ).find( ".ui-gallery3d" ).gallery3d( "refresh" );
+       });
+
+       $( window ).on( "resize orientationchange", function ( e ) {
+               $( ".ui-page-active" ).find( ".ui-gallery3d" ).gallery3d( "refresh" );
        });
 
 } ( jQuery, document, window ) );
 
 //>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
 } );
-//>>excludeEnd("jqmBuildExclude");
\ No newline at end of file
+//>>excludeEnd("jqmBuildExclude");
index 19644c9..8618c00 100644 (file)
@@ -34,7 +34,7 @@ define( [ ], function ( ) {
                options: {
                        initSelector: ":jqmData(role='list-divider')",
                        folded : false,
-                       listDividerLine : true,
+                       listDividerLine : true
                },
 
                _create: function () {
@@ -73,7 +73,7 @@ define( [ ], function ( ) {
                        $listdivider.bind( "vclick", function ( event, ui ) {
                        /* need to implement expand/collapse divider */
                        });
-               },
+               }
        });
 
        //auto self-init widgets
index b7bc3d2..c75caf3 100644 (file)
@@ -300,7 +300,7 @@ define( [ '../jquery.mobile.tizen.core' ], function ( ) {
                                dpr = 1,
                                layoutInnerHeight = window.innerHeight;
 
-                        if ( !$.support.scrollview ) {
+                        if ( !$.support.scrollview || ($.support.scrollview && $elContent.jqmData("scroll") === "none") ) {
                                 dpr = window.outerWidth / window.innerWidth;
                                 layoutInnerHeight = Math.floor( window.outerHeight / dpr );
                         } else {
@@ -309,8 +309,8 @@ define( [ '../jquery.mobile.tizen.core' ], function ( ) {
 
                        resultMinHeight = layoutInnerHeight - $elHeader.height() - $elFooter.height();
 
-                       $elContent.css( "min-height", resultMinHeight - parseFloat( $elContent.css("padding-top") ) - parseFloat( $elContent.css("padding-bottom") ) + "px" );
-                       if ( $.support.scrollview ) {
+                        if ( $.support.scrollview && $elContent.jqmData("scroll") !== "none" ) {
+                               $elContent.css( "min-height", resultMinHeight - parseFloat( $elContent.css("padding-top") ) - parseFloat( $elContent.css("padding-bottom") ) + "px" );
                                $elContent.children( ".ui-scrollview-view" ).css( "min-height", $elContent.css( "min-height" ) );
                        }
                },
@@ -342,7 +342,7 @@ define( [ '../jquery.mobile.tizen.core' ], function ( ) {
 
                        tbPage = tbPage || $el.closest( ".ui-page" );
 
-                       if ( $el.siblings( ".ui-header" ).jqmData("position") == "fixed" || $.support.scrollview ) {
+                       if ( $el.siblings( ".ui-header" ).jqmData("position") == "fixed" || ($.support.scrollview && $el.jqmData("scroll") !== "none" )) {
                                $( tbPage ).css( "padding-top", ( header ? $el.siblings( ".ui-header" ).outerHeight() : 0 ) );
                        }
                        $( tbPage ).css( "padding-bottom", ( footer ? $el.siblings( ".ui-footer" ).outerHeight() : 0 ) );
@@ -374,7 +374,7 @@ define( [ '../jquery.mobile.tizen.core' ], function ( ) {
                                $elFooter.css( "bottom", 0 );
                        }
 
-                       if ( !$.support.scrollview ) {
+                       if ( !$.support.scrollview || ($.support.scrollview && $elContent.jqmData("scroll") === "none") ) {
                                dpr = window.outerWidth / window.innerWidth;
                                layoutInnerHeight = Math.floor( window.outerHeight / dpr );
                        } else {
@@ -383,7 +383,7 @@ define( [ '../jquery.mobile.tizen.core' ], function ( ) {
 
                        resultContentHeight = layoutInnerHeight - resultFooterHeight - resultHeaderHeight;
 
-                       if ( $.support.scrollview ) {
+                       if ( $.support.scrollview && $elContent.jqmData("scroll") !== "none" ) {
                                $elContent.height( resultContentHeight -
                                                parseFloat( $elContent.css("padding-top") ) -
                                                parseFloat( $elContent.css("padding-bottom") ) );
index 45c8648..1aa2b7e 100644 (file)
@@ -227,14 +227,14 @@ define( [ '../jquery.mobile.tizen.core', 'jquery.mobile.tizen.popupwindow', 'jqu
                                                        )
                                        ),
                                        // Triangle points here
-                               final = {
+                               finalposition = {
                                        "x": orig.x + ( isHorizontal ? triangleOffset : 0) + ("r" === arrow ? size.cx : 0),
                                        "y": orig.y + (!isHorizontal ? triangleOffset : 0) + ("b" === arrow ? size.cy : 0)
                                },
                                ret = {
                                        actual                  : orig,
                                        triangleOffset  : triangleOffset,
-                                       absDiff                 : Math.abs( x - final.x ) + Math.abs( y - final.y )
+                                       absDiff                 : Math.abs( x - finalposition.x ) + Math.abs( y - finalposition.y )
                                };
 
                        // Hide it back
index a160f17..01e44aa 100644 (file)
@@ -38,7 +38,7 @@ define( [ '../jquery.mobile.tizen.scrollview' ], function ( ) {
  *  The number of panes inside of Splitview is restricted as two.
  *  If a user define only one pane in Splitview, a empty pane will be added automatically,
  *  on the other hand, if 3 or more panes are defined in Splitview, the panes after two will be ignored and removed from the DOM tree.
- *  The HTML fragments of a pane should be composed of elements describing a part of Web page (e.g. <div>…</div>).
+ *  The HTML fragments of a pane should be composed of elements describing a part of Web page (e.g. <div>...</div>).
  *  Also widgets can be included in the HTML fragments.
  *
  *  HTML Attributes:
@@ -189,31 +189,14 @@ define( [ '../jquery.mobile.tizen.scrollview' ], function ( ) {
 
                        $el.addClass( "ui-splitview ui-direction-" + self._direction( opt.dividerVertical ) );
 
-                       if ( $el.parent().closest( ".ui-splitview" ).length ) {
-                               if ( self._getContainerSize( $el[ 0 ].style.width, $el[ 0 ].style.height ) ) {
-                                       self._layout();
-                               }
-                       }
-
-                       $( window ).bind( "pagechange", function ( e ) {
-                               if ( !$el.parent().closest( ".ui-splitview" ).length ) {
-                                       if ( self._getContainerSize( $el[ 0 ].style.width, $el[ 0 ].style.height ) ) {
-                                               self._layout();
-                                       }
-                               }
-                       }).resize( function () {
-                               if ( resizeTimer ) {
-                                       clearTimeout( resizeTimer );
-                               }
+                       self._refresh();
 
-                               resizeTimer = setTimeout( function () {
-                                       if ( !$el.parent().closest( ".ui-splitview" ).length ) {
-                                               if ( self._getContainerSize( $el[ 0 ].style.width, $el[ 0 ].style.height ) ) {
-                                                       self._layout();
-                                               }
-                                       }
-                               }, 250);
-                       });
+                       $( window ).unbind( ".splitview" )
+                               .bind( "pagechange.splitview resize.splitview", function ( event ) {
+                                       $( ".ui-page-active .ui-splitview" ).each( function () {
+                                               $( this ).data( "splitview" )._refresh();
+                                       });
+                               });
                },
 
                _addEmptyPanes : function () {
@@ -559,13 +542,8 @@ define( [ '../jquery.mobile.tizen.scrollview' ], function ( ) {
                                widthSum = 0,
                                childSplitview = null;
 
-                       if ( typeof initRatio === "undefined" ) {
-                               initRatio = false;
-                       }
-
-                       if ( initRatio && typeof fromFirstPane === "undefined" ) {
-                               fromFirstPane = false;
-                       }
+                       initRatio = !!initRatio;
+                       fromFirstPane = !!fromFirstPane;
 
                        $el.css( {
                                "min-width" : width,
@@ -636,23 +614,15 @@ define( [ '../jquery.mobile.tizen.scrollview' ], function ( ) {
                                        spliter.outerWidth( innerSize ).css( "top", posValue );
                                }
 
-                               if ( typeof bar !== "undefined" && bar ) {
-                                       if ( isHorizontal ) {
-                                               bar.outerHeight( innerSize );
-                                       } else {
-                                               bar.outerWidth( innerSize );
-                                       }
+                               if ( bar.length ) {
+                                       bar[ isHorizontal ? "outerHeight" : "outerWidth" ]( innerSize );
                                }
-                               if ( typeof handle !== "undefined" && handle ) {
-                                       if ( isHorizontal ) {
-                                               handle.css( "top", ( innerSize - spliterWidth ) / 2 );
-                                       } else {
-                                               handle.css( "left", ( innerSize - spliterWidth ) / 2 );
-                                       }
+                               if ( handle.length ) {
+                                       handle.css( isHorizontal ? "top" : "left", ( innerSize - spliterWidth ) / 2 );
                                }
                        });
 
-                       childSplitview = $el.find( ":jqmData(role='splitview'):first" );
+                       childSplitview = $el.find( ".ui-splitview:first" );
                        if ( !childSplitview.length ) {
                                return;
                        }
@@ -671,42 +641,34 @@ define( [ '../jquery.mobile.tizen.scrollview' ], function ( ) {
 
                        $.each( spliters, function ( i ) {
                                var spliter = $( this );
-                               self._bindSpliterTouchEvents( spliter );
-                       });
-
-                       $el.mouseleave( function () {
-                               if ( self.touchStatus ) {
-                                       $el.children( ".ui-spliter" ).trigger( "vmouseup" );
-                               }
-                       });
-
-                       $panes.bind( "vmousedown", function () {
-                               $el.find( ".ui-spliter" ).trigger( "vmouseup" );
+                               self._bindSpliterTouchEvents.call( self, spliter );
                        });
                },
 
                _bindSpliterTouchEvents : function ( spliter ) {
                        var self = this,
                                $el = self.element,
-                               opt = self.options;
+                               opt = self.options,
+                               touchStartEvt = ( $.support.touch ? "touchstart" : "mousedown" ),
+                               touchMoveEvt = ( $.support.touch ? "touchmove" : "mousemove" ) + ".splitview",
+                               touchEndEvt = ( $.support.touch ? "touchend" : "mouseup" ) + ".splitview";
 
-                       spliter.bind( "vmousedown", { e : spliter }, function ( event ) {
+                       spliter.bind( touchStartEvt, { e : spliter }, function ( event ) {
                                if ( self.options.fixed ) {
                                        return;
                                }
 
-                               var targetSpliter = event.data.e,
+                               var realEvent = $.support.touch ? event.originalEvent.changedTouches[0] : event,
+                                       targetSpliter = event.data.e,
                                        prevPane = targetSpliter.prev(),
                                        nextPane = targetSpliter.next(),
-                                       splitviewInPrev = prevPane.find( ":jqmData(role='splitview'):first" ),
-                                       splitviewInNext = nextPane.find( ":jqmData(role='splitview'):first" ),
+                                       splitviewInPrev = prevPane.find( ".ui-splitview:first" ),
+                                       splitviewInNext = nextPane.find( ".ui-splitview:first" ),
                                        isHorizontal = opt.dividerVertical,
                                        spliterWidth = isHorizontal ?
                                                                        $( self.spliterBars[0] ).outerWidth() :
                                                                        $( self.spliterBars[0] ).outerHeight();
 
-                               $el.closest( ".ui-page" ).find( ".ui-spliter" ).trigger( "vmouseup" );
-
                                self.moveTarget = targetSpliter;
                                self.moveData = {
                                        spliterWidth : spliterWidth || 0,
@@ -719,36 +681,30 @@ define( [ '../jquery.mobile.tizen.scrollview' ], function ( ) {
                                        nextPanePos : parseInt( nextPane.css( isHorizontal ? "left" : "top" ), 10 ) || 0,
                                        nextPaneWidth : parseInt( nextPane.css( isHorizontal ? "width" : "height" ), 10 ) || 0,
                                        targetPos : parseInt( targetSpliter.css( isHorizontal ? "left" : "top" ), 10 ) || 0,
-                                       pagePos : isHorizontal ? event.pageX : event.pageY
+                                       pagePos : isHorizontal ? realEvent.pageX : realEvent.pageY
                                };
 
                                targetSpliter.addClass( "ui-spliter-active" );
 
-                               $( document ).bind( "vmousemove.splitview", function ( event ) {
+                               $el.bind( touchMoveEvt, function ( event ) {
                                        if ( !self.touchStatus ) {
                                                return;
                                        }
-
-                                       self._drag( event );
-
-                                       event.preventDefault();
                                        event.stopPropagation();
-                               }).bind( "vmouseup.splitview", function ( event ) {
-                                       if ( !self.touchStatus ) {
-                                               return;
-                                       }
-
-                                       self._stop( event );
-
-                                       event.preventDefault();
+                                       self._drag( $.support.touch ? event.originalEvent.changedTouches[0] : event );
+                               }).bind( touchEndEvt, function ( event ) {
                                        event.stopPropagation();
-
+                                       self._stop( $.support.touch ? event.originalEvent.changedTouches[0] : event );
                                        self.touchStatus = false;
+                                       $el.unbind( ".splitview" );
+                                       $( document ).unbind( ".splitview" );
                                });
 
-                               event.preventDefault();
-                               event.stopPropagation();
+                               $( document ).bind( touchMoveEvt + " " + touchEndEvt, function() {
+                                       $el.trigger( touchEndEvt );
+                               });
 
+                               event.preventDefault();
                                self.touchStatus = true;
                        });
                },
@@ -806,7 +762,7 @@ define( [ '../jquery.mobile.tizen.scrollview' ], function ( ) {
                },
 
                _stop : function ( e ) {
-                       if ( !this.moveData || typeof this.moveData === "undefined" ) {
+                       if ( !this.moveData || !this.moveTarget ) {
                                return;
                        }
 
@@ -839,7 +795,6 @@ define( [ '../jquery.mobile.tizen.scrollview' ], function ( ) {
                                                                        ( height - spliterSize ),
                                sum = 0;
 
-                       $( document ).unbind( "vmousemove.splitview vmouseup.splitview" );
                        moveTarget.removeClass( "ui-spliter-active" );
 
                        // ratio calculation
@@ -938,13 +893,8 @@ define( [ '../jquery.mobile.tizen.scrollview' ], function ( ) {
                        var self = this,
                                $el = self.element;
 
-                       if ( typeof initRatio === "undefined" ) {
-                               initRatio = false;
-                       }
-
-                       if ( initRatio && typeof fromFirstPane === "undefined" ) {
-                               fromFirstPane = false;
-                       }
+                       initRatio = !!initRatio;
+                       fromFirstPane = !!fromFirstPane;
 
                        if ( self._getContainerSize( $el[ 0 ].style.width, $el[ 0 ].style.height ) ) {
                                self._layout( initRatio, fromFirstPane );
@@ -967,7 +917,7 @@ define( [ '../jquery.mobile.tizen.scrollview' ], function ( ) {
                        }
 
                        // getter
-                       if ( typeof element === "undefined" || !element ) {
+                       if ( !element ) {
                                return $targetPane.contents();
                        }
 
@@ -1019,7 +969,7 @@ define( [ '../jquery.mobile.tizen.scrollview' ], function ( ) {
                restore : function () {
                        var self = this;
 
-                       if ( self.savedRatio.length === 0 ) {
+                       if ( !self.savedRatio.length ) {
                                return;
                        }
 
old mode 100755 (executable)
new mode 100644 (file)
index 6ca9b0c..c640266
Binary files a/src/themes/tizen/tizen-black/images/controls/button/00_icon_SIP_close_press_web.png and b/src/themes/tizen/tizen-black/images/controls/button/00_icon_SIP_close_press_web.png differ
old mode 100755 (executable)
new mode 100644 (file)
index 7a744ab..cdd186f
Binary files a/src/themes/tizen/tizen-black/images/controls/button/00_icon_SIP_close_web_web.png and b/src/themes/tizen/tizen-black/images/controls/button/00_icon_SIP_close_web_web.png differ
index 6ca9b0c..84c80e3 100644 (file)
Binary files a/src/themes/tizen/tizen-white/images/controls/button/00_icon_SIP_close_press_web.png and b/src/themes/tizen/tizen-white/images/controls/button/00_icon_SIP_close_press_web.png differ
index 7a744ab..d63b53e 100644 (file)
Binary files a/src/themes/tizen/tizen-white/images/controls/button/00_icon_SIP_close_web_web.png and b/src/themes/tizen/tizen-white/images/controls/button/00_icon_SIP_close_web_web.png differ