Revert "Export"
[framework/web/web-ui-fw.git] / libs / js / jquery.mobile.loadstructure.js
1 jQuery.extend( jQuery.mobile,
2 {
3   loadStructure: function(widgetname) {
4     var ret = undefined,
5         theScriptTag = $("script[data-framework-version][data-framework-root][data-framework-theme]"),
6         frameworkRootPath = theScriptTag.attr("data-framework-root")    + "/" +
7                             theScriptTag.attr("data-framework-version") + "/",
8         protoPath = frameworkRootPath + "proto-html" + "/" +
9                     theScriptTag.attr("data-framework-theme");
10
11     $.ajax({
12       url: protoPath + "/" + widgetname + ".prototype.html",
13       async: false,
14       dataType: "html"
15     })
16       .success(function(data, textStatus, jqXHR) {
17         ret = $("<div>").html(data.replace(/\$\{FRAMEWORK_ROOT\}/g, frameworkRootPath));
18       });
19
20     return ret;
21   }
22 });