Sha256: 480b8ca4fa7e41c0e841081779bd95d9f87928a601a400f1ea297ca9f0ab6090

Contents?: true

Size: 1.25 KB

Versions: 2

Compression:

Stored size: 1.25 KB

Contents

module Netzke
  module Railz
    module ActionViewExt
      # Implementation of Touch-specific helpers
      module Touch #:nodoc:

        protected

          def netzke_touch_css_include(theme)
            # theme is not used for now

            res = stylesheet_link_tag("/sencha-touch/resources/css/sencha-touch")

            # Netzke-related (dynamically generated by NetzkeController)
            res << "\n" << stylesheet_link_tag("/netzke/touch")

            res
          end

          def netzke_touch_js
            res = []
            res << content_for(:netzke_js_classes)
            res << "\n"

            res << "Ext.setup({"
              res << "onReady: function(){"
              res << content_for(:netzke_on_ready)
              res << "}"
            res << "});"

            javascript_tag res.join("\n")
          end


          def netzke_touch_js_include
            res = []

            # ExtJS
            res << (ENV['RAILS_ENV'] == 'development' ? javascript_include_tag("/sencha-touch/sencha-touch-debug.js") : javascript_include_tag("/sencha-touch/sencha-touch"))

            # Netzke (dynamically generated)
            res << javascript_include_tag("/netzke/touch")

            res.join("\n")
          end

      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
netzke-core-0.6.6 lib/netzke/railz/action_view_ext/touch.rb
netzke-core-0.6.5 lib/netzke/railz/action_view_ext/touch.rb