1 //>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
2 //>>description: Show different HTML contents at the same time on each divided pane.
4 //>>group: Tizen:Widgets
6 define( [ '../jquery.mobile.tizen.scrollview' ], function ( ) {
7 //>>excludeEnd("jqmBuildExclude");
9 /* ***************************************************************************
10 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd.
12 * Permission is hereby granted, free of charge, to any person obtaining a
13 * copy of this software and associated documentation files (the "Software"),
14 * to deal in the Software without restriction, including without limitation
15 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
16 * and/or sell copies of the Software, and to permit persons to whom the
17 * Software is furnished to do so, subject to the following conditions:
19 * The above copyright notice and this permission notice shall be included in
20 * all copies or substantial portions of the Software.
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
27 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
28 * DEALINGS IN THE SOFTWARE.
29 * ***************************************************************************
31 * Author: Sanghee Lee <sang-hee.lee@samsung.com>
35 * Splitview is a widget which can show different HTML contents at the same time on each divided pane.
36 * A user can place Splitview controls on JQuery Mobile's Content area and arrange two panes on the widget.
37 * And HTML fragments or another Splitview also can be placed on the pane.
38 * The number of panes inside of Splitview is restricted as two.
39 * If a user define only one pane in Splitview, a empty pane will be added automatically,
40 * 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.
41 * The HTML fragments of a pane should be composed of elements describing a part of Web page (e.g. <div>...</div>).
42 * Also widgets can be included in the HTML fragments.
46 * data-fixed : The resizing mode of panes - fixed and flexible mode.
47 * If the value is true, the panes' sizes will be fixed, or if not, it will be flexible. (Default : false)
48 * data-divider-vertical : The direction of dividers.
49 * If the value is true, the panes will be placed in horizontal direction,
50 * or if not, it will be placed in vertical direction. (Default : "true")
51 * data-ratio : The ratio of two panes' widths or heights. (Default : [ 1/2, 1/2 ]
55 * pane ( id [ , element ] )
56 * : This method replaces child contents of a pane indicated by id attribute with contents of inputted element.
57 * If second argument is not specified, it will act as a getter method.
58 * The string of id has to be started with "#" which means "id" of CSS selectors.
60 * : This method maximizes a pane's size indicated by id.
61 * The string of id has to be started with "#" which means "id" of CSS selectors.
63 * : This method restores all panes' sizes to the ratio prior to maximization.
67 * <div data-role="splitview" data-fixed="false" data-divider-vertical="true" data-ratio="0.5, 0.5">
68 * <div class="ui-pane">pane0</div>
69 * <div class="ui-pane">pane1</div>
77 Splitview widget enables a user to place and arrange several panes. Each divided pane can show repective HTML contents.
79 To add a Splitview widget to the application, use the following code:
81 <div data-role="splitview" data-fixed="false" data-divider-vertical="true" data-ratio="0.5, 0.5">
82 <div class="ui-pane">pane0</div>
83 <div class="ui-pane">pane1</div>
88 @property {Boolean} data-fixed
89 The resizing mode of panes - fixed and flexible mode.
93 @property {Boolean} data-divider-vertical
94 The direction of dividers - horizontal or vertical.
98 @property {Array} data-ratio
99 The ratio of two panes' widths or heights.
104 This method replaces child contents of a pane indicated by id attribute with contents of inputted element.
105 If second argument is not specified, it will act as a getter method.
107 <div data-role="splitview">
108 <div class="ui-pane" id="pane0">pane0</div>
109 <div class="ui-pane" id="pane1">pane1</div>
111 $(".selector").splitview("pane", id, element);
116 This method maximizes a pane's size indicated by id.
118 <div data-role="splitview">
119 <div class="ui-pane" id="pane0">pane0</div>
120 <div class="ui-pane" id="pane1">pane1</div>
122 $(".selector").splitview("maximize", id);
127 This method restores all panes' sizes to the ratio prior to maximization.
129 <div data-role="splitview">
130 <div class="ui-pane" id="pane0">pane0</div>
131 <div class="ui-pane" id="pane1">pane1</div>
133 $(".selector").splitview("restore");
136 ( function ( $, window, document, undefined ) {
137 $.widget( "tizen.splitview", $.mobile.widget, {
140 dividerVertical : true,
142 initSelector : ":jqmData(role='splitview')"
145 _create : function () {
149 $panes = $el.children( ".ui-pane" ),
150 panesLength = $panes.length,
153 ratioAttr = this.element.attr( "data-ratio" ),
154 containerSize = [ 0, 0 ],
158 if ( panesLength !== 2 ) {
159 if ( panesLength < 2 ) {
160 for ( i = panesLength ; i < 2 ; ++i ) {
161 self._addEmptyPanes();
164 $panes.slice( 2 ).remove();
167 $panes = $el.children( ".ui-pane" );
168 panesLength = $panes.length;
171 spliters[ 0 ] = $( "<a href='#' class='ui-spliter' aria-label='Drag scroll, double tap and move to adjust split area'></a>" ).insertAfter( $panes[ 0 ] );
172 spliterBars[ 0 ] = $( "<div class='ui-spliter-bar'></div>" ).appendTo( spliters[ 0 ] );
173 $( "<div class='ui-spliter-handle'></div>" ).appendTo( spliterBars[ 0 ] );
179 spliterBars : spliterBars,
181 containerSize : containerSize,
187 self._bindTouchEvents();
188 self._convertRatio( ratioAttr, $panes.length );
190 $el.addClass( "ui-splitview ui-direction-" + self._direction( opt.dividerVertical ) );
194 $( window ).unbind( ".splitview" )
195 .bind( "pagechange.splitview resize.splitview", function ( event ) {
196 $( ".ui-page-active .ui-splitview" ).each( function () {
197 $( this ).data( "splitview" )._refresh();
202 _addEmptyPanes : function () {
206 $panes = $el.children( ".ui-pane" ),
207 scrollAttribute = ( $.support.scrollview ) ? "data-scroll='y'" : "",
208 pane = $( "<div class='ui-pane' " + scrollAttribute + "></div>" );
210 if ( scrollAttribute.length ) {
211 pane.scrollview( { direction: "y" } );
214 if ( !$panes.length ) {
217 $panes.last().after( pane );
221 _direction : function ( isHorizontal ) {
222 return isHorizontal ? "horizontal" : "vertical";
225 _isStyleSpecified : function ( cssString ) {
226 return ( typeof cssString !== "undefined" && cssString.length );
229 _getContainerSize : function ( widthString, heightString ) {
232 widthSpecified = self._isStyleSpecified( widthString ),
233 heightSpecified = self._isStyleSpecified( heightString );
235 self.containerSize[ 0 ] = ( widthSpecified ) ? $el.outerWidth( true ) : self._parentWidth();
236 self.containerSize[ 1 ] = ( heightSpecified ) ? $el.outerHeight( true ) : self._parentHeight();
238 if ( !self.containerSize[ 0 ] || !self.containerSize[ 1 ] ) {
245 _parentWidth : function () {
246 var $parent = this.element.parent();
248 if ( !$parent && typeof $parent === "undefined" && !$parent.length ) {
249 return $( window ).width();
252 return $parent.width();
255 _parentHeight : function () {
256 var $parent = this.element.parent(),
258 heightSpecified = false,
261 while ( $parent && typeof $parent !== "undefined" && $parent.length ) {
262 if ( typeof $parent[ 0 ].style !== "undefined" ) {
263 heightString = $parent[ 0 ].style.height;
264 heightSpecified = ( typeof heightString !== "undefined" && heightString.length );
265 if ( heightSpecified ) {
266 parentHeight = $parent.height();
271 $parent = $parent.parent();
274 if ( !heightSpecified ) {
275 parentHeight = $(window).height();
281 _convertRatio : function ( ratioParam, panesLength ) {
285 type = typeof ratioParam,
289 for ( i = 0; i < panesLength; ++i ) {
296 ratio[ 0 ] = ratioParam;
301 ratioArray = ratioParam.split( "," );
302 loop = Math.min( ratioArray.length, panesLength );
303 for ( i = 0; i < loop; ++i ) {
304 ratio[ i ] = parseFloat( ratioArray[ i ] );
309 if ( !$.isArray( ratioParam ) ) {
313 loop = Math.min( ratioParam.length, panesLength );
314 for ( i = 0; i < loop; ++i ) {
315 type = typeof ratioParam[ i ];
316 ratio[ i ] = ( type === "string" ) ? parseFloat( ratioParam[ i ] ) :
317 ( type === "number" ) ? ratioParam[ i ] : 0;
322 self.options.ratio = ratio;
323 self._adjustRatio( panesLength );
326 _adjustRatio : function ( panesLength ) {
328 ratio = self.options.ratio,
336 if ( !panesLength ) {
337 self.options.ratio = [];
347 value = remain / panesLength;
352 remain = Math.max( 0, remain - value );
355 subValue = Math.max( subRemain, ratio[ i ] * -1 );
356 ratio[ i ] = Math.max( 0, ratio[ i ] + subValue );
357 remain = Math.min( 0, remain - subValue );
358 subRemain -= subValue;
364 ratio[ ratio.length - 1 ] += remain;
366 for ( i = ratio.length - 1; i >= 0; --i ) {
367 subValue = Math.max( remain, ratio[ i ] * -1 );
368 ratio[ i ] = Math.max( 0, ratio[ i ] + subValue );
369 remain = Math.min( 0, remain - subValue );
377 self.options.ratio = ratio;
381 _setOption : function ( key, value ) {
383 orgValue = self.options[ key ];
385 if ( orgValue === value ) {
389 $.Widget.prototype._setOption.apply( this, arguments );
393 self._fixed( value );
396 case "dividerVertical":
397 self._dividerVertical( value );
401 self._ratio( value );
406 _subtractDiffWidth : function ( width, diff ) {
409 if ( width <= self.minPaneWidth ) {
417 if ( width >= self.minPaneWidth ) {
425 width: self.minPaneWidth,
426 diff: width - self.minPaneWidth
430 _initRatio : function ( fromFirstPane, panes, isHorizontal, availableWidth ) {
435 panesLength = panes.length,
439 panes.each( function ( i ) {
440 var pane = $( this );
441 widths.push( isHorizontal ? pane.width() : pane.height() );
445 diff = availableWidth - sum;
451 widths[ fromFirstPane ? 0 : panesLength - 1 ] += diff;
453 if ( fromFirstPane ) {
454 for ( i = 0; i < panesLength; ++i ) {
455 ret = self._subtractDiffWidth( widths[ i ], diff );
456 widths[ i ] = ret.width;
463 for ( i = panesLength - 1; i >= 0; --i ) {
464 diff = self._subtractDiffWidth( widths[ i ], diff );
465 widths[ i ] = ret.width;
475 for ( i in widths ) {
479 for ( i in self.options.ratio ) {
480 self.options.ratio[ i ] = widths[ i ] / sum;
486 _horizontalBoundary : function () {
490 return $el.outerWidth( true ) - $el.width();
493 _verticalBoundary : function () {
497 return $el.outerHeight( true ) - $el.height();
500 _boundary : function ( type ) {
503 computedStyle = window.getComputedStyle( $el[ 0 ], null ),
504 margin = parseFloat( computedStyle[ "margin" + type ] ),
505 border = parseFloat( computedStyle[ "border" + type + "Width" ] ),
506 padding = parseFloat( computedStyle[ "padding" + type ] );
515 _layout : function ( initRatio, fromFirstPane ) {
519 isHorizontal = opt.dividerVertical,
521 spliters = self.spliters,
522 spliterBars = self.spliterBars,
523 spliterBar = self.spliterBars.length ? $( spliterBars[ 0 ] ) : null,
524 spliterWidth = !spliterBar ? 0 :
525 isHorizontal ? spliterBar.outerWidth() :
526 spliterBar.outerHeight(),
527 spliterBarMargin = !spliterBar ? 0 :
529 spliterBar.outerWidth( true ) - spliterBar.outerWidth() :
530 spliterBar.outerHeight( true ) - spliterBar.outerHeight(),
531 panesLength = $panes.length,
532 currentAvailable = 0,
533 spliterSize = spliterWidth * ( panesLength - 1 ),
534 parentWidth = self.containerSize[ 0 ],
535 parentHeight = self.containerSize[ 1 ],
536 width = parentWidth - self._horizontalBoundary(),
537 height = parentHeight - self._verticalBoundary(),
538 innerSize = isHorizontal ? height : width,
539 availableWidth = isHorizontal ? width - spliterSize :
540 height - spliterSize,
541 initializedWidth = [],
543 childSplitview = null;
545 initRatio = !!initRatio;
546 fromFirstPane = !!fromFirstPane;
550 "min-height" : height
554 initializedWidth = self._initRatio( fromFirstPane, $panes, isHorizontal, availableWidth );
557 currentAvailable = availableWidth;
558 $panes.each( function ( i ) {
559 var $pane = $( this ),
560 paneWidth = initRatio ? initializedWidth[ i ] :
561 Math.floor( availableWidth * self.options.ratio[i] ),
562 prevPane = ( ( i ) ? $panes.eq( i - 1 ) : null ),
568 currentAvailable -= paneWidth;
569 if ( i === ( panesLength - 1 ) ) {
570 paneWidth = Math.max( Math.min( paneWidth, self.minPaneWidth ), paneWidth + currentAvailable );
573 widthSum += paneWidth;
576 boundary = self._boundary( isHorizontal ? "Left" : "Top" );
577 posValue = boundary.padding;
579 posValue = parseInt( prevPane.css( isHorizontal ? "left" : "top" ), 10 );
580 posValue += isHorizontal ? prevPane.width() : prevPane.height();
581 posValue += spliterWidth;
584 widthValue = isHorizontal ? paneWidth : innerSize;
585 heightValue = isHorizontal ? innerSize : paneWidth;
588 "width" : widthValue ,
589 "height" : heightValue
592 $pane.css( ( isHorizontal ? "left" : "top" ), posValue );
595 $panes.each( function ( i ) {
596 var $pane = $( this ),
597 paneWidth = isHorizontal ? $pane.width() : $pane.height();
599 self.options.ratio[ i ] = paneWidth / widthSum;
602 $.each( spliters, function ( i ) {
603 var spliter = $( this ),
604 prevPane = $panes.eq( i ),
605 bar = spliter.children( ".ui-spliter-bar" ),
606 handle = bar.children( ".ui-spliter-handle" ),
609 if ( isHorizontal ) {
610 posValue = parseInt( prevPane.css( "left" ), 10 ) + prevPane.width() - spliterBarMargin;
611 spliter.outerHeight( innerSize ).css( "left", posValue );
613 posValue = parseInt( prevPane.css( "top" ), 10 ) + prevPane.height() - spliterBarMargin;
614 spliter.outerWidth( innerSize ).css( "top", posValue );
618 bar[ isHorizontal ? "outerHeight" : "outerWidth" ]( innerSize );
620 if ( handle.length ) {
621 handle.css( isHorizontal ? "top" : "left", ( innerSize - spliterWidth ) / 2 );
625 childSplitview = $el.find( ".ui-splitview:first" );
626 if ( !childSplitview.length ) {
630 childSplitview = childSplitview.data( "splitview" );
631 if ( childSplitview ) {
632 childSplitview._refresh();
636 _bindTouchEvents : function () {
640 spliters = self.spliters;
642 $.each( spliters, function ( i ) {
643 var spliter = $( this );
644 self._bindSpliterTouchEvents.call( self, spliter );
648 _bindSpliterTouchEvents : function ( spliter ) {
652 touchStartEvt = ( $.support.touch ? "touchstart" : "mousedown" ),
653 touchMoveEvt = ( $.support.touch ? "touchmove" : "mousemove" ) + ".splitview",
654 touchEndEvt = ( $.support.touch ? "touchend" : "mouseup" ) + ".splitview";
656 spliter.bind( touchStartEvt, { e : spliter }, function ( event ) {
657 if ( self.options.fixed ) {
661 var realEvent = $.support.touch ? event.originalEvent.changedTouches[0] : event,
662 targetSpliter = event.data.e,
663 prevPane = targetSpliter.prev(),
664 nextPane = targetSpliter.next(),
665 splitviewInPrev = prevPane.find( ".ui-splitview:first" ),
666 splitviewInNext = nextPane.find( ".ui-splitview:first" ),
667 isHorizontal = opt.dividerVertical,
668 spliterWidth = isHorizontal ?
669 $( self.spliterBars[0] ).outerWidth() :
670 $( self.spliterBars[0] ).outerHeight();
672 self.moveTarget = targetSpliter;
674 spliterWidth : spliterWidth || 0,
677 splitviewInPrev : splitviewInPrev,
678 splitviewInNext : splitviewInNext,
679 prevPanePos : parseInt( prevPane.css( isHorizontal ? "left" : "top" ), 10 ) || 0,
680 prevPaneWidth : parseInt( prevPane.css( isHorizontal ? "width" : "height" ), 10 ) || 0,
681 nextPanePos : parseInt( nextPane.css( isHorizontal ? "left" : "top" ), 10 ) || 0,
682 nextPaneWidth : parseInt( nextPane.css( isHorizontal ? "width" : "height" ), 10 ) || 0,
683 targetPos : parseInt( targetSpliter.css( isHorizontal ? "left" : "top" ), 10 ) || 0,
684 pagePos : isHorizontal ? realEvent.pageX : realEvent.pageY
687 targetSpliter.addClass( "ui-spliter-active" );
689 $el.bind( touchMoveEvt, function ( event ) {
690 if ( !self.touchStatus ) {
693 event.stopPropagation();
694 self._drag( $.support.touch ? event.originalEvent.changedTouches[0] : event );
695 }).bind( touchEndEvt, function ( event ) {
696 event.stopPropagation();
697 self._stop( $.support.touch ? event.originalEvent.changedTouches[0] : event );
698 self.touchStatus = false;
699 $el.unbind( ".splitview" );
700 $( document ).unbind( ".splitview" );
703 $( document ).bind( touchMoveEvt + " " + touchEndEvt, function() {
704 $el.trigger( touchEndEvt );
707 event.preventDefault();
708 self.touchStatus = true;
712 _drag : function ( e ) {
713 if ( !this.moveData || typeof this.moveData === "undefined" ) {
720 isHorizontal = opt.dividerVertical,
721 moveData = self.moveData,
722 moveTarget = self.moveTarget,
723 prevPane = moveData.prevPane,
724 nextPane = moveData.nextPane,
725 splitviewInPrev = moveData.splitviewInPrev,
726 splitviewInNext = moveData.splitviewInNext,
727 spliterWidth = moveData.spliterWidth,
731 prevPaneWidth = null,
732 nextPaneWidth = null,
733 pagePos = isHorizontal ? e.pageX : e.pageY,
736 movement = pagePos - moveData.pagePos;
737 if ( movement > 0 ) {
738 movement = Math.min( Math.max( moveData.nextPaneWidth - self.minPaneWidth, 0 ), movement );
740 movement = Math.max( Math.max( moveData.prevPaneWidth - self.minPaneWidth, 0 ) * -1, movement );
743 nextPanePos = moveData.nextPanePos + movement;
744 prevPaneWidth = Math.max( moveData.prevPaneWidth + movement, 0 );
745 nextPaneWidth = Math.max( moveData.nextPaneWidth - movement, 0 );
746 targetPos = moveData.targetPos + movement;
748 moveTarget.css( isHorizontal ? { left : targetPos } : { top : targetPos } );
749 prevPane.css( isHorizontal ? { width : prevPaneWidth } : { height : prevPaneWidth } );
750 nextPane.css( isHorizontal ? { width : nextPaneWidth, left : nextPanePos } :
751 { height : nextPaneWidth, top : nextPanePos } );
753 if ( splitviewInPrev.length ) {
754 splitview = splitviewInPrev.data( "splitview" );
755 splitview._refresh( true, false );
758 if ( splitviewInNext.length ) {
759 splitview = splitviewInNext.data( "splitview" );
760 splitview._refresh( true, true );
764 _stop : function ( e ) {
765 if ( !this.moveData || !this.moveTarget ) {
773 panesLength = $panes.length,
774 isHorizontal = opt.dividerVertical,
775 moveData = self.moveData,
776 moveTarget = self.moveTarget,
777 prevPane = moveData.prevPane,
778 nextPane = moveData.nextPane,
779 splitviewInPrev = moveData.splitviewInPrev,
780 splitviewInNext = moveData.splitviewInNext,
781 spliterWidth = moveData.spliterWidth,
782 spliterSize = spliterWidth * ( panesLength - 1 ),
786 prevPaneWidth = null,
787 nextPaneWidth = null,
788 displayStyle = $el.css( "display" ),
789 parentWidth = self.containerSize[ 0 ],
790 parentHeight = self.containerSize[ 1 ],
791 width = parentWidth - self._horizontalBoundary(),
792 height = parentHeight - self._verticalBoundary(),
793 availableWidth = isHorizontal ?
794 ( width - spliterSize ) :
795 ( height - spliterSize ),
798 moveTarget.removeClass( "ui-spliter-active" );
801 $panes.each( function ( i ) {
802 var $pane = $( this ),
803 paneWidth = isHorizontal ? $pane.width() : $pane.height();
808 $panes.each( function ( i ) {
809 var $pane = $( this ),
810 paneWidth = isHorizontal ? $pane.width() : $pane.height();
812 self.options.ratio[ i ] = paneWidth / sum;
815 self.moveData = null;
818 _fixed : function ( isFix ) {
820 spliters = self.spliters;
822 $.each( spliters, function ( i ) {
823 var $spliter = $( this );
826 $spliter.addClass( "ui-fixed" );
828 $spliter.removeClass( "ui-fixed" );
835 _dividerVertical : function ( isDividerVertical ) {
838 isHorizontal = isDividerVertical,
844 $panes = $el.children( ".ui-pane" );
845 $spliters = $el.children( ".ui-spliter" );
846 $bar = $spliters.children( ".ui-spliter-bar" );
847 $handle = $bar.children( ".ui-spliter-handle" );
849 $el.removeClass( "ui-direction-vertical" );
850 $el.removeClass( "ui-direction-horizontal" );
851 $el.addClass( "ui-splitview ui-direction-" + self._direction( isHorizontal ) );
877 if ( self._getContainerSize( $el[ 0 ].style.width, $el[ 0 ].style.height ) ) {
882 _ratio : function ( ratioParam ) {
885 $panes = $el.children( ".ui-pane" ),
886 panesLength = $panes.length;
888 self._convertRatio( ratioParam, panesLength );
892 _refresh : function ( initRatio, fromFirstPane ) {
896 initRatio = !!initRatio;
897 fromFirstPane = !!fromFirstPane;
899 if ( self._getContainerSize( $el[ 0 ].style.width, $el[ 0 ].style.height ) ) {
900 self._layout( initRatio, fromFirstPane );
904 pane : function ( id, element ) {
905 if ( typeof id !== "string" ) {
911 $targetPane = $el.children( id ),
913 elementParent = null;
915 if ( !$targetPane.hasClass( "ui-pane" ) ) {
921 return $targetPane.contents();
925 if ( $targetPane.hasClass( "ui-scrollview-clip" ) ) {
926 $targetPane.scrollview( "scrollTo", 0, 0, 0 );
928 $targetView = $targetPane.children( ".ui-scrollview-view" );
929 if ( !$targetView.length ) {
933 $targetView = $targetPane;
936 elementParent = element.parent();
937 if ( elementParent.length && elementParent[ 0 ] === $targetView[ 0 ] ) {
941 $targetView.empty().append( element ).trigger( "create" );
942 $targetView.fadeIn( 'fast' );
945 maximize : function ( id ) {
946 if ( typeof id !== "string" ) {
953 $targetPane = $el.children( id );
955 if ( !$targetPane.hasClass( "ui-pane" ) ) {
959 self.savedRatio = self.options.ratio.slice();
961 self.options.ratio = [];
962 $panes.each( function ( i ) {
963 self.options.ratio.push( ( this === $targetPane[ 0 ] ) ? 1 : 0 );
969 restore : function () {
972 if ( !self.savedRatio.length ) {
976 self.options.ratio = self.savedRatio.slice();
977 self._adjustRatio( self.panes.length );
983 $( document ).bind( "pagecreate create", function ( e ) {
984 $.tizen.splitview.prototype.enhanceWithin( e.target );
986 } ( jQuery, window, document ) );
988 //>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
990 //>>excludeEnd("jqmBuildExclude");