bhf 0.5.13 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/vendor/assets/javascripts/bhf/application.js +302 -280
- data/vendor/assets/javascripts/bhf/classes/AjaxEdit.js +8 -2
- data/vendor/assets/javascripts/bhf/classes/Locale.de-DE.DatePicker.js +4 -1
- data/vendor/assets/javascripts/bhf/extras.js +0 -0
- data/vendor/assets/stylesheets/bhf/application.css.sass +127 -119
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 67f293809c55c22067592eb462ec85380e162196
|
4
|
+
data.tar.gz: d497e38149244d8dd442cba19b62e9f37b1dc1b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a7697b3f92a896ecbb42d08f7d1e66df7e3ff2de81a056806a5d530ac2c4e6896fc8ce460a47115bc91df33f4b782098693557c6c22cd440e066c56417e486d6
|
7
|
+
data.tar.gz: 9ca3c22bb9426c14049d5d7e33853f75ad399f28dee44aa1b3b89bc5fe2ef6293bfda61a99735d9766f035ee78dc2f46dcec030152c1f3f03ba39aefe6e7db70
|
@@ -1,326 +1,348 @@
|
|
1
|
+
//= require turbolinks
|
1
2
|
//= require ./mootools-core-1.4.5-full-compat.js
|
2
3
|
//= require ./mootools-more-1.4.0.1.js
|
3
4
|
//= require ./mootools_ujs_ap
|
4
5
|
//= require_tree ./classes/
|
6
|
+
//= require ./extras
|
7
|
+
|
5
8
|
var ajaxNote = new Ajaxify();
|
6
|
-
var quickEdit;
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
lang
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
wysiwyg.
|
21
|
-
|
9
|
+
var quickEdit = new AjaxEdit();
|
10
|
+
var pageSetup = function(){
|
11
|
+
window.addEvent('domready', function(){
|
12
|
+
ajaxNote.setup();
|
13
|
+
var lang = document.html.get('lang');
|
14
|
+
if (lang === 'en') {
|
15
|
+
lang = 'en-US';
|
16
|
+
}
|
17
|
+
else {
|
18
|
+
lang = lang+'-'+lang.toUpperCase();
|
19
|
+
}
|
20
|
+
Locale.use(lang);
|
21
|
+
var wysiwyg = [];
|
22
|
+
var setupJsForm = function(scope){
|
23
|
+
scope.getElements('.wysiwyg').each(function(elem){
|
24
|
+
wysiwyg.push(elem.mooEditable());
|
25
|
+
});
|
22
26
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
27
|
+
scope.getElements('.multiple_field').each(function(elem){
|
28
|
+
new MultipleFields(elem);
|
29
|
+
});
|
30
|
+
scope.getElements('.array_holder').each(function(elem){
|
31
|
+
new ArrayFields(elem);
|
32
|
+
});
|
29
33
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
};
|
35
|
-
if (input.hasClass('date')) {
|
36
|
-
options = {
|
37
|
-
timePicker: false,
|
38
|
-
format: '%B %d, %Y'
|
34
|
+
scope.getElements('.picker').each(function(input){
|
35
|
+
var options = {
|
36
|
+
timePicker: true,
|
37
|
+
format: '%B %d, %Y %H:%M'
|
39
38
|
};
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
}
|
46
|
-
|
39
|
+
if (input.hasClass('date')) {
|
40
|
+
options = {
|
41
|
+
timePicker: false,
|
42
|
+
format: '%B %d, %Y'
|
43
|
+
};
|
44
|
+
}
|
45
|
+
else if (input.hasClass('time')) {
|
46
|
+
options = {
|
47
|
+
pickOnly: 'time',
|
48
|
+
format: '%H:%M'
|
49
|
+
};
|
50
|
+
}
|
47
51
|
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
+
var hiddenInput = input.clone();
|
53
|
+
input.value = new Date().parse(input.value).format(options.format);
|
54
|
+
input.erase('name');
|
55
|
+
hiddenInput.set('type', 'hidden').inject(input, 'after');
|
52
56
|
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
57
|
+
new Picker.Date(input, Object.merge({
|
58
|
+
onSelect: function(date){
|
59
|
+
hiddenInput.value = date.format('db');
|
60
|
+
}
|
61
|
+
}, options));
|
62
|
+
});
|
59
63
|
|
60
|
-
|
61
|
-
|
64
|
+
scope.getElements('.wmd_editor').each(function(mdTa){
|
65
|
+
var headline, toggleHtmlPreview, toggleLivePreview, livePreview, htmlPreview;
|
62
66
|
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
67
|
+
var togglePreview = function(e){
|
68
|
+
var htmlMode = e.target.hasClass('toggle_html_preview');
|
69
|
+
livePreview.toggleClass('hide', htmlMode);
|
70
|
+
htmlPreview.toggleClass('hide', !htmlMode);
|
71
|
+
toggleLivePreview.toggleClass('active', !htmlMode);
|
72
|
+
toggleHtmlPreview.toggleClass('active', htmlMode);
|
73
|
+
};
|
70
74
|
|
71
|
-
|
75
|
+
headline = new Element('h6.preview_switch', {text: 'Preview'});
|
72
76
|
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
77
|
+
toggleHtmlPreview = new Element('span.toggle_html_preview', {text: 'HTML'})
|
78
|
+
.addEvent('click', togglePreview)
|
79
|
+
.inject(headline);
|
80
|
+
toggleLivePreview = new Element('span.toggle_live_preview', {text: 'Live'})
|
81
|
+
.addEvent('click', togglePreview)
|
82
|
+
.inject(headline);
|
79
83
|
|
80
|
-
|
84
|
+
headline.inject(mdTa, 'after');
|
81
85
|
|
82
|
-
|
83
|
-
|
86
|
+
livePreview = new Element('div.wmd-preview.hide').inject(headline, 'after');
|
87
|
+
htmlPreview = new Element('div.wmd-output.hide').inject(livePreview, 'after');
|
84
88
|
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
});
|
94
|
-
});
|
95
|
-
|
96
|
-
scope.getElements('.map_data_lat').each(function(lat){
|
97
|
-
new Setlatlng(lat);
|
98
|
-
});
|
99
|
-
};
|
100
|
-
|
101
|
-
// TODO: disable more ajax calls while ajax is loading
|
102
|
-
quickEdit = new AjaxEdit({
|
103
|
-
holderParent: $('content'),
|
104
|
-
onStartRequest: function(form){
|
105
|
-
ajaxNote.loading();
|
106
|
-
},
|
107
|
-
onFormInjected: function(form){
|
108
|
-
setupJsForm(form);
|
109
|
-
scrollContent();
|
110
|
-
ajaxNote.success();
|
111
|
-
},
|
112
|
-
onSave: function(form){
|
113
|
-
ajaxNote.success();
|
114
|
-
},
|
115
|
-
onBeforeSubmit: function(){
|
116
|
-
ajaxNote.loading();
|
117
|
-
wysiwyg.each(function(elem){
|
118
|
-
elem.saveContent();
|
119
|
-
});
|
120
|
-
}
|
121
|
-
});
|
122
|
-
|
123
|
-
var platforms = document.body.getElements('.platform');
|
124
|
-
var mainForm = document.id('main_form');
|
125
|
-
|
126
|
-
if (platforms.length) {
|
127
|
-
var setupSortables = function(scope){
|
128
|
-
scope.getElements('.sortable').each(function(sortableElems){
|
129
|
-
new Sortables(sortableElems, {
|
130
|
-
handle: '.handle',
|
131
|
-
onStart: function(element, clone){
|
132
|
-
element.addClass('dragged');
|
133
|
-
},
|
134
|
-
onComplete: function(element){
|
135
|
-
element.removeClass('dragged');
|
136
|
-
new Request({
|
137
|
-
method: 'put',
|
138
|
-
url: this.element.getParent('tbody').get('data-sort-url')
|
139
|
-
}).send({data: {order: this.serialize()}});
|
140
|
-
}
|
89
|
+
new WMDEditor({
|
90
|
+
input: mdTa,
|
91
|
+
button_bar: new Element('div').inject(mdTa, 'before'),
|
92
|
+
preview: livePreview,
|
93
|
+
output: htmlPreview,
|
94
|
+
buttons: 'bold italic link image ol ul heading hr undo redo help',
|
95
|
+
modifierKeys: false,
|
96
|
+
autoFormatting: false
|
141
97
|
});
|
142
98
|
});
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
method: 'get',
|
148
|
-
url: href,
|
149
|
-
onSuccess: function(a, b, html, js){
|
150
|
-
platform.innerHTML = html;
|
151
|
-
if (callback) {
|
152
|
-
callback.call();
|
153
|
-
}
|
154
|
-
setupSortables(platform);
|
155
|
-
Browser.exec(js);
|
156
|
-
ajaxNote.success();
|
157
|
-
windowHight = document.body.clientHeight;
|
158
|
-
}
|
159
|
-
}).send();
|
99
|
+
|
100
|
+
scope.getElements('.map_data_lat').each(function(lat){
|
101
|
+
new Setlatlng(lat);
|
102
|
+
});
|
160
103
|
};
|
161
104
|
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
updatePlatform(this.get('href'), this.getParent('.platform'));
|
166
|
-
},
|
167
|
-
'submit:relay(.search)': function(e){
|
105
|
+
quickEdit.setup({
|
106
|
+
holderParent: $('content'),
|
107
|
+
onStartRequest: function(form){
|
168
108
|
ajaxNote.loading();
|
169
|
-
e.preventDefault();
|
170
|
-
var parent = this.getParent('.platform');
|
171
|
-
var hidden_search = e.target.getElement('.hidden_search');
|
172
|
-
if (hidden_search) {
|
173
|
-
hidden_search.destroy();
|
174
|
-
}
|
175
|
-
|
176
|
-
new Request.HTML({
|
177
|
-
method: 'get',
|
178
|
-
url: this.get('action'),
|
179
|
-
onSuccess: function(a, b, html){
|
180
|
-
parent.innerHTML = html;
|
181
|
-
setupSortables(parent);
|
182
|
-
ajaxNote.success();
|
183
|
-
}
|
184
|
-
}).send({data: this});
|
185
109
|
},
|
186
|
-
|
187
|
-
|
188
|
-
|
110
|
+
onFormInjected: function(form){
|
111
|
+
setupJsForm(form);
|
112
|
+
scrollContent();
|
113
|
+
ajaxNote.success();
|
189
114
|
},
|
190
|
-
|
191
|
-
|
115
|
+
onSave: function(form){
|
116
|
+
ajaxNote.success();
|
192
117
|
},
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
},
|
198
|
-
'ajax:failure': function(html){
|
199
|
-
alert('Something went wrong!');
|
200
|
-
}
|
118
|
+
onBeforeSubmit: function(){
|
119
|
+
ajaxNote.loading();
|
120
|
+
wysiwyg.each(function(elem){
|
121
|
+
elem.saveContent();
|
201
122
|
});
|
202
123
|
}
|
203
124
|
});
|
204
125
|
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
126
|
+
var platforms = document.body.getElements('.platform');
|
127
|
+
var mainForm = document.id('main_form');
|
128
|
+
|
129
|
+
if (platforms.length) {
|
130
|
+
var setupSortables = function(scope){
|
131
|
+
scope.getElements('.sortable').each(function(sortableElems){
|
132
|
+
new Sortables(sortableElems, {
|
133
|
+
handle: '.handle',
|
134
|
+
onStart: function(element, clone){
|
135
|
+
element.addClass('dragged');
|
136
|
+
},
|
137
|
+
onComplete: function(element){
|
138
|
+
element.removeClass('dragged');
|
139
|
+
new Request({
|
140
|
+
method: 'put',
|
141
|
+
url: this.element.getParent('tbody').get('data-sort-url')
|
142
|
+
}).send({data: {order: this.serialize()}});
|
143
|
+
}
|
144
|
+
});
|
213
145
|
});
|
214
|
-
}
|
215
|
-
|
216
|
-
|
217
|
-
|
146
|
+
};
|
147
|
+
var updatePlatform = function(href, platform, callback){
|
148
|
+
ajaxNote.loading();
|
149
|
+
new Request.HTML({
|
150
|
+
method: 'get',
|
151
|
+
url: href,
|
152
|
+
onSuccess: function(a, b, html, js){
|
153
|
+
platform.innerHTML = html;
|
154
|
+
if (callback) {
|
155
|
+
callback.call();
|
156
|
+
}
|
157
|
+
setupSortables(platform);
|
158
|
+
Browser.exec(js);
|
159
|
+
ajaxNote.success();
|
160
|
+
windowHight = document.body.clientHeight;
|
161
|
+
}
|
162
|
+
}).send();
|
163
|
+
};
|
164
|
+
|
165
|
+
platforms.addEvents({
|
166
|
+
'click:relay(.pagination a, thead a)': function(e){
|
167
|
+
e.preventDefault();
|
168
|
+
updatePlatform(this.get('href'), this.getParent('.platform'));
|
169
|
+
},
|
170
|
+
'submit:relay(.search)': function(e){
|
171
|
+
ajaxNote.loading();
|
172
|
+
e.preventDefault();
|
173
|
+
var parent = this.getParent('.platform');
|
174
|
+
var hidden_search = e.target.getElement('.hidden_search');
|
175
|
+
if (hidden_search) {
|
176
|
+
hidden_search.destroy();
|
177
|
+
}
|
218
178
|
|
219
|
-
|
220
|
-
|
179
|
+
new Request.HTML({
|
180
|
+
method: 'get',
|
181
|
+
url: this.get('action'),
|
182
|
+
onSuccess: function(a, b, html){
|
183
|
+
parent.innerHTML = html;
|
184
|
+
setupSortables(parent);
|
185
|
+
ajaxNote.success();
|
186
|
+
}
|
187
|
+
}).send({data: this});
|
188
|
+
},
|
189
|
+
'click:relay(.quick_edit)': function(e){
|
190
|
+
e.preventDefault();
|
191
|
+
quickEdit.startEdit(this, this.getParent('tr'));
|
192
|
+
},
|
193
|
+
'click:relay(.action a)': function(e){
|
194
|
+
this.addClass('clicked');
|
195
|
+
setTimeout(function(){
|
196
|
+
this.removeClass('clicked');
|
197
|
+
}.bind(this), 1500);
|
198
|
+
},
|
199
|
+
'click:relay(.delete)': function(e){
|
200
|
+
e.target.addEvents({
|
201
|
+
'ajax:success': function(html){
|
202
|
+
this.getParent('tr').dispose();
|
203
|
+
},
|
204
|
+
'ajax:failure': function(html){
|
205
|
+
alert('Something went wrong!');
|
206
|
+
}
|
207
|
+
});
|
221
208
|
}
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
209
|
+
});
|
210
|
+
|
211
|
+
quickEdit.addEvents({
|
212
|
+
successAndChange: function(json){
|
213
|
+
var tr = this.wrapElement;
|
214
|
+
tr.getElements('td').each(function(td){
|
215
|
+
var name = td.get('data-column-name');
|
216
|
+
if ( ! name) { return; }
|
217
|
+
var a = td.getElement('a.quick_edit');
|
218
|
+
(a ? a : td).innerHTML = json[name] || '';
|
219
|
+
});
|
220
|
+
},
|
221
|
+
successAndNext: function(json){
|
222
|
+
var tr = this.wrapElement;
|
223
|
+
var nextTr = tr.getNext('tr');
|
224
|
+
|
225
|
+
if (nextTr) {
|
226
|
+
quickEdit.startEdit(nextTr.getElement('a'), nextTr);
|
235
227
|
}
|
236
228
|
else {
|
237
|
-
|
238
|
-
|
229
|
+
var platform = tr.getParent('.platform');
|
230
|
+
var loadMore = platform.getElement('.load_more');
|
231
|
+
if (loadMore) {
|
232
|
+
trIndex = tr.getParent('tbody').getElements('tr').indexOf(tr);
|
233
|
+
updatePlatform(loadMore.get('href'), platform, function(){
|
234
|
+
platform.getElements('tbody tr').each(function(newTr, index){
|
235
|
+
if (trIndex === index) {
|
236
|
+
nextTr = newTr.getNext('tr');
|
237
|
+
quickEdit.startEdit(nextTr.getElement('a'), nextTr);
|
238
|
+
}
|
239
|
+
});
|
240
|
+
});
|
241
|
+
}
|
242
|
+
else {
|
243
|
+
nextTr = platform.getElements('tbody tr')[0];
|
244
|
+
quickEdit.startEdit(nextTr.getElement('a'), nextTr);
|
245
|
+
}
|
239
246
|
}
|
240
247
|
}
|
241
|
-
}
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
setupJsForm(mainForm);
|
248
|
+
});
|
249
|
+
setupSortables(document.body);
|
250
|
+
}
|
251
|
+
else if (mainForm) {
|
252
|
+
setupJsForm(mainForm);
|
247
253
|
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
254
|
+
mainForm.addEvents({
|
255
|
+
'click:relay(.quick_edit)': function(e){
|
256
|
+
e.preventDefault();
|
257
|
+
quickEdit.startEdit(this);
|
258
|
+
},
|
259
|
+
'click:relay(.delete)': function(e){
|
260
|
+
e.target.addEvents({
|
261
|
+
'ajax:success': function(html){
|
262
|
+
var relation = e.target.getParent('.relation');
|
263
|
+
if (relation.getElements('li').length < 2) {
|
264
|
+
relation.getPrevious('.empty').removeClass('hide');
|
265
|
+
if (relation.hasClass('has_one') || relation.hasClass('embeds_one')) {
|
266
|
+
relation.getNext('.add_field').removeClass('hide');
|
267
|
+
}
|
261
268
|
}
|
269
|
+
e.target.getParent('li').dispose();
|
270
|
+
},
|
271
|
+
'ajax:failure': function(html){
|
272
|
+
alert('Something went wrong!');
|
262
273
|
}
|
263
|
-
|
264
|
-
},
|
265
|
-
'ajax:failure': function(html){
|
266
|
-
alert('Something went wrong!');
|
267
|
-
}
|
268
|
-
});
|
269
|
-
}
|
270
|
-
});
|
271
|
-
|
272
|
-
quickEdit.addEvents({
|
273
|
-
successAndAdd: function(json){
|
274
|
-
var relation = this.wrapElement.getPrevious('.relation');
|
275
|
-
relation.getPrevious('.empty').addClass('hide');
|
276
|
-
if (relation.hasClass('has_one') || relation.hasClass('embeds_one')) {
|
277
|
-
relation.getNext('.add_field').addClass('hide');
|
278
|
-
}
|
279
|
-
relation.adopt(
|
280
|
-
new Element('li').adopt(
|
281
|
-
new Element('a.quick_edit', {text: json.to_bhf_s || '', href: json.edit_path})
|
282
|
-
)
|
283
|
-
);
|
284
|
-
},
|
285
|
-
successAndChange: function(json){
|
286
|
-
this.wrapElement.set('text', json.to_bhf_s || '');
|
287
|
-
},
|
288
|
-
successAndNext: function(json){
|
289
|
-
var a = this.wrapElement;
|
290
|
-
var li = a.getParent('li');
|
291
|
-
if ( ! li) {
|
292
|
-
this.close();
|
293
|
-
return;
|
274
|
+
});
|
294
275
|
}
|
295
|
-
|
276
|
+
});
|
277
|
+
|
278
|
+
quickEdit.addEvents({
|
279
|
+
successAndAdd: function(json){
|
280
|
+
var relation = this.wrapElement.getPrevious('.relation');
|
281
|
+
relation.getPrevious('.empty').addClass('hide');
|
282
|
+
if (relation.hasClass('has_one') || relation.hasClass('embeds_one')) {
|
283
|
+
relation.getNext('.add_field').addClass('hide');
|
284
|
+
}
|
285
|
+
relation.adopt(
|
286
|
+
new Element('li').adopt(
|
287
|
+
new Element('a.quick_edit', {text: json.to_bhf_s || '', href: json.edit_path})
|
288
|
+
)
|
289
|
+
);
|
290
|
+
},
|
291
|
+
successAndChange: function(json){
|
292
|
+
this.wrapElement.set('text', json.to_bhf_s || '');
|
293
|
+
},
|
294
|
+
successAndNext: function(json){
|
295
|
+
var a = this.wrapElement;
|
296
|
+
var li = a.getParent('li');
|
297
|
+
if ( ! li) {
|
298
|
+
this.close();
|
299
|
+
return;
|
300
|
+
}
|
301
|
+
var holder = li.getNext('li');
|
296
302
|
|
297
|
-
|
298
|
-
|
303
|
+
if ( ! holder) {
|
304
|
+
holder = li.getParent('ul');
|
305
|
+
}
|
306
|
+
quickEdit.startEdit(holder.getElement('a'));
|
299
307
|
}
|
300
|
-
|
308
|
+
});
|
309
|
+
}
|
310
|
+
var windowHight = document.body.clientHeight;
|
311
|
+
window.onresize = function(e){
|
312
|
+
windowHight = document.body.clientHeight;
|
313
|
+
};
|
314
|
+
var scrollContent = function(){
|
315
|
+
var innerForm = quickEdit.holder.getElement('form');
|
316
|
+
if ( ! innerForm) { return; }
|
317
|
+
var scroll = document.body.scrollTop-70;
|
318
|
+
if (scroll < 10) {
|
319
|
+
scroll = 10;
|
301
320
|
}
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
if ( ! innerForm) { return; }
|
311
|
-
var scroll = document.body.scrollTop-70;
|
312
|
-
if (scroll < 10) {
|
313
|
-
scroll = 10;
|
321
|
+
if (scroll + innerForm.getSize().y > windowHight) { return; }
|
322
|
+
quickEdit.holder.setStyle('padding-top', scroll);
|
323
|
+
};
|
324
|
+
window.onscroll = scrollContent;
|
325
|
+
|
326
|
+
var fm = $('flash_massages');
|
327
|
+
if (fm) {
|
328
|
+
fm.removeClass.delay(4000, fm, 'show');
|
314
329
|
}
|
315
|
-
if (scroll + innerForm.getSize().y > windowHight) { return; }
|
316
|
-
quickEdit.holder.setStyle('padding-top', scroll);
|
317
|
-
};
|
318
|
-
window.onscroll = scrollContent;
|
319
330
|
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
331
|
+
new BrowserUpdate({vs:{i:8,f:7,o:10.01,s:4,n:9}});
|
332
|
+
});
|
333
|
+
};
|
334
|
+
|
335
|
+
pageSetup();
|
324
336
|
|
325
|
-
|
326
|
-
|
337
|
+
if (document.addEventListener) {
|
338
|
+
document.addEventListener('page:fetch', function(){
|
339
|
+
ajaxNote.loading();
|
340
|
+
});
|
341
|
+
|
342
|
+
document.addEventListener('page:load', function(){
|
343
|
+
quickEdit.removeEvents();
|
344
|
+
pageSetup();
|
345
|
+
rails.applyEvents();
|
346
|
+
ajaxNote.success();
|
347
|
+
});
|
348
|
+
}
|
@@ -9,9 +9,15 @@ var AjaxEdit = new Class({
|
|
9
9
|
|
10
10
|
holder: new Element('div.quick_edit_holder'),
|
11
11
|
|
12
|
-
|
12
|
+
setup: function(_options) {
|
13
13
|
this.setOptions(_options);
|
14
|
-
this.holder
|
14
|
+
this.holder
|
15
|
+
.removeEvents('click:relay(.open)')
|
16
|
+
.removeEvents('click:relay(.cancel)')
|
17
|
+
.removeEvents('click:relay(.save_and_next)')
|
18
|
+
.removeEvents('click:relay(.save)')
|
19
|
+
.removeEvents('submit:relay(form)')
|
20
|
+
.addEvents({
|
15
21
|
'click:relay(.open)': function(e){
|
16
22
|
e.preventDefault();
|
17
23
|
location.href = (this.wrapElement.getElement('a') || this.wrapElement).get('href');
|
@@ -12,5 +12,8 @@ provides: Locale.de-DE.DatePicker
|
|
12
12
|
Locale.define('de-DE', 'DatePicker', {
|
13
13
|
select_a_time: 'Wähle eine Zeit',
|
14
14
|
use_mouse_wheel: 'Mit dem Mausrad kannst du schneller die Werte ändern',
|
15
|
-
time_confirm_button: 'OK'
|
15
|
+
time_confirm_button: 'OK',
|
16
|
+
apply_range: 'Übernehmen',
|
17
|
+
cancel: 'Abbrechen',
|
18
|
+
week: 'W'
|
16
19
|
});
|
File without changes
|
@@ -91,19 +91,6 @@ header
|
|
91
91
|
color: $g1
|
92
92
|
|
93
93
|
|
94
|
-
#content
|
95
|
-
display: table
|
96
|
-
width: 100%
|
97
|
-
box-sizing: border-box
|
98
|
-
margin-top: -20px
|
99
|
-
border-spacing: 20px
|
100
|
-
h2,
|
101
|
-
h3
|
102
|
-
+text-shadow(#fff)
|
103
|
-
h6
|
104
|
-
color: $g3
|
105
|
-
+text-shadow(#fff)
|
106
|
-
|
107
94
|
.quick_edit_holder,
|
108
95
|
#main
|
109
96
|
display: table-cell
|
@@ -121,6 +108,17 @@ header
|
|
121
108
|
|
122
109
|
|
123
110
|
#content
|
111
|
+
display: table
|
112
|
+
width: 100%
|
113
|
+
box-sizing: border-box
|
114
|
+
margin-top: -20px
|
115
|
+
border-spacing: 20px
|
116
|
+
h2,
|
117
|
+
h3
|
118
|
+
+text-shadow(#fff)
|
119
|
+
h6
|
120
|
+
color: $g3
|
121
|
+
+text-shadow(#fff)
|
124
122
|
.quick_edit_holder
|
125
123
|
+transition-duration(0.3)
|
126
124
|
+transition-delay(0.2)
|
@@ -434,115 +432,125 @@ form
|
|
434
432
|
.label
|
435
433
|
label
|
436
434
|
padding-top: 5px
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
.
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
435
|
+
.input,
|
436
|
+
.label
|
437
|
+
display: table-cell
|
438
|
+
vertical-align: top
|
439
|
+
.label
|
440
|
+
width: 200px
|
441
|
+
padding-top: 5px
|
442
|
+
p,
|
443
|
+
label
|
444
|
+
display: block
|
445
|
+
color: $g3
|
446
|
+
+text-shadow(#fff)
|
447
|
+
.field_with_errors
|
448
|
+
color: red
|
449
|
+
.input
|
450
|
+
input[type="password"],
|
451
|
+
input[type="text"],
|
452
|
+
.uploaded_image,
|
453
|
+
.uploaded_file,
|
454
|
+
textarea
|
455
|
+
@extend .default_input
|
456
|
+
input[name*="headline"] ,
|
457
|
+
input[name*="title"],
|
458
|
+
input[name*="name"]
|
459
|
+
font-size: 18px
|
460
|
+
width: 500px
|
461
|
+
margin-top: -4px
|
462
|
+
.quick_edit_holder &
|
463
|
+
width: 320px
|
464
|
+
margin-top: 0px
|
465
|
+
|
466
|
+
textarea
|
467
|
+
width: 500px
|
468
|
+
height: 200px
|
469
|
+
line-height: 20px
|
470
|
+
&.wysiwyg
|
471
|
+
height: 400px
|
472
|
+
.errors
|
473
|
+
color: red
|
474
|
+
.field_with_errors
|
475
|
+
input
|
476
|
+
border-color: red
|
477
|
+
[disabled]
|
478
|
+
background: $g2 !important
|
479
|
+
input[type="submit"],
|
480
|
+
input[type="password"],
|
481
|
+
input[type="text"],
|
482
|
+
select,
|
483
|
+
textarea,
|
484
|
+
.uploaded_image,
|
485
|
+
.uploaded_file,
|
486
|
+
.mooeditable-container,
|
487
|
+
.wmd-button-row,
|
488
|
+
.map_canvas
|
489
|
+
margin-left: -6px
|
490
|
+
input[type="file"]
|
491
|
+
margin-left: -5px
|
492
|
+
select
|
493
|
+
font-size: 16px
|
494
|
+
margin-top: 5px
|
495
|
+
input[type="checkbox"]
|
496
|
+
margin-top: 9px
|
497
|
+
.multiple_field,
|
498
|
+
.array_fields
|
499
|
+
display: block
|
500
|
+
.add_field
|
501
|
+
display: block
|
502
|
+
font-size: 20px
|
503
|
+
font-weight: bold
|
504
|
+
width: 30px
|
505
|
+
margin-left: -8px
|
506
|
+
cursor: pointer
|
507
|
+
text-align: center
|
508
|
+
color: $k1 !important
|
509
|
+
text-decoration: none !important
|
510
|
+
&:hover
|
511
|
+
color: $b1 !important
|
512
|
+
.uploaded_file,
|
513
|
+
.uploaded_image
|
514
|
+
padding: 2px
|
515
|
+
width: auto
|
516
|
+
max-width: 400px
|
517
|
+
max-height: 200px
|
518
|
+
margin-bottom: 5px
|
519
|
+
display: block
|
520
|
+
.uploaded_file
|
521
|
+
padding: 7px 5px 8px 7px
|
522
|
+
background: #999
|
523
|
+
color: #fff
|
524
|
+
&:hover
|
525
|
+
background: #fff
|
526
|
+
color: $b1
|
527
|
+
.warning
|
528
|
+
font-weight: bold
|
529
|
+
.quick_edit
|
530
|
+
text-decoration: underline
|
531
|
+
color: $b2
|
532
|
+
.relation
|
533
|
+
li
|
516
534
|
&:hover
|
517
|
-
background: #fff
|
518
|
-
color: $b1
|
519
|
-
.warning
|
520
|
-
font-weight: bold
|
521
|
-
.quick_edit
|
522
|
-
text-decoration: underline
|
523
|
-
color: $b2
|
524
|
-
.relation
|
525
|
-
li
|
526
|
-
&:hover
|
527
|
-
.delete
|
528
|
-
opacity: 1
|
529
|
-
+transition-duration(0.5)
|
530
535
|
.delete
|
531
|
-
opacity:
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
font-style: italic
|
543
|
-
font-size: 12px
|
536
|
+
opacity: 1
|
537
|
+
+transition-duration(0.5)
|
538
|
+
.delete
|
539
|
+
opacity: 0
|
540
|
+
&:hover
|
541
|
+
color: $b1
|
542
|
+
|
543
|
+
.cancel
|
544
|
+
margin-left: 20px
|
545
|
+
color: $g1
|
546
|
+
&:hover
|
544
547
|
color: $g3
|
545
|
-
|
548
|
+
text-decoration: underline
|
549
|
+
.info
|
550
|
+
font-style: italic
|
551
|
+
font-size: 12px
|
552
|
+
color: $g3
|
553
|
+
+text-shadow(#fff)
|
546
554
|
|
547
555
|
.error_explanation
|
548
556
|
margin-left: 20px
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bhf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anton Pawlik
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-11-
|
11
|
+
date: 2013-11-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -197,6 +197,7 @@ files:
|
|
197
197
|
- vendor/assets/javascripts/bhf/classes/Setlatlng.js
|
198
198
|
- vendor/assets/javascripts/bhf/classes/showdown.js
|
199
199
|
- vendor/assets/javascripts/bhf/classes/wmd.js
|
200
|
+
- vendor/assets/javascripts/bhf/extras.js
|
200
201
|
- vendor/assets/javascripts/bhf/mootools-core-1.4.5-full-compat.js
|
201
202
|
- vendor/assets/javascripts/bhf/mootools-more-1.4.0.1.js
|
202
203
|
- vendor/assets/javascripts/bhf/mootools_ujs_ap.js
|