Sha256: d600acb280c27adcc3808fe8cb6475de6794313cfd614e6d1ffc9075e2ee6d72

Contents?: true

Size: 1.29 KB

Versions: 8

Compression:

Stored size: 1.29 KB

Contents

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

        protected

          def netzke_touch_css_include(params)
            # Note: no themes for now

            res = stylesheet_link_tag("#{Netzke::Core.touch_uri}/resources/css/sencha-touch")

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

            res
          end

          def netzke_touch_js(params)
            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(params)
            # ExtJS
            res = if ENV['RAILS_ENV'] == 'development'
              ["#{Netzke::Core.touch_uri}/sencha-touch-debug.js"]
            else
              ["#{Netzke::Core.touch_uri}/sencha-touch"]
            end

            # Netzke
            res << "/netzke/touch"

            javascript_include_tag(res, :cache => params[:cache])
          end

      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
netzke-core-0.7.7 lib/netzke/railz/action_view_ext/touch.rb
netzke-core-0.7.6 lib/netzke/railz/action_view_ext/touch.rb
netzke-core-0.7.5 lib/netzke/railz/action_view_ext/touch.rb
netzke-core-0.7.4 lib/netzke/railz/action_view_ext/touch.rb
netzke-core-0.7.3 lib/netzke/railz/action_view_ext/touch.rb
netzke-core-0.7.2 lib/netzke/railz/action_view_ext/touch.rb
netzke-core-0.7.1 lib/netzke/railz/action_view_ext/touch.rb
netzke-core-0.7.0 lib/netzke/railz/action_view_ext/touch.rb