diff --git a/.gitignore b/.gitignore index ac411e58..207a112d 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,5 @@ log/*.log tmp/**/* .DS_Store rerun.txt +uploads +spec/tmp diff --git a/Gemfile b/Gemfile index e45cd395..d964ebdb 100644 --- a/Gemfile +++ b/Gemfile @@ -11,9 +11,11 @@ gem "mongoid", ">= 2.0.0.beta4" gem "mongoid_acts_as_tree", :git => 'git://github.com/evansagge/mongoid_acts_as_tree.git' gem "warden" gem "devise", ">= 1.1.rc0" -gem "haml", '>= 3.0.0.beta.2', :git => 'git://github.com/nex3/haml.git' +gem "haml", '>= 3.0.1' #, :git => 'git://github.com/nex3/haml.git' gem "formtastic", :git => 'git://github.com/justinfrench/formtastic.git', :branch => 'rails3' gem "mongoid_acts_as_tree", :git => 'git://github.com/evansagge/mongoid_acts_as_tree.git' +gem "carrierwave", :git => "http://github.com/jnicklas/carrierwave.git" +gem "rmagick" # Development environment diff --git a/app/controllers/admin/theme_assets_controller.rb b/app/controllers/admin/theme_assets_controller.rb new file mode 100644 index 00000000..2efa2a3d --- /dev/null +++ b/app/controllers/admin/theme_assets_controller.rb @@ -0,0 +1,54 @@ +module Admin + class ThemeAssetsController < BaseController + + sections 'settings', 'theme_assets' + + def index + assets = current_site.theme_assets.all + @non_image_assets = assets.find_all { |a| a.stylesheet? || a.javascript? } + @image_assets = assets.find_all { |a| a.image? } + end + + def new + @asset = current_site.theme_assets.build + end + + def edit + @asset = current_site.theme_assets.find(params[:id]) + end + + def create + @asset = current_site.theme_assets.build(params[:theme_asset]) + + if @asset.save + flash_success! + redirect_to edit_admin_theme_asset_url(@asset) + else + flash_error! + render :action => 'new' + end + end + + def update + @asset = current_site.theme_assets.find(params[:id]) + + if @asset.update_attributes(params[:theme_asset]) + flash_success! + redirect_to edit_admin_theme_asset_url(@asset) + else + flash_error! + render :action => 'edit' + end + end + + def destroy + @asset = current_site.theme_assets.find(params[:id]) + @asset.destroy + + flash_success! + redirect_to admin_theme_assets_url + end + + end + +end \ No newline at end of file diff --git a/app/controllers/pages_controller.rb b/app/controllers/pages_controller.rb index 3d3ec4d1..a4977f3a 100644 --- a/app/controllers/pages_controller.rb +++ b/app/controllers/pages_controller.rb @@ -4,6 +4,9 @@ class PagesController < ActionController::Base before_filter :require_site - def show; end + def show + logger.debug "fullpath = #{request.fullpath}" + # @page = current_site.pages.find + end end \ No newline at end of file diff --git a/app/helpers/admin/assets_helper.rb b/app/helpers/admin/assets_helper.rb new file mode 100644 index 00000000..4d167bc3 --- /dev/null +++ b/app/helpers/admin/assets_helper.rb @@ -0,0 +1,40 @@ +module Admin::AssetsHelper + + def vignette_tag(asset) + if asset.image? + if asset.width < 80 && asset.height < 80 + image_tag(asset.source.url) + else + image_tag(asset.source.url(:medium)) + end + # elsif asset.pdf? + # image_tag(asset.source.url(:medium)) + else + mime_type_to_image(asset, :medium) + end + end + + def mime_type_to_image(asset, size = :thumb) + mime_type = File.mime_type?(asset.source_filename) + filename = "unknown" + + if !(mime_type =~ /pdf/).nil? + filename = "PDF" + elsif !(mime_type =~ /css/).nil? + filename = "CSS" + elsif !(mime_type =~ /javascript/).nil? + filename = "JAVA" + end + + image_tag(File.join("admin", "icons", "filetype", size.to_s, filename + ".png")) + end + + def image_dimensions_and_size(asset) + content_tag(:small, "#{asset.width}px x #{@asset.height}px | #{number_to_human_size(asset.size)}") + end + + def allow_plain_text_editing?(asset) + asset.new_record? || asset.stylesheet? || asset.javascript? + end + +end \ No newline at end of file diff --git a/app/models/page.rb b/app/models/page.rb index 41b0101c..6ddf5c1e 100644 --- a/app/models/page.rb +++ b/app/models/page.rb @@ -21,7 +21,7 @@ class Page before_validate :normalize_slug before_save { |p| p.parent_id = nil if p.parent_id.blank? } before_save :change_parent - before_create { |p| p.parts << PagePart.build_body_part } + before_create { |p| p.parts << PagePart.build_body_part if p.parts.empty? } before_create { |p| p.fix_position(false) } before_create :add_to_list_bottom before_destroy :do_not_remove_index_and_404_pages diff --git a/app/models/site.rb b/app/models/site.rb index 663e4f36..29204c40 100644 --- a/app/models/site.rb +++ b/app/models/site.rb @@ -11,6 +11,7 @@ class Site has_many_related :pages has_many_related :layouts has_many_related :snippets + has_many_related :theme_assets embeds_many :memberships ## validations ## @@ -81,7 +82,7 @@ class Site end def destroy_in_cascade! - %w{pages layouts snippets}.each do |association| + %w{pages layouts snippets theme_assets}.each do |association| self.send(association).destroy_all end end diff --git a/app/models/theme_asset.rb b/app/models/theme_asset.rb new file mode 100644 index 00000000..5a180cce --- /dev/null +++ b/app/models/theme_asset.rb @@ -0,0 +1,94 @@ +class ThemeAsset + include Mongoid::Document + include Mongoid::Timestamps + + ## fields ## + field :slug, :type => String + field :content_type, :type => String + field :width, :type => Integer + field :height, :type => Integer + field :size, :type => Integer + mount_uploader :source, ThemeAssetUploader + + ## associations ## + belongs_to_related :site + + ## callbacks ## + before_validate :sanitize_slug + before_validate :store_plain_text + before_save :set_slug + + ## validations ## + validate :extname_can_not_be_changed + validates_presence_of :site + validates_presence_of :slug, :if => Proc.new { |a| a.new_record? && a.performing_plain_text? } + validates_integrity_of :source + + ## accessors ## + attr_accessor :performing_plain_text + + ## methods ## + + %w{image stylesheet javascript}.each do |type| + define_method("#{type}?") do + self.content_type == type + end + end + + def plain_text + @plain_text ||= (if self.stylesheet? || self.javascript? + File.read(self.source.path) + else + nil + end) + end + + def plain_text=(source) + self.performing_plain_text = true if self.performing_plain_text.nil? + @plain_text = source + end + + def performing_plain_text? + !(self.performing_plain_text.blank? || self.performing_plain_text == 'false' || self.performing_plain_text == false) + end + + def store_plain_text + return if self.plain_text.blank? + + self.source = CarrierWave::SanitizedFile.new({ + :tempfile => StringIO.new(self.plain_text), + :filename => self.filename + }) + end + + def filename + if not self.image? + "#{self.slug}.#{self.stylesheet? ? 'css' : 'js'}" + else + "#{self.slug}#{File.extname(self.source.file.original_filename)}" + end + end + + protected + + def sanitize_slug + self.slug.slugify!(:underscore => true) if self.slug.present? + end + + def set_slug + if self.slug.blank? + self.slug = File.basename(self.source_filename, File.extname(self.source_filename)) + self.sanitize_slug + end + end + + def extname_can_not_be_changed + return if self.new_record? + + Rails.logger.debug "previous = #{self.source.file.original_filename.inspect} / #{self.source_filename.inspect}" + + if File.extname(self.source.file.original_filename) != File.extname(self.source_filename) + self.errors.add(:source, :extname_changed) + end + end +end \ No newline at end of file diff --git a/app/uploaders/theme_asset_uploader.rb b/app/uploaders/theme_asset_uploader.rb new file mode 100644 index 00000000..bce366e2 --- /dev/null +++ b/app/uploaders/theme_asset_uploader.rb @@ -0,0 +1,87 @@ +# encoding: utf-8 + +class ThemeAssetUploader < CarrierWave::Uploader::Base + + include CarrierWave::RMagick + + # Choose what kind of storage to use for this uploader + # storage :file + # storage :s3 + + # Override the directory where uploaded files will be stored + # This is a sensible default for uploaders that are meant to be mounted: + def store_dir + "sites/#{model.site_id}/themes/#{model.id}" + end + + version :thumb do + process :resize_to_fill => [50, 50] + process :convert => 'png' + end + + version :medium do + process :resize_to_fill => [80, 80] + process :convert => 'png' + end + + version :preview do + process :resize_to_fit => [880, 1100] + process :convert => 'png' + end + + process :set_content_type + process :set_size + process :set_width_and_height + + def set_content_type + value = :other + + self.class.content_types.each_pair do |type, rules| + rules.each do |rule| + case rule + when String then value = type if file.content_type == rule + when Regexp then value = type if (file.content_type =~ rule) == 0 + end + end + end + + model.content_type = value + end + + def set_size + model.size = file.size + end + + def set_width_and_height + if model.image? + model.width, model.height = `identify -format "%wx%h" #{file.path}`.split(/x/).collect(&:to_i) + end + end + + def self.content_types + { + :image => ['image/jpeg', 'image/pjpeg', 'image/gif', 'image/png', 'image/x-png', 'image/jpg'], + :stylesheet => ['text/css'], + :javascript => ['text/javascript', 'text/js', 'application/x-javascript'] + } + end + + def extension_white_list + %w(jpg jpeg gif png css js) + end + + def filename + Rails.logger.debug "slug ===> #{model.slug} / #{model.content_type} / #{original_filename}" + + if model.slug.present? + model.filename + else + extension = File.extname(original_filename) + basename = File.basename(original_filename, extension).slugify(:underscore => true) + "#{basename}#{extension}" + end + # + # original_filename + end + +end diff --git a/app/views/admin/my_accounts/edit.html.haml b/app/views/admin/my_accounts/edit.html.haml index 4a1a97cf..9951f1b5 100644 --- a/app/views/admin/my_accounts/edit.html.haml +++ b/app/views/admin/my_accounts/edit.html.haml @@ -34,7 +34,7 @@ = f.custom_input :language, { :css => 'full', :with_label => false } do - Locomotive.config.locales.each do |locale| %span - = image_tag "admin/flags/#{locale}.png" + = image_tag "admin/icons/flags/#{locale}.png" = f.radio_button :locale, locale   = t(".#{locale}") diff --git a/app/views/admin/shared/menu/_settings.html.haml b/app/views/admin/shared/menu/_settings.html.haml index f8f5f34c..e33a8423 100644 --- a/app/views/admin/shared/menu/_settings.html.haml +++ b/app/views/admin/shared/menu/_settings.html.haml @@ -2,4 +2,5 @@ = admin_submenu_item 'site', edit_admin_current_site_url = admin_submenu_item 'layouts', admin_layouts_url = admin_submenu_item 'snippets', admin_snippets_url + = admin_submenu_item 'theme_assets', admin_theme_assets_url = admin_submenu_item 'account', edit_admin_my_account_url \ No newline at end of file diff --git a/app/views/admin/theme_assets/_asset.html.haml b/app/views/admin/theme_assets/_asset.html.haml new file mode 100644 index 00000000..0d21bdd1 --- /dev/null +++ b/app/views/admin/theme_assets/_asset.html.haml @@ -0,0 +1,7 @@ +%li{ :class => "asset #{'last' if (asset_counter + 1) % 6 == 0}"} + %h4= link_to truncate(asset.slug, :length => 22), edit_admin_theme_asset_path(asset) + .image + .inside + = vignette_tag(asset) + .actions + = link_to image_tag('admin/list/icons/cross.png'), admin_theme_asset_path(asset), :class => 'remove', :confirm => t('admin.messages.confirm'), :method => :delete \ No newline at end of file diff --git a/app/views/admin/theme_assets/_form.html.haml b/app/views/admin/theme_assets/_form.html.haml new file mode 100644 index 00000000..23f3e659 --- /dev/null +++ b/app/views/admin/theme_assets/_form.html.haml @@ -0,0 +1,36 @@ +- content_for :head do + = javascript_include_tag 'admin/plugins/codemirror/codemirror', 'admin/theme_assets.js' + += f.hidden_field :performing_plain_text + +#file-selector{ :class => "selector #{'hidden' if @asset.performing_plain_text?}" } + = f.inputs :name => :information do + = f.input :source + + - if @asset.new_record? || !@asset.image? + %span.alt + = t('admin.theme_assets.form.choose_plain_text') + +- if allow_plain_text_editing?(@asset) + #text-selector{ :class => "selector #{'hidden' if !@asset.performing_plain_text?}", :style => "#{'display: none' if !@asset.performing_plain_text?}" } + = f.inputs :name => :code, :class => 'inputs code' do + + - if @asset.new_record? + = f.input :slug + + = f.custom_input :content_type do + = f.select :content_type, ["stylesheet", "javascript"] + + = f.custom_input :plain_text, :css => 'full', :with_label => false do + %code{ :class => (@asset.new_record? || (@asset.size && @asset.size > 40000) ? 'nude' : @asset.content_type) } + = f.text_area :plain_text + + %span.alt + = t('admin.theme_assets.form.choose_file') + +- if @asset.image? + = f.foldable_inputs :name => "#{t('formtastic.titles.preview')} #{image_dimensions_and_size(@asset)}", :class => 'preview' do + %li + .image + .inside + = image_tag(@asset.source.url(:preview)) diff --git a/app/views/admin/theme_assets/edit.html.haml b/app/views/admin/theme_assets/edit.html.haml new file mode 100644 index 00000000..3ba0e26c --- /dev/null +++ b/app/views/admin/theme_assets/edit.html.haml @@ -0,0 +1,15 @@ +- title t('.title', :file => @asset.source_filename) + +- content_for :submenu do + = render 'admin/shared/menu/settings' + +- content_for :buttons do + = admin_button_tag t('admin.theme_assets.index.new'), new_admin_theme_asset_url, :class => 'add' + +%p= t('.help') + += semantic_form_for @asset, :url => admin_theme_asset_url(@asset), :html => { :multipart => true } do |form| + + = render 'form', :f => form + + = render 'admin/shared/form_actions', :back_url => admin_theme_assets_url, :button_label => :update \ No newline at end of file diff --git a/app/views/admin/theme_assets/index.html.haml b/app/views/admin/theme_assets/index.html.haml new file mode 100644 index 00000000..94615614 --- /dev/null +++ b/app/views/admin/theme_assets/index.html.haml @@ -0,0 +1,27 @@ +- title t('.title') + +- content_for :submenu do + = render 'admin/shared/menu/settings' + +- content_for :buttons do + = admin_button_tag :new, new_admin_theme_asset_url, :class => 'add' + +%p= t('.help') + +%h3= t('.css_and_js') +- if @non_image_assets.empty? + %p.no-items= t('.no_items', :url => new_admin_theme_asset_url) +- else + %ul.assets + = render :partial => 'asset', :collection => @non_image_assets + %li.clear + +%br + +%h3= t('.images') +- if @image_assets.empty? + %p.no-items= t('.no_items', :url => new_admin_theme_asset_url) +- else + %ul.assets + = render :partial => 'asset', :collection => @image_assets + %li.clear diff --git a/app/views/admin/theme_assets/new.html.haml b/app/views/admin/theme_assets/new.html.haml new file mode 100644 index 00000000..11d5cba1 --- /dev/null +++ b/app/views/admin/theme_assets/new.html.haml @@ -0,0 +1,12 @@ +- title t('.title') + +- content_for :submenu do + = render 'admin/shared/menu/settings' + +%p= t('.help') + += semantic_form_for @asset, :url => admin_theme_assets_url, :html => { :multipart => true } do |form| + + = render 'form', :f => form + + = render 'admin/shared/form_actions', :back_url => admin_theme_assets_url, :button_label => :create \ No newline at end of file diff --git a/config/environments/development.rb b/config/environments/development.rb index 0fce7883..3da6a274 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -27,3 +27,9 @@ Locomotive::Application.configure do :domain => "example.com" } end + +CarrierWave.configure do |config| + config.storage = :file + config.root = File.join(Rails.root, 'public') +end + diff --git a/config/environments/test.rb b/config/environments/test.rb index 906a2f71..84902d73 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -27,3 +27,7 @@ Locomotive::Application.configure do # like if you have constraints or database-specific column types # config.active_record.schema_format = :sql end + +CarrierWave.configure do |config| + config.storage = :file +end \ No newline at end of file diff --git a/config/initializers/carrierwave.rb b/config/initializers/carrierwave.rb new file mode 100644 index 00000000..2f8e7531 --- /dev/null +++ b/config/initializers/carrierwave.rb @@ -0,0 +1,48 @@ +require 'carrierwave/orm/mongoid' + +module CarrierWave + + class SanitizedFile + + def original_filename=(filename) + @original_filename = filename + end + + def content_type=(content_type) + @content_type = content_type + end + + # http://github.com/jnicklas/carrierwave/issuesearch?state=closed&q=content+type#issue/48 + def copy_to_with_content_type(new_path, permissions=nil) + new_file = self.copy_to_without_content_type(new_path, permissions) + new_file.content_type = self.content_type + new_file + end + + alias_method_chain :copy_to, :content_type + + # FIXME (Did) CarrierWave speaks mime type now + def content_type + return @content_type if @content_type + if @file.respond_to?(:content_type) and @file.content_type + @file.content_type.chomp + else + File.mime_type?(@file) if @file.is_a?(String) + end + end + + end + +end + +module CarrierWave + module Mongoid + def validates_integrity_of(*attrs) + options = attrs.last.is_a?(Hash) ? attrs.last : {} + options[:message] ||= I18n.t('carrierwave.errors.integrity', :default => 'is not an allowed type of file.') + validates_each(*attrs) do |record, attr, value| + record.errors.add attr, options[:message] if record.send("#{attr}_integrity_error") + end + end + end +end diff --git a/config/locales/admin_ui_en.yml b/config/locales/admin_ui_en.yml index 1081459f..aeb7e8a0 100644 --- a/config/locales/admin_ui_en.yml +++ b/config/locales/admin_ui_en.yml @@ -23,6 +23,7 @@ en: snippets: Snippets account: My account site: Site + theme_assets: Theme files footer: developed_by: Developed by powered_by: and Powered by @@ -97,6 +98,20 @@ en: en: English fr: French + theme_assets: + index: + title: Listing theme files + new: new file + css_and_js: Style and javascript + images: Images + no_items: "There are no files for now. Just click here to create the first one." + new: + title: New file + edit: + title: "Editing {{file}}" + form: + choose_file: Choose file + choose_plain_text: Choose plain text formtastic: titles: @@ -109,6 +124,14 @@ en: access_points: Access points memberships: Accounts membership_email: Account email + file: File + preview: Preview + labels: + theme_asset: + new: + source: File + edit: + source: Replace file hints: page: keywords: "Meta keywords used within the head tag of the page. They are separeted by an empty space. Required for SEO." @@ -117,4 +140,8 @@ en: slug: "You need to know it in order to insert the snippet inside a page or a layout" site: domain_name: "ex: locomotiveapp.org" + theme_asset: + slug: "You do not need to add the extension file (.css or .js)" + edit: + source: "You can replace it by a file of the same extension" diff --git a/config/locales/carrierwave_en.yml b/config/locales/carrierwave_en.yml new file mode 100644 index 00000000..af28aa13 --- /dev/null +++ b/config/locales/carrierwave_en.yml @@ -0,0 +1,4 @@ +en: + carrierwave: + errors: + integrity: 'is not an allowed type of file.' \ No newline at end of file diff --git a/config/locales/carrierwave_fr.yml b/config/locales/carrierwave_fr.yml new file mode 100644 index 00000000..d4dad094 --- /dev/null +++ b/config/locales/carrierwave_fr.yml @@ -0,0 +1,4 @@ +fr: + carrierwave: + errors: + integrity: "n'est pas un type de fichier autorisé" \ No newline at end of file diff --git a/config/locales/default_en.yml b/config/locales/default_en.yml index 93acbfad..b5fbd1da 100644 --- a/config/locales/default_en.yml +++ b/config/locales/default_en.yml @@ -6,6 +6,7 @@ en: missing_content_for_layout: "should contain 'content_for_layout' liquid tag" needs_admin_account: "One admin account is required at least" protected_page: "You can not remove index or 404 pages" + extname_changed: "New file does not have the original extension" attributes: defaults: diff --git a/config/routes.rb b/config/routes.rb index acce8446..0f796d9b 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -35,9 +35,12 @@ Locomotive::Application.routes.draw do |map| resource :my_account - resources :memberships + resources :memberships + + resources :theme_assets end # magic url match '/' => 'pages#show' + match '*path' => 'pages#show' end diff --git a/doc/TODO b/doc/TODO index 6694d382..703c1779 100644 --- a/doc/TODO +++ b/doc/TODO @@ -34,6 +34,15 @@ x create 404 + index pages once a site is created x can not delete index + 404 pages x validates_uniqueness_of :slug, :scope => :id x domain scoping when authenticating +- theme assets + x create / update + x slug + x filename from slug + x can not replace a javascript by a stylesheet + - disable version if not image +- asset collections + - assets + - custom resizing BACKLOG: diff --git a/lib/core_ext.rb b/lib/core_ext.rb index 62a2e301..d4893e31 100644 --- a/lib/core_ext.rb +++ b/lib/core_ext.rb @@ -5,7 +5,7 @@ class String # end def slugify(options = {}) - options = { :sep => '_', :without_extension => false, :downcase => false }.merge(options) + options = { :sep => '_', :without_extension => false, :downcase => false, :underscore => false }.merge(options) # replace accented chars with ther ascii equivalents s = ActiveSupport::Inflector.transliterate(self).to_s # No more than one slash in a row @@ -20,6 +20,8 @@ class String s.downcase! if options[:downcase] # Turn unwanted chars into the seperator s.gsub!(/[^a-zA-Z0-9\-_\+\/]+/i, options[:sep]) + # Underscore + s.gsub!(/[\-]/i, '') if options[:underscore] s end diff --git a/public/images/admin/icons/filetype/medium/AC3.png b/public/images/admin/icons/filetype/medium/AC3.png new file mode 100755 index 00000000..05c626b4 Binary files /dev/null and b/public/images/admin/icons/filetype/medium/AC3.png differ diff --git a/public/images/admin/icons/filetype/medium/ACE.png b/public/images/admin/icons/filetype/medium/ACE.png new file mode 100755 index 00000000..be916c4d Binary files /dev/null and b/public/images/admin/icons/filetype/medium/ACE.png differ diff --git a/public/images/admin/icons/filetype/medium/ADE.png b/public/images/admin/icons/filetype/medium/ADE.png new file mode 100755 index 00000000..04ce0de4 Binary files /dev/null and b/public/images/admin/icons/filetype/medium/ADE.png differ diff --git a/public/images/admin/icons/filetype/medium/ADP.png b/public/images/admin/icons/filetype/medium/ADP.png new file mode 100755 index 00000000..c55a2536 Binary files /dev/null and b/public/images/admin/icons/filetype/medium/ADP.png differ diff --git a/public/images/admin/icons/filetype/medium/AI.png b/public/images/admin/icons/filetype/medium/AI.png new file mode 100755 index 00000000..594276e0 Binary files /dev/null and b/public/images/admin/icons/filetype/medium/AI.png differ diff --git a/public/images/admin/icons/filetype/medium/AIFF.png b/public/images/admin/icons/filetype/medium/AIFF.png new file mode 100755 index 00000000..01ce6892 Binary files /dev/null and b/public/images/admin/icons/filetype/medium/AIFF.png differ diff --git a/public/images/admin/icons/filetype/medium/AU.png b/public/images/admin/icons/filetype/medium/AU.png new file mode 100755 index 00000000..908a71c9 Binary files /dev/null and b/public/images/admin/icons/filetype/medium/AU.png differ diff --git a/public/images/admin/icons/filetype/medium/AVI.png b/public/images/admin/icons/filetype/medium/AVI.png new file mode 100755 index 00000000..203b6527 Binary files /dev/null and b/public/images/admin/icons/filetype/medium/AVI.png differ diff --git a/public/images/admin/icons/filetype/medium/BAT.png b/public/images/admin/icons/filetype/medium/BAT.png new file mode 100755 index 00000000..47c7b816 Binary files /dev/null and b/public/images/admin/icons/filetype/medium/BAT.png differ diff --git a/public/images/admin/icons/filetype/medium/BIN.png b/public/images/admin/icons/filetype/medium/BIN.png new file mode 100755 index 00000000..8e5d7fb5 Binary files /dev/null and b/public/images/admin/icons/filetype/medium/BIN.png differ diff --git a/public/images/admin/icons/filetype/medium/BMP.png b/public/images/admin/icons/filetype/medium/BMP.png new file mode 100755 index 00000000..2830910a Binary files /dev/null and b/public/images/admin/icons/filetype/medium/BMP.png differ diff --git a/public/images/admin/icons/filetype/medium/BUP.png b/public/images/admin/icons/filetype/medium/BUP.png new file mode 100755 index 00000000..f3d3111b Binary files /dev/null and b/public/images/admin/icons/filetype/medium/BUP.png differ diff --git a/public/images/admin/icons/filetype/medium/CAB.png b/public/images/admin/icons/filetype/medium/CAB.png new file mode 100755 index 00000000..33712248 Binary files /dev/null and b/public/images/admin/icons/filetype/medium/CAB.png differ diff --git a/public/images/admin/icons/filetype/medium/CAT.png b/public/images/admin/icons/filetype/medium/CAT.png new file mode 100755 index 00000000..0912225d Binary files /dev/null and b/public/images/admin/icons/filetype/medium/CAT.png differ diff --git a/public/images/admin/icons/filetype/medium/CHM.png b/public/images/admin/icons/filetype/medium/CHM.png new file mode 100755 index 00000000..0b06213d Binary files /dev/null and b/public/images/admin/icons/filetype/medium/CHM.png differ diff --git a/public/images/admin/icons/filetype/medium/CSS.png b/public/images/admin/icons/filetype/medium/CSS.png new file mode 100755 index 00000000..90ea5b9d Binary files /dev/null and b/public/images/admin/icons/filetype/medium/CSS.png differ diff --git a/public/images/admin/icons/filetype/medium/CUE.png b/public/images/admin/icons/filetype/medium/CUE.png new file mode 100755 index 00000000..d2a69107 Binary files /dev/null and b/public/images/admin/icons/filetype/medium/CUE.png differ diff --git a/public/images/admin/icons/filetype/medium/DAT.png b/public/images/admin/icons/filetype/medium/DAT.png new file mode 100755 index 00000000..298c50b6 Binary files /dev/null and b/public/images/admin/icons/filetype/medium/DAT.png differ diff --git a/public/images/admin/icons/filetype/medium/DCR.png b/public/images/admin/icons/filetype/medium/DCR.png new file mode 100755 index 00000000..abc2d0cf Binary files /dev/null and b/public/images/admin/icons/filetype/medium/DCR.png differ diff --git a/public/images/admin/icons/filetype/medium/DER.png b/public/images/admin/icons/filetype/medium/DER.png new file mode 100755 index 00000000..54509428 Binary files /dev/null and b/public/images/admin/icons/filetype/medium/DER.png differ diff --git a/public/images/admin/icons/filetype/medium/DIC.png b/public/images/admin/icons/filetype/medium/DIC.png new file mode 100755 index 00000000..94d4853c Binary files /dev/null and b/public/images/admin/icons/filetype/medium/DIC.png differ diff --git a/public/images/admin/icons/filetype/medium/DIVX.png b/public/images/admin/icons/filetype/medium/DIVX.png new file mode 100755 index 00000000..68855b03 Binary files /dev/null and b/public/images/admin/icons/filetype/medium/DIVX.png differ diff --git a/public/images/admin/icons/filetype/medium/DIZ.png b/public/images/admin/icons/filetype/medium/DIZ.png new file mode 100755 index 00000000..bb8014a6 Binary files /dev/null and b/public/images/admin/icons/filetype/medium/DIZ.png differ diff --git a/public/images/admin/icons/filetype/medium/DLL.png b/public/images/admin/icons/filetype/medium/DLL.png new file mode 100755 index 00000000..8ccad579 Binary files /dev/null and b/public/images/admin/icons/filetype/medium/DLL.png differ diff --git a/public/images/admin/icons/filetype/medium/DOC.png b/public/images/admin/icons/filetype/medium/DOC.png new file mode 100755 index 00000000..94b61557 Binary files /dev/null and b/public/images/admin/icons/filetype/medium/DOC.png differ diff --git a/public/images/admin/icons/filetype/medium/DOCX.png b/public/images/admin/icons/filetype/medium/DOCX.png new file mode 100755 index 00000000..73e1dd98 Binary files /dev/null and b/public/images/admin/icons/filetype/medium/DOCX.png differ diff --git a/public/images/admin/icons/filetype/medium/DOS.png b/public/images/admin/icons/filetype/medium/DOS.png new file mode 100755 index 00000000..4c36d4c1 Binary files /dev/null and b/public/images/admin/icons/filetype/medium/DOS.png differ diff --git a/public/images/admin/icons/filetype/medium/DVD.png b/public/images/admin/icons/filetype/medium/DVD.png new file mode 100755 index 00000000..878db81e Binary files /dev/null and b/public/images/admin/icons/filetype/medium/DVD.png differ diff --git a/public/images/admin/icons/filetype/medium/DWG.png b/public/images/admin/icons/filetype/medium/DWG.png new file mode 100755 index 00000000..7a4ae11b Binary files /dev/null and b/public/images/admin/icons/filetype/medium/DWG.png differ diff --git a/public/images/admin/icons/filetype/medium/DWT.png b/public/images/admin/icons/filetype/medium/DWT.png new file mode 100755 index 00000000..7a5a29ee Binary files /dev/null and b/public/images/admin/icons/filetype/medium/DWT.png differ diff --git a/public/images/admin/icons/filetype/medium/EMF.png b/public/images/admin/icons/filetype/medium/EMF.png new file mode 100755 index 00000000..65c4cb83 Binary files /dev/null and b/public/images/admin/icons/filetype/medium/EMF.png differ diff --git a/public/images/admin/icons/filetype/medium/EXC.png b/public/images/admin/icons/filetype/medium/EXC.png new file mode 100755 index 00000000..430b2e63 Binary files /dev/null and b/public/images/admin/icons/filetype/medium/EXC.png differ diff --git a/public/images/admin/icons/filetype/medium/FON.png b/public/images/admin/icons/filetype/medium/FON.png new file mode 100755 index 00000000..fd5b304f Binary files /dev/null and b/public/images/admin/icons/filetype/medium/FON.png differ diff --git a/public/images/admin/icons/filetype/medium/GIF.png b/public/images/admin/icons/filetype/medium/GIF.png new file mode 100755 index 00000000..e6714e64 Binary files /dev/null and b/public/images/admin/icons/filetype/medium/GIF.png differ diff --git a/public/images/admin/icons/filetype/medium/HLP.png b/public/images/admin/icons/filetype/medium/HLP.png new file mode 100755 index 00000000..efd79fbb Binary files /dev/null and b/public/images/admin/icons/filetype/medium/HLP.png differ diff --git a/public/images/admin/icons/filetype/medium/HTML.png b/public/images/admin/icons/filetype/medium/HTML.png new file mode 100755 index 00000000..a516d492 Binary files /dev/null and b/public/images/admin/icons/filetype/medium/HTML.png differ diff --git a/public/images/admin/icons/filetype/medium/IFO.png b/public/images/admin/icons/filetype/medium/IFO.png new file mode 100755 index 00000000..6a01d06d Binary files /dev/null and b/public/images/admin/icons/filetype/medium/IFO.png differ diff --git a/public/images/admin/icons/filetype/medium/INF.png b/public/images/admin/icons/filetype/medium/INF.png new file mode 100755 index 00000000..198ecf2f Binary files /dev/null and b/public/images/admin/icons/filetype/medium/INF.png differ diff --git a/public/images/admin/icons/filetype/medium/INI.png b/public/images/admin/icons/filetype/medium/INI.png new file mode 100755 index 00000000..ee130564 Binary files /dev/null and b/public/images/admin/icons/filetype/medium/INI.png differ diff --git a/public/images/admin/icons/filetype/medium/INS.png b/public/images/admin/icons/filetype/medium/INS.png new file mode 100755 index 00000000..7c15240b Binary files /dev/null and b/public/images/admin/icons/filetype/medium/INS.png differ diff --git a/public/images/admin/icons/filetype/medium/IP.png b/public/images/admin/icons/filetype/medium/IP.png new file mode 100755 index 00000000..0f74bf95 Binary files /dev/null and b/public/images/admin/icons/filetype/medium/IP.png differ diff --git a/public/images/admin/icons/filetype/medium/ISO.png b/public/images/admin/icons/filetype/medium/ISO.png new file mode 100755 index 00000000..fc978cfd Binary files /dev/null and b/public/images/admin/icons/filetype/medium/ISO.png differ diff --git a/public/images/admin/icons/filetype/medium/ISP.png b/public/images/admin/icons/filetype/medium/ISP.png new file mode 100755 index 00000000..b59a2170 Binary files /dev/null and b/public/images/admin/icons/filetype/medium/ISP.png differ diff --git a/public/images/admin/icons/filetype/medium/JAVA.png b/public/images/admin/icons/filetype/medium/JAVA.png new file mode 100755 index 00000000..a9e5a5d6 Binary files /dev/null and b/public/images/admin/icons/filetype/medium/JAVA.png differ diff --git a/public/images/admin/icons/filetype/medium/JFIF.png b/public/images/admin/icons/filetype/medium/JFIF.png new file mode 100755 index 00000000..9cc91bbf Binary files /dev/null and b/public/images/admin/icons/filetype/medium/JFIF.png differ diff --git a/public/images/admin/icons/filetype/medium/JPEG.png b/public/images/admin/icons/filetype/medium/JPEG.png new file mode 100755 index 00000000..5f6e9312 Binary files /dev/null and b/public/images/admin/icons/filetype/medium/JPEG.png differ diff --git a/public/images/admin/icons/filetype/medium/JPG.png b/public/images/admin/icons/filetype/medium/JPG.png new file mode 100755 index 00000000..144a1a18 Binary files /dev/null and b/public/images/admin/icons/filetype/medium/JPG.png differ diff --git a/public/images/admin/icons/filetype/medium/LOG.png b/public/images/admin/icons/filetype/medium/LOG.png new file mode 100755 index 00000000..1c01e9f3 Binary files /dev/null and b/public/images/admin/icons/filetype/medium/LOG.png differ diff --git a/public/images/admin/icons/filetype/medium/M4A.png b/public/images/admin/icons/filetype/medium/M4A.png new file mode 100755 index 00000000..d55c5599 Binary files /dev/null and b/public/images/admin/icons/filetype/medium/M4A.png differ diff --git a/public/images/admin/icons/filetype/medium/MID.png b/public/images/admin/icons/filetype/medium/MID.png new file mode 100755 index 00000000..ac416ef9 Binary files /dev/null and b/public/images/admin/icons/filetype/medium/MID.png differ diff --git a/public/images/admin/icons/filetype/medium/MMF.png b/public/images/admin/icons/filetype/medium/MMF.png new file mode 100755 index 00000000..47c8fe73 Binary files /dev/null and b/public/images/admin/icons/filetype/medium/MMF.png differ diff --git a/public/images/admin/icons/filetype/medium/MMM.png b/public/images/admin/icons/filetype/medium/MMM.png new file mode 100755 index 00000000..a0ae8bec Binary files /dev/null and b/public/images/admin/icons/filetype/medium/MMM.png differ diff --git a/public/images/admin/icons/filetype/medium/MOV.png b/public/images/admin/icons/filetype/medium/MOV.png new file mode 100755 index 00000000..f79caa27 Binary files /dev/null and b/public/images/admin/icons/filetype/medium/MOV.png differ diff --git a/public/images/admin/icons/filetype/medium/MOVIE.png b/public/images/admin/icons/filetype/medium/MOVIE.png new file mode 100755 index 00000000..24565497 Binary files /dev/null and b/public/images/admin/icons/filetype/medium/MOVIE.png differ diff --git a/public/images/admin/icons/filetype/medium/MP2.png b/public/images/admin/icons/filetype/medium/MP2.png new file mode 100755 index 00000000..7d5ac753 Binary files /dev/null and b/public/images/admin/icons/filetype/medium/MP2.png differ diff --git a/public/images/admin/icons/filetype/medium/MP2V.png b/public/images/admin/icons/filetype/medium/MP2V.png new file mode 100755 index 00000000..047e78a8 Binary files /dev/null and b/public/images/admin/icons/filetype/medium/MP2V.png differ diff --git a/public/images/admin/icons/filetype/medium/MP3.png b/public/images/admin/icons/filetype/medium/MP3.png new file mode 100755 index 00000000..5fc34cc9 Binary files /dev/null and b/public/images/admin/icons/filetype/medium/MP3.png differ diff --git a/public/images/admin/icons/filetype/medium/MP4.png b/public/images/admin/icons/filetype/medium/MP4.png new file mode 100755 index 00000000..9b222500 Binary files /dev/null and b/public/images/admin/icons/filetype/medium/MP4.png differ diff --git a/public/images/admin/icons/filetype/medium/MPE.png b/public/images/admin/icons/filetype/medium/MPE.png new file mode 100755 index 00000000..ac2867aa Binary files /dev/null and b/public/images/admin/icons/filetype/medium/MPE.png differ diff --git a/public/images/admin/icons/filetype/medium/MPEG.png b/public/images/admin/icons/filetype/medium/MPEG.png new file mode 100755 index 00000000..79aca5ce Binary files /dev/null and b/public/images/admin/icons/filetype/medium/MPEG.png differ diff --git a/public/images/admin/icons/filetype/medium/MPG.png b/public/images/admin/icons/filetype/medium/MPG.png new file mode 100755 index 00000000..79e78187 Binary files /dev/null and b/public/images/admin/icons/filetype/medium/MPG.png differ diff --git a/public/images/admin/icons/filetype/medium/MPV2.png b/public/images/admin/icons/filetype/medium/MPV2.png new file mode 100755 index 00000000..b468f4d3 Binary files /dev/null and b/public/images/admin/icons/filetype/medium/MPV2.png differ diff --git a/public/images/admin/icons/filetype/medium/NFO.png b/public/images/admin/icons/filetype/medium/NFO.png new file mode 100755 index 00000000..555fd67c Binary files /dev/null and b/public/images/admin/icons/filetype/medium/NFO.png differ diff --git a/public/images/admin/icons/filetype/medium/PDD.png b/public/images/admin/icons/filetype/medium/PDD.png new file mode 100755 index 00000000..49581e80 Binary files /dev/null and b/public/images/admin/icons/filetype/medium/PDD.png differ diff --git a/public/images/admin/icons/filetype/medium/PDF.png b/public/images/admin/icons/filetype/medium/PDF.png new file mode 100755 index 00000000..6bbb0abf Binary files /dev/null and b/public/images/admin/icons/filetype/medium/PDF.png differ diff --git a/public/images/admin/icons/filetype/medium/PHP.png b/public/images/admin/icons/filetype/medium/PHP.png new file mode 100755 index 00000000..3daf6d7f Binary files /dev/null and b/public/images/admin/icons/filetype/medium/PHP.png differ diff --git a/public/images/admin/icons/filetype/medium/PNG.png b/public/images/admin/icons/filetype/medium/PNG.png new file mode 100755 index 00000000..6eedbfd7 Binary files /dev/null and b/public/images/admin/icons/filetype/medium/PNG.png differ diff --git a/public/images/admin/icons/filetype/medium/PPT.png b/public/images/admin/icons/filetype/medium/PPT.png new file mode 100755 index 00000000..90152607 Binary files /dev/null and b/public/images/admin/icons/filetype/medium/PPT.png differ diff --git a/public/images/admin/icons/filetype/medium/PPTX.png b/public/images/admin/icons/filetype/medium/PPTX.png new file mode 100755 index 00000000..f175e03a Binary files /dev/null and b/public/images/admin/icons/filetype/medium/PPTX.png differ diff --git a/public/images/admin/icons/filetype/medium/PSD.png b/public/images/admin/icons/filetype/medium/PSD.png new file mode 100755 index 00000000..f79ba974 Binary files /dev/null and b/public/images/admin/icons/filetype/medium/PSD.png differ diff --git a/public/images/admin/icons/filetype/medium/RAR.png b/public/images/admin/icons/filetype/medium/RAR.png new file mode 100755 index 00000000..35f6ba13 Binary files /dev/null and b/public/images/admin/icons/filetype/medium/RAR.png differ diff --git a/public/images/admin/icons/filetype/medium/REG.png b/public/images/admin/icons/filetype/medium/REG.png new file mode 100755 index 00000000..890a30a6 Binary files /dev/null and b/public/images/admin/icons/filetype/medium/REG.png differ diff --git a/public/images/admin/icons/filetype/medium/RTF.png b/public/images/admin/icons/filetype/medium/RTF.png new file mode 100755 index 00000000..55f0e1a8 Binary files /dev/null and b/public/images/admin/icons/filetype/medium/RTF.png differ diff --git a/public/images/admin/icons/filetype/medium/SCP.png b/public/images/admin/icons/filetype/medium/SCP.png new file mode 100755 index 00000000..9a9e185f Binary files /dev/null and b/public/images/admin/icons/filetype/medium/SCP.png differ diff --git a/public/images/admin/icons/filetype/medium/THEME.png b/public/images/admin/icons/filetype/medium/THEME.png new file mode 100755 index 00000000..b38445d4 Binary files /dev/null and b/public/images/admin/icons/filetype/medium/THEME.png differ diff --git a/public/images/admin/icons/filetype/medium/TIF.png b/public/images/admin/icons/filetype/medium/TIF.png new file mode 100755 index 00000000..d12dbbb3 Binary files /dev/null and b/public/images/admin/icons/filetype/medium/TIF.png differ diff --git a/public/images/admin/icons/filetype/medium/TIFF.png b/public/images/admin/icons/filetype/medium/TIFF.png new file mode 100755 index 00000000..1cb1ceb3 Binary files /dev/null and b/public/images/admin/icons/filetype/medium/TIFF.png differ diff --git a/public/images/admin/icons/filetype/medium/TLB.png b/public/images/admin/icons/filetype/medium/TLB.png new file mode 100755 index 00000000..89153e8a Binary files /dev/null and b/public/images/admin/icons/filetype/medium/TLB.png differ diff --git a/public/images/admin/icons/filetype/medium/TTF.png b/public/images/admin/icons/filetype/medium/TTF.png new file mode 100755 index 00000000..24abfe4e Binary files /dev/null and b/public/images/admin/icons/filetype/medium/TTF.png differ diff --git a/public/images/admin/icons/filetype/medium/TXT.png b/public/images/admin/icons/filetype/medium/TXT.png new file mode 100755 index 00000000..e5fe9d75 Binary files /dev/null and b/public/images/admin/icons/filetype/medium/TXT.png differ diff --git a/public/images/admin/icons/filetype/medium/Thumbs.db b/public/images/admin/icons/filetype/medium/Thumbs.db new file mode 100755 index 00000000..2e1843a5 Binary files /dev/null and b/public/images/admin/icons/filetype/medium/Thumbs.db differ diff --git a/public/images/admin/icons/filetype/medium/UIS.png b/public/images/admin/icons/filetype/medium/UIS.png new file mode 100755 index 00000000..2d1f95fb Binary files /dev/null and b/public/images/admin/icons/filetype/medium/UIS.png differ diff --git a/public/images/admin/icons/filetype/medium/URL.png b/public/images/admin/icons/filetype/medium/URL.png new file mode 100755 index 00000000..83af6616 Binary files /dev/null and b/public/images/admin/icons/filetype/medium/URL.png differ diff --git a/public/images/admin/icons/filetype/medium/VBS.png b/public/images/admin/icons/filetype/medium/VBS.png new file mode 100755 index 00000000..46f86483 Binary files /dev/null and b/public/images/admin/icons/filetype/medium/VBS.png differ diff --git a/public/images/admin/icons/filetype/medium/VCR.png b/public/images/admin/icons/filetype/medium/VCR.png new file mode 100755 index 00000000..a72907c0 Binary files /dev/null and b/public/images/admin/icons/filetype/medium/VCR.png differ diff --git a/public/images/admin/icons/filetype/medium/VOB.png b/public/images/admin/icons/filetype/medium/VOB.png new file mode 100755 index 00000000..d3564ed3 Binary files /dev/null and b/public/images/admin/icons/filetype/medium/VOB.png differ diff --git a/public/images/admin/icons/filetype/medium/WAV.png b/public/images/admin/icons/filetype/medium/WAV.png new file mode 100755 index 00000000..065703b9 Binary files /dev/null and b/public/images/admin/icons/filetype/medium/WAV.png differ diff --git a/public/images/admin/icons/filetype/medium/WBA.png b/public/images/admin/icons/filetype/medium/WBA.png new file mode 100755 index 00000000..75b3a03d Binary files /dev/null and b/public/images/admin/icons/filetype/medium/WBA.png differ diff --git a/public/images/admin/icons/filetype/medium/WMA.png b/public/images/admin/icons/filetype/medium/WMA.png new file mode 100755 index 00000000..e8f079b9 Binary files /dev/null and b/public/images/admin/icons/filetype/medium/WMA.png differ diff --git a/public/images/admin/icons/filetype/medium/WMV.png b/public/images/admin/icons/filetype/medium/WMV.png new file mode 100755 index 00000000..242ed4f5 Binary files /dev/null and b/public/images/admin/icons/filetype/medium/WMV.png differ diff --git a/public/images/admin/icons/filetype/medium/WPL.png b/public/images/admin/icons/filetype/medium/WPL.png new file mode 100755 index 00000000..9ed486aa Binary files /dev/null and b/public/images/admin/icons/filetype/medium/WPL.png differ diff --git a/public/images/admin/icons/filetype/medium/WRI.png b/public/images/admin/icons/filetype/medium/WRI.png new file mode 100755 index 00000000..29451a25 Binary files /dev/null and b/public/images/admin/icons/filetype/medium/WRI.png differ diff --git a/public/images/admin/icons/filetype/medium/WTX.png b/public/images/admin/icons/filetype/medium/WTX.png new file mode 100755 index 00000000..cbce46de Binary files /dev/null and b/public/images/admin/icons/filetype/medium/WTX.png differ diff --git a/public/images/admin/icons/filetype/medium/XLS.png b/public/images/admin/icons/filetype/medium/XLS.png new file mode 100755 index 00000000..6bceb26b Binary files /dev/null and b/public/images/admin/icons/filetype/medium/XLS.png differ diff --git a/public/images/admin/icons/filetype/medium/XLSX.png b/public/images/admin/icons/filetype/medium/XLSX.png new file mode 100755 index 00000000..2790116e Binary files /dev/null and b/public/images/admin/icons/filetype/medium/XLSX.png differ diff --git a/public/images/admin/icons/filetype/medium/XML.png b/public/images/admin/icons/filetype/medium/XML.png new file mode 100755 index 00000000..b4484adc Binary files /dev/null and b/public/images/admin/icons/filetype/medium/XML.png differ diff --git a/public/images/admin/icons/filetype/medium/XSL.png b/public/images/admin/icons/filetype/medium/XSL.png new file mode 100755 index 00000000..6bceb26b Binary files /dev/null and b/public/images/admin/icons/filetype/medium/XSL.png differ diff --git a/public/images/admin/icons/filetype/medium/ZAP.png b/public/images/admin/icons/filetype/medium/ZAP.png new file mode 100755 index 00000000..31f085ea Binary files /dev/null and b/public/images/admin/icons/filetype/medium/ZAP.png differ diff --git a/public/images/admin/icons/filetype/medium/ZIP.png b/public/images/admin/icons/filetype/medium/ZIP.png new file mode 100755 index 00000000..721c7022 Binary files /dev/null and b/public/images/admin/icons/filetype/medium/ZIP.png differ diff --git a/public/images/admin/icons/filetype/medium/unknown.png b/public/images/admin/icons/filetype/medium/unknown.png new file mode 100755 index 00000000..3047948a Binary files /dev/null and b/public/images/admin/icons/filetype/medium/unknown.png differ diff --git a/public/images/admin/icons/filetype/thumb/AC3.png b/public/images/admin/icons/filetype/thumb/AC3.png new file mode 100755 index 00000000..d6cf4a4b Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/AC3.png differ diff --git a/public/images/admin/icons/filetype/thumb/ACE.png b/public/images/admin/icons/filetype/thumb/ACE.png new file mode 100755 index 00000000..5f41ccaf Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/ACE.png differ diff --git a/public/images/admin/icons/filetype/thumb/ADE.png b/public/images/admin/icons/filetype/thumb/ADE.png new file mode 100755 index 00000000..127313aa Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/ADE.png differ diff --git a/public/images/admin/icons/filetype/thumb/ADP.png b/public/images/admin/icons/filetype/thumb/ADP.png new file mode 100755 index 00000000..98b67c58 Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/ADP.png differ diff --git a/public/images/admin/icons/filetype/thumb/AI.png b/public/images/admin/icons/filetype/thumb/AI.png new file mode 100755 index 00000000..8ea80e37 Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/AI.png differ diff --git a/public/images/admin/icons/filetype/thumb/AIFF.png b/public/images/admin/icons/filetype/thumb/AIFF.png new file mode 100755 index 00000000..77e572d4 Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/AIFF.png differ diff --git a/public/images/admin/icons/filetype/thumb/AU.png b/public/images/admin/icons/filetype/thumb/AU.png new file mode 100755 index 00000000..953f7ddc Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/AU.png differ diff --git a/public/images/admin/icons/filetype/thumb/AVI.png b/public/images/admin/icons/filetype/thumb/AVI.png new file mode 100755 index 00000000..05cb6555 Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/AVI.png differ diff --git a/public/images/admin/icons/filetype/thumb/BAT.png b/public/images/admin/icons/filetype/thumb/BAT.png new file mode 100755 index 00000000..4fa6a19a Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/BAT.png differ diff --git a/public/images/admin/icons/filetype/thumb/BIN.png b/public/images/admin/icons/filetype/thumb/BIN.png new file mode 100755 index 00000000..8df510de Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/BIN.png differ diff --git a/public/images/admin/icons/filetype/thumb/BMP.png b/public/images/admin/icons/filetype/thumb/BMP.png new file mode 100755 index 00000000..db8194bb Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/BMP.png differ diff --git a/public/images/admin/icons/filetype/thumb/BUP.png b/public/images/admin/icons/filetype/thumb/BUP.png new file mode 100755 index 00000000..157a7efe Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/BUP.png differ diff --git a/public/images/admin/icons/filetype/thumb/CAB.png b/public/images/admin/icons/filetype/thumb/CAB.png new file mode 100755 index 00000000..3bb36436 Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/CAB.png differ diff --git a/public/images/admin/icons/filetype/thumb/CAT.png b/public/images/admin/icons/filetype/thumb/CAT.png new file mode 100755 index 00000000..41bfb31b Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/CAT.png differ diff --git a/public/images/admin/icons/filetype/thumb/CHM.png b/public/images/admin/icons/filetype/thumb/CHM.png new file mode 100755 index 00000000..8348e0d9 Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/CHM.png differ diff --git a/public/images/admin/icons/filetype/thumb/CSS.png b/public/images/admin/icons/filetype/thumb/CSS.png new file mode 100755 index 00000000..7cefd49f Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/CSS.png differ diff --git a/public/images/admin/icons/filetype/thumb/CUE.png b/public/images/admin/icons/filetype/thumb/CUE.png new file mode 100755 index 00000000..2700becd Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/CUE.png differ diff --git a/public/images/admin/icons/filetype/thumb/DAT.png b/public/images/admin/icons/filetype/thumb/DAT.png new file mode 100755 index 00000000..48c953ab Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/DAT.png differ diff --git a/public/images/admin/icons/filetype/thumb/DCR.png b/public/images/admin/icons/filetype/thumb/DCR.png new file mode 100755 index 00000000..3dfd0ccb Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/DCR.png differ diff --git a/public/images/admin/icons/filetype/thumb/DER.png b/public/images/admin/icons/filetype/thumb/DER.png new file mode 100755 index 00000000..dbff73cd Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/DER.png differ diff --git a/public/images/admin/icons/filetype/thumb/DIC.png b/public/images/admin/icons/filetype/thumb/DIC.png new file mode 100755 index 00000000..6a001aa4 Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/DIC.png differ diff --git a/public/images/admin/icons/filetype/thumb/DIVX.png b/public/images/admin/icons/filetype/thumb/DIVX.png new file mode 100755 index 00000000..6fc87cec Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/DIVX.png differ diff --git a/public/images/admin/icons/filetype/thumb/DIZ.png b/public/images/admin/icons/filetype/thumb/DIZ.png new file mode 100755 index 00000000..1812747f Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/DIZ.png differ diff --git a/public/images/admin/icons/filetype/thumb/DLL.png b/public/images/admin/icons/filetype/thumb/DLL.png new file mode 100755 index 00000000..ba852278 Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/DLL.png differ diff --git a/public/images/admin/icons/filetype/thumb/DOC.png b/public/images/admin/icons/filetype/thumb/DOC.png new file mode 100755 index 00000000..3e9e6557 Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/DOC.png differ diff --git a/public/images/admin/icons/filetype/thumb/DOCX.png b/public/images/admin/icons/filetype/thumb/DOCX.png new file mode 100755 index 00000000..d6b3b4ad Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/DOCX.png differ diff --git a/public/images/admin/icons/filetype/thumb/DOS.png b/public/images/admin/icons/filetype/thumb/DOS.png new file mode 100755 index 00000000..b2631f3b Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/DOS.png differ diff --git a/public/images/admin/icons/filetype/thumb/DVD.png b/public/images/admin/icons/filetype/thumb/DVD.png new file mode 100755 index 00000000..9c1b87b6 Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/DVD.png differ diff --git a/public/images/admin/icons/filetype/thumb/DWG.png b/public/images/admin/icons/filetype/thumb/DWG.png new file mode 100755 index 00000000..2973e2cb Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/DWG.png differ diff --git a/public/images/admin/icons/filetype/thumb/DWT.png b/public/images/admin/icons/filetype/thumb/DWT.png new file mode 100755 index 00000000..cc8a00ba Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/DWT.png differ diff --git a/public/images/admin/icons/filetype/thumb/EMF.png b/public/images/admin/icons/filetype/thumb/EMF.png new file mode 100755 index 00000000..1f031d37 Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/EMF.png differ diff --git a/public/images/admin/icons/filetype/thumb/EXC.png b/public/images/admin/icons/filetype/thumb/EXC.png new file mode 100755 index 00000000..3dd092f6 Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/EXC.png differ diff --git a/public/images/admin/icons/filetype/thumb/FON.png b/public/images/admin/icons/filetype/thumb/FON.png new file mode 100755 index 00000000..0752b6bc Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/FON.png differ diff --git a/public/images/admin/icons/filetype/thumb/GIF.png b/public/images/admin/icons/filetype/thumb/GIF.png new file mode 100755 index 00000000..d6d9afe3 Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/GIF.png differ diff --git a/public/images/admin/icons/filetype/thumb/HLP.png b/public/images/admin/icons/filetype/thumb/HLP.png new file mode 100755 index 00000000..6b7860cb Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/HLP.png differ diff --git a/public/images/admin/icons/filetype/thumb/HTML.png b/public/images/admin/icons/filetype/thumb/HTML.png new file mode 100755 index 00000000..dca4082d Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/HTML.png differ diff --git a/public/images/admin/icons/filetype/thumb/IFO.png b/public/images/admin/icons/filetype/thumb/IFO.png new file mode 100755 index 00000000..fb64edd8 Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/IFO.png differ diff --git a/public/images/admin/icons/filetype/thumb/INF.png b/public/images/admin/icons/filetype/thumb/INF.png new file mode 100755 index 00000000..9ad74a2a Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/INF.png differ diff --git a/public/images/admin/icons/filetype/thumb/INI.png b/public/images/admin/icons/filetype/thumb/INI.png new file mode 100755 index 00000000..6147995a Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/INI.png differ diff --git a/public/images/admin/icons/filetype/thumb/INS.png b/public/images/admin/icons/filetype/thumb/INS.png new file mode 100755 index 00000000..dc1154db Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/INS.png differ diff --git a/public/images/admin/icons/filetype/thumb/IP.png b/public/images/admin/icons/filetype/thumb/IP.png new file mode 100755 index 00000000..5a485000 Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/IP.png differ diff --git a/public/images/admin/icons/filetype/thumb/ISO.png b/public/images/admin/icons/filetype/thumb/ISO.png new file mode 100755 index 00000000..d3b675ae Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/ISO.png differ diff --git a/public/images/admin/icons/filetype/thumb/ISP.png b/public/images/admin/icons/filetype/thumb/ISP.png new file mode 100755 index 00000000..caf0ae64 Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/ISP.png differ diff --git a/public/images/admin/icons/filetype/thumb/JAVA.png b/public/images/admin/icons/filetype/thumb/JAVA.png new file mode 100755 index 00000000..4e5e6b6b Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/JAVA.png differ diff --git a/public/images/admin/icons/filetype/thumb/JFIF.png b/public/images/admin/icons/filetype/thumb/JFIF.png new file mode 100755 index 00000000..51f193bc Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/JFIF.png differ diff --git a/public/images/admin/icons/filetype/thumb/JPEG.png b/public/images/admin/icons/filetype/thumb/JPEG.png new file mode 100755 index 00000000..ca7ce357 Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/JPEG.png differ diff --git a/public/images/admin/icons/filetype/thumb/JPG.png b/public/images/admin/icons/filetype/thumb/JPG.png new file mode 100755 index 00000000..dfd30bd5 Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/JPG.png differ diff --git a/public/images/admin/icons/filetype/thumb/LOG.png b/public/images/admin/icons/filetype/thumb/LOG.png new file mode 100755 index 00000000..18ff67eb Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/LOG.png differ diff --git a/public/images/admin/icons/filetype/thumb/M4A.png b/public/images/admin/icons/filetype/thumb/M4A.png new file mode 100755 index 00000000..968061c2 Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/M4A.png differ diff --git a/public/images/admin/icons/filetype/thumb/MID.png b/public/images/admin/icons/filetype/thumb/MID.png new file mode 100755 index 00000000..f8283c62 Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/MID.png differ diff --git a/public/images/admin/icons/filetype/thumb/MMF.png b/public/images/admin/icons/filetype/thumb/MMF.png new file mode 100755 index 00000000..8ce44516 Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/MMF.png differ diff --git a/public/images/admin/icons/filetype/thumb/MMM.png b/public/images/admin/icons/filetype/thumb/MMM.png new file mode 100755 index 00000000..c5528c21 Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/MMM.png differ diff --git a/public/images/admin/icons/filetype/thumb/MOV.png b/public/images/admin/icons/filetype/thumb/MOV.png new file mode 100755 index 00000000..1637de96 Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/MOV.png differ diff --git a/public/images/admin/icons/filetype/thumb/MOVIE.png b/public/images/admin/icons/filetype/thumb/MOVIE.png new file mode 100755 index 00000000..e6d5fdaf Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/MOVIE.png differ diff --git a/public/images/admin/icons/filetype/thumb/MP2.png b/public/images/admin/icons/filetype/thumb/MP2.png new file mode 100755 index 00000000..2c88dec9 Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/MP2.png differ diff --git a/public/images/admin/icons/filetype/thumb/MP2V.png b/public/images/admin/icons/filetype/thumb/MP2V.png new file mode 100755 index 00000000..e7157fad Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/MP2V.png differ diff --git a/public/images/admin/icons/filetype/thumb/MP3.png b/public/images/admin/icons/filetype/thumb/MP3.png new file mode 100755 index 00000000..36ba3e93 Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/MP3.png differ diff --git a/public/images/admin/icons/filetype/thumb/MP4.png b/public/images/admin/icons/filetype/thumb/MP4.png new file mode 100755 index 00000000..98712e1a Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/MP4.png differ diff --git a/public/images/admin/icons/filetype/thumb/MPE.png b/public/images/admin/icons/filetype/thumb/MPE.png new file mode 100755 index 00000000..5e3979a2 Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/MPE.png differ diff --git a/public/images/admin/icons/filetype/thumb/MPEG.png b/public/images/admin/icons/filetype/thumb/MPEG.png new file mode 100755 index 00000000..74132f89 Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/MPEG.png differ diff --git a/public/images/admin/icons/filetype/thumb/MPG.png b/public/images/admin/icons/filetype/thumb/MPG.png new file mode 100755 index 00000000..c81b7126 Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/MPG.png differ diff --git a/public/images/admin/icons/filetype/thumb/MPV2.png b/public/images/admin/icons/filetype/thumb/MPV2.png new file mode 100755 index 00000000..2918bc8b Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/MPV2.png differ diff --git a/public/images/admin/icons/filetype/thumb/NFO.png b/public/images/admin/icons/filetype/thumb/NFO.png new file mode 100755 index 00000000..0207f0ea Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/NFO.png differ diff --git a/public/images/admin/icons/filetype/thumb/PDD.png b/public/images/admin/icons/filetype/thumb/PDD.png new file mode 100755 index 00000000..b18c0109 Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/PDD.png differ diff --git a/public/images/admin/icons/filetype/thumb/PDF.png b/public/images/admin/icons/filetype/thumb/PDF.png new file mode 100755 index 00000000..4e4d8003 Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/PDF.png differ diff --git a/public/images/admin/icons/filetype/thumb/PHP.png b/public/images/admin/icons/filetype/thumb/PHP.png new file mode 100755 index 00000000..6386c47f Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/PHP.png differ diff --git a/public/images/admin/icons/filetype/thumb/PNG.png b/public/images/admin/icons/filetype/thumb/PNG.png new file mode 100755 index 00000000..735c944c Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/PNG.png differ diff --git a/public/images/admin/icons/filetype/thumb/PPT.png b/public/images/admin/icons/filetype/thumb/PPT.png new file mode 100755 index 00000000..b850eea6 Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/PPT.png differ diff --git a/public/images/admin/icons/filetype/thumb/PPTX.png b/public/images/admin/icons/filetype/thumb/PPTX.png new file mode 100755 index 00000000..12d46f69 Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/PPTX.png differ diff --git a/public/images/admin/icons/filetype/thumb/PSD.png b/public/images/admin/icons/filetype/thumb/PSD.png new file mode 100755 index 00000000..fa123524 Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/PSD.png differ diff --git a/public/images/admin/icons/filetype/thumb/RAR.png b/public/images/admin/icons/filetype/thumb/RAR.png new file mode 100755 index 00000000..603fb7b9 Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/RAR.png differ diff --git a/public/images/admin/icons/filetype/thumb/REG.png b/public/images/admin/icons/filetype/thumb/REG.png new file mode 100755 index 00000000..ec8550c2 Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/REG.png differ diff --git a/public/images/admin/icons/filetype/thumb/RTF.png b/public/images/admin/icons/filetype/thumb/RTF.png new file mode 100755 index 00000000..6d3fff41 Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/RTF.png differ diff --git a/public/images/admin/icons/filetype/thumb/SCP.png b/public/images/admin/icons/filetype/thumb/SCP.png new file mode 100755 index 00000000..9b7f3ec1 Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/SCP.png differ diff --git a/public/images/admin/icons/filetype/thumb/THEME.png b/public/images/admin/icons/filetype/thumb/THEME.png new file mode 100755 index 00000000..41ffaaaa Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/THEME.png differ diff --git a/public/images/admin/icons/filetype/thumb/TIF.png b/public/images/admin/icons/filetype/thumb/TIF.png new file mode 100755 index 00000000..cadf7cb7 Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/TIF.png differ diff --git a/public/images/admin/icons/filetype/thumb/TIFF.png b/public/images/admin/icons/filetype/thumb/TIFF.png new file mode 100755 index 00000000..426ff250 Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/TIFF.png differ diff --git a/public/images/admin/icons/filetype/thumb/TLB.png b/public/images/admin/icons/filetype/thumb/TLB.png new file mode 100755 index 00000000..40ae7947 Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/TLB.png differ diff --git a/public/images/admin/icons/filetype/thumb/TTF.png b/public/images/admin/icons/filetype/thumb/TTF.png new file mode 100755 index 00000000..4fd9d570 Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/TTF.png differ diff --git a/public/images/admin/icons/filetype/thumb/TXT.png b/public/images/admin/icons/filetype/thumb/TXT.png new file mode 100755 index 00000000..d045f1f8 Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/TXT.png differ diff --git a/public/images/admin/icons/filetype/thumb/UIS.png b/public/images/admin/icons/filetype/thumb/UIS.png new file mode 100755 index 00000000..e30ff7f4 Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/UIS.png differ diff --git a/public/images/admin/icons/filetype/thumb/URL.png b/public/images/admin/icons/filetype/thumb/URL.png new file mode 100755 index 00000000..c571cb6d Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/URL.png differ diff --git a/public/images/admin/icons/filetype/thumb/VBS.png b/public/images/admin/icons/filetype/thumb/VBS.png new file mode 100755 index 00000000..616cf6c4 Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/VBS.png differ diff --git a/public/images/admin/icons/filetype/thumb/VCR.png b/public/images/admin/icons/filetype/thumb/VCR.png new file mode 100755 index 00000000..bde210b8 Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/VCR.png differ diff --git a/public/images/admin/icons/filetype/thumb/VOB.png b/public/images/admin/icons/filetype/thumb/VOB.png new file mode 100755 index 00000000..9c252895 Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/VOB.png differ diff --git a/public/images/admin/icons/filetype/thumb/WAV.png b/public/images/admin/icons/filetype/thumb/WAV.png new file mode 100755 index 00000000..84bfbef5 Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/WAV.png differ diff --git a/public/images/admin/icons/filetype/thumb/WBA.png b/public/images/admin/icons/filetype/thumb/WBA.png new file mode 100755 index 00000000..bfc370d8 Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/WBA.png differ diff --git a/public/images/admin/icons/filetype/thumb/WMA.png b/public/images/admin/icons/filetype/thumb/WMA.png new file mode 100755 index 00000000..81590145 Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/WMA.png differ diff --git a/public/images/admin/icons/filetype/thumb/WMV.png b/public/images/admin/icons/filetype/thumb/WMV.png new file mode 100755 index 00000000..ad064702 Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/WMV.png differ diff --git a/public/images/admin/icons/filetype/thumb/WPL.png b/public/images/admin/icons/filetype/thumb/WPL.png new file mode 100755 index 00000000..12a97205 Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/WPL.png differ diff --git a/public/images/admin/icons/filetype/thumb/WRI.png b/public/images/admin/icons/filetype/thumb/WRI.png new file mode 100755 index 00000000..ee994ee4 Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/WRI.png differ diff --git a/public/images/admin/icons/filetype/thumb/WTX.png b/public/images/admin/icons/filetype/thumb/WTX.png new file mode 100755 index 00000000..1b97fe51 Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/WTX.png differ diff --git a/public/images/admin/icons/filetype/thumb/XLS.png b/public/images/admin/icons/filetype/thumb/XLS.png new file mode 100755 index 00000000..82ba2720 Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/XLS.png differ diff --git a/public/images/admin/icons/filetype/thumb/XLSX.png b/public/images/admin/icons/filetype/thumb/XLSX.png new file mode 100755 index 00000000..4558f265 Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/XLSX.png differ diff --git a/public/images/admin/icons/filetype/thumb/XML.png b/public/images/admin/icons/filetype/thumb/XML.png new file mode 100755 index 00000000..d2ab3f29 Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/XML.png differ diff --git a/public/images/admin/icons/filetype/thumb/XSL.png b/public/images/admin/icons/filetype/thumb/XSL.png new file mode 100755 index 00000000..82ba2720 Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/XSL.png differ diff --git a/public/images/admin/icons/filetype/thumb/ZAP.png b/public/images/admin/icons/filetype/thumb/ZAP.png new file mode 100755 index 00000000..abf2b96c Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/ZAP.png differ diff --git a/public/images/admin/icons/filetype/thumb/ZIP.png b/public/images/admin/icons/filetype/thumb/ZIP.png new file mode 100755 index 00000000..0ad1d82a Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/ZIP.png differ diff --git a/public/images/admin/icons/filetype/thumb/unknown.png b/public/images/admin/icons/filetype/thumb/unknown.png new file mode 100755 index 00000000..4ec71ccd Binary files /dev/null and b/public/images/admin/icons/filetype/thumb/unknown.png differ diff --git a/public/images/admin/flags/en.png b/public/images/admin/icons/flags/en.png similarity index 100% rename from public/images/admin/flags/en.png rename to public/images/admin/icons/flags/en.png diff --git a/public/images/admin/flags/fr.png b/public/images/admin/icons/flags/fr.png similarity index 100% rename from public/images/admin/flags/fr.png rename to public/images/admin/icons/flags/fr.png diff --git a/public/images/admin/list/icons/cross.png b/public/images/admin/list/icons/cross.png new file mode 100644 index 00000000..1890c74c Binary files /dev/null and b/public/images/admin/list/icons/cross.png differ diff --git a/public/javascripts/admin/theme_assets.js b/public/javascripts/admin/theme_assets.js new file mode 100644 index 00000000..bc55f94c --- /dev/null +++ b/public/javascripts/admin/theme_assets.js @@ -0,0 +1,31 @@ +/* ___ file or text ___ */ + +var enableFileOrTextToggling = function() { + $('div.hidden').hide(); + + $('span.alt').click(function(event) { + event.preventDefault(); + + if ($("div#file-selector").is(":hidden")) { + $("div#text-selector").slideUp("normal", function() { + $("div#file-selector").slideDown(); + $("input#theme_asset_performing_plain_text").val(false); + }); + } else { + $("div#file-selector").slideUp("normal", function() { + $("div#text-selector").slideDown(); + $("input#theme_asset_performing_plain_text").val(true); + }); + } + }); + +} + +$(document).ready(function() { + enableFileOrTextToggling(); + + $('code.stylesheet textarea').each(function() { addCodeMirrorEditor('css', $(this)); }); + $('code.javascript textarea').each(function() { + addCodeMirrorEditor('javascript', $(this), ["tokenizejavascript.js", "parsejavascript.js"]); + }); +}); \ No newline at end of file diff --git a/public/sites/4be934e893d4334790000002/themes/4be982b393d433527a000001/test_01.css b/public/sites/4be934e893d4334790000002/themes/4be982b393d433527a000001/test_01.css new file mode 100644 index 00000000..dd82bdfb --- /dev/null +++ b/public/sites/4be934e893d4334790000002/themes/4be982b393d433527a000001/test_01.css @@ -0,0 +1,3 @@ +body { background: red; } + +p { background: green; } diff --git a/public/sites/4be934e893d4334790000002/themes/4be982b393d433527a000001/thumb_test_01.css b/public/sites/4be934e893d4334790000002/themes/4be982b393d433527a000001/thumb_test_01.css new file mode 100644 index 00000000..dd82bdfb --- /dev/null +++ b/public/sites/4be934e893d4334790000002/themes/4be982b393d433527a000001/thumb_test_01.css @@ -0,0 +1,3 @@ +body { background: red; } + +p { background: green; } diff --git a/public/sites/4be934e893d4334790000002/themes/4be9b74793d43352e1000009/icone-cloud.png b/public/sites/4be934e893d4334790000002/themes/4be9b74793d43352e1000009/icone-cloud.png new file mode 100644 index 00000000..cb83d5d8 Binary files /dev/null and b/public/sites/4be934e893d4334790000002/themes/4be9b74793d43352e1000009/icone-cloud.png differ diff --git a/public/sites/4be934e893d4334790000002/themes/4be9b74793d43352e1000009/medium_icone-cloud.png b/public/sites/4be934e893d4334790000002/themes/4be9b74793d43352e1000009/medium_icone-cloud.png new file mode 100644 index 00000000..ddd85fed Binary files /dev/null and b/public/sites/4be934e893d4334790000002/themes/4be9b74793d43352e1000009/medium_icone-cloud.png differ diff --git a/public/sites/4be934e893d4334790000002/themes/4be9b74793d43352e1000009/preview_icone-cloud.png b/public/sites/4be934e893d4334790000002/themes/4be9b74793d43352e1000009/preview_icone-cloud.png new file mode 100644 index 00000000..5ed0ffb5 Binary files /dev/null and b/public/sites/4be934e893d4334790000002/themes/4be9b74793d43352e1000009/preview_icone-cloud.png differ diff --git a/public/sites/4be934e893d4334790000002/themes/4be9b74793d43352e1000009/thumb_icone-cloud.png b/public/sites/4be934e893d4334790000002/themes/4be9b74793d43352e1000009/thumb_icone-cloud.png new file mode 100644 index 00000000..a39ee918 Binary files /dev/null and b/public/sites/4be934e893d4334790000002/themes/4be9b74793d43352e1000009/thumb_icone-cloud.png differ diff --git a/public/sites/4be934e893d4334790000002/themes/4be9bae693d43352e100000d/damen.jpg b/public/sites/4be934e893d4334790000002/themes/4be9bae693d43352e100000d/damen.jpg new file mode 100644 index 00000000..73429fef Binary files /dev/null and b/public/sites/4be934e893d4334790000002/themes/4be9bae693d43352e100000d/damen.jpg differ diff --git a/public/sites/4be934e893d4334790000002/themes/4be9bae693d43352e100000d/medium_damen.jpg b/public/sites/4be934e893d4334790000002/themes/4be9bae693d43352e100000d/medium_damen.jpg new file mode 100644 index 00000000..a1f62427 Binary files /dev/null and b/public/sites/4be934e893d4334790000002/themes/4be9bae693d43352e100000d/medium_damen.jpg differ diff --git a/public/sites/4be934e893d4334790000002/themes/4be9bae693d43352e100000d/preview_damen.jpg b/public/sites/4be934e893d4334790000002/themes/4be9bae693d43352e100000d/preview_damen.jpg new file mode 100644 index 00000000..960165c5 Binary files /dev/null and b/public/sites/4be934e893d4334790000002/themes/4be9bae693d43352e100000d/preview_damen.jpg differ diff --git a/public/sites/4be934e893d4334790000002/themes/4be9bae693d43352e100000d/thumb_damen.jpg b/public/sites/4be934e893d4334790000002/themes/4be9bae693d43352e100000d/thumb_damen.jpg new file mode 100644 index 00000000..5c93ec14 Binary files /dev/null and b/public/sites/4be934e893d4334790000002/themes/4be9bae693d43352e100000d/thumb_damen.jpg differ diff --git a/public/sites/4be934e893d4334790000002/themes/4be9c60393d43359db000003/medium_screen.css b/public/sites/4be934e893d4334790000002/themes/4be9c60393d43359db000003/medium_screen.css new file mode 100644 index 00000000..ac3a252a --- /dev/null +++ b/public/sites/4be934e893d4334790000002/themes/4be9c60393d43359db000003/medium_screen.css @@ -0,0 +1,234 @@ +/* ----------------------------------------------------------------------- + + +Blueprint CSS Framework 1.0 +http://blueprintcss.org + +* Copyright (c) 2007-Present. See LICENSE for more info. +* See README for instructions on how to use Blueprint. +* For credits and origins, see AUTHORS. +* This is a compressed file. See the sources in the 'src' directory. + +----------------------------------------------------------------------- */ + +/* reset.css */ +html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, code, del, dfn, em, img, q, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, dialog, figure, footer, header, hgroup, nav, section {margin:0;padding:0;border:0;font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline;} +article, aside, dialog, figure, footer, header, hgroup, nav, section {display:block;} +body {line-height:1.5;} +table {border-collapse:separate;border-spacing:0;} +caption, th, td {text-align:left;font-weight:normal;} +table, td, th {vertical-align:middle;} +blockquote:before, blockquote:after, q:before, q:after {content:"";} +blockquote, q {quotes:"" "";} +a img {border:none;} + +/* typography.css */ +html {font-size:100.01%;} +body {font-size:75%;color:#222;background:#fff;font-family:"Helvetica Neue", Arial, Helvetica, sans-serif;} +h1, h2, h3, h4, h5, h6 {font-weight:normal;color:#111;} +h1 {font-size:3em;line-height:1;margin-bottom:0.5em;} +h2 {font-size:2em;margin-bottom:0.75em;} +h3 {font-size:1.5em;line-height:1;margin-bottom:1em;} +h4 {font-size:1.2em;line-height:1.25;margin-bottom:1.25em;} +h5 {font-size:1em;font-weight:bold;margin-bottom:1.5em;} +h6 {font-size:1em;font-weight:bold;} +h1 img, h2 img, h3 img, h4 img, h5 img, h6 img {margin:0;} +p {margin:0 0 1.5em;} +p img.left {float:left;margin:1.5em 1.5em 1.5em 0;padding:0;} +p img.right {float:right;margin:1.5em 0 1.5em 1.5em;} +a:focus, a:hover {color:#000;} +a {color:#009;text-decoration:underline;} +blockquote {margin:1.5em;color:#666;font-style:italic;} +strong {font-weight:bold;} +em, dfn {font-style:italic;} +dfn {font-weight:bold;} +sup, sub {line-height:0;} +abbr, acronym {border-bottom:1px dotted #666;} +address {margin:0 0 1.5em;font-style:italic;} +del {color:#666;} +pre {margin:1.5em 0;white-space:pre;} +pre, code, tt {font:1em 'andale mono', 'lucida console', monospace;line-height:1.5;} +li ul, li ol {margin:0;} +ul, ol {margin:0 1.5em 1.5em 0;padding-left:3.333em;} +ul {list-style-type:disc;} +ol {list-style-type:decimal;} +dl {margin:0 0 1.5em 0;} +dl dt {font-weight:bold;} +dd {margin-left:1.5em;} +table {margin-bottom:1.4em;width:100%;} +th {font-weight:bold;} +thead th {background:#c3d9ff;} +th, td, caption {padding:4px 10px 4px 5px;} +tr.even td {background:#e5ecf9;} +tfoot {font-style:italic;} +caption {background:#eee;} +.small {font-size:.8em;margin-bottom:1.875em;line-height:1.875em;} +.large {font-size:1.2em;line-height:2.5em;margin-bottom:1.25em;} +.hide {display:none;} +.quiet {color:#666;} +.loud {color:#000;} +.highlight {background:#ff0;} +.added {background:#060;color:#fff;} +.removed {background:#900;color:#fff;} +.first {margin-left:0;padding-left:0;} +.last {margin-right:0;padding-right:0;} +.top {margin-top:0;padding-top:0;} +.bottom {margin-bottom:0;padding-bottom:0;} + +/* forms.css */ +label {font-weight:bold;} +fieldset {padding:1.4em;margin:0 0 1.5em 0;border:1px solid #ccc;} +legend {font-weight:bold;font-size:1.2em;} +input[type=text], input[type=password], input.text, input.title, textarea, select {background-color:#fff;border:1px solid #bbb;} +input[type=text]:focus, input[type=password]:focus, input.text:focus, input.title:focus, textarea:focus, select:focus {border-color:#666;} +input[type=text], input[type=password], input.text, input.title, textarea, select {margin:0.5em 0;} +input.text, input.title {width:300px;padding:5px;} +input.title {font-size:1.5em;} +textarea {width:390px;height:250px;padding:5px;} +input[type=checkbox], input[type=radio], input.checkbox, input.radio {position:relative;top:.25em;} +form.inline {line-height:3;} +form.inline p {margin-bottom:0;} +.error, .notice, .success {padding:.8em;margin-bottom:1em;border:2px solid #ddd;} +.error {background:#FBE3E4;color:#8a1f11;border-color:#FBC2C4;} +.notice {background:#FFF6BF;color:#514721;border-color:#FFD324;} +.success {background:#E6EFC2;color:#264409;border-color:#C6D880;} +.error a {color:#8a1f11;} +.notice a {color:#514721;} +.success a {color:#264409;} + +/* grid.css */ +.container {width:940px;margin:0 auto;} +.showgrid {background:url(src/grid.png);} +.column, .span-1, .span-2, .span-3, .span-4, .span-5, .span-6, .span-7, .span-8, .span-9, .span-10, .span-11, .span-12, .span-13, .span-14, .span-15, .span-16, .span-17, .span-18, .span-19, .span-20 {float:left;margin-right:20px;} +.last {margin-right:0;} +.span-1 {width:28px;} +.span-2 {width:76px;} +.span-3 {width:124px;} +.span-4 {width:172px;} +.span-5 {width:220px;} +.span-6 {width:268px;} +.span-7 {width:316px;} +.span-8 {width:364px;} +.span-9 {width:412px;} +.span-10 {width:460px;} +.span-11 {width:508px;} +.span-12 {width:556px;} +.span-13 {width:604px;} +.span-14 {width:652px;} +.span-15 {width:700px;} +.span-16 {width:748px;} +.span-17 {width:796px;} +.span-18 {width:844px;} +.span-19 {width:892px;} +.span-20 {width:940px;margin-right:0;} +input.span-1, textarea.span-1, input.span-2, textarea.span-2, input.span-3, textarea.span-3, input.span-4, textarea.span-4, input.span-5, textarea.span-5, input.span-6, textarea.span-6, input.span-7, textarea.span-7, input.span-8, textarea.span-8, input.span-9, textarea.span-9, input.span-10, textarea.span-10, input.span-11, textarea.span-11, input.span-12, textarea.span-12, input.span-13, textarea.span-13, input.span-14, textarea.span-14, input.span-15, textarea.span-15, input.span-16, textarea.span-16, input.span-17, textarea.span-17, input.span-18, textarea.span-18, input.span-19, textarea.span-19, input.span-20, textarea.span-20 {border-left-width:1px!important;border-right-width:1px!important;padding-left:5px!important;padding-right:5px!important;} +input.span-1, textarea.span-1 {width:16px!important;} +input.span-2, textarea.span-2 {width:64px!important;} +input.span-3, textarea.span-3 {width:112px!important;} +input.span-4, textarea.span-4 {width:160px!important;} +input.span-5, textarea.span-5 {width:208px!important;} +input.span-6, textarea.span-6 {width:256px!important;} +input.span-7, textarea.span-7 {width:304px!important;} +input.span-8, textarea.span-8 {width:352px!important;} +input.span-9, textarea.span-9 {width:400px!important;} +input.span-10, textarea.span-10 {width:448px!important;} +input.span-11, textarea.span-11 {width:496px!important;} +input.span-12, textarea.span-12 {width:544px!important;} +input.span-13, textarea.span-13 {width:592px!important;} +input.span-14, textarea.span-14 {width:640px!important;} +input.span-15, textarea.span-15 {width:688px!important;} +input.span-16, textarea.span-16 {width:736px!important;} +input.span-17, textarea.span-17 {width:784px!important;} +input.span-18, textarea.span-18 {width:832px!important;} +input.span-19, textarea.span-19 {width:880px!important;} +input.span-20, textarea.span-20 {width:928px!important;} +.append-1 {padding-right:48px;} +.append-2 {padding-right:96px;} +.append-3 {padding-right:144px;} +.append-4 {padding-right:192px;} +.append-5 {padding-right:240px;} +.append-6 {padding-right:288px;} +.append-7 {padding-right:336px;} +.append-8 {padding-right:384px;} +.append-9 {padding-right:432px;} +.append-10 {padding-right:480px;} +.append-11 {padding-right:528px;} +.append-12 {padding-right:576px;} +.append-13 {padding-right:624px;} +.append-14 {padding-right:672px;} +.append-15 {padding-right:720px;} +.append-16 {padding-right:768px;} +.append-17 {padding-right:816px;} +.append-18 {padding-right:864px;} +.append-19 {padding-right:912px;} +.prepend-1 {padding-left:48px;} +.prepend-2 {padding-left:96px;} +.prepend-3 {padding-left:144px;} +.prepend-4 {padding-left:192px;} +.prepend-5 {padding-left:240px;} +.prepend-6 {padding-left:288px;} +.prepend-7 {padding-left:336px;} +.prepend-8 {padding-left:384px;} +.prepend-9 {padding-left:432px;} +.prepend-10 {padding-left:480px;} +.prepend-11 {padding-left:528px;} +.prepend-12 {padding-left:576px;} +.prepend-13 {padding-left:624px;} +.prepend-14 {padding-left:672px;} +.prepend-15 {padding-left:720px;} +.prepend-16 {padding-left:768px;} +.prepend-17 {padding-left:816px;} +.prepend-18 {padding-left:864px;} +.prepend-19 {padding-left:912px;} +.border {padding-right:9px;margin-right:10px;border-right:1px solid #eee;} +.colborder {padding-right:33px;margin-right:34px;border-right:1px solid #eee;} +.pull-1 {margin-left:-48px;} +.pull-2 {margin-left:-96px;} +.pull-3 {margin-left:-144px;} +.pull-4 {margin-left:-192px;} +.pull-5 {margin-left:-240px;} +.pull-6 {margin-left:-288px;} +.pull-7 {margin-left:-336px;} +.pull-8 {margin-left:-384px;} +.pull-9 {margin-left:-432px;} +.pull-10 {margin-left:-480px;} +.pull-11 {margin-left:-528px;} +.pull-12 {margin-left:-576px;} +.pull-13 {margin-left:-624px;} +.pull-14 {margin-left:-672px;} +.pull-15 {margin-left:-720px;} +.pull-16 {margin-left:-768px;} +.pull-17 {margin-left:-816px;} +.pull-18 {margin-left:-864px;} +.pull-19 {margin-left:-912px;} +.pull-20 {margin-left:-960px;} +.pull-1, .pull-2, .pull-3, .pull-4, .pull-5, .pull-6, .pull-7, .pull-8, .pull-9, .pull-10, .pull-11, .pull-12, .pull-13, .pull-14, .pull-15, .pull-16, .pull-17, .pull-18, .pull-19, .pull-20 {float:left;position:relative;} +.push-1 {margin:0 -48px 1.5em 48px;} +.push-2 {margin:0 -96px 1.5em 96px;} +.push-3 {margin:0 -144px 1.5em 144px;} +.push-4 {margin:0 -192px 1.5em 192px;} +.push-5 {margin:0 -240px 1.5em 240px;} +.push-6 {margin:0 -288px 1.5em 288px;} +.push-7 {margin:0 -336px 1.5em 336px;} +.push-8 {margin:0 -384px 1.5em 384px;} +.push-9 {margin:0 -432px 1.5em 432px;} +.push-10 {margin:0 -480px 1.5em 480px;} +.push-11 {margin:0 -528px 1.5em 528px;} +.push-12 {margin:0 -576px 1.5em 576px;} +.push-13 {margin:0 -624px 1.5em 624px;} +.push-14 {margin:0 -672px 1.5em 672px;} +.push-15 {margin:0 -720px 1.5em 720px;} +.push-16 {margin:0 -768px 1.5em 768px;} +.push-17 {margin:0 -816px 1.5em 816px;} +.push-18 {margin:0 -864px 1.5em 864px;} +.push-19 {margin:0 -912px 1.5em 912px;} +.push-20 {margin:0 -960px 1.5em 960px;} +.push-1, .push-2, .push-3, .push-4, .push-5, .push-6, .push-7, .push-8, .push-9, .push-10, .push-11, .push-12, .push-13, .push-14, .push-15, .push-16, .push-17, .push-18, .push-19, .push-20 {float:right;position:relative;} +.prepend-top {margin-top:1.5em;} +.append-bottom {margin-bottom:1.5em;} +.box {padding:1.5em;margin-bottom:1.5em;background:#E5ECF9;} +hr {background:#ddd;color:#ddd;clear:both;float:none;width:100%;height:.1em;margin:0 0 1.45em;border:none;} +hr.space {background:#fff;color:#fff;visibility:hidden;} +.clearfix:after, .container:after {content:"\0020";display:block;height:0;clear:both;visibility:hidden;overflow:hidden;} +.clearfix, .container {display:block;} +.clear {clear:both;} \ No newline at end of file diff --git a/public/sites/4be934e893d4334790000002/themes/4be9c60393d43359db000003/screen.css b/public/sites/4be934e893d4334790000002/themes/4be9c60393d43359db000003/screen.css new file mode 100644 index 00000000..ac3a252a --- /dev/null +++ b/public/sites/4be934e893d4334790000002/themes/4be9c60393d43359db000003/screen.css @@ -0,0 +1,234 @@ +/* ----------------------------------------------------------------------- + + +Blueprint CSS Framework 1.0 +http://blueprintcss.org + +* Copyright (c) 2007-Present. See LICENSE for more info. +* See README for instructions on how to use Blueprint. +* For credits and origins, see AUTHORS. +* This is a compressed file. See the sources in the 'src' directory. + +----------------------------------------------------------------------- */ + +/* reset.css */ +html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, code, del, dfn, em, img, q, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, dialog, figure, footer, header, hgroup, nav, section {margin:0;padding:0;border:0;font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline;} +article, aside, dialog, figure, footer, header, hgroup, nav, section {display:block;} +body {line-height:1.5;} +table {border-collapse:separate;border-spacing:0;} +caption, th, td {text-align:left;font-weight:normal;} +table, td, th {vertical-align:middle;} +blockquote:before, blockquote:after, q:before, q:after {content:"";} +blockquote, q {quotes:"" "";} +a img {border:none;} + +/* typography.css */ +html {font-size:100.01%;} +body {font-size:75%;color:#222;background:#fff;font-family:"Helvetica Neue", Arial, Helvetica, sans-serif;} +h1, h2, h3, h4, h5, h6 {font-weight:normal;color:#111;} +h1 {font-size:3em;line-height:1;margin-bottom:0.5em;} +h2 {font-size:2em;margin-bottom:0.75em;} +h3 {font-size:1.5em;line-height:1;margin-bottom:1em;} +h4 {font-size:1.2em;line-height:1.25;margin-bottom:1.25em;} +h5 {font-size:1em;font-weight:bold;margin-bottom:1.5em;} +h6 {font-size:1em;font-weight:bold;} +h1 img, h2 img, h3 img, h4 img, h5 img, h6 img {margin:0;} +p {margin:0 0 1.5em;} +p img.left {float:left;margin:1.5em 1.5em 1.5em 0;padding:0;} +p img.right {float:right;margin:1.5em 0 1.5em 1.5em;} +a:focus, a:hover {color:#000;} +a {color:#009;text-decoration:underline;} +blockquote {margin:1.5em;color:#666;font-style:italic;} +strong {font-weight:bold;} +em, dfn {font-style:italic;} +dfn {font-weight:bold;} +sup, sub {line-height:0;} +abbr, acronym {border-bottom:1px dotted #666;} +address {margin:0 0 1.5em;font-style:italic;} +del {color:#666;} +pre {margin:1.5em 0;white-space:pre;} +pre, code, tt {font:1em 'andale mono', 'lucida console', monospace;line-height:1.5;} +li ul, li ol {margin:0;} +ul, ol {margin:0 1.5em 1.5em 0;padding-left:3.333em;} +ul {list-style-type:disc;} +ol {list-style-type:decimal;} +dl {margin:0 0 1.5em 0;} +dl dt {font-weight:bold;} +dd {margin-left:1.5em;} +table {margin-bottom:1.4em;width:100%;} +th {font-weight:bold;} +thead th {background:#c3d9ff;} +th, td, caption {padding:4px 10px 4px 5px;} +tr.even td {background:#e5ecf9;} +tfoot {font-style:italic;} +caption {background:#eee;} +.small {font-size:.8em;margin-bottom:1.875em;line-height:1.875em;} +.large {font-size:1.2em;line-height:2.5em;margin-bottom:1.25em;} +.hide {display:none;} +.quiet {color:#666;} +.loud {color:#000;} +.highlight {background:#ff0;} +.added {background:#060;color:#fff;} +.removed {background:#900;color:#fff;} +.first {margin-left:0;padding-left:0;} +.last {margin-right:0;padding-right:0;} +.top {margin-top:0;padding-top:0;} +.bottom {margin-bottom:0;padding-bottom:0;} + +/* forms.css */ +label {font-weight:bold;} +fieldset {padding:1.4em;margin:0 0 1.5em 0;border:1px solid #ccc;} +legend {font-weight:bold;font-size:1.2em;} +input[type=text], input[type=password], input.text, input.title, textarea, select {background-color:#fff;border:1px solid #bbb;} +input[type=text]:focus, input[type=password]:focus, input.text:focus, input.title:focus, textarea:focus, select:focus {border-color:#666;} +input[type=text], input[type=password], input.text, input.title, textarea, select {margin:0.5em 0;} +input.text, input.title {width:300px;padding:5px;} +input.title {font-size:1.5em;} +textarea {width:390px;height:250px;padding:5px;} +input[type=checkbox], input[type=radio], input.checkbox, input.radio {position:relative;top:.25em;} +form.inline {line-height:3;} +form.inline p {margin-bottom:0;} +.error, .notice, .success {padding:.8em;margin-bottom:1em;border:2px solid #ddd;} +.error {background:#FBE3E4;color:#8a1f11;border-color:#FBC2C4;} +.notice {background:#FFF6BF;color:#514721;border-color:#FFD324;} +.success {background:#E6EFC2;color:#264409;border-color:#C6D880;} +.error a {color:#8a1f11;} +.notice a {color:#514721;} +.success a {color:#264409;} + +/* grid.css */ +.container {width:940px;margin:0 auto;} +.showgrid {background:url(src/grid.png);} +.column, .span-1, .span-2, .span-3, .span-4, .span-5, .span-6, .span-7, .span-8, .span-9, .span-10, .span-11, .span-12, .span-13, .span-14, .span-15, .span-16, .span-17, .span-18, .span-19, .span-20 {float:left;margin-right:20px;} +.last {margin-right:0;} +.span-1 {width:28px;} +.span-2 {width:76px;} +.span-3 {width:124px;} +.span-4 {width:172px;} +.span-5 {width:220px;} +.span-6 {width:268px;} +.span-7 {width:316px;} +.span-8 {width:364px;} +.span-9 {width:412px;} +.span-10 {width:460px;} +.span-11 {width:508px;} +.span-12 {width:556px;} +.span-13 {width:604px;} +.span-14 {width:652px;} +.span-15 {width:700px;} +.span-16 {width:748px;} +.span-17 {width:796px;} +.span-18 {width:844px;} +.span-19 {width:892px;} +.span-20 {width:940px;margin-right:0;} +input.span-1, textarea.span-1, input.span-2, textarea.span-2, input.span-3, textarea.span-3, input.span-4, textarea.span-4, input.span-5, textarea.span-5, input.span-6, textarea.span-6, input.span-7, textarea.span-7, input.span-8, textarea.span-8, input.span-9, textarea.span-9, input.span-10, textarea.span-10, input.span-11, textarea.span-11, input.span-12, textarea.span-12, input.span-13, textarea.span-13, input.span-14, textarea.span-14, input.span-15, textarea.span-15, input.span-16, textarea.span-16, input.span-17, textarea.span-17, input.span-18, textarea.span-18, input.span-19, textarea.span-19, input.span-20, textarea.span-20 {border-left-width:1px!important;border-right-width:1px!important;padding-left:5px!important;padding-right:5px!important;} +input.span-1, textarea.span-1 {width:16px!important;} +input.span-2, textarea.span-2 {width:64px!important;} +input.span-3, textarea.span-3 {width:112px!important;} +input.span-4, textarea.span-4 {width:160px!important;} +input.span-5, textarea.span-5 {width:208px!important;} +input.span-6, textarea.span-6 {width:256px!important;} +input.span-7, textarea.span-7 {width:304px!important;} +input.span-8, textarea.span-8 {width:352px!important;} +input.span-9, textarea.span-9 {width:400px!important;} +input.span-10, textarea.span-10 {width:448px!important;} +input.span-11, textarea.span-11 {width:496px!important;} +input.span-12, textarea.span-12 {width:544px!important;} +input.span-13, textarea.span-13 {width:592px!important;} +input.span-14, textarea.span-14 {width:640px!important;} +input.span-15, textarea.span-15 {width:688px!important;} +input.span-16, textarea.span-16 {width:736px!important;} +input.span-17, textarea.span-17 {width:784px!important;} +input.span-18, textarea.span-18 {width:832px!important;} +input.span-19, textarea.span-19 {width:880px!important;} +input.span-20, textarea.span-20 {width:928px!important;} +.append-1 {padding-right:48px;} +.append-2 {padding-right:96px;} +.append-3 {padding-right:144px;} +.append-4 {padding-right:192px;} +.append-5 {padding-right:240px;} +.append-6 {padding-right:288px;} +.append-7 {padding-right:336px;} +.append-8 {padding-right:384px;} +.append-9 {padding-right:432px;} +.append-10 {padding-right:480px;} +.append-11 {padding-right:528px;} +.append-12 {padding-right:576px;} +.append-13 {padding-right:624px;} +.append-14 {padding-right:672px;} +.append-15 {padding-right:720px;} +.append-16 {padding-right:768px;} +.append-17 {padding-right:816px;} +.append-18 {padding-right:864px;} +.append-19 {padding-right:912px;} +.prepend-1 {padding-left:48px;} +.prepend-2 {padding-left:96px;} +.prepend-3 {padding-left:144px;} +.prepend-4 {padding-left:192px;} +.prepend-5 {padding-left:240px;} +.prepend-6 {padding-left:288px;} +.prepend-7 {padding-left:336px;} +.prepend-8 {padding-left:384px;} +.prepend-9 {padding-left:432px;} +.prepend-10 {padding-left:480px;} +.prepend-11 {padding-left:528px;} +.prepend-12 {padding-left:576px;} +.prepend-13 {padding-left:624px;} +.prepend-14 {padding-left:672px;} +.prepend-15 {padding-left:720px;} +.prepend-16 {padding-left:768px;} +.prepend-17 {padding-left:816px;} +.prepend-18 {padding-left:864px;} +.prepend-19 {padding-left:912px;} +.border {padding-right:9px;margin-right:10px;border-right:1px solid #eee;} +.colborder {padding-right:33px;margin-right:34px;border-right:1px solid #eee;} +.pull-1 {margin-left:-48px;} +.pull-2 {margin-left:-96px;} +.pull-3 {margin-left:-144px;} +.pull-4 {margin-left:-192px;} +.pull-5 {margin-left:-240px;} +.pull-6 {margin-left:-288px;} +.pull-7 {margin-left:-336px;} +.pull-8 {margin-left:-384px;} +.pull-9 {margin-left:-432px;} +.pull-10 {margin-left:-480px;} +.pull-11 {margin-left:-528px;} +.pull-12 {margin-left:-576px;} +.pull-13 {margin-left:-624px;} +.pull-14 {margin-left:-672px;} +.pull-15 {margin-left:-720px;} +.pull-16 {margin-left:-768px;} +.pull-17 {margin-left:-816px;} +.pull-18 {margin-left:-864px;} +.pull-19 {margin-left:-912px;} +.pull-20 {margin-left:-960px;} +.pull-1, .pull-2, .pull-3, .pull-4, .pull-5, .pull-6, .pull-7, .pull-8, .pull-9, .pull-10, .pull-11, .pull-12, .pull-13, .pull-14, .pull-15, .pull-16, .pull-17, .pull-18, .pull-19, .pull-20 {float:left;position:relative;} +.push-1 {margin:0 -48px 1.5em 48px;} +.push-2 {margin:0 -96px 1.5em 96px;} +.push-3 {margin:0 -144px 1.5em 144px;} +.push-4 {margin:0 -192px 1.5em 192px;} +.push-5 {margin:0 -240px 1.5em 240px;} +.push-6 {margin:0 -288px 1.5em 288px;} +.push-7 {margin:0 -336px 1.5em 336px;} +.push-8 {margin:0 -384px 1.5em 384px;} +.push-9 {margin:0 -432px 1.5em 432px;} +.push-10 {margin:0 -480px 1.5em 480px;} +.push-11 {margin:0 -528px 1.5em 528px;} +.push-12 {margin:0 -576px 1.5em 576px;} +.push-13 {margin:0 -624px 1.5em 624px;} +.push-14 {margin:0 -672px 1.5em 672px;} +.push-15 {margin:0 -720px 1.5em 720px;} +.push-16 {margin:0 -768px 1.5em 768px;} +.push-17 {margin:0 -816px 1.5em 816px;} +.push-18 {margin:0 -864px 1.5em 864px;} +.push-19 {margin:0 -912px 1.5em 912px;} +.push-20 {margin:0 -960px 1.5em 960px;} +.push-1, .push-2, .push-3, .push-4, .push-5, .push-6, .push-7, .push-8, .push-9, .push-10, .push-11, .push-12, .push-13, .push-14, .push-15, .push-16, .push-17, .push-18, .push-19, .push-20 {float:right;position:relative;} +.prepend-top {margin-top:1.5em;} +.append-bottom {margin-bottom:1.5em;} +.box {padding:1.5em;margin-bottom:1.5em;background:#E5ECF9;} +hr {background:#ddd;color:#ddd;clear:both;float:none;width:100%;height:.1em;margin:0 0 1.45em;border:none;} +hr.space {background:#fff;color:#fff;visibility:hidden;} +.clearfix:after, .container:after {content:"\0020";display:block;height:0;clear:both;visibility:hidden;overflow:hidden;} +.clearfix, .container {display:block;} +.clear {clear:both;} \ No newline at end of file diff --git a/public/stylesheets/admin/formtastic_changes.css b/public/stylesheets/admin/formtastic_changes.css index dd1bc744..246d6e0e 100644 --- a/public/stylesheets/admin/formtastic_changes.css +++ b/public/stylesheets/admin/formtastic_changes.css @@ -14,6 +14,7 @@ form.formtastic legend { float: left; white-space: normal; *margin-left: -7px; + position: relative; } form.formtastic legend span { @@ -26,6 +27,15 @@ form.formtastic legend span { padding: 4px 0 0 20px; } +form.formtastic legend span small { + position: absolute; + top: 7px; + right: 20px; + color: #787a89; + font-size: 0.8em; + font-weight: normal; +} + /* ___ enabling fold/unfold ___ */ form.formtastic fieldset.foldable legend span { cursor: pointer; } @@ -66,6 +76,7 @@ form.formtastic fieldset.foldable.folded ol { display: none; } form.formtastic fieldset.inputs { min-height: 30px; width: 100%; margin-bottom: 20px; } form.formtastic fieldset.inputs ol { + clear: both; margin: 30px 0 0 0; padding-top: 15px; padding-bottom: 5px; @@ -399,24 +410,25 @@ form.formtastic fieldset.file li.full p.inline-errors { display: block !importan form.formtastic fieldset.preview { position: relative; } -form.formtastic fieldset.preview li { text-align: center; } +form.formtastic fieldset.preview li { text-align: center; position: static; } -form.formtastic fieldset.preview li img { margin-top: 10px; border: 4px solid white; } - -form.formtastic fieldset.preview div.size { - position: absolute; - top: 7px; - right: 20px; - color: #787a89; - font-size: 0.7em; +form.formtastic fieldset.preview li .image { + width: 870px; + margin: 10px 20px 0px 20px; + border: 4px solid white; + background: transparent url(/images/admin/list/empty.png) repeat 0 0; + overflow: hidden; } -@media screen and (-webkit-min-device-pixel-ratio:0) { - form.formtastic fieldset.preview div.size { - top: 7px; - } +form.formtastic fieldset.preview li .inside { + display: table-cell; + vertical-align: middle; + text-align: center; } +form.formtastic fieldset.preview li img { } + + /* ___ main error message ___ */ div.form-errors p { diff --git a/spec/factories.rb b/spec/factories.rb index 221f8765..0f820b5e 100644 --- a/spec/factories.rb +++ b/spec/factories.rb @@ -56,4 +56,9 @@ Factory.define :snippet do |s| s.name 'My website title' s.slug 'header' s.value %{Acme</title} +end + +## Theme assets ## +Factory.define :theme_asset do |a| + a.association :site end \ No newline at end of file diff --git a/spec/fixtures/assets/5k.png b/spec/fixtures/assets/5k.png new file mode 100644 index 00000000..cf85f7cf Binary files /dev/null and b/spec/fixtures/assets/5k.png differ diff --git a/spec/fixtures/assets/application.js b/spec/fixtures/assets/application.js new file mode 100644 index 00000000..782b6200 --- /dev/null +++ b/spec/fixtures/assets/application.js @@ -0,0 +1 @@ +alert('Hello world'); \ No newline at end of file diff --git a/spec/fixtures/assets/main.css b/spec/fixtures/assets/main.css new file mode 100644 index 00000000..88ce965f --- /dev/null +++ b/spec/fixtures/assets/main.css @@ -0,0 +1 @@ +body { background: red; } \ No newline at end of file diff --git a/spec/fixtures/assets/wrong.txt b/spec/fixtures/assets/wrong.txt new file mode 100644 index 00000000..298f803c --- /dev/null +++ b/spec/fixtures/assets/wrong.txt @@ -0,0 +1 @@ +wrong file \ No newline at end of file diff --git a/spec/models/theme_asset_spec.rb b/spec/models/theme_asset_spec.rb new file mode 100644 index 00000000..d23c39ee --- /dev/null +++ b/spec/models/theme_asset_spec.rb @@ -0,0 +1,89 @@ +require 'spec_helper' + +describe ThemeAsset do + + describe 'attaching a file' do + + before(:each) do + ThemeAsset.any_instance.stubs(:site_id).returns('test') + @asset = Factory.build(:theme_asset) + end + + describe 'file is a picture' do + + it 'should process picture' do + @asset.source = FixturedAsset.open('5k.png') + @asset.source.file.content_type.should_not be_nil + @asset.image?.should be_true + end + + it 'should get width and height from the image' do + @asset.source = FixturedAsset.open('5k.png') + @asset.width.should == 32 + @asset.height.should == 32 + end + + it 'should have a slug' do + @asset.source = FixturedAsset.open('5k.png') + @asset.save + @asset.slug.should == '5k' + end + + end + + describe 'file is not allowed' do + + it 'should not be valid' do + @asset.source = FixturedAsset.open('wrong.txt') + @asset.valid?.should be_false + @asset.errors[:source].should_not be_blank + end + + end + + it 'should process stylesheet' do + @asset.source = FixturedAsset.open('main.css') + @asset.source.file.content_type.should_not be_nil + @asset.stylesheet?.should be_true + end + + it 'should process javascript' do + @asset.source = FixturedAsset.open('application.js') + @asset.source.file.content_type.should_not be_nil + @asset.javascript?.should be_true + end + + it 'should get size' do + @asset.source = FixturedAsset.open('main.css') + @asset.size.should == 25 + end + + end + + describe 'creating from plain text' do + + before(:each) do + ThemeAsset.any_instance.stubs(:site_id).returns('test') + @asset = Factory.build(:theme_asset) + @asset.performing_plain_text = true + @asset.slug = 'a file' + @asset.plain_text = "Lorem ipsum" + end + + it 'should handle stylesheet' do + @asset.content_type = 'stylesheet' + @asset.valid?.should be_true + @asset.stylesheet?.should be_true + @asset.source.should_not be_nil + end + + it 'should handle javascript' do + @asset.content_type = 'javascript' + @asset.valid?.should be_true + @asset.javascript?.should be_true + @asset.source.should_not be_nil + end + + end + +end \ No newline at end of file diff --git a/spec/support/carrierwave.rb b/spec/support/carrierwave.rb new file mode 100644 index 00000000..cc581d27 --- /dev/null +++ b/spec/support/carrierwave.rb @@ -0,0 +1,32 @@ +require 'carrierwave/test/matchers' + +CarrierWave.configure do |config| + config.storage = :file + config.store_dir = "spec/tmp/uploads" + config.cache_dir = "spec/tmp/cache" + config.root = File.join(Rails.root, 'spec', 'tmp') + # config.enable_processing = false +end + +module FixturedAsset + def self.open(filename) + File.new(self.path(filename)) + end + + def self.path(filename) + File.join(File.dirname(__FILE__), '..', 'fixtures', 'assets', filename) + end + + def self.duplicate(filename) + dst = File.join(File.dirname(__FILE__), '..', 'tmp', filename) + FileUtils.cp self.path(filename), dst + dst + end + + def self.reset! + FileUtils.rm_rf(File.join(File.dirname(__FILE__), '..', 'tmp')) + FileUtils.mkdir(File.join(File.dirname(__FILE__), '..', 'tmp')) + end +end + +FixturedAsset.reset! \ No newline at end of file diff --git a/vendor/plugins/mimetype_fu/MIT-LICENSE b/vendor/plugins/mimetype_fu/MIT-LICENSE new file mode 100644 index 00000000..570ecf87 --- /dev/null +++ b/vendor/plugins/mimetype_fu/MIT-LICENSE @@ -0,0 +1,20 @@ +Copyright (c) 2007 [name of plugin creator] + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/plugins/mimetype_fu/README b/vendor/plugins/mimetype_fu/README new file mode 100644 index 00000000..25272604 --- /dev/null +++ b/vendor/plugins/mimetype_fu/README @@ -0,0 +1,16 @@ +MimetypeFu +========== + +Some great Rails plugins like attachment_fu use the content type/mime type of a file to validate the instance of an object. +The plugin usually gets the mime type using the CGI request, however, if the file is already in the system, this approach won't work. +Adobe Flash is also known not to send the proper mime type. +As an alternative, I wrote mimetype_fu, a simple plugin which will try to guess the mimetype of a file based on its extension. + +Note that mimetype_fu only looks at the extension to define its mime type if you are using Windows! + +http://code.google.com/p/mimetype-fu/ + +Thanks to forestcarlisle for his big report and patch. + + +Copyright (c) 2008 Matt Aimonetti, released under the MIT license diff --git a/vendor/plugins/mimetype_fu/Rakefile b/vendor/plugins/mimetype_fu/Rakefile new file mode 100644 index 00000000..24a74dc3 --- /dev/null +++ b/vendor/plugins/mimetype_fu/Rakefile @@ -0,0 +1,22 @@ +require 'rake' +require 'rake/testtask' +require 'rake/rdoctask' + +desc 'Default: run unit tests.' +task :default => :test + +desc 'Test the mimetype_fu plugin.' +Rake::TestTask.new(:test) do |t| + t.libs << 'lib' + t.pattern = 'test/**/*_test.rb' + t.verbose = true +end + +desc 'Generate documentation for the mimetype_fu plugin.' +Rake::RDocTask.new(:rdoc) do |rdoc| + rdoc.rdoc_dir = 'rdoc' + rdoc.title = 'MimetypeFu' + rdoc.options << '--line-numbers' << '--inline-source' + rdoc.rdoc_files.include('README') + rdoc.rdoc_files.include('lib/**/*.rb') +end diff --git a/vendor/plugins/mimetype_fu/init.rb b/vendor/plugins/mimetype_fu/init.rb new file mode 100644 index 00000000..129dae24 --- /dev/null +++ b/vendor/plugins/mimetype_fu/init.rb @@ -0,0 +1,2 @@ +require File.dirname(__FILE__) + '/lib/extensions_const' +require File.dirname(__FILE__) + '/lib/mimetype_fu' \ No newline at end of file diff --git a/vendor/plugins/mimetype_fu/install.rb b/vendor/plugins/mimetype_fu/install.rb new file mode 100644 index 00000000..f7732d37 --- /dev/null +++ b/vendor/plugins/mimetype_fu/install.rb @@ -0,0 +1 @@ +# Install hook code here diff --git a/vendor/plugins/mimetype_fu/lib/extensions_const.rb b/vendor/plugins/mimetype_fu/lib/extensions_const.rb new file mode 100644 index 00000000..88980ea8 --- /dev/null +++ b/vendor/plugins/mimetype_fu/lib/extensions_const.rb @@ -0,0 +1 @@ +EXTENSIONS = YAML.load_file(File.dirname(__FILE__) + '/mime_types.yml').symbolize_keys \ No newline at end of file diff --git a/vendor/plugins/mimetype_fu/lib/mime_types.yml b/vendor/plugins/mimetype_fu/lib/mime_types.yml new file mode 100644 index 00000000..ccd0e7b0 --- /dev/null +++ b/vendor/plugins/mimetype_fu/lib/mime_types.yml @@ -0,0 +1,384 @@ +# EXTENSIONS => CONTENT TYPE +csh: application/x-csh +x_t: model/vnd.parasolid.transmit.text +kpt: application/vnd.kde.kpresenter +vst: application/vnd.visio +ksp: application/vnd.kde.kspread +fsc: application/vnd.fsc.weblaunch +vcs: text/x-vcalendar +hvs: application/vnd.yamaha.hv-script +seml: application/vnd.sealed.eml +lzh: application/octet-stream +movie: video/x-sgi-movie +wav: audio/x-wav +tbz2: application/x-gtar +plt: application/vnd.hp-HPGL +3gpp: video/3gpp +eol: audio/vnd.digital-winds +vsw: application/vnd.visio +rtf: text/rtf +rgb: image/x-rgb +midi: audio/x-midi +sit: application/x-stuffit +mov: video/quicktime +kfo: application/vnd.kde.kformula +rdf: application/rdf+xml +wpd: application/vnd.wordperfect +hbc: application/vnd.hbci +ogg: application/ogg +dwf: x-drawing/dwf +pbm: image/x-portable-bitmap +cpp: text/plain +smp3: audio/vnd.sealedmedia.softseal.mpeg +html: text/html +igs: model/iges +dwg: image/vnd.dwg +see: application/vnd.seemail +ram: audio/x-pn-realaudio +jad: text/vnd.sun.j2me.app-descriptor +iges: model/iges +pot: application/powerpoint +exe: application/octet-stream +siv: application/sieve +wml: text/vnd.wap.wml +hlp: text/plain +pkd: application/vnd.hbci +ice: x-conference/x-cooltalk +ustar: application/x-ustar +vis: application/vnd.visionary +pkipath: application/pkix-pkipath +ecelp4800: audio/vnd.nuera.ecelp4800 +tgz: application/x-gtar +roff: text/troff +ltx: application/x-latex +nim: video/vnd.nokia.interleaved-multimedia +qcp: audio/QCELP +ai: application/postscript +sppt: application/vnd.sealed.ppt +igx: application/vnd.micrografx.igx +tcl: application/x-tcl +viv: video/vnd.vivo +css: text/css +js: text/javascript +wpl: application/vnd.ms-wpl +ami: application/vnd.amiga.ami +l16: audio/L16 +vivo: video/vnd.vivo +dat: text/plain +vrml: x-world/x-vrml +pqa: application/vnd.palm +request: application/vnd.nervana +oprc: application/vnd.palm +vbk: audio/vnd.nortel.vbk +pki: application/pkixcmp +ras: image/x-cmu-raster +asc: text/plain +kom: application/vnd.hbci +jpeg: image/jpeg +sem: application/vnd.sealed.eml +chrt: application/vnd.kde.kchart +tif: image/tiff +cil: application/vnd.ms-artgalry +xwd: image/x-xwindowdump +dgn: image/x-vnd.dgn +mxu: video/vnd.mpegurl +csv: text/comma-separated-values +kon: application/vnd.kde.kontour +png: image/png +bkm: application/vnd.nervana +sxl: application/vnd.sealed.xls +xfdf: application/vnd.adobe.xfdf +snd: audio/basic +dl: video/dl +sxls: application/vnd.sealed.xls +karbon: application/vnd.kde.karbon +ico: image/vnd.microsoft.icon +sus: application/vnd.sus-calendar +pdb: x-chemical/x-pdb +wif: application/watcherinfo+xml +ser: application/x-java-serialized-object +xmt_txt: model/vnd.parasolid.transmit.text +upa: application/vnd.hbci +pnm: image/x-portable-anymap +jar: application/x-java-archive +qt: video/quicktime +tsv: text/tab-separated-values +rtx: text/richtext +mdi: image/vnd.ms-modi +rcprofile: application/vnd.ipunplugged.rcprofile +gl: video/gl +me: application/x-troff-me +man: application/x-troff-man +tr: text/troff +amr: audio/AMR +wp5: application/wordperfect5.1 +pdf: application/pdf +pgb: image/vnd.globalgraphics.pgb +au: audio/basic +avi: video/x-msvideo +qxb: application/vnd.Quark.QuarkXPress +wp: application/wordperfect5.1 +wmlsc: application/vnd.wap.wmlscriptc +wbxml: application/vnd.wap.wbxml +s1a: application/vnd.sealedmedia.softseal.pdf +saf: application/vnd.yamaha.smaf-audio +gtar: application/x-gtar +Z: application/x-compressed +crl: application/pkix-crl +pti: application/vnd.pvi.ptid1 +rdz: application/vnd.data-vision.rdz +aif: audio/x-aiff +flo: application/vnd.micrografx.flo +qxd: application/vnd.Quark.QuarkXPress +rpm: audio/x-pn-realaudio-plugin +djv: image/vnd.djvu +jpe: image/jpeg +kne: application/vnd.Kinar +lvp: audio/vnd.lucent.voice +stml: application/vnd.sealedmedia.softseal.html +p7c: application/pkcs7-mime +dms: application/octet-stream +s1e: application/vnd.sealed.xls +sdf: application/vnd.Kinar +sc: application/vnd.ibm.secure-container +jnlp: application/x-java-jnlp-file +dvi: application/x-dvi +smov: video/vnd.sealedmedia.softseal.mov +jisp: application/vnd.jisp +aifc: audio/x-aiff +latex: application/x-latex +cc: text/plain +s1g: image/vnd.sealedmedia.softseal.gif +wv: application/vnd.wv.csp+wbxml +mseq: application/vnd.mseq +jpg: image/jpeg +mmf: application/vnd.smaf +xmt_bin: model/vnd.parasolid.transmit.binary +s1h: application/vnd.sealedmedia.softseal.html +mpc: application/vnd.mophun.certificate +hdf: application/x-hdf +stk: application/hyperstudio +txd: application/vnd.genomatix.tuxedo +ent: application/vnd.nervana +xml: text/xml +aiff: audio/x-aiff +sh: application/x-sh +mpe: video/mpeg +s1j: image/vnd.sealedmedia.softseal.jpg +psid: audio/prs.sid +mpga: audio/mpeg +pgm: image/x-portable-graymap +si: text/vnd.wap.si +stm: application/vnd.sealedmedia.softseal.html +lbd: application/vnd.llamagraphics.life-balance.desktop +flw: application/vnd.kde.kivio +mpg: video/mpeg +c: text/plain +sgi: image/vnd.sealedmedia.softseal.gif +zip: application/zip +ecelp7470: audio/vnd.nuera.ecelp7470 +lbe: application/vnd.llamagraphics.life-balance.exchange+xml +qxl: application/vnd.Quark.QuarkXPress +p10: application/pkcs10 +bpd: application/vnd.hbci +ief: image/ief +gz: application/x-gzip +doc: application/word +efif: application/vnd.picsel +jpm: image/jpm +hpgl: application/vnd.hp-HPGL +s1m: audio/vnd.sealedmedia.softseal.mpeg +xhtml: application/xhtml+xml +xpm: image/x-xpixmap +ms: application/x-troff-ms +bcpio: application/x-bcpio +sl: text/vnd.wap.sl +wrl: x-world/x-vrml +s1n: image/vnd.sealed.png +irm: application/vnd.ibm.rights-management +pgp: application/octet-stream +entity: application/vnd.nervana +mcd: application/vnd.mcd +ecelp9600: audio/vnd.nuera.ecelp9600 +kwd: application/vnd.kde.kword +gif: image/gif +sdo: application/vnd.sealed.doc +cer: application/pkix-cert +m4u: video/vnd.mpegurl +rst: text/prs.fallenstein.rst +htm: text/html +mxmf: audio/vnd.nokia.mobile-xmf +psb: application/vnd.3gpp.pic-bw-small +knp: application/vnd.Kinar +cab: application/vnd.ms-cab-compressed +mj2: video/MJ2 +sgm: text/sgml +wbmp: image/vnd.wap.wbmp +p7m: application/pkcs7-mime +spng: image/vnd.sealed.png +lha: application/octet-stream +s1p: application/vnd.sealed.ppt +texi: application/x-texinfo +s1q: video/vnd.sealedmedia.softseal.mov +troff: text/troff +h: text/plain +shtml: text/html +msh: model/mesh +irp: application/vnd.irepository.package+xml +rct: application/prs.nprend +smht: application/vnd.sealed.mht +s11: video/vnd.sealed.mpeg1 +htke: application/vnd.kenameaapp +ps: application/postscript +mpm: application/vnd.blueice.multipass +dfac: application/vnd.dreamfactory +pvb: application/vnd.3gpp.pic-bw-var +lrm: application/vnd.ms-lrm +smh: application/vnd.sealed.mht +mpn: application/vnd.mophun.application +spd: application/vnd.sealedmedia.softseal.pdf +tiff: image/tiff +jp2: image/jp2 +rpss: application/vnd.nokia.radio-presets +qxt: application/vnd.Quark.QuarkXPress +wmlc: application/vnd.wap.wmlc +rpst: application/vnd.nokia.radio-preset +etx: text/x-setext +bmp: image/bmp +s14: video/vnd.sealed.mpeg4 +\"123\": application/vnd.lotus-1-2-3 +mpp: application/vnd.ms-project +spf: application/vnd.yamaha.smaf-phrase +kar: audio/x-midi +mid: audio/x-midi +3gp: video/3gpp +3g2: video/3gpp2 +hqx: application/mac-binhex40 +p7s: application/pkcs7-signature +ppm: image/x-portable-pixmap +pspimage: image/x-paintshoppro +cdf: application/netcdf +texinfo: application/x-texinfo +sjp: image/vnd.sealedmedia.softseal.jpg +wbs: application/vnd.criticaltools.wbs+xml +emm: application/vnd.ibm.electronic-media +s1w: application/vnd.sealed.doc +ra: audio/x-realaudio +jpx: image/jpx +evc: audio/EVRC +mif: application/x-mif +qwd: application/vnd.Quark.QuarkXPress +mp2: video/mpeg +spdf: application/vnd.sealedmedia.softseal.pdf +tbz: application/x-gtar +txt: text/plain +x_b: model/vnd.parasolid.transmit.binary +mp3: audio/mpeg +class: application/x-java-vm +smo: video/vnd.sealedmedia.softseal.mov +mp4: video/vnd.objectvideo +m4v: video/x-m4v +htx: text/html +hbci: application/vnd.hbci +tex: application/x-tex +vsc: application/vnd.vidsoft.vidconference +wqd: application/vnd.wqd +mfm: application/vnd.mfmp +sgml: text/sgml +smp: audio/vnd.sealedmedia.softseal.mpeg +curl: application/vnd.curl +cw: application/prs.cww +djvu: image/vnd.djvu +tga: image/targa +vsd: application/vnd.visio +t: text/troff +wtb: application/vnd.webturbo +spn: image/vnd.sealed.png +plb: application/vnd.3gpp.pic-bw-large +pps: application/powerpoint +yaml: text/x-yaml +psp: image/x-paintshoppro +mjp2: video/MJ2 +sms: application/vnd.3gpp.sms +hvd: application/vnd.yamaha.hv-dic +acutc: application/vnd.acucorp +ppt: application/powerpoint +les: application/vnd.hhe.lesson-player +vcf: text/x-vcard +sjpg: image/vnd.sealedmedia.softseal.jpg +kwt: application/vnd.kde.kword +sic: application/vnd.wap.sic +spp: application/vnd.sealed.ppt +cmc: application/vnd.cosmocaller +dot: application/word +sv4cpio: application/x-sv4cpio +cpio: application/x-cpio +sswf: video/vnd.sealed.swf +silo: model/mesh +sid: audio/prs.sid +yml: text/x-yaml +smv: audio/SMV +eps: application/postscript +ptid: application/vnd.pvi.ptid1 +wks: application/vnd.lotus-1-2-3 +z: application/x-compressed +hpp: text/plain +htmlx: text/html +ani: application/octet-stream +sig: application/pgp-signature +slc: application/vnd.wap.slc +rm: audio/x-pn-realaudio +smpg: video/vnd.sealed.mpeg4 +wmls: text/vnd.wap.wmlscript +bin: application/x-mac +mesh: model/mesh +atc: application/vnd.acucorp +pfr: application/font-tdpfr +plj: audio/vnd.everad.plj +rnd: application/prs.nprend +xls: application/excel +tar: application/x-tar +mp3g: video/mpeg +sgif: image/vnd.sealedmedia.softseal.gif +oda: application/oda +sdoc: application/vnd.sealed.doc +kia: application/vnd.kidspiration +prc: application/vnd.palm +req: application/vnd.nervana +xyz: x-chemical/x-xyz +soc: application/sgml-open-catalog +xlt: application/excel +awb: audio/AMR-WB +susp: application/vnd.sus-calendar +xbm: image/x-xbm +ccc: text/vnd.net2phone.commcenter.command +hh: text/plain +qwt: application/vnd.Quark.QuarkXPress +shar: application/x-shar +ssw: video/vnd.sealed.swf +xul: application/vnd.mozilla.xul+xml +kcm: application/vnd.nervana +kpr: application/vnd.kde.kpresenter +cdy: application/vnd.cinderella +nc: application/netcdf +src: application/x-wais-source +sv4crc: application/x-sv4crc +dtd: text/xml +hvp: application/vnd.yamaha.hv-voice +cww: application/prs.cww +vss: application/vnd.visio +rb: application/x-ruby +log: text/plain +swf: application/x-shockwave-flash +flv: video/x-flv +asf: video/x-ms-asf +asx: video/x-ms-asf +wma: audio/x-ms-wma +wax: audio/x-ms-wax +wmv: audio/x-ms-wmv +wvx: video/x-ms-wvx +wm: video/x-ms-wm +wmx: video/x-ms-wmx +wmz: application/x-ms-wmz +wmd: application/x-ms-wmd + diff --git a/vendor/plugins/mimetype_fu/lib/mimetype_fu.rb b/vendor/plugins/mimetype_fu/lib/mimetype_fu.rb new file mode 100644 index 00000000..ca0c6fa7 --- /dev/null +++ b/vendor/plugins/mimetype_fu/lib/mimetype_fu.rb @@ -0,0 +1,35 @@ +class File + + def self.mime_type?(file) + if file.class == File + unless RUBY_PLATFORM.include? 'mswin32' + mime = `file -bir #{file.path}`.strip + else + mime = EXTENSIONS[File.extname(file.path).gsub('.','').downcase.to_sym] + end + elsif file.class == String + mime = EXTENSIONS[(file[file.rindex('.')+1, file.size]).downcase.to_sym] + elsif file.class == StringIO + temp = File.open(Dir.tmpdir + '/upload_file.' + Process.pid.to_s, "wb") + temp << file.string + temp.close + mime = `file -bir #{temp.path}` + mime = mime.gsub(/^.*: */,"") + mime = mime.gsub(/;.*$/,"") + mime = mime.gsub(/,.*$/,"") + File.delete(temp.path) + end + + if mime + return mime + else + 'unknown/unknown' + end + end + + + def self.extensions + EXTENSIONS + end + +end \ No newline at end of file diff --git a/vendor/plugins/mimetype_fu/spec/fixtures/file.jpg b/vendor/plugins/mimetype_fu/spec/fixtures/file.jpg new file mode 100644 index 00000000..e69de29b diff --git a/vendor/plugins/mimetype_fu/spec/fixtures/file.rb b/vendor/plugins/mimetype_fu/spec/fixtures/file.rb new file mode 100644 index 00000000..e69de29b diff --git a/vendor/plugins/mimetype_fu/spec/fixtures/file.unknown b/vendor/plugins/mimetype_fu/spec/fixtures/file.unknown new file mode 100644 index 00000000..e69de29b diff --git a/vendor/plugins/mimetype_fu/spec/mime_type_spec.rb b/vendor/plugins/mimetype_fu/spec/mime_type_spec.rb new file mode 100644 index 00000000..7eb3e782 --- /dev/null +++ b/vendor/plugins/mimetype_fu/spec/mime_type_spec.rb @@ -0,0 +1,57 @@ +require File.dirname(__FILE__) + '/spec_helper' +require File.dirname(__FILE__) + '/../lib/mimetype_fu' + +describe 'A file with a know extension' do + + before(:each) do + @file = File.open(File.dirname(__FILE__) + '/fixtures/file.jpg') + end + + it 'should have an extension' do + File.extname(@file.path).should == '.jpg' + end + + it 'should have a mime type' do + File.mime_type?(@file).should == "image/jpeg" + end + +end + +describe 'A file with anunknow extension' do + + before(:each) do + @file = File.open(File.dirname(__FILE__) + '/fixtures/file.unknown') + end + + it 'should have an extension' do + File.extname(@file.path).should == '.unknown' + end + + it 'should have an unkwown mime type' do + File.mime_type?(@file).should == "unknown/unknown" + end + +end + +describe 'A valid file path' do + + before(:each) do + @file_path = "#{Dir.pwd} + /picture.png" + end + + it 'should have a mime type' do + File.mime_type?(@file_path).should == "image/png" + end + +end + +describe "An unknown extension" do + + before(:each) do + @file_path = 'file.unknown' + end + + it 'should have an unknown mime type' do + File.mime_type?(@file_path).should == "unknown/unknown" + end +end \ No newline at end of file diff --git a/vendor/plugins/mimetype_fu/spec/spec_helper.rb b/vendor/plugins/mimetype_fu/spec/spec_helper.rb new file mode 100644 index 00000000..e44c4694 --- /dev/null +++ b/vendor/plugins/mimetype_fu/spec/spec_helper.rb @@ -0,0 +1,4 @@ +ENV["RAILS_ENV"] = "test" +require File.expand_path(File.dirname(__FILE__) + "/../../../../config/environment") +require 'test_help' + diff --git a/vendor/plugins/mimetype_fu/tasks/mimetype_fu_tasks.rake b/vendor/plugins/mimetype_fu/tasks/mimetype_fu_tasks.rake new file mode 100644 index 00000000..7350cae1 --- /dev/null +++ b/vendor/plugins/mimetype_fu/tasks/mimetype_fu_tasks.rake @@ -0,0 +1,4 @@ +# desc "Explaining what the task does" +# task :mimetype_fu do +# # Task goes here +# end diff --git a/vendor/plugins/mimetype_fu/test/mimetype_fu_test.rb b/vendor/plugins/mimetype_fu/test/mimetype_fu_test.rb new file mode 100644 index 00000000..fd02cb53 --- /dev/null +++ b/vendor/plugins/mimetype_fu/test/mimetype_fu_test.rb @@ -0,0 +1,8 @@ +require 'test/unit' + +class MimetypeFuTest < Test::Unit::TestCase + # Replace this with your real tests. + def test_this_plugin + flunk + end +end diff --git a/vendor/plugins/mimetype_fu/uninstall.rb b/vendor/plugins/mimetype_fu/uninstall.rb new file mode 100644 index 00000000..97383334 --- /dev/null +++ b/vendor/plugins/mimetype_fu/uninstall.rb @@ -0,0 +1 @@ +# Uninstall hook code here