fanforce-plugin-factory 0.40.0 → 0.41.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -91,7 +91,7 @@ ko.bindingHandlers.chosen = {
91
91
  }
92
92
 
93
93
  ko.bindingHandlers.select2 = {
94
- init: ((element, valueAccessor, allBindingsAccessor) ->
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: ((element, valueAccessor) ->
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
@@ -0,0 +1,3 @@
1
+ class FanforcePlugin::Sinatra
2
+ require_relative 'routes_behavior'
3
+ end
@@ -1,5 +1,5 @@
1
1
  class Fanforce
2
2
  module PluginFactory
3
- VERSION = '0.40.0'
3
+ VERSION = '0.41.0'
4
4
  end
5
5
  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.40.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