" ).html( replaceVariables( data ) );
+ ret = $.mobile.tizen._widgetPrototypes[ widget ].clone();
+ } );
+ }
+ } else {
+ /* Otherwise ... */
+ /* ... if a key was provided ... */
+ if ( widget.key !== undefined ) {
+ /* ... try to use it as a key into the cached prototype hash ... */
+ ret = $.mobile.tizen._widgetPrototypes[ widget.key ];
+ }
- /* ... and if the proto was not found in the cache ... */
- if (ret === undefined) {
- /* ... and a proto definition string was provided ... */
- if (widget.proto !== undefined) {
- /* ... create a new proto from the definition ... */
- ret = $("
").html(replaceVariables(widget.proto));
- /* ... and if a key was provided ... */
- if (widget.key !== undefined)
- /* ... cache a copy of the proto under that key */
- $.mobile.tizen._widgetPrototypes[widget.key] = ret.clone();
- }
- }
- else
- /* otherwise, if the proto /was/ found in the cache, return a copy of it */
- ret = ret.clone();
- }
+ /* ... and if the proto was not found in the cache ... */
+ if ( ret === undefined ) {
+ /* ... and a proto definition string was provided ... */
+ if ( widget.proto !== undefined ) {
+ /* ... create a new proto from the definition ... */
+ ret = $( "
" ).html(replaceVariables( widget.proto ) );
+ /* ... and if a key was provided ... */
+ if ( widget.key !== undefined ) {
+ /* ... cache a copy of the proto under that key */
+ $.mobile.tizen._widgetPrototypes[ widget.key ] = ret.clone();
+ }
+ }
+ } else {
+ /* otherwise, if the proto /was/ found in the cache, return a copy of it */
+ ret = ret.clone();
+ }
+ }
- /* If the prototype was found/created successfully ... */
- if (ret != undefined)
- /* ... and @ui was provided */
- if (ui != undefined)
- /* ... return @ui, but replace the CSS selectors it contains with the elements they select */
- ret = fillObj(ui, ret);
+ /* If the prototype was found/created successfully ... */
+ if ( ret != undefined ) {
+ /* ... and @ui was provided */
+ if ( ui != undefined ) {
+ /* ... return @ui, but replace the CSS selectors it contains with the elements they select */
+ ret = fillObj( ui, ret );
+ }
+ }
- return ret;
- }
-});
-})(jQuery);
+ return ret;
+ }
+ });
+}( jQuery ) );
//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
} );