Remove unnecessary files
This commit is contained in:
		
							parent
							
								
									be47fd78a3
								
							
						
					
					
						commit
						02bb6ad5ee
					
				| 
						 | 
				
			
			@ -1,136 +0,0 @@
 | 
			
		|||
/* General style with default layout */
 | 
			
		||||
.o-archives {}
 | 
			
		||||
.o-archives-content {}
 | 
			
		||||
.o-archives-group {
 | 
			
		||||
	margin: 20px 0 0 0;
 | 
			
		||||
	padding: 20px 0 0 0;
 | 
			
		||||
	border-top: dashed 1px #eee;
 | 
			
		||||
}
 | 
			
		||||
.o-archives-group:first-child {
 | 
			
		||||
	margin: 0;
 | 
			
		||||
	padding: 0;
 | 
			
		||||
	border: 0;
 | 
			
		||||
}
 | 
			
		||||
.o-archives-category {
 | 
			
		||||
	padding-bottom: 16px;
 | 
			
		||||
	border-bottom: solid 2px #ccc;
 | 
			
		||||
	font-weight: bold;
 | 
			
		||||
}
 | 
			
		||||
.o-archives-list {}
 | 
			
		||||
.o-archives-list ul {
 | 
			
		||||
	margin: 0;
 | 
			
		||||
	padding: 0;
 | 
			
		||||
	list-style: none;
 | 
			
		||||
}
 | 
			
		||||
.o-archives-list li {}
 | 
			
		||||
.o-archives-title {
 | 
			
		||||
	border-left: solid 8px #eee;
 | 
			
		||||
	border-bottom: solid 1px #eee;
 | 
			
		||||
	padding: 0 0 0 16px;
 | 
			
		||||
}
 | 
			
		||||
.o-archives-list-item {}
 | 
			
		||||
.o-archives-list-item ol {
 | 
			
		||||
	list-style-type: decimal;
 | 
			
		||||
}
 | 
			
		||||
.o-archives-list-item li {
 | 
			
		||||
	margin: 0 0 10px 0;
 | 
			
		||||
}
 | 
			
		||||
.o-archives-file {}
 | 
			
		||||
.o-archives-file:hover {}
 | 
			
		||||
.o-archives-file-type {
 | 
			
		||||
display: inline-block;
 | 
			
		||||
vertical-align: middle;
 | 
			
		||||
margin-left: 8px;
 | 
			
		||||
padding: 0 4px;
 | 
			
		||||
height: 15px;
 | 
			
		||||
font-size: 9px;
 | 
			
		||||
text-transform: uppercase;
 | 
			
		||||
line-height: 15px;
 | 
			
		||||
background-color: #999;
 | 
			
		||||
color: #FFF;
 | 
			
		||||
border-radius: 3px;
 | 
			
		||||
-webkit-text-size-adjust: none;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Tag list */
 | 
			
		||||
.o-archives-tag-list {}
 | 
			
		||||
.o-archives-tag-list ul {
 | 
			
		||||
	margin: 0 -4px;
 | 
			
		||||
	padding: 0;
 | 
			
		||||
	list-style: none;
 | 
			
		||||
}
 | 
			
		||||
.o-archives-tag-list ul:after {
 | 
			
		||||
	content: ".";
 | 
			
		||||
	clear: both;
 | 
			
		||||
	display: block;
 | 
			
		||||
	height: 0;
 | 
			
		||||
	visibility: hidden;
 | 
			
		||||
}
 | 
			
		||||
.o-archives-tag-list li {
 | 
			
		||||
	float: left;
 | 
			
		||||
	margin: 0 4px 8px 4px;
 | 
			
		||||
}
 | 
			
		||||
.o-archives-tag {
 | 
			
		||||
	display: block;
 | 
			
		||||
	border: solid 1px #ccc;
 | 
			
		||||
	padding: 2px 6px;
 | 
			
		||||
}
 | 
			
		||||
.o-archives-tag:hover {}
 | 
			
		||||
 | 
			
		||||
/* Table layout */
 | 
			
		||||
.o-archives.layout-table {}
 | 
			
		||||
.o-archives-search {
 | 
			
		||||
	overflow: hidden;
 | 
			
		||||
	margin: 0 0 10px 0;
 | 
			
		||||
}
 | 
			
		||||
.o-archives-search label {
 | 
			
		||||
	display: inline-block;
 | 
			
		||||
	margin: 0 8px 0 0;
 | 
			
		||||
}
 | 
			
		||||
.o-archives-search-option {
 | 
			
		||||
	float: right;
 | 
			
		||||
}
 | 
			
		||||
.o-archives-search-option select {
 | 
			
		||||
	width: 80px;
 | 
			
		||||
}
 | 
			
		||||
.o-archives-search-keyword {}
 | 
			
		||||
.o-archives-search-keyword input[type=submit] {
 | 
			
		||||
	display: inline-block;
 | 
			
		||||
	vertical-align: top;
 | 
			
		||||
	margin: 0 0 0 8px;
 | 
			
		||||
}
 | 
			
		||||
.o-archives.layout-table table {
 | 
			
		||||
	width: 100%;
 | 
			
		||||
	table-layout: fixed;
 | 
			
		||||
}
 | 
			
		||||
.o-archives.layout-table tbody td {
 | 
			
		||||
	vertical-align: top;
 | 
			
		||||
	border-top: solid 1px #eee;
 | 
			
		||||
	padding: 8px 4px;
 | 
			
		||||
}
 | 
			
		||||
.o-archives.layout-table .even {}
 | 
			
		||||
.o-archives.layout-table .even td {}
 | 
			
		||||
.o-archives.layout-table .column-ctrl {
 | 
			
		||||
	text-align: left;
 | 
			
		||||
}
 | 
			
		||||
.o-archives.layout-table .column-ctrl.col-title { width: 30% }
 | 
			
		||||
.o-archives.layout-table .column-ctrl.col-file {}
 | 
			
		||||
.o-archives.layout-table .column-ctrl.col-category { width: 15%; }
 | 
			
		||||
.o-archives.layout-table .column-ctrl.col-tag { width: 20%; }
 | 
			
		||||
.o-archives.layout-table .o-archives-title {
 | 
			
		||||
	font-weight: bold;
 | 
			
		||||
	border: 0;
 | 
			
		||||
	padding: 0;
 | 
			
		||||
}
 | 
			
		||||
.o-archives.layout-table .o-archives-category {
 | 
			
		||||
	padding: 0;
 | 
			
		||||
	margin: 0;
 | 
			
		||||
	border: 0;
 | 
			
		||||
}
 | 
			
		||||
.o-archives.layout-table .o-archives-tag {
 | 
			
		||||
	display: inline-block;
 | 
			
		||||
	margin-bottom: 3px;
 | 
			
		||||
}
 | 
			
		||||
.o-archives.layout-table .o-archives-category {
 | 
			
		||||
	font-weight: normal;
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										0
									
								
								vendor/built_in_modules/dictionary/app/assets/stylesheets/dictionary/dictionary.css
								
								
								
									vendored
								
								
									Normal file
								
							
							
						
						
									
										0
									
								
								vendor/built_in_modules/dictionary/app/assets/stylesheets/dictionary/dictionary.css
								
								
								
									vendored
								
								
									Normal file
								
							| 
						 | 
				
			
			@ -1,87 +0,0 @@
 | 
			
		|||
# encoding: utf-8
 | 
			
		||||
 | 
			
		||||
class ArchiveFile
 | 
			
		||||
  include Mongoid::Document
 | 
			
		||||
  include Mongoid::Timestamps
 | 
			
		||||
  include Mongoid::MultiParameterAttributes
 | 
			
		||||
  include Mongoid::Sortable
 | 
			
		||||
 | 
			
		||||
  BelongsToCategory =  :archive_file_category
 | 
			
		||||
  include OrbitCoreLib::BelongsToCategoryMayDisable
 | 
			
		||||
 | 
			
		||||
  PAYMENT_TYPES = @site_valid_locales
 | 
			
		||||
 | 
			
		||||
  include OrbitTag::Taggable
 | 
			
		||||
  taggable
 | 
			
		||||
 | 
			
		||||
  field :title, localize: true
 | 
			
		||||
 | 
			
		||||
  # has_and_belongs_to_many :tags, :class_name => "ArchiveTag"
 | 
			
		||||
 | 
			
		||||
  field :create_user_id
 | 
			
		||||
  field :update_user_id
 | 
			
		||||
 | 
			
		||||
  field :is_top, :type => Boolean, :default => false
 | 
			
		||||
  field :is_hot, :type => Boolean, :default => false
 | 
			
		||||
  field :is_hidden, :type => Boolean, :default => false
 | 
			
		||||
 | 
			
		||||
  scope :can_display,where(is_hidden: false)
 | 
			
		||||
 | 
			
		||||
  # belongs_to :archive_file_category
 | 
			
		||||
 | 
			
		||||
  has_many :archive_file_multiples, :autosave => true, :dependent => :destroy
 | 
			
		||||
 | 
			
		||||
  accepts_nested_attributes_for :archive_file_multiples, :allow_destroy => true
 | 
			
		||||
 | 
			
		||||
  validates :title, :at_least_one => true
 | 
			
		||||
 | 
			
		||||
  after_save :save_archive_file_multiples
 | 
			
		||||
 | 
			
		||||
  # searchable do
 | 
			
		||||
  #   text :titles do
 | 
			
		||||
  #     title_translations.to_a.collect{|t| t[1]}
 | 
			
		||||
  #   end
 | 
			
		||||
  #   boolean :frontend_search do
 | 
			
		||||
  #     !is_hidden
 | 
			
		||||
  #   end
 | 
			
		||||
 | 
			
		||||
  # end
 | 
			
		||||
 | 
			
		||||
  def self.search( category_id = nil )
 | 
			
		||||
 | 
			
		||||
	if category_id.to_s.size > 0
 | 
			
		||||
 | 
			
		||||
	  find(:all, :conditions => {archive_file_category_id: category_id}).desc( :is_top, :title )
 | 
			
		||||
 | 
			
		||||
	else
 | 
			
		||||
 | 
			
		||||
	  find(:all).desc( :is_top, :title)
 | 
			
		||||
 | 
			
		||||
	end
 | 
			
		||||
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  def self.widget_datas
 | 
			
		||||
 | 
			
		||||
	  where( :is_hidden => false ).desc(:is_top, :title)
 | 
			
		||||
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  def is_top?
 | 
			
		||||
    self.is_top
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  def get_file_icon( file_data )
 | 
			
		||||
    file_icon = "<span class=\"o-archives-file-type\">#{file_data.split('.')[-1]}</span>".html_safe
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  def save_archive_file_multiples
 | 
			
		||||
	 self.archive_file_multiples.each do |t|
 | 
			
		||||
  	  if t.should_destroy
 | 
			
		||||
  		t.destroy
 | 
			
		||||
  	  end
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
| 
						 | 
				
			
			@ -1,47 +0,0 @@
 | 
			
		|||
# encoding: utf-8
 | 
			
		||||
 | 
			
		||||
class ArchiveFileCategory
 | 
			
		||||
  include Mongoid::Document
 | 
			
		||||
  include Mongoid::Timestamps
 | 
			
		||||
  include OrbitCoreLib::ObjectAuthable
 | 
			
		||||
  include OrbitCoreLib::ObjectDisable
 | 
			
		||||
  include Sunspot::Mongo
 | 
			
		||||
  # include Mongoid::MultiParameterAttributes
 | 
			
		||||
  APP_NAME = 'Archive'
 | 
			
		||||
  ObjectAuthTitlesOptions = %W{submit_new fact_check}
 | 
			
		||||
  AfterObjectAuthUrl = '/panel/archive/back_end/archive_file_categorys'
 | 
			
		||||
  
 | 
			
		||||
  field :disable, type: Boolean, :default => false
 | 
			
		||||
  field :display
 | 
			
		||||
  field :key  
 | 
			
		||||
  field :title, localize: true
 | 
			
		||||
  
 | 
			
		||||
  has_many :archive_files
 | 
			
		||||
 | 
			
		||||
  validates :title, :at_least_one => true
 | 
			
		||||
  
 | 
			
		||||
  searchable do
 | 
			
		||||
    text :titles do
 | 
			
		||||
      title_translations.to_a.collect{|t| t[1]}
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    boolean :frontend_search do
 | 
			
		||||
      !disable
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    text :files do
 | 
			
		||||
      archive_files.can_display.collect{|t| t.title_translations.to_a.collect{|t| t[1]}}
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  def pp_object
 | 
			
		||||
    title
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  def self.from_id(id)
 | 
			
		||||
    ArchiveFileCategory.find(id) rescue nil
 | 
			
		||||
  end
 | 
			
		||||
  
 | 
			
		||||
end
 | 
			
		||||
| 
						 | 
				
			
			@ -1,27 +0,0 @@
 | 
			
		|||
class ArchiveFileMultiple
 | 
			
		||||
 | 
			
		||||
  include Mongoid::Document
 | 
			
		||||
  include Mongoid::Timestamps
 | 
			
		||||
  include Mongoid::Sortable
 | 
			
		||||
 | 
			
		||||
  mount_uploader :file, AssetUploader
 | 
			
		||||
 | 
			
		||||
  field :file_title, localize: true
 | 
			
		||||
  # field :description
 | 
			
		||||
  field :choose_lang, :type => Array, :default => nil
 | 
			
		||||
 | 
			
		||||
  field :should_destroy, :type => Boolean
 | 
			
		||||
 | 
			
		||||
  default_scope asc(:sort_number)
 | 
			
		||||
 | 
			
		||||
  def choose_lang_display(lang)
 | 
			
		||||
    self.choose_lang.include?(lang)
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  belongs_to :archive_file
 | 
			
		||||
 | 
			
		||||
  # has_many :archive_file_multiple_langs, :autosave => true, :dependent => :destroy
 | 
			
		||||
 | 
			
		||||
  # accepts_nested_attributes_for :archive_file_multiple_langs, :allow_destroy => true
 | 
			
		||||
 | 
			
		||||
end
 | 
			
		||||
| 
						 | 
				
			
			@ -1,10 +0,0 @@
 | 
			
		|||
class ArchiveTag < Tag
 | 
			
		||||
  
 | 
			
		||||
  has_and_belongs_to_many :archive_files
 | 
			
		||||
  
 | 
			
		||||
  
 | 
			
		||||
  def get_visible_links(sort = :name)
 | 
			
		||||
	  self.archive_files.where(:is_hidden => false).desc(:is_top, sort)
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
end
 | 
			
		||||
| 
						 | 
				
			
			@ -1,4 +0,0 @@
 | 
			
		|||
require "archive/engine"
 | 
			
		||||
 | 
			
		||||
module Archive
 | 
			
		||||
end
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,4 @@
 | 
			
		|||
require "dictionary/engine"
 | 
			
		||||
 | 
			
		||||
module Dictionary
 | 
			
		||||
end
 | 
			
		||||
| 
						 | 
				
			
			@ -1,4 +1,4 @@
 | 
			
		|||
module Archive
 | 
			
		||||
module Dictionary
 | 
			
		||||
  class Engine < Rails::Engine
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
| 
						 | 
				
			
			@ -1,3 +1,3 @@
 | 
			
		|||
module Archive
 | 
			
		||||
module Dictionary
 | 
			
		||||
  VERSION = "0.0.1"
 | 
			
		||||
end
 | 
			
		||||
| 
						 | 
				
			
			@ -1,4 +1,4 @@
 | 
			
		|||
# desc "Explaining what the task does"
 | 
			
		||||
# task :archive do
 | 
			
		||||
# task :dictionary do
 | 
			
		||||
#   # Task goes here
 | 
			
		||||
# end
 | 
			
		||||
		Loading…
	
		Reference in New Issue