bhf 0.8.3 → 0.8.4
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.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/app/assets/javascripts/bhf/application.js +14 -12
- data/app/assets/javascripts/bhf/classes/QuickEdit.js +1 -1
- data/app/controllers/bhf/application_controller.rb +1 -1
- data/app/views/bhf/pages/_platform.haml +2 -2
- data/bhf.gemspec +3 -3
- data/lib/bhf/platform/base.rb +7 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c22c8df25b8d13141f27b60b508491c7a9e66411
|
4
|
+
data.tar.gz: 7da8b65db0195d05d086b693c248b8b627e58c58
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e9cbcdbfba4e8eb190b8f6447eb491ddcad594843a2b45228b6a815e01717c90f88d3ed787c7380a6f1c96cbdf6d8fdf41d2f87729698685bfcecb93af5bdbe2
|
7
|
+
data.tar.gz: eb2cb0a476f88210eb77b164648ccae62b7fcfddb06117e90ff6ff8666698e49078d48efae0735d110f39f7387b19dcd72b71a95aad6dbc0c548b34f755927c1
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.8.
|
1
|
+
0.8.4
|
@@ -7,16 +7,6 @@
|
|
7
7
|
// Turbolinks bugs out on popState if you add own pushState events, so we cancel it
|
8
8
|
Turbolinks.pagesCached(0);
|
9
9
|
|
10
|
-
var initHelper = function(callback){
|
11
|
-
var scopedCallback = function(){
|
12
|
-
callback(document.body);
|
13
|
-
};
|
14
|
-
document.addEventListener('page:load', scopedCallback);
|
15
|
-
window.addEvent('domready', scopedCallback);
|
16
|
-
window.addEvent('platformUpdate', callback);
|
17
|
-
window.addEvent('quickEditFormInject', callback);
|
18
|
-
};
|
19
|
-
|
20
10
|
(function(){
|
21
11
|
var stackIndexCounter = 0;
|
22
12
|
var lang = document.html.get('lang');
|
@@ -120,7 +110,7 @@ var initHelper = function(callback){
|
|
120
110
|
}
|
121
111
|
};
|
122
112
|
|
123
|
-
|
113
|
+
window.addEvent('bhfDomChunkReady', function(mainScope){
|
124
114
|
|
125
115
|
var areaSelect = mainScope.getElement('#area_select');
|
126
116
|
if (areaSelect) {
|
@@ -328,7 +318,7 @@ var initHelper = function(callback){
|
|
328
318
|
});
|
329
319
|
});
|
330
320
|
|
331
|
-
var fm =
|
321
|
+
var fm = document.id('flash_massages');
|
332
322
|
if (fm) {
|
333
323
|
fm.removeClass.delay(10000, fm, 'show');
|
334
324
|
}
|
@@ -344,4 +334,16 @@ var initHelper = function(callback){
|
|
344
334
|
|
345
335
|
ajaxNote.success();
|
346
336
|
});
|
337
|
+
|
338
|
+
|
339
|
+
var bodyCallback = function(){
|
340
|
+
window.fireEvent('bhfDomChunkReady', [document.body]);
|
341
|
+
};
|
342
|
+
var scopeCallback = function(scope){
|
343
|
+
window.fireEvent('bhfDomChunkReady', [scope]);
|
344
|
+
};
|
345
|
+
document.addEventListener('page:load', bodyCallback);
|
346
|
+
window.addEvent('domready', bodyCallback);
|
347
|
+
window.addEvent('platformUpdate', scopeCallback);
|
348
|
+
window.addEvent('quickEditFormInject', scopeCallback);
|
347
349
|
})();
|
@@ -101,7 +101,7 @@ var QuickEdit = new Class({
|
|
101
101
|
this.submit(this.newEntry ? ['successAndAdd'] : ['successAndChange']);
|
102
102
|
}.bind(this));
|
103
103
|
|
104
|
-
this.holder.inject(
|
104
|
+
this.holder.inject(document.id(this.options.holderParent));
|
105
105
|
|
106
106
|
this.fireEvent('formInjected', [this.holder]);
|
107
107
|
},
|
@@ -20,7 +20,7 @@ class Bhf::ApplicationController < ActionController::Base
|
|
20
20
|
|
21
21
|
def setup_current_account
|
22
22
|
if session[Bhf.configuration.session_account_id]
|
23
|
-
@current_account = Bhf.configuration.account_model.constantize.send(
|
23
|
+
@current_account = Bhf.configuration.account_model.classify.constantize.send(
|
24
24
|
Bhf.configuration.account_model_find_method.to_sym,
|
25
25
|
session[Bhf.configuration.session_account_id.to_s]
|
26
26
|
)
|
@@ -32,7 +32,7 @@
|
|
32
32
|
%tbody.quick_edit_block{class: ('js_sortable' if platform.sortable), data: {sort_url: sort_entries_path(platform.name)}}
|
33
33
|
- if platform.objects.any?
|
34
34
|
- platform.objects.each do |object|
|
35
|
-
- edit_link = edit_entry_path(platform.name, object)
|
35
|
+
- edit_link = platform.hide_edit ? "##{object.id}_#{platform.name}" : edit_entry_path(platform.name, object)
|
36
36
|
- custom_link = send(platform.custom_link, platform.name, object) if platform.custom_link
|
37
37
|
%tr.quick_edit_entry{id: "#{object.id}_#{platform.name}", class: ('animate live_edit initial_referral' if referral_id == object.id)}
|
38
38
|
- if platform.sortable
|
@@ -52,7 +52,7 @@
|
|
52
52
|
- else
|
53
53
|
- # Haml::Engine.new(File.read(File.expand_path File.dirname(__FILE__)+"/../table/#{column.macro}/_#{column.display_type}.haml")).render(OpenStruct.new({column_value: column_value, object: object}))
|
54
54
|
- render(partial: "bhf/table/#{column.macro}/#{column.display_type}", locals: {column_value: column_value, object: object})
|
55
|
-
= link_to value, (platform.custom_link ? custom_link : edit_link), class: ('quick_edit'
|
55
|
+
= link_to value, (platform.custom_link ? custom_link : edit_link), class: ('quick_edit' if !platform.custom_link && platform.table_quick_edit)
|
56
56
|
|
57
57
|
%td.action{class: ('wider' if platform.show_duplicate && !platform.hide_edit && !platform.hide_delete)}
|
58
58
|
- if platform.show_duplicate
|
data/bhf.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: bhf 0.8.
|
5
|
+
# stub: bhf 0.8.4 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "bhf"
|
9
|
-
s.version = "0.8.
|
9
|
+
s.version = "0.8.4"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|
13
13
|
s.authors = ["Anton Pawlik"]
|
14
|
-
s.date = "2014-07-
|
14
|
+
s.date = "2014-07-05"
|
15
15
|
s.description = "Gets you there on time"
|
16
16
|
s.email = "anton.pawlik@gmail.com"
|
17
17
|
s.extra_rdoc_files = [
|
data/lib/bhf/platform/base.rb
CHANGED
@@ -54,10 +54,10 @@ module Bhf::Platform
|
|
54
54
|
|
55
55
|
def model
|
56
56
|
@model ||= if @data['model']
|
57
|
-
@data['model']
|
57
|
+
@data['model']
|
58
58
|
else
|
59
|
-
@name
|
60
|
-
end
|
59
|
+
@name
|
60
|
+
end.classify.constantize
|
61
61
|
end
|
62
62
|
|
63
63
|
def model_name
|
@@ -182,6 +182,10 @@ module Bhf::Platform
|
|
182
182
|
table_value 'custom_link'
|
183
183
|
end
|
184
184
|
|
185
|
+
def table_quick_edit
|
186
|
+
table_value 'quick_edit'
|
187
|
+
end
|
188
|
+
|
185
189
|
def custom_partial
|
186
190
|
table_value 'partial'
|
187
191
|
end
|
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.8.
|
4
|
+
version: 0.8.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anton Pawlik
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-07-
|
11
|
+
date: 2014-07-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|