Sha256: 80093d2ea746d6537bfe0c80d09540763395fbb5cbbcd2fcaa5dd91876f01837

Contents?: true

Size: 424 Bytes

Versions: 17

Compression:

Stored size: 424 Bytes

Contents

module ErpApp
  module Widgets
    class JavascriptLoader

      def self.glob_javascript
        files = Rails.application.config.erp_app.widgets.collect{|widget|Dir.glob(File.join(widget[:path],"javascript/*.js"))}.flatten
        
        "<script type='text/javascript'>#{Uglifier.compile(files.collect{|file| IO.read(file)}.join(''))}</script>"
      end

    end#JavascriptLoader
  end#Widgets
end#ErpApp

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
erp_app-3.0.16 lib/erp_app/widgets/javascript_loader.rb
erp_app-3.0.15 lib/erp_app/widgets/javascript_loader.rb
erp_app-3.1.1 lib/erp_app/widgets/javascript_loader.rb
erp_app-3.1.0 lib/erp_app/widgets/javascript_loader.rb
erp_app-3.0.14 lib/erp_app/widgets/javascript_loader.rb
erp_app-3.0.13 lib/erp_app/widgets/javascript_loader.rb
erp_app-3.0.12 lib/erp_app/widgets/javascript_loader.rb
erp_app-3.0.10 lib/erp_app/widgets/javascript_loader.rb
erp_app-3.0.9 lib/erp_app/widgets/javascript_loader.rb
erp_app-3.0.8 lib/erp_app/widgets/javascript_loader.rb
erp_app-3.0.7 lib/erp_app/widgets/javascript_loader.rb
erp_app-3.0.6 lib/erp_app/widgets/javascript_loader.rb
erp_app-3.0.5 lib/erp_app/widgets/javascript_loader.rb
erp_app-3.0.4 lib/erp_app/widgets/javascript_loader.rb
erp_app-3.0.3 lib/erp_app/widgets/javascript_loader.rb
erp_app-3.0.2 lib/erp_app/widgets/javascript_loader.rb
erp_app-3.0.1 lib/erp_app/widgets/javascript_loader.rb