Sha256: b99ac4e23b3b94fbcea73aadaebe6b11d85057d73fd65e3f79afc704fe9723ad

Contents?: true

Size: 451 Bytes

Versions: 17

Compression:

Stored size: 451 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.sort{|file| file <=> file}
        
        "<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-4.2.0 lib/erp_app/widgets/javascript_loader.rb
erp_app-4.0.0 lib/erp_app/widgets/javascript_loader.rb
erp_app-3.1.16 lib/erp_app/widgets/javascript_loader.rb
erp_app-3.1.15 lib/erp_app/widgets/javascript_loader.rb
erp_app-3.1.14 lib/erp_app/widgets/javascript_loader.rb
erp_app-3.1.13 lib/erp_app/widgets/javascript_loader.rb
erp_app-3.1.12 lib/erp_app/widgets/javascript_loader.rb
erp_app-3.1.11 lib/erp_app/widgets/javascript_loader.rb
erp_app-3.1.10 lib/erp_app/widgets/javascript_loader.rb
erp_app-3.1.9 lib/erp_app/widgets/javascript_loader.rb
erp_app-3.1.8 lib/erp_app/widgets/javascript_loader.rb
erp_app-3.1.7 lib/erp_app/widgets/javascript_loader.rb
erp_app-3.1.6 lib/erp_app/widgets/javascript_loader.rb
erp_app-3.1.5 lib/erp_app/widgets/javascript_loader.rb
erp_app-3.1.4 lib/erp_app/widgets/javascript_loader.rb
erp_app-3.1.3 lib/erp_app/widgets/javascript_loader.rb
erp_app-3.1.2 lib/erp_app/widgets/javascript_loader.rb