* ***************************************************************************
*
* Authors: Gabriel Schulhof <gabriel.schulhof@intel.com>
+ * Hyunjung Kim <hjnim.kim@samsung.com>
*/
+/*
+ * % ContextPopup widget do not use anymore(will be deprecated, internal use only)
+ */
// This widget is implemented in an extremely ugly way. It should derive from $.tizen.popupwindow, but it doesn't
// because there's a bug in jquery.ui.widget.js which was fixed in jquery-ui commit
// b9153258b0f0edbff49496ed16d2aa93bec07d95. Once a version of jquery-ui containing that commit is released
// to one in the superclass, upon calling $.widget the object is overwritten in both the prototype of the superclass and
// the prototype of the subclass. The prototype of the superclass should remain unchanged.
+/**
+ class ContextPopup
+ The context pop-up widget shows a list of options and automatically optimizes its size within the screen. This widget is intended for a small list of options for a larger list, use the List widget. <br/>The context pop-up widget requires a target button, which must be clicked to open the context pop-up. In the default application theme, an arrow pointer is displayed at the top-left corner of the context pop-up widget when it is opened.<br/><br/> To add a context pop-up widget to the application, use the following code:
+
+ // Target button
+ <a href="#pop_3_icons" id="btn_3_icons" data-role="button" data-inline="true" data-rel="popupwindow">3 Icons</a>
+ // Context pop-up
+ <div class="horizontal" id="pop_3_icons" data-role="popupwindow" data-show-arrow="true">
+ <ul>
+ <li class="icon">
+ <a href="#" data-role="button" data-icon="call"></a>
+ </li>
+ <li class="icon">
+ <a href="#" data-role="button" data-icon="favorite"></a>
+ </li>
+ <li class="text">
+ <a href="#">Function</a>
+ </li>
+ </ul>
+ </div>
+ The context pop-up can define callbacks for events as described in the [jQueryMobile documentation for pop-up events.][1]
+ You can use methods with the context pop-up as described in the [jQueryMobile documentation for pop-up methods.][2]
+ [1]: http://jquerymobile.com/demos/1.2.0-alpha.1/docs/pages/popup/events.html
+ [2]: http://jquerymobile.com/demos/1.2.0-alpha.1/docs/pages/popup/methods.html
+
+ @deprecated 2.0 verisons
+*/
+
(function ( $, undefined ) {
$.widget( "tizen.ctxpopup", $.tizen.widgetex, {
options: $.extend( {}, $.tizen.popupwindow.prototype.options, {
},
_create: function () {
+ console.warn("ctxpopup() was deprecated. use popup() instead.");
if ( !this.element.data( "popupwindow" ) ) {
this.element.popupwindow();
}
arrowSize / 2 // arrow unrestricted offset
+ desired[coord.point]
- orig[coord.point]
- - halfSize[coord.size]
+ - halfSize[coord.size]
)
),
// Triangle points here
var ctxpopup = this.element.data( "ctxpopup" );
if ( ctxpopup ) {
+ this._setFade( false );
this._setShadow( false );
this._setCorners( false );
this._setOverlayTheme( null );
$( '.ui-popupwindow' ).css( 'background', 'none' );
}
- origOpen.call( this, x, y );
+ origOpen.call( this, x, y, true );
};
//auto self-init widgets