presenting 1.0.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/app/controllers/presentation/assets_controller.rb +1 -1
- data/app/views/presentations/_details.erb +1 -1
- data/app/views/presentations/_field_search.erb +1 -1
- data/app/views/presentations/_form.erb +1 -1
- data/app/views/presentations/_grid.erb +1 -1
- data/app/views/presentations/_search.erb +1 -1
- data/config/routes.rb +7 -2
- data/lib/presentation/base.rb +10 -27
- data/lib/presentation/details.rb +2 -0
- data/lib/presentation/field_search.rb +2 -0
- data/lib/presentation/grid.rb +1 -1
- data/lib/presenting/engine.rb +7 -0
- data/lib/presenting/form_helpers.rb +1 -1
- data/lib/presenting/helpers.rb +7 -3
- data/lib/presenting/view.rb +3 -3
- data/lib/presenting.rb +38 -5
- data/test/assets_test.rb +5 -7
- data/test/details_test.rb +1 -1
- data/test/field_search_test.rb +1 -1
- data/test/form_test.rb +316 -287
- data/test/grid_test.rb +28 -8
- data/test/helpers_test.rb +2 -2
- data/test/presenting_test.rb +1 -1
- data/test/r3/Gemfile +7 -0
- data/test/r3/Gemfile.lock +82 -0
- data/test/r3/config/application.rb +12 -0
- data/test/r3/config/boot.rb +6 -0
- data/test/{rails → r3}/config/database.yml +6 -1
- data/test/r3/config/environment.rb +5 -0
- data/test/r3/config/environments/test.rb +35 -0
- data/test/r3/config.ru +4 -0
- data/test/r3/db/test.sqlite3 +0 -0
- data/test/r3/log/test.log +2354 -0
- data/test/r3/public/javascripts/presenting/grid.js +0 -0
- data/test/r3/public/javascripts/presenting/search.js +13 -0
- data/test/r3/public/stylesheets/presenting/details-color.css +7 -0
- data/test/r3/public/stylesheets/presenting/details.css +10 -0
- data/test/r3/public/stylesheets/presenting/form.css +1 -0
- data/test/r3/public/stylesheets/presenting/grid-color.css +71 -0
- data/test/r3/public/stylesheets/presenting/grid.css +64 -0
- data/test/r3/public/stylesheets/presenting/search-color.css +16 -0
- data/test/r3/public/stylesheets/presenting/search.css +45 -0
- data/test/search_conditions_test.rb +2 -2
- data/test/search_test.rb +1 -1
- data/test/test_helper.rb +8 -39
- metadata +45 -79
- data/rails/init.rb +0 -12
- data/test/rails/app/controllers/application_controller.rb +0 -15
- data/test/rails/app/controllers/users_controller.rb +0 -36
- data/test/rails/app/helpers/application_helper.rb +0 -3
- data/test/rails/app/helpers/users_helper.rb +0 -2
- data/test/rails/app/models/user.rb +0 -2
- data/test/rails/app/views/layouts/application.html.erb +0 -15
- data/test/rails/app/views/users/index.html.erb +0 -10
- data/test/rails/app/views/users/new.html.erb +0 -2
- data/test/rails/app/views/users/show.html.erb +0 -1
- data/test/rails/config/boot.rb +0 -109
- data/test/rails/config/environment.rb +0 -13
- data/test/rails/config/environments/development.rb +0 -17
- data/test/rails/config/environments/production.rb +0 -24
- data/test/rails/config/environments/test.rb +0 -22
- data/test/rails/config/locales/en.yml +0 -5
- data/test/rails/config/routes.rb +0 -5
- data/test/rails/db/development.sqlite3 +0 -0
- data/test/rails/db/migrate/20090213085444_create_users.rb +0 -13
- data/test/rails/db/migrate/20090213085607_populate_users.rb +0 -13
- data/test/rails/db/schema.rb +0 -23
- data/test/rails/db/test.sqlite3 +0 -0
- data/test/rails/log/development.log +0 -858
- data/test/rails/public/404.html +0 -30
- data/test/rails/public/422.html +0 -30
- data/test/rails/public/500.html +0 -33
- data/test/rails/public/javascripts/application.js +0 -2
- data/test/rails/public/javascripts/jquery.livequery.min.js +0 -11
- data/test/rails/public/javascripts/prototype.js +0 -4320
- data/test/rails/script/console +0 -3
- data/test/rails/script/dbconsole +0 -3
- data/test/rails/script/destroy +0 -3
- data/test/rails/script/generate +0 -3
- data/test/rails/script/plugin +0 -3
- data/test/rails/script/runner +0 -3
- data/test/rails/script/server +0 -3
- /data/app/assets/{javascript → javascripts}/grid.js +0 -0
- /data/app/assets/{javascript → javascripts}/search.js +0 -0
data/test/rails/public/404.html
DELETED
@@ -1,30 +0,0 @@
|
|
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>
|
data/test/rails/public/422.html
DELETED
@@ -1,30 +0,0 @@
|
|
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>
|
data/test/rails/public/500.html
DELETED
@@ -1,33 +0,0 @@
|
|
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
|
-
<p><small>(If you're the administrator of this website, then please read
|
29
|
-
the log file "<%=h RAILS_ENV %>.log"
|
30
|
-
to find out what went wrong.)</small></p>
|
31
|
-
</div>
|
32
|
-
</body>
|
33
|
-
</html>
|
@@ -1,11 +0,0 @@
|
|
1
|
-
/* Copyright (c) 2007 Brandon Aaron (brandon.aaron@gmail.com || http://brandonaaron.net)
|
2
|
-
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
|
3
|
-
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
|
4
|
-
*
|
5
|
-
* Version: 1.0.2
|
6
|
-
* Requires jQuery 1.1.3+
|
7
|
-
* Docs: http://docs.jquery.com/Plugins/livequery
|
8
|
-
*/
|
9
|
-
(function($){$.extend($.fn,{livequery:function(type,fn,fn2){var self=this,q;if($.isFunction(type))fn2=fn,fn=type,type=undefined;$.each($.livequery.queries,function(i,query){if(self.selector==query.selector&&self.context==query.context&&type==query.type&&(!fn||fn.$lqguid==query.fn.$lqguid)&&(!fn2||fn2.$lqguid==query.fn2.$lqguid))return(q=query)&&false;});q=q||new $.livequery(this.selector,this.context,type,fn,fn2);q.stopped=false;$.livequery.run(q.id);return this;},expire:function(type,fn,fn2){var self=this;if($.isFunction(type))fn2=fn,fn=type,type=undefined;$.each($.livequery.queries,function(i,query){if(self.selector==query.selector&&self.context==query.context&&(!type||type==query.type)&&(!fn||fn.$lqguid==query.fn.$lqguid)&&(!fn2||fn2.$lqguid==query.fn2.$lqguid)&&!this.stopped)$.livequery.stop(query.id);});return this;}});$.livequery=function(selector,context,type,fn,fn2){this.selector=selector;this.context=context||document;this.type=type;this.fn=fn;this.fn2=fn2;this.elements=[];this.stopped=false;this.id=$.livequery.queries.push(this)-1;fn.$lqguid=fn.$lqguid||$.livequery.guid++;if(fn2)fn2.$lqguid=fn2.$lqguid||$.livequery.guid++;return this;};$.livequery.prototype={stop:function(){var query=this;if(this.type)this.elements.unbind(this.type,this.fn);else if(this.fn2)this.elements.each(function(i,el){query.fn2.apply(el);});this.elements=[];this.stopped=true;},run:function(){if(this.stopped)return;var query=this;var oEls=this.elements,els=$(this.selector,this.context),nEls=els.not(oEls);this.elements=els;if(this.type){nEls.bind(this.type,this.fn);if(oEls.length>0)$.each(oEls,function(i,el){if($.inArray(el,els)<0)$.event.remove(el,query.type,query.fn);});}else{nEls.each(function(){query.fn.apply(this);});if(this.fn2&&oEls.length>0)$.each(oEls,function(i,el){if($.inArray(el,els)<0)query.fn2.apply(el);});}}};$.extend($.livequery,{guid:0,queries:[],queue:[],running:false,timeout:null,checkQueue:function(){if($.livequery.running&&$.livequery.queue.length){var length=$.livequery.queue.length;while(length--)$.livequery.queries[$.livequery.queue.shift()].run();}},pause:function(){$.livequery.running=false;},play:function(){$.livequery.running=true;$.livequery.run();},registerPlugin:function(){$.each(arguments,function(i,n){if(!$.fn[n])return;var old=$.fn[n];$.fn[n]=function(){var r=old.apply(this,arguments);$.livequery.run();return r;}});},run:function(id){if(id!=undefined){if($.inArray(id,$.livequery.queue)<0)$.livequery.queue.push(id);}else
|
10
|
-
$.each($.livequery.queries,function(id){if($.inArray(id,$.livequery.queue)<0)$.livequery.queue.push(id);});if($.livequery.timeout)clearTimeout($.livequery.timeout);$.livequery.timeout=setTimeout($.livequery.checkQueue,20);},stop:function(id){if(id!=undefined)$.livequery.queries[id].stop();else
|
11
|
-
$.each($.livequery.queries,function(id){$.livequery.queries[id].stop();});}});$.livequery.registerPlugin('append','prepend','after','before','wrap','attr','removeAttr','addClass','removeClass','toggleClass','empty','remove');$(function(){$.livequery.play();});var init=$.prototype.init;$.prototype.init=function(a,c){var r=init.apply(this,arguments);if(a&&a.selector)r.context=a.context,r.selector=a.selector;if(typeof a=='string')r.context=c||document,r.selector=a;return r;};$.prototype.init.prototype=$.prototype;})(jQuery);
|