rad_common_interface 0.0.6 → 0.0.7
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/Rakefile +1 -0
- data/app/static/demo/images/img1.jpg +0 -0
- data/app/static/demo/images/img1_200.jpg +0 -0
- data/app/static/demo/images/img1_icon.jpg +0 -0
- data/app/static/demo/images/img1_thumb.jpg +0 -0
- data/app/static/demo/images/img2.jpg +0 -0
- data/app/static/demo/images/img2_200.jpg +0 -0
- data/app/static/demo/images/img2_icon.jpg +0 -0
- data/app/static/demo/images/img2_thumb.jpg +0 -0
- data/app/static/demo/images/img3.jpg +0 -0
- data/app/static/demo/images/img3_200.jpg +0 -0
- data/app/static/demo/images/img3_icon.jpg +0 -0
- data/app/static/demo/images/img3_thumb.jpg +0 -0
- data/app/static/demo/images/img_big.jpg +0 -0
- data/app/static/demo/images/img_big_icon.jpg +0 -0
- data/app/static/demo/images/img_big_thum.jpg +0 -0
- data/app/static/demo/images/video_icon.png +0 -0
- data/app/static/face/attachments.js +85 -0
- data/app/static/face/dialogs.js +189 -0
- data/app/static/face/discussion.js +47 -0
- data/app/static/face/markup.js +53 -0
- data/app/static/face/more.js +33 -0
- data/app/static/face/table.js +24 -0
- data/app/static/face/tabs.js +26 -0
- data/app/static/face.css +8 -0
- data/app/static/face.js +109 -0
- data/app/static/lib/SimpleDialog/SimpleDialog.ContextMenu.js +36 -0
- data/app/static/lib/SimpleDialog/SimpleDialog.Image.js +121 -0
- data/app/static/lib/SimpleDialog/SimpleDialog.Mask.js +76 -0
- data/app/static/lib/SimpleDialog/SimpleDialog.Static.js +0 -0
- data/app/static/lib/SimpleDialog/SimpleDialog.css +12 -0
- data/app/static/lib/SimpleDialog/SimpleDialog.js +158 -0
- data/app/static/lib/ajax_file_uploading.js +33 -0
- data/app/static/themes/default/reset.css +127 -0
- data/app/static/themes/default/style/application.less +51 -0
- data/app/static/themes/default/style/aspects.less +15 -0
- data/app/static/themes/default/style/basic.less +49 -0
- data/app/static/themes/default/style/forms.less +34 -0
- data/app/static/themes/default/style/items.less +43 -0
- data/app/static/themes/default/style/markup.less +16 -0
- data/app/static/themes/default/style/micelaneous.less +10 -0
- data/app/static/themes/default/style/mixins.less +72 -0
- data/app/static/themes/default/style/styles.less +57 -0
- data/app/static/themes/default/style/tools.less +15 -0
- data/app/static/themes/default/style/variables.less +38 -0
- data/app/static/themes/default/style.css +944 -0
- data/app/static/themes/default/style.js +127 -0
- data/app/static/themes/default/style.less +22 -0
- data/app/static/vendor/flext.js +254 -0
- data/app/static/vendor/formalize/formalize.css +311 -0
- data/app/static/vendor/formalize/mootools.formalize.js +163 -0
- data/app/static/vendor/formalize/reset.css +171 -0
- data/app/static/vendor/iFrameFormRequest.js +95 -0
- data/app/static/vendor/mootools-more.js +4185 -0
- data/app/static/vendor/purr/purr.css +43 -0
- data/app/static/vendor/purr/purr.js +308 -0
- data/app/views/face/_attachments_tag.html.haml +17 -0
- data/app/views/rad/face/demo/commons/aspects.html.haml +32 -0
- data/app/views/rad/face/demo/commons/basic.html.haml +86 -0
- data/app/views/rad/face/demo/commons/forms.html.haml +57 -0
- data/app/views/rad/face/demo/commons/items.html.haml +32 -0
- data/app/views/rad/face/demo/commons/style.html.erb +111 -0
- data/app/views/rad/face/demo/dialogs/dialog.js.haml +1 -0
- data/app/views/rad/face/demo/dialogs/dialog_form.html.haml +7 -0
- data/app/views/rad/face/demo/dialogs/dialog_form.js.erb +1 -0
- data/app/views/rad/face/demo/dialogs/inplace/_element.html.haml +3 -0
- data/app/views/rad/face/demo/dialogs/inplace/_form.html.haml +3 -0
- data/app/views/rad/face/demo/dialogs/inplace.js.haml +1 -0
- data/app/views/rad/face/demo/dialogs/inplace_form.js.haml +2 -0
- data/app/views/rad/face/demo/dialogs/show.html.haml +27 -0
- data/app/views/rad/face/demo/helps/help.html.haml +1 -0
- data/app/views/rad/face/demo/helps/index.html.haml +25 -0
- data/app/views/rad/face/demo/layout.html.haml +3 -0
- data/app/views/rad/face/demo/layout.js.haml +11 -0
- data/app/views/rad/face/demo/shared/_comments.html.haml +11 -0
- data/app/views/rad/face/demo/shared/_core_tools.html.haml +6 -0
- data/app/views/rad/face/demo/shared/_line_previews.html.haml +40 -0
- data/app/views/rad/face/demo/shared/_paginator.html.haml +7 -0
- data/app/views/rad/face/demo/shared/_tools.html.haml +25 -0
- data/app/views/rad/face/demo/shared/_top_navigation_bottom.html.haml +34 -0
- data/app/views/rad/face/demo/sites/blog.html.haml +12 -0
- data/app/views/rad/face/demo/sites/home.html.haml +8 -0
- data/app/views/rad/face/demo/sites/post.html.haml +10 -0
- data/app/views/rad/face/demo/sites/style.html.haml +8 -0
- data/app/views/themes/default/application.html.haml +25 -0
- data/app/views/themes/default/basic_list.html.haml +2 -0
- data/app/views/themes/default/basic_list_item.html.haml +5 -0
- data/app/views/themes/default/bottom_panel.html.haml +16 -0
- data/app/views/themes/default/comment.html.haml +20 -0
- data/app/views/themes/default/controls.html.haml +3 -0
- data/app/views/themes/default/demo_metadata.rb +118 -0
- data/app/views/themes/default/details.html.haml +6 -0
- data/app/views/themes/default/discussion.html.haml +7 -0
- data/app/views/themes/default/divider.html.haml +2 -0
- data/app/views/themes/default/forms/errors.html.haml +4 -0
- data/app/views/themes/default/forms/field.html.haml +18 -0
- data/app/views/themes/default/forms/form.html.haml +4 -0
- data/app/views/themes/default/forms/line.html.haml +8 -0
- data/app/views/themes/default/help.html.haml +3 -0
- data/app/views/themes/default/html.html.haml +1 -0
- data/app/views/themes/default/index.html.haml +6 -0
- data/app/views/themes/default/item.html.haml +12 -0
- data/app/views/themes/default/layout_templates/dashboard.html.haml +1 -0
- data/app/views/themes/default/layout_templates/default.html.haml +22 -0
- data/app/views/themes/default/line.html.haml +21 -0
- data/app/views/themes/default/message.html.haml +2 -0
- data/app/views/themes/default/more.html.haml +8 -0
- data/app/views/themes/default/narrow.html.haml +2 -0
- data/app/views/themes/default/navigation.html.haml +16 -0
- data/app/views/themes/default/paginator.html.haml +8 -0
- data/app/views/themes/default/shared/details.html.haml +17 -0
- data/app/views/themes/default/table.html.haml +9 -0
- data/app/views/themes/default/table_row.html.haml +4 -0
- data/app/views/themes/default/tabs.html.haml +27 -0
- data/app/views/themes/default/tag_selector.html.haml +10 -0
- data/app/views/themes/default/text.html.haml +4 -0
- data/app/views/themes/default/thumb.html.haml +10 -0
- data/app/views/themes/default/title.html.haml +3 -0
- data/app/views/themes/default/tool.html.haml +5 -0
- data/app/views/themes/default/toolbar.html.haml +16 -0
- data/app/views/themes/default/top_panel.html.haml +18 -0
- metadata +153 -25
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
.purr-wrapper{
|
|
2
|
+
margin:10px;
|
|
3
|
+
}
|
|
4
|
+
.purr-alert{
|
|
5
|
+
margin-bottom:10px;
|
|
6
|
+
padding:10px;
|
|
7
|
+
background:#000;
|
|
8
|
+
font-size:13px;
|
|
9
|
+
font-weight:bold;
|
|
10
|
+
color:#FFF;
|
|
11
|
+
-moz-border-radius:5px;
|
|
12
|
+
-webkit-border-radius:5px;
|
|
13
|
+
-moz-box-shadow: 0 0 10px rgba(255,255,0,.25);
|
|
14
|
+
width:300px;
|
|
15
|
+
}
|
|
16
|
+
/*.purr-alert button{
|
|
17
|
+
font-size:10px;
|
|
18
|
+
margin:0 5px;
|
|
19
|
+
}
|
|
20
|
+
*/
|
|
21
|
+
.purr-alert.error{
|
|
22
|
+
color:#F55;
|
|
23
|
+
}
|
|
24
|
+
/*.purr-alert.success{
|
|
25
|
+
color:#5F5;
|
|
26
|
+
padding-left:30px;
|
|
27
|
+
background:url(../images/success.png) no-repeat #000 7px 10px;
|
|
28
|
+
width:280px;
|
|
29
|
+
}
|
|
30
|
+
.purr-alert.notice{
|
|
31
|
+
color:#99F;
|
|
32
|
+
padding-left:30px;
|
|
33
|
+
background:url(../images/notice.png) no-repeat #000 7px 10px;
|
|
34
|
+
width:280px;
|
|
35
|
+
}
|
|
36
|
+
*/
|
|
37
|
+
/*.purr-element-alert{
|
|
38
|
+
width:200px;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.purr-button-wrapper{
|
|
42
|
+
text-align:center;
|
|
43
|
+
}*/
|
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
/*
|
|
2
|
+
---
|
|
3
|
+
script: purr.js
|
|
4
|
+
|
|
5
|
+
description: Class to create growl-style popup notifications.
|
|
6
|
+
|
|
7
|
+
license: MIT-style
|
|
8
|
+
|
|
9
|
+
authors: [atom smith]
|
|
10
|
+
|
|
11
|
+
requires:
|
|
12
|
+
- core/1.3: [Core, Browser, Array, Function, Number, String, Hash, Event, Class.Extras, Element.Event, Element.Style, Element.Dimensions, Fx.CSS, FX.Tween, Fx.Morph]
|
|
13
|
+
|
|
14
|
+
provides: [Purr, Element.alert]
|
|
15
|
+
...
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
var Purr = new Class({
|
|
20
|
+
|
|
21
|
+
'options': {
|
|
22
|
+
'mode': 'top',
|
|
23
|
+
'position': 'left',
|
|
24
|
+
'elementAlertClass': 'purr-element-alert',
|
|
25
|
+
'elements': {
|
|
26
|
+
'wrapper': 'div',
|
|
27
|
+
'alert': 'div',
|
|
28
|
+
'buttonWrapper': 'div',
|
|
29
|
+
'button': 'button'
|
|
30
|
+
},
|
|
31
|
+
'elementOptions': {
|
|
32
|
+
'wrapper': {
|
|
33
|
+
'styles': {
|
|
34
|
+
'position': 'fixed',
|
|
35
|
+
'z-index': '9999'
|
|
36
|
+
},
|
|
37
|
+
'class': 'purr-wrapper'
|
|
38
|
+
},
|
|
39
|
+
'alert': {
|
|
40
|
+
'class': 'purr-alert',
|
|
41
|
+
'styles': {
|
|
42
|
+
'opacity': '.85'
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
'buttonWrapper': {
|
|
46
|
+
'class': 'purr-button-wrapper'
|
|
47
|
+
},
|
|
48
|
+
'button': {
|
|
49
|
+
'class': 'purr-button'
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
'alert': {
|
|
53
|
+
'buttons': [],
|
|
54
|
+
'clickDismiss': true,
|
|
55
|
+
'hoverWait': true,
|
|
56
|
+
'hideAfter': 5000,
|
|
57
|
+
'fx': {
|
|
58
|
+
'duration': 500
|
|
59
|
+
},
|
|
60
|
+
'highlightRepeat': false,
|
|
61
|
+
'highlight': { // false to disable highlighting
|
|
62
|
+
'start': '#FF0',
|
|
63
|
+
'end': false
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
|
|
68
|
+
'Implements': [Options, Events, Chain],
|
|
69
|
+
|
|
70
|
+
'initialize': function(options){
|
|
71
|
+
this.setOptions(options);
|
|
72
|
+
this.createWrapper();
|
|
73
|
+
return this;
|
|
74
|
+
},
|
|
75
|
+
|
|
76
|
+
'bindAlert': function(){
|
|
77
|
+
return this.alert.bind(this);
|
|
78
|
+
},
|
|
79
|
+
|
|
80
|
+
'createWrapper': function(){
|
|
81
|
+
this.wrapper = new Element(this.options.elements.wrapper, this.options.elementOptions.wrapper);
|
|
82
|
+
if(this.options.mode == 'top')
|
|
83
|
+
{
|
|
84
|
+
this.wrapper.setStyle('top', 0);
|
|
85
|
+
}
|
|
86
|
+
else
|
|
87
|
+
{
|
|
88
|
+
this.wrapper.setStyle('bottom', 0);
|
|
89
|
+
}
|
|
90
|
+
document.id(document.body).grab(this.wrapper);
|
|
91
|
+
this.positionWrapper(this.options.position);
|
|
92
|
+
},
|
|
93
|
+
|
|
94
|
+
'positionWrapper': function(position){
|
|
95
|
+
if(typeOf(position) == 'object')
|
|
96
|
+
{
|
|
97
|
+
|
|
98
|
+
var wrapperCoords = this.getWrapperCoords();
|
|
99
|
+
|
|
100
|
+
this.wrapper.setStyles({
|
|
101
|
+
'bottom': '',
|
|
102
|
+
'left': position.x,
|
|
103
|
+
'top': position.y - wrapperCoords.height,
|
|
104
|
+
'position': 'absolute'
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
else if(position == 'left')
|
|
108
|
+
{
|
|
109
|
+
this.wrapper.setStyle('left', 0);
|
|
110
|
+
}
|
|
111
|
+
else if(position == 'right')
|
|
112
|
+
{
|
|
113
|
+
this.wrapper.setStyle('right', 0);
|
|
114
|
+
}
|
|
115
|
+
else
|
|
116
|
+
{
|
|
117
|
+
this.wrapper.setStyle('left', (window.innerWidth / 2) - (this.getWrapperCoords().width / 2));
|
|
118
|
+
}
|
|
119
|
+
return this;
|
|
120
|
+
},
|
|
121
|
+
|
|
122
|
+
'getWrapperCoords': function(){
|
|
123
|
+
this.wrapper.setStyle('visibility', 'hidden');
|
|
124
|
+
var measurer = this.alert('need something in here to measure');
|
|
125
|
+
var coords = this.wrapper.getCoordinates();
|
|
126
|
+
measurer.destroy();
|
|
127
|
+
this.wrapper.setStyle('visibility','');
|
|
128
|
+
return coords;
|
|
129
|
+
},
|
|
130
|
+
|
|
131
|
+
'alert': function(msg, options){
|
|
132
|
+
|
|
133
|
+
options = Object.merge({}, this.options.alert, options || {});
|
|
134
|
+
|
|
135
|
+
var alert = new Element(this.options.elements.alert, this.options.elementOptions.alert);
|
|
136
|
+
|
|
137
|
+
if(typeOf(msg) == 'string')
|
|
138
|
+
{
|
|
139
|
+
alert.set('html', msg);
|
|
140
|
+
}
|
|
141
|
+
else if(typeOf(msg) == 'element')
|
|
142
|
+
{
|
|
143
|
+
alert.grab(msg);
|
|
144
|
+
}
|
|
145
|
+
else if(typeOf(msg) == 'array')
|
|
146
|
+
{
|
|
147
|
+
var alerts = [];
|
|
148
|
+
msg.each(function(m){
|
|
149
|
+
alerts.push(this.alert(m, options));
|
|
150
|
+
}, this);
|
|
151
|
+
return alerts;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
alert.store('options', options);
|
|
155
|
+
|
|
156
|
+
if(options.buttons.length > 0)
|
|
157
|
+
{
|
|
158
|
+
options.clickDismiss = false;
|
|
159
|
+
options.hideAfter = false;
|
|
160
|
+
options.hoverWait = false;
|
|
161
|
+
var buttonWrapper = new Element(this.options.elements.buttonWrapper, this.options.elementOptions.buttonWrapper);
|
|
162
|
+
alert.grab(buttonWrapper);
|
|
163
|
+
options.buttons.each(function(button){
|
|
164
|
+
if(button.text !== undefined)
|
|
165
|
+
{
|
|
166
|
+
var callbackButton = new Element(this.options.elements.button, this.options.elementOptions.button);
|
|
167
|
+
callbackButton.set('html', button.text);
|
|
168
|
+
if(button.callback !== undefined)
|
|
169
|
+
{
|
|
170
|
+
callbackButton.addEvent('click', button.callback.pass(alert));
|
|
171
|
+
}
|
|
172
|
+
if(button.dismiss !== undefined && button.dismiss)
|
|
173
|
+
{
|
|
174
|
+
callbackButton.addEvent('click', this.dismiss.pass(alert, this));
|
|
175
|
+
}
|
|
176
|
+
buttonWrapper.grab(callbackButton);
|
|
177
|
+
}
|
|
178
|
+
}, this);
|
|
179
|
+
}
|
|
180
|
+
if(options.className !== undefined)
|
|
181
|
+
{
|
|
182
|
+
alert.addClass(options.className);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
this.wrapper.grab(alert, (this.options.mode == 'top') ? 'bottom' : 'top');
|
|
186
|
+
|
|
187
|
+
var fx = Object.merge(this.options.alert.fx, options.fx);
|
|
188
|
+
var alertFx = new Fx.Morph(alert, fx);
|
|
189
|
+
alert.store('fx', alertFx);
|
|
190
|
+
this.fadeIn(alert);
|
|
191
|
+
|
|
192
|
+
if(options.highlight)
|
|
193
|
+
{
|
|
194
|
+
alertFx.addEvent('complete', function(){
|
|
195
|
+
alert.highlight(options.highlight.start, options.highlight.end);
|
|
196
|
+
if(options.highlightRepeat)
|
|
197
|
+
{
|
|
198
|
+
alert.highlight.periodical(options.highlightRepeat, alert, [options.highlight.start, options.highlight.end]);
|
|
199
|
+
}
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
if(options.hideAfter)
|
|
203
|
+
{
|
|
204
|
+
this.dismiss(alert);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
if(options.clickDismiss)
|
|
208
|
+
{
|
|
209
|
+
alert.addEvent('click', function(){
|
|
210
|
+
this.holdUp = false;
|
|
211
|
+
this.dismiss(alert, true);
|
|
212
|
+
}.bind(this));
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
if(options.hoverWait)
|
|
216
|
+
{
|
|
217
|
+
alert.addEvents({
|
|
218
|
+
'mouseenter': function(){
|
|
219
|
+
this.holdUp = true;
|
|
220
|
+
}.bind(this),
|
|
221
|
+
'mouseleave': function(){
|
|
222
|
+
this.holdUp = false;
|
|
223
|
+
}.bind(this)
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
return alert;
|
|
228
|
+
},
|
|
229
|
+
|
|
230
|
+
'fadeIn': function(alert){
|
|
231
|
+
var alertFx = alert.retrieve('fx');
|
|
232
|
+
alertFx.set({
|
|
233
|
+
'opacity': 0
|
|
234
|
+
});
|
|
235
|
+
alertFx.start({
|
|
236
|
+
'opacity': [this.options.elementOptions.alert.styles.opacity, '.9'].pick()
|
|
237
|
+
});
|
|
238
|
+
},
|
|
239
|
+
|
|
240
|
+
'dismiss': function(alert, now){
|
|
241
|
+
now = now || false;
|
|
242
|
+
var options = alert.retrieve('options');
|
|
243
|
+
if(now)
|
|
244
|
+
{
|
|
245
|
+
this.fadeOut(alert);
|
|
246
|
+
}
|
|
247
|
+
else
|
|
248
|
+
{
|
|
249
|
+
this.fadeOut.delay(options.hideAfter, this, alert);
|
|
250
|
+
}
|
|
251
|
+
},
|
|
252
|
+
|
|
253
|
+
'fadeOut': function(alert){
|
|
254
|
+
if(this.holdUp)
|
|
255
|
+
{
|
|
256
|
+
this.dismiss.delay(100, this, [alert, true]);
|
|
257
|
+
return null;
|
|
258
|
+
}
|
|
259
|
+
var alertFx = alert.retrieve('fx');
|
|
260
|
+
if(!alertFx)
|
|
261
|
+
{
|
|
262
|
+
return null;
|
|
263
|
+
}
|
|
264
|
+
var to = {
|
|
265
|
+
'opacity': 0
|
|
266
|
+
};
|
|
267
|
+
if(this.options.mode == 'top')
|
|
268
|
+
{
|
|
269
|
+
to['margin-top'] = '-'+alert.offsetHeight+'px';
|
|
270
|
+
}
|
|
271
|
+
else
|
|
272
|
+
{
|
|
273
|
+
to['margin-bottom'] = '-'+alert.offsetHeight+'px';
|
|
274
|
+
}
|
|
275
|
+
alertFx.start(to);
|
|
276
|
+
alertFx.addEvent('complete', function(){
|
|
277
|
+
alert.destroy();
|
|
278
|
+
});
|
|
279
|
+
}
|
|
280
|
+
});
|
|
281
|
+
|
|
282
|
+
Element.implement({
|
|
283
|
+
|
|
284
|
+
'alert': function(msg, options){
|
|
285
|
+
var alert = this.retrieve('alert');
|
|
286
|
+
if(!alert)
|
|
287
|
+
{
|
|
288
|
+
options = options || {
|
|
289
|
+
'mode':'top'
|
|
290
|
+
};
|
|
291
|
+
alert = new Purr(options);
|
|
292
|
+
this.store('alert', alert);
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
var coords = this.getCoordinates();
|
|
296
|
+
|
|
297
|
+
alert.alert(msg, options);
|
|
298
|
+
|
|
299
|
+
alert.wrapper.setStyles({
|
|
300
|
+
'bottom': '',
|
|
301
|
+
'left': (coords.left - (alert.wrapper.getWidth() / 2)) + (this.getWidth() / 2),
|
|
302
|
+
'top': coords.top - (alert.wrapper.getHeight()),
|
|
303
|
+
'position': 'absolute'
|
|
304
|
+
});
|
|
305
|
+
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
.the_attachments
|
|
2
|
+
- if object.value?
|
|
3
|
+
- object.value.each do |file|
|
|
4
|
+
.l_item
|
|
5
|
+
%a{href: file.url}= file.name
|
|
6
|
+
%a{href: '#', class: 'l_remove_button'}= t(:remove_attachment)
|
|
7
|
+
= hidden_field_tag object.name, file.name
|
|
8
|
+
.css_clear
|
|
9
|
+
|
|
10
|
+
%textarea.l_file_field_template.hidden
|
|
11
|
+
.l_item
|
|
12
|
+
= file_field_tag object.name
|
|
13
|
+
.l_attachment_stub{style: 'display: none'}
|
|
14
|
+
%a{href: '#', class: 'l_remove_button', style: 'display: none;'}= t(:remove_attachment)
|
|
15
|
+
.css_clear
|
|
16
|
+
|
|
17
|
+
.css_clear
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
= render '/rad/face/demo/shared/top_navigation_bottom'
|
|
2
|
+
|
|
3
|
+
= render '/rad/face/demo/shared/tools'
|
|
4
|
+
|
|
5
|
+
- content_for :aspects do
|
|
6
|
+
= b.divider "Controls"
|
|
7
|
+
- b.controls id: "controls_id", class: "controls_class" do |o|
|
|
8
|
+
- o.left do |a|
|
|
9
|
+
- a.add link_to('Compose', "#", class: 'icn_compose')
|
|
10
|
+
- a.add link_to('Move', "#")
|
|
11
|
+
- a.add link_to('Delete', "#")
|
|
12
|
+
|
|
13
|
+
- o.right do |a|
|
|
14
|
+
- a.add link_to('Archive', "#", class: 'icn_compose')
|
|
15
|
+
- a.add link_to('Filter', "#")
|
|
16
|
+
|
|
17
|
+
= b.divider "Tags and Details"
|
|
18
|
+
- b.details id: "details_id", class: "details_class" do |o|
|
|
19
|
+
- o.tags samples.tags
|
|
20
|
+
- o.details samples.details
|
|
21
|
+
|
|
22
|
+
= b.divider "Comments"
|
|
23
|
+
= render '/rad/face/demo/shared/comments'
|
|
24
|
+
|
|
25
|
+
= b.divider "Visibility Tags"
|
|
26
|
+
- visibility_tags = [['owner', 'm_owner_visibility'], ['member', 'm_member_visibility']].collect{|t, v| tag :div, t, class: v}
|
|
27
|
+
- item_type = [tag(:div, 'Note', class: 'm_item_type')]
|
|
28
|
+
- b.details do |o|
|
|
29
|
+
- o.tags samples.tags + visibility_tags + item_type
|
|
30
|
+
|
|
31
|
+
= b.divider "Paginator"
|
|
32
|
+
= render '/rad/face/demo/shared/paginator'
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
= render '/rad/face/demo/shared/top_navigation_bottom'
|
|
2
|
+
|
|
3
|
+
= render '/rad/face/demo/shared/tools'
|
|
4
|
+
|
|
5
|
+
- content_for :top_aspects do
|
|
6
|
+
= b.divider "Messages"
|
|
7
|
+
|
|
8
|
+
= b.message 'Info message'
|
|
9
|
+
- b.message type: :error do
|
|
10
|
+
Error Message
|
|
11
|
+
|
|
12
|
+
- content_for :bottom_aspects do
|
|
13
|
+
= b.divider "Custom content"
|
|
14
|
+
|
|
15
|
+
= render themed_partial('/html')
|
|
16
|
+
|
|
17
|
+
= b.divider "Title"
|
|
18
|
+
= b.title "The Title", id: "title_id", class: "title_class"
|
|
19
|
+
|
|
20
|
+
= b.divider "Tabs"
|
|
21
|
+
|
|
22
|
+
- b.tabs id: "tabs_id", class: "tabs_class" do |o|
|
|
23
|
+
- samples.tabs.each do |name|
|
|
24
|
+
- if samples.active_tab == name
|
|
25
|
+
- o.add name: name, active: true
|
|
26
|
+
- else
|
|
27
|
+
- o.add name: link_to(name, "#")
|
|
28
|
+
|
|
29
|
+
= b.divider "Tabs with content"
|
|
30
|
+
|
|
31
|
+
- b.tabs id: "tabs_id", class: "tabs_class" do |o|
|
|
32
|
+
- o.add name: 'Contacts', active: true do
|
|
33
|
+
Contacts ...
|
|
34
|
+
- o.add name: 'Import' do
|
|
35
|
+
Import ...
|
|
36
|
+
- o.add name: 'Cathegories' do
|
|
37
|
+
Cathegories ...
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
= b.divider "Toolbar"
|
|
41
|
+
|
|
42
|
+
- b.toolbar id: "toolbar_id", class: "toolbar_class" do |o|
|
|
43
|
+
- o.left do |a|
|
|
44
|
+
- a.add link_to('Compose', "#", class: 'icn_compose')
|
|
45
|
+
- a.add link_to('Move', "#")
|
|
46
|
+
- a.add link_to('Delete', "#")
|
|
47
|
+
|
|
48
|
+
- o.right do |a|
|
|
49
|
+
- a.add link_to('Archive', "#", class: 'icn_compose')
|
|
50
|
+
- a.add link_to('Filter', "#")
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
= b.divider "List"
|
|
54
|
+
|
|
55
|
+
- b.basic_list id: "list_id", class: "list_class" do |o|
|
|
56
|
+
- o.content do
|
|
57
|
+
= b.basic_list_item "First Line", id: "list_id_1", class: "list_class_1"
|
|
58
|
+
= b.basic_list_item "Second Line", check_box: check_box_tag(:tmp), id: "list_id_2", class: "list_class_2"
|
|
59
|
+
|
|
60
|
+
= b.divider "Table"
|
|
61
|
+
|
|
62
|
+
- b.table id: "table_id", class: "table_class", on: 3 do |o|
|
|
63
|
+
- o.head ["Name", "Position", "Actions"]
|
|
64
|
+
- o.rows do |a|
|
|
65
|
+
- a.add b.table_row(["Alex", "Manager", "<a href='#'>Delete</a>"], id: "table_id_1", class: "table_class_1")
|
|
66
|
+
- a.add b.table_row(["Bob", "Worker", "<a href='#'>Delete</a>"])
|
|
67
|
+
- a.add b.table_row(["Fred", "Executer", "<a href='#'>Delete</a>"])
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
= b.divider "Table without header"
|
|
71
|
+
|
|
72
|
+
- b.table do |o|
|
|
73
|
+
- o.rows do |a|
|
|
74
|
+
= a.add b.table_row(["Alex", "Manager", "<a href='#'>Delete</a>"])
|
|
75
|
+
- a.add do
|
|
76
|
+
- b.table_row do |o|
|
|
77
|
+
- o.content do |a|
|
|
78
|
+
- a.add "Fred"
|
|
79
|
+
- a.add "Executer"
|
|
80
|
+
- a.add "<a href='#'>Delete</a>"
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
= b.divider "Text"
|
|
84
|
+
|
|
85
|
+
- b.text do
|
|
86
|
+
Some Text <a href='#'>Some Link</a>
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
= render '/rad/face/demo/shared/top_navigation_bottom'
|
|
2
|
+
|
|
3
|
+
= render '/rad/face/demo/shared/tools'
|
|
4
|
+
|
|
5
|
+
= b.divider "Form"
|
|
6
|
+
|
|
7
|
+
- b.form_tag id: 'basic_form_tag', action: '/some_action' do |f|
|
|
8
|
+
= f.error_messages "First", "Second"
|
|
9
|
+
|
|
10
|
+
= f.hidden_field_tag :hidden_field, "value"
|
|
11
|
+
|
|
12
|
+
= f.check_box_tag :check_box, true, label: ""
|
|
13
|
+
= f.text_field_tag :text_field1, "Some Name", label: "Field with error", errors: ["Error 1", "Error 2"]
|
|
14
|
+
= f.text_field_tag :text_field2, "Some Name", label: "Type something here", description: "Add something valuable, (its description for this text_field)"
|
|
15
|
+
= f.text_area_tag :text_area, "Some text"
|
|
16
|
+
= f.text_field_tag :text_field3, "", required: true, label: "Required field"
|
|
17
|
+
|
|
18
|
+
- f.form_field label: "Visibility" do
|
|
19
|
+
= %w{one two three}.collect{|n| radio_button_tag('radio_button', n, theme: false) + label_tag("group_#{n}", n)}.join(' ')
|
|
20
|
+
|
|
21
|
+
- b.more id: 'stub', name: "..." do
|
|
22
|
+
= f.text_field_tag :text_field4, "", label: "Extra Fields"
|
|
23
|
+
|
|
24
|
+
= f.line submit_tag("Ok"), link_to("Cancel", "#")
|
|
25
|
+
|
|
26
|
+
= b.divider "Form for"
|
|
27
|
+
|
|
28
|
+
- b.form_for :model, samples.model, id: 'basic_form_for', action: '/some_action' do |f|
|
|
29
|
+
= f.error_messages
|
|
30
|
+
|
|
31
|
+
= f.hidden_field_tag :somehidden_field, "value"
|
|
32
|
+
= f.hidden_field :name
|
|
33
|
+
|
|
34
|
+
= f.check_box :active, label: ""
|
|
35
|
+
= f.text_field :name, label: "Type something here", description: "Add something valuable, (its description for this text_field)"
|
|
36
|
+
= f.text_area :body, label: false
|
|
37
|
+
|
|
38
|
+
= f.text_field_tag :name, "value"
|
|
39
|
+
|
|
40
|
+
= f.line f.submit("Ok"), link_to("Cancel", "#")
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
= b.divider "Form with Attachments"
|
|
44
|
+
|
|
45
|
+
- model = {files_as_attachments1: [{name: 'image1.jpg', url: '/some_path/image1.jpg'}, {name: 'image2.jpg', url: '/some_path/image2.jpg'}], files_as_attachments2: []}
|
|
46
|
+
- b.form_for :model, model do |f|
|
|
47
|
+
= f.text_field :name, label: "Name"
|
|
48
|
+
|
|
49
|
+
= f.line
|
|
50
|
+
|
|
51
|
+
= f.attachments :files_as_attachments1, label: false
|
|
52
|
+
|
|
53
|
+
= f.line
|
|
54
|
+
|
|
55
|
+
= f.attachments :files_as_attachments2, label: 'Images'
|
|
56
|
+
|
|
57
|
+
= f.line submit_tag("Ok"), link_to("Cancel", "#")
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
= render '/rad/face/demo/shared/top_navigation_bottom'
|
|
2
|
+
|
|
3
|
+
= render '/rad/face/demo/shared/tools'
|
|
4
|
+
|
|
5
|
+
= b.divider "Item"
|
|
6
|
+
- b.item id: "item_id", class: "item_class" do |o|
|
|
7
|
+
- o.name "Terminator movie series"
|
|
8
|
+
- o.text samples.text
|
|
9
|
+
- o.controls samples.controls
|
|
10
|
+
- o.attachments samples.attachments
|
|
11
|
+
- o.tags samples.tags
|
|
12
|
+
- o.details samples.details
|
|
13
|
+
|
|
14
|
+
= b.divider "Thumb"
|
|
15
|
+
- 10.times do
|
|
16
|
+
- attachment = random_attachment
|
|
17
|
+
- b.thumb id: 'thumb_id', class: "thumb_class" do |o|
|
|
18
|
+
- o.controls samples.controls
|
|
19
|
+
- o.image attachment
|
|
20
|
+
- o.url attachment.url
|
|
21
|
+
- o.name 'Picture 1.jpg'
|
|
22
|
+
.css_clear
|
|
23
|
+
|
|
24
|
+
= b.divider "Line"
|
|
25
|
+
- b.line id: "line_id", class: "line_class" do |o|
|
|
26
|
+
- o.name samples.name
|
|
27
|
+
- o.image samples.attachments.first
|
|
28
|
+
- o.url samples.attachments.first.url
|
|
29
|
+
- o.text samples.detail_text
|
|
30
|
+
- o.controls samples.controls
|
|
31
|
+
- o.tags samples.tags
|
|
32
|
+
- o.details samples.details
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
<% b.text do %>
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
<h1>Heading, Paragraphs, Line Breaks, Links, Bold, Italic</h1>
|
|
5
|
+
<h1>Heading 1</h1>
|
|
6
|
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
|
|
7
|
+
<h2>Heading 2</h2>
|
|
8
|
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
|
|
9
|
+
<h3>Heading 3</h3>
|
|
10
|
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
|
|
11
|
+
<p>The Terminator (1984) <a href='#'>More at IMDbPro</a></p>
|
|
12
|
+
<p>In the Year of Darkness, 2029, the rulers of this planet devised the ultimate plan. They would reshape the Future by changing the Past. The plan required something that felt no pity. No pain. No fear. Something unstoppable. <b>They created 'THE TERMINATOR'</b>
|
|
13
|
+
<br/>The thing that won't die, in the <i>nightmare that won't end</i>. A human-looking, apparently unstoppable cyborg is sent from the future to kill Sarah Connor; Kyle Reese is sent to stop it.</p>
|
|
14
|
+
<p>Your future is in his hands.</p>
|
|
15
|
+
<h3>Unsorted list</h3>
|
|
16
|
+
<ul>
|
|
17
|
+
<li>Blandit in, interdum a</li>
|
|
18
|
+
<li>Ultrices non lectus</li>
|
|
19
|
+
<li>Nunc id odio</li>
|
|
20
|
+
<li>Fusce ultricies</li>
|
|
21
|
+
</ul>
|
|
22
|
+
<h3>Ordered list</h3>
|
|
23
|
+
<ol>
|
|
24
|
+
<li>Blandit in, interdum a</li>
|
|
25
|
+
<li>Ultrices non lectus</li>
|
|
26
|
+
<li>Nunc id odio</li>
|
|
27
|
+
<li>Fusce ultricies</li>
|
|
28
|
+
</ol>
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
<h1>Images inside links should be modified to ImageBox</h1>
|
|
32
|
+
<a href="<%= url_for("/static/demo/images/img1.jpg") %>">
|
|
33
|
+
<img src="<%= url_for("/static/demo/images/img1_icon.jpg") %>"></img>
|
|
34
|
+
</a>
|
|
35
|
+
<a href="<%= url_for("/static/demo/images/img2.jpg") %>">
|
|
36
|
+
<img src="<%= url_for("/static/demo/images/img2_icon.jpg") %>"></img>
|
|
37
|
+
</a>
|
|
38
|
+
<a href="<%= url_for("/static/demo/images/img3.jpg") %>">
|
|
39
|
+
<img src="<%= url_for("/static/demo/images/img3_icon.jpg") %>"></img>
|
|
40
|
+
</a>
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
<h1>Left and right styles for images</h1>
|
|
44
|
+
<div class='left'>
|
|
45
|
+
<a href="<%= url_for("/static/demo/images/img1.jpg") %>">
|
|
46
|
+
<img src="<%= url_for("/static/demo/images/img1_icon.jpg") %>"></img>
|
|
47
|
+
</a>
|
|
48
|
+
</div>
|
|
49
|
+
<p>In the Year of Darkness, 2029, the rulers of this planet devised the ultimate plan. They would reshape the Future by changing the Past. The plan required something that felt no pity. No pain. No fear. Something unstoppable. They created 'THE TERMINATOR'</p>
|
|
50
|
+
<div class='right'>
|
|
51
|
+
<a href="<%= url_for("/static/demo/images/img2.jpg") %>">
|
|
52
|
+
<img src="<%= url_for("/static/demo/images/img2_icon.jpg") %>"></img>
|
|
53
|
+
</a>
|
|
54
|
+
</div>
|
|
55
|
+
<p>The thing that won't die, in the nightmare that won't end. A human-looking, apparently unstoppable cyborg is sent from the future to kill Sarah Connor; Kyle Reese is sent to stop it.</p>
|
|
56
|
+
<p>In the Year of Darkness, 2029, the rulers of this planet devised the ultimate plan. They would reshape the Future by changing the Past. The plan required something that felt no pity. No pain. No fear. Something unstoppable. They created 'THE TERMINATOR'
|
|
57
|
+
<br/>The thing that won't die, in the nightmare that won't end. A human-looking, apparently unstoppable cyborg is sent from the future to kill Sarah Connor; Kyle Reese is sent to stop it.</p>
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
<h1>Left and right styles for arbitrary content</h1>
|
|
61
|
+
<div class='left'>
|
|
62
|
+
<b>The Terminator (1984) <a href='#'>More at IMDbPro</a> <br/> A human-looking, apparently unstoppable cyborg.</b>
|
|
63
|
+
</div>
|
|
64
|
+
<p>In the Year of Darkness, 2029, the rulers of this planet devised the ultimate plan. They would reshape the Future by changing the Past. The plan required something that felt no pity. No pain. No fear. Something unstoppable. They created 'THE TERMINATOR'</p>
|
|
65
|
+
<div class='right'>
|
|
66
|
+
<b>The Terminator (1984) <a href='#'>More at IMDbPro</a> <br/> A human-looking, apparently unstoppable cyborg.</b>
|
|
67
|
+
</div>
|
|
68
|
+
<p>The thing that won't die, in the nightmare that won't end. A human-looking, apparently unstoppable cyborg is sent from the future to kill Sarah Connor; Kyle Reese is sent to stop it.</p>
|
|
69
|
+
<p>In the Year of Darkness, 2029, the rulers of this planet devised the ultimate plan. They would reshape the Future by changing the Past. The plan required something that felt no pity. No pain. No fear. Something unstoppable. They created 'THE TERMINATOR'
|
|
70
|
+
<br/>The thing that won't die, in the nightmare that won't end. A human-looking, apparently unstoppable cyborg is sent from the future to kill Sarah Connor; Kyle Reese is sent to stop it.</p>
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
<h1>Image by default should be alligned to the Left</h1>
|
|
74
|
+
<img src="<%= url_for("/static/demo/images/img1_thumb.jpg") %>"></img>
|
|
75
|
+
<p>In the Year of Darkness, 2029, the rulers of this planet devised the ultimate plan. They would reshape the Future by changing the Past. The plan required something that felt no pity. No pain. No fear. Something unstoppable. They created 'THE TERMINATOR'</p>
|
|
76
|
+
<p>The thing that won't die, in the nightmare that won't end. A human-looking, apparently unstoppable cyborg is sent from the future to kill Sarah Connor; Kyle Reese is sent to stop it.</p>
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
<h1>Image by default should be alligned to the Left, even if it wrapped (from error)</h1>
|
|
80
|
+
<img src="<%= url_for("/static/demo/images/img1_thumb.jpg") %>"></img>
|
|
81
|
+
<p>
|
|
82
|
+
In the Year of Darkness, 2029, the rulers of this planet devised the ultimate plan. They would reshape the Future by changing the Past. The plan required something that felt no pity. No pain. No fear. Something unstoppable. They created 'THE TERMINATOR'
|
|
83
|
+
</p>
|
|
84
|
+
<p>The thing that won't die, in the nightmare that won't end. A human-looking, apparently unstoppable cyborg is sent from the future to kill Sarah Connor; Kyle Reese is sent to stop it.</p>
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
<h1>Image by default should be alligned to the Left</h1>
|
|
88
|
+
<a href="http://www.youtube.com/watch?v=pdPy4crWuCA" title="Zombieland Trailer" class='_video'>
|
|
89
|
+
<img src="<%= url_for("/static/demo/images/video_icon.png") %>"></img>
|
|
90
|
+
</a>
|
|
91
|
+
<p>In the Year of Darkness, 2029, the rulers of this planet devised the ultimate plan. They would reshape the Future by changing the Past. The plan required something that felt no pity. No pain. No fear. Something unstoppable. They created 'THE TERMINATOR'</p>
|
|
92
|
+
<p>The thing that won't die, in the nightmare that won't end. A human-looking, apparently unstoppable cyborg is sent from the future to kill Sarah Connor; Kyle Reese is sent to stop it.</p>
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
<h1>Clear and Space</h1>
|
|
96
|
+
<div class='left'>This text splitted</div> <div class='clear'></div> <div class='left'>in two lines by clear div.</div>
|
|
97
|
+
<div class='clear'></div>
|
|
98
|
+
<div class='left'>This text splitted</div> <div class='space'></div> <div class='left'>in two lines by space div.</div>
|
|
99
|
+
<div class='clear'></div>
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
<!-- <h1>Autoclear after last image in line</h1>
|
|
103
|
+
<a href="<%= url_for("/static/demo/images/img1.jpg") %>">
|
|
104
|
+
<img src="<%= url_for("/static/demo/images/img1_icon.jpg") %>"></img>
|
|
105
|
+
</a>
|
|
106
|
+
<a href="<%= url_for("/static/demo/images/img2.jpg") %>">
|
|
107
|
+
<img src="<%= url_for("/static/demo/images/img2_icon.jpg") %>"></img>
|
|
108
|
+
</a>
|
|
109
|
+
This text should be on the newline -->
|
|
110
|
+
|
|
111
|
+
<% end %>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
rad.info('Dialog successfully submited!');
|