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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 935bc1f41ce1c4d48236e2957871bab97678b03a
4
- data.tar.gz: e2a223ef1b771a990f5817411fb721ecef0d68fb
3
+ metadata.gz: 67f293809c55c22067592eb462ec85380e162196
4
+ data.tar.gz: d497e38149244d8dd442cba19b62e9f37b1dc1b4
5
5
  SHA512:
6
- metadata.gz: 375a0df88ac376813fac7a275c99dabffdeb6084b0aa789661dfe80191655330c2acb40722229caff73c2a1a7d7d6c239a203590ec7affa4cd2a7c9adc8846a4
7
- data.tar.gz: 11fef397840dd2173ef7bd51b24ac50b9f1c1c502db38faee9a87bb2fed531425bcddf27535f6789c3e4a6f06031a1e03c77ec49884e48140f5a9ca12bce4e23
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
- window.addEvent('domready', function(){
8
- ajaxNote.setup();
9
- var lang = document.html.get('lang');
10
- if (lang === 'en') {
11
- lang = 'en-US';
12
- }
13
- else {
14
- lang = lang+'-'+lang.toUpperCase();
15
- }
16
- Locale.use(lang);
17
- var wysiwyg = [];
18
- var setupJsForm = function(scope){
19
- scope.getElements('.wysiwyg').each(function(elem){
20
- wysiwyg.push(elem.mooEditable());
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
- scope.getElements('.multiple_field').each(function(elem){
24
- new MultipleFields(elem);
25
- });
26
- scope.getElements('.array_holder').each(function(elem){
27
- new ArrayFields(elem);
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
- scope.getElements('.picker').each(function(input){
31
- var options = {
32
- timePicker: true,
33
- format: '%B %d, %Y %H:%M'
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
- else if (input.hasClass('time')) {
42
- options = {
43
- pickOnly: 'time',
44
- format: '%H:%M'
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
- var hiddenInput = input.clone();
49
- input.value = new Date().parse(input.value).format(options.format);
50
- input.erase('name');
51
- hiddenInput.set('type', 'hidden').inject(input, 'after');
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
- new Picker.Date(input, Object.merge({
54
- onSelect: function(date){
55
- hiddenInput.value = date.format('db');
56
- }
57
- }, options));
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
- scope.getElements('.wmd_editor').each(function(mdTa){
61
- var headline, toggleHtmlPreview, toggleLivePreview, livePreview, htmlPreview;
64
+ scope.getElements('.wmd_editor').each(function(mdTa){
65
+ var headline, toggleHtmlPreview, toggleLivePreview, livePreview, htmlPreview;
62
66
 
63
- var togglePreview = function(e){
64
- var htmlMode = e.target.hasClass('toggle_html_preview');
65
- livePreview.toggleClass('hide', htmlMode);
66
- htmlPreview.toggleClass('hide', !htmlMode);
67
- toggleLivePreview.toggleClass('active', !htmlMode);
68
- toggleHtmlPreview.toggleClass('active', htmlMode);
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
- headline = new Element('h6.preview_switch', {text: 'Preview'});
75
+ headline = new Element('h6.preview_switch', {text: 'Preview'});
72
76
 
73
- toggleHtmlPreview = new Element('span.toggle_html_preview', {text: 'HTML'})
74
- .addEvent('click', togglePreview)
75
- .inject(headline);
76
- toggleLivePreview = new Element('span.toggle_live_preview', {text: 'Live'})
77
- .addEvent('click', togglePreview)
78
- .inject(headline);
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
- headline.inject(mdTa, 'after');
84
+ headline.inject(mdTa, 'after');
81
85
 
82
- livePreview = new Element('div.wmd-preview.hide').inject(headline, 'after');
83
- htmlPreview = new Element('div.wmd-output.hide').inject(livePreview, 'after');
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
- new WMDEditor({
86
- input: mdTa,
87
- button_bar: new Element('div').inject(mdTa, 'before'),
88
- preview: livePreview,
89
- output: htmlPreview,
90
- buttons: 'bold italic link image ol ul heading hr undo redo help',
91
- modifierKeys: false,
92
- autoFormatting: false
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
- var updatePlatform = function(href, platform, callback){
145
- ajaxNote.loading();
146
- new Request.HTML({
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
- platforms.addEvents({
163
- 'click:relay(.pagination a, thead a)': function(e){
164
- e.preventDefault();
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
- 'click:relay(.quick_edit)': function(e){
187
- e.preventDefault();
188
- quickEdit.startEdit(this, this.getParent('tr'));
110
+ onFormInjected: function(form){
111
+ setupJsForm(form);
112
+ scrollContent();
113
+ ajaxNote.success();
189
114
  },
190
- 'click:relay(.action a)': function(e){
191
- this.addClass('clicked');
115
+ onSave: function(form){
116
+ ajaxNote.success();
192
117
  },
193
- 'click:relay(.delete)': function(e){
194
- e.target.addEvents({
195
- 'ajax:success': function(html){
196
- this.getParent('tr').dispose();
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
- quickEdit.addEvents({
206
- successAndChange: function(json){
207
- var tr = this.wrapElement;
208
- tr.getElements('td').each(function(td){
209
- var name = td.get('data-column-name');
210
- if ( ! name) { return; }
211
- var a = td.getElement('a.quick_edit');
212
- (a ? a : td).innerHTML = json[name] || '';
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
- successAndNext: function(json){
216
- var tr = this.wrapElement;
217
- var nextTr = tr.getNext('tr');
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
- if (nextTr) {
220
- quickEdit.startEdit(nextTr.getElement('a'), nextTr);
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
- else {
223
- var platform = tr.getParent('.platform');
224
- var loadMore = platform.getElement('.load_more');
225
- if (loadMore) {
226
- trIndex = tr.getParent('tbody').getElements('tr').indexOf(tr);
227
- updatePlatform(loadMore.get('href'), platform, function(){
228
- platform.getElements('tbody tr').each(function(newTr, index){
229
- if (trIndex === index) {
230
- nextTr = newTr.getNext('tr');
231
- quickEdit.startEdit(nextTr.getElement('a'), nextTr);
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
- nextTr = platform.getElements('tbody tr')[0];
238
- quickEdit.startEdit(nextTr.getElement('a'), nextTr);
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
- setupSortables(document.body);
244
- }
245
- else if (mainForm) {
246
- setupJsForm(mainForm);
248
+ });
249
+ setupSortables(document.body);
250
+ }
251
+ else if (mainForm) {
252
+ setupJsForm(mainForm);
247
253
 
248
- mainForm.addEvents({
249
- 'click:relay(.quick_edit)': function(e){
250
- e.preventDefault();
251
- quickEdit.startEdit(this);
252
- },
253
- 'click:relay(.delete)': function(e){
254
- e.target.addEvents({
255
- 'ajax:success': function(html){
256
- var relation = e.target.getParent('.relation');
257
- if (relation.getElements('li').length < 2) {
258
- relation.getPrevious('.empty').removeClass('hide');
259
- if (relation.hasClass('has_one') || relation.hasClass('embeds_one')) {
260
- relation.getNext('.add_field').removeClass('hide');
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
- e.target.getParent('li').dispose();
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
- var holder = li.getNext('li');
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
- if ( ! holder) {
298
- holder = li.getParent('ul');
303
+ if ( ! holder) {
304
+ holder = li.getParent('ul');
305
+ }
306
+ quickEdit.startEdit(holder.getElement('a'));
299
307
  }
300
- quickEdit.startEdit(holder.getElement('a'));
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
- var windowHight = document.body.clientHeight;
305
- window.onresize = function(e){
306
- windowHight = document.body.clientHeight;
307
- };
308
- var scrollContent = function(){
309
- var innerForm = quickEdit.holder.getElement('form');
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
- var fm = $('flash_massages');
321
- if (fm) {
322
- fm.removeClass.delay(4000, fm, 'show');
323
- }
331
+ new BrowserUpdate({vs:{i:8,f:7,o:10.01,s:4,n:9}});
332
+ });
333
+ };
334
+
335
+ pageSetup();
324
336
 
325
- new BrowserUpdate({vs:{i:8,f:7,o:10.01,s:4,n:9}});
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
- initialize: function(_options) {
12
+ setup: function(_options) {
13
13
  this.setOptions(_options);
14
- this.holder.addEvents({
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
- .input,
438
- .label
439
- display: table-cell
440
- vertical-align: top
441
- .label
442
- width: 200px
443
- padding-top: 5px
444
- p,
445
- label
446
- display: block
447
- color: $g3
448
- +text-shadow(#fff)
449
- .field_with_errors
450
- color: red
451
- .input
452
- input[type="password"],
453
- input[type="text"],
454
- .uploaded_image,
455
- .uploaded_file,
456
- textarea
457
- @extend .default_input
458
- textarea
459
- width: 500px
460
- height: 200px
461
- line-height: 20px
462
- &.wysiwyg
463
- height: 400px
464
- .errors
465
- color: red
466
- .field_with_errors
467
- input
468
- border-color: red
469
- [disabled]
470
- background: $g2 !important
471
- input[type="submit"],
472
- input[type="password"],
473
- input[type="text"],
474
- select,
475
- textarea,
476
- .uploaded_image,
477
- .uploaded_file,
478
- .mooeditable-container,
479
- .wmd-button-row,
480
- .map_canvas
481
- margin-left: -6px
482
- input[type="file"]
483
- margin-left: -5px
484
- select
485
- font-size: 16px
486
- margin-top: 5px
487
- input[type="checkbox"]
488
- margin-top: 9px
489
- .multiple_field,
490
- .array_fields
491
- display: block
492
- .add_field
493
- display: block
494
- font-size: 20px
495
- font-weight: bold
496
- width: 30px
497
- margin-left: -8px
498
- cursor: pointer
499
- text-align: center
500
- color: $k1 !important
501
- text-decoration: none !important
502
- &:hover
503
- color: $b1 !important
504
- .uploaded_file,
505
- .uploaded_image
506
- padding: 2px
507
- width: auto
508
- max-width: 400px
509
- max-height: 200px
510
- margin-bottom: 5px
511
- display: block
512
- .uploaded_file
513
- padding: 7px 5px 8px 7px
514
- background: #999
515
- color: #fff
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: 0
532
- &:hover
533
- color: $b1
534
-
535
- .cancel
536
- margin-left: 20px
537
- color: $g1
538
- &:hover
539
- color: $g3
540
- text-decoration: underline
541
- .info
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
- +text-shadow(#fff)
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.5.13
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-09 00:00:00.000000000 Z
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