LATEST_ROOT = ${OUTPUT_ROOT}/${PROJECT_NAME}/latest
JS_OUTPUT_ROOT = ${FRAMEWORK_ROOT}/js
+JS_LIB_OUTPUT_DIR = ${JS_OUTPUT_ROOT}/src
export THEME_OUTPUT_ROOT = ${FRAMEWORK_ROOT}/themes
CSS_OUTPUT_ROOT = ${FRAMEWORK_ROOT}/themes/${THEME_NAME}
CSS_IMAGES_OUTPUT_DIR = ${CSS_OUTPUT_ROOT}/images
WIDGET_CSS_OUTPUT_ROOT = ${FRAMEWORK_ROOT}/widget-css
PROTOTYPE_HTML_OUTPUT_DIR = proto-html
-WIDGETS_DIR = $(CURDIR)/src/widgets
-
+JS_DIR = $(CURDIR)/src/js
+WIDGETS_DIR = ${JS_DIR}/widgets
THEMES_DIR = $(CURDIR)/src/themes
LIBS_DIR = $(CURDIR)/libs
JQUERY = jquery-1.8.2.js
JQUERY_MIN = $(subst .js,.min.js,$(JQUERY))
-all: libs_prepare third_party widgets libs_cleanup loader themes version version_compat compress
+all: libs_prepare third_party js libs_cleanup themes version version_compat compress
libs_prepare:
# Prepare libs/ build...
cp ${LIBS_DIR}/js/${JQUERY} ${JS_OUTPUT_ROOT}/jquery.js
cp ${LIBS_DIR}/js/${JQUERY_MIN} ${JS_OUTPUT_ROOT}/jquery.min.js
-widgets: init third_party
+js: init third_party globalize
+ # Building JS files...
+ mkdir -p ${JS_LIB_OUTPUT_DIR}; \
+ cp -a ${JS_DIR}/* ${JS_LIB_OUTPUT_DIR}/; \
+ /usr/bin/node $(CURDIR)/tools/moduledep.js -c ${JS_LIB_OUTPUT_DIR} > ${JS_LIB_OUTPUT_DIR}/../depData.json; \
+ find ${JS_LIB_OUTPUT_DIR} -iname '*.js' | sort | \
+ while read JSFILE; do \
+ echo " # Building $$JSFILE"; \
+ sed -i -e '/^\/\/>>excludeStart\(.*\);/,/^\/\/>>excludeEnd\(.*\);/d' $$JSFILE; \
+ if test ${JSLINT_LEVEL} -ge 1; then \
+ ${JSLINT} $$JSFILE; \
+ if test ${JSLINT_LEVEL} -ge 2 -a $$? -ne 0; then \
+ exit 1; \
+ fi; \
+ fi; \
+ if test "x${INLINE_PROTO}x" = "x1x"; then \
+ echo " $$f (include inline-proto if exists)"; \
+ ./tools/inline-protos.sh $$JSFILE > $$JSFILE.compiled; \
+ rm -f $$JSFILE; \
+ mv $$JSFILE.compiled $$JSFILE; \
+ else \
+ echo " $$f"; \
+ fi; \
+ done; \
+ /usr/bin/node $(CURDIR)/tools/moduledep.js -d ${JS_LIB_OUTPUT_DIR} ${JS_LIB_OUTPUT_DIR}/../depData.json >> ${FW_JS}; \
+ cp -a ${JS_DIR}/* ${JQM_LIB_PATH}/js/* ${JS_LIB_OUTPUT_DIR}/; \
+ /usr/bin/node $(CURDIR)/tools/moduledep.js -c ${JS_LIB_OUTPUT_DIR} > ${JS_LIB_OUTPUT_DIR}/../depData.json; \
+ find ${JS_LIB_OUTPUT_DIR} -iname '*.js' | xargs sed -i -e '/^\/\/>>excludeStart\(.*\);/,/^\/\/>>excludeEnd\(.*\);/d';
+
+widgets: init third_party globalize
# Building widgets...
@@ls -l ${WIDGETS_DIR} | grep '^d' | awk '{print $$NF;}' | \
while read REPLY; do \
fi; \
done
-
-loader: widgets globalize
- cat 'src/loader/loader.js' >> ${FW_JS}
-
-
-globalize: widgets
- cat 'libs/js/globalize/lib/globalize.js' >> ${FW_JS}
+globalize:
+ cat 'libs/js/globalize/lib/globalize.js' >> ${FW_LIB_JS}
# copy globalize libs...
cp -a libs/js/globalize/lib/cultures ${FRAMEWORK_ROOT}/js/
-
themes:
make -C src/themes || exit $?
-version: loader themes
+version: js themes
echo '(function($$){$$.tizen.frameworkData.pkgVersion="$(PKG_VERSION)";}(jQuery));' >> ${FW_JS}
echo "$(PKG_VERSION)" > ${FRAMEWORK_ROOT}/../VERSION
-compress: widgets loader themes
+compress: js themes
# Javacript code compressing
@@echo " # Compressing...."; \
echo '/*' > ${FW_MIN}; \
cat docs/index.footer >> docs/index.html
-version_compat: third_party widgets
+version_compat: third_party js
# Creating compatible version dirs...
for v_compat in ${VERSION_COMPAT}; do \
ln -sf ${VERSION} ${FRAMEWORK_ROOT}/../$$v_compat; \
done;
ln -sf ${VERSION} ${FRAMEWORK_ROOT}/../latest
-demo: widgets
+demo: js
mkdir -p ${OUTPUT_ROOT}/demos
cp -av demos/* ${OUTPUT_ROOT}/demos/
cp -f src/template/bootstrap.js ${OUTPUT_ROOT}/demos/gallery/
+//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
+//>>description: Add markup for labels
+//>>label: Label
+//>>group: Tizen:Core
+
+define( [ ], function ( ) {
+//>>excludeEnd("jqmBuildExclude");
+
/*
*
* This software is licensed under the MIT licence (as defined by the OSI at
// Add markup for labels
+
(function($, undefined) {
$(document).bind("pagecreate create", function(e) {
});
})(jQuery);
+
+//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
+} );
+//>>excludeEnd("jqmBuildExclude");
+
+//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
+//>>description: Color code converter
+//>>label: Color library
+//>>group: Tizen:Core
+
+define( [ ], function ( ) {
+//>>excludeEnd("jqmBuildExclude");
+
ensureNS("jQuery.mobile.tizen.clrlib");
jQuery.extend( jQuery.mobile.tizen.clrlib,
return $.mobile.tizen.clrlib.HSVToHSL($.mobile.tizen.clrlib.RGBToHSV(rgb));
}
});
+
+//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
+} );
+//>>excludeEnd("jqmBuildExclude");
+//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
+//>>description: jQuery Mobile configuration for Tizen widgets
+//>>label: Configuration
+//>>group: Tizen:Core
+
+define( [ ], function ( ) {
+//>>excludeEnd("jqmBuildExclude");
+
/*
* set TIZEN specific configures
*/
$.mobile.buttonMarkup.hoverDelay = 0;
})( jQuery, this );
+
+//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
+} );
+//>>excludeEnd("jqmBuildExclude");
+
+//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
+//>>description: Tizen core library
+//>>label: Tizen core
+//>>group: Tizen:Core
+
+define( [ 'jquery.mobile.core', 'jquery.mobile.tizen.configure', 'util/ensurens' ], function ( ) {
+//>>excludeEnd("jqmBuildExclude");
+
/*
* jQuery Mobile Widget @VERSION
*
});
})();
+
+//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
+} );
+//>>excludeEnd("jqmBuildExclude");
+//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
+//>>description: Loader doing theme loading, viewport setting, globalize loading, etc.
+//>>label: Loader
+//>>group: Tizen:Core
+
+define( [ 'jquery.mobile.tizen.core' ], function ( ) {
+//>>excludeEnd("jqmBuildExclude");
+
/**
* @class core
* loader.js
};
function export2TizenNS ( $, tizen ) {
- if ( undefined == typeof $.tizen ) {
+ if ( !$.tizen ) {
$.tizen = { };
}
});
} ( jQuery, window.Globalize, window ) );
+
+//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
+} );
+//>>excludeEnd("jqmBuildExclude");
+//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
+//>>description: Loads widget's prototype
+//>>label: Widget prototype loader
+//>>group: Tizen:Core
+
+define( [ ], function ( ) {
+//>>excludeEnd("jqmBuildExclude");
+
(function($, undefined) {
ensureNS("jQuery.mobile.tizen");
}
});
})(jQuery);
+
+//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
+} );
+//>>excludeEnd("jqmBuildExclude");
+//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
+//>>description: Implements scroll by javascript
+//>>label: Scrollview
+//>>group: Tizen:Core
+
+define( [ ], function ( ) {
+//>>excludeEnd("jqmBuildExclude");
+
/*
* jQuery Mobile Framework : scrollview plugin
* Copyright (c) 2010 Adobe Systems Incorporated - Kin Blas (jblas@adobe.com)
});
}( jQuery, window, document ) );
+
+//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
+} );
+//>>excludeEnd("jqmBuildExclude");
+//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
+//>>description: Make namespace for modules
+//>>label: Ensurens
+//>>group: Tizen:Utilities
+
+define( [ ], function ( ) {
+//>>excludeEnd("jqmBuildExclude");
+
/*
*
* This software is licensed under the MIT licence (as defined by the OSI at
eval (nsSoFar + " = " + nsSoFar + " || {};");
}
}
+
+//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
+} );
+//>>excludeEnd("jqmBuildExclude");
+//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
+//>>description: Makes array with given range
+//>>label: Range
+//>>group: Tizen:Utilities
+
+define( [ ], function ( ) {
+//>>excludeEnd("jqmBuildExclude");
+
/*
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL licenses
* http://phpjs.org/functions/range
return matrix;
}
+//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
+} );
+//>>excludeEnd("jqmBuildExclude");
+//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
+//>>description: Tizen button
+//>>label: Button
+//>>group: Tizen:Widgets
+
+define( [ ], function ( ) {
+//>>excludeEnd("jqmBuildExclude");
+
/**
@class Button
The button widget shows a control on the screen that you can use to generate an action event when it is pressed and released. This widget is coded with standard HTML anchor and input elements and then enhanced by jQueryMobile to make it more attractive and usable on a mobile device. Buttons can be used in Tizen as described in the jQueryMobile documentation for buttons.
Defines an icon for a button. Tizen supports 12 icon styles: reveal, closed, opened, info, rename, call, warning, plus, minus, cancel, send, and favorite.
*/
+
+//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
+} );
+//>>excludeEnd("jqmBuildExclude");
+//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);\r
+//>>description: Checkbox widget\r
+//>>label: Checkbox\r
+//>>group: Tizen:Widgets\r
+\r
+define( [ ], function ( ) {\r
+//>>excludeEnd("jqmBuildExclude");\r
+\r
/**\r
@class Checkbox\r
The check box widget shows a list of options on the screen where one or more can be selected. Check boxes can be used in Tizen as described in the jQueryMobile documentation for check boxes.<br/> To add a check box widget to the application, use the following code:\r
/**\r
@property {String} class\r
Defines the check box style. <br/> The default value is check. If the value is set to favorite, a star-shaped check box is created.\r
-*/
\ No newline at end of file
+*/\r
+\r
+//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);\r
+} );\r
+//>>excludeEnd("jqmBuildExclude");\r
+//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
+//>>description: Container widget showing children circulary
+//>>label: Circularview
+//>>group: Tizen:Widgets
+
+define( [ '../jquery.mobile.tizen.scrollview' ], function ( ) {
+//>>excludeEnd("jqmBuildExclude");
+
/* ***************************************************************************
* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd.
*
} );
}( jQuery, window, document ) ); // End Component
+
+//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
+} );
+//>>excludeEnd("jqmBuildExclude");
+//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
+//>>description: Shows date and time, and make them able to be changed by user
+//>>label: Datetime picker
+//>>group: Tizen:Widgets
+
+define( [ 'jquery.mobile.tizen.widgetex', 'jquery.mobile.tizen.popupwindow', 'jquery.mobile.tizen.popupwindow.ctxpopup' ], function ( ) {
+//>>excludeEnd("jqmBuildExclude");
+
/*global Globalize:false, range:false, regexp:false*/
/*
* jQuery Mobile Widget @VERSION
});
} ( jQuery, this ) );
+
+//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
+} );
+//>>excludeEnd("jqmBuildExclude");
+//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
+//>>description: Listview which can be extended more and more
+//>>label: Extendable list
+//>>group: Tizen:Widgets
+
+define( [ '../jquery.mobile.tizen.scrollview' ], function ( ) {
+//>>excludeEnd("jqmBuildExclude");
+
/****************************************************************************
* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd.
*
});
}( jQuery ));
+
+//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
+} );
+//>>excludeEnd("jqmBuildExclude");
+//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
+//>>description: Shows list index and scroll to the index directly
+//>>label: Fastscroll
+//>>group: Tizen:Widgets
+
+define( [ '../jquery.mobile.tizen.scrollview' ], function ( ) {
+//>>excludeEnd("jqmBuildExclude");
+
/*
* jQuery Mobile Widget @VERSION
*
} );
} ( jQuery ) );
+
+//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
+} );
+//>>excludeEnd("jqmBuildExclude");
+//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
+//>>description: Shows images one by one, and moves them by flicking
+//>>label: Gallery
+//>>group: Tizen:Widgets
+
+define( [ ], function ( ) {
+//>>excludeEnd("jqmBuildExclude");
+
/* ***************************************************************************
* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd.
*
} );
}( jQuery, this ) );
+
+//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
+} );
+//>>excludeEnd("jqmBuildExclude");
+//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
+//>>description: Divider listitem in listview
+//>>label: List divider
+//>>group: Tizen:Widgets
+
+define( [ ], function ( ) {
+//>>excludeEnd("jqmBuildExclude");
+
/* ***************************************************************************
* style : normal, check
* option :
$( $.tizen.listdivider.prototype.options.initSelector, e.target ).listdivider();
});
}( jQuery ) );
+
+//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
+} );
+//>>excludeEnd("jqmBuildExclude");
+//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
+//>>description: Shows multimedia and its controls
+//>>label: Multimedia view
+//>>group: Tizen:Widgets
+
+define( [ '../jquery.mobile.tizen.scrollview' ], function ( ) {
+//>>excludeEnd("jqmBuildExclude");
+
/* ***************************************************************************
* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd.
*
$.tizen.multimediaview.prototype.enhanceWithin( e.target );
});
} ( jQuery, document, window ) );
+
+//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
+} );
+//>>excludeEnd("jqmBuildExclude");
+//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
+//>>description: Shows notification popup over header/footer
+//>>label: Notification
+//>>group: Tizen:Widgets
+
+define( [ '../jquery.mobile.tizen.core' ], function ( ) {
+//>>excludeEnd("jqmBuildExclude");
+
/* ***************************************************************************
* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd.
*
$( e.target ).find(":jqmData(role='notification')").notification('destroy');
});
}( jQuery, this ));
+
+//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
+} );
+//>>excludeEnd("jqmBuildExclude");
+//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
+//>>description: Set a layout of pages
+//>>label: Pagelayout
+//>>group: Tizen:Widgets
+
+define( [ '../jquery.mobile.tizen.core' ], function ( ) {
+//>>excludeEnd("jqmBuildExclude");
+
/* ***************************************************************************
* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd.
*
});
}( jQuery ));
+
+//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
+} );
+//>>excludeEnd("jqmBuildExclude");
+//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
+//>>description: Shows popup at any place in the page content, with various styles
+//>>label: Context popup
+//>>group: Tizen:Widgets
+
+define( [ '../jquery.mobile.tizen.core', 'jquery.mobile.tizen.popupwindow', 'jquery.mobile.tizen.triangle' ], function ( core, _popupwindow, _triangle ) {
+//>>excludeEnd("jqmBuildExclude");
+
/*
* jQuery Mobile Widget @VERSION
*
$.tizen.ctxpopup.prototype.enhanceWithin( e.target );
} );
}( jQuery ) );
+
+//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
+} );
+//>>excludeEnd("jqmBuildExclude");
+//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
+//>>description: Shows popup on the page
+//>>label: Popup
+//>>group: Tizen:Widgets
+
+define( [ '../jquery.mobile.tizen.core', 'jquery.mobile.tizen.widgetex' ], function ( ) {
+//>>excludeEnd("jqmBuildExclude");
+
/*
* jQuery Mobile Widget @VERSION
*
});
});
}( jQuery ));
+
+//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
+} );
+//>>excludeEnd("jqmBuildExclude");
+//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
+//>>description: Shows progressbar or progress circle
+//>>label: Progress
+//>>group: Tizen:Widgets
+
+define( [ '../jquery.mobile.tizen.core' ], function ( ) {
+//>>excludeEnd("jqmBuildExclude");
+
/* ***************************************************************************
* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd.
*
$( e.target ).find( ":jqmData(role='progress')" ).progress();
} );
}( jQuery, this ));
+
+//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
+} );
+//>>excludeEnd("jqmBuildExclude");
+//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
+//>>description: Shows progressbar
+//>>label: Progressbar
+//>>group: Tizen:Widgets
+
+define( [ '../jquery.mobile.tizen.core' ], function ( ) {
+//>>excludeEnd("jqmBuildExclude");
+
/*
* jQuery UI Progressbar @VERSION
*
} );
}( jQuery, this ) );
+
+//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
+} );
+//>>excludeEnd("jqmBuildExclude");
+//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
+//>>description: Shows a scroll-handler with a scrollview
+//>>label: Scrollview Handler
+//>>group: Tizen:Widgets
+
+define( [ '../jquery.mobile.tizen.core', '../jquery.mobile.tizen.scrollview' ], function ( ) {
+//>>excludeEnd("jqmBuildExclude");
+
/* ***************************************************************************
* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd.
*
widget.scrollview( "enableHandler", "true" );
});
} ( jQuery, document ) );
+
+//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
+} );
+//>>excludeEnd("jqmBuildExclude");
+//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
+//>>description: Shows searchbar, for text search
+//>>label: Searchbar
+//>>group: Tizen:Widgets
+
+define( [ '../jquery.mobile.tizen.core', 'jquery.mobile.tizen.pagelayout' ], function ( ) {
+//>>excludeEnd("jqmBuildExclude");
+
/* ***************************************************************************
* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd.
*
} );
}( jQuery ) );
+
+//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
+} );
+//>>excludeEnd("jqmBuildExclude");
+//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
+//>>description: Shows slider bar to input number by dragging
+//>>label: Slider
+//>>group: Tizen:Widgets
+
+define( [ '../jquery.mobile.tizen.core' ], function ( ) {
+//>>excludeEnd("jqmBuildExclude");
+
/*
* jQuery Mobile Widget @VERSION
*
});
}( jQuery, this ));
+
+//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
+} );
+//>>excludeEnd("jqmBuildExclude");
+//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
+//>>description: Shows background listitem by swiping left/right on a listitem
+//>>label: Swipe list
+//>>group: Tizen:Widgets
+
+define( [ '../jquery.mobile.tizen.core' ], function ( ) {
+//>>excludeEnd("jqmBuildExclude");
+
/*
* jQuery Mobile Widget @VERSION
*
});
}( jQuery ));
+
+//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
+} );
+//>>excludeEnd("jqmBuildExclude");
+//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
+//>>description: Shows buttons divided automatically on the header
+//>>label: Tabbar
+//>>group: Tizen:Widgets
+
+define( [ '../jquery.mobile.tizen.core', 'jquery.mobile.tizen.pagelayout' ], function ( ) {
+//>>excludeEnd("jqmBuildExclude");
+
/* ***************************************************************************
* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd.
*
$( $.tizen.tabbar.prototype.options.initSelector, e.target ).tabbar();
});
}( jQuery ) );
+
+//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
+} );
+//>>excludeEnd("jqmBuildExclude");
+//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
+//>>description: Make words to selectable tokens
+//>>label: Token textarea
+//>>group: Tizen:Widgets
+
+define( [ '../jquery.mobile.tizen.core' ], function ( ) {
+//>>excludeEnd("jqmBuildExclude");
+
/* ***************************************************************************
* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd.
*
$( ":jqmData(role='tokentextarea')" ).tokentextarea( "refresh" );
});
} ( jQuery, window, document ) );
+
+//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
+} );
+//>>excludeEnd("jqmBuildExclude");
+//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
+//>>description: Shows triangle, used by context popup
+//>>label: Triangle
+//>>group: Tizen:Widgets
+
+define( [ '../jquery.mobile.tizen.core', 'jquery.mobile.tizen.widgetex' ], function ( ) {
+//>>excludeEnd("jqmBuildExclude");
+
/*
* This software is licensed under the MIT licence (as defined by the OSI at
* http://www.opensource.org/licenses/mit-license.php)
});
}(jQuery) );
+
+//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
+} );
+//>>excludeEnd("jqmBuildExclude");
+//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
+//>>description: Shows grid swapping its contents automatically
+//>>label: Virtual grid
+//>>group: Tizen:Widgets
+
+define( [ '../jquery.mobile.tizen.core', '../jquery.mobile.tizen.scrollview' ], function ( ) {
+//>>excludeEnd("jqmBuildExclude");
+
/* ***************************************************************************
* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd.
*
$( ":jqmData(role='virtualgrid')" ).virtualgrid();
} );
} (jQuery, window, document) );
+
+//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
+} );
+//>>excludeEnd("jqmBuildExclude");
+//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
+//>>description: Shows listview swapping its contents automatically
+//>>label: Virtual listview
+//>>group: Tizen:Widgets
+
+define( [ '../jquery.mobile.tizen.core', '../jquery.mobile.tizen.scrollview' ], function ( ) {
+//>>excludeEnd("jqmBuildExclude");
+
/* ***************************************************************************
* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd.
*
});
} ( jQuery ) );
+
+//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
+} );
+//>>excludeEnd("jqmBuildExclude");
+//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
+//>>description: Widget class extending functionality of jQueryMobile widget class
+//>>label: Widget extension
+//>>group: Tizen:Widgets
+
+define( [ '../jquery.mobile.tizen.core' ], function ( ) {
+//>>excludeEnd("jqmBuildExclude");
+
/*
*
* This software is licensed under the MIT licence (as defined by the OSI at
};
}( jQuery ) );
+
+//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
+} );
+//>>excludeEnd("jqmBuildExclude");
--- /dev/null
+.ui-ctxpopup {
+ display: table;
+
+ .ui-ctxpopup-row {
+ display: table-row;
+
+ .ui-ctxpopup-cell {
+ display: table-cell;
+ }
+ }
+}
+/*
+ * The settings in this file are part of the theme. They are not part of the structure of ctxpopup.
+ * In the default theme, ui-body-* has a border width of 1px. So, to make the triangles cross this border, we set them in
+ * by 1px.
+ */
+.ui-ctxpopup-row {
+ .ui-triangle-top { top: 1px; }
+ .ui-triangle-left { left: 1px; }
+ .ui-triangle-right { right: 1px; }
+ .ui-triangle-bottom { bottom: 1px; }
+++ /dev/null
-/* ***************************************************************************
- * Copyright (c) 2000 - 2013 Samsung Electronics Co., Ltd.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- * ***************************************************************************
- *
- * Author: Minkyu Kang <mk7.kang@samsung.com>
- */
-
-/*
- * Pinch Event
- *
- * Events
- * pinchstart: triggered when start the touched two points
- * pinch: triggered when move the touch point after pinchstart event occured
- * pinchend: triggered when touchend event after pinchstart event occured
- *
- * Parameters
- * point: touched points
- * ratio: origin point-to-current point ratio for moving distance
- *
- * $("#pinch").bind("pinch", function (e, p) {
- * console.log("point[0].x: " + p.point[0].x);
- * console.log("point[0].y: " + p.point[0].y);
- * console.log("point[1].x: " + p.point[1].x);
- * console.log("point[1].y: " + p.point[1].y);
- * console.log("ratio: " + p.ratio);
- * });
- *
- * Options
- * $.mobile.pinch.enabled: true or false
- * $.mobile.pinch.min: minimum value of ratio
- * $.mobile.pinch.max: maximum value of ratio
- * $.mobile.pinch.factor: scale factor of ratio
- * $.mobile.pinch.threshold: move threshold of ratio
- * $.mobile.pinch.interval: interval for pinch event
- */
-
-( function( $, window, undefined ) {
-
-pinch_event = {
- setup: function () {
- var thisObject = this,
- $this = $( thisObject );
-
- if ( !$.mobile.support.touch ) {
- return;
- }
-
- function getDistance( point ) {
- var x = point[0].x - point[1].x,
- y = point[0].y - point[0].y;
-
- return Math.sqrt( ( x * x ) + ( y * y ) );
- }
-
- function getParameter( point, ratio ) {
- return { point: point, ratio: ratio };
- }
-
- $this.bind( "touchstart", function ( event ) {
- var data = event.originalEvent.touches,
- origin,
- last_ratio = 1,
- processing = false;
-
- if ( !$.mobile.pinch.enabled ) {
- return;
- }
-
- if ( data.length != 2 ) {
- return;
- }
-
- origin = [
- { x: data[0].pageX, y: data[0].pageY },
- { x: data[1].pageX, y: data[1].pageY }
- ];
-
- $( event.target ).trigger( "pinchstart", getParameter( origin, undefined ) );
-
- function pinchHandler( event ) {
- var data = event.originalEvent.touches,
- current,
- ratio,
- delta,
- factor = $( window ).width() / $.mobile.pinch.factor;
-
- if ( processing ) {
- return;
- }
-
- if ( !origin ) {
- return;
- }
-
- current = [
- { x: data[0].pageX, y: data[0].pageY },
- { x: data[1].pageX, y: data[1].pageY }
- ];
-
- delta = getDistance( current ) - getDistance( origin );
-
- ratio = 1 + delta / factor;
-
- if ( ratio < $.mobile.pinch.min ) {
- ratio = $.mobile.pinch.min;
- } else if ( ratio > $.mobile.pinch.max ) {
- ratio = $.mobile.pinch.max;
- }
-
- if ( Math.abs( ratio - last_ratio ) < $.mobile.pinch.threshold ) {
- return;
- }
-
- $( event.target ).trigger( "pinch", getParameter( current, ratio ) );
-
- last_ratio = ratio;
-
- if ( $.mobile.pinch.interval ) {
- processing = true;
-
- setTimeout( function () {
- processing = false;
- }, $.mobile.pinch.interval );
- }
- }
-
- $this.bind( "touchmove", pinchHandler )
- .one( "touchend", function ( event ) {
- $this.unbind( "touchmove", pinchHandler );
- $( event.target ).trigger( "pinchend",
- getParameter( undefined, last_ratio ) );
-
- origin = undefined;
- current = undefined;
- last_ratio = 1;
- processing = false;
- });
- });
- }
-};
-
-$.event.special["pinch"] = pinch_event;
-
-$.mobile.pinch = {
- enabled: true,
- min: 0.1,
- max: 3,
- factor: 4,
- threshold: 0.01,
- interval: 50
-};
-
-})( jQuery, this );
+++ /dev/null
-/*
- * The settings in this file are part of the theme. They are not part of the structure of ctxpopup.
- * In the default theme, ui-body-* has a border width of 1px. So, to make the triangles cross this border, we set them in
- * by 1px.
- */
-
-.ui-ctxpopup-row .ui-triangle-top {
- top: 1px;
-}
-
-.ui-ctxpopup-row .ui-triangle-left {
- left: 1px;
-}
-
-.ui-ctxpopup-row .ui-triangle-right {
- right: 1px;
-}
-
-.ui-ctxpopup-row .ui-triangle-bottom {
- bottom: 1px;
-}
+++ /dev/null
-.ui-ctxpopup {
- display: table;
-
- .ui-ctxpopup-row {
- display: table-row;
-
- .ui-ctxpopup-cell {
- display: table-cell;
- }
- }
-}
#!/bin/bash
-WIDGET_BASE_DIR="$1"
+WIDGET_FNAME=$1
+WIDGET_BASE_DIR="`dirname ${WIDGET_FNAME}`"
VERBOSE=$(test "x$2x" != "xx" && echo "1" || echo "0")
rm_tmpfile() # No args
}
if test "x${WIDGET_BASE_DIR}x" = "xx"; then
- echo "Usage: $(basename $0) <widget_base_dir>"
+ echo "Usage: $(basename $0) <widget_file_path>"
exit 1
fi
-for FNAME in ${WIDGET_BASE_DIR}/js/*.js; do
- TMP_FNAME=`mktemp`
- N_PASS=0
- while ! process_fname $FNAME $N_PASS > $TMP_FNAME; do
- if test $VERBOSE -eq 1; then
- echo "Going for another pass with ${TMP_FNAME}" > /dev/stderr
- fi
- N_PASS=`expr "$N_PASS" + 1`
- done
- cat $TMP_FNAME
- rm_tmpfile
+FNAME=${WIDGET_FNAME}
+TMP_FNAME=`mktemp`
+N_PASS=0
+while ! process_fname $FNAME $N_PASS > $TMP_FNAME; do
+ if test $VERBOSE -eq 1; then
+ echo "Going for another pass with ${TMP_FNAME}" > /dev/stderr
+ fi
+ N_PASS=`expr "$N_PASS" + 1`
done
+cat $TMP_FNAME
+rm_tmpfile
+
+
--- /dev/null
+#!/usr/bin/env node
+/*
+ * moduledep.js
+ *
+ * Read dependency info from a file, and get dependency tree/library load order
+ * from the dependency info of all files
+ *
+ * ***************************************************************************
+ * Copyright (c) 2013 Samsung Electronics Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ * ***************************************************************************
+ *
+ * Authors: Youmin Ha <youmin.ha@samsung.com>
+*/
+
+var util = require("util"),
+ assert = require("assert"),
+ path = require("path"),
+ vm = require("vm"),
+ fs = require("fs"),
+ child_process = require('child_process'),
+ puts = util.puts,
+ error = util.error,
+ print = util.print;
+
+path.sep = path.sep ? path.sep : '/';
+
+function DepInfo( fPath, basedir ) {
+ var self = this,
+ code,
+ context,
+ origDir,
+ linebuf,
+ line;
+
+ function define( depModList, moduleBody ) {
+ var p, i;
+ if ( typeof depModList == 'object' ) {
+ for( i in depModList ) {
+ p = path.join( path.dirname( self.filePath() ), depModList[i] );
+ self.depends.push( path.normalize( p, '.js' ) );
+ }
+ }
+ }
+
+ origDir = path.resolve(); // Backup origDir
+
+ if ( ! basedir || ! basedir.length ) {
+ basedir = ".";
+ }
+ process.chdir( basedir ); // Move to basedir
+ self.basedir = path.resolve( ); //self.basedir: absolute path.
+ self.path = path.normalize( fPath );
+ self.name = path.join( path.dirname( self.path ), path.basename( self.path, '.js' ) );
+ self.depends = [ ];
+ self.label = '';
+ self.group = '';
+ self.description = '';
+
+ try {
+ code = fs.readFileSync( self.path, 'utf-8' );
+ linebuf = code.split( /\n\r?/ );
+ for( var idx in linebuf ) {
+ line = linebuf[idx];
+ if( line.match( /^\/\/>>label:/ ) ) {
+ self.label = line.replace( /^\/\/>>label:(.*)$/, "$1" ).trim();
+ }
+ if( line.match( /^\/\/>>group:/ ) ) {
+ self.group = line.replace( /^\/\/>>group:(.*)$/, "$1" ).trim();
+ }
+ if( line.match( /^\/\/>>description:/ ) ) {
+ self.description = line.replace( /^\/\/>>description:(.*)$/, "$1" ).trim();
+ }
+ }
+ context = vm.createContext( { define: define } );
+ vm.runInContext( code, context ); // Set depends
+ } catch ( e ) {
+ // file read failure
+ //error(e);
+ return null;
+ } finally {
+ process.chdir( origDir ); // Back to origDir
+ }
+}
+DepInfo.prototype = {
+ fullPath: function ( ) {
+ return path.normalize( path.join( this.basedir, this.path ) );
+ },
+ filePath: function ( ) {
+ return path.relative( this.basedir, this.fullPath() );
+ }
+}
+
+function DepTree( ) {
+ return this;
+}
+DepTree.prototype = {
+ _depData: { },
+
+ // Set basedir(s)
+ setBasedir: function ( ) {
+ this.basedir = arguments[0];
+ },
+
+ // Add dependency data from file at the path
+ // @param[in] fPath module file's path
+ // @return true if collection is successful, false if not
+ add: function ( fPath ) {
+ var di;
+
+ di = new DepInfo( fPath, this.basedir );
+ if ( di ) {
+ this._depData[ di.name ] = di;
+ } else {
+ return false;
+ }
+ return true;
+ },
+ depData: function ( ) {
+ return this._depData;
+ },
+ order: function ( reqList ) {
+ var self = this,
+ depData = {},
+ order = [],
+ pool = [],
+ mName, // current module name
+ mDep, // current module's dependency (array)
+ depIdx,
+ i, j;
+
+ if( ! reqList ) {
+ reqList = Object.keys( self._depData );
+ }
+
+ // copy _depData into pool & depData
+ for( j=0; j<reqList.length; j++ ) {
+ modName = reqList[j];
+ pool.push( modName );
+ depData[ modName ] = [];
+ for( i in self._depData[ modName ].depends ) {
+ // deep copy
+ depData[ modName ][i] = self._depData[ modName ].depends[i];
+
+ // Still not exist in the reqList, add it
+ if( reqList.indexOf( depData[ modName ][i] ) == -1 ) {
+ //error("NOT found! " + depData[ modName ][i] );
+ reqList.push( depData[ modName ][i] );
+ }
+ }
+ };
+
+ // Mark and sweep
+ while( pool.length > 0 ) {
+ // Sort pool with remained dependency
+ pool.sort( function ( a, b ) {
+ var la, lb;
+ la = depData[ a ] ? depData[ a ].length : 0;
+ lb = depData[ b ] ? depData[ b ].length : 0;
+ return la - lb;
+ } );
+
+ // Sweep
+ mName = pool.shift(); // Pop a module name
+ order.push( mName ); // Add first module to the order (Don't consider whether depData[mName].length == 0.
+
+ // and Mark
+ for( i = 0; i < pool.length; i++ ) { // For all remained modules,
+ mDep = depData[ pool[i] ]; // Get a dependency list
+ depIdx = mDep.indexOf( mName );
+ if ( depIdx != -1 ) { // Found a dependency!
+ mDep.splice( depIdx, 1 ); // Remove mName module
+ }
+ }
+ }
+ return order;
+ },
+ construct: function ( ) {
+ var dd = this._depData,
+ di,
+ i, j, m;
+ for( i in dd ) {
+ di = dd[i]; // Get DependencyInfo
+ for( j in di.depends ) {
+ m = di.depends[ j ]; // Per dependent module,
+ if ( ! dd[ m ] ) { // if there is no module in depData,
+ this.add( m ); // add it.
+ }
+ }
+ }
+ },
+ import: function ( depData ) {
+ var i;
+ this._depData = depData;
+ },
+ printDepJSON: function ( ) {
+ puts( JSON.stringify( this._depData, null, '\t' ) );
+ }
+};
+
+// Export modules
+module.exports.DepInfo = DepInfo;
+module.exports.DepTree = DepTree;
+
+// main module
+function main( argv ) {
+ var option = argv[2],
+ val = argv[3];
+
+ switch( option ) {
+ case '-c':
+ createDepInfo( val );
+ break;
+ case '-d':
+ calculateDepOrder( val, argv[4], argv[5] );
+ break;
+ default:
+ usage();
+ }
+
+ function usage() {
+ error("Usage: " + path.basename( argv[1] ) + " [option] [argument]" );
+ error(" " + path.basename( argv[1] ) + " -c [module directory path] : Create a dependency data" );
+ error(" " + path.basename( argv[1] ) + " -d [module directory path] [depData.json path] [require file path]: Calculate a dependency order, and make a library" );
+ process.exit();
+ }
+
+ function createDepInfo( basedir ) {
+ var dt,
+ origdir = path.resolve(); // Remember original dir
+
+ if( ! basedir ) basedir = '.';
+
+ dt = new DepTree();
+ dt.setBasedir( basedir );
+
+ child_process.exec('find ' + basedir + ' -name "*.js" -type f',
+ function ( err, stdout, stderr ) {
+ var fpathlist,
+ fpath,
+ i;
+
+ if( err ) {
+ error( 'Failure finding js files in ' + basedir );
+ process.chdir( origdir );
+ process.exit(1);
+ }
+ fpathlist = stdout.split(/\r?\n/);
+ for( i in fpathlist ) {
+ fpath = fpathlist[i];
+ fpath = path.relative( basedir, fpath );
+ //puts(">> " + fpath + " ? " + fpath.match( /.*\.js$/ ) );
+ if( fpath.match( /.*\.js$/ ) ) {
+ dt.add( fpath );
+ }
+ }
+ dt.construct();
+ dt.printDepJSON();
+ } );
+ }
+
+ function calculateDepOrder( modPath, depDataPath, requirePath ) {
+ var dt = new DepTree(),
+ depData,
+ require = null,
+ code,
+ context,
+ order,
+ mod,
+ i;
+
+ function _require( depList ) {
+ var i;
+ for( i in depList ) {
+ //dt.add( depList[i] );
+ require.push( depList[i] );
+ }
+ }
+
+ dt.setBasedir( modPath );
+
+ if( path.basename( depDataPath ) == "depData.json" ) {
+ code = fs.readFileSync( depDataPath, 'utf-8' );
+ depData = JSON.parse( code );
+ dt.import( depData );
+ }
+ if ( path.basename( requirePath ) == "require.js" ) {
+ require = [];
+ code = fs.readFileSync( requirePath, 'utf-8' );
+ context = vm.createContext( { require: _require } );
+ vm.runInContext( code, context );
+ }
+
+ dt.construct();
+ order = dt.order( require );
+ //error(order);
+
+
+ for( i in order ) {
+ mod = order[i];
+ try {
+ code = fs.readFileSync( path.join( modPath, mod + '.js' ) );
+ puts(code);
+ } catch( ex ) {
+ if( ex.code != "ENOENT" ) { // Ignore No entry(no file) error
+ throw( ex );
+ }
+ }
+ }
+ }
+}
+if ( require.main === module ) main( process.argv );