typus 3.1.0.rc14 → 3.1.0.rc15

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.
Files changed (137) hide show
  1. data/.gitmodules +3 -0
  2. data/README.md +10 -14
  3. data/Rakefile +7 -5
  4. data/app/assets/javascripts/typus.js +1 -0
  5. data/app/assets/javascripts/typus/jquery.application.js +0 -2
  6. data/app/assets/stylesheets/typus.css +13 -1
  7. data/app/assets/stylesheets/typus/account.css +53 -0
  8. data/app/assets/stylesheets/typus/actions.css +11 -0
  9. data/app/assets/stylesheets/typus/content.css +92 -0
  10. data/app/assets/stylesheets/typus/defaults.css +31 -0
  11. data/app/assets/stylesheets/typus/errors.css +33 -0
  12. data/app/assets/stylesheets/typus/footer.css +8 -0
  13. data/app/assets/stylesheets/typus/forms.css +52 -0
  14. data/app/assets/stylesheets/typus/hacks.css +20 -0
  15. data/app/assets/stylesheets/typus/header.css +55 -0
  16. data/app/assets/stylesheets/typus/layout.css +4 -0
  17. data/app/assets/stylesheets/typus/pagination.css +34 -8
  18. data/app/assets/stylesheets/typus/sidebar.css +23 -0
  19. data/app/assets/stylesheets/typus/tables.css +47 -0
  20. data/app/helpers/admin/base_helper.rb +1 -1
  21. data/app/helpers/admin/resources/data_types/belongs_to_helper.rb +1 -0
  22. data/app/helpers/admin/resources/data_types/tree_helper.rb +1 -0
  23. data/app/helpers/admin/resources/display_helper.rb +1 -1
  24. data/app/helpers/admin/resources/form_helper.rb +1 -0
  25. data/app/helpers/admin/resources_helper.rb +3 -5
  26. data/app/views/admin/account/forgot_password.html.erb +7 -1
  27. data/app/views/admin/base/user_guide.html.erb +61 -57
  28. data/app/views/admin/dashboard/show.html.erb +6 -16
  29. data/app/views/admin/dashboard/widgets/_applications.html.erb +31 -0
  30. data/app/views/admin/dashboard/widgets/_models.html.erb +23 -0
  31. data/app/views/admin/dashboard/widgets/_models_extended.html.erb +25 -0
  32. data/app/views/admin/dashboard/widgets/_resources.html.erb +23 -0
  33. data/app/views/admin/resources/_actions.html.erb +23 -0
  34. data/app/views/admin/resources/edit.html.erb +26 -20
  35. data/app/views/admin/resources/edit/_actions.html.erb +7 -0
  36. data/app/views/admin/resources/edit/_rencently_edited.html.erb +8 -0
  37. data/app/views/admin/resources/index.html.erb +42 -32
  38. data/app/views/admin/resources/new.html.erb +16 -8
  39. data/app/views/admin/resources/show.html.erb +22 -14
  40. data/app/views/admin/session/new.html.erb +9 -1
  41. data/app/views/admin/templates/_belongs_to.html.erb +1 -1
  42. data/app/views/admin/templates/_belongs_to_with_autocomplete.html.erb +1 -1
  43. data/app/views/admin/templates/_boolean.html.erb +1 -1
  44. data/app/views/admin/templates/_date.html.erb +1 -1
  45. data/app/views/admin/templates/_datetime.html.erb +1 -1
  46. data/app/views/admin/templates/_dragonfly.html.erb +1 -1
  47. data/app/views/admin/templates/_paperclip.html.erb +1 -1
  48. data/app/views/admin/templates/_password.html.erb +1 -1
  49. data/app/views/admin/templates/_selector.html.erb +1 -1
  50. data/app/views/admin/templates/_string.html.erb +1 -1
  51. data/app/views/admin/templates/_string_with_preview.html.erb +1 -1
  52. data/app/views/admin/templates/_text.html.erb +1 -1
  53. data/app/views/admin/templates/_text_with_ckeditor.html.erb +16 -2
  54. data/app/views/admin/templates/_text_with_ckeditor_and_assets.html.erb +16 -2
  55. data/app/views/admin/templates/_time.html.erb +1 -1
  56. data/app/views/admin/templates/_tree.html.erb +1 -1
  57. data/app/views/helpers/admin/resources/_sidebar.html.erb +36 -12
  58. data/app/views/helpers/admin/resources/_table.html.erb +5 -3
  59. data/app/views/layouts/admin/base.html.erb +16 -29
  60. data/app/views/layouts/admin/headless.html.erb +1 -1
  61. data/app/views/layouts/admin/session.html.erb +6 -0
  62. data/lib/support/fake_user.rb +2 -8
  63. data/lib/typus.rb +6 -2
  64. data/lib/typus/authentication/devise.rb +19 -0
  65. data/lib/typus/controller/headless.rb +1 -1
  66. data/lib/typus/orm/active_record/admin_user_v1.rb +15 -1
  67. data/lib/typus/orm/active_record/admin_user_v2.rb +16 -2
  68. data/lib/typus/orm/active_record/user/class_methods.rb +2 -3
  69. data/lib/typus/orm/active_record/user/instance_methods.rb +5 -2
  70. data/lib/typus/orm/active_record/user/instance_methods_more.rb +19 -0
  71. data/lib/typus/version.rb +1 -1
  72. data/vendor/assets/adapt/css/1200.css +357 -0
  73. data/vendor/assets/adapt/css/1200.min.css +1 -0
  74. data/vendor/assets/adapt/css/1560.css +357 -0
  75. data/vendor/assets/adapt/css/1560.min.css +1 -0
  76. data/vendor/assets/adapt/css/720.css +357 -0
  77. data/vendor/assets/adapt/css/720.min.css +1 -0
  78. data/vendor/assets/adapt/css/960.css +357 -0
  79. data/vendor/assets/adapt/css/960.min.css +1 -0
  80. data/vendor/assets/adapt/css/fluid.css +345 -0
  81. data/vendor/assets/adapt/css/fluid.min.css +1 -0
  82. data/vendor/assets/adapt/css/master.css +120 -0
  83. data/vendor/assets/adapt/css/mobile.css +20 -0
  84. data/vendor/assets/adapt/css/mobile.min.css +1 -0
  85. data/vendor/assets/adapt/css/reset.css +202 -0
  86. data/vendor/assets/adapt/css/text.css +81 -0
  87. data/vendor/assets/adapt/images/h1.png +0 -0
  88. data/vendor/assets/adapt/js/adapt.js +135 -0
  89. data/vendor/assets/adapt/js/adapt.min.js +1 -0
  90. data/vendor/assets/formalize/.gitignore +1 -0
  91. data/vendor/assets/formalize/css/_formalize.sass +332 -0
  92. data/vendor/assets/formalize/css/demo.css +47 -0
  93. data/vendor/assets/formalize/css/formalize.css +395 -0
  94. data/vendor/assets/formalize/css/reset.css +202 -0
  95. data/vendor/assets/formalize/css/text.css +81 -0
  96. data/vendor/assets/formalize/images/button.png +0 -0
  97. data/vendor/assets/formalize/images/select_arrow.gif +0 -0
  98. data/vendor/assets/formalize/js/dojo.formalize.js +166 -0
  99. data/vendor/assets/formalize/js/dojo.formalize.min.js +1 -0
  100. data/vendor/assets/formalize/js/extjs.formalize.js +163 -0
  101. data/vendor/assets/formalize/js/extjs.formalize.min.js +1 -0
  102. data/vendor/assets/formalize/js/jquery.formalize.js +150 -0
  103. data/vendor/assets/formalize/js/jquery.formalize.min.js +1 -0
  104. data/vendor/assets/formalize/js/mootools.formalize.js +155 -0
  105. data/vendor/assets/formalize/js/mootools.formalize.min.js +1 -0
  106. data/vendor/assets/formalize/js/prototype.formalize.js +163 -0
  107. data/vendor/assets/formalize/js/prototype.formalize.min.js +1 -0
  108. data/vendor/assets/formalize/js/yui.formalize.js +152 -0
  109. data/vendor/assets/formalize/js/yui.formalize.min.js +1 -0
  110. metadata +79 -47
  111. data/app/assets/stylesheets/typus/screen.css +0 -340
  112. data/app/helpers/admin/dashboard_helper.rb +0 -8
  113. data/app/views/admin/dashboard/_applications.html.erb +0 -21
  114. data/config/locales/typus.ca.models.yml +0 -17
  115. data/config/locales/typus.ca.yml +0 -80
  116. data/config/locales/typus.de.models.yml +0 -17
  117. data/config/locales/typus.de.yml +0 -79
  118. data/config/locales/typus.el.models.yml +0 -17
  119. data/config/locales/typus.el.yml +0 -81
  120. data/config/locales/typus.es.models.yml +0 -18
  121. data/config/locales/typus.es.yml +0 -81
  122. data/config/locales/typus.fr.models.yml +0 -18
  123. data/config/locales/typus.fr.yml +0 -85
  124. data/config/locales/typus.hu.models.yml +0 -17
  125. data/config/locales/typus.hu.yml +0 -79
  126. data/config/locales/typus.it.models.yml +0 -18
  127. data/config/locales/typus.it.yml +0 -88
  128. data/config/locales/typus.locale.models.yml.template +0 -17
  129. data/config/locales/typus.locale.yml.template +0 -80
  130. data/config/locales/typus.pt-BR.models.yml +0 -17
  131. data/config/locales/typus.pt-BR.yml +0 -79
  132. data/config/locales/typus.pt-PT.models.yml +0 -17
  133. data/config/locales/typus.pt-PT.yml +0 -83
  134. data/config/locales/typus.ru.models.yml +0 -17
  135. data/config/locales/typus.ru.yml +0 -79
  136. data/config/locales/typus.zh-CN.models.yml +0 -17
  137. data/config/locales/typus.zh-CN.yml +0 -78
@@ -0,0 +1 @@
1
+ var FORMALIZE=function(a,b,c){var d="placeholder"in b.createElement("input"),e="autofocus"in b.createElement("input"),f=Browser.ie6,g=Browser.ie7;return{go:function(){for(var a in FORMALIZE.init)FORMALIZE.init[a]()},init:{full_input_size:function(){!!g&&!!$$("textarea, input.input_full").length&&$$("textarea, input.input_full").each(function(a){(new Element("span.input_full_wrap")).wraps(a)})},ie6_skin_inputs:function(){if(!!f&&!!$$("input, select, textarea").length){var a=/button|submit|reset/,b=/date|datetime|datetime-local|email|month|number|password|range|search|tel|text|time|url|week/;$$("input").each(function(c){c.getAttribute("type").match(a)?(c.addClass("ie6_button"),c.disabled&&c.addClass("ie6_button_disabled")):c.getAttribute("type").match(b)&&(c.addClass("ie6_input"),c.disabled&&c.addClass("ie6_input_disabled"))}),$$("textarea, select").each(function(a){a.disabled&&a.addClass("ie6_input_disabled")})}},autofocus:function(){!e&&!!$$("[autofocus]").length&&$$("[autofocus]")[0].focus()},placeholder:function(){!d&&!!$$("[placeholder]").length&&(FORMALIZE.misc.add_placeholder(),$$("[placeholder]").each(function(a){var b=a.get("placeholder");a.addEvents({focus:function(){a.value===b&&a.set("value","").removeClass("placeholder_text")},blur:function(){FORMALIZE.misc.add_placeholder()}}),a.getParent("form").addEvents({submit:function(){a.value===b&&a.set("value","").removeClass("placeholder_text")},reset:function(){setTimeout(FORMALIZE.misc.add_placeholder,50)}})}))}},misc:{add_placeholder:function(){!d&&!!$$("[placeholder]").length&&$$("[placeholder]").each(function(a){var b=a.get("placeholder");(!a.value||a.value===b)&&a.set("value",b).addClass("placeholder_text")})}}}}(this,this.document);$(document).addEvent("domready",function(){FORMALIZE.go()})
@@ -0,0 +1,163 @@
1
+ /*
2
+ Formalize - version 1.1
3
+
4
+ Note: This file depends on the Prototype library.
5
+ */
6
+
7
+ // Module pattern:
8
+ // http://yuiblog.com/blog/2007/06/12/module-pattern
9
+ var FORMALIZE = (function(window, document, undefined) {
10
+ // Private constants.
11
+ var PLACEHOLDER_SUPPORTED = 'placeholder' in document.createElement('input');
12
+ var AUTOFOCUS_SUPPORTED = 'autofocus' in document.createElement('input');
13
+ var IE6 = IE(6);
14
+ var IE7 = IE(7);
15
+
16
+ // Internet Explorer detection.
17
+ function IE(version) {
18
+ var b = document.createElement('b');
19
+ b.innerHTML = '<!--[if IE ' + version + ']><br><![endif]-->';
20
+ return !!b.getElementsByTagName('br').length;
21
+ }
22
+
23
+ // Expose innards of FORMALIZE.
24
+ return {
25
+ // FORMALIZE.go
26
+ go: function() {
27
+ for (var i in FORMALIZE.init) {
28
+ FORMALIZE.init[i]();
29
+ }
30
+ },
31
+ // FORMALIZE.init
32
+ init: {
33
+ // FORMALIZE.init.full_input_size
34
+ full_input_size: function() {
35
+ if (!IE7 || !$$('textarea, input.input_full').length) {
36
+ return;
37
+ }
38
+
39
+ // This fixes width: 100% on <textarea> and class="input_full".
40
+ // It ensures that form elements don't go wider than container.
41
+ $$('textarea, input.input_full').each(function(el) {
42
+ Element.wrap(el, 'span', {'class': 'input_full_wrap'});
43
+ });
44
+ },
45
+ // FORMALIZE.init.ie6_skin_inputs
46
+ ie6_skin_inputs: function() {
47
+ // Test for Internet Explorer 6.
48
+ if (!IE6 || !$$('input, select, textarea').length) {
49
+ // Exit if the browser is not IE6,
50
+ // or if no form elements exist.
51
+ return;
52
+ }
53
+
54
+ // For <input type="submit" />, etc.
55
+ var button_regex = /button|submit|reset/;
56
+
57
+ // For <input type="text" />, etc.
58
+ var type_regex = /date|datetime|datetime-local|email|month|number|password|range|search|tel|text|time|url|week/;
59
+
60
+ $$('input').each(function(el) {
61
+ // Is it a button?
62
+ if (el.getAttribute('type').match(button_regex)) {
63
+ el.addClassName('ie6_button');
64
+
65
+ /* Is it disabled? */
66
+ if (el.disabled) {
67
+ el.addClassName('ie6_button_disabled');
68
+ }
69
+ }
70
+ // Or is it a textual input?
71
+ else if (el.getAttribute('type').match(type_regex)) {
72
+ el.addClassName('ie6_input');
73
+
74
+ /* Is it disabled? */
75
+ if (el.disabled) {
76
+ el.addClassName('ie6_input_disabled');
77
+ }
78
+ }
79
+ });
80
+
81
+ $$('textarea, select').each(function(el) {
82
+ /* Is it disabled? */
83
+ if (el.disabled) {
84
+ el.addClassName('ie6_input_disabled');
85
+ }
86
+ });
87
+ },
88
+ // FORMALIZE.init.autofocus
89
+ autofocus: function() {
90
+ if (AUTOFOCUS_SUPPORTED || !$$('[autofocus]').length) {
91
+ return;
92
+ }
93
+
94
+ $$('[autofocus]')[0].focus();
95
+ },
96
+ // FORMALIZE.init.placeholder
97
+ placeholder: function() {
98
+ if (PLACEHOLDER_SUPPORTED || !$$('[placeholder]').length) {
99
+ // Exit if placeholder is supported natively,
100
+ // or if page does not have any placeholder.
101
+ return;
102
+ }
103
+
104
+ FORMALIZE.misc.add_placeholder();
105
+
106
+ $$('[placeholder]').each(function(el) {
107
+ var text = el.getAttribute('placeholder');
108
+ var form = el.up('form');
109
+
110
+ el.observe('focus', function() {
111
+ if (el.value === text) {
112
+ el.value = '';
113
+ el.removeClassName('placeholder_text');
114
+ }
115
+ });
116
+
117
+ el.observe('blur', function() {
118
+ FORMALIZE.misc.add_placeholder();
119
+ });
120
+
121
+ // Prevent <form> from accidentally
122
+ // submitting the placeholder text.
123
+ form.observe('submit', function() {
124
+ if (el.value === text) {
125
+ el.value = '';
126
+ el.removeClassName('placeholder_text');
127
+ }
128
+ });
129
+
130
+ form.observe('reset', function() {
131
+ setTimeout(FORMALIZE.misc.add_placeholder, 50);
132
+ });
133
+ });
134
+ }
135
+ },
136
+ // FORMALIZE.misc
137
+ misc: {
138
+ // FORMALIZE.misc.add_placeholder
139
+ add_placeholder: function() {
140
+ if (PLACEHOLDER_SUPPORTED || !$$('[placeholder]').length) {
141
+ // Exit if placeholder is supported natively,
142
+ // or if page does not have any placeholder.
143
+ return;
144
+ }
145
+
146
+ $$('[placeholder]').each(function(el) {
147
+ var text = el.getAttribute('placeholder');
148
+
149
+ if (!el.value || el.value === text) {
150
+ el.value = text;
151
+ el.addClassName('placeholder_text');
152
+ }
153
+ });
154
+ }
155
+ }
156
+ };
157
+ // Alias window, document.
158
+ })(this, this.document);
159
+
160
+ // Automatically calls all functions in FORMALIZE.init
161
+ $(document).observe('dom:loaded', function() {
162
+ FORMALIZE.go();
163
+ });
@@ -0,0 +1 @@
1
+ var FORMALIZE=function(a,b,c){function h(a){var c=b.createElement("b");c.innerHTML="<!--[if IE "+a+"]><br><![endif]-->";return!!c.getElementsByTagName("br").length}var d="placeholder"in b.createElement("input"),e="autofocus"in b.createElement("input"),f=h(6),g=h(7);return{go:function(){for(var a in FORMALIZE.init)FORMALIZE.init[a]()},init:{full_input_size:function(){!!g&&!!$$("textarea, input.input_full").length&&$$("textarea, input.input_full").each(function(a){Element.wrap(a,"span",{"class":"input_full_wrap"})})},ie6_skin_inputs:function(){if(!!f&&!!$$("input, select, textarea").length){var a=/button|submit|reset/,b=/date|datetime|datetime-local|email|month|number|password|range|search|tel|text|time|url|week/;$$("input").each(function(c){c.getAttribute("type").match(a)?(c.addClassName("ie6_button"),c.disabled&&c.addClassName("ie6_button_disabled")):c.getAttribute("type").match(b)&&(c.addClassName("ie6_input"),c.disabled&&c.addClassName("ie6_input_disabled"))}),$$("textarea, select").each(function(a){a.disabled&&a.addClassName("ie6_input_disabled")})}},autofocus:function(){!e&&!!$$("[autofocus]").length&&$$("[autofocus]")[0].focus()},placeholder:function(){!d&&!!$$("[placeholder]").length&&(FORMALIZE.misc.add_placeholder(),$$("[placeholder]").each(function(a){var b=a.getAttribute("placeholder"),c=a.up("form");a.observe("focus",function(){a.value===b&&(a.value="",a.removeClassName("placeholder_text"))}),a.observe("blur",function(){FORMALIZE.misc.add_placeholder()}),c.observe("submit",function(){a.value===b&&(a.value="",a.removeClassName("placeholder_text"))}),c.observe("reset",function(){setTimeout(FORMALIZE.misc.add_placeholder,50)})}))}},misc:{add_placeholder:function(){!d&&!!$$("[placeholder]").length&&$$("[placeholder]").each(function(a){var b=a.getAttribute("placeholder");if(!a.value||a.value===b)a.value=b,a.addClassName("placeholder_text")})}}}}(this,this.document);$(document).observe("dom:loaded",function(){FORMALIZE.go()})
@@ -0,0 +1,152 @@
1
+ /*
2
+ Formalize - version 1.1
3
+
4
+ Note: This file depends on the YUI library.
5
+ */
6
+
7
+ YUI.add('formalize', function(Y) {
8
+ // Private constants.
9
+ var PLACEHOLDER_SUPPORTED = 'placeholder' in document.createElement('input');
10
+ var AUTOFOCUS_SUPPORTED = 'autofocus' in document.createElement('input');
11
+ var IE6 = parseInt(Y.UA.ie, 10) === 6;
12
+ var IE7 = parseInt(Y.UA.ie, 10) === 7;
13
+
14
+ // Expose innards of Formalize.
15
+ Y.formalize = {
16
+ // Y.formalize.go
17
+ go: function() {
18
+ for (var i in Y.formalize.init) {
19
+ Y.formalize.init[i]();
20
+ }
21
+ },
22
+ // Y.formalize.init
23
+ init: {
24
+ // Y.formalize.init.full_input_size
25
+ full_input_size: function() {
26
+ if (!IE7 || !Y.all('textarea, input.input_full')) {
27
+ return;
28
+ }
29
+
30
+ // This fixes width: 100% on <textarea> and class="input_full".
31
+ // It ensures that form elements don't go wider than container.
32
+ Y.all('textarea, input.input_full').each(function(el) {
33
+ var wrapper = Y.Node.create('<span class="input_full_wrap"></span>');
34
+ wrapper.append(el.replace(wrapper));
35
+ });
36
+ },
37
+ // Y.formalize.init.ie6_skin_inputs
38
+ ie6_skin_inputs: function() {
39
+ // Test for Internet Explorer 6.
40
+ if (!IE6 || !Y.all('input, select, textarea')) {
41
+ // Exit if the browser is not IE6,
42
+ // or if no form elements exist.
43
+ return;
44
+ }
45
+
46
+ // For <input type="submit" />, etc.
47
+ var button_regex = /button|submit|reset/;
48
+
49
+ // For <input type="text" />, etc.
50
+ var type_regex = /date|datetime|datetime-local|email|month|number|password|range|search|tel|text|time|url|week/;
51
+
52
+ Y.all('input').each(function(el) {
53
+ // Is it a button?
54
+ if (el.getAttribute('type').match(button_regex)) {
55
+ el.addClass('ie6_button');
56
+
57
+ /* Is it disabled? */
58
+ if (el.disabled) {
59
+ el.addClass('ie6_button_disabled');
60
+ }
61
+ }
62
+ // Or is it a textual input?
63
+ else if (el.getAttribute('type').match(type_regex)) {
64
+ el.addClass('ie6_input');
65
+
66
+ /* Is it disabled? */
67
+ if (el.disabled) {
68
+ el.addClass('ie6_input_disabled');
69
+ }
70
+ }
71
+ });
72
+
73
+ Y.all('textarea, select').each(function(el) {
74
+ /* Is it disabled? */
75
+ if (el.disabled) {
76
+ el.addClass('ie6_input_disabled');
77
+ }
78
+ });
79
+ },
80
+ // Y.formalize.init.autofocus
81
+ autofocus: function() {
82
+ if (AUTOFOCUS_SUPPORTED || !Y.one('[autofocus]')) {
83
+ return;
84
+ }
85
+
86
+ Y.one('[autofocus]').focus();
87
+ },
88
+ // Y.formalize.init.placeholder
89
+ placeholder: function() {
90
+ if (PLACEHOLDER_SUPPORTED || !Y.one('[placeholder]')) {
91
+ // Exit if placeholder is supported natively,
92
+ // or if page does not have any placeholder.
93
+ return;
94
+ }
95
+
96
+ Y.formalize.misc.add_placeholder();
97
+
98
+ Y.all('[placeholder]').each(function(el) {
99
+ var text = el.getAttribute('placeholder');
100
+ var form = el.ancestor('form');
101
+
102
+ function add_placeholder() {
103
+ if (!el.get('value') || el.get('value') === text) {
104
+ el.set('value', text).addClass('placeholder_text');
105
+ }
106
+ }
107
+
108
+ el.on('focus', function() {
109
+ if (el.get('value') === text) {
110
+ el.set('value', '').removeClass('placeholder_text');
111
+ }
112
+ });
113
+
114
+ el.on('blur', function() {
115
+ Y.formalize.misc.add_placeholder();
116
+ });
117
+
118
+ // Prevent <form> from accidentally
119
+ // submitting the placeholder text.
120
+ form.on('submit', function() {
121
+ if (el.get('value') === text) {
122
+ el.set('value', '').removeClass('placeholder_text');
123
+ }
124
+ });
125
+
126
+ form.on('reset', function() {
127
+ setTimeout(Y.formalize.misc.add_placeholder, 50);
128
+ });
129
+ });
130
+ }
131
+ },
132
+ // Y.formalize.misc
133
+ misc: {
134
+ // Y.formalize.misc.add_placeholder
135
+ add_placeholder: function() {
136
+ if (PLACEHOLDER_SUPPORTED || !Y.one('[placeholder]')) {
137
+ // Exit if placeholder is supported natively,
138
+ // or if page does not have any placeholder.
139
+ return;
140
+ }
141
+
142
+ Y.all('[placeholder]').each(function(el) {
143
+ var text = el.getAttribute('placeholder');
144
+
145
+ if (!el.get('value') || el.get('value') === text) {
146
+ el.set('value', text).addClass('placeholder_text');
147
+ }
148
+ });
149
+ }
150
+ }
151
+ };
152
+ }, '1.1', {requires: ['yui', 'dom', 'event']});
@@ -0,0 +1 @@
1
+ YUI.add("formalize",function(a){var b="placeholder"in document.createElement("input"),c="autofocus"in document.createElement("input"),d=parseInt(a.UA.ie,10)===6,e=parseInt(a.UA.ie,10)===7;a.formalize={go:function(){for(var b in a.formalize.init)a.formalize.init[b]()},init:{full_input_size:function(){!!e&&!!a.all("textarea, input.input_full")&&a.all("textarea, input.input_full").each(function(b){var c=a.Node.create('<span class="input_full_wrap"></span>');c.append(b.replace(c))})},ie6_skin_inputs:function(){if(!!d&&!!a.all("input, select, textarea")){var b=/button|submit|reset/,c=/date|datetime|datetime-local|email|month|number|password|range|search|tel|text|time|url|week/;a.all("input").each(function(a){a.getAttribute("type").match(b)?(a.addClass("ie6_button"),a.disabled&&a.addClass("ie6_button_disabled")):a.getAttribute("type").match(c)&&(a.addClass("ie6_input"),a.disabled&&a.addClass("ie6_input_disabled"))}),a.all("textarea, select").each(function(a){a.disabled&&a.addClass("ie6_input_disabled")})}},autofocus:function(){!c&&!!a.one("[autofocus]")&&a.one("[autofocus]").focus()},placeholder:function(){!b&&!!a.one("[placeholder]")&&(a.formalize.misc.add_placeholder(),a.all("[placeholder]").each(function(b){function e(){(!b.get("value")||b.get("value")===c)&&b.set("value",c).addClass("placeholder_text")}var c=b.getAttribute("placeholder"),d=b.ancestor("form");b.on("focus",function(){b.get("value")===c&&b.set("value","").removeClass("placeholder_text")}),b.on("blur",function(){a.formalize.misc.add_placeholder()}),d.on("submit",function(){b.get("value")===c&&b.set("value","").removeClass("placeholder_text")}),d.on("reset",function(){setTimeout(a.formalize.misc.add_placeholder,50)})}))}},misc:{add_placeholder:function(){!b&&!!a.one("[placeholder]")&&a.all("[placeholder]").each(function(a){var b=a.getAttribute("placeholder");(!a.get("value")||a.get("value")===b)&&a.set("value",b).addClass("placeholder_text")})}}}},"1.1",{requires:["yui","dom","event"]})
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: typus
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0.rc14
4
+ version: 3.1.0.rc15
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -9,12 +9,12 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-07-13 00:00:00.000000000 +02:00
12
+ date: 2011-07-17 00:00:00.000000000 +02:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: dragonfly
17
- requirement: &2153351380 !ruby/object:Gem::Requirement
17
+ requirement: &2157078540 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ~>
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: '0.9'
23
23
  type: :development
24
24
  prerelease: false
25
- version_requirements: *2153351380
25
+ version_requirements: *2157078540
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: jquery-rails
28
- requirement: &2153350800 !ruby/object:Gem::Requirement
28
+ requirement: &2157078120 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ! '>='
@@ -33,10 +33,10 @@ dependencies:
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
- version_requirements: *2153350800
36
+ version_requirements: *2157078120
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: paperclip
39
- requirement: &2153350220 !ruby/object:Gem::Requirement
39
+ requirement: &2157077640 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - ! '>='
@@ -44,10 +44,10 @@ dependencies:
44
44
  version: '0'
45
45
  type: :development
46
46
  prerelease: false
47
- version_requirements: *2153350220
47
+ version_requirements: *2157077640
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: rack-cache
50
- requirement: &2153349680 !ruby/object:Gem::Requirement
50
+ requirement: &2157077180 !ruby/object:Gem::Requirement
51
51
  none: false
52
52
  requirements:
53
53
  - - ! '>='
@@ -55,10 +55,10 @@ dependencies:
55
55
  version: '0'
56
56
  type: :development
57
57
  prerelease: false
58
- version_requirements: *2153349680
58
+ version_requirements: *2157077180
59
59
  - !ruby/object:Gem::Dependency
60
60
  name: rails-trash
61
- requirement: &2153349040 !ruby/object:Gem::Requirement
61
+ requirement: &2157076680 !ruby/object:Gem::Requirement
62
62
  none: false
63
63
  requirements:
64
64
  - - ~>
@@ -66,10 +66,10 @@ dependencies:
66
66
  version: 1.1.1
67
67
  type: :development
68
68
  prerelease: false
69
- version_requirements: *2153349040
69
+ version_requirements: *2157076680
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: jquery-rails
72
- requirement: &2153348500 !ruby/object:Gem::Requirement
72
+ requirement: &2157076260 !ruby/object:Gem::Requirement
73
73
  none: false
74
74
  requirements:
75
75
  - - ! '>='
@@ -77,10 +77,10 @@ dependencies:
77
77
  version: '0'
78
78
  type: :runtime
79
79
  prerelease: false
80
- version_requirements: *2153348500
80
+ version_requirements: *2157076260
81
81
  - !ruby/object:Gem::Dependency
82
82
  name: kaminari
83
- requirement: &2153347860 !ruby/object:Gem::Requirement
83
+ requirement: &2157075800 !ruby/object:Gem::Requirement
84
84
  none: false
85
85
  requirements:
86
86
  - - ! '>='
@@ -88,10 +88,10 @@ dependencies:
88
88
  version: '0'
89
89
  type: :runtime
90
90
  prerelease: false
91
- version_requirements: *2153347860
91
+ version_requirements: *2157075800
92
92
  - !ruby/object:Gem::Dependency
93
93
  name: sass-rails
94
- requirement: &2153347200 !ruby/object:Gem::Requirement
94
+ requirement: &2157075280 !ruby/object:Gem::Requirement
95
95
  none: false
96
96
  requirements:
97
97
  - - ~>
@@ -99,10 +99,10 @@ dependencies:
99
99
  version: 3.1.0.rc.2
100
100
  type: :runtime
101
101
  prerelease: false
102
- version_requirements: *2153347200
102
+ version_requirements: *2157075280
103
103
  - !ruby/object:Gem::Dependency
104
104
  name: rails
105
- requirement: &2153346560 !ruby/object:Gem::Requirement
105
+ requirement: &2157074680 !ruby/object:Gem::Requirement
106
106
  none: false
107
107
  requirements:
108
108
  - - ~>
@@ -110,7 +110,7 @@ dependencies:
110
110
  version: 3.1.0.rc4
111
111
  type: :runtime
112
112
  prerelease: false
113
- version_requirements: *2153346560
113
+ version_requirements: *2157074680
114
114
  description: Ruby on Rails Admin Panel (Engine) to allow trusted users edit structured
115
115
  content.
116
116
  email:
@@ -128,10 +128,21 @@ files:
128
128
  - app/assets/javascripts/typus/application.js
129
129
  - app/assets/javascripts/typus/jquery.application.js
130
130
  - app/assets/stylesheets/typus.css
131
+ - app/assets/stylesheets/typus/account.css
132
+ - app/assets/stylesheets/typus/actions.css
131
133
  - app/assets/stylesheets/typus/application.css
134
+ - app/assets/stylesheets/typus/content.css
135
+ - app/assets/stylesheets/typus/defaults.css
136
+ - app/assets/stylesheets/typus/errors.css
137
+ - app/assets/stylesheets/typus/footer.css
138
+ - app/assets/stylesheets/typus/forms.css
139
+ - app/assets/stylesheets/typus/hacks.css
140
+ - app/assets/stylesheets/typus/header.css
141
+ - app/assets/stylesheets/typus/layout.css
132
142
  - app/assets/stylesheets/typus/pagination.css
133
143
  - app/assets/stylesheets/typus/reset.css
134
- - app/assets/stylesheets/typus/screen.css
144
+ - app/assets/stylesheets/typus/sidebar.css
145
+ - app/assets/stylesheets/typus/tables.css
135
146
  - app/controllers/admin/account_controller.rb
136
147
  - app/controllers/admin/base_controller.rb
137
148
  - app/controllers/admin/dashboard_controller.rb
@@ -139,7 +150,6 @@ files:
139
150
  - app/controllers/admin/resources_controller.rb
140
151
  - app/controllers/admin/session_controller.rb
141
152
  - app/helpers/admin/base_helper.rb
142
- - app/helpers/admin/dashboard_helper.rb
143
153
  - app/helpers/admin/resources/data_types/belongs_to_helper.rb
144
154
  - app/helpers/admin/resources/data_types/boolean_helper.rb
145
155
  - app/helpers/admin/resources/data_types/date_helper.rb
@@ -167,11 +177,15 @@ files:
167
177
  - app/views/admin/account/forgot_password.html.erb
168
178
  - app/views/admin/account/new.html.erb
169
179
  - app/views/admin/base/user_guide.html.erb
170
- - app/views/admin/dashboard/_applications.html.erb
171
180
  - app/views/admin/dashboard/_sidebar.html.erb
172
181
  - app/views/admin/dashboard/show.html.erb
173
182
  - app/views/admin/dashboard/styles.html.erb
183
+ - app/views/admin/dashboard/widgets/_applications.html.erb
184
+ - app/views/admin/dashboard/widgets/_models.html.erb
185
+ - app/views/admin/dashboard/widgets/_models_extended.html.erb
186
+ - app/views/admin/dashboard/widgets/_resources.html.erb
174
187
  - app/views/admin/mailer/reset_password_link.text.erb
188
+ - app/views/admin/resources/_actions.html.erb
175
189
  - app/views/admin/resources/_edit.html.erb
176
190
  - app/views/admin/resources/_form.html.erb
177
191
  - app/views/admin/resources/_form_javascripts.html.erb
@@ -179,6 +193,8 @@ files:
179
193
  - app/views/admin/resources/_new.html.erb
180
194
  - app/views/admin/resources/_show.html.erb
181
195
  - app/views/admin/resources/edit.html.erb
196
+ - app/views/admin/resources/edit/_actions.html.erb
197
+ - app/views/admin/resources/edit/_rencently_edited.html.erb
182
198
  - app/views/admin/resources/index.html.erb
183
199
  - app/views/admin/resources/new.html.erb
184
200
  - app/views/admin/resources/show.html.erb
@@ -221,30 +237,6 @@ files:
221
237
  - app/views/layouts/admin/base.html.erb
222
238
  - app/views/layouts/admin/headless.html.erb
223
239
  - app/views/layouts/admin/session.html.erb
224
- - config/locales/typus.ca.models.yml
225
- - config/locales/typus.ca.yml
226
- - config/locales/typus.de.models.yml
227
- - config/locales/typus.de.yml
228
- - config/locales/typus.el.models.yml
229
- - config/locales/typus.el.yml
230
- - config/locales/typus.es.models.yml
231
- - config/locales/typus.es.yml
232
- - config/locales/typus.fr.models.yml
233
- - config/locales/typus.fr.yml
234
- - config/locales/typus.hu.models.yml
235
- - config/locales/typus.hu.yml
236
- - config/locales/typus.it.models.yml
237
- - config/locales/typus.it.yml
238
- - config/locales/typus.locale.models.yml.template
239
- - config/locales/typus.locale.yml.template
240
- - config/locales/typus.pt-BR.models.yml
241
- - config/locales/typus.pt-BR.yml
242
- - config/locales/typus.pt-PT.models.yml
243
- - config/locales/typus.pt-PT.yml
244
- - config/locales/typus.ru.models.yml
245
- - config/locales/typus.ru.yml
246
- - config/locales/typus.zh-CN.models.yml
247
- - config/locales/typus.zh-CN.yml
248
240
  - config/routes.rb
249
241
  - lib/generators/templates/config/initializers/typus.rb
250
242
  - lib/generators/templates/config/initializers/typus_authentication.rb
@@ -271,6 +263,7 @@ files:
271
263
  - lib/tasks/typus.rake
272
264
  - lib/typus.rb
273
265
  - lib/typus/authentication/base.rb
266
+ - lib/typus/authentication/devise.rb
274
267
  - lib/typus/authentication/http_basic.rb
275
268
  - lib/typus/authentication/none.rb
276
269
  - lib/typus/authentication/session.rb
@@ -295,12 +288,31 @@ files:
295
288
  - lib/typus/orm/active_record/search.rb
296
289
  - lib/typus/orm/active_record/user/class_methods.rb
297
290
  - lib/typus/orm/active_record/user/instance_methods.rb
291
+ - lib/typus/orm/active_record/user/instance_methods_more.rb
298
292
  - lib/typus/orm/base.rb
299
293
  - lib/typus/orm/mongo/class_methods.rb
300
294
  - lib/typus/regex.rb
301
295
  - lib/typus/resources.rb
302
296
  - lib/typus/version.rb
303
297
  - typus.gemspec
298
+ - vendor/assets/adapt/css/1200.css
299
+ - vendor/assets/adapt/css/1200.min.css
300
+ - vendor/assets/adapt/css/1560.css
301
+ - vendor/assets/adapt/css/1560.min.css
302
+ - vendor/assets/adapt/css/720.css
303
+ - vendor/assets/adapt/css/720.min.css
304
+ - vendor/assets/adapt/css/960.css
305
+ - vendor/assets/adapt/css/960.min.css
306
+ - vendor/assets/adapt/css/fluid.css
307
+ - vendor/assets/adapt/css/fluid.min.css
308
+ - vendor/assets/adapt/css/master.css
309
+ - vendor/assets/adapt/css/mobile.css
310
+ - vendor/assets/adapt/css/mobile.min.css
311
+ - vendor/assets/adapt/css/reset.css
312
+ - vendor/assets/adapt/css/text.css
313
+ - vendor/assets/adapt/images/h1.png
314
+ - vendor/assets/adapt/js/adapt.js
315
+ - vendor/assets/adapt/js/adapt.min.js
304
316
  - vendor/assets/fancybox/blank.gif
305
317
  - vendor/assets/fancybox/fancy_close.png
306
318
  - vendor/assets/fancybox/fancy_loading.png
@@ -326,6 +338,26 @@ files:
326
338
  - vendor/assets/fancybox/jquery.fancybox-1.3.4.js
327
339
  - vendor/assets/fancybox/jquery.fancybox-1.3.4.pack.js
328
340
  - vendor/assets/fancybox/jquery.mousewheel-3.0.4.pack.js
341
+ - vendor/assets/formalize/.gitignore
342
+ - vendor/assets/formalize/css/_formalize.sass
343
+ - vendor/assets/formalize/css/demo.css
344
+ - vendor/assets/formalize/css/formalize.css
345
+ - vendor/assets/formalize/css/reset.css
346
+ - vendor/assets/formalize/css/text.css
347
+ - vendor/assets/formalize/images/button.png
348
+ - vendor/assets/formalize/images/select_arrow.gif
349
+ - vendor/assets/formalize/js/dojo.formalize.js
350
+ - vendor/assets/formalize/js/dojo.formalize.min.js
351
+ - vendor/assets/formalize/js/extjs.formalize.js
352
+ - vendor/assets/formalize/js/extjs.formalize.min.js
353
+ - vendor/assets/formalize/js/jquery.formalize.js
354
+ - vendor/assets/formalize/js/jquery.formalize.min.js
355
+ - vendor/assets/formalize/js/mootools.formalize.js
356
+ - vendor/assets/formalize/js/mootools.formalize.min.js
357
+ - vendor/assets/formalize/js/prototype.formalize.js
358
+ - vendor/assets/formalize/js/prototype.formalize.min.js
359
+ - vendor/assets/formalize/js/yui.formalize.js
360
+ - vendor/assets/formalize/js/yui.formalize.min.js
329
361
  - vendor/assets/jquery-searchField/jquery.searchField.js
330
362
  - vendor/assets/jquery-tokeninput/jquery.tokeninput.js
331
363
  - vendor/assets/jquery-tokeninput/token-input.css