fanforce-plugin-factory 0.40.0 → 0.41.0
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/lib/fanforce/plugin_factory/assets/lib/vendors/knockout/knockout.custom-handlers.coffee +4 -4
- data/lib/fanforce/plugin_factory/assets/lib/vendors/select2/select2_modified.js +3 -0
- data/lib/fanforce/plugin_factory/config/helpers/assets.rb +39 -0
- data/lib/fanforce/plugin_factory/routes_identifier.rb +3 -0
- data/lib/fanforce/plugin_factory/version.rb +1 -1
- metadata +2 -1
data/lib/fanforce/plugin_factory/assets/lib/vendors/knockout/knockout.custom-handlers.coffee
CHANGED
@@ -91,7 +91,7 @@ ko.bindingHandlers.chosen = {
|
|
91
91
|
}
|
92
92
|
|
93
93
|
ko.bindingHandlers.select2 = {
|
94
|
-
init: (
|
94
|
+
init: (element, valueAccessor, allBindingsAccessor) ->
|
95
95
|
obj = valueAccessor()
|
96
96
|
allBindings = allBindingsAccessor()
|
97
97
|
lookupKey = allBindings.lookupKey
|
@@ -105,12 +105,12 @@ ko.bindingHandlers.select2 = {
|
|
105
105
|
ko.utils.domNodeDisposal.addDisposeCallback(element, ->
|
106
106
|
$(element).select2('destroy')
|
107
107
|
)
|
108
|
-
|
109
|
-
update: (
|
108
|
+
|
109
|
+
update: (element, valueAccessor, allBindingsAccessor) ->
|
110
110
|
obj = valueAccessor()
|
111
111
|
$(element).select2('enable', !!obj.enable) if obj.enable?
|
112
112
|
$(element).trigger('change')
|
113
|
-
|
113
|
+
|
114
114
|
}
|
115
115
|
|
116
116
|
ko.bindingHandlers.class =
|
@@ -783,6 +783,9 @@ the specific language governing permissions and limitations under the Apache Lic
|
|
783
783
|
if (this.autofocus) this.focus();
|
784
784
|
|
785
785
|
this.nextSearchTerm = undefined;
|
786
|
+
|
787
|
+
// MODIFIED
|
788
|
+
if (this.opts.afterInitialize) { this.opts.afterInitialize(this) }
|
786
789
|
},
|
787
790
|
|
788
791
|
// abstract
|
@@ -30,4 +30,43 @@ module Sinatra::AssetHelpers
|
|
30
30
|
asset_path(source)
|
31
31
|
end
|
32
32
|
|
33
|
+
######################################################################################################################
|
34
|
+
|
35
|
+
def column(size, &block)
|
36
|
+
begin require 'haml' rescue LoadError raise 'You must have the haml gem installed to use Fanforce.compile_jquery_templates.' end
|
37
|
+
if block
|
38
|
+
context = Object.new
|
39
|
+
class << context
|
40
|
+
include Haml::Helpers
|
41
|
+
end
|
42
|
+
context.init_haml_helpers
|
43
|
+
html = context.capture_haml(&block)
|
44
|
+
end
|
45
|
+
"<div class='small-12 medium-#{size} column'>\n#{html}</div>"
|
46
|
+
end
|
47
|
+
|
48
|
+
def RACTIVE(helper, &block)
|
49
|
+
begin require 'haml' rescue LoadError raise 'You must have the haml gem installed to use Fanforce.compile_jquery_templates.' end
|
50
|
+
raise ArgumentError, "Missing block" unless block_given?
|
51
|
+
context = Object.new
|
52
|
+
class << context
|
53
|
+
include Haml::Helpers
|
54
|
+
end
|
55
|
+
context.init_haml_helpers
|
56
|
+
helper = '#'+helper if helper !~ /^[#\^]/
|
57
|
+
"{{#{helper}}}\n" + context.capture_haml(&block) + "{{/#{helper.gsub(/(#|\^)/,'')}}}"
|
58
|
+
end
|
59
|
+
|
60
|
+
def IF(helper, &block)
|
61
|
+
RACTIVE(helper, &block)
|
62
|
+
end
|
63
|
+
|
64
|
+
def ELSE_IF(helper, &block)
|
65
|
+
RACTIVE(helper, &block)
|
66
|
+
end
|
67
|
+
|
68
|
+
def FOREACH(helper, &block)
|
69
|
+
RACTIVE(helper, &block)
|
70
|
+
end
|
71
|
+
|
33
72
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fanforce-plugin-factory
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.41.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -480,6 +480,7 @@ files:
|
|
480
480
|
- lib/fanforce/plugin_factory/routes_behavior.rb
|
481
481
|
- lib/fanforce/plugin_factory/routes_broadcaster.rb
|
482
482
|
- lib/fanforce/plugin_factory/routes_data_connector.rb
|
483
|
+
- lib/fanforce/plugin_factory/routes_identifier.rb
|
483
484
|
- lib/fanforce/plugin_factory/sprockets/compiler.rb
|
484
485
|
- lib/fanforce/plugin_factory/sprockets/hacks.rb
|
485
486
|
- lib/fanforce/plugin_factory/version.rb
|