dubious 0.0.0-java
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/LICENSE +202 -0
- data/README.rdoc +160 -0
- data/ROADMAP.rdoc +28 -0
- data/Rakefile +130 -0
- data/bin/dubious +4 -0
- data/examples/contacts/Rakefile +169 -0
- data/examples/contacts/WEB-INF/app.yaml +9 -0
- data/examples/contacts/WEB-INF/appengine-web.xml +14 -0
- data/examples/contacts/WEB-INF/classes/controllers/ApplicationController.class +0 -0
- data/examples/contacts/WEB-INF/classes/controllers/ContactsController.class +0 -0
- data/examples/contacts/WEB-INF/classes/controllers/InfoPropertiesController.class +0 -0
- data/examples/contacts/WEB-INF/classes/controllers/SourceController.class +0 -0
- data/examples/contacts/WEB-INF/classes/models/Contact$Query.class +0 -0
- data/examples/contacts/WEB-INF/classes/models/Contact.class +0 -0
- data/examples/contacts/WEB-INF/lib/appengine-api.jar +0 -0
- data/examples/contacts/WEB-INF/lib/dubious.jar +0 -0
- data/examples/contacts/WEB-INF/lib/dubydatastore.jar +0 -0
- data/examples/contacts/WEB-INF/web.xml +3 -0
- data/examples/contacts/app.yaml +44 -0
- data/examples/contacts/app/controllers/application_controller.mirah +5 -0
- data/examples/contacts/app/controllers/contacts_controller.mirah +62 -0
- data/examples/contacts/app/controllers/info_properties_controller.mirah +55 -0
- data/examples/contacts/app/controllers/source_controller.mirah +30 -0
- data/examples/contacts/app/models/contact.mirah +28 -0
- data/examples/contacts/app/views/contacts/edit.html.erb +50 -0
- data/examples/contacts/app/views/contacts/index.html.erb +38 -0
- data/examples/contacts/app/views/contacts/new.html.erb +49 -0
- data/examples/contacts/app/views/contacts/show.html.erb +47 -0
- data/examples/contacts/app/views/layouts/application.html.erb +10 -0
- data/examples/contacts/app/views/layouts/contacts.html.erb +20 -0
- data/examples/contacts/app/views/source/list.html.erb +27 -0
- data/examples/contacts/app/views/source/show.html.erb +15 -0
- data/examples/contacts/config/application.properties +4 -0
- data/examples/contacts/config/asset.properties +32 -0
- data/examples/contacts/config/build.properties +10 -0
- data/examples/contacts/config/routes.properties +1 -0
- data/examples/contacts/public/404.html +30 -0
- data/examples/contacts/public/422.html +30 -0
- data/examples/contacts/public/500.html +30 -0
- data/examples/contacts/public/favicon.ico +0 -0
- data/examples/contacts/public/images/appengine_duby.png +0 -0
- data/examples/contacts/public/images/back.gif +0 -0
- data/examples/contacts/public/images/dir.gif +0 -0
- data/examples/contacts/public/images/dubious.png +0 -0
- data/examples/contacts/public/images/file.gif +0 -0
- data/examples/contacts/public/images/silver-120x30.gif +0 -0
- data/examples/contacts/public/index.html +144 -0
- data/examples/contacts/public/javascripts/effects.js +1128 -0
- data/examples/contacts/public/javascripts/jquery.rails.min.js +117 -0
- data/examples/contacts/public/javascripts/lang/sh_css.min.js +1 -0
- data/examples/contacts/public/javascripts/lang/sh_duby.min.js +1 -0
- data/examples/contacts/public/javascripts/lang/sh_erb.min.js +1 -0
- data/examples/contacts/public/javascripts/lang/sh_html.min.js +1 -0
- data/examples/contacts/public/javascripts/lang/sh_java.min.js +1 -0
- data/examples/contacts/public/javascripts/lang/sh_js.min.js +1 -0
- data/examples/contacts/public/javascripts/lang/sh_mirah.min.js +1 -0
- data/examples/contacts/public/javascripts/lang/sh_properties.min.js +1 -0
- data/examples/contacts/public/javascripts/lang/sh_rb.min.js +1 -0
- data/examples/contacts/public/javascripts/lang/sh_sh.min.js +1 -0
- data/examples/contacts/public/javascripts/lang/sh_xml.min.js +1 -0
- data/examples/contacts/public/javascripts/lang/sh_yaml.min.js +1 -0
- data/examples/contacts/public/javascripts/prototype.js +4320 -0
- data/examples/contacts/public/javascripts/sh_main.min.js +4 -0
- data/examples/contacts/public/robots.txt +0 -0
- data/examples/contacts/public/stylesheets/main.css +188 -0
- data/examples/contacts/public/stylesheets/scaffold.css +57 -0
- data/examples/contacts/public/stylesheets/sh_style.css +66 -0
- data/examples/contacts/public/stylesheets/source.css +27 -0
- data/examples/shout/Rakefile +138 -0
- data/examples/shout/WEB-INF/appengine-web.xml +14 -0
- data/examples/shout/WEB-INF/web.xml +11 -0
- data/examples/shout/app.mirah +35 -0
- data/examples/shout/app.yaml +11 -0
- data/examples/shout/public/404.html +30 -0
- data/examples/shout/public/422.html +30 -0
- data/examples/shout/public/500.html +30 -0
- data/examples/shout/public/favicon.ico +0 -0
- data/examples/shout/public/images/appengine_duby.png +0 -0
- data/examples/shout/public/images/back.gif +0 -0
- data/examples/shout/public/images/dir.gif +0 -0
- data/examples/shout/public/images/file.gif +0 -0
- data/examples/shout/public/images/silver-120x30.gif +0 -0
- data/examples/shout/public/index.html +116 -0
- data/examples/shout/public/javascripts/effects.js +1128 -0
- data/examples/shout/public/javascripts/jquery.rails.min.js +117 -0
- data/examples/shout/public/javascripts/prototype.js +4320 -0
- data/examples/shout/public/robots.txt +0 -0
- data/examples/shout/public/stylesheets/main.css +185 -0
- data/examples/shout/public/stylesheets/scaffold.css +57 -0
- data/examples/shout/views/application.html.erb +10 -0
- data/examples/shout/views/list.html.erb +14 -0
- data/javalib/dubydatastore.jar +0 -0
- data/lib/dubious.jar +0 -0
- data/lib/dubious.rb +2 -0
- data/lib/dubious/cli.rb +65 -0
- data/lib/dubious/templates/base/Rakefile +169 -0
- data/lib/dubious/templates/base/WEB-INF/app.yaml.tt +9 -0
- data/lib/dubious/templates/base/app/controllers/application_controller.mirah +5 -0
- data/lib/dubious/templates/base/config/application.properties.tt +6 -0
- data/lib/dubious/templates/base/config/asset.properties +0 -0
- data/lib/dubious/templates/base/config/build.properties +0 -0
- data/lib/dubious/templates/base/config/routes.properties +1 -0
- data/lib/dubious/templates/base/public/404.html +30 -0
- data/lib/dubious/templates/base/public/422.html +30 -0
- data/lib/dubious/templates/base/public/500.html +30 -0
- data/lib/dubious/templates/base/public/favicon.ico +0 -0
- data/lib/dubious/templates/base/public/images/appengine_duby.png +0 -0
- data/lib/dubious/templates/base/public/images/back.gif +0 -0
- data/lib/dubious/templates/base/public/images/dir.gif +0 -0
- data/lib/dubious/templates/base/public/images/dubious.png +0 -0
- data/lib/dubious/templates/base/public/images/file.gif +0 -0
- data/lib/dubious/templates/base/public/images/silver-120x30.gif +0 -0
- data/lib/dubious/templates/base/public/index.html +144 -0
- data/lib/dubious/templates/base/public/javascripts/jquery.rails.min.js +117 -0
- data/lib/dubious/templates/base/public/robots.txt +0 -0
- data/lib/dubious/templates/base/public/stylesheets/main.css +188 -0
- data/lib/dubious/templates/base/public/stylesheets/scaffold.css +57 -0
- data/lib/dubious/templates/generator/controller.mirah.tt +5 -0
- data/lib/dubious/templates/generator/model.mirah.tt +6 -0
- metadata +224 -0
File without changes
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
# put custom routes here
|
@@ -0,0 +1,30 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
|
4
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
5
|
+
|
6
|
+
<head>
|
7
|
+
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
8
|
+
<title>The page you were looking for doesn't exist (404)</title>
|
9
|
+
<style type="text/css">
|
10
|
+
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
11
|
+
div.dialog {
|
12
|
+
width: 25em;
|
13
|
+
padding: 0 4em;
|
14
|
+
margin: 4em auto 0 auto;
|
15
|
+
border: 1px solid #ccc;
|
16
|
+
border-right-color: #999;
|
17
|
+
border-bottom-color: #999;
|
18
|
+
}
|
19
|
+
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
20
|
+
</style>
|
21
|
+
</head>
|
22
|
+
|
23
|
+
<body>
|
24
|
+
<!-- This file lives in public/404.html -->
|
25
|
+
<div class="dialog">
|
26
|
+
<h1>The page you were looking for doesn't exist.</h1>
|
27
|
+
<p>You may have mistyped the address or the page may have moved.</p>
|
28
|
+
</div>
|
29
|
+
</body>
|
30
|
+
</html>
|
@@ -0,0 +1,30 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
|
4
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
5
|
+
|
6
|
+
<head>
|
7
|
+
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
8
|
+
<title>The change you wanted was rejected (422)</title>
|
9
|
+
<style type="text/css">
|
10
|
+
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
11
|
+
div.dialog {
|
12
|
+
width: 25em;
|
13
|
+
padding: 0 4em;
|
14
|
+
margin: 4em auto 0 auto;
|
15
|
+
border: 1px solid #ccc;
|
16
|
+
border-right-color: #999;
|
17
|
+
border-bottom-color: #999;
|
18
|
+
}
|
19
|
+
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
20
|
+
</style>
|
21
|
+
</head>
|
22
|
+
|
23
|
+
<body>
|
24
|
+
<!-- This file lives in public/422.html -->
|
25
|
+
<div class="dialog">
|
26
|
+
<h1>The change you wanted was rejected.</h1>
|
27
|
+
<p>Maybe you tried to change something you didn't have access to.</p>
|
28
|
+
</div>
|
29
|
+
</body>
|
30
|
+
</html>
|
@@ -0,0 +1,30 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
|
4
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
5
|
+
|
6
|
+
<head>
|
7
|
+
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
8
|
+
<title>We're sorry, but something went wrong (500)</title>
|
9
|
+
<style type="text/css">
|
10
|
+
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
11
|
+
div.dialog {
|
12
|
+
width: 25em;
|
13
|
+
padding: 0 4em;
|
14
|
+
margin: 4em auto 0 auto;
|
15
|
+
border: 1px solid #ccc;
|
16
|
+
border-right-color: #999;
|
17
|
+
border-bottom-color: #999;
|
18
|
+
}
|
19
|
+
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
20
|
+
</style>
|
21
|
+
</head>
|
22
|
+
|
23
|
+
<body>
|
24
|
+
<!-- This file lives in public/500.html -->
|
25
|
+
<div class="dialog">
|
26
|
+
<h1>We're sorry, but something went wrong.</h1>
|
27
|
+
<p>We've been notified about this issue and we'll take a look at it shortly.</p>
|
28
|
+
</div>
|
29
|
+
</body>
|
30
|
+
</html>
|
File without changes
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,144 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
|
5
|
+
<title>Dubious Demo</title>
|
6
|
+
<link type="text/css" rel="stylesheet" href="/stylesheets/main.css">
|
7
|
+
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script>
|
8
|
+
<script type="text/javascript">
|
9
|
+
$(function(){
|
10
|
+
var about_content = $('#about-content');
|
11
|
+
var about_link = $('#about-link');
|
12
|
+
var url = about_link.attr('href');
|
13
|
+
|
14
|
+
about_link.click(function(){
|
15
|
+
if (about_content.children().length > 0){ // has children
|
16
|
+
about_content.slideToggle('fast');
|
17
|
+
} else { // does not have children
|
18
|
+
$.ajax({
|
19
|
+
url: url,
|
20
|
+
datatype: 'html',
|
21
|
+
success: function(data){
|
22
|
+
about_content.html(data).slideToggle('fast');
|
23
|
+
},
|
24
|
+
error: function(){
|
25
|
+
about_content.html('<p>Error requesting ' + url + '</p>').slideToggle('fast');
|
26
|
+
}
|
27
|
+
});
|
28
|
+
}
|
29
|
+
return false;
|
30
|
+
});
|
31
|
+
});
|
32
|
+
</script>
|
33
|
+
</head>
|
34
|
+
<body>
|
35
|
+
<div id="page">
|
36
|
+
<div id="sidebar">
|
37
|
+
|
38
|
+
<br/>
|
39
|
+
<img src="images/appengine_duby.png">
|
40
|
+
<br/>
|
41
|
+
|
42
|
+
<ul id="sidebar-items">
|
43
|
+
|
44
|
+
<li>
|
45
|
+
<h3>Join the community</h3>
|
46
|
+
<ul class="links">
|
47
|
+
<li><a
|
48
|
+
href="http://github.com/mirah/dubious"
|
49
|
+
target="_new">Dubious on github</a></li>
|
50
|
+
<li><a
|
51
|
+
href="http://github.com/mirah/mirah"
|
52
|
+
target="_new">Mirah on github</a></li>
|
53
|
+
<li><a
|
54
|
+
href="http://groups.google.com/group/mirah"
|
55
|
+
target="_new">Send Feedback</a></li>
|
56
|
+
</ul>
|
57
|
+
</li>
|
58
|
+
|
59
|
+
<li>
|
60
|
+
<h3>Example Apps</h3>
|
61
|
+
<ul class="links">
|
62
|
+
<li><a
|
63
|
+
href="http://michal-duby.appspot.com/examples/15-puzzle/"
|
64
|
+
title="@michal_hantl"
|
65
|
+
target="_new">15-puzzle</a></li>
|
66
|
+
<li><a
|
67
|
+
href="http://michal-duby.appspot.com/examples/memcache-chat"
|
68
|
+
title="@michal_hantl"
|
69
|
+
target="_new">Memcache Chat</a></li>
|
70
|
+
<li><a
|
71
|
+
href="http://github.com/headius/mirah/tree/master/examples/wiki"
|
72
|
+
title="@ribrdb"
|
73
|
+
target="_new">Mirah Wiki</a></li>
|
74
|
+
<li><a
|
75
|
+
href="http://github.com/jacortinas/appengine-rails-jquery-demo"
|
76
|
+
title="@jacortinas"
|
77
|
+
target="_new">Mustache & GSON</a></li>
|
78
|
+
</ul>
|
79
|
+
</li>
|
80
|
+
|
81
|
+
<li>
|
82
|
+
<h3>Related Videos</h3>
|
83
|
+
<ul class="links">
|
84
|
+
<li><a
|
85
|
+
href="http://www.youtube.com/watch?v=qEuOUkDZg_0"
|
86
|
+
title="2010-08-27 @johnwoodell"
|
87
|
+
target="_new">Mirah and Dubious</a></li>
|
88
|
+
<li><a
|
89
|
+
href="http://www.youtube.com/watch?v=WlsD2FiBIbg"
|
90
|
+
title="2010-07-28 @headius"
|
91
|
+
target="_new">Expressive Languages</a></li>
|
92
|
+
<li><a
|
93
|
+
href="http://www.youtube.com/watch?v=08rNKxW0PPo"
|
94
|
+
title="2009-11-17 @ribrdb"
|
95
|
+
target="_new">Introducing Duby (Mirah)</a></li>
|
96
|
+
</ul>
|
97
|
+
</li>
|
98
|
+
|
99
|
+
</div>
|
100
|
+
|
101
|
+
<div id="content">
|
102
|
+
<div id="header">
|
103
|
+
<h1>Prepare for takeoff</h1>
|
104
|
+
<h2>This is Mirah/Dubious on App Engine</h2>
|
105
|
+
</div>
|
106
|
+
|
107
|
+
<div id="about">
|
108
|
+
<h3><a href="info/properties" id="about-link">About this app’s environment</a> or
|
109
|
+
<a href="/source/">view source</a></h3>
|
110
|
+
<div id="about-content" style="display: none"></div>
|
111
|
+
</div>
|
112
|
+
|
113
|
+
<div id="getting-started">
|
114
|
+
<h1>Getting started</h1>
|
115
|
+
<h2>Here’s how to get rolling:</h2>
|
116
|
+
|
117
|
+
<ol>
|
118
|
+
<li><h2>Assign an app identifier</h2>
|
119
|
+
<p>Simply <a href="http://appengine.google.com/start/createapp"
|
120
|
+
target="_new">create an application</a> at appspot.com,<br>
|
121
|
+
|
122
|
+
<li>
|
123
|
+
<h2>Publish this sample app</h2>
|
124
|
+
<p>Fork this <a href="http://github.com/mirah/dubious">dubious-demo</a></p>
|
125
|
+
</li>
|
126
|
+
|
127
|
+
<li>
|
128
|
+
<h2>Leave a comment</h2>
|
129
|
+
<p>On this <a href="/shout/">shout demo</a> for Mirah</p>
|
130
|
+
</li>
|
131
|
+
|
132
|
+
<li>
|
133
|
+
<h2>Demo RESTful controllers</h2>
|
134
|
+
<p>This <a href="/contacts/">contacts scaffold</a> should be familiar</p>
|
135
|
+
</li>
|
136
|
+
|
137
|
+
</ol>
|
138
|
+
</div>
|
139
|
+
</div>
|
140
|
+
|
141
|
+
<div id="footer"> </div>
|
142
|
+
</div>
|
143
|
+
</body>
|
144
|
+
</html>
|
@@ -0,0 +1,117 @@
|
|
1
|
+
|
2
|
+
;(function($){
|
3
|
+
$(function(){
|
4
|
+
var authToken=$('meta[name=csrf-token]').attr('content');
|
5
|
+
var authParam=$('meta[name=csrf-param]').attr('content');
|
6
|
+
var formTemplate='<form method="#{method}" action="#{action}">\
|
7
|
+
#{realmethod}<input name="#{param}" value="#{token}" type="hidden">\
|
8
|
+
</form>';
|
9
|
+
var realmethodTemplate='<input name="_method" value="#{method}" type="hidden">';
|
10
|
+
String.prototype.interpolate=function(){
|
11
|
+
for(i in arguments[0]){
|
12
|
+
eval(i+" = '"+arguments[0][i]+"'");
|
13
|
+
};
|
14
|
+
return this.replace(/#\{.*?\}/g,function(match){
|
15
|
+
return eval(match.replace(/^#\{|\}$/g,''));
|
16
|
+
});
|
17
|
+
};
|
18
|
+
function handleRemote(element){
|
19
|
+
var $element=$(element);
|
20
|
+
var method,url,params,dataType;
|
21
|
+
dataType=$element.attr('data-type')||'script';
|
22
|
+
if($element.is('form')){
|
23
|
+
method=$element.attr('method')||'post';
|
24
|
+
url=$element.attr('action');
|
25
|
+
params=$element.serialize();
|
26
|
+
}else{
|
27
|
+
method=$element.attr('data-method')||'get';
|
28
|
+
url=$element.attr('data-url')||$element.attr('href');
|
29
|
+
params={};
|
30
|
+
};
|
31
|
+
function triggerHandlers($element,event_name){
|
32
|
+
var proceed=true;
|
33
|
+
if($element.triggerHandler(event_name)==false){
|
34
|
+
proceed=false;
|
35
|
+
}else{
|
36
|
+
var x=$.each($element.parents(),function(index,dom){
|
37
|
+
if($(dom).triggerHandler(event_name)==false){
|
38
|
+
proceed=false;
|
39
|
+
};
|
40
|
+
});
|
41
|
+
};
|
42
|
+
return proceed;
|
43
|
+
};
|
44
|
+
if(!triggerHandlers($element,"beforeAjax"))return false;
|
45
|
+
$.ajax({
|
46
|
+
url:url,
|
47
|
+
type:method,
|
48
|
+
dataType:dataType,
|
49
|
+
data:params,
|
50
|
+
beforeSend:function(request){$element.trigger("beforeSendAjax",[request]);},
|
51
|
+
dataFilter:function(data,type){$element.trigger("dataFilterAjax",[data,type]);},
|
52
|
+
complete:function(request,textStatus){$element.trigger("completeAjax",[request,textStatus]);},
|
53
|
+
success:function(data,textStatus,request){$element.trigger("successAjax",[data,textStatus,request]);},
|
54
|
+
error:function(request,textStatus,errorThrown){$element.trigger("errorAjax",[request,textStatus,errorThrown]);}
|
55
|
+
});
|
56
|
+
$element.trigger("afterAjax");
|
57
|
+
};
|
58
|
+
$('body').live('click',function(e){
|
59
|
+
var target=e.target;
|
60
|
+
var message=$(target).attr('data-confirm');
|
61
|
+
if(message&&!confirm(message)){
|
62
|
+
return false;
|
63
|
+
};
|
64
|
+
var remoteElement=$(target).closest('a[data-remote=true]').get(0);
|
65
|
+
if(remoteElement){
|
66
|
+
handleRemote(remoteElement);
|
67
|
+
return false;
|
68
|
+
};
|
69
|
+
var element=$(target).closest('a[data-method]').get(0);
|
70
|
+
if(element&&$(element).attr('data-remote')!='true'){
|
71
|
+
var method=$(element).attr('data-method');
|
72
|
+
var piggyback=method.toLowerCase()!='post';
|
73
|
+
var formHTML=formTemplate.interpolate({
|
74
|
+
method:'POST',
|
75
|
+
realmethod:piggyback?realmethodTemplate.interpolate({method:method}):'',
|
76
|
+
action:$(element).attr('href'),
|
77
|
+
token:authToken,
|
78
|
+
param:authParam
|
79
|
+
});
|
80
|
+
var $form=$('<div>').html(formHTML).children().hide().appendTo('body');
|
81
|
+
$form.submit();
|
82
|
+
return false;
|
83
|
+
};
|
84
|
+
});
|
85
|
+
$('body').live('submit',function(e){
|
86
|
+
var target=e.target;
|
87
|
+
var message=$(target).attr('data-confirm');
|
88
|
+
if(message&&!confirm(message)){
|
89
|
+
return false;
|
90
|
+
};
|
91
|
+
var inputs=$(target).find('input[type=submit][data-disable-with]');
|
92
|
+
$.each(inputs,function(i,input){
|
93
|
+
var $input=$(input);
|
94
|
+
$input.attr('disabled','disabled');
|
95
|
+
$input.attr('data-original-value',$input.val());
|
96
|
+
$input.val($input.attr('data-disable-with'));
|
97
|
+
});
|
98
|
+
var element=$(target).closest('form[data-remote=true]').get(0);
|
99
|
+
if(element){
|
100
|
+
handleRemote(element);
|
101
|
+
return false;
|
102
|
+
};
|
103
|
+
});
|
104
|
+
$('body').live('completeAjax',function(e){
|
105
|
+
var target=e.target;
|
106
|
+
if(target.tagName.toLowerCase()=='form'){
|
107
|
+
var inputs=$(target).find('input[type=submit][disabled=true][data-disable-with]');
|
108
|
+
$.each(inputs,function(i,input){
|
109
|
+
var $input=$(input);
|
110
|
+
$input.val($input.attr('data-original-value'));
|
111
|
+
$input.attr('data-original-value',null);
|
112
|
+
$input.attr('disabled',false);
|
113
|
+
});
|
114
|
+
};
|
115
|
+
});
|
116
|
+
});
|
117
|
+
})(jQuery);
|
File without changes
|
@@ -0,0 +1,188 @@
|
|
1
|
+
body {
|
2
|
+
margin: 0;
|
3
|
+
margin-bottom: 25px;
|
4
|
+
padding: 0;
|
5
|
+
background-color: #f0f0f0;
|
6
|
+
font-family: "Lucida Grande", "Bitstream Vera Sans", "Verdana";
|
7
|
+
font-size: 13px;
|
8
|
+
color: #333;
|
9
|
+
}
|
10
|
+
|
11
|
+
h1 {
|
12
|
+
font-size: 28px;
|
13
|
+
color: #000;
|
14
|
+
}
|
15
|
+
|
16
|
+
a {color: #666}
|
17
|
+
a:hover {
|
18
|
+
background-color: #ccc;
|
19
|
+
color: white;
|
20
|
+
text-decoration: none;
|
21
|
+
}
|
22
|
+
|
23
|
+
|
24
|
+
#page {
|
25
|
+
background-color: #f0f0f0;
|
26
|
+
width: 750px;
|
27
|
+
margin: 0;
|
28
|
+
margin-left: auto;
|
29
|
+
margin-right: auto;
|
30
|
+
}
|
31
|
+
|
32
|
+
#content {
|
33
|
+
float: left;
|
34
|
+
background-color: white;
|
35
|
+
border: 3px solid #aaa;
|
36
|
+
border-top: none;
|
37
|
+
padding: 25px;
|
38
|
+
width: 500px;
|
39
|
+
}
|
40
|
+
|
41
|
+
#sidebar {
|
42
|
+
float: right;
|
43
|
+
width: 175px;
|
44
|
+
}
|
45
|
+
|
46
|
+
#footer {
|
47
|
+
clear: both;
|
48
|
+
}
|
49
|
+
|
50
|
+
#header, #about, #getting-started {
|
51
|
+
padding-left: 75px;
|
52
|
+
padding-right: 30px;
|
53
|
+
}
|
54
|
+
|
55
|
+
#header {
|
56
|
+
background-image: url("/images/dubious.png");
|
57
|
+
background-repeat: no-repeat;
|
58
|
+
background-position: top left;
|
59
|
+
height: 64px;
|
60
|
+
}
|
61
|
+
|
62
|
+
#header h1, #header h2 {margin: 0}
|
63
|
+
#header h2 {
|
64
|
+
color: #888;
|
65
|
+
font-weight: normal;
|
66
|
+
font-size: 16px;
|
67
|
+
}
|
68
|
+
|
69
|
+
td.mono { font-family: "Andale Mono", "monospace"; }
|
70
|
+
|
71
|
+
#about h3 {
|
72
|
+
margin: 0;
|
73
|
+
margin-bottom: 10px;
|
74
|
+
font-size: 14px;
|
75
|
+
}
|
76
|
+
|
77
|
+
#about-content {
|
78
|
+
background-color: #ffd;
|
79
|
+
border: 1px solid #fc0;
|
80
|
+
margin-left: -11px;
|
81
|
+
}
|
82
|
+
#about-content table {
|
83
|
+
margin-top: 10px;
|
84
|
+
margin-bottom: 10px;
|
85
|
+
font-size: 11px;
|
86
|
+
border-collapse: collapse;
|
87
|
+
}
|
88
|
+
#about-content td {
|
89
|
+
padding: 10px;
|
90
|
+
padding-top: 3px;
|
91
|
+
padding-bottom: 3px;
|
92
|
+
}
|
93
|
+
#about-content td.name {color: #555}
|
94
|
+
#about-content td.value {color: #000}
|
95
|
+
|
96
|
+
#about-content.failure {
|
97
|
+
background-color: #fcc;
|
98
|
+
border: 1px solid #f00;
|
99
|
+
}
|
100
|
+
#about-content.failure p {
|
101
|
+
margin: 0;
|
102
|
+
padding: 10px;
|
103
|
+
}
|
104
|
+
|
105
|
+
code {
|
106
|
+
color: Brown;
|
107
|
+
}
|
108
|
+
|
109
|
+
#getting-started {
|
110
|
+
border-top: 1px solid #ccc;
|
111
|
+
margin-top: 25px;
|
112
|
+
padding-top: 15px;
|
113
|
+
}
|
114
|
+
#getting-started h1 {
|
115
|
+
margin: 0;
|
116
|
+
font-size: 20px;
|
117
|
+
}
|
118
|
+
#getting-started h2 {
|
119
|
+
margin: 0;
|
120
|
+
font-size: 14px;
|
121
|
+
font-weight: normal;
|
122
|
+
color: #333;
|
123
|
+
margin-bottom: 25px;
|
124
|
+
}
|
125
|
+
#getting-started ul {
|
126
|
+
margin-left: 0;
|
127
|
+
padding-left: 0;
|
128
|
+
}
|
129
|
+
#getting-started ol {
|
130
|
+
margin-left: 0;
|
131
|
+
padding-left: 0;
|
132
|
+
}
|
133
|
+
#getting-started li {
|
134
|
+
font-size: 18px;
|
135
|
+
color: #888;
|
136
|
+
margin-bottom: 25px;
|
137
|
+
}
|
138
|
+
#getting-started li h2 {
|
139
|
+
margin: 0;
|
140
|
+
font-weight: normal;
|
141
|
+
font-size: 18px;
|
142
|
+
color: #333;
|
143
|
+
}
|
144
|
+
#getting-started li p {
|
145
|
+
color: #555;
|
146
|
+
font-size: 13px;
|
147
|
+
}
|
148
|
+
|
149
|
+
|
150
|
+
#search {
|
151
|
+
margin: 0;
|
152
|
+
padding-top: 10px;
|
153
|
+
padding-bottom: 10px;
|
154
|
+
font-size: 11px;
|
155
|
+
}
|
156
|
+
#search input {
|
157
|
+
font-size: 11px;
|
158
|
+
margin: 2px;
|
159
|
+
}
|
160
|
+
#search-text {width: 170px}
|
161
|
+
|
162
|
+
|
163
|
+
#sidebar ul {
|
164
|
+
margin-left: 0;
|
165
|
+
padding-left: 0;
|
166
|
+
}
|
167
|
+
#sidebar ul h3 {
|
168
|
+
margin-top: 25px;
|
169
|
+
font-size: 16px;
|
170
|
+
padding-bottom: 10px;
|
171
|
+
border-bottom: 1px solid #ccc;
|
172
|
+
}
|
173
|
+
#sidebar li {
|
174
|
+
list-style-type: none;
|
175
|
+
}
|
176
|
+
#sidebar ul.links li {
|
177
|
+
margin-bottom: 5px;
|
178
|
+
}
|
179
|
+
span.comment {
|
180
|
+
color: blue;
|
181
|
+
font-weight: plain;
|
182
|
+
}
|
183
|
+
pre {
|
184
|
+
font-size: 12pt;
|
185
|
+
}
|
186
|
+
span.appid {
|
187
|
+
color: green;
|
188
|
+
}
|